Skip to content

Commit 472ca01

Browse files
author
Geovanni Pacheco
authored
Merge pull request #957 from JupiterOne/improve-integration-generator
Improve integration generator
2 parents 406470a + 31597d4 commit 472ca01

File tree

21 files changed

+79
-69
lines changed

21 files changed

+79
-69
lines changed

CHANGELOG.md

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

1010
## Unreleased
1111

12+
## 10.5.2 - 2023-09-14
13+
14+
- Improvements to integration graph generator
15+
1216
## 10.5.0 - 2023-09-12
1317

1418
- Add `error_unexpected_error` to IntegrationErrorEventName

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.5.1"
7+
"version": "10.5.2"
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.5.1",
3+
"version": "10.5.2",
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.5.1",
28-
"@jupiterone/integration-sdk-runtime": "^10.5.1",
27+
"@jupiterone/integration-sdk-core": "^10.5.2",
28+
"@jupiterone/integration-sdk-runtime": "^10.5.2",
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.5.1",
3+
"version": "10.5.2",
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.5.1",
19-
"@jupiterone/integration-sdk-runtime": "^10.5.1",
18+
"@jupiterone/integration-sdk-core": "^10.5.2",
19+
"@jupiterone/integration-sdk-runtime": "^10.5.2",
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.5.1",
3+
"version": "10.5.2",
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.5.1",
29-
"@jupiterone/integration-sdk-runtime": "^10.5.1",
28+
"@jupiterone/integration-sdk-core": "^10.5.2",
29+
"@jupiterone/integration-sdk-runtime": "^10.5.2",
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.5.1",
47+
"@jupiterone/integration-sdk-private-test-utils": "^10.5.2",
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/generator/template/.github/workflows/build.yml.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: actions/checkout@v3
4141
with:
4242
fetch-depth: 0
43-
token: ${{ secrets.AUTO_GITHUB_PAT_TOKEN }}
43+
token: $\{{ secrets.AUTO_GITHUB_PAT_TOKEN }}
4444
- name: Setup Node
4545
uses: actions/setup-node@v3
4646
with:
@@ -49,5 +49,5 @@ jobs:
4949
- name: Build and Release
5050
uses: jupiterone/action-npm-build-release@v1
5151
with:
52-
npm_auth_token: ${{ secrets.NPM_AUTH_TOKEN }}
53-
gh_token: ${{ secrets.AUTO_GITHUB_PAT_TOKEN }}
52+
npm_auth_token: $\{{ secrets.NPM_AUTH_TOKEN }}
53+
gh_token: $\{{ secrets.AUTO_GITHUB_PAT_TOKEN }}

packages/integration-sdk-cli/src/generator/template/.github/workflows/codeql-analysis.yml.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: Initialize CodeQL
4343
uses: github/codeql-action/init@v2
4444
with:
45-
languages: ${{ matrix.language }}
45+
languages: $\{{ matrix.language }}
4646
# If you wish to specify custom queries, you can do so here or in a config file.
4747
# By default, queries listed here will override any specified in a config file.
4848
# Prefix the list here with "+" to use these queries and those in the config file.

packages/integration-sdk-cli/src/generator/template/.github/workflows/integration-deployment.yml.hbs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
uses: JupiterOne/integration-github-actions/create-integration-deployment@v1
3030
with:
3131
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 }}
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 }}

packages/integration-sdk-cli/src/generator/template/.github/workflows/peril.yml.hbs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Configure aws credentials
4242
uses: aws-actions/configure-aws-credentials@v1
4343
with:
44-
role-to-assume: ${{ steps.get-vars.outputs.aws-oidc-role }}
44+
role-to-assume: $\{{ steps.get-vars.outputs.aws-oidc-role }}
4545
role-session-name: pr-role-session
4646
aws-region: us-east-1
4747

@@ -53,8 +53,8 @@ jobs:
5353
uses: docker/login-action@v2
5454
with:
5555
registry: ghcr.io
56-
username: ${{ github.actor }}
57-
password: ${{ secrets.PACKAGE_TOKEN }}
56+
username: $\{{ github.actor }}
57+
password: $\{{ secrets.PACKAGE_TOKEN }}
5858

5959
- name: Pull security-scan
6060
run: |
@@ -66,9 +66,9 @@ jobs:
6666
--user root \
6767
-v /var/run/docker.sock:/var/run/docker.sock \
6868
-v `pwd`:`pwd` \
69-
-e AWS_ACCESS_KEY_ID=${{ env.AWS_ACCESS_KEY_ID }} \
70-
-e AWS_SECRET_ACCESS_KEY=${{ env.AWS_SECRET_ACCESS_KEY }} \
71-
-e AWS_SESSION_TOKEN=${{ env.AWS_SESSION_TOKEN }} \
69+
-e AWS_ACCESS_KEY_ID=$\{{ env.AWS_ACCESS_KEY_ID }} \
70+
-e AWS_SECRET_ACCESS_KEY=$\{{ env.AWS_SECRET_ACCESS_KEY }} \
71+
-e AWS_SESSION_TOKEN=$\{{ env.AWS_SESSION_TOKEN }} \
7272
-e GITHUB_REPOSITORY=$GITHUB_REPOSITORY \
7373
-e GITHUB_REF_NAME=$GITHUB_REF_NAME \
7474
-e GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER \
@@ -84,7 +84,7 @@ jobs:
8484
- name: Run transponder
8585
run: |
8686
docker run --rm -v `pwd`:`pwd` -w `pwd` \
87-
-e J1_API_KEY=${{ secrets.J1_API_KEY_TRANSPONDER }} \
88-
-e J1_API_DOMAIN=${{ secrets.J1_API_DOMAIN_TRANSPONDER }} \
89-
-e J1_ACCOUNT_ID=${{ secrets.J1_ACCOUNT_ID_TRANSPONDER }} \
87+
-e J1_API_KEY=$\{{ secrets.J1_API_KEY_TRANSPONDER }} \
88+
-e J1_API_DOMAIN=$\{{ secrets.J1_API_DOMAIN_TRANSPONDER }} \
89+
-e J1_ACCOUNT_ID=$\{{ secrets.J1_ACCOUNT_ID_TRANSPONDER }} \
9090
$TRANSPONDER_DOCKER_IMAGE

0 commit comments

Comments
 (0)