@cldmv/slothlet 3.3.0 → 3.4.0

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 (139) hide show
  1. package/README.md +9 -10
  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 -1385
  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 -2536
  12. package/dist/lib/handlers/context-async.mjs +1 -172
  13. package/dist/lib/handlers/context-live.mjs +1 -173
  14. package/dist/lib/handlers/hook-manager.mjs +1 -667
  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 +1 -392
  21. package/dist/lib/handlers/unified-wrapper.mjs +1 -3110
  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 -439
  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 +1 -125
  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 +1 -0
  33. package/dist/lib/i18n/languages/en-gb.json +1 -0
  34. package/dist/lib/i18n/languages/en-us.json +1 -0
  35. package/dist/lib/i18n/languages/es-es.json +412 -0
  36. package/dist/lib/i18n/languages/es-mx.json +1 -0
  37. package/dist/lib/i18n/languages/fr-fr.json +1 -0
  38. package/dist/lib/i18n/languages/hi-in.json +2 -1
  39. package/dist/lib/i18n/languages/ja-jp.json +1 -0
  40. package/dist/lib/i18n/languages/ko-kr.json +1 -0
  41. package/dist/lib/i18n/languages/pt-br.json +21 -20
  42. package/dist/lib/i18n/languages/ru-ru.json +2 -1
  43. package/dist/lib/i18n/languages/zh-cn.json +6 -5
  44. package/dist/lib/i18n/translations.mjs +1 -126
  45. package/dist/lib/modes/eager.mjs +1 -59
  46. package/dist/lib/modes/lazy.mjs +1 -81
  47. package/dist/lib/processors/flatten.mjs +1 -437
  48. package/dist/lib/processors/loader.mjs +1 -339
  49. package/dist/lib/processors/type-generator.mjs +1 -275
  50. package/dist/lib/processors/typescript.mjs +1 -172
  51. package/dist/lib/runtime/runtime-asynclocalstorage.mjs +1 -113
  52. package/dist/lib/runtime/runtime-livebindings.mjs +1 -78
  53. package/dist/lib/runtime/runtime.mjs +1 -102
  54. package/dist/slothlet.mjs +1 -817
  55. package/package.json +35 -31
  56. package/types/dist/lib/builders/api-assignment.d.mts +3 -92
  57. package/types/dist/lib/builders/api-assignment.d.mts.map +1 -1
  58. package/types/dist/lib/builders/api_builder.d.mts +102 -91
  59. package/types/dist/lib/builders/api_builder.d.mts.map +1 -1
  60. package/types/dist/lib/builders/builder.d.mts +1 -55
  61. package/types/dist/lib/builders/builder.d.mts.map +1 -1
  62. package/types/dist/lib/builders/modes-processor.d.mts +3 -27
  63. package/types/dist/lib/builders/modes-processor.d.mts.map +1 -1
  64. package/types/dist/lib/errors.d.mts +19 -109
  65. package/types/dist/lib/errors.d.mts.map +1 -1
  66. package/types/dist/lib/factories/component-base.d.mts +7 -177
  67. package/types/dist/lib/factories/component-base.d.mts.map +1 -1
  68. package/types/dist/lib/factories/context.d.mts +4 -22
  69. package/types/dist/lib/factories/context.d.mts.map +1 -1
  70. package/types/dist/lib/handlers/api-cache-manager.d.mts +20 -203
  71. package/types/dist/lib/handlers/api-cache-manager.d.mts.map +1 -1
  72. package/types/dist/lib/handlers/api-manager.d.mts +34 -408
  73. package/types/dist/lib/handlers/api-manager.d.mts.map +1 -1
  74. package/types/dist/lib/handlers/context-async.d.mts +23 -61
  75. package/types/dist/lib/handlers/context-async.d.mts.map +1 -1
  76. package/types/dist/lib/handlers/context-live.d.mts +22 -59
  77. package/types/dist/lib/handlers/context-live.d.mts.map +1 -1
  78. package/types/dist/lib/handlers/hook-manager.d.mts +46 -185
  79. package/types/dist/lib/handlers/hook-manager.d.mts.map +1 -1
  80. package/types/dist/lib/handlers/lifecycle-token.d.mts +3 -48
  81. package/types/dist/lib/handlers/lifecycle-token.d.mts.map +1 -1
  82. package/types/dist/lib/handlers/lifecycle.d.mts +5 -82
  83. package/types/dist/lib/handlers/lifecycle.d.mts.map +1 -1
  84. package/types/dist/lib/handlers/materialize-manager.d.mts +8 -70
  85. package/types/dist/lib/handlers/materialize-manager.d.mts.map +1 -1
  86. package/types/dist/lib/handlers/metadata.d.mts +17 -221
  87. package/types/dist/lib/handlers/metadata.d.mts.map +1 -1
  88. package/types/dist/lib/handlers/ownership.d.mts +44 -160
  89. package/types/dist/lib/handlers/ownership.d.mts.map +1 -1
  90. package/types/dist/lib/handlers/permission-manager.d.mts +40 -141
  91. package/types/dist/lib/handlers/permission-manager.d.mts.map +1 -1
  92. package/types/dist/lib/handlers/unified-wrapper.d.mts +26 -239
  93. package/types/dist/lib/handlers/unified-wrapper.d.mts.map +1 -1
  94. package/types/dist/lib/handlers/version-manager.d.mts +28 -225
  95. package/types/dist/lib/handlers/version-manager.d.mts.map +1 -1
  96. package/types/dist/lib/helpers/class-instance-wrapper.d.mts +2 -52
  97. package/types/dist/lib/helpers/class-instance-wrapper.d.mts.map +1 -1
  98. package/types/dist/lib/helpers/config.d.mts +125 -139
  99. package/types/dist/lib/helpers/config.d.mts.map +1 -1
  100. package/types/dist/lib/helpers/eventemitter-context.d.mts +3 -29
  101. package/types/dist/lib/helpers/eventemitter-context.d.mts.map +1 -1
  102. package/types/dist/lib/helpers/hint-detector.d.mts +2 -15
  103. package/types/dist/lib/helpers/hint-detector.d.mts.map +1 -1
  104. package/types/dist/lib/helpers/modes-utils.d.mts +3 -30
  105. package/types/dist/lib/helpers/modes-utils.d.mts.map +1 -1
  106. package/types/dist/lib/helpers/pattern-matcher.d.mts +3 -43
  107. package/types/dist/lib/helpers/pattern-matcher.d.mts.map +1 -1
  108. package/types/dist/lib/helpers/resolve-from-caller.d.mts +3 -27
  109. package/types/dist/lib/helpers/resolve-from-caller.d.mts.map +1 -1
  110. package/types/dist/lib/helpers/sanitize.d.mts +4 -92
  111. package/types/dist/lib/helpers/sanitize.d.mts.map +1 -1
  112. package/types/dist/lib/helpers/utilities.d.mts +4 -52
  113. package/types/dist/lib/helpers/utilities.d.mts.map +1 -1
  114. package/types/dist/lib/i18n/translations.d.mts +4 -37
  115. package/types/dist/lib/i18n/translations.d.mts.map +1 -1
  116. package/types/dist/lib/modes/eager.d.mts +8 -30
  117. package/types/dist/lib/modes/eager.d.mts.map +1 -1
  118. package/types/dist/lib/modes/lazy.d.mts +10 -43
  119. package/types/dist/lib/modes/lazy.d.mts.map +1 -1
  120. package/types/dist/lib/processors/flatten.d.mts +56 -107
  121. package/types/dist/lib/processors/flatten.d.mts.map +1 -1
  122. package/types/dist/lib/processors/loader.d.mts +6 -41
  123. package/types/dist/lib/processors/loader.d.mts.map +1 -1
  124. package/types/dist/lib/processors/type-generator.d.mts +2 -16
  125. package/types/dist/lib/processors/type-generator.d.mts.map +1 -1
  126. package/types/dist/lib/processors/typescript.d.mts +6 -53
  127. package/types/dist/lib/processors/typescript.d.mts.map +1 -1
  128. package/types/dist/lib/runtime/runtime-asynclocalstorage.d.mts +3 -71
  129. package/types/dist/lib/runtime/runtime-asynclocalstorage.d.mts.map +1 -1
  130. package/types/dist/lib/runtime/runtime-livebindings.d.mts +2 -37
  131. package/types/dist/lib/runtime/runtime-livebindings.d.mts.map +1 -1
  132. package/types/dist/lib/runtime/runtime.d.mts +3 -39
  133. package/types/dist/lib/runtime/runtime.d.mts.map +1 -1
  134. package/types/dist/slothlet.d.mts +3 -249
  135. package/types/dist/slothlet.d.mts.map +1 -1
  136. package/types/index.d.mts +36 -16
  137. package/types/index.d.mts.map +1 -0
  138. package/AGENT-USAGE.md +0 -736
  139. package/docs/API-RULES.md +0 -712
@@ -1,145 +1,131 @@
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
- /**
128
- * Normalize permissions configuration.
129
- *
130
- * @param {object|null} [permissions] - Raw permissions config from user.
131
- * @param {string} [permissions.defaultPolicy="allow"] - Fallback policy: "allow" or "deny".
132
- * @param {boolean} [permissions.enabled=true] - Global toggle.
133
- * @param {string|boolean} [permissions.audit="default"] - Audit level: `"default"` (denied + self-bypass only),
134
- * `"verbose"` (all decisions). `true` and `false` are accepted and both normalize to `"default"`.
135
- * @param {Array<object>} [permissions.rules=[]] - Initial permission rules.
136
- * @returns {object|null} Normalized permissions config, or null when permissions is absent or not an object.
137
- *
138
- * @example
139
- * normalizePermissions({ defaultPolicy: "deny", rules: [{ caller: "**", target: "admin.**", effect: "deny" }] });
140
- * // => { defaultPolicy: "deny", enabled: true, audit: "default", rules: [...] }
141
- */
142
- normalizePermissions(permissions?: object | null): object | null;
143
129
  }
144
130
  import { ComponentBase } from "@cldmv/slothlet/factories/component-base";
145
131
  //# sourceMappingURL=config.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/config.mjs"],"names":[],"mappings":"AAqBA;;;;;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,+CAeC;IAED;;;;;OAKG;IACH,6BAJW,OAAO,MAAO,OAqExB;IAED;;;;;;OAMG;IACH,0CA+IC;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;IAED;;;;;;;;;;;;;;OAcG;IACH,mCAZW,MAAM,GAAC,IAAI,GAMT,MAAM,GAAC,IAAI,CA6EvB;CACD;8BA1iB6B,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"}
@@ -1,44 +1,4 @@
1
- /**
2
- * Compile a glob pattern into a matcher function.
3
- * Supports: * (any chars except .), ** (any chars including .), ? (single char),
4
- * {a,b} brace expansion, !pattern negation
5
- *
6
- * @param {string} pattern - Glob pattern
7
- * @param {object} [options={}] - Options
8
- * @param {Function} [options.onMaxDepth] - Called when brace expansion exceeds max depth.
9
- * Should throw an error. If not provided, a SlothletError("BRACE_EXPANSION_MAX_DEPTH") is thrown.
10
- * @returns {function} Matcher function that takes a path and returns boolean
11
- * @example
12
- * const matcher = compilePattern("payments.**");
13
- * matcher("payments.charge"); // true
14
- * matcher("admin.users"); // false
15
- */
16
- export function compilePattern(pattern: string, options?: {
17
- onMaxDepth?: Function;
18
- }): Function;
19
- /**
20
- * Expand brace patterns {a,b,c} into multiple patterns.
21
- * Supports nested braces with configurable depth limit.
22
- *
23
- * @param {string} pattern - Pattern with braces to expand
24
- * @param {number} [depth=0] - Current recursion depth
25
- * @param {number} [maxDepth=10] - Maximum nesting depth
26
- * @param {object} [options={}] - Options
27
- * @param {Function} [options.onMaxDepth] - Called when max depth exceeded. Should throw.
28
- * @returns {string[]} Array of expanded patterns
29
- * @example
30
- * expandBraces("{a,b}.path"); // ["a.path", "b.path"]
31
- */
32
- export function expandBraces(pattern: string, depth?: number, maxDepth?: number, options?: {
33
- onMaxDepth?: Function;
34
- }): string[];
35
- /**
36
- * Split brace alternatives on commas, respecting nested braces.
37
- *
38
- * @param {string} content - Content inside braces
39
- * @returns {string[]} Array of alternatives
40
- * @example
41
- * splitBraceAlternatives("a,b,c"); // ["a", "b", "c"]
42
- */
43
- export function splitBraceAlternatives(content: string): string[];
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[];
44
4
  //# sourceMappingURL=pattern-matcher.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pattern-matcher.d.mts","sourceRoot":"","sources":["../../../../dist/lib/helpers/pattern-matcher.mjs"],"names":[],"mappings":"AAoCA;;;;;;;;;;;;;;GAcG;AACH,wCAVW,MAAM,YAEd;IAA2B,UAAU;CAErC,YAsCF;AAED;;;;;;;;;;;;GAYG;AACH,sCATW,MAAM,UACN,MAAM,aACN,MAAM,YAEd;IAA2B,UAAU;CACrC,GAAU,MAAM,EAAE,CAwDpB;AAED;;;;;;;GAOG;AACH,gDALW,MAAM,GACJ,MAAM,EAAE,CA+BpB"}
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"}