fix(core): update

This commit is contained in:
Philipp Kunz 2022-07-28 10:09:01 +02:00
parent d4c3ec6c90
commit 44252ab0d3
9 changed files with 12444 additions and 3248 deletions

View File

@ -9,7 +9,7 @@
"githost": "gitlab.com",
"gitscope": "pushrocks",
"gitrepo": "qenv",
"shortDescription": "easy promised environments",
"description": "easy promised environments",
"npmPackagename": "@pushrocks/qenv",
"license": "MIT"
}

15608
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,7 @@
"description": "easy promised environments",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"scripts": {
"test": "(tstest test/)",
"build": "(tsbuild --web)"
@ -25,17 +26,18 @@
},
"homepage": "https://gitlab.com/pushrocks/qenv#README",
"devDependencies": {
"@gitzone/tsbuild": "^2.1.24",
"@gitzone/tsrun": "^1.2.12",
"@gitzone/tstest": "^1.0.33",
"@pushrocks/tapbundle": "^3.2.1",
"@types/node": "^14.0.12",
"tslint": "^6.1.2",
"@gitzone/tsbuild": "^2.1.63",
"@gitzone/tsrun": "^1.2.37",
"@gitzone/tstest": "^1.0.72",
"@pushrocks/tapbundle": "^5.0.4",
"@types/node": "^18.6.2",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@pushrocks/smartfile": "^7.0.12",
"@pushrocks/smartlog": "^2.0.26"
"@pushrocks/smartfile": "^10.0.4",
"@pushrocks/smartlog": "^3.0.1",
"@pushrocks/smartpath": "^5.0.5"
},
"files": [
"ts/**/*",

View File

@ -1,6 +1,15 @@
import * as path from 'path';
import { tap, expect } from '@pushrocks/tapbundle';
import * as qenv from '../ts/index';
import * as qenv from '../ts/index.js';
import * as smartpath from '@pushrocks/smartpath';
export {
smartpath
}
const __dirname = smartpath.get.dirnameFromImportMetaUrl(import.meta.url);
process.env['key1'] = 'original';
@ -8,22 +17,22 @@ let testQenv: qenv.Qenv;
tap.test('should create a new class', async () => {
testQenv = new qenv.Qenv(path.join(__dirname, 'assets'), path.join(__dirname, 'assets'), false);
expect(testQenv).to.be.instanceof(qenv.Qenv);
expect(testQenv).toBeInstanceOf(qenv.Qenv);
});
tap.test('key1 should be not be overwritten since it is already present', async () => {
expect(testQenv.getEnvVarRequired('key1')).to.equal('original');
expect(testQenv.getEnvVarOnDemand('key1')).to.equal('original');
expect(testQenv.getEnvVarRequired('key1')).toEqual('original');
expect(testQenv.getEnvVarOnDemand('key1')).toEqual('original');
});
tap.test('key2 should be read from Yml', async () => {
expect(testQenv.getEnvVarRequired('key2')).to.equal('fromJson');
expect(testQenv.getEnvVarOnDemand('key2')).to.equal('fromJson');
expect(testQenv.getEnvVarRequired('key2')).toEqual('fromJson');
expect(testQenv.getEnvVarOnDemand('key2')).toEqual('fromJson');
});
tap.test('keyValueObjectArray should hold all retrieved values', async () => {
expect(testQenv.keyValueObject.key1).to.equal('original');
expect(testQenv.keyValueObject.key2).to.equal('fromJson');
expect(testQenv.keyValueObject.key1).toEqual('original');
expect(testQenv.keyValueObject.key2).toEqual('fromJson');
});
tap.start();

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/qenv',
version: '4.0.11',
description: 'easy promised environments'
}

View File

@ -1 +1 @@
export * from './qenv.classes.qenv';
export * from './qenv.classes.qenv.js';

View File

@ -1,4 +1,4 @@
import * as plugins from './qenv.plugins';
import * as plugins from './qenv.plugins.js';
/**
* class Qenv

10
tsconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "nodenext",
"esModuleInterop": true
}
}

View File

@ -1,17 +0,0 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}