@cldmv/slothlet 3.2.3 → 3.3.2

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.
Files changed (138) hide show
  1. package/README.md +22 -9
  2. package/REFERENCE.md +23 -0
  3. package/dist/lib/builders/api-assignment.mjs +1 -589
  4. package/dist/lib/builders/api_builder.mjs +1 -1155
  5. package/dist/lib/builders/builder.mjs +1 -78
  6. package/dist/lib/builders/modes-processor.mjs +1 -1800
  7. package/dist/lib/errors.mjs +9 -211
  8. package/dist/lib/factories/component-base.mjs +1 -80
  9. package/dist/lib/factories/context.mjs +1 -22
  10. package/dist/lib/handlers/api-cache-manager.mjs +1 -200
  11. package/dist/lib/handlers/api-manager.mjs +1 -2513
  12. package/dist/lib/handlers/context-async.mjs +1 -168
  13. package/dist/lib/handlers/context-live.mjs +1 -168
  14. package/dist/lib/handlers/hook-manager.mjs +1 -773
  15. package/dist/lib/handlers/lifecycle-token.mjs +1 -28
  16. package/dist/lib/handlers/lifecycle.mjs +1 -115
  17. package/dist/lib/handlers/materialize-manager.mjs +1 -48
  18. package/dist/lib/handlers/metadata.mjs +1 -501
  19. package/dist/lib/handlers/ownership.mjs +1 -322
  20. package/dist/lib/handlers/permission-manager.mjs +17 -0
  21. package/dist/lib/handlers/unified-wrapper.mjs +1 -3042
  22. package/dist/lib/handlers/version-manager.mjs +1 -885
  23. package/dist/lib/helpers/class-instance-wrapper.mjs +1 -109
  24. package/dist/lib/helpers/config.mjs +1 -355
  25. package/dist/lib/helpers/eventemitter-context.mjs +1 -349
  26. package/dist/lib/helpers/hint-detector.mjs +1 -47
  27. package/dist/lib/helpers/modes-utils.mjs +1 -37
  28. package/dist/lib/helpers/pattern-matcher.mjs +17 -0
  29. package/dist/lib/helpers/resolve-from-caller.mjs +1 -169
  30. package/dist/lib/helpers/sanitize.mjs +1 -340
  31. package/dist/lib/helpers/utilities.mjs +1 -70
  32. package/dist/lib/i18n/languages/de-de.json +21 -1
  33. package/dist/lib/i18n/languages/en-gb.json +21 -1
  34. package/dist/lib/i18n/languages/en-us.json +21 -1
  35. package/dist/lib/i18n/languages/es-mx.json +21 -1
  36. package/dist/lib/i18n/languages/fr-fr.json +21 -1
  37. package/dist/lib/i18n/languages/hi-in.json +21 -1
  38. package/dist/lib/i18n/languages/ja-jp.json +21 -1
  39. package/dist/lib/i18n/languages/ko-kr.json +21 -1
  40. package/dist/lib/i18n/languages/pt-br.json +21 -1
  41. package/dist/lib/i18n/languages/ru-ru.json +21 -1
  42. package/dist/lib/i18n/languages/zh-cn.json +21 -1
  43. package/dist/lib/i18n/translations.mjs +1 -126
  44. package/dist/lib/modes/eager.mjs +1 -59
  45. package/dist/lib/modes/lazy.mjs +1 -81
  46. package/dist/lib/processors/flatten.mjs +1 -437
  47. package/dist/lib/processors/loader.mjs +1 -339
  48. package/dist/lib/processors/type-generator.mjs +1 -275
  49. package/dist/lib/processors/typescript.mjs +1 -172
  50. package/dist/lib/runtime/runtime-asynclocalstorage.mjs +1 -113
  51. package/dist/lib/runtime/runtime-livebindings.mjs +1 -78
  52. package/dist/lib/runtime/runtime.mjs +1 -102
  53. package/dist/slothlet.mjs +1 -808
  54. package/package.json +37 -31
  55. package/types/dist/lib/builders/api-assignment.d.mts +3 -92
  56. package/types/dist/lib/builders/api-assignment.d.mts.map +1 -1
  57. package/types/dist/lib/builders/api_builder.d.mts +102 -91
  58. package/types/dist/lib/builders/api_builder.d.mts.map +1 -1
  59. package/types/dist/lib/builders/builder.d.mts +1 -55
  60. package/types/dist/lib/builders/builder.d.mts.map +1 -1
  61. package/types/dist/lib/builders/modes-processor.d.mts +3 -27
  62. package/types/dist/lib/builders/modes-processor.d.mts.map +1 -1
  63. package/types/dist/lib/errors.d.mts +19 -109
  64. package/types/dist/lib/errors.d.mts.map +1 -1
  65. package/types/dist/lib/factories/component-base.d.mts +7 -177
  66. package/types/dist/lib/factories/component-base.d.mts.map +1 -1
  67. package/types/dist/lib/factories/context.d.mts +4 -22
  68. package/types/dist/lib/factories/context.d.mts.map +1 -1
  69. package/types/dist/lib/handlers/api-cache-manager.d.mts +20 -203
  70. package/types/dist/lib/handlers/api-cache-manager.d.mts.map +1 -1
  71. package/types/dist/lib/handlers/api-manager.d.mts +33 -408
  72. package/types/dist/lib/handlers/api-manager.d.mts.map +1 -1
  73. package/types/dist/lib/handlers/context-async.d.mts +23 -61
  74. package/types/dist/lib/handlers/context-async.d.mts.map +1 -1
  75. package/types/dist/lib/handlers/context-live.d.mts +22 -59
  76. package/types/dist/lib/handlers/context-live.d.mts.map +1 -1
  77. package/types/dist/lib/handlers/hook-manager.d.mts +46 -185
  78. package/types/dist/lib/handlers/hook-manager.d.mts.map +1 -1
  79. package/types/dist/lib/handlers/lifecycle-token.d.mts +3 -48
  80. package/types/dist/lib/handlers/lifecycle-token.d.mts.map +1 -1
  81. package/types/dist/lib/handlers/lifecycle.d.mts +5 -82
  82. package/types/dist/lib/handlers/lifecycle.d.mts.map +1 -1
  83. package/types/dist/lib/handlers/materialize-manager.d.mts +8 -70
  84. package/types/dist/lib/handlers/materialize-manager.d.mts.map +1 -1
  85. package/types/dist/lib/handlers/metadata.d.mts +17 -221
  86. package/types/dist/lib/handlers/metadata.d.mts.map +1 -1
  87. package/types/dist/lib/handlers/ownership.d.mts +44 -160
  88. package/types/dist/lib/handlers/ownership.d.mts.map +1 -1
  89. package/types/dist/lib/handlers/permission-manager.d.mts +47 -0
  90. package/types/dist/lib/handlers/permission-manager.d.mts.map +1 -0
  91. package/types/dist/lib/handlers/unified-wrapper.d.mts +26 -239
  92. package/types/dist/lib/handlers/unified-wrapper.d.mts.map +1 -1
  93. package/types/dist/lib/handlers/version-manager.d.mts +28 -225
  94. package/types/dist/lib/handlers/version-manager.d.mts.map +1 -1
  95. package/types/dist/lib/helpers/class-instance-wrapper.d.mts +2 -52
  96. package/types/dist/lib/helpers/class-instance-wrapper.d.mts.map +1 -1
  97. package/types/dist/lib/helpers/config.d.mts +125 -123
  98. package/types/dist/lib/helpers/config.d.mts.map +1 -1
  99. package/types/dist/lib/helpers/eventemitter-context.d.mts +3 -29
  100. package/types/dist/lib/helpers/eventemitter-context.d.mts.map +1 -1
  101. package/types/dist/lib/helpers/hint-detector.d.mts +2 -15
  102. package/types/dist/lib/helpers/hint-detector.d.mts.map +1 -1
  103. package/types/dist/lib/helpers/modes-utils.d.mts +3 -30
  104. package/types/dist/lib/helpers/modes-utils.d.mts.map +1 -1
  105. package/types/dist/lib/helpers/pattern-matcher.d.mts +4 -0
  106. package/types/dist/lib/helpers/pattern-matcher.d.mts.map +1 -0
  107. package/types/dist/lib/helpers/resolve-from-caller.d.mts +3 -27
  108. package/types/dist/lib/helpers/resolve-from-caller.d.mts.map +1 -1
  109. package/types/dist/lib/helpers/sanitize.d.mts +4 -92
  110. package/types/dist/lib/helpers/sanitize.d.mts.map +1 -1
  111. package/types/dist/lib/helpers/utilities.d.mts +4 -52
  112. package/types/dist/lib/helpers/utilities.d.mts.map +1 -1
  113. package/types/dist/lib/i18n/translations.d.mts +4 -37
  114. package/types/dist/lib/i18n/translations.d.mts.map +1 -1
  115. package/types/dist/lib/modes/eager.d.mts +8 -30
  116. package/types/dist/lib/modes/eager.d.mts.map +1 -1
  117. package/types/dist/lib/modes/lazy.d.mts +10 -43
  118. package/types/dist/lib/modes/lazy.d.mts.map +1 -1
  119. package/types/dist/lib/processors/flatten.d.mts +56 -107
  120. package/types/dist/lib/processors/flatten.d.mts.map +1 -1
  121. package/types/dist/lib/processors/loader.d.mts +6 -41
  122. package/types/dist/lib/processors/loader.d.mts.map +1 -1
  123. package/types/dist/lib/processors/type-generator.d.mts +2 -16
  124. package/types/dist/lib/processors/type-generator.d.mts.map +1 -1
  125. package/types/dist/lib/processors/typescript.d.mts +6 -53
  126. package/types/dist/lib/processors/typescript.d.mts.map +1 -1
  127. package/types/dist/lib/runtime/runtime-asynclocalstorage.d.mts +3 -71
  128. package/types/dist/lib/runtime/runtime-asynclocalstorage.d.mts.map +1 -1
  129. package/types/dist/lib/runtime/runtime-livebindings.d.mts +2 -37
  130. package/types/dist/lib/runtime/runtime-livebindings.d.mts.map +1 -1
  131. package/types/dist/lib/runtime/runtime.d.mts +3 -39
  132. package/types/dist/lib/runtime/runtime.d.mts.map +1 -1
  133. package/types/dist/slothlet.d.mts +3 -249
  134. package/types/dist/slothlet.d.mts.map +1 -1
  135. package/types/index.d.mts +36 -16
  136. package/types/index.d.mts.map +1 -0
  137. package/AGENT-USAGE.md +0 -736
  138. package/docs/API-RULES.md +0 -712
