@sw-tsdk/plugin-connector 3.6.0 → 3.8.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 +62 -55
- package/lib/commands/component/create.js +17 -4
- package/lib/commands/component/create.js.map +1 -1
- package/lib/commands/component/{logo.d.ts → image.d.ts} +3 -2
- package/lib/commands/component/{logo.js → image.js} +27 -16
- package/lib/commands/component/image.js.map +1 -0
- package/lib/commands/component/ssp.js +2 -2
- package/lib/commands/component/ssp.js.map +1 -1
- package/lib/commands/connector/create.js +19 -1
- package/lib/commands/connector/create.js.map +1 -1
- package/lib/commands/description/component.js +2 -2
- package/lib/commands/description/component.js.map +1 -1
- package/lib/commands/playbook/create.js +16 -3
- package/lib/commands/playbook/create.js.map +1 -1
- package/lib/commands/playbook/{logo.d.ts → image.d.ts} +3 -2
- package/lib/commands/playbook/{logo.js → image.js} +27 -17
- package/lib/commands/playbook/image.js.map +1 -0
- package/lib/commands/playbook/ssp.js +1 -1
- package/lib/commands/playbook/ssp.js.map +1 -1
- package/lib/commands/solution/create.js +8 -3
- package/lib/commands/solution/create.js.map +1 -1
- package/lib/commands/solution/{logo.d.ts → image.d.ts} +3 -2
- package/lib/commands/solution/{logo.js → image.js} +30 -19
- package/lib/commands/solution/image.js.map +1 -0
- package/lib/commands/solution/ssp.js +2 -2
- package/lib/commands/solution/ssp.js.map +1 -1
- package/lib/common.d.ts +10 -3
- package/lib/common.js +23 -13
- package/lib/common.js.map +1 -1
- package/lib/types/connector-types.d.ts +6 -5
- package/oclif.manifest.json +48 -27
- package/package.json +6 -6
- package/lib/commands/component/logo.js.map +0 -1
- package/lib/commands/playbook/logo.js.map +0 -1
- package/lib/commands/solution/logo.js.map +0 -1
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/3.
|
|
19
|
+
@sw-tsdk/plugin-connector/3.8.0 linux-x64 node-v16.20.2
|
|
20
20
|
$ sw-tsdk-connector --help [COMMAND]
|
|
21
21
|
USAGE
|
|
22
22
|
$ sw-tsdk-connector COMMAND
|
|
@@ -32,7 +32,7 @@ USAGE
|
|
|
32
32
|
* [`sw-tsdk-connector action:run:local`](#sw-tsdk-connector-actionrunlocal)
|
|
33
33
|
* [`sw-tsdk-connector asset:add`](#sw-tsdk-connector-assetadd)
|
|
34
34
|
* [`sw-tsdk-connector component:create`](#sw-tsdk-connector-componentcreate)
|
|
35
|
-
* [`sw-tsdk-connector component:
|
|
35
|
+
* [`sw-tsdk-connector component:image`](#sw-tsdk-connector-componentimage)
|
|
36
36
|
* [`sw-tsdk-connector component:ssp`](#sw-tsdk-connector-componentssp)
|
|
37
37
|
* [`sw-tsdk-connector connector:build`](#sw-tsdk-connector-connectorbuild)
|
|
38
38
|
* [`sw-tsdk-connector connector:create`](#sw-tsdk-connector-connectorcreate)
|
|
@@ -48,10 +48,10 @@ USAGE
|
|
|
48
48
|
* [`sw-tsdk-connector description:component`](#sw-tsdk-connector-descriptioncomponent)
|
|
49
49
|
* [`sw-tsdk-connector description:connector`](#sw-tsdk-connector-descriptionconnector)
|
|
50
50
|
* [`sw-tsdk-connector playbook:create`](#sw-tsdk-connector-playbookcreate)
|
|
51
|
-
* [`sw-tsdk-connector playbook:
|
|
51
|
+
* [`sw-tsdk-connector playbook:image`](#sw-tsdk-connector-playbookimage)
|
|
52
52
|
* [`sw-tsdk-connector playbook:ssp`](#sw-tsdk-connector-playbookssp)
|
|
53
53
|
* [`sw-tsdk-connector solution:create`](#sw-tsdk-connector-solutioncreate)
|
|
54
|
-
* [`sw-tsdk-connector solution:
|
|
54
|
+
* [`sw-tsdk-connector solution:image`](#sw-tsdk-connector-solutionimage)
|
|
55
55
|
* [`sw-tsdk-connector solution:ssp`](#sw-tsdk-connector-solutionssp)
|
|
56
56
|
|
|
57
57
|
## `sw-tsdk-connector action:add`
|
|
@@ -72,7 +72,7 @@ DESCRIPTION
|
|
|
72
72
|
Update a connector action.
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
_See code: [lib/commands/action/add.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
75
|
+
_See code: [lib/commands/action/add.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/action/add.js)_
|
|
76
76
|
|
|
77
77
|
## `sw-tsdk-connector action:generate:data`
|
|
78
78
|
|
|
@@ -97,7 +97,7 @@ DESCRIPTION
|
|
|
97
97
|
Use to test a task in an integration
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
_See code: [lib/commands/action/generate/data.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
100
|
+
_See code: [lib/commands/action/generate/data.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/action/generate/data.js)_
|
|
101
101
|
|
|
102
102
|
## `sw-tsdk-connector action:generate:input`
|
|
103
103
|
|
|
@@ -122,7 +122,7 @@ DESCRIPTION
|
|
|
122
122
|
Update action input schema.
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
_See code: [lib/commands/action/generate/input.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
125
|
+
_See code: [lib/commands/action/generate/input.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/action/generate/input.js)_
|
|
126
126
|
|
|
127
127
|
## `sw-tsdk-connector action:generate:output`
|
|
128
128
|
|
|
@@ -146,7 +146,7 @@ DESCRIPTION
|
|
|
146
146
|
Update a connector action.
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
_See code: [lib/commands/action/generate/output.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
149
|
+
_See code: [lib/commands/action/generate/output.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/action/generate/output.js)_
|
|
150
150
|
|
|
151
151
|
## `sw-tsdk-connector action:run:local`
|
|
152
152
|
|
|
@@ -175,7 +175,7 @@ DESCRIPTION
|
|
|
175
175
|
Runs a connector action. (Defaults to current image version in local repository).
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
_See code: [lib/commands/action/run/local.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
178
|
+
_See code: [lib/commands/action/run/local.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/action/run/local.js)_
|
|
179
179
|
|
|
180
180
|
## `sw-tsdk-connector asset:add`
|
|
181
181
|
|
|
@@ -196,7 +196,7 @@ DESCRIPTION
|
|
|
196
196
|
Update a connector action.
|
|
197
197
|
```
|
|
198
198
|
|
|
199
|
-
_See code: [lib/commands/asset/add.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
199
|
+
_See code: [lib/commands/asset/add.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/asset/add.js)_
|
|
200
200
|
|
|
201
201
|
## `sw-tsdk-connector component:create`
|
|
202
202
|
|
|
@@ -220,8 +220,9 @@ FLAGS
|
|
|
220
220
|
--description=<value> Description (e.g. CrowdStrike Alert Ingestion Component)
|
|
221
221
|
--homepage=<value> Component Author Support URL
|
|
222
222
|
--keywords=<value> Enter keywords
|
|
223
|
-
--logoPath=<value> URL or absolute path to logo file
|
|
224
|
-
|
|
223
|
+
--logoPath=<value> URL or absolute path to logo file. Image should be in 1:1 aspect ratio and min
|
|
224
|
+
resolution 200x200
|
|
225
|
+
--overviewImagePath=<value> URL or absolute path to overview image file. Min resolution 1100x660
|
|
225
226
|
--sspPath=<value> absolute path to .ssp file
|
|
226
227
|
--vendor=<value> Vendor (e.g. CrowdStrike)
|
|
227
228
|
|
|
@@ -229,28 +230,29 @@ DESCRIPTION
|
|
|
229
230
|
Scaffold a new Component
|
|
230
231
|
```
|
|
231
232
|
|
|
232
|
-
_See code: [lib/commands/component/create.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
233
|
+
_See code: [lib/commands/component/create.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/component/create.js)_
|
|
233
234
|
|
|
234
|
-
## `sw-tsdk-connector component:
|
|
235
|
+
## `sw-tsdk-connector component:image`
|
|
235
236
|
|
|
236
|
-
Update a Component
|
|
237
|
+
Update a Component image.
|
|
237
238
|
|
|
238
239
|
```
|
|
239
240
|
USAGE
|
|
240
|
-
$ sw-tsdk-connector component:
|
|
241
|
+
$ sw-tsdk-connector component:image [-d <value>] [-t <value>] [-n <value>] [-i <value>] [-p <value>] [-h]
|
|
241
242
|
|
|
242
243
|
FLAGS
|
|
243
244
|
-d, --directory=<value> [default: ./] root directory of the component folder.
|
|
244
245
|
-h, --help Show CLI help.
|
|
246
|
+
-i, --imageType=<value> Image Type (e.g. logo/overview)
|
|
245
247
|
-n, --componentName=<value> Component Name (e.g. google_alert_ingestion)
|
|
246
|
-
-p, --
|
|
248
|
+
-p, --imagePath=<value> path or URL to product image in PNG format.
|
|
247
249
|
-t, --componentType=<value> Component Type (e.g. classic)
|
|
248
250
|
|
|
249
251
|
DESCRIPTION
|
|
250
|
-
Update a Component
|
|
252
|
+
Update a Component image.
|
|
251
253
|
```
|
|
252
254
|
|
|
253
|
-
_See code: [lib/commands/component/
|
|
255
|
+
_See code: [lib/commands/component/image.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/component/image.js)_
|
|
254
256
|
|
|
255
257
|
## `sw-tsdk-connector component:ssp`
|
|
256
258
|
|
|
@@ -271,7 +273,7 @@ DESCRIPTION
|
|
|
271
273
|
Update an SSP.
|
|
272
274
|
```
|
|
273
275
|
|
|
274
|
-
_See code: [lib/commands/component/ssp.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
276
|
+
_See code: [lib/commands/component/ssp.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/component/ssp.js)_
|
|
275
277
|
|
|
276
278
|
## `sw-tsdk-connector connector:build`
|
|
277
279
|
|
|
@@ -301,7 +303,7 @@ DESCRIPTION
|
|
|
301
303
|
Builds a local docker image of the connector.
|
|
302
304
|
```
|
|
303
305
|
|
|
304
|
-
_See code: [lib/commands/connector/build.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
306
|
+
_See code: [lib/commands/connector/build.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/connector/build.js)_
|
|
305
307
|
|
|
306
308
|
## `sw-tsdk-connector connector:create`
|
|
307
309
|
|
|
@@ -327,7 +329,8 @@ FLAGS
|
|
|
327
329
|
--description=<value> Description (e.g. CrowdStrike Host Query API)
|
|
328
330
|
--homepage=<value> Connector Author Support URL
|
|
329
331
|
--keywords=<value> Enter keywords (Comma-Separated)
|
|
330
|
-
--logoPath=<value> URL or absolute path to logo file
|
|
332
|
+
--logoPath=<value> URL or absolute path to logo file. Image should be in 1:1 aspect ratio and min
|
|
333
|
+
resolution 200x200
|
|
331
334
|
--product=<value> Product (e.g. Falcon)
|
|
332
335
|
--vendor=<value> Vendor (e.g. CrowdStrike)
|
|
333
336
|
|
|
@@ -335,7 +338,7 @@ DESCRIPTION
|
|
|
335
338
|
Scaffold a new connector
|
|
336
339
|
```
|
|
337
340
|
|
|
338
|
-
_See code: [lib/commands/connector/create.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
341
|
+
_See code: [lib/commands/connector/create.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/connector/create.js)_
|
|
339
342
|
|
|
340
343
|
## `sw-tsdk-connector connector:create:openapi`
|
|
341
344
|
|
|
@@ -364,7 +367,7 @@ DESCRIPTION
|
|
|
364
367
|
Scaffold a new connector
|
|
365
368
|
```
|
|
366
369
|
|
|
367
|
-
_See code: [lib/commands/connector/create/openapi.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
370
|
+
_See code: [lib/commands/connector/create/openapi.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/connector/create/openapi.js)_
|
|
368
371
|
|
|
369
372
|
## `sw-tsdk-connector connector:create:source`
|
|
370
373
|
|
|
@@ -382,7 +385,7 @@ DESCRIPTION
|
|
|
382
385
|
Generates 11x source from 10x
|
|
383
386
|
```
|
|
384
387
|
|
|
385
|
-
_See code: [lib/commands/connector/create/source.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
388
|
+
_See code: [lib/commands/connector/create/source.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/connector/create/source.js)_
|
|
386
389
|
|
|
387
390
|
## `sw-tsdk-connector connector:lint`
|
|
388
391
|
|
|
@@ -405,7 +408,7 @@ DESCRIPTION
|
|
|
405
408
|
Use to lint the connector
|
|
406
409
|
```
|
|
407
410
|
|
|
408
|
-
_See code: [lib/commands/connector/lint.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
411
|
+
_See code: [lib/commands/connector/lint.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/connector/lint.js)_
|
|
409
412
|
|
|
410
413
|
## `sw-tsdk-connector connector:logo`
|
|
411
414
|
|
|
@@ -424,7 +427,7 @@ DESCRIPTION
|
|
|
424
427
|
Update a connector.
|
|
425
428
|
```
|
|
426
429
|
|
|
427
|
-
_See code: [lib/commands/connector/logo.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
430
|
+
_See code: [lib/commands/connector/logo.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/connector/logo.js)_
|
|
428
431
|
|
|
429
432
|
## `sw-tsdk-connector connector:sign`
|
|
430
433
|
|
|
@@ -449,7 +452,7 @@ DESCRIPTION
|
|
|
449
452
|
Builds a local docker image of the connector.
|
|
450
453
|
```
|
|
451
454
|
|
|
452
|
-
_See code: [lib/commands/connector/sign.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
455
|
+
_See code: [lib/commands/connector/sign.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/connector/sign.js)_
|
|
453
456
|
|
|
454
457
|
## `sw-tsdk-connector connector:update`
|
|
455
458
|
|
|
@@ -469,7 +472,7 @@ DESCRIPTION
|
|
|
469
472
|
Update a connector.
|
|
470
473
|
```
|
|
471
474
|
|
|
472
|
-
_See code: [lib/commands/connector/update.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
475
|
+
_See code: [lib/commands/connector/update.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/connector/update.js)_
|
|
473
476
|
|
|
474
477
|
## `sw-tsdk-connector connector:validate`
|
|
475
478
|
|
|
@@ -492,7 +495,7 @@ DESCRIPTION
|
|
|
492
495
|
Use to validate an integration
|
|
493
496
|
```
|
|
494
497
|
|
|
495
|
-
_See code: [lib/commands/connector/validate.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
498
|
+
_See code: [lib/commands/connector/validate.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/connector/validate.js)_
|
|
496
499
|
|
|
497
500
|
## `sw-tsdk-connector description:action`
|
|
498
501
|
|
|
@@ -513,7 +516,7 @@ DESCRIPTION
|
|
|
513
516
|
Use to generate action description
|
|
514
517
|
```
|
|
515
518
|
|
|
516
|
-
_See code: [lib/commands/description/action.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
519
|
+
_See code: [lib/commands/description/action.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/description/action.js)_
|
|
517
520
|
|
|
518
521
|
## `sw-tsdk-connector description:actions`
|
|
519
522
|
|
|
@@ -533,7 +536,7 @@ DESCRIPTION
|
|
|
533
536
|
Use to generate description for all actions
|
|
534
537
|
```
|
|
535
538
|
|
|
536
|
-
_See code: [lib/commands/description/actions.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
539
|
+
_See code: [lib/commands/description/actions.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/description/actions.js)_
|
|
537
540
|
|
|
538
541
|
## `sw-tsdk-connector description:component`
|
|
539
542
|
|
|
@@ -556,7 +559,7 @@ DESCRIPTION
|
|
|
556
559
|
Use to generate component descriptions
|
|
557
560
|
```
|
|
558
561
|
|
|
559
|
-
_See code: [lib/commands/description/component.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
562
|
+
_See code: [lib/commands/description/component.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/description/component.js)_
|
|
560
563
|
|
|
561
564
|
## `sw-tsdk-connector description:connector`
|
|
562
565
|
|
|
@@ -576,7 +579,7 @@ DESCRIPTION
|
|
|
576
579
|
Use to generate connector descriptions
|
|
577
580
|
```
|
|
578
581
|
|
|
579
|
-
_See code: [lib/commands/description/connector.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
582
|
+
_See code: [lib/commands/description/connector.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/description/connector.js)_
|
|
580
583
|
|
|
581
584
|
## `sw-tsdk-connector playbook:create`
|
|
582
585
|
|
|
@@ -596,8 +599,9 @@ FLAGS
|
|
|
596
599
|
--description=<value> Description (e.g. Text Aggregator Description)
|
|
597
600
|
--homepage=<value> Playbook Author Support URL
|
|
598
601
|
--keywords=<value> Enter keywords
|
|
599
|
-
--logoPath=<value> URL or absolute path to logo file
|
|
600
|
-
|
|
602
|
+
--logoPath=<value> URL or absolute path to logo file. Image should be in 1:1 aspect ratio and min resolution
|
|
603
|
+
200x200
|
|
604
|
+
--overviewImagePath=<value> URL or absolute path to overview image file. Min resolution 1100x660
|
|
601
605
|
--playbookFamily=<value> Playbook Family (e.g. classic | canvas)
|
|
602
606
|
--playbookName=<value> Playbook Name (e.g. Text Aggregator)
|
|
603
607
|
--sspPath=<value> absolute path to .ssp file
|
|
@@ -606,28 +610,29 @@ DESCRIPTION
|
|
|
606
610
|
Scaffold a new playbook
|
|
607
611
|
```
|
|
608
612
|
|
|
609
|
-
_See code: [lib/commands/playbook/create.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
613
|
+
_See code: [lib/commands/playbook/create.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/playbook/create.js)_
|
|
610
614
|
|
|
611
|
-
## `sw-tsdk-connector playbook:
|
|
615
|
+
## `sw-tsdk-connector playbook:image`
|
|
612
616
|
|
|
613
|
-
Update a Playbook
|
|
617
|
+
Update a Playbook image.
|
|
614
618
|
|
|
615
619
|
```
|
|
616
620
|
USAGE
|
|
617
|
-
$ sw-tsdk-connector playbook:
|
|
621
|
+
$ sw-tsdk-connector playbook:image [-d <value>] [-t <value>] [-n <value>] [-i <value>] [-p <value>] [-h]
|
|
618
622
|
|
|
619
623
|
FLAGS
|
|
620
624
|
-d, --directory=<value> [default: ./] root directory of the playbook folder.
|
|
621
625
|
-h, --help Show CLI help.
|
|
626
|
+
-i, --imageType=<value> Image Type (e.g. logo/overview)
|
|
622
627
|
-n, --componentName=<value> Playbook Name (e.g. google_alert_ingestion)
|
|
623
|
-
-p, --
|
|
628
|
+
-p, --imagePath=<value> path or URL to product image in PNG format.
|
|
624
629
|
-t, --componentType=<value> Playbook Type (e.g. classic)
|
|
625
630
|
|
|
626
631
|
DESCRIPTION
|
|
627
|
-
Update a Playbook
|
|
632
|
+
Update a Playbook image.
|
|
628
633
|
```
|
|
629
634
|
|
|
630
|
-
_See code: [lib/commands/playbook/
|
|
635
|
+
_See code: [lib/commands/playbook/image.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/playbook/image.js)_
|
|
631
636
|
|
|
632
637
|
## `sw-tsdk-connector playbook:ssp`
|
|
633
638
|
|
|
@@ -647,7 +652,7 @@ DESCRIPTION
|
|
|
647
652
|
Update an SSP
|
|
648
653
|
```
|
|
649
654
|
|
|
650
|
-
_See code: [lib/commands/playbook/ssp.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
655
|
+
_See code: [lib/commands/playbook/ssp.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/playbook/ssp.js)_
|
|
651
656
|
|
|
652
657
|
## `sw-tsdk-connector solution:create`
|
|
653
658
|
|
|
@@ -666,8 +671,9 @@ FLAGS
|
|
|
666
671
|
--authorEmail=<value> Solution Author Email
|
|
667
672
|
--description=<value> Description (e.g. SOC Solution Description)
|
|
668
673
|
--homepage=<value> Solution Author Support URL
|
|
669
|
-
--logoPath=<value> URL or absolute path to logo file
|
|
670
|
-
|
|
674
|
+
--logoPath=<value> URL or absolute path to logo file. Image should be in 1:1 aspect ratio and min resolution
|
|
675
|
+
200x200
|
|
676
|
+
--overviewImagePath=<value> URL or absolute path to overview image file. Min resolution 1100x660
|
|
671
677
|
--solutionFamily=<value> Solution Family (e.g. classic | canvas)
|
|
672
678
|
--solutionName=<value> Solution Name (e.g. SOC Solution)
|
|
673
679
|
--sspPath=<value> absolute path to .ssp file
|
|
@@ -676,28 +682,29 @@ DESCRIPTION
|
|
|
676
682
|
Scaffold a new Solution
|
|
677
683
|
```
|
|
678
684
|
|
|
679
|
-
_See code: [lib/commands/solution/create.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
685
|
+
_See code: [lib/commands/solution/create.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/solution/create.js)_
|
|
680
686
|
|
|
681
|
-
## `sw-tsdk-connector solution:
|
|
687
|
+
## `sw-tsdk-connector solution:image`
|
|
682
688
|
|
|
683
|
-
Update a Solution
|
|
689
|
+
Update a Solution image.
|
|
684
690
|
|
|
685
691
|
```
|
|
686
692
|
USAGE
|
|
687
|
-
$ sw-tsdk-connector solution:
|
|
693
|
+
$ sw-tsdk-connector solution:image [-d <value>] [-t <value>] [-n <value>] [-i <value>] [-p <value>] [-h]
|
|
688
694
|
|
|
689
695
|
FLAGS
|
|
690
696
|
-d, --directory=<value> [default: ./] root directory of the solution folder.
|
|
691
697
|
-h, --help Show CLI help.
|
|
692
|
-
-
|
|
693
|
-
-
|
|
698
|
+
-i, --imageType=<value> Image Type (e.g. logo/overview)
|
|
699
|
+
-n, --solutionName=<value> Solution Name (e.g. google_alert_ingestion)
|
|
700
|
+
-p, --imagePath=<value> path or URL to product image in PNG format.
|
|
694
701
|
-t, --solutionType=<value> Solution Type (e.g. classic)
|
|
695
702
|
|
|
696
703
|
DESCRIPTION
|
|
697
|
-
Update a Solution
|
|
704
|
+
Update a Solution image.
|
|
698
705
|
```
|
|
699
706
|
|
|
700
|
-
_See code: [lib/commands/solution/
|
|
707
|
+
_See code: [lib/commands/solution/image.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/solution/image.js)_
|
|
701
708
|
|
|
702
709
|
## `sw-tsdk-connector solution:ssp`
|
|
703
710
|
|
|
@@ -718,5 +725,5 @@ DESCRIPTION
|
|
|
718
725
|
Update an SSP.
|
|
719
726
|
```
|
|
720
727
|
|
|
721
|
-
_See code: [lib/commands/solution/ssp.js](https://github.com/swimlane/turbine-sdk/blob/v3.
|
|
728
|
+
_See code: [lib/commands/solution/ssp.js](https://github.com/swimlane/turbine-sdk/blob/v3.8.0/lib/commands/solution/ssp.js)_
|
|
722
729
|
<!-- commandsstop -->
|
|
@@ -30,7 +30,7 @@ class Create extends core_2.Base {
|
|
|
30
30
|
type: 'list',
|
|
31
31
|
name: 'componentFamily',
|
|
32
32
|
message: 'Choose Component Type (e.g. canvas)',
|
|
33
|
-
choices: common_1.
|
|
33
|
+
choices: common_1.contentFamily,
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
type: 'input',
|
|
@@ -125,16 +125,29 @@ class Create extends core_2.Base {
|
|
|
125
125
|
componentUseCaseData: await (0, connector_1.titleCaseString)(`${title} ${answers.componentUseCaseType}`),
|
|
126
126
|
keywords: answers.keywords,
|
|
127
127
|
};
|
|
128
|
+
if (component.author === 'Swimlane') {
|
|
129
|
+
component.keywords.push('Swimlane Certified');
|
|
130
|
+
}
|
|
131
|
+
else if (component.author === 'Swimlane SE' || component.author === 'Swimlane PS') {
|
|
132
|
+
component.keywords.push('Community Content');
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
throw new Error('Invalid author');
|
|
136
|
+
}
|
|
128
137
|
core_1.ux.action.start('Generating folder structure.');
|
|
129
138
|
await (0, fs_extra_1.writeFile)((0, node_path_1.join)(componentDirectory, 'external.yml'), '', 'utf8');
|
|
130
139
|
await (0, fs_extra_1.writeFile)((0, node_path_1.join)(componentDirectory, 'README.md'), 'Description will be updated shortly.', 'utf8');
|
|
131
140
|
await (0, fs_extra_1.writeFile)((0, node_path_1.join)(componentDirectory, 'EXTERNAL_README.md'), 'Description will be updated shortly.', 'utf8');
|
|
132
141
|
await (0, fs_extra_1.writeFile)((0, node_path_1.join)(componentDirectory, 'documentation.README.md'), 'Description will be updated shortly.', 'utf8');
|
|
133
|
-
core_1.ux.action.start('
|
|
142
|
+
core_1.ux.action.start('Performing validations');
|
|
134
143
|
if (answers.keywords.length === 0) {
|
|
135
144
|
core_1.ux.action.stop();
|
|
136
145
|
return this.error('Categories are required. Press <space> to select the category.');
|
|
137
146
|
}
|
|
147
|
+
if (answers.description.length > 120) {
|
|
148
|
+
core_1.ux.action.stop();
|
|
149
|
+
return this.error('Description should be less than 120 characters.');
|
|
150
|
+
}
|
|
138
151
|
core_1.ux.action.start('Processing Logo');
|
|
139
152
|
try {
|
|
140
153
|
if (!answers.logoPath) {
|
|
@@ -194,8 +207,8 @@ Create.flags = {
|
|
|
194
207
|
componentName: core_1.Flags.string({ description: 'Component Name (e.g. Alert Ingestion)' }),
|
|
195
208
|
keywords: core_1.Flags.string({ description: 'Enter keywords' }),
|
|
196
209
|
description: core_1.Flags.string({ description: 'Description (e.g. CrowdStrike Alert Ingestion Component)' }),
|
|
197
|
-
logoPath: core_1.Flags.string({ description: 'URL or absolute path to logo file' }),
|
|
198
|
-
overviewImagePath: core_1.Flags.string({ description: 'URL or absolute path to overview image file' }),
|
|
210
|
+
logoPath: core_1.Flags.string({ description: 'URL or absolute path to logo file. Image should be in 1:1 aspect ratio and min resolution 200x200' }),
|
|
211
|
+
overviewImagePath: core_1.Flags.string({ description: 'URL or absolute path to overview image file. Min resolution 1100x660' }),
|
|
199
212
|
sspPath: core_1.Flags.string({ description: 'absolute path to .ssp file' }),
|
|
200
213
|
author: core_1.Flags.string({ description: 'Component Author' }),
|
|
201
214
|
authorEmail: core_1.Flags.string({ description: 'Component Author Email' }),
|
|
@@ -1 +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,
|
|
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,yCAA6G;AAqB7G,qCAAqC;AACrC,MAAa,MAAO,SAAQ,WAAI;IAyB9B,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,CAAC;gBACvB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,iBAAiB;gBACvB,OAAO,EAAE,qCAAqC;gBAC9C,OAAO,EAAE,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W,EAAE,2BAA2B,EAAC,CAAC;IAChE,aAAa,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,uCAAuC,EAAC,CAAC;IACnF,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,gBAAgB,EAAC,CAAC;IACvD,WAAW,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,0DAA0D,EAAC,CAAC;IACpG,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,mGAAmG,EAAC,CAAC;IAC1I,iBAAiB,EAAE,YAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,sEAAsE,EAAC,CAAC;IACtH,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"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Base } from '@sw-tsdk/core';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class Image extends Base {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
directory: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
6
|
componentType: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
7
|
componentName: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
-
|
|
8
|
+
imageType: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
imagePath: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
10
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
10
11
|
};
|
|
11
12
|
run(): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Image = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
6
|
const connector_1 = require("@sw-tsdk/connector");
|
|
@@ -9,29 +9,36 @@ const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
|
9
9
|
const node_path_1 = require("node:path");
|
|
10
10
|
const common_1 = require("../../common");
|
|
11
11
|
// noinspection JSUnusedGlobalSymbols
|
|
12
|
-
class
|
|
12
|
+
class Image extends core_2.Base {
|
|
13
13
|
async run() {
|
|
14
|
-
const { flags } = await this.parse(
|
|
14
|
+
const { flags } = await this.parse(Image);
|
|
15
15
|
let { directory } = flags;
|
|
16
16
|
directory = (0, node_path_1.resolve)(directory || process.cwd());
|
|
17
17
|
const masterQuestions = [
|
|
18
|
+
{
|
|
19
|
+
type: 'list',
|
|
20
|
+
name: 'imageType',
|
|
21
|
+
message: 'Integration Author',
|
|
22
|
+
default: 'logo',
|
|
23
|
+
choices: common_1.imageType,
|
|
24
|
+
},
|
|
18
25
|
{
|
|
19
26
|
type: 'input',
|
|
20
|
-
name: '
|
|
21
|
-
message: 'URL or absolute path to
|
|
27
|
+
name: 'imagePath',
|
|
28
|
+
message: 'URL or absolute path to image file',
|
|
22
29
|
},
|
|
23
30
|
];
|
|
24
|
-
const componentTypeSelected = await (0, common_1.
|
|
25
|
-
const componentNameSelected = await (0, common_1.chooseContentName)(directory, componentTypeSelected);
|
|
31
|
+
const componentTypeSelected = await (0, common_1.chooseContentFamily)(common_1.contentType.COMPONENT);
|
|
32
|
+
const componentNameSelected = await (0, common_1.chooseContentName)(directory, componentTypeSelected, common_1.contentType.COMPONENT);
|
|
26
33
|
const filteredQuestions = masterQuestions.filter(q => !flags[q.name]);
|
|
27
34
|
const answers = Object.assign(await inquirer_1.default.prompt(filteredQuestions), flags);
|
|
28
35
|
const componentDirectory = (0, node_path_1.join)(directory, componentTypeSelected, componentNameSelected);
|
|
29
|
-
core_1.ux.action.start('Processing
|
|
36
|
+
core_1.ux.action.start('Processing Image');
|
|
30
37
|
try {
|
|
31
|
-
if (!answers.
|
|
38
|
+
if (!answers.imagePath) {
|
|
32
39
|
throw new Error('Invalid image path. ');
|
|
33
40
|
}
|
|
34
|
-
await (0, connector_1.updateImage)(componentDirectory, answers.
|
|
41
|
+
await (0, connector_1.updateImage)(componentDirectory, answers.imagePath, answers.imageType);
|
|
35
42
|
}
|
|
36
43
|
catch (error) {
|
|
37
44
|
core_1.ux.action.stop();
|
|
@@ -40,9 +47,9 @@ class Logo extends core_2.Base {
|
|
|
40
47
|
core_1.ux.action.stop();
|
|
41
48
|
}
|
|
42
49
|
}
|
|
43
|
-
exports.
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
exports.Image = Image;
|
|
51
|
+
Image.description = 'Update a Component image.';
|
|
52
|
+
Image.flags = {
|
|
46
53
|
...core_2.Base.flags,
|
|
47
54
|
directory: core_1.Flags.string({
|
|
48
55
|
char: 'd',
|
|
@@ -57,10 +64,14 @@ Logo.flags = {
|
|
|
57
64
|
description: 'Component Name (e.g. google_alert_ingestion)',
|
|
58
65
|
char: 'n',
|
|
59
66
|
}),
|
|
60
|
-
|
|
67
|
+
imageType: core_1.Flags.string({
|
|
68
|
+
char: 'i',
|
|
69
|
+
description: 'Image Type (e.g. logo/overview)',
|
|
70
|
+
}),
|
|
71
|
+
imagePath: core_1.Flags.string({
|
|
61
72
|
char: 'p',
|
|
62
|
-
description: 'path or URL to product
|
|
73
|
+
description: 'path or URL to product image in PNG format.',
|
|
63
74
|
}),
|
|
64
75
|
help: core_1.Flags.help({ char: 'h' }),
|
|
65
76
|
};
|
|
66
|
-
//# sourceMappingURL=
|
|
77
|
+
//# sourceMappingURL=image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../../src/commands/component/image.ts"],"names":[],"mappings":";;;;AAAA,sCAAqC;AACrC,kDAA8C;AAC9C,wCAAkC;AAClC,gEAA+B;AAC/B,yCAAuC;AAEvC,yCAA2F;AAG3F,qCAAqC;AACrC,MAAa,KAAM,SAAQ,WAAI;IA6B3B,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QAEvC,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,MAAM;gBACZ,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,oBAAoB;gBAC7B,OAAO,EAAE,MAAM;gBACf,OAAO,EAAE,kBAAS;aACnB;YACD;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,oCAAoC;aAC9C;SACF,CAAA;QAED,MAAM,qBAAqB,GAAG,MAAM,IAAA,4BAAmB,EAAC,oBAAW,CAAC,SAAS,CAAC,CAAA;QAC9E,MAAM,qBAAqB,GAAG,MAAM,IAAA,0BAAiB,EAAC,SAAS,EAAE,qBAAqB,EAAE,oBAAW,CAAC,SAAS,CAAC,CAAA;QAC9G,MAAM,iBAAiB,GAAG,eAAe,CAAC,M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C,MAAM,CAAC;QACtB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,iCAAiC;KAC/C,CAAC;IACF,SAAS,EAAE,YAAK,CAAC,MAAM,CAAC;QACtB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,6CAA6C;KAC3D,CAAC;IACF,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;CAC9B,CAAA"}
|
|
@@ -22,8 +22,8 @@ class Logo extends core_2.Base {
|
|
|
22
22
|
message: 'Absolute path to .SSP file',
|
|
23
23
|
},
|
|
24
24
|
];
|
|
25
|
-
const componentTypeSelected = await (0, common_1.
|
|
26
|
-
const componentNameSelected = await (0, common_1.chooseContentName)(directory, componentTypeSelected);
|
|
25
|
+
const componentTypeSelected = await (0, common_1.chooseContentFamily)(common_1.contentType.COMPONENT);
|
|
26
|
+
const componentNameSelected = await (0, common_1.chooseContentName)(directory, componentTypeSelected, common_1.contentType.COMPONENT);
|
|
27
27
|
const filteredQuestions = masterQuestions.filter(q => !flags[q.name]);
|
|
28
28
|
const answers = Object.assign(await inquirer_1.default.prompt(filteredQuestions), flags);
|
|
29
29
|
const componentDirectory = (0, node_path_1.join)(directory, componentTypeSelected, componentNameSelected);
|
|
@@ -1 +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,
|
|
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,yCAAgF;AAGhF,qCAAqC;AACrC,MAAa,IAAK,SAAQ,WAAI;IAyB5B,KAAK,C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AAM,CAAC,IAAI,EAAE,CAAA;SACjB;aAAM;YACL,IAAI,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAA;SACxC;IACH,CAAC;;AAvDH,oBAwDC;AAvDQ,gBAAW,GAAG,gBAAgB,CAAA;AAE9B,UAAK,GAAG;IACb,GAAG,WAAI,CAAC,KAAK;IACb,SAAS,EAAE,YAAK,CAAC,MAAM,CAAC;QACtB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,IAAI;KACd,CAAC;IACF,aAAa,EAAE,YAAK,CAAC,MAAM,CAAC;QAC1B,WAAW,EAAE,+BAA+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,OAAO,EAAE,YAAK,CAAC,MAAM,CAAC;QACpB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,4BAA4B;KAC1C,CAAC;IACF,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;CAC9B,CAAA"}
|
|
@@ -146,6 +146,15 @@ class Create extends core_2.Base {
|
|
|
146
146
|
},
|
|
147
147
|
},
|
|
148
148
|
};
|
|
149
|
+
if (connector.author === 'Swimlane') {
|
|
150
|
+
connector.keywords.push('Swimlane Certified');
|
|
151
|
+
}
|
|
152
|
+
else if (connector.author === 'Swimlane SE' || connector.author === 'Swimlane PS') {
|
|
153
|
+
connector.keywords.push('Community Content');
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
throw new Error('Invalid author');
|
|
157
|
+
}
|
|
149
158
|
core_1.ux.action.start('Generating folder structure.');
|
|
150
159
|
// copy the examples over.
|
|
151
160
|
/*
|
|
@@ -179,6 +188,15 @@ class Create extends core_2.Base {
|
|
|
179
188
|
await (0, fs_extra_1.remove)((0, node_path_1.join)(connectorDirectory, 'README.md'));
|
|
180
189
|
await (0, fs_extra_1.writeFile)((0, node_path_1.join)(connectorDirectory, 'docs', 'external.yml'), '', 'utf8');
|
|
181
190
|
await (0, fs_extra_1.writeFile)((0, node_path_1.join)(connectorDirectory, 'docs', 'EXTERNAL_README.md'), 'Description will be updated shortly.', 'utf8');
|
|
191
|
+
core_1.ux.action.start('Performing validations');
|
|
192
|
+
if (answers.keywords.length === 0) {
|
|
193
|
+
core_1.ux.action.stop();
|
|
194
|
+
return this.error('Categories are required. Press <space> to select the category.');
|
|
195
|
+
}
|
|
196
|
+
if (answers.description.length > 120) {
|
|
197
|
+
core_1.ux.action.stop();
|
|
198
|
+
return this.error('Description should be less than 120 characters.');
|
|
199
|
+
}
|
|
182
200
|
core_1.ux.action.start('Processing Categories');
|
|
183
201
|
if (answers.keywords.length === 0) {
|
|
184
202
|
core_1.ux.action.stop();
|
|
@@ -220,7 +238,7 @@ Create.flags = {
|
|
|
220
238
|
product: core_1.Flags.string({ description: 'Product (e.g. Falcon)' }),
|
|
221
239
|
keywords: core_1.Flags.string({ description: 'Enter keywords (Comma-Separated)' }),
|
|
222
240
|
description: core_1.Flags.string({ description: 'Description (e.g. CrowdStrike Host Query API)' }),
|
|
223
|
-
logoPath: core_1.Flags.string({ description: 'URL or absolute path to logo file' }),
|
|
241
|
+
logoPath: core_1.Flags.string({ description: 'URL or absolute path to logo file. Image should be in 1:1 aspect ratio and min resolution 200x200' }),
|
|
224
242
|
author: core_1.Flags.string({ description: 'Connector Author' }),
|
|
225
243
|
authorEmail: core_1.Flags.string({ description: 'Connector Author Email' }),
|
|
226
244
|
homepage: core_1.Flags.string({ description: 'Connector Author Support URL' }),
|