@flowgram.ai/variable-core 0.1.31 → 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/dist/esm/index.js +52 -27
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +30 -13
- package/dist/index.d.ts +30 -13
- package/dist/index.js +68 -43
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -360,7 +360,7 @@ declare enum ASTKind {
|
|
|
360
360
|
*/
|
|
361
361
|
KeyPathExpression = "KeyPathExpression",
|
|
362
362
|
EnumerateExpression = "EnumerateExpression",
|
|
363
|
-
|
|
363
|
+
WrapArrayExpression = "WrapArrayExpression",
|
|
364
364
|
/**
|
|
365
365
|
* 通用 AST 节点
|
|
366
366
|
*/
|
|
@@ -497,7 +497,7 @@ declare class MapNode extends ASTNode<MapNodeJSON> {
|
|
|
497
497
|
declare abstract class BaseType<JSON extends ASTNodeJSON = any, InjectOpts = any> extends ASTNode<JSON, InjectOpts> {
|
|
498
498
|
flags: number;
|
|
499
499
|
/**
|
|
500
|
-
*
|
|
500
|
+
* 类型是否一致
|
|
501
501
|
* @param targetTypeJSON
|
|
502
502
|
*/
|
|
503
503
|
isTypeEqual(targetTypeJSONOrKind?: ASTNodeJSONOrKind): boolean;
|
|
@@ -506,6 +506,10 @@ declare abstract class BaseType<JSON extends ASTNodeJSON = any, InjectOpts = any
|
|
|
506
506
|
* @param keyPath
|
|
507
507
|
*/
|
|
508
508
|
getByKeyPath(keyPath?: string[]): BaseVariableField | undefined;
|
|
509
|
+
/**
|
|
510
|
+
* Get AST JSON for current base type
|
|
511
|
+
* @returns
|
|
512
|
+
*/
|
|
509
513
|
toJSON(): ASTNodeJSON;
|
|
510
514
|
}
|
|
511
515
|
|
|
@@ -662,16 +666,6 @@ declare abstract class BaseExpression<JSON extends ASTNodeJSON = any, InjectOpts
|
|
|
662
666
|
constructor(params: CreateASTParams, opts?: InjectOpts);
|
|
663
667
|
}
|
|
664
668
|
|
|
665
|
-
interface ExpressionListJSON {
|
|
666
|
-
expressions: ASTNodeJSON[];
|
|
667
|
-
}
|
|
668
|
-
declare class ExpressionList extends ASTNode<ExpressionListJSON> {
|
|
669
|
-
static kind: string;
|
|
670
|
-
expressions: ASTNode[];
|
|
671
|
-
fromJSON({ expressions }: ExpressionListJSON): void;
|
|
672
|
-
toJSON(): ASTNodeJSON;
|
|
673
|
-
}
|
|
674
|
-
|
|
675
669
|
interface KeyPathExpressionJSON$1 {
|
|
676
670
|
keyPath: string[];
|
|
677
671
|
}
|
|
@@ -738,6 +732,25 @@ declare class KeyPathExpressionV2<CustomPathJSON extends ASTNodeJSON = KeyPathEx
|
|
|
738
732
|
toJSON(): ASTNodeJSON;
|
|
739
733
|
}
|
|
740
734
|
|
|
735
|
+
interface WrapArrayExpressionJSON {
|
|
736
|
+
wrapFor: ASTNodeJSON;
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* 遍历表达式,对列表进行遍历,获取遍历后的变量类型
|
|
740
|
+
*/
|
|
741
|
+
declare class WrapArrayExpression extends BaseExpression<WrapArrayExpressionJSON> {
|
|
742
|
+
static kind: string;
|
|
743
|
+
protected _wrapFor: BaseExpression | undefined;
|
|
744
|
+
protected _returnType: BaseType | undefined;
|
|
745
|
+
get wrapFor(): BaseExpression<any, any> | undefined;
|
|
746
|
+
get returnType(): BaseType | undefined;
|
|
747
|
+
refreshReturnType(): void;
|
|
748
|
+
getRefFields(): [];
|
|
749
|
+
fromJSON({ wrapFor: expression }: WrapArrayExpressionJSON): void;
|
|
750
|
+
toJSON(): ASTNodeJSON;
|
|
751
|
+
protected init(): void;
|
|
752
|
+
}
|
|
753
|
+
|
|
741
754
|
/**
|
|
742
755
|
* 声明类 AST 节点
|
|
743
756
|
*/
|
|
@@ -897,6 +910,10 @@ declare namespace ASTFactory {
|
|
|
897
910
|
keyPath: string[];
|
|
898
911
|
kind: ASTKind;
|
|
899
912
|
};
|
|
913
|
+
const createWrapArrayExpression: (json: WrapArrayExpressionJSON) => {
|
|
914
|
+
wrapFor: ASTNodeJSON;
|
|
915
|
+
kind: ASTKind;
|
|
916
|
+
};
|
|
900
917
|
/**
|
|
901
918
|
* 通过 AST Class 创建
|
|
902
919
|
*/
|
|
@@ -1044,4 +1061,4 @@ declare class VariableFieldKeyRenameService {
|
|
|
1044
1061
|
dispose(): void;
|
|
1045
1062
|
}
|
|
1046
1063
|
|
|
1047
|
-
export { ASTFactory, ASTKind, ASTMatch, ASTNode, ASTNodeFlags, type ASTNodeJSON, type ASTNodeRegistry, ASTRegisters, ArrayType, BaseExpression, BaseType, BaseVariableField, BooleanType, type CreateASTParams, CustomType, type CustomTypeJSON, DataNode, EnumerateExpression, type EnumerateExpressionJSON,
|
|
1064
|
+
export { ASTFactory, ASTKind, ASTMatch, ASTNode, ASTNodeFlags, type ASTNodeJSON, type ASTNodeRegistry, ASTRegisters, ArrayType, BaseExpression, BaseType, BaseVariableField, BooleanType, type CreateASTParams, CustomType, type CustomTypeJSON, DataNode, EnumerateExpression, type EnumerateExpressionJSON, type GetKindJSON, type GetKindJSONOrKind, type GlobalEventActionType, type IVariableTable, IntegerType, KeyPathExpression, type KeyPathExpressionJSON$1 as KeyPathExpressionJSON, KeyPathExpressionV2, ListNode, type ListNodeJSON, MapNode, type MapNodeJSON, MapType, NumberType, type ObjectJSON, type ObjectPropertiesChangeAction, ObjectType, Property, type PropertyJSON, Scope, ScopeChain, ScopeOutputData, ScopeProvider, StringType, type UnionJSON, VariableContainerModule, VariableDeclaration, type VariableDeclarationJSON, VariableDeclarationList, type VariableDeclarationListChangeAction, type VariableDeclarationListJSON, VariableEngine, VariableEngineProvider, VariableFieldKeyRenameService, WrapArrayExpression, type WrapArrayExpressionJSON, injectToAST, isMatchAST, postConstructAST, useAvailableVariables, useCurrentScope, useScopeAvailable, useScopeContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -360,7 +360,7 @@ declare enum ASTKind {
|
|
|
360
360
|
*/
|
|
361
361
|
KeyPathExpression = "KeyPathExpression",
|
|
362
362
|
EnumerateExpression = "EnumerateExpression",
|
|
363
|
-
|
|
363
|
+
WrapArrayExpression = "WrapArrayExpression",
|
|
364
364
|
/**
|
|
365
365
|
* 通用 AST 节点
|
|
366
366
|
*/
|
|
@@ -497,7 +497,7 @@ declare class MapNode extends ASTNode<MapNodeJSON> {
|
|
|
497
497
|
declare abstract class BaseType<JSON extends ASTNodeJSON = any, InjectOpts = any> extends ASTNode<JSON, InjectOpts> {
|
|
498
498
|
flags: number;
|
|
499
499
|
/**
|
|
500
|
-
*
|
|
500
|
+
* 类型是否一致
|
|
501
501
|
* @param targetTypeJSON
|
|
502
502
|
*/
|
|
503
503
|
isTypeEqual(targetTypeJSONOrKind?: ASTNodeJSONOrKind): boolean;
|
|
@@ -506,6 +506,10 @@ declare abstract class BaseType<JSON extends ASTNodeJSON = any, InjectOpts = any
|
|
|
506
506
|
* @param keyPath
|
|
507
507
|
*/
|
|
508
508
|
getByKeyPath(keyPath?: string[]): BaseVariableField | undefined;
|
|
509
|
+
/**
|
|
510
|
+
* Get AST JSON for current base type
|
|
511
|
+
* @returns
|
|
512
|
+
*/
|
|
509
513
|
toJSON(): ASTNodeJSON;
|
|
510
514
|
}
|
|
511
515
|
|
|
@@ -662,16 +666,6 @@ declare abstract class BaseExpression<JSON extends ASTNodeJSON = any, InjectOpts
|
|
|
662
666
|
constructor(params: CreateASTParams, opts?: InjectOpts);
|
|
663
667
|
}
|
|
664
668
|
|
|
665
|
-
interface ExpressionListJSON {
|
|
666
|
-
expressions: ASTNodeJSON[];
|
|
667
|
-
}
|
|
668
|
-
declare class ExpressionList extends ASTNode<ExpressionListJSON> {
|
|
669
|
-
static kind: string;
|
|
670
|
-
expressions: ASTNode[];
|
|
671
|
-
fromJSON({ expressions }: ExpressionListJSON): void;
|
|
672
|
-
toJSON(): ASTNodeJSON;
|
|
673
|
-
}
|
|
674
|
-
|
|
675
669
|
interface KeyPathExpressionJSON$1 {
|
|
676
670
|
keyPath: string[];
|
|
677
671
|
}
|
|
@@ -738,6 +732,25 @@ declare class KeyPathExpressionV2<CustomPathJSON extends ASTNodeJSON = KeyPathEx
|
|
|
738
732
|
toJSON(): ASTNodeJSON;
|
|
739
733
|
}
|
|
740
734
|
|
|
735
|
+
interface WrapArrayExpressionJSON {
|
|
736
|
+
wrapFor: ASTNodeJSON;
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* 遍历表达式,对列表进行遍历,获取遍历后的变量类型
|
|
740
|
+
*/
|
|
741
|
+
declare class WrapArrayExpression extends BaseExpression<WrapArrayExpressionJSON> {
|
|
742
|
+
static kind: string;
|
|
743
|
+
protected _wrapFor: BaseExpression | undefined;
|
|
744
|
+
protected _returnType: BaseType | undefined;
|
|
745
|
+
get wrapFor(): BaseExpression<any, any> | undefined;
|
|
746
|
+
get returnType(): BaseType | undefined;
|
|
747
|
+
refreshReturnType(): void;
|
|
748
|
+
getRefFields(): [];
|
|
749
|
+
fromJSON({ wrapFor: expression }: WrapArrayExpressionJSON): void;
|
|
750
|
+
toJSON(): ASTNodeJSON;
|
|
751
|
+
protected init(): void;
|
|
752
|
+
}
|
|
753
|
+
|
|
741
754
|
/**
|
|
742
755
|
* 声明类 AST 节点
|
|
743
756
|
*/
|
|
@@ -897,6 +910,10 @@ declare namespace ASTFactory {
|
|
|
897
910
|
keyPath: string[];
|
|
898
911
|
kind: ASTKind;
|
|
899
912
|
};
|
|
913
|
+
const createWrapArrayExpression: (json: WrapArrayExpressionJSON) => {
|
|
914
|
+
wrapFor: ASTNodeJSON;
|
|
915
|
+
kind: ASTKind;
|
|
916
|
+
};
|
|
900
917
|
/**
|
|
901
918
|
* 通过 AST Class 创建
|
|
902
919
|
*/
|
|
@@ -1044,4 +1061,4 @@ declare class VariableFieldKeyRenameService {
|
|
|
1044
1061
|
dispose(): void;
|
|
1045
1062
|
}
|
|
1046
1063
|
|
|
1047
|
-
export { ASTFactory, ASTKind, ASTMatch, ASTNode, ASTNodeFlags, type ASTNodeJSON, type ASTNodeRegistry, ASTRegisters, ArrayType, BaseExpression, BaseType, BaseVariableField, BooleanType, type CreateASTParams, CustomType, type CustomTypeJSON, DataNode, EnumerateExpression, type EnumerateExpressionJSON,
|
|
1064
|
+
export { ASTFactory, ASTKind, ASTMatch, ASTNode, ASTNodeFlags, type ASTNodeJSON, type ASTNodeRegistry, ASTRegisters, ArrayType, BaseExpression, BaseType, BaseVariableField, BooleanType, type CreateASTParams, CustomType, type CustomTypeJSON, DataNode, EnumerateExpression, type EnumerateExpressionJSON, type GetKindJSON, type GetKindJSONOrKind, type GlobalEventActionType, type IVariableTable, IntegerType, KeyPathExpression, type KeyPathExpressionJSON$1 as KeyPathExpressionJSON, KeyPathExpressionV2, ListNode, type ListNodeJSON, MapNode, type MapNodeJSON, MapType, NumberType, type ObjectJSON, type ObjectPropertiesChangeAction, ObjectType, Property, type PropertyJSON, Scope, ScopeChain, ScopeOutputData, ScopeProvider, StringType, type UnionJSON, VariableContainerModule, VariableDeclaration, type VariableDeclarationJSON, VariableDeclarationList, type VariableDeclarationListChangeAction, type VariableDeclarationListJSON, VariableEngine, VariableEngineProvider, VariableFieldKeyRenameService, WrapArrayExpression, type WrapArrayExpressionJSON, injectToAST, isMatchAST, postConstructAST, useAvailableVariables, useCurrentScope, useScopeAvailable, useScopeContext };
|
package/dist/index.js
CHANGED
|
@@ -43,7 +43,6 @@ __export(src_exports, {
|
|
|
43
43
|
CustomType: () => CustomType,
|
|
44
44
|
DataNode: () => DataNode,
|
|
45
45
|
EnumerateExpression: () => EnumerateExpression,
|
|
46
|
-
ExpressionList: () => ExpressionList,
|
|
47
46
|
IntegerType: () => IntegerType,
|
|
48
47
|
KeyPathExpression: () => KeyPathExpression,
|
|
49
48
|
KeyPathExpressionV2: () => KeyPathExpressionV2,
|
|
@@ -64,6 +63,7 @@ __export(src_exports, {
|
|
|
64
63
|
VariableEngine: () => VariableEngine,
|
|
65
64
|
VariableEngineProvider: () => VariableEngineProvider,
|
|
66
65
|
VariableFieldKeyRenameService: () => VariableFieldKeyRenameService,
|
|
66
|
+
WrapArrayExpression: () => WrapArrayExpression,
|
|
67
67
|
injectToAST: () => injectToAST,
|
|
68
68
|
isMatchAST: () => isMatchAST,
|
|
69
69
|
postConstructAST: () => postConstructAST,
|
|
@@ -75,11 +75,11 @@ __export(src_exports, {
|
|
|
75
75
|
module.exports = __toCommonJS(src_exports);
|
|
76
76
|
|
|
77
77
|
// src/variable-container-module.ts
|
|
78
|
-
var
|
|
78
|
+
var import_inversify8 = require("inversify");
|
|
79
79
|
|
|
80
80
|
// src/variable-engine.ts
|
|
81
81
|
var import_rxjs6 = require("rxjs");
|
|
82
|
-
var
|
|
82
|
+
var import_inversify6 = require("inversify");
|
|
83
83
|
var import_utils8 = require("@flowgram.ai/utils");
|
|
84
84
|
var import_utils9 = require("@flowgram.ai/utils");
|
|
85
85
|
|
|
@@ -281,7 +281,7 @@ var ASTKind = /* @__PURE__ */ ((ASTKind2) => {
|
|
|
281
281
|
ASTKind2["VariableDeclarationList"] = "VariableDeclarationList";
|
|
282
282
|
ASTKind2["KeyPathExpression"] = "KeyPathExpression";
|
|
283
283
|
ASTKind2["EnumerateExpression"] = "EnumerateExpression";
|
|
284
|
-
ASTKind2["
|
|
284
|
+
ASTKind2["WrapArrayExpression"] = "WrapArrayExpression";
|
|
285
285
|
ASTKind2["ListNode"] = "ListNode";
|
|
286
286
|
ASTKind2["DataNode"] = "DataNode";
|
|
287
287
|
ASTKind2["MapNode"] = "MapNode";
|
|
@@ -290,7 +290,7 @@ var ASTKind = /* @__PURE__ */ ((ASTKind2) => {
|
|
|
290
290
|
|
|
291
291
|
// src/ast/ast-registers.ts
|
|
292
292
|
var import_lodash3 = require("lodash");
|
|
293
|
-
var
|
|
293
|
+
var import_inversify3 = require("inversify");
|
|
294
294
|
|
|
295
295
|
// src/ast/utils/inversify.ts
|
|
296
296
|
var injectToAST = (serviceIdentifier) => function(target, propertyKey) {
|
|
@@ -615,7 +615,7 @@ var BaseType = class extends ASTNode {
|
|
|
615
615
|
this.flags = 8 /* BasicType */;
|
|
616
616
|
}
|
|
617
617
|
/**
|
|
618
|
-
*
|
|
618
|
+
* 类型是否一致
|
|
619
619
|
* @param targetTypeJSON
|
|
620
620
|
*/
|
|
621
621
|
isTypeEqual(targetTypeJSONOrKind) {
|
|
@@ -634,6 +634,10 @@ var BaseType = class extends ASTNode {
|
|
|
634
634
|
getByKeyPath(keyPath = []) {
|
|
635
635
|
throw new Error(`Get By Key Path is not implemented for Type: ${this.kind}`);
|
|
636
636
|
}
|
|
637
|
+
/**
|
|
638
|
+
* Get AST JSON for current base type
|
|
639
|
+
* @returns
|
|
640
|
+
*/
|
|
637
641
|
toJSON() {
|
|
638
642
|
return {
|
|
639
643
|
kind: this.kind
|
|
@@ -961,29 +965,6 @@ var BaseExpression = class extends ASTNode {
|
|
|
961
965
|
}
|
|
962
966
|
};
|
|
963
967
|
|
|
964
|
-
// src/ast/expression/expression-list.ts
|
|
965
|
-
var ExpressionList = class extends ASTNode {
|
|
966
|
-
fromJSON({ expressions }) {
|
|
967
|
-
this.expressions = expressions.map((_expression, idx) => {
|
|
968
|
-
const prevExpression = this.expressions[idx];
|
|
969
|
-
if (prevExpression.kind !== _expression.kind) {
|
|
970
|
-
prevExpression.dispose();
|
|
971
|
-
this.fireChange();
|
|
972
|
-
return this.createChildNode(_expression);
|
|
973
|
-
}
|
|
974
|
-
prevExpression.fromJSON(_expression);
|
|
975
|
-
return prevExpression;
|
|
976
|
-
});
|
|
977
|
-
}
|
|
978
|
-
toJSON() {
|
|
979
|
-
return {
|
|
980
|
-
kind: "ExpressionList" /* ExpressionList */,
|
|
981
|
-
properties: this.expressions.map((_expression) => _expression.toJSON())
|
|
982
|
-
};
|
|
983
|
-
}
|
|
984
|
-
};
|
|
985
|
-
ExpressionList.kind = "ExpressionList" /* ExpressionList */;
|
|
986
|
-
|
|
987
968
|
// src/ast/expression/keypath-expression.ts
|
|
988
969
|
var import_fast_equals3 = require("fast-equals");
|
|
989
970
|
var KeyPathExpression = class extends BaseExpression {
|
|
@@ -1165,6 +1146,46 @@ var KeyPathExpressionV2 = class extends BaseExpression {
|
|
|
1165
1146
|
};
|
|
1166
1147
|
KeyPathExpressionV2.kind = "KeyPathExpression" /* KeyPathExpression */;
|
|
1167
1148
|
|
|
1149
|
+
// src/ast/expression/wrap-array-expression.ts
|
|
1150
|
+
var WrapArrayExpression = class extends BaseExpression {
|
|
1151
|
+
get wrapFor() {
|
|
1152
|
+
return this._wrapFor;
|
|
1153
|
+
}
|
|
1154
|
+
get returnType() {
|
|
1155
|
+
return this._returnType;
|
|
1156
|
+
}
|
|
1157
|
+
refreshReturnType() {
|
|
1158
|
+
const childReturnTypeJSON = this.wrapFor?.returnType?.toJSON();
|
|
1159
|
+
this.updateChildNodeByKey("_returnType", {
|
|
1160
|
+
kind: "Array" /* Array */,
|
|
1161
|
+
items: childReturnTypeJSON
|
|
1162
|
+
});
|
|
1163
|
+
}
|
|
1164
|
+
getRefFields() {
|
|
1165
|
+
return [];
|
|
1166
|
+
}
|
|
1167
|
+
fromJSON({ wrapFor: expression }) {
|
|
1168
|
+
this.updateChildNodeByKey("_wrapFor", expression);
|
|
1169
|
+
}
|
|
1170
|
+
toJSON() {
|
|
1171
|
+
return {
|
|
1172
|
+
kind: "WrapArrayExpression" /* WrapArrayExpression */,
|
|
1173
|
+
wrapFor: this.wrapFor?.toJSON()
|
|
1174
|
+
};
|
|
1175
|
+
}
|
|
1176
|
+
init() {
|
|
1177
|
+
this.toDispose.push(
|
|
1178
|
+
this.subscribe(this.refreshReturnType, {
|
|
1179
|
+
selector: (curr) => curr.wrapFor?.returnType
|
|
1180
|
+
})
|
|
1181
|
+
);
|
|
1182
|
+
}
|
|
1183
|
+
};
|
|
1184
|
+
WrapArrayExpression.kind = "WrapArrayExpression" /* WrapArrayExpression */;
|
|
1185
|
+
__decorateClass([
|
|
1186
|
+
postConstructAST()
|
|
1187
|
+
], WrapArrayExpression.prototype, "init", 1);
|
|
1188
|
+
|
|
1168
1189
|
// src/ast/declaration/base-variable-field.ts
|
|
1169
1190
|
var import_fast_equals5 = require("fast-equals");
|
|
1170
1191
|
var BaseVariableField = class extends ASTNode {
|
|
@@ -1471,7 +1492,7 @@ var ASTRegisters = class {
|
|
|
1471
1492
|
this.registerAST(VariableDeclarationList);
|
|
1472
1493
|
this.registerAST(KeyPathExpression);
|
|
1473
1494
|
this.registerAST(EnumerateExpression);
|
|
1474
|
-
this.registerAST(
|
|
1495
|
+
this.registerAST(WrapArrayExpression);
|
|
1475
1496
|
this.registerAST(MapNode);
|
|
1476
1497
|
this.registerAST(DataNode);
|
|
1477
1498
|
}
|
|
@@ -1524,7 +1545,7 @@ var ASTRegisters = class {
|
|
|
1524
1545
|
}
|
|
1525
1546
|
};
|
|
1526
1547
|
ASTRegisters = __decorateClass([
|
|
1527
|
-
(0,
|
|
1548
|
+
(0, import_inversify3.injectable)()
|
|
1528
1549
|
], ASTRegisters);
|
|
1529
1550
|
|
|
1530
1551
|
// src/ast/factory.ts
|
|
@@ -1574,6 +1595,10 @@ var ASTFactory;
|
|
|
1574
1595
|
kind: "KeyPathExpression" /* KeyPathExpression */,
|
|
1575
1596
|
...json
|
|
1576
1597
|
});
|
|
1598
|
+
ASTFactory2.createWrapArrayExpression = (json) => ({
|
|
1599
|
+
kind: "WrapArrayExpression" /* WrapArrayExpression */,
|
|
1600
|
+
...json
|
|
1601
|
+
});
|
|
1577
1602
|
ASTFactory2.create = (targetType, json) => ({ kind: targetType.kind, ...json });
|
|
1578
1603
|
})(ASTFactory || (ASTFactory = {}));
|
|
1579
1604
|
|
|
@@ -1946,20 +1971,20 @@ var VariableEngine = class {
|
|
|
1946
1971
|
}
|
|
1947
1972
|
};
|
|
1948
1973
|
__decorateClass([
|
|
1949
|
-
(0,
|
|
1974
|
+
(0, import_inversify6.inject)(ContainerProvider)
|
|
1950
1975
|
], VariableEngine.prototype, "containerProvider", 2);
|
|
1951
1976
|
__decorateClass([
|
|
1952
|
-
(0,
|
|
1977
|
+
(0, import_inversify6.preDestroy)()
|
|
1953
1978
|
], VariableEngine.prototype, "dispose", 1);
|
|
1954
1979
|
VariableEngine = __decorateClass([
|
|
1955
|
-
(0,
|
|
1956
|
-
__decorateParam(0, (0,
|
|
1957
|
-
__decorateParam(1, (0,
|
|
1980
|
+
(0, import_inversify6.injectable)(),
|
|
1981
|
+
__decorateParam(0, (0, import_inversify6.inject)(ScopeChain)),
|
|
1982
|
+
__decorateParam(1, (0, import_inversify6.inject)(ASTRegisters))
|
|
1958
1983
|
], VariableEngine);
|
|
1959
1984
|
|
|
1960
1985
|
// src/services/variable-field-key-rename-service.ts
|
|
1961
1986
|
var import_lodash5 = require("lodash");
|
|
1962
|
-
var
|
|
1987
|
+
var import_inversify7 = require("inversify");
|
|
1963
1988
|
var import_utils10 = require("@flowgram.ai/utils");
|
|
1964
1989
|
var VariableFieldKeyRenameService = class {
|
|
1965
1990
|
constructor() {
|
|
@@ -2025,20 +2050,20 @@ var VariableFieldKeyRenameService = class {
|
|
|
2025
2050
|
}
|
|
2026
2051
|
};
|
|
2027
2052
|
__decorateClass([
|
|
2028
|
-
(0,
|
|
2053
|
+
(0, import_inversify7.inject)(VariableEngine)
|
|
2029
2054
|
], VariableFieldKeyRenameService.prototype, "variableEngine", 2);
|
|
2030
2055
|
__decorateClass([
|
|
2031
|
-
(0,
|
|
2056
|
+
(0, import_inversify7.postConstruct)()
|
|
2032
2057
|
], VariableFieldKeyRenameService.prototype, "init", 1);
|
|
2033
2058
|
__decorateClass([
|
|
2034
|
-
(0,
|
|
2059
|
+
(0, import_inversify7.preDestroy)()
|
|
2035
2060
|
], VariableFieldKeyRenameService.prototype, "dispose", 1);
|
|
2036
2061
|
VariableFieldKeyRenameService = __decorateClass([
|
|
2037
|
-
(0,
|
|
2062
|
+
(0, import_inversify7.injectable)()
|
|
2038
2063
|
], VariableFieldKeyRenameService);
|
|
2039
2064
|
|
|
2040
2065
|
// src/variable-container-module.ts
|
|
2041
|
-
var VariableContainerModule = new
|
|
2066
|
+
var VariableContainerModule = new import_inversify8.ContainerModule((bind) => {
|
|
2042
2067
|
bind(VariableEngine).toSelf().inSingletonScope();
|
|
2043
2068
|
bind(ASTRegisters).toSelf().inSingletonScope();
|
|
2044
2069
|
bind(VariableFieldKeyRenameService).toSelf().inSingletonScope();
|
|
@@ -2105,7 +2130,6 @@ function useAvailableVariables() {
|
|
|
2105
2130
|
CustomType,
|
|
2106
2131
|
DataNode,
|
|
2107
2132
|
EnumerateExpression,
|
|
2108
|
-
ExpressionList,
|
|
2109
2133
|
IntegerType,
|
|
2110
2134
|
KeyPathExpression,
|
|
2111
2135
|
KeyPathExpressionV2,
|
|
@@ -2126,6 +2150,7 @@ function useAvailableVariables() {
|
|
|
2126
2150
|
VariableEngine,
|
|
2127
2151
|
VariableEngineProvider,
|
|
2128
2152
|
VariableFieldKeyRenameService,
|
|
2153
|
+
WrapArrayExpression,
|
|
2129
2154
|
injectToAST,
|
|
2130
2155
|
isMatchAST,
|
|
2131
2156
|
postConstructAST,
|