@sw-tsdk/plugin-connector 3.9.1 → 3.11.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/README.md +124 -65
- package/lib/commands/action/run/local.js +1 -1
- package/lib/commands/action/run/local.js.map +1 -1
- package/lib/commands/component/create.d.ts +4 -0
- package/lib/commands/component/create.js +49 -1
- package/lib/commands/component/create.js.map +1 -1
- package/lib/commands/connector/create/openapi.js +48 -30
- package/lib/commands/connector/create/openapi.js.map +1 -1
- package/lib/commands/migrator/convert.d.ts +25 -0
- package/lib/commands/migrator/convert.js +224 -0
- package/lib/commands/migrator/convert.js.map +1 -0
- package/lib/commands/migrator/export.d.ts +13 -0
- package/lib/commands/migrator/export.js +121 -0
- package/lib/commands/migrator/export.js.map +1 -0
- package/lib/commands/playbook/create.d.ts +4 -0
- package/lib/commands/playbook/create.js +49 -1
- package/lib/commands/playbook/create.js.map +1 -1
- package/lib/common.js +1 -0
- package/lib/common.js.map +1 -1
- package/lib/templates/migrator-runners/image.png +0 -0
- package/lib/templates/migrator-runners/plugin_override.txt +34 -0
- package/lib/templates/migrator-runners/runner_override.txt +22 -0
- package/lib/templates/migrator-runners/script_override.txt +31 -0
- package/lib/templates/python_312_definition/template/connector/config/actions/example.yaml +40 -0
- package/lib/templates/python_312_definition/template/connector/config/assets/example.yaml +27 -0
- package/lib/templates/python_312_definition/template/data/asset.json +1 -0
- package/lib/templates/python_312_definition/template/docs/CHANGELOG.md.t +7 -0
- package/lib/templates/python_312_definition/template/docs/README.md +38 -0
- package/lib/templates/python_312_definition/template/requirements.txt +0 -0
- package/lib/templates/python_312_definition/template_src/connector/config/actions/example.yaml +40 -0
- package/lib/templates/python_312_definition/template_src/connector/config/assets/example.yaml +27 -0
- package/lib/templates/python_312_definition/template_src/connector/src/runner_override.py +11 -0
- package/lib/templates/python_312_definition/template_src/data/asset.json +1 -0
- package/lib/templates/python_312_definition/template_src/docs/CHANGELOG.md.t +7 -0
- package/lib/templates/python_312_definition/template_src/docs/README.md +38 -0
- package/lib/templates/python_312_definition/template_src/requirements.txt +0 -0
- package/lib/transformers/base-transformer.d.ts +6 -0
- package/lib/transformers/base-transformer.js +54 -0
- package/lib/transformers/base-transformer.js.map +1 -0
- package/lib/transformers/connector-generator.d.ts +18 -0
- package/lib/transformers/connector-generator.js +327 -0
- package/lib/transformers/connector-generator.js.map +1 -0
- package/lib/transformers/forked-plugin-transformer.d.ts +4 -0
- package/lib/transformers/forked-plugin-transformer.js +16 -0
- package/lib/transformers/forked-plugin-transformer.js.map +1 -0
- package/lib/transformers/index.d.ts +3 -0
- package/lib/transformers/index.js +17 -0
- package/lib/transformers/index.js.map +1 -0
- package/lib/transformers/script-transformer.d.ts +5 -0
- package/lib/transformers/script-transformer.js +16 -0
- package/lib/transformers/script-transformer.js.map +1 -0
- package/lib/types/connector-types.d.ts +8 -0
- package/lib/types/migrator-types.d.ts +59 -0
- package/lib/types/migrator-types.js +18 -0
- package/lib/types/migrator-types.js.map +1 -0
- package/oclif.manifest.json +183 -4
- package/package.json +13 -6
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConnectorGenerator = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const connector_interfaces_1 = require("@swimlane/connector-interfaces");
|
|
6
|
+
const node_fs_1 = require("node:fs");
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
|
+
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
9
|
+
const adm_zip_1 = tslib_1.__importDefault(require("adm-zip"));
|
|
10
|
+
class ConnectorGenerator {
|
|
11
|
+
static async initializeForkedPlugin(transformedExport, fromDirectory, toDirectory) {
|
|
12
|
+
const { forkedName } = transformedExport;
|
|
13
|
+
console.log(`Initializing forked plugin: ${forkedName}`);
|
|
14
|
+
await Promise.all([
|
|
15
|
+
this.createBaseCode(fromDirectory, toDirectory, forkedName),
|
|
16
|
+
this.generateRequirements(fromDirectory, toDirectory, forkedName),
|
|
17
|
+
this.generateAsset(fromDirectory, toDirectory, forkedName),
|
|
18
|
+
]);
|
|
19
|
+
console.log(`Forked plugin initialized: ${forkedName}`);
|
|
20
|
+
}
|
|
21
|
+
static async generateLogo(toDirectory) {
|
|
22
|
+
const templatePath = (0, node_path_1.join)(__dirname, '../templates/migrator-runners/image.png');
|
|
23
|
+
const outputPath = (0, node_path_1.join)(toDirectory, 'image', 'logo.png');
|
|
24
|
+
const image = await node_fs_1.promises.readFile(templatePath);
|
|
25
|
+
await node_fs_1.promises.writeFile(outputPath, image);
|
|
26
|
+
}
|
|
27
|
+
static async generateBaseStructure(toDirectory) {
|
|
28
|
+
await node_fs_1.promises.mkdir((0, node_path_1.join)(toDirectory, 'connector', 'config', 'actions'), { recursive: true });
|
|
29
|
+
await node_fs_1.promises.mkdir((0, node_path_1.join)(toDirectory, 'image'));
|
|
30
|
+
await node_fs_1.promises.mkdir((0, node_path_1.join)(toDirectory, 'docs'));
|
|
31
|
+
await node_fs_1.promises.mkdir((0, node_path_1.join)(toDirectory, 'data'));
|
|
32
|
+
await node_fs_1.promises.mkdir((0, node_path_1.join)(toDirectory, 'doc_images'));
|
|
33
|
+
await node_fs_1.promises.mkdir((0, node_path_1.join)(toDirectory, 'connector', 'config', 'assets'));
|
|
34
|
+
await node_fs_1.promises.mkdir((0, node_path_1.join)(toDirectory, 'connector', 'src'));
|
|
35
|
+
await this.createFile((0, node_path_1.join)(toDirectory, 'requirements.txt'), '');
|
|
36
|
+
await this.createFile((0, node_path_1.join)(toDirectory, 'docs', 'changelog.md'), '');
|
|
37
|
+
await this.createFile((0, node_path_1.join)(toDirectory, 'docs', 'readme.md'), '# Example Readme');
|
|
38
|
+
await this.createFile((0, node_path_1.join)(toDirectory, 'docs', 'EXTERNAL_README.md'), '# Example External Readme');
|
|
39
|
+
await this.createFile((0, node_path_1.join)(toDirectory, 'docs', 'external.yml'), '');
|
|
40
|
+
await this.createFile((0, node_path_1.join)(toDirectory, 'readme.md'), '# Example Readme');
|
|
41
|
+
}
|
|
42
|
+
static async generateRunnerOverride(toDirectory) {
|
|
43
|
+
const templatePath = (0, node_path_1.join)(__dirname, '../templates/migrator-runners/runner_override.txt');
|
|
44
|
+
const outputPath = (0, node_path_1.join)(toDirectory, 'connector', 'src', 'runner_override.py');
|
|
45
|
+
try {
|
|
46
|
+
const content = await node_fs_1.promises.readFile(templatePath, 'utf8');
|
|
47
|
+
await this.createFile(outputPath, content);
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
console.error('Failed to generate runner override');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
static async generateAction(transformedExport, toDirectory) {
|
|
54
|
+
let content;
|
|
55
|
+
if (transformedExport.type === 'script') {
|
|
56
|
+
content = transformedExport.error ? `Error: ${transformedExport.error}` : await this.getActionContentScript(transformedExport.script);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
content = transformedExport.error ? `Error: ${transformedExport.error}` : await this.getActionContentFork(transformedExport.script);
|
|
60
|
+
}
|
|
61
|
+
const outputPath = (0, node_path_1.join)(toDirectory, 'connector', 'src', `${transformedExport.exportUid}.py`);
|
|
62
|
+
await this.createFile(outputPath, content);
|
|
63
|
+
}
|
|
64
|
+
static async generateAsset(fromDirectory, toDirectory, packageName) {
|
|
65
|
+
const assetPath = (0, node_path_1.join)(fromDirectory, 'packages', packageName, 'imports', 'asset.json');
|
|
66
|
+
const destinationPath = (0, node_path_1.join)(toDirectory, 'connector', 'config', 'assets', 'asset.yaml');
|
|
67
|
+
try {
|
|
68
|
+
await node_fs_1.promises.access(assetPath);
|
|
69
|
+
const assetContent = await node_fs_1.promises.readFile(assetPath, 'utf8');
|
|
70
|
+
const assetJson = JSON.parse(assetContent);
|
|
71
|
+
const inputProperties = {};
|
|
72
|
+
const requiredInputs = [];
|
|
73
|
+
for (const [key, rawValue] of Object.entries(assetJson.inputParameters || {})) {
|
|
74
|
+
const value = rawValue;
|
|
75
|
+
inputProperties[key] = {
|
|
76
|
+
title: value.name || key,
|
|
77
|
+
description: value.description || '',
|
|
78
|
+
type: 'string',
|
|
79
|
+
};
|
|
80
|
+
if (value.type === 4) {
|
|
81
|
+
inputProperties[key].format = 'password';
|
|
82
|
+
}
|
|
83
|
+
if (value.example !== undefined) {
|
|
84
|
+
inputProperties[key].example = value.example;
|
|
85
|
+
}
|
|
86
|
+
if (value.default !== undefined) {
|
|
87
|
+
inputProperties[key].default = value.default;
|
|
88
|
+
}
|
|
89
|
+
if (value.required) {
|
|
90
|
+
requiredInputs.push(key);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const assetYaml = js_yaml_1.default.dump({
|
|
94
|
+
schema: 'asset/1',
|
|
95
|
+
name: 'asset',
|
|
96
|
+
title: assetJson.name,
|
|
97
|
+
description: assetJson.description,
|
|
98
|
+
inputs: {
|
|
99
|
+
type: 'object',
|
|
100
|
+
properties: inputProperties,
|
|
101
|
+
required: requiredInputs.length > 0 ? requiredInputs : undefined,
|
|
102
|
+
},
|
|
103
|
+
meta: {},
|
|
104
|
+
});
|
|
105
|
+
await node_fs_1.promises.writeFile(destinationPath, assetYaml, 'utf8');
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
console.error(`Error generating asset for ${packageName}:`, error);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
static async extractZip(fromDirectory, packageName) {
|
|
112
|
+
const zipPath = (0, node_path_1.join)(fromDirectory, 'packages', `${packageName}.zip`);
|
|
113
|
+
const extractPath = (0, node_path_1.join)(fromDirectory, 'packages', packageName);
|
|
114
|
+
try {
|
|
115
|
+
await node_fs_1.promises.access(zipPath);
|
|
116
|
+
console.log(`Extracting ${zipPath}...`);
|
|
117
|
+
const zip = new adm_zip_1.default(zipPath);
|
|
118
|
+
zip.extractAllTo(extractPath, true);
|
|
119
|
+
console.log(`Successfully extracted ${packageName}.zip.`);
|
|
120
|
+
return extractPath;
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
console.error(`Error extracting ZIP file for ${packageName}:`, error);
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
static async generateRequirements(fromDirectory, toDirectory, packageName) {
|
|
128
|
+
const packageExtractedDir = (0, node_path_1.join)(fromDirectory, 'packages', packageName);
|
|
129
|
+
const requirementsPath = (0, node_path_1.join)(toDirectory, 'requirements.txt');
|
|
130
|
+
try {
|
|
131
|
+
const files = await node_fs_1.promises.readdir(packageExtractedDir);
|
|
132
|
+
const whlFiles = files.filter(file => file.endsWith('.whl'));
|
|
133
|
+
if (whlFiles.length === 0) {
|
|
134
|
+
console.warn(`No .whl files found in ${packageExtractedDir}`);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const dependencies = whlFiles
|
|
138
|
+
.map(whlFile => {
|
|
139
|
+
const match = whlFile.match(/^([\w-]+)-([\d.]+)-/);
|
|
140
|
+
if (!match)
|
|
141
|
+
return null;
|
|
142
|
+
const packageNameFromWhl = match[1];
|
|
143
|
+
const packageVersion = match[2];
|
|
144
|
+
// Skip the package itself (eg sw_microsoft_office)
|
|
145
|
+
if (packageNameFromWhl === packageName) {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
return `${packageNameFromWhl}==${packageVersion}`;
|
|
149
|
+
})
|
|
150
|
+
.filter(Boolean);
|
|
151
|
+
await node_fs_1.promises.appendFile(requirementsPath, dependencies.join('\n') + '\n');
|
|
152
|
+
console.log(`requirements.txt generated at: ${requirementsPath}`);
|
|
153
|
+
}
|
|
154
|
+
catch (error) {
|
|
155
|
+
console.error('Error generating requirements.txt:', error);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
static async createBaseCode(fromDirectory, toDirectory, packageName) {
|
|
159
|
+
const extractedPath = await this.extractZip(fromDirectory, packageName);
|
|
160
|
+
if (!extractedPath)
|
|
161
|
+
return;
|
|
162
|
+
const whlPath = await this.getBaseCodePath(fromDirectory, packageName);
|
|
163
|
+
if (!whlPath)
|
|
164
|
+
return;
|
|
165
|
+
const tempExtractDir = (0, node_path_1.join)(fromDirectory, 'packages', `${packageName}_extracted`);
|
|
166
|
+
await node_fs_1.promises.mkdir(tempExtractDir, { recursive: true });
|
|
167
|
+
try {
|
|
168
|
+
const zip = new adm_zip_1.default(whlPath);
|
|
169
|
+
zip.extractAllTo(tempExtractDir, true);
|
|
170
|
+
const extractedFiles = await node_fs_1.promises.readdir(tempExtractDir);
|
|
171
|
+
const basePackageDir = extractedFiles.find(dir => dir === packageName);
|
|
172
|
+
if (!basePackageDir) {
|
|
173
|
+
console.error(`Could not find base package folder inside: ${whlPath}`);
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const destinationPath = (0, node_path_1.join)(toDirectory, 'connector', 'src', packageName);
|
|
177
|
+
await node_fs_1.promises.mkdir(destinationPath, { recursive: true });
|
|
178
|
+
const baseCodePath = (0, node_path_1.join)(tempExtractDir, basePackageDir);
|
|
179
|
+
const baseFiles = await node_fs_1.promises.readdir(baseCodePath);
|
|
180
|
+
await Promise.all(baseFiles.map(file => node_fs_1.promises.rename((0, node_path_1.join)(baseCodePath, file), (0, node_path_1.join)(destinationPath, file))));
|
|
181
|
+
console.log(`Base code for ${packageName} moved successfully.`);
|
|
182
|
+
}
|
|
183
|
+
catch (error) {
|
|
184
|
+
console.error(`Error extracting and moving base code for ${packageName}:`, error);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
static async getBaseCodePath(fromDirectory, packageName) {
|
|
188
|
+
const packageDir = (0, node_path_1.join)(fromDirectory, 'packages', packageName);
|
|
189
|
+
try {
|
|
190
|
+
const files = await node_fs_1.promises.readdir(packageDir);
|
|
191
|
+
const whlFile = files.find(file => file.startsWith(`${packageName}-`) && file.endsWith('.whl'));
|
|
192
|
+
if (!whlFile) {
|
|
193
|
+
console.error(`Could not find .whl file for package: ${packageName}`);
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
return (0, node_path_1.join)(packageDir, whlFile);
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
console.error(`Error accessing package directory: ${packageDir}`, error);
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
static async getActionContentFork(script) {
|
|
204
|
+
try {
|
|
205
|
+
const templateContent = await node_fs_1.promises.readFile((0, node_path_1.join)(__dirname, '../templates/migrator-runners/plugin_override.txt'), 'utf8');
|
|
206
|
+
// Remove any carriage returns to avoid CRLF issues
|
|
207
|
+
const scriptNoCR = script.replaceAll('\r', '');
|
|
208
|
+
return templateContent.replace('# HERE', scriptNoCR);
|
|
209
|
+
}
|
|
210
|
+
catch (error) {
|
|
211
|
+
console.error('Failed to load action forked template', error);
|
|
212
|
+
return `Error during forked plugin generation: ${error}`;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
static async getActionContentScript(script) {
|
|
216
|
+
try {
|
|
217
|
+
const templateContent = await node_fs_1.promises.readFile((0, node_path_1.join)(__dirname, '../templates/migrator-runners/script_override.txt'), 'utf8');
|
|
218
|
+
// Remove any carriage returns to avoid CRLF issues
|
|
219
|
+
const scriptNoCR = script.replaceAll('\r', '');
|
|
220
|
+
const lines = scriptNoCR.split('\n');
|
|
221
|
+
if (lines.length === 0) {
|
|
222
|
+
return templateContent.replace('# HERE', '');
|
|
223
|
+
}
|
|
224
|
+
const firstLine = lines[0];
|
|
225
|
+
const subsequentIndented = lines.slice(1)
|
|
226
|
+
.map(line => ` ${line}`)
|
|
227
|
+
.join('\n');
|
|
228
|
+
const combinedScript = subsequentIndented ?
|
|
229
|
+
`${firstLine}\n${subsequentIndented}` :
|
|
230
|
+
firstLine;
|
|
231
|
+
return templateContent.replace('# HERE', combinedScript);
|
|
232
|
+
}
|
|
233
|
+
catch (error) {
|
|
234
|
+
console.error('Failed to load action script template', error);
|
|
235
|
+
return `Error during script generation: ${error}`;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
static async generateActionConfig(transformationResult, toDirectory) {
|
|
239
|
+
const exportUid = transformationResult.exportUid;
|
|
240
|
+
const outputPath = (0, node_path_1.join)(toDirectory, 'connector', 'config', 'actions', `${exportUid}.yaml`);
|
|
241
|
+
const yamlData = {
|
|
242
|
+
schema: 'action/1',
|
|
243
|
+
title: transformationResult.exportName,
|
|
244
|
+
name: transformationResult.exportUid,
|
|
245
|
+
description: transformationResult.description,
|
|
246
|
+
inputs: {
|
|
247
|
+
type: 'object',
|
|
248
|
+
properties: {},
|
|
249
|
+
required: [],
|
|
250
|
+
additionalProperties: true,
|
|
251
|
+
},
|
|
252
|
+
output: {
|
|
253
|
+
type: 'object',
|
|
254
|
+
properties: {},
|
|
255
|
+
required: [],
|
|
256
|
+
additionalProperties: true,
|
|
257
|
+
},
|
|
258
|
+
meta: {
|
|
259
|
+
endpoint: '',
|
|
260
|
+
method: '',
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
for (const input of transformationResult.inputs) {
|
|
264
|
+
yamlData.inputs.properties[input.Key] = {
|
|
265
|
+
title: input.Title || input.Key,
|
|
266
|
+
type: input.ValueType || 'string',
|
|
267
|
+
examples: input.Example,
|
|
268
|
+
};
|
|
269
|
+
if (input.Creds) {
|
|
270
|
+
yamlData.inputs.properties[input.Key].format = 'password';
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
for (const output of transformationResult.outputs) {
|
|
274
|
+
yamlData.output.properties[output.Key] = {
|
|
275
|
+
title: output.Title,
|
|
276
|
+
type: output.ValueType,
|
|
277
|
+
examples: output.Example,
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
const yamlString = js_yaml_1.default.dump(yamlData, { indent: 2 });
|
|
281
|
+
await this.createFile(outputPath, yamlString);
|
|
282
|
+
return true;
|
|
283
|
+
}
|
|
284
|
+
static async createFile(dir, data) {
|
|
285
|
+
await node_fs_1.promises.writeFile(dir, data);
|
|
286
|
+
}
|
|
287
|
+
static async generateConnectorManifest(connectorConfig, group, toDir) {
|
|
288
|
+
const connectorNameUid = group.connectorName
|
|
289
|
+
.replaceAll(/[^\w -]/g, '')
|
|
290
|
+
.replaceAll(/\s+/g, '_')
|
|
291
|
+
.toLowerCase();
|
|
292
|
+
const data = {
|
|
293
|
+
author: connectorConfig.author || connectorConfig.vendor,
|
|
294
|
+
bugs: '',
|
|
295
|
+
description: connectorConfig.description,
|
|
296
|
+
homepage: connectorConfig.homepage,
|
|
297
|
+
iconImage: '../image/logo.png',
|
|
298
|
+
keywords: ['Custom', 'User created'],
|
|
299
|
+
license: 'AGPL-3.0',
|
|
300
|
+
meta: {
|
|
301
|
+
imageRepository: `quay.io/swimlane-connectors/${connectorNameUid}`,
|
|
302
|
+
private: false,
|
|
303
|
+
publishConfig: {
|
|
304
|
+
access: 'public',
|
|
305
|
+
},
|
|
306
|
+
buildConfig: {
|
|
307
|
+
template: group.pythonDefinition,
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
name: connectorNameUid,
|
|
311
|
+
product: connectorConfig.product || 'Unknown Product',
|
|
312
|
+
repository: `https://github.com/swimlane/t_${connectorNameUid}`,
|
|
313
|
+
schema: 'connector/1',
|
|
314
|
+
title: group.connectorName,
|
|
315
|
+
vendor: connectorConfig.vendor || 'Unknown Vendor',
|
|
316
|
+
version: '1.0.0',
|
|
317
|
+
runConfig: {
|
|
318
|
+
inputs: {
|
|
319
|
+
type: connector_interfaces_1.ConnectorInputsType.stdin,
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
};
|
|
323
|
+
await this.createFile((0, node_path_1.join)(toDir, 'connector', 'connector.yaml'), js_yaml_1.default.dump(data, { noRefs: true }));
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
exports.ConnectorGenerator = ConnectorGenerator;
|
|
327
|
+
//# sourceMappingURL=connector-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector-generator.js","sourceRoot":"","sources":["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,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC,CAAA;IACpG,CAAC;CACF;AAnXD,gDAmXC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ForkedPluginTransformer = void 0;
|
|
4
|
+
const base_transformer_1 = require("./base-transformer");
|
|
5
|
+
class ForkedPluginTransformer extends base_transformer_1.BaseTransformer {
|
|
6
|
+
transform(jsonFileContent) {
|
|
7
|
+
const commonFields = this.parseCommonFields(jsonFileContent);
|
|
8
|
+
return {
|
|
9
|
+
...commonFields,
|
|
10
|
+
type: 'forked-plugin',
|
|
11
|
+
dependencies: [],
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.ForkedPluginTransformer = ForkedPluginTransformer;
|
|
16
|
+
//# sourceMappingURL=forked-plugin-transformer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forked-plugin-transformer.js","sourceRoot":"","sources":["../../src/transformers/forked-plugin-transformer.ts"],"names":[],"mappings":";;;AAAA,yDAAkD;AAElD,MAAa,uBAAwB,SAAQ,kCAAe;IACnD,SAAS,CAAC,eAAoB;QACnC,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAA;QAE5D,OAAO;YACL,GAAG,YAAY;YACf,IAAI,EAAE,eAAe;YACrB,YAAY,EAAE,EAAE;SACjB,CAAA;IACH,CAAC;CACF;AAVD,0DAUC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTransformer = void 0;
|
|
4
|
+
const script_transformer_1 = require("./script-transformer");
|
|
5
|
+
const forked_plugin_transformer_1 = require("./forked-plugin-transformer");
|
|
6
|
+
const migrator_types_1 = require("../types/migrator-types");
|
|
7
|
+
function getTransformer(jsonFileContent) {
|
|
8
|
+
if (jsonFileContent?.Action?.ForkedFromPackage) {
|
|
9
|
+
return new forked_plugin_transformer_1.ForkedPluginTransformer();
|
|
10
|
+
}
|
|
11
|
+
if (jsonFileContent?.Action?.Script) {
|
|
12
|
+
return new script_transformer_1.ScriptTransformer();
|
|
13
|
+
}
|
|
14
|
+
throw new migrator_types_1.UnsupportedTransformerError();
|
|
15
|
+
}
|
|
16
|
+
exports.getTransformer = getTransformer;
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transformers/index.ts"],"names":[],"mappings":";;;AAAA,6DAAsD;AACtD,2EAAmE;AACnE,4DAAmE;AAEnE,SAAgB,cAAc,CAAC,eAAoB;IACjD,IAAI,eAAe,EAAE,MAAM,EAAE,iBAAiB,EAAE;QAC9C,OAAO,IAAI,mDAAuB,EAAE,CAAA;KACrC;IAED,IAAI,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE;QACnC,OAAO,IAAI,sCAAiB,EAAE,CAAA;KAC/B;IAED,MAAM,IAAI,4CAA2B,EAAE,CAAA;AACzC,CAAC;AAVD,wCAUC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScriptTransformer = void 0;
|
|
4
|
+
const base_transformer_1 = require("./base-transformer");
|
|
5
|
+
class ScriptTransformer extends base_transformer_1.BaseTransformer {
|
|
6
|
+
transform(jsonFileContent) {
|
|
7
|
+
const commonFields = this.parseCommonFields(jsonFileContent);
|
|
8
|
+
return {
|
|
9
|
+
...commonFields,
|
|
10
|
+
type: 'script',
|
|
11
|
+
dependencies: [],
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.ScriptTransformer = ScriptTransformer;
|
|
16
|
+
//# sourceMappingURL=script-transformer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"script-transformer.js","sourceRoot":"","sources":["../../src/transformers/script-transformer.ts"],"names":[],"mappings":";;;AACA,yDAAkD;AAElD,MAAa,iBAAkB,SAAQ,kCAAe;IAC7C,SAAS,CAAC,eAAoB;QACnC,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAA;QAC5D,OAAO;YACL,GAAG,YAAY;YACf,IAAI,EAAE,QAAQ;YACd,YAAY,EAAE,EAAE;SACjB,CAAA;IACH,CAAC;CACF;AATD,8CASC"}
|
|
@@ -31,6 +31,10 @@ export type ComponentQuestions = {
|
|
|
31
31
|
authorEmail: string;
|
|
32
32
|
homepage: string;
|
|
33
33
|
keywords: string[] | string;
|
|
34
|
+
readmePath?: string;
|
|
35
|
+
externalReadmePath?: string;
|
|
36
|
+
documentationReadmePath?: string;
|
|
37
|
+
externalymlPath?: string;
|
|
34
38
|
};
|
|
35
39
|
export type SolutionQuestions = {
|
|
36
40
|
solutionFamily: string;
|
|
@@ -55,6 +59,10 @@ export type PlaybookQuestions = {
|
|
|
55
59
|
authorEmail: string;
|
|
56
60
|
homepage: string;
|
|
57
61
|
keywords: string[] | string;
|
|
62
|
+
readmePath?: string;
|
|
63
|
+
externalReadmePath?: string;
|
|
64
|
+
documentationReadmePath?: string;
|
|
65
|
+
externalymlPath?: string;
|
|
58
66
|
};
|
|
59
67
|
export type WidgetQuestions = {
|
|
60
68
|
widgetFamily: string;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface ConnectorMigrationConfig {
|
|
2
|
+
name: string;
|
|
3
|
+
vendor: string;
|
|
4
|
+
product: string;
|
|
5
|
+
description: string;
|
|
6
|
+
template: string;
|
|
7
|
+
author: string;
|
|
8
|
+
authorEmail: string;
|
|
9
|
+
homepage: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const pythonVersionMap: {
|
|
12
|
+
readonly python3: "python_39_definition";
|
|
13
|
+
readonly python39: "python_39_definition";
|
|
14
|
+
readonly python310: "python_310_definition";
|
|
15
|
+
readonly python311: "python_311_definition";
|
|
16
|
+
readonly python312: "python_312_definition";
|
|
17
|
+
};
|
|
18
|
+
export type PythonVersionKey = keyof typeof pythonVersionMap;
|
|
19
|
+
export interface AppTasks {
|
|
20
|
+
pythonDirName: PythonVersionKey;
|
|
21
|
+
pythonDefinition: string;
|
|
22
|
+
appFolderPath: string;
|
|
23
|
+
connectorName: string;
|
|
24
|
+
taskFilePaths: string[];
|
|
25
|
+
}
|
|
26
|
+
export interface TransformationResult {
|
|
27
|
+
exportName: string;
|
|
28
|
+
exportUid: string;
|
|
29
|
+
type: 'script' | 'plugin';
|
|
30
|
+
dependencies: string[];
|
|
31
|
+
description: string;
|
|
32
|
+
family: string;
|
|
33
|
+
base64Image: string;
|
|
34
|
+
pythonVersion: string;
|
|
35
|
+
actionName: string;
|
|
36
|
+
script: string;
|
|
37
|
+
forkedName: string;
|
|
38
|
+
inputs: {
|
|
39
|
+
Key: string;
|
|
40
|
+
Creds: boolean;
|
|
41
|
+
Example: [];
|
|
42
|
+
Title: string;
|
|
43
|
+
ValueType: string;
|
|
44
|
+
}[];
|
|
45
|
+
outputs: {
|
|
46
|
+
Key: string;
|
|
47
|
+
Example: [];
|
|
48
|
+
Title: string;
|
|
49
|
+
ValueType: string;
|
|
50
|
+
Description: string;
|
|
51
|
+
}[];
|
|
52
|
+
vendor: string;
|
|
53
|
+
version: string;
|
|
54
|
+
author: string;
|
|
55
|
+
error?: string;
|
|
56
|
+
}
|
|
57
|
+
export declare class UnsupportedTransformerError extends Error {
|
|
58
|
+
constructor();
|
|
59
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnsupportedTransformerError = exports.pythonVersionMap = void 0;
|
|
4
|
+
// folder names the export tool creates : python versions supported by the tsdk
|
|
5
|
+
exports.pythonVersionMap = {
|
|
6
|
+
python3: 'python_39_definition',
|
|
7
|
+
python39: 'python_39_definition',
|
|
8
|
+
python310: 'python_310_definition',
|
|
9
|
+
python311: 'python_311_definition',
|
|
10
|
+
python312: 'python_312_definition',
|
|
11
|
+
};
|
|
12
|
+
class UnsupportedTransformerError extends Error {
|
|
13
|
+
constructor() {
|
|
14
|
+
super('Unsupported transformer');
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.UnsupportedTransformerError = UnsupportedTransformerError;
|
|
18
|
+
//# sourceMappingURL=migrator-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrator-types.js","sourceRoot":"","sources":["../../src/types/migrator-types.ts"],"names":[],"mappings":";;;AAWA,+EAA+E;AAClE,QAAA,gBAAgB,GAAG;IAC9B,OAAO,EAAE,sBAAsB;IAC/B,QAAQ,EAAE,sBAAsB;IAChC,SAAS,EAAE,uBAAuB;IAClC,SAAS,EAAE,uBAAuB;IAClC,SAAS,EAAE,uBAAuB;CAC1B,CAAA;AAiCV,MAAa,2BAA4B,SAAQ,KAAK;IACpD;QACE,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAClC,CAAC;CACF;AAJD,kEAIC"}
|