fix(core): update

This commit is contained in:
2019-09-13 18:15:45 +02:00
parent ea5e552192
commit d6201b864c
4 changed files with 71 additions and 80 deletions

View File

@ -45,10 +45,23 @@ export class DockerHost {
this.registryToken = plugins.smartstring.base64.encode(response.body.IdentityToken);
}
/**
* sets an auth token
* @param authToken
*/
public setAuthToken(authToken: string) {
this.registryToken = authToken;
}
/**
* gets the token from the .docker/config.json file for GitLab registry
*/
public getGitlabComTokenFromDockerConfig() {
const dockerConfigPath = plugins.smartpath.get.home('~/.docker/config.json');
const configObject = plugins.smartfile.fs.toObjectSync(dockerConfigPath);
this.registryToken = configObject.auths['registry.gitlab.com'].auth;
}
/**
* gets all networks
*/
@ -56,6 +69,11 @@ export class DockerHost {
return await DockerNetwork.getNetworks(this);
}
/**
*
*/
/**
* gets all containers
*/

View File

@ -1,16 +1,25 @@
// node native path
import * as path from 'path';
export {
path
};
// @pushrocks scope
import * as lik from '@pushrocks/lik';
import * as smartfile from '@pushrocks/smartfile';
import * as smartjson from '@pushrocks/smartjson';
import * as smartlog from '@pushrocks/smartlog';
import * as smartnetwork from '@pushrocks/smartnetwork';
import * as smartpath from '@pushrocks/smartpath';
import * as smartpromise from '@pushrocks/smartpromise';
import * as smartrequest from '@pushrocks/smartrequest';
import * as smartstring from '@pushrocks/smartstring'
import * as smartstring from '@pushrocks/smartstring';
import * as smartversion from '@pushrocks/smartversion';
smartlog.defaultLogger.enableConsole();
export { lik, smartjson, smartlog, smartnetwork, smartpromise, smartrequest, smartstring, smartversion };
export { lik, smartfile, smartjson, smartlog, smartnetwork, smartpath, smartpromise, smartrequest, smartstring, smartversion };
// third party
import * as rxjs from 'rxjs';