@jupiterone/integration-sdk-cli 8.0.0 → 8.1.3

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.
@@ -11,7 +11,7 @@ function sanitizePropertyName(propertyName) {
11
11
  sanitizedName += 'n';
12
12
  }
13
13
  sanitizedName += propertyName;
14
- sanitizedName = sanitizedName.replace(/[\s!@#$%^&*()\-=+\\|'";:/?.,><`~\t\n[\]{}]/g, "_");
14
+ sanitizedName = sanitizedName.replace(/[\s!@#$%^&*()\-=+\\|'";:/?.,><`~\t\n[\]{}]/g, '_');
15
15
  return sanitizedName;
16
16
  }
17
17
  exports.sanitizePropertyName = sanitizePropertyName;
@@ -32,11 +32,14 @@ function buildPropertyParameters(propList) {
32
32
  //If we're dealing with a number or boolean, leave alone, otherwise
33
33
  //wrap in single quotes to convert to a string and escape all
34
34
  //other single quotes so they don't terminate strings prematurely.
35
- if (typeof propList[key] == 'number' || typeof propList[key] == 'boolean') {
36
- propertyParameters[propertyName] = propList[key];
37
- }
38
- else {
39
- propertyParameters[propertyName] = sanitizeValue(propList[key].toString());
35
+ if (propList[key]) {
36
+ if (typeof propList[key] == 'number' ||
37
+ typeof propList[key] == 'boolean') {
38
+ propertyParameters[propertyName] = propList[key];
39
+ }
40
+ else {
41
+ propertyParameters[propertyName] = sanitizeValue(propList[key].toString());
42
+ }
40
43
  }
41
44
  }
42
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"neo4jUtilities.js","sourceRoot":"","sources":["../../../src/neo4j/neo4jUtilities.ts"],"names":[],"mappings":";;;AACA,SAAgB,iBAAiB,CAAC,GAAW;IAC3C,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAFD,8CAEC;AAED,SAAgB,oBAAoB,CAAC,YAAoB;IACvD,IAAI,aAAa,GAAG,EAAE,CAAC;IACvB,IAAG,iBAAiB,CAAC,YAAY,CAAC,EAAE;QAClC,aAAa,IAAI,GAAG,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;aACF;SACF;KACF;IAED,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AA7BD,0DA6BC"}
@@ -532,8 +532,8 @@
532
532
  "affectsGlobalScope": false
533
533
  },
534
534
  "../../../node_modules/@jupiterone/data-model/dist/RelationshipClass.d.ts": {
535
- "version": "d40cc0c19efd8eed7ab13fce42b87891a21181466526d8b012064d2fa8936d02",
536
- "signature": "d40cc0c19efd8eed7ab13fce42b87891a21181466526d8b012064d2fa8936d02",
535
+ "version": "7c2aa1929759fee569c9eba25622b0b532abc90fe593184fa46a15a8ebbfe37d",
536
+ "signature": "7c2aa1929759fee569c9eba25622b0b532abc90fe593184fa46a15a8ebbfe37d",
537
537
  "affectsGlobalScope": false
538
538
  },
539
539
  "../../../node_modules/@jupiterone/data-model/dist/relationships.d.ts": {
@@ -767,8 +767,8 @@
767
767
  "affectsGlobalScope": false
768
768
  },
769
769
  "../../../node_modules/@jupiterone/data-model/dist/IntegrationSchema.d.ts": {
770
- "version": "233ec8bc7a4c269bf07231cf7b5c85f9f7b8eb94bc89a9f68b2279e3fc9e9e5c",
771
- "signature": "233ec8bc7a4c269bf07231cf7b5c85f9f7b8eb94bc89a9f68b2279e3fc9e9e5c",
770
+ "version": "6117f065f5fcb6720b2a78db493031773ed1d972915881e362aeda71090eac93",
771
+ "signature": "6117f065f5fcb6720b2a78db493031773ed1d972915881e362aeda71090eac93",
772
772
  "affectsGlobalScope": false
773
773
  },
774
774
  "../../../node_modules/@jupiterone/data-model/dist/validateEntityWithSchema.d.ts": {
@@ -782,8 +782,8 @@
782
782
  "affectsGlobalScope": false
783
783
  },
784
784
  "../../../node_modules/@jupiterone/data-model/dist/index.d.ts": {
785
- "version": "8cdc912ecc5d48502aea6d6cddcb7c90faa1b4ddbc0c8e4c56d808583acc1cdc",
786
- "signature": "8cdc912ecc5d48502aea6d6cddcb7c90faa1b4ddbc0c8e4c56d808583acc1cdc",
785
+ "version": "3bb7a2cbe38a48e65c8a80df422e3a0100e3ed0f293d11c355b8daab48178f72",
786
+ "signature": "3bb7a2cbe38a48e65c8a80df422e3a0100e3ed0f293d11c355b8daab48178f72",
787
787
  "affectsGlobalScope": false
788
788
  },
789
789
  "../../integration-sdk-core/dist/src/types/jobState.d.ts": {
@@ -1387,7 +1387,7 @@
1387
1387
  "affectsGlobalScope": false
1388
1388
  },
1389
1389
  "../src/neo4j/neo4jUtilities.ts": {
1390
- "version": "31a36adc4ad4b5f4ad1b17107be45169100c4897149d89f4c072b85125f06ab6",
1390
+ "version": "89b359ae7ec72a6b129268a4129cf47a6ffec32d2b42a8c68fc30962d0725cbf",
1391
1391
  "signature": "5369cec27c8781ecbfd705a3269ffe96c551656b1d5fc09cb23489a0c3ad7a16",
1392
1392
  "affectsGlobalScope": false
1393
1393
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupiterone/integration-sdk-cli",
3
- "version": "8.0.0",
3
+ "version": "8.1.3",
4
4
  "description": "The SDK for developing JupiterOne integrations",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  "prepack": "yarn build:dist"
23
23
  },
24
24
  "dependencies": {
25
- "@jupiterone/integration-sdk-runtime": "^8.0.0",
25
+ "@jupiterone/integration-sdk-runtime": "^8.1.3",
26
26
  "commander": "^5.0.0",
27
27
  "globby": "^11.0.0",
28
28
  "js-yaml": "^4.1.0",
@@ -35,7 +35,7 @@
35
35
  "vis": "^4.21.0-EOL"
36
36
  },
37
37
  "devDependencies": {
38
- "@jupiterone/integration-sdk-private-test-utils": "^8.0.0",
38
+ "@jupiterone/integration-sdk-private-test-utils": "^8.1.3",
39
39
  "@pollyjs/adapter-node-http": "^5.1.1",
40
40
  "@pollyjs/core": "^5.1.1",
41
41
  "@pollyjs/persister-fs": "^5.1.1",
@@ -50,5 +50,5 @@
50
50
  "neo-forgery": "^2.0.0",
51
51
  "uuid": "^8.2.0"
52
52
  },
53
- "gitHead": "855a502aabe8b12c6373dc2cef6add7a2106c153"
53
+ "gitHead": "3f6a4c09f1091768419d230a9d23dbec04df2fdb"
54
54
  }
@@ -1,20 +1,22 @@
1
-
2
- export function startsWithNumeric(str: string): boolean{
1
+ export function startsWithNumeric(str: string): boolean {
3
2
  return /^\d/.test(str);
4
3
  }
5
4
 
6
5
  export function sanitizePropertyName(propertyName: string): string {
7
6
  let sanitizedName = '';
8
- if(startsWithNumeric(propertyName)) {
7
+ if (startsWithNumeric(propertyName)) {
9
8
  sanitizedName += 'n';
10
9
  }
11
10
  sanitizedName += propertyName;
12
- sanitizedName = sanitizedName.replace(/[\s!@#$%^&*()\-=+\\|'";:/?.,><`~\t\n[\]{}]/g, "_");
11
+ sanitizedName = sanitizedName.replace(
12
+ /[\s!@#$%^&*()\-=+\\|'";:/?.,><`~\t\n[\]{}]/g,
13
+ '_',
14
+ );
13
15
  return sanitizedName;
14
16
  }
15
17
 
16
18
  export function sanitizeValue(value: string): string {
17
- return value.replace(/"/gi, '\\"')
19
+ return value.replace(/"/gi, '\\"');
18
20
  }
19
21
 
20
22
  export function buildPropertyParameters(propList: Object) {
@@ -30,14 +32,20 @@ export function buildPropertyParameters(propList: Object) {
30
32
  //If we're dealing with a number or boolean, leave alone, otherwise
31
33
  //wrap in single quotes to convert to a string and escape all
32
34
  //other single quotes so they don't terminate strings prematurely.
33
- if(typeof propList[key] == 'number' || typeof propList[key] == 'boolean') {
34
- propertyParameters[propertyName] = propList[key];
35
- }
36
- else {
37
- propertyParameters[propertyName] = sanitizeValue(propList[key].toString());
35
+ if (propList[key]) {
36
+ if (
37
+ typeof propList[key] == 'number' ||
38
+ typeof propList[key] == 'boolean'
39
+ ) {
40
+ propertyParameters[propertyName] = propList[key];
41
+ } else {
42
+ propertyParameters[propertyName] = sanitizeValue(
43
+ propList[key].toString(),
44
+ );
45
+ }
38
46
  }
39
47
  }
40
48
  }
41
49
 
42
50
  return propertyParameters;
43
- }
51
+ }