@sw-tsdk/plugin-connector 2.20.1 → 2.21.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 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.20.1 linux-x64 node-v16.20.2
19
+ @sw-tsdk/plugin-connector/2.21.0 linux-x64 node-v16.20.2
20
20
  $ sw-tsdk-connector --help [COMMAND]
21
21
  USAGE
22
22
  $ sw-tsdk-connector COMMAND
@@ -34,7 +34,6 @@ USAGE
34
34
  * [`sw-tsdk-connector component:create`](#sw-tsdk-connector-componentcreate)
35
35
  * [`sw-tsdk-connector component:logo`](#sw-tsdk-connector-componentlogo)
36
36
  * [`sw-tsdk-connector component:ssp`](#sw-tsdk-connector-componentssp)
37
- * [`sw-tsdk-connector component:update`](#sw-tsdk-connector-componentupdate)
38
37
  * [`sw-tsdk-connector connector:build`](#sw-tsdk-connector-connectorbuild)
39
38
  * [`sw-tsdk-connector connector:create`](#sw-tsdk-connector-connectorcreate)
40
39
  * [`sw-tsdk-connector connector:create:openapi`](#sw-tsdk-connector-connectorcreateopenapi)
@@ -66,7 +65,7 @@ DESCRIPTION
66
65
  Update a connector action.
67
66
  ```
68
67
 
69
- _See code: [lib/commands/action/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/action/add.js)_
68
+ _See code: [lib/commands/action/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/action/add.js)_
70
69
 
71
70
  ## `sw-tsdk-connector action:generate:data`
72
71
 
@@ -91,7 +90,7 @@ DESCRIPTION
91
90
  Use to test a task in an integration
92
91
  ```
93
92
 
94
- _See code: [lib/commands/action/generate/data.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/action/generate/data.js)_
93
+ _See code: [lib/commands/action/generate/data.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/action/generate/data.js)_
95
94
 
96
95
  ## `sw-tsdk-connector action:generate:input`
97
96
 
@@ -116,7 +115,7 @@ DESCRIPTION
116
115
  Update action input schema.
117
116
  ```
118
117
 
119
- _See code: [lib/commands/action/generate/input.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/action/generate/input.js)_
118
+ _See code: [lib/commands/action/generate/input.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/action/generate/input.js)_
120
119
 
121
120
  ## `sw-tsdk-connector action:generate:output`
122
121
 
@@ -140,7 +139,7 @@ DESCRIPTION
140
139
  Update a connector action.
141
140
  ```
142
141
 
143
- _See code: [lib/commands/action/generate/output.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/action/generate/output.js)_
142
+ _See code: [lib/commands/action/generate/output.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/action/generate/output.js)_
144
143
 
145
144
  ## `sw-tsdk-connector action:run:local`
146
145
 
@@ -169,7 +168,7 @@ DESCRIPTION
169
168
  Runs a connector action. (Defaults to current image version in local repository).
170
169
  ```
171
170
 
172
- _See code: [lib/commands/action/run/local.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/action/run/local.js)_
171
+ _See code: [lib/commands/action/run/local.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/action/run/local.js)_
173
172
 
174
173
  ## `sw-tsdk-connector asset:add`
175
174
 
@@ -190,7 +189,7 @@ DESCRIPTION
190
189
  Update a connector action.
191
190
  ```
192
191
 
193
- _See code: [lib/commands/asset/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/asset/add.js)_
192
+ _See code: [lib/commands/asset/add.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/asset/add.js)_
194
193
 
195
194
  ## `sw-tsdk-connector component:create`
196
195
 
@@ -198,29 +197,30 @@ Scaffold a new Component
198
197
 
199
198
  ```
200
199
  USAGE
201
- $ sw-tsdk-connector component:create [-d <value>] [--componentType <value>] [--vendor <value>] [--componentName
202
- <value>] [--keywords <value>] [--description <value>] [--logoPath <value>] [--sspPath <value>] [--author <value>]
203
- [--authorEmail <value>] [--homepage <value>] [-h]
200
+ $ sw-tsdk-connector component:create [-d <value>] [--componentUseCaseType <value>] [--componentFamily <value>]
201
+ [--vendor <value>] [--componentName <value>] [--keywords <value>] [--description <value>] [--logoPath <value>]
202
+ [--sspPath <value>] [--author <value>] [--authorEmail <value>] [--homepage <value>] [-h]
204
203
 
205
204
  FLAGS
206
- -d, --directory=<value> [default: ./] root directory for where to store Component.
207
- -h, --help Show CLI help.
208
- --author=<value> Component Author
209
- --authorEmail=<value> Component Author Email
210
- --componentName=<value> Component Name (e.g. Alert Ingestion)
211
- --componentType=<value> Component Type (e.g. classic)
212
- --description=<value> Description (e.g. CrowdStrike Alert Ingestion Component)
213
- --homepage=<value> Component Author Support URL
214
- --keywords=<value> Enter keywords
215
- --logoPath=<value> URL or absolute path to logo file
216
- --sspPath=<value> absolute path to .ssp file
217
- --vendor=<value> Vendor (e.g. CrowdStrike)
205
+ -d, --directory=<value> [default: ./] root directory for where to store Component.
206
+ -h, --help Show CLI help.
207
+ --author=<value> Component Author
208
+ --authorEmail=<value> Component Author Email
209
+ --componentFamily=<value> Component Family (e.g. classic | canvas)
210
+ --componentName=<value> Component Name (e.g. Alert Ingestion)
211
+ --componentUseCaseType=<value> Component Use Case Type (e.g. ingestion| enrichment | remidiation)
212
+ --description=<value> Description (e.g. CrowdStrike Alert Ingestion Component)
213
+ --homepage=<value> Component Author Support URL
214
+ --keywords=<value> Enter keywords
215
+ --logoPath=<value> URL or absolute path to logo file
216
+ --sspPath=<value> absolute path to .ssp file
217
+ --vendor=<value> Vendor (e.g. CrowdStrike)
218
218
 
219
219
  DESCRIPTION
220
220
  Scaffold a new Component
221
221
  ```
222
222
 
223
- _See code: [lib/commands/component/create.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/component/create.js)_
223
+ _See code: [lib/commands/component/create.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/component/create.js)_
224
224
 
225
225
  ## `sw-tsdk-connector component:logo`
226
226
 
@@ -241,7 +241,7 @@ DESCRIPTION
241
241
  Update a Component logo.
242
242
  ```
243
243
 
244
- _See code: [lib/commands/component/logo.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/component/logo.js)_
244
+ _See code: [lib/commands/component/logo.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/component/logo.js)_
245
245
 
246
246
  ## `sw-tsdk-connector component:ssp`
247
247
 
@@ -262,29 +262,7 @@ DESCRIPTION
262
262
  Update an SSP.
263
263
  ```
264
264
 
265
- _See code: [lib/commands/component/ssp.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/component/ssp.js)_
266
-
267
- ## `sw-tsdk-connector component:update`
268
-
269
- Update Component Version.
270
-
271
- ```
272
- USAGE
273
- $ sw-tsdk-connector component:update [-d <value>] [-v <value>] [-t <value>] [-n <value>] [-f <value>] [-h]
274
-
275
- FLAGS
276
- -d, --directory=<value> [default: .] root directory of the all Components
277
- -f, --manifestPath=<value> [default: manifest.yml] Component manifest path relative to directory.
278
- -h, --help Show CLI help.
279
- -n, --componentName=<value> Component Name (e.g. google_alert_ingestion)
280
- -t, --componentType=<value> Component Type (e.g. classic)
281
- -v, --version=<value> new version of the component.
282
-
283
- DESCRIPTION
284
- Update Component Version.
285
- ```
286
-
287
- _See code: [lib/commands/component/update.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/component/update.js)_
265
+ _See code: [lib/commands/component/ssp.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/component/ssp.js)_
288
266
 
289
267
  ## `sw-tsdk-connector connector:build`
290
268
 
@@ -314,7 +292,7 @@ DESCRIPTION
314
292
  Builds a local docker image of the connector.
315
293
  ```
316
294
 
317
- _See code: [lib/commands/connector/build.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/connector/build.js)_
295
+ _See code: [lib/commands/connector/build.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/connector/build.js)_
318
296
 
319
297
  ## `sw-tsdk-connector connector:create`
320
298
 
@@ -346,7 +324,7 @@ DESCRIPTION
346
324
  Scaffold a new connector
347
325
  ```
348
326
 
349
- _See code: [lib/commands/connector/create.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/connector/create.js)_
327
+ _See code: [lib/commands/connector/create.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/connector/create.js)_
350
328
 
351
329
  ## `sw-tsdk-connector connector:create:openapi`
352
330
 
@@ -375,7 +353,7 @@ DESCRIPTION
375
353
  Scaffold a new connector
376
354
  ```
377
355
 
378
- _See code: [lib/commands/connector/create/openapi.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/connector/create/openapi.js)_
356
+ _See code: [lib/commands/connector/create/openapi.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/connector/create/openapi.js)_
379
357
 
380
358
  ## `sw-tsdk-connector connector:create:source`
381
359
 
@@ -393,7 +371,7 @@ DESCRIPTION
393
371
  Generates 11x source from 10x
394
372
  ```
395
373
 
396
- _See code: [lib/commands/connector/create/source.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/connector/create/source.js)_
374
+ _See code: [lib/commands/connector/create/source.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/connector/create/source.js)_
397
375
 
398
376
  ## `sw-tsdk-connector connector:logo`
399
377
 
@@ -412,7 +390,7 @@ DESCRIPTION
412
390
  Update a connector.
413
391
  ```
414
392
 
415
- _See code: [lib/commands/connector/logo.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/connector/logo.js)_
393
+ _See code: [lib/commands/connector/logo.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/connector/logo.js)_
416
394
 
417
395
  ## `sw-tsdk-connector connector:sign`
418
396
 
@@ -437,7 +415,7 @@ DESCRIPTION
437
415
  Builds a local docker image of the connector.
438
416
  ```
439
417
 
440
- _See code: [lib/commands/connector/sign.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/connector/sign.js)_
418
+ _See code: [lib/commands/connector/sign.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/connector/sign.js)_
441
419
 
442
420
  ## `sw-tsdk-connector connector:update`
443
421
 
@@ -457,7 +435,7 @@ DESCRIPTION
457
435
  Update a connector.
458
436
  ```
459
437
 
460
- _See code: [lib/commands/connector/update.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/connector/update.js)_
438
+ _See code: [lib/commands/connector/update.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/connector/update.js)_
461
439
 
462
440
  ## `sw-tsdk-connector connector:validate`
463
441
 
@@ -480,7 +458,7 @@ DESCRIPTION
480
458
  Use to validate an integration
481
459
  ```
482
460
 
483
- _See code: [lib/commands/connector/validate.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/connector/validate.js)_
461
+ _See code: [lib/commands/connector/validate.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/connector/validate.js)_
484
462
 
485
463
  ## `sw-tsdk-connector description:action`
486
464
 
@@ -501,7 +479,7 @@ DESCRIPTION
501
479
  Use to generate action description
502
480
  ```
503
481
 
504
- _See code: [lib/commands/description/action.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/description/action.js)_
482
+ _See code: [lib/commands/description/action.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/description/action.js)_
505
483
 
506
484
  ## `sw-tsdk-connector description:actions`
507
485
 
@@ -521,7 +499,7 @@ DESCRIPTION
521
499
  Use to generate description for all actions
522
500
  ```
523
501
 
524
- _See code: [lib/commands/description/actions.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/description/actions.js)_
502
+ _See code: [lib/commands/description/actions.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/description/actions.js)_
525
503
 
526
504
  ## `sw-tsdk-connector description:component`
527
505
 
@@ -529,8 +507,7 @@ Use to generate component descriptions
529
507
 
530
508
  ```
531
509
  USAGE
532
- $ sw-tsdk-connector description:component [-h] [-i <value>] [-s] [-d <value>] [-c <value>] [-t <value>] [-v <value>] [-p
533
- <value>]
510
+ $ sw-tsdk-connector description:component [-h] [-i <value>] [-s] [-d <value>] [-c <value>] [-v <value>] [-p <value>]
534
511
 
535
512
  FLAGS
536
513
  -c, --componentName=<value> component name
@@ -539,14 +516,13 @@ FLAGS
539
516
  -i, --image=<value> image to use
540
517
  -p, --connectorLocalPath=<value> local path to connector
541
518
  -s, --skip-pull skips pulling the image
542
- -t, --componentType=<value> [default: ingestion] ingestion | enrichment | remediation
543
- -v, --componentVariety=<value> [default: classic] classic | canvas
519
+ -v, --componentFamily=<value> [default: classic] classic | canvas
544
520
 
545
521
  DESCRIPTION
546
522
  Use to generate component descriptions
547
523
  ```
548
524
 
549
- _See code: [lib/commands/description/component.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/description/component.js)_
525
+ _See code: [lib/commands/description/component.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/description/component.js)_
550
526
 
551
527
  ## `sw-tsdk-connector description:connector`
552
528
 
@@ -566,5 +542,5 @@ DESCRIPTION
566
542
  Use to generate connector descriptions
567
543
  ```
568
544
 
569
- _See code: [lib/commands/description/connector.js](https://github.com/swimlane/turbine-sdk/blob/v2.20.1/lib/commands/description/connector.js)_
545
+ _See code: [lib/commands/description/connector.js](https://github.com/swimlane/turbine-sdk/blob/v2.21.0/lib/commands/description/connector.js)_
570
546
  <!-- commandsstop -->
@@ -1,7 +1,6 @@
1
1
  import { Base } from '@sw-tsdk/core';
2
2
  export interface ComponentManifest {
3
3
  schema: string;
4
- componentType: string;
5
4
  vendor: string;
6
5
  name: string;
7
6
  author: string;
@@ -13,12 +12,16 @@ export interface ComponentManifest {
13
12
  title: string;
14
13
  version: string;
15
14
  keywords: string[];
15
+ componentUseCaseType: string;
16
+ componentFamily: string;
17
+ componentUseCaseData: string;
16
18
  }
17
19
  export declare class Create extends Base {
18
20
  static description: string;
19
21
  static flags: {
20
22
  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>;
23
+ componentUseCaseType: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
24
+ componentFamily: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
22
25
  vendor: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
23
26
  componentName: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
24
27
  keywords: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
@@ -28,8 +28,8 @@ class Create extends core_2.Base {
28
28
  }
29
29
  const masterQuestions = [{
30
30
  type: 'list',
31
- name: 'componentType',
32
- message: 'Choose Component Type',
31
+ name: 'componentFamily',
32
+ message: 'Choose Component Type (e.g. canvas)',
33
33
  choices: common_1.contentCategories,
34
34
  },
35
35
  {
@@ -53,6 +53,12 @@ class Create extends core_2.Base {
53
53
  message: 'Choose a category (Comma-separated)',
54
54
  choices: common_1.connectorCategories,
55
55
  },
56
+ {
57
+ type: 'list',
58
+ name: 'componentUseCaseType',
59
+ message: 'Choose Component Use Case Type (e.g. ingestion)',
60
+ choices: common_1.contentUseCaseCategories,
61
+ },
56
62
  {
57
63
  type: 'input',
58
64
  name: 'logoPath',
@@ -83,7 +89,7 @@ class Create extends core_2.Base {
83
89
  }];
84
90
  const filteredQuestions = masterQuestions.filter(q => !flags[q.name]);
85
91
  const answers = Object.assign(await inquirer_1.default.prompt(filteredQuestions), flags);
86
- const componentType = answers.componentType;
92
+ const componentFamily = answers.componentFamily;
87
93
  const errors = [];
88
94
  if (!answers.vendor) {
89
95
  errors.push('Vendor Field is required.');
@@ -92,8 +98,9 @@ class Create extends core_2.Base {
92
98
  errors.push('Component Name is required.');
93
99
  }
94
100
  const name = (0, snake_case_1.snakeCase)(`${answers.vendor} ${answers.componentName}`.toLocaleLowerCase());
95
- const componentDirectory = (0, node_path_1.join)(directory, componentType, `${name}`);
101
+ const componentDirectory = (0, node_path_1.join)(directory, componentFamily, `${name}`);
96
102
  await (0, fs_extra_1.ensureDir)(componentDirectory);
103
+ const title = await (0, connector_1.titleCaseString)(`${answers.vendor} ${answers.componentName}`);
97
104
  const component = {
98
105
  vendor: answers.vendor,
99
106
  name: name,
@@ -104,9 +111,11 @@ class Create extends core_2.Base {
104
111
  description: answers.description,
105
112
  homepage: answers.homepage,
106
113
  license: 'AGPL-3.0',
107
- title: await (0, connector_1.titleCaseString)(`${answers.vendor} ${answers.componentName}`),
114
+ title: title,
108
115
  version: '0.0.0',
109
- componentType: componentType,
116
+ componentUseCaseType: answers.componentUseCaseType,
117
+ componentFamily: answers.componentFamily,
118
+ componentUseCaseData: await (0, connector_1.titleCaseString)(`${title} ${answers.componentUseCaseType}`),
110
119
  keywords: answers.keywords.split(',').map(x => x.trim()),
111
120
  };
112
121
  core_1.ux.action.start('Generating folder structure.');
@@ -114,15 +123,18 @@ class Create extends core_2.Base {
114
123
  await (0, fs_extra_1.writeFile)((0, node_path_1.join)(componentDirectory, 'README.md'), 'Description will be updated shortly.', 'utf8');
115
124
  await (0, fs_extra_1.writeFile)((0, node_path_1.join)(componentDirectory, 'EXTERNAL_README.md'), 'Description will be updated shortly.', 'utf8');
116
125
  await (0, fs_extra_1.writeFile)((0, node_path_1.join)(componentDirectory, 'documentation.README.md'), 'Description will be updated shortly.', 'utf8');
117
- if (answers.logoPath?.endsWith('.png') || answers.logoPath?.endsWith('.jpg') || answers.logoPath?.endsWith('.jpeg')) {
118
- core_1.ux.action.start('Processing Logo');
126
+ core_1.ux.action.start('Processing Logo');
127
+ try {
128
+ if (!answers.logoPath) {
129
+ throw new Error('Invalid image path.');
130
+ }
119
131
  await (0, connector_1.updateImage)(componentDirectory, answers.logoPath);
120
- core_1.ux.action.stop();
121
132
  }
122
- else {
133
+ catch {
123
134
  core_1.ux.action.stop();
124
135
  errors.push('Invalid logo file provided');
125
136
  }
137
+ core_1.ux.action.stop();
126
138
  if (answers.sspPath?.endsWith('.ssp')) {
127
139
  core_1.ux.action.start('Processing SSP File');
128
140
  const destinationPath = path.join(componentDirectory, `${name}.ssp`);
@@ -153,7 +165,8 @@ Create.flags = {
153
165
  description: 'root directory for where to store Component.',
154
166
  default: './',
155
167
  }),
156
- componentType: core_1.Flags.string({ description: 'Component Type (e.g. classic)' }),
168
+ componentUseCaseType: core_1.Flags.string({ description: 'Component Use Case Type (e.g. ingestion| enrichment | remidiation)' }),
169
+ componentFamily: core_1.Flags.string({ description: 'Component Family (e.g. classic | canvas)' }),
157
170
  vendor: core_1.Flags.string({ description: 'Vendor (e.g. CrowdStrike)' }),
158
171
  componentName: core_1.Flags.string({ description: 'Component Name (e.g. Alert Ingestion)' }),
159
172
  keywords: core_1.Flags.string({ description: 'Enter keywords' }),
@@ -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,yCAA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B,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"}
@@ -7,8 +7,7 @@ export declare class Component extends Base {
7
7
  'skip-pull': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
8
  directory: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
9
  componentName: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
- componentType: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
- componentVariety: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
+ componentFamily: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
11
  connectorLocalPath: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
13
12
  };
14
13
  run(): Promise<void>;
@@ -8,7 +8,6 @@ const core_2 = require("@oclif/core");
8
8
  const node_fs_1 = require("node:fs");
9
9
  const core_3 = require("@sw-tsdk/core");
10
10
  const common_1 = require("../../common");
11
- const common_2 = require("../../common");
12
11
  const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
13
12
  const node_path_1 = require("node:path");
14
13
  const node_path_2 = tslib_1.__importDefault(require("node:path"));
@@ -20,7 +19,6 @@ class Component extends core_3.Base {
20
19
  let { image } = flags;
21
20
  let { directory } = flags;
22
21
  directory = (0, node_path_1.resolve)(directory);
23
- console.log(directory);
24
22
  const typeOfContent = 'component';
25
23
  if (!image) {
26
24
  image = `${docker_1.DockerDefaults.SdkTurbineContentDescriptionImage}`;
@@ -35,25 +33,19 @@ class Component extends core_3.Base {
35
33
  type: 'input',
36
34
  name: 'connectorLocalPath',
37
35
  message: 'Relevant Connector Local Path',
38
- },
39
- {
40
- type: 'list',
41
- name: 'componentType',
42
- message: 'Choose use case type (eg: ingestion | enrichment | remediation)',
43
- choices: common_1.contentUseCaseCategories,
44
36
  }];
45
- const componentVarietySelected = await (0, common_2.chooseComponentType)();
46
- const componentNameSelected = await (0, common_2.chooseComponentName)(directory, componentVarietySelected);
47
- const componentDirectory = (0, node_path_1.join)(directory, componentVarietySelected, componentNameSelected);
48
- const manifestData = await (0, common_2.getManifestYamlFile)(componentDirectory);
37
+ const componentFamilySelected = await (0, common_1.chooseComponentType)();
38
+ const componentNameSelected = await (0, common_1.chooseComponentName)(directory, componentFamilySelected);
39
+ const componentDirectory = (0, node_path_1.join)(directory, componentFamilySelected, componentNameSelected);
40
+ const manifestData = await (0, common_1.getManifestYamlFile)(componentDirectory);
49
41
  const filteredQuestions = masterQuestions.filter(q => !flags[q.name]);
50
42
  const answers = Object.assign(await inquirer_1.default.prompt(filteredQuestions), flags);
51
43
  const data = {
52
44
  parent: componentNameSelected,
53
45
  name: componentNameSelected,
54
- type: answers.componentType,
55
- componentVariety: componentVarietySelected,
56
- data: manifestData.title,
46
+ type: manifestData.componentUseCaseType,
47
+ componentFamily: componentFamilySelected,
48
+ data: manifestData.componentUseCaseData,
57
49
  title: manifestData.title,
58
50
  };
59
51
  const jsonString = JSON.stringify(data);
@@ -114,12 +106,7 @@ Component.flags = {
114
106
  char: 'c',
115
107
  description: 'component name',
116
108
  }),
117
- componentType: core_1.Flags.string({
118
- char: 't',
119
- description: 'ingestion | enrichment | remediation',
120
- default: 'ingestion',
121
- }),
122
- componentVariety: core_1.Flags.string({
109
+ componentFamily: core_1.Flags.string({
123
110
  char: 'v',
124
111
  description: 'classic | canvas',
125
112
  default: 'classic',
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/commands/description/component.ts"],"names":[],"mappings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Ac;KAC5B,CAAC;IACF,WAAW,EAAE,YAAK,CAAC,OAAO,CAAC;QACzB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,yBAAyB;KACvC,CAAC;IACF,SAAS,EAAE,YAAK,CAAC,MAAM,CAAC;QACtB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,4BAA4B;QACzC,OAAO,EAAE,IAAI;KACd,CAAC;IACF,aAAa,EAAE,YAAK,CAAC,MAAM,CAAC;QAC1B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,gBAAgB;KAC9B,CAAC;IACF,aAAa,EAAE,YAAK,CAAC,MAAM,CAAC;QAC1B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,sCAAsC;QACnD,OAAO,EAAE,WAAW;KACrB,CAAC;IACF,gBAAgB,EAAE,YAAK,CAAC,MAAM,CAAC;QAC7B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,kBAAkB;QAC/B,OAAO,EAAE,SAAS;KACnB,CAAC;IACF,kBAAkB,EAAE,YAAK,CAAC,MAAM,CAAC;QAC/B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,yBAAyB;KACvC,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/commands/description/component.ts"],"names":[],"mappings":";;;;AAAA,sCAAiC;AACjC,4CAAsD;AACtD,sCAAsC;AACtC,qCAAgC;AAChC,wCAAsD;AAEtD,yCAA0F;AAC1F,gEAA+B;AAC/B,yCAAuC;AACvC,kEAA4B;AAE5B,qCAAqC;AACrC,MAAa,SAAU,SAAQ,WAAI;IAkCjC,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;QAC3C,MAAM,EACJ,WAAW,EAAE,QAAQ,GACtB,GAAG,KAAK,CAAA;QACT,IAAI,EAAC,KAAK,EAAC,GAAG,KAAK,CAAA;QAEnB,IAAI,EAAC,SAAS,EAAC,G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type ConnectorQuestions = {
17
17
  aspirationalConnector: string;
18
18
  };
19
19
  export type ComponentQuestions = {
20
- componentType: string;
20
+ componentUseCaseType: string;
21
+ componentFamily: string;
21
22
  vendor: string;
22
23
  componentName: string;
23
24
  description: string;
@@ -34,7 +35,7 @@ export type ComponentLogoInfo = {
34
35
  };
35
36
  export type ComponentDescriptionInfo = {
36
37
  connectorLocalPath: string;
37
- componentType: string;
38
+ componentUseCaseType: string;
38
39
  };
39
40
  export type ComponentSSPInfo = {
40
41
  componentType: string;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.20.1",
2
+ "version": "2.21.0",
3
3
  "commands": {
4
4
  "action:add": {
5
5
  "id": "action:add",
@@ -99,10 +99,16 @@
99
99
  "multiple": false,
100
100
  "default": "./"
101
101
  },
102
- "componentType": {
103
- "name": "componentType",
102
+ "componentUseCaseType": {
103
+ "name": "componentUseCaseType",
104
104
  "type": "option",
105
- "description": "Component Type (e.g. classic)",
105
+ "description": "Component Use Case Type (e.g. ingestion| enrichment | remidiation)",
106
+ "multiple": false
107
+ },
108
+ "componentFamily": {
109
+ "name": "componentFamily",
110
+ "type": "option",
111
+ "description": "Component Family (e.g. classic | canvas)",
106
112
  "multiple": false
107
113
  },
108
114
  "vendor": {
@@ -265,62 +271,6 @@
265
271
  },
266
272
  "args": {}
267
273
  },
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
- },
324
274
  "connector:build": {
325
275
  "id": "connector:build",
326
276
  "description": "Builds a local docker image of the connector.",
@@ -891,16 +841,8 @@
891
841
  "description": "component name",
892
842
  "multiple": false
893
843
  },
894
- "componentType": {
895
- "name": "componentType",
896
- "type": "option",
897
- "char": "t",
898
- "description": "ingestion | enrichment | remediation",
899
- "multiple": false,
900
- "default": "ingestion"
901
- },
902
- "componentVariety": {
903
- "name": "componentVariety",
844
+ "componentFamily": {
845
+ "name": "componentFamily",
904
846
  "type": "option",
905
847
  "char": "v",
906
848
  "description": "classic | canvas",
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.20.1",
10
- "@sw-tsdk/connector": "^2.20.1",
11
- "@sw-tsdk/core": "^2.20.1",
12
- "@sw-tsdk/docker": "^2.20.1",
9
+ "@sw-tsdk/common": "^2.21.0",
10
+ "@sw-tsdk/connector": "^2.21.0",
11
+ "@sw-tsdk/core": "^2.21.0",
12
+ "@sw-tsdk/docker": "^2.21.0",
13
13
  "@swimlane/connector-interfaces": "1.11.0",
14
14
  "@swimlane/cosign": "1.4.1",
15
15
  "@swimlane/docker-reference": "2.0.1",
@@ -95,6 +95,6 @@
95
95
  "posttest": "yarn lint",
96
96
  "dev:setup": "npm link"
97
97
  },
98
- "version": "2.20.1",
99
- "gitHead": "dfc66023ec19995d81a4d30012dd2edc70aaecb9"
98
+ "version": "2.21.0",
99
+ "gitHead": "687ad9f73f493799a86e842c6ce203af7bf696c7"
100
100
  }
@@ -1,13 +0,0 @@
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
- }
@@ -1,68 +0,0 @@
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
@@ -1 +0,0 @@
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,EA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