@next-box/appsettings 0.0.5 → 0.0.7
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/dist/production.analysis.txt +25 -25
- package/dist/types/cjs/index.d.cts +0 -1
- package/dist/types/cjs/index.d.cts.map +1 -1
- package/dist/types/cjs/types/Config.types.d.cts +2 -2
- package/dist/types/cjs/types/Config.types.d.cts.map +1 -1
- package/dist/types/esm/index.d.ts +0 -1
- package/dist/types/esm/index.d.ts.map +1 -1
- package/dist/types/esm/types/Config.types.d.ts +2 -2
- package/dist/types/esm/types/Config.types.d.ts.map +1 -1
- package/dist/types/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -3
- package/src/types/Config.types.ts +4 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-box/appsettings",
|
|
3
3
|
"description": "A configuration management library for TypeScript applications, inspired by .NET’s appsettings.json.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.7",
|
|
5
5
|
"author": "miami-man",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/badbatch/next-box",
|
package/src/index.ts
CHANGED
|
@@ -7,6 +7,5 @@ export type { AppSettings, ScopedSettings } from '#types/AppSettings.types.ts';
|
|
|
7
7
|
export type { SettingPath, SettingSectionPath, SettingValue } from '#types/Config.types.ts';
|
|
8
8
|
|
|
9
9
|
// Consumers can augment this interface through the package's public entry point.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
11
|
+
export interface AppSettingsSchema {}
|
|
@@ -17,11 +17,11 @@ export type SettingPath<T extends object, Depth extends number = 5> = Depth exte
|
|
|
17
17
|
export type SettingSectionPath<T extends object, Depth extends number = 5> = Depth extends 0
|
|
18
18
|
? never
|
|
19
19
|
: {
|
|
20
|
-
[K in
|
|
20
|
+
[K in Extract<keyof T, string>]: NonNullable<T[K]> extends Primitive | readonly Primitive[]
|
|
21
21
|
? never
|
|
22
|
-
: T[K] extends object
|
|
23
|
-
? K | `${K}.${SettingSectionPath<T[K]
|
|
22
|
+
: NonNullable<T[K]> extends object
|
|
23
|
+
? K | `${K}.${SettingSectionPath<NonNullable<T[K]>, PreviousDepth[Depth]>}`
|
|
24
24
|
: never;
|
|
25
|
-
}[
|
|
25
|
+
}[Extract<keyof T, string>];
|
|
26
26
|
|
|
27
27
|
export type SettingValue<T extends object, P extends SettingPath<T>> = Get<T, P>;
|