@sw-tsdk/plugin-connector 2.0.1-next.78 → 2.0.1-next.89

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 CHANGED
@@ -16,7 +16,7 @@ $ npm install -g @sw-tsdk/plugin-connector
16
16
  $ sw-tsdk-connector COMMAND
17
17
  running command...
18
18
  $ sw-tsdk-connector (--version)
19
- @sw-tsdk/plugin-connector/2.0.1-next.78+6d712c1 linux-x64 node-v16.18.0
19
+ @sw-tsdk/plugin-connector/2.0.1-next.89+b9344e1 linux-x64 node-v16.18.0
20
20
  $ sw-tsdk-connector --help [COMMAND]
21
21
  USAGE
22
22
  $ sw-tsdk-connector COMMAND
@@ -33,7 +33,8 @@ USAGE
33
33
  * [`sw-tsdk-connector asset:add`](#sw-tsdk-connector-assetadd)
34
34
  * [`sw-tsdk-connector connector:build`](#sw-tsdk-connector-connectorbuild)
35
35
  * [`sw-tsdk-connector connector:create`](#sw-tsdk-connector-connectorcreate)
36
- * [`sw-tsdk-connector connector:create-source`](#sw-tsdk-connector-connectorcreate-source)
36
+ * [`sw-tsdk-connector connector:create:openapi`](#sw-tsdk-connector-connectorcreateopenapi)
37
+ * [`sw-tsdk-connector connector:create:source`](#sw-tsdk-connector-connectorcreatesource)
37
38
  * [`sw-tsdk-connector connector:logo`](#sw-tsdk-connector-connectorlogo)
38
39
  * [`sw-tsdk-connector connector:save`](#sw-tsdk-connector-connectorsave)
39
40
  * [`sw-tsdk-connector connector:sign`](#sw-tsdk-connector-connectorsign)
@@ -58,7 +59,7 @@ DESCRIPTION
58
59
  Update a connector action.
59
60
  ```
60
61
 
61
- _See code: [lib/commands/action/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.78+6d712c1/lib/commands/action/add.js)_
62
+ _See code: [lib/commands/action/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/action/add.js)_
62
63
 
63
64
  ## `sw-tsdk-connector action:generate:data`
64
65
 
@@ -83,7 +84,7 @@ DESCRIPTION
83
84
  Use to test a task in an integration
84
85
  ```
85
86
 
86
- _See code: [lib/commands/action/generate/data.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.78+6d712c1/lib/commands/action/generate/data.js)_
87
+ _See code: [lib/commands/action/generate/data.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/action/generate/data.js)_
87
88
 
88
89
  ## `sw-tsdk-connector action:generate:input`
89
90
 
@@ -108,7 +109,7 @@ DESCRIPTION
108
109
  Update action input schema.
109
110
  ```
110
111
 
111
- _See code: [lib/commands/action/generate/input.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.78+6d712c1/lib/commands/action/generate/input.js)_
112
+ _See code: [lib/commands/action/generate/input.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/action/generate/input.js)_
112
113
 
113
114
  ## `sw-tsdk-connector action:generate:output`
114
115
 
@@ -132,7 +133,7 @@ DESCRIPTION
132
133
  Update a connector action.
133
134
  ```
134
135
 
135
- _See code: [lib/commands/action/generate/output.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.78+6d712c1/lib/commands/action/generate/output.js)_
136
+ _See code: [lib/commands/action/generate/output.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/action/generate/output.js)_
136
137
 
137
138
  ## `sw-tsdk-connector action:run:local`
138
139
 
@@ -160,7 +161,7 @@ DESCRIPTION
160
161
  Runs a connector action. (Defaults to current image version in local repository).
161
162
  ```
162
163
 
163
- _See code: [lib/commands/action/run/local.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.78+6d712c1/lib/commands/action/run/local.js)_
164
+ _See code: [lib/commands/action/run/local.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/action/run/local.js)_
164
165
 
165
166
  ## `sw-tsdk-connector asset:add`
166
167
 
@@ -181,7 +182,7 @@ DESCRIPTION
181
182
  Update a connector action.
182
183
  ```
183
184
 
184
- _See code: [lib/commands/asset/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.78+6d712c1/lib/commands/asset/add.js)_
185
+ _See code: [lib/commands/asset/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/asset/add.js)_
185
186
 
186
187
  ## `sw-tsdk-connector connector:build`
187
188
 
@@ -207,7 +208,7 @@ DESCRIPTION
207
208
  Builds a local docker image of the connector.
208
209
  ```
209
210
 
210
- _See code: [lib/commands/connector/build.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.78+6d712c1/lib/commands/connector/build.js)_
211
+ _See code: [lib/commands/connector/build.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/connector/build.js)_
211
212
 
212
213
  ## `sw-tsdk-connector connector:create`
213
214
 
@@ -239,15 +240,44 @@ DESCRIPTION
239
240
  Scaffold a new connector
240
241
  ```
241
242
 
242
- _See code: [lib/commands/connector/create.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.78+6d712c1/lib/commands/connector/create.js)_
243
+ _See code: [lib/commands/connector/create.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/connector/create.js)_
243
244
 
244
- ## `sw-tsdk-connector connector:create-source`
245
+ ## `sw-tsdk-connector connector:create:openapi`
246
+
247
+ Scaffold a new connector
248
+
249
+ ```
250
+ USAGE
251
+ $ sw-tsdk-connector connector:create:openapi [-d <value>] [--vendor <value>] [--product <value>] [-k <value>] [--description
252
+ <value>] [--logoPath <value>] [--author <value>] [--authorEmail <value>] [--homepage <value>] [-o <value>] [-h]
253
+
254
+ FLAGS
255
+ -d, --directory=<value> [default: ./] root directory for where to store connectors, the connector directory will be
256
+ generated.
257
+ -h, --help Show CLI help.
258
+ -k, --keywords=<value> Please enter keyword (Comma-Separated)
259
+ -o, --specs=<value> root directory for where to store connectors, the connector directory will be generated.
260
+ --author=<value> Connector Author
261
+ --authorEmail=<value> Connector Author Email
262
+ --description=<value> Description (e.g. CrowdStrike Host Query API)
263
+ --homepage=<value> Connector Author Support URL
264
+ --logoPath=<value> URL or absolute path to logo file
265
+ --product=<value> Product (e.g. Falcon)
266
+ --vendor=<value> Vendor (e.g. CrowdStrike)
267
+
268
+ DESCRIPTION
269
+ Scaffold a new connector
270
+ ```
271
+
272
+ _See code: [lib/commands/connector/create/openapi.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/connector/create/openapi.js)_
273
+
274
+ ## `sw-tsdk-connector connector:create:source`
245
275
 
246
276
  Generates 11x source from 10x
247
277
 
248
278
  ```
249
279
  USAGE
250
- $ sw-tsdk-connector connector:create-source [-d <value>] [-h]
280
+ $ sw-tsdk-connector connector:create:source [-d <value>] [-h]
251
281
 
252
282
  FLAGS
253
283
  -d, --directory=<value> [default: ./] root directory of the repository.
@@ -257,7 +287,7 @@ DESCRIPTION
257
287
  Generates 11x source from 10x
258
288
  ```
259
289
 
260
- _See code: [lib/commands/connector/create-source.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.78+6d712c1/lib/commands/connector/create-source.js)_
290
+ _See code: [lib/commands/connector/create/source.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/connector/create/source.js)_
261
291
 
262
292
  ## `sw-tsdk-connector connector:logo`
263
293
 
@@ -276,7 +306,7 @@ DESCRIPTION
276
306
  Update a connector.
277
307
  ```
278
308
 
279
- _See code: [lib/commands/connector/logo.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.78+6d712c1/lib/commands/connector/logo.js)_
309
+ _See code: [lib/commands/connector/logo.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/connector/logo.js)_
280
310
 
281
311
  ## `sw-tsdk-connector connector:save`
282
312
 
@@ -297,7 +327,7 @@ DESCRIPTION
297
327
  Save a docker image locally as .tar.gz
298
328
  ```
299
329
 
300
- _See code: [lib/commands/connector/save.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.78+6d712c1/lib/commands/connector/save.js)_
330
+ _See code: [lib/commands/connector/save.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/connector/save.js)_
301
331
 
302
332
  ## `sw-tsdk-connector connector:sign`
303
333
 
@@ -321,7 +351,7 @@ DESCRIPTION
321
351
  Builds a local docker image of the connector.
322
352
  ```
323
353
 
324
- _See code: [lib/commands/connector/sign.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.78+6d712c1/lib/commands/connector/sign.js)_
354
+ _See code: [lib/commands/connector/sign.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/connector/sign.js)_
325
355
 
326
356
  ## `sw-tsdk-connector connector:update`
327
357
 
@@ -341,7 +371,7 @@ DESCRIPTION
341
371
  Update a connector.
342
372
  ```
343
373
 
344
- _See code: [lib/commands/connector/update.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.78+6d712c1/lib/commands/connector/update.js)_
374
+ _See code: [lib/commands/connector/update.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/connector/update.js)_
345
375
 
346
376
  ## `sw-tsdk-connector connector:validate`
347
377
 
@@ -364,5 +394,5 @@ DESCRIPTION
364
394
  Use to validate an integration
365
395
  ```
366
396
 
367
- _See code: [lib/commands/connector/validate.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.78+6d712c1/lib/commands/connector/validate.js)_
397
+ _See code: [lib/commands/connector/validate.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.89+b9344e1/lib/commands/connector/validate.js)_
368
398
  <!-- commandsstop -->
@@ -0,0 +1,46 @@
1
+ import { Base } from '@sw-tsdk/core';
2
+ import { Action, Input, InnerProperty, Output, Property } from '@sw-tsdk/connector';
3
+ export declare class OpenAPI extends Base {
4
+ static description: string;
5
+ defaultTemplate: string;
6
+ codeRegex: RegExp;
7
+ specData: any;
8
+ currentContext: any;
9
+ referenceMapped: string[];
10
+ static flags: {
11
+ directory: import("@oclif/core/lib/interfaces").OptionFlag<string>;
12
+ vendor: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
13
+ product: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
14
+ keywords: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
15
+ description: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
16
+ logoPath: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
17
+ author: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
18
+ authorEmail: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
19
+ homepage: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
20
+ specs: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
21
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
22
+ };
23
+ run(): Promise<void>;
24
+ createActionsFromPaths(paths: any, actionFolder: string, index?: number): Promise<void>;
25
+ buildActions(actions: any, actionFolder: string, endpoint: string, index?: number): Promise<void>;
26
+ createActionData(action: any, endpoint: string, method: string): Promise<Action>;
27
+ createInputs(action: any): Promise<Input>;
28
+ createOutput(action: any): Promise<Output>;
29
+ formatData(data: any): any[];
30
+ getInnerData(object: any, path: string | string[], type: string, exclude?: boolean): Promise<any>;
31
+ exclude(filter: string[], list: string[], index?: number): string[];
32
+ filterByList(list: string[], object: any): any[] | null;
33
+ buildObject(object: any, key: string): Promise<Property>;
34
+ buildItems(items: any): Promise<Property | InnerProperty>;
35
+ getStatusCodeObject(response: any): {
36
+ data: any;
37
+ code: string;
38
+ };
39
+ getReference(path: string[], currentContext: any, index?: number): any;
40
+ buildInnerObject(object: any, currentObject: InnerProperty, index?: number): Promise<InnerProperty>;
41
+ existReferences(object: any, found?: string[], index?: number): string[];
42
+ createAssets(securitySchemes: any, assetFolder: string, index?: number): Promise<void>;
43
+ generateJsonSchema(data: any, io: Output | Input): Promise<Output | Input>;
44
+ generateAttachmentSchema(data: any, io: Input | Output): Promise<Input | Output>;
45
+ getDataBody(data: any): Promise<any>;
46
+ }
@@ -0,0 +1,448 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OpenAPI = void 0;
4
+ const tslib_1 = require("tslib");
5
+ /* eslint-disable camelcase */
6
+ const core_1 = require("@oclif/core");
7
+ const node_path_1 = tslib_1.__importStar(require("node:path"));
8
+ const core_2 = require("@sw-tsdk/core");
9
+ const fs_extra_1 = require("fs-extra");
10
+ const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
11
+ const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
12
+ const connector_interfaces_1 = require("@swimlane/connector-interfaces");
13
+ const fs = tslib_1.__importStar(require("node:fs"));
14
+ const common_1 = require("../../../common");
15
+ const connector_1 = require("@sw-tsdk/connector");
16
+ const json_schema_ref_parser_1 = tslib_1.__importDefault(require("@apidevtools/json-schema-ref-parser"));
17
+ class OpenAPI extends core_2.Base {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.defaultTemplate = 'python_310_definition';
21
+ this.codeRegex = /^2\d{2}$/;
22
+ }
23
+ async run() {
24
+ var _a;
25
+ const { flags } = await this.parse(OpenAPI);
26
+ const { directory, specs } = flags;
27
+ if (!specs) {
28
+ core_1.CliUx.ux.error('OpenAPI Specs are required');
29
+ }
30
+ if (!(await (0, core_2.fileExists)(specs))) {
31
+ core_1.CliUx.ux.error('OpenAPI Specs does not exist');
32
+ }
33
+ const name = node_path_1.default.basename(specs).replace(/\.[^./]+$/, '');
34
+ const masterQuestions = [
35
+ {
36
+ type: 'input',
37
+ name: 'vendor',
38
+ message: 'Vendor (e.g. CrowdStrike)',
39
+ },
40
+ {
41
+ type: 'input',
42
+ name: 'product',
43
+ message: 'Product (e.g. Falcon)',
44
+ },
45
+ {
46
+ type: 'list',
47
+ name: 'keywords',
48
+ message: 'Choose a category',
49
+ choices: common_1.connectorCategories,
50
+ },
51
+ {
52
+ type: 'input',
53
+ name: 'description',
54
+ message: 'Description (e.g. CrowdStrike Host Query API)',
55
+ },
56
+ {
57
+ type: 'input',
58
+ name: 'logoPath',
59
+ message: 'URL or absolute path to logo file',
60
+ },
61
+ {
62
+ type: 'input',
63
+ name: 'author',
64
+ message: 'Integration Author',
65
+ default: 'Swimlane',
66
+ },
67
+ {
68
+ type: 'input',
69
+ name: 'authorEmail',
70
+ message: 'Integration Author Email',
71
+ default: 'info@swimlane.com',
72
+ },
73
+ {
74
+ type: 'input',
75
+ name: 'homepage',
76
+ message: 'Author URL',
77
+ default: 'https://swimlane.com',
78
+ },
79
+ ];
80
+ const filteredQuestions = masterQuestions.filter(q => !flags[q.name]);
81
+ const answers = Object.assign(await inquirer_1.default.prompt(filteredQuestions), flags);
82
+ const connectorDirectory = (0, node_path_1.join)(directory, `t_${name}`);
83
+ await (0, fs_extra_1.ensureDir)(connectorDirectory);
84
+ const connector = {
85
+ vendor: answers.vendor,
86
+ product: answers.product,
87
+ name: name,
88
+ schema: 'connector/1',
89
+ author: answers.author,
90
+ bugs: '',
91
+ iconImage: '../image/logo.png',
92
+ description: answers.description,
93
+ homepage: answers.homepage,
94
+ keywords: [answers.keywords],
95
+ license: 'AGPL-3.0',
96
+ meta: {
97
+ imageRepository: `quay.io/swimlane-connectors/${name}`,
98
+ private: false,
99
+ publishConfig: {
100
+ access: 'public',
101
+ },
102
+ buildConfig: {
103
+ template: this.defaultTemplate,
104
+ },
105
+ },
106
+ repository: `https://github.com/swimlane/t_${name}`,
107
+ title: '',
108
+ version: '1.0.0',
109
+ runConfig: {
110
+ inputs: {
111
+ type: connector_interfaces_1.ConnectorInputsType.stdin,
112
+ },
113
+ },
114
+ };
115
+ core_1.CliUx.ux.action.start('Generating data.');
116
+ const connectorFolder = (0, node_path_1.join)(connectorDirectory, 'connector');
117
+ await (0, fs_extra_1.ensureDir)(connectorFolder);
118
+ const configFolder = (0, node_path_1.join)(connectorFolder, 'config');
119
+ await (0, fs_extra_1.ensureDir)(configFolder);
120
+ const assetsFolder = (0, node_path_1.join)(configFolder, 'assets');
121
+ await (0, fs_extra_1.ensureDir)(assetsFolder);
122
+ const actionsFolder = (0, node_path_1.join)(configFolder, 'actions');
123
+ await (0, fs_extra_1.ensureDir)(actionsFolder);
124
+ const codeFolder = (0, node_path_1.join)(connectorFolder, 'code');
125
+ await (0, fs_extra_1.ensureDir)(codeFolder);
126
+ let spec = js_yaml_1.default.load(await fs.promises.readFile(specs, 'utf-8'));
127
+ if (JSON.stringify(spec).includes('$ref')) {
128
+ spec = await json_schema_ref_parser_1.default.dereference(spec);
129
+ }
130
+ this.specData = spec;
131
+ if (((_a = spec === null || spec === void 0 ? void 0 : spec.components) === null || _a === void 0 ? void 0 : _a.securitySchemes) && Object.keys(spec.components.securitySchemes).length > 0) {
132
+ await this.createAssets(spec.components.securitySchemes, assetsFolder);
133
+ }
134
+ await this.createActionsFromPaths(spec.paths, actionsFolder);
135
+ // write connector.yaml from answers
136
+ const connectorFilePath = (0, node_path_1.join)(connectorDirectory, 'connector', 'connector.yaml');
137
+ await (0, fs_extra_1.writeFile)(connectorFilePath, js_yaml_1.default.dump(connector));
138
+ }
139
+ async createActionsFromPaths(paths, actionFolder, index = 0) {
140
+ const pathsKeys = Object.keys(paths);
141
+ const action = (0, connector_1.fixCircularReferences)(paths[pathsKeys[index]]);
142
+ await this.buildActions(action, actionFolder, pathsKeys[index]);
143
+ if (index < pathsKeys.length - 1) {
144
+ return this.createActionsFromPaths(paths, actionFolder, index + 1);
145
+ }
146
+ }
147
+ async buildActions(actions, actionFolder, endpoint, index = 0) {
148
+ const objectKeys = Object.keys(actions);
149
+ this.currentContext = {};
150
+ this.referenceMapped = [];
151
+ const currentAction = actions[objectKeys[index]];
152
+ const actionData = await this.createActionData(currentAction, endpoint, objectKeys[index]);
153
+ await (0, fs_extra_1.writeFile)((0, node_path_1.join)(actionFolder, `${actionData.name}.yaml`), js_yaml_1.default.dump(actionData));
154
+ if (index < objectKeys.length - 1) {
155
+ return this.buildActions(actions, actionFolder, endpoint, index + 1);
156
+ }
157
+ }
158
+ async createActionData(action, endpoint, method) {
159
+ const actionWords = action.operationId.split(/(?=[A-Z])/);
160
+ const name = actionWords
161
+ .map((item) => item.toLowerCase())
162
+ .join('_');
163
+ const title = actionWords.join(' ');
164
+ const builtAction = {
165
+ schema: 'action/1',
166
+ title,
167
+ name,
168
+ description: action.summary,
169
+ inputs: await this.createInputs(action),
170
+ output: await this.createOutput(action),
171
+ meta: {
172
+ endpoint,
173
+ method,
174
+ },
175
+ };
176
+ return builtAction;
177
+ }
178
+ async createInputs(action) {
179
+ var _a;
180
+ let input = {
181
+ type: 'object',
182
+ properties: {},
183
+ };
184
+ if (action.parameters) {
185
+ const headers = await this.getInnerData(action.parameters, 'header', 'in');
186
+ headers ? input.properties.headers = {
187
+ title: 'Headers',
188
+ type: 'object',
189
+ properties: await this.buildInnerObject(headers, {}),
190
+ required: headers === null || headers === void 0 ? void 0 : headers.required,
191
+ } : null;
192
+ const parameters = await this.getInnerData(action.parameters, 'query', 'in');
193
+ parameters ? (input.properties.parameters = {
194
+ title: 'Parameters',
195
+ type: 'object',
196
+ properties: await this.buildInnerObject(parameters, {}),
197
+ required: parameters === null || parameters === void 0 ? void 0 : parameters.required,
198
+ }) : null;
199
+ const pathParameters = await this.getInnerData(action.parameters, 'path', 'in');
200
+ pathParameters ? (input.properties.path_parameters = {
201
+ title: 'Path Parameters',
202
+ type: 'object',
203
+ properties: await this.buildInnerObject(pathParameters, {}),
204
+ required: pathParameters === null || pathParameters === void 0 ? void 0 : pathParameters.required,
205
+ }) : null;
206
+ }
207
+ if ((_a = action === null || action === void 0 ? void 0 : action.requestBody) === null || _a === void 0 ? void 0 : _a.content) {
208
+ const dataBody = await this.getDataBody(action.requestBody.content);
209
+ dataBody ?
210
+ (input.properties.data_body = {
211
+ title: 'Data Body',
212
+ type: 'object',
213
+ properties: await this.buildInnerObject(dataBody, {}),
214
+ required: dataBody === null || dataBody === void 0 ? void 0 : dataBody.required,
215
+ }) : null;
216
+ input = await this.generateAttachmentSchema(action.requestBody.content, input);
217
+ input = await this.generateJsonSchema(action.requestBody.content, input);
218
+ }
219
+ return input;
220
+ }
221
+ async createOutput(action) {
222
+ var _a;
223
+ const { data, code } = this.getStatusCodeObject(action.responses);
224
+ let output = {
225
+ type: 'object',
226
+ properties: {
227
+ status_code: {
228
+ title: 'Status Code',
229
+ type: 'number',
230
+ examples: [code],
231
+ },
232
+ reason: {
233
+ title: 'Reason',
234
+ examples: [data.description],
235
+ type: 'string',
236
+ },
237
+ },
238
+ };
239
+ data.headers ? output.properties.reponse_header = {
240
+ title: 'Response headers',
241
+ type: 'object',
242
+ properties: await this.buildInnerObject(this.formatData(data.headers), {}),
243
+ required: (_a = data.headers) === null || _a === void 0 ? void 0 : _a.required,
244
+ examples: data.headers.examples,
245
+ } : null;
246
+ if (data === null || data === void 0 ? void 0 : data.content) {
247
+ const dataBody = await this.getDataBody(data.content);
248
+ dataBody ? (output.properties.data = {
249
+ title: 'Data Body',
250
+ type: 'object',
251
+ properties: await this.buildInnerObject(dataBody, {}),
252
+ required: dataBody === null || dataBody === void 0 ? void 0 : dataBody.required,
253
+ }) : null;
254
+ const text = await this.getInnerData(data.content, 'text/plain', 'content');
255
+ text ? (output.properties.response_text = {
256
+ title: 'Response Text',
257
+ type: 'string',
258
+ examples: text.examples,
259
+ }) : null;
260
+ output = await this.generateAttachmentSchema(data, output);
261
+ output = await this.generateJsonSchema(data, output);
262
+ }
263
+ return output;
264
+ }
265
+ formatData(data) {
266
+ const keys = Object.keys(data);
267
+ return keys.map(key => {
268
+ data[key].name = key;
269
+ return data[key];
270
+ });
271
+ }
272
+ async getInnerData(object, path, type, exclude = false) {
273
+ const keys = Object.keys(object);
274
+ if (typeof path === 'string' && keys.includes(path) &&
275
+ type === 'content' && !exclude) {
276
+ return object[path].schema;
277
+ }
278
+ if (Array.isArray(path) && type === 'content' && exclude) {
279
+ const allowed = this.exclude(path, keys);
280
+ return this.filterByList(allowed, object);
281
+ }
282
+ if (type === 'in') {
283
+ const allowed = Object.keys(object).filter(key => { var _a; return ((_a = object[key]) === null || _a === void 0 ? void 0 : _a.in) === path; });
284
+ return this.filterByList(allowed, object);
285
+ }
286
+ return null;
287
+ }
288
+ exclude(filter, list, index = 0) {
289
+ list = list.filter(key => key !== filter[index]);
290
+ if (index > filter.length - 1) {
291
+ return this.exclude(filter, list, index + 1);
292
+ }
293
+ return list;
294
+ }
295
+ filterByList(list, object) {
296
+ if ((list === null || list === void 0 ? void 0 : list.length) > 0) {
297
+ return list.map((key) => {
298
+ return object[key];
299
+ });
300
+ }
301
+ return null;
302
+ }
303
+ async buildObject(object, key) {
304
+ var _a, _b, _c, _d, _e, _f, _g, _h;
305
+ const currentObject = {
306
+ title: (object === null || object === void 0 ? void 0 : object.name) || key,
307
+ type: ((_a = object === null || object === void 0 ? void 0 : object.schema) === null || _a === void 0 ? void 0 : _a.type) || (object === null || object === void 0 ? void 0 : object.type),
308
+ };
309
+ (object === null || object === void 0 ? void 0 : object.required) ? currentObject.required = object === null || object === void 0 ? void 0 : object.required : null;
310
+ if (((_b = object === null || object === void 0 ? void 0 : object.schema) === null || _b === void 0 ? void 0 : _b.type) === 'object' && ((_c = object === null || object === void 0 ? void 0 : object.schema) === null || _c === void 0 ? void 0 : _c.properities)) {
311
+ currentObject.properties = await this.buildInnerObject(object, {});
312
+ }
313
+ if (((_d = object === null || object === void 0 ? void 0 : object.schema) === null || _d === void 0 ? void 0 : _d.type) === 'array' || (object === null || object === void 0 ? void 0 : object.type) === 'array') {
314
+ currentObject.items = await this.buildItems(((_e = object === null || object === void 0 ? void 0 : object.schema) === null || _e === void 0 ? void 0 : _e.items) || (object === null || object === void 0 ? void 0 : object.items));
315
+ const required = ((_g = (_f = object === null || object === void 0 ? void 0 : object.schema) === null || _f === void 0 ? void 0 : _f.items) === null || _g === void 0 ? void 0 : _g.required) || ((_h = object === null || object === void 0 ? void 0 : object.items) === null || _h === void 0 ? void 0 : _h.required);
316
+ required ? currentObject.items.required = required : null;
317
+ }
318
+ return currentObject;
319
+ }
320
+ async buildItems(items) {
321
+ if ((items === null || items === void 0 ? void 0 : items.type) === 'object' && (items === null || items === void 0 ? void 0 : items.properties)) {
322
+ return this.buildInnerObject(items, {});
323
+ }
324
+ return {
325
+ type: items === null || items === void 0 ? void 0 : items.type,
326
+ };
327
+ }
328
+ getStatusCodeObject(response) {
329
+ const keys = Object.keys(response);
330
+ let statusCode = keys.find(key => this.codeRegex.test(key));
331
+ statusCode = statusCode || keys[0];
332
+ return { data: response[statusCode], code: statusCode };
333
+ }
334
+ getReference(path, currentContext, index = 0) {
335
+ const currentKey = path[index];
336
+ currentContext = currentContext[currentKey];
337
+ if (path.length - 1 > index) {
338
+ return this.getReference(path, currentContext, index + 1);
339
+ }
340
+ return currentContext;
341
+ }
342
+ async buildInnerObject(object, currentObject, index = 0) {
343
+ var _a;
344
+ const properties = Object.keys((object === null || object === void 0 ? void 0 : object.properties) || object);
345
+ const currentProperty = properties[index];
346
+ currentObject[(object === null || object === void 0 ? void 0 : object.properties) ? currentProperty : object[currentProperty].name] = await this.buildObject(((_a = object === null || object === void 0 ? void 0 : object.properties) === null || _a === void 0 ? void 0 : _a[currentProperty]) || object[currentProperty], currentProperty);
347
+ if (index < properties.length - 1) {
348
+ return this.buildInnerObject(object, currentObject, index + 1);
349
+ }
350
+ return currentObject;
351
+ }
352
+ existReferences(object, found = [], index = 0) {
353
+ const keys = (object === null || object === void 0 ? void 0 : object.items) ? Object.keys(object.items) : Object.keys(object);
354
+ if (keys.length === 0) {
355
+ return found;
356
+ }
357
+ const currentKey = keys[index];
358
+ const currentObject = object[currentKey] || object.items[currentKey];
359
+ if (currentKey === '$ref' &&
360
+ !this.referenceMapped.includes(currentObject) &&
361
+ !found.includes(currentObject)) {
362
+ found.push(currentObject);
363
+ }
364
+ if ((currentObject === null || currentObject === void 0 ? void 0 : currentObject.type) === 'object' || (currentObject === null || currentObject === void 0 ? void 0 : currentObject.type) === 'array') {
365
+ found = this.existReferences(currentObject.properties || currentObject.items || currentObject.additionalProperties, found);
366
+ }
367
+ if (!currentObject.type && currentObject.$ref) {
368
+ found = this.existReferences(currentObject, found);
369
+ }
370
+ if (keys.length - 1 > index) {
371
+ return this.existReferences(object, found, index + 1);
372
+ }
373
+ return found;
374
+ }
375
+ async createAssets(securitySchemes, assetFolder, index = 0) {
376
+ const keys = Object.keys(securitySchemes);
377
+ let currentKey = keys[index];
378
+ const currentScheme = securitySchemes[currentKey];
379
+ const schemaType = securitySchemes[currentKey].type;
380
+ switch (schemaType) {
381
+ case 'http':
382
+ currentKey = securitySchemes[currentKey].scheme === 'basic' ?
383
+ connector_1.SecuritySchemeEnum.basicAuth : connector_1.SecuritySchemeEnum.bearerAuth;
384
+ break;
385
+ case 'oauth2':
386
+ currentKey = currentScheme.flows.clientCredentials ?
387
+ connector_1.SecuritySchemeEnum.oAuth2ClientCredentials :
388
+ connector_1.SecuritySchemeEnum.oAuth2Password;
389
+ break;
390
+ case 'apiKey':
391
+ currentKey = connector_1.SecuritySchemeEnum.ApiKeyAuth;
392
+ break;
393
+ }
394
+ await (0, fs_extra_1.copy)((0, node_path_1.join)(__dirname, '..', '..', '..', 'templates', 'assets', `${currentKey}.yaml`), (0, node_path_1.join)(assetFolder, `${currentKey}.yaml`), { recursive: true });
395
+ if (keys.length - 1 > index) {
396
+ return this.createAssets(securitySchemes, assetFolder, index + 1);
397
+ }
398
+ }
399
+ async generateJsonSchema(data, io) {
400
+ var _a;
401
+ let jsonData = await this.getInnerData((data === null || data === void 0 ? void 0 : data.content) || data, 'application/json', 'content');
402
+ if (!jsonData) {
403
+ jsonData = await this.getInnerData((data === null || data === void 0 ? void 0 : data.content) || data, '*/*', 'content');
404
+ }
405
+ jsonData ? io.properties.json_body = {
406
+ title: 'Json Body',
407
+ type: jsonData === null || jsonData === void 0 ? void 0 : jsonData.type,
408
+ required: jsonData === null || jsonData === void 0 ? void 0 : jsonData.required,
409
+ } : null;
410
+ if (jsonData && !jsonData.$ref) {
411
+ ((_a = io === null || io === void 0 ? void 0 : io.properties) === null || _a === void 0 ? void 0 : _a.json_body) ?
412
+ ((jsonData === null || jsonData === void 0 ? void 0 : jsonData.type) === 'object' ?
413
+ io.properties.json_body.properties = await this.buildInnerObject(jsonData, {}) :
414
+ io.properties.json_body.items = await this.buildItems(jsonData.items)) : null;
415
+ }
416
+ return io;
417
+ }
418
+ async generateAttachmentSchema(data, io) {
419
+ const attachments = await this.getInnerData(data, 'multipart/form-data', 'content');
420
+ attachments ? io.properties.attachments = {
421
+ title: 'Attachments',
422
+ type: 'array',
423
+ items: {
424
+ contentDisposition: 'attachment',
425
+ type: 'object',
426
+ additionalProperties: false,
427
+ properties: await this.buildInnerObject(attachments, {}),
428
+ },
429
+ required: attachments === null || attachments === void 0 ? void 0 : attachments.required,
430
+ } : null;
431
+ return io;
432
+ }
433
+ getDataBody(data) {
434
+ const exclude = ['application/json', 'multipart/form-data'];
435
+ return this.getInnerData(data, exclude, 'content');
436
+ }
437
+ }
438
+ exports.OpenAPI = OpenAPI;
439
+ OpenAPI.description = 'Scaffold a new connector';
440
+ OpenAPI.flags = Object.assign(Object.assign({}, core_2.Base.flags), { directory: core_1.Flags.string({
441
+ char: 'd',
442
+ description: 'root directory for where to store connectors, the connector directory will be generated.',
443
+ default: './',
444
+ }), vendor: core_1.Flags.string({ description: 'Vendor (e.g. CrowdStrike)' }), product: core_1.Flags.string({ description: 'Product (e.g. Falcon)' }), keywords: core_1.Flags.string({ char: 'k', description: 'Please enter keyword (Comma-Separated)' }), description: core_1.Flags.string({ description: 'Description (e.g. CrowdStrike Host Query API)' }), logoPath: core_1.Flags.string({ description: 'URL or absolute path to logo file' }), author: core_1.Flags.string({ description: 'Connector Author' }), authorEmail: core_1.Flags.string({ description: 'Connector Author Email' }), homepage: core_1.Flags.string({ description: 'Connector Author Support URL' }), specs: core_1.Flags.string({
445
+ char: 'o',
446
+ description: 'root directory for where to store connectors, the connector directory will be generated.',
447
+ }), help: core_1.Flags.help({ char: 'h' }) });
448
+ //# sourceMappingURL=openapi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openapi.js","sourceRoot":"","sources":["../../../../src/commands/connector/create/openapi.ts"],"names":[],"mappings":";;;;AAAA,8BAA8B;AAC9B,sCAAwC;AACxC,+DAAoC;AACpC,wCAA8C;AAC9C,uCAAmD;AACnD,gEAA+B;AAC/B,8DAA0B;AAC1B,yEAAqF;AACrF,oDAA6B;AAC7B,4CAAmD;AAEnD,kDAQ2B;AAC3B,yGAA4D;AAE5D,MAAa,OAAQ,SAAQ,WAAI;IAAjC;;QAEE,oBAAe,GAAG,uBAAuB,CAAC;QAC1C,cAAS,GAAG,UAAU,CAAA;IA+jBxB,CAAC;IAliBC,KAAK,CAAC,GAAG;;QACP,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QACzC,MAAM,EAAC,SAAS,EAAE,KAAK,EAAC,GAAG,KAAK,CAAA;QAEhC,IAAI,CAAC,KAAK,EAAE;YACV,YAAK,CAAC,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAA;SAC7C;QAED,IAAI,CAAC,CAAC,MAAM,IAAA,iBAAU,EAAC,KAAK,CAAC,CAAC,EAAE;YAC9B,YAAK,CAAC,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAA;SAC/C;QAED,MAAM,IAAI,GAAG,mBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;QAE1D,MAAM,eAAe,GAAG;YACtB;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,2BAA2B;aACrC;YACD;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,SA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EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,wBAAwB,EAAC,CAAC,EAClE,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,8BAA8B,EAAC,CAAC,EACrE,KAAK,EAAE,YAAK,CAAC,MAAM,CAAC;QAClB,IAAI,EAAE,GAAG;QACT,WAAW,EACT,0FAA0F;KAC7F,CAAC,EACF,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,IAC7B"}
@@ -28,4 +28,4 @@ class CreateSource extends core_2.Base {
28
28
  exports.CreateSource = CreateSource;
29
29
  CreateSource.description = 'Generates 11x source from 10x';
30
30
  CreateSource.flags = Object.assign(Object.assign({}, core_2.Base.flags), { directory: core_1.Flags.string({ char: 'd', description: 'root directory of the repository.', default: './' }), help: core_1.Flags.help({ char: 'h' }) });
31
- //# sourceMappingURL=create-source.js.map
31
+ //# sourceMappingURL=source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../../../../src/commands/connector/create/source.ts"],"names":[],"mappings":";;;AAAA,sCAAwC;AACxC,wCAAkC;AAClC,yCAAiC;AACjC,qCAAgC;AAChC,kDAAmD;AAEnD,qCAAqC;AACrC,MAAa,YAAa,SAAQ,WAAI;IASpC,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;QAE9C,IAAI,EAAC,SAAS,EAAC,GAAG,KAAK,CAAA;QACvB,SAAS,GAAG,IAAA,mBAAO,EAAC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QAE/C,IAAI;YACF,MAAM,kBAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;SACjC;QAAC,WAAM;YACN,IAAI,CAAC,KAAK,CAAC,oBAAoB,SAAS,EAAE,CAAC,CAAA;SAC5C;QAED,SAAS,GAAG,IAAA,mBAAO,EAAC,SAAS,CAAC,CAAA;QAC9B,YAAK,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAA;QAC3E,MAAM,SAAS,GAAG,IAAI,4BAAgB,EAAE,CAAA;QACxC,MAAM,SAAS,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAA;QAChD,YAAK,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;IACxB,CAAC;;AA1BH,oCA2BC;AA1BQ,wBAAW,GAAG,+BAA+B,CAAA;AAE7C,kBAAK,mCACP,WAAI,CAAC,KAAK,KACb,SAAS,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,mCAAmC,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC,EACrG,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,IAC9B"}
@@ -104,7 +104,7 @@ class Create extends core_2.Base {
104
104
  iconImage: '../image/logo.png',
105
105
  description: answers.description,
106
106
  homepage: answers.homepage,
107
- keywords: [answers.family],
107
+ keywords: [answers.keywords],
108
108
  license: 'AGPL-3.0',
109
109
  meta: {
110
110
  imageRepository: `quay.io/swimlane-connectors/${name}`,
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/connector/create.ts"],"names":[],"mappings":";;;;AAAA,sCAAwC;AACxC,wCAAkC;AAClC,yCAAuC;AACvC,qCAAgC;AAChC,kDAA+D;AAC/D,gEAA+B;AAC/B,yCAAoE;AACpE,yEAAqF;AAErF,uCAA2D;AAC3D,8DAA0B;AAC1B,2CAAoC;AACpC,2CAAkC;AAElC,qCAAqC;AACrC,MAAa,MAAO,SAAQ,WAAI;IAwC9B,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA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AAoB,EAAE,YAAK,CAAC,MAAM,CAAC;QACjC,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,oDAAoD;QACjE,OAAO,EAAE,sCAAsC;QAC/C,MAAM,EAAE,IAAI;KACb,CAAC,EACF,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,IAC9B"}
@@ -7,7 +7,7 @@ export interface enhancedConnectorManifest extends ConnectorManifest {
7
7
  export declare type ConnectorQuestions = {
8
8
  vendor: string;
9
9
  product: string;
10
- family: string;
10
+ keywords: string;
11
11
  description: string;
12
12
  logoPath?: string;
13
13
  template: string;
@@ -1 +1 @@
1
- {"version":"2.0.1-next.78+6d712c1","commands":{"action:add":{"id":"action:add","description":"Update a connector action.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"Root directory of the repository.","multiple":false,"default":"./"},"template":{"name":"template","type":"option","char":"t","description":"action template to scaffold","multiple":false,"options":["node_18","python_310_definition","python_3.7_swimlane"],"default":"python_310_definition"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"asset:add":{"id":"asset:add","description":"Update a connector action.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"Root directory of the repository.","multiple":false,"default":"./"},"scheme":{"name":"scheme","type":"option","char":"s","description":"asset template to scaffold","multiple":false,"options":["custom","apikey","oauth2_client_credentials","http_basic","http_bearer"]},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:build":{"id":"connector:build","description":"Builds a local docker image of the connector.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"template":{"name":"template","type":"option","description":"connector language","required":true,"multiple":false,"options":["python_3.7_swimlane","node_18","python_310_definition"],"default":"python_310_definition"},"compile-override":{"name":"compile-override","type":"option","hidden":true,"multiple":false,"default":"Compile.Dockerfile"},"runner-override":{"name":"runner-override","type":"option","hidden":true,"multiple":false,"default":"Runner.Dockerfile"},"runtime-override":{"name":"runtime-override","type":"option","hidden":true,"multiple":false},"directory":{"name":"directory","type":"option","char":"d","description":"root directory of the repository.","multiple":false,"default":"./"},"save":{"name":"save","type":"boolean","description":"saves a signed docker image as tar in local directory.","allowNo":false,"relationships":[{"type":"all","flags":["signing-password","key-name"]},{"type":"some","flags":["registry"]}]},"squash":{"name":"squash","type":"boolean","description":"squashes the docker layers.","hidden":true,"allowNo":false},"force-rebuild":{"name":"force-rebuild","type":"boolean","char":"f","description":"forces nocache on the image build","allowNo":false},"platform":{"name":"platform","type":"option","hidden":true,"multiple":false,"default":"linux/amd64"},"signing-password":{"name":"signing-password","type":"option","description":"password used for the private key (ENV: TURBINE_SIGNING_PASSWORD)","multiple":false,"default":""},"key-name":{"name":"key-name","type":"option","description":"name used for the key (default: username)","multiple":false},"skip-upload":{"name":"skip-upload","type":"boolean","hidden":true,"allowNo":false},"registry":{"name":"registry","type":"option","description":"registry to use for signing","multiple":false,"default":"localhost:5000"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:create-source":{"id":"connector:create-source","description":"Generates 11x source from 10x","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"root directory of the repository.","multiple":false,"default":"./"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:create":{"id":"connector:create","description":"Scaffold a new connector","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"root directory for where to store connectors, the connector directory will be generated.","multiple":false,"default":"./"},"template":{"name":"template","type":"option","char":"t","description":"connector template to scaffold","multiple":false,"options":["node_18","python_310_definition","python_3.7_swimlane"],"default":"python_310_definition"},"skip-repo":{"name":"skip-repo","type":"boolean","description":"skips the repository creation process","allowNo":false},"clientId":{"name":"clientId","type":"option","char":"c","description":"client id of the authentication app","hidden":true,"multiple":false,"default":"0d418a5615c458b0b593"},"vendor":{"name":"vendor","type":"option","description":"Vendor (e.g. CrowdStrike)","multiple":false},"product":{"name":"product","type":"option","description":"Product (e.g. Falcon)","multiple":false},"keywords":{"name":"keywords","type":"option","description":"Enter keyword (Comma-Separated)","multiple":false},"description":{"name":"description","type":"option","description":"Description (e.g. CrowdStrike Host Query API)","multiple":false},"logoPath":{"name":"logoPath","type":"option","description":"URL or absolute path to logo file","multiple":false},"author":{"name":"author","type":"option","description":"Connector Author","multiple":false},"authorEmail":{"name":"authorEmail","type":"option","description":"Connector Author Email","multiple":false},"homepage":{"name":"homepage","type":"option","description":"Connector Author Support URL","multiple":false},"repo-base-template":{"name":"repo-base-template","type":"option","char":"t","description":"github base template override to create repo from.","hidden":true,"multiple":false,"default":"connector-python-definition-template"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:logo":{"id":"connector:logo","description":"Update a connector.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"root directory of the connector folder.","multiple":false,"default":"."},"path":{"name":"path","type":"option","char":"p","description":"path or URL to product logo in PNG format.","required":true,"multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:save":{"id":"connector:save","description":"Save a docker image locally as .tar.gz","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"Root directory of the repo.","multiple":false,"default":"."},"output":{"name":"output","type":"option","char":"o","description":"output file to where to store the image.","required":true,"multiple":false},"image":{"name":"image","type":"option","char":"i","description":"image to save.","required":true,"multiple":false},"skip-pull":{"name":"skip-pull","type":"boolean","char":"s","description":"skips pulling the image","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:sign":{"id":"connector:sign","description":"Builds a local docker image of the connector.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"root directory of the repository.","multiple":false,"default":"./"},"image":{"name":"image","type":"option","description":"image name to sign","required":true,"multiple":false},"signing-password":{"name":"signing-password","type":"option","description":"password used for the private key","multiple":false,"default":""},"save":{"name":"save","type":"boolean","description":"saves docker image as tar in local directory.","allowNo":false},"key-name":{"name":"key-name","type":"option","description":"name used for the key (default: username)","required":true,"multiple":false},"skip-upload":{"name":"skip-upload","type":"boolean","hidden":true,"allowNo":false},"registry":{"name":"registry","type":"option","description":"registry to use for signing","multiple":false,"default":"localhost:5000"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:update":{"id":"connector:update","description":"Update a connector.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"root directory of the connector folder.","multiple":false,"default":"."},"version":{"name":"version","type":"option","char":"v","description":"new version of the connector.","multiple":false},"manifest-path":{"name":"manifest-path","type":"option","char":"f","description":"connector manifest path relative to directory.","multiple":false,"default":"/connector/connector.yaml"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:validate":{"id":"connector:validate","description":"Use to validate an integration","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"image":{"name":"image","type":"option","char":"i","description":"image to use","multiple":false},"connector":{"name":"connector","type":"option","char":"c","description":"connector to validate (relative to directory)","required":true,"multiple":false,"default":"connector"},"signed":{"name":"signed","type":"boolean","description":"validates a signed connector","allowNo":false},"key":{"name":"key","type":"option","description":"public key for verification","multiple":false,"dependsOn":["signed"],"exclusive":["skip-verification"]},"skip-pull":{"name":"skip-pull","type":"boolean","char":"s","description":"skips pulling the image","allowNo":false},"directory":{"name":"directory","type":"option","char":"d","description":"current directory to mount","multiple":false,"default":"./"}},"args":[]},"action:generate:data":{"id":"action:generate:data","description":"Use to test a task in an integration","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"action":{"name":"action","type":"option","char":"a","description":"action to generate data","multiple":false},"asset":{"name":"asset","type":"option","description":"Filename for asset, defaults to the task name under the data folder. ie: data/asset_name.json","multiple":false},"inputs":{"name":"inputs","type":"option","description":"Filename for JSON inputs, defaults to the task name under the data folder. ie: data/my_task.json","multiple":false},"directory":{"name":"directory","type":"option","char":"d","description":"current directory to mount","multiple":false,"default":"./"},"include-optional":{"name":"include-optional","type":"boolean","description":"used to only generate required properties","allowNo":false},"force":{"name":"force","type":"boolean","description":"overwrites current files","allowNo":false}},"args":[]},"action:generate:input":{"id":"action:generate:input","description":"Update action input schema.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"action":{"name":"action","type":"option","char":"a","description":"Action name to run","multiple":false},"directory":{"name":"directory","type":"option","char":"d","description":"Root directory of the repository.","multiple":false,"default":"./"},"amend":{"name":"amend","type":"boolean","description":"Merge with existing schema.","allowNo":false},"action-config-path":{"name":"action-config-path","type":"option","description":"Override path to action configuration file. Defaults to /connector/config/actions/<action>.yaml","multiple":false},"input-path":{"name":"input-path","type":"option","description":"Relative path to the output data JSON file, defaults to the task name under the data folder. ie: /data/<taskName>_output.json","multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"action:generate:output":{"id":"action:generate:output","description":"Update a connector action.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"action":{"name":"action","type":"option","char":"a","description":"Action name to run","multiple":false},"directory":{"name":"directory","type":"option","char":"d","description":"Root directory of the repository.","multiple":false,"default":"./"},"action-config-path":{"name":"action-config-path","type":"option","description":"Override path to action configuration file. Defaults to /connector/config/<action>.yaml","multiple":false},"amend":{"name":"amend","type":"boolean","description":"Merge with existing schema.","allowNo":false},"output-path":{"name":"output-path","type":"option","description":"Relative path to the output data JSON file, defaults to the task name under the data folder. ie: /data/<taskName>_output.json","multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"action:run:image":{"id":"action:run:image","description":"Runs a connector action. (Defaults to current image version in local repository).","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","hidden":true,"aliases":[],"flags":{"action":{"name":"action","type":"option","char":"a","description":"Action name to run","required":true,"multiple":false},"directory":{"name":"directory","type":"option","char":"d","description":"Root directory of the repository.","multiple":false,"default":"./"},"input-path":{"name":"input-path","type":"option","description":"File to input data JSON file","required":true,"multiple":false},"output-path":{"name":"output-path","type":"option","description":"File to write the outputs to, defaults to /data/<action>_output.json","multiple":false},"error-path":{"name":"error-path","type":"option","description":"File to write the errors to, defaults to /data/<action>_error.json","multiple":false},"asset-path":{"name":"asset-path","type":"option","description":"File to asset data JSON file, defaults to /data/asset.json","multiple":false},"repository":{"name":"repository","type":"option","char":"r","description":"The connector image repository to run.","multiple":false},"version":{"name":"version","type":"option","description":"Use the latest release image from quay.","multiple":false,"default":"latest"},"stdin":{"name":"stdin","type":"boolean","description":"Send the inputs through stdin instead of an environment variable.","allowNo":false},"platform":{"name":"platform","type":"option","hidden":true,"multiple":false,"default":"linux/amd64"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"action:run:local":{"id":"action:run:local","description":"Runs a connector action. (Defaults to current image version in local repository).","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"action":{"name":"action","type":"option","char":"a","description":"Action name to run","multiple":false},"directory":{"name":"directory","type":"option","char":"d","description":"Root directory of the repository.","multiple":false,"default":"./"},"input-path":{"name":"input-path","type":"option","description":"File to input data JSON file, defaults to /data/<action>.json","multiple":false},"output-path":{"name":"output-path","type":"option","description":"File to write the outputs to, defaults to /data/<action>_output.json","multiple":false},"error-path":{"name":"error-path","type":"option","description":"File to write the errors to, defaults to /data/<action>_error.json","multiple":false},"asset-path":{"name":"asset-path","type":"option","description":"File to asset data JSON file, defaults to /data/asset.json","multiple":false},"template":{"name":"template","type":"option","description":"connector template","multiple":false,"options":["python_3.7_swimlane","node_18","python_310_definition"],"default":"python_310_definition"},"compile-override":{"name":"compile-override","type":"option","hidden":true,"multiple":false,"default":"Compile.Dockerfile"},"runner-override":{"name":"runner-override","type":"option","hidden":true,"multiple":false,"default":"Runner.Dockerfile"},"runtime-override":{"name":"runtime-override","type":"option","hidden":true,"multiple":false},"force-rebuild":{"name":"force-rebuild","type":"boolean","char":"f","description":"forces nocache on the image build","allowNo":false},"platform":{"name":"platform","type":"option","hidden":true,"multiple":false,"default":"linux/amd64"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]}}}
1
+ {"version":"2.0.1-next.89+b9344e1","commands":{"action:add":{"id":"action:add","description":"Update a connector action.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"Root directory of the repository.","multiple":false,"default":"./"},"template":{"name":"template","type":"option","char":"t","description":"action template to scaffold","multiple":false,"options":["node_18","python_310_definition","python_3.7_swimlane"],"default":"python_310_definition"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"asset:add":{"id":"asset:add","description":"Update a connector action.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"Root directory of the repository.","multiple":false,"default":"./"},"scheme":{"name":"scheme","type":"option","char":"s","description":"asset template to scaffold","multiple":false,"options":["custom","apikey","oauth2_client_credentials","http_basic","http_bearer"]},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:build":{"id":"connector:build","description":"Builds a local docker image of the connector.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"template":{"name":"template","type":"option","description":"connector language","required":true,"multiple":false,"options":["python_3.7_swimlane","node_18","python_310_definition"],"default":"python_310_definition"},"compile-override":{"name":"compile-override","type":"option","hidden":true,"multiple":false,"default":"Compile.Dockerfile"},"runner-override":{"name":"runner-override","type":"option","hidden":true,"multiple":false,"default":"Runner.Dockerfile"},"runtime-override":{"name":"runtime-override","type":"option","hidden":true,"multiple":false},"directory":{"name":"directory","type":"option","char":"d","description":"root directory of the repository.","multiple":false,"default":"./"},"save":{"name":"save","type":"boolean","description":"saves a signed docker image as tar in local directory.","allowNo":false,"relationships":[{"type":"all","flags":["signing-password","key-name"]},{"type":"some","flags":["registry"]}]},"squash":{"name":"squash","type":"boolean","description":"squashes the docker layers.","hidden":true,"allowNo":false},"force-rebuild":{"name":"force-rebuild","type":"boolean","char":"f","description":"forces nocache on the image build","allowNo":false},"platform":{"name":"platform","type":"option","hidden":true,"multiple":false,"default":"linux/amd64"},"signing-password":{"name":"signing-password","type":"option","description":"password used for the private key (ENV: TURBINE_SIGNING_PASSWORD)","multiple":false,"default":""},"key-name":{"name":"key-name","type":"option","description":"name used for the key (default: username)","multiple":false},"skip-upload":{"name":"skip-upload","type":"boolean","hidden":true,"allowNo":false},"registry":{"name":"registry","type":"option","description":"registry to use for signing","multiple":false,"default":"localhost:5000"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:create":{"id":"connector:create","description":"Scaffold a new connector","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"root directory for where to store connectors, the connector directory will be generated.","multiple":false,"default":"./"},"template":{"name":"template","type":"option","char":"t","description":"connector template to scaffold","multiple":false,"options":["node_18","python_310_definition","python_3.7_swimlane"],"default":"python_310_definition"},"skip-repo":{"name":"skip-repo","type":"boolean","description":"skips the repository creation process","allowNo":false},"clientId":{"name":"clientId","type":"option","char":"c","description":"client id of the authentication app","hidden":true,"multiple":false,"default":"0d418a5615c458b0b593"},"vendor":{"name":"vendor","type":"option","description":"Vendor (e.g. CrowdStrike)","multiple":false},"product":{"name":"product","type":"option","description":"Product (e.g. Falcon)","multiple":false},"keywords":{"name":"keywords","type":"option","description":"Enter keyword (Comma-Separated)","multiple":false},"description":{"name":"description","type":"option","description":"Description (e.g. CrowdStrike Host Query API)","multiple":false},"logoPath":{"name":"logoPath","type":"option","description":"URL or absolute path to logo file","multiple":false},"author":{"name":"author","type":"option","description":"Connector Author","multiple":false},"authorEmail":{"name":"authorEmail","type":"option","description":"Connector Author Email","multiple":false},"homepage":{"name":"homepage","type":"option","description":"Connector Author Support URL","multiple":false},"repo-base-template":{"name":"repo-base-template","type":"option","char":"t","description":"github base template override to create repo from.","hidden":true,"multiple":false,"default":"connector-python-definition-template"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:logo":{"id":"connector:logo","description":"Update a connector.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"root directory of the connector folder.","multiple":false,"default":"."},"path":{"name":"path","type":"option","char":"p","description":"path or URL to product logo in PNG format.","required":true,"multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:save":{"id":"connector:save","description":"Save a docker image locally as .tar.gz","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"Root directory of the repo.","multiple":false,"default":"."},"output":{"name":"output","type":"option","char":"o","description":"output file to where to store the image.","required":true,"multiple":false},"image":{"name":"image","type":"option","char":"i","description":"image to save.","required":true,"multiple":false},"skip-pull":{"name":"skip-pull","type":"boolean","char":"s","description":"skips pulling the image","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:sign":{"id":"connector:sign","description":"Builds a local docker image of the connector.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"root directory of the repository.","multiple":false,"default":"./"},"image":{"name":"image","type":"option","description":"image name to sign","required":true,"multiple":false},"signing-password":{"name":"signing-password","type":"option","description":"password used for the private key","multiple":false,"default":""},"save":{"name":"save","type":"boolean","description":"saves docker image as tar in local directory.","allowNo":false},"key-name":{"name":"key-name","type":"option","description":"name used for the key (default: username)","required":true,"multiple":false},"skip-upload":{"name":"skip-upload","type":"boolean","hidden":true,"allowNo":false},"registry":{"name":"registry","type":"option","description":"registry to use for signing","multiple":false,"default":"localhost:5000"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:update":{"id":"connector:update","description":"Update a connector.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"root directory of the connector folder.","multiple":false,"default":"."},"version":{"name":"version","type":"option","char":"v","description":"new version of the connector.","multiple":false},"manifest-path":{"name":"manifest-path","type":"option","char":"f","description":"connector manifest path relative to directory.","multiple":false,"default":"/connector/connector.yaml"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:validate":{"id":"connector:validate","description":"Use to validate an integration","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"image":{"name":"image","type":"option","char":"i","description":"image to use","multiple":false},"connector":{"name":"connector","type":"option","char":"c","description":"connector to validate (relative to directory)","required":true,"multiple":false,"default":"connector"},"signed":{"name":"signed","type":"boolean","description":"validates a signed connector","allowNo":false},"key":{"name":"key","type":"option","description":"public key for verification","multiple":false,"dependsOn":["signed"],"exclusive":["skip-verification"]},"skip-pull":{"name":"skip-pull","type":"boolean","char":"s","description":"skips pulling the image","allowNo":false},"directory":{"name":"directory","type":"option","char":"d","description":"current directory to mount","multiple":false,"default":"./"}},"args":[]},"action:generate:data":{"id":"action:generate:data","description":"Use to test a task in an integration","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"action":{"name":"action","type":"option","char":"a","description":"action to generate data","multiple":false},"asset":{"name":"asset","type":"option","description":"Filename for asset, defaults to the task name under the data folder. ie: data/asset_name.json","multiple":false},"inputs":{"name":"inputs","type":"option","description":"Filename for JSON inputs, defaults to the task name under the data folder. ie: data/my_task.json","multiple":false},"directory":{"name":"directory","type":"option","char":"d","description":"current directory to mount","multiple":false,"default":"./"},"include-optional":{"name":"include-optional","type":"boolean","description":"used to only generate required properties","allowNo":false},"force":{"name":"force","type":"boolean","description":"overwrites current files","allowNo":false}},"args":[]},"action:generate:input":{"id":"action:generate:input","description":"Update action input schema.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"action":{"name":"action","type":"option","char":"a","description":"Action name to run","multiple":false},"directory":{"name":"directory","type":"option","char":"d","description":"Root directory of the repository.","multiple":false,"default":"./"},"amend":{"name":"amend","type":"boolean","description":"Merge with existing schema.","allowNo":false},"action-config-path":{"name":"action-config-path","type":"option","description":"Override path to action configuration file. Defaults to /connector/config/actions/<action>.yaml","multiple":false},"input-path":{"name":"input-path","type":"option","description":"Relative path to the output data JSON file, defaults to the task name under the data folder. ie: /data/<taskName>_output.json","multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"action:generate:output":{"id":"action:generate:output","description":"Update a connector action.","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"action":{"name":"action","type":"option","char":"a","description":"Action name to run","multiple":false},"directory":{"name":"directory","type":"option","char":"d","description":"Root directory of the repository.","multiple":false,"default":"./"},"action-config-path":{"name":"action-config-path","type":"option","description":"Override path to action configuration file. Defaults to /connector/config/<action>.yaml","multiple":false},"amend":{"name":"amend","type":"boolean","description":"Merge with existing schema.","allowNo":false},"output-path":{"name":"output-path","type":"option","description":"Relative path to the output data JSON file, defaults to the task name under the data folder. ie: /data/<taskName>_output.json","multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"action:run:image":{"id":"action:run:image","description":"Runs a connector action. (Defaults to current image version in local repository).","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","hidden":true,"aliases":[],"flags":{"action":{"name":"action","type":"option","char":"a","description":"Action name to run","required":true,"multiple":false},"directory":{"name":"directory","type":"option","char":"d","description":"Root directory of the repository.","multiple":false,"default":"./"},"input-path":{"name":"input-path","type":"option","description":"File to input data JSON file","required":true,"multiple":false},"output-path":{"name":"output-path","type":"option","description":"File to write the outputs to, defaults to /data/<action>_output.json","multiple":false},"error-path":{"name":"error-path","type":"option","description":"File to write the errors to, defaults to /data/<action>_error.json","multiple":false},"asset-path":{"name":"asset-path","type":"option","description":"File to asset data JSON file, defaults to /data/asset.json","multiple":false},"repository":{"name":"repository","type":"option","char":"r","description":"The connector image repository to run.","multiple":false},"version":{"name":"version","type":"option","description":"Use the latest release image from quay.","multiple":false,"default":"latest"},"stdin":{"name":"stdin","type":"boolean","description":"Send the inputs through stdin instead of an environment variable.","allowNo":false},"platform":{"name":"platform","type":"option","hidden":true,"multiple":false,"default":"linux/amd64"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"action:run:local":{"id":"action:run:local","description":"Runs a connector action. (Defaults to current image version in local repository).","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"action":{"name":"action","type":"option","char":"a","description":"Action name to run","multiple":false},"directory":{"name":"directory","type":"option","char":"d","description":"Root directory of the repository.","multiple":false,"default":"./"},"input-path":{"name":"input-path","type":"option","description":"File to input data JSON file, defaults to /data/<action>.json","multiple":false},"output-path":{"name":"output-path","type":"option","description":"File to write the outputs to, defaults to /data/<action>_output.json","multiple":false},"error-path":{"name":"error-path","type":"option","description":"File to write the errors to, defaults to /data/<action>_error.json","multiple":false},"asset-path":{"name":"asset-path","type":"option","description":"File to asset data JSON file, defaults to /data/asset.json","multiple":false},"template":{"name":"template","type":"option","description":"connector template","multiple":false,"options":["python_3.7_swimlane","node_18","python_310_definition"],"default":"python_310_definition"},"compile-override":{"name":"compile-override","type":"option","hidden":true,"multiple":false,"default":"Compile.Dockerfile"},"runner-override":{"name":"runner-override","type":"option","hidden":true,"multiple":false,"default":"Runner.Dockerfile"},"runtime-override":{"name":"runtime-override","type":"option","hidden":true,"multiple":false},"force-rebuild":{"name":"force-rebuild","type":"boolean","char":"f","description":"forces nocache on the image build","allowNo":false},"platform":{"name":"platform","type":"option","hidden":true,"multiple":false,"default":"linux/amd64"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:create:openapi":{"id":"connector:create:openapi","description":"Scaffold a new connector","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"root directory for where to store connectors, the connector directory will be generated.","multiple":false,"default":"./"},"vendor":{"name":"vendor","type":"option","description":"Vendor (e.g. CrowdStrike)","multiple":false},"product":{"name":"product","type":"option","description":"Product (e.g. Falcon)","multiple":false},"keywords":{"name":"keywords","type":"option","char":"k","description":"Please enter keyword (Comma-Separated)","multiple":false},"description":{"name":"description","type":"option","description":"Description (e.g. CrowdStrike Host Query API)","multiple":false},"logoPath":{"name":"logoPath","type":"option","description":"URL or absolute path to logo file","multiple":false},"author":{"name":"author","type":"option","description":"Connector Author","multiple":false},"authorEmail":{"name":"authorEmail","type":"option","description":"Connector Author Email","multiple":false},"homepage":{"name":"homepage","type":"option","description":"Connector Author Support URL","multiple":false},"specs":{"name":"specs","type":"option","char":"o","description":"root directory for where to store connectors, the connector directory will be generated.","multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"connector:create:source":{"id":"connector:create:source","description":"Generates 11x source from 10x","strict":true,"pluginName":"@sw-tsdk/plugin-connector","pluginAlias":"@sw-tsdk/plugin-connector","pluginType":"core","aliases":[],"flags":{"directory":{"name":"directory","type":"option","char":"d","description":"root directory of the repository.","multiple":false,"default":"./"},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]}}}
package/package.json CHANGED
@@ -4,11 +4,12 @@
4
4
  "url": "https://github.com/swimlane/turbine-sdk/issues"
5
5
  },
6
6
  "dependencies": {
7
+ "@apidevtools/json-schema-ref-parser": "9.0.9",
7
8
  "@oclif/core": "1.16.4",
8
- "@sw-tsdk/common": "^2.0.1-next.78+6d712c1",
9
- "@sw-tsdk/connector": "^2.0.1-next.78+6d712c1",
10
- "@sw-tsdk/core": "^2.0.1-next.78+6d712c1",
11
- "@sw-tsdk/docker": "^2.0.1-next.78+6d712c1",
9
+ "@sw-tsdk/common": "^2.0.1-next.89+b9344e1",
10
+ "@sw-tsdk/connector": "^2.0.1-next.89+b9344e1",
11
+ "@sw-tsdk/core": "^2.0.1-next.89+b9344e1",
12
+ "@sw-tsdk/docker": "^2.0.1-next.89+b9344e1",
12
13
  "@swimlane/connector-interfaces": "1.8.5-rc5",
13
14
  "@swimlane/cosign": "1.3.1",
14
15
  "@swimlane/docker-reference": "2.0.0",
@@ -88,6 +89,6 @@
88
89
  "posttest": "yarn lint",
89
90
  "dev:setup": "npm link"
90
91
  },
91
- "version": "2.0.1-next.78+6d712c1",
92
- "gitHead": "6d712c13d4d6ceb4539a4d56237313a86387dcdd"
92
+ "version": "2.0.1-next.89+b9344e1",
93
+ "gitHead": "b9344e1175637c33364e83d037e0bab76e4373c8"
93
94
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-source.js","sourceRoot":"","sources":["../../../src/commands/connector/create-source.ts"],"names":[],"mappings":";;;AAAA,sCAAwC;AACxC,wCAAkC;AAClC,yCAAiC;AACjC,qCAAgC;AAChC,kDAAmD;AAEnD,qCAAqC;AACrC,MAAa,YAAa,SAAQ,WAAI;IASpC,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,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