@kaskad/config 0.0.1

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/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # config
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test config` to execute the unit tests.
@@ -0,0 +1,3 @@
1
+ export * from './lib/delimiters';
2
+ export { log } from './lib/log';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/config/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export * from './lib/delimiters';\nexport { log } from './lib/log';\nexport type { LogLevel } from './lib/log';\n"]}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=kaskad-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaskad-config.js","sourceRoot":"","sources":["../../../../libs/config/src/kaskad-config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"]}
@@ -0,0 +1,6 @@
1
+ export const Delimiters = {
2
+ NodePath: '.',
3
+ Ref: '&',
4
+ Variable: '$',
5
+ };
6
+ //# sourceMappingURL=delimiters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delimiters.js","sourceRoot":"","sources":["../../../../../libs/config/src/lib/delimiters.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,QAAQ,EAAE,GAAG;IACb,GAAG,EAAE,GAAG;IACR,QAAQ,EAAE,GAAG;CACd,CAAC","sourcesContent":["export const Delimiters = {\n NodePath: '.',\n Ref: '&',\n Variable: '$',\n};\n"]}
@@ -0,0 +1,18 @@
1
+ const levels = { trace: 0, warn: 1, error: 2 };
2
+ export const log = {
3
+ level: 'warn',
4
+ trace(...args) {
5
+ if (levels[this.level] <= levels.trace) {
6
+ console.log('[Kaskad]', ...args);
7
+ }
8
+ },
9
+ warn(...args) {
10
+ if (levels[this.level] <= levels.warn) {
11
+ console.warn('[Kaskad]', ...args);
12
+ }
13
+ },
14
+ error(...args) {
15
+ console.error('[Kaskad]', ...args);
16
+ },
17
+ };
18
+ //# sourceMappingURL=log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.js","sourceRoot":"","sources":["../../../../../libs/config/src/lib/log.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAA6B,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAEzE,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,KAAK,EAAE,MAAkB;IAEzB,KAAK,CAAC,GAAG,IAAe;QACtB,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YACvC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IAED,IAAI,CAAC,GAAG,IAAe;QACrB,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YACtC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IAED,KAAK,CAAC,GAAG,IAAe;QACtB,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,CAAC;IACrC,CAAC;CACF,CAAC","sourcesContent":["export type LogLevel = 'trace' | 'warn' | 'error';\n\nconst levels: Record<LogLevel, number> = { trace: 0, warn: 1, error: 2 };\n\nexport const log = {\n level: 'warn' as LogLevel,\n\n trace(...args: unknown[]) {\n if (levels[this.level] <= levels.trace) {\n console.log('[Kaskad]', ...args);\n }\n },\n\n warn(...args: unknown[]) {\n if (levels[this.level] <= levels.warn) {\n console.warn('[Kaskad]', ...args);\n }\n },\n\n error(...args: unknown[]) {\n console.error('[Kaskad]', ...args);\n },\n};\n"]}
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './lib/delimiters';
2
+ export { log } from './lib/log';
3
+ export type { LogLevel } from './lib/log';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@kaskad/config" />
5
+ export * from './index';
@@ -0,0 +1,5 @@
1
+ export declare const Delimiters: {
2
+ NodePath: string;
3
+ Ref: string;
4
+ Variable: string;
5
+ };
package/lib/log.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export type LogLevel = 'trace' | 'warn' | 'error';
2
+ export declare const log: {
3
+ level: LogLevel;
4
+ trace(...args: unknown[]): void;
5
+ warn(...args: unknown[]): void;
6
+ error(...args: unknown[]): void;
7
+ };
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@kaskad/config",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/core": "21.1.3",
6
+ "vite": "7.3.1",
7
+ "@analogjs/vite-plugin-angular": "2.1.3",
8
+ "@nx/vite": "22.4.5"
9
+ },
10
+ "sideEffects": false,
11
+ "module": "esm2022/kaskad-config.js",
12
+ "typings": "kaskad-config.d.ts",
13
+ "exports": {
14
+ "./package.json": {
15
+ "default": "./package.json"
16
+ },
17
+ ".": {
18
+ "types": "./kaskad-config.d.ts",
19
+ "default": "./esm2022/kaskad-config.js"
20
+ }
21
+ },
22
+ "dependencies": {
23
+ "tslib": "^2.3.0"
24
+ }
25
+ }