@lcap/nasl 2.22.1 → 2.22.2-beta.2
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/breakpoint/generator/AfterStartNode.d.ts +7 -0
- package/out/breakpoint/generator/AfterStartNode.js +27 -0
- package/out/breakpoint/generator/AfterStartNode.js.map +1 -0
- package/out/breakpoint/generator/BeforeEndNode.d.ts +7 -0
- package/out/breakpoint/generator/BeforeEndNode.js +27 -0
- package/out/breakpoint/generator/BeforeEndNode.js.map +1 -0
- package/out/breakpoint/generator/BreakpointNode.d.ts +14 -0
- package/out/breakpoint/generator/BreakpointNode.js +200 -0
- package/out/breakpoint/generator/BreakpointNode.js.map +1 -0
- package/out/breakpoint/generator/index.d.ts +4 -0
- package/out/breakpoint/generator/index.js +98 -0
- package/out/breakpoint/generator/index.js.map +1 -0
- package/out/breakpoint/index.d.ts +3 -0
- package/out/breakpoint/index.js +20 -0
- package/out/breakpoint/index.js.map +1 -0
- package/out/breakpoint/shared/constants.d.ts +31 -0
- package/out/breakpoint/shared/constants.js +91 -0
- package/out/breakpoint/shared/constants.js.map +1 -0
- package/out/breakpoint/shared/index.d.ts +3 -0
- package/out/breakpoint/shared/index.js +33 -0
- package/out/breakpoint/shared/index.js.map +1 -0
- package/out/breakpoint/shared/operations.d.ts +10 -0
- package/out/breakpoint/shared/operations.js +25 -0
- package/out/breakpoint/shared/operations.js.map +1 -0
- package/out/breakpoint/shared/socket.d.ts +47 -0
- package/out/breakpoint/shared/socket.js +210 -0
- package/out/breakpoint/shared/socket.js.map +1 -0
- package/out/breakpoint/shared/utils.d.ts +23 -0
- package/out/breakpoint/shared/utils.js +165 -0
- package/out/breakpoint/shared/utils.js.map +1 -0
- package/out/breakpoint/store/core.d.ts +32 -0
- package/out/breakpoint/store/core.js +388 -0
- package/out/breakpoint/store/core.js.map +1 -0
- package/out/breakpoint/store/dock.d.ts +1 -0
- package/out/breakpoint/store/dock.js +127 -0
- package/out/breakpoint/store/dock.js.map +1 -0
- package/out/breakpoint/store/index.d.ts +2 -0
- package/out/breakpoint/store/index.js +19 -0
- package/out/breakpoint/store/index.js.map +1 -0
- package/out/common/Command.js +1 -1
- package/out/common/Command.js.map +1 -1
- package/out/common/asyncFuncMap.d.ts +2 -0
- package/out/common/asyncFuncMap.js +16 -0
- package/out/common/asyncFuncMap.js.map +1 -0
- package/out/concepts/AnonymousFunction__.js +11 -9
- package/out/concepts/AnonymousFunction__.js.map +1 -1
- package/out/concepts/AuthInterface__.d.ts +37 -0
- package/out/concepts/AuthInterface__.js +141 -0
- package/out/concepts/AuthInterface__.js.map +1 -0
- package/out/concepts/AuthLogicForCallInterface__.d.ts +138 -0
- package/out/concepts/AuthLogicForCallInterface__.js +493 -0
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -0
- package/out/concepts/AuthLogic__.d.ts +66 -0
- package/out/concepts/AuthLogic__.js +206 -0
- package/out/concepts/AuthLogic__.js.map +1 -0
- package/out/concepts/BackendVariable__.d.ts +137 -0
- package/out/concepts/BackendVariable__.js +422 -0
- package/out/concepts/BackendVariable__.js.map +1 -0
- package/out/concepts/Backend__.d.ts +134 -0
- package/out/concepts/Backend__.js +274 -0
- package/out/concepts/Backend__.js.map +1 -0
- package/out/concepts/CallAuthInterface__.d.ts +126 -0
- package/out/concepts/CallAuthInterface__.js +408 -0
- package/out/concepts/CallAuthInterface__.js.map +1 -0
- 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/Destination__.js +6 -4
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/FrontendVariable__.d.ts +21 -0
- package/out/concepts/FrontendVariable__.js +64 -0
- package/out/concepts/FrontendVariable__.js.map +1 -0
- package/out/concepts/Match__.js +25 -6
- package/out/concepts/Match__.js.map +1 -1
- 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/OverriddenLogic__.d.ts +643 -0
- package/out/concepts/OverriddenLogic__.js +1602 -0
- package/out/concepts/OverriddenLogic__.js.map +1 -0
- package/out/concepts/Param__.js +1 -1
- package/out/concepts/Param__.js.map +1 -1
- 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/basics/stdlib/nasl.http.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.http.js +167 -0
- package/out/concepts/basics/stdlib/nasl.http.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/out/server/naslServer.js +55 -0
- package/out/server/naslServer.js.map +1 -1
- package/out/service/creator/errHandles.js +5 -0
- package/out/service/creator/errHandles.js.map +1 -1
- package/out/templator/genCreateBlock.js +2 -1
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +6 -3
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +4 -2
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +2 -1
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +2 -1
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/package.json +2 -2
- package/src/common/Command.ts +1 -1
- package/src/common/dist/Command.js +39 -0
- package/src/concepts/AnonymousFunction__.ts +13 -11
- package/src/concepts/Destination__.ts +7 -5
- package/src/concepts/Match__.ts +24 -6
- package/src/concepts/Param__.ts +1 -1
- package/src/concepts/StringLiteral__.ts +5 -1
- package/src/concepts/dist/App__.js +2204 -0
- package/src/concepts/dist/CallLogic__.js +1149 -0
- package/src/concepts/dist/Destination__.js +756 -0
- package/src/concepts/dist/Entity__.js +729 -0
- package/src/concepts/dist/Logic__.js +1612 -0
- package/src/concepts/dist/Match__.js +768 -0
- package/src/concepts/dist/MsgTriggerEvent__.js +245 -0
- package/src/concepts/dist/OqlQueryComponent__.js +377 -0
- package/src/concepts/dist/Param__.js +1 -1
- package/src/concepts/dist/StringLiteral__.js +158 -0
- package/src/generator/dist/genBundleFiles.js +15 -4
- package/src/generator/dist/genReleaseBody.js +501 -0
- package/src/server/dist/naslServer.js +76 -6
- package/src/server/naslServer.ts +54 -0
- package/src/service/creator/errHandles.js +8 -3
- package/src/service/storage/dist/init.js +34 -32
- package/src/templator/genCreateBlock.ts +2 -1
- package/src/templator/genCurdEditMultipleKeyBlock.ts +6 -3
- package/src/templator/genCurdMultipleKeyBlock.ts +4 -2
- package/src/templator/genEditTableBlock.ts +2 -1
- package/src/templator/genUpdateBlock.ts +2 -1
- package/test/examples/qzbusiness.json +1 -98265
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
var TriggerLauncher_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.TriggerLauncher = void 0;
|
|
14
|
+
const translator_1 = require("../translator");
|
|
15
|
+
const decorators_1 = require("../decorators");
|
|
16
|
+
const BaseNode_1 = __importDefault(require("../common/BaseNode"));
|
|
17
|
+
const classMap_1 = __importDefault(require("../common/classMap"));
|
|
18
|
+
/**
|
|
19
|
+
* 触发器启动器
|
|
20
|
+
*/
|
|
21
|
+
let TriggerLauncher = TriggerLauncher_1 = class TriggerLauncher extends BaseNode_1.default {
|
|
22
|
+
/**
|
|
23
|
+
* 产品概念
|
|
24
|
+
*/
|
|
25
|
+
concept = 'TriggerLauncher';
|
|
26
|
+
/**
|
|
27
|
+
* 触发器启动器名称
|
|
28
|
+
*/
|
|
29
|
+
name = undefined;
|
|
30
|
+
/**
|
|
31
|
+
* calleeNamespace
|
|
32
|
+
*/
|
|
33
|
+
calleeNamespace = undefined;
|
|
34
|
+
/**
|
|
35
|
+
* calleeName
|
|
36
|
+
*/
|
|
37
|
+
calleeName = undefined;
|
|
38
|
+
/**
|
|
39
|
+
* calleeConnectorName
|
|
40
|
+
*/
|
|
41
|
+
calleeConnectorName = undefined;
|
|
42
|
+
/**
|
|
43
|
+
* callBackLogic
|
|
44
|
+
*/
|
|
45
|
+
callBackLogic = undefined;
|
|
46
|
+
/**
|
|
47
|
+
* 祖先 Module
|
|
48
|
+
*/
|
|
49
|
+
get module() {
|
|
50
|
+
return this.getAncestor('Module');
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 祖先 App
|
|
54
|
+
*/
|
|
55
|
+
get app() {
|
|
56
|
+
return this.getAncestor('App');
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @param source 需要合并的部分参数
|
|
60
|
+
*/
|
|
61
|
+
constructor(source) {
|
|
62
|
+
source = Object.assign({}, TriggerLauncher_1.getDefaultOptions(), source);
|
|
63
|
+
super(source);
|
|
64
|
+
super.subConstructor(source);
|
|
65
|
+
}
|
|
66
|
+
getClassName() {
|
|
67
|
+
return 'TriggerLauncher';
|
|
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?.__removeTriggerLauncher?.(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
|
+
* 设置calleeNamespace
|
|
97
|
+
*/
|
|
98
|
+
setCalleeNamespace(calleeNamespace) {
|
|
99
|
+
const object = {
|
|
100
|
+
calleeNamespace,
|
|
101
|
+
};
|
|
102
|
+
this.update({
|
|
103
|
+
...object,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* 设置calleeName
|
|
108
|
+
*/
|
|
109
|
+
setCalleeName(calleeName) {
|
|
110
|
+
const object = {
|
|
111
|
+
calleeName,
|
|
112
|
+
};
|
|
113
|
+
this.update({
|
|
114
|
+
...object,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* 设置calleeConnectorName
|
|
119
|
+
*/
|
|
120
|
+
setCalleeConnectorName(calleeConnectorName) {
|
|
121
|
+
const object = {
|
|
122
|
+
calleeConnectorName,
|
|
123
|
+
};
|
|
124
|
+
this.update({
|
|
125
|
+
...object,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* 设置callBackLogic
|
|
130
|
+
*/
|
|
131
|
+
setCallBackLogic(callBackLogic) {
|
|
132
|
+
const object = {
|
|
133
|
+
callBackLogic,
|
|
134
|
+
};
|
|
135
|
+
this.update({
|
|
136
|
+
...object,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
//================================================================================
|
|
140
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
141
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
142
|
+
//================================================================================
|
|
143
|
+
toEmbeddedTS(state) {
|
|
144
|
+
let code = '';
|
|
145
|
+
code += `export function ${this.name} () {\n`;
|
|
146
|
+
try {
|
|
147
|
+
// 仅仅作引用查找不需要入参校验
|
|
148
|
+
code += `${this.callBackLogicKey}`;
|
|
149
|
+
code += ';\n';
|
|
150
|
+
code += '}\n';
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
console.error('找不到目标服务端逻辑', error);
|
|
154
|
+
}
|
|
155
|
+
return code;
|
|
156
|
+
}
|
|
157
|
+
get callBackLogicKey() {
|
|
158
|
+
const { name, namespace } = this.callBackLogic;
|
|
159
|
+
return `${namespace}.${name}`;
|
|
160
|
+
}
|
|
161
|
+
toEmbeddedTSFile() {
|
|
162
|
+
let code = `namespace ${this.getTsNamespace()} {\n`;
|
|
163
|
+
const state = (0, translator_1.createCompilerState)(code, { tabSize: 1 });
|
|
164
|
+
try {
|
|
165
|
+
code += this.toEmbeddedTS(state);
|
|
166
|
+
}
|
|
167
|
+
catch (err) {
|
|
168
|
+
console.log(err, '有问题翻译失败');
|
|
169
|
+
code += '';
|
|
170
|
+
console.log(err);
|
|
171
|
+
}
|
|
172
|
+
code += '}\n';
|
|
173
|
+
return {
|
|
174
|
+
code,
|
|
175
|
+
filePath: this.getEmbeddedFilePath(),
|
|
176
|
+
sourceMap: state.sourceMap,
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
getTsNamespace() {
|
|
180
|
+
if (this.parentNode) {
|
|
181
|
+
const parentNamespace = this.parentNode?.getTsNamespace();
|
|
182
|
+
const parentName = this.parentNode.tsName || this.parentNode.name;
|
|
183
|
+
const arr = [parentNamespace];
|
|
184
|
+
if (this.parentNode.concept !== 'App' && parentName) {
|
|
185
|
+
arr.push(parentName);
|
|
186
|
+
}
|
|
187
|
+
let namespace = arr.join('.');
|
|
188
|
+
namespace = `${namespace}.triggerLauncher`;
|
|
189
|
+
return namespace;
|
|
190
|
+
}
|
|
191
|
+
else
|
|
192
|
+
throw new Error('无法获取命名空间,请设置 parentNode!');
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* 生成宿主语言的文件路径
|
|
196
|
+
* @param name 一般不用传,用于 rename
|
|
197
|
+
*/
|
|
198
|
+
getEmbeddedFilePath(name = this.name) {
|
|
199
|
+
const parent = this.parentNode;
|
|
200
|
+
const _path = `/${parent.parentKey}/${parent.name}`;
|
|
201
|
+
return `/embedded/${this.app.name}${_path}/triggerLauncher/${name}.ts`;
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
__decorate([
|
|
205
|
+
(0, decorators_1.property)()
|
|
206
|
+
], TriggerLauncher.prototype, "concept", void 0);
|
|
207
|
+
__decorate([
|
|
208
|
+
(0, decorators_1.property)()
|
|
209
|
+
], TriggerLauncher.prototype, "name", void 0);
|
|
210
|
+
__decorate([
|
|
211
|
+
(0, decorators_1.property)()
|
|
212
|
+
], TriggerLauncher.prototype, "calleeNamespace", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
(0, decorators_1.property)()
|
|
215
|
+
], TriggerLauncher.prototype, "calleeName", void 0);
|
|
216
|
+
__decorate([
|
|
217
|
+
(0, decorators_1.property)()
|
|
218
|
+
], TriggerLauncher.prototype, "calleeConnectorName", void 0);
|
|
219
|
+
__decorate([
|
|
220
|
+
(0, decorators_1.property)()
|
|
221
|
+
], TriggerLauncher.prototype, "callBackLogic", void 0);
|
|
222
|
+
__decorate([
|
|
223
|
+
(0, translator_1.withSourceMap)()
|
|
224
|
+
], TriggerLauncher.prototype, "toEmbeddedTS", null);
|
|
225
|
+
TriggerLauncher = TriggerLauncher_1 = __decorate([
|
|
226
|
+
(0, decorators_1.concept)('触发器启动器')
|
|
227
|
+
], TriggerLauncher);
|
|
228
|
+
exports.TriggerLauncher = TriggerLauncher;
|
|
229
|
+
classMap_1.default.TriggerLauncher = TriggerLauncher;
|
|
230
|
+
exports.default = TriggerLauncher;
|
|
231
|
+
//================================================================================
|
|
232
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
233
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
234
|
+
//================================================================================
|
|
235
|
+
//# sourceMappingURL=TriggerLauncher__.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TriggerLauncher__.js","sourceRoot":"","sources":["../../src/concepts/TriggerLauncher__.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,8CAAgG;AAQhG,8CAAkE;AAIlE,kEAA0C;AAC1C,kEAA0C;AAI1C;;GAEG;AAEH,IAAa,eAAe,uBAA5B,MAAa,eAAgB,SAAQ,kBAAQ;IACzC;;OAEG;IAEH,OAAO,GAA6C,iBAAi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,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI;QAChC,MAAM,MAAM,GAAG,IAAI,CAAC,UAAuB,CAAC;QAC5C,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QACpD,OAAO,aAAa,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,oBAAoB,IAAI,KAAK,CAAC;IAC3E,CAAC;CAMJ,CAAA;AAlNG;IADC,IAAA,qBAAQ,GAAE;gDAC2D;AAMtE;IADC,IAAA,qBAAQ,GAAE;6CACc;AAMzB;IADC,IAAA,qBAAQ,GAAE;wDACyB;AAMpC;IADC,IAAA,qBAAQ,GAAE;mDACoB;AAM/B;IADC,IAAA,qBAAQ,GAAE;4DAC6B;AAMxC;IADC,IAAA,qBAAQ,GAAE;sDAC2B;AAiHtC;IADC,IAAA,0BAAa,GAAE;mDAaf;AAhKQ,eAAe;IAD3B,IAAA,oBAAO,EAAC,QAAQ,CAAC;GACL,eAAe,CAuN3B;AAvNY,0CAAe;AAyN5B,kBAAQ,CAAC,eAAe,GAAG,eAAe,CAAC;AAC3C,kBAAe,eAAe,CAAC;AAC/B,kFAAkF;AAClF,gEAAgE;AAChE,uBAAuB;AACvB,kFAAkF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Namespace from '../../Namespace__';
|
|
2
|
+
import TypeAnnotation from '../../TypeAnnotation__';
|
|
3
|
+
import Structure from '../../Structure__';
|
|
4
|
+
export declare const httpStructures: Structure[];
|
|
5
|
+
export declare const httpTypeList: Array<TypeAnnotation>;
|
|
6
|
+
declare const _default: Namespace;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.httpTypeList = exports.httpStructures = void 0;
|
|
7
|
+
const Namespace__1 = __importDefault(require("../../Namespace__"));
|
|
8
|
+
const TypeAnnotation__1 = __importDefault(require("../../TypeAnnotation__"));
|
|
9
|
+
const Structure__1 = __importDefault(require("../../Structure__"));
|
|
10
|
+
const StructureProperty__1 = __importDefault(require("../../StructureProperty__"));
|
|
11
|
+
const reference2TypeAnnotationList_1 = require("./reference2TypeAnnotationList");
|
|
12
|
+
const TypeParam__1 = __importDefault(require("../../TypeParam__"));
|
|
13
|
+
exports.httpStructures = [
|
|
14
|
+
new Structure__1.default({
|
|
15
|
+
name: 'HttpCookie',
|
|
16
|
+
properties: [
|
|
17
|
+
new StructureProperty__1.default({
|
|
18
|
+
name: 'name',
|
|
19
|
+
typeAnnotation: TypeAnnotation__1.default.createPrimitive('String'),
|
|
20
|
+
}),
|
|
21
|
+
new StructureProperty__1.default({
|
|
22
|
+
name: 'value',
|
|
23
|
+
typeAnnotation: TypeAnnotation__1.default.createPrimitive('String'),
|
|
24
|
+
}),
|
|
25
|
+
new StructureProperty__1.default({
|
|
26
|
+
name: 'domain',
|
|
27
|
+
typeAnnotation: TypeAnnotation__1.default.createPrimitive('String'),
|
|
28
|
+
}),
|
|
29
|
+
new StructureProperty__1.default({
|
|
30
|
+
name: 'cookiePath',
|
|
31
|
+
typeAnnotation: TypeAnnotation__1.default.createPrimitive('String'),
|
|
32
|
+
}),
|
|
33
|
+
new StructureProperty__1.default({
|
|
34
|
+
name: 'sameSite',
|
|
35
|
+
typeAnnotation: TypeAnnotation__1.default.createPrimitive('String'),
|
|
36
|
+
}),
|
|
37
|
+
new StructureProperty__1.default({
|
|
38
|
+
name: 'httpOnly',
|
|
39
|
+
typeAnnotation: TypeAnnotation__1.default.createPrimitive('Boolean'),
|
|
40
|
+
}),
|
|
41
|
+
new StructureProperty__1.default({
|
|
42
|
+
name: 'secure',
|
|
43
|
+
typeAnnotation: TypeAnnotation__1.default.createPrimitive('Boolean'),
|
|
44
|
+
}),
|
|
45
|
+
new StructureProperty__1.default({
|
|
46
|
+
name: 'maxAge',
|
|
47
|
+
typeAnnotation: TypeAnnotation__1.default.createPrimitive('Integer'),
|
|
48
|
+
}),
|
|
49
|
+
],
|
|
50
|
+
}),
|
|
51
|
+
new Structure__1.default({
|
|
52
|
+
name: 'HttpResponse',
|
|
53
|
+
typeParams: [
|
|
54
|
+
new TypeParam__1.default({
|
|
55
|
+
name: 'T',
|
|
56
|
+
}),
|
|
57
|
+
],
|
|
58
|
+
properties: [
|
|
59
|
+
new StructureProperty__1.default({
|
|
60
|
+
name: 'status',
|
|
61
|
+
typeAnnotation: TypeAnnotation__1.default.createPrimitive('Integer'),
|
|
62
|
+
}),
|
|
63
|
+
new StructureProperty__1.default({
|
|
64
|
+
name: 'body',
|
|
65
|
+
typeAnnotation: TypeAnnotation__1.default.createPrimitive('T'),
|
|
66
|
+
}),
|
|
67
|
+
new StructureProperty__1.default({
|
|
68
|
+
name: 'headers',
|
|
69
|
+
typeAnnotation: TypeAnnotation__1.default.createGeneric('map', {
|
|
70
|
+
typeArguments: [
|
|
71
|
+
// TypeAnnotation.createPrimitive('String'),
|
|
72
|
+
// TypeAnnotation.createPrimitive('String'),
|
|
73
|
+
TypeAnnotation__1.default.createTypeParam('K'),
|
|
74
|
+
TypeAnnotation__1.default.createTypeParam('V'),
|
|
75
|
+
],
|
|
76
|
+
}),
|
|
77
|
+
}), new StructureProperty__1.default({
|
|
78
|
+
name: 'cookies',
|
|
79
|
+
typeAnnotation: TypeAnnotation__1.default.createGeneric('map', {
|
|
80
|
+
typeArguments: [
|
|
81
|
+
TypeAnnotation__1.default.createTypeParam('K'),
|
|
82
|
+
TypeAnnotation__1.default.createReference('HttpCookie', {
|
|
83
|
+
typeNamespace: 'nasl.http',
|
|
84
|
+
}),
|
|
85
|
+
],
|
|
86
|
+
}),
|
|
87
|
+
}),
|
|
88
|
+
],
|
|
89
|
+
}),
|
|
90
|
+
new Structure__1.default({
|
|
91
|
+
name: 'HttpRequest',
|
|
92
|
+
typeParams: [
|
|
93
|
+
new TypeParam__1.default({
|
|
94
|
+
name: 'T',
|
|
95
|
+
}),
|
|
96
|
+
],
|
|
97
|
+
properties: [
|
|
98
|
+
new StructureProperty__1.default({
|
|
99
|
+
name: 'requestURL',
|
|
100
|
+
typeAnnotation: TypeAnnotation__1.default.createPrimitive('String'),
|
|
101
|
+
}),
|
|
102
|
+
new StructureProperty__1.default({
|
|
103
|
+
name: 'remoteIp',
|
|
104
|
+
typeAnnotation: TypeAnnotation__1.default.createPrimitive('String'),
|
|
105
|
+
}),
|
|
106
|
+
new StructureProperty__1.default({
|
|
107
|
+
name: 'requestMethod',
|
|
108
|
+
typeAnnotation: TypeAnnotation__1.default.createPrimitive('String'),
|
|
109
|
+
}),
|
|
110
|
+
new StructureProperty__1.default({
|
|
111
|
+
name: 'body',
|
|
112
|
+
typeAnnotation: TypeAnnotation__1.default.createPrimitive('T'),
|
|
113
|
+
}),
|
|
114
|
+
new StructureProperty__1.default({
|
|
115
|
+
name: 'headers',
|
|
116
|
+
typeAnnotation: TypeAnnotation__1.default.createGeneric('map', {
|
|
117
|
+
typeArguments: [
|
|
118
|
+
// TypeAnnotation.createPrimitive('String'),
|
|
119
|
+
// TypeAnnotation.createPrimitive('String'),
|
|
120
|
+
TypeAnnotation__1.default.createTypeParam('K'),
|
|
121
|
+
TypeAnnotation__1.default.createTypeParam('V'),
|
|
122
|
+
],
|
|
123
|
+
}),
|
|
124
|
+
}),
|
|
125
|
+
new StructureProperty__1.default({
|
|
126
|
+
name: 'pathParams',
|
|
127
|
+
typeAnnotation: TypeAnnotation__1.default.createGeneric('map', {
|
|
128
|
+
typeArguments: [
|
|
129
|
+
// TypeAnnotation.createPrimitive('String'),
|
|
130
|
+
// TypeAnnotation.createPrimitive('String'),
|
|
131
|
+
TypeAnnotation__1.default.createTypeParam('K'),
|
|
132
|
+
TypeAnnotation__1.default.createTypeParam('V'),
|
|
133
|
+
],
|
|
134
|
+
}),
|
|
135
|
+
}),
|
|
136
|
+
new StructureProperty__1.default({
|
|
137
|
+
name: 'queryParams',
|
|
138
|
+
typeAnnotation: TypeAnnotation__1.default.createGeneric('map', {
|
|
139
|
+
typeArguments: [
|
|
140
|
+
// TypeAnnotation.createPrimitive('String'),
|
|
141
|
+
// TypeAnnotation.createPrimitive('String'),
|
|
142
|
+
TypeAnnotation__1.default.createTypeParam('K'),
|
|
143
|
+
TypeAnnotation__1.default.createTypeParam('V'),
|
|
144
|
+
],
|
|
145
|
+
}),
|
|
146
|
+
}),
|
|
147
|
+
new StructureProperty__1.default({
|
|
148
|
+
name: 'cookies',
|
|
149
|
+
typeAnnotation: TypeAnnotation__1.default.createGeneric('map', {
|
|
150
|
+
typeArguments: [
|
|
151
|
+
TypeAnnotation__1.default.createTypeParam('K'),
|
|
152
|
+
TypeAnnotation__1.default.createReference('HttpCookie', {
|
|
153
|
+
typeNamespace: 'nasl.http',
|
|
154
|
+
}),
|
|
155
|
+
],
|
|
156
|
+
}),
|
|
157
|
+
}),
|
|
158
|
+
],
|
|
159
|
+
}),
|
|
160
|
+
];
|
|
161
|
+
exports.httpTypeList = (0, reference2TypeAnnotationList_1.reference2TypeAnnotationList)(exports.httpStructures, 'nasl.http');
|
|
162
|
+
exports.default = new Namespace__1.default({
|
|
163
|
+
name: 'http',
|
|
164
|
+
structures: exports.httpStructures,
|
|
165
|
+
logics: [],
|
|
166
|
+
});
|
|
167
|
+
//# sourceMappingURL=nasl.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nasl.http.js","sourceRoot":"","sources":["../../../../src/concepts/basics/stdlib/nasl.http.ts"],"names":[],"mappings":";;;;;;AAAA,mEAA0C;AAI1C,6EAAoD;AACpD,mEAA0C;AAC1C,mFAA0D;AAC1D,iFAA8E;AAC9E,mEAA0C;AAE7B,QAAA,cAAc,GAAG;IAC1B,IAAI,oBAAS,CAAC;QACV,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE;YACR,IAA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ACJ,CAAC;CACL,CAAC;AAEW,QAAA,YAAY,GAA0B,IAAA,2DAA4B,EAAC,sBAAc,EAAE,WAAW,CAAC,CAAC;AAE7G,kBAAe,IAAI,oBAAS,CAAC;IACzB,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,sBAAc;IAC1B,MAAM,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { App } from './App__';
|
|
2
|
+
import type { Module } from './Module__';
|
|
3
|
+
import type { Namespace } from './Namespace__';
|
|
4
|
+
import type { Frontend } from './Frontend__';
|
|
5
|
+
import type { Backend } from './Backend__';
|
|
6
|
+
import type { Integration } from './Integration__';
|
|
7
|
+
import type { MicroApp } from './MicroApp__';
|
|
8
|
+
import type { TypeAnnotation } from './TypeAnnotation__';
|
|
9
|
+
import type { DatabaseTypeAnnotation } from './DatabaseTypeAnnotation__';
|
|
10
|
+
import type { TypeParam } from './TypeParam__';
|
|
11
|
+
import type { Structure } from './Structure__';
|
|
12
|
+
import type { StructureProperty } from './StructureProperty__';
|
|
13
|
+
import type { Enum } from './Enum__';
|
|
14
|
+
import type { EnumItem } from './EnumItem__';
|
|
15
|
+
import type { DataElement } from './DataElement__';
|
|
16
|
+
import type { DataSource } from './DataSource__';
|
|
17
|
+
import type { Entity } from './Entity__';
|
|
18
|
+
import type { EntityProperty } from './EntityProperty__';
|
|
19
|
+
import type { EntityIndex } from './EntityIndex__';
|
|
20
|
+
import type { View } from './View__';
|
|
21
|
+
import type { ViewElement } from './ViewElement__';
|
|
22
|
+
import type { BindAttribute } from './BindAttribute__';
|
|
23
|
+
import type { BindDirective } from './BindDirective__';
|
|
24
|
+
import type { BindEvent } from './BindEvent__';
|
|
25
|
+
import type { BindStyle } from './BindStyle__';
|
|
26
|
+
import type { ViewComponent } from './ViewComponent__';
|
|
27
|
+
import type { Attribute } from './Attribute__';
|
|
28
|
+
import type { Event } from './Event__';
|
|
29
|
+
import type { Slot } from './Slot__';
|
|
30
|
+
import type { Theme } from './Theme__';
|
|
31
|
+
import type { Logic } from './Logic__';
|
|
32
|
+
import type { AuthLogic } from './AuthLogic__';
|
|
33
|
+
import type { AuthLogicForCallInterface } from './AuthLogicForCallInterface__';
|
|
34
|
+
import type { OverriddenLogic } from './OverriddenLogic__';
|
|
35
|
+
import type { Param } from './Param__';
|
|
36
|
+
import type { Return } from './Return__';
|
|
37
|
+
import type { Variable } from './Variable__';
|
|
38
|
+
import type { BackendVariable } from './BackendVariable__';
|
|
39
|
+
import type { FrontendVariable } from './FrontendVariable__';
|
|
40
|
+
import type { Constant } from './Constant__';
|
|
41
|
+
import type { LogicItem } from './LogicItem__';
|
|
42
|
+
import type { Function } from './Function__';
|
|
43
|
+
import type { AnonymousFunction } from './AnonymousFunction__';
|
|
44
|
+
import type { Interface } from './Interface__';
|
|
45
|
+
import type { InterfaceParam } from './InterfaceParam__';
|
|
46
|
+
import type { Transactional } from './Transactional__';
|
|
47
|
+
import type { Abort } from './Abort__';
|
|
48
|
+
import type { Start } from './Start__';
|
|
49
|
+
import type { End } from './End__';
|
|
50
|
+
import type { IfStatement } from './IfStatement__';
|
|
51
|
+
import type { SwitchStatement } from './SwitchStatement__';
|
|
52
|
+
import type { SwitchCase } from './SwitchCase__';
|
|
53
|
+
import type { ForEachStatement } from './ForEachStatement__';
|
|
54
|
+
import type { WhileStatement } from './WhileStatement__';
|
|
55
|
+
import type { Assignment } from './Assignment__';
|
|
56
|
+
import type { BatchAssignment } from './BatchAssignment__';
|
|
57
|
+
import type { Comment } from './Comment__';
|
|
58
|
+
import type { CallLogic } from './CallLogic__';
|
|
59
|
+
import type { CallFunction } from './CallFunction__';
|
|
60
|
+
import type { CallInterface } from './CallInterface__';
|
|
61
|
+
import type { Destination } from './Destination__';
|
|
62
|
+
import type { ExternalDestination } from './ExternalDestination__';
|
|
63
|
+
import type { ValidationRule } from './ValidationRule__';
|
|
64
|
+
import type { Argument } from './Argument__';
|
|
65
|
+
import type { Anchor } from './Anchor__';
|
|
66
|
+
import type { JSBlock } from './JSBlock__';
|
|
67
|
+
import type { JavaLogic } from './JavaLogic__';
|
|
68
|
+
import type { Identifier } from './Identifier__';
|
|
69
|
+
import type { NullLiteral } from './NullLiteral__';
|
|
70
|
+
import type { BooleanLiteral } from './BooleanLiteral__';
|
|
71
|
+
import type { StringLiteral } from './StringLiteral__';
|
|
72
|
+
import type { StringInterpolation } from './StringInterpolation__';
|
|
73
|
+
import type { NumericLiteral } from './NumericLiteral__';
|
|
74
|
+
import type { BinaryExpression } from './BinaryExpression__';
|
|
75
|
+
import type { MatchCase } from './MatchCase__';
|
|
76
|
+
import type { Match } from './Match__';
|
|
77
|
+
import type { UnaryExpression } from './UnaryExpression__';
|
|
78
|
+
import type { MemberExpression } from './MemberExpression__';
|
|
79
|
+
import type { Unparsed } from './Unparsed__';
|
|
80
|
+
import type { New } from './New__';
|
|
81
|
+
import type { NewComposite } from './NewComposite__';
|
|
82
|
+
import type { NewList } from './NewList__';
|
|
83
|
+
import type { NewMap } from './NewMap__';
|
|
84
|
+
import type { CallQueryComponent } from './CallQueryComponent__';
|
|
85
|
+
import type { QueryFromExpression } from './QueryFromExpression__';
|
|
86
|
+
import type { QueryJoinExpression } from './QueryJoinExpression__';
|
|
87
|
+
import type { QueryFieldExpression } from './QueryFieldExpression__';
|
|
88
|
+
import type { QueryAggregateExpression } from './QueryAggregateExpression__';
|
|
89
|
+
import type { QueryOrderByExpression } from './QueryOrderByExpression__';
|
|
90
|
+
import type { QueryGroupByExpression } from './QueryGroupByExpression__';
|
|
91
|
+
import type { QuerySelectExpression } from './QuerySelectExpression__';
|
|
92
|
+
import type { QueryLimitExpression } from './QueryLimitExpression__';
|
|
93
|
+
import type { SqlQueryComponent } from './SqlQueryComponent__';
|
|
94
|
+
import type { OqlQueryComponent } from './OqlQueryComponent__';
|
|
95
|
+
import type { Process } from './Process__';
|
|
96
|
+
import type { ProcessElement } from './ProcessElement__';
|
|
97
|
+
import type { ProcessComponent } from './ProcessComponent__';
|
|
98
|
+
import type { ProcessOutcome } from './ProcessOutcome__';
|
|
99
|
+
import type { Assignee } from './Assignee__';
|
|
100
|
+
import type { ProcessOutcomes } from './ProcessOutcomes__';
|
|
101
|
+
import type { Role } from './Role__';
|
|
102
|
+
import type { Configuration } from './Configuration__';
|
|
103
|
+
import type { ConfigGroup } from './ConfigGroup__';
|
|
104
|
+
import type { ConfigProperty } from './ConfigProperty__';
|
|
105
|
+
import type { ConfigPropertyValue } from './ConfigPropertyValue__';
|
|
106
|
+
import type { CompletionProperty } from './CompletionProperty__';
|
|
107
|
+
import type { UseComponent } from './UseComponent__';
|
|
108
|
+
import type { Point } from './Point__';
|
|
109
|
+
import type { Rect } from './Rect__';
|
|
110
|
+
import type { SelectMembers } from './SelectMembers__';
|
|
111
|
+
import type { AssignmentLine } from './AssignmentLine__';
|
|
112
|
+
import type { FrontendLibrary } from './FrontendLibrary__';
|
|
113
|
+
import type { ViewBlock } from './ViewBlock__';
|
|
114
|
+
import type { AuthInterface } from './AuthInterface__';
|
|
115
|
+
import type { CallAuthInterface } from './CallAuthInterface__';
|
|
116
|
+
import type { TriggerEvent } from './TriggerEvent__';
|
|
117
|
+
import type { MsgTriggerEvent } from './MsgTriggerEvent__';
|
|
118
|
+
import type { ConnectorTrigger } from './ConnectorTrigger__';
|
|
119
|
+
import type { TriggerLauncher } from './TriggerLauncher__';
|
|
120
|
+
import type { MsgTriggerLauncher } from './MsgTriggerLauncher__';
|
|
121
|
+
import type { Connector } from './Connector__';
|
|
122
|
+
import type { CallConnector } from './CallConnector__';
|
|
123
|
+
export declare type SynatxNode = App | Module | Namespace | Frontend | Backend | Integration | MicroApp | TypeAnnotation | DatabaseTypeAnnotation | TypeParam | Structure | StructureProperty | Enum | EnumItem | DataElement | DataSource | Entity | EntityProperty | EntityIndex | View | ViewElement | BindAttribute | BindDirective | BindEvent | BindStyle | ViewComponent | Attribute | Event | Slot | Theme | Logic | AuthLogic | AuthLogicForCallInterface | OverriddenLogic | Param | Return | Variable | BackendVariable | FrontendVariable | Constant | LogicItem | Function | AnonymousFunction | Interface | InterfaceParam | Transactional | Abort | Start | End | IfStatement | SwitchStatement | SwitchCase | ForEachStatement | WhileStatement | Assignment | BatchAssignment | Comment | CallLogic | CallFunction | CallInterface | Destination | ExternalDestination | ValidationRule | Argument | Anchor | JSBlock | JavaLogic | Identifier | NullLiteral | BooleanLiteral | StringLiteral | StringInterpolation | NumericLiteral | BinaryExpression | MatchCase | Match | UnaryExpression | MemberExpression | Unparsed | New | NewComposite | NewList | NewMap | CallQueryComponent | QueryFromExpression | QueryJoinExpression | QueryFieldExpression | QueryAggregateExpression | QueryOrderByExpression | QueryGroupByExpression | QuerySelectExpression | QueryLimitExpression | SqlQueryComponent | OqlQueryComponent | Process | ProcessElement | ProcessComponent | ProcessOutcome | Assignee | ProcessOutcomes | Role | Configuration | ConfigGroup | ConfigProperty | ConfigPropertyValue | CompletionProperty | UseComponent | Point | Rect | SelectMembers | AssignmentLine | FrontendLibrary | ViewBlock | AuthInterface | CallAuthInterface | TriggerEvent | MsgTriggerEvent | ConnectorTrigger | TriggerLauncher | MsgTriggerLauncher | Connector | CallConnector;
|
|
124
|
+
export declare type SynatxNodeConcept = SynatxNode['concept'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types__.js","sourceRoot":"","sources":["../../src/concepts/types__.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import CallConnector from '@nasl/concepts/CallConnector__';
|
|
2
|
+
import Connector from '@nasl/concepts/Connector__';
|
|
3
|
+
export declare function getConnectors(node: CallConnector): (import("..").Module | Connector)[];
|
|
4
|
+
export declare function getConnectorTree(node: CallConnector, filterText: string): {
|
|
5
|
+
name: string;
|
|
6
|
+
title: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
expanded: boolean;
|
|
9
|
+
unselectable: boolean;
|
|
10
|
+
children: Connector[];
|
|
11
|
+
}[];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getConnectorTree = exports.getConnectors = void 0;
|
|
4
|
+
function getConnectors(node) {
|
|
5
|
+
const app = node?.rootNode;
|
|
6
|
+
const source = app.dependencies.filter((dep) => dep.type === 'connector');
|
|
7
|
+
return source;
|
|
8
|
+
}
|
|
9
|
+
exports.getConnectors = getConnectors;
|
|
10
|
+
function getConnectorTree(node, filterText) {
|
|
11
|
+
const source = getConnectors(node);
|
|
12
|
+
let target = source;
|
|
13
|
+
if (filterText) {
|
|
14
|
+
target = source.filter((dep) => new RegExp(filterText).test(dep.name));
|
|
15
|
+
}
|
|
16
|
+
const tree = [];
|
|
17
|
+
const redises = target.filter((dep) => dep.connectorKind === 'redis');
|
|
18
|
+
const kafkas = target.filter((dep) => dep.connectorKind === 'kafka');
|
|
19
|
+
if (redises.length) {
|
|
20
|
+
tree.push({
|
|
21
|
+
name: 'Redis连接器',
|
|
22
|
+
title: 'Redis连接器',
|
|
23
|
+
icon: 'redis',
|
|
24
|
+
expanded: true,
|
|
25
|
+
unselectable: true,
|
|
26
|
+
children: redises,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
if (kafkas.length) {
|
|
30
|
+
tree.push({
|
|
31
|
+
name: 'Kafka连接器',
|
|
32
|
+
title: 'Kafka连接器',
|
|
33
|
+
icon: 'kafka',
|
|
34
|
+
expanded: true,
|
|
35
|
+
unselectable: true,
|
|
36
|
+
children: kafkas,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return tree;
|
|
40
|
+
}
|
|
41
|
+
exports.getConnectorTree = getConnectorTree;
|
|
42
|
+
//# sourceMappingURL=getConnector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConnector.js","sourceRoot":"","sources":["../../src/server/getConnector.ts"],"names":[],"mappings":";;;AAIA,SAAgB,aAAa,CAAC,IAAmB;IAC7C,MAAM,GAAG,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