@@ -1,128 +1,130 @@
1
- /**
2
- * Configuration normalization utilities
3
- * @class Config
4
- * @extends ComponentBase
5
- * @public
6
- */
7
1
  export class Config extends ComponentBase {
8
2
  static slothletProperty: string;
9
- /**
10
- * Normalize collision configuration for handling property collisions
11
- * @param {string|Object} collision - Collision mode or object with per-context modes
12
- * @returns {Object} Normalized collision configuration with initial and api.slothlet.api.add modes
13
- * @public
14
- *
15
- * @description
16
- * Normalizes collision handling configuration for both initial load (buildAPI)
17
- * and hot reload (api.add) contexts. Supports six collision modes:
18
- * - "skip": Silently ignore collision, keep existing value
19
- * - "warn": Warn about collision, keep existing value
20
- * - "replace": Replace existing value completely
21
- * - "merge": Merge properties (preserve original + add new)
22
- * - "merge-replace": Merge properties (add new + overwrite existing with new values)
23
- * - "error": Throw error on collision
24
- *
25
- * @example
26
- * // String shorthand applies to both contexts
27
- * normalizeCollision("merge")
28
- * // => { initial: "merge", api: "merge" }
29
- *
30
- * @example
31
- * // Object allows per-context control
32
- * normalizeCollision({ initial: "warn", api: "error" })
33
- * // => { initial: "warn", api: "error" }
34
- */
35
- public normalizeCollision(collision: string | any): any;
36
- /**
37
- * Normalize runtime input to internal standard format
38
- * @param {string} runtime - Input runtime type (various formats accepted)
39
- * @returns {string} Normalized runtime type ("async" or "live")
40
- * @public
41
- */
42
- public normalizeRuntime(runtime: string): string;
43
- /**
44
- * Normalize mode input to internal standard format
45
- * @param {string} mode - Input mode type (various formats accepted)
46
- * @returns {string} Normalized mode type ("eager" or "lazy")
47
- * @public
48
- */
49
- public normalizeMode(mode: string): string;
50
- /**
51
- * Normalize mutations configuration for API modification control
52
- * @param {Object} mutations - Mutations config object with add/remove/reload properties
53
- * @returns {Object} Normalized mutations configuration
54
- * @public
55
- *
56
- * @description
57
- * Normalizes mutation control configuration for API runtime modifications.
58
- * Controls whether api.slothlet.api.add(), api.slothlet.api.remove(), and
59
- * api.slothlet.reload() operations are allowed.
60
- *
61
- * @example
62
- * // Allow all mutations (default)
63
- * normalizeMutations({ add: true, remove: true, reload: true })
64
- * // => { add: true, remove: true, reload: true }
65
- *
66
- * @example
67
- * // Disable all mutations
68
- * normalizeMutations({ add: false, remove: false, reload: false })
69
- * // => { add: false, remove: false, reload: false }
70
- */
71
- public normalizeMutations(mutations: any): any;
72
- /**
73
- * Normalize debug configuration
74
- * @param {boolean|Object} debug - Debug flag or object with targeted flags
75
- * @returns {Object} Normalized debug object with all flags
76
- * @public
77
- */
78
- public normalizeDebug(debug: boolean | any): any;
79
- /**
80
- * Transform and validate configuration
81
- * @param {Object} config - Raw configuration options
82
- * @returns {Object} Normalized configuration
83
- * @throws {SlothletError} If configuration is invalid
84
- * @public
85
- */
86
- public transformConfig(config?: any): any;
87
- /**
88
- * Normalize TypeScript configuration
89
- * @param {boolean|string|Object} typescript - TypeScript config (true, "fast", or { mode: "fast"|"strict", ... })
90
- * @returns {Object|null} Normalized TypeScript configuration or null if disabled
91
- * @public
92
- */
93
- public normalizeTypeScript(typescript: boolean | string | any): any | null;
94
- /**
95
- * Normalize env snapshot configuration.
96
- *
97
- * @description
98
- * Validates the `env` option from user config. When `include` is a non-empty
99
- * string array, returns `{ include }` (the allowlist used by `_captureEnvSnapshot`).
100
- * Any other value — including `undefined`, `null`, `{}`, or an empty `include`
101
- * array — is normalised to `null`, meaning the full `process.env` snapshot is used.
102
- *
103
- * @param {Object|null|undefined} env - Raw env option from user config.
104
- * @param {string[]} [env.include] - Allowlist of env variable names to capture.
105
- * @returns {{ include: string[] }|null} Normalized env config, or `null` for full snapshot.
106
- * @public
107
- *
108
- * @example
109
- * // No restriction — full snapshot
110
- * normalizeEnv(undefined); // => null
111
- * normalizeEnv(null); // => null
112
- * normalizeEnv({}); // => null
113
- *
114
- * @example
115
- * // Include allowlist
116
- * normalizeEnv({ include: ["NODE_ENV", "PORT"] });
117
- * // => { include: ["NODE_ENV", "PORT"] }
118
- *
119
- * @example
120
- * // Non-string keys in the include array are filtered out
121
- * normalizeEnv({ include: ["NODE_ENV", 42, null] });
122
- * // => { include: ["NODE_ENV"] }
123
- */
124
- public normalizeEnv(env: any | null | undefined): {
125
- include: string[];
3
+ normalizeCollision(collision: any): {
4
+ initial: string;
5
+ api: string;
6
+ };
7
+ normalizeRuntime(runtime: any): "async" | "live";
8
+ normalizeMode(mode: any): "eager" | "lazy";
9
+ normalizeMutations(mutations: any): {
10
+ add: boolean;
11
+ remove: boolean;
12
+ reload: boolean;
13
+ permissions: boolean;
14
+ };
15
+ normalizeDebug(debug: any): {
16
+ builder: any;
17
+ api: any;
18
+ index: any;
19
+ modes: any;
20
+ wrapper: any;
21
+ ownership: any;
22
+ context: any;
23
+ initialization: any;
24
+ materialize: any;
25
+ versioning: any;
26
+ permissions: any;
27
+ };
28
+ transformConfig(config?: {}): {
29
+ dir: any;
30
+ mode: string;
31
+ runtime: string;
32
+ apiDepth: any;
33
+ reference: any;
34
+ context: any;
35
+ i18n: {
36
+ language: any;
37
+ } | null;
38
+ debug: {
39
+ builder: any;
40
+ api: any;
41
+ index: any;
42
+ modes: any;
43
+ wrapper: any;
44
+ ownership: any;
45
+ context: any;
46
+ initialization: any;
47
+ materialize: any;
48
+ versioning: any;
49
+ permissions: any;
50
+ };
51
+ diagnostics: boolean;
52
+ hook: {
53
+ enabled: boolean;
54
+ pattern: string;
55
+ suppressErrors: boolean;
56
+ };
57
+ collision: {
58
+ initial: string;
59
+ api: string;
60
+ };
61
+ api: {
62
+ collision: {
63
+ initial: string;
64
+ api: string;
65
+ };
66
+ mutations: {
67
+ add: boolean;
68
+ remove: boolean;
69
+ reload: boolean;
70
+ permissions: boolean;
71
+ } | {
72
+ add: boolean;
73
+ remove: boolean;
74
+ reload: boolean;
75
+ };
76
+ };
77
+ scope: any;
78
+ tracking: {
79
+ materialization: boolean;
80
+ };
81
+ backgroundMaterialize: boolean;
82
+ silent: boolean;
83
+ typescript: {
84
+ enabled: boolean;
85
+ mode: string;
86
+ types?: undefined;
87
+ target?: undefined;
88
+ sourcemap?: undefined;
89
+ } | {
90
+ enabled: boolean;
91
+ mode: string;
92
+ types: any;
93
+ target: any;
94
+ sourcemap: any;
95
+ } | null;
96
+ env: {
97
+ include: any;
98
+ } | null;
99
+ versionDispatcher: any;
100
+ permissions: {
101
+ defaultPolicy: string;
102
+ enabled: boolean;
103
+ audit: string;
104
+ rules: any;
105
+ } | null;
106
+ };
107
+ normalizeTypeScript(typescript: any): {
108
+ enabled: boolean;
109
+ mode: string;
110
+ types?: undefined;
111
+ target?: undefined;
112
+ sourcemap?: undefined;
113
+ } | {
114
+ enabled: boolean;
115
+ mode: string;
116
+ types: any;
117
+ target: any;
118
+ sourcemap: any;
119
+ } | null;
120
+ normalizeEnv(env: any): {
121
+ include: any;
122
+ } | null;
123
+ normalizePermissions(permissions: any): {
124
+ defaultPolicy: string;
125
+ enabled: boolean;
126
+ audit: string;
127
+ rules: any;
126
128
  } | null;
127
129
  }
128
130
  import { ComponentBase } from "@cldmv/slothlet/factories/component-base";
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/config.mjs"],"names":[],"mappings":"AAoBA;;;;;GAKG;AACH;IACC,gCAAmC;IAEnC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,qCAxBW,MAAM,MAAO,OAkDvB;IAED;;;;;OAKG;IACH,iCAJW,MAAM,GACJ,MAAM,CAsBlB;IAED;;;;;OAKG;IACH,2BAJW,MAAM,GACJ,MAAM,CAsBlB;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,+CAcC;IAED;;;;;OAKG;IACH,6BAJW,OAAO,MAAO,OAiExB;IAED;;;;;;OAMG;IACH,0CA2IC;IAED;;;;;OAKG;IACH,uCAJW,OAAO,GAAC,MAAM,MAAO,GACnB,MAAO,IAAI,CAsCvB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,yBArBW,MAAO,IAAI,GAAC,SAAS,GAEnB;QAAE,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,GAAC,IAAI,CA4BtC;CACD;8BAxc6B,0CAA0C"}
1
+ {"version":3,"file":"config.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/config.mjs"],"names":[],"mappings":"AAAsH;IAAmC,gCAAiC;IAAA;;;MAA2mB;IAAA,iDAA+U;IAAA,2CAA0S;IAAA;;;;;MAAqV;IAAA;;;;;;;;;;;;MAA46B;IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAyoH;IAAA;;;;;;;;;;;;aAAyf;IAAA;;aAAiN;IAAA;;;;;aAA2wC;CAAC;8BAAruQ,0CAA0C"}
@@ -1,31 +1,5 @@
1
- /**
2
- * Set the context checker callback
3
- * Called by the runtime to register a way to detect API context
4
- * @param {Function} checker - Function that returns true if in API context
5
- * @public
6
- */
7
- export function setApiContextChecker(checker: Function): void;
8
- /**
9
- * Enable EventEmitter context propagation by patching EventEmitter.prototype.
10
- * This should be called ONCE globally when the first slothlet instance is created.
11
- * Subsequent calls will be ignored (patching is global).
12
- *
13
- * @public
14
- */
15
- export function enableEventEmitterPatching(): void;
16
- /**
17
- * Disable EventEmitter context propagation and restore original methods.
18
- * This should only be called when ALL slothlet instances have been shut down.
19
- *
20
- * @public
21
- */
22
- export function disableEventEmitterPatching(): void;
23
- /**
24
- * Cleanup all tracked EventEmitters created within slothlet API context.
25
- * This removes all listeners from tracked emitters and clears tracking structures.
26
- * Should be called during shutdown to prevent memory leaks and hanging processes.
27
- *
28
- * @public
29
- */
30
1
  export function cleanupEventEmitterResources(): void;
