Skip to content

Commit 7485b2a

Browse files
committed
Merge branch 'main' into add_event_code
2 parents 01cd8c2 + 2da7049 commit 7485b2a

File tree

41 files changed

+261
-272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+261
-272
lines changed

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,39 @@ and this project adheres to
99

1010
## Unreleased
1111

12+
## 10.5.3 - 2023-09-18
13+
14+
- Use the same logger for all logs created via the `j1-integration run` command
15+
to improve formatting consistency
16+
- Update internal `err` log serializer
17+
18+
## 10.5.2 - 2023-09-14
19+
20+
- Improvements to integration graph generator
21+
22+
## 10.5.0 - 2023-09-12
23+
24+
- Add `error_unexpected_error` to IntegrationErrorEventName
25+
26+
## 10.4.0 - 2023-09-11
27+
28+
- Revert change in 10.1.0 due to system health issues
29+
30+
## 10.3.0 - 2023-09-07
31+
32+
- Update `jest.js` config to remove deprecated option.
33+
- Add `--noPretty` option to cli to disable pretty printing of logs locally.
34+
35+
## 10.2.0 - 2023-09-01
36+
37+
- Allow user to override `AlphaOptions` in `createApiClient`
38+
39+
## 10.1.0 - 2023-08-28
40+
41+
- 'InMemoryGraphObjectStore' no longer stores a set amount of entities or
42+
relationships, rather it works by measuring size in bytes of graph objects by
43+
default.
44+
1245
## 10.0.0 - 2023-08-03
1346

1447
- Bump TypeScript, ESLint, and Prettier to next major versions. Integration

docs/integrations/development.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,6 +1459,10 @@ ex: `j1-integration collect --step step-fetch-users --cache-path ./my-cache`
14591459

14601460
Disables schema validation.
14611461

1462+
###### Option `--noPretty`
1463+
1464+
Disables pretty printing of logs and collected data.
1465+
14621466
#### Command `j1-integration sync`
14631467

14641468
Validates data collected by the `collect` command and uploads it to JupiterOne.
@@ -1558,6 +1562,10 @@ Cannot be used with the `--development` flag.
15581562
ex:
15591563
`yarn j1-integration sync --integrationInstanceId <integration instance id> --api-base-url <api base url>`
15601564

1565+
###### Option `--noPretty`
1566+
1567+
Disables pretty printing of logs.
1568+
15611569
#### Command `j1-integration run`
15621570

15631571
The `j1-integration run` command combines the functionality of the `collect` and

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"packages/integration-sdk-*",
55
"packages/cli"
66
],
7-
"version": "10.1.0"
7+
"version": "10.5.3"
88
}

packages/cli/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jupiterone/cli",
3-
"version": "10.1.0",
3+
"version": "10.5.3",
44
"description": "The JupiterOne cli",
55
"main": "dist/src/index.js",
66
"types": "dist/src/index.d.ts",
@@ -24,8 +24,8 @@
2424
"test": "jest"
2525
},
2626
"dependencies": {
27-
"@jupiterone/integration-sdk-core": "^10.1.0",
28-
"@jupiterone/integration-sdk-runtime": "^10.1.0",
27+
"@jupiterone/integration-sdk-core": "^10.5.3",
28+
"@jupiterone/integration-sdk-runtime": "^10.5.3",
2929
"@lifeomic/attempt": "^3.0.3",
3030
"commander": "^5.0.0",
3131
"globby": "^11.0.1",

packages/integration-sdk-benchmark/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jupiterone/integration-sdk-benchmark",
3-
"version": "10.1.0",
3+
"version": "10.5.3",
44
"private": true,
55
"description": "SDK benchmarking scripts",
66
"main": "./src/index.js",
@@ -15,8 +15,8 @@
1515
"benchmark": "for file in ./src/benchmarks/*; do yarn prebenchmark && node $file; done"
1616
},
1717
"dependencies": {
18-
"@jupiterone/integration-sdk-core": "^10.1.0",
19-
"@jupiterone/integration-sdk-runtime": "^10.1.0",
18+
"@jupiterone/integration-sdk-core": "^10.5.3",
19+
"@jupiterone/integration-sdk-runtime": "^10.5.3",
2020
"benchmark": "^2.1.4"
2121
}
2222
}

packages/integration-sdk-cli/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
# @jupiterone/integration-sdk-cli
22

3-
_NOTE:_ This project is currently under development and the API interface is not
4-
stable. Use at your own risk.
5-
63
This package exposes a CLI tool that assists with executing integrations
74
locally.
85

6+
## Integration graph generator
7+
8+
Create a git repository for your integration graph with
9+
`graph-(integrationName)` name and execute the following command inside it:
10+
11+
```
12+
npx @jupiterone/integration-sdk-cli generate
13+
```
14+
15+
You will be prompted with some questions and the graph code will be generated so
16+
you can start development.
17+
918
## Installation
1019

1120
```

packages/integration-sdk-cli/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jupiterone/integration-sdk-cli",
3-
"version": "10.1.0",
3+
"version": "10.5.3",
44
"description": "The SDK for developing JupiterOne integrations",
55
"main": "dist/src/index.js",
66
"types": "dist/src/index.d.ts",
@@ -25,8 +25,8 @@
2525
},
2626
"dependencies": {
2727
"@jupiterone/data-model": "^0.54.0",
28-
"@jupiterone/integration-sdk-core": "^10.1.0",
29-
"@jupiterone/integration-sdk-runtime": "^10.1.0",
28+
"@jupiterone/integration-sdk-core": "^10.5.3",
29+
"@jupiterone/integration-sdk-runtime": "^10.5.3",
3030
"chalk": "^4",
3131
"commander": "^9.4.0",
3232
"fs-extra": "^10.1.0",
@@ -44,7 +44,7 @@
4444
"vis": "^4.21.0-EOL"
4545
},
4646
"devDependencies": {
47-
"@jupiterone/integration-sdk-private-test-utils": "^10.1.0",
47+
"@jupiterone/integration-sdk-private-test-utils": "^10.5.3",
4848
"@pollyjs/adapter-node-http": "^6.0.5",
4949
"@pollyjs/core": "^6.0.5",
5050
"@pollyjs/persister-fs": "^6.0.5",

packages/integration-sdk-cli/src/__tests__/cli-run-failure.test.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ import { Polly } from '@pollyjs/core';
22
import NodeHttpAdapter from '@pollyjs/adapter-node-http';
33
import FSPersister from '@pollyjs/persister-fs';
44
import { loadProjectStructure } from '@jupiterone/integration-sdk-private-test-utils';
5-
import { SynchronizationJobStatus } from '@jupiterone/integration-sdk-core';
65
import { generateSynchronizationJob } from './util/synchronization';
76
import { createCli } from '../index';
87
import { setupSynchronizerApi } from './util/synchronization';
9-
import * as log from '../log';
108
import { createTestPolly } from './util/recording';
119

1210
jest.mock('../log');
@@ -37,17 +35,20 @@ test('aborts synchronization job if an error occurs', async () => {
3735

3836
setupSynchronizerApi({ polly, job, baseUrl: 'https://api.us.jupiterone.io' });
3937

38+
let calledAbort = false;
39+
polly.server
40+
.post(
41+
`https://api.us.jupiterone.io/persister/synchronization/jobs/${job.id}/abort`,
42+
)
43+
.intercept((req, res) => {
44+
calledAbort = true;
45+
});
4046
await createCli().parseAsync([
4147
'node',
4248
'j1-integration',
4349
'run',
4450
'--integrationInstanceId',
4551
'test',
4652
]);
47-
48-
expect(log.displaySynchronizationResults).toHaveBeenCalledTimes(1);
49-
expect(log.displaySynchronizationResults).toHaveBeenCalledWith({
50-
...job,
51-
status: SynchronizationJobStatus.ABORTED,
52-
});
53+
expect(calledAbort).toBe(true);
5354
});

0 commit comments

Comments
 (0)