@warlock.js/core 3.0.3 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/builder/config-types-generator.d.ts.map +1 -1
- package/cjs/builder/config-types-generator.js +0 -3
- package/cjs/builder/config-types-generator.js.map +1 -1
- package/cjs/config/typed-config.d.ts +1 -1
- package/cjs/config/typed-config.d.ts.map +1 -1
- package/esm/builder/config-types-generator.d.ts.map +1 -1
- package/esm/builder/config-types-generator.js +1 -4
- package/esm/builder/config-types-generator.js.map +1 -1
- package/esm/config/typed-config.d.ts +1 -1
- package/esm/config/typed-config.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-types-generator.d.ts","sourceRoot":"","sources":["../../src/builder/config-types-generator.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAsB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"config-types-generator.d.ts","sourceRoot":"","sources":["../../src/builder/config-types-generator.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAsB,mBAAmB,sBA0DxC"}
|
|
@@ -45,12 +45,9 @@ ${configKeys.map(key => ` ${key}: true;`).join("\n")}
|
|
|
45
45
|
interface ConfigTypeMap extends UserConfigTypeMap {}
|
|
46
46
|
}
|
|
47
47
|
`;
|
|
48
|
-
// Ensure .warlock directory exists
|
|
49
|
-
await fs.ensureDirectoryAsync(paths.warlockPath());
|
|
50
48
|
// Write type augmentation file
|
|
51
49
|
const outputPath = paths.warlockPath("config-augmentation.d.ts");
|
|
52
50
|
await fs.putFileAsync(outputPath, typeDefinition);
|
|
53
|
-
console.log(`✓ Generated config types for ${configKeys.length} configurations: ${configKeys.join(", ")}`);
|
|
54
51
|
return configKeys;
|
|
55
52
|
}
|
|
56
53
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-types-generator.js","sources":["../../src/builder/config-types-generator.ts"],"sourcesContent":[null],"names":["rootPath","globFiles","path","
|
|
1
|
+
{"version":3,"file":"config-types-generator.js","sources":["../../src/builder/config-types-generator.ts"],"sourcesContent":[null],"names":["rootPath","globFiles","path","warlockPath","putFileAsync"],"mappings":"yPAKA;;;AAGG;AACI,eAAe,mBAAmB,GAAA;IACvC,IAAI;;AAEF,QAAA,MAAM,SAAS,GAAGA,cAAQ,CAAC,YAAY,CAAC,CAAC;AACzC,QAAA,MAAM,WAAW,GAAG,MAAMC,cAAS,CAAC,SAAS,EAAE;AAC7C,YAAA,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC;AACnC,SAAA,CAAC,CAAC;;QAGH,MAAM,UAAU,GAAG,WAAW;aAC3B,GAAG,CAAC,QAAQ,IAAG;YACd,MAAM,QAAQ,GAAGC,qBAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;;YAEzC,OAAO,QAAQ,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;AAChD,SAAC,CAAC;AACD,aAAA,MAAM,CAAC,GAAG,IAAI,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,cAAc,CAAC;aACxD,IAAI,EAAE,CAAC;;AAGV,QAAA,MAAM,cAAc,GAAG,CAAA;;;;;;;;;;;;;;;;AAgBzB,EAAA,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAO,IAAA,EAAA,GAAG,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;;;;;;;;;CAStD,CAAC;;AAGE,QAAA,MAAM,UAAU,GAAGC,iBAAW,CAAC,0BAA0B,CAAC,CAAC;AAC3D,QAAA,MAAMC,eAAY,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;AAE/C,QAAA,OAAO,UAAU,CAAC;AACnB,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,IAAI,CACV,qCAAqC,EACrC,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CACvD,CAAC;AACF,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;AACH"}
|
|
@@ -7,7 +7,7 @@ export interface ConfigKeysRegistry {
|
|
|
7
7
|
/**
|
|
8
8
|
* Config keys type - derived from registry or fallback to string
|
|
9
9
|
*/
|
|
10
|
-
export type ConfigKeys = keyof ConfigKeysRegistry extends never ? string : keyof ConfigKeysRegistry;
|
|
10
|
+
export type ConfigKeys = [keyof ConfigKeysRegistry] extends [never] ? string : keyof ConfigKeysRegistry;
|
|
11
11
|
/**
|
|
12
12
|
* Config type mapping interface
|
|
13
13
|
* Users can augment this to add return types for specific config keys
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed-config.d.ts","sourceRoot":"","sources":["../../src/config/typed-config.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,WAAW,kBAAkB;CAElC;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,kBAAkB,SAAS,KAAK,
|
|
1
|
+
{"version":3,"file":"typed-config.d.ts","sourceRoot":"","sources":["../../src/config/typed-config.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,WAAW,kBAAkB;CAElC;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,kBAAkB,CAAC,SAAS,CAAC,KAAK,CAAC,GAC/D,MAAM,GACN,MAAM,kBAAkB,CAAC;AAE7B;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,aAAa;CAE7B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM;iDAGA,GAAG;6CAKqB,GAAG,GAAG,IAAI;aAI1C,UAAU,GAAG,OAAO;WAKtB,OAAO,MAAM,EAAE,GAAG,CAAC;CAI3B,CAAC;AAGF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-types-generator.d.ts","sourceRoot":"","sources":["../../src/builder/config-types-generator.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAsB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"config-types-generator.d.ts","sourceRoot":"","sources":["../../src/builder/config-types-generator.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAsB,mBAAmB,sBA0DxC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {putFileAsync}from'@mongez/fs';import path from'path';import {globFiles}from'../utils/glob.js';import {rootPath,warlockPath}from'../utils/paths.js';/**
|
|
2
2
|
* Generate TypeScript types for config keys using module augmentation
|
|
3
3
|
* Links to user's src/config/config-types.ts for deep typing
|
|
4
4
|
*/
|
|
@@ -45,12 +45,9 @@ ${configKeys.map(key => ` ${key}: true;`).join("\n")}
|
|
|
45
45
|
interface ConfigTypeMap extends UserConfigTypeMap {}
|
|
46
46
|
}
|
|
47
47
|
`;
|
|
48
|
-
// Ensure .warlock directory exists
|
|
49
|
-
await ensureDirectoryAsync(warlockPath());
|
|
50
48
|
// Write type augmentation file
|
|
51
49
|
const outputPath = warlockPath("config-augmentation.d.ts");
|
|
52
50
|
await putFileAsync(outputPath, typeDefinition);
|
|
53
|
-
console.log(`✓ Generated config types for ${configKeys.length} configurations: ${configKeys.join(", ")}`);
|
|
54
51
|
return configKeys;
|
|
55
52
|
}
|
|
56
53
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-types-generator.js","sources":["../../src/builder/config-types-generator.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config-types-generator.js","sources":["../../src/builder/config-types-generator.ts"],"sourcesContent":[null],"names":[],"mappings":"2JAKA;;;AAGG;AACI,eAAe,mBAAmB,GAAA;IACvC,IAAI;;AAEF,QAAA,MAAM,SAAS,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;AACzC,QAAA,MAAM,WAAW,GAAG,MAAM,SAAS,CAAC,SAAS,EAAE;AAC7C,YAAA,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC;AACnC,SAAA,CAAC,CAAC;;QAGH,MAAM,UAAU,GAAG,WAAW;aAC3B,GAAG,CAAC,QAAQ,IAAG;YACd,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;;YAEzC,OAAO,QAAQ,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;AAChD,SAAC,CAAC;AACD,aAAA,MAAM,CAAC,GAAG,IAAI,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,cAAc,CAAC;aACxD,IAAI,EAAE,CAAC;;AAGV,QAAA,MAAM,cAAc,GAAG,CAAA;;;;;;;;;;;;;;;;AAgBzB,EAAA,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAO,IAAA,EAAA,GAAG,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;;;;;;;;;CAStD,CAAC;;AAGE,QAAA,MAAM,UAAU,GAAG,WAAW,CAAC,0BAA0B,CAAC,CAAC;AAC3D,QAAA,MAAM,YAAY,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;AAE/C,QAAA,OAAO,UAAU,CAAC;AACnB,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,IAAI,CACV,qCAAqC,EACrC,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CACvD,CAAC;AACF,QAAA,OAAO,EAAE,CAAC;AACX,KAAA;AACH"}
|
|
@@ -7,7 +7,7 @@ export interface ConfigKeysRegistry {
|
|
|
7
7
|
/**
|
|
8
8
|
* Config keys type - derived from registry or fallback to string
|
|
9
9
|
*/
|
|
10
|
-
export type ConfigKeys = keyof ConfigKeysRegistry extends never ? string : keyof ConfigKeysRegistry;
|
|
10
|
+
export type ConfigKeys = [keyof ConfigKeysRegistry] extends [never] ? string : keyof ConfigKeysRegistry;
|
|
11
11
|
/**
|
|
12
12
|
* Config type mapping interface
|
|
13
13
|
* Users can augment this to add return types for specific config keys
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed-config.d.ts","sourceRoot":"","sources":["../../src/config/typed-config.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,WAAW,kBAAkB;CAElC;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,kBAAkB,SAAS,KAAK,
|
|
1
|
+
{"version":3,"file":"typed-config.d.ts","sourceRoot":"","sources":["../../src/config/typed-config.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,WAAW,kBAAkB;CAElC;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,kBAAkB,CAAC,SAAS,CAAC,KAAK,CAAC,GAC/D,MAAM,GACN,MAAM,kBAAkB,CAAC;AAE7B;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,aAAa;CAE7B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM;iDAGA,GAAG;6CAKqB,GAAG,GAAG,IAAI;aAI1C,UAAU,GAAG,OAAO;WAKtB,OAAO,MAAM,EAAE,GAAG,CAAC;CAI3B,CAAC;AAGF,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warlock.js/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "A robust nodejs framework for building blazing fast applications",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@mongez/fs": "^3.0.5",
|
|
30
30
|
"@mongez/http": "^2.2.10",
|
|
31
31
|
"@mongez/localization": "^3.0.0",
|
|
32
|
-
"@warlock.js/logger": "3.0.
|
|
33
|
-
"@warlock.js/cascade": "3.0.
|
|
32
|
+
"@warlock.js/logger": "3.0.5",
|
|
33
|
+
"@warlock.js/cascade": "3.0.5",
|
|
34
34
|
"@mongez/reinforcements": "^2.3.10",
|
|
35
35
|
"commander": "^12.0.0",
|
|
36
36
|
"@mongez/slug": "^1.0.7",
|