@jupiterone/integration-sdk-cli 10.7.1 → 11.0.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/dist/src/commands/options.d.ts +0 -2
- package/dist/src/commands/options.js +0 -4
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/run.js +0 -2
- package/dist/src/commands/run.js.map +1 -1
- package/dist/src/generator/template/.prettierignore.hbs +2 -1
- package/dist/tsconfig.dist.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/__tests__/options.test.ts +0 -3
- package/src/commands/options.ts +0 -17
- package/src/commands/run.ts +0 -3
- package/src/generator/template/.prettierignore.hbs +2 -1
- package/src/visualization/__tests__/createMappedRelationshipNodesAndEdges.test.ts +7 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupiterone/integration-sdk-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.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": "^
|
|
29
|
-
"@jupiterone/integration-sdk-runtime": "^
|
|
28
|
+
"@jupiterone/integration-sdk-core": "^11.0.0",
|
|
29
|
+
"@jupiterone/integration-sdk-runtime": "^11.0.0",
|
|
30
30
|
"chalk": "^4",
|
|
31
31
|
"commander": "^9.4.0",
|
|
32
32
|
"fs-extra": "^10.1.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"vis": "^4.21.0-EOL"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@jupiterone/integration-sdk-private-test-utils": "^
|
|
47
|
+
"@jupiterone/integration-sdk-private-test-utils": "^11.0.0",
|
|
48
48
|
"@pollyjs/adapter-node-http": "^6.0.5",
|
|
49
49
|
"@pollyjs/core": "^6.0.5",
|
|
50
50
|
"@pollyjs/persister-fs": "^6.0.5",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"memfs": "^3.2.0",
|
|
57
57
|
"neo-forgery": "^2.0.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "628e133a3ba1564d12736c1ba3654ee78dcc93e3"
|
|
60
60
|
}
|
|
@@ -9,15 +9,12 @@ import {
|
|
|
9
9
|
validateSyncOptions,
|
|
10
10
|
} from '../commands/options';
|
|
11
11
|
import {
|
|
12
|
-
DEFAULT_UPLOAD_BATCH_SIZE,
|
|
13
12
|
JUPITERONE_DEV_API_BASE_URL,
|
|
14
13
|
JUPITERONE_PROD_API_BASE_URL,
|
|
15
14
|
} from '@jupiterone/integration-sdk-runtime';
|
|
16
15
|
|
|
17
16
|
const syncOptions = (values?: Partial<SyncOptions>): SyncOptions => ({
|
|
18
17
|
source: 'integration-managed',
|
|
19
|
-
uploadBatchSize: DEFAULT_UPLOAD_BATCH_SIZE,
|
|
20
|
-
uploadRelationshipBatchSize: DEFAULT_UPLOAD_BATCH_SIZE,
|
|
21
18
|
skipFinalize: false,
|
|
22
19
|
...values,
|
|
23
20
|
});
|
package/src/commands/options.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
DEFAULT_UPLOAD_BATCH_SIZE,
|
|
3
2
|
getAccountFromEnvironment,
|
|
4
3
|
getApiKeyFromEnvironment,
|
|
5
4
|
JUPITERONE_DEV_API_BASE_URL,
|
|
@@ -39,8 +38,6 @@ export interface SyncOptions {
|
|
|
39
38
|
source: 'integration-managed' | 'integration-external' | 'api';
|
|
40
39
|
scope?: string | undefined;
|
|
41
40
|
integrationInstanceId?: string | undefined;
|
|
42
|
-
uploadBatchSize: number;
|
|
43
|
-
uploadRelationshipBatchSize: number;
|
|
44
41
|
skipFinalize: boolean;
|
|
45
42
|
}
|
|
46
43
|
|
|
@@ -69,18 +66,6 @@ export function addSyncOptionsToCommand(command: Command): Command {
|
|
|
69
66
|
'integration-managed',
|
|
70
67
|
)
|
|
71
68
|
.option('--scope <anystring>', 'specify synchronization job scope value')
|
|
72
|
-
.option(
|
|
73
|
-
'-u, --upload-batch-size <number>',
|
|
74
|
-
'specify number of entities and relationships per upload batch',
|
|
75
|
-
(value, _previous: Number) => Number(value),
|
|
76
|
-
DEFAULT_UPLOAD_BATCH_SIZE,
|
|
77
|
-
)
|
|
78
|
-
.option(
|
|
79
|
-
'-ur, --upload-relationship-batch-size <number>',
|
|
80
|
-
'specify number of relationships per upload batch, overrides --upload-batch-size',
|
|
81
|
-
(value, _previous: Number) => Number(value),
|
|
82
|
-
DEFAULT_UPLOAD_BATCH_SIZE,
|
|
83
|
-
)
|
|
84
69
|
.option(
|
|
85
70
|
'--skip-finalize',
|
|
86
71
|
'skip synchronization finalization to leave job open for additional uploads',
|
|
@@ -127,8 +112,6 @@ export function getSyncOptions(options: OptionValues): SyncOptions {
|
|
|
127
112
|
source: options.source,
|
|
128
113
|
scope: options.scope,
|
|
129
114
|
integrationInstanceId: options.integrationInstanceId,
|
|
130
|
-
uploadBatchSize: options.uploadBatchSize,
|
|
131
|
-
uploadRelationshipBatchSize: options.uploadRelationshipBatchSize,
|
|
132
115
|
skipFinalize: options.skipFinalize,
|
|
133
116
|
};
|
|
134
117
|
}
|
package/src/commands/run.ts
CHANGED
|
@@ -109,9 +109,6 @@ export function run(): Command {
|
|
|
109
109
|
stepId,
|
|
110
110
|
synchronizationJobContext: synchronizationContext,
|
|
111
111
|
uploadConcurrency: DEFAULT_UPLOAD_CONCURRENCY,
|
|
112
|
-
uploadBatchSize: options.uploadBatchSize,
|
|
113
|
-
uploadRelationshipsBatchSize:
|
|
114
|
-
options.uploadRelationshipBatchSize,
|
|
115
112
|
});
|
|
116
113
|
},
|
|
117
114
|
},
|
|
@@ -17,7 +17,7 @@ describe('#createMappedRelationshipNodesAndEdges', () => {
|
|
|
17
17
|
_mapping: {
|
|
18
18
|
relationshipDirection: RelationshipDirection.FORWARD,
|
|
19
19
|
sourceEntityKey: 'key-1',
|
|
20
|
-
targetFilterKeys: ['_key'],
|
|
20
|
+
targetFilterKeys: [['_key']],
|
|
21
21
|
targetEntity: {
|
|
22
22
|
_key: 'key-2',
|
|
23
23
|
},
|
|
@@ -140,7 +140,7 @@ describe('#createMappedRelationshipNodesAndEdges', () => {
|
|
|
140
140
|
_mapping: {
|
|
141
141
|
relationshipDirection: RelationshipDirection.FORWARD,
|
|
142
142
|
sourceEntityKey: 'key-1',
|
|
143
|
-
targetFilterKeys: ['_key'],
|
|
143
|
+
targetFilterKeys: [['_key']],
|
|
144
144
|
targetEntity: {
|
|
145
145
|
_key: '789',
|
|
146
146
|
},
|
|
@@ -154,7 +154,7 @@ describe('#createMappedRelationshipNodesAndEdges', () => {
|
|
|
154
154
|
_mapping: {
|
|
155
155
|
relationshipDirection: RelationshipDirection.FORWARD,
|
|
156
156
|
sourceEntityKey: 'key-2',
|
|
157
|
-
targetFilterKeys: ['_key'],
|
|
157
|
+
targetFilterKeys: [['_key']],
|
|
158
158
|
targetEntity: {
|
|
159
159
|
_key: '789',
|
|
160
160
|
},
|
|
@@ -218,7 +218,7 @@ describe('#createMappedRelationshipNodesAndEdges', () => {
|
|
|
218
218
|
_mapping: {
|
|
219
219
|
relationshipDirection: RelationshipDirection.FORWARD,
|
|
220
220
|
sourceEntityKey: 'key-1',
|
|
221
|
-
targetFilterKeys: ['_class'],
|
|
221
|
+
targetFilterKeys: [['_class']],
|
|
222
222
|
targetEntity: {
|
|
223
223
|
_class: '789',
|
|
224
224
|
},
|
|
@@ -232,7 +232,7 @@ describe('#createMappedRelationshipNodesAndEdges', () => {
|
|
|
232
232
|
_mapping: {
|
|
233
233
|
relationshipDirection: RelationshipDirection.FORWARD,
|
|
234
234
|
sourceEntityKey: 'key-2',
|
|
235
|
-
targetFilterKeys: ['_class'],
|
|
235
|
+
targetFilterKeys: [['_class']],
|
|
236
236
|
targetEntity: {
|
|
237
237
|
_class: '789',
|
|
238
238
|
},
|
|
@@ -299,7 +299,7 @@ describe('#createMappedRelationshipNodesAndEdges', () => {
|
|
|
299
299
|
_mapping: {
|
|
300
300
|
relationshipDirection: RelationshipDirection.FORWARD,
|
|
301
301
|
sourceEntityKey: 'key-1',
|
|
302
|
-
targetFilterKeys: ['_type'],
|
|
302
|
+
targetFilterKeys: [['_type']],
|
|
303
303
|
targetEntity: {
|
|
304
304
|
_type: '789',
|
|
305
305
|
},
|
|
@@ -477,13 +477,12 @@ describe('#CreatePlaceholderEntity', () => {
|
|
|
477
477
|
id: 'target-id',
|
|
478
478
|
otherKey: 'otherValue',
|
|
479
479
|
},
|
|
480
|
-
targetFilterKeys: [
|
|
480
|
+
targetFilterKeys: [['_key', '_type']],
|
|
481
481
|
},
|
|
482
482
|
};
|
|
483
483
|
|
|
484
484
|
expect(createPlaceholderEntity(mappedRelationship._mapping)).toEqual({
|
|
485
485
|
_key: 'target-key',
|
|
486
|
-
id: 'target-id',
|
|
487
486
|
_type: 'target-type',
|
|
488
487
|
});
|
|
489
488
|
});
|