2
+ export function disableEventEmitterPatching(): void;
3
+ export function enableEventEmitterPatching(): void;
4
+ export function setApiContextChecker(checker: any): void;
31
5
  //# sourceMappingURL=eventemitter-context.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eventemitter-context.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/eventemitter-context.mjs"],"names":[],"mappings":"AAsCA;;;;;GAKG;AACH,8DAEC;AAyWD;;;;;;GAMG;AACH,mDAeC;AAED;;;;;GAKG;AACH,oDAmBC;AAED;;;;;;GAMG;AACH,qDAcC"}
1
+ {"version":3,"file":"eventemitter-context.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/eventemitter-context.mjs"],"names":[],"mappings":"AAAu2M,qDAAmL;AAAtjB,oDAAmY;AAAroB,mDAAkQ;AAA13L,yDAA8D"}
@@ -1,20 +1,7 @@
1
- /**
2
- * Hint detection for providing helpful error hints
3
- * @class HintDetector
4
- * @extends ComponentBase
5
- * @package
6
- */
7
1
  export class HintDetector extends ComponentBase {
8
2
  static slothletProperty: string;
9
- /**
10
- * Detect appropriate hint key based on error
11
- * @param {Error} error - The original error
12
- * @param {string} errorCode - The SlothletError code
13
- * @returns {string|undefined} Hint key for i18n translation, or undefined
14
- * @public
15
- */
16
- public detectHint(error: Error, errorCode: string): string | undefined;
3
+ detectHint(error: any, errorCode: any): string;
17
4
  }
