@zapier/zapier-sdk-cli 0.29.4 → 0.31.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 +27 -0
- package/README.md +47 -18
- package/dist/cli.cjs +482 -20
- package/dist/cli.mjs +485 -23
- package/dist/index.cjs +434 -2
- package/dist/index.mjs +437 -4
- package/dist/package.json +1 -1
- package/dist/src/cli.js +15 -2
- package/dist/src/plugins/cliOverrides/index.d.ts +21 -0
- package/dist/src/plugins/cliOverrides/index.js +19 -0
- package/dist/src/plugins/curl/index.d.ts +17 -0
- package/dist/src/plugins/curl/index.js +234 -0
- package/dist/src/plugins/curl/schemas.d.ts +39 -0
- package/dist/src/plugins/curl/schemas.js +101 -0
- package/dist/src/plugins/curl/utils.d.ts +24 -0
- package/dist/src/plugins/curl/utils.js +141 -0
- package/dist/src/plugins/index.d.ts +2 -0
- package/dist/src/plugins/index.js +2 -0
- package/dist/src/sdk.js +4 -1
- package/dist/src/utils/cli-generator.js +39 -12
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @zapier/zapier-sdk-cli
|
|
2
2
|
|
|
3
|
+
## 0.31.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ad5ee3b: Adds a new curl plugin.
|
|
8
|
+
Switch -v flag to -V for version information.
|
|
9
|
+
Fix CLI to properly handle string and object types.
|
|
10
|
+
Add redirect passthrough to fetch plugin (to support curl plugin).
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [ad5ee3b]
|
|
15
|
+
- @zapier/zapier-sdk@0.29.0
|
|
16
|
+
- @zapier/zapier-sdk-mcp@0.9.4
|
|
17
|
+
|
|
18
|
+
## 0.30.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- b2e5675: Retry on 429s with appropriate backoff. Add maxNetworkRetries and maxNetworkRetryDelayMs options (also configurable via ZAPIER_MAX_NETWORK_RETRIES and ZAPIER_MAX_NETWORK_RETRY_DELAY_MS environment variables).
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies [b2e5675]
|
|
27
|
+
- @zapier/zapier-sdk@0.28.0
|
|
28
|
+
- @zapier/zapier-sdk-mcp@0.9.3
|
|
29
|
+
|
|
3
30
|
## 0.29.4
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
- [`get-connection`](#get-connection)
|
|
31
31
|
- [`list-connections`](#list-connections)
|
|
32
32
|
- [HTTP Requests](#http-requests)
|
|
33
|
-
- [`
|
|
33
|
+
- [`curl`](#curl)
|
|
34
34
|
- [Utilities](#utilities)
|
|
35
35
|
- [`add`](#add)
|
|
36
36
|
- [`build-manifest`](#build-manifest)
|
|
@@ -83,12 +83,20 @@ npx zapier-sdk fetch "https://gmail.googleapis.com/gmail/v1/users/me/labels" --c
|
|
|
83
83
|
|
|
84
84
|
These options are available for all commands:
|
|
85
85
|
|
|
86
|
-
| Option
|
|
87
|
-
|
|
|
88
|
-
| `--version`
|
|
89
|
-
| `--help`
|
|
90
|
-
| `--debug`
|
|
91
|
-
| `--json`
|
|
86
|
+
| Option | Short | Description |
|
|
87
|
+
| -------------------------------------- | ----- | -------------------------------------------------- |
|
|
88
|
+
| `--version` | `-V` | Display version number |
|
|
89
|
+
| `--help` | `-h` | Display help for command |
|
|
90
|
+
| `--debug` | | Enable debug logging |
|
|
91
|
+
| `--json` | | Output raw JSON instead of formatted results |
|
|
92
|
+
| `--base-url <url>` | | Base URL for Zapier API endpoints |
|
|
93
|
+
| `--credentials <token>` | | Authentication token |
|
|
94
|
+
| `--credentials-client-id <id>` | | OAuth client ID for authentication |
|
|
95
|
+
| `--credentials-client-secret <secret>` | | OAuth client secret for authentication |
|
|
96
|
+
| `--credentials-base-url <url>` | | Base URL for authentication endpoints |
|
|
97
|
+
| `--tracking-base-url <url>` | | Base URL for Zapier tracking endpoints |
|
|
98
|
+
| `--max-network-retries <count>` | | Max retries for rate-limited requests (default: 3) |
|
|
99
|
+
| `--max-network-retry-delay-ms <ms>` | | Max delay in ms to wait for retry (default: 60000) |
|
|
92
100
|
|
|
93
101
|
## Available Commands
|
|
94
102
|
|
|
@@ -442,25 +450,46 @@ npx zapier-sdk list-connections [--search] [--title] [--owner] [--app-key] [--co
|
|
|
442
450
|
|
|
443
451
|
### HTTP Requests
|
|
444
452
|
|
|
445
|
-
#### `
|
|
453
|
+
#### `curl`
|
|
446
454
|
|
|
447
|
-
Make authenticated HTTP requests to any API through Zapier
|
|
455
|
+
Make authenticated HTTP requests to any API through Zapier. Pass a connection ID to automatically inject the user's stored credentials (OAuth tokens, API keys, etc.) into the outgoing request. Use it in place of the native curl command with additional Zapier-specific options.
|
|
448
456
|
|
|
449
457
|
**Options:**
|
|
450
458
|
|
|
451
|
-
| Option
|
|
452
|
-
|
|
|
453
|
-
| `<url>`
|
|
454
|
-
| `--
|
|
455
|
-
| `--
|
|
456
|
-
| `--
|
|
457
|
-
| `--
|
|
458
|
-
| `--
|
|
459
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
460
|
+
| ------------------ | ---------------- | -------- | ------- | ---------------------------------------------------------- | ------------------------------------------------------------ |
|
|
461
|
+
| `<url>` | `string` | ✅ | — | — | Request URL |
|
|
462
|
+
| `--request` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method (defaults to GET, or POST if data is provided) |
|
|
463
|
+
| `--header` | `array` | ❌ | — | — | HTTP headers in 'Key: Value' format (repeatable) |
|
|
464
|
+
| `--data` | `array` | ❌ | — | — | HTTP POST data (repeatable, joined with &) |
|
|
465
|
+
| `--data-raw` | `array` | ❌ | — | — | HTTP POST data without special interpretation (repeatable) |
|
|
466
|
+
| `--data-ascii` | `array` | ❌ | — | — | HTTP POST ASCII data (repeatable) |
|
|
467
|
+
| `--data-binary` | `array` | ❌ | — | — | HTTP POST binary data (repeatable) |
|
|
468
|
+
| `--data-urlencode` | `array` | ❌ | — | — | HTTP POST data, URL-encoded (repeatable) |
|
|
469
|
+
| `--json` | `string` | ❌ | — | — | Send JSON body (sets Content-Type and Accept headers) |
|
|
470
|
+
| `--form` | `array` | ❌ | — | — | Multipart form data as 'name=value' (repeatable) |
|
|
471
|
+
| `--form-string` | `array` | ❌ | — | — | Multipart form string field (repeatable) |
|
|
472
|
+
| `--get` | `boolean` | ❌ | — | — | Force GET method and append data to query string |
|
|
473
|
+
| `--head` | `boolean` | ❌ | — | — | Fetch headers only (HEAD request) |
|
|
474
|
+
| `--location` | `boolean` | ❌ | — | — | Follow redirects |
|
|
475
|
+
| `--include` | `boolean` | ❌ | — | — | Include response headers in output |
|
|
476
|
+
| `--output` | `string` | ❌ | — | — | Write output to file instead of stdout |
|
|
477
|
+
| `--remote-name` | `boolean` | ❌ | — | — | Write output to file named like the remote file |
|
|
478
|
+
| `--verbose` | `boolean` | ❌ | — | — | Verbose output (show request/response headers on stderr) |
|
|
479
|
+
| `--silent` | `boolean` | ❌ | — | — | Silent mode (suppress errors) |
|
|
480
|
+
| `--show-error` | `boolean` | ❌ | — | — | Show errors even when in silent mode |
|
|
481
|
+
| `--fail` | `boolean` | ❌ | — | — | Fail silently on HTTP errors (exit code 22) |
|
|
482
|
+
| `--fail-with-body` | `boolean` | ❌ | — | — | Fail on HTTP errors but still output the body |
|
|
483
|
+
| `--write-out` | `string` | ❌ | — | — | Output format string after completion (e.g., '%{http_code}') |
|
|
484
|
+
| `--max-time` | `number` | ❌ | — | — | Maximum time in seconds for the request |
|
|
485
|
+
| `--user` | `string` | ❌ | — | — | Basic auth credentials as 'user:password' |
|
|
486
|
+
| `--compressed` | `boolean` | ❌ | — | — | Request compressed response (sends Accept-Encoding header) |
|
|
487
|
+
| `--connection-id` | `string, number` | ❌ | — | — | Zapier connection ID for authentication |
|
|
459
488
|
|
|
460
489
|
**Usage:**
|
|
461
490
|
|
|
462
491
|
```bash
|
|
463
|
-
npx zapier-sdk
|
|
492
|
+
npx zapier-sdk curl <url> [--request] [--header] [--data] [--data-raw] [--data-ascii] [--data-binary] [--data-urlencode] [--json] [--form] [--form-string] [--get] [--head] [--location] [--include] [--output] [--remote-name] [--verbose] [--silent] [--show-error] [--fail] [--fail-with-body] [--write-out] [--max-time] [--user] [--compressed] [--connection-id]
|
|
464
493
|
```
|
|
465
494
|
|
|
466
495
|
### Utilities
|