@zapier/zapier-sdk-cli 0.52.10 → 0.52.12

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +19 -1
  3. package/dist/cli.cjs +80 -82
  4. package/dist/cli.mjs +81 -83
  5. package/dist/experimental.cjs +17 -26
  6. package/dist/experimental.d.mts +1 -1
  7. package/dist/experimental.d.ts +1 -1
  8. package/dist/experimental.mjs +16 -25
  9. package/dist/index.cjs +18 -27
  10. package/dist/index.d.mts +1 -1
  11. package/dist/index.d.ts +1 -1
  12. package/dist/index.mjs +16 -25
  13. package/dist/login.cjs +8 -10
  14. package/dist/login.d.mts +2 -10
  15. package/dist/login.d.ts +2 -10
  16. package/dist/login.mjs +5 -9
  17. package/dist/package.json +1 -1
  18. package/dist/{sdk-B3nKAZdN.d.mts → sdk-Sa1HjzUj.d.mts} +14 -14
  19. package/dist/{sdk-B3nKAZdN.d.ts → sdk-Sa1HjzUj.d.ts} +14 -14
  20. package/dist/src/experimental.js +29 -27
  21. package/dist/src/login/index.d.ts +1 -9
  22. package/dist/src/login/index.js +12 -14
  23. package/dist/src/plugins/add/index.d.ts +15 -15
  24. package/dist/src/plugins/add/index.js +1 -1
  25. package/dist/src/plugins/buildManifest/index.d.ts +2 -2
  26. package/dist/src/plugins/bundleCode/index.d.ts +1 -1
  27. package/dist/src/plugins/bundleCode/index.js +2 -1
  28. package/dist/src/plugins/cliOverrides/index.d.ts +5 -10
  29. package/dist/src/plugins/cliOverrides/index.js +2 -6
  30. package/dist/src/plugins/curl/index.d.ts +2 -2
  31. package/dist/src/plugins/curl/schemas.d.ts +2 -2
  32. package/dist/src/plugins/feedback/index.d.ts +1 -1
  33. package/dist/src/plugins/generateAppTypes/index.d.ts +11 -11
  34. package/dist/src/plugins/getLoginConfigPath/index.d.ts +1 -1
  35. package/dist/src/plugins/index.d.ts +1 -1
  36. package/dist/src/plugins/index.js +1 -1
  37. package/dist/src/plugins/init/index.d.ts +1 -1
  38. package/dist/src/plugins/login/index.d.ts +1 -1
  39. package/dist/src/plugins/logout/index.d.ts +1 -1
  40. package/dist/src/plugins/mcp/index.d.ts +1 -1
  41. package/dist/src/sdk.js +31 -20
  42. package/dist/src/utils/cli-generator.js +14 -7
  43. package/dist/src/utils/cli-renderer.d.ts +13 -3
  44. package/dist/src/utils/cli-renderer.js +27 -20
  45. package/dist/src/utils/log.js +9 -4
  46. package/dist/src/utils/parameter-resolver.js +3 -1
  47. package/dist/src/utils/schema-formatter.d.ts +2 -2
  48. package/dist/src/utils/schema-formatter.js +4 -30
  49. package/dist/src/utils/version-checker.js +8 -3
  50. package/dist/tsconfig.tsbuildinfo +1 -1
  51. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # @zapier/zapier-sdk-cli
2
2
 
3
+ ## 0.52.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 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.
8
+ - 9096184: Extract the plugin framework into a new sibling package `kitcore` that
9
+ `@zapier/zapier-sdk` consumes as a workspace devDependency (bundled into
10
+ the published dist, not a runtime dep). Existing SDK code is unaffected:
11
+ `createZapierSdk`, `createSdk`, the `ZapierSdk` type, every SDK method, and
12
+ the full `Zapier*` error hierarchy keep their names, codes, and `instanceof`
13
+ semantics. Internally `createZapierSdk` now builds via the linear
14
+ `createPluginStack().use(...).toSdk()` path, which substantially speeds up
15
+ construction. One behavior change to note: `normalizeError` no longer wraps
16
+ thrown `Error` subclasses, so a handler's `TypeError` or a userland
17
+ `MyAppError` bubbles through unchanged and `instanceof` works again; only
18
+ non-`Error` throws get wrapped.
19
+
20
+ New stack-based composition surface for building on top of the SDK:
21
+ `createZapierSdkStack(options)` (from the root and `/experimental`) returns
22
+ the unsealed `PluginStack` that `createZapierSdk` materializes, and
23
+ `createPluginStack`, `createCorePlugin`, and `addPlugin` are re-exported from
24
+ the root. Build by chaining `.use(...)` and sealing with `.toSdk()`, or
25
+ extend a sealed SDK in place with `addPlugin(sdk, plugin)`. The chain-style
26
+ `createSdk().addPlugin(...)` pattern is deprecated (now logs a one-time
27
+ warning) but still works; the CLI and MCP packages moved their internal
28
+ assembly to stacks with no change to their commands or tools.
29
+
30
+ - Updated dependencies [a950509]
31
+ - Updated dependencies [9096184]
32
+ - @zapier/zapier-sdk@0.67.0
33
+ - @zapier/zapier-sdk-mcp@0.13.21
34
+
35
+ ## 0.52.11
36
+
37
+ ### Patch Changes
38
+
39
+ - 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.
40
+ - Updated dependencies [66db7cb]
41
+ - Updated dependencies [c7c8f64]
42
+ - Updated dependencies [0eb6a76]
43
+ - @zapier/zapier-sdk@0.66.0
44
+ - @zapier/zapier-sdk-mcp@0.13.20
45
+
3
46
  ## 0.52.10
4
47
 
5
48
  ### Patch Changes
package/README.md CHANGED
@@ -42,6 +42,7 @@
42
42
  - [`list-workflows`](#list-workflows--experimental)
43
43
  - [`publish-workflow-version`](#publish-workflow-version--experimental)
44
44
  - [`run-durable`](#run-durable--experimental)
45
+ - [`trigger-workflow`](#trigger-workflow--experimental)
45
46
  - [`update-workflow`](#update-workflow--experimental)
46
47
  - [Connections](#connections)
47
48
  - [`find-first-connection`](#find-first-connection)
@@ -711,7 +712,7 @@ Run a workflow source file as a run-once durable run on sdkdurableapi (no deploy
711
712
  | Option | Type | Required | Default | Possible Values | Description |
712
713
  | -------------------------- | --------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------- |
713
714
  | `<source_files>` | `object` | ✅ | — | — | Source files keyed by filename → contents |
714
- | `--input` | `string` | ❌ | — | — | Input data passed to the run |
715
+ | `--input` | `unknown` | ❌ | — | — | Input data passed to the run |
715
716
  | `--dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
716
717
  | `--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
718
  | `--connections` | `object` | ❌ | — | — | Named connection aliases. Maps alias names to Zapier connection IDs. |
@@ -724,6 +725,23 @@ Run a workflow source file as a run-once durable run on sdkdurableapi (no deploy
724
725
  npx zapier-sdk run-durable <source_files> [--input] [--dependencies] [--zapier_durable_version] [--connections] [--app_versions] [--private]
725
726
  ```
726
727
 
728
+ #### `trigger-workflow` 🧪 _experimental_
729
+
730
+ 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.
731
+
732
+ **Options:**
733
+
734
+ | Option | Type | Required | Default | Possible Values | Description |
735
+ | ------------ | --------- | -------- | ------- | --------------- | -------------------------------------------------------------------------------------------------------- |
736
+ | `<workflow>` | `string` | ✅ | — | — | Durable workflow ID |
737
+ | `--input` | `unknown` | ❌ | — | — | JSON payload delivered as the trigger body. Sent as `application/json`; omit to fire with an empty body. |
738
+
739
+ **Usage:**
740
+
741
+ ```bash
742
+ npx zapier-sdk trigger-workflow <workflow> [--input]
743
+ ```
744
+
727
745
  #### `update-workflow` 🧪 _experimental_
728
746
 
729
747
  Update a durable workflow's name and/or description
package/dist/cli.cjs CHANGED
@@ -200,7 +200,7 @@ var SchemaParameterResolver = class {
200
200
  debugLog(message) {
201
201
  if (this.debug) {
202
202
  this.stopSpinner();
203
- console.log(chalk__default.default.gray(`[Zapier CLI] ${message}`));
203
+ console.error(chalk__default.default.gray(`[Zapier CLI] ${message}`));
204
204
  }
205
205
  }
206
206
  startSpinner() {
@@ -1572,7 +1572,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
1572
1572
 
1573
1573
  // package.json
1574
1574
  var package_default = {
1575
- version: "0.52.10"};
1575
+ version: "0.52.12"};
1576
1576
 
1577
1577
  // src/telemetry/builders.ts
1578
1578
  function createCliBaseEvent(context = {}) {
@@ -1626,12 +1626,6 @@ function buildCliCommandExecutedEvent({
1626
1626
  subprocess_count: data.subprocess_count ?? null
1627
1627
  };
1628
1628
  }
1629
- function getFormatMetadata(schema) {
1630
- return schema?._zod?.def?.formatMeta;
1631
- }
1632
- function getOutputSchema(schema) {
1633
- return schema?._zod?.def?.outputSchema;
1634
- }
1635
1629
  function formatJsonOutput(data) {
1636
1630
  if (data === void 0) {
1637
1631
  return;
@@ -1640,21 +1634,26 @@ function formatJsonOutput(data) {
1640
1634
  util__default.default.inspect(data, { colors: true, depth: null, breakLength: 80 })
1641
1635
  );
1642
1636
  }
1643
- async function formatItemsFromSchema(functionInfo, items, startingNumber = 0, options) {
1644
- const outputSchema = functionInfo.outputSchema || getOutputSchema(functionInfo.inputSchema);
1645
- if (!outputSchema) {
1646
- formatItemsGeneric(items, startingNumber);
1647
- return;
1648
- }
1649
- const formatMeta = getFormatMetadata(outputSchema);
1650
- if (!formatMeta) {
1651
- formatItemsGeneric(items, startingNumber);
1637
+ async function formatItemsFromSchema(_functionInfo, items, startingNumber = 0, options) {
1638
+ if (options?.formatter) {
1639
+ let context;
1640
+ if (options.formatter.fetch && options.sdk && options.params) {
1641
+ for (const item of items) {
1642
+ context = await options.formatter.fetch(
1643
+ options.sdk,
1644
+ options.params,
1645
+ item,
1646
+ context
1647
+ );
1648
+ }
1649
+ }
1650
+ items.forEach((item, index) => {
1651
+ const formatted = options.formatter.format(item, context);
1652
+ formatSingleItem(formatted, startingNumber + index);
1653
+ });
1652
1654
  return;
1653
1655
  }
1654
- items.forEach((item, index) => {
1655
- const formatted = formatMeta.format(item);
1656
- formatSingleItem(formatted, startingNumber + index);
1657
- });
1656
+ formatItemsGeneric(items, startingNumber);
1658
1657
  }
1659
1658
  function formatSingleItem(formatted, itemNumber) {
1660
1659
  let titleLine = `${chalk__default.default.gray(`${itemNumber + 1}.`)} ${chalk__default.default.cyan(formatted.title)}`;
@@ -1814,7 +1813,7 @@ function createJsonRenderer() {
1814
1813
  errors: []
1815
1814
  });
1816
1815
  },
1817
- renderCollectedList(items, _options) {
1816
+ async renderCollectedList(items, _options) {
1818
1817
  outputJson({ data: items, errors: [] });
1819
1818
  },
1820
1819
  renderItem(value, options) {
@@ -1846,27 +1845,32 @@ function getListTitle(functionInfo) {
1846
1845
  if (functionInfo.itemType) return `Available ${functionInfo.itemType} items`;
1847
1846
  return "items";
1848
1847
  }
1849
- function renderItemsForDisplay(items, functionInfo, startingNumber = 0) {
1850
- if (functionInfo?.inputSchema) {
1851
- formatItemsFromSchema(
1852
- functionInfo,
1853
- items,
1854
- startingNumber
1855
- );
1856
- } else {
1857
- items.forEach((item, index) => {
1858
- const obj = item;
1859
- const name = obj?.name || obj?.key || obj?.id || "Item";
1860
- console.log(
1861
- `${chalk__default.default.gray(`${startingNumber + index + 1}.`)} ${chalk__default.default.cyan(String(name))}`
1848
+ function createInteractiveRenderer(context = {}) {
1849
+ async function renderItemsForDisplay(items, functionInfo, startingNumber = 0) {
1850
+ if (functionInfo?.inputSchema) {
1851
+ await formatItemsFromSchema(
1852
+ functionInfo,
1853
+ items,
1854
+ startingNumber,
1855
+ {
1856
+ formatter: functionInfo.formatter,
1857
+ sdk: context.sdk,
1858
+ params: context.params
1859
+ }
1862
1860
  );
1863
- if (obj?.description)
1864
- console.log(` ${chalk__default.default.dim(String(obj.description))}`);
1865
- console.log();
1866
- });
1861
+ } else {
1862
+ items.forEach((item, index) => {
1863
+ const obj = item;
1864
+ const name = obj?.name || obj?.key || obj?.id || "Item";
1865
+ console.log(
1866
+ `${chalk__default.default.gray(`${startingNumber + index + 1}.`)} ${chalk__default.default.cyan(String(name))}`
1867
+ );
1868
+ if (obj?.description)
1869
+ console.log(` ${chalk__default.default.dim(String(obj.description))}`);
1870
+ console.log();
1871
+ });
1872
+ }
1867
1873
  }
1868
- }
1869
- function createInteractiveRenderer() {
1870
1874
  return {
1871
1875
  async renderPaginatedList(source, functionInfo) {
1872
1876
  const itemName = getItemName(functionInfo);
@@ -1876,7 +1880,7 @@ function createInteractiveRenderer() {
1876
1880
  console.log(chalk__default.default.yellow(`No ${itemName} found.`));
1877
1881
  return;
1878
1882
  }
1879
- renderItemsForDisplay(items, functionInfo, 0);
1883
+ await renderItemsForDisplay(items, functionInfo, 0);
1880
1884
  console.log(chalk__default.default.green(`
1881
1885
  \u2705 Showing ${items.length} ${itemName}`));
1882
1886
  return;
@@ -1898,7 +1902,7 @@ function createInteractiveRenderer() {
1898
1902
  console.log(chalk__default.default.blue(`\u{1F4CB} ${getListTitle(functionInfo)}
1899
1903
  `));
1900
1904
  }
1901
- renderItemsForDisplay(items, functionInfo, totalShown);
1905
+ await renderItemsForDisplay(items, functionInfo, totalShown);
1902
1906
  totalShown += items.length;
1903
1907
  console.log(
1904
1908
  chalk__default.default.green(
@@ -1923,7 +1927,7 @@ function createInteractiveRenderer() {
1923
1927
  console.log(chalk__default.default.gray(`
1924
1928
  \u{1F4C4} Finished browsing ${itemName}`));
1925
1929
  },
1926
- renderCollectedList(items, { maxItems, userSpecifiedMaxItems, functionInfo } = {}) {
1930
+ async renderCollectedList(items, { maxItems, userSpecifiedMaxItems, functionInfo } = {}) {
1927
1931
  if (!Array.isArray(items)) {
1928
1932
  formatJsonOutput(items);
1929
1933
  return;
@@ -1936,7 +1940,7 @@ function createInteractiveRenderer() {
1936
1940
  console.log(chalk__default.default.green(`
1937
1941
  \u2705 Found ${items.length} ${itemName}:
1938
1942
  `));
1939
- renderItemsForDisplay(items, functionInfo);
1943
+ await renderItemsForDisplay(items, functionInfo);
1940
1944
  if (userSpecifiedMaxItems && maxItems) {
1941
1945
  console.log(
1942
1946
  chalk__default.default.gray(
@@ -2399,11 +2403,11 @@ function createCommandConfig(cliCommandName, functionInfo, sdk) {
2399
2403
  const startTime = Date.now();
2400
2404
  let success = true;
2401
2405
  let errorMessage = null;
2402
- let resolvedParams = {};
2406
+ const resolvedParams = {};
2403
2407
  const commandObj = args[args.length - 1];
2404
2408
  const options = commandObj.opts();
2405
2409
  const interactiveMode = !options.json;
2406
- const renderer = interactiveMode ? createInteractiveRenderer() : createJsonRenderer();
2410
+ const renderer = interactiveMode ? createInteractiveRenderer({ sdk, params: resolvedParams }) : createJsonRenderer();
2407
2411
  try {
2408
2412
  emitDeprecationWarning({
2409
2413
  cliCommandName,
@@ -2436,7 +2440,7 @@ function createCommandConfig(cliCommandName, functionInfo, sdk) {
2436
2440
  }
2437
2441
  if (schema && !usesInputParameters) {
2438
2442
  const resolver = new SchemaParameterResolver();
2439
- resolvedParams = await resolver.resolveParameters(
2443
+ const resolved = await resolver.resolveParameters(
2440
2444
  schema,
2441
2445
  rawParams,
2442
2446
  sdk,
@@ -2446,8 +2450,9 @@ function createCommandConfig(cliCommandName, functionInfo, sdk) {
2446
2450
  debug: !!options.debug || process.env.DEBUG === "true" || process.argv.includes("--debug")
2447
2451
  }
2448
2452
  );
2453
+ Object.assign(resolvedParams, resolved);
2449
2454
  } else {
2450
- resolvedParams = rawParams;
2455
+ Object.assign(resolvedParams, rawParams);
2451
2456
  }
2452
2457
  const confirm = functionInfo.confirm;
2453
2458
  let confirmMessageAfter;
@@ -2476,7 +2481,7 @@ function createCommandConfig(cliCommandName, functionInfo, sdk) {
2476
2481
  sdkResult,
2477
2482
  maxItems
2478
2483
  });
2479
- renderer.renderCollectedList(allItems, {
2484
+ await renderer.renderCollectedList(allItems, {
2480
2485
  maxItems,
2481
2486
  userSpecifiedMaxItems: hasUserSpecifiedMaxItems,
2482
2487
  functionInfo
@@ -2510,7 +2515,7 @@ function createCommandConfig(cliCommandName, functionInfo, sdk) {
2510
2515
  if (normalizedResult.kind === "response") {
2511
2516
  await renderer.renderResponse(normalizedResult.value);
2512
2517
  } else if (normalizedResult.kind === "list") {
2513
- renderer.renderCollectedList(normalizedResult.data, {
2518
+ await renderer.renderCollectedList(normalizedResult.data, {
2514
2519
  maxItems: resolvedParams.maxItems,
2515
2520
  userSpecifiedMaxItems: hasUserSpecifiedMaxItems,
2516
2521
  functionInfo
@@ -2566,7 +2571,7 @@ ${confirmMessageAfter}`));
2566
2571
  description,
2567
2572
  parameters,
2568
2573
  handler,
2569
- hidden: functionInfo.categories?.includes("deprecated") ?? false,
2574
+ hidden: !!functionInfo.deprecation,
2570
2575
  aliases: functionInfo.aliases,
2571
2576
  supportsJsonOutput: functionInfo.supportsJsonOutput
2572
2577
  };
@@ -2725,7 +2730,7 @@ var login_exports = {};
2725
2730
  __export(login_exports, {
2726
2731
  AUTH_MODE_HEADER: () => AUTH_MODE_HEADER,
2727
2732
  DEFAULT_AUTH_BASE_URL: () => DEFAULT_AUTH_BASE_URL,
2728
- ZapierAuthenticationError: () => ZapierAuthenticationError,
2733
+ ZapierAuthenticationError: () => zapierSdk.ZapierAuthenticationError,
2729
2734
  clearTokensFromKeychain: () => clearTokensFromKeychain,
2730
2735
  createCache: () => createCache,
2731
2736
  getActiveCredentials: () => getActiveCredentials,
@@ -3129,12 +3134,6 @@ async function deleteStoredClientCredentials({
3129
3134
  }
3130
3135
 
3131
3136
  // src/login/index.ts
3132
- var ZapierAuthenticationError = class extends Error {
3133
- constructor(message) {
3134
- super(message);
3135
- this.name = "ZapierAuthenticationError";
3136
- }
3137
- };
3138
3137
  var DEFAULT_AUTH_CLIENT_ID = "grwWZD5hUWGvb4V8ODBuOtXer3h0DBEZ2HR8aay6";
3139
3138
  var TOKEN_REFRESH_BUFFER_MS = 5 * 60 * 1e3;
3140
3139
  function createDebugLog(enabled) {
@@ -3144,9 +3143,9 @@ function createDebugLog(enabled) {
3144
3143
  }
3145
3144
  return (message, data) => {
3146
3145
  if (data === void 0) {
3147
- console.log(`[Zapier SDK CLI Login] ${message}`);
3146
+ console.error(`[Zapier SDK CLI Login] ${message}`);
3148
3147
  } else {
3149
- console.log(`[Zapier SDK CLI Login] ${message}`, data);
3148
+ console.error(`[Zapier SDK CLI Login] ${message}`, data);
3150
3149
  }
3151
3150
  };
3152
3151
  }
@@ -3392,7 +3391,7 @@ async function getToken(options = {}) {
3392
3391
  return await resolveOrRefreshToken(options);
3393
3392
  } catch (error) {
3394
3393
  const message = error instanceof Error ? error.message : "Token refresh failed";
3395
- throw new ZapierAuthenticationError(
3394
+ throw new zapierSdk.ZapierAuthenticationError(
3396
3395
  `${message}
3397
3396
  Please run 'login' to authenticate again.`
3398
3397
  );
@@ -3566,20 +3565,20 @@ var spinPromise = async (promise, text) => {
3566
3565
  };
3567
3566
  var log = {
3568
3567
  info: (message, ...args) => {
3569
- console.log(chalk__default.default.blue("\u2139"), message, ...args);
3568
+ console.error(chalk__default.default.blue("\u2139"), message, ...args);
3570
3569
  },
3571
3570
  error: (message, ...args) => {
3572
3571
  console.error(chalk__default.default.red("\u2716"), message, ...args);
3573
3572
  },
3574
3573
  success: (message, ...args) => {
3575
- console.log(chalk__default.default.green("\u2713"), message, ...args);
3574
+ console.error(chalk__default.default.green("\u2713"), message, ...args);
3576
3575
  },
3577
3576
  warn: (message, ...args) => {
3578
- console.log(chalk__default.default.yellow("\u26A0"), message, ...args);
3577
+ console.error(chalk__default.default.yellow("\u26A0"), message, ...args);
3579
3578
  },
3580
3579
  debug: (message, ...args) => {
3581
3580
  if (process.env.DEBUG === "true" || process.argv.includes("--debug")) {
3582
- console.log(chalk__default.default.gray("\u{1F41B}"), message, ...args);
3581
+ console.error(chalk__default.default.gray("\u{1F41B}"), message, ...args);
3583
3582
  }
3584
3583
  }
3585
3584
  };
@@ -4168,7 +4167,8 @@ var BundleCodeSchema = zod.z.object({
4168
4167
  var bundleCodePlugin = zapierSdk.definePlugin(
4169
4168
  (sdk) => zapierSdk.createPluginMethod(sdk, {
4170
4169
  name: "bundleCode",
4171
- categories: ["utility", "deprecated"],
4170
+ categories: ["utility"],
4171
+ deprecation: { message: "bundleCode is no longer maintained." },
4172
4172
  inputSchema: BundleCodeSchema,
4173
4173
  handler: async ({ options }) => bundleCode(options)
4174
4174
  })
@@ -4264,7 +4264,7 @@ async function detectTypesOutputDirectory() {
4264
4264
  }
4265
4265
  return "./zapier/apps/";
4266
4266
  }
4267
- var addPlugin = zapierSdk.definePlugin(
4267
+ var addAppsPlugin = zapierSdk.definePlugin(
4268
4268
  (sdk) => zapierSdk.createPluginMethod(sdk, {
4269
4269
  name: "add",
4270
4270
  categories: ["utility"],
@@ -5669,10 +5669,6 @@ var cliOverridesPlugin = zapierSdk.definePlugin(
5669
5669
  if (sdk.context.meta.fetch) {
5670
5670
  meta.fetch = {
5671
5671
  ...sdk.context.meta.fetch,
5672
- categories: [
5673
- ...sdk.context.meta.fetch.categories || [],
5674
- "deprecated"
5675
- ],
5676
5672
  deprecation: {
5677
5673
  message: "This command is deprecated and will be removed soon. Use `curl` instead. Learn more: https://docs.zapier.com/sdk/cli-reference#curl"
5678
5674
  }
@@ -6653,7 +6649,7 @@ var watchTriggerInboxCliPlugin = zapierSdk.definePlugin(
6653
6649
  // package.json with { type: 'json' }
6654
6650
  var package_default2 = {
6655
6651
  name: "@zapier/zapier-sdk-cli",
6656
- version: "0.52.10"};
6652
+ version: "0.52.12"};
6657
6653
 
6658
6654
  // src/sdk.ts
6659
6655
  zapierSdk.injectCliLogin(login_exports);
@@ -6662,21 +6658,21 @@ function createZapierCliSdk(options = {}) {
6662
6658
  const extensionsContextPlugin = () => ({
6663
6659
  context: { extensions }
6664
6660
  });
6665
- let chain = zapierSdk.createZapierSdk({
6661
+ const sdk = zapierSdk.createZapierSdkStack({
6666
6662
  ...sdkOptions,
6667
6663
  eventEmission: { ...sdkOptions.eventEmission, callContext: "cli" },
6668
6664
  callerPackage: { name: package_default2.name, version: package_default2.version }
6669
- }).addPlugin(extensionsContextPlugin).addPlugin(generateAppTypesPlugin).addPlugin(buildManifestPlugin).addPlugin(bundleCodePlugin).addPlugin(getLoginConfigPathPlugin).addPlugin(addPlugin).addPlugin(feedbackPlugin).addPlugin(curlPlugin).addPlugin(initPlugin).addPlugin(mcpPlugin).addPlugin(loginPlugin).addPlugin(logoutPlugin).addPlugin(cliOverridesPlugin);
6665
+ }).use(extensionsContextPlugin).use(generateAppTypesPlugin).use(buildManifestPlugin).use(bundleCodePlugin).use(getLoginConfigPathPlugin).use(addAppsPlugin).use(feedbackPlugin).use(curlPlugin).use(initPlugin).use(mcpPlugin).use(loginPlugin).use(logoutPlugin).use(cliOverridesPlugin, { override: true }).toSdk();
6670
6666
  for (const ext of extensions) {
6671
6667
  try {
6672
- chain = chain.addPlugin(ext);
6668
+ zapierSdk.addPlugin(sdk, ext);
6673
6669
  } catch (err) {
6674
6670
  console.warn(
6675
6671
  `Extension plugin failed to construct: ${err.message}; skipping.`
6676
6672
  );
6677
6673
  }
6678
6674
  }
6679
- return chain;
6675
+ return sdk;
6680
6676
  }
6681
6677
  experimental.injectCliLogin(login_exports);
6682
6678
  function createZapierCliSdk2(options = {}) {
@@ -6687,21 +6683,21 @@ function createZapierCliSdk2(options = {}) {
6687
6683
  const experimentalContextPlugin = () => ({
6688
6684
  context: { experimental: true }
6689
6685
  });
6690
- let chain = experimental.createZapierSdk({
6686
+ const sdk = experimental.createZapierSdkStack({
6691
6687
  ...sdkOptions,
6692
6688
  eventEmission: { ...sdkOptions.eventEmission, callContext: "cli" },
6693
6689
  callerPackage: { name: package_default2.name, version: package_default2.version }
6694
- }).addPlugin(extensionsContextPlugin).addPlugin(experimentalContextPlugin).addPlugin(generateAppTypesPlugin).addPlugin(buildManifestPlugin).addPlugin(bundleCodePlugin).addPlugin(getLoginConfigPathPlugin).addPlugin(addPlugin).addPlugin(feedbackPlugin).addPlugin(curlPlugin).addPlugin(initPlugin).addPlugin(drainTriggerInboxCliPlugin, { override: true }).addPlugin(watchTriggerInboxCliPlugin, { override: true }).addPlugin(mcpPlugin).addPlugin(loginPlugin).addPlugin(logoutPlugin).addPlugin(cliOverridesPlugin);
6690
+ }).use(extensionsContextPlugin).use(experimentalContextPlugin).use(generateAppTypesPlugin).use(buildManifestPlugin).use(bundleCodePlugin).use(getLoginConfigPathPlugin).use(addAppsPlugin).use(feedbackPlugin).use(curlPlugin).use(initPlugin).use(drainTriggerInboxCliPlugin, { override: true }).use(watchTriggerInboxCliPlugin, { override: true }).use(mcpPlugin).use(loginPlugin).use(logoutPlugin).use(cliOverridesPlugin, { override: true }).toSdk();
6695
6691
  for (const ext of extensions) {
6696
6692
  try {
6697
- chain = chain.addPlugin(ext);
6693
+ experimental.addPlugin(sdk, ext);
6698
6694
  } catch (err) {
6699
6695
  console.warn(
6700
6696
  `Extension plugin failed to construct: ${err.message}; skipping.`
6701
6697
  );
6702
6698
  }
6703
6699
  }
6704
- return chain;
6700
+ return sdk;
6705
6701
  }
6706
6702
 
6707
6703
  // src/utils/extensions.ts
@@ -6835,7 +6831,9 @@ async function checkForUpdates({
6835
6831
  currentVersion
6836
6832
  );
6837
6833
  } catch (error) {
6838
- log_default.debug(`Failed to check deprecation for current version: ${error}`);
6834
+ if (!(error instanceof packageJsonLib.VersionNotFoundError)) {
6835
+ log_default.debug(`Failed to check deprecation for current version: ${error}`);
6836
+ }
6839
6837
  currentPackageInfo = latestPackageInfo;
6840
6838
  }
6841
6839
  const isDeprecated = Boolean(currentPackageInfo.deprecated);