18
- export const detectHint: any;
5
+ export function detectHint(error: any, errorCode: any): string;
19
6
  import { ComponentBase } from "@cldmv/slothlet/factories/component-base";
20
7
  //# sourceMappingURL=hint-detector.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hint-detector.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/hint-detector.mjs"],"names":[],"mappings":"AAwCA;;;;;GAKG;AACH;IACC,gCAAyC;IAEzC;;;;;;OAMG;IACH,yBALW,KAAK,aACL,MAAM,GACJ,MAAM,GAAC,SAAS,CAiB5B;CACD;AAID,6BAA2G;8BAxD7E,0CAA0C"}
1
+ {"version":3,"file":"hint-detector.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/hint-detector.mjs"],"names":[],"mappings":"AAA4S;IAAyC,gCAAuC;IAAA,+CAA2M;CAAC;AAA5M,+DAA2M;8BAA9iB,0CAA0C"}
@@ -1,35 +1,8 @@
1
- /**
2
- * Mode processing utilities component class
3
- * @extends ComponentBase
4
- */
5
1
  export class ModesUtils extends ComponentBase {
6
2
  static slothletProperty: string;
7
- /**
8
- * Create a named wrapper for default export functions when they are anonymous.
9
- * NOTE: This function is now a pass-through since UnifiedWrapper handles name/length/toString
10
- * through its proxy get trap. Wrapping is no longer needed and causes toString mismatches.
11
- * @param {Function} fn - Original function.
12
- * @param {string} nameHint - Name to apply if fn is anonymous or named "default" (unused).
13
- * @returns {Function} Original function unmodified.
14
- * @public
15
- */
16
- public ensureNamedExportFunction(fn: Function, ____nameHint: any): Function;
17
- /**
18
- * Clone eager-mode module exports to avoid mutating import cache objects.
19
- * @param {unknown} value - Value to clone for wrapping
20
- * @param {string} mode - Current mode ("eager" or "lazy")
21
- * @returns {unknown} Cloned value for eager mode, original otherwise
22
- * @public
23
- */
24
- public cloneWrapperImpl(value: unknown, mode: string): unknown;
25
- /**
26
- * Helper to determine collision mode for ownership conflicts
27
- * @param {Object} config - Slothlet configuration
28
- * @param {string} collisionContext - Either 'initial' or 'api'
29
- * @returns {string} Collision mode from config
30
- * @public
31
- */
32
- public getOwnershipCollisionMode(config: any, collisionContext?: string): string;
3
+ ensureNamedExportFunction(fn: any, ____nameHint: any): any;
4
+ cloneWrapperImpl(value: any, mode: any): any;
5
+ getOwnershipCollisionMode(config: any, collisionContext?: string): any;
33
6
  }
