@jupiterone/integration-sdk-cli 10.1.0 → 10.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupiterone/integration-sdk-cli",
3
- "version": "10.1.0",
3
+ "version": "10.3.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": "^10.1.0",
29
- "@jupiterone/integration-sdk-runtime": "^10.1.0",
28
+ "@jupiterone/integration-sdk-core": "^10.3.0",
29
+ "@jupiterone/integration-sdk-runtime": "^10.3.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": "^10.1.0",
47
+ "@jupiterone/integration-sdk-private-test-utils": "^10.3.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": "4cfc461083fb15a050ae0656ba1ccc94be62fb32"
59
+ "gitHead": "447bba4c679b24316a16cfb86a7813d5efd19f74"
60
60
  }
@@ -11,7 +11,11 @@ import {
11
11
 
12
12
  import { loadConfig } from '../config';
13
13
  import * as log from '../log';
14
- import { addPathOptionsToCommand, configureRuntimeFilesystem } from './options';
14
+ import {
15
+ addLoggingOptions,
16
+ addPathOptionsToCommand,
17
+ configureRuntimeFilesystem,
18
+ } from './options';
15
19
 
16
20
  // coercion function to collect multiple values for a flag
17
21
  const collector = (value: string, arr: string[]) => {
@@ -22,6 +26,7 @@ const collector = (value: string, arr: string[]) => {
22
26
  export function collect() {
23
27
  const command = createCommand('collect');
24
28
  addPathOptionsToCommand(command);
29
+ addLoggingOptions(command);
25
30
 
26
31
  return command
27
32
  .description('collect data and store entities and relationships to disk')
@@ -73,7 +78,7 @@ export function collect() {
73
78
  log.info('\nConfiguration loaded! Running integration...\n');
74
79
 
75
80
  const graphObjectStore = new FileSystemGraphObjectStore({
76
- prettifyFiles: true,
81
+ prettifyFiles: !options.noPretty,
77
82
  integrationSteps: config.integrationSteps,
78
83
  });
79
84
 
@@ -89,6 +94,7 @@ export function collect() {
89
94
  {
90
95
  enableSchemaValidation,
91
96
  graphObjectStore,
97
+ pretty: !options.noPretty,
92
98
  },
93
99
  );
94
100
 
@@ -8,6 +8,10 @@ import {
8
8
  import { Command, Option, OptionValues } from 'commander';
9
9
  import path from 'path';
10
10
 
11
+ export function addLoggingOptions(command: Command) {
12
+ return command.option('--noPretty', 'disable pretty logging', false);
13
+ }
14
+
11
15
  export interface PathOptions {
12
16
  projectPath: string;
13
17
  }
@@ -20,6 +20,7 @@ import { loadConfig } from '../config';
20
20
  import * as log from '../log';
21
21
  import {
22
22
  addApiClientOptionsToCommand,
23
+ addLoggingOptions,
23
24
  addPathOptionsToCommand,
24
25
  addSyncOptionsToCommand,
25
26
  configureRuntimeFilesystem,
@@ -37,6 +38,7 @@ export function run(): Command {
37
38
  addPathOptionsToCommand(command);
38
39
  addApiClientOptionsToCommand(command);
39
40
  addSyncOptionsToCommand(command);
41
+ addLoggingOptions(command);
40
42
 
41
43
  return command
42
44
  .description('collect and sync to upload entities and relationships')
@@ -56,7 +58,7 @@ export function run(): Command {
56
58
 
57
59
  let logger = createIntegrationLogger({
58
60
  name: 'local',
59
- pretty: true,
61
+ pretty: !options.noPretty,
60
62
  });
61
63
 
62
64
  const synchronizationContext = await initiateSynchronization({
@@ -81,7 +83,7 @@ export function run(): Command {
81
83
  );
82
84
 
83
85
  const graphObjectStore = new FileSystemGraphObjectStore({
84
- prettifyFiles: true,
86
+ prettifyFiles: !options.noPretty,
85
87
  integrationSteps: invocationConfig.integrationSteps,
86
88
  });
87
89
 
@@ -9,6 +9,7 @@ import {
9
9
  import * as log from '../log';
10
10
  import {
11
11
  addApiClientOptionsToCommand,
12
+ addLoggingOptions,
12
13
  addPathOptionsToCommand,
13
14
  addSyncOptionsToCommand,
14
15
  configureRuntimeFilesystem,
@@ -24,6 +25,7 @@ export function sync(): Command {
24
25
  addPathOptionsToCommand(command);
25
26
  addApiClientOptionsToCommand(command);
26
27
  addSyncOptionsToCommand(command);
28
+ addLoggingOptions(command);
27
29
 
28
30
  return command
29
31
  .description(
@@ -42,7 +44,7 @@ export function sync(): Command {
42
44
 
43
45
  const logger = createIntegrationLogger({
44
46
  name: 'local',
45
- pretty: true,
47
+ pretty: !options.noPretty,
46
48
  });
47
49
 
48
50
  const syncOptions = getSyncOptions(actionCommand.opts());