fix(core): update
This commit is contained in:
@ -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
|
||||
*/
|
||||
|
@ -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';
|
||||
|
Reference in New Issue
Block a user