34
7
  import { ComponentBase } from "@cldmv/slothlet/factories/component-base";
35
8
  //# sourceMappingURL=modes-utils.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modes-utils.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/modes-utils.mjs"],"names":[],"mappings":"AAqBA;;;GAGG;AACH;IACC,gCAAuC;IAEvC;;;;;;;;OAQG;IACH,4EAIC;IAED;;;;;;OAMG;IACH,+BALW,OAAO,QACP,MAAM,GACJ,OAAO,CAenB;IAED;;;;;;OAMG;IACH,iEAJW,MAAM,GACJ,MAAM,CAKlB;CACD;8BAvD6B,0CAA0C"}
1
+ {"version":3,"file":"modes-utils.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/modes-utils.mjs"],"names":[],"mappings":"AAAoE;IAAuC,gCAAqC;IAAA,2DAAqD;IAAA,6CAAqR;IAAA,uEAAkH;CAAC;8BAApjB,0CAA0C"}
@@ -0,0 +1,4 @@
1
+ export function compilePattern(pattern: any, options?: {}): any;
2
+ export function expandBraces(pattern: any, depth?: number, maxDepth?: number, options?: {}): any;
3
+ export function splitBraceAlternatives(content: any): string[];
4
+ //# sourceMappingURL=pattern-matcher.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pattern-matcher.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/pattern-matcher.mjs"],"names":[],"mappings":"AAAkD,gEAA+oB;AAAA,iGAA44B;AAAA,+DAAqX"}
@@ -1,32 +1,8 @@
1
- /**
2
- * Path resolver component
3
- * @class Resolver
4
- * @extends ComponentBase
5
- * @package
6
- */
7
1
  export class Resolver extends ComponentBase {
8
2
  static slothletProperty: string;
9
- /**
10
- * Get V8 stack trace as CallSite array.
11
- * @param {Function} [skipFn] - Optional function to skip from stack trace
12
- * @returns {Array} Array of CallSite objects
13
- * @public
14
- */
15
- public getStack(skipFn?: Function): any[];
16
- /**
17
- * Convert file:// URL to filesystem path or return as-is.
18
- * @param {any} v - Value to convert
19
- * @returns {string|null} Filesystem path or null
20
- * @public
21
- */
22
- public toFsPath(v: any): string | null;
23
- /**
24
- * Resolve relative path from caller's context.
25
- * @param {string} rel - Relative path to resolve
26
- * @returns {string} Absolute filesystem path
27
- * @public
28
- */
29
- public resolvePathFromCaller(rel: string): string;
3
+ getStack(skipFn: any): string | undefined;
4
+ toFsPath(v: any): any;
5
+ resolvePathFromCaller(rel: any): any;
30
6
  #private;
31
7
  }
32
8
  import { ComponentBase } from "@cldmv/slothlet/factories/component-base";
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-from-caller.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/resolve-from-caller.mjs"],"names":[],"mappings":"AAqCA;;;;;GAKG;AACH;IACC,gCAAqC;IAErC;;;;;OAKG;IACH,0CAUC;IAeD;;;;;OAKG;IACH,mBAJW,GAAG,GACD,MAAM,GAAC,IAAI,CAOvB;IA+FD;;;;;OAKG;IACH,kCAJW,MAAM,GACJ,MAAM,CAsClB;;CACD;8BAvM6B,0CAA0C"}
1
+ {"version":3,"file":"resolve-from-caller.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/resolve-from-caller.mjs"],"names":[],"mappings":"AAAwX;IAAqC,gCAAmC;IAAA,0CAA2N;IAA0L,sBAA0G;IAAm5B,qCAA0c;;CAAC;8BAA5qE,0CAA0C"}
@@ -1,98 +1,10 @@
1
- /**
2
- * Standalone sanitizePropertyName function for backward compatibility
3
- * @param {string} input - Input string to sanitize
4
- * @param {object} options - Sanitization options
5
- * @returns {string} Sanitized property name
6
- * @public
7
- */
8
- export function sanitizePropertyName(input: string, options?: object): string;
9
- /**
10
- * Advanced filename sanitization with rule-based transformation
11
- * @extends ComponentBase
12
- * @public
13
- */
14
1
  export class Sanitize extends ComponentBase {
15
2
  static slothletProperty: string;
16
- /**
17
- * Advanced sanitization function with configurable rule-based transformation
18
- *
19
- * @description
20
- * Converts arbitrary strings (filenames, path segments) into valid JavaScript identifiers
21
- * suitable for dot-notation property access. Supports sophisticated rule-based transformation
22
- * with glob patterns, case preservation, and intelligent segment handling.
23
- *
24
- * @param {string} input - String to sanitize
25
- * @param {Object} [options={}] - Sanitization configuration
26
- * @param {boolean} [options.lowerFirst=true] - Lowercase first character of first segment
27
- * @param {boolean} [options.preserveAllUpper=false] - Preserve all-uppercase identifiers
28
- * @param {boolean} [options.preserveAllLower=false] - Preserve all-lowercase identifiers
29
- * @param {Object} [options.rules={}] - Transformation rules
30
- * @param {string[]} [options.rules.leave=[]] - Preserve exactly (case-sensitive, supports globs)
31
- * @param {string[]} [options.rules.leaveInsensitive=[]] - Preserve exactly (case-insensitive, supports globs)
32
- * @param {string[]} [options.rules.upper=[]] - Force UPPERCASE (supports globs and **STRING**)
33
- * @param {string[]} [options.rules.lower=[]] - Force lowercase (supports globs and **STRING**)
34
- * @returns {string} Valid JavaScript identifier
35
- * @public
36
- *
37
- * @example
38
- * // Basic usage
39
- * sanitizePropertyName("auto-ip"); // "autoIp"
40
- * sanitizePropertyName("root-math"); // "rootMath"
41
- *
42
- * @example
43
- * // Rule-based transformation
44
- * sanitizePropertyName("auto-ip", {
45
- * rules: { upper: ["*-ip"] }
46
- * }); // "autoIP"
47
- *
48
- * @example
49
- * // Boundary-requiring patterns
50
- * sanitizePropertyName("parseJsonData", {
51
- * rules: { upper: ["**json**"] }
52
- * }); // "parseJSONData"
53
- *
54
- * @example
55
- * // Case preservation
56
- * sanitizePropertyName("COMMON_APPS", {
57
- * preserveAllUpper: true
58
- * }); // "COMMON_APPS"
59
- *
60
- * @example
61
- * // Multiple rules
62
- * sanitizePropertyName("get-api-status", {
63
- * rules: {
64
- * upper: ["*-api-*", "http"],
65
- * lower: ["xml"]
66
- * }
67
- * }); // "getAPIStatus"
68
- */
69
- public sanitizePropertyName(input: string, options?: {
70
- lowerFirst?: boolean;
71
- preserveAllUpper?: boolean;
72
- preserveAllLower?: boolean;
73
- rules?: {
74
- leave?: string[];
75
- leaveInsensitive?: string[];
76
- upper?: string[];
77
- lower?: string[];
78
- };
79
- }): string;
80
- /**
81
- * Get module ID from file path
82
- * @param {string} filePath - Full file path
83
- * @param {string} baseDir - Base directory
84
- * @returns {string} Module ID
85
- * @public
86
- */
87
- public getModuleId(filePath: string, baseDir: string): string;
88
- /**
89
- * Check if filename represents a special function name that should preserve case
90
- * @param {string} name - Name to check
91
- * @returns {boolean} True if special case should be preserved
92
- * @public
93
- */
94
- public shouldPreserveFunctionCase(name: string): boolean;
3
+ sanitizePropertyName(input: any, options?: {}): string;
4
+ getModuleId(filePath: any, baseDir: any): any;
5
+ shouldPreserveFunctionCase(name: any): boolean;
95
6
  #private;
96
7
  }
8
+ export function sanitizePropertyName(input: any, options?: {}): string;
97
9
  import { ComponentBase } from "@cldmv/slothlet/factories/component-base";
98
10
  //# sourceMappingURL=sanitize.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sanitize.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/sanitize.mjs"],"names":[],"mappings":"AAkcA;;;;;;GAMG;AACH,4CALW,MAAM,YACN,MAAM,GACJ,MAAM,CAMlB;AAnbD;;;;GAIG;AACH;IACC,gCAAqC;IA6LrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoDG;IACH,mCA7CW,MAAM,YAEd;QAA0B,UAAU,GAA5B,OAAO;QACW,gBAAgB,GAAlC,OAAO;QACW,gBAAgB,GAAlC,OAAO;QACU,KAAK,GAC9B;YAAiC,KAAK,GAA9B,MAAM,EAAE;YACiB,gBAAgB,GAAzC,MAAM,EAAE;YACiB,KAAK,GAA9B,MAAM,EAAE;YACiB,KAAK,GAA9B,MAAM,EAAE;SAChB;KAAA,GAAU,MAAM,CA8KlB;IAED;;;;;;OAMG;IACH,6BALW,MAAM,WACN,MAAM,GACJ,MAAM,CAUlB;IAED;;;;;OAKG;IACH,wCAJW,MAAM,GACJ,OAAO,CAUnB;;CACD;8BAza6B,0CAA0C"}
1
+ {"version":3,"file":"sanitize.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/sanitize.mjs"],"names":[],"mappings":"AAAoE;IAAqC,gCAAmC;IAAg6G,uDAA4qG;IAAA,8CAA+L;IAAA,+CAA8I;;CAAC;AAAA,uEAAwI;8BAArpO,0CAA0C"}
@@ -1,57 +1,9 @@
1
- /**
2
- * General utility functions
3
- * @class Utilities
4
- * @extends ComponentBase
5
- * @package
6
- */
7
1
  export class Utilities extends ComponentBase {
8
2
  static slothletProperty: string;
9
- /**
10
- * Check if value is a plain object
11
- * @param {*} obj - Value to check
12
- * @returns {boolean} True if plain object
13
- * @public
14
- */
15
- public isPlainObject(obj: any): boolean;
16
- /**
17
- * Deep merge two plain objects recursively.
18
- *
19
- * Differences from a simple spread:
20
- * - Recursively merges nested plain objects rather than replacing them.
21
- * - Uses `hasOwnProperty` to skip prototype-chain keys (no prototype pollution).
22
- * - Non-plain values (arrays, class instances, primitives) are always copied by
23
- * value from `source`, never merged.
24
- * - When `source[key]` is a plain object but `target[key]` is not (or absent),
25
- * the merge starts from `{}` so the returned sub-tree is always a fresh copy.
26
- * - If either top-level argument is not a plain object, returns `source` as-is.
27
- *
28
- * @param {Object} target - Base object (not mutated).
29
- * @param {Object} source - Source object whose keys are merged in.
30
- * @returns {Object} New merged object.
31
- * @public
32
- */
33
- public deepMerge(target: any, source: any): any;
34
- /**
35
- * Deep clone a value, handling Proxy objects and functions that `structuredClone`
36
- * cannot serialise.
37
- *
38
- * Strategy:
39
- * 1. Try `structuredClone` — fast and spec-correct for plain data.
40
- * 2. Fall back to a manual recursive copy for Proxies, callables, and other
41
- * non-serialisable objects; errors on individual property clones are swallowed
42
- * and the original reference is retained for that key.
43
- *
44
- * @param {unknown} obj - Value to clone.
45
- * @returns {unknown} Deep clone of `obj`.
46
- * @public
47
- */
48
- public deepClone(obj: unknown): unknown;
49
- /**
50
- * Generate unique ID
51
- * @returns {string} Unique identifier
52
- * @public
53
- */
54
- public generateId(): string;
3
+ isPlainObject(obj: any): boolean;
4
+ deepMerge(target: any, source: any): any;
5
+ deepClone(obj: any): any;
6
+ generateId(): string;
55
7
  }
56
8
  import { ComponentBase } from "@cldmv/slothlet/factories/component-base";
57
9
  //# sourceMappingURL=utilities.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utilities.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/utilities.mjs"],"names":[],"mappings":"AAsBA;;;;;GAKG;AACH;IACC,gCAAsC;IAEtC;;;;;OAKG;IACH,0BAJW,GAAC,GACC,OAAO,CAOnB;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,gDAoBC;IAED;;;;;;;;;;;;;OAaG;IACH,sBAJW,OAAO,GACL,OAAO,CAyBnB;IAED;;;;OAIG;IACH,qBAHa,MAAM,CAKlB;CACD;8BA5G6B,0CAA0C"}
1
+ {"version":3,"file":"utilities.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/utilities.mjs"],"names":[],"mappings":"AAAoE;IAAsC,gCAAoC;IAAA,iCAA0J;IAAA,yCAAmX;IAAA,yBAA+Y;IAAA,qBAAsF;CAAC;8BAAxmC,0CAA0C"}
@@ -1,39 +1,6 @@
1
- /**
2
- * Set current language (synchronous)
3
- * Merges requested language translations over default English translations
4
- * @param {string} lang - Language code
5
- * @public
6
- */
7
- export function setLanguage(lang: string): void;
8
- /**
9
- * Get current language
10
- * @returns {string} Language code
11
- * @public
12
- */
13
1
  export function getLanguage(): string;
14
- /**
15
- * Translate error message with interpolation
16
- * @param {string} errorCode - Error code
17
- * @param {Object} params - Parameters for interpolation
18
- * @returns {string} Translated message
19
- * @public
20
- */
21
- export function translate(errorCode: string, params?: any): string;
22
- /**
23
- * Initialize i18n system (synchronous)
24
- * @param {Object} options - Options
25
- * @param {string} [options.language] - Language code (auto-detect if not provided)
26
- * @public
27
- */
28
- export function initI18n(options?: {
29
- language?: string;
30
- }): void;
31
- /**
32
- * Translate error message with interpolation
33
- * @param {string} errorCode - Error code
34
- * @param {Object} params - Parameters for interpolation
35
- * @returns {string} Translated message
36
- * @public
37
- */
38
- export function t(errorCode: string, params?: any): string;
2
+ export function initI18n(options?: {}): void;
3
+ export function setLanguage(lang: any): void;
4
+ export function t(errorCode: any, params?: {}): any;
5
+ export function translate(errorCode: any, params?: {}): any;
39
6
  //# sourceMappingURL=translations.d.mts.map