@comake/skl-js-engine 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/JsExecutor/PermissionBuilder.d.ts +13 -0
- package/dist/JsExecutor/PermissionBuilder.js +58 -0
- package/dist/JsExecutor/PermissionBuilder.js.map +1 -0
- package/dist/JsExecutor/constants.d.ts +26 -0
- package/dist/JsExecutor/constants.js +30 -0
- package/dist/JsExecutor/constants.js.map +1 -0
- package/dist/JsExecutor/denoUtils.d.ts +9 -0
- package/dist/JsExecutor/denoUtils.js +24 -0
- package/dist/JsExecutor/denoUtils.js.map +1 -0
- package/dist/JsExecutor/errors.d.ts +39 -0
- package/dist/JsExecutor/errors.js +67 -0
- package/dist/JsExecutor/errors.js.map +1 -0
- package/dist/JsExecutor/examples/basic/index.d.ts +0 -0
- package/dist/JsExecutor/examples/basic/index.js +46 -0
- package/dist/JsExecutor/examples/basic/index.js.map +1 -0
- package/dist/JsExecutor/examples/basic/process.d.ts +0 -0
- package/dist/JsExecutor/examples/basic/process.js +34 -0
- package/dist/JsExecutor/examples/basic/process.js.map +1 -0
- package/dist/JsExecutor/examples/jsExecutor/index.d.ts +1 -0
- package/dist/JsExecutor/examples/jsExecutor/index.js +48 -0
- package/dist/JsExecutor/examples/jsExecutor/index.js.map +1 -0
- package/dist/JsExecutor/examples/jsExecutor/process.d.ts +1 -0
- package/dist/JsExecutor/examples/jsExecutor/process.js +59 -0
- package/dist/JsExecutor/examples/jsExecutor/process.js.map +1 -0
- package/dist/JsExecutor/index.d.ts +6 -0
- package/dist/JsExecutor/index.js +36 -0
- package/dist/JsExecutor/index.js.map +1 -0
- package/dist/JsExecutor/jsExecutor.d.ts +67 -0
- package/dist/JsExecutor/jsExecutor.js +159 -0
- package/dist/JsExecutor/jsExecutor.js.map +1 -0
- package/dist/JsExecutor/jsonRpc/JsonRpcClient.d.ts +164 -0
- package/dist/JsExecutor/jsonRpc/JsonRpcClient.js +334 -0
- package/dist/JsExecutor/jsonRpc/JsonRpcClient.js.map +1 -0
- package/dist/JsExecutor/jsonRpc/JsonRpcServer.d.ts +124 -0
- package/dist/JsExecutor/jsonRpc/JsonRpcServer.js +391 -0
- package/dist/JsExecutor/jsonRpc/JsonRpcServer.js.map +1 -0
- package/dist/JsExecutor/jsonRpc/index.d.ts +3 -0
- package/dist/JsExecutor/jsonRpc/index.js +23 -0
- package/dist/JsExecutor/jsonRpc/index.js.map +1 -0
- package/dist/JsExecutor/jsonRpc/types.d.ts +192 -0
- package/dist/JsExecutor/jsonRpc/types.js +37 -0
- package/dist/JsExecutor/jsonRpc/types.js.map +1 -0
- package/dist/JsExecutor/transport/StdioTransport.d.ts +226 -0
- package/dist/JsExecutor/transport/StdioTransport.js +634 -0
- package/dist/JsExecutor/transport/StdioTransport.js.map +1 -0
- package/dist/JsExecutor/transport/Transport.d.ts +71 -0
- package/dist/JsExecutor/transport/Transport.js +14 -0
- package/dist/JsExecutor/transport/Transport.js.map +1 -0
- package/dist/JsExecutor/transport/base/BaseTransport.d.ts +50 -0
- package/dist/JsExecutor/transport/base/BaseTransport.js +68 -0
- package/dist/JsExecutor/transport/base/BaseTransport.js.map +1 -0
- package/dist/JsExecutor/transport/index.d.ts +12 -0
- package/dist/JsExecutor/transport/index.js +36 -0
- package/dist/JsExecutor/transport/index.js.map +1 -0
- package/dist/JsExecutor/transport/process/ProcessManager.d.ts +95 -0
- package/dist/JsExecutor/transport/process/ProcessManager.js +214 -0
- package/dist/JsExecutor/transport/process/ProcessManager.js.map +1 -0
- package/dist/JsExecutor/transport/stdio/ChildStdioTransport.d.ts +86 -0
- package/dist/JsExecutor/transport/stdio/ChildStdioTransport.js +215 -0
- package/dist/JsExecutor/transport/stdio/ChildStdioTransport.js.map +1 -0
- package/dist/JsExecutor/transport/stdio/ParentStdioTransport.d.ts +80 -0
- package/dist/JsExecutor/transport/stdio/ParentStdioTransport.js +263 -0
- package/dist/JsExecutor/transport/stdio/ParentStdioTransport.js.map +1 -0
- package/dist/JsExecutor/transport/utils/MessageUtils.d.ts +67 -0
- package/dist/JsExecutor/transport/utils/MessageUtils.js +135 -0
- package/dist/JsExecutor/transport/utils/MessageUtils.js.map +1 -0
- package/dist/JsExecutor/types.d.ts +112 -0
- package/dist/JsExecutor/types.js +3 -0
- package/dist/JsExecutor/types.js.map +1 -0
- package/dist/SklEngine.d.ts +9 -5
- package/dist/SklEngine.js +79 -87
- package/dist/SklEngine.js.map +1 -1
- package/dist/SklEngineOptions.d.ts +4 -0
- package/dist/constants.d.ts +1 -1
- package/dist/executor.js +9 -3
- package/dist/index.d.ts +12 -11
- package/dist/index.js +17 -15
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +5 -1
- package/dist/logger.js +21 -4
- package/dist/logger.js.map +1 -1
- package/dist/util/Vocabularies/Shared.d.ts +1 -1
- package/dist/util/Vocabularies/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/Jsexecutor.d.ts +0 -77
- package/dist/Jsexecutor.js +0 -184
- package/dist/Jsexecutor.js.map +0 -1
- package/dist/storage/operator/ArrayEqual.d.ts +0 -3
- package/dist/storage/operator/ArrayEqual.js +0 -13
- package/dist/storage/operator/ArrayEqual.js.map +0 -1
- package/dist/util/Vocabularies/core.d.ts +0 -7
- package/dist/util/Vocabularies/core.js +0 -119
- package/dist/util/Vocabularies/core.js.map +0 -1
package/dist/Jsexecutor.js
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
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.JSExecutor = void 0;
|
|
7
|
-
// JSExecutor.ts using Node.js built-in child_process with TypeScript
|
|
8
|
-
const buffer_1 = require("buffer");
|
|
9
|
-
const child_process_1 = require("child_process");
|
|
10
|
-
const path_1 = __importDefault(require("path"));
|
|
11
|
-
/**
|
|
12
|
-
* JavaScript code executor using Deno
|
|
13
|
-
*/
|
|
14
|
-
class JSExecutor {
|
|
15
|
-
/**
|
|
16
|
-
* Creates a new JavaScript executor
|
|
17
|
-
* @param executorScriptPath Path to the executor.ts script (absolute or relative)
|
|
18
|
-
*/
|
|
19
|
-
constructor(executorScriptPath) {
|
|
20
|
-
this.executorScriptPath = path_1.default.resolve(executorScriptPath);
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Executes JavaScript code using the pre-saved executor script
|
|
24
|
-
* @param code JavaScript code to execute
|
|
25
|
-
* @param args Arguments to pass to the code
|
|
26
|
-
* @param options Execution options
|
|
27
|
-
*/
|
|
28
|
-
async execute(code, args, options = {}) {
|
|
29
|
-
const { timeout = 5000, functionName = 'main', allowNetwork = false, allowedDomains = [], allowEnv = false, debugMode = false, } = options;
|
|
30
|
-
try {
|
|
31
|
-
// Configure permissions
|
|
32
|
-
const permissions = this.getDenoPermissions({
|
|
33
|
-
allowNetwork,
|
|
34
|
-
allowedDomains,
|
|
35
|
-
allowEnv,
|
|
36
|
-
});
|
|
37
|
-
// Build the command arguments
|
|
38
|
-
const commandArgs = ['run', '--quiet', ...permissions, this.executorScriptPath];
|
|
39
|
-
// Prepare input data
|
|
40
|
-
const inputData = {
|
|
41
|
-
code,
|
|
42
|
-
args,
|
|
43
|
-
functionName,
|
|
44
|
-
};
|
|
45
|
-
const encodedData = buffer_1.Buffer.from(JSON.stringify(inputData)).toString('base64');
|
|
46
|
-
// Execute with child_process
|
|
47
|
-
return await new Promise((resolve, reject) => {
|
|
48
|
-
const startTime = Date.now();
|
|
49
|
-
let childProcess = null;
|
|
50
|
-
// Set timeout
|
|
51
|
-
const timeoutId = setTimeout(() => {
|
|
52
|
-
if (childProcess && !childProcess.killed) {
|
|
53
|
-
childProcess.kill('SIGTERM');
|
|
54
|
-
resolve({
|
|
55
|
-
success: false,
|
|
56
|
-
error: new Error(`Execution timed out after ${timeout}ms`),
|
|
57
|
-
logs: [],
|
|
58
|
-
executionTime: Date.now() - startTime,
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}, timeout);
|
|
62
|
-
// Spawn process
|
|
63
|
-
childProcess = (0, child_process_1.spawn)('deno', commandArgs, {
|
|
64
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
65
|
-
});
|
|
66
|
-
// Collect stdout and stderr
|
|
67
|
-
let stdoutData = '';
|
|
68
|
-
let stderrData = '';
|
|
69
|
-
childProcess.stdout?.on('data', (data) => {
|
|
70
|
-
stdoutData += data.toString();
|
|
71
|
-
});
|
|
72
|
-
childProcess.stderr?.on('data', (data) => {
|
|
73
|
-
stderrData += data.toString();
|
|
74
|
-
});
|
|
75
|
-
// Handle process completion
|
|
76
|
-
childProcess.on('close', (code) => {
|
|
77
|
-
clearTimeout(timeoutId);
|
|
78
|
-
const executionTime = Date.now() - startTime;
|
|
79
|
-
if (code === 0 && stdoutData) {
|
|
80
|
-
try {
|
|
81
|
-
// Parse the output JSON
|
|
82
|
-
const outputData = JSON.parse(stdoutData);
|
|
83
|
-
// Handle execution errors in the Deno context
|
|
84
|
-
if (outputData.error) {
|
|
85
|
-
const errorMsg = typeof outputData.error === 'object' ? outputData.error.message : String(outputData.error);
|
|
86
|
-
const result = {
|
|
87
|
-
success: false,
|
|
88
|
-
error: new Error(errorMsg),
|
|
89
|
-
logs: outputData.logs || [],
|
|
90
|
-
executionTime: outputData.executionTime || executionTime,
|
|
91
|
-
};
|
|
92
|
-
if (debugMode) {
|
|
93
|
-
console.error('JavaScript execution error:', errorMsg);
|
|
94
|
-
if (outputData.logs && outputData.logs.length > 0) {
|
|
95
|
-
console.log('Execution logs:', outputData.logs.join('\n'));
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
resolve(result);
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
// Log output if debug mode is enabled
|
|
102
|
-
if (debugMode) {
|
|
103
|
-
console.log(`Code executed successfully in ${outputData.executionTime || executionTime}ms`);
|
|
104
|
-
if (outputData.logs && outputData.logs.length > 0) {
|
|
105
|
-
console.log('Execution logs:', outputData.logs.join('\n'));
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
// Return successful result
|
|
109
|
-
resolve({
|
|
110
|
-
success: true,
|
|
111
|
-
result: outputData.result,
|
|
112
|
-
logs: outputData.logs || [],
|
|
113
|
-
executionTime: outputData.executionTime || executionTime,
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
catch (error) {
|
|
117
|
-
resolve({
|
|
118
|
-
success: false,
|
|
119
|
-
error: new Error(`Failed to parse output: ${error.message}`),
|
|
120
|
-
logs: [`Raw output: ${stdoutData.slice(0, 500)}${stdoutData.length > 500 ? '...' : ''}`],
|
|
121
|
-
executionTime,
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
let errorMessage = `Process exited with code ${code}`;
|
|
127
|
-
if (stderrData) {
|
|
128
|
-
errorMessage += `\nStderr: ${stderrData}`;
|
|
129
|
-
}
|
|
130
|
-
resolve({
|
|
131
|
-
success: false,
|
|
132
|
-
error: new Error(errorMessage),
|
|
133
|
-
logs: [],
|
|
134
|
-
executionTime,
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
// Handle process errors
|
|
139
|
-
childProcess.on('error', (error) => {
|
|
140
|
-
clearTimeout(timeoutId);
|
|
141
|
-
resolve({
|
|
142
|
-
success: false,
|
|
143
|
-
error: new Error(`Failed to spawn Deno process: ${error.message}`),
|
|
144
|
-
logs: [],
|
|
145
|
-
executionTime: Date.now() - startTime,
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
// Send input data via stdin
|
|
149
|
-
childProcess.stdin?.write(encodedData);
|
|
150
|
-
childProcess.stdin?.end();
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
catch (error) {
|
|
154
|
-
return {
|
|
155
|
-
success: false,
|
|
156
|
-
error: new Error(`Failed to execute code: ${error.message}`),
|
|
157
|
-
logs: [],
|
|
158
|
-
executionTime: 0,
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Returns the appropriate Deno permissions based on configuration
|
|
164
|
-
*/
|
|
165
|
-
getDenoPermissions(options) {
|
|
166
|
-
const permissions = [];
|
|
167
|
-
// Add network permissions if enabled
|
|
168
|
-
if (options.allowNetwork) {
|
|
169
|
-
if (options.allowedDomains.length > 0) {
|
|
170
|
-
permissions.push(`--allow-net=${options.allowedDomains.join(',')}`);
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
permissions.push('--allow-net');
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
// Add env permissions if enabled
|
|
177
|
-
if (options.allowEnv) {
|
|
178
|
-
permissions.push('--allow-env');
|
|
179
|
-
}
|
|
180
|
-
return permissions;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
exports.JSExecutor = JSExecutor;
|
|
184
|
-
//# sourceMappingURL=Jsexecutor.js.map
|
package/dist/Jsexecutor.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Jsexecutor.js","sourceRoot":"","sources":["../src/Jsexecutor.ts"],"names":[],"mappings":";;;;;;AAAA,qEAAqE;AACrE,mCAAgC;AAEhC,iDAAsC;AACtC,gDAAwB;AAmExB;;GAEG;AACH,MAAa,UAAU;IAGrB;;;OAGG;IACH,YAAmB,kBAA0B;QAC3C,IAAI,CAAC,kBAAkB,GAAG,cAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,OAAO,CAClB,IAAY,EACZ,IAAyB,EACzB,UAA4B,EAAE;QAE9B,MAAM,EACJ,OAAO,GAAG,IAAI,EACd,YAAY,GAAG,MAAM,EACrB,YAAY,GAAG,KAAK,EACpB,cAAc,GAAG,EAAE,EACnB,QAAQ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,IAAI,OAAO,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;gBACrC,WAAW,CAAC,IAAI,CAAC,eAAe,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;aACrE;iBAAM;gBACL,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;aACjC;SACF;QAED,iCAAiC;QACjC,IAAI,OAAO,CAAC,QAAQ,EAAE;YACpB,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SACjC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;CACF;AA9MD,gCA8MC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ArrayEqual = void 0;
|
|
4
|
-
const FindOperator_1 = require("../FindOperator");
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
6
|
-
function ArrayEqual(value) {
|
|
7
|
-
return new FindOperator_1.FindOperator({
|
|
8
|
-
operator: 'arrayEqual',
|
|
9
|
-
value,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
exports.ArrayEqual = ArrayEqual;
|
|
13
|
-
//# sourceMappingURL=ArrayEqual.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayEqual.js","sourceRoot":"","sources":["../../../src/storage/operator/ArrayEqual.ts"],"names":[],"mappings":";;;AACA,kDAA+C;AAE/C,gEAAgE;AAChE,SAAgB,UAAU,CACxB,KAAU;IAEV,OAAO,IAAI,2BAAY,CAAC;QACtB,QAAQ,EAAE,YAAY;QACtB,KAAK;KACN,CAAC,CAAC;AACL,CAAC;AAPD,gCAOC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './Shared';
|
|
2
|
-
export declare const SKL_NAMESPACE = "https://skl.so/";
|
|
3
|
-
export declare const SKL_DATA_NAMESPACE = "https://skl.so/d/";
|
|
4
|
-
export declare const SKL_ENGINE_NAMESPACE = "https://skl.so/skl-engine/";
|
|
5
|
-
export declare const SKL_SPECS: import("./helper").Namespace<"Capability" | "CapabilityMapping" | "TriggerCapabilityMapping" | "InvalidTokenErrorMatcher" | "JsonDataSource" | "OpenApiDescription" | "SecurityCredentials" | "Mapping" | "Inputs" | "OpenAPI" | "CodeFunction" | "integration/AuthenticationCredential" | "integration/interface/RESTfulApi", "https://skl.so/">;
|
|
6
|
-
export declare const SKL_PROPERTY: import("./helper").Namespace<"object" | "data" | "type" | "label" | "capability" | "capabilityType" | "capabilityId" | "capabilityMapping" | "inputs" | "outputs" | "inputsContext" | "outputsContext" | "invalidTokenErrorMatcher" | "invalidTokenErrorMatcherStatus" | "invalidTokenErrorMatcherMessageRegex" | "refreshToken" | "jwtBearerOptions" | "accessToken" | "bearerToken" | "clientId" | "clientSecret" | "schemeName" | "oauthFlow" | "stage" | "operationId" | "source" | "series" | "parallel" | "apiKey" | "overrideBasePath" | "headers" | "inputsReference" | "inputsMapping" | "inputsMappingFrame" | "inputsMappingRef" | "inputsMappingFrameRef" | "outputsReference" | "outputsMapping" | "outputsMappingFrame" | "preProcessingMapping" | "preProcessingMappingFrame" | "operationMapping" | "dataSource" | "sourceId" | "records" | "dateCreated" | "dateModified" | "declarativeApiDescription" | "identifier" | "codeBody" | "integration/integration" | "account" | "credential" | "interface" | "username", "https://skl.so/">;
|
|
7
|
-
export declare const SKL_ENGINE: import("./helper").Namespace<"update" | "findAll" | "findAllBy" | "find" | "findBy" | "exists" | "existsResult" | "count" | "countResult" | "save" | "destroy", "https://skl.so/skl-engine/">;
|
|
@@ -1,119 +0,0 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.SKL_ENGINE = exports.SKL_PROPERTY = exports.SKL_SPECS = exports.SKL_ENGINE_NAMESPACE = exports.SKL_DATA_NAMESPACE = exports.SKL_NAMESPACE = void 0;
|
|
18
|
-
const helper_1 = require("./helper");
|
|
19
|
-
__exportStar(require("./Shared"), exports);
|
|
20
|
-
exports.SKL_NAMESPACE = 'https://skl.so/';
|
|
21
|
-
exports.SKL_DATA_NAMESPACE = 'https://skl.so/d/';
|
|
22
|
-
exports.SKL_ENGINE_NAMESPACE = 'https://skl.so/skl-engine/';
|
|
23
|
-
exports.SKL_SPECS = (0, helper_1.createNamespace)(exports.SKL_NAMESPACE, [
|
|
24
|
-
'Capability',
|
|
25
|
-
'CapabilityMapping',
|
|
26
|
-
'TriggerCapabilityMapping',
|
|
27
|
-
'InvalidTokenErrorMatcher',
|
|
28
|
-
'JsonDataSource',
|
|
29
|
-
'OpenApiDescription',
|
|
30
|
-
'SecurityCredentials',
|
|
31
|
-
'Mapping',
|
|
32
|
-
'Inputs',
|
|
33
|
-
'OpenAPI',
|
|
34
|
-
'CodeFunction',
|
|
35
|
-
'integration/AuthenticationCredential',
|
|
36
|
-
'integration/interface/RESTfulApi',
|
|
37
|
-
]);
|
|
38
|
-
exports.SKL_PROPERTY = (0, helper_1.createNamespace)(exports.SKL_NAMESPACE, [
|
|
39
|
-
'capability',
|
|
40
|
-
'capabilityType',
|
|
41
|
-
'capabilityId',
|
|
42
|
-
'capabilityMapping',
|
|
43
|
-
'inputs',
|
|
44
|
-
'outputs',
|
|
45
|
-
'inputsContext',
|
|
46
|
-
'outputsContext',
|
|
47
|
-
'invalidTokenErrorMatcher',
|
|
48
|
-
'invalidTokenErrorMatcherStatus',
|
|
49
|
-
'invalidTokenErrorMatcherMessageRegex',
|
|
50
|
-
'refreshToken',
|
|
51
|
-
'jwtBearerOptions',
|
|
52
|
-
'accessToken',
|
|
53
|
-
'bearerToken',
|
|
54
|
-
'clientId',
|
|
55
|
-
'clientSecret',
|
|
56
|
-
'schemeName',
|
|
57
|
-
'oauthFlow',
|
|
58
|
-
'stage',
|
|
59
|
-
'operationId',
|
|
60
|
-
'data',
|
|
61
|
-
'source',
|
|
62
|
-
'series',
|
|
63
|
-
'parallel',
|
|
64
|
-
'apiKey',
|
|
65
|
-
'overrideBasePath',
|
|
66
|
-
'headers',
|
|
67
|
-
'object',
|
|
68
|
-
'inputsReference',
|
|
69
|
-
'inputsMapping',
|
|
70
|
-
'inputsMappingFrame',
|
|
71
|
-
'inputsMappingRef',
|
|
72
|
-
'inputsMappingFrameRef',
|
|
73
|
-
'outputsReference',
|
|
74
|
-
'outputsMapping',
|
|
75
|
-
'outputsMappingFrame',
|
|
76
|
-
'preProcessingMapping',
|
|
77
|
-
'preProcessingMappingFrame',
|
|
78
|
-
'operationMapping',
|
|
79
|
-
'dataSource',
|
|
80
|
-
'sourceId',
|
|
81
|
-
'records',
|
|
82
|
-
'type',
|
|
83
|
-
'dateCreated',
|
|
84
|
-
'dateModified',
|
|
85
|
-
'label',
|
|
86
|
-
'declarativeApiDescription',
|
|
87
|
-
'identifier',
|
|
88
|
-
'codeBody',
|
|
89
|
-
'integration/integration',
|
|
90
|
-
'account',
|
|
91
|
-
'credential',
|
|
92
|
-
'interface',
|
|
93
|
-
'username',
|
|
94
|
-
]);
|
|
95
|
-
// Export const SKLSO_INTEGRATION_NAMESPACE = 'https://skl.so/integration/';
|
|
96
|
-
// Export const SKLSO_INTEGRATION = createNamespace(SKLSO_INTEGRATION_NAMESPACE, [
|
|
97
|
-
// 'integration',
|
|
98
|
-
// 'account',
|
|
99
|
-
// 'credential',
|
|
100
|
-
// 'interface',
|
|
101
|
-
// 'username',
|
|
102
|
-
// 'AuthenticationCredential',
|
|
103
|
-
// ]);
|
|
104
|
-
// export const SKLSO_INTEGRATION_INTERFACE_NAMESPACE = 'https://skl.so/integration/interface/';
|
|
105
|
-
// export const SKLSO_INTEGRATION_INTERFACE = createNamespace(SKLSO_INTEGRATION_INTERFACE_NAMESPACE, ['RESTfulApi']);
|
|
106
|
-
exports.SKL_ENGINE = (0, helper_1.createNamespace)(exports.SKL_ENGINE_NAMESPACE, [
|
|
107
|
-
'update',
|
|
108
|
-
'findAll',
|
|
109
|
-
'findAllBy',
|
|
110
|
-
'find',
|
|
111
|
-
'findBy',
|
|
112
|
-
'exists',
|
|
113
|
-
'existsResult',
|
|
114
|
-
'count',
|
|
115
|
-
'countResult',
|
|
116
|
-
'save',
|
|
117
|
-
'destroy',
|
|
118
|
-
]);
|
|
119
|
-
//# sourceMappingURL=core.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/util/Vocabularies/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qCAA2C;AAE3C,2CAAyB;AAEZ,QAAA,aAAa,GAAG,iBAAiB,CAAC;AAClC,QAAA,kBAAkB,GAAG,mBAAmB,CAAC;AACzC,QAAA,oBAAoB,GAAG,4BAA4B,CAAC;AAEpD,QAAA,SAAS,GAAG,IAAA,wBAAe,EAAC,qBAAa,EAAE;IACtD,YAAY;IACZ,mBAAmB;IACnB,0BAA0B;IAC1B,0BAA0B;IAC1B,gBAAgB;IAChB,oBAAoB;IACpB,qBAAqB;IACrB,SAAS;IACT,QAAQ;IACR,SAAS;IACT,cAAc;IACd,sCAAsC;IACt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