interaqt 0.1.0 → 0.2.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/agent/.claude/agents/code-generation-handler.md +598 -0
- package/agent/.claude/agents/computation-generation-handler.md +290 -0
- package/agent/.claude/agents/implement-design-handler.md +179 -0
- package/agent/.claude/agents/permission-generation-handler.md +202 -0
- package/agent/.claude/agents/requirements-analysis-handler-bak.md +530 -0
- package/agent/.claude/agents/requirements-analysis-handler.md +720 -0
- package/agent/.claude/settings.local.json +46 -0
- package/agent/CLAUDE.md +72 -0
- package/dist/index.js +10508 -4
- package/dist/index.js.map +1 -1
- package/dist/runtime/ComputationSourceMap.d.ts +117 -0
- package/dist/runtime/ComputationSourceMap.d.ts.map +1 -0
- package/dist/runtime/Controller.d.ts +37 -26
- package/dist/runtime/Controller.d.ts.map +1 -1
- package/dist/runtime/ExternalSynchronizer.d.ts +6 -0
- package/dist/runtime/ExternalSynchronizer.d.ts.map +1 -0
- package/dist/runtime/MonoSystem.d.ts +29 -17
- package/dist/runtime/MonoSystem.d.ts.map +1 -1
- package/dist/runtime/Mysql.d.ts +2 -2
- package/dist/runtime/PGLite.d.ts +35 -0
- package/dist/runtime/PGLite.d.ts.map +1 -0
- package/dist/runtime/PostgreSQL.d.ts +2 -2
- package/dist/runtime/SQLite.d.ts +3 -3
- package/dist/runtime/SQLite.d.ts.map +1 -1
- package/dist/runtime/Scheduler.d.ts +28 -61
- package/dist/runtime/Scheduler.d.ts.map +1 -1
- package/dist/runtime/System.d.ts +18 -224
- package/dist/runtime/System.d.ts.map +1 -1
- package/dist/runtime/{ActivityCall.d.ts → activity/ActivityCall.d.ts} +6 -7
- package/dist/runtime/activity/ActivityCall.d.ts.map +1 -0
- package/dist/runtime/activity/ActivityManager.d.ts +44 -0
- package/dist/runtime/activity/ActivityManager.d.ts.map +1 -0
- package/dist/runtime/{InteractionCall.d.ts → activity/InteractionCall.d.ts} +28 -41
- package/dist/runtime/activity/InteractionCall.d.ts.map +1 -0
- package/dist/runtime/computations/Any.d.ts +71 -0
- package/dist/runtime/computations/Any.d.ts.map +1 -0
- package/dist/runtime/computations/Average.d.ts +69 -0
- package/dist/runtime/computations/Average.d.ts.map +1 -0
- package/dist/runtime/computations/Computation.d.ts +138 -0
- package/dist/runtime/computations/Computation.d.ts.map +1 -0
- package/dist/runtime/computations/Count.d.ts +73 -0
- package/dist/runtime/computations/Count.d.ts.map +1 -0
- package/dist/runtime/computations/Custom.d.ts +45 -0
- package/dist/runtime/computations/Custom.d.ts.map +1 -0
- package/dist/runtime/computations/Every.d.ts +74 -0
- package/dist/runtime/computations/Every.d.ts.map +1 -0
- package/dist/runtime/computations/MathResolver.d.ts +60 -0
- package/dist/runtime/computations/MathResolver.d.ts.map +1 -0
- package/dist/runtime/computations/RealTime.d.ts +66 -0
- package/dist/runtime/computations/RealTime.d.ts.map +1 -0
- package/dist/runtime/{computedDataHandles → computations}/StateMachine.d.ts +31 -22
- package/dist/runtime/computations/StateMachine.d.ts.map +1 -0
- package/dist/runtime/computations/Summation.d.ts +66 -0
- package/dist/runtime/computations/Summation.d.ts.map +1 -0
- package/dist/runtime/computations/Transform.d.ts +29 -0
- package/dist/runtime/computations/Transform.d.ts.map +1 -0
- package/dist/runtime/computations/TransitionFinder.d.ts +11 -0
- package/dist/runtime/computations/TransitionFinder.d.ts.map +1 -0
- package/dist/runtime/computations/WeightedSummation.d.ts +71 -0
- package/dist/runtime/computations/WeightedSummation.d.ts.map +1 -0
- package/dist/runtime/computations/index.d.ts +22 -0
- package/dist/runtime/computations/index.d.ts.map +1 -0
- package/dist/runtime/errors/ActivityErrors.d.ts +40 -0
- package/dist/runtime/errors/ActivityErrors.d.ts.map +1 -0
- package/dist/runtime/errors/ComputationErrors.d.ts +61 -0
- package/dist/runtime/errors/ComputationErrors.d.ts.map +1 -0
- package/dist/runtime/errors/ConditionErrors.d.ts +33 -0
- package/dist/runtime/errors/ConditionErrors.d.ts.map +1 -0
- package/dist/runtime/errors/FrameworkError.d.ts +77 -0
- package/dist/runtime/errors/FrameworkError.d.ts.map +1 -0
- package/dist/runtime/errors/InteractionErrors.d.ts +21 -0
- package/dist/runtime/errors/InteractionErrors.d.ts.map +1 -0
- package/dist/runtime/errors/SystemErrors.d.ts +16 -0
- package/dist/runtime/errors/SystemErrors.d.ts.map +1 -0
- package/dist/runtime/errors/index.d.ts +37 -0
- package/dist/runtime/errors/index.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +9 -7
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/shared/Action.d.ts +38 -0
- package/dist/shared/Action.d.ts.map +1 -0
- package/dist/shared/Activity.d.ts +178 -0
- package/dist/shared/Activity.d.ts.map +1 -0
- package/dist/shared/Any.d.ts +82 -0
- package/dist/shared/Any.d.ts.map +1 -0
- package/dist/shared/Attributive.d.ts +92 -0
- package/dist/shared/Attributive.d.ts.map +1 -0
- package/dist/shared/Average.d.ts +59 -0
- package/dist/shared/Average.d.ts.map +1 -0
- package/dist/shared/BoolExp.d.ts +139 -63
- package/dist/shared/BoolExp.d.ts.map +1 -1
- package/dist/shared/Computation.d.ts +23 -0
- package/dist/shared/Computation.d.ts.map +1 -0
- package/dist/shared/Condition.d.ts +43 -0
- package/dist/shared/Condition.d.ts.map +1 -0
- package/dist/shared/Conditions.d.ts +38 -0
- package/dist/shared/Conditions.d.ts.map +1 -0
- package/dist/shared/Count.d.ts +77 -0
- package/dist/shared/Count.d.ts.map +1 -0
- package/dist/shared/Custom.d.ts +108 -0
- package/dist/shared/Custom.d.ts.map +1 -0
- package/dist/shared/Data.d.ts +121 -0
- package/dist/shared/Data.d.ts.map +1 -0
- package/dist/shared/DataAttributives.d.ts +38 -0
- package/dist/shared/DataAttributives.d.ts.map +1 -0
- package/dist/shared/Entity.d.ts +96 -0
- package/dist/shared/Entity.d.ts.map +1 -0
- package/dist/shared/Event.d.ts +36 -0
- package/dist/shared/Event.d.ts.map +1 -0
- package/dist/shared/Every.d.ts +85 -0
- package/dist/shared/Every.d.ts.map +1 -0
- package/dist/shared/Gateway.d.ts +36 -0
- package/dist/shared/Gateway.d.ts.map +1 -0
- package/dist/shared/Interaction.d.ts +108 -0
- package/dist/shared/Interaction.d.ts.map +1 -0
- package/dist/shared/Payload.d.ts +39 -0
- package/dist/shared/Payload.d.ts.map +1 -0
- package/dist/shared/PayloadItem.d.ts +85 -0
- package/dist/shared/PayloadItem.d.ts.map +1 -0
- package/dist/shared/Property.d.ts +83 -0
- package/dist/shared/Property.d.ts.map +1 -0
- package/dist/shared/RealDictionary.d.ts +94 -0
- package/dist/shared/RealDictionary.d.ts.map +1 -0
- package/dist/shared/RealTime.d.ts +66 -0
- package/dist/shared/RealTime.d.ts.map +1 -0
- package/dist/shared/RefContainer.d.ts +89 -0
- package/dist/shared/RefContainer.d.ts.map +1 -0
- package/dist/shared/Relation.d.ts +140 -0
- package/dist/shared/Relation.d.ts.map +1 -0
- package/dist/shared/SideEffect.d.ts +45 -0
- package/dist/shared/SideEffect.d.ts.map +1 -0
- package/dist/shared/StateMachine.d.ts +55 -0
- package/dist/shared/StateMachine.d.ts.map +1 -0
- package/dist/shared/StateNode.d.ts +45 -0
- package/dist/shared/StateNode.d.ts.map +1 -0
- package/dist/shared/StateTransfer.d.ts +63 -0
- package/dist/shared/StateTransfer.d.ts.map +1 -0
- package/dist/shared/Summation.d.ts +59 -0
- package/dist/shared/Summation.d.ts.map +1 -0
- package/dist/shared/Transform.d.ts +54 -0
- package/dist/shared/Transform.d.ts.map +1 -0
- package/dist/shared/User.d.ts +10 -0
- package/dist/shared/User.d.ts.map +1 -0
- package/dist/shared/WeightedSummation.d.ts +82 -0
- package/dist/shared/WeightedSummation.d.ts.map +1 -0
- package/dist/shared/index.d.ts +35 -9
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/init.d.ts +3 -0
- package/dist/shared/init.d.ts.map +1 -0
- package/dist/shared/interfaces.d.ts +72 -0
- package/dist/shared/interfaces.d.ts.map +1 -0
- package/dist/shared/types.d.ts +77 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/utils.d.ts +16 -10
- package/dist/shared/utils.d.ts.map +1 -1
- package/dist/storage/erstorage/AttributeInfo.d.ts +8 -3
- package/dist/storage/erstorage/AttributeInfo.d.ts.map +1 -1
- package/dist/storage/erstorage/AttributeQuery.d.ts +4 -3
- package/dist/storage/erstorage/AttributeQuery.d.ts.map +1 -1
- package/dist/storage/erstorage/EntityQueryHandle.d.ts +18 -17
- package/dist/storage/erstorage/EntityQueryHandle.d.ts.map +1 -1
- package/dist/storage/erstorage/EntityToTableMap.d.ts +27 -5
- package/dist/storage/erstorage/EntityToTableMap.d.ts.map +1 -1
- package/dist/storage/erstorage/FilteredEntityManager.d.ts +70 -0
- package/dist/storage/erstorage/FilteredEntityManager.d.ts.map +1 -0
- package/dist/storage/erstorage/LinkInfo.d.ts +10 -3
- package/dist/storage/erstorage/LinkInfo.d.ts.map +1 -1
- package/dist/storage/erstorage/MatchExp.d.ts +19 -9
- package/dist/storage/erstorage/MatchExp.d.ts.map +1 -1
- package/dist/storage/erstorage/MergedItemProcessor.d.ts +25 -0
- package/dist/storage/erstorage/MergedItemProcessor.d.ts.map +1 -0
- package/dist/storage/erstorage/Modifier.d.ts +1 -1
- package/dist/storage/erstorage/NewRecordData.d.ts +16 -9
- package/dist/storage/erstorage/NewRecordData.d.ts.map +1 -1
- package/dist/storage/erstorage/RecordInfo.d.ts +11 -2
- package/dist/storage/erstorage/RecordInfo.d.ts.map +1 -1
- package/dist/storage/erstorage/RecordQuery.d.ts +9 -8
- package/dist/storage/erstorage/RecordQuery.d.ts.map +1 -1
- package/dist/storage/erstorage/RecordQueryAgent.d.ts +26 -13
- package/dist/storage/erstorage/RecordQueryAgent.d.ts.map +1 -1
- package/dist/storage/erstorage/Setup.d.ts +49 -11
- package/dist/storage/erstorage/Setup.d.ts.map +1 -1
- package/dist/storage/erstorage/util.d.ts.map +1 -1
- package/package.json +44 -20
- package/README.md +0 -53
- package/dist/runtime/ActivityCall.d.ts.map +0 -1
- package/dist/runtime/ActivityCall.js +0 -379
- package/dist/runtime/ActivityCall.js.map +0 -1
- package/dist/runtime/Controller.js +0 -225
- package/dist/runtime/Controller.js.map +0 -1
- package/dist/runtime/InteractionCall.d.ts.map +0 -1
- package/dist/runtime/InteractionCall.js +0 -385
- package/dist/runtime/InteractionCall.js.map +0 -1
- package/dist/runtime/MonoSystem.js +0 -331
- package/dist/runtime/MonoSystem.js.map +0 -1
- package/dist/runtime/Mysql.js +0 -171
- package/dist/runtime/Mysql.js.map +0 -1
- package/dist/runtime/PostgreSQL.js +0 -172
- package/dist/runtime/PostgreSQL.js.map +0 -1
- package/dist/runtime/SQLite.js +0 -146
- package/dist/runtime/SQLite.js.map +0 -1
- package/dist/runtime/Scheduler.js +0 -457
- package/dist/runtime/Scheduler.js.map +0 -1
- package/dist/runtime/System.js +0 -90
- package/dist/runtime/System.js.map +0 -1
- package/dist/runtime/asyncInteractionContext.js +0 -3
- package/dist/runtime/asyncInteractionContext.js.map +0 -1
- package/dist/runtime/boolExpression.js +0 -43
- package/dist/runtime/boolExpression.js.map +0 -1
- package/dist/runtime/computedDataHandles/Any.d.ts +0 -52
- package/dist/runtime/computedDataHandles/Any.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/Any.js +0 -152
- package/dist/runtime/computedDataHandles/Any.js.map +0 -1
- package/dist/runtime/computedDataHandles/Computation.d.ts +0 -108
- package/dist/runtime/computedDataHandles/Computation.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/Computation.js +0 -49
- package/dist/runtime/computedDataHandles/Computation.js.map +0 -1
- package/dist/runtime/computedDataHandles/ComputedDataHandle.d.ts +0 -42
- package/dist/runtime/computedDataHandles/ComputedDataHandle.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/ComputedDataHandle.js +0 -4
- package/dist/runtime/computedDataHandles/ComputedDataHandle.js.map +0 -1
- package/dist/runtime/computedDataHandles/Count.d.ts +0 -45
- package/dist/runtime/computedDataHandles/Count.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/Count.js +0 -85
- package/dist/runtime/computedDataHandles/Count.js.map +0 -1
- package/dist/runtime/computedDataHandles/Every.d.ts +0 -56
- package/dist/runtime/computedDataHandles/Every.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/Every.js +0 -178
- package/dist/runtime/computedDataHandles/Every.js.map +0 -1
- package/dist/runtime/computedDataHandles/StateMachine.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/StateMachine.js +0 -180
- package/dist/runtime/computedDataHandles/StateMachine.js.map +0 -1
- package/dist/runtime/computedDataHandles/Transform.d.ts +0 -26
- package/dist/runtime/computedDataHandles/Transform.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/Transform.js +0 -106
- package/dist/runtime/computedDataHandles/Transform.js.map +0 -1
- package/dist/runtime/computedDataHandles/TransitionFinder.d.ts +0 -57
- package/dist/runtime/computedDataHandles/TransitionFinder.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/TransitionFinder.js +0 -40
- package/dist/runtime/computedDataHandles/TransitionFinder.js.map +0 -1
- package/dist/runtime/computedDataHandles/WeightedSummation.d.ts +0 -57
- package/dist/runtime/computedDataHandles/WeightedSummation.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/WeightedSummation.js +0 -146
- package/dist/runtime/computedDataHandles/WeightedSummation.js.map +0 -1
- package/dist/runtime/computedDataHandles/index.d.ts +0 -7
- package/dist/runtime/computedDataHandles/index.d.ts.map +0 -1
- package/dist/runtime/computedDataHandles/index.js +0 -7
- package/dist/runtime/computedDataHandles/index.js.map +0 -1
- package/dist/runtime/index.js +0 -15
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/server.d.ts +0 -35
- package/dist/runtime/server.d.ts.map +0 -1
- package/dist/runtime/server.js +0 -171
- package/dist/runtime/server.js.map +0 -1
- package/dist/runtime/types/boolExpression.js +0 -6
- package/dist/runtime/types/boolExpression.js.map +0 -1
- package/dist/runtime/util.js +0 -39
- package/dist/runtime/util.js.map +0 -1
- package/dist/shared/BoolExp.js +0 -252
- package/dist/shared/BoolExp.js.map +0 -1
- package/dist/shared/activity/Activity.d.ts +0 -465
- package/dist/shared/activity/Activity.d.ts.map +0 -1
- package/dist/shared/activity/Activity.js +0 -264
- package/dist/shared/activity/Activity.js.map +0 -1
- package/dist/shared/activity/Condition.d.ts +0 -75
- package/dist/shared/activity/Condition.d.ts.map +0 -1
- package/dist/shared/activity/Condition.js +0 -51
- package/dist/shared/activity/Condition.js.map +0 -1
- package/dist/shared/activity/Data.d.ts +0 -115
- package/dist/shared/activity/Data.d.ts.map +0 -1
- package/dist/shared/activity/Data.js +0 -89
- package/dist/shared/activity/Data.js.map +0 -1
- package/dist/shared/attributive.d.ts +0 -93
- package/dist/shared/attributive.d.ts.map +0 -1
- package/dist/shared/attributive.js +0 -59
- package/dist/shared/attributive.js.map +0 -1
- package/dist/shared/computed.d.ts +0 -607
- package/dist/shared/computed.d.ts.map +0 -1
- package/dist/shared/computed.js +0 -202
- package/dist/shared/computed.js.map +0 -1
- package/dist/shared/createClass.d.ts +0 -102
- package/dist/shared/createClass.d.ts.map +0 -1
- package/dist/shared/createClass.js +0 -276
- package/dist/shared/createClass.js.map +0 -1
- package/dist/shared/dictionary/Dictionary.d.ts +0 -40
- package/dist/shared/dictionary/Dictionary.d.ts.map +0 -1
- package/dist/shared/dictionary/Dictionary.js +0 -51
- package/dist/shared/dictionary/Dictionary.js.map +0 -1
- package/dist/shared/entity/Entity.d.ts +0 -149
- package/dist/shared/entity/Entity.d.ts.map +0 -1
- package/dist/shared/entity/Entity.js +0 -226
- package/dist/shared/entity/Entity.js.map +0 -1
- package/dist/shared/index.js +0 -11
- package/dist/shared/index.js.map +0 -1
- package/dist/shared/user/User.d.ts +0 -21
- package/dist/shared/user/User.d.ts.map +0 -1
- package/dist/shared/user/User.js +0 -11
- package/dist/shared/user/User.js.map +0 -1
- package/dist/shared/utils.js +0 -19
- package/dist/shared/utils.js.map +0 -1
- package/dist/storage/erstorage/AttributeInfo.js +0 -147
- package/dist/storage/erstorage/AttributeInfo.js.map +0 -1
- package/dist/storage/erstorage/AttributeQuery.js +0 -190
- package/dist/storage/erstorage/AttributeQuery.js.map +0 -1
- package/dist/storage/erstorage/EntityQueryHandle.js +0 -78
- package/dist/storage/erstorage/EntityQueryHandle.js.map +0 -1
- package/dist/storage/erstorage/EntityToTableMap.js +0 -262
- package/dist/storage/erstorage/EntityToTableMap.js.map +0 -1
- package/dist/storage/erstorage/LinkInfo.js +0 -89
- package/dist/storage/erstorage/LinkInfo.js.map +0 -1
- package/dist/storage/erstorage/MatchExp.js +0 -211
- package/dist/storage/erstorage/MatchExp.js.map +0 -1
- package/dist/storage/erstorage/Modifier.js +0 -24
- package/dist/storage/erstorage/Modifier.js.map +0 -1
- package/dist/storage/erstorage/NewRecordData.js +0 -178
- package/dist/storage/erstorage/NewRecordData.js.map +0 -1
- package/dist/storage/erstorage/RecordInfo.js +0 -111
- package/dist/storage/erstorage/RecordInfo.js.map +0 -1
- package/dist/storage/erstorage/RecordQuery.js +0 -158
- package/dist/storage/erstorage/RecordQuery.js.map +0 -1
- package/dist/storage/erstorage/RecordQueryAgent.js +0 -1130
- package/dist/storage/erstorage/RecordQueryAgent.js.map +0 -1
- package/dist/storage/erstorage/Setup.js +0 -400
- package/dist/storage/erstorage/Setup.js.map +0 -1
- package/dist/storage/erstorage/util.js +0 -25
- package/dist/storage/erstorage/util.js.map +0 -1
- package/dist/storage/index.js +0 -13
- package/dist/storage/index.js.map +0 -1
- package/dist/storage/utils.js +0 -48
- package/dist/storage/utils.js.map +0 -1
|
@@ -1,457 +0,0 @@
|
|
|
1
|
-
import { ComputedDataHandle } from "./computedDataHandles/ComputedDataHandle.js";
|
|
2
|
-
import { assert } from "./util.js";
|
|
3
|
-
import { GlobalBoundState, RecordBoundState } from "./computedDataHandles/Computation.js";
|
|
4
|
-
import { InteractionEventEntity } from "./System.js";
|
|
5
|
-
import { MatchExp } from "@storage";
|
|
6
|
-
export const SKIP_RESULT = Symbol('skip_result');
|
|
7
|
-
export class Scheduler {
|
|
8
|
-
constructor(controller, entities, relations, dict) {
|
|
9
|
-
this.controller = controller;
|
|
10
|
-
this.computations = new Set();
|
|
11
|
-
this.erMutationEventSources = [];
|
|
12
|
-
this.dataSourceMapTree = {};
|
|
13
|
-
const computationInputs = [];
|
|
14
|
-
entities.forEach(entity => {
|
|
15
|
-
if (entity.computedData) {
|
|
16
|
-
computationInputs.push({ dataContext: { type: 'entity', id: entity }, args: entity.computedData });
|
|
17
|
-
}
|
|
18
|
-
// property 的
|
|
19
|
-
entity.properties?.forEach(property => {
|
|
20
|
-
if (property.computedData) {
|
|
21
|
-
computationInputs.push({ dataContext: { type: 'property', host: entity, id: property.name }, args: property.computedData });
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
// relation 的
|
|
26
|
-
relations.forEach(relation => {
|
|
27
|
-
const relationAny = relation;
|
|
28
|
-
if (relationAny.computedData) {
|
|
29
|
-
computationInputs.push({ dataContext: { type: 'relation', id: relation }, args: relationAny.computedData });
|
|
30
|
-
}
|
|
31
|
-
if (relationAny.properties) {
|
|
32
|
-
relationAny.properties.forEach((property) => {
|
|
33
|
-
if (property.computedData) {
|
|
34
|
-
computationInputs.push({ dataContext: { type: 'property', host: relation, id: property.name }, args: property.computedData });
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
dict.forEach(dictItem => {
|
|
40
|
-
if (dictItem.computedData) {
|
|
41
|
-
computationInputs.push({ dataContext: { type: 'global', id: dictItem.name }, args: dictItem.computedData });
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
for (const computation of computationInputs) {
|
|
45
|
-
const dataContext = computation.dataContext;
|
|
46
|
-
const args = computation.args;
|
|
47
|
-
const handles = ComputedDataHandle.Handles;
|
|
48
|
-
const ComputationCtor = handles.get(args.constructor)[dataContext.type];
|
|
49
|
-
assert(!!ComputationCtor, `cannot find Computation handle for ${args.constructor.displayName || args.constructor.name}`);
|
|
50
|
-
this.computations.add(new ComputationCtor(this.controller, args, dataContext));
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
createStates() {
|
|
54
|
-
const states = [];
|
|
55
|
-
for (const computation of this.computations) {
|
|
56
|
-
const computationHandle = computation;
|
|
57
|
-
if (computationHandle.createState) {
|
|
58
|
-
const state = computationHandle.createState();
|
|
59
|
-
states.push({ dataContext: computationHandle.dataContext, state });
|
|
60
|
-
computationHandle.state = state;
|
|
61
|
-
for (let stateItem of Object.values(state)) {
|
|
62
|
-
stateItem.controller = this.controller;
|
|
63
|
-
stateItem.controller = this.controller;
|
|
64
|
-
if (stateItem instanceof RecordBoundState) {
|
|
65
|
-
if (computationHandle.dataContext.type === 'property') {
|
|
66
|
-
stateItem.record = computationHandle.dataContext.host.name;
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
stateItem.record = computationHandle.dataContext.id.name;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return states;
|
|
76
|
-
}
|
|
77
|
-
async setupDefaultValues() {
|
|
78
|
-
for (const computation of this.computations) {
|
|
79
|
-
const computationHandle = computation;
|
|
80
|
-
// 0. 创建 defaultValue
|
|
81
|
-
// property 的默认值在 setup 的时候已经创建了。
|
|
82
|
-
if (computationHandle.getDefaultValue) {
|
|
83
|
-
if (computationHandle.dataContext.type !== 'property') {
|
|
84
|
-
const defaultValue = await computationHandle.getDefaultValue();
|
|
85
|
-
await this.controller.applyResult(computationHandle.dataContext, defaultValue);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
// property computation 也能提供 defaultValue 的能力?
|
|
89
|
-
const property = computationHandle.dataContext.host.properties?.find(property => property.name === computationHandle.dataContext.id);
|
|
90
|
-
if (!property.defaultValue) {
|
|
91
|
-
// FIXME 这里没有支持 getDefaultValue 的 async 模式。会不会有问题???
|
|
92
|
-
property.defaultValue = computationHandle.getDefaultValue();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
async setupStateDefaultValues() {
|
|
99
|
-
for (const computation of this.computations) {
|
|
100
|
-
const computationHandle = computation;
|
|
101
|
-
// TODO 这里 createState 要放到 setup 前面,因为可能会修改 entity、relation ???
|
|
102
|
-
// 1. 创建计算所需要的 state
|
|
103
|
-
if (computationHandle.state) {
|
|
104
|
-
for (const [stateName, state] of Object.entries(computationHandle.state)) {
|
|
105
|
-
if (state instanceof GlobalBoundState) {
|
|
106
|
-
state.controller = this.controller;
|
|
107
|
-
state.key = `${computationHandle.dataContext.id}_${stateName}`;
|
|
108
|
-
if (typeof state.defaultValue !== undefined) {
|
|
109
|
-
await this.controller.system.storage.set('state', state.key, state.defaultValue);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
async setupMutationListeners() {
|
|
117
|
-
const ERMutationEventSources = [];
|
|
118
|
-
for (const computation of this.computations) {
|
|
119
|
-
// 1. 根据 data deps 计算出 mutation events
|
|
120
|
-
if (this.isDataBasedComputation(computation)) {
|
|
121
|
-
const dataBasedComputation = computation;
|
|
122
|
-
if (dataBasedComputation.dataDeps) {
|
|
123
|
-
ERMutationEventSources.push(...Object.entries(dataBasedComputation.dataDeps).map(([dataDepName, dataDep]) => this.convertDataDepToERMutationEventsSourceMap(dataDepName, dataDep, computation)).flat());
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
// 2. EventBasedComputation 等同于监听
|
|
128
|
-
// - EventEntity 的 create 事件
|
|
129
|
-
// - erMutationEvent 的 create 事件
|
|
130
|
-
// - Action 的 create 事件
|
|
131
|
-
// - Activity 的 create 事件
|
|
132
|
-
// FIXME 增加 ERMutationEvents 的 create 事件
|
|
133
|
-
ERMutationEventSources.push({
|
|
134
|
-
dataDep: {
|
|
135
|
-
type: 'records',
|
|
136
|
-
source: InteractionEventEntity,
|
|
137
|
-
attributeQuery: ['*']
|
|
138
|
-
},
|
|
139
|
-
type: 'create',
|
|
140
|
-
recordName: InteractionEventEntity.name,
|
|
141
|
-
sourceRecordName: InteractionEventEntity.name,
|
|
142
|
-
computation
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
// 根据 sourcemap 来执行真正的监听
|
|
147
|
-
this.erMutationEventSources = ERMutationEventSources;
|
|
148
|
-
this.dataSourceMapTree = this.buildDataSourceMapTree(this.erMutationEventSources);
|
|
149
|
-
this.controller.system.storage.listen(async (mutationEvents) => {
|
|
150
|
-
for (let mutationEvent of mutationEvents) {
|
|
151
|
-
const sources = this.dataSourceMapTree[mutationEvent.recordName]?.[mutationEvent.type];
|
|
152
|
-
if (sources) {
|
|
153
|
-
for (const source of sources) {
|
|
154
|
-
if (source.type === 'update') {
|
|
155
|
-
const propAttrs = source.attributes.filter(attr => attr !== 'id');
|
|
156
|
-
if (propAttrs.every(attr => !mutationEvent.record.hasOwnProperty(attr) || (mutationEvent.record[attr] === mutationEvent.oldRecord[attr]))) {
|
|
157
|
-
continue;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
await this.runDirtyRecordsComputation(source, mutationEvent);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
async computeDirtyRecords(source, mutationEvent) {
|
|
167
|
-
if (!source.targetPath?.length) {
|
|
168
|
-
return [mutationEvent.oldRecord ?? mutationEvent.record];
|
|
169
|
-
}
|
|
170
|
-
let dataDepRecords = [];
|
|
171
|
-
if (!source.isRelation) {
|
|
172
|
-
assert(source.type === 'update', 'only support update event for entity');
|
|
173
|
-
dataDepRecords = await this.controller.system.storage.find(source.sourceRecordName, MatchExp.atom({
|
|
174
|
-
key: source.targetPath.concat('id').join('.'),
|
|
175
|
-
value: ['=', mutationEvent.oldRecord?.id ?? mutationEvent.record?.id]
|
|
176
|
-
}));
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
// 2.3. 关联关系的 create/delete 事件,计算出关联关系的增删改最终影响了哪些当前 dataDep
|
|
180
|
-
assert(source.type === 'create' || source.type === 'delete', 'only support create/delete event for relation');
|
|
181
|
-
const relation = this.controller.relations.find(relation => relation.name === source.recordName);
|
|
182
|
-
// FIXME 没考虑 bidirectional 的情况,双向关系死循环了
|
|
183
|
-
const isSource = relation?.sourceProperty === source.targetPath.at(-1);
|
|
184
|
-
const dataDep = source.dataDep;
|
|
185
|
-
if (source.type === 'create') {
|
|
186
|
-
dataDepRecords = await this.controller.system.storage.find(source.sourceRecordName, MatchExp.atom({
|
|
187
|
-
key: source.targetPath.concat('id').join('.'),
|
|
188
|
-
value: ['=', mutationEvent.record[isSource ? 'target' : 'source'].id]
|
|
189
|
-
}), undefined, dataDep.attributeQuery);
|
|
190
|
-
}
|
|
191
|
-
else {
|
|
192
|
-
dataDepRecords = await this.controller.system.storage.find(source.sourceRecordName, MatchExp.atom({
|
|
193
|
-
key: source.targetPath.slice(0, -1).concat('id').join('.'),
|
|
194
|
-
value: ['=', mutationEvent.record[isSource ? 'source' : 'target'].id]
|
|
195
|
-
}), undefined, dataDep.attributeQuery);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
return dataDepRecords;
|
|
199
|
-
}
|
|
200
|
-
computeOldRecord(newRecord, sourceMap, mutationEvent) {
|
|
201
|
-
if (!sourceMap.targetPath?.length) {
|
|
202
|
-
return mutationEvent.oldRecord;
|
|
203
|
-
}
|
|
204
|
-
const result = { ...newRecord };
|
|
205
|
-
const path = [...sourceMap.targetPath];
|
|
206
|
-
const lastAttr = path.pop();
|
|
207
|
-
let pointer = result;
|
|
208
|
-
// 一路浅拷贝
|
|
209
|
-
for (const attr of path) {
|
|
210
|
-
// fIXME Computation 不能跨越 x:n 的集合,所以路径上应该都是对象。
|
|
211
|
-
pointer[attr] = { ...pointer[attr] };
|
|
212
|
-
pointer = pointer[attr];
|
|
213
|
-
}
|
|
214
|
-
if (Array.isArray(pointer[lastAttr])) {
|
|
215
|
-
// 集合
|
|
216
|
-
if (mutationEvent.type === 'delete') {
|
|
217
|
-
pointer[lastAttr] = pointer[lastAttr].concat(mutationEvent.record);
|
|
218
|
-
}
|
|
219
|
-
else if (mutationEvent.type === 'create') {
|
|
220
|
-
pointer[lastAttr] = pointer[lastAttr].filter(item => item.id !== mutationEvent.record.id);
|
|
221
|
-
}
|
|
222
|
-
else if (mutationEvent.type === 'update') {
|
|
223
|
-
pointer[lastAttr] = pointer[lastAttr].map(item => item.id === mutationEvent.oldRecord.id ? { ...item, ...mutationEvent.oldRecord } : item);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
else {
|
|
227
|
-
if (mutationEvent.type === 'delete') {
|
|
228
|
-
pointer[lastAttr] = mutationEvent.record;
|
|
229
|
-
}
|
|
230
|
-
else if (mutationEvent.type === 'create') {
|
|
231
|
-
pointer[lastAttr] = undefined;
|
|
232
|
-
}
|
|
233
|
-
else if (mutationEvent.type === 'update') {
|
|
234
|
-
pointer[lastAttr] = { ...pointer[lastAttr], ...mutationEvent.oldRecord };
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
return result;
|
|
238
|
-
}
|
|
239
|
-
async computeDataBasedDirtyRecordsAndEvents(source, mutationEvent) {
|
|
240
|
-
let dirtyRecordsAndEvents = [];
|
|
241
|
-
if (!source.targetPath?.length) {
|
|
242
|
-
dirtyRecordsAndEvents = [[mutationEvent.record, {
|
|
243
|
-
dataDep: source.dataDep,
|
|
244
|
-
...mutationEvent
|
|
245
|
-
}]];
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
const dataDepRecords = await this.computeDirtyRecords(source, mutationEvent);
|
|
249
|
-
dirtyRecordsAndEvents = dataDepRecords.map(record => [record, {
|
|
250
|
-
dataDep: source.dataDep,
|
|
251
|
-
type: 'update',
|
|
252
|
-
recordName: record.name,
|
|
253
|
-
record: record,
|
|
254
|
-
oldRecord: this.computeOldRecord(record, source, mutationEvent),
|
|
255
|
-
relatedAttribute: source.targetPath,
|
|
256
|
-
relatedMutationEvent: mutationEvent
|
|
257
|
-
}]);
|
|
258
|
-
}
|
|
259
|
-
return dirtyRecordsAndEvents;
|
|
260
|
-
}
|
|
261
|
-
async computeEventBasedDirtyRecordsAndEvents(source, mutationEvent) {
|
|
262
|
-
const eventBasedComputation = source.computation;
|
|
263
|
-
if (eventBasedComputation.computeDirtyRecords) {
|
|
264
|
-
let dirtyRecords = (await eventBasedComputation.computeDirtyRecords(mutationEvent)) || [];
|
|
265
|
-
dirtyRecords = Array.isArray(dirtyRecords) ? dirtyRecords : [dirtyRecords];
|
|
266
|
-
return dirtyRecords.map(record => [record, {
|
|
267
|
-
dataDep: source.dataDep,
|
|
268
|
-
...mutationEvent
|
|
269
|
-
}]);
|
|
270
|
-
}
|
|
271
|
-
else {
|
|
272
|
-
return [[null, {
|
|
273
|
-
dataDep: source.dataDep,
|
|
274
|
-
...mutationEvent
|
|
275
|
-
}]];
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
isDataBasedComputation(computation) {
|
|
279
|
-
return computation.compute !== undefined;
|
|
280
|
-
}
|
|
281
|
-
async runDirtyRecordsComputation(source, mutationEvent) {
|
|
282
|
-
let dirtyRecordsAndEvents = [];
|
|
283
|
-
if (this.isDataBasedComputation(source.computation)) {
|
|
284
|
-
dirtyRecordsAndEvents = await this.computeDataBasedDirtyRecordsAndEvents(source, mutationEvent);
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
dirtyRecordsAndEvents = await this.computeEventBasedDirtyRecordsAndEvents(source, mutationEvent);
|
|
288
|
-
}
|
|
289
|
-
for (const [record, erRecordMutationEvent] of dirtyRecordsAndEvents) {
|
|
290
|
-
await this.runComputation(source.computation, erRecordMutationEvent, record);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
async runComputation(computation, erRecordMutationEvent, record) {
|
|
294
|
-
if (computation.incrementalCompute) {
|
|
295
|
-
let lastValue = undefined;
|
|
296
|
-
if (computation.useLastValue) {
|
|
297
|
-
lastValue = await this.controller.retrieveLastValue(computation.dataContext, record);
|
|
298
|
-
}
|
|
299
|
-
const result = await computation.incrementalCompute(lastValue, erRecordMutationEvent, record);
|
|
300
|
-
// TODO 应用 result
|
|
301
|
-
await this.controller.applyResult(computation.dataContext, result, record);
|
|
302
|
-
}
|
|
303
|
-
else if (computation.incrementalPatchCompute) {
|
|
304
|
-
let lastValue = undefined;
|
|
305
|
-
if (computation.useLastValue) {
|
|
306
|
-
lastValue = await this.controller.retrieveLastValue(computation.dataContext, record);
|
|
307
|
-
}
|
|
308
|
-
const patch = await computation.incrementalPatchCompute(lastValue, erRecordMutationEvent, record);
|
|
309
|
-
if (patch) {
|
|
310
|
-
await this.controller.applyResultPatch(computation.dataContext, patch, record);
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
else {
|
|
314
|
-
const databasedComputation = computation;
|
|
315
|
-
// FIXME 需要注入 dataDeps
|
|
316
|
-
const result = await databasedComputation.compute();
|
|
317
|
-
// TODO 应用 result
|
|
318
|
-
await this.controller.applyResult(databasedComputation.dataContext, result, record);
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
buildDataSourceMapTree(sourceMaps) {
|
|
322
|
-
// 两层结构,第一层是 recordName,第二层是 type
|
|
323
|
-
const sourceMapTree = {};
|
|
324
|
-
sourceMaps.forEach(source => {
|
|
325
|
-
if (!sourceMapTree[source.recordName]) {
|
|
326
|
-
sourceMapTree[source.recordName] = {};
|
|
327
|
-
}
|
|
328
|
-
if (!sourceMapTree[source.recordName][source.type]) {
|
|
329
|
-
sourceMapTree[source.recordName][source.type] = [];
|
|
330
|
-
}
|
|
331
|
-
sourceMapTree[source.recordName][source.type].push(source);
|
|
332
|
-
});
|
|
333
|
-
return sourceMapTree;
|
|
334
|
-
}
|
|
335
|
-
convertDataDepToERMutationEventsSourceMap(dataDepName, dataDep, computation, eventType) {
|
|
336
|
-
const ERMutationEventsSource = [];
|
|
337
|
-
if (dataDep.type === 'records') {
|
|
338
|
-
if (!eventType || eventType === 'create') {
|
|
339
|
-
ERMutationEventsSource.push({
|
|
340
|
-
dataDep: dataDep,
|
|
341
|
-
type: 'create',
|
|
342
|
-
recordName: dataDep.source.name,
|
|
343
|
-
sourceRecordName: dataDep.source.name,
|
|
344
|
-
computation
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
if (!eventType || eventType === 'delete') {
|
|
348
|
-
ERMutationEventsSource.push({
|
|
349
|
-
dataDep: dataDep,
|
|
350
|
-
type: 'delete',
|
|
351
|
-
recordName: dataDep.source.name,
|
|
352
|
-
sourceRecordName: dataDep.source.name,
|
|
353
|
-
computation
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
if (!eventType || eventType === 'update') {
|
|
357
|
-
// 监听 update
|
|
358
|
-
if (dataDep.attributeQuery) {
|
|
359
|
-
ERMutationEventsSource.push(...this.convertAttrsToERMutationEventsSourceMap(dataDep, dataDep.source.name, dataDep.attributeQuery, [], computation));
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
else if (dataDep.type === 'property') {
|
|
364
|
-
// 只能监听 update eventType。
|
|
365
|
-
const dataContext = computation.dataContext;
|
|
366
|
-
if (dataDep.attributeQuery) {
|
|
367
|
-
// 注意这里的 recordName 应该是当前数据 entity 的 name,因为依赖的是 property 所在的自身 entity
|
|
368
|
-
ERMutationEventsSource.push(...this.convertAttrsToERMutationEventsSourceMap(dataDep, dataContext.host.name, dataDep.attributeQuery, [], computation));
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
else if (dataDep.type === 'global') {
|
|
372
|
-
// TODO global 怎么监听啊
|
|
373
|
-
// 只能监听 update eventType
|
|
374
|
-
}
|
|
375
|
-
return ERMutationEventsSource;
|
|
376
|
-
}
|
|
377
|
-
convertAttrsToERMutationEventsSourceMap(dataDep, baseRecordName, attributes, context, computation) {
|
|
378
|
-
const ERMutationEventsSource = [];
|
|
379
|
-
const primitiveAttr = [];
|
|
380
|
-
const relationQueryAttr = [];
|
|
381
|
-
attributes.forEach(attr => {
|
|
382
|
-
if (typeof attr === 'string' && attr !== '*') {
|
|
383
|
-
primitiveAttr.push(attr);
|
|
384
|
-
}
|
|
385
|
-
else if (attr === '*') {
|
|
386
|
-
// TODO 要读定义
|
|
387
|
-
}
|
|
388
|
-
else if (Array.isArray(attr)) {
|
|
389
|
-
relationQueryAttr.push(attr);
|
|
390
|
-
}
|
|
391
|
-
else {
|
|
392
|
-
throw new Error(`unknown attribute type: ${attr}`);
|
|
393
|
-
}
|
|
394
|
-
});
|
|
395
|
-
// 自身的 attribute update
|
|
396
|
-
if (primitiveAttr.length > 0) {
|
|
397
|
-
let recordName = baseRecordName;
|
|
398
|
-
if (context.length > 0) {
|
|
399
|
-
if (context.at(-1) === '&') {
|
|
400
|
-
recordName = this.controller.system.storage.getRelationName(baseRecordName, context.slice(0, -1).join('.'));
|
|
401
|
-
}
|
|
402
|
-
else {
|
|
403
|
-
recordName = this.controller.system.storage.getEntityName(baseRecordName, context.join('.'));
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
ERMutationEventsSource.push({
|
|
407
|
-
dataDep,
|
|
408
|
-
type: 'update',
|
|
409
|
-
recordName,
|
|
410
|
-
sourceRecordName: baseRecordName,
|
|
411
|
-
targetPath: context,
|
|
412
|
-
attributes: primitiveAttr,
|
|
413
|
-
computation
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
// 关联 record 字段的更新
|
|
417
|
-
relationQueryAttr.forEach(([attrName, subQuery]) => {
|
|
418
|
-
ERMutationEventsSource.push(...this.convertRelationAttrToERMutationEventsSourceMap(dataDep, baseRecordName, subQuery.attributeQuery, context.concat(attrName), computation));
|
|
419
|
-
});
|
|
420
|
-
return ERMutationEventsSource;
|
|
421
|
-
}
|
|
422
|
-
convertRelationAttrToERMutationEventsSourceMap(dataDep, baseRecordName, subAttrs, context, computation) {
|
|
423
|
-
const ERMutationEventsSource = [];
|
|
424
|
-
if (context.at(-1) !== '&') {
|
|
425
|
-
// 1. 先监听"关联实体关系"的 create/delete
|
|
426
|
-
const realtionRecordName = this.controller.system.storage.getRelationName(baseRecordName, context.join('.'));
|
|
427
|
-
ERMutationEventsSource.push({
|
|
428
|
-
dataDep,
|
|
429
|
-
type: 'create',
|
|
430
|
-
recordName: realtionRecordName,
|
|
431
|
-
sourceRecordName: baseRecordName,
|
|
432
|
-
isRelation: true,
|
|
433
|
-
targetPath: context,
|
|
434
|
-
computation
|
|
435
|
-
}, {
|
|
436
|
-
dataDep,
|
|
437
|
-
type: 'delete',
|
|
438
|
-
recordName: realtionRecordName,
|
|
439
|
-
sourceRecordName: baseRecordName,
|
|
440
|
-
isRelation: true,
|
|
441
|
-
targetPath: context,
|
|
442
|
-
computation
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
// 2. 监听关联实体的属性 update
|
|
446
|
-
if (subAttrs.length > 0) {
|
|
447
|
-
ERMutationEventsSource.push(...this.convertAttrsToERMutationEventsSourceMap(dataDep, baseRecordName, subAttrs, context, computation));
|
|
448
|
-
}
|
|
449
|
-
return ERMutationEventsSource;
|
|
450
|
-
}
|
|
451
|
-
async setup() {
|
|
452
|
-
await this.setupDefaultValues();
|
|
453
|
-
await this.setupStateDefaultValues();
|
|
454
|
-
await this.setupMutationListeners();
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
//# sourceMappingURL=Scheduler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Scheduler.js","sourceRoot":"","sources":["../../src/runtime/Scheduler.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,kBAAkB,EAA+D,MAAM,6CAA6C,CAAC;AAG3J,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAiG,g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,kBAAkB;gBAC9B,gBAAgB,EAAE,cAAc;gBAChC,UAAU,EAAE,IAAI;gBAChB,UAAU,EAAE,OAAO;gBACnB,WAAW;aACd,EAAE;gBACC,OAAO;gBACP,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,kBAAkB;gBAC9B,gBAAgB,EAAE,cAAc;gBAChC,UAAU,EAAE,IAAI;gBAChB,UAAU,EAAE,OAAO;gBACnB,WAAW;aACd,CAAC,CAAA;QACN,CAAC;QACD,sBAAsB;QACtB,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,sBAAsB,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,uCAAuC,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAA;QACzI,CAAC;QAED,OAAO,sBAAsB,CAAA;IAGjC,CAAC;IACD,KAAK,CAAC,KAAK;QACP,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAC/B,MAAM,IAAI,CAAC,uBAAuB,EAAE,CAAA;QACpC,MAAM,IAAI,CAAC,sBAAsB,EAAE,CAAA;IACvC,CAAC;CAEJ"}
|
package/dist/runtime/System.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { Entity, Property } from "@shared";
|
|
2
|
-
export const SYSTEM_RECORD = '_System_';
|
|
3
|
-
export const EVENT_RECORD = '_Event_';
|
|
4
|
-
export const ACTIVITY_RECORD = '_Activity_';
|
|
5
|
-
export const ID_ATTR = 'id';
|
|
6
|
-
export const ROW_ID_ATTR = '_rowId';
|
|
7
|
-
// state 等系统配置数据的实体化
|
|
8
|
-
// FIXME 应该独立到外部
|
|
9
|
-
export const SystemEntity = Entity.create({
|
|
10
|
-
name: SYSTEM_RECORD,
|
|
11
|
-
properties: [
|
|
12
|
-
Property.create({
|
|
13
|
-
name: 'concept',
|
|
14
|
-
type: 'string',
|
|
15
|
-
collection: false,
|
|
16
|
-
}),
|
|
17
|
-
Property.create({
|
|
18
|
-
name: 'key',
|
|
19
|
-
type: 'string',
|
|
20
|
-
collection: false,
|
|
21
|
-
}),
|
|
22
|
-
Property.create({
|
|
23
|
-
name: 'value',
|
|
24
|
-
type: 'string',
|
|
25
|
-
collection: false,
|
|
26
|
-
})
|
|
27
|
-
]
|
|
28
|
-
});
|
|
29
|
-
// event 的实体化
|
|
30
|
-
export const InteractionEventEntity = Entity.create({
|
|
31
|
-
name: EVENT_RECORD,
|
|
32
|
-
properties: [
|
|
33
|
-
Property.create({
|
|
34
|
-
name: 'interactionId',
|
|
35
|
-
type: 'string',
|
|
36
|
-
collection: false,
|
|
37
|
-
}),
|
|
38
|
-
Property.create({
|
|
39
|
-
name: 'interactionName',
|
|
40
|
-
type: 'string',
|
|
41
|
-
collection: false,
|
|
42
|
-
}),
|
|
43
|
-
Property.create({
|
|
44
|
-
name: 'activityId',
|
|
45
|
-
type: 'string',
|
|
46
|
-
collection: false,
|
|
47
|
-
}),
|
|
48
|
-
Property.create({
|
|
49
|
-
name: 'payload',
|
|
50
|
-
type: 'object',
|
|
51
|
-
collection: false,
|
|
52
|
-
}),
|
|
53
|
-
Property.create({
|
|
54
|
-
name: 'user',
|
|
55
|
-
type: 'object',
|
|
56
|
-
collection: false,
|
|
57
|
-
}),
|
|
58
|
-
Property.create({
|
|
59
|
-
name: 'query',
|
|
60
|
-
type: 'object',
|
|
61
|
-
collection: false,
|
|
62
|
-
}),
|
|
63
|
-
]
|
|
64
|
-
});
|
|
65
|
-
export const ActivityStateEntity = Entity.create({
|
|
66
|
-
name: ACTIVITY_RECORD,
|
|
67
|
-
properties: [
|
|
68
|
-
Property.create({
|
|
69
|
-
name: 'name',
|
|
70
|
-
type: 'string',
|
|
71
|
-
collection: false,
|
|
72
|
-
}),
|
|
73
|
-
Property.create({
|
|
74
|
-
name: 'uuid',
|
|
75
|
-
type: 'string',
|
|
76
|
-
collection: false,
|
|
77
|
-
}),
|
|
78
|
-
Property.create({
|
|
79
|
-
name: 'state',
|
|
80
|
-
type: 'string',
|
|
81
|
-
collection: false,
|
|
82
|
-
}),
|
|
83
|
-
Property.create({
|
|
84
|
-
name: 'refs',
|
|
85
|
-
type: 'string',
|
|
86
|
-
collection: false,
|
|
87
|
-
})
|
|
88
|
-
]
|
|
89
|
-
});
|
|
90
|
-
//# sourceMappingURL=System.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"System.js","sourceRoot":"","sources":["../../src/runtime/System.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,EAAiB,QAAQ,EAAW,MAAM,SAAS,CAAC;AAQ/E,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAA;AACvC,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAA;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAA;AAiF3C,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,CAAA;AAC3B,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAA;AAsBnC,oBAAoB;AACpB,gBAAgB;AAChB,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,aAAa;IACnB,UAAU,EAAE;QACR,QAAQ,CAAC,MAAM,CAAC;YACZ,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,KAAK;SACpB,CAAC;QACF,QAAQ,CAAC,MAAM,CAAC;YACZ,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,KAAK;SACpB,CAAC;QACF,QAAQ,CAAC,MAAM,CAAC;YACZ,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,KAAK;SACpB,CAAC;KACL;CACJ,CAAC,CAAA;AAqBF,aAAa;AACb,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,YAAY;IAClB,UAA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AAE,QAAQ;YACd,UAAU,EAAE,KAAK;SACpB,CAAC;KACL;CACJ,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"asyncInteractionContext.js","sourceRoot":"","sources":["../../src/runtime/asyncInteractionContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { parse as parseStr } from 'acorn';
|
|
2
|
-
import { indexBy } from "./util.js";
|
|
3
|
-
export const OperatorNames = {
|
|
4
|
-
'||': '||',
|
|
5
|
-
'&&': '&&',
|
|
6
|
-
'!': '!',
|
|
7
|
-
};
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
function astNodeToAttrNode(astNode, optionsByName) {
|
|
10
|
-
if (astNode.type === "LogicalExpression") {
|
|
11
|
-
return {
|
|
12
|
-
type: "group" /* BoolExpressionNodeTypes.group */,
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
op: OperatorNames[astNode.operator],
|
|
15
|
-
left: astNodeToAttrNode(astNode.left, optionsByName),
|
|
16
|
-
right: astNodeToAttrNode(astNode.right, optionsByName)
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
else if (astNode.type === "Identifier") {
|
|
20
|
-
return {
|
|
21
|
-
type: "variable" /* BoolExpressionNodeTypes.variable */,
|
|
22
|
-
name: astNode.name,
|
|
23
|
-
uuid: optionsByName[astNode.name]?.uuid
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
else if (astNode.type === "UnaryExpression") {
|
|
27
|
-
return {
|
|
28
|
-
type: "group" /* BoolExpressionNodeTypes.group */,
|
|
29
|
-
op: OperatorNames['!'],
|
|
30
|
-
left: astNodeToAttrNode(astNode.argument, optionsByName)
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
throw new Error('unknown ast node type');
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
export function parse(exp, options = []) {
|
|
38
|
-
const optionsByName = indexBy(options, 'name');
|
|
39
|
-
const ast = parseStr(exp, { ecmaVersion: 2020 });
|
|
40
|
-
// @ts-ignore
|
|
41
|
-
return astNodeToAttrNode(ast.body[0].expression, optionsByName);
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=boolExpression.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boolExpression.js","sourceRoot":"","sources":["../../src/runtime/boolExpression.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,IAAI,QAAQ,EAAC,MAAM,OAAO,CAAA;AACvC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAGlC,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,GAAG,EAAE,GAAG;CACX,CAAA;AAuBD,aAAa;AACb,SAAS,iBAAiB,CAAC,OAAO,EAAE,aAAa;IAC7C,IAAI,OAAO,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;QACvC,OAAO;YACH,IAAI,6CAA+B;YACnC,aAAa;YACb,EAAE,EAAE,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC;YACnC,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC,IAAI,EAAE,aAAa,CAAC;YACpD,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC;SACzD,CAAA;IACL,CAAC;SAAM,IAAI,OAAO,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QACvC,OAAO;YACH,IAAI,mDAAkC;YACtC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI;SAC1C,CAAA;IACL,CAAC;SAAM,IAAI,OAAO,CAAC,IAAI,KA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