fix(core): update
This commit is contained in:
		
							
								
								
									
										12
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								package.json
									
									
									
									
									
								
							@@ -27,16 +27,16 @@
 | 
			
		||||
  },
 | 
			
		||||
  "homepage": "https://gitlab.com/pushrocks/qenv#README",
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "@git.zone/tsbuild": "^2.1.66",
 | 
			
		||||
    "@git.zone/tsbuild": "^2.1.72",
 | 
			
		||||
    "@git.zone/tsrun": "^1.2.44",
 | 
			
		||||
    "@git.zone/tstest": "^1.0.77",
 | 
			
		||||
    "@git.zone/tstest": "^1.0.86",
 | 
			
		||||
    "@push.rocks/tapbundle": "^5.0.15",
 | 
			
		||||
    "@types/node": "^20.8.7"
 | 
			
		||||
    "@types/node": "^20.11.17"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@api.global/typedrequest": "^3.0.2",
 | 
			
		||||
    "@configvault.io/interfaces": "^1.0.13",
 | 
			
		||||
    "@push.rocks/smartfile": "^10.0.33",
 | 
			
		||||
    "@api.global/typedrequest": "^3.0.4",
 | 
			
		||||
    "@configvault.io/interfaces": "^1.0.17",
 | 
			
		||||
    "@push.rocks/smartfile": "^11.0.4",
 | 
			
		||||
    "@push.rocks/smartlog": "^3.0.3",
 | 
			
		||||
    "@push.rocks/smartpath": "^5.0.11"
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										948
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										948
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -3,6 +3,6 @@
 | 
			
		||||
 */
 | 
			
		||||
export const commitinfo = {
 | 
			
		||||
  name: '@push.rocks/qenv',
 | 
			
		||||
  version: '6.0.4',
 | 
			
		||||
  version: '6.0.5',
 | 
			
		||||
  description: 'easy promised environments'
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
import * as plugins from './qenv.plugins.js';
 | 
			
		||||
 | 
			
		||||
export class ConfigVaultAdapter {
 | 
			
		||||
export class CloudlyAdapter {
 | 
			
		||||
  public configVaultUrl: string;
 | 
			
		||||
  
 | 
			
		||||
  constructor(configVaultUrl?: string) {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import { ConfigVaultAdapter } from './qenv.classes.configvaultadapter.js';
 | 
			
		||||
import { CloudlyAdapter } from './qenv.classes.configvaultadapter.js';
 | 
			
		||||
import * as plugins from './qenv.plugins.js';
 | 
			
		||||
 | 
			
		||||
export type TEnvVarRef = string | (() => Promise<string>);
 | 
			
		||||
@@ -10,17 +10,17 @@ export class Qenv {
 | 
			
		||||
  public keyValueObject: { [key: string]: any } = {};
 | 
			
		||||
  public logger = new plugins.smartlog.ConsoleLog();
 | 
			
		||||
 | 
			
		||||
  public configVaultAdapter: ConfigVaultAdapter;
 | 
			
		||||
  public cloudlyAdapter: CloudlyAdapter;
 | 
			
		||||
 | 
			
		||||
  public qenvFilePathAbsolute: string;
 | 
			
		||||
  public envFilePathAbsolute: string;
 | 
			
		||||
 | 
			
		||||
  constructor(
 | 
			
		||||
    qenvFileBasePathArg: string = process.cwd(),
 | 
			
		||||
    envFileBasePathArg: string,
 | 
			
		||||
    envFileBasePathArg?: string,
 | 
			
		||||
    failOnMissing: boolean = true
 | 
			
		||||
  ) {
 | 
			
		||||
    this.configVaultAdapter = new ConfigVaultAdapter();
 | 
			
		||||
    this.cloudlyAdapter = new CloudlyAdapter();
 | 
			
		||||
    this.initializeFilePaths(qenvFileBasePathArg, envFileBasePathArg);
 | 
			
		||||
    this.loadRequiredEnvVars();
 | 
			
		||||
    this.loadAvailableEnvVars();
 | 
			
		||||
@@ -32,10 +32,12 @@ export class Qenv {
 | 
			
		||||
      plugins.path.resolve(qenvFileBasePathArg),
 | 
			
		||||
      'qenv.yml'
 | 
			
		||||
    );
 | 
			
		||||
    this.envFilePathAbsolute = plugins.path.join(
 | 
			
		||||
      plugins.path.resolve(envFileBasePathArg),
 | 
			
		||||
      'env.json'
 | 
			
		||||
    );
 | 
			
		||||
    if (envFileBasePathArg) {
 | 
			
		||||
      this.envFilePathAbsolute = plugins.path.join(
 | 
			
		||||
        plugins.path.resolve(envFileBasePathArg),
 | 
			
		||||
        'env.json'
 | 
			
		||||
      );
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  private loadRequiredEnvVars() {
 | 
			
		||||
@@ -144,6 +146,9 @@ export class Qenv {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  private getFromEnvJsonFile(envVarName: string): string | undefined {
 | 
			
		||||
    if (!plugins.smartfile.fs.fileExistsSync(this.envFilePathAbsolute)) {
 | 
			
		||||
      return undefined;
 | 
			
		||||
    }
 | 
			
		||||
    try {
 | 
			
		||||
      const envJson = plugins.smartfile.fs.toObjectSync(this.envFilePathAbsolute);
 | 
			
		||||
      const value = envJson[envVarName];
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user