@jupiterone/integration-sdk-cli 12.0.0 → 12.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupiterone/integration-sdk-cli",
3
- "version": "12.0.0",
3
+ "version": "12.1.0",
4
4
  "description": "The SDK for developing JupiterOne integrations",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -25,8 +25,8 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@jupiterone/data-model": "^0.54.0",
28
- "@jupiterone/integration-sdk-core": "^12.0.0",
29
- "@jupiterone/integration-sdk-runtime": "^12.0.0",
28
+ "@jupiterone/integration-sdk-core": "^12.1.0",
29
+ "@jupiterone/integration-sdk-runtime": "^12.1.0",
30
30
  "chalk": "^4",
31
31
  "commander": "^9.4.0",
32
32
  "fs-extra": "^10.1.0",
@@ -43,7 +43,7 @@
43
43
  "url-exists": "^1.0.3"
44
44
  },
45
45
  "devDependencies": {
46
- "@jupiterone/integration-sdk-private-test-utils": "^12.0.0",
46
+ "@jupiterone/integration-sdk-private-test-utils": "^12.1.0",
47
47
  "@pollyjs/adapter-node-http": "^6.0.5",
48
48
  "@pollyjs/core": "^6.0.5",
49
49
  "@pollyjs/persister-fs": "^6.0.5",
@@ -56,5 +56,5 @@
56
56
  "neo-forgery": "^2.0.0",
57
57
  "vis": "^4.21.0-EOL"
58
58
  },
59
- "gitHead": "d71c21bb480ffb35462525aef33a15f702ab5c25"
59
+ "gitHead": "6f1fbc96e463d7d940fdc515d627fb48afb4267d"
60
60
  }
@@ -124,6 +124,7 @@ describe('collect', () => {
124
124
  dependsOn: undefined,
125
125
  partialTypes: [],
126
126
  encounteredTypes: ['test_account'],
127
+ encounteredTypeCounts: expect.any(Object),
127
128
  status: StepResultStatus.CACHED,
128
129
  startTime: expect.any(Number),
129
130
  endTime: expect.any(Number),
@@ -136,6 +137,7 @@ describe('collect', () => {
136
137
  declaredTypes: ['my_groups'],
137
138
  partialTypes: [],
138
139
  encounteredTypes: [],
140
+ encounteredTypeCounts: expect.any(Object),
139
141
  status: StepResultStatus.SUCCESS,
140
142
  startTime: expect.any(Number),
141
143
  endTime: expect.any(Number),
@@ -148,6 +150,7 @@ describe('collect', () => {
148
150
  dependsOn: undefined,
149
151
  partialTypes: [],
150
152
  encounteredTypes: [],
153
+ encounteredTypeCounts: expect.any(Object),
151
154
  status: StepResultStatus.DISABLED,
152
155
  },
153
156
  ],
@@ -171,6 +174,7 @@ describe('collect', () => {
171
174
  declaredTypes: ['my_account'],
172
175
  partialTypes: [],
173
176
  encounteredTypes: [],
177
+ encounteredTypeCounts: expect.any(Object),
174
178
  status: StepResultStatus.SUCCESS,
175
179
  startTime: expect.any(Number),
176
180
  endTime: expect.any(Number),
@@ -183,6 +187,7 @@ describe('collect', () => {
183
187
  declaredTypes: ['my_groups'],
184
188
  partialTypes: [],
185
189
  encounteredTypes: [],
190
+ encounteredTypeCounts: expect.any(Object),
186
191
  status: StepResultStatus.SUCCESS,
187
192
  startTime: expect.any(Number),
188
193
  endTime: expect.any(Number),
@@ -194,6 +199,7 @@ describe('collect', () => {
194
199
  declaredTypes: ['my_user'],
195
200
  partialTypes: [],
196
201
  encounteredTypes: [],
202
+ encounteredTypeCounts: expect.any(Object),
197
203
  status: StepResultStatus.SUCCESS,
198
204
  startTime: expect.any(Number),
199
205
  endTime: expect.any(Number),
@@ -226,6 +232,7 @@ describe('collect', () => {
226
232
  declaredTypes: ['my_user'],
227
233
  partialTypes: [],
228
234
  encounteredTypes: [],
235
+ encounteredTypeCounts: expect.any(Object),
229
236
  status: StepResultStatus.FAILURE,
230
237
  startTime: expect.any(Number),
231
238
  endTime: expect.any(Number),
@@ -257,6 +264,7 @@ describe('collect', () => {
257
264
  declaredTypes: ['my_user'],
258
265
  partialTypes: [],
259
266
  encounteredTypes: ['my_user'],
267
+ encounteredTypeCounts: expect.any(Object),
260
268
  status: StepResultStatus.SUCCESS,
261
269
  startTime: expect.any(Number),
262
270
  endTime: expect.any(Number),
@@ -291,6 +299,7 @@ describe('collect', () => {
291
299
  declaredTypes: ['my_account'],
292
300
  partialTypes: [],
293
301
  encounteredTypes: [],
302
+ encounteredTypeCounts: expect.any(Object),
294
303
  status: StepResultStatus.DISABLED,
295
304
  },
296
305
  {
@@ -300,6 +309,7 @@ describe('collect', () => {
300
309
  declaredTypes: ['my_groups'],
301
310
  partialTypes: [],
302
311
  encounteredTypes: [],
312
+ encounteredTypeCounts: expect.any(Object),
303
313
  status: StepResultStatus.DISABLED,
304
314
  },
305
315
  {
@@ -308,6 +318,7 @@ describe('collect', () => {
308
318
  declaredTypes: ['my_user'],
309
319
  partialTypes: [],
310
320
  encounteredTypes: [],
321
+ encounteredTypeCounts: expect.any(Object),
311
322
  status: StepResultStatus.SUCCESS,
312
323
  startTime: expect.any(Number),
313
324
  endTime: expect.any(Number),
@@ -342,6 +353,7 @@ describe('collect', () => {
342
353
  declaredTypes: ['my_account'],
343
354
  partialTypes: [],
344
355
  encounteredTypes: [],
356
+ encounteredTypeCounts: expect.any(Object),
345
357
  status: StepResultStatus.SUCCESS,
346
358
  startTime: expect.any(Number),
347
359
  endTime: expect.any(Number),
@@ -354,6 +366,7 @@ describe('collect', () => {
354
366
  declaredTypes: ['my_groups'],
355
367
  partialTypes: [],
356
368
  encounteredTypes: [],
369
+ encounteredTypeCounts: expect.any(Object),
357
370
  status: StepResultStatus.DISABLED,
358
371
  },
359
372
  {
@@ -362,6 +375,7 @@ describe('collect', () => {
362
375
  declaredTypes: ['my_user'],
363
376
  partialTypes: [],
364
377
  encounteredTypes: [],
378
+ encounteredTypeCounts: expect.any(Object),
365
379
  status: StepResultStatus.SUCCESS,
366
380
  startTime: expect.any(Number),
367
381
  endTime: expect.any(Number),
@@ -398,6 +412,7 @@ describe('collect', () => {
398
412
  declaredTypes: ['my_account'],
399
413
  partialTypes: [],
400
414
  encounteredTypes: [],
415
+ encounteredTypeCounts: expect.any(Object),
401
416
  status: StepResultStatus.SUCCESS,
402
417
  startTime: expect.any(Number),
403
418
  endTime: expect.any(Number),
@@ -410,6 +425,7 @@ describe('collect', () => {
410
425
  declaredTypes: ['my_groups'],
411
426
  partialTypes: [],
412
427
  encounteredTypes: [],
428
+ encounteredTypeCounts: expect.any(Object),
413
429
  status: StepResultStatus.DISABLED,
414
430
  },
415
431
  {
@@ -418,6 +434,7 @@ describe('collect', () => {
418
434
  declaredTypes: ['my_user'],
419
435
  partialTypes: [],
420
436
  encounteredTypes: [],
437
+ encounteredTypeCounts: expect.any(Object),
421
438
  status: StepResultStatus.SUCCESS,
422
439
  startTime: expect.any(Number),
423
440
  endTime: expect.any(Number),
@@ -451,6 +468,7 @@ describe('collect', () => {
451
468
  declaredTypes: ['my_account'],
452
469
  partialTypes: [],
453
470
  encounteredTypes: [],
471
+ encounteredTypeCounts: expect.any(Object),
454
472
  status: StepResultStatus.SUCCESS,
455
473
  startTime: expect.any(Number),
456
474
  endTime: expect.any(Number),
@@ -463,6 +481,7 @@ describe('collect', () => {
463
481
  declaredTypes: ['my_groups'],
464
482
  partialTypes: [],
465
483
  encounteredTypes: [],
484
+ encounteredTypeCounts: expect.any(Object),
466
485
  status: StepResultStatus.SUCCESS,
467
486
  startTime: expect.any(Number),
468
487
  endTime: expect.any(Number),
@@ -474,6 +493,7 @@ describe('collect', () => {
474
493
  declaredTypes: ['my_user'],
475
494
  partialTypes: [],
476
495
  encounteredTypes: [],
496
+ encounteredTypeCounts: expect.any(Object),
477
497
  status: StepResultStatus.DISABLED,
478
498
  },
479
499
  ],
@@ -90,10 +90,17 @@ function newIntegration(plop: NodePlopAPI) {
90
90
  return [];
91
91
  }
92
92
 
93
+ // @jupiterone/graph-foo -> graph-foo
94
+ // graph-foo -> graph-foo
95
+ const directoryName = path.join(
96
+ process.cwd(),
97
+ path.basename(data.packageName),
98
+ );
99
+
93
100
  const actions: any[] = [];
94
101
  actions.push({
95
102
  type: 'addMany',
96
- destination: '.',
103
+ destination: directoryName,
97
104
  base: path.join(__dirname, '/template'),
98
105
  templateFiles: path.join(__dirname + '/template/**'),
99
106
  globOptions: { dot: true },
@@ -104,7 +111,10 @@ function newIntegration(plop: NodePlopAPI) {
104
111
  for (const step of data.steps) {
105
112
  actions.push({
106
113
  type: 'add',
107
- path: path.normalize(`src/steps/${kebabCase(step.name)}/index.ts`),
114
+ path: path.join(
115
+ directoryName,
116
+ path.normalize(`src/steps/${kebabCase(step.name)}/index.ts`),
117
+ ),
108
118
  templateFile: path.join(__dirname, 'stepTemplate/index.ts.hbs'),
109
119
  data: step,
110
120
  force: true,
@@ -113,19 +123,19 @@ function newIntegration(plop: NodePlopAPI) {
113
123
 
114
124
  actions.push({
115
125
  type: 'yarnInstall',
116
- path: '.',
126
+ path: directoryName,
117
127
  verbose: true,
118
128
  });
119
129
 
120
130
  actions.push({
121
131
  type: 'yarnFormat',
122
- path: '.',
132
+ path: directoryName,
123
133
  verbose: true,
124
134
  });
125
135
 
126
136
  actions.push({
127
137
  type: 'yarnLint',
128
- path: '.',
138
+ path: directoryName,
129
139
  verbose: true,
130
140
  });
131
141
 
@@ -27,27 +27,3 @@ jobs:
27
27
 
28
28
  - name: Run build
29
29
  run: yarn build
30
-
31
- # Publishing is done in a separate job to allow
32
- # for all matrix builds to complete.
33
- BuildRelease:
34
- needs: test
35
- runs-on: ubuntu-latest
36
- if: github.ref == 'refs/heads/main'
37
- name: Checkout Code
38
- steps:
39
- - name: Check out repo
40
- uses: actions/checkout@v3
41
- with:
42
- fetch-depth: 0
43
- token: $\{{ secrets.AUTO_GITHUB_PAT_TOKEN }}
44
- - name: Setup Node
45
- uses: actions/setup-node@v3
46
- with:
47
- node-version: 18.x
48
- cache: yarn
49
- - name: Build and Release
50
- uses: jupiterone/action-npm-build-release@v1
51
- with:
52
- npm_auth_token: $\{{ secrets.NPM_AUTH_TOKEN }}
53
- gh_token: $\{{ secrets.AUTO_GITHUB_PAT_TOKEN }}
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "{{packageName}}",
3
- "version": "0.0.0",
3
+ "version": "0.0.1",
4
4
  "description": "{{packageDescription}}",
5
5
  "license": "MPL-2.0",
6
- "main": "src/index.js",
7
- "types": "src/index.d.ts",
6
+ "main": "dist/src/index.js",
7
+ "types": "dist/src/index.d.ts",
8
8
  "files": [
9
9
  "src",
10
10
  "jupiterone"
@@ -13,7 +13,7 @@
13
13
  "access": "public"
14
14
  },
15
15
  "engines": {
16
- "node": ">=18.0.0 <19.x"
16
+ "node": ">=18.0.0 <20.x"
17
17
  },
18
18
  "scripts": {
19
19
  "start": "j1-integration collect",
@@ -36,28 +36,11 @@
36
36
  "postversion": "cp package.json ./dist/package.json"
37
37
  },
38
38
  "peerDependencies": {
39
- "@jupiterone/integration-sdk-core": "^10.5.0"
39
+ "@jupiterone/integration-sdk-core": "^12.0.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@jupiterone/integration-sdk-core": "^10.5.0",
43
- "@jupiterone/integration-sdk-dev-tools": "^10.5.0",
44
- "@jupiterone/integration-sdk-testing": "^10.5.0",
45
- "auto": "^10.36.5"
46
- },
47
- "auto": {
48
- "plugins": [
49
- [
50
- "npm",
51
- {
52
- "setRcToken": false,
53
- "publishFolder": "./dist"
54
- }
55
- ],
56
- "released"
57
- ],
58
- "onlyPublishWithReleaseLabel": true,
59
- "shipit": {
60
- "prerelease": false
61
- }
42
+ "@jupiterone/integration-sdk-core": "^12.0.0",
43
+ "@jupiterone/integration-sdk-dev-tools": "^12.0.0",
44
+ "@jupiterone/integration-sdk-testing": "^12.0.0",
62
45
  }
63
46
  }
@@ -1,69 +0,0 @@
1
- # For most projects, this workflow file will not need changing; you simply need
2
- # to commit it to your repository.
3
- #
4
- # You may wish to alter this file to override the set of languages analyzed,
5
- # or to provide custom queries or build logic.
6
- #
7
- # ******** NOTE ********
8
- # We have attempted to detect the languages in your repository. Please check
9
- # the `language` matrix defined below to confirm you have the correct set of
10
- # supported CodeQL languages.
11
- #
12
- name: 'CodeQL'
13
-
14
- on:
15
- push:
16
- branches: ['main']
17
- pull_request:
18
- # The branches below must be a subset of the branches above
19
- branches: ['main']
20
-
21
- jobs:
22
- analyze:
23
- name: Analyze
24
- runs-on: ubuntu-latest
25
- permissions:
26
- actions: read
27
- contents: read
28
- security-events: write
29
-
30
- strategy:
31
- fail-fast: false
32
- matrix:
33
- language: ['javascript']
34
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
35
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
36
-
37
- steps:
38
- - name: Checkout repository
39
- uses: actions/checkout@v3
40
-
41
- # Initializes the CodeQL tools for scanning.
42
- - name: Initialize CodeQL
43
- uses: github/codeql-action/init@v2
44
- with:
45
- languages: $\{{ matrix.language }}
46
- # If you wish to specify custom queries, you can do so here or in a config file.
47
- # By default, queries listed here will override any specified in a config file.
48
- # Prefix the list here with "+" to use these queries and those in the config file.
49
-
50
- # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
51
- queries: security-extended,security-and-quality
52
-
53
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54
- # If this step fails, then you should remove it and run the build manually (see below)
55
- - name: Autobuild
56
- uses: github/codeql-action/autobuild@v2
57
-
58
- # ℹ️ Command-line programs to run using the OS shell.
59
- # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
60
-
61
- # If the Autobuild fails above, remove it and uncomment the following three lines.
62
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
63
-
64
- # - run: |
65
- # echo "Run, Build Application using script"
66
- # ./location_of_script_within_repo/buildscript.sh
67
-
68
- - name: Perform CodeQL Analysis
69
- uses: github/codeql-action/analyze@v2
@@ -1,36 +0,0 @@
1
- name: J1 Integration deployment
2
-
3
- on:
4
- release:
5
- types:
6
- - published
7
-
8
- jobs:
9
- j1-integration-deployment:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - name: Get integration name
13
- id: get-integration-name
14
- uses: actions/github-script@0.9.0
15
- with:
16
- script: |
17
- const repositoryName = context.payload.repository.name
18
- const integrationName = repositoryName.replace("graph-", "")
19
- core.setOutput('integrationName', integrationName)
20
- - name: Get version number
21
- id: get-version-number
22
- uses: actions/github-script@0.9.0
23
- with:
24
- script: |
25
- const tagName = context.payload.release.tag_name
26
- const versionNumber = tagName.replace("v", "")
27
- core.setOutput('versionNumber', versionNumber)
28
- - name: Bump integration deployment version
29
- uses: JupiterOne/integration-github-actions/create-integration-deployment@v1
30
- with:
31
- integrationName:
32
- $\{{ steps.get-integration-name.outputs.integrationName }}
33
- releaseNotes: $\{{ github.event.release.body }}
34
- version: $\{{ steps.get-version-number.outputs.versionNumber }}
35
- githubToken: $\{{ secrets.AUTO_GITHUB_PAT_TOKEN }}
36
- npmAuthToken: $\{{ secrets.NPM_AUTH_TOKEN }}
@@ -1,69 +0,0 @@
1
- # For most projects, this workflow file will not need changing; you simply need
2
- # to commit it to your repository.
3
- #
4
- # You may wish to alter this file to override the set of languages analyzed,
5
- # or to provide custom queries or build logic.
6
- #
7
- # ******** NOTE ********
8
- # We have attempted to detect the languages in your repository. Please check
9
- # the `language` matrix defined below to confirm you have the correct set of
10
- # supported CodeQL languages.
11
- #
12
- name: 'CodeQL'
13
-
14
- on:
15
- push:
16
- branches: ['main']
17
- pull_request:
18
- # The branches below must be a subset of the branches above
19
- branches: ['main']
20
-
21
- jobs:
22
- analyze:
23
- name: Analyze
24
- runs-on: ubuntu-latest
25
- permissions:
26
- actions: read
27
- contents: read
28
- security-events: write
29
-
30
- strategy:
31
- fail-fast: false
32
- matrix:
33
- language: ['javascript']
34
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
35
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
36
-
37
- steps:
38
- - name: Checkout repository
39
- uses: actions/checkout@v3
40
-
41
- # Initializes the CodeQL tools for scanning.
42
- - name: Initialize CodeQL
43
- uses: github/codeql-action/init@v2
44
- with:
45
- languages: $\{{ matrix.language }}
46
- # If you wish to specify custom queries, you can do so here or in a config file.
47
- # By default, queries listed here will override any specified in a config file.
48
- # Prefix the list here with "+" to use these queries and those in the config file.
49
-
50
- # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
51
- queries: security-extended,security-and-quality
52
-
53
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54
- # If this step fails, then you should remove it and run the build manually (see below)
55
- - name: Autobuild
56
- uses: github/codeql-action/autobuild@v2
57
-
58
- # ℹ️ Command-line programs to run using the OS shell.
59
- # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
60
-
61
- # If the Autobuild fails above, remove it and uncomment the following three lines.
62
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
63
-
64
- # - run: |
65
- # echo "Run, Build Application using script"
66
- # ./location_of_script_within_repo/buildscript.sh
67
-
68
- - name: Perform CodeQL Analysis
69
- uses: github/codeql-action/analyze@v2
@@ -1,36 +0,0 @@
1
- name: J1 Integration deployment
2
-
3
- on:
4
- release:
5
- types:
6
- - published
7
-
8
- jobs:
9
- j1-integration-deployment:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - name: Get integration name
13
- id: get-integration-name
14
- uses: actions/github-script@0.9.0
15
- with:
16
- script: |
17
- const repositoryName = context.payload.repository.name
18
- const integrationName = repositoryName.replace("graph-", "")
19
- core.setOutput('integrationName', integrationName)
20
- - name: Get version number
21
- id: get-version-number
22
- uses: actions/github-script@0.9.0
23
- with:
24
- script: |
25
- const tagName = context.payload.release.tag_name
26
- const versionNumber = tagName.replace("v", "")
27
- core.setOutput('versionNumber', versionNumber)
28
- - name: Bump integration deployment version
29
- uses: JupiterOne/integration-github-actions/create-integration-deployment@v1
30
- with:
31
- integrationName:
32
- $\{{ steps.get-integration-name.outputs.integrationName }}
33
- releaseNotes: $\{{ github.event.release.body }}
34
- version: $\{{ steps.get-version-number.outputs.versionNumber }}
35
- githubToken: $\{{ secrets.AUTO_GITHUB_PAT_TOKEN }}
36
- npmAuthToken: $\{{ secrets.NPM_AUTH_TOKEN }}