zapier-platform-core 12.2.1 → 14.0.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,3 +1,3 @@
1
1
  Read docs: https://zapier.github.io/zapier-platform/.
2
2
 
3
- Changelog: https://github.com/zapier/zapier-platform/blob/master/CHANGELOG.md
3
+ Changelog: https://github.com/zapier/zapier-platform/blob/main/CHANGELOG.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zapier-platform-core",
3
- "version": "12.2.1",
3
+ "version": "14.0.0",
4
4
  "description": "The core SDK for CLI apps in the Zapier Developer Platform.",
5
5
  "repository": "zapier/zapier-platform",
6
6
  "homepage": "https://platform.zapier.com/",
@@ -18,15 +18,15 @@
18
18
  "preversion": "git pull && yarn test",
19
19
  "version": "node bin/bump-dependencies.js && yarn && git add package.json yarn.lock",
20
20
  "postversion": "git push && git push --tags",
21
- "main-tests": "mocha -t 20000 --recursive test",
21
+ "main-tests": "mocha -t 20s --recursive test --exit",
22
22
  "solo-test": "test $(OPT_OUT_PATCH_TEST_ONLY=yes mocha --recursive test -g 'should be able to opt out of patch' -R json | jq '.stats.passes') -eq 1 && echo 'Ran 1 test and it passed!'",
23
23
  "test": "yarn main-tests && yarn solo-test",
24
- "debug": "mocha -t 10000 --inspect-brk --recursive test",
25
- "test:w": "mocha -t 10000 --recursive test --watch",
26
- "integration-test": "mocha -t 20000 integration-test",
27
- "local-integration-test": "mocha -t 10000 integration-test --local",
28
- "lambda-integration-test": "mocha -t 10000 integration-test --lambda",
29
- "smoke-test": "mocha -t 120000 smoke-test",
24
+ "debug": "mocha -t 10s --inspect-brk --recursive test",
25
+ "test:w": "mocha -t 10s --recursive test --watch",
26
+ "integration-test": "mocha -t 20s integration-test",
27
+ "local-integration-test": "mocha -t 10s integration-test --local",
28
+ "lambda-integration-test": "mocha -t 10s integration-test --lambda",
29
+ "smoke-test": "mocha -t 2m smoke-test",
30
30
  "lint": "eslint src test",
31
31
  "lint:fix": "eslint --fix src test",
32
32
  "build-integration-test": "bin/build.sh local.bundle.zip",
@@ -35,32 +35,32 @@
35
35
  "validate": "yarn test && yarn smoke-test && yarn lint"
36
36
  },
37
37
  "engines": {
38
- "node": ">=12",
38
+ "node": ">=14",
39
39
  "npm": ">=5.6.0"
40
40
  },
41
41
  "engineStrict": true,
42
42
  "dependencies": {
43
43
  "@zapier/secret-scrubber": "^1.0.7",
44
44
  "bluebird": "3.7.2",
45
- "content-disposition": "0.5.3",
46
- "dotenv": "9.0.2",
45
+ "content-disposition": "0.5.4",
46
+ "dotenv": "12.0.4 ",
47
47
  "form-data": "4.0.0",
48
48
  "lodash": "4.17.21",
49
- "mime-types": "2.1.34",
49
+ "mime-types": "2.1.35",
50
50
  "node-abort-controller": "3.0.1",
51
51
  "node-fetch": "2.6.7",
52
52
  "oauth-sign": "0.9.0",
53
53
  "semver": "7.3.5",
54
- "zapier-platform-schema": "12.2.1"
54
+ "zapier-platform-schema": "14.0.0"
55
55
  },
56
56
  "devDependencies": {
57
- "adm-zip": "0.5.5",
58
- "aws-sdk": "^2.905.0",
59
- "dicer": "^0.3.0",
57
+ "adm-zip": "0.5.10",
58
+ "aws-sdk": "^2.1300.0",
59
+ "dicer": "^0.3.1",
60
60
  "fs-extra": "^10.0.0",
61
- "mock-fs": "^4.14.0"
61
+ "mock-fs": "^5.2.0"
62
62
  },
63
63
  "optionalDependencies": {
64
- "@types/node": "^14.14.35"
64
+ "@types/node": "^18.11.18"
65
65
  }
66
66
  }
@@ -49,7 +49,7 @@ const prepareRequestLog = (req, resp) => {
49
49
 
50
50
  return {
51
51
  message: `${data.response_status_code} ${data.request_method} ${data.request_url}`,
52
- data: data,
52
+ data,
53
53
  };
54
54
  };
55
55
 
@@ -18,7 +18,7 @@ const prepareRawResponse = (resp, request) => {
18
18
  // TODO: if !2xx should we go ahead and get response.content for them?
19
19
  // retain the response signature for raw control
20
20
  const extendedResp = {
21
- request: request,
21
+ request,
22
22
  skipThrowForStatus: request.skipThrowForStatus,
23
23
  };
24
24
  const outResp = _.extend(resp, extendedResp, replaceHeaders(resp));
@@ -48,8 +48,8 @@ const prepareContentResponse = async (resp, request) => {
48
48
  status: resp.status,
49
49
  json: undefined,
50
50
  data: undefined,
51
- content: content,
52
- request: request,
51
+ content,
52
+ request,
53
53
  // only controls if _we_ call throwForStatus automatically
54
54
  skipThrowForStatus: request.skipThrowForStatus,
55
55
  };
package/src/index.js CHANGED
@@ -13,6 +13,6 @@ const integrationTestHandler = (event, context, callback) => {
13
13
 
14
14
  module.exports = {
15
15
  createAppHandler: createLambdaHandler,
16
- createAppTester: createAppTester,
16
+ createAppTester,
17
17
  integrationTestHandler,
18
18
  };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const domain = require('domain'); // eslint-disable-line node/no-deprecated-api
3
+ const domain = require('domain'); // eslint-disable-line n/no-deprecated-api
4
4
  const fs = require('fs');
5
5
  const os = require('os');
6
6
  const path = require('path');
@@ -15,7 +15,7 @@ const createRpcClient = (event) => {
15
15
 
16
16
  const id = genId();
17
17
  const body = JSON.stringify({
18
- id: id,
18
+ id,
19
19
  storeKey: event.storeKey,
20
20
  method,
21
21
  params,
@@ -24,7 +24,7 @@ const createRpcClient = (event) => {
24
24
  const req = {
25
25
  method: 'POST',
26
26
  url: `${event.rpc_base || FALLBACK_RPC}`,
27
- body: body,
27
+ body,
28
28
  headers: {},
29
29
  };
30
30
 
@@ -76,11 +76,11 @@ ZapierPromise.makeContext = function (attachErrorTrace) {
76
76
  contextifyOnce(err, attachErrorTrace, frameStack);
77
77
  return {
78
78
  isContext: true,
79
- frameStack: frameStack,
79
+ frameStack,
80
80
  addContext(msg) {
81
81
  frameStack.push(msg);
82
82
  },
83
- attachErrorTraceOnce: attachErrorTraceOnce,
83
+ attachErrorTraceOnce,
84
84
  };
85
85
  };
86
86