@zapier/zapier-sdk-cli 0.39.11 → 0.40.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 +12 -0
- package/README.md +29 -29
- package/dist/cli.cjs +7 -6
- package/dist/cli.mjs +7 -6
- package/dist/index.cjs +6 -5
- package/dist/index.mjs +6 -5
- package/dist/package.json +1 -1
- package/dist/src/plugins/curl/index.js +1 -2
- package/dist/src/plugins/curl/schemas.js +3 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @zapier/zapier-sdk-cli
|
|
2
2
|
|
|
3
|
+
## 0.40.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 55e8330: Support maxTime for SDK fetch & CLI curl - Relay extended timeout
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [55e8330]
|
|
12
|
+
- @zapier/zapier-sdk@0.42.0
|
|
13
|
+
- @zapier/zapier-sdk-mcp@0.10.14
|
|
14
|
+
|
|
3
15
|
## 0.39.11
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -494,35 +494,35 @@ Make authenticated HTTP requests to any API through Zapier. Pass a connection ID
|
|
|
494
494
|
|
|
495
495
|
**Options:**
|
|
496
496
|
|
|
497
|
-
| Option | Type | Required | Default | Possible Values | Description
|
|
498
|
-
| ------------------ | ---------------- | -------- | ------- | ---------------------------------------------------------- |
|
|
499
|
-
| `<url>` | `string` | ✅ | — | — | Request URL
|
|
500
|
-
| `--request` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method (defaults to GET, or POST if data is provided)
|
|
501
|
-
| `--header` | `array` | ❌ | — | — | HTTP headers in 'Key: Value' format (repeatable)
|
|
502
|
-
| `--data` | `array` | ❌ | — | — | HTTP POST data (repeatable, joined with &)
|
|
503
|
-
| `--data-raw` | `array` | ❌ | — | — | HTTP POST data without special interpretation (repeatable)
|
|
504
|
-
| `--data-ascii` | `array` | ❌ | — | — | HTTP POST ASCII data (repeatable)
|
|
505
|
-
| `--data-binary` | `array` | ❌ | — | — | HTTP POST binary data (repeatable)
|
|
506
|
-
| `--data-urlencode` | `array` | ❌ | — | — | HTTP POST data, URL-encoded (repeatable)
|
|
507
|
-
| `--json` | `string` | ❌ | — | — | Send JSON body (sets Content-Type and Accept headers)
|
|
508
|
-
| `--form` | `array` | ❌ | — | — | Multipart form data as 'name=value' (repeatable)
|
|
509
|
-
| `--form-string` | `array` | ❌ | — | — | Multipart form string field (repeatable)
|
|
510
|
-
| `--get` | `boolean` | ❌ | — | — | Force GET method and append data to query string
|
|
511
|
-
| `--head` | `boolean` | ❌ | — | — | Fetch headers only (HEAD request)
|
|
512
|
-
| `--location` | `boolean` | ❌ | — | — | Follow redirects
|
|
513
|
-
| `--include` | `boolean` | ❌ | — | — | Include response headers in output
|
|
514
|
-
| `--output` | `string` | ❌ | — | — | Write output to file instead of stdout
|
|
515
|
-
| `--remote-name` | `boolean` | ❌ | — | — | Write output to file named like the remote file
|
|
516
|
-
| `--verbose` | `boolean` | ❌ | — | — | Verbose output (show request/response headers on stderr)
|
|
517
|
-
| `--silent` | `boolean` | ❌ | — | — | Silent mode (suppress errors)
|
|
518
|
-
| `--show-error` | `boolean` | ❌ | — | — | Show errors even when in silent mode
|
|
519
|
-
| `--fail` | `boolean` | ❌ | — | — | Fail silently on HTTP errors (exit code 22)
|
|
520
|
-
| `--fail-with-body` | `boolean` | ❌ | — | — | Fail on HTTP errors but still output the body
|
|
521
|
-
| `--write-out` | `string` | ❌ | — | — | Output format string after completion (e.g., '%{http_code}')
|
|
522
|
-
| `--max-time` | `number` | ❌ | — | — | Maximum
|
|
523
|
-
| `--user` | `string` | ❌ | — | — | Basic auth credentials as 'user:password'
|
|
524
|
-
| `--compressed` | `boolean` | ❌ | — | — | Request compressed response (sends Accept-Encoding header)
|
|
525
|
-
| `--connection` | `string, number` | ❌ | — | — | Zapier connection ID or alias for authentication
|
|
497
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
498
|
+
| ------------------ | ---------------- | -------- | ------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
499
|
+
| `<url>` | `string` | ✅ | — | — | Request URL |
|
|
500
|
+
| `--request` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method (defaults to GET, or POST if data is provided) |
|
|
501
|
+
| `--header` | `array` | ❌ | — | — | HTTP headers in 'Key: Value' format (repeatable) |
|
|
502
|
+
| `--data` | `array` | ❌ | — | — | HTTP POST data (repeatable, joined with &) |
|
|
503
|
+
| `--data-raw` | `array` | ❌ | — | — | HTTP POST data without special interpretation (repeatable) |
|
|
504
|
+
| `--data-ascii` | `array` | ❌ | — | — | HTTP POST ASCII data (repeatable) |
|
|
505
|
+
| `--data-binary` | `array` | ❌ | — | — | HTTP POST binary data (repeatable) |
|
|
506
|
+
| `--data-urlencode` | `array` | ❌ | — | — | HTTP POST data, URL-encoded (repeatable) |
|
|
507
|
+
| `--json` | `string` | ❌ | — | — | Send JSON body (sets Content-Type and Accept headers) |
|
|
508
|
+
| `--form` | `array` | ❌ | — | — | Multipart form data as 'name=value' (repeatable) |
|
|
509
|
+
| `--form-string` | `array` | ❌ | — | — | Multipart form string field (repeatable) |
|
|
510
|
+
| `--get` | `boolean` | ❌ | — | — | Force GET method and append data to query string |
|
|
511
|
+
| `--head` | `boolean` | ❌ | — | — | Fetch headers only (HEAD request) |
|
|
512
|
+
| `--location` | `boolean` | ❌ | — | — | Follow redirects |
|
|
513
|
+
| `--include` | `boolean` | ❌ | — | — | Include response headers in output |
|
|
514
|
+
| `--output` | `string` | ❌ | — | — | Write output to file instead of stdout |
|
|
515
|
+
| `--remote-name` | `boolean` | ❌ | — | — | Write output to file named like the remote file |
|
|
516
|
+
| `--verbose` | `boolean` | ❌ | — | — | Verbose output (show request/response headers on stderr) |
|
|
517
|
+
| `--silent` | `boolean` | ❌ | — | — | Silent mode (suppress errors) |
|
|
518
|
+
| `--show-error` | `boolean` | ❌ | — | — | Show errors even when in silent mode |
|
|
519
|
+
| `--fail` | `boolean` | ❌ | — | — | Fail silently on HTTP errors (exit code 22) |
|
|
520
|
+
| `--fail-with-body` | `boolean` | ❌ | — | — | Fail on HTTP errors but still output the body |
|
|
521
|
+
| `--write-out` | `string` | ❌ | — | — | Output format string after completion (e.g., '%{http_code}') |
|
|
522
|
+
| `--max-time` | `number` | ❌ | — | — | Maximum seconds to wait for a response. Honored on a best-effort basis; the server may silently enforce a lower ceiling. |
|
|
523
|
+
| `--user` | `string` | ❌ | — | — | Basic auth credentials as 'user:password' |
|
|
524
|
+
| `--compressed` | `boolean` | ❌ | — | — | Request compressed response (sends Accept-Encoding header) |
|
|
525
|
+
| `--connection` | `string, number` | ❌ | — | — | Zapier connection ID or alias for authentication |
|
|
526
526
|
|
|
527
527
|
**Usage:**
|
|
528
528
|
|
package/dist/cli.cjs
CHANGED
|
@@ -1103,7 +1103,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
|
|
|
1103
1103
|
|
|
1104
1104
|
// package.json
|
|
1105
1105
|
var package_default = {
|
|
1106
|
-
version: "0.
|
|
1106
|
+
version: "0.40.0"};
|
|
1107
1107
|
|
|
1108
1108
|
// src/telemetry/builders.ts
|
|
1109
1109
|
function createCliBaseEvent(context = {}) {
|
|
@@ -3769,7 +3769,9 @@ var CurlSchema = zod.z.object({
|
|
|
3769
3769
|
fail: zod.z.boolean().optional().describe("Fail silently on HTTP errors (exit code 22)"),
|
|
3770
3770
|
failWithBody: zod.z.boolean().optional().describe("Fail on HTTP errors but still output the body"),
|
|
3771
3771
|
writeOut: zod.z.string().optional().describe("Output format string after completion (e.g., '%{http_code}')"),
|
|
3772
|
-
maxTime: zod.z.number().optional().describe(
|
|
3772
|
+
maxTime: zod.z.number().int().positive().optional().describe(
|
|
3773
|
+
"Maximum seconds to wait for a response. Honored on a best-effort basis; the server may silently enforce a lower ceiling."
|
|
3774
|
+
),
|
|
3773
3775
|
user: zod.z.string().optional().describe("Basic auth credentials as 'user:password'"),
|
|
3774
3776
|
compressed: zod.z.boolean().optional().describe("Request compressed response (sends Accept-Encoding header)"),
|
|
3775
3777
|
connection: zod.z.union([zod.z.string(), zod.z.number()]).optional().describe("Zapier connection ID or alias for authentication"),
|
|
@@ -4052,15 +4054,14 @@ var curlPlugin = ({
|
|
|
4052
4054
|
}
|
|
4053
4055
|
process.stderr.write(">\n");
|
|
4054
4056
|
}
|
|
4055
|
-
const signal = maxTime ? AbortSignal.timeout(maxTime * 1e3) : void 0;
|
|
4056
4057
|
const start = performance.now();
|
|
4057
4058
|
const response = await sdk2.fetch(effectiveUrl.toString(), {
|
|
4058
4059
|
method,
|
|
4059
4060
|
headers,
|
|
4060
4061
|
body,
|
|
4061
4062
|
redirect,
|
|
4062
|
-
|
|
4063
|
-
|
|
4063
|
+
connection,
|
|
4064
|
+
maxTime
|
|
4064
4065
|
});
|
|
4065
4066
|
const timeTotalSeconds = (performance.now() - start) / 1e3;
|
|
4066
4067
|
if (verbose && !silent) {
|
|
@@ -4696,7 +4697,7 @@ function createZapierCliSdk(options = {}) {
|
|
|
4696
4697
|
// package.json with { type: 'json' }
|
|
4697
4698
|
var package_default2 = {
|
|
4698
4699
|
name: "@zapier/zapier-sdk-cli",
|
|
4699
|
-
version: "0.
|
|
4700
|
+
version: "0.40.0"};
|
|
4700
4701
|
var ONE_DAY_MS = 24 * 60 * 60 * 1e3;
|
|
4701
4702
|
var CACHE_RESET_INTERVAL_MS = (() => {
|
|
4702
4703
|
const { ZAPIER_SDK_UPDATE_CHECK_INTERVAL_MS = `${ONE_DAY_MS}` } = process.env;
|
package/dist/cli.mjs
CHANGED
|
@@ -1065,7 +1065,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
|
|
|
1065
1065
|
|
|
1066
1066
|
// package.json
|
|
1067
1067
|
var package_default = {
|
|
1068
|
-
version: "0.
|
|
1068
|
+
version: "0.40.0"};
|
|
1069
1069
|
|
|
1070
1070
|
// src/telemetry/builders.ts
|
|
1071
1071
|
function createCliBaseEvent(context = {}) {
|
|
@@ -3731,7 +3731,9 @@ var CurlSchema = z.object({
|
|
|
3731
3731
|
fail: z.boolean().optional().describe("Fail silently on HTTP errors (exit code 22)"),
|
|
3732
3732
|
failWithBody: z.boolean().optional().describe("Fail on HTTP errors but still output the body"),
|
|
3733
3733
|
writeOut: z.string().optional().describe("Output format string after completion (e.g., '%{http_code}')"),
|
|
3734
|
-
maxTime: z.number().optional().describe(
|
|
3734
|
+
maxTime: z.number().int().positive().optional().describe(
|
|
3735
|
+
"Maximum seconds to wait for a response. Honored on a best-effort basis; the server may silently enforce a lower ceiling."
|
|
3736
|
+
),
|
|
3735
3737
|
user: z.string().optional().describe("Basic auth credentials as 'user:password'"),
|
|
3736
3738
|
compressed: z.boolean().optional().describe("Request compressed response (sends Accept-Encoding header)"),
|
|
3737
3739
|
connection: z.union([z.string(), z.number()]).optional().describe("Zapier connection ID or alias for authentication"),
|
|
@@ -4014,15 +4016,14 @@ var curlPlugin = ({
|
|
|
4014
4016
|
}
|
|
4015
4017
|
process.stderr.write(">\n");
|
|
4016
4018
|
}
|
|
4017
|
-
const signal = maxTime ? AbortSignal.timeout(maxTime * 1e3) : void 0;
|
|
4018
4019
|
const start = performance.now();
|
|
4019
4020
|
const response = await sdk2.fetch(effectiveUrl.toString(), {
|
|
4020
4021
|
method,
|
|
4021
4022
|
headers,
|
|
4022
4023
|
body,
|
|
4023
4024
|
redirect,
|
|
4024
|
-
|
|
4025
|
-
|
|
4025
|
+
connection,
|
|
4026
|
+
maxTime
|
|
4026
4027
|
});
|
|
4027
4028
|
const timeTotalSeconds = (performance.now() - start) / 1e3;
|
|
4028
4029
|
if (verbose && !silent) {
|
|
@@ -4658,7 +4659,7 @@ function createZapierCliSdk(options = {}) {
|
|
|
4658
4659
|
// package.json with { type: 'json' }
|
|
4659
4660
|
var package_default2 = {
|
|
4660
4661
|
name: "@zapier/zapier-sdk-cli",
|
|
4661
|
-
version: "0.
|
|
4662
|
+
version: "0.40.0"};
|
|
4662
4663
|
var ONE_DAY_MS = 24 * 60 * 60 * 1e3;
|
|
4663
4664
|
var CACHE_RESET_INTERVAL_MS = (() => {
|
|
4664
4665
|
const { ZAPIER_SDK_UPDATE_CHECK_INTERVAL_MS = `${ONE_DAY_MS}` } = process.env;
|
package/dist/index.cjs
CHANGED
|
@@ -1613,7 +1613,9 @@ var CurlSchema = zod.z.object({
|
|
|
1613
1613
|
fail: zod.z.boolean().optional().describe("Fail silently on HTTP errors (exit code 22)"),
|
|
1614
1614
|
failWithBody: zod.z.boolean().optional().describe("Fail on HTTP errors but still output the body"),
|
|
1615
1615
|
writeOut: zod.z.string().optional().describe("Output format string after completion (e.g., '%{http_code}')"),
|
|
1616
|
-
maxTime: zod.z.number().optional().describe(
|
|
1616
|
+
maxTime: zod.z.number().int().positive().optional().describe(
|
|
1617
|
+
"Maximum seconds to wait for a response. Honored on a best-effort basis; the server may silently enforce a lower ceiling."
|
|
1618
|
+
),
|
|
1617
1619
|
user: zod.z.string().optional().describe("Basic auth credentials as 'user:password'"),
|
|
1618
1620
|
compressed: zod.z.boolean().optional().describe("Request compressed response (sends Accept-Encoding header)"),
|
|
1619
1621
|
connection: zod.z.union([zod.z.string(), zod.z.number()]).optional().describe("Zapier connection ID or alias for authentication"),
|
|
@@ -1896,15 +1898,14 @@ var curlPlugin = ({
|
|
|
1896
1898
|
}
|
|
1897
1899
|
process.stderr.write(">\n");
|
|
1898
1900
|
}
|
|
1899
|
-
const signal = maxTime ? AbortSignal.timeout(maxTime * 1e3) : void 0;
|
|
1900
1901
|
const start = performance.now();
|
|
1901
1902
|
const response = await sdk.fetch(effectiveUrl.toString(), {
|
|
1902
1903
|
method,
|
|
1903
1904
|
headers,
|
|
1904
1905
|
body,
|
|
1905
1906
|
redirect,
|
|
1906
|
-
|
|
1907
|
-
|
|
1907
|
+
connection,
|
|
1908
|
+
maxTime
|
|
1908
1909
|
});
|
|
1909
1910
|
const timeTotalSeconds = (performance.now() - start) / 1e3;
|
|
1910
1911
|
if (verbose && !silent) {
|
|
@@ -2512,7 +2513,7 @@ function createZapierCliSdk(options = {}) {
|
|
|
2512
2513
|
|
|
2513
2514
|
// package.json
|
|
2514
2515
|
var package_default = {
|
|
2515
|
-
version: "0.
|
|
2516
|
+
version: "0.40.0"};
|
|
2516
2517
|
|
|
2517
2518
|
// src/telemetry/builders.ts
|
|
2518
2519
|
function createCliBaseEvent(context = {}) {
|
package/dist/index.mjs
CHANGED
|
@@ -1580,7 +1580,9 @@ var CurlSchema = z.object({
|
|
|
1580
1580
|
fail: z.boolean().optional().describe("Fail silently on HTTP errors (exit code 22)"),
|
|
1581
1581
|
failWithBody: z.boolean().optional().describe("Fail on HTTP errors but still output the body"),
|
|
1582
1582
|
writeOut: z.string().optional().describe("Output format string after completion (e.g., '%{http_code}')"),
|
|
1583
|
-
maxTime: z.number().optional().describe(
|
|
1583
|
+
maxTime: z.number().int().positive().optional().describe(
|
|
1584
|
+
"Maximum seconds to wait for a response. Honored on a best-effort basis; the server may silently enforce a lower ceiling."
|
|
1585
|
+
),
|
|
1584
1586
|
user: z.string().optional().describe("Basic auth credentials as 'user:password'"),
|
|
1585
1587
|
compressed: z.boolean().optional().describe("Request compressed response (sends Accept-Encoding header)"),
|
|
1586
1588
|
connection: z.union([z.string(), z.number()]).optional().describe("Zapier connection ID or alias for authentication"),
|
|
@@ -1863,15 +1865,14 @@ var curlPlugin = ({
|
|
|
1863
1865
|
}
|
|
1864
1866
|
process.stderr.write(">\n");
|
|
1865
1867
|
}
|
|
1866
|
-
const signal = maxTime ? AbortSignal.timeout(maxTime * 1e3) : void 0;
|
|
1867
1868
|
const start = performance.now();
|
|
1868
1869
|
const response = await sdk.fetch(effectiveUrl.toString(), {
|
|
1869
1870
|
method,
|
|
1870
1871
|
headers,
|
|
1871
1872
|
body,
|
|
1872
1873
|
redirect,
|
|
1873
|
-
|
|
1874
|
-
|
|
1874
|
+
connection,
|
|
1875
|
+
maxTime
|
|
1875
1876
|
});
|
|
1876
1877
|
const timeTotalSeconds = (performance.now() - start) / 1e3;
|
|
1877
1878
|
if (verbose && !silent) {
|
|
@@ -2479,7 +2480,7 @@ function createZapierCliSdk(options = {}) {
|
|
|
2479
2480
|
|
|
2480
2481
|
// package.json
|
|
2481
2482
|
var package_default = {
|
|
2482
|
-
version: "0.
|
|
2483
|
+
version: "0.40.0"};
|
|
2483
2484
|
|
|
2484
2485
|
// src/telemetry/builders.ts
|
|
2485
2486
|
function createCliBaseEvent(context = {}) {
|
package/dist/package.json
CHANGED
|
@@ -119,15 +119,14 @@ export const curlPlugin = ({ sdk, }) => {
|
|
|
119
119
|
}
|
|
120
120
|
process.stderr.write(">\n");
|
|
121
121
|
}
|
|
122
|
-
const signal = maxTime ? AbortSignal.timeout(maxTime * 1000) : undefined;
|
|
123
122
|
const start = performance.now();
|
|
124
123
|
const response = await sdk.fetch(effectiveUrl.toString(), {
|
|
125
124
|
method,
|
|
126
125
|
headers,
|
|
127
126
|
body,
|
|
128
127
|
redirect,
|
|
129
|
-
signal,
|
|
130
128
|
connection,
|
|
129
|
+
maxTime,
|
|
131
130
|
});
|
|
132
131
|
const timeTotalSeconds = (performance.now() - start) / 1000;
|
|
133
132
|
if (verbose && !silent) {
|
|
@@ -83,8 +83,10 @@ export const CurlSchema = z
|
|
|
83
83
|
.describe("Output format string after completion (e.g., '%{http_code}')"),
|
|
84
84
|
maxTime: z
|
|
85
85
|
.number()
|
|
86
|
+
.int()
|
|
87
|
+
.positive()
|
|
86
88
|
.optional()
|
|
87
|
-
.describe("Maximum
|
|
89
|
+
.describe("Maximum seconds to wait for a response. Honored on a best-effort basis; the server may silently enforce a lower ceiling."),
|
|
88
90
|
user: z
|
|
89
91
|
.string()
|
|
90
92
|
.optional()
|