update to deno
This commit is contained in:
@@ -5,7 +5,7 @@ import { logger } from './szci.logging.ts';
|
||||
import { Szci } from './szci.classes.szci.ts';
|
||||
|
||||
/**
|
||||
* the main config interface for npmci
|
||||
* the main config interface for szci
|
||||
*/
|
||||
export interface ISzciOptions {
|
||||
projectInfo: plugins.projectinfo.ProjectInfo;
|
||||
@@ -24,35 +24,35 @@ export interface ISzciOptions {
|
||||
gitlabRunnerTags: string[];
|
||||
|
||||
// urls
|
||||
urlCloudly: string;
|
||||
urlCloudly?: string;
|
||||
|
||||
// cloudron
|
||||
cloudronAppName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* a config class for Npmci
|
||||
* a config class for Szci
|
||||
*/
|
||||
export class SzciConfig {
|
||||
public szciRef: Szci;
|
||||
|
||||
public npmciNpmextra: plugins.npmextra.Npmextra;
|
||||
public kvStorage: plugins.npmextra.KeyValueStore;
|
||||
public npmciQenv: plugins.qenv.Qenv;
|
||||
public szciNpmextra!: plugins.npmextra.Npmextra;
|
||||
public kvStorage!: plugins.npmextra.KeyValueStore;
|
||||
public szciQenv!: plugins.qenv.Qenv;
|
||||
|
||||
private configObject: ISzciOptions;
|
||||
private configObject!: ISzciOptions;
|
||||
|
||||
constructor(szciRefArg: Szci) {
|
||||
this.szciRef = szciRefArg;
|
||||
}
|
||||
|
||||
public async init() {
|
||||
this.npmciNpmextra = new plugins.npmextra.Npmextra(paths.cwd);
|
||||
this.szciNpmextra = new plugins.npmextra.Npmextra(paths.cwd);
|
||||
this.kvStorage = new plugins.npmextra.KeyValueStore({
|
||||
typeArg: 'userHomeDir',
|
||||
identityArg: `.npmci_${this.szciRef.npmciEnv.repo.user}_${this.szciRef.npmciEnv.repo.repo}`,
|
||||
identityArg: `.szci_${this.szciRef.szciEnv.repo.user}_${this.szciRef.szciEnv.repo.repo}`,
|
||||
});
|
||||
this.npmciQenv = new plugins.qenv.Qenv(
|
||||
this.szciQenv = new plugins.qenv.Qenv(
|
||||
paths.SzciProjectDir,
|
||||
paths.SzciProjectNogitDir,
|
||||
false
|
||||
@@ -67,9 +67,9 @@ export class SzciConfig {
|
||||
npmRegistryUrl: 'registry.npmjs.org',
|
||||
gitlabRunnerTags: [],
|
||||
dockerBuildargEnvMap: {},
|
||||
urlCloudly: await this.npmciQenv.getEnvVarOnDemand('NPMCI_URL_CLOUDLY'),
|
||||
urlCloudly: await this.szciQenv.getEnvVarOnDemand('SZCI_URL_CLOUDLY'),
|
||||
};
|
||||
this.configObject = this.npmciNpmextra.dataFor<ISzciOptions>('szci', this.configObject);
|
||||
this.configObject = this.szciNpmextra.dataFor<ISzciOptions>('@ship.zone/szci', this.configObject);
|
||||
}
|
||||
|
||||
public getConfig(): ISzciOptions {
|
||||
|
||||
Reference in New Issue
Block a user