@sw-tsdk/plugin-connector 2.17.3 → 2.18.0
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 +113 -15
- package/lib/commands/component/create.d.ts +34 -0
- package/lib/commands/component/create.js +168 -0
- package/lib/commands/component/create.js.map +1 -0
- package/lib/commands/component/logo.d.ts +12 -0
- package/lib/commands/component/logo.js +63 -0
- package/lib/commands/component/logo.js.map +1 -0
- package/lib/commands/component/ssp.d.ts +12 -0
- package/lib/commands/component/ssp.js +64 -0
- package/lib/commands/component/ssp.js.map +1 -0
- package/lib/commands/component/update.d.ts +13 -0
- package/lib/commands/component/update.js +68 -0
- package/lib/commands/component/update.js.map +1 -0
- package/lib/commands/connector/create.js +10 -5
- package/lib/commands/connector/create.js.map +1 -1
- package/lib/commands/connector/logo.js +10 -1
- package/lib/commands/connector/logo.js.map +1 -1
- package/lib/common.d.ts +3 -0
- package/lib/common.js +59 -2
- package/lib/common.js.map +1 -1
- package/lib/types/connector-types.d.ts +20 -0
- package/oclif.manifest.json +240 -1
- package/package.json +6 -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.
|
|
19
|
+
@sw-tsdk/plugin-connector/2.18.0 linux-x64 node-v16.20.2
|
|
20
20
|
$ sw-tsdk-connector --help [COMMAND]
|
|
21
21
|
USAGE
|
|
22
22
|
$ sw-tsdk-connector COMMAND
|
|
@@ -31,6 +31,10 @@ USAGE
|
|
|
31
31
|
* [`sw-tsdk-connector action:generate:output`](#sw-tsdk-connector-actiongenerateoutput)
|
|
32
32
|
* [`sw-tsdk-connector action:run:local`](#sw-tsdk-connector-actionrunlocal)
|
|
33
33
|
* [`sw-tsdk-connector asset:add`](#sw-tsdk-connector-assetadd)
|
|
34
|
+
* [`sw-tsdk-connector component:create`](#sw-tsdk-connector-componentcreate)
|
|
35
|
+
* [`sw-tsdk-connector component:logo`](#sw-tsdk-connector-componentlogo)
|
|
36
|
+
* [`sw-tsdk-connector component:ssp`](#sw-tsdk-connector-componentssp)
|
|
37
|
+
* [`sw-tsdk-connector component:update`](#sw-tsdk-connector-componentupdate)
|
|
34
38
|
* [`sw-tsdk-connector connector:build`](#sw-tsdk-connector-connectorbuild)
|
|
35
39
|
* [`sw-tsdk-connector connector:create`](#sw-tsdk-connector-connectorcreate)
|
|
36
40
|
* [`sw-tsdk-connector connector:create:openapi`](#sw-tsdk-connector-connectorcreateopenapi)
|
|
@@ -58,7 +62,7 @@ DESCRIPTION
|
|
|
58
62
|
Update a connector action.
|
|
59
63
|
```
|
|
60
64
|
|
|
61
|
-
_See code: [lib/commands/action/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.
|
|
65
|
+
_See code: [lib/commands/action/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/action/add.js)_
|
|
62
66
|
|
|
63
67
|
## `sw-tsdk-connector action:generate:data`
|
|
64
68
|
|
|
@@ -83,7 +87,7 @@ DESCRIPTION
|
|
|
83
87
|
Use to test a task in an integration
|
|
84
88
|
```
|
|
85
89
|
|
|
86
|
-
_See code: [lib/commands/action/generate/data.js](https://github.com/swimlane/turbine-sdk/blob/v2.
|
|
90
|
+
_See code: [lib/commands/action/generate/data.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/action/generate/data.js)_
|
|
87
91
|
|
|
88
92
|
## `sw-tsdk-connector action:generate:input`
|
|
89
93
|
|
|
@@ -108,7 +112,7 @@ DESCRIPTION
|
|
|
108
112
|
Update action input schema.
|
|
109
113
|
```
|
|
110
114
|
|
|
111
|
-
_See code: [lib/commands/action/generate/input.js](https://github.com/swimlane/turbine-sdk/blob/v2.
|
|
115
|
+
_See code: [lib/commands/action/generate/input.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/action/generate/input.js)_
|
|
112
116
|
|
|
113
117
|
## `sw-tsdk-connector action:generate:output`
|
|
114
118
|
|
|
@@ -132,7 +136,7 @@ DESCRIPTION
|
|
|
132
136
|
Update a connector action.
|
|
133
137
|
```
|
|
134
138
|
|
|
135
|
-
_See code: [lib/commands/action/generate/output.js](https://github.com/swimlane/turbine-sdk/blob/v2.
|
|
139
|
+
_See code: [lib/commands/action/generate/output.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/action/generate/output.js)_
|
|
136
140
|
|
|
137
141
|
## `sw-tsdk-connector action:run:local`
|
|
138
142
|
|
|
@@ -161,7 +165,7 @@ DESCRIPTION
|
|
|
161
165
|
Runs a connector action. (Defaults to current image version in local repository).
|
|
162
166
|
```
|
|
163
167
|
|
|
164
|
-
_See code: [lib/commands/action/run/local.js](https://github.com/swimlane/turbine-sdk/blob/v2.
|
|
168
|
+
_See code: [lib/commands/action/run/local.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/action/run/local.js)_
|
|
165
169
|
|
|
166
170
|
## `sw-tsdk-connector asset:add`
|
|
167
171
|
|
|
@@ -182,7 +186,101 @@ DESCRIPTION
|
|
|
182
186
|
Update a connector action.
|
|
183
187
|
```
|
|
184
188
|
|
|
185
|
-
_See code: [lib/commands/asset/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.
|
|
189
|
+
_See code: [lib/commands/asset/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/asset/add.js)_
|
|
190
|
+
|
|
191
|
+
## `sw-tsdk-connector component:create`
|
|
192
|
+
|
|
193
|
+
Scaffold a new Component
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
USAGE
|
|
197
|
+
$ sw-tsdk-connector component:create [-d <value>] [--componentType <value>] [--vendor <value>] [--componentName
|
|
198
|
+
<value>] [--keywords <value>] [--description <value>] [--logoPath <value>] [--sspPath <value>] [--author <value>]
|
|
199
|
+
[--authorEmail <value>] [--homepage <value>] [-h]
|
|
200
|
+
|
|
201
|
+
FLAGS
|
|
202
|
+
-d, --directory=<value> [default: ./] root directory for where to store Component.
|
|
203
|
+
-h, --help Show CLI help.
|
|
204
|
+
--author=<value> Component Author
|
|
205
|
+
--authorEmail=<value> Component Author Email
|
|
206
|
+
--componentName=<value> Component Name (e.g. Alert Ingestion)
|
|
207
|
+
--componentType=<value> Component Type (e.g. classic)
|
|
208
|
+
--description=<value> Description (e.g. CrowdStrike Alert Ingestion Component)
|
|
209
|
+
--homepage=<value> Component Author Support URL
|
|
210
|
+
--keywords=<value> Enter keywords
|
|
211
|
+
--logoPath=<value> URL or absolute path to logo file
|
|
212
|
+
--sspPath=<value> absolute path to .ssp file
|
|
213
|
+
--vendor=<value> Vendor (e.g. CrowdStrike)
|
|
214
|
+
|
|
215
|
+
DESCRIPTION
|
|
216
|
+
Scaffold a new Component
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
_See code: [lib/commands/component/create.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/component/create.js)_
|
|
220
|
+
|
|
221
|
+
## `sw-tsdk-connector component:logo`
|
|
222
|
+
|
|
223
|
+
Update a Component logo.
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
USAGE
|
|
227
|
+
$ sw-tsdk-connector component:logo [-d <value>] [-t <value>] [-n <value>] [-p <value>] [-h]
|
|
228
|
+
|
|
229
|
+
FLAGS
|
|
230
|
+
-d, --directory=<value> [default: ./] root directory of the component folder.
|
|
231
|
+
-h, --help Show CLI help.
|
|
232
|
+
-n, --componentName=<value> Component Name (e.g. google_alert_ingestion)
|
|
233
|
+
-p, --logoPath=<value> path or URL to product logo in PNG format.
|
|
234
|
+
-t, --componentType=<value> Component Type (e.g. classic)
|
|
235
|
+
|
|
236
|
+
DESCRIPTION
|
|
237
|
+
Update a Component logo.
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
_See code: [lib/commands/component/logo.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/component/logo.js)_
|
|
241
|
+
|
|
242
|
+
## `sw-tsdk-connector component:ssp`
|
|
243
|
+
|
|
244
|
+
Update an SSP.
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
USAGE
|
|
248
|
+
$ sw-tsdk-connector component:ssp [-d <value>] [-t <value>] [-n <value>] [-p <value>] [-h]
|
|
249
|
+
|
|
250
|
+
FLAGS
|
|
251
|
+
-d, --directory=<value> [default: ./] root directory of the component folder.
|
|
252
|
+
-h, --help Show CLI help.
|
|
253
|
+
-n, --componentName=<value> Component Name (e.g. google_alert_ingestion)
|
|
254
|
+
-p, --sspPath=<value> Absolute path to .SSP file
|
|
255
|
+
-t, --componentType=<value> Component Type (e.g. classic)
|
|
256
|
+
|
|
257
|
+
DESCRIPTION
|
|
258
|
+
Update an SSP.
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
_See code: [lib/commands/component/ssp.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/component/ssp.js)_
|
|
262
|
+
|
|
263
|
+
## `sw-tsdk-connector component:update`
|
|
264
|
+
|
|
265
|
+
Update Component Version.
|
|
266
|
+
|
|
267
|
+
```
|
|
268
|
+
USAGE
|
|
269
|
+
$ sw-tsdk-connector component:update [-d <value>] [-v <value>] [-t <value>] [-n <value>] [-f <value>] [-h]
|
|
270
|
+
|
|
271
|
+
FLAGS
|
|
272
|
+
-d, --directory=<value> [default: .] root directory of the all Components
|
|
273
|
+
-f, --manifestPath=<value> [default: manifest.yml] Component manifest path relative to directory.
|
|
274
|
+
-h, --help Show CLI help.
|
|
275
|
+
-n, --componentName=<value> Component Name (e.g. google_alert_ingestion)
|
|
276
|
+
-t, --componentType=<value> Component Type (e.g. classic)
|
|
277
|
+
-v, --version=<value> new version of the component.
|
|
278
|
+
|
|
279
|
+
DESCRIPTION
|
|
280
|
+
Update Component Version.
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
_See code: [lib/commands/component/update.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/component/update.js)_
|
|
186
284
|
|
|
187
285
|
## `sw-tsdk-connector connector:build`
|
|
188
286
|
|
|
@@ -212,7 +310,7 @@ DESCRIPTION
|
|
|
212
310
|
Builds a local docker image of the connector.
|
|
213
311
|
```
|
|
214
312
|
|
|
215
|
-
_See code: [lib/commands/connector/build.js](https://github.com/swimlane/turbine-sdk/blob/v2.
|
|
313
|
+
_See code: [lib/commands/connector/build.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/connector/build.js)_
|
|
216
314
|
|
|
217
315
|
## `sw-tsdk-connector connector:create`
|
|
218
316
|
|
|
@@ -244,7 +342,7 @@ DESCRIPTION
|
|
|
244
342
|
Scaffold a new connector
|
|
245
343
|
```
|
|
246
344
|
|
|
247
|
-
_See code: [lib/commands/connector/create.js](https://github.com/swimlane/turbine-sdk/blob/v2.
|
|
345
|
+
_See code: [lib/commands/connector/create.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/connector/create.js)_
|
|
248
346
|
|
|
249
347
|
## `sw-tsdk-connector connector:create:openapi`
|
|
250
348
|
|
|
@@ -273,7 +371,7 @@ DESCRIPTION
|
|
|
273
371
|
Scaffold a new connector
|
|
274
372
|
```
|
|
275
373
|
|
|
276
|
-
_See code: [lib/commands/connector/create/openapi.js](https://github.com/swimlane/turbine-sdk/blob/v2.
|
|
374
|
+
_See code: [lib/commands/connector/create/openapi.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/connector/create/openapi.js)_
|
|
277
375
|
|
|
278
376
|
## `sw-tsdk-connector connector:create:source`
|
|
279
377
|
|
|
@@ -291,7 +389,7 @@ DESCRIPTION
|
|
|
291
389
|
Generates 11x source from 10x
|
|
292
390
|
```
|
|
293
391
|
|
|
294
|
-
_See code: [lib/commands/connector/create/source.js](https://github.com/swimlane/turbine-sdk/blob/v2.
|
|
392
|
+
_See code: [lib/commands/connector/create/source.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/connector/create/source.js)_
|
|
295
393
|
|
|
296
394
|
## `sw-tsdk-connector connector:logo`
|
|
297
395
|
|
|
@@ -310,7 +408,7 @@ DESCRIPTION
|
|
|
310
408
|
Update a connector.
|
|
311
409
|
```
|
|
312
410
|
|
|
313
|
-
_See code: [lib/commands/connector/logo.js](https://github.com/swimlane/turbine-sdk/blob/v2.
|
|
411
|
+
_See code: [lib/commands/connector/logo.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/connector/logo.js)_
|
|
314
412
|
|
|
315
413
|
## `sw-tsdk-connector connector:sign`
|
|
316
414
|
|
|
@@ -335,7 +433,7 @@ DESCRIPTION
|
|
|
335
433
|
Builds a local docker image of the connector.
|
|
336
434
|
```
|
|
337
435
|
|
|
338
|
-
_See code: [lib/commands/connector/sign.js](https://github.com/swimlane/turbine-sdk/blob/v2.
|
|
436
|
+
_See code: [lib/commands/connector/sign.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/connector/sign.js)_
|
|
339
437
|
|
|
340
438
|
## `sw-tsdk-connector connector:update`
|
|
341
439
|
|
|
@@ -355,7 +453,7 @@ DESCRIPTION
|
|
|
355
453
|
Update a connector.
|
|
356
454
|
```
|
|
357
455
|
|
|
358
|
-
_See code: [lib/commands/connector/update.js](https://github.com/swimlane/turbine-sdk/blob/v2.
|
|
456
|
+
_See code: [lib/commands/connector/update.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/connector/update.js)_
|
|
359
457
|
|
|
360
458
|
## `sw-tsdk-connector connector:validate`
|
|
361
459
|
|
|
@@ -378,5 +476,5 @@ DESCRIPTION
|
|
|
378
476
|
Use to validate an integration
|
|
379
477
|
```
|
|
380
478
|
|
|
381
|
-
_See code: [lib/commands/connector/validate.js](https://github.com/swimlane/turbine-sdk/blob/v2.
|
|
479
|
+
_See code: [lib/commands/connector/validate.js](https://github.com/swimlane/turbine-sdk/blob/v2.18.0/lib/commands/connector/validate.js)_
|
|
382
480
|
<!-- commandsstop -->
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Base } from '@sw-tsdk/core';
|
|
2
|
+
export interface ComponentManifest {
|
|
3
|
+
schema: string;
|
|
4
|
+
componentType: string;
|
|
5
|
+
vendor: string;
|
|
6
|
+
name: string;
|
|
7
|
+
author: string;
|
|
8
|
+
bugs: string;
|
|
9
|
+
iconImage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
homepage: string;
|
|
12
|
+
license: string;
|
|
13
|
+
title: string;
|
|
14
|
+
version: string;
|
|
15
|
+
keywords: string[];
|
|
16
|
+
}
|
|
17
|
+
export declare class Create extends Base {
|
|
18
|
+
static description: string;
|
|
19
|
+
static flags: {
|
|
20
|
+
directory: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
21
|
+
componentType: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
22
|
+
vendor: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
23
|
+
componentName: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
24
|
+
keywords: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
25
|
+
description: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
26
|
+
logoPath: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
27
|
+
sspPath: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
28
|
+
author: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
29
|
+
authorEmail: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
30
|
+
homepage: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
31
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
32
|
+
};
|
|
33
|
+
run(): Promise<void>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Create = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const connector_1 = require("@sw-tsdk/connector");
|
|
7
|
+
const core_2 = require("@sw-tsdk/core");
|
|
8
|
+
const fs_extra_1 = require("fs-extra");
|
|
9
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
10
|
+
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
11
|
+
const fs = tslib_1.__importStar(require("node:fs"));
|
|
12
|
+
const node_fs_1 = require("node:fs");
|
|
13
|
+
const path = tslib_1.__importStar(require("node:path"));
|
|
14
|
+
const node_path_1 = require("node:path");
|
|
15
|
+
const snake_case_1 = require("snake-case");
|
|
16
|
+
const common_1 = require("../../common");
|
|
17
|
+
// noinspection JSUnusedGlobalSymbols
|
|
18
|
+
class Create extends core_2.Base {
|
|
19
|
+
async run() {
|
|
20
|
+
const { flags } = await this.parse(Create);
|
|
21
|
+
let { directory } = flags;
|
|
22
|
+
directory = (0, node_path_1.resolve)(directory || process.cwd());
|
|
23
|
+
try {
|
|
24
|
+
await node_fs_1.promises.access(directory);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
this.error(`Could not access ${directory}`);
|
|
28
|
+
}
|
|
29
|
+
const masterQuestions = [{
|
|
30
|
+
type: 'list',
|
|
31
|
+
name: 'componentType',
|
|
32
|
+
message: 'Choose Component Type',
|
|
33
|
+
choices: common_1.contentCategories,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: 'input',
|
|
37
|
+
name: 'vendor',
|
|
38
|
+
message: 'Vendor (e.g. CrowdStrike)',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: 'input',
|
|
42
|
+
name: 'componentName',
|
|
43
|
+
message: 'Component Name (e.g. Alert Ingestion)',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: 'input',
|
|
47
|
+
name: 'description',
|
|
48
|
+
message: 'Description (e.g. CrowdStrike Alert Ingestion Component)',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: 'list',
|
|
52
|
+
name: 'keywords',
|
|
53
|
+
message: 'Choose a category (Comma-separated)',
|
|
54
|
+
choices: common_1.connectorCategories,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: 'input',
|
|
58
|
+
name: 'logoPath',
|
|
59
|
+
message: 'URL or absolute path to logo file',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: 'input',
|
|
63
|
+
name: 'sspPath',
|
|
64
|
+
message: 'Absolute path to .ssp file',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: 'input',
|
|
68
|
+
name: 'author',
|
|
69
|
+
message: 'Integration Author',
|
|
70
|
+
default: 'Swimlane',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
type: 'input',
|
|
74
|
+
name: 'authorEmail',
|
|
75
|
+
message: 'Integration Author Email',
|
|
76
|
+
default: 'info@swimlane.com',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: 'input',
|
|
80
|
+
name: 'homepage',
|
|
81
|
+
message: 'Author URL',
|
|
82
|
+
default: 'https://swimlane.com',
|
|
83
|
+
}];
|
|
84
|
+
const filteredQuestions = masterQuestions.filter(q => !flags[q.name]);
|
|
85
|
+
const answers = Object.assign(await inquirer_1.default.prompt(filteredQuestions), flags);
|
|
86
|
+
const componentType = answers.componentType;
|
|
87
|
+
const errors = [];
|
|
88
|
+
if (!answers.vendor) {
|
|
89
|
+
errors.push('Vendor Field is required.');
|
|
90
|
+
}
|
|
91
|
+
if (!answers.componentName) {
|
|
92
|
+
errors.push('Component Name is required.');
|
|
93
|
+
}
|
|
94
|
+
const name = (0, snake_case_1.snakeCase)(`${answers.vendor} ${answers.componentName}`.toLocaleLowerCase());
|
|
95
|
+
const componentDirectory = (0, node_path_1.join)(directory, componentType, `${name}`);
|
|
96
|
+
await (0, fs_extra_1.ensureDir)(componentDirectory);
|
|
97
|
+
const component = {
|
|
98
|
+
vendor: answers.vendor,
|
|
99
|
+
name: name,
|
|
100
|
+
schema: 'component/1',
|
|
101
|
+
author: answers.author,
|
|
102
|
+
bugs: '',
|
|
103
|
+
iconImage: '../image/logo.png',
|
|
104
|
+
description: answers.description,
|
|
105
|
+
homepage: answers.homepage,
|
|
106
|
+
license: 'AGPL-3.0',
|
|
107
|
+
title: await (0, connector_1.titleCaseString)(`${answers.vendor} ${answers.componentName}`),
|
|
108
|
+
version: '0.0.0',
|
|
109
|
+
componentType: componentType,
|
|
110
|
+
keywords: answers.keywords.split(',').map(x => x.trim()),
|
|
111
|
+
};
|
|
112
|
+
core_1.ux.action.start('Generating folder structure.');
|
|
113
|
+
if (answers.logoPath?.endsWith('.png') || answers.logoPath?.endsWith('.jpg') || answers.logoPath?.endsWith('.jpeg')) {
|
|
114
|
+
core_1.ux.action.start('Processing Logo');
|
|
115
|
+
await (0, connector_1.updateImage)(componentDirectory, answers.logoPath);
|
|
116
|
+
core_1.ux.action.stop();
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
core_1.ux.action.stop();
|
|
120
|
+
errors.push('Invalid logo file provided');
|
|
121
|
+
}
|
|
122
|
+
if (answers.sspPath?.endsWith('.ssp')) {
|
|
123
|
+
core_1.ux.action.start('Processing SSP File');
|
|
124
|
+
const destinationPath = path.join(componentDirectory, `${name}.ssp`);
|
|
125
|
+
await fs.promises.copyFile(answers.sspPath, destinationPath);
|
|
126
|
+
core_1.ux.action.stop();
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
errors.push('Invalid ssp file provided');
|
|
130
|
+
}
|
|
131
|
+
if (errors.length > 0) {
|
|
132
|
+
core_1.ux.action.stop();
|
|
133
|
+
return this.error(errors.join('\n'));
|
|
134
|
+
}
|
|
135
|
+
const manifestFilePath = (0, node_path_1.join)(componentDirectory, 'manifest.yml');
|
|
136
|
+
await (0, fs_extra_1.writeFile)(manifestFilePath, js_yaml_1.default.dump(component, {
|
|
137
|
+
indent: 2,
|
|
138
|
+
noRefs: true,
|
|
139
|
+
}));
|
|
140
|
+
await (0, fs_extra_1.writeFile)((0, node_path_1.join)(componentDirectory, 'external.yml'), '', 'utf8');
|
|
141
|
+
await (0, fs_extra_1.writeFile)((0, node_path_1.join)(componentDirectory, 'README.md'), 'Description will be updated shortly.', 'utf8');
|
|
142
|
+
await (0, fs_extra_1.writeFile)((0, node_path_1.join)(componentDirectory, 'EXTERNAL_README.md'), 'Description will be updated shortly.', 'utf8');
|
|
143
|
+
await (0, fs_extra_1.writeFile)((0, node_path_1.join)(componentDirectory, 'documentation.README.md'), 'Description will be updated shortly.', 'utf8');
|
|
144
|
+
core_1.ux.action.stop();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
exports.Create = Create;
|
|
148
|
+
Create.description = 'Scaffold a new Component';
|
|
149
|
+
Create.flags = {
|
|
150
|
+
...core_2.Base.flags,
|
|
151
|
+
directory: core_1.Flags.string({
|
|
152
|
+
char: 'd',
|
|
153
|
+
description: 'root directory for where to store Component.',
|
|
154
|
+
default: './',
|
|
155
|
+
}),
|
|
156
|
+
componentType: core_1.Flags.string({ description: 'Component Type (e.g. classic)' }),
|
|
157
|
+
vendor: core_1.Flags.string({ description: 'Vendor (e.g. CrowdStrike)' }),
|
|
158
|
+
componentName: core_1.Flags.string({ description: 'Component Name (e.g. Alert Ingestion)' }),
|
|
159
|
+
keywords: core_1.Flags.string({ description: 'Enter keywords' }),
|
|
160
|
+
description: core_1.Flags.string({ description: 'Description (e.g. CrowdStrike Alert Ingestion Component)' }),
|
|
161
|
+
logoPath: core_1.Flags.string({ description: 'URL or absolute path to logo file' }),
|
|
162
|
+
sspPath: core_1.Flags.string({ description: 'absolute path to .ssp file' }),
|
|
163
|
+
author: core_1.Flags.string({ description: 'Component Author' }),
|
|
164
|
+
authorEmail: core_1.Flags.string({ description: 'Component Author Email' }),
|
|
165
|
+
homepage: core_1.Flags.string({ description: 'Component Author Support URL' }),
|
|
166
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
167
|
+
};
|
|
168
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/component/create.ts"],"names":[],"mappings":";;;;AAAA,sCAAqC;AACrC,kDAA+D;AAC/D,wCAAkC;AAClC,uCAA6C;AAC7C,gEAA+B;AAC/B,8DAA0B;AAC1B,oDAA6B;AAC7B,qCAAgC;AAChC,wDAAiC;AACjC,yCAAuC;AACvC,2CAAoC;AACpC,yCAAmE;AAkBnE,qCAAqC;AACrC,MAAa,MAAO,SAAQ,WAAI;IAuB9B,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;QAExC,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,MAAM;YACN,IAAI,CAAC,KAAK,CAAC,oBAAoB,SAAS,EAAE,CAAC,CAAA;SAC5C;QAED,MAAM,eAAe,GAAG,CA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,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,0DAA0D,EAAC,CAAC;IACpG,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,mCAAmC,EAAC,CAAC;IAC1E,OAAO,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,4BAA4B,EAAC,CAAC;IAClE,MAAM,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,kBAAkB,EAAC,CAAC;IACvD,WAAW,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,wBAAwB,EAAC,CAAC;IAClE,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,8BAA8B,EAAC,CAAC;IACrE,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;CAC9B,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Base } from '@sw-tsdk/core';
|
|
2
|
+
export declare class Logo extends Base {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
directory: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
|
+
componentType: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
componentName: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
logoPath: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Logo = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const connector_1 = require("@sw-tsdk/connector");
|
|
7
|
+
const core_2 = require("@sw-tsdk/core");
|
|
8
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
9
|
+
const node_path_1 = require("node:path");
|
|
10
|
+
const common_1 = require("../../common");
|
|
11
|
+
// noinspection JSUnusedGlobalSymbols
|
|
12
|
+
class Logo extends core_2.Base {
|
|
13
|
+
async run() {
|
|
14
|
+
const { flags } = await this.parse(Logo);
|
|
15
|
+
let { directory } = flags;
|
|
16
|
+
directory = (0, node_path_1.resolve)(directory || process.cwd());
|
|
17
|
+
const masterQuestions = [
|
|
18
|
+
{
|
|
19
|
+
type: 'input',
|
|
20
|
+
name: 'logoPath',
|
|
21
|
+
message: 'URL or absolute path to logo file',
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
const componentTypeSelected = await (0, common_1.chooseComponentType)();
|
|
25
|
+
const componentNameSelected = await (0, common_1.chooseComponentName)(directory, componentTypeSelected);
|
|
26
|
+
const filteredQuestions = masterQuestions.filter(q => !flags[q.name]);
|
|
27
|
+
const answers = Object.assign(await inquirer_1.default.prompt(filteredQuestions), flags);
|
|
28
|
+
const componentDirectory = (0, node_path_1.join)(directory, componentTypeSelected, componentNameSelected);
|
|
29
|
+
if (answers.logoPath?.endsWith('.png') || answers.logoPath?.endsWith('.jpg') || answers.logoPath?.endsWith('.jpeg')) {
|
|
30
|
+
core_1.ux.action.start('Updating Logo');
|
|
31
|
+
await (0, connector_1.updateImage)(componentDirectory, answers.logoPath);
|
|
32
|
+
core_1.ux.action.stop();
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
core_1.ux.action.stop();
|
|
36
|
+
this.error('Invalid logo file provided');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.Logo = Logo;
|
|
41
|
+
Logo.description = 'Update a Component logo.';
|
|
42
|
+
Logo.flags = {
|
|
43
|
+
...core_2.Base.flags,
|
|
44
|
+
directory: core_1.Flags.string({
|
|
45
|
+
char: 'd',
|
|
46
|
+
description: 'root directory of the component folder.',
|
|
47
|
+
default: './',
|
|
48
|
+
}),
|
|
49
|
+
componentType: core_1.Flags.string({
|
|
50
|
+
description: 'Component Type (e.g. classic)',
|
|
51
|
+
char: 't',
|
|
52
|
+
}),
|
|
53
|
+
componentName: core_1.Flags.string({
|
|
54
|
+
description: 'Component Name (e.g. google_alert_ingestion)',
|
|
55
|
+
char: 'n',
|
|
56
|
+
}),
|
|
57
|
+
logoPath: core_1.Flags.string({
|
|
58
|
+
char: 'p',
|
|
59
|
+
description: 'path or URL to product logo in PNG format.',
|
|
60
|
+
}),
|
|
61
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=logo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo.js","sourceRoot":"","sources":["../../../src/commands/component/logo.ts"],"names":[],"mappings":";;;;AAAA,sCAAqC;AACrC,kDAA8C;AAC9C,wCAAkC;AAClC,gEAA+B;AAC/B,yCAAuC;AAEvC,yCAAqE;AAGrE,qCAAqC;AACrC,MAAa,IAAK,SAAQ,WAAI;IAyB1B,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAEtC,IAAI,EAAC,SAAS,EAAC,GAAG,KAAK,CAAA;QACvB,SAAS,GAAG,IAAA,mBAAO,EAAC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QAE/C,MAAM,eAAe,GAAG;YACtB;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,UAAU;gBAChB,OAAO,EAAE,mCAAmC;aAC7C;SACF,CAAA;QAED,MAAM,qBAAqB,GAAG,MAAM,IAAA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AA+B;QAC5C,IAAI,EAAE,GAAG;KACV,CAAC;IACF,aAAa,EAAE,YAAK,CAAC,MAAM,CAAC;QAC1B,WAAW,EAAE,8CAA8C;QAC3D,IAAI,EAAE,GAAG;KACV,CAAC;IACF,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,4CAA4C;KAC1D,CAAC;IACF,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;CAC9B,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Base } from '@sw-tsdk/core';
|
|
2
|
+
export declare class Logo extends Base {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
directory: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
|
+
componentType: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
componentName: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
sspPath: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Logo = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const core_2 = require("@sw-tsdk/core");
|
|
7
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
8
|
+
const fs = tslib_1.__importStar(require("node:fs"));
|
|
9
|
+
const path = tslib_1.__importStar(require("node:path"));
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
|
+
const common_1 = require("../../common");
|
|
12
|
+
// noinspection JSUnusedGlobalSymbols
|
|
13
|
+
class Logo extends core_2.Base {
|
|
14
|
+
async run() {
|
|
15
|
+
const { flags } = await this.parse(Logo);
|
|
16
|
+
let { directory } = flags;
|
|
17
|
+
directory = (0, node_path_1.resolve)(directory || process.cwd());
|
|
18
|
+
const masterQuestions = [
|
|
19
|
+
{
|
|
20
|
+
type: 'input',
|
|
21
|
+
name: 'sspPath',
|
|
22
|
+
message: 'Absolute path to .SSP file',
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
const componentTypeSelected = await (0, common_1.chooseComponentType)();
|
|
26
|
+
const componentNameSelected = await (0, common_1.chooseComponentName)(directory, componentTypeSelected);
|
|
27
|
+
const filteredQuestions = masterQuestions.filter(q => !flags[q.name]);
|
|
28
|
+
const answers = Object.assign(await inquirer_1.default.prompt(filteredQuestions), flags);
|
|
29
|
+
const componentDirectory = (0, node_path_1.join)(directory, componentTypeSelected, componentNameSelected);
|
|
30
|
+
if (answers.sspPath?.endsWith('.ssp')) {
|
|
31
|
+
core_1.ux.action.start('Processing SSP File');
|
|
32
|
+
const destinationPath = path.join(componentDirectory, `${componentNameSelected}.ssp`);
|
|
33
|
+
await fs.promises.copyFile(answers.sspPath, destinationPath);
|
|
34
|
+
core_1.ux.action.stop();
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
this.error('Invalid ssp file provided');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.Logo = Logo;
|
|
42
|
+
Logo.description = 'Update an SSP.';
|
|
43
|
+
Logo.flags = {
|
|
44
|
+
...core_2.Base.flags,
|
|
45
|
+
directory: core_1.Flags.string({
|
|
46
|
+
char: 'd',
|
|
47
|
+
description: 'root directory of the component folder.',
|
|
48
|
+
default: './',
|
|
49
|
+
}),
|
|
50
|
+
componentType: core_1.Flags.string({
|
|
51
|
+
description: 'Component Type (e.g. classic)',
|
|
52
|
+
char: 't',
|
|
53
|
+
}),
|
|
54
|
+
componentName: core_1.Flags.string({
|
|
55
|
+
description: 'Component Name (e.g. google_alert_ingestion)',
|
|
56
|
+
char: 'n',
|
|
57
|
+
}),
|
|
58
|
+
sspPath: core_1.Flags.string({
|
|
59
|
+
char: 'p',
|
|
60
|
+
description: 'Absolute path to .SSP file',
|
|
61
|
+
}),
|
|
62
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=ssp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssp.js","sourceRoot":"","sources":["../../../src/commands/component/ssp.ts"],"names":[],"mappings":";;;;AAAA,sCAAqC;AACrC,wCAAkC;AAClC,gEAA+B;AAC/B,oDAA6B;AAC7B,wDAAiC;AACjC,yCAAuC;AACvC,yCAAqE;AAGrE,qCAAqC;AACrC,MAAa,IAAK,SAAQ,WAAI;IAyB5B,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAEtC,IAAI,EAAC,SAAS,EAAC,GAAG,KAAK,CAAA;QACvB,SAAS,GAAG,IAAA,mBAAO,EAAC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QAE/C,MAAM,eAAe,GAAG;YACtB;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,4BAA4B;aACtC;SACF,CAAA;QAED,MAAM,qBAAqB,GAAG,MAAM,IAAA,4BAAmB,GAAE,CAAA;QACzD,MAAM,qBAAqB,GAAG,MAAM,IAAA,4BAAmB,EAAC,SAAS,EAAE,qBAAqB,CAAC,CAAA;QACzF,MAAM,iBAAiB,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAE,KAA6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KAC1C,CAAC;IACF,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;CAC9B,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Base } from '@sw-tsdk/core';
|
|
2
|
+
export declare class Update extends Base {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
directory: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
|
+
version: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
componentType: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
componentName: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
manifestPath: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Update = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const core_2 = require("@sw-tsdk/core");
|
|
7
|
+
const fs_extra_1 = require("fs-extra");
|
|
8
|
+
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
9
|
+
const fs = tslib_1.__importStar(require("node:fs"));
|
|
10
|
+
const node_fs_1 = require("node:fs");
|
|
11
|
+
const node_path_1 = require("node:path");
|
|
12
|
+
// noinspection JSUnusedGlobalSymbols
|
|
13
|
+
class Update extends core_2.Base {
|
|
14
|
+
async run() {
|
|
15
|
+
const { flags } = await this.parse(Update);
|
|
16
|
+
let { directory, manifestPath } = flags;
|
|
17
|
+
const { version } = flags;
|
|
18
|
+
directory = (0, node_path_1.resolve)(directory || process.cwd());
|
|
19
|
+
// remove relative dir notation if provided
|
|
20
|
+
if (manifestPath.startsWith('.')) {
|
|
21
|
+
manifestPath = manifestPath.slice(1);
|
|
22
|
+
}
|
|
23
|
+
manifestPath = (0, node_path_1.join)(directory, manifestPath);
|
|
24
|
+
try {
|
|
25
|
+
await node_fs_1.promises.access(manifestPath);
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
this.error(`Could not access ${manifestPath}`);
|
|
29
|
+
}
|
|
30
|
+
core_1.ux.action.start('Updating Component');
|
|
31
|
+
const manifest = js_yaml_1.default.load(await fs.promises.readFile(manifestPath, 'utf8'));
|
|
32
|
+
// For now, version is supplied.
|
|
33
|
+
if (version) {
|
|
34
|
+
manifest.version = version;
|
|
35
|
+
}
|
|
36
|
+
await (0, fs_extra_1.writeFile)(manifestPath, js_yaml_1.default.dump(manifest, { indent: 2 }), { flag: 'w' });
|
|
37
|
+
core_1.ux.action.stop();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.Update = Update;
|
|
41
|
+
Update.description = 'Update Component Version.';
|
|
42
|
+
Update.flags = {
|
|
43
|
+
...core_2.Base.flags,
|
|
44
|
+
directory: core_1.Flags.string({
|
|
45
|
+
char: 'd',
|
|
46
|
+
description: 'root directory of the all Components',
|
|
47
|
+
default: '.',
|
|
48
|
+
}),
|
|
49
|
+
version: core_1.Flags.string({
|
|
50
|
+
char: 'v',
|
|
51
|
+
description: 'new version of the component.',
|
|
52
|
+
}),
|
|
53
|
+
componentType: core_1.Flags.string({
|
|
54
|
+
description: 'Component Type (e.g. classic)',
|
|
55
|
+
char: 't',
|
|
56
|
+
}),
|
|
57
|
+
componentName: core_1.Flags.string({
|
|
58
|
+
description: 'Component Name (e.g. google_alert_ingestion)',
|
|
59
|
+
char: 'n',
|
|
60
|
+
}),
|
|
61
|
+
manifestPath: core_1.Flags.string({
|
|
62
|
+
char: 'f',
|
|
63
|
+
description: 'Component manifest path relative to directory.',
|
|
64
|
+
default: 'manifest.yml',
|
|
65
|
+
}),
|
|
66
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/component/update.ts"],"names":[],"mappings":";;;;AAAA,sCAAqC;AACrC,wCAAkC;AAClC,uCAAkC;AAClC,8DAA0B;AAC1B,oDAA6B;AAC7B,qCAAgC;AAChC,yCAAuC;AAEvC,qCAAqC;AACrC,MAAa,MAAO,SAAQ,WAAI;IA8B9B,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;QAExC,IAAI,EAAC,SAAS,EAAE,YAAY,EAAC,GAAG,KAAK,CAAA;QACrC,MAAM,EAAC,OAAO,EAAC,GAAG,KAAK,CAAA;QACvB,SAAS,GAAG,IAAA,mBAAO,EAAC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QAE/C,2CAA2C;QAC3C,IAAI,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YAChC,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;SACrC;QAED,YAAY,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,YAAY,CAAC,CAAA;QAC5C,IAAI;YACF,MAAM,kBAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;SACpC;QAAC,MAAM;YACN,IAAI,CAAC,KAAK,CAAC,oBAAoB,YAAY,EAAE,CAAC,CAAA;SAC/C;QAED,SAAE,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAA;QACrC,MA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.Base {
|
|
|
165
165
|
await (0, fs_extra_1.writeFile)((0, node_path_1.join)(connectorDirectory, 'docs', 'external.yml'), '', 'utf8');
|
|
166
166
|
await (0, fs_extra_1.writeFile)((0, node_path_1.join)(connectorDirectory, 'docs', 'EXTERNAL_README.md'), 'Description will be updated shortly.', 'utf8');
|
|
167
167
|
// process logo and write to file.
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
core_1.ux.action.start('Processing Logo');
|
|
169
|
+
try {
|
|
170
|
+
if (!answers.logoPath) {
|
|
171
|
+
throw new Error('Invalid image path.');
|
|
172
|
+
}
|
|
170
173
|
await (0, connector_1.updateImage)(connectorDirectory, answers.logoPath);
|
|
171
|
-
core_1.ux.action.stop();
|
|
172
174
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
+
catch (error) {
|
|
176
|
+
await (0, fs_extra_1.remove)(connectorDirectory);
|
|
177
|
+
core_1.ux.action.stop();
|
|
178
|
+
return this.error(`${error.message}`);
|
|
175
179
|
}
|
|
176
180
|
core_1.ux.action.stop();
|
|
181
|
+
core_1.ux.action.stop();
|
|
177
182
|
}
|
|
178
183
|
}
|
|
179
184
|
exports.Create = Create;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/connector/create.ts"],"names":[],"mappings":";;;;AAAA,sCAAqC;AACrC,wCAAkC;AAClC,yCAAuC;AACvC,qCAAgC;AAChC,kDAA+D;AAC/D,gEAA+B;AAC/B,yCAAoE;AACpE,yEAAqF;AAErF,uCAAmE;AACnE,8DAA0B;AAC1B,2CAAoC;AACpC,2CAAkC;AAElC,qCAAqC;AACrC,MAAa,MAAO,SAAQ,WAAI;IA4B9B,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;QAExC,IAAI,EAAC,SAAS,EAAC,GAAG,KAAK,CAAA;QACvB,SAAS,GAAG,IAAA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AE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,wBAAwB,EAAC,CAAC;IAClE,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,8BAA8B,EAAC,CAAC;IACrE,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;IAC7B,qBAAqB,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,+CAA+C,EAAC,CAAC;CACpG,CAAA"}
|
|
@@ -13,7 +13,16 @@ class Logo extends core_2.Base {
|
|
|
13
13
|
const { path } = flags;
|
|
14
14
|
directory = (0, node_path_1.resolve)(directory || process.cwd());
|
|
15
15
|
core_1.ux.action.start('Updating Logo');
|
|
16
|
-
|
|
16
|
+
try {
|
|
17
|
+
if (!path) {
|
|
18
|
+
throw new Error('Invalid image path.');
|
|
19
|
+
}
|
|
20
|
+
await (0, connector_1.updateImage)(directory, path);
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
core_1.ux.action.stop();
|
|
24
|
+
return this.error(`${error.message}`);
|
|
25
|
+
}
|
|
17
26
|
core_1.ux.action.stop();
|
|
18
27
|
}
|
|
19
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo.js","sourceRoot":"","sources":["../../../src/commands/connector/logo.ts"],"names":[],"mappings":";;;AAAA,sCAAqC;AACrC,wCAAkC;AAClC,yCAAiC;AACjC,kDAA8C;AAE9C,qCAAqC;AACrC,MAAa,IAAK,SAAQ,WAAI;IAkB5B,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAEtC,IAAI,EAAC,SAAS,EAAC,GAAG,KAAK,CAAA;QACvB,MAAM,EAAC,IAAI,EAAC,GAAG,KAAK,CAAA;QAEpB,SAAS,GAAG,IAAA,mBAAO,EAAC,SAAS,IAAI,OA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,EAAE,GAAG;QACT,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,GAAG;KACb,CAAC;IACF,IAAI,EAAE,YAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,4CAA4C;QACzD,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;CAC9B,CAAA"}
|
package/lib/common.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export declare function chooseAction(directory: string): Promise<string>;
|
|
2
|
+
export declare function chooseComponentName(directory: string, componentType: string): Promise<string>;
|
|
3
|
+
export declare function chooseComponentType(): Promise<string>;
|
|
2
4
|
export declare function chooseAsset(directory: string): Promise<string>;
|
|
3
5
|
export declare const connectorCategories: string[];
|
|
6
|
+
export declare const contentCategories: string[];
|
|
4
7
|
export declare const connectorTemplates: string[];
|
package/lib/common.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.connectorTemplates = exports.connectorCategories = exports.chooseAsset = exports.chooseAction = void 0;
|
|
3
|
+
exports.connectorTemplates = exports.contentCategories = exports.connectorCategories = exports.chooseAsset = exports.chooseComponentType = exports.chooseComponentName = exports.chooseAction = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const connector_1 = require("@sw-tsdk/connector");
|
|
5
6
|
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
6
7
|
const inquirer_autocomplete_prompt_1 = tslib_1.__importDefault(require("inquirer-autocomplete-prompt"));
|
|
7
|
-
const
|
|
8
|
+
const fs = tslib_1.__importStar(require("node:fs"));
|
|
9
|
+
const node_path_1 = tslib_1.__importDefault(require("node:path"));
|
|
8
10
|
async function chooseAction(directory) {
|
|
9
11
|
inquirer_1.default.registerPrompt('autocomplete', inquirer_autocomplete_prompt_1.default);
|
|
10
12
|
const manifests = await (0, connector_1.allManifests)(directory);
|
|
@@ -24,6 +26,57 @@ async function chooseAction(directory) {
|
|
|
24
26
|
return answers.name;
|
|
25
27
|
}
|
|
26
28
|
exports.chooseAction = chooseAction;
|
|
29
|
+
async function getFoldersInDirectory(directoryPath) {
|
|
30
|
+
try {
|
|
31
|
+
const filesAndFolders = await fs.promises.readdir(directoryPath);
|
|
32
|
+
// Filter out only directories
|
|
33
|
+
const folderPromises = filesAndFolders.map(async (item) => {
|
|
34
|
+
const fullPath = `${directoryPath}/${item}`;
|
|
35
|
+
const stats = await fs.promises.stat(fullPath);
|
|
36
|
+
if (stats.isDirectory()) {
|
|
37
|
+
return item;
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
});
|
|
41
|
+
const folders = await Promise.all(folderPromises);
|
|
42
|
+
return folders.filter(folder => folder !== null).sort();
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
console.error('Error reading directory:', error);
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async function chooseComponentName(directory, componentType) {
|
|
50
|
+
inquirer_1.default.registerPrompt('autocomplete', inquirer_autocomplete_prompt_1.default);
|
|
51
|
+
const componentFolders = await getFoldersInDirectory(node_path_1.default.join(directory, componentType));
|
|
52
|
+
if (componentFolders.length === 0) {
|
|
53
|
+
throw new Error('Could not find any Component.');
|
|
54
|
+
}
|
|
55
|
+
const answers = await inquirer_1.default.prompt([
|
|
56
|
+
{
|
|
57
|
+
type: 'autocomplete',
|
|
58
|
+
name: 'name',
|
|
59
|
+
message: 'Choose a Component',
|
|
60
|
+
source: (_, input) => componentFolders.filter((r) => !input || r.includes(input)),
|
|
61
|
+
},
|
|
62
|
+
]);
|
|
63
|
+
return answers.name;
|
|
64
|
+
}
|
|
65
|
+
exports.chooseComponentName = chooseComponentName;
|
|
66
|
+
async function chooseComponentType() {
|
|
67
|
+
inquirer_1.default.registerPrompt('autocomplete', inquirer_autocomplete_prompt_1.default);
|
|
68
|
+
const ComponentTypes = exports.contentCategories;
|
|
69
|
+
const answers = await inquirer_1.default.prompt([
|
|
70
|
+
{
|
|
71
|
+
type: 'autocomplete',
|
|
72
|
+
name: 'name',
|
|
73
|
+
message: 'Choose a Component Type',
|
|
74
|
+
source: (_, input) => ComponentTypes.filter((r) => !input || r.includes(input)),
|
|
75
|
+
},
|
|
76
|
+
]);
|
|
77
|
+
return answers.name;
|
|
78
|
+
}
|
|
79
|
+
exports.chooseComponentType = chooseComponentType;
|
|
27
80
|
async function chooseAsset(directory) {
|
|
28
81
|
inquirer_1.default.registerPrompt('autocomplete', inquirer_autocomplete_prompt_1.default);
|
|
29
82
|
const manifests = await (0, connector_1.allManifests)(directory);
|
|
@@ -59,6 +112,10 @@ exports.connectorCategories = [
|
|
|
59
112
|
'Swimlane Utilities',
|
|
60
113
|
'Vulnerability & Patch Management',
|
|
61
114
|
];
|
|
115
|
+
exports.contentCategories = [
|
|
116
|
+
'classic',
|
|
117
|
+
'canvas',
|
|
118
|
+
];
|
|
62
119
|
exports.connectorTemplates = [
|
|
63
120
|
'python_311_definition',
|
|
64
121
|
'python_310_definition',
|
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,kDAA+C;AAE/C,gEAA+B;AAC/B,wGAA6D;AAC7D,oDAA6B;AAC7B,kEAA4B;AAErB,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,OA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jBD,kCAiBC;AAEY,QAAA,mBAAmB,GAAG;IACjC,gBAAgB;IAChB,0BAA0B;IAC1B,2BAA2B;IAC3B,+BAA+B;IAC/B,uCAAuC;IACvC,+BAA+B;IAC/B,wBAAwB;IACxB,gCAAgC;IAChC,8BAA8B;IAC9B,8BAA8B;IAC9B,8BAA8B;IAC9B,8BAA8B;IAC9B,eAAe;IACf,+BAA+B;IAC/B,uBAAuB;IACvB,oBAAoB;IACpB,kCAAkC;CACnC,CAAA;AAEY,QAAA,iBAAiB,GAAG;IAC/B,SAAS;IACT,QAAQ;CACT,CAAA;AAEY,QAAA,kBAAkB,GAAG;IAChC,uBAAuB;IACvB,uBAAuB;IACvB,SAAS;IACT,SAAS;IACT,oBAAoB;CACrB,CAAA"}
|
|
@@ -16,6 +16,26 @@ export type ConnectorQuestions = {
|
|
|
16
16
|
homepage: string;
|
|
17
17
|
aspirationalConnector: string;
|
|
18
18
|
};
|
|
19
|
+
export type ComponentQuestions = {
|
|
20
|
+
componentType: string;
|
|
21
|
+
vendor: string;
|
|
22
|
+
componentName: string;
|
|
23
|
+
description: string;
|
|
24
|
+
logoPath?: string;
|
|
25
|
+
sspPath?: string;
|
|
26
|
+
author: string;
|
|
27
|
+
authorEmail: string;
|
|
28
|
+
homepage: string;
|
|
29
|
+
keywords: string;
|
|
30
|
+
};
|
|
31
|
+
export type ComponentLogoInfo = {
|
|
32
|
+
componentType: string;
|
|
33
|
+
logoPath: string;
|
|
34
|
+
};
|
|
35
|
+
export type ComponentSSPInfo = {
|
|
36
|
+
componentType: string;
|
|
37
|
+
sspPath: string;
|
|
38
|
+
};
|
|
19
39
|
export type ActionQuestions = {
|
|
20
40
|
title: string;
|
|
21
41
|
method?: string;
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.
|
|
2
|
+
"version": "2.18.0",
|
|
3
3
|
"commands": {
|
|
4
4
|
"action:add": {
|
|
5
5
|
"id": "action:add",
|
|
@@ -82,6 +82,245 @@
|
|
|
82
82
|
},
|
|
83
83
|
"args": {}
|
|
84
84
|
},
|
|
85
|
+
"component:create": {
|
|
86
|
+
"id": "component:create",
|
|
87
|
+
"description": "Scaffold a new Component",
|
|
88
|
+
"strict": true,
|
|
89
|
+
"pluginName": "@sw-tsdk/plugin-connector",
|
|
90
|
+
"pluginAlias": "@sw-tsdk/plugin-connector",
|
|
91
|
+
"pluginType": "core",
|
|
92
|
+
"aliases": [],
|
|
93
|
+
"flags": {
|
|
94
|
+
"directory": {
|
|
95
|
+
"name": "directory",
|
|
96
|
+
"type": "option",
|
|
97
|
+
"char": "d",
|
|
98
|
+
"description": "root directory for where to store Component.",
|
|
99
|
+
"multiple": false,
|
|
100
|
+
"default": "./"
|
|
101
|
+
},
|
|
102
|
+
"componentType": {
|
|
103
|
+
"name": "componentType",
|
|
104
|
+
"type": "option",
|
|
105
|
+
"description": "Component Type (e.g. classic)",
|
|
106
|
+
"multiple": false
|
|
107
|
+
},
|
|
108
|
+
"vendor": {
|
|
109
|
+
"name": "vendor",
|
|
110
|
+
"type": "option",
|
|
111
|
+
"description": "Vendor (e.g. CrowdStrike)",
|
|
112
|
+
"multiple": false
|
|
113
|
+
},
|
|
114
|
+
"componentName": {
|
|
115
|
+
"name": "componentName",
|
|
116
|
+
"type": "option",
|
|
117
|
+
"description": "Component Name (e.g. Alert Ingestion)",
|
|
118
|
+
"multiple": false
|
|
119
|
+
},
|
|
120
|
+
"keywords": {
|
|
121
|
+
"name": "keywords",
|
|
122
|
+
"type": "option",
|
|
123
|
+
"description": "Enter keywords",
|
|
124
|
+
"multiple": false
|
|
125
|
+
},
|
|
126
|
+
"description": {
|
|
127
|
+
"name": "description",
|
|
128
|
+
"type": "option",
|
|
129
|
+
"description": "Description (e.g. CrowdStrike Alert Ingestion Component)",
|
|
130
|
+
"multiple": false
|
|
131
|
+
},
|
|
132
|
+
"logoPath": {
|
|
133
|
+
"name": "logoPath",
|
|
134
|
+
"type": "option",
|
|
135
|
+
"description": "URL or absolute path to logo file",
|
|
136
|
+
"multiple": false
|
|
137
|
+
},
|
|
138
|
+
"sspPath": {
|
|
139
|
+
"name": "sspPath",
|
|
140
|
+
"type": "option",
|
|
141
|
+
"description": "absolute path to .ssp file",
|
|
142
|
+
"multiple": false
|
|
143
|
+
},
|
|
144
|
+
"author": {
|
|
145
|
+
"name": "author",
|
|
146
|
+
"type": "option",
|
|
147
|
+
"description": "Component Author",
|
|
148
|
+
"multiple": false
|
|
149
|
+
},
|
|
150
|
+
"authorEmail": {
|
|
151
|
+
"name": "authorEmail",
|
|
152
|
+
"type": "option",
|
|
153
|
+
"description": "Component Author Email",
|
|
154
|
+
"multiple": false
|
|
155
|
+
},
|
|
156
|
+
"homepage": {
|
|
157
|
+
"name": "homepage",
|
|
158
|
+
"type": "option",
|
|
159
|
+
"description": "Component Author Support URL",
|
|
160
|
+
"multiple": false
|
|
161
|
+
},
|
|
162
|
+
"help": {
|
|
163
|
+
"name": "help",
|
|
164
|
+
"type": "boolean",
|
|
165
|
+
"char": "h",
|
|
166
|
+
"description": "Show CLI help.",
|
|
167
|
+
"allowNo": false
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"args": {}
|
|
171
|
+
},
|
|
172
|
+
"component:logo": {
|
|
173
|
+
"id": "component:logo",
|
|
174
|
+
"description": "Update a Component logo.",
|
|
175
|
+
"strict": true,
|
|
176
|
+
"pluginName": "@sw-tsdk/plugin-connector",
|
|
177
|
+
"pluginAlias": "@sw-tsdk/plugin-connector",
|
|
178
|
+
"pluginType": "core",
|
|
179
|
+
"aliases": [],
|
|
180
|
+
"flags": {
|
|
181
|
+
"directory": {
|
|
182
|
+
"name": "directory",
|
|
183
|
+
"type": "option",
|
|
184
|
+
"char": "d",
|
|
185
|
+
"description": "root directory of the component folder.",
|
|
186
|
+
"multiple": false,
|
|
187
|
+
"default": "./"
|
|
188
|
+
},
|
|
189
|
+
"componentType": {
|
|
190
|
+
"name": "componentType",
|
|
191
|
+
"type": "option",
|
|
192
|
+
"char": "t",
|
|
193
|
+
"description": "Component Type (e.g. classic)",
|
|
194
|
+
"multiple": false
|
|
195
|
+
},
|
|
196
|
+
"componentName": {
|
|
197
|
+
"name": "componentName",
|
|
198
|
+
"type": "option",
|
|
199
|
+
"char": "n",
|
|
200
|
+
"description": "Component Name (e.g. google_alert_ingestion)",
|
|
201
|
+
"multiple": false
|
|
202
|
+
},
|
|
203
|
+
"logoPath": {
|
|
204
|
+
"name": "logoPath",
|
|
205
|
+
"type": "option",
|
|
206
|
+
"char": "p",
|
|
207
|
+
"description": "path or URL to product logo in PNG format.",
|
|
208
|
+
"multiple": false
|
|
209
|
+
},
|
|
210
|
+
"help": {
|
|
211
|
+
"name": "help",
|
|
212
|
+
"type": "boolean",
|
|
213
|
+
"char": "h",
|
|
214
|
+
"description": "Show CLI help.",
|
|
215
|
+
"allowNo": false
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"args": {}
|
|
219
|
+
},
|
|
220
|
+
"component:ssp": {
|
|
221
|
+
"id": "component:ssp",
|
|
222
|
+
"description": "Update an SSP.",
|
|
223
|
+
"strict": true,
|
|
224
|
+
"pluginName": "@sw-tsdk/plugin-connector",
|
|
225
|
+
"pluginAlias": "@sw-tsdk/plugin-connector",
|
|
226
|
+
"pluginType": "core",
|
|
227
|
+
"aliases": [],
|
|
228
|
+
"flags": {
|
|
229
|
+
"directory": {
|
|
230
|
+
"name": "directory",
|
|
231
|
+
"type": "option",
|
|
232
|
+
"char": "d",
|
|
233
|
+
"description": "root directory of the component folder.",
|
|
234
|
+
"multiple": false,
|
|
235
|
+
"default": "./"
|
|
236
|
+
},
|
|
237
|
+
"componentType": {
|
|
238
|
+
"name": "componentType",
|
|
239
|
+
"type": "option",
|
|
240
|
+
"char": "t",
|
|
241
|
+
"description": "Component Type (e.g. classic)",
|
|
242
|
+
"multiple": false
|
|
243
|
+
},
|
|
244
|
+
"componentName": {
|
|
245
|
+
"name": "componentName",
|
|
246
|
+
"type": "option",
|
|
247
|
+
"char": "n",
|
|
248
|
+
"description": "Component Name (e.g. google_alert_ingestion)",
|
|
249
|
+
"multiple": false
|
|
250
|
+
},
|
|
251
|
+
"sspPath": {
|
|
252
|
+
"name": "sspPath",
|
|
253
|
+
"type": "option",
|
|
254
|
+
"char": "p",
|
|
255
|
+
"description": "Absolute path to .SSP file",
|
|
256
|
+
"multiple": false
|
|
257
|
+
},
|
|
258
|
+
"help": {
|
|
259
|
+
"name": "help",
|
|
260
|
+
"type": "boolean",
|
|
261
|
+
"char": "h",
|
|
262
|
+
"description": "Show CLI help.",
|
|
263
|
+
"allowNo": false
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"args": {}
|
|
267
|
+
},
|
|
268
|
+
"component:update": {
|
|
269
|
+
"id": "component:update",
|
|
270
|
+
"description": "Update Component Version.",
|
|
271
|
+
"strict": true,
|
|
272
|
+
"pluginName": "@sw-tsdk/plugin-connector",
|
|
273
|
+
"pluginAlias": "@sw-tsdk/plugin-connector",
|
|
274
|
+
"pluginType": "core",
|
|
275
|
+
"aliases": [],
|
|
276
|
+
"flags": {
|
|
277
|
+
"directory": {
|
|
278
|
+
"name": "directory",
|
|
279
|
+
"type": "option",
|
|
280
|
+
"char": "d",
|
|
281
|
+
"description": "root directory of the all Components",
|
|
282
|
+
"multiple": false,
|
|
283
|
+
"default": "."
|
|
284
|
+
},
|
|
285
|
+
"version": {
|
|
286
|
+
"name": "version",
|
|
287
|
+
"type": "option",
|
|
288
|
+
"char": "v",
|
|
289
|
+
"description": "new version of the component.",
|
|
290
|
+
"multiple": false
|
|
291
|
+
},
|
|
292
|
+
"componentType": {
|
|
293
|
+
"name": "componentType",
|
|
294
|
+
"type": "option",
|
|
295
|
+
"char": "t",
|
|
296
|
+
"description": "Component Type (e.g. classic)",
|
|
297
|
+
"multiple": false
|
|
298
|
+
},
|
|
299
|
+
"componentName": {
|
|
300
|
+
"name": "componentName",
|
|
301
|
+
"type": "option",
|
|
302
|
+
"char": "n",
|
|
303
|
+
"description": "Component Name (e.g. google_alert_ingestion)",
|
|
304
|
+
"multiple": false
|
|
305
|
+
},
|
|
306
|
+
"manifestPath": {
|
|
307
|
+
"name": "manifestPath",
|
|
308
|
+
"type": "option",
|
|
309
|
+
"char": "f",
|
|
310
|
+
"description": "Component manifest path relative to directory.",
|
|
311
|
+
"multiple": false,
|
|
312
|
+
"default": "manifest.yml"
|
|
313
|
+
},
|
|
314
|
+
"help": {
|
|
315
|
+
"name": "help",
|
|
316
|
+
"type": "boolean",
|
|
317
|
+
"char": "h",
|
|
318
|
+
"description": "Show CLI help.",
|
|
319
|
+
"allowNo": false
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"args": {}
|
|
323
|
+
},
|
|
85
324
|
"connector:build": {
|
|
86
325
|
"id": "connector:build",
|
|
87
326
|
"description": "Builds a local docker image of the connector.",
|
package/package.json
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@apidevtools/json-schema-ref-parser": "10.1.0",
|
|
8
8
|
"@oclif/core": "2.8.5",
|
|
9
|
-
"@sw-tsdk/common": "^2.
|
|
10
|
-
"@sw-tsdk/connector": "^2.
|
|
11
|
-
"@sw-tsdk/core": "^2.
|
|
12
|
-
"@sw-tsdk/docker": "^2.
|
|
9
|
+
"@sw-tsdk/common": "^2.18.0",
|
|
10
|
+
"@sw-tsdk/connector": "^2.18.0",
|
|
11
|
+
"@sw-tsdk/core": "^2.18.0",
|
|
12
|
+
"@sw-tsdk/docker": "^2.18.0",
|
|
13
13
|
"@swimlane/connector-interfaces": "1.11.0",
|
|
14
14
|
"@swimlane/cosign": "1.4.1",
|
|
15
15
|
"@swimlane/docker-reference": "2.0.1",
|
|
@@ -89,6 +89,6 @@
|
|
|
89
89
|
"posttest": "yarn lint",
|
|
90
90
|
"dev:setup": "npm link"
|
|
91
91
|
},
|
|
92
|
-
"version": "2.
|
|
93
|
-
"gitHead": "
|
|
92
|
+
"version": "2.18.0",
|
|
93
|
+
"gitHead": "e6a84357aa223deda77b786a7633c63b0d9c7158"
|
|
94
94
|
}
|