@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.
Files changed (35) hide show
  1. package/dist/src/bocchi/bocchi.js +17 -7
  2. package/dist/src/bocchi/bocchi.js.map +1 -1
  3. package/dist/src/commands/collect.js +17 -7
  4. package/dist/src/commands/collect.js.map +1 -1
  5. package/dist/src/commands/document.js +17 -7
  6. package/dist/src/commands/document.js.map +1 -1
  7. package/dist/src/commands/generate-ingestion-sources-config.js +17 -7
  8. package/dist/src/commands/generate-ingestion-sources-config.js.map +1 -1
  9. package/dist/src/commands/generate-integration-graph-schema.js +17 -7
  10. package/dist/src/commands/generate-integration-graph-schema.js.map +1 -1
  11. package/dist/src/commands/neo4j.js +17 -7
  12. package/dist/src/commands/neo4j.js.map +1 -1
  13. package/dist/src/commands/sync.js +17 -7
  14. package/dist/src/commands/sync.js.map +1 -1
  15. package/dist/src/commands/validate-question-file.js +17 -7
  16. package/dist/src/commands/validate-question-file.js.map +1 -1
  17. package/dist/src/commands/visualize-types.js +17 -7
  18. package/dist/src/commands/visualize-types.js.map +1 -1
  19. package/dist/src/commands/visualize.js +17 -7
  20. package/dist/src/commands/visualize.js.map +1 -1
  21. package/dist/src/config.js +17 -7
  22. package/dist/src/config.js.map +1 -1
  23. package/dist/src/neo4j/neo4jGraphStore.js +17 -7
  24. package/dist/src/neo4j/neo4jGraphStore.js.map +1 -1
  25. package/dist/src/questions/managedQuestionFileValidator.js +17 -7
  26. package/dist/src/questions/managedQuestionFileValidator.js.map +1 -1
  27. package/dist/src/utils/getSortedJupiterOneTypes.js +17 -7
  28. package/dist/src/utils/getSortedJupiterOneTypes.js.map +1 -1
  29. package/dist/src/visualization/generateDependencyVisualization.js +17 -7
  30. package/dist/src/visualization/generateDependencyVisualization.js.map +1 -1
  31. package/dist/src/visualization/generateVisualization.js +17 -7
  32. package/dist/src/visualization/generateVisualization.js.map +1 -1
  33. package/dist/tsconfig.dist.tsbuildinfo +1 -1
  34. package/package.json +7 -5
  35. 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-1.0",
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-1.0",
29
- "@jupiterone/integration-sdk-runtime": "^17.2.2-canary-1188-1.0",
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-1.0",
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": "33737e5f858e08c439607d67e3704ba222bbeaf2"
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
- data: [
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
- data: [
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({