@cldmv/slothlet 2.5.6 → 2.6.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.
@@ -1,58 +1,9 @@
1
- /**
2
- * Shared AsyncLocalStorage instance for all slothlet instances.
3
- * Provides unified context management across all EventEmitter wrappers.
4
- * @type {AsyncLocalStorageType}
5
- * @public
6
- */
7
- export const sharedALS: AsyncLocalStorageType;
8
- export function runWithCtx(ctx: object, fn: Function, thisArg: any, args: any[]): any;
9
- export function getCtx(): object | null;
10
- export function makeWrapper(ctx: object): Function;
11
- /**
12
- * @constant self
13
- * @memberof module:@cldmv/slothlet/runtime
14
- * @export module:@cldmv/slothlet/runtime
15
- * @public
16
- * @type {function|object}
17
- *
18
- * @description
19
- * Live binding to the current instance's 'self' reference from AsyncLocalStorage context.
20
- *
21
- * @example
22
- * // Access current instance self
23
- * console.log(self); // Current slothlet instance
24
- */
25
- export const self: Function | object;
26
- /**
27
- * @constant context
28
- * @memberof module:@cldmv/slothlet/runtime
29
- * @export module:@cldmv/slothlet/runtime
30
- * @public
31
- * @type {object}
32
- *
33
- * @description
34
- * Live binding to the current instance's 'context' data from AsyncLocalStorage context.
35
- *
36
- * @example
37
- * // Access current context data
38
- * console.log(context); // Current context object
39
- */
40
- export const context: object;
41
- /**
42
- * @constant reference
43
- * @memberof module:@cldmv/slothlet/runtime
44
- * @export module:@cldmv/slothlet/runtime
45
- * @public
46
- * @type {object}
47
- *
48
- * @description
49
- * Live binding to the current instance's 'reference' object from AsyncLocalStorage context.
50
- *
51
- * @example
52
- * // Access current reference object
53
- * console.log(reference); // Current reference data
54
- */
55
- export const reference: object;
56
- export type AsyncLocalStorageType = AsyncLocalStorage<any>;
57
- import { AsyncLocalStorage } from "node:async_hooks";
1
+ export function runWithCtx(ctx: any, fn: any, thisArg: any, args: any): any;
2
+ export function makeWrapper(ctx: any): Function;
3
+ export function getCtx(): any;
4
+ export function self(): void;
5
+ export const context: {};
6
+ export const reference: {};
7
+ export const instanceId: any;
8
+ export const sharedALS: any;
58
9
  //# sourceMappingURL=runtime.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.mts","sourceRoot":"","sources":["../../../../dist/lib/runtime/runtime.mjs"],"names":[],"mappings":"AAuCA;;;;;GAKG;AACH,wBAHU,qBAAqB,CAGkB;AAsB1C,gCAdI,MAAM,yBAEN,GAAG,gBAED,GAAG,CA6Bf;AAiBM,0BAZM,MAAM,GAAC,IAAI,CAY0B;AAiL3C,iCAjBI,MAAM,YAgIhB;AAuSD;;;;;;;;;;;;;GAaG;AACH,mBATU,WAAS,MAAM,CAS6B;AAEtD;;;;;;;;;;;;;GAaG;AACH,sBATU,MAAM,CAS4C;AAE5D;;;;;;;;;;;;;GAaG;AACH,wBATU,MAAM,CASgD;;kCA3rB9B,kBAAkB"}
1
+ {"version":3,"file":"runtime.d.mts","sourceRoot":"","sources":["../../../../dist/lib/runtime/runtime.mjs"],"names":[],"mappings":"AAoMA,4EAGC;AAED,gDAGC;AAED,8BAGC;AArKA,6BAA+B;AAkDhC,yBAiDE;AAEF,2BAiDE;AAiBF,6BAOK;AAEL,4BAAuD"}
@@ -42,11 +42,27 @@ export type SlothletOptions = {
42
42
  */
43
43
  dir?: string;
44
44
  /**
45
- * - Loading strategy:
45
+ * - Loading strategy (legacy option):
46
46
  * - `true`: Lazy loading - modules loaded on-demand when accessed (lower initial load, proxy overhead)
47
47
  * - `false`: Eager loading - all modules loaded immediately (default, higher initial load, direct access)
48
48
  */
49
49
  lazy?: boolean;
50
+ /**
51
+ * - Loading mode (alternative to lazy option):
52
+ * - `"lazy"`: Lazy loading - modules loaded on-demand when accessed (same as lazy: true)
53
+ * - `"eager"`: Eager loading - all modules loaded immediately (same as lazy: false)
54
+ * - `"singleton"`, `"vm"`, `"worker"`, `"fork"`: Execution engine mode (legacy, use engine option instead)
55
+ * - Takes precedence over lazy option when both are provided
56
+ */
57
+ mode?: string;
58
+ /**
59
+ * - Execution environment mode:
60
+ * - `"singleton"`: Single shared instance within current process (default, fastest)
61
+ * - `"vm"`: Isolated VM context for security/isolation
62
+ * - `"worker"`: Web Worker or Worker Thread execution
63
+ * - `"fork"`: Child process execution for complete isolation
64
+ */
65
+ engine?: string;
50
66
  /**
51
67
  * - Directory traversal depth control:
52
68
  * - `Infinity`: Traverse all subdirectories recursively (default)
@@ -62,14 +78,6 @@ export type SlothletOptions = {
62
78
  * - Command line and environment settings become the default for all instances unless overridden
63
79
  */
64
80
  debug?: boolean;
65
- /**
66
- * - Execution environment mode:
67
- * - `"singleton"`: Single shared instance within current process (default, fastest)
68
- * - `"vm"`: Isolated VM context for security/isolation
69
- * - `"worker"`: Web Worker or Worker Thread execution
70
- * - `"fork"`: Child process execution for complete isolation
71
- */
72
- mode?: string;
73
81
  /**
74
82
  * - API structure and calling convention:
75
83
  * - `"auto"`: Auto-detect based on root module exports (function vs object) - recommended (default)
@@ -1 +1 @@
1
- {"version":3,"file":"slothlet.d.mts","sourceRoot":"","sources":["../../dist/slothlet.mjs"],"names":[],"mappings":"AA05CA;;;;;;;;;GASG;AACH,kDARW,WAAS,MAAM,UACf,WAAS,MAAM,QAwCzB;AA9yCD;;;;;;;GAOG;AACH,mBAJU,MAAM,CAIO;AAEvB;;;;;GAKG;AACH,sBAJU,MAAM,CAIU;AAE1B;;;;;GAKG;AACH,wBAJU,MAAM,CAIY;;;;;;;;;UAiyCd,MAAM;;;;;;WAIN,OAAO;;;;;;;eAGP,MAAM;;;;;;;;YAIN,OAAO;;;;;;;;WAKP,MAAM;;;;;;;eAKN,MAAM;;;;;;cAIN,MAAM;;;;;;gBAGN,MAAM;;;;;;eAMjB;QAA8B,UAAU,GAA7B,OAAO;QACY,gBAAgB,GAAnC,OAAO;QACY,gBAAgB,GAAnC,OAAO;QACW,KAAK,GAClC;YAAqC,KAAK,GAA/B,MAAM,EAAE;YACkB,gBAAgB,GAA1C,MAAM,EAAE;YACkB,KAAK,GAA/B,MAAM,EAAE;YACkB,KAAK,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