interaqt 0.4.6 → 0.4.9
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/index.js +70 -56
- package/dist/index.js.map +1 -1
- package/dist/runtime/Scheduler.d.ts +5 -4
- package/dist/runtime/Scheduler.d.ts.map +1 -1
- package/dist/runtime/computations/Computation.d.ts +7 -1
- package/dist/runtime/computations/Computation.d.ts.map +1 -1
- package/dist/runtime/computations/StateMachine.d.ts +3 -0
- package/dist/runtime/computations/StateMachine.d.ts.map +1 -1
- package/dist/shared/Transform.d.ts +2 -0
- package/dist/shared/Transform.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1352,7 +1352,7 @@ function Ci(u) {
|
|
|
1352
1352
|
content: Ot(u)
|
|
1353
1353
|
});
|
|
1354
1354
|
}
|
|
1355
|
-
class
|
|
1355
|
+
class Ht {
|
|
1356
1356
|
constructor(t, e) {
|
|
1357
1357
|
this._type = "Condition", this._options = e, this.uuid = S(e), this.content = t.content, this.name = t.name;
|
|
1358
1358
|
}
|
|
@@ -1378,7 +1378,7 @@ class jt {
|
|
|
1378
1378
|
};
|
|
1379
1379
|
}
|
|
1380
1380
|
static create(t, e) {
|
|
1381
|
-
const r = new
|
|
1381
|
+
const r = new Ht(t, e);
|
|
1382
1382
|
if (this.instances.find((s) => s.uuid === r.uuid))
|
|
1383
1383
|
throw new Error(`duplicate uuid in options ${r.uuid}, Condition`);
|
|
1384
1384
|
return this.instances.push(r), r;
|
|
@@ -1412,7 +1412,7 @@ class jt {
|
|
|
1412
1412
|
return r.content && typeof r.content == "string" && r.content.startsWith("func::") && (r.content = new Function("return " + r.content.substring(6))()), this.create(r, e.options);
|
|
1413
1413
|
}
|
|
1414
1414
|
}
|
|
1415
|
-
class
|
|
1415
|
+
class jt {
|
|
1416
1416
|
constructor(t, e) {
|
|
1417
1417
|
this._type = "DataAttributive", this._options = e, this.uuid = S(e), this.content = t.content, this.name = t.name;
|
|
1418
1418
|
}
|
|
@@ -1438,7 +1438,7 @@ class Ht {
|
|
|
1438
1438
|
};
|
|
1439
1439
|
}
|
|
1440
1440
|
static create(t, e) {
|
|
1441
|
-
const r = new
|
|
1441
|
+
const r = new jt(t, e);
|
|
1442
1442
|
if (this.instances.find((s) => s.uuid === r.uuid))
|
|
1443
1443
|
throw new Error(`duplicate uuid in options ${r.uuid}, DataAttributive`);
|
|
1444
1444
|
return this.instances.push(r), r;
|
|
@@ -2927,8 +2927,8 @@ const We = [
|
|
|
2927
2927
|
Wt,
|
|
2928
2928
|
Jt,
|
|
2929
2929
|
X,
|
|
2930
|
-
jt,
|
|
2931
2930
|
Ht,
|
|
2931
|
+
jt,
|
|
2932
2932
|
Ct,
|
|
2933
2933
|
st,
|
|
2934
2934
|
Ut,
|
|
@@ -3776,7 +3776,7 @@ class q {
|
|
|
3776
3776
|
}), this.parentLinkQueryTree && (t[f] = this.parentLinkQueryTree.getData()), t;
|
|
3777
3777
|
}
|
|
3778
3778
|
}
|
|
3779
|
-
const f = "&",
|
|
3779
|
+
const f = "&", He = "*";
|
|
3780
3780
|
class x {
|
|
3781
3781
|
constructor(t, e, r = [], i, s, a) {
|
|
3782
3782
|
this.recordName = t, this.map = e, this.data = r, this.parentRecord = i, this.attributeName = s, this.shouldQueryParentLinkData = a, this.relatedRecords = [], this.xToManyRecords = [], this.xToOneRecords = [], this.valueAttributes = [], this.id = Math.random();
|
|
@@ -3789,7 +3789,7 @@ class x {
|
|
|
3789
3789
|
this.parentLinkRecordQuery = M.create(y.linkName, this.map, d, void 0);
|
|
3790
3790
|
return;
|
|
3791
3791
|
}
|
|
3792
|
-
if (l ===
|
|
3792
|
+
if (l === He) {
|
|
3793
3793
|
o = new Set(this.map.getRecordInfo(this.recordName).valueAttributes.map((y) => y.attributeName));
|
|
3794
3794
|
return;
|
|
3795
3795
|
}
|
|
@@ -3919,7 +3919,7 @@ class x {
|
|
|
3919
3919
|
return this.parentLinkRecordQuery ? new x(this.recordName, this.map, this.data, this.parentRecord, this.attributeName, !0) : this;
|
|
3920
3920
|
}
|
|
3921
3921
|
}
|
|
3922
|
-
function
|
|
3922
|
+
function je(u) {
|
|
3923
3923
|
const t = [];
|
|
3924
3924
|
return u.forEach((e) => t.push(...Array.isArray(e) ? e : [e])), t;
|
|
3925
3925
|
}
|
|
@@ -3929,7 +3929,7 @@ class L {
|
|
|
3929
3929
|
const s = this.map.getRecordInfo(e);
|
|
3930
3930
|
this.recordName = s.isFilteredEntity || s.isFilteredRelation ? s.resolvedBaseRecordName : e;
|
|
3931
3931
|
const [a, o, n] = this.map.groupAttributes(this.recordName, r ? Object.keys(r) : []);
|
|
3932
|
-
this.relatedEntitiesData =
|
|
3932
|
+
this.relatedEntitiesData = je(o.map(
|
|
3933
3933
|
(l) => Array.isArray(r[l.attributeName]) ? r[l.attributeName].map((d) => new L(this.map, l.recordName, d, l)) : new L(this.map, l.recordName, r[l.attributeName], l)
|
|
3934
3934
|
)), this.valueAttributes = a, this.entityIdAttributes = n;
|
|
3935
3935
|
const c = this.map.getRecordInfo(this.recordName);
|
|
@@ -6416,6 +6416,12 @@ Or if you want to use state name as value, you should not set ${this.dataContext
|
|
|
6416
6416
|
const i = await this.state.currentState.get(r), s = this.transitionFinder?.findNextState(i, e);
|
|
6417
6417
|
return s ? (await this.state.currentState.set(r, s.name), s.computeValue ? await s.computeValue.call(this.controller, t, e) : s.name) : A.skip();
|
|
6418
6418
|
}
|
|
6419
|
+
// 给外部用的,因为可能在 Transform 里面设置初始值。
|
|
6420
|
+
async createStateData(t) {
|
|
6421
|
+
return {
|
|
6422
|
+
[this.state.currentState.key]: t.name
|
|
6423
|
+
};
|
|
6424
|
+
}
|
|
6419
6425
|
}
|
|
6420
6426
|
const Di = Y.create({
|
|
6421
6427
|
name: "nonExistent",
|
|
@@ -7815,7 +7821,7 @@ const Jr = [
|
|
|
7815
7821
|
Br,
|
|
7816
7822
|
Wr
|
|
7817
7823
|
];
|
|
7818
|
-
class
|
|
7824
|
+
class j extends Error {
|
|
7819
7825
|
constructor(t, e = {}) {
|
|
7820
7826
|
super(`${t}. Caused by: ${e.causedBy?.message}`), this.name = this.constructor.name, this.timestamp = /* @__PURE__ */ new Date(), this.errorId = this.generateErrorId(), this.errorType = e.errorType || this.constructor.name, this.context = e.context || {}, this.causedBy = e.causedBy, this.stackTrace = this.stack, Object.setPrototypeOf(this, new.target.prototype);
|
|
7821
7827
|
}
|
|
@@ -7828,7 +7834,7 @@ class H extends Error {
|
|
|
7828
7834
|
getErrorChain() {
|
|
7829
7835
|
const t = [this];
|
|
7830
7836
|
let e = this.causedBy;
|
|
7831
|
-
for (; e && (t.push(e), e instanceof
|
|
7837
|
+
for (; e && (t.push(e), e instanceof j); )
|
|
7832
7838
|
e = e.causedBy;
|
|
7833
7839
|
return t;
|
|
7834
7840
|
}
|
|
@@ -7933,7 +7939,7 @@ Stack trace:`, i.stack.split(`
|
|
|
7933
7939
|
}
|
|
7934
7940
|
}
|
|
7935
7941
|
var V = /* @__PURE__ */ ((u) => (u.LOW = "low", u.MEDIUM = "medium", u.HIGH = "high", u.CRITICAL = "critical", u))(V || {}), Z = /* @__PURE__ */ ((u) => (u.VALIDATION = "validation", u.PERMISSION = "permission", u.COMPUTATION = "computation", u.STORAGE = "storage", u.INTERACTION = "interaction", u.ACTIVITY = "activity", u.SYSTEM = "system", u.CONFIGURATION = "configuration", u))(Z || {});
|
|
7936
|
-
class U extends
|
|
7942
|
+
class U extends j {
|
|
7937
7943
|
constructor(t, e = {}) {
|
|
7938
7944
|
super(t, {
|
|
7939
7945
|
errorType: e.context?.errorType || "InteractionExecutionError",
|
|
@@ -7949,7 +7955,7 @@ class U extends H {
|
|
|
7949
7955
|
}), this.interactionName = e.interactionName, this.userId = e.userId, this.payload = e.payload, this.executionPhase = e.executionPhase, this.severity = e.severity || V.HIGH;
|
|
7950
7956
|
}
|
|
7951
7957
|
}
|
|
7952
|
-
class ne extends
|
|
7958
|
+
class ne extends j {
|
|
7953
7959
|
constructor(t, e = {}) {
|
|
7954
7960
|
super(t, {
|
|
7955
7961
|
errorType: e.context?.errorType || "ActivityError",
|
|
@@ -7965,7 +7971,7 @@ class ne extends H {
|
|
|
7965
7971
|
}), this.activityName = e.activityName, this.activityId = e.activityId, this.activityInstanceId = e.activityInstanceId, this.currentState = e.currentState, this.severity = e.severity || V.MEDIUM;
|
|
7966
7972
|
}
|
|
7967
7973
|
}
|
|
7968
|
-
class Q extends
|
|
7974
|
+
class Q extends j {
|
|
7969
7975
|
constructor(t, e = {}) {
|
|
7970
7976
|
super(t, {
|
|
7971
7977
|
errorType: e.context?.errorType || "ComputationError",
|
|
@@ -8011,7 +8017,7 @@ class J extends Q {
|
|
|
8011
8017
|
}), this.depName = e.depName, this.depType = e.depType, this.missingData = e.missingData, this.invalidData = e.invalidData;
|
|
8012
8018
|
}
|
|
8013
8019
|
}
|
|
8014
|
-
class
|
|
8020
|
+
class H extends j {
|
|
8015
8021
|
constructor(t, e = {}) {
|
|
8016
8022
|
super(t, {
|
|
8017
8023
|
errorType: e.context?.errorType || "SchedulerError",
|
|
@@ -8025,7 +8031,7 @@ class j extends H {
|
|
|
8025
8031
|
}), this.schedulingPhase = e.schedulingPhase, this.failedComputations = e.failedComputations, this.severity = V.HIGH;
|
|
8026
8032
|
}
|
|
8027
8033
|
}
|
|
8028
|
-
class O extends
|
|
8034
|
+
class O extends j {
|
|
8029
8035
|
constructor(t, e) {
|
|
8030
8036
|
super(t, {
|
|
8031
8037
|
errorType: e.context?.errorType || "ConditionError",
|
|
@@ -8098,7 +8104,7 @@ class O extends H {
|
|
|
8098
8104
|
});
|
|
8099
8105
|
}
|
|
8100
8106
|
}
|
|
8101
|
-
const tt = "_System_", _ = "_Dictionary_", et = "id", ot = "_rowId",
|
|
8107
|
+
const tt = "_System_", _ = "_Dictionary_", et = "id", ot = "_rowId", Hr = C.create({
|
|
8102
8108
|
name: tt,
|
|
8103
8109
|
properties: [
|
|
8104
8110
|
T.create({
|
|
@@ -8117,7 +8123,7 @@ const tt = "_System_", _ = "_Dictionary_", et = "id", ot = "_rowId", jr = C.crea
|
|
|
8117
8123
|
collection: !1
|
|
8118
8124
|
})
|
|
8119
8125
|
]
|
|
8120
|
-
}),
|
|
8126
|
+
}), jr = C.create({
|
|
8121
8127
|
name: _,
|
|
8122
8128
|
properties: [
|
|
8123
8129
|
T.create({
|
|
@@ -8326,19 +8332,23 @@ class Ur {
|
|
|
8326
8332
|
const Dt = "_ASYNC_TASK_";
|
|
8327
8333
|
class Gr {
|
|
8328
8334
|
constructor(t, e, r, i, s) {
|
|
8329
|
-
this.controller = t, this.
|
|
8335
|
+
this.controller = t, this.computationsHandles = /* @__PURE__ */ new Map(), this.computationHandleMap = /* @__PURE__ */ new Map(), this.erMutationEventSources = [], this.dataSourceMapTree = {}, this.sourceMapManager = new Ur(this.controller, this), this.buildComputationHandleMap(s);
|
|
8330
8336
|
const a = [];
|
|
8331
|
-
|
|
8332
|
-
o.computation && a.push({ dataContext: { type: "
|
|
8337
|
+
i.forEach((o) => {
|
|
8338
|
+
o.computation && a.push({ dataContext: { type: "global", id: o }, args: o.computation });
|
|
8339
|
+
}), e.forEach((o) => {
|
|
8340
|
+
o.computation && a.push({ dataContext: { type: "entity", id: o }, args: o.computation });
|
|
8341
|
+
}), r.forEach((o) => {
|
|
8342
|
+
const n = o;
|
|
8343
|
+
n.computation && a.push({ dataContext: { type: "relation", id: o }, args: n.computation });
|
|
8344
|
+
}), e.forEach((o) => {
|
|
8345
|
+
o.properties?.forEach((n) => {
|
|
8333
8346
|
n.computation && a.push({ dataContext: { type: "property", host: o, id: n }, args: n.computation });
|
|
8334
8347
|
});
|
|
8335
8348
|
}), r.forEach((o) => {
|
|
8336
|
-
|
|
8337
|
-
n.computation && a.push({ dataContext: { type: "relation", id: o }, args: n.computation }), n.properties && n.properties.forEach((c) => {
|
|
8349
|
+
o.properties?.forEach((c) => {
|
|
8338
8350
|
c.computation && a.push({ dataContext: { type: "property", host: o, id: c }, args: c.computation });
|
|
8339
8351
|
});
|
|
8340
|
-
}), i.forEach((o) => {
|
|
8341
|
-
o.computation && a.push({ dataContext: { type: "global", id: o.name }, args: o.computation });
|
|
8342
8352
|
});
|
|
8343
8353
|
for (const o of a) {
|
|
8344
8354
|
const n = o.dataContext, c = o.args, l = this.computationHandleMap.get(c.constructor);
|
|
@@ -8346,7 +8356,7 @@ class Gr {
|
|
|
8346
8356
|
const d = l[n.type];
|
|
8347
8357
|
v(!!d, `cannot find Computation handle for ${c.constructor.displayName || c.constructor.name} with context type ${n.type}`);
|
|
8348
8358
|
const h = new d(this.controller, c, n);
|
|
8349
|
-
if (this.
|
|
8359
|
+
if (this.computationsHandles.set(n.id, h), this.isAsyncComputation(h)) {
|
|
8350
8360
|
if (h.dataContext.type === "property") {
|
|
8351
8361
|
const p = C.create({
|
|
8352
8362
|
name: this.getAsyncTaskRecordKey(h),
|
|
@@ -8463,11 +8473,11 @@ class Gr {
|
|
|
8463
8473
|
}
|
|
8464
8474
|
}
|
|
8465
8475
|
getBoundStateName(t, e, r) {
|
|
8466
|
-
return `_${t.type === "property" ? `${t.host.name}_${t.id.name}` : t.
|
|
8476
|
+
return `_${t.type === "property" ? `${t.host.name}_${t.id.name}` : t.id.name}_bound_${e}`;
|
|
8467
8477
|
}
|
|
8468
8478
|
createStates() {
|
|
8469
8479
|
const t = [];
|
|
8470
|
-
for (const e of this.
|
|
8480
|
+
for (const e of this.computationsHandles.values())
|
|
8471
8481
|
if (e.createState) {
|
|
8472
8482
|
const r = e.createState();
|
|
8473
8483
|
t.push({ dataContext: e.dataContext, state: r }), e.state = r;
|
|
@@ -8480,12 +8490,16 @@ class Gr {
|
|
|
8480
8490
|
else if (e.dataContext.type === "relation")
|
|
8481
8491
|
s.record = e.dataContext.id.name;
|
|
8482
8492
|
else
|
|
8483
|
-
throw new Error(`global data context ${e.dataContext.id} must specify record name for RecordBoundState`);
|
|
8493
|
+
throw new Error(`global data context ${e.dataContext.id.name} must specify record name for RecordBoundState`);
|
|
8484
8494
|
}
|
|
8485
8495
|
return t;
|
|
8486
8496
|
}
|
|
8497
|
+
async createStateData(t, ...e) {
|
|
8498
|
+
const r = this.computationsHandles.get(t);
|
|
8499
|
+
return v(!!r, "cannot find computation handle"), r.createStateData?.(...e) ?? {};
|
|
8500
|
+
}
|
|
8487
8501
|
async setupDefaultValues() {
|
|
8488
|
-
for (const t of this.
|
|
8502
|
+
for (const t of this.computationsHandles.values())
|
|
8489
8503
|
if (t.getDefaultValue)
|
|
8490
8504
|
if (t.dataContext.type === "global" || t.dataContext.type === "entity" || t.dataContext.type === "relation") {
|
|
8491
8505
|
const e = await t.getDefaultValue();
|
|
@@ -8501,8 +8515,8 @@ class Gr {
|
|
|
8501
8515
|
});
|
|
8502
8516
|
}
|
|
8503
8517
|
}
|
|
8504
|
-
async
|
|
8505
|
-
for (const t of this.
|
|
8518
|
+
async setupGlobalBoundStateDefaultValues() {
|
|
8519
|
+
for (const t of this.computationsHandles.values()) {
|
|
8506
8520
|
const e = t;
|
|
8507
8521
|
if (e.state)
|
|
8508
8522
|
for (const r of Object.values(e.state))
|
|
@@ -8510,7 +8524,7 @@ class Gr {
|
|
|
8510
8524
|
}
|
|
8511
8525
|
}
|
|
8512
8526
|
async setupMutationListeners() {
|
|
8513
|
-
this.sourceMapManager.initialize(this.
|
|
8527
|
+
this.sourceMapManager.initialize(new Set(this.computationsHandles.values())), this.dataSourceMapTree = this.sourceMapManager.getSourceMapTree(), this.controller.system.storage.listen(async (t) => {
|
|
8514
8528
|
for (let e of t) {
|
|
8515
8529
|
const r = this.sourceMapManager.findSourceMapsForMutation(e);
|
|
8516
8530
|
if (r.length > 0)
|
|
@@ -8629,7 +8643,7 @@ class Gr {
|
|
|
8629
8643
|
}
|
|
8630
8644
|
}
|
|
8631
8645
|
} catch (r) {
|
|
8632
|
-
throw r instanceof Q ? r : new
|
|
8646
|
+
throw r instanceof Q ? r : new H("Unexpected error in dirty records computation", {
|
|
8633
8647
|
schedulingPhase: "dirty-records-processing",
|
|
8634
8648
|
failedComputations: [t.computation.args.constructor.displayName],
|
|
8635
8649
|
causedBy: r instanceof Error ? r : new Error(String(r))
|
|
@@ -8640,7 +8654,7 @@ class Gr {
|
|
|
8640
8654
|
if (t.dataContext.type === "property") {
|
|
8641
8655
|
const e = t.dataContext;
|
|
8642
8656
|
return `${Dt}_${e.host.name}_${e.id.name}`;
|
|
8643
|
-
} else return t.dataContext.type === "global" ? `${Dt}_${t.dataContext.id}` : `${Dt}_${t.dataContext.type}_${t.dataContext.id?.name
|
|
8657
|
+
} else return t.dataContext.type === "global" ? `${Dt}_${t.dataContext.id.name}` : `${Dt}_${t.dataContext.type}_${t.dataContext.id?.name}`;
|
|
8644
8658
|
}
|
|
8645
8659
|
async createAsyncTask(t, e, r, i) {
|
|
8646
8660
|
if (t.dataContext.type === "property")
|
|
@@ -8858,15 +8872,15 @@ class Gr {
|
|
|
8858
8872
|
try {
|
|
8859
8873
|
await this.setupDefaultValues();
|
|
8860
8874
|
} catch (t) {
|
|
8861
|
-
throw new
|
|
8875
|
+
throw new H("Failed to setup computation default values", {
|
|
8862
8876
|
schedulingPhase: "default-values-setup",
|
|
8863
8877
|
causedBy: t instanceof Error ? t : new Error(String(t))
|
|
8864
8878
|
});
|
|
8865
8879
|
}
|
|
8866
8880
|
try {
|
|
8867
|
-
await this.
|
|
8881
|
+
await this.setupGlobalBoundStateDefaultValues();
|
|
8868
8882
|
} catch (t) {
|
|
8869
|
-
throw new
|
|
8883
|
+
throw new H("Failed to setup computation state default values", {
|
|
8870
8884
|
schedulingPhase: "state-default-values-setup",
|
|
8871
8885
|
causedBy: t instanceof Error ? t : new Error(String(t))
|
|
8872
8886
|
});
|
|
@@ -8874,7 +8888,7 @@ class Gr {
|
|
|
8874
8888
|
try {
|
|
8875
8889
|
await this.setupMutationListeners();
|
|
8876
8890
|
} catch (t) {
|
|
8877
|
-
throw new
|
|
8891
|
+
throw new H("Failed to setup mutation listeners for computations", {
|
|
8878
8892
|
schedulingPhase: "mutation-listeners-setup",
|
|
8879
8893
|
causedBy: t instanceof Error ? t : new Error(String(t))
|
|
8880
8894
|
});
|
|
@@ -8882,13 +8896,13 @@ class Gr {
|
|
|
8882
8896
|
try {
|
|
8883
8897
|
await this.setupGlobalDict();
|
|
8884
8898
|
} catch (t) {
|
|
8885
|
-
throw new
|
|
8899
|
+
throw new H("Failed to setup global dictionary", {
|
|
8886
8900
|
schedulingPhase: "global-dict-setup",
|
|
8887
8901
|
causedBy: t instanceof Error ? t : new Error(String(t))
|
|
8888
8902
|
});
|
|
8889
8903
|
}
|
|
8890
8904
|
} catch (t) {
|
|
8891
|
-
throw t instanceof
|
|
8905
|
+
throw t instanceof H ? t : new H("Unexpected error during scheduler setup", {
|
|
8892
8906
|
schedulingPhase: "top-level-setup",
|
|
8893
8907
|
causedBy: t instanceof Error ? t : new Error(String(t))
|
|
8894
8908
|
});
|
|
@@ -8976,9 +8990,9 @@ class Ae {
|
|
|
8976
8990
|
if (!e.some((s) => s.name === i))
|
|
8977
8991
|
throw new Error(`${i} in payload is not defined in interaction ${this.interaction.name}`);
|
|
8978
8992
|
for (let i of e) {
|
|
8979
|
-
|
|
8980
|
-
if (i.required && !s)
|
|
8993
|
+
if (i.required && !(i.name in t.payload))
|
|
8981
8994
|
throw O.payloadValidationFailed(i.name, "missing", t.payload);
|
|
8995
|
+
const s = t.payload[i.name];
|
|
8982
8996
|
if (!s) return;
|
|
8983
8997
|
if (i.isCollection && !Array.isArray(s))
|
|
8984
8998
|
throw O.payloadValidationFailed(i.name, "data is not array", s);
|
|
@@ -9630,7 +9644,7 @@ class Li {
|
|
|
9630
9644
|
}
|
|
9631
9645
|
async retrieveLastValue(t, e) {
|
|
9632
9646
|
if (t.type === "global")
|
|
9633
|
-
return this.system.storage.dict.get(t.id);
|
|
9647
|
+
return this.system.storage.dict.get(t.id.name);
|
|
9634
9648
|
if (t.type === "entity" || t.type === "relation")
|
|
9635
9649
|
return this.system.storage.find(t.id.name, void 0, void 0, ["*"]);
|
|
9636
9650
|
{
|
|
@@ -9641,7 +9655,7 @@ class Li {
|
|
|
9641
9655
|
async applyResult(t, e, r) {
|
|
9642
9656
|
if (!(e instanceof kt)) {
|
|
9643
9657
|
if (t.type === "global")
|
|
9644
|
-
return this.system.storage.dict.set(t.id, e);
|
|
9658
|
+
return this.system.storage.dict.set(t.id.name, e);
|
|
9645
9659
|
if (t.type === "entity") {
|
|
9646
9660
|
if (e == null) return;
|
|
9647
9661
|
const i = t;
|
|
@@ -9667,7 +9681,7 @@ class Li {
|
|
|
9667
9681
|
const i = Array.isArray(e) ? e : [e];
|
|
9668
9682
|
for (const s of i) {
|
|
9669
9683
|
if (t.type === "global")
|
|
9670
|
-
return this.system.storage.dict.set(t.id, s);
|
|
9684
|
+
return this.system.storage.dict.set(t.id.name, s);
|
|
9671
9685
|
if (t.type === "entity" || t.type === "relation") {
|
|
9672
9686
|
const a = t;
|
|
9673
9687
|
if (s.type === "insert")
|
|
@@ -10008,7 +10022,7 @@ class _i {
|
|
|
10008
10022
|
}
|
|
10009
10023
|
});
|
|
10010
10024
|
}), this.storage.setup(
|
|
10011
|
-
[...a,
|
|
10025
|
+
[...a, jr, Hr],
|
|
10012
10026
|
o,
|
|
10013
10027
|
i
|
|
10014
10028
|
);
|
|
@@ -10122,7 +10136,7 @@ let di = class {
|
|
|
10122
10136
|
return he();
|
|
10123
10137
|
}
|
|
10124
10138
|
};
|
|
10125
|
-
class
|
|
10139
|
+
class Hi {
|
|
10126
10140
|
constructor(t, e = {}) {
|
|
10127
10141
|
this.database = t, this.options = e, this.idSystem = new di(this), this.logger = this.options?.logger || Rt, this.db = new Pe(this.database);
|
|
10128
10142
|
}
|
|
@@ -10251,7 +10265,7 @@ class hi {
|
|
|
10251
10265
|
return e === void 0 ? await this.db.scheme(`INSERT INTO "_IDS_" (name, last) VALUES ('${t}', ${r})`, i) : await this.db.update('UPDATE "_IDS_" SET last = ? WHERE name = ?', [r, t], void 0, i), r;
|
|
10252
10266
|
}
|
|
10253
10267
|
}
|
|
10254
|
-
class
|
|
10268
|
+
class ji {
|
|
10255
10269
|
constructor(t, e = {}) {
|
|
10256
10270
|
this.database = t, this.options = e, this.idSystem = new hi(this), this.logger = this.options?.logger || Rt;
|
|
10257
10271
|
}
|
|
@@ -10333,7 +10347,7 @@ class Hi {
|
|
|
10333
10347
|
}
|
|
10334
10348
|
export {
|
|
10335
10349
|
Tt as ACTIVITY_RECORD,
|
|
10336
|
-
|
|
10350
|
+
He as ALL_ATTR_SYMBOL,
|
|
10337
10351
|
Dt as ASYNC_TASK_RECORD,
|
|
10338
10352
|
Ct as Action,
|
|
10339
10353
|
Jt as Activity,
|
|
@@ -10362,7 +10376,7 @@ export {
|
|
|
10362
10376
|
ve as ComputationResultResolved,
|
|
10363
10377
|
kt as ComputationResultSkip,
|
|
10364
10378
|
ce as ComputationStateError,
|
|
10365
|
-
|
|
10379
|
+
Ht as Condition,
|
|
10366
10380
|
O as ConditionError,
|
|
10367
10381
|
Mt as Conditions,
|
|
10368
10382
|
Li as Controller,
|
|
@@ -10375,10 +10389,10 @@ export {
|
|
|
10375
10389
|
dr as DBSetup,
|
|
10376
10390
|
Fi as DELETED_STATE,
|
|
10377
10391
|
_ as DICTIONARY_RECORD,
|
|
10378
|
-
|
|
10392
|
+
jt as DataAttributive,
|
|
10379
10393
|
zt as DataAttributives,
|
|
10380
10394
|
Bt as Dictionary,
|
|
10381
|
-
|
|
10395
|
+
jr as DictionaryEntity,
|
|
10382
10396
|
C as Entity,
|
|
10383
10397
|
_r as EntityCustomHandle,
|
|
10384
10398
|
Ye as EntityQueryHandle,
|
|
@@ -10414,11 +10428,11 @@ export {
|
|
|
10414
10428
|
m as MatchExp,
|
|
10415
10429
|
Je as Modifier,
|
|
10416
10430
|
_i as MonoSystem,
|
|
10417
|
-
|
|
10431
|
+
ji as MysqlDB,
|
|
10418
10432
|
Oi as NON_DELETED_STATE,
|
|
10419
10433
|
Di as NON_EXIST_STATE,
|
|
10420
10434
|
L as NewRecordData,
|
|
10421
|
-
|
|
10435
|
+
Hi as PGLiteDB,
|
|
10422
10436
|
Xt as Payload,
|
|
10423
10437
|
Kt as PayloadItem,
|
|
10424
10438
|
Wi as PostgreSQLDB,
|
|
@@ -10461,7 +10475,7 @@ export {
|
|
|
10461
10475
|
ht as Summation,
|
|
10462
10476
|
Fr as SummationHandles,
|
|
10463
10477
|
re as SystemConsoleLogger,
|
|
10464
|
-
|
|
10478
|
+
Hr as SystemEntity,
|
|
10465
10479
|
ci as SystemLogLevel,
|
|
10466
10480
|
ye as Transfer,
|
|
10467
10481
|
xt as Transform,
|