lanka 2.0.0 → 2.0.1
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/dist/{LankaSharedStoreLocator-jsz_gnUm.d.ts → ALankaLocator-BUCCz0Q5.d.ts} +1 -47
- package/dist/{ILankaScenarioVM-DpKFL3iE.d.ts → ILankaScenario-DQd9ZfUw.d.ts} +1 -30
- package/dist/{ILankaScenarioMetadata-Dj4GCqmX.d.ts → ILankaScenarioMetadata-BsDp0Bzm.d.ts} +1 -1
- package/dist/ILankaScenarioVM-DKwjbIRq.d.ts +30 -0
- package/dist/{LankaScenarioLocator-Dki2Es3O.d.ts → LankaScenarioVMRegistry-DySAOaj2.d.ts} +4 -37
- package/dist/_extend/index.d.ts +11 -6
- package/dist/_extend/index.js +20 -9
- package/dist/_extend/index.js.map +1 -1
- package/dist/_internal/index.d.ts +13 -8
- package/dist/{activeRuntime-BO-qY0yY.d.ts → activeRuntime-ByucLPhj.d.ts} +7 -3
- package/dist/bootstrap/index.d.ts +15 -10
- package/dist/bootstrap/index.js +10 -4
- package/dist/chunk-24MUFFHF.js +43 -0
- package/dist/chunk-24MUFFHF.js.map +1 -0
- package/dist/chunk-3R2NO47A.js +35 -0
- package/dist/chunk-3R2NO47A.js.map +1 -0
- package/dist/{chunk-UMPSR4US.js → chunk-42CWYVZJ.js} +44 -61
- package/dist/chunk-42CWYVZJ.js.map +1 -0
- package/dist/chunk-BMF4TM2Z.js +22 -0
- package/dist/chunk-BMF4TM2Z.js.map +1 -0
- package/dist/chunk-JZJ6GXX3.js +12 -0
- package/dist/chunk-JZJ6GXX3.js.map +1 -0
- package/dist/{chunk-EYDMBI5T.js → chunk-MKKMTLOY.js} +11 -311
- package/dist/chunk-MKKMTLOY.js.map +1 -0
- package/dist/{chunk-UE2C76OR.js → chunk-N3275IPH.js} +2 -69
- package/dist/chunk-N3275IPH.js.map +1 -0
- package/dist/chunk-NWEHOMTS.js +315 -0
- package/dist/chunk-NWEHOMTS.js.map +1 -0
- package/dist/chunk-SBITVBF7.js +49 -0
- package/dist/chunk-SBITVBF7.js.map +1 -0
- package/dist/{chunk-SZVNPK24.js → chunk-SO7D5E7O.js} +17 -9
- package/dist/{chunk-SZVNPK24.js.map → chunk-SO7D5E7O.js.map} +1 -1
- package/dist/{createLanka-x4oSMs7P.d.ts → createLanka-DvUGu9Hl.d.ts} +2 -2
- package/dist/{createLankaScope-DomNbEvb.d.ts → createLankaScope-CVoV0EwO.d.ts} +1 -1
- package/dist/gateway/index.js +3 -3
- package/dist/index.d.ts +14 -9
- package/dist/index.js +10 -4
- package/dist/locator/gateway/lanka-gateway-locator/LankaGatewayLocator.d.ts +18 -0
- package/dist/locator/gateway/lanka-gateway-locator/LankaGatewayLocator.js +9 -0
- package/dist/locator/gateway/lanka-gateway-locator/LankaGatewayLocator.js.map +1 -0
- package/dist/locator/index.d.ts +4 -2
- package/dist/locator/index.js +4 -1
- package/dist/locator/index.js.map +1 -1
- package/dist/locator/scenario/lanka-scenario-locator/LankaScenarioLocator.d.ts +60 -0
- package/dist/locator/scenario/lanka-scenario-locator/LankaScenarioLocator.js +12 -0
- package/dist/locator/scenario/lanka-scenario-locator/LankaScenarioLocator.js.map +1 -0
- package/dist/locator/shared-store/lanka-shared-store-locator/LankaSharedStoreLocator.d.ts +22 -0
- package/dist/locator/shared-store/lanka-shared-store-locator/LankaSharedStoreLocator.js +9 -0
- package/dist/locator/shared-store/lanka-shared-store-locator/LankaSharedStoreLocator.js.map +1 -0
- package/dist/locator/singleton/lanka-singleton-locator/LankaSingletonLocator.d.ts +30 -0
- package/dist/locator/singleton/lanka-singleton-locator/LankaSingletonLocator.js +9 -0
- package/dist/locator/singleton/lanka-singleton-locator/LankaSingletonLocator.js.map +1 -0
- package/dist/scenario/index.d.ts +4 -3
- package/dist/scenario/index.js +5 -3
- package/dist/scenario/index.js.map +1 -1
- package/dist/stream/index.d.ts +17 -12
- package/dist/viewmodel/index.d.ts +2 -1
- package/dist/viewmodel/index.js +2 -1
- package/dist/viewmodel/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/lanka-core/SKILL.md +1 -1
- package/skills/lanka-core/reference.md +1 -1
- package/skills/lanka-packages/SKILL.md +1 -1
- package/dist/chunk-EYDMBI5T.js.map +0 -1
- package/dist/chunk-UE2C76OR.js.map +0 -1
- package/dist/chunk-UMPSR4US.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/_internal/case-convert/caseConvert.ts","../src/locator/_abstractions/lanka-locator/ALankaLocator.ts"],"sourcesContent":["export function caseConvert(\n\tstr: string,\n\ttoCase: \"camelCase\" | \"kebabCase\" | \"snakeCase\" | \"pascalCase\" | \"titleCase\",\n): string {\n\tif (!str || typeof str !== \"string\") return str;\n\n\tconst words = str\n\t\t.replace(/([A-Z])/g, \" $1\")\n\t\t.trim()\n\t\t.split(/\\s+|_|-/)\n\t\t.filter((word) => word);\n\n\tswitch (toCase) {\n\t\tcase \"camelCase\":\n\t\t\treturn words\n\t\t\t\t.map((word, index) =>\n\t\t\t\t\tindex === 0\n\t\t\t\t\t\t? word.toLowerCase()\n\t\t\t\t\t\t: word.charAt(0).toUpperCase() + word.slice(1).toLowerCase(),\n\t\t\t\t)\n\t\t\t\t.join(\"\");\n\t\tcase \"kebabCase\":\n\t\t\treturn words.map((word) => word.toLowerCase()).join(\"-\");\n\t\tcase \"snakeCase\":\n\t\t\treturn words.map((word) => word.toLowerCase()).join(\"_\");\n\t\tcase \"pascalCase\":\n\t\t\treturn words\n\t\t\t\t.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n\t\t\t\t.join(\"\");\n\t\tcase \"titleCase\":\n\t\t\treturn words\n\t\t\t\t.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n\t\t\t\t.join(\" \");\n\t\tdefault:\n\t\t\treturn str;\n\t}\n}\n","import type { ILankaLocator } from \"../../_interfaces/ILankaLocator\";\nimport { caseConvert } from \"../../../_internal/case-convert/caseConvert\";\n\n/**\n * Base locator configuration.\n */\nexport interface ILankaLocatorConfig<TInstance> {\n\t/** How to find a constructor by class name. */\n\tfindClassByName: (name: string) => (new () => TInstance) | undefined;\n\t/** How to create an object from a constructor. */\n\tcreateInstance?: (Class: new () => TInstance) => TInstance;\n\t/** Custom resolution by name, when the ordinary one is not enough. */\n\tgetInstanceByName?: (name: string) => TInstance | undefined;\n\t/** What to say when there is no such object. */\n\tnotFoundError?: (name: string, propertyName: string) => string;\n}\n\n/**\n * The locator base: resolves objects by property name (camelCase), translating\n * it into a class name (PascalCase).\n *\n * Handles what every locator shares — name translation, construction on first\n * use from the barrel's exports, and caching what was constructed.\n */\nexport abstract class ALankaLocator<TInstance> implements ILankaLocator<TInstance> {\n\tprotected readonly instanceCache: Map<string, TInstance> = new Map();\n\tprotected readonly registeredClasses: Map<string, new () => TInstance> = new Map();\n\tprotected readonly registeredInstances: Map<string, TInstance> = new Map();\n\tprotected readonly config: ILankaLocatorConfig<TInstance> & {\n\t\tcreateInstance: (Class: new () => TInstance) => TInstance;\n\t\tnotFoundError: (name: string, propertyName: string) => string;\n\t};\n\n\tprotected constructor(config: ILankaLocatorConfig<TInstance>) {\n\t\t// The defaults are applied AFTER the spread, so an explicit `undefined` —\n\t\t// which a caller forwarding its own optional config passes — falls back\n\t\t// instead of removing the only thing that can construct an instance.\n\t\tthis.config = {\n\t\t\t...config,\n\t\t\tcreateInstance: config.createInstance ?? ((Class) => new Class()),\n\t\t\tnotFoundError:\n\t\t\t\tconfig.notFoundError ??\n\t\t\t\t((name, propertyName) =>\n\t\t\t\t\t`Instance \"${name}\" (accessed as \"${propertyName}\") not found.`),\n\t\t};\n\t}\n\n\t/**\n\t * The class a name resolves to: hand-registered FIRST, then the consumer's\n\t * barrel.\n\t *\n\t * One owner for both callers, and that is the whole point of it existing.\n\t * `registeredClasses` used to be read inside each locator's own\n\t * `findClassByName`, and only two of the four did it — singletons and shared\n\t * stores worked, gateways and scenarios silently dropped the class. Moving the\n\t * read into `getInstanceByName` fixed those two and broke a third path:\n\t * `LankaSingletonLocator.createScopedInstance` calls `findClassByName`\n\t * directly, so a registered class stopped resolving inside a scope. Ten tests\n\t * said so.\n\t *\n\t * Both callers go through here now. A fourth caller added later gets the\n\t * precedence for free instead of having to remember it.\n\t *\n\t * The precedence itself matches `registeredInstances` below: what a caller\n\t * handed over wins over what the barrel happens to export under that name,\n\t * because the caller is usually a test substituting a double.\n\t */\n\tprotected classFor(instanceName: string): (new () => TInstance) | undefined {\n\t\treturn (\n\t\t\tthis.registeredClasses.get(instanceName) ?? this.config.findClassByName(instanceName)\n\t\t);\n\t}\n\n\t/**\n\t * An object by class name.\n\t *\n\t * The cache first, then custom resolution when configured, and only then\n\t * construction.\n\t */\n\tprotected getInstanceByName(instanceName: string): TInstance | undefined {\n\t\tif (this.instanceCache.has(instanceName)) {\n\t\t\treturn this.instanceCache.get(instanceName);\n\t\t}\n\n\t\t// What was handed to us already built. Ahead of the barrel, and ahead of\n\t\t// custom resolution: a test's double must win over what the barrel exports.\n\t\tif (this.registeredInstances.has(instanceName)) {\n\t\t\treturn this.registeredInstances.get(instanceName);\n\t\t}\n\n\t\t// Custom resolution when configured.\n\t\tif (this.config.getInstanceByName) {\n\t\t\tconst instance = this.config.getInstanceByName(instanceName);\n\t\t\tif (instance) {\n\t\t\t\tthis.instanceCache.set(instanceName, instance);\n\t\t\t\treturn instance;\n\t\t\t}\n\t\t}\n\n\t\t// Otherwise find the class and construct.\n\t\tconst Class = this.classFor(instanceName);\n\t\tif (Class) {\n\t\t\tconst instance = this.config.createInstance(Class);\n\t\t\tthis.instanceCache.set(instanceName, instance);\n\t\t\treturn instance;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * An object by property name (camelCase).\n\t *\n\t * Throws when there is none: a silent `undefined` would surface layers later.\n\t */\n\tpublic get(propertyName: string): TInstance {\n\t\tconst instanceName = caseConvert(propertyName, \"pascalCase\");\n\t\tconst instance = this.getInstanceByName(instanceName);\n\n\t\tif (!instance) {\n\t\t\tthrow new Error(this.config.notFoundError(instanceName, propertyName));\n\t\t}\n\n\t\treturn instance;\n\t}\n\n\t/**\n\t * Clears the instance cache. Required by tests.\n\t */\n\tpublic clearCache(): void {\n\t\tthis.instanceCache.clear();\n\t}\n\n\t// ── Registration by hand ─────────────────────────────────────────────────\n\t//\n\t// Every locator needs it, for the same two reasons: a test supplies a double,\n\t// and an application supplies an object it built itself. It lives here rather\n\t// than in each locator because three copies of four one-line methods are three\n\t// places for the cache invalidation to be forgotten.\n\n\t/**\n\t * Registers a class by hand, ahead of the consumer's barrel.\n\t *\n\t * The cache entry is dropped: what it holds was built from the previous class.\n\t */\n\tpublic register(className: string, Class: new () => TInstance): void {\n\t\tthis.registeredClasses.set(className, Class);\n\t\tthis.instanceCache.delete(className);\n\t}\n\n\t/**\n\t * Registers an already-built object by hand.\n\t *\n\t * It goes straight into the cache: there is nothing left to construct, and a\n\t * later lookup must not build a rival.\n\t */\n\tpublic registerInstance(className: string, instance: TInstance): void {\n\t\tthis.registeredInstances.set(className, instance);\n\t\tthis.instanceCache.set(className, instance);\n\t}\n\n\t/** Removes a class or object registered by hand, and what was built from it. */\n\tpublic unregister(className: string): void {\n\t\tthis.registeredClasses.delete(className);\n\t\tthis.registeredInstances.delete(className);\n\t\tthis.instanceCache.delete(className);\n\t}\n\n\t/** Whether this name resolves to anything the locator already holds. */\n\tpublic isRegistered(className: string): boolean {\n\t\treturn (\n\t\t\tthis.registeredClasses.has(className) ||\n\t\t\tthis.registeredInstances.has(className) ||\n\t\t\tthis.instanceCache.has(className)\n\t\t);\n\t}\n}\n"],"mappings":";AAAO,SAAS,YACf,KACA,QACS;AACT,MAAI,CAAC,OAAO,OAAO,QAAQ,SAAU,QAAO;AAE5C,QAAM,QAAQ,IACZ,QAAQ,YAAY,KAAK,EACzB,KAAK,EACL,MAAM,SAAS,EACf,OAAO,CAAC,SAAS,IAAI;AAEvB,UAAQ,QAAQ;AAAA,IAC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AAoB,IAAI,WAAW,QAAQ;AAChD,SAAK,cAAc,IAAI,WAAW,QAAQ;AAAA,EAC3C;AAAA;AAAA,EAGO,WAAW,WAAyB;AAC1C,SAAK,kBAAkB,OAAO,SAAS;AACvC,SAAK,oBAAoB,OAAO,SAAS;AACzC,SAAK,cAAc,OAAO,SAAS;AAAA,EACpC;AAAA;AAAA,EAGO,aAAa,WAA4B;AAC/C,WACC,KAAK,kBAAkB,IAAI,SAAS,KACpC,KAAK,oBAAoB,IAAI,SAAS,KACtC,KAAK,cAAc,IAAI,SAAS;AAAA,EAElC;AACD;","names":[]}
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import {
|
|
2
|
+
lankaLogger
|
|
3
|
+
} from "./chunk-FII3PW2G.js";
|
|
4
|
+
import {
|
|
5
|
+
requireActiveRuntime
|
|
6
|
+
} from "./chunk-XGMXT4XZ.js";
|
|
7
|
+
|
|
8
|
+
// src/scenario/event-bus/_facades/lanka-event-bus/lankaEventBus.ts
|
|
9
|
+
var bus = () => requireActiveRuntime().eventBus;
|
|
10
|
+
var lankaEventBus = Object.freeze({
|
|
11
|
+
enableLogs: () => {
|
|
12
|
+
bus().enableLogs();
|
|
13
|
+
},
|
|
14
|
+
disableLogs: () => {
|
|
15
|
+
bus().disableLogs();
|
|
16
|
+
},
|
|
17
|
+
registerEvent: (eventType, metadata) => {
|
|
18
|
+
bus().registerEvent(eventType, metadata);
|
|
19
|
+
},
|
|
20
|
+
getRegisteredEvents: () => bus().getRegisteredEvents(),
|
|
21
|
+
getEventInfo: (eventType) => bus().getEventInfo(eventType),
|
|
22
|
+
getSubscriptions: (eventType) => bus().getSubscriptions(eventType),
|
|
23
|
+
subscribe: (eventType, callback, options) => bus().subscribe(eventType, callback, options),
|
|
24
|
+
unsubscribe: (eventType, callback) => {
|
|
25
|
+
bus().unsubscribe(eventType, callback);
|
|
26
|
+
},
|
|
27
|
+
dispatch: (eventType, data, usedBy) => {
|
|
28
|
+
bus().dispatch(eventType, data, usedBy);
|
|
29
|
+
},
|
|
30
|
+
addMiddleware: (middleware) => {
|
|
31
|
+
bus().addMiddleware(middleware);
|
|
32
|
+
},
|
|
33
|
+
removeMiddleware: (middleware) => {
|
|
34
|
+
bus().removeMiddleware(middleware);
|
|
35
|
+
},
|
|
36
|
+
addObserver: (observer) => {
|
|
37
|
+
bus().addObserver(observer);
|
|
38
|
+
},
|
|
39
|
+
removeObserver: (observer) => {
|
|
40
|
+
bus().removeObserver(observer);
|
|
41
|
+
},
|
|
42
|
+
getEventLogs: (eventType, limit = 100) => bus().getEventLogs(eventType, limit),
|
|
43
|
+
clearEvent: (eventType) => {
|
|
44
|
+
bus().clearEvent(eventType);
|
|
45
|
+
},
|
|
46
|
+
clearAllEvents: () => {
|
|
47
|
+
bus().clearAllEvents();
|
|
48
|
+
},
|
|
49
|
+
reset: () => {
|
|
50
|
+
bus().reset();
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// src/scenario/_registries/lanka-scenario-vm-registry/LankaScenarioVMRegistry.ts
|
|
55
|
+
var LankaScenarioVMRegistry = class {
|
|
56
|
+
registeredViewModels = /* @__PURE__ */ new Set();
|
|
57
|
+
/**
|
|
58
|
+
* Public: the registry belongs to a framework instance rather than to the
|
|
59
|
+
* module.
|
|
60
|
+
*/
|
|
61
|
+
constructor() {
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The active instance's registry, for callers that cannot hold one — the
|
|
65
|
+
* static `LankaScenarioBootstrap`. Instance holders read `lanka.viewModels`.
|
|
66
|
+
*/
|
|
67
|
+
static getInstance() {
|
|
68
|
+
return requireActiveRuntime().viewModels;
|
|
69
|
+
}
|
|
70
|
+
/** Whether this ViewModel is already registered. */
|
|
71
|
+
isRegistered(viewModel) {
|
|
72
|
+
return this.registeredViewModels.has(viewModel);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Registers a ViewModel.
|
|
76
|
+
*
|
|
77
|
+
* @returns `false` when it was already registered
|
|
78
|
+
*/
|
|
79
|
+
register(viewModel) {
|
|
80
|
+
if (this.registeredViewModels.has(viewModel)) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
this.registeredViewModels.add(viewModel);
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
/** Removes a ViewModel from the registry. */
|
|
87
|
+
unregister(viewModel) {
|
|
88
|
+
this.registeredViewModels.delete(viewModel);
|
|
89
|
+
}
|
|
90
|
+
/** Every registered ViewModel. */
|
|
91
|
+
getAllViewModels() {
|
|
92
|
+
return Array.from(this.registeredViewModels);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Clears every registered ViewModel. Required by tests.
|
|
96
|
+
*/
|
|
97
|
+
clear() {
|
|
98
|
+
this.registeredViewModels.clear();
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Unsubscribes every registered ViewModel from its scenarios and clears the
|
|
102
|
+
* registry.
|
|
103
|
+
*
|
|
104
|
+
* Without it tests are not isolated: a subscription leaks from test to test.
|
|
105
|
+
*/
|
|
106
|
+
resetAll() {
|
|
107
|
+
this.registeredViewModels.forEach((vm) => {
|
|
108
|
+
try {
|
|
109
|
+
vm.resetScenario();
|
|
110
|
+
} catch {
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
this.clear();
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// src/scenario/_registries/lanka-scenarios-registry/LankaScenariosRegistry.ts
|
|
118
|
+
var release = (scenario) => {
|
|
119
|
+
if (!scenario.cleanup) return;
|
|
120
|
+
try {
|
|
121
|
+
scenario.cleanup();
|
|
122
|
+
} catch (error) {
|
|
123
|
+
lankaLogger.printScenarioLog(`Error cleaning up scenario "${scenario.name}":`, error);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
var LankaScenariosRegistry = class {
|
|
127
|
+
registeredScenarios = /* @__PURE__ */ new Map();
|
|
128
|
+
scenarioMetadata = /* @__PURE__ */ new Map();
|
|
129
|
+
/**
|
|
130
|
+
* Public: the registry belongs to a framework instance rather than to the
|
|
131
|
+
* module.
|
|
132
|
+
*/
|
|
133
|
+
constructor() {
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The active instance's registry, for callers that cannot hold one:
|
|
137
|
+
* `ALankaScenario` (a base class the consumer extends) and the static
|
|
138
|
+
* `LankaScenarioBootstrap`. Instance holders read `lanka.scenarios`.
|
|
139
|
+
*/
|
|
140
|
+
static getInstance() {
|
|
141
|
+
return requireActiveRuntime().scenarios;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Registers a scenario by hand.
|
|
145
|
+
*
|
|
146
|
+
* @param scenario What to register
|
|
147
|
+
* @returns `false` when it was already registered
|
|
148
|
+
*/
|
|
149
|
+
register(scenario) {
|
|
150
|
+
if (this.registeredScenarios.has(scenario.name)) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
this.registeredScenarios.set(scenario.name, scenario);
|
|
154
|
+
this.scenarioMetadata.set(scenario.name, {
|
|
155
|
+
scenario,
|
|
156
|
+
name: scenario.name,
|
|
157
|
+
eventType: scenario.eventType,
|
|
158
|
+
dataTypeName: scenario.dataTypeName,
|
|
159
|
+
isRegistered: true
|
|
160
|
+
});
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Removes a scenario, calling its `cleanup` if it declared one.
|
|
165
|
+
*
|
|
166
|
+
* @param scenarioName Name of the scenario to unregister
|
|
167
|
+
* @returns true if unregistered successfully, false if not found
|
|
168
|
+
*/
|
|
169
|
+
unregister(scenarioName) {
|
|
170
|
+
const scenario = this.registeredScenarios.get(scenarioName);
|
|
171
|
+
if (!scenario) {
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
const metadata = this.scenarioMetadata.get(scenarioName);
|
|
175
|
+
if (metadata) {
|
|
176
|
+
metadata.isRegistered = false;
|
|
177
|
+
}
|
|
178
|
+
this.registeredScenarios.delete(scenarioName);
|
|
179
|
+
release(scenario);
|
|
180
|
+
return true;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Get metadata for a specific scenario
|
|
184
|
+
* @param scenarioName Name of the scenario
|
|
185
|
+
* @returns Scenario metadata or undefined if not found
|
|
186
|
+
*/
|
|
187
|
+
getMetadata(scenarioName) {
|
|
188
|
+
return this.scenarioMetadata.get(scenarioName);
|
|
189
|
+
}
|
|
190
|
+
/** Every registered scenario. */
|
|
191
|
+
getAllScenarios() {
|
|
192
|
+
return Array.from(this.registeredScenarios.values());
|
|
193
|
+
}
|
|
194
|
+
/** Metadata of every scenario. */
|
|
195
|
+
getAllMetadata() {
|
|
196
|
+
return Array.from(this.scenarioMetadata.values());
|
|
197
|
+
}
|
|
198
|
+
/** Whether a scenario with this name is registered. */
|
|
199
|
+
isRegistered(scenarioName) {
|
|
200
|
+
return this.registeredScenarios.has(scenarioName);
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Collects every scenario that registered itself at construction.
|
|
204
|
+
*/
|
|
205
|
+
collectAutoRegisteredScenarios() {
|
|
206
|
+
const autoRegistered = ALankaScenario.getAutoRegisteredScenarios();
|
|
207
|
+
autoRegistered.forEach((scenario) => {
|
|
208
|
+
if (!this.registeredScenarios.has(scenario.name)) {
|
|
209
|
+
this.register(scenario);
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* A scenario by name.
|
|
215
|
+
*
|
|
216
|
+
* @returns `undefined` when there is none
|
|
217
|
+
*/
|
|
218
|
+
getScenarioByName(scenarioName) {
|
|
219
|
+
return this.registeredScenarios.get(scenarioName);
|
|
220
|
+
}
|
|
221
|
+
/** Every registered ViewModel. */
|
|
222
|
+
getAllViewModels() {
|
|
223
|
+
return LankaScenarioVMRegistry.getInstance().getAllViewModels();
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Removes every scenario, calling each one's `cleanup`.
|
|
227
|
+
*
|
|
228
|
+
* What `dispose()` and the between-tests reset go through: `initialize` ran
|
|
229
|
+
* for every scenario at bootstrap, and this is the one moment its mirror
|
|
230
|
+
* image can run for all of them.
|
|
231
|
+
*/
|
|
232
|
+
clear() {
|
|
233
|
+
const scenarios = [...this.registeredScenarios.values()];
|
|
234
|
+
this.registeredScenarios.clear();
|
|
235
|
+
this.scenarioMetadata.clear();
|
|
236
|
+
for (const scenario of scenarios) release(scenario);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
// src/scenario/_abstractions/lanka-scenario/ALankaScenario.ts
|
|
241
|
+
var ALankaScenario = class _ALankaScenario {
|
|
242
|
+
/** A subclass sets this to opt out of self-registration. */
|
|
243
|
+
static skipAutoRegistration;
|
|
244
|
+
/**
|
|
245
|
+
* The self-registration pool.
|
|
246
|
+
*
|
|
247
|
+
* Class-level deliberately: a registry of DEFINITIONS, not runtime state. The
|
|
248
|
+
* classes come from one barrel and both framework instances must see the same
|
|
249
|
+
* list — splitting it would be divergence, not isolation.
|
|
250
|
+
*/
|
|
251
|
+
static autoRegisteredScenarios = /* @__PURE__ */ new Set();
|
|
252
|
+
/** Registers the scenario itself unless the subclass opted out. */
|
|
253
|
+
constructor() {
|
|
254
|
+
const constructor = this.constructor;
|
|
255
|
+
if (!constructor.skipAutoRegistration) {
|
|
256
|
+
_ALankaScenario.autoRegisteredScenarios.add(this);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Every scenario that registered itself.
|
|
261
|
+
*
|
|
262
|
+
* @internal
|
|
263
|
+
*/
|
|
264
|
+
static getAutoRegisteredScenarios() {
|
|
265
|
+
return Array.from(_ALankaScenario.autoRegisteredScenarios);
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Clears the auto-registration pool. Required by tests.
|
|
269
|
+
* @internal
|
|
270
|
+
*/
|
|
271
|
+
static clearAutoRegisteredScenarios() {
|
|
272
|
+
_ALankaScenario.autoRegisteredScenarios.clear();
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Registers the scenario by hand.
|
|
276
|
+
*
|
|
277
|
+
* @returns `false` when it was already registered
|
|
278
|
+
*/
|
|
279
|
+
register() {
|
|
280
|
+
return LankaScenariosRegistry.getInstance().register(this);
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Removes the scenario from the registry.
|
|
284
|
+
*
|
|
285
|
+
* @returns `false` when it was not there
|
|
286
|
+
*/
|
|
287
|
+
unregister() {
|
|
288
|
+
return LankaScenariosRegistry.getInstance().unregister(this.name);
|
|
289
|
+
}
|
|
290
|
+
trigger(data) {
|
|
291
|
+
lankaLogger.printScenarioLog("TRIGGER Scenario", this.name, data);
|
|
292
|
+
lankaEventBus.dispatch(this.eventType, data, this.name);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Subscribes a handler and returns an unsubscribe function.
|
|
296
|
+
*
|
|
297
|
+
* Without the return, unsubscribing is possible only by callback identity, and
|
|
298
|
+
* every ViewModel factory has to keep a map of references for it.
|
|
299
|
+
*/
|
|
300
|
+
subscribe(callback, options) {
|
|
301
|
+
lankaLogger.printScenarioLog("SUBSCRIBE Scenario", this.name, this.dataTypeName);
|
|
302
|
+
return lankaEventBus.subscribe(this.eventType, callback, {
|
|
303
|
+
...options,
|
|
304
|
+
usedBy: options?.usedBy ?? this.name
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
export {
|
|
310
|
+
lankaEventBus,
|
|
311
|
+
ALankaScenario,
|
|
312
|
+
LankaScenarioVMRegistry,
|
|
313
|
+
LankaScenariosRegistry
|
|
314
|
+
};
|
|
315
|
+
//# sourceMappingURL=chunk-NWEHOMTS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/scenario/event-bus/_facades/lanka-event-bus/lankaEventBus.ts","../src/scenario/_registries/lanka-scenario-vm-registry/LankaScenarioVMRegistry.ts","../src/scenario/_registries/lanka-scenarios-registry/LankaScenariosRegistry.ts","../src/scenario/_abstractions/lanka-scenario/ALankaScenario.ts"],"sourcesContent":["import { requireActiveRuntime } from \"../../../../_internal/active-runtime/activeRuntime\";\nimport type { ILankaEventLog } from \"../../../_interfaces/ILankaEventLog\";\nimport type { ILankaEventMetadata } from \"../../../_interfaces/ILankaEventMetadata\";\nimport type { TLankaEventBusMiddleware } from \"../../../_types/TLankaEventBusMiddleware\";\nimport type { TLankaEventBusObserver } from \"../../../_types/TLankaEventBusObserver\";\nimport type { LankaEventBusInstance } from \"../../lanka-event-bus-instance/LankaEventBusInstance\";\nimport type { TLankaReplayRequest } from \"../../lanka-event-bus-instance/LankaEventBusInstance\";\n\n/**\n * Ambient bus: the active instance's, reachable without holding it.\n *\n * Every member is one line of delegation and that is all this does. It exists\n * for callers that cannot hold an instance — a user-extended `ALankaScenario`,\n * the scenario bootstrap.\n *\n * An object rather than a class with a default instance, and the difference is\n * not cosmetic: this owns no state, so a second one would delegate to the same\n * runtime and be the same object under another name. Where an ambient DOES own\n * state — storage — the class is real and a second instance means something.\n *\n * Isolation belongs to the instance holder: `lanka.eventBus.dispatch(…)`. This\n * cannot offer it — by definition it serves the ONE active instance, so two\n * instances in one process share nothing through it.\n */\nconst bus = (): LankaEventBusInstance => requireActiveRuntime().eventBus;\n\nexport const lankaEventBus = Object.freeze({\n\tenableLogs: (): void => {\n\t\tbus().enableLogs();\n\t},\n\n\tdisableLogs: (): void => {\n\t\tbus().disableLogs();\n\t},\n\n\tregisterEvent: (eventType: string, metadata: ILankaEventMetadata): void => {\n\t\tbus().registerEvent(eventType, metadata);\n\t},\n\n\tgetRegisteredEvents: () => bus().getRegisteredEvents(),\n\n\tgetEventInfo: (eventType: string): ILankaEventMetadata | null => bus().getEventInfo(eventType),\n\n\tgetSubscriptions: (eventType: string): number => bus().getSubscriptions(eventType),\n\n\tsubscribe: <T>(\n\t\teventType: string,\n\t\tcallback: (data: T) => void,\n\t\toptions?: { priority?: number; replay?: TLankaReplayRequest; usedBy?: string },\n\t): (() => void) => bus().subscribe(eventType, callback, options),\n\n\tunsubscribe: <T>(eventType: string, callback: (data: T) => void): void => {\n\t\tbus().unsubscribe(eventType, callback);\n\t},\n\n\tdispatch: <T>(eventType: string, data?: T, usedBy?: string): void => {\n\t\tbus().dispatch(eventType, data, usedBy);\n\t},\n\n\taddMiddleware: <T>(middleware: TLankaEventBusMiddleware<T>): void => {\n\t\tbus().addMiddleware(middleware);\n\t},\n\n\tremoveMiddleware: <T>(middleware: TLankaEventBusMiddleware<T>): void => {\n\t\tbus().removeMiddleware(middleware);\n\t},\n\n\taddObserver: (observer: TLankaEventBusObserver): void => {\n\t\tbus().addObserver(observer);\n\t},\n\n\tremoveObserver: (observer: TLankaEventBusObserver): void => {\n\t\tbus().removeObserver(observer);\n\t},\n\n\tgetEventLogs: (eventType?: string, limit = 100): ILankaEventLog[] =>\n\t\tbus().getEventLogs(eventType, limit),\n\n\tclearEvent: (eventType: string): void => {\n\t\tbus().clearEvent(eventType);\n\t},\n\n\tclearAllEvents: (): void => {\n\t\tbus().clearAllEvents();\n\t},\n\n\treset: (): void => {\n\t\tbus().reset();\n\t},\n});\n","import { requireActiveRuntime } from \"../../../_internal/active-runtime/activeRuntime\";\nimport { ILankaScenarioVM } from \"../../_interfaces/ILankaScenarioVM\";\n\n/**\n * The registry of ViewModels that use scenarios.\n *\n * They arrive by themselves: the factory registers a ViewModel when it declares\n * scenario handlers.\n */\nexport class LankaScenarioVMRegistry {\n\tprivate registeredViewModels: Set<ILankaScenarioVM> = new Set();\n\n\t/**\n\t * Public: the registry belongs to a framework instance rather than to the\n\t * module.\n\t */\n\tpublic constructor() {}\n\n\t/**\n\t * The active instance's registry, for callers that cannot hold one — the\n\t * static `LankaScenarioBootstrap`. Instance holders read `lanka.viewModels`.\n\t */\n\tpublic static getInstance(): LankaScenarioVMRegistry {\n\t\treturn requireActiveRuntime().viewModels;\n\t}\n\n\t/** Whether this ViewModel is already registered. */\n\tpublic isRegistered(viewModel: ILankaScenarioVM): boolean {\n\t\treturn this.registeredViewModels.has(viewModel);\n\t}\n\n\t/**\n\t * Registers a ViewModel.\n\t *\n\t * @returns `false` when it was already registered\n\t */\n\tpublic register(viewModel: ILankaScenarioVM): boolean {\n\t\tif (this.registeredViewModels.has(viewModel)) {\n\t\t\treturn false;\n\t\t}\n\t\tthis.registeredViewModels.add(viewModel);\n\t\treturn true;\n\t}\n\n\t/** Removes a ViewModel from the registry. */\n\tpublic unregister(viewModel: ILankaScenarioVM): void {\n\t\tthis.registeredViewModels.delete(viewModel);\n\t}\n\n\t/** Every registered ViewModel. */\n\tpublic getAllViewModels(): ILankaScenarioVM[] {\n\t\treturn Array.from(this.registeredViewModels);\n\t}\n\n\t/**\n\t * Clears every registered ViewModel. Required by tests.\n\t */\n\tpublic clear(): void {\n\t\tthis.registeredViewModels.clear();\n\t}\n\n\t/**\n\t * Unsubscribes every registered ViewModel from its scenarios and clears the\n\t * registry.\n\t *\n\t * Without it tests are not isolated: a subscription leaks from test to test.\n\t */\n\tpublic resetAll(): void {\n\t\tthis.registeredViewModels.forEach((vm) => {\n\t\t\ttry {\n\t\t\t\tvm.resetScenario();\n\t\t\t} catch {\n\t\t\t\t// One failing to reset is no reason to fail the rest.\n\t\t\t}\n\t\t});\n\t\tthis.clear();\n\t}\n}\n","import { requireActiveRuntime } from \"../../../_internal/active-runtime/activeRuntime\";\nimport { ILankaScenario } from \"../../_interfaces/ILankaScenario\";\nimport { ALankaScenario } from \"../../_abstractions/lanka-scenario/ALankaScenario\";\nimport { ILankaScenarioVM } from \"../../_interfaces/ILankaScenarioVM\";\nimport { LankaScenarioVMRegistry } from \"../lanka-scenario-vm-registry/LankaScenarioVMRegistry\";\nimport { lankaLogger } from \"../../../logger/lanka-logger/LankaLogger\";\nimport type { ILankaScenarioMetadata } from \"../../_interfaces/ILankaScenarioMetadata\";\n\n/**\n * Runs a scenario's `cleanup`, if it declared one, and contains what it throws.\n *\n * `ILankaScenario` promises `cleanup` is \"called when the scenario is removed\n * from the registry\", and for a long time nothing called it: a scenario whose\n * `initialize` opened something had no way to close it, and the promise read\n * as kept. Contained, because a removal runs over MANY scenarios — on dispose,\n * on the between-tests reset — and one failing to let go is no reason to leave\n * the rest registered.\n */\nconst release = (scenario: ILankaScenario<unknown>): void => {\n\tif (!scenario.cleanup) return;\n\ttry {\n\t\tscenario.cleanup();\n\t} catch (error) {\n\t\tlankaLogger.printScenarioLog(`Error cleaning up scenario \"${scenario.name}\":`, error);\n\t}\n};\n\n/**\n * The scenario registry: both those that registered themselves and those\n * registered by hand.\n *\n * `ALankaScenario` subclasses arrive here automatically unless they opted out.\n */\nexport class LankaScenariosRegistry {\n\tprivate registeredScenarios: Map<string, ILankaScenario<unknown>> = new Map();\n\tprivate scenarioMetadata: Map<string, ILankaScenarioMetadata> = new Map();\n\n\t/**\n\t * Public: the registry belongs to a framework instance rather than to the\n\t * module.\n\t */\n\tpublic constructor() {}\n\n\t/**\n\t * The active instance's registry, for callers that cannot hold one:\n\t * `ALankaScenario` (a base class the consumer extends) and the static\n\t * `LankaScenarioBootstrap`. Instance holders read `lanka.scenarios`.\n\t */\n\tpublic static getInstance(): LankaScenariosRegistry {\n\t\treturn requireActiveRuntime().scenarios;\n\t}\n\n\t/**\n\t * Registers a scenario by hand.\n\t *\n\t * @param scenario What to register\n\t * @returns `false` when it was already registered\n\t */\n\tpublic register(scenario: ILankaScenario<unknown>): boolean {\n\t\tif (this.registeredScenarios.has(scenario.name)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.registeredScenarios.set(scenario.name, scenario);\n\t\tthis.scenarioMetadata.set(scenario.name, {\n\t\t\tscenario,\n\t\t\tname: scenario.name,\n\t\t\teventType: scenario.eventType,\n\t\t\tdataTypeName: scenario.dataTypeName,\n\t\t\tisRegistered: true,\n\t\t});\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Removes a scenario, calling its `cleanup` if it declared one.\n\t *\n\t * @param scenarioName Name of the scenario to unregister\n\t * @returns true if unregistered successfully, false if not found\n\t */\n\tpublic unregister(scenarioName: string): boolean {\n\t\tconst scenario = this.registeredScenarios.get(scenarioName);\n\t\tif (!scenario) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst metadata = this.scenarioMetadata.get(scenarioName);\n\t\tif (metadata) {\n\t\t\tmetadata.isRegistered = false;\n\t\t}\n\n\t\tthis.registeredScenarios.delete(scenarioName);\n\t\trelease(scenario);\n\t\treturn true;\n\t}\n\n\t/**\n\t * Get metadata for a specific scenario\n\t * @param scenarioName Name of the scenario\n\t * @returns Scenario metadata or undefined if not found\n\t */\n\tpublic getMetadata(scenarioName: string): ILankaScenarioMetadata | undefined {\n\t\treturn this.scenarioMetadata.get(scenarioName);\n\t}\n\n\t/** Every registered scenario. */\n\tpublic getAllScenarios(): ILankaScenario<unknown>[] {\n\t\treturn Array.from(this.registeredScenarios.values());\n\t}\n\n\t/** Metadata of every scenario. */\n\tpublic getAllMetadata(): ILankaScenarioMetadata[] {\n\t\treturn Array.from(this.scenarioMetadata.values());\n\t}\n\n\t/** Whether a scenario with this name is registered. */\n\tpublic isRegistered(scenarioName: string): boolean {\n\t\treturn this.registeredScenarios.has(scenarioName);\n\t}\n\n\t/**\n\t * Collects every scenario that registered itself at construction.\n\t */\n\tpublic collectAutoRegisteredScenarios(): void {\n\t\t// Take those that registered themselves at construction.\n\t\tconst autoRegistered = ALankaScenario.getAutoRegisteredScenarios();\n\t\tautoRegistered.forEach((scenario) => {\n\t\t\tif (!this.registeredScenarios.has(scenario.name)) {\n\t\t\t\tthis.register(scenario);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * A scenario by name.\n\t *\n\t * @returns `undefined` when there is none\n\t */\n\tpublic getScenarioByName(scenarioName: string): ILankaScenario<unknown> | undefined {\n\t\treturn this.registeredScenarios.get(scenarioName);\n\t}\n\n\t/** Every registered ViewModel. */\n\tpublic getAllViewModels(): ILankaScenarioVM[] {\n\t\treturn LankaScenarioVMRegistry.getInstance().getAllViewModels();\n\t}\n\n\t/**\n\t * Removes every scenario, calling each one's `cleanup`.\n\t *\n\t * What `dispose()` and the between-tests reset go through: `initialize` ran\n\t * for every scenario at bootstrap, and this is the one moment its mirror\n\t * image can run for all of them.\n\t */\n\tpublic clear(): void {\n\t\tconst scenarios = [...this.registeredScenarios.values()];\n\t\tthis.registeredScenarios.clear();\n\t\tthis.scenarioMetadata.clear();\n\t\tfor (const scenario of scenarios) release(scenario);\n\t}\n}\n","import type { TLankaReplayRequest } from \"../../event-bus/lanka-event-bus-instance/LankaEventBusInstance\";\nimport { ILankaScenario } from \"../../_interfaces/ILankaScenario\";\nimport { LankaScenariosRegistry } from \"../../_registries/lanka-scenarios-registry/LankaScenariosRegistry\";\nimport { lankaLogger } from \"../../../logger/lanka-logger/LankaLogger\";\nimport { lankaEventBus } from \"../../event-bus/_facades/lanka-event-bus/lankaEventBus\";\n\n/**\n * The base of a scenario — a named unit of coordination over the event bus.\n *\n * A subclass declares `name`, `eventType` and `dataTypeName`, calls `trigger()`\n * when the event happens, and ViewModels subscribe to it and unsubscribe.\n *\n * Scenarios register THEMSELVES unless the subclass sets the static\n * `skipAutoRegistration`.\n *\n * ```ts\n * export class SessionUpdated extends ALankaScenario<TSession> {\n * readonly name = \"SessionUpdated\";\n * readonly eventType = \"session.updated\";\n * readonly dataTypeName = \"TSession\";\n * }\n * ```\n */\nexport abstract class ALankaScenario<TData = void> implements ILankaScenario<TData> {\n\tabstract readonly name: string;\n\tabstract readonly eventType: string;\n\tabstract readonly dataTypeName: string;\n\n\t/** A subclass sets this to opt out of self-registration. */\n\tstatic skipAutoRegistration?: boolean;\n\n\t/**\n\t * The self-registration pool.\n\t *\n\t * Class-level deliberately: a registry of DEFINITIONS, not runtime state. The\n\t * classes come from one barrel and both framework instances must see the same\n\t * list — splitting it would be divergence, not isolation.\n\t */\n\tprivate static autoRegisteredScenarios: Set<ALankaScenario<unknown>> = new Set();\n\n\t/** Registers the scenario itself unless the subclass opted out. */\n\tconstructor() {\n\t\t// The constructor comes from the actual class, that is the subclass.\n\t\tconst constructor = this.constructor as typeof ALankaScenario;\n\n\t\t// Register unless opted out.\n\t\tif (!constructor.skipAutoRegistration) {\n\t\t\tALankaScenario.autoRegisteredScenarios.add(this);\n\t\t}\n\t}\n\n\t/**\n\t * Every scenario that registered itself.\n\t *\n\t * @internal\n\t */\n\tpublic static getAutoRegisteredScenarios(): ALankaScenario<unknown>[] {\n\t\treturn Array.from(ALankaScenario.autoRegisteredScenarios);\n\t}\n\n\t/**\n\t * Clears the auto-registration pool. Required by tests.\n\t * @internal\n\t */\n\tpublic static clearAutoRegisteredScenarios(): void {\n\t\tALankaScenario.autoRegisteredScenarios.clear();\n\t}\n\n\t/**\n\t * Registers the scenario by hand.\n\t *\n\t * @returns `false` when it was already registered\n\t */\n\tpublic register(): boolean {\n\t\treturn LankaScenariosRegistry.getInstance().register(this);\n\t}\n\n\t/**\n\t * Removes the scenario from the registry.\n\t *\n\t * @returns `false` when it was not there\n\t */\n\tpublic unregister(): boolean {\n\t\treturn LankaScenariosRegistry.getInstance().unregister(this.name);\n\t}\n\n\ttrigger(data?: TData): void {\n\t\tlankaLogger.printScenarioLog(\"TRIGGER Scenario\", this.name, data);\n\t\tlankaEventBus.dispatch(this.eventType, data, this.name);\n\t}\n\n\t/**\n\t * Subscribes a handler and returns an unsubscribe function.\n\t *\n\t * Without the return, unsubscribing is possible only by callback identity, and\n\t * every ViewModel factory has to keep a map of references for it.\n\t */\n\tsubscribe(\n\t\tcallback: (data?: TData) => void,\n\t\toptions?: {\n\t\t\tpriority?: number;\n\t\t\treplay?: TLankaReplayRequest;\n\t\t\tusedBy?: string;\n\t\t},\n\t): () => void {\n\t\tlankaLogger.printScenarioLog(\"SUBSCRIBE Scenario\", this.name, this.dataTypeName);\n\t\treturn lankaEventBus.subscribe(this.eventType, callback, {\n\t\t\t...options,\n\t\t\tusedBy: options?.usedBy ?? this.name,\n\t\t});\n\t}\n}\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AS,IAAI;AAAA,EAC1D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,aAAsB;AAC5B,WAAO,uBAAuB,YAAY,EAAE,WAAW,KAAK,IAAI;AAAA,EACjE;AAAA,EAEA,QAAQ,MAAoB;AAC3B,gBAAY,iBAAiB,oBAAoB,KAAK,MAAM,IAAI;AAChE,kBAAc,SAAS,KAAK,WAAW,MAAM,KAAK,IAAI;AAAA,EACvD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,UACC,UACA,SAKa;AACb,gBAAY,iBAAiB,sBAAsB,KAAK,MAAM,KAAK,YAAY;AAC/E,WAAO,cAAc,UAAU,KAAK,WAAW,UAAU;AAAA,MACxD,GAAG;AAAA,MACH,QAAQ,SAAS,UAAU,KAAK;AAAA,IACjC,CAAC;AAAA,EACF;AACD;","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
caseConvert
|
|
3
|
+
} from "./chunk-N3275IPH.js";
|
|
4
|
+
import {
|
|
5
|
+
lankaLogger
|
|
6
|
+
} from "./chunk-FII3PW2G.js";
|
|
7
|
+
|
|
8
|
+
// src/locator/_factories/create-lanka-scope/createLankaScope.ts
|
|
9
|
+
function createLankaScope(singletons) {
|
|
10
|
+
const instances = /* @__PURE__ */ new Map();
|
|
11
|
+
let disposed = false;
|
|
12
|
+
return {
|
|
13
|
+
resolve(propertyName) {
|
|
14
|
+
if (disposed) {
|
|
15
|
+
throw new Error(
|
|
16
|
+
`The scope is closed: "${propertyName}" can no longer be resolved in it. This is usually a scope reference that outlived the screen that created it.`
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
const className = caseConvert(propertyName, "pascalCase");
|
|
20
|
+
if (instances.has(className)) return instances.get(className);
|
|
21
|
+
const instance = singletons.createScopedInstance(className, propertyName);
|
|
22
|
+
instances.set(className, instance);
|
|
23
|
+
return instance;
|
|
24
|
+
},
|
|
25
|
+
dispose() {
|
|
26
|
+
if (disposed) return;
|
|
27
|
+
disposed = true;
|
|
28
|
+
for (const [name, instance] of instances) {
|
|
29
|
+
const disposable = instance;
|
|
30
|
+
if (typeof disposable.dispose !== "function") continue;
|
|
31
|
+
try {
|
|
32
|
+
disposable.dispose();
|
|
33
|
+
} catch (error) {
|
|
34
|
+
lankaLogger.printBootstrapLog(
|
|
35
|
+
`Failed to dispose "${name}" in the scope`,
|
|
36
|
+
error instanceof Error ? error.message : String(error)
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
instances.clear();
|
|
41
|
+
},
|
|
42
|
+
isDisposed: () => disposed
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
createLankaScope
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=chunk-SBITVBF7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/locator/_factories/create-lanka-scope/createLankaScope.ts"],"sourcesContent":["import { caseConvert } from \"../../../_internal/case-convert/caseConvert\";\nimport { lankaLogger } from \"../../../logger/lanka-logger/LankaLogger\";\nimport type { LankaSingletonLocator } from \"../../singleton/lanka-singleton-locator/LankaSingletonLocator\";\n\n/**\n * A service lifetime other than \"as long as the application lives\".\n *\n * Everything resolved through `lankaSingletons.*` is a singleton for the life of\n * the app. Per-route, per-session and per-modal lifetimes otherwise rest on\n * discipline: every ViewModel calling `resetScenario()` and writing its own\n * `onReset`, in any of which it can be forgotten.\n *\n * A scope provides the same by construction: an object created in it goes away\n * with it, and nobody has to remember.\n *\n * ## What a scope does NOT do\n *\n * It does not shadow root objects and does not take them on close. It takes only\n * ITS OWN — the ones it created. A scope taking others' would be more dangerous\n * than no scopes at all: closing a screen would break the app.\n */\nexport interface ILankaScope {\n\t/** Resolves a service in this scope, creating it on first use. */\n\tresolve<TInstance>(propertyName: string): TInstance;\n\t/** Disposes everything this scope created and closes it. Idempotent. */\n\tdispose(): void;\n\t/** Whether the scope is closed. */\n\tisDisposed(): boolean;\n}\n\n/** A service may have a `dispose` — or may not. */\ninterface IMaybeDisposable {\n\tdispose?: () => void;\n}\n\nexport function createLankaScope(singletons: LankaSingletonLocator): ILankaScope {\n\tconst instances = new Map<string, unknown>();\n\tlet disposed = false;\n\n\treturn {\n\t\tresolve<TInstance>(propertyName: string): TInstance {\n\t\t\tif (disposed) {\n\t\t\t\t// Resolving from a closed scope is almost always a reference leaked from\n\t\t\t\t// an already-unmounted screen. Silently handing out an object would\n\t\t\t\t// extend the life of what was closed, invisibly.\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`The scope is closed: \"${propertyName}\" can no longer be resolved in it. ` +\n\t\t\t\t\t\t`This is usually a scope reference that outlived the screen that created it.`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst className = caseConvert(propertyName, \"pascalCase\");\n\t\t\tif (instances.has(className)) return instances.get(className) as TInstance;\n\n\t\t\t// The class comes from the root locator while the OBJECT is created here:\n\t\t\t// a scope is a different lifetime, not a different set of services.\n\t\t\tconst instance = singletons.createScopedInstance(className, propertyName);\n\t\t\tinstances.set(className, instance);\n\t\t\treturn instance as TInstance;\n\t\t},\n\n\t\tdispose(): void {\n\t\t\tif (disposed) return;\n\t\t\tdisposed = true;\n\n\t\t\tfor (const [name, instance] of instances) {\n\t\t\t\tconst disposable = instance as IMaybeDisposable;\n\t\t\t\tif (typeof disposable.dispose !== \"function\") continue;\n\t\t\t\ttry {\n\t\t\t\t\tdisposable.dispose();\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// One failure must not leave the rest alive: that is exactly what a\n\t\t\t\t\t// scope exists to prevent.\n\t\t\t\t\tlankaLogger.printBootstrapLog(\n\t\t\t\t\t\t`Failed to dispose \"${name}\" in the scope`,\n\t\t\t\t\t\terror instanceof Error ? error.message : String(error),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tinstances.clear();\n\t\t},\n\n\t\tisDisposed: () => disposed,\n\t};\n}\n"],"mappings":";;;;;;;;AAmCO,SAAS,iBAAiB,YAAgD;AAChF,QAAM,YAAY,oBAAI,IAAqB;AAC3C,MAAI,WAAW;AAEf,SAAO;AAAA,IACN,QAAmB,cAAiC;AACnD,UAAI,UAAU;AAIb,cAAM,IAAI;AAAA,UACT,yBAAyB,YAAY;AAAA,QAEtC;AAAA,MACD;AAEA,YAAM,YAAY,YAAY,cAAc,YAAY;AACxD,UAAI,UAAU,IAAI,SAAS,EAAG,QAAO,UAAU,IAAI,SAAS;AAI5D,YAAM,WAAW,WAAW,qBAAqB,WAAW,YAAY;AACxE,gBAAU,IAAI,WAAW,QAAQ;AACjC,aAAO;AAAA,IACR;AAAA,IAEA,UAAgB;AACf,UAAI,SAAU;AACd,iBAAW;AAEX,iBAAW,CAAC,MAAM,QAAQ,KAAK,WAAW;AACzC,cAAM,aAAa;AACnB,YAAI,OAAO,WAAW,YAAY,WAAY;AAC9C,YAAI;AACH,qBAAW,QAAQ;AAAA,QACpB,SAAS,OAAO;AAGf,sBAAY;AAAA,YACX,sBAAsB,IAAI;AAAA,YAC1B,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAAA,UACtD;AAAA,QACD;AAAA,MACD;AAEA,gBAAU,MAAM;AAAA,IACjB;AAAA,IAEA,YAAY,MAAM;AAAA,EACnB;AACD;","names":[]}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
-
LankaGatewayLocator,
|
|
3
|
-
LankaScenarioLocator,
|
|
4
2
|
createLankaScope
|
|
5
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SBITVBF7.js";
|
|
4
|
+
import {
|
|
5
|
+
LankaGatewayLocator
|
|
6
|
+
} from "./chunk-BMF4TM2Z.js";
|
|
7
|
+
import {
|
|
8
|
+
LankaScenarioLocator
|
|
9
|
+
} from "./chunk-42CWYVZJ.js";
|
|
6
10
|
import {
|
|
7
|
-
LankaScenarioVMRegistry,
|
|
8
|
-
LankaScenariosRegistry,
|
|
9
11
|
lankaScenarioBootstrap
|
|
10
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MKKMTLOY.js";
|
|
13
|
+
import {
|
|
14
|
+
LankaScenarioVMRegistry,
|
|
15
|
+
LankaScenariosRegistry
|
|
16
|
+
} from "./chunk-NWEHOMTS.js";
|
|
11
17
|
import {
|
|
12
18
|
createLankaHost
|
|
13
19
|
} from "./chunk-XESL274R.js";
|
|
@@ -15,9 +21,11 @@ import {
|
|
|
15
21
|
createInFlightCounter
|
|
16
22
|
} from "./chunk-BHQ2SQ7P.js";
|
|
17
23
|
import {
|
|
18
|
-
LankaSharedStoreLocator
|
|
24
|
+
LankaSharedStoreLocator
|
|
25
|
+
} from "./chunk-3R2NO47A.js";
|
|
26
|
+
import {
|
|
19
27
|
LankaSingletonLocator
|
|
20
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-24MUFFHF.js";
|
|
21
29
|
import {
|
|
22
30
|
lankaLogger
|
|
23
31
|
} from "./chunk-FII3PW2G.js";
|
|
@@ -727,4 +735,4 @@ export {
|
|
|
727
735
|
resetActiveLanka,
|
|
728
736
|
ALankaPlugin
|
|
729
737
|
};
|
|
730
|
-
//# sourceMappingURL=chunk-
|
|
738
|
+
//# sourceMappingURL=chunk-SO7D5E7O.js.map
|