@cldmv/slothlet 3.3.0 → 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.
- package/README.md +6 -8
- package/REFERENCE.md +23 -0
- package/dist/lib/builders/api-assignment.mjs +1 -589
- package/dist/lib/builders/api_builder.mjs +1 -1385
- package/dist/lib/builders/builder.mjs +1 -78
- package/dist/lib/builders/modes-processor.mjs +1 -1800
- package/dist/lib/errors.mjs +9 -211
- package/dist/lib/factories/component-base.mjs +1 -80
- package/dist/lib/factories/context.mjs +1 -22
- package/dist/lib/handlers/api-cache-manager.mjs +1 -200
- package/dist/lib/handlers/api-manager.mjs +1 -2536
- package/dist/lib/handlers/context-async.mjs +1 -172
- package/dist/lib/handlers/context-live.mjs +1 -173
- package/dist/lib/handlers/hook-manager.mjs +1 -667
- package/dist/lib/handlers/lifecycle-token.mjs +1 -28
- package/dist/lib/handlers/lifecycle.mjs +1 -115
- package/dist/lib/handlers/materialize-manager.mjs +1 -48
- package/dist/lib/handlers/metadata.mjs +1 -501
- package/dist/lib/handlers/ownership.mjs +1 -322
- package/dist/lib/handlers/permission-manager.mjs +1 -392
- package/dist/lib/handlers/unified-wrapper.mjs +1 -3110
- package/dist/lib/handlers/version-manager.mjs +1 -885
- package/dist/lib/helpers/class-instance-wrapper.mjs +1 -109
- package/dist/lib/helpers/config.mjs +1 -439
- package/dist/lib/helpers/eventemitter-context.mjs +1 -349
- package/dist/lib/helpers/hint-detector.mjs +1 -47
- package/dist/lib/helpers/modes-utils.mjs +1 -37
- package/dist/lib/helpers/pattern-matcher.mjs +1 -125
- package/dist/lib/helpers/resolve-from-caller.mjs +1 -169
- package/dist/lib/helpers/sanitize.mjs +1 -340
- package/dist/lib/helpers/utilities.mjs +1 -70
- package/dist/lib/i18n/translations.mjs +1 -126
- package/dist/lib/modes/eager.mjs +1 -59
- package/dist/lib/modes/lazy.mjs +1 -81
- package/dist/lib/processors/flatten.mjs +1 -437
- package/dist/lib/processors/loader.mjs +1 -339
- package/dist/lib/processors/type-generator.mjs +1 -275
- package/dist/lib/processors/typescript.mjs +1 -172
- package/dist/lib/runtime/runtime-asynclocalstorage.mjs +1 -113
- package/dist/lib/runtime/runtime-livebindings.mjs +1 -78
- package/dist/lib/runtime/runtime.mjs +1 -102
- package/dist/slothlet.mjs +1 -817
- package/package.json +34 -31
- package/types/dist/lib/builders/api-assignment.d.mts +3 -92
- package/types/dist/lib/builders/api-assignment.d.mts.map +1 -1
- package/types/dist/lib/builders/api_builder.d.mts +102 -91
- package/types/dist/lib/builders/api_builder.d.mts.map +1 -1
- package/types/dist/lib/builders/builder.d.mts +1 -55
- package/types/dist/lib/builders/builder.d.mts.map +1 -1
- package/types/dist/lib/builders/modes-processor.d.mts +3 -27
- package/types/dist/lib/builders/modes-processor.d.mts.map +1 -1
- package/types/dist/lib/errors.d.mts +19 -109
- package/types/dist/lib/errors.d.mts.map +1 -1
- package/types/dist/lib/factories/component-base.d.mts +7 -177
- package/types/dist/lib/factories/component-base.d.mts.map +1 -1
- package/types/dist/lib/factories/context.d.mts +4 -22
- package/types/dist/lib/factories/context.d.mts.map +1 -1
- package/types/dist/lib/handlers/api-cache-manager.d.mts +20 -203
- package/types/dist/lib/handlers/api-cache-manager.d.mts.map +1 -1
- package/types/dist/lib/handlers/api-manager.d.mts +33 -408
- package/types/dist/lib/handlers/api-manager.d.mts.map +1 -1
- package/types/dist/lib/handlers/context-async.d.mts +23 -61
- package/types/dist/lib/handlers/context-async.d.mts.map +1 -1
- package/types/dist/lib/handlers/context-live.d.mts +22 -59
- package/types/dist/lib/handlers/context-live.d.mts.map +1 -1
- package/types/dist/lib/handlers/hook-manager.d.mts +46 -185
- package/types/dist/lib/handlers/hook-manager.d.mts.map +1 -1
- package/types/dist/lib/handlers/lifecycle-token.d.mts +3 -48
- package/types/dist/lib/handlers/lifecycle-token.d.mts.map +1 -1
- package/types/dist/lib/handlers/lifecycle.d.mts +5 -82
- package/types/dist/lib/handlers/lifecycle.d.mts.map +1 -1
- package/types/dist/lib/handlers/materialize-manager.d.mts +8 -70
- package/types/dist/lib/handlers/materialize-manager.d.mts.map +1 -1
- package/types/dist/lib/handlers/metadata.d.mts +17 -221
- package/types/dist/lib/handlers/metadata.d.mts.map +1 -1
- package/types/dist/lib/handlers/ownership.d.mts +44 -160
- package/types/dist/lib/handlers/ownership.d.mts.map +1 -1
- package/types/dist/lib/handlers/permission-manager.d.mts +37 -141
- package/types/dist/lib/handlers/permission-manager.d.mts.map +1 -1
- package/types/dist/lib/handlers/unified-wrapper.d.mts +26 -239
- package/types/dist/lib/handlers/unified-wrapper.d.mts.map +1 -1
- package/types/dist/lib/handlers/version-manager.d.mts +28 -225
- package/types/dist/lib/handlers/version-manager.d.mts.map +1 -1
- package/types/dist/lib/helpers/class-instance-wrapper.d.mts +2 -52
- package/types/dist/lib/helpers/class-instance-wrapper.d.mts.map +1 -1
- package/types/dist/lib/helpers/config.d.mts +125 -139
- package/types/dist/lib/helpers/config.d.mts.map +1 -1
- package/types/dist/lib/helpers/eventemitter-context.d.mts +3 -29
- package/types/dist/lib/helpers/eventemitter-context.d.mts.map +1 -1
- package/types/dist/lib/helpers/hint-detector.d.mts +2 -15
- package/types/dist/lib/helpers/hint-detector.d.mts.map +1 -1
- package/types/dist/lib/helpers/modes-utils.d.mts +3 -30
- package/types/dist/lib/helpers/modes-utils.d.mts.map +1 -1
- package/types/dist/lib/helpers/pattern-matcher.d.mts +3 -43
- package/types/dist/lib/helpers/pattern-matcher.d.mts.map +1 -1
- package/types/dist/lib/helpers/resolve-from-caller.d.mts +3 -27
- package/types/dist/lib/helpers/resolve-from-caller.d.mts.map +1 -1
- package/types/dist/lib/helpers/sanitize.d.mts +4 -92
- package/types/dist/lib/helpers/sanitize.d.mts.map +1 -1
- package/types/dist/lib/helpers/utilities.d.mts +4 -52
- package/types/dist/lib/helpers/utilities.d.mts.map +1 -1
- package/types/dist/lib/i18n/translations.d.mts +4 -37
- package/types/dist/lib/i18n/translations.d.mts.map +1 -1
- package/types/dist/lib/modes/eager.d.mts +8 -30
- package/types/dist/lib/modes/eager.d.mts.map +1 -1
- package/types/dist/lib/modes/lazy.d.mts +10 -43
- package/types/dist/lib/modes/lazy.d.mts.map +1 -1
- package/types/dist/lib/processors/flatten.d.mts +56 -107
- package/types/dist/lib/processors/flatten.d.mts.map +1 -1
- package/types/dist/lib/processors/loader.d.mts +6 -41
- package/types/dist/lib/processors/loader.d.mts.map +1 -1
- package/types/dist/lib/processors/type-generator.d.mts +2 -16
- package/types/dist/lib/processors/type-generator.d.mts.map +1 -1
- package/types/dist/lib/processors/typescript.d.mts +6 -53
- package/types/dist/lib/processors/typescript.d.mts.map +1 -1
- package/types/dist/lib/runtime/runtime-asynclocalstorage.d.mts +3 -71
- package/types/dist/lib/runtime/runtime-asynclocalstorage.d.mts.map +1 -1
- package/types/dist/lib/runtime/runtime-livebindings.d.mts +2 -37
- package/types/dist/lib/runtime/runtime-livebindings.d.mts.map +1 -1
- package/types/dist/lib/runtime/runtime.d.mts +3 -39
- package/types/dist/lib/runtime/runtime.d.mts.map +1 -1
- package/types/dist/slothlet.d.mts +3 -249
- package/types/dist/slothlet.d.mts.map +1 -1
- package/types/index.d.mts +36 -16
- package/types/index.d.mts.map +1 -0
- package/AGENT-USAGE.md +0 -736
- 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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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":"
|
|
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":"
|
|
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
|
|
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":"
|
|
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
|
-
|
|
9
|
-
|
|
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":"
|
|
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
|
-
|
|
3
|
-
|
|
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":"
|
|
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
|
-
|
|
11
|
-
|
|
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":"
|
|
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
|
-
|
|
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":"
|
|
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"}
|