fix(core): update

This commit is contained in:
Philipp Kunz 2024-02-12 18:40:01 +01:00
parent a284c58a68
commit 080e133e9f
2 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/npmextra', name: '@push.rocks/npmextra',
version: '4.0.15', version: '4.0.16',
description: 'do more with npm' description: 'do more with npm'
} }

View File

@ -1,6 +1,7 @@
import * as plugins from './npmextra.plugins.js'; import * as plugins from './npmextra.plugins.js';
import * as paths from './npmextra.paths.js'; import * as paths from './npmextra.paths.js';
import { KeyValueStore } from './npmextra.classes.keyvaluestore.js'; import { KeyValueStore } from './npmextra.classes.keyvaluestore.js';
import { env } from 'process';
export interface IAppDataOptions { export interface IAppDataOptions {
dirPath?: string; dirPath?: string;
@ -68,8 +69,11 @@ export class AppData {
if (this.options.envMapping) { if (this.options.envMapping) {
const qenvInstance = new plugins.qenv.Qenv(process.cwd(), '~/.cloudlyrc'); const qenvInstance = new plugins.qenv.Qenv(process.cwd(), '~/.cloudlyrc');
for (const key in this.options.envMapping) { for (const key in this.options.envMapping) {
const envValue = await qenvInstance.getEnvVarOnDemand(key); let envValue = await qenvInstance.getEnvVarOnDemand(key);
if (envValue) { if (envValue) {
if (key.endsWith('_JSON')) {
envValue = JSON.parse(envValue);
}
await this.kvStore.writeKey(key, envValue); await this.kvStore.writeKey(key, envValue);
} }
} }