@jupiterone/integration-sdk-cli 17.2.2-canary-1188-1.0 → 17.2.2-canary-1188-21458536266.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/bocchi/bocchi.js +17 -7
- package/dist/src/bocchi/bocchi.js.map +1 -1
- package/dist/src/commands/collect.js +17 -7
- package/dist/src/commands/collect.js.map +1 -1
- package/dist/src/commands/document.js +17 -7
- package/dist/src/commands/document.js.map +1 -1
- package/dist/src/commands/generate-ingestion-sources-config.js +17 -7
- package/dist/src/commands/generate-ingestion-sources-config.js.map +1 -1
- package/dist/src/commands/generate-integration-graph-schema.js +17 -7
- package/dist/src/commands/generate-integration-graph-schema.js.map +1 -1
- package/dist/src/commands/neo4j.js +17 -7
- package/dist/src/commands/neo4j.js.map +1 -1
- package/dist/src/commands/sync.js +17 -7
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/validate-question-file.js +17 -7
- package/dist/src/commands/validate-question-file.js.map +1 -1
- package/dist/src/commands/visualize-types.js +17 -7
- package/dist/src/commands/visualize-types.js.map +1 -1
- package/dist/src/commands/visualize.js +17 -7
- package/dist/src/commands/visualize.js.map +1 -1
- package/dist/src/config.js +17 -7
- package/dist/src/config.js.map +1 -1
- package/dist/src/neo4j/neo4jGraphStore.js +17 -7
- package/dist/src/neo4j/neo4jGraphStore.js.map +1 -1
- package/dist/src/questions/managedQuestionFileValidator.js +17 -7
- package/dist/src/questions/managedQuestionFileValidator.js.map +1 -1
- package/dist/src/utils/getSortedJupiterOneTypes.js +17 -7
- package/dist/src/utils/getSortedJupiterOneTypes.js.map +1 -1
- package/dist/src/visualization/generateDependencyVisualization.js +17 -7
- package/dist/src/visualization/generateDependencyVisualization.js.map +1 -1
- package/dist/src/visualization/generateVisualization.js +17 -7
- package/dist/src/visualization/generateVisualization.js.map +1 -1
- package/dist/tsconfig.dist.tsbuildinfo +1 -1
- package/package.json +7 -5
- package/src/questions/managedQuestionFileValidator.test.ts +19 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupiterone/integration-sdk-cli",
|
|
3
|
-
"version": "17.2.2-canary-1188-
|
|
3
|
+
"version": "17.2.2-canary-1188-21458536266.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,10 +25,12 @@
|
|
|
25
25
|
"plop": "plop --plopfile dist/src/generator/newIntegration.js"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@jupiterone/integration-sdk-core": "^17.2.2-canary-1188-
|
|
29
|
-
"@jupiterone/integration-sdk-runtime": "^17.2.2-canary-1188-
|
|
28
|
+
"@jupiterone/integration-sdk-core": "^17.2.2-canary-1188-21458536266.0",
|
|
29
|
+
"@jupiterone/integration-sdk-runtime": "^17.2.2-canary-1188-21458536266.0",
|
|
30
30
|
"chalk": "^4",
|
|
31
31
|
"commander": "^9.4.0",
|
|
32
|
+
"dotenv": "^16.0.0",
|
|
33
|
+
"dotenv-expand": "^5.1.0",
|
|
32
34
|
"ejs": "^3.1.9",
|
|
33
35
|
"fs-extra": "^10.1.0",
|
|
34
36
|
"globby": "^11.0.0",
|
|
@@ -44,7 +46,7 @@
|
|
|
44
46
|
},
|
|
45
47
|
"devDependencies": {
|
|
46
48
|
"@jupiterone/data-model": "^0.62.0",
|
|
47
|
-
"@jupiterone/integration-sdk-private-test-utils": "^17.2.2-canary-1188-
|
|
49
|
+
"@jupiterone/integration-sdk-private-test-utils": "^17.2.2-canary-1188-21458536266.0",
|
|
48
50
|
"@pollyjs/adapter-node-http": "^6.0.5",
|
|
49
51
|
"@pollyjs/core": "^6.0.5",
|
|
50
52
|
"@pollyjs/persister-fs": "^6.0.5",
|
|
@@ -60,5 +62,5 @@
|
|
|
60
62
|
"peerDependencies": {
|
|
61
63
|
"@jupiterone/data-model": ">= 0.62.0"
|
|
62
64
|
},
|
|
63
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "4b316ef1ceca147e9280dccb8470148624ff023b"
|
|
64
66
|
}
|
|
@@ -2,9 +2,20 @@ import {
|
|
|
2
2
|
createApiClient,
|
|
3
3
|
getApiBaseUrl,
|
|
4
4
|
} from '@jupiterone/integration-sdk-runtime';
|
|
5
|
+
import type { RequestClientResponse } from '@jupiterone/platform-sdk-fetch';
|
|
5
6
|
import path from 'path';
|
|
6
7
|
import { validateManagedQuestionFile } from './managedQuestionFileValidator';
|
|
7
8
|
|
|
9
|
+
function createMockResponse<T>(data: T): RequestClientResponse<T> {
|
|
10
|
+
return {
|
|
11
|
+
data,
|
|
12
|
+
status: 200,
|
|
13
|
+
statusText: 'OK',
|
|
14
|
+
headers: {} as any,
|
|
15
|
+
config: {} as any,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
8
19
|
function getFixturePath(fixtureName: string) {
|
|
9
20
|
return path.join(
|
|
10
21
|
__dirname,
|
|
@@ -112,8 +123,8 @@ describe('#validateManagedQuestionFile non-dryRun', () => {
|
|
|
112
123
|
account: 'test-account',
|
|
113
124
|
});
|
|
114
125
|
|
|
115
|
-
const postSpy = jest.spyOn(apiClient, 'post').mockResolvedValue(
|
|
116
|
-
|
|
126
|
+
const postSpy = jest.spyOn(apiClient, 'post').mockResolvedValue(
|
|
127
|
+
createMockResponse([
|
|
117
128
|
{
|
|
118
129
|
query: 'find google_user with email $="@{{domain}}"',
|
|
119
130
|
valid: true,
|
|
@@ -122,8 +133,8 @@ describe('#validateManagedQuestionFile non-dryRun', () => {
|
|
|
122
133
|
query: 'find google_user with email !$="@{{domain}}"',
|
|
123
134
|
valid: true,
|
|
124
135
|
},
|
|
125
|
-
],
|
|
126
|
-
|
|
136
|
+
]),
|
|
137
|
+
);
|
|
127
138
|
|
|
128
139
|
await validateManagedQuestionFile({
|
|
129
140
|
apiClient,
|
|
@@ -147,8 +158,8 @@ describe('#validateManagedQuestionFile non-dryRun', () => {
|
|
|
147
158
|
|
|
148
159
|
const invalidQueryResult = 'find google_user with email $="@{{domain}}"';
|
|
149
160
|
|
|
150
|
-
const postSpy = jest.spyOn(apiClient, 'post').mockResolvedValue(
|
|
151
|
-
|
|
161
|
+
const postSpy = jest.spyOn(apiClient, 'post').mockResolvedValue(
|
|
162
|
+
createMockResponse([
|
|
152
163
|
{
|
|
153
164
|
query: invalidQueryResult,
|
|
154
165
|
// NOTE: Mock invalid query response!
|
|
@@ -158,8 +169,8 @@ describe('#validateManagedQuestionFile non-dryRun', () => {
|
|
|
158
169
|
query: 'find google_user with email !$="@{{domain}}"',
|
|
159
170
|
valid: true,
|
|
160
171
|
},
|
|
161
|
-
],
|
|
162
|
-
|
|
172
|
+
]),
|
|
173
|
+
);
|
|
163
174
|
|
|
164
175
|
await expect(() =>
|
|
165
176
|
validateManagedQuestionFile({
|