fix(core): update

This commit is contained in:
Philipp Kunz 2024-06-19 17:53:10 +02:00
parent 09e8b8b94c
commit 2ad3da85a9
6 changed files with 48 additions and 17 deletions

View File

@ -28,7 +28,8 @@
"@push.rocks/smartpath": "^5.0.18",
"@push.rocks/smartpromise": "^4.0.2",
"@push.rocks/smartrx": "^3.0.7",
"@push.rocks/taskbuffer": "^3.1.7"
"@push.rocks/taskbuffer": "^3.1.7",
"@tsclass/tsclass": "^4.0.59"
},
"devDependencies": {
"@git.zone/tsbuild": "^2.1.80",

View File

@ -32,6 +32,9 @@ importers:
'@push.rocks/taskbuffer':
specifier: ^3.1.7
version: 3.1.7
'@tsclass/tsclass':
specifier: ^4.0.59
version: 4.0.59
devDependencies:
'@git.zone/tsbuild':
specifier: ^2.1.80
@ -625,8 +628,8 @@ packages:
'@tsclass/tsclass@3.0.48':
resolution: {integrity: sha512-hC65UvDlp9qvsl6OcIZXz0JNiWZ0gyzsTzbXpg215sGxopgbkOLCr6E0s4qCTnweYm95gt2AdY95uP7M7kExaQ==}
'@tsclass/tsclass@4.0.55':
resolution: {integrity: sha512-zg774JF90/3/rJ7xk4LyGgxcUzxdKIQcwtBVxez4LhvegESxvHiFmX42WL105iBpE53ISJ8sctLWlwG1JQZdlA==}
'@tsclass/tsclass@4.0.59':
resolution: {integrity: sha512-zSdNX/qzuekfCFG81k4e1X2tj1S+rbs2tM4CFAzT+aLiu2/AqdS1iPYwH/sYpY8vm+vBfllks9rlsuRSA2xTeg==}
'@tsconfig/node10@1.0.11':
resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==}
@ -3060,7 +3063,7 @@ snapshots:
'@push.rocks/taskbuffer': 3.1.7
'@push.rocks/webrequest': 3.0.37
'@push.rocks/webstore': 2.0.20
'@tsclass/tsclass': 4.0.55
'@tsclass/tsclass': 4.0.59
'@types/express': 4.17.21
body-parser: 1.20.2
cors: 2.8.5
@ -3565,7 +3568,7 @@ snapshots:
'@push.rocks/smartlog-interfaces@3.0.2':
dependencies:
'@api.global/typedrequest-interfaces': 2.0.2
'@tsclass/tsclass': 4.0.55
'@tsclass/tsclass': 4.0.59
'@push.rocks/smartlog@3.0.7':
dependencies:
@ -3645,7 +3648,7 @@ snapshots:
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartpuppeteer': 2.0.2
'@push.rocks/smartunique': 3.0.9
'@tsclass/tsclass': 4.0.55
'@tsclass/tsclass': 4.0.59
'@types/express': 4.17.21
express: 4.19.2
pdf-lib: 1.17.1
@ -3703,7 +3706,7 @@ snapshots:
'@push.rocks/smartxml': 1.0.8
'@push.rocks/smartyaml': 2.0.5
'@push.rocks/webrequest': 3.0.37
'@tsclass/tsclass': 4.0.55
'@tsclass/tsclass': 4.0.59
'@push.rocks/smartsocket@2.0.27':
dependencies:
@ -3837,7 +3840,7 @@ snapshots:
dependencies:
'@pushrocks/smartdelay': 3.0.1
'@pushrocks/smartpromise': 4.0.2
'@tsclass/tsclass': 4.0.55
'@tsclass/tsclass': 4.0.59
'@push.rocks/webstore@2.0.20':
dependencies:
@ -4013,7 +4016,7 @@ snapshots:
dependencies:
type-fest: 2.19.0
'@tsclass/tsclass@4.0.55':
'@tsclass/tsclass@4.0.59':
dependencies:
type-fest: 4.20.0

27
test/test.appdata.ts Normal file
View File

@ -0,0 +1,27 @@
import { expect, tap } from '@push.rocks/tapbundle';
import path = require('path');
// module to test
import * as npmextra from '../ts/index.js';
interface ITestOptions {
hi: string;
deep: {
deep1: string;
deep2: string;
};
}
let testAppdata: npmextra.AppData<ITestOptions>;
tap.test('should create a valid AppData', async () => {
testAppdata = new npmextra.AppData<ITestOptions>({
envMapping: {
deep: {
deep1: '',
},
},
});
});
export default tap.start();

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/npmextra',
version: '5.0.19',
version: '5.0.20',
description: 'A utility to enhance npm with additional configuration, tool management capabilities, and a key-value store for project setups.'
}

View File

@ -1,11 +1,7 @@
import * as plugins from './npmextra.plugins.js';
import * as paths from './npmextra.paths.js';
import { KeyValueStore } from './npmextra.classes.keyvaluestore.js';
import { env } from 'process';
export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
};
export interface IAppDataOptions<T = any> {
dirPath?: string;
@ -19,9 +15,7 @@ export interface IAppDataOptions<T = any> {
/**
* kvStoreKey: 'MY_ENV_VAR'
*/
envMapping?: DeepPartial<{
[key in keyof T]: string | object;
}>;
envMapping?: plugins.tsclass.typeFest.PartialDeep<T>
}
export class AppData<T = any> {

View File

@ -1,3 +1,9 @@
import * as tsclass from '@tsclass/tsclass';
export {
tsclass
}
import * as qenv from '@push.rocks/qenv';
import * as smartlog from '@push.rocks/smartlog';
import * as path from 'path';