@dooboostore/simple-web-component 1.0.55 → 1.0.56
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 +34 -0
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +38 -19
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +3 -3
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +38 -19
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +3 -3
- package/lsp/bin/swc-lsp.js +3 -0
- package/lsp/out/server/server.js +9960 -0
- package/lsp/package.json +56 -0
- package/package.json +23 -8
|
@@ -32,9 +32,9 @@ var dooboostoreSimpleWebComponent = (() => {
|
|
|
32
32
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
33
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
34
34
|
|
|
35
|
-
//
|
|
35
|
+
// ../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js
|
|
36
36
|
var require_Reflect = __commonJS({
|
|
37
|
-
"
|
|
37
|
+
"../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js"() {
|
|
38
38
|
var Reflect2;
|
|
39
39
|
(function(Reflect3) {
|
|
40
40
|
(function(factory) {
|
|
@@ -22473,26 +22473,45 @@ ${indentStr}}`;
|
|
|
22473
22473
|
return registed.instance;
|
|
22474
22474
|
}
|
|
22475
22475
|
if (this.storage.has(targetKey) && void 0 === registed?.instance) {
|
|
22476
|
-
newInstanceCarrier.
|
|
22477
|
-
|
|
22478
|
-
|
|
22479
|
-
|
|
22480
|
-
|
|
22481
|
-
|
|
22482
|
-
|
|
22476
|
+
const resolving = newInstanceCarrier.resolving ?? (newInstanceCarrier.resolving = []);
|
|
22477
|
+
if (resolving.includes(targetKey)) {
|
|
22478
|
+
const nameOf = (t) => typeof t === "symbol" ? t.toString() : t?.name ?? String(t);
|
|
22479
|
+
throw new Error(
|
|
22480
|
+
`Circular dependency detected: ${[...resolving.map(nameOf), nameOf(targetKey)].join(" -> ")}`
|
|
22481
|
+
);
|
|
22482
|
+
}
|
|
22483
|
+
resolving.push(targetKey);
|
|
22484
|
+
let settled = false;
|
|
22485
|
+
try {
|
|
22486
|
+
newInstanceCarrier.depth++;
|
|
22487
|
+
const newSim = this.newSim({
|
|
22488
|
+
target: registed?.type ?? targetKey,
|
|
22489
|
+
newInstanceCarrier,
|
|
22490
|
+
simCreateAfter: (data) => {
|
|
22491
|
+
if (getSim(registed?.type ?? target ?? targetKey)?.scope === Lifecycle.Singleton) {
|
|
22492
|
+
this.setStoreSet(targetKey, data, target);
|
|
22493
|
+
}
|
|
22483
22494
|
}
|
|
22484
|
-
}
|
|
22485
|
-
});
|
|
22486
|
-
newInstanceCarrier.depth--;
|
|
22487
|
-
if (newInstanceCarrier.depth === 0) {
|
|
22488
|
-
newInstanceCarrier.newInstances.forEach((it) => {
|
|
22489
|
-
this.callBindPostConstruct(it);
|
|
22490
22495
|
});
|
|
22496
|
+
newInstanceCarrier.depth--;
|
|
22497
|
+
resolving.pop();
|
|
22498
|
+
settled = true;
|
|
22499
|
+
if (newInstanceCarrier.depth === 0) {
|
|
22500
|
+
newInstanceCarrier.newInstances.forEach((it) => {
|
|
22501
|
+
this.callBindPostConstruct(it);
|
|
22502
|
+
});
|
|
22503
|
+
}
|
|
22504
|
+
if (isOnSimCreate(newSim)) {
|
|
22505
|
+
newSim.onSimCreate();
|
|
22506
|
+
}
|
|
22507
|
+
return newSim;
|
|
22508
|
+
} finally {
|
|
22509
|
+
if (!settled) {
|
|
22510
|
+
newInstanceCarrier.depth--;
|
|
22511
|
+
const idx = resolving.lastIndexOf(targetKey);
|
|
22512
|
+
if (idx !== -1) resolving.splice(idx, 1);
|
|
22513
|
+
}
|
|
22491
22514
|
}
|
|
22492
|
-
if (isOnSimCreate(newSim)) {
|
|
22493
|
-
newSim.onSimCreate();
|
|
22494
|
-
}
|
|
22495
|
-
return newSim;
|
|
22496
22515
|
}
|
|
22497
22516
|
const simNoSuch = new SimNoSuch("SimNoSuch: no simple instance(resolve) name:" + targetKey?.prototype?.constructor?.name + "," + targetKey);
|
|
22498
22517
|
console.error(simNoSuch);
|