@castleio/sdk 2.0.1 → 2.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.1.0
4
+
5
+ - [#142](https://github.com/castle/castle-node/pull/142)
6
+ * dependencies updates
7
+
8
+ - [#143](https://github.com/castle/castle-node/pull/143)
9
+ - [#144](https://github.com/castle/castle-node/pull/144)
10
+ * updated definitions to match API schema
11
+
3
12
  ## 2.0.1
4
13
 
5
14
  - [#140](https://github.com/castle/castle-node/pull/140)
package/dist/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json.schemastore.org/package",
3
3
  "name": "@castleio/sdk",
4
4
  "description": "Castle SDK for Node",
5
- "version": "2.0.1",
5
+ "version": "2.1.0",
6
6
  "main": "dist/index.js",
7
7
  "repository": "git@github.com:castle/castle-node.git",
8
8
  "author": {
@@ -32,32 +32,32 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/fetch-mock": "7.3.5",
35
- "@types/jest": "29.2.0",
35
+ "@types/jest": "29.2.4",
36
36
  "@types/lodash.get": "4.4.7",
37
37
  "@types/lodash.isempty": "4.4.7",
38
38
  "@types/lodash.merge": "4.6.7",
39
39
  "@types/lodash.pickby": "4.6.7",
40
40
  "@types/lodash.reduce": "4.6.7",
41
- "@types/node": "18.11.6",
41
+ "@types/node": "18.11.17",
42
42
  "@types/node-fetch": "2.6.2",
43
- "@typescript-eslint/eslint-plugin": "5.41.0",
44
- "@typescript-eslint/parser": "5.41.0",
45
- "eslint": "8.26.0",
43
+ "@typescript-eslint/eslint-plugin": "5.47.0",
44
+ "@typescript-eslint/parser": "5.47.0",
45
+ "eslint": "8.30.0",
46
46
  "eslint-config-prettier": "8.5.0",
47
47
  "eslint-plugin-import": "2.26.0",
48
48
  "eslint-plugin-prefer-arrow": "1.2.3",
49
49
  "eslint-plugin-prettier": "4.2.1",
50
50
  "fetch-mock": "9.11.0",
51
- "husky": "8.0.1",
52
- "jest": "29.2.2",
51
+ "husky": "8.0.2",
52
+ "jest": "29.3.1",
53
53
  "mockdate": "3.0.5",
54
- "prettier": "2.7.1",
54
+ "prettier": "2.8.1",
55
55
  "rimraf": "3.0.2",
56
56
  "source-map-support": "0.5.21",
57
57
  "timeout-signal": "1.1.0",
58
58
  "ts-jest": "29.0.3",
59
59
  "ts-node": "10.9.1",
60
- "typescript": "4.8.4"
60
+ "typescript": "4.9.4"
61
61
  },
62
62
  "dependencies": {
63
63
  "abort-controller": "^3.0.0",
@@ -68,7 +68,7 @@
68
68
  "lodash.pickby": "^4.6.0",
69
69
  "lodash.reduce": "^4.6.0",
70
70
  "node-fetch": "< 3",
71
- "pino": "^8.7.0",
71
+ "pino": "^8.8.0",
72
72
  "pino-pretty": "^9.1.1"
73
73
  }
74
74
  }
@@ -18,7 +18,7 @@ const command_module_1 = require("../../command/command.module");
18
18
  const failover_module_1 = require("../../failover/failover.module");
19
19
  const api_service_1 = require("./api.service");
20
20
  const abort_controller_1 = __importDefault(require("abort-controller"));
21
- const handleFailover = (userId, reason, configuration, err) => {
21
+ const handleFailover = (reason, configuration, err) => {
22
22
  if (configuration.failoverStrategy === failover_module_1.FailoverStrategy.throw) {
23
23
  throw err;
24
24
  }
@@ -42,10 +42,10 @@ exports.APIFilterService = {
42
42
  }
43
43
  catch (e) {
44
44
  if (isTimeoutError(e)) {
45
- return handleFailover(options.user.id, 'timeout', configuration, e);
45
+ return handleFailover('timeout', configuration, e);
46
46
  }
47
47
  else if (e instanceof errors_1.InternalServerError) {
48
- return handleFailover(options.user.id, 'server error', configuration);
48
+ return handleFailover('server error', configuration, e);
49
49
  }
50
50
  else {
51
51
  throw e;
@@ -1 +1 @@
1
- {"version":3,"file":"api-filter.service.js","sourceRoot":"","sources":["../../../../src/api/services/api-filter.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,yCAAmD;AACnD,iEAAo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CAAC;IAC3B,CAAC,CAAA;CACF,CAAC"}
1
+ {"version":3,"file":"api-filter.service.js","sourceRoot":"","sources":["../../../../src/api/services/api-filter.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,yCAAmD;AACnD,iEAAoE;AACpE,oEAAkE;AAElE,+CAA2C;AAC3C,wEAA+C;AAE/C,MAAM,cAAc,GAAG,CACrB,MAAc,EACd,aAA4B,EAC5B,GAAW,EACH,EAAE;IAIV,IAAI,aAAa,CAAC,gBAAgB,KAAK,kCAAgB,CAAC,KAAK,EAAE;QAC7D,MAAM,GAAG,CAAC;KACX;IACD,OAAO;QACL,MAAM,EAAE;YACN,MAAM,EAAE,aAAa,CAAC,gBAAgB;SACvC;QACD,MAAM,EAAE,aAAa,CAAC,gBAAgB;QACtC,QAAQ,EAAE,IAAI;QACd,eAAe,EAAE,MAAM;KACxB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,CAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC;AAEhD,QAAA,gBAAgB,GAAG;IAC9B,IAAI,EAAE,CACJ,OAAsB,EACtB,aAA4B,EACX,EAAE;QACnB,MAAM,UAAU,GAAG,IAAI,0BAAe,EAAE,CAAC;QACzC,MAAM,OAAO,GAAG,qCAAoB,CAAC,IAAI,CACvC,UAAU,EACV,OAAO,EACP,aAAa,CACd,CAAC;QAEF,IAAI,iBAAiB,CAAC;QACtB,IAAI;YACF,iBAAiB,GAAG,MAAM,wBAAU,CAAC,IAAI,CACvC,UAAU,EACV,OAAO,EACP,aAAa,CACd,CAAC;SACH;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,cAAc,CAAC,CAAC,CAAC,EAAE;gBACrB,OAAO,cAAc,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC;aACpD;iBAAM,IAAI,CAAC,YAAY,4BAAmB,EAAE;gBAC3C,OAAO,cAAc,CAAC,cAAc,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC;aACzD;iBAAM;gBACL,MAAM,CAAC,CAAC;aACT;SACF;QAED,OAAO,iBAAiB,CAAC;IAC3B,CAAC,CAAA;CACF,CAAC"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json.schemastore.org/package",
3
3
  "name": "@castleio/sdk",
4
4
  "description": "Castle SDK for Node",
5
- "version": "2.0.1",
5
+ "version": "2.1.0",
6
6
  "main": "dist/index.js",
7
7
  "repository": "git@github.com:castle/castle-node.git",
8
8
  "author": {
@@ -32,32 +32,32 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/fetch-mock": "7.3.5",
35
- "@types/jest": "29.2.0",
35
+ "@types/jest": "29.2.4",
36
36
  "@types/lodash.get": "4.4.7",
37
37
  "@types/lodash.isempty": "4.4.7",
38
38
  "@types/lodash.merge": "4.6.7",
39
39
  "@types/lodash.pickby": "4.6.7",
40
40
  "@types/lodash.reduce": "4.6.7",
41
- "@types/node": "18.11.6",
41
+ "@types/node": "18.11.17",
42
42
  "@types/node-fetch": "2.6.2",
43
- "@typescript-eslint/eslint-plugin": "5.41.0",
44
- "@typescript-eslint/parser": "5.41.0",
45
- "eslint": "8.26.0",
43
+ "@typescript-eslint/eslint-plugin": "5.47.0",
44
+ "@typescript-eslint/parser": "5.47.0",
45
+ "eslint": "8.30.0",
46
46
  "eslint-config-prettier": "8.5.0",
47
47
  "eslint-plugin-import": "2.26.0",
48
48
  "eslint-plugin-prefer-arrow": "1.2.3",
49
49
  "eslint-plugin-prettier": "4.2.1",
50
50
  "fetch-mock": "9.11.0",
51
- "husky": "8.0.1",
52
- "jest": "29.2.2",
51
+ "husky": "8.0.2",
52
+ "jest": "29.3.1",
53
53
  "mockdate": "3.0.5",
54
- "prettier": "2.7.1",
54
+ "prettier": "2.8.1",
55
55
  "rimraf": "3.0.2",
56
56
  "source-map-support": "0.5.21",
57
57
  "timeout-signal": "1.1.0",
58
58
  "ts-jest": "29.0.3",
59
59
  "ts-node": "10.9.1",
60
- "typescript": "4.8.4"
60
+ "typescript": "4.9.4"
61
61
  },
62
62
  "dependencies": {
63
63
  "abort-controller": "^3.0.0",
@@ -68,7 +68,7 @@
68
68
  "lodash.pickby": "^4.6.0",
69
69
  "lodash.reduce": "^4.6.0",
70
70
  "node-fetch": "< 3",
71
- "pino": "^8.7.0",
71
+ "pino": "^8.8.0",
72
72
  "pino-pretty": "^9.1.1"
73
73
  }
74
74
  }