@lcap/nasl 3.0.0-beta.5 → 3.0.0-beta.6
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/out/concepts/CallConnector__.d.ts +42 -0
- package/out/concepts/CallConnector__.js +198 -0
- package/out/concepts/CallConnector__.js.map +1 -0
- package/out/concepts/ConnectorTrigger__.d.ts +78 -0
- package/out/concepts/ConnectorTrigger__.js +155 -0
- package/out/concepts/ConnectorTrigger__.js.map +1 -0
- package/out/concepts/Connector__.d.ts +464 -0
- package/out/concepts/Connector__.js +698 -0
- package/out/concepts/Connector__.js.map +1 -0
- package/out/concepts/MsgTriggerEvent__.d.ts +137 -0
- package/out/concepts/MsgTriggerEvent__.js +228 -0
- package/out/concepts/MsgTriggerEvent__.js.map +1 -0
- package/out/concepts/MsgTriggerLauncher__.d.ts +118 -0
- package/out/concepts/MsgTriggerLauncher__.js +204 -0
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -0
- package/out/concepts/StringLiteral__.js +5 -1
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/TriggerEvent__.d.ts +120 -0
- package/out/concepts/TriggerEvent__.js +222 -0
- package/out/concepts/TriggerEvent__.js.map +1 -0
- package/out/concepts/TriggerLauncher__.d.ts +88 -0
- package/out/concepts/TriggerLauncher__.js +235 -0
- package/out/concepts/TriggerLauncher__.js.map +1 -0
- package/out/concepts/types__.d.ts +124 -0
- package/out/concepts/types__.js +3 -0
- package/out/concepts/types__.js.map +1 -0
- package/out/server/getConnector.d.ts +11 -0
- package/out/server/getConnector.js +42 -0
- package/out/server/getConnector.js.map +1 -0
- package/package.json +1 -1
- package/src/concepts/StringLiteral__.ts +5 -1
- package/src/concepts/dist/StringLiteral__.js +158 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
31
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
32
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
33
|
+
};
|
|
34
|
+
var MsgTriggerLauncher_1;
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.MsgTriggerLauncher = void 0;
|
|
37
|
+
const decorators_1 = require("../decorators");
|
|
38
|
+
const utils = __importStar(require("../utils"));
|
|
39
|
+
const classMap_1 = __importDefault(require("../common/classMap"));
|
|
40
|
+
const Argument__1 = __importDefault(require("./Argument__"));
|
|
41
|
+
const TriggerLauncher__1 = __importDefault(require("./TriggerLauncher__"));
|
|
42
|
+
/**
|
|
43
|
+
* 触发器事件
|
|
44
|
+
*/
|
|
45
|
+
let MsgTriggerLauncher = MsgTriggerLauncher_1 = class MsgTriggerLauncher extends TriggerLauncher__1.default {
|
|
46
|
+
/**
|
|
47
|
+
* 产品概念
|
|
48
|
+
*/
|
|
49
|
+
concept = 'MsgTriggerLauncher';
|
|
50
|
+
/**
|
|
51
|
+
* 实际参数列表
|
|
52
|
+
*/
|
|
53
|
+
properties = [];
|
|
54
|
+
/**
|
|
55
|
+
* 祖先 Module
|
|
56
|
+
*/
|
|
57
|
+
get module() {
|
|
58
|
+
return this.getAncestor('Module');
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* 祖先 App
|
|
62
|
+
*/
|
|
63
|
+
get app() {
|
|
64
|
+
return this.getAncestor('App');
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @param source 需要合并的部分参数
|
|
68
|
+
*/
|
|
69
|
+
constructor(source) {
|
|
70
|
+
source = Object.assign({}, MsgTriggerLauncher_1.getDefaultOptions(), source);
|
|
71
|
+
super(source);
|
|
72
|
+
super.subConstructor(source);
|
|
73
|
+
}
|
|
74
|
+
getClassName() {
|
|
75
|
+
return 'MsgTriggerLauncher';
|
|
76
|
+
}
|
|
77
|
+
static from(source, parentNode, parentKey) {
|
|
78
|
+
return super.from(source, parentNode, parentKey);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* 设置实际参数列表
|
|
82
|
+
*/
|
|
83
|
+
setProperties(properties) {
|
|
84
|
+
const object = {
|
|
85
|
+
properties,
|
|
86
|
+
};
|
|
87
|
+
this.update({
|
|
88
|
+
...object,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
getArgumentExistingNames(excludedList = []) {
|
|
92
|
+
const excludedSet = new Set(excludedList);
|
|
93
|
+
return (this.properties || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
94
|
+
}
|
|
95
|
+
getArgumentUniqueName(name = 'argument1') {
|
|
96
|
+
return utils.unique(name, this.getArgumentExistingNames(), undefined, false);
|
|
97
|
+
}
|
|
98
|
+
_insertArgumentAt(options, index) {
|
|
99
|
+
const argumentOptions = {};
|
|
100
|
+
const relationOptions = { parentNode: this, parentKey: 'properties' };
|
|
101
|
+
let argument;
|
|
102
|
+
if (!options) {
|
|
103
|
+
argument = Argument__1.default.from({
|
|
104
|
+
...argumentOptions,
|
|
105
|
+
name: this.getArgumentUniqueName(),
|
|
106
|
+
}, this, 'properties');
|
|
107
|
+
}
|
|
108
|
+
else if (typeof options === 'string') {
|
|
109
|
+
argument = Argument__1.default.from({
|
|
110
|
+
...argumentOptions,
|
|
111
|
+
name: options,
|
|
112
|
+
}, this, 'properties');
|
|
113
|
+
}
|
|
114
|
+
else if (options instanceof Argument__1.default) {
|
|
115
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
116
|
+
argument = options;
|
|
117
|
+
Object.assign(argument, relationOptions);
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
argument = Argument__1.default.from({
|
|
121
|
+
...argumentOptions,
|
|
122
|
+
...options,
|
|
123
|
+
}, this, 'properties');
|
|
124
|
+
}
|
|
125
|
+
this.properties.splice(index, 0, argument);
|
|
126
|
+
return argument;
|
|
127
|
+
}
|
|
128
|
+
insertArgumentAt(options, index) {
|
|
129
|
+
const node = this._insertArgumentAt(options, index);
|
|
130
|
+
node.create({
|
|
131
|
+
index,
|
|
132
|
+
parentNode: this,
|
|
133
|
+
parentKey: 'properties',
|
|
134
|
+
});
|
|
135
|
+
return node;
|
|
136
|
+
}
|
|
137
|
+
_addArgument(options) {
|
|
138
|
+
const index = this.properties.length;
|
|
139
|
+
return this._insertArgumentAt(options, index);
|
|
140
|
+
}
|
|
141
|
+
addArgument(options) {
|
|
142
|
+
const node = this._addArgument(options);
|
|
143
|
+
const index = this.properties.indexOf(node);
|
|
144
|
+
node.create({
|
|
145
|
+
index,
|
|
146
|
+
parentNode: this,
|
|
147
|
+
parentKey: 'properties',
|
|
148
|
+
});
|
|
149
|
+
return node;
|
|
150
|
+
}
|
|
151
|
+
removeArgument(options) {
|
|
152
|
+
let argument;
|
|
153
|
+
if (typeof options === 'string') {
|
|
154
|
+
argument = this.properties.find((item) => item.name === options);
|
|
155
|
+
if (!argument) {
|
|
156
|
+
throw new Error('找不到实际参数 ' + options);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
argument = options;
|
|
161
|
+
}
|
|
162
|
+
return argument.delete();
|
|
163
|
+
}
|
|
164
|
+
__removeLogicItem(logicItem) {
|
|
165
|
+
const parentKey = logicItem.parentKey;
|
|
166
|
+
const params = {
|
|
167
|
+
parentNode: this,
|
|
168
|
+
parentKey,
|
|
169
|
+
index: -1,
|
|
170
|
+
object: null,
|
|
171
|
+
oldObject: logicItem,
|
|
172
|
+
};
|
|
173
|
+
if (parentKey) {
|
|
174
|
+
params.parentKey = parentKey;
|
|
175
|
+
if (Array.isArray(this[parentKey])) {
|
|
176
|
+
const index = this[parentKey].indexOf(logicItem);
|
|
177
|
+
~index && this[parentKey].splice(index, 1);
|
|
178
|
+
params.index = index;
|
|
179
|
+
}
|
|
180
|
+
else if (this[parentKey] === logicItem) {
|
|
181
|
+
params.index = 0;
|
|
182
|
+
this[parentKey] = undefined;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return params;
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
__decorate([
|
|
189
|
+
(0, decorators_1.property)()
|
|
190
|
+
], MsgTriggerLauncher.prototype, "concept", void 0);
|
|
191
|
+
__decorate([
|
|
192
|
+
(0, decorators_1.property)('Argument')
|
|
193
|
+
], MsgTriggerLauncher.prototype, "properties", void 0);
|
|
194
|
+
MsgTriggerLauncher = MsgTriggerLauncher_1 = __decorate([
|
|
195
|
+
(0, decorators_1.concept)('触发器事件')
|
|
196
|
+
], MsgTriggerLauncher);
|
|
197
|
+
exports.MsgTriggerLauncher = MsgTriggerLauncher;
|
|
198
|
+
classMap_1.default.MsgTriggerLauncher = MsgTriggerLauncher;
|
|
199
|
+
exports.default = MsgTriggerLauncher;
|
|
200
|
+
//================================================================================
|
|
201
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
202
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
203
|
+
//================================================================================
|
|
204
|
+
//# sourceMappingURL=MsgTriggerLauncher__.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MsgTriggerLauncher__.js","sourceRoot":"","sources":["../../src/concepts/MsgTriggerLauncher__.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,8CAAkE;AAElE,gDAAkC;AAGlC,kEAA0C;AAC1C,6DAAoC;AAGpC,2EAAkD;AAElD;;GAEG;AAEH,IAAa,kBAAkB,0BAA/B,MAAa,kBAAmB,SAAQ,0BAAe;IACnD;;OAEG;IAEH,OAAO,GAAyB,oBAAoB,CAAC;IAErD;;OAEG;IAEH,UAAU,GAAoB,EAAE,CAAC;IAEjC;;OAEG;IACH,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAW,CAAC;IAChD,CAAC;IACD;;OAEG;IACH,IAAI,GAAG;QACH,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAQ,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,YAAY,MAAoC;QAC5C,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE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,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;gBACpD,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;aACxB;iBAAM,IAAK,IAAY,CAAC,SAAS,CAAC,KAAK,SAAS,EAAE;gBAC/C,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC;gBAChB,IAAY,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;aACxC;SACJ;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CAUJ,CAAA;AA1PG;IADC,IAAA,qBAAQ,GAAE;mDAC0C;AAMrD;IADC,IAAA,qBAAQ,EAAC,UAAU,CAAC;sDACY;AAXxB,kBAAkB;IAD9B,IAAA,oBAAO,EAAC,OAAO,CAAC;GACJ,kBAAkB,CA+P9B;AA/PY,gDAAkB;AAiQ/B,kBAAQ,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AACjD,kBAAe,kBAAkB,CAAC;AAClC,kFAAkF;AAClF,gEAAgE;AAChE,uBAAuB;AACvB,kFAAkF"}
|
|
@@ -51,7 +51,11 @@ let StringLiteral = StringLiteral_1 = class StringLiteral extends LogicItem__1.d
|
|
|
51
51
|
code = `\`${this.value}\``;
|
|
52
52
|
if (options?.finalCode !== false) {
|
|
53
53
|
code = `\`${this.value.replace(/['"`\\]/g, (m) => {
|
|
54
|
-
|
|
54
|
+
let escape = '\\\\';
|
|
55
|
+
escape = '\\\\';
|
|
56
|
+
/// #if process.env.BUILD_TARGET === 'node'
|
|
57
|
+
escape = '\\';
|
|
58
|
+
/// #endif
|
|
55
59
|
if (m === '\\') {
|
|
56
60
|
return `${escape}${escape}`;
|
|
57
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringLiteral__.js","sourceRoot":"","sources":["../../src/concepts/StringLiteral__.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,8CAA+D;AAO/D,8CAAkE;AAKlE,kEAA0C;AAC1C,+DAAsC;AAEtC;;GAEG;AAEH,IAAa,aAAa,q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AAa;IADzB,IAAA,oBAAO,EAAC,QAAQ,CAAC;GACL,aAAa,CAqHzB;AArHY,sCAAa;AAuH1B,kBAAQ,CAAC,aAAa,GAAG,aAAa,CAAC;AACvC,kBAAe,aAAa,CAAC;AAC7B,kFAAkF;AAClF,gEAAgE;AAChE,uBAAuB;AACvB,kFAAkF"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Params } from '../common/EventEmitter';
|
|
2
|
+
import BaseNode from '../common/BaseNode';
|
|
3
|
+
import TypeAnnotation from './TypeAnnotation__';
|
|
4
|
+
/**
|
|
5
|
+
* 触发器事件
|
|
6
|
+
*/
|
|
7
|
+
export declare class TriggerEvent extends BaseNode {
|
|
8
|
+
/**
|
|
9
|
+
* 产品概念
|
|
10
|
+
*/
|
|
11
|
+
concept: 'TriggerEvent' | 'MsgTriggerEvent';
|
|
12
|
+
/**
|
|
13
|
+
* 触发器事件名称
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* 类型标注列表
|
|
18
|
+
*/
|
|
19
|
+
callBackLogic: Array<TypeAnnotation>;
|
|
20
|
+
/**
|
|
21
|
+
* @param source 需要合并的部分参数
|
|
22
|
+
*/
|
|
23
|
+
constructor(source?: Partial<TriggerEvent>);
|
|
24
|
+
getClassName(): string;
|
|
25
|
+
static from(source: any, parentNode?: any, parentKey?: string): TriggerEvent;
|
|
26
|
+
/**
|
|
27
|
+
* 从父级删除该节点
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
_delete(): Params;
|
|
31
|
+
/**
|
|
32
|
+
* 设置触发器事件名称
|
|
33
|
+
*/
|
|
34
|
+
setName(name: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* 设置类型标注列表
|
|
37
|
+
*/
|
|
38
|
+
setCallBackLogic(callBackLogic: Array<TypeAnnotation>): void;
|
|
39
|
+
getTypeAnnotationExistingNames(excludedList?: Array<TypeAnnotation>): string[];
|
|
40
|
+
getTypeAnnotationUniqueName(name?: string): string;
|
|
41
|
+
/**
|
|
42
|
+
* 插入类型标注
|
|
43
|
+
* @internal
|
|
44
|
+
* @param name 类型标注名称,如果不填会自动生成一个唯一名称
|
|
45
|
+
*/
|
|
46
|
+
_insertTypeAnnotationAt(name: string, index: number): TypeAnnotation;
|
|
47
|
+
/**
|
|
48
|
+
* 插入类型标注
|
|
49
|
+
* @internal
|
|
50
|
+
* @param typeAnnotationOptions 类型标注参数
|
|
51
|
+
*/
|
|
52
|
+
_insertTypeAnnotationAt(typeAnnotationOptions: Partial<TypeAnnotation>, index: number): TypeAnnotation;
|
|
53
|
+
/**
|
|
54
|
+
* 插入类型标注
|
|
55
|
+
* @internal
|
|
56
|
+
* @param typeAnnotation 已有的类型标注实例
|
|
57
|
+
*/
|
|
58
|
+
_insertTypeAnnotationAt(typeAnnotation: TypeAnnotation, index: number): TypeAnnotation;
|
|
59
|
+
/**
|
|
60
|
+
* 插入类型标注
|
|
61
|
+
* @param name 类型标注名称,如果不填会自动生成一个唯一名称
|
|
62
|
+
*/
|
|
63
|
+
insertTypeAnnotationAt(name: string, index: number): TypeAnnotation;
|
|
64
|
+
/**
|
|
65
|
+
* 插入类型标注
|
|
66
|
+
* @param typeAnnotationOptions 类型标注参数
|
|
67
|
+
*/
|
|
68
|
+
insertTypeAnnotationAt(typeAnnotationOptions: Partial<TypeAnnotation>, index: number): TypeAnnotation;
|
|
69
|
+
/**
|
|
70
|
+
* 插入类型标注
|
|
71
|
+
* @param typeAnnotation 已有的类型标注实例
|
|
72
|
+
*/
|
|
73
|
+
insertTypeAnnotationAt(typeAnnotation: TypeAnnotation, index: number): TypeAnnotation;
|
|
74
|
+
/**
|
|
75
|
+
* 添加类型标注
|
|
76
|
+
* @internal
|
|
77
|
+
* @param name 类型标注名称,如果不填会自动生成一个唯一名称
|
|
78
|
+
*/
|
|
79
|
+
_addTypeAnnotation(name?: string): TypeAnnotation;
|
|
80
|
+
/**
|
|
81
|
+
* 添加类型标注
|
|
82
|
+
* @internal
|
|
83
|
+
* @param typeAnnotationOptions 类型标注参数
|
|
84
|
+
*/
|
|
85
|
+
_addTypeAnnotation(typeAnnotationOptions: Partial<TypeAnnotation>): TypeAnnotation;
|
|
86
|
+
/**
|
|
87
|
+
* 添加类型标注
|
|
88
|
+
* @internal
|
|
89
|
+
* @param typeAnnotation 已有的类型标注实例
|
|
90
|
+
*/
|
|
91
|
+
_addTypeAnnotation(typeAnnotation: TypeAnnotation): TypeAnnotation;
|
|
92
|
+
/**
|
|
93
|
+
* 添加类型标注
|
|
94
|
+
* @internal
|
|
95
|
+
* @param name 类型标注名称,如果不填会自动生成一个唯一名称
|
|
96
|
+
*/
|
|
97
|
+
addTypeAnnotation(name?: string): TypeAnnotation;
|
|
98
|
+
/**
|
|
99
|
+
* 添加类型标注
|
|
100
|
+
* @param typeAnnotationOptions 类型标注参数
|
|
101
|
+
*/
|
|
102
|
+
addTypeAnnotation(typeAnnotationOptions: Partial<TypeAnnotation>): TypeAnnotation;
|
|
103
|
+
/**
|
|
104
|
+
* 添加类型标注
|
|
105
|
+
* @param typeAnnotation 已有的类型标注实例
|
|
106
|
+
*/
|
|
107
|
+
addTypeAnnotation(typeAnnotation: TypeAnnotation): TypeAnnotation;
|
|
108
|
+
/**
|
|
109
|
+
* 删除类型标注
|
|
110
|
+
* @param name 类型标注名称
|
|
111
|
+
*/
|
|
112
|
+
removeTypeAnnotation(name: string): void;
|
|
113
|
+
/**
|
|
114
|
+
* 删除类型标注
|
|
115
|
+
* @param typeAnnotation 已有的类型标注实例
|
|
116
|
+
*/
|
|
117
|
+
removeTypeAnnotation(typeAnnotation: TypeAnnotation): void;
|
|
118
|
+
__removeTypeAnnotation(typeAnnotation: TypeAnnotation): Params;
|
|
119
|
+
}
|
|
120
|
+
export default TriggerEvent;
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
31
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
32
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
33
|
+
};
|
|
34
|
+
var TriggerEvent_1;
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.TriggerEvent = void 0;
|
|
37
|
+
const decorators_1 = require("../decorators");
|
|
38
|
+
const utils = __importStar(require("../utils"));
|
|
39
|
+
const BaseNode_1 = __importDefault(require("../common/BaseNode"));
|
|
40
|
+
const classMap_1 = __importDefault(require("../common/classMap"));
|
|
41
|
+
const TypeAnnotation__1 = __importDefault(require("./TypeAnnotation__"));
|
|
42
|
+
/**
|
|
43
|
+
* 触发器事件
|
|
44
|
+
*/
|
|
45
|
+
let TriggerEvent = TriggerEvent_1 = class TriggerEvent extends BaseNode_1.default {
|
|
46
|
+
/**
|
|
47
|
+
* 产品概念
|
|
48
|
+
*/
|
|
49
|
+
concept = 'TriggerEvent';
|
|
50
|
+
/**
|
|
51
|
+
* 触发器事件名称
|
|
52
|
+
*/
|
|
53
|
+
name = undefined;
|
|
54
|
+
/**
|
|
55
|
+
* 类型标注列表
|
|
56
|
+
*/
|
|
57
|
+
callBackLogic = [];
|
|
58
|
+
/**
|
|
59
|
+
* @param source 需要合并的部分参数
|
|
60
|
+
*/
|
|
61
|
+
constructor(source) {
|
|
62
|
+
source = Object.assign({}, TriggerEvent_1.getDefaultOptions(), source);
|
|
63
|
+
super(source);
|
|
64
|
+
super.subConstructor(source);
|
|
65
|
+
}
|
|
66
|
+
getClassName() {
|
|
67
|
+
return 'TriggerEvent';
|
|
68
|
+
}
|
|
69
|
+
static from(source, parentNode, parentKey) {
|
|
70
|
+
return super.from(source, parentNode, parentKey);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* 从父级删除该节点
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
_delete() {
|
|
77
|
+
let params = null;
|
|
78
|
+
if (this.parentNode) {
|
|
79
|
+
params = this.parentNode?.__removeTriggerEvent?.(this);
|
|
80
|
+
}
|
|
81
|
+
return params;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* 设置触发器事件名称
|
|
85
|
+
*/
|
|
86
|
+
setName(name) {
|
|
87
|
+
const object = {
|
|
88
|
+
name,
|
|
89
|
+
};
|
|
90
|
+
this.update({
|
|
91
|
+
...object,
|
|
92
|
+
field: 'name',
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* 设置类型标注列表
|
|
97
|
+
*/
|
|
98
|
+
setCallBackLogic(callBackLogic) {
|
|
99
|
+
const object = {
|
|
100
|
+
callBackLogic,
|
|
101
|
+
};
|
|
102
|
+
this.update({
|
|
103
|
+
...object,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
getTypeAnnotationExistingNames(excludedList = []) {
|
|
107
|
+
const excludedSet = new Set(excludedList);
|
|
108
|
+
return (this.callBackLogic || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
109
|
+
}
|
|
110
|
+
getTypeAnnotationUniqueName(name = 'typeAnnotation1') {
|
|
111
|
+
return utils.unique(name, this.getTypeAnnotationExistingNames(), undefined, false);
|
|
112
|
+
}
|
|
113
|
+
_insertTypeAnnotationAt(options, index) {
|
|
114
|
+
const typeAnnotationOptions = {};
|
|
115
|
+
const relationOptions = { parentNode: this, parentKey: 'callBackLogic' };
|
|
116
|
+
let typeAnnotation;
|
|
117
|
+
if (!options) {
|
|
118
|
+
typeAnnotation = TypeAnnotation__1.default.from({
|
|
119
|
+
...typeAnnotationOptions,
|
|
120
|
+
name: this.getTypeAnnotationUniqueName(),
|
|
121
|
+
}, this, 'callBackLogic');
|
|
122
|
+
}
|
|
123
|
+
else if (typeof options === 'string') {
|
|
124
|
+
typeAnnotation = TypeAnnotation__1.default.from({
|
|
125
|
+
...typeAnnotationOptions,
|
|
126
|
+
name: options,
|
|
127
|
+
}, this, 'callBackLogic');
|
|
128
|
+
}
|
|
129
|
+
else if (options instanceof TypeAnnotation__1.default) {
|
|
130
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
131
|
+
typeAnnotation = options;
|
|
132
|
+
Object.assign(typeAnnotation, relationOptions);
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
typeAnnotation = TypeAnnotation__1.default.from({
|
|
136
|
+
...typeAnnotationOptions,
|
|
137
|
+
...options,
|
|
138
|
+
}, this, 'callBackLogic');
|
|
139
|
+
}
|
|
140
|
+
this.callBackLogic.splice(index, 0, typeAnnotation);
|
|
141
|
+
return typeAnnotation;
|
|
142
|
+
}
|
|
143
|
+
insertTypeAnnotationAt(options, index) {
|
|
144
|
+
const node = this._insertTypeAnnotationAt(options, index);
|
|
145
|
+
node.create({
|
|
146
|
+
index,
|
|
147
|
+
parentNode: this,
|
|
148
|
+
parentKey: 'callBackLogic',
|
|
149
|
+
});
|
|
150
|
+
return node;
|
|
151
|
+
}
|
|
152
|
+
_addTypeAnnotation(options) {
|
|
153
|
+
const index = this.callBackLogic.length;
|
|
154
|
+
return this._insertTypeAnnotationAt(options, index);
|
|
155
|
+
}
|
|
156
|
+
addTypeAnnotation(options) {
|
|
157
|
+
const node = this._addTypeAnnotation(options);
|
|
158
|
+
const index = this.callBackLogic.indexOf(node);
|
|
159
|
+
node.create({
|
|
160
|
+
index,
|
|
161
|
+
parentNode: this,
|
|
162
|
+
parentKey: 'callBackLogic',
|
|
163
|
+
});
|
|
164
|
+
return node;
|
|
165
|
+
}
|
|
166
|
+
removeTypeAnnotation(options) {
|
|
167
|
+
let typeAnnotation;
|
|
168
|
+
if (typeof options === 'string') {
|
|
169
|
+
typeAnnotation = this.callBackLogic.find((item) => item.name === options);
|
|
170
|
+
if (!typeAnnotation) {
|
|
171
|
+
throw new Error('找不到类型标注 ' + options);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
typeAnnotation = options;
|
|
176
|
+
}
|
|
177
|
+
return typeAnnotation.delete();
|
|
178
|
+
}
|
|
179
|
+
__removeTypeAnnotation(typeAnnotation) {
|
|
180
|
+
const parentKey = typeAnnotation.parentKey;
|
|
181
|
+
const params = {
|
|
182
|
+
parentNode: this,
|
|
183
|
+
parentKey,
|
|
184
|
+
index: -1,
|
|
185
|
+
object: null,
|
|
186
|
+
oldObject: typeAnnotation,
|
|
187
|
+
};
|
|
188
|
+
if (parentKey) {
|
|
189
|
+
params.parentKey = parentKey;
|
|
190
|
+
if (Array.isArray(this[parentKey])) {
|
|
191
|
+
const index = this[parentKey].indexOf(typeAnnotation);
|
|
192
|
+
~index && this[parentKey].splice(index, 1);
|
|
193
|
+
params.index = index;
|
|
194
|
+
}
|
|
195
|
+
else if (this[parentKey] === typeAnnotation) {
|
|
196
|
+
params.index = 0;
|
|
197
|
+
this[parentKey] = undefined;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return params;
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
__decorate([
|
|
204
|
+
(0, decorators_1.property)()
|
|
205
|
+
], TriggerEvent.prototype, "concept", void 0);
|
|
206
|
+
__decorate([
|
|
207
|
+
(0, decorators_1.property)()
|
|
208
|
+
], TriggerEvent.prototype, "name", void 0);
|
|
209
|
+
__decorate([
|
|
210
|
+
(0, decorators_1.property)('TypeAnnotation')
|
|
211
|
+
], TriggerEvent.prototype, "callBackLogic", void 0);
|
|
212
|
+
TriggerEvent = TriggerEvent_1 = __decorate([
|
|
213
|
+
(0, decorators_1.concept)('触发器事件')
|
|
214
|
+
], TriggerEvent);
|
|
215
|
+
exports.TriggerEvent = TriggerEvent;
|
|
216
|
+
classMap_1.default.TriggerEvent = TriggerEvent;
|
|
217
|
+
exports.default = TriggerEvent;
|
|
218
|
+
//================================================================================
|
|
219
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
220
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
221
|
+
//================================================================================
|
|
222
|
+
//# sourceMappingURL=TriggerEvent__.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TriggerEvent__.js","sourceRoot":"","sources":["../../src/concepts/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Q,EAAC,gBAAgB,CAAC;mDACe;AAjBjC,YAAY;IADxB,IAAA,oBAAO,EAAC,OAAO,CAAC;GACJ,YAAY,CAkRxB;AAlRY,oCAAY;AAoRzB,kBAAQ,CAAC,YAAY,GAAG,YAAY,CAAC;AACrC,kBAAe,YAAY,CAAC;AAC5B,kFAAkF;AAClF,gEAAgE;AAChE,uBAAuB;AACvB,kFAAkF"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { TranslatorState } from '../translator';
|
|
2
|
+
import Identifier from './Identifier__';
|
|
3
|
+
import { Params } from '../common/EventEmitter';
|
|
4
|
+
import BaseNode from '../common/BaseNode';
|
|
5
|
+
import Module from './Module__';
|
|
6
|
+
import App from './App__';
|
|
7
|
+
/**
|
|
8
|
+
* 触发器启动器
|
|
9
|
+
*/
|
|
10
|
+
export declare class TriggerLauncher extends BaseNode {
|
|
11
|
+
/**
|
|
12
|
+
* 产品概念
|
|
13
|
+
*/
|
|
14
|
+
concept: 'TriggerLauncher' | 'MsgTriggerLauncher';
|
|
15
|
+
/**
|
|
16
|
+
* 触发器启动器名称
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* calleeNamespace
|
|
21
|
+
*/
|
|
22
|
+
calleeNamespace: string;
|
|
23
|
+
/**
|
|
24
|
+
* calleeName
|
|
25
|
+
*/
|
|
26
|
+
calleeName: string;
|
|
27
|
+
/**
|
|
28
|
+
* calleeConnectorName
|
|
29
|
+
*/
|
|
30
|
+
calleeConnectorName: string;
|
|
31
|
+
/**
|
|
32
|
+
* callBackLogic
|
|
33
|
+
*/
|
|
34
|
+
callBackLogic: Identifier;
|
|
35
|
+
/**
|
|
36
|
+
* 祖先 Module
|
|
37
|
+
*/
|
|
38
|
+
get module(): Module;
|
|
39
|
+
/**
|
|
40
|
+
* 祖先 App
|
|
41
|
+
*/
|
|
42
|
+
get app(): App;
|
|
43
|
+
/**
|
|
44
|
+
* @param source 需要合并的部分参数
|
|
45
|
+
*/
|
|
46
|
+
constructor(source?: Partial<TriggerLauncher>);
|
|
47
|
+
getClassName(): string;
|
|
48
|
+
static from(source: any, parentNode?: any, parentKey?: string): TriggerLauncher;
|
|
49
|
+
/**
|
|
50
|
+
* 从父级删除该节点
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
_delete(): Params;
|
|
54
|
+
/**
|
|
55
|
+
* 设置触发器启动器名称
|
|
56
|
+
*/
|
|
57
|
+
setName(name: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* 设置calleeNamespace
|
|
60
|
+
*/
|
|
61
|
+
setCalleeNamespace(calleeNamespace: string): void;
|
|
62
|
+
/**
|
|
63
|
+
* 设置calleeName
|
|
64
|
+
*/
|
|
65
|
+
setCalleeName(calleeName: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* 设置calleeConnectorName
|
|
68
|
+
*/
|
|
69
|
+
setCalleeConnectorName(calleeConnectorName: string): void;
|
|
70
|
+
/**
|
|
71
|
+
* 设置callBackLogic
|
|
72
|
+
*/
|
|
73
|
+
setCallBackLogic(callBackLogic: Identifier): void;
|
|
74
|
+
toEmbeddedTS(state?: TranslatorState): string;
|
|
75
|
+
get callBackLogicKey(): string;
|
|
76
|
+
toEmbeddedTSFile(): {
|
|
77
|
+
code: string;
|
|
78
|
+
filePath: string;
|
|
79
|
+
sourceMap: import("../translator").SourceMap;
|
|
80
|
+
};
|
|
81
|
+
getTsNamespace(): string;
|
|
82
|
+
/**
|
|
83
|
+
* 生成宿主语言的文件路径
|
|
84
|
+
* @param name 一般不用传,用于 rename
|
|
85
|
+
*/
|
|
86
|
+
getEmbeddedFilePath(name?: string): string;
|
|
87
|
+
}
|
|
88
|
+
export default TriggerLauncher;
|