fix(core): update
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@ship.zone/npmci',
|
||||
version: '4.1.26',
|
||||
version: '4.1.27',
|
||||
description: 'node and docker in gitlab ci on steroids'
|
||||
}
|
||||
|
@ -6,5 +6,5 @@ export const npmciInstance = new Npmci();
|
||||
export { Dockerfile, Npmci };
|
||||
|
||||
export const runCli = async () => {
|
||||
npmciInstance.start();
|
||||
await npmciInstance.start();
|
||||
};
|
||||
|
@ -39,11 +39,16 @@ export class Npmci {
|
||||
projectId: 'gitzone',
|
||||
appName: 'npmci',
|
||||
});
|
||||
}
|
||||
|
||||
public async start() {
|
||||
this.cloudlyConnector = new CloudlyConnector(this);
|
||||
this.npmciEnv = new NpmciEnv(this);
|
||||
this.npmciInfo = new NpmciInfo(this);
|
||||
await this.npmciInfo.printToConsole();
|
||||
this.npmciCli = new NpmciCli(this);
|
||||
this.npmciConfig = new NpmciConfig(this);
|
||||
await this.npmciConfig.init();
|
||||
|
||||
// managers
|
||||
this.cloudronManager = new NpmciCloudronManager(this);
|
||||
@ -51,11 +56,6 @@ export class Npmci {
|
||||
this.gitManager = new NpmciGitManager(this);
|
||||
this.nodejsManager = new NpmciNodeJsManager(this);
|
||||
this.npmManager = new NpmciNpmManager(this);
|
||||
}
|
||||
|
||||
public async start() {
|
||||
await this.npmciInfo.printToConsole();
|
||||
await this.npmciConfig.init();
|
||||
this.npmciCli.startParse();
|
||||
}
|
||||
}
|
||||
|
@ -44,10 +44,12 @@ export class NpmciConfig {
|
||||
|
||||
constructor(npmciRefArg: Npmci) {
|
||||
this.npmciRef = npmciRefArg;
|
||||
}
|
||||
|
||||
public async init() {
|
||||
this.npmciNpmextra = new plugins.npmextra.Npmextra(paths.cwd);
|
||||
this.kvStorage = new plugins.npmextra.KeyValueStore(
|
||||
'custom',
|
||||
'userHomeDir',
|
||||
`${this.npmciRef.npmciEnv.repo.user}_${this.npmciRef.npmciEnv.repo.repo}`
|
||||
);
|
||||
this.npmciQenv = new plugins.qenv.Qenv(
|
||||
@ -65,11 +67,8 @@ export class NpmciConfig {
|
||||
npmRegistryUrl: 'registry.npmjs.org',
|
||||
gitlabRunnerTags: [],
|
||||
dockerBuildargEnvMap: {},
|
||||
urlCloudly: this.npmciQenv.getEnvVarOnDemand('NPMCI_URL_CLOUDLY'),
|
||||
urlCloudly: await this.npmciQenv.getEnvVarOnDemand('NPMCI_URL_CLOUDLY'),
|
||||
};
|
||||
}
|
||||
|
||||
public async init() {
|
||||
this.configObject = this.npmciNpmextra.dataFor<INpmciOptions>('npmci', this.configObject);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ export class NpmciInfo {
|
||||
this.npmciRef = npmciArg;
|
||||
}
|
||||
|
||||
public printToConsole() {
|
||||
logger.log('info', `npmci version: ${this.projectInfo.version}`);
|
||||
public async printToConsole() {
|
||||
await logger.log('info', `npmci version: ${this.projectInfo.version}`);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user