@zapier/zapier-sdk-cli 0.56.1 → 0.57.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 +21 -0
- package/README.md +17 -17
- package/dist/cli.cjs +9 -3
- package/dist/cli.mjs +10 -4
- package/dist/experimental.cjs +1 -1
- package/dist/experimental.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/package.json +1 -1
- package/dist/src/utils/cli-generator.js +5 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @zapier/zapier-sdk-cli
|
|
2
2
|
|
|
3
|
+
## 0.57.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 571f90d: Add zapier-sdk-package-operation header to identify the caller operation
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [571f90d]
|
|
12
|
+
- @zapier/zapier-sdk-mcp@0.14.0
|
|
13
|
+
- @zapier/zapier-sdk@0.74.0
|
|
14
|
+
|
|
15
|
+
## 0.56.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 6c7627c: CamelCase the input params on `runDurable` and `publishWorkflowVersion` (`sourceFiles`, `zapierDurableVersion`, `appVersions`, and the nested connection / app-version / trigger fields), keeping the old snake_case names as deprecated aliases. Handlers map them back to the snake_case wire body; output fields are unchanged.
|
|
20
|
+
- Updated dependencies [6c7627c]
|
|
21
|
+
- @zapier/zapier-sdk@0.73.1
|
|
22
|
+
- @zapier/zapier-sdk-mcp@0.13.37
|
|
23
|
+
|
|
3
24
|
## 0.56.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -718,22 +718,22 @@ Publish a new version of a durable workflow. Enables the workflow by default.
|
|
|
718
718
|
| Option | Type | Required | Default | Possible Values | Description |
|
|
719
719
|
| -------------------------- | --------- | -------- | ------- | --------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
720
720
|
| `<workflow>` | `string` | ✅ | — | — | Durable workflow ID |
|
|
721
|
-
| `<
|
|
721
|
+
| `<source-files>` | `object` | ✅ | — | — | Source files keyed by filename → contents |
|
|
722
722
|
| `--dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
|
|
723
|
-
| `--
|
|
723
|
+
| `--zapier-durable-version` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted. |
|
|
724
724
|
| `--enabled` | `boolean` | ❌ | — | — | Enable the workflow after publishing. Defaults to true; pass false to publish without enabling. |
|
|
725
725
|
| `--connections` | `object` | ❌ | — | — | Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding. |
|
|
726
|
-
| `--
|
|
726
|
+
| `--app-versions` | `object` | ❌ | — | — | Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding. |
|
|
727
727
|
| `--trigger` | `object` | ❌ | — | — | Trigger configuration. When provided, the workflow subscribes to a Zapier trigger; omit for webhook-only workflows. |
|
|
728
|
-
| ↳ `
|
|
728
|
+
| ↳ `selectedApi` | `string` | ❌ | — | — | Zapier app/API identifier (e.g. 'GoogleSheetsAPI'). Required when a trigger is configured. |
|
|
729
729
|
| ↳ `action` | `string` | ✅ | — | — | Trigger action key (e.g. 'new_row') |
|
|
730
|
-
| ↳ `
|
|
730
|
+
| ↳ `authenticationId` | `string` | ❌ | — | — | Connection ID for the trigger source. Omit or pass null for no-auth triggers (e.g. Schedule by Zapier). |
|
|
731
731
|
| ↳ `params` | `object` | ❌ | — | — | Trigger parameters as a JSON object |
|
|
732
732
|
|
|
733
733
|
**Usage:**
|
|
734
734
|
|
|
735
735
|
```bash
|
|
736
|
-
npx zapier-sdk publish-workflow-version <workflow> <
|
|
736
|
+
npx zapier-sdk publish-workflow-version <workflow> <source-files> [--dependencies] [--zapier-durable-version] [--enabled] [--connections] [--app-versions] [--trigger]
|
|
737
737
|
```
|
|
738
738
|
|
|
739
739
|
#### `run-durable` 🧪 _experimental_
|
|
@@ -742,21 +742,21 @@ Run a workflow source file as a run-once durable run on sdkdurableapi (no deploy
|
|
|
742
742
|
|
|
743
743
|
**Options:**
|
|
744
744
|
|
|
745
|
-
| Option | Type | Required | Default | Possible Values | Description
|
|
746
|
-
| -------------------------- | --------- | -------- | ------- | --------------- |
|
|
747
|
-
| `<
|
|
748
|
-
| `--input` | `unknown` | ❌ | — | — | Input data passed to the run
|
|
749
|
-
| `--dependencies` | `object` | ❌ | — | — | Optional npm package dependencies
|
|
750
|
-
| `--
|
|
751
|
-
| `--connections` | `object` | ❌ | — | — | Named connection aliases. Maps each alias to an object holding its Zapier connection ID, e.g. `{ "slack": { "
|
|
752
|
-
| `--
|
|
753
|
-
| `--private` | `boolean` | ❌ | — | — | Only the creating user can see the run (default false)
|
|
754
|
-
| `--notifications` | `array` | ❌ | — | — | Webhook subscribers for run lifecycle events. Each entry specifies a URL and the events it subscribes to.
|
|
745
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
746
|
+
| -------------------------- | --------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
747
|
+
| `<source-files>` | `object` | ✅ | — | — | Source files keyed by filename → contents |
|
|
748
|
+
| `--input` | `unknown` | ❌ | — | — | Input data passed to the run |
|
|
749
|
+
| `--dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
|
|
750
|
+
| `--zapier-durable-version` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted. |
|
|
751
|
+
| `--connections` | `object` | ❌ | — | — | Named connection aliases. Maps each alias to an object holding its Zapier connection ID, e.g. `{ "slack": { "connectionId": "123" } }`. |
|
|
752
|
+
| `--app-versions` | `object` | ❌ | — | — | Pinned app versions. Maps app keys (slugs) to implementation names and versions. |
|
|
753
|
+
| `--private` | `boolean` | ❌ | — | — | Only the creating user can see the run (default false) |
|
|
754
|
+
| `--notifications` | `array` | ❌ | — | — | Webhook subscribers for run lifecycle events. Each entry specifies a URL and the events it subscribes to. |
|
|
755
755
|
|
|
756
756
|
**Usage:**
|
|
757
757
|
|
|
758
758
|
```bash
|
|
759
|
-
npx zapier-sdk run-durable <
|
|
759
|
+
npx zapier-sdk run-durable <source-files> [--input] [--dependencies] [--zapier-durable-version] [--connections] [--app-versions] [--private] [--notifications]
|
|
760
760
|
```
|
|
761
761
|
|
|
762
762
|
#### `trigger-workflow` 🧪 _experimental_
|
package/dist/cli.cjs
CHANGED
|
@@ -1576,7 +1576,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
|
|
|
1576
1576
|
|
|
1577
1577
|
// package.json
|
|
1578
1578
|
var package_default = {
|
|
1579
|
-
version: "0.
|
|
1579
|
+
version: "0.57.0"};
|
|
1580
1580
|
|
|
1581
1581
|
// src/telemetry/builders.ts
|
|
1582
1582
|
function createCliBaseEvent(context = {}) {
|
|
@@ -2588,10 +2588,16 @@ ${confirmMessageAfter}`));
|
|
|
2588
2588
|
}
|
|
2589
2589
|
}
|
|
2590
2590
|
};
|
|
2591
|
+
const handlerWithCallerContext = async (...args) => {
|
|
2592
|
+
return zapierSdk.runWithCallerContext(
|
|
2593
|
+
{ packageOperation: cliCommandName },
|
|
2594
|
+
() => handler(...args)
|
|
2595
|
+
);
|
|
2596
|
+
};
|
|
2591
2597
|
return {
|
|
2592
2598
|
description,
|
|
2593
2599
|
parameters,
|
|
2594
|
-
handler,
|
|
2600
|
+
handler: handlerWithCallerContext,
|
|
2595
2601
|
hidden: !!functionInfo.deprecation,
|
|
2596
2602
|
aliases: functionInfo.aliases,
|
|
2597
2603
|
supportsJsonOutput: functionInfo.supportsJsonOutput
|
|
@@ -7255,7 +7261,7 @@ var watchTriggerInboxCliPlugin = zapierSdk.definePlugin(
|
|
|
7255
7261
|
// package.json with { type: 'json' }
|
|
7256
7262
|
var package_default2 = {
|
|
7257
7263
|
name: "@zapier/zapier-sdk-cli",
|
|
7258
|
-
version: "0.
|
|
7264
|
+
version: "0.57.0"};
|
|
7259
7265
|
|
|
7260
7266
|
// src/sdk.ts
|
|
7261
7267
|
zapierSdk.injectCliLogin(login_exports);
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command, CommanderError, Option } from 'commander';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { definePlugin, createPluginMethod, OutputPropertySchema, ZapierBundleError, DEFAULT_CONFIG_PATH, ZapierValidationError, ZapierUnknownError, ZapierReleaseTriggerMessageSignal, injectCliLogin, BaseSdkOptionsSchema, getOrCreateApiClient, isPermanentHttpError, invalidateCachedToken, batch, toSnakeCase, ZapierAbortDrainSignal, createZapierSdkStack as createZapierSdkStack$1, addPlugin as addPlugin$1, ZapierError, isCredentialsObject, buildApplicationLifecycleEvent, ZapierAuthenticationError, isPositional, runWithTelemetryContext, buildCapabilityMessage, formatErrorMessage, getOsInfo, getPlatformVersions, getAgent, getTtyContext, getCiPlatform, isCi, getReleaseId, getCurrentTimestamp, generateEventId, ZapierApprovalError } from '@zapier/zapier-sdk';
|
|
4
|
+
import { definePlugin, createPluginMethod, OutputPropertySchema, ZapierBundleError, DEFAULT_CONFIG_PATH, ZapierValidationError, ZapierUnknownError, ZapierReleaseTriggerMessageSignal, injectCliLogin, BaseSdkOptionsSchema, getOrCreateApiClient, isPermanentHttpError, invalidateCachedToken, batch, toSnakeCase, ZapierAbortDrainSignal, createZapierSdkStack as createZapierSdkStack$1, addPlugin as addPlugin$1, ZapierError, isCredentialsObject, buildApplicationLifecycleEvent, ZapierAuthenticationError, runWithCallerContext, isPositional, runWithTelemetryContext, buildCapabilityMessage, formatErrorMessage, getOsInfo, getPlatformVersions, getAgent, getTtyContext, getCiPlatform, isCi, getReleaseId, getCurrentTimestamp, generateEventId, ZapierApprovalError } from '@zapier/zapier-sdk';
|
|
5
5
|
import inquirer from 'inquirer';
|
|
6
6
|
import search from '@inquirer/search';
|
|
7
7
|
import chalk from 'chalk';
|
|
@@ -1533,7 +1533,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
|
|
|
1533
1533
|
|
|
1534
1534
|
// package.json
|
|
1535
1535
|
var package_default = {
|
|
1536
|
-
version: "0.
|
|
1536
|
+
version: "0.57.0"};
|
|
1537
1537
|
|
|
1538
1538
|
// src/telemetry/builders.ts
|
|
1539
1539
|
function createCliBaseEvent(context = {}) {
|
|
@@ -2545,10 +2545,16 @@ ${confirmMessageAfter}`));
|
|
|
2545
2545
|
}
|
|
2546
2546
|
}
|
|
2547
2547
|
};
|
|
2548
|
+
const handlerWithCallerContext = async (...args) => {
|
|
2549
|
+
return runWithCallerContext(
|
|
2550
|
+
{ packageOperation: cliCommandName },
|
|
2551
|
+
() => handler(...args)
|
|
2552
|
+
);
|
|
2553
|
+
};
|
|
2548
2554
|
return {
|
|
2549
2555
|
description,
|
|
2550
2556
|
parameters,
|
|
2551
|
-
handler,
|
|
2557
|
+
handler: handlerWithCallerContext,
|
|
2552
2558
|
hidden: !!functionInfo.deprecation,
|
|
2553
2559
|
aliases: functionInfo.aliases,
|
|
2554
2560
|
supportsJsonOutput: functionInfo.supportsJsonOutput
|
|
@@ -7212,7 +7218,7 @@ var watchTriggerInboxCliPlugin = definePlugin(
|
|
|
7212
7218
|
// package.json with { type: 'json' }
|
|
7213
7219
|
var package_default2 = {
|
|
7214
7220
|
name: "@zapier/zapier-sdk-cli",
|
|
7215
|
-
version: "0.
|
|
7221
|
+
version: "0.57.0"};
|
|
7216
7222
|
|
|
7217
7223
|
// src/sdk.ts
|
|
7218
7224
|
injectCliLogin(login_exports);
|
package/dist/experimental.cjs
CHANGED
|
@@ -4590,7 +4590,7 @@ var watchTriggerInboxCliPlugin = zapierSdk.definePlugin(
|
|
|
4590
4590
|
// package.json with { type: 'json' }
|
|
4591
4591
|
var package_default = {
|
|
4592
4592
|
name: "@zapier/zapier-sdk-cli",
|
|
4593
|
-
version: "0.
|
|
4593
|
+
version: "0.57.0"};
|
|
4594
4594
|
|
|
4595
4595
|
// src/experimental.ts
|
|
4596
4596
|
experimental.injectCliLogin(login_exports);
|
package/dist/experimental.mjs
CHANGED
|
@@ -4554,7 +4554,7 @@ var watchTriggerInboxCliPlugin = definePlugin(
|
|
|
4554
4554
|
// package.json with { type: 'json' }
|
|
4555
4555
|
var package_default = {
|
|
4556
4556
|
name: "@zapier/zapier-sdk-cli",
|
|
4557
|
-
version: "0.
|
|
4557
|
+
version: "0.57.0"};
|
|
4558
4558
|
|
|
4559
4559
|
// src/experimental.ts
|
|
4560
4560
|
injectCliLogin(login_exports);
|
package/dist/index.cjs
CHANGED
|
@@ -4589,7 +4589,7 @@ zapierSdk.definePlugin(
|
|
|
4589
4589
|
// package.json with { type: 'json' }
|
|
4590
4590
|
var package_default = {
|
|
4591
4591
|
name: "@zapier/zapier-sdk-cli",
|
|
4592
|
-
version: "0.
|
|
4592
|
+
version: "0.57.0"};
|
|
4593
4593
|
|
|
4594
4594
|
// src/sdk.ts
|
|
4595
4595
|
zapierSdk.injectCliLogin(login_exports);
|
|
@@ -4617,7 +4617,7 @@ function createZapierCliSdk(options = {}) {
|
|
|
4617
4617
|
|
|
4618
4618
|
// package.json
|
|
4619
4619
|
var package_default2 = {
|
|
4620
|
-
version: "0.
|
|
4620
|
+
version: "0.57.0"};
|
|
4621
4621
|
|
|
4622
4622
|
// src/telemetry/builders.ts
|
|
4623
4623
|
function createCliBaseEvent(context = {}) {
|
package/dist/index.mjs
CHANGED
|
@@ -4553,7 +4553,7 @@ definePlugin(
|
|
|
4553
4553
|
// package.json with { type: 'json' }
|
|
4554
4554
|
var package_default = {
|
|
4555
4555
|
name: "@zapier/zapier-sdk-cli",
|
|
4556
|
-
version: "0.
|
|
4556
|
+
version: "0.57.0"};
|
|
4557
4557
|
|
|
4558
4558
|
// src/sdk.ts
|
|
4559
4559
|
injectCliLogin(login_exports);
|
|
@@ -4581,7 +4581,7 @@ function createZapierCliSdk(options = {}) {
|
|
|
4581
4581
|
|
|
4582
4582
|
// package.json
|
|
4583
4583
|
var package_default2 = {
|
|
4584
|
-
version: "0.
|
|
4584
|
+
version: "0.57.0"};
|
|
4585
4585
|
|
|
4586
4586
|
// src/telemetry/builders.ts
|
|
4587
4587
|
function createCliBaseEvent(context = {}) {
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Option } from "commander";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { isPositional } from "@zapier/zapier-sdk";
|
|
3
|
+
import { isPositional, runWithCallerContext, } from "@zapier/zapier-sdk";
|
|
4
4
|
import { SchemaParameterResolver } from "./parameter-resolver";
|
|
5
5
|
import chalk from "chalk";
|
|
6
6
|
import inquirer from "inquirer";
|
|
@@ -641,10 +641,13 @@ function createCommandConfig(cliCommandName, functionInfo, sdk) {
|
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
643
|
};
|
|
644
|
+
const handlerWithCallerContext = async (...args) => {
|
|
645
|
+
return runWithCallerContext({ packageOperation: cliCommandName }, () => handler(...args));
|
|
646
|
+
};
|
|
644
647
|
return {
|
|
645
648
|
description,
|
|
646
649
|
parameters,
|
|
647
|
-
handler,
|
|
650
|
+
handler: handlerWithCallerContext,
|
|
648
651
|
hidden: !!functionInfo.deprecation,
|
|
649
652
|
aliases: functionInfo.aliases,
|
|
650
653
|
supportsJsonOutput: functionInfo.supportsJsonOutput,
|