@cldmv/slothlet 3.15.2 → 3.16.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.
- package/README.md +8 -6
- package/dist/lib/builders/api-assignment.mjs +1 -1
- package/dist/lib/builders/api_builder.mjs +1 -1
- package/dist/lib/builders/builder.mjs +1 -1
- package/dist/lib/builders/modes-processor.mjs +1 -1
- package/dist/lib/handlers/api-cache-manager.mjs +1 -1
- package/dist/lib/handlers/api-manager.mjs +1 -1
- package/dist/lib/handlers/hook-manager.mjs +1 -1
- package/dist/lib/handlers/module-manager.mjs +1 -1
- package/dist/lib/handlers/ownership.mjs +1 -1
- package/dist/lib/handlers/routine-manager.mjs +17 -0
- package/dist/lib/handlers/unified-wrapper.mjs +1 -1
- package/dist/lib/helpers/config.mjs +1 -1
- package/dist/lib/helpers/defaults.mjs +17 -0
- package/dist/lib/helpers/eventtarget-property-context.mjs +17 -0
- package/dist/lib/helpers/observer-context.mjs +17 -0
- package/dist/lib/helpers/scheduler-context.mjs +1 -1
- package/dist/lib/i18n/languages/en-us.json +2 -0
- package/dist/lib/modes/eager.mjs +1 -1
- package/dist/lib/modes/lazy.mjs +1 -1
- package/dist/lib/processors/flatten.mjs +1 -1
- package/dist/lib/processors/loader.mjs +1 -1
- package/dist/slothlet.mjs +1 -1
- package/index.cjs +20 -0
- package/index.mjs +14 -0
- package/package.json +8 -7
- package/types/stub/devcheck.d.mts +1 -1
- package/types/stub/lib/builders/api-assignment.d.mts +130 -2
- package/types/stub/lib/builders/api_builder.d.mts +109 -2
- package/types/stub/lib/builders/builder.d.mts +87 -2
- package/types/stub/lib/builders/modes-processor.d.mts +71 -2
- package/types/stub/lib/factories/component-base.d.mts +177 -0
- package/types/stub/lib/helpers/caller-pinning.d.mts +22 -2
- package/types/stub/lib/helpers/class-instance-wrapper.d.mts +58 -2
- package/types/stub/lib/helpers/config.d.mts +321 -2
- package/types/stub/lib/helpers/defaults.d.mts +42 -0
- package/types/stub/lib/helpers/eventemitter-context.d.mts +31 -2
- package/types/stub/lib/helpers/eventtarget-context.d.mts +21 -2
- package/types/stub/lib/helpers/eventtarget-property-context.d.mts +23 -0
- package/types/stub/lib/helpers/generate-manifest.d.mts +180 -2
- package/types/stub/lib/helpers/hint-detector.d.mts +27 -2
- package/types/stub/lib/helpers/manifest-resolver.d.mts +101 -2
- package/types/stub/lib/helpers/modes-utils.d.mts +35 -2
- package/types/stub/lib/helpers/module-discovery.d.mts +81 -2
- package/types/stub/lib/helpers/module-manifest-validator.d.mts +37 -2
- package/types/stub/lib/helpers/module-sort.d.mts +65 -2
- package/types/stub/lib/helpers/observer-context.d.mts +23 -0
- package/types/stub/lib/helpers/pattern-matcher.d.mts +44 -2
- package/types/stub/lib/helpers/platform.d.mts +111 -2
- package/types/stub/lib/helpers/resolve-from-caller.d.mts +33 -2
- package/types/stub/lib/helpers/scheduler-context.d.mts +23 -2
- package/types/stub/lib/helpers/utilities.d.mts +57 -2
- package/types/stub/lib/i18n/translations.d.mts +52 -2
- package/types/stub/lib/modes/eager.d.mts +56 -2
- package/types/stub/lib/modes/lazy.d.mts +67 -2
- package/types/stub/lib/processors/flatten.d.mts +123 -2
- package/types/stub/lib/processors/loader.d.mts +83 -2
- package/types/stub/lib/processors/type-generator.d.mts +19 -2
- package/types/stub/lib/processors/typescript.d.mts +174 -2
- package/types/stub/lib/runtime/runtime-asynclocalstorage.d.mts +72 -2
- package/types/stub/lib/runtime/runtime-livebindings.d.mts +38 -2
|
@@ -1,3 +1,73 @@
|
|
|
1
1
|
// AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
|
|
2
|
-
//
|
|
3
|
-
|
|
2
|
+
// Self-contained copy: this subpath is internal and not published by @cldmv/slothlet-types.
|
|
3
|
+
/**
|
|
4
|
+
* Live binding to the current API (self-reference)
|
|
5
|
+
* @type {Proxy}
|
|
6
|
+
* @public
|
|
7
|
+
*
|
|
8
|
+
* @description
|
|
9
|
+
* A proxy that provides access to the full API object within the current context.
|
|
10
|
+
* Automatically resolves to the correct instance's API in AsyncLocalStorage context.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* import { self } from "@cldmv/slothlet/runtime/async";
|
|
14
|
+
*
|
|
15
|
+
* export function callOtherFunction() {
|
|
16
|
+
* // Call another function in the same API
|
|
17
|
+
* return self.otherFunction();
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
export const self: ProxyConstructor;
|
|
21
|
+
/**
|
|
22
|
+
* User-provided context object
|
|
23
|
+
* @type {Proxy}
|
|
24
|
+
* @public
|
|
25
|
+
*
|
|
26
|
+
* @description
|
|
27
|
+
* A proxy that provides access to user-provided context data (e.g., request data, user info).
|
|
28
|
+
* Can be set via `slothlet.run()` or `slothlet.scope()`.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* import { context } from "@cldmv/slothlet/runtime/async";
|
|
32
|
+
*
|
|
33
|
+
* export function getUserInfo() {
|
|
34
|
+
* // Access user-provided context
|
|
35
|
+
* return {
|
|
36
|
+
* userId: context.userId,
|
|
37
|
+
* userName: context.userName
|
|
38
|
+
* };
|
|
39
|
+
* }
|
|
40
|
+
*/
|
|
41
|
+
export const context: ProxyConstructor;
|
|
42
|
+
/**
|
|
43
|
+
* Reference to initialization reference object
|
|
44
|
+
* @type {Proxy}
|
|
45
|
+
* @public
|
|
46
|
+
*
|
|
47
|
+
* @description
|
|
48
|
+
* The reference object is merged directly into the API at initialization using the add API system.
|
|
49
|
+
* It is NOT available as a runtime export. Access it directly from the API or via api.slothlet.diag.reference().
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* // Reference merged into API - access directly:
|
|
53
|
+
* export function useReferenceData() {
|
|
54
|
+
* return self.myData; // if reference had myData property
|
|
55
|
+
* }
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* Current instance ID
|
|
59
|
+
* @type {Proxy}
|
|
60
|
+
* @public
|
|
61
|
+
*
|
|
62
|
+
* @description
|
|
63
|
+
* A proxy that provides access to the current slothlet instance ID.
|
|
64
|
+
* Useful for debugging and tracking which instance is handling a request.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* import { instanceID } from "@cldmv/slothlet/runtime/async";
|
|
68
|
+
*
|
|
69
|
+
* export function getInstanceInfo() {
|
|
70
|
+
* return { instanceID };
|
|
71
|
+
* }
|
|
72
|
+
*/
|
|
73
|
+
export const instanceID: ProxyConstructor;
|
|
@@ -1,3 +1,39 @@
|
|
|
1
1
|
// AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
|
|
2
|
-
//
|
|
3
|
-
|
|
2
|
+
// Self-contained copy: this subpath is internal and not published by @cldmv/slothlet-types.
|
|
3
|
+
/**
|
|
4
|
+
* Live binding to the current API (self-reference)
|
|
5
|
+
* @type {Proxy}
|
|
6
|
+
* @public
|
|
7
|
+
*
|
|
8
|
+
* @description
|
|
9
|
+
* A proxy that provides direct access to the current instance's API.
|
|
10
|
+
* In live mode, this directly references the active instance without AsyncLocalStorage.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* import { self } from "@cldmv/slothlet/runtime/live";
|
|
14
|
+
*
|
|
15
|
+
* export function callOtherFunction() {
|
|
16
|
+
* return self.otherFunction();
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
export const self: ProxyConstructor;
|
|
20
|
+
/**
|
|
21
|
+
* User-provided context object
|
|
22
|
+
* @type {Proxy}
|
|
23
|
+
* @public
|
|
24
|
+
*
|
|
25
|
+
* @description
|
|
26
|
+
* A proxy that provides access to user-provided context data.
|
|
27
|
+
* In live mode, this directly accesses the current instance's context.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* import { context } from "@cldmv/slothlet/runtime/live";
|
|
31
|
+
*
|
|
32
|
+
* export function getUserInfo() {
|
|
33
|
+
* return {
|
|
34
|
+
* userId: context.userId,
|
|
35
|
+
* userName: context.userName
|
|
36
|
+
* };
|
|
37
|
+
* }
|
|
38
|
+
*/
|
|
39
|
+
export const context: ProxyConstructor;
|