@zapier/zapier-sdk-cli 0.52.10 → 0.53.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 +56 -0
- package/README.md +39 -1
- package/dist/cli.cjs +972 -473
- package/dist/cli.mjs +973 -474
- package/dist/experimental.cjs +914 -424
- package/dist/experimental.d.mts +1 -1
- package/dist/experimental.d.ts +1 -1
- package/dist/experimental.mjs +910 -420
- package/dist/index.cjs +914 -424
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +910 -420
- package/dist/login.cjs +8 -10
- package/dist/login.d.mts +2 -10
- package/dist/login.d.ts +2 -10
- package/dist/login.mjs +5 -9
- package/dist/package.json +1 -1
- package/dist/{sdk-B3nKAZdN.d.mts → sdk-SOLizjno.d.mts} +54 -16
- package/dist/{sdk-B3nKAZdN.d.ts → sdk-SOLizjno.d.ts} +54 -16
- package/dist/src/experimental.js +30 -27
- package/dist/src/login/index.d.ts +1 -9
- package/dist/src/login/index.js +12 -14
- package/dist/src/plugins/add/index.d.ts +15 -15
- package/dist/src/plugins/add/index.js +1 -1
- package/dist/src/plugins/buildManifest/index.d.ts +2 -2
- package/dist/src/plugins/bundleCode/index.d.ts +1 -1
- package/dist/src/plugins/bundleCode/index.js +2 -1
- package/dist/src/plugins/cliOverrides/index.d.ts +5 -10
- package/dist/src/plugins/cliOverrides/index.js +2 -6
- package/dist/src/plugins/curl/index.d.ts +2 -2
- package/dist/src/plugins/curl/schemas.d.ts +2 -2
- package/dist/src/plugins/feedback/index.d.ts +1 -1
- package/dist/src/plugins/generateAppTypes/index.d.ts +11 -11
- package/dist/src/plugins/getLoginConfigPath/index.d.ts +1 -1
- package/dist/src/plugins/index.d.ts +2 -1
- package/dist/src/plugins/index.js +2 -1
- package/dist/src/plugins/init/index.d.ts +1 -1
- package/dist/src/plugins/login/index.d.ts +3 -16
- package/dist/src/plugins/login/index.js +3 -191
- package/dist/src/plugins/logout/index.d.ts +1 -1
- package/dist/src/plugins/mcp/index.d.ts +1 -1
- package/dist/src/plugins/signup/index.d.ts +25 -0
- package/dist/src/plugins/signup/index.js +12 -0
- package/dist/src/plugins/signup/schemas.d.ts +9 -0
- package/dist/src/plugins/signup/schemas.js +26 -0
- package/dist/src/plugins/signup/test-harness.d.ts +34 -0
- package/dist/src/plugins/signup/test-harness.js +74 -0
- package/dist/src/sdk.js +32 -20
- package/dist/src/types/sdk.d.ts +2 -1
- package/dist/src/utils/auth/account-auth.d.ts +32 -0
- package/dist/src/utils/auth/account-auth.js +265 -0
- package/dist/src/utils/auth/oauth-callback.d.ts +6 -0
- package/dist/src/utils/auth/oauth-callback.js +28 -0
- package/dist/src/utils/auth/oauth-errors.d.ts +2 -0
- package/dist/src/utils/auth/oauth-errors.js +39 -0
- package/dist/src/utils/auth/oauth-flow.d.ts +31 -6
- package/dist/src/utils/auth/oauth-flow.js +258 -106
- package/dist/src/utils/auth/oauth-transaction.d.ts +35 -0
- package/dist/src/utils/auth/oauth-transaction.js +69 -0
- package/dist/src/utils/cli-generator.js +14 -7
- package/dist/src/utils/cli-renderer.d.ts +13 -3
- package/dist/src/utils/cli-renderer.js +27 -20
- package/dist/src/utils/log.js +9 -4
- package/dist/src/utils/non-interactive.d.ts +5 -4
- package/dist/src/utils/non-interactive.js +6 -5
- package/dist/src/utils/parameter-resolver.js +3 -1
- package/dist/src/utils/schema-formatter.d.ts +2 -2
- package/dist/src/utils/schema-formatter.js +4 -30
- package/dist/src/utils/version-checker.js +8 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
# @zapier/zapier-sdk-cli
|
|
2
2
|
|
|
3
|
+
## 0.53.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 41a7c26: Add `zapier-sdk signup` for browser-based account setup and local SDK credential provisioning.
|
|
8
|
+
Add the `signup_success` SDK lifecycle telemetry event type for successful signup OAuth callback acceptance.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [41a7c26]
|
|
13
|
+
- @zapier/zapier-sdk@0.68.0
|
|
14
|
+
- @zapier/zapier-sdk-mcp@0.13.22
|
|
15
|
+
|
|
16
|
+
## 0.52.12
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- a950509: Route all debug, diagnostic, and telemetry log output to stderr (`console.error`) instead of stdout (`console.log`) across the SDK and CLI packages. The CLI now reserves stdout exclusively for the program's data payload — command output, JSON envelopes, response bodies — so callers can safely pipe CLI output through `jq`, `> redirect`, or `JSON.parse` even when `--debug` is on or telemetry/logging flags are enabled. Interactive terminal users see no change since both streams interleave in a TTY.
|
|
21
|
+
- 9096184: Extract the plugin framework into a new sibling package `kitcore` that
|
|
22
|
+
`@zapier/zapier-sdk` consumes as a workspace devDependency (bundled into
|
|
23
|
+
the published dist, not a runtime dep). Existing SDK code is unaffected:
|
|
24
|
+
`createZapierSdk`, `createSdk`, the `ZapierSdk` type, every SDK method, and
|
|
25
|
+
the full `Zapier*` error hierarchy keep their names, codes, and `instanceof`
|
|
26
|
+
semantics. Internally `createZapierSdk` now builds via the linear
|
|
27
|
+
`createPluginStack().use(...).toSdk()` path, which substantially speeds up
|
|
28
|
+
construction. One behavior change to note: `normalizeError` no longer wraps
|
|
29
|
+
thrown `Error` subclasses, so a handler's `TypeError` or a userland
|
|
30
|
+
`MyAppError` bubbles through unchanged and `instanceof` works again; only
|
|
31
|
+
non-`Error` throws get wrapped.
|
|
32
|
+
|
|
33
|
+
New stack-based composition surface for building on top of the SDK:
|
|
34
|
+
`createZapierSdkStack(options)` (from the root and `/experimental`) returns
|
|
35
|
+
the unsealed `PluginStack` that `createZapierSdk` materializes, and
|
|
36
|
+
`createPluginStack`, `createCorePlugin`, and `addPlugin` are re-exported from
|
|
37
|
+
the root. Build by chaining `.use(...)` and sealing with `.toSdk()`, or
|
|
38
|
+
extend a sealed SDK in place with `addPlugin(sdk, plugin)`. The chain-style
|
|
39
|
+
`createSdk().addPlugin(...)` pattern is deprecated (now logs a one-time
|
|
40
|
+
warning) but still works; the CLI and MCP packages moved their internal
|
|
41
|
+
assembly to stacks with no change to their commands or tools.
|
|
42
|
+
|
|
43
|
+
- Updated dependencies [a950509]
|
|
44
|
+
- Updated dependencies [9096184]
|
|
45
|
+
- @zapier/zapier-sdk@0.67.0
|
|
46
|
+
- @zapier/zapier-sdk-mcp@0.13.21
|
|
47
|
+
|
|
48
|
+
## 0.52.11
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- 0eb6a76: Add the `triggerWorkflow` experimental code-substrate plugin. Lives behind `@zapier/zapier-sdk/experimental` only — the stable subpath does not surface it. Looks up the workflow's `trigger_url` via the durableworkflowzaps API, then POSTs the user-supplied JSON payload to that URL. The trigger endpoint is tokenized (the URL embeds a secret) and takes no auth header, so the SDK uses a raw `fetch` rather than the api plugin for the second leg. Custom fetch flows through `sdk.context.options.fetch` for tests. The workflow id is UUID-validated at the input boundary; trigger endpoint failures (non-2xx, or workflow with no published version) surface as descriptive errors. The CLI gets the `workflowIdResolver` picker for the workflow input.
|
|
53
|
+
- Updated dependencies [66db7cb]
|
|
54
|
+
- Updated dependencies [c7c8f64]
|
|
55
|
+
- Updated dependencies [0eb6a76]
|
|
56
|
+
- @zapier/zapier-sdk@0.66.0
|
|
57
|
+
- @zapier/zapier-sdk-mcp@0.13.20
|
|
58
|
+
|
|
3
59
|
## 0.52.10
|
|
4
60
|
|
|
5
61
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
- [`get-profile`](#get-profile)
|
|
12
12
|
- [`login`](#login)
|
|
13
13
|
- [`logout`](#logout)
|
|
14
|
+
- [`signup`](#signup)
|
|
14
15
|
- [Actions](#actions)
|
|
15
16
|
- [`get-action`](#get-action)
|
|
16
17
|
- [`get-action-input-fields-schema`](#get-action-input-fields-schema)
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
- [`list-workflows`](#list-workflows--experimental)
|
|
43
44
|
- [`publish-workflow-version`](#publish-workflow-version--experimental)
|
|
44
45
|
- [`run-durable`](#run-durable--experimental)
|
|
46
|
+
- [`trigger-workflow`](#trigger-workflow--experimental)
|
|
45
47
|
- [`update-workflow`](#update-workflow--experimental)
|
|
46
48
|
- [Connections](#connections)
|
|
47
49
|
- [`find-first-connection`](#find-first-connection)
|
|
@@ -218,6 +220,25 @@ Log out of your Zapier account
|
|
|
218
220
|
npx zapier-sdk logout
|
|
219
221
|
```
|
|
220
222
|
|
|
223
|
+
#### `signup`
|
|
224
|
+
|
|
225
|
+
Set up Zapier account access and SDK credentials
|
|
226
|
+
|
|
227
|
+
**Options:**
|
|
228
|
+
|
|
229
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
230
|
+
| ------------------- | --------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
231
|
+
| `--timeout` | `string` | ❌ | — | — | Signup timeout in seconds (default: 300) |
|
|
232
|
+
| `--use-approvals` | `boolean` | ❌ | — | — | Require approvals for actions performed with these credentials |
|
|
233
|
+
| `--non-interactive` | `boolean` | ❌ | — | — | Skip interactive prompts. Uses defaults where possible; errors instead of prompting when input is required. Useful in CI, piped output, or environments where TTY detection is unreliable. |
|
|
234
|
+
| `--headless` | `boolean` | ❌ | — | — | Use when signing up from a machine that has no browser. Prints a signup link to open elsewhere, then accepts the pasted loopback callback URL. |
|
|
235
|
+
|
|
236
|
+
**Usage:**
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
npx zapier-sdk signup [--timeout] [--use-approvals] [--non-interactive] [--headless]
|
|
240
|
+
```
|
|
241
|
+
|
|
221
242
|
### Actions
|
|
222
243
|
|
|
223
244
|
#### `get-action`
|
|
@@ -711,7 +732,7 @@ Run a workflow source file as a run-once durable run on sdkdurableapi (no deploy
|
|
|
711
732
|
| Option | Type | Required | Default | Possible Values | Description |
|
|
712
733
|
| -------------------------- | --------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
713
734
|
| `<source_files>` | `object` | ✅ | — | — | Source files keyed by filename → contents |
|
|
714
|
-
| `--input` | `
|
|
735
|
+
| `--input` | `unknown` | ❌ | — | — | Input data passed to the run |
|
|
715
736
|
| `--dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
|
|
716
737
|
| `--zapier_durable_version` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted. |
|
|
717
738
|
| `--connections` | `object` | ❌ | — | — | Named connection aliases. Maps alias names to Zapier connection IDs. |
|
|
@@ -724,6 +745,23 @@ Run a workflow source file as a run-once durable run on sdkdurableapi (no deploy
|
|
|
724
745
|
npx zapier-sdk run-durable <source_files> [--input] [--dependencies] [--zapier_durable_version] [--connections] [--app_versions] [--private]
|
|
725
746
|
```
|
|
726
747
|
|
|
748
|
+
#### `trigger-workflow` 🧪 _experimental_
|
|
749
|
+
|
|
750
|
+
Look up a workflow's trigger URL and fire it manually. The trigger endpoint is tokenized (the URL contains a secret) and takes no auth header, so the SDK uses a raw fetch rather than the api plugin.
|
|
751
|
+
|
|
752
|
+
**Options:**
|
|
753
|
+
|
|
754
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
755
|
+
| ------------ | --------- | -------- | ------- | --------------- | -------------------------------------------------------------------------------------------------------- |
|
|
756
|
+
| `<workflow>` | `string` | ✅ | — | — | Durable workflow ID |
|
|
757
|
+
| `--input` | `unknown` | ❌ | — | — | JSON payload delivered as the trigger body. Sent as `application/json`; omit to fire with an empty body. |
|
|
758
|
+
|
|
759
|
+
**Usage:**
|
|
760
|
+
|
|
761
|
+
```bash
|
|
762
|
+
npx zapier-sdk trigger-workflow <workflow> [--input]
|
|
763
|
+
```
|
|
764
|
+
|
|
727
765
|
#### `update-workflow` 🧪 _experimental_
|
|
728
766
|
|
|
729
767
|
Update a durable workflow's name and/or description
|