@sw-tsdk/plugin-connector 2.0.1-next.47 → 2.0.1-next.48
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 +21 -18
- package/lib/commands/action/generate/data.d.ts +5 -3
- package/lib/commands/action/generate/data.js +61 -48
- package/lib/commands/action/generate/data.js.map +1 -1
- package/lib/commands/action/run/image.d.ts +1 -1
- package/lib/commands/action/run/image.js +2 -1
- package/lib/commands/action/run/image.js.map +1 -1
- package/lib/commands/action/run/local.js +12 -1
- package/lib/commands/action/run/local.js.map +1 -1
- package/lib/common.d.ts +1 -0
- package/lib/common.js +25 -9
- package/lib/common.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -6
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.
|
|
19
|
+
@sw-tsdk/plugin-connector/2.0.1-next.48+c9a92df linux-x64 node-v16.17.1
|
|
20
20
|
$ sw-tsdk-connector --help [COMMAND]
|
|
21
21
|
USAGE
|
|
22
22
|
$ sw-tsdk-connector COMMAND
|
|
@@ -58,7 +58,7 @@ DESCRIPTION
|
|
|
58
58
|
Update a connector action.
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
_See code: [lib/commands/action/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.
|
|
61
|
+
_See code: [lib/commands/action/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.48+c9a92df/lib/commands/action/add.js)_
|
|
62
62
|
|
|
63
63
|
## `sw-tsdk-connector action:generate:data`
|
|
64
64
|
|
|
@@ -66,13 +66,16 @@ Use to test a task in an integration
|
|
|
66
66
|
|
|
67
67
|
```
|
|
68
68
|
USAGE
|
|
69
|
-
$ sw-tsdk-connector action:generate:data
|
|
69
|
+
$ sw-tsdk-connector action:generate:data [-h] [-a <value>] [--asset <value>] [--inputs <value>] [-d <value>]
|
|
70
|
+
[--include-optional] [--force]
|
|
70
71
|
|
|
71
72
|
FLAGS
|
|
73
|
+
-a, --action=<value> action to generate data
|
|
72
74
|
-d, --directory=<value> [default: ./] current directory to mount
|
|
73
75
|
-h, --help Show CLI help.
|
|
74
|
-
|
|
75
|
-
--
|
|
76
|
+
--asset=<value> Filename for asset, defaults to the task name under the data folder. ie: data/asset_name.json
|
|
77
|
+
--force overwrites current files
|
|
78
|
+
--include-optional used to only generate required properties
|
|
76
79
|
--inputs=<value> Filename for JSON inputs, defaults to the task name under the data folder. ie:
|
|
77
80
|
data/my_task.json
|
|
78
81
|
|
|
@@ -80,7 +83,7 @@ DESCRIPTION
|
|
|
80
83
|
Use to test a task in an integration
|
|
81
84
|
```
|
|
82
85
|
|
|
83
|
-
_See code: [lib/commands/action/generate/data.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.
|
|
86
|
+
_See code: [lib/commands/action/generate/data.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.48+c9a92df/lib/commands/action/generate/data.js)_
|
|
84
87
|
|
|
85
88
|
## `sw-tsdk-connector action:input`
|
|
86
89
|
|
|
@@ -105,7 +108,7 @@ DESCRIPTION
|
|
|
105
108
|
Update action input schema.
|
|
106
109
|
```
|
|
107
110
|
|
|
108
|
-
_See code: [lib/commands/action/input.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.
|
|
111
|
+
_See code: [lib/commands/action/input.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.48+c9a92df/lib/commands/action/input.js)_
|
|
109
112
|
|
|
110
113
|
## `sw-tsdk-connector action:output`
|
|
111
114
|
|
|
@@ -129,7 +132,7 @@ DESCRIPTION
|
|
|
129
132
|
Update a connector action.
|
|
130
133
|
```
|
|
131
134
|
|
|
132
|
-
_See code: [lib/commands/action/output.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.
|
|
135
|
+
_See code: [lib/commands/action/output.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.48+c9a92df/lib/commands/action/output.js)_
|
|
133
136
|
|
|
134
137
|
## `sw-tsdk-connector action:run:local`
|
|
135
138
|
|
|
@@ -157,7 +160,7 @@ DESCRIPTION
|
|
|
157
160
|
Runs a connector action. (Defaults to current image version in local repository).
|
|
158
161
|
```
|
|
159
162
|
|
|
160
|
-
_See code: [lib/commands/action/run/local.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.
|
|
163
|
+
_See code: [lib/commands/action/run/local.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.48+c9a92df/lib/commands/action/run/local.js)_
|
|
161
164
|
|
|
162
165
|
## `sw-tsdk-connector asset:add`
|
|
163
166
|
|
|
@@ -177,7 +180,7 @@ DESCRIPTION
|
|
|
177
180
|
Update a connector action.
|
|
178
181
|
```
|
|
179
182
|
|
|
180
|
-
_See code: [lib/commands/asset/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.
|
|
183
|
+
_See code: [lib/commands/asset/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.48+c9a92df/lib/commands/asset/add.js)_
|
|
181
184
|
|
|
182
185
|
## `sw-tsdk-connector connector:build`
|
|
183
186
|
|
|
@@ -203,7 +206,7 @@ DESCRIPTION
|
|
|
203
206
|
Builds a local docker image of the connector.
|
|
204
207
|
```
|
|
205
208
|
|
|
206
|
-
_See code: [lib/commands/connector/build.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.
|
|
209
|
+
_See code: [lib/commands/connector/build.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.48+c9a92df/lib/commands/connector/build.js)_
|
|
207
210
|
|
|
208
211
|
## `sw-tsdk-connector connector:create`
|
|
209
212
|
|
|
@@ -235,7 +238,7 @@ DESCRIPTION
|
|
|
235
238
|
Scaffold a new connector
|
|
236
239
|
```
|
|
237
240
|
|
|
238
|
-
_See code: [lib/commands/connector/create.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.
|
|
241
|
+
_See code: [lib/commands/connector/create.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.48+c9a92df/lib/commands/connector/create.js)_
|
|
239
242
|
|
|
240
243
|
## `sw-tsdk-connector connector:create-source`
|
|
241
244
|
|
|
@@ -253,7 +256,7 @@ DESCRIPTION
|
|
|
253
256
|
Generates 11x source from 10x
|
|
254
257
|
```
|
|
255
258
|
|
|
256
|
-
_See code: [lib/commands/connector/create-source.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.
|
|
259
|
+
_See code: [lib/commands/connector/create-source.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.48+c9a92df/lib/commands/connector/create-source.js)_
|
|
257
260
|
|
|
258
261
|
## `sw-tsdk-connector connector:logo`
|
|
259
262
|
|
|
@@ -272,7 +275,7 @@ DESCRIPTION
|
|
|
272
275
|
Update a connector.
|
|
273
276
|
```
|
|
274
277
|
|
|
275
|
-
_See code: [lib/commands/connector/logo.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.
|
|
278
|
+
_See code: [lib/commands/connector/logo.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.48+c9a92df/lib/commands/connector/logo.js)_
|
|
276
279
|
|
|
277
280
|
## `sw-tsdk-connector connector:save`
|
|
278
281
|
|
|
@@ -293,7 +296,7 @@ DESCRIPTION
|
|
|
293
296
|
Save a docker image locally as .tar.gz
|
|
294
297
|
```
|
|
295
298
|
|
|
296
|
-
_See code: [lib/commands/connector/save.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.
|
|
299
|
+
_See code: [lib/commands/connector/save.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.48+c9a92df/lib/commands/connector/save.js)_
|
|
297
300
|
|
|
298
301
|
## `sw-tsdk-connector connector:sign`
|
|
299
302
|
|
|
@@ -317,7 +320,7 @@ DESCRIPTION
|
|
|
317
320
|
Builds a local docker image of the connector.
|
|
318
321
|
```
|
|
319
322
|
|
|
320
|
-
_See code: [lib/commands/connector/sign.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.
|
|
323
|
+
_See code: [lib/commands/connector/sign.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.48+c9a92df/lib/commands/connector/sign.js)_
|
|
321
324
|
|
|
322
325
|
## `sw-tsdk-connector connector:update`
|
|
323
326
|
|
|
@@ -337,7 +340,7 @@ DESCRIPTION
|
|
|
337
340
|
Update a connector.
|
|
338
341
|
```
|
|
339
342
|
|
|
340
|
-
_See code: [lib/commands/connector/update.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.
|
|
343
|
+
_See code: [lib/commands/connector/update.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.48+c9a92df/lib/commands/connector/update.js)_
|
|
341
344
|
|
|
342
345
|
## `sw-tsdk-connector connector:validate`
|
|
343
346
|
|
|
@@ -360,5 +363,5 @@ DESCRIPTION
|
|
|
360
363
|
Use to validate an integration
|
|
361
364
|
```
|
|
362
365
|
|
|
363
|
-
_See code: [lib/commands/connector/validate.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.
|
|
366
|
+
_See code: [lib/commands/connector/validate.js](https://github.com/swimlane/turbine-sdk/blob/v2.0.1-next.48+c9a92df/lib/commands/connector/validate.js)_
|
|
364
367
|
<!-- commandsstop -->
|
|
@@ -3,13 +3,15 @@ export declare class Data extends Base {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
6
|
-
|
|
7
|
-
asset: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
6
|
+
action: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
|
+
asset: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
8
|
inputs: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
9
|
directory: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
10
|
+
'include-optional': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
force: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
12
|
};
|
|
11
13
|
run(): Promise<void>;
|
|
12
14
|
private checkDirectoryAccess;
|
|
13
|
-
private chooseTask;
|
|
14
15
|
private static buildJsonFile;
|
|
16
|
+
private static createJsonFromSchema;
|
|
15
17
|
}
|
|
@@ -6,39 +6,46 @@ const core_1 = require("@oclif/core");
|
|
|
6
6
|
const core_2 = require("@sw-tsdk/core");
|
|
7
7
|
const fs_extra_1 = require("fs-extra");
|
|
8
8
|
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
9
|
-
const inquirer_autocomplete_prompt_1 = tslib_1.__importDefault(require("inquirer-autocomplete-prompt"));
|
|
10
9
|
const node_fs_1 = require("node:fs");
|
|
11
10
|
const node_path_1 = require("node:path");
|
|
12
11
|
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
13
12
|
const connector_1 = require("@sw-tsdk/connector");
|
|
13
|
+
const common_1 = require("../../../common");
|
|
14
|
+
const json_schema_faker_1 = require("json-schema-faker");
|
|
15
|
+
const node_crypto_1 = require("node:crypto");
|
|
14
16
|
// noinspection JSUnusedGlobalSymbols
|
|
15
17
|
class Data extends core_2.Base {
|
|
16
18
|
async run() {
|
|
17
19
|
const { flags } = await this.parse(Data);
|
|
18
|
-
const { asset, } = flags;
|
|
19
|
-
let { directory,
|
|
20
|
+
const { asset, 'include-optional': includeOptional, force, } = flags;
|
|
21
|
+
let { directory, action, inputs } = flags;
|
|
20
22
|
directory = (0, node_path_1.resolve)(directory || process.cwd());
|
|
21
23
|
await this.checkDirectoryAccess(directory);
|
|
22
|
-
if (!
|
|
23
|
-
|
|
24
|
-
inputs = `data/${
|
|
24
|
+
if (!action) {
|
|
25
|
+
action = await (0, common_1.chooseAction)(directory);
|
|
26
|
+
inputs = `data/${action}.json`;
|
|
25
27
|
}
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
+
if (action.endsWith('.yaml')) {
|
|
29
|
+
action = action.slice(0, Math.max(0, action.length - 5));
|
|
28
30
|
}
|
|
29
31
|
if (!inputs) {
|
|
30
|
-
inputs = `data/${
|
|
32
|
+
inputs = `data/${action}.json`;
|
|
31
33
|
}
|
|
32
|
-
core_1.CliUx.ux.log(`Starting run: ${
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
core_1.CliUx.ux.log(`Starting run: ${action}...`);
|
|
35
|
+
const manifests = await (0, connector_1.allManifests)(directory);
|
|
36
|
+
const assetManifests = manifests.assetManifests;
|
|
37
|
+
let assetName = assetManifests.length === 1 ? assetManifests[0].name : '';
|
|
38
|
+
if (assetManifests.length > 1) {
|
|
39
|
+
assetName = await (0, common_1.chooseAsset)(directory);
|
|
35
40
|
}
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
const actions = manifests.actionManifests;
|
|
42
|
+
if (!actions.some((x) => x.name === action)) {
|
|
43
|
+
this.error(`Invalid action: ${action}`);
|
|
38
44
|
return;
|
|
39
45
|
}
|
|
40
|
-
|
|
41
|
-
await Data.buildJsonFile(directory,
|
|
46
|
+
const assetPath = asset || (0, node_path_1.join)('data', `${assetName || 'asset'}.json`);
|
|
47
|
+
await Data.buildJsonFile(directory, manifests, assetName, assetPath, { includeOptional, force });
|
|
48
|
+
await Data.buildJsonFile(directory, manifests, action, inputs, { includeOptional, force });
|
|
42
49
|
}
|
|
43
50
|
async checkDirectoryAccess(directory) {
|
|
44
51
|
directory = (0, node_path_1.resolve)(directory || process.cwd());
|
|
@@ -49,25 +56,12 @@ class Data extends core_2.Base {
|
|
|
49
56
|
this.error(`Could not access ${directory}`);
|
|
50
57
|
}
|
|
51
58
|
}
|
|
52
|
-
async
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
.sort((a, b) => a.name < b.name ? -1 : 1);
|
|
57
|
-
const answers = await inquirer_1.default.prompt([
|
|
58
|
-
{
|
|
59
|
-
type: 'autocomplete',
|
|
60
|
-
name: 'name',
|
|
61
|
-
message: 'Choose a task to run',
|
|
62
|
-
source: (_, input) => actions.filter(r => !input || r.name.includes(input)).map(r => r),
|
|
63
|
-
},
|
|
64
|
-
]);
|
|
65
|
-
return answers.name;
|
|
66
|
-
}
|
|
67
|
-
static async buildJsonFile(directory, file, generatedFile) {
|
|
68
|
-
var _a;
|
|
59
|
+
static async buildJsonFile(directory, manifests, name, generatedFile, options) {
|
|
60
|
+
if (!name) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
69
63
|
const filePath = (0, node_path_1.resolve)((0, node_path_1.join)(directory, generatedFile));
|
|
70
|
-
if (await (0, core_2.fileExists)(filePath)) {
|
|
64
|
+
if (!options.force && await (0, core_2.fileExists)(filePath)) {
|
|
71
65
|
const answer = await inquirer_1.default.prompt([
|
|
72
66
|
{
|
|
73
67
|
type: 'confirm',
|
|
@@ -79,34 +73,53 @@ class Data extends core_2.Base {
|
|
|
79
73
|
return;
|
|
80
74
|
}
|
|
81
75
|
}
|
|
82
|
-
core_1.CliUx.ux.action.start(`Generating ${
|
|
83
|
-
const
|
|
76
|
+
core_1.CliUx.ux.action.start(`Generating ${name}.json...`);
|
|
77
|
+
const contentPath = manifests.findPath(name);
|
|
78
|
+
if (!contentPath) {
|
|
79
|
+
core_1.CliUx.ux.error(`Could not find ${name}.`);
|
|
80
|
+
}
|
|
81
|
+
const content = await (0, fs_extra_1.readFile)(contentPath, 'utf8');
|
|
84
82
|
const json = js_yaml_1.default.load(content);
|
|
85
|
-
const values = {};
|
|
86
83
|
const { inputs } = json;
|
|
87
|
-
|
|
88
|
-
for (key in inputs.properties) {
|
|
89
|
-
if (Object.hasOwnProperty.call(inputs.properties, key)) {
|
|
90
|
-
const inputConfig = inputs.properties[key];
|
|
91
|
-
values[key] = ((_a = inputConfig === null || inputConfig === void 0 ? void 0 : inputConfig.examples) === null || _a === void 0 ? void 0 : _a[0]) || null;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
84
|
+
const values = this.createJsonFromSchema(inputs, options);
|
|
94
85
|
await node_fs_1.promises.mkdir((0, node_path_1.dirname)(generatedFile), { recursive: true });
|
|
95
86
|
await (0, fs_extra_1.writeJson)(filePath, values, { spaces: 2, EOL: '\n' });
|
|
96
87
|
core_1.CliUx.ux.action.stop();
|
|
97
88
|
}
|
|
89
|
+
static createJsonFromSchema(data, options) {
|
|
90
|
+
json_schema_faker_1.JSONSchemaFaker.format('password', value => {
|
|
91
|
+
const newValue = value.default || value.examples ? value.examples[0] : null;
|
|
92
|
+
if (newValue) {
|
|
93
|
+
return newValue;
|
|
94
|
+
}
|
|
95
|
+
switch (value.format) {
|
|
96
|
+
case 'password':
|
|
97
|
+
return (0, node_crypto_1.randomUUID)();
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
json_schema_faker_1.JSONSchemaFaker.option('useExamplesValue', true);
|
|
101
|
+
json_schema_faker_1.JSONSchemaFaker.option('useDefaultValue', true);
|
|
102
|
+
if (!(options === null || options === void 0 ? void 0 : options.includeOptional)) {
|
|
103
|
+
json_schema_faker_1.JSONSchemaFaker.option('requiredOnly', true);
|
|
104
|
+
}
|
|
105
|
+
json_schema_faker_1.JSONSchemaFaker.option('pruneProperties', ['meta']);
|
|
106
|
+
const values = json_schema_faker_1.JSONSchemaFaker.generate(data);
|
|
107
|
+
return values;
|
|
108
|
+
}
|
|
98
109
|
}
|
|
99
110
|
exports.Data = Data;
|
|
100
111
|
Data.description = 'Use to test a task in an integration';
|
|
101
|
-
Data.flags = Object.assign(Object.assign({}, core_2.Base.flags), { help: core_1.Flags.help({ char: 'h' }),
|
|
102
|
-
description: 'asset json',
|
|
103
|
-
required: true,
|
|
104
|
-
default: 'data/asset.json',
|
|
112
|
+
Data.flags = Object.assign(Object.assign({}, core_2.Base.flags), { help: core_1.Flags.help({ char: 'h' }), action: core_1.Flags.string({ char: 'a', description: 'action to generate data' }), asset: core_1.Flags.string({
|
|
113
|
+
description: 'Filename for asset, defaults to the task name under the data folder. ie: data/asset_name.json',
|
|
105
114
|
}), inputs: core_1.Flags.string({
|
|
106
115
|
description: 'Filename for JSON inputs, defaults to the task name under the data folder. ie: data/my_task.json',
|
|
107
116
|
}), directory: core_1.Flags.string({
|
|
108
117
|
char: 'd',
|
|
109
118
|
description: 'current directory to mount',
|
|
110
119
|
default: './',
|
|
120
|
+
}), 'include-optional': core_1.Flags.boolean({
|
|
121
|
+
description: 'used to only generate required properties',
|
|
122
|
+
}), force: core_1.Flags.boolean({
|
|
123
|
+
description: 'overwrites current files',
|
|
111
124
|
}) });
|
|
112
125
|
//# sourceMappingURL=data.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../../../src/commands/action/generate/data.ts"],"names":[],"mappings":";;;;AAAA,sCAAwC;AACxC,wCAGsB;AACtB,uCAA4C;AAC5C,gEAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../../../src/commands/action/generate/data.ts"],"names":[],"mappings":";;;;AAAA,sCAAwC;AACxC,wCAGsB;AACtB,uCAA4C;AAC5C,gEAA+B;AAC/B,qCAAgC;AAChC,yCAAgD;AAChD,8DAA0B;AAC1B,kDAA0D;AAE1D,4CAAyD;AACzD,yDAAiD;AACjD,6CAAsC;AAEtC,qCAAqC;AACrC,MAAa,IAAK,SAAQ,WAAI;IA2B5B,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAEtC,MAAM,EACJ,KAAK,EACL,kBAAkB,EAAE,eAAe,EACnC,KAAK,GACN,GAAG,KAAK,CAAA;QAET,IAAI,EAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAC,GAAG,KAAK,CAAA;QACvC,SAAS,GAAG,IAAA,m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A0B;KACxC,CAAC,IACF"}
|
|
@@ -5,7 +5,7 @@ export declare class Image extends Base {
|
|
|
5
5
|
static flags: {
|
|
6
6
|
action: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
7
|
directory: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
8
|
-
'input-path': import("@oclif/core/lib/interfaces").OptionFlag<string
|
|
8
|
+
'input-path': import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
9
9
|
'output-path': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
10
10
|
'error-path': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
11
|
'asset-path': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
@@ -111,7 +111,8 @@ Image.flags = Object.assign(Object.assign({}, core_2.Base.flags), { action: core
|
|
|
111
111
|
description: 'Root directory of the repository.',
|
|
112
112
|
default: './',
|
|
113
113
|
}), 'input-path': core_1.Flags.string({
|
|
114
|
-
description: 'File to input data JSON file
|
|
114
|
+
description: 'File to input data JSON file',
|
|
115
|
+
required: true,
|
|
115
116
|
}), 'output-path': core_1.Flags.string({
|
|
116
117
|
description: 'File to write the outputs to, defaults to /data/<action>_output.json',
|
|
117
118
|
}), 'error-path': core_1.Flags.string({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../../../src/commands/action/run/image.ts"],"names":[],"mappings":";;;;AAAA,sCAAgD;AAChD,wCAA8C;AAC9C,yCAAuC;AACvC,uCAAyE;AACzE,4CAAqD;AACrD,wEAAkC;AAClC,wDAAuB;AACvB,iEAA6D;AAC7D,kDAAuE;AAEvE,qCAAqC;AACrC,MAAa,KAAM,SAAQ,WAAI;IAA/B;;
|
|
1
|
+
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../../../src/commands/action/run/image.ts"],"names":[],"mappings":";;;;AAAA,sCAAgD;AAChD,wCAA8C;AAC9C,yCAAuC;AACvC,uCAAy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AAE,4DAA4D;KAC1E,CAAC,EACF,UAAU,EAAE,YAAK,CAAC,MAAM,CAAC;QACvB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,wCAAwC;KACtD,CAAC,EACF,OAAO,EAAE,YAAK,CAAC,MAAM,CAAC;QACpB,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,QAAQ;KAClB,CAAC,EACF,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC;QACrB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,aAAa;KACvB,CAAC,EACF,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC;QACf,IAAI,EAAE,GAAG;KACV,CAAC,IACH"}
|
|
@@ -33,10 +33,21 @@ class Local extends core_2.Base {
|
|
|
33
33
|
}
|
|
34
34
|
// select action if not provided.
|
|
35
35
|
const actionToExecute = action || await (0, common_1.chooseAction)(directory);
|
|
36
|
+
const manifests = await (0, connector_1.allManifests)(directory);
|
|
37
|
+
const assetManifests = manifests.assetManifests;
|
|
38
|
+
let assetName = assetManifests.length === 1 ? assetManifests[0].name : '';
|
|
39
|
+
if (assetManifests.length > 1) {
|
|
40
|
+
assetName = await (0, common_1.chooseAsset)(directory);
|
|
41
|
+
}
|
|
42
|
+
const actions = manifests.actionManifests;
|
|
43
|
+
if (!actions.some((x) => x.name === actionToExecute)) {
|
|
44
|
+
this.error(`Invalid action: ${actionToExecute}`);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
36
47
|
const inputPath = flags['input-path'] || (0, node_path_1.join)(directory, 'data', `${actionToExecute}.json`);
|
|
37
48
|
const outputPath = flags['output-path'] || (0, node_path_1.join)(directory, 'data', `${actionToExecute}_output.json`);
|
|
38
49
|
const errorPath = flags['error-path'] || (0, node_path_1.join)(directory, 'data', `${actionToExecute}_error.txt`);
|
|
39
|
-
const assetPath = flags['asset-path'] || (0, node_path_1.join)(directory, 'data', 'asset.json
|
|
50
|
+
const assetPath = flags['asset-path'] || (0, node_path_1.join)(directory, 'data', `${assetName || 'asset'}.json`);
|
|
40
51
|
if (!await (0, core_2.fileExists)(inputPath)) {
|
|
41
52
|
core_1.CliUx.ux.error(`Missing test data ${inputPath}`);
|
|
42
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../../../src/commands/action/run/local.ts"],"names":[],"mappings":";;;;AAAA,sCAAgD;AAChD,wCAA8C;AAC9C,yCAAuC;AACvC,uCAAyE;AACzE,4CAAqD;AACrD,wEAAkC;AAClC,wDAAuB;AACvB,iEAA6D;AAC7D,
|
|
1
|
+
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../../../src/commands/action/run/local.ts"],"names":[],"mappings":";;;;AAAA,sCAAgD;AAChD,wCAA8C;AAC9C,yCAAuC;AACvC,uCAAyE;AACzE,4CAAqD;AACrD,wEAAkC;AAClC,wDAAuB;AACvB,iEAA6D;AAC7D,kDAAqG;AACrG,4CAAyD;AAGzD,qCAAqC;AACrC,MAAa,KAAM,SAAQ,WAAI;IAA/B;;QAuDU,WAAM,GAAW,IAAI,eAAM,EAAE,CAAA;IAkJvC,CAAC;IA/IC,KAAK,CAAC,GAAG;QACP,MAAM,EACJ,KAAK,GACN,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QAE3B,IAAI,EACF,SAAS,GACV,GAAG,KAAK,CAAA;QAET,IAAI,KAAK,GAAG,EAAE,CAAA;QAEd,MAAM,EACJ,QAAQ,EACR,MAAM,EACN,kBAAkB,EAAE,eAAe,EACnC,iBAAiB,EAAE,cAAc,EACjC,kBAAkB,EAAE,eAAe,EACnC,eAAe,EAAE,OAAO,EACxB,QAAQ,GACT,GAAG,KAAK,CAAA;QAET,SAAS,GAAG,IAAA,mBAAO,EAAC,SAAS,IAAI,sBAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QAE/C,wBAAwB;QACxB,IAAI;YACF,MAAM,mBAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;SACjC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MAAM,CAAC;QACzB,WAAW,EAAE,oEAAoE;KAClF,CAAC,EACF,YAAY,EAAE,YAAK,CAAC,MAAM,CAAC;QACzB,WAAW,EAAE,4DAA4D;KAC1E,CAAC,EACF,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,oBAAoB;QACjC,OAAO,EAAE,CAAC,qBAAqB,EAAE,SAAS,EAAE,uBAAuB,CAAC;QACpE,OAAO,EAAE,uBAAuB;KACjC,CAAC,EACF,kBAAkB,EAAE,YAAK,CAAC,MAAM,CAAC;QAC/B,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,oBAAoB;KAC9B,CAAC,EACF,iBAAiB,EAAE,YAAK,CAAC,MAAM,CAAC;QAC9B,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,mBAAmB;KAC7B,CAAC,EACF,kBAAkB,EAAE,YAAK,CAAC,MAAM,CAAC;QAC/B,MAAM,EAAE,IAAI;KACb,CAAC,EACF,eAAe,EAAE,YAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,mCAAmC;KACjD,CAAC,EACF,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC;QACrB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,aAAa;KACvB,CAAC,EACF,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC;QACf,IAAI,EAAE,GAAG;KACV,CAAC,IACH"}
|
package/lib/common.d.ts
CHANGED
package/lib/common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.connectorTemplates = exports.connectorCategories = exports.chooseAction = void 0;
|
|
3
|
+
exports.connectorTemplates = exports.connectorCategories = exports.chooseAsset = exports.chooseAction = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
6
6
|
const inquirer_autocomplete_prompt_1 = tslib_1.__importDefault(require("inquirer-autocomplete-prompt"));
|
|
@@ -8,19 +8,35 @@ const connector_1 = require("@sw-tsdk/connector");
|
|
|
8
8
|
async function chooseAction(directory) {
|
|
9
9
|
inquirer_1.default.registerPrompt('autocomplete', inquirer_autocomplete_prompt_1.default);
|
|
10
10
|
const manifests = await (0, connector_1.allManifests)(directory);
|
|
11
|
-
const actions = manifests.
|
|
12
|
-
.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const answers = await inquirer_1.default.prompt([{
|
|
11
|
+
const actions = manifests.actionManifests
|
|
12
|
+
.sort((a, b) => a.name < b.name ? -1 : 1);
|
|
13
|
+
const answers = await inquirer_1.default.prompt([
|
|
14
|
+
{
|
|
16
15
|
type: 'autocomplete',
|
|
17
16
|
name: 'name',
|
|
18
|
-
message: 'Choose
|
|
19
|
-
source: () =>
|
|
20
|
-
}
|
|
17
|
+
message: 'Choose a task',
|
|
18
|
+
source: (_, input) => actions.filter((r) => !input || r.name.includes(input)).map((r) => r),
|
|
19
|
+
},
|
|
20
|
+
]);
|
|
21
21
|
return answers.name;
|
|
22
22
|
}
|
|
23
23
|
exports.chooseAction = chooseAction;
|
|
24
|
+
async function chooseAsset(directory) {
|
|
25
|
+
inquirer_1.default.registerPrompt('autocomplete', inquirer_autocomplete_prompt_1.default);
|
|
26
|
+
const manifests = await (0, connector_1.allManifests)(directory);
|
|
27
|
+
const actions = manifests.assetManifests
|
|
28
|
+
.sort((a, b) => a.name < b.name ? -1 : 1);
|
|
29
|
+
const answers = await inquirer_1.default.prompt([
|
|
30
|
+
{
|
|
31
|
+
type: 'autocomplete',
|
|
32
|
+
name: 'name',
|
|
33
|
+
message: 'Choose an asset',
|
|
34
|
+
source: (_, input) => actions.filter((r) => !input || r.name.includes(input)).map((r) => r),
|
|
35
|
+
},
|
|
36
|
+
]);
|
|
37
|
+
return answers.name;
|
|
38
|
+
}
|
|
39
|
+
exports.chooseAsset = chooseAsset;
|
|
24
40
|
exports.connectorCategories = [
|
|
25
41
|
'Investigation',
|
|
26
42
|
'Endpoint Security & Management',
|
package/lib/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":";;;;AAAA,gEAA+B;AAC/B,wGAA6D;AAC7D,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":";;;;AAAA,gEAA+B;AAC/B,wGAA6D;AAC7D,kDAA+C;AAGxC,KAAK,UAAU,YAAY,CAAC,SAAiB;IAClD,kBAAQ,CAAC,cAAc,CAAC,cAAc,EAAE,sCAAkB,CAAC,CAAA;IAC3D,MAAM,SAAS,GAAG,MAAM,IAAA,wBAAY,EAAC,SAAS,CAAC,CAAA;IAC/C,MAAM,OAAO,GAAG,SAAS,CAAC,eAAe;SACxC,IAAI,CAAC,CAAC,CAA0B,EAAE,CAA0B,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAE3F,MAAM,OAAO,GAAG,MAAM,kBAAQ,CAAC,MAAM,CAAC;QACpC;YACE,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,eAAe;YACxB,MAAM,EAAE,CAAC,CAAU,EAAE,KAAa,EAAE,EAAE,CACpC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAyB,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAA0B,EAAE,EAAE,CAAC,CAAC,CAAC;SACzH;KACF,CAAC,CAAA;IAEF,OAAO,OAAO,CAAC,IAAI,CAAA;AACrB,CAAC;AAjBD,oCAiBC;AAEM,KAAK,UAAU,WAAW,CAAC,SAAiB;IACjD,kBAAQ,CAAC,cAAc,CAAC,cAAc,EAAE,sCAAkB,CAAC,CAAA;IAC3D,MAAM,SAAS,GAAG,MAAM,IAAA,wBAAY,EAAC,SAAS,CAAC,CAAA;IAC/C,MAAM,OAAO,GAAG,SAAS,CAAC,cAAc;SACvC,IAAI,CAAC,CAAC,CAAyB,EAAE,CAAyB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAEzF,MAAM,OAAO,GAAG,MAAM,kBAAQ,CAAC,MAAM,CAAC;QACpC;YACE,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,iBAAiB;YAC1B,MAAM,EAAE,CAAC,CAAU,EAAE,KAAa,EAAE,EAAE,CACpC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAwB,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAyB,EAAE,EAAE,CAAC,CAAC,CAAC;SACvH;KACF,CAAC,CAAA;IAEF,OAAO,OAAO,CAAC,IAAI,CAAA;AACrB,CAAC;AAjBD,kCAiBC;AAEY,QAAA,mBAAmB,GAAG;IACjC,eAAe;IACf,gCAAgC;IAChC,+BAA+B;IAC/B,eAAe;IACf,uBAAuB;IACvB,8BAA8B;IAC9B,kCAAkC;IAClC,mBAAmB;IACnB,+BAA+B;IAC/B,8BAA8B;IAC9B,gBAAgB;IAChB,eAAe;CAChB,CAAA;AAEY,QAAA,kBAAkB,GAAG;IAChC,uBAAuB;IACvB,SAAS;IACT,qBAAqB;CACtB,CAAA"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.0.1-next.47+7fbdb67","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":[]},"action:input":{"id":"action: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,"dependsOn":["update-output-schema"]},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"action:output":{"id":"action: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,"dependsOn":["update-output-schema"]},"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","client_credentials","basic","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},"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","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":"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},"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 verfication","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},"name":{"name":"name","type":"option","char":"n","description":"task name to run","multiple":false},"asset":{"name":"asset","type":"option","description":"asset json","required":true,"multiple":false,"default":"data/asset.json"},"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":"./"}},"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, 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},"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"},"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.48+c9a92df","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":[]},"action:input":{"id":"action: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,"dependsOn":["update-output-schema"]},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"action:output":{"id":"action: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,"dependsOn":["update-output-schema"]},"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","client_credentials","basic","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},"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","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":"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},"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 verfication","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: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"},"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":[]}}}
|
package/package.json
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@oclif/core": "1.16.4",
|
|
8
|
-
"@sw-tsdk/common": "^2.0.1-next.
|
|
9
|
-
"@sw-tsdk/connector": "^2.0.1-next.
|
|
10
|
-
"@sw-tsdk/core": "^2.0.1-next.
|
|
11
|
-
"@sw-tsdk/docker": "^2.0.1-next.
|
|
8
|
+
"@sw-tsdk/common": "^2.0.1-next.48+c9a92df",
|
|
9
|
+
"@sw-tsdk/connector": "^2.0.1-next.48+c9a92df",
|
|
10
|
+
"@sw-tsdk/core": "^2.0.1-next.48+c9a92df",
|
|
11
|
+
"@sw-tsdk/docker": "^2.0.1-next.48+c9a92df",
|
|
12
12
|
"@swimlane/connector-interfaces": "1.8.5-rc3",
|
|
13
13
|
"@swimlane/cosign": "1.3.1",
|
|
14
14
|
"@swimlane/docker-reference": "0.0.15",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"inquirer": "8.2.2",
|
|
18
18
|
"inquirer-autocomplete-prompt": "2.0.0",
|
|
19
19
|
"js-yaml": "4.1.0",
|
|
20
|
+
"json-schema-faker": "0.5.0-rcv.46",
|
|
20
21
|
"json-schema-typed": "7.0.3",
|
|
21
22
|
"listr2": "4.0.5",
|
|
22
23
|
"noop-stream": "1.0.0",
|
|
@@ -87,6 +88,6 @@
|
|
|
87
88
|
"posttest": "yarn lint",
|
|
88
89
|
"dev:setup": "npm link"
|
|
89
90
|
},
|
|
90
|
-
"version": "2.0.1-next.
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"version": "2.0.1-next.48+c9a92df",
|
|
92
|
+
"gitHead": "c9a92dfd004af18b338a5457e3e4d4fd40718afb"
|
|
92
93
|
}
|