@zapier/zapier-sdk-cli 0.69.0 → 0.71.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 CHANGED
@@ -1,5 +1,41 @@
1
1
  # @zapier/zapier-sdk-cli
2
2
 
3
+ ## 0.71.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d700196: Added `createActionRun` and `getActionRun`, the two halves of `runAction` as separately callable methods:
8
+ - `createActionRun({ app, actionType, action, connection?, inputs?, page?, callbackUrl? })` — starts an action run and returns `{ id, implementation_id }` right away, without waiting for it to finish. `implementation_id` is the versioned implementation the run was started against, matching `implementation_id` on an app from `getApp` / `listApps`.
9
+ - `getActionRun({ run })` — returns that run's state: `{ id, status, results, errors, next_page? }`. It is a point-in-time read that answers immediately, so a run that is still executing comes back with `status: "waiting"` and it is up to the caller to check again. Unlike `runAction`, a failed run is reported as `status: "error"` with the details in `errors` rather than thrown.
10
+
11
+ To page a bulk read, pass the `next_page` from `getActionRun` back as the `page` for the next `createActionRun`. The pair uses the same page terminology in both directions, and `next_page` is always a string so it can be handed straight back. `runAction` is a paginated list method, so it keeps the SDK's usual `cursor` / `nextCursor` pair.
12
+
13
+ Pass `callbackUrl` to `createActionRun` to skip polling altogether: Zapier posts the finished run to that URL. It must use HTTPS and resolve to a public host. The delivered body matches what `getActionRun` returns, and carries a `Zapier-Callback-Signature` header holding an RS256 JWT you can verify against `https://zapier.com/.well-known/jwks.json`. Delivery is retried, so the same run can arrive more than once.
14
+
15
+ `runAction` is unchanged and is still the right call for most cases — it starts a run and waits for the result in one step. Reach for the pair when you don't want to block on the result: fan out many runs and collect them later, hand a run ID to another process, or pick a run back up after a restart. Run results are retained for seven days.
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [d700196]
20
+ - @zapier/zapier-sdk@0.94.0
21
+ - @zapier/zapier-sdk-mcp@0.19.0
22
+
23
+ ## 0.70.0
24
+
25
+ ### Minor Changes
26
+
27
+ - af89cf8: Boolean CLI flags are now strict presence toggles, and list-taking positional arguments now collect every operand:
28
+ - `--flag` enables; omitting the flag uses the default. Passing a value (`--flag false` or `--flag=false`) is rejected with an error pointing at the correct spelling, instead of being silently ignored (which previously left the flag enabled). A positional argument whose literal value looks boolean can still be passed after a `--` terminator.
29
+ - Flags where disabling differs from omitting get an explicit disable form: `publish-workflow-version <id> --disabled` and `publish-workflow-draft <workflow> <draft> --disabled` publish without enabling. Generated CLI docs show the disable form wherever one exists.
30
+ - Commands reject unexpected extra positional arguments rather than ignoring them.
31
+ - Commands whose first argument is a list (`add`, `build-manifest`, `generate-app-types`, the `create-`/`update-`/`delete-table-records` and `-fields` commands) now collect every operand into the list: `npx zapier-sdk add slack google-sheets` adds both apps. Previously only the first value was used and the rest were silently ignored.
32
+
33
+ ### Patch Changes
34
+
35
+ - Updated dependencies [bc7405e]
36
+ - @zapier/zapier-sdk@0.93.0
37
+ - @zapier/zapier-sdk-mcp@0.18.23
38
+
3
39
  ## 0.69.0
4
40
 
5
41
  ### Minor Changes
package/README.md CHANGED
@@ -13,8 +13,10 @@
13
13
  - [`logout`](#logout)
14
14
  - [`signup`](#signup)
15
15
  - [Actions](#actions)
16
+ - [`create-action-run`](#create-action-run)
16
17
  - [`get-action`](#get-action)
17
18
  - [`get-action-input-fields-schema`](#get-action-input-fields-schema)
19
+ - [`get-action-run`](#get-action-run)
18
20
  - [`list-action-input-field-choices`](#list-action-input-field-choices)
19
21
  - [`list-action-input-fields`](#list-action-input-fields)
20
22
  - [`list-actions`](#list-actions)
@@ -197,6 +199,8 @@ These options are available for all commands:
197
199
 
198
200
  The CLI automatically generates commands from the SDK registry. All SDK functions are available as CLI commands using kebab-case naming.
199
201
 
202
+ Boolean flags are presence toggles and take no value: pass `--flag` to enable it, or omit the flag to use the default. Flags where disabling differs from omitting document a separate disable flag (e.g. `--disabled`). A value after a boolean flag (`--flag false`) is rejected as an extra argument.
203
+
200
204
  ### Accounts
201
205
 
202
206
  #### `get-profile`
@@ -262,6 +266,28 @@ npx zapier-sdk signup [--timeout] [--use-approvals] [--non-interactive] [--headl
262
266
 
263
267
  ### Actions
264
268
 
269
+ #### `create-action-run`
270
+
271
+ Start an action run and return its ID without waiting for the result. Running an action is asynchronous: this hands back a run ID immediately, and `getActionRun` fetches the outcome. Reach for this pair when you want to start work and collect it later (fan out many runs, hand the ID to another process, survive a restart). `runAction` is the one-call form that starts a run and waits for its result.
272
+
273
+ **Options:**
274
+
275
+ | Option | Type | Required | Default | Possible Values | Description |
276
+ | ---------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
277
+ | `<app>` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
278
+ | `<action-type>` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
279
+ | `<action>` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
280
+ | `--connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Required if the action needs a connection to authenticate and interact with the service. Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
281
+ | `--inputs` | `object` | ❌ | — | — | Input parameters for the action |
282
+ | `--page` | `string` | ❌ | — | — | Page to fetch for bulk read actions. Pass the `next_page` a previous run returned to fetch the following page. |
283
+ | `--callback-url` | `string` | ❌ | — | — | URL Zapier posts the finished run to, so you do not have to poll for it. Must use HTTPS and resolve to a public host, so a local receiver needs a tunnel. The body matches what `getActionRun` returns. Verify the `Zapier-Callback-Signature` header, and expect the same run to arrive more than once. |
284
+
285
+ **Usage:**
286
+
287
+ ```bash
288
+ npx zapier-sdk create-action-run <app> <action-type> <action> [--connection] [--inputs] [--page] [--callback-url]
289
+ ```
290
+
265
291
  #### `get-action`
266
292
 
267
293
  Get detailed information about a specific action
@@ -300,6 +326,22 @@ Get the JSON Schema representation of input fields for an action. Returns a JSON
300
326
  npx zapier-sdk get-action-input-fields-schema <app> <action-type> <action> [--connection] [--inputs]
301
327
  ```
302
328
 
329
+ #### `get-action-run`
330
+
331
+ Fetch the current state of an action run started by `createActionRun`. This is a point-in-time read that returns immediately: a run Zapier has not finished executing comes back with status `waiting`, so call again to check for a result. `runAction` starts a run and waits for its result in one call. Results are stored for seven days after the run was created.
332
+
333
+ **Options:**
334
+
335
+ | Option | Type | Required | Default | Possible Values | Description |
336
+ | ------- | -------- | -------- | ------- | --------------- | ------------------------------------------- |
337
+ | `<run>` | `string` | ✅ | — | — | Action run ID returned by `createActionRun` |
338
+
339
+ **Usage:**
340
+
341
+ ```bash
342
+ npx zapier-sdk get-action-run <run>
343
+ ```
344
+
303
345
  #### `list-action-input-field-choices`
304
346
 
305
347
  Get the available choices for a dynamic dropdown input field
@@ -803,12 +845,12 @@ Publish an open draft as a new immutable workflow version. Advances the workflow
803
845
 
804
846
  **Options:**
805
847
 
806
- | Option | Type | Required | Default | Possible Values | Description |
807
- | ------------------ | --------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
808
- | `<workflow>` | `string` | ✅ | — | — | Durable workflow ID |
809
- | `<draft>` | `string` | ✅ | — | — | Workflow draft ID |
810
- | `--enabled` | `boolean` | ❌ | — | — | Set the workflow's enabled state as part of the publish. If omitted, the current enabled state is preserved. |
811
- | `--draft-revision` | `number` | ❌ | — | — | Expected draft revision for optimistic concurrency. Pass the revision from the last read; the server rejects the publish with a conflict if the draft has changed since. Omit to skip the check. |
848
+ | Option | Type | Required | Default | Possible Values | Description |
849
+ | -------------------------- | --------- | -------- | ------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
850
+ | `<workflow>` | `string` | ✅ | — | — | Durable workflow ID |
851
+ | `<draft>` | `string` | ✅ | — | — | Workflow draft ID |
852
+ | `--enabled` / `--disabled` | `boolean` | ❌ | — | — | Set the workflow's enabled state as part of the publish. If omitted, the current enabled state is preserved. |
853
+ | `--draft-revision` | `number` | ❌ | — | — | Expected draft revision for optimistic concurrency. Pass the revision from the last read; the server rejects the publish with a conflict if the draft has changed since. Omit to skip the check. |
812
854
 
813
855
  **Usage:**
814
856
 
@@ -828,7 +870,7 @@ Publish a new version of a durable workflow. Enables the workflow by default.
828
870
  | `<source-files>` | `object` | ✅ | — | — | Source files keyed by filename → contents |
829
871
  | `--dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
830
872
  | `--zapier-durable-version` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted. |
831
- | `--enabled` | `boolean` | ❌ | — | — | Enable the workflow after publishing. Defaults to true; pass false to publish without enabling. |
873
+ | `--enabled` / `--disabled` | `boolean` | ❌ | — | — | Enable the workflow after publishing. Defaults to true if omitted; pass false to publish without enabling. |
832
874
  | `--ignore-open-drafts` | `boolean` | ❌ | — | — | Publish even though the workflow has open draft(s). Without this, the API rejects a direct publish with a 409 while any draft is open, since publishing the draft later would ship its stale content over this version. |
833
875
  | `--connections` | `object` | ❌ | — | — | Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding. |
834
876
  | `--app-versions` | `object` | ❌ | — | — | Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding. |
package/dist/cli.cjs CHANGED
@@ -602,7 +602,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
602
602
 
603
603
  // package.json
604
604
  var package_default = {
605
- version: "0.69.0"};
605
+ version: "0.71.0"};
606
606
  var PACKAGE_MANAGERS = ["npm", "pnpm", "yarn", "bun"];
607
607
  var LOCKFILES = [
608
608
  ["pnpm-lock.yaml", "pnpm"],
@@ -866,6 +866,9 @@ function formatItemsGeneric(items, startingNumber = 0) {
866
866
  function toKebabCase(str) {
867
867
  return str.replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replace(/([a-z\d])([A-Z])/g, "$1-$2").toLowerCase();
868
868
  }
869
+ function kebabToCamelCase(str) {
870
+ return str.replace(/-([a-z])/g, (match) => match[1].toUpperCase());
871
+ }
869
872
  function formatMissingParamsError(error) {
870
873
  return [
871
874
  "Missing required parameters:",
@@ -1261,6 +1264,18 @@ function resolveOutputMode({
1261
1264
  if (hasUserSpecifiedMaxItems) return "collect";
1262
1265
  return "paginate";
1263
1266
  }
1267
+ function negationKebabName(param) {
1268
+ if (param.negatable === true) return `no-${toKebabCase(param.name)}`;
1269
+ if (typeof param.negatable === "string") return toKebabCase(param.negatable);
1270
+ return void 0;
1271
+ }
1272
+ function antonymAttributeName(param) {
1273
+ const negationKebab = negationKebabName(param);
1274
+ if (negationKebab === void 0 || negationKebab.startsWith("no-")) {
1275
+ return void 0;
1276
+ }
1277
+ return kebabToCamelCase(negationKebab);
1278
+ }
1264
1279
  function takesPositionalSlot(param) {
1265
1280
  return param.required || !!param.isPositional && !param.isDeprecated && !param.isAlias;
1266
1281
  }
@@ -1373,7 +1388,8 @@ function analyzeZodField(name, schema) {
1373
1388
  isPositional: zapierSdk.isPositional(schema),
1374
1389
  elementType,
1375
1390
  deprecationMessage,
1376
- isDeprecated
1391
+ isDeprecated,
1392
+ negatable: zapierSdk.getNegatable(schema)
1377
1393
  };
1378
1394
  }
1379
1395
  function positionalProjection(schema, positional) {
@@ -1758,15 +1774,25 @@ function collect(value, previous = []) {
1758
1774
  return previous;
1759
1775
  }
1760
1776
  function addCommand(program2, commandName, config2) {
1761
- const command = program2.command(commandName, { hidden: config2.hidden ?? false }).description(config2.description);
1777
+ const command = program2.command(commandName, { hidden: config2.hidden ?? false }).description(config2.description).allowExcessArguments(false);
1762
1778
  let hasPositionalArray = false;
1779
+ const lastPositionalParamName = [...config2.parameters].reverse().find(takesPositionalSlot)?.name;
1780
+ const booleanFlags2 = [];
1763
1781
  config2.parameters.forEach((param) => {
1764
1782
  const kebabName = toKebabCase(param.name);
1765
1783
  if (param.promptable && param.required) {
1766
- command.argument(
1767
- `[${kebabName}]`,
1768
- param.description || `${kebabName} parameter`
1769
- );
1784
+ if (param.type === "array" && !hasPositionalArray && param.name === lastPositionalParamName) {
1785
+ hasPositionalArray = true;
1786
+ command.argument(
1787
+ `[${kebabName}...]`,
1788
+ param.description || `${kebabName} parameter`
1789
+ );
1790
+ } else {
1791
+ command.argument(
1792
+ `[${kebabName}]`,
1793
+ param.description || `${kebabName} parameter`
1794
+ );
1795
+ }
1770
1796
  } else if (param.required && param.type === "array" && !hasPositionalArray) {
1771
1797
  hasPositionalArray = true;
1772
1798
  command.argument(
@@ -1803,6 +1829,24 @@ function addCommand(program2, commandName, config2) {
1803
1829
  const opt = new commander.Option(flags.join(", "), param.description);
1804
1830
  if (param.isDeprecated) opt.hideHelp();
1805
1831
  command.addOption(opt);
1832
+ const negationKebab = negationKebabName(param);
1833
+ if (negationKebab !== void 0) {
1834
+ const negation = new commander.Option(
1835
+ `--${negationKebab}`,
1836
+ `Disable --${kebabName}`
1837
+ );
1838
+ if (!negationKebab.startsWith("no-")) {
1839
+ negation.conflicts(param.name);
1840
+ }
1841
+ if (param.isDeprecated) negation.hideHelp();
1842
+ command.addOption(negation);
1843
+ }
1844
+ booleanFlags2.push({
1845
+ kebabName,
1846
+ attributeName: param.name,
1847
+ negationKebab,
1848
+ shortAlias: alias && alias.length === 1 ? alias : void 0
1849
+ });
1806
1850
  } else if (param.type === "array") {
1807
1851
  const flagSignature = flags.join(", ") + ` <value>`;
1808
1852
  const opt = new commander.Option(flagSignature, param.description || "");
@@ -1832,24 +1876,128 @@ function addCommand(program2, commandName, config2) {
1832
1876
  if (config2.supportsJsonOutput === false && opt.name === "json") return;
1833
1877
  command.option(opt.flag, opt.description);
1834
1878
  });
1879
+ if (booleanFlags2.length > 0) {
1880
+ addBooleanFlagErrorHints({ command, booleanFlags: booleanFlags2 });
1881
+ rejectBooleanFlagValues({ command, booleanFlags: booleanFlags2 });
1882
+ }
1835
1883
  command.action(config2.handler);
1836
1884
  }
1885
+ function booleanFlagUsageHint(flag) {
1886
+ return flag.negationKebab !== void 0 ? `use --${flag.kebabName} to enable or --${flag.negationKebab} to disable` : `pass --${flag.kebabName} to enable or omit it`;
1887
+ }
1888
+ function addBooleanFlagErrorHints({
1889
+ command,
1890
+ booleanFlags: booleanFlags2
1891
+ }) {
1892
+ const originalError = command.error.bind(command);
1893
+ command.error = (message, errorOptions) => originalError(
1894
+ appendBooleanFlagHint({
1895
+ message,
1896
+ code: errorOptions?.code,
1897
+ command,
1898
+ booleanFlags: booleanFlags2
1899
+ }),
1900
+ errorOptions
1901
+ );
1902
+ }
1903
+ function rejectBooleanFlagValues({
1904
+ command,
1905
+ booleanFlags: booleanFlags2
1906
+ }) {
1907
+ command.hook("preAction", (_thisCommand, actionCommand) => {
1908
+ let root = actionCommand;
1909
+ while (root.parent) root = root.parent;
1910
+ const { rawArgs } = root;
1911
+ const terminatorIndex = rawArgs.indexOf("--");
1912
+ const tokens = terminatorIndex === -1 ? rawArgs : rawArgs.slice(0, terminatorIndex);
1913
+ for (const flag of booleanFlags2) {
1914
+ const spellings = new Set(
1915
+ [
1916
+ `--${flag.kebabName}`,
1917
+ flag.negationKebab === void 0 ? void 0 : `--${flag.negationKebab}`,
1918
+ flag.shortAlias === void 0 ? void 0 : `-${flag.shortAlias}`
1919
+ ].filter((spelling) => spelling !== void 0)
1920
+ );
1921
+ for (let i = 0; i < tokens.length - 1; i++) {
1922
+ if (!spellings.has(tokens[i])) continue;
1923
+ const next = tokens[i + 1].trim().toLowerCase();
1924
+ if (!BOOLEAN_TRUE_TOKENS.has(next) && !BOOLEAN_FALSE_TOKENS.has(next)) {
1925
+ continue;
1926
+ }
1927
+ actionCommand.error(
1928
+ `error: ${tokens[i]} is a boolean flag and takes no value, but was followed by '${tokens[i + 1]}': ${booleanFlagUsageHint(flag)}.`,
1929
+ { code: "zapierSdk.booleanFlagValue" }
1930
+ );
1931
+ }
1932
+ }
1933
+ });
1934
+ }
1935
+ function appendBooleanFlagHint({
1936
+ message,
1937
+ code,
1938
+ command,
1939
+ booleanFlags: booleanFlags2
1940
+ }) {
1941
+ if (code === "commander.unknownOption") {
1942
+ const flagWithValue = message.match(/'--([^=']+)=/);
1943
+ if (!flagWithValue) return message;
1944
+ const typedName = flagWithValue[1];
1945
+ const flag = booleanFlags2.find(
1946
+ (candidate) => candidate.kebabName === typedName || candidate.negationKebab === typedName
1947
+ );
1948
+ if (flag === void 0) return message;
1949
+ return `${message}
1950
+ (--${typedName} is a boolean flag and takes no value: ${booleanFlagUsageHint(flag)}.)`;
1951
+ }
1952
+ if (code === "commander.excessArguments") {
1953
+ const excessOperands = command.args.slice(
1954
+ command.registeredArguments.length
1955
+ );
1956
+ const strayBooleanToken = excessOperands.find((token) => {
1957
+ const normalized = token.trim().toLowerCase();
1958
+ return BOOLEAN_TRUE_TOKENS.has(normalized) || BOOLEAN_FALSE_TOKENS.has(normalized);
1959
+ });
1960
+ if (strayBooleanToken === void 0) return message;
1961
+ const usedBooleanFlag = booleanFlags2.find(
1962
+ (flag) => [flag.attributeName, flag.negationKebab].filter((name) => name !== void 0).some(
1963
+ (name) => command.getOptionValueSource(kebabToCamelCase(name)) === "cli"
1964
+ )
1965
+ );
1966
+ if (usedBooleanFlag === void 0) return message;
1967
+ return `${message}
1968
+ (Boolean flags take no value, so '${strayBooleanToken}' was read as an extra argument: ${booleanFlagUsageHint(usedBooleanFlag)}.)`;
1969
+ }
1970
+ return message;
1971
+ }
1837
1972
  function convertCliArgsToSdkParams(parameters, positionalArgs, options) {
1838
1973
  const sdkParams = {};
1839
1974
  let argIndex = 0;
1840
1975
  parameters.forEach((param) => {
1841
1976
  if (takesPositionalSlot(param) && argIndex < positionalArgs.length) {
1977
+ const positionalValue = positionalArgs[argIndex];
1978
+ argIndex++;
1979
+ if (Array.isArray(positionalValue) && positionalValue.length === 0) {
1980
+ return;
1981
+ }
1842
1982
  sdkParams[param.name] = convertValue(
1843
- positionalArgs[argIndex],
1983
+ positionalValue,
1844
1984
  param.type,
1845
1985
  param.elementType
1846
1986
  );
1847
- argIndex++;
1848
1987
  }
1849
1988
  });
1850
1989
  Object.entries(options).forEach(([key, value]) => {
1851
1990
  const camelKey = key.replace(/-([a-z])/g, (g) => g[1].toUpperCase());
1852
1991
  const param = parameters.find((p) => p.name === camelKey);
1992
+ if (param === void 0 && value === true) {
1993
+ const antonymTarget = parameters.find(
1994
+ (p) => antonymAttributeName(p) === camelKey
1995
+ );
1996
+ if (antonymTarget && sdkParams[antonymTarget.name] === void 0) {
1997
+ sdkParams[antonymTarget.name] = false;
1998
+ }
1999
+ return;
2000
+ }
1853
2001
  if (param && value !== void 0) {
1854
2002
  if (sdkParams[camelKey] !== void 0) {
1855
2003
  return;
@@ -1862,6 +2010,16 @@ function convertCliArgsToSdkParams(parameters, positionalArgs, options) {
1862
2010
  });
1863
2011
  return sdkParams;
1864
2012
  }
2013
+ var BOOLEAN_TRUE_TOKENS = /* @__PURE__ */ new Set(["true", "1", "yes", "y", "on"]);
2014
+ var BOOLEAN_FALSE_TOKENS = /* @__PURE__ */ new Set(["false", "0", "no", "n", "off"]);
2015
+ function parseCliBoolean(value) {
2016
+ const normalized = value.trim().toLowerCase();
2017
+ if (BOOLEAN_TRUE_TOKENS.has(normalized)) return true;
2018
+ if (BOOLEAN_FALSE_TOKENS.has(normalized)) return false;
2019
+ throw new commander.InvalidArgumentError(
2020
+ `Expected a boolean (true or false), received "${value}".`
2021
+ );
2022
+ }
1865
2023
  function convertValue(value, type, elementType) {
1866
2024
  if (value === void 0) {
1867
2025
  return void 0;
@@ -1870,7 +2028,7 @@ function convertValue(value, type, elementType) {
1870
2028
  case "number":
1871
2029
  return Number(value);
1872
2030
  case "boolean":
1873
- return Boolean(value);
2031
+ return typeof value === "string" ? parseCliBoolean(value) : Boolean(value);
1874
2032
  case "array": {
1875
2033
  const arr = Array.isArray(value) ? value : [value];
1876
2034
  if (elementType !== "object") return arr;
@@ -8183,7 +8341,7 @@ function buildBoxLines(message) {
8183
8341
  // package.json with { type: 'json' }
8184
8342
  var package_default2 = {
8185
8343
  name: "@zapier/zapier-sdk-cli",
8186
- version: "0.69.0"};
8344
+ version: "0.71.0"};
8187
8345
 
8188
8346
  // src/sdk.ts
8189
8347
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { Command, CommanderError, Option } from 'commander';
3
- import { getConnectionPlugin, defineMethod, apiPluginRef, resolveCredentialsPluginRef, eventEmissionPluginRef, sdkOptionsPluginRef, declareOptionalProperty, OutputPropertySchema, ZapierBundleError, isZapierBundleError, DEFAULT_CONFIG_PATH, declareMethod, ZapierValidationError, isZapierValidationError, ZapierUnknownError, manifestPluginRef, defineResolver, isPermanentHttpError, isZapierAuthenticationError, ZapierApiError, defineMethodOverride, zapierCoreOptions, injectCliLogin, definePlugin, omitExports, zapierSdkPlugin, BaseSdkOptionsSchema, disposeSdk, invalidateCachedToken, batch, toSnakeCase, ZapierError, isZapierReleaseTriggerMessageSignal, createSdk as createSdk$1, CORE_OPTIONS_ID as CORE_OPTIONS_ID$1, SDK_OPTIONS_ID as SDK_OPTIONS_ID$1, addPlugin as addPlugin$1, getOrCreateApiClient, isCredentialsObject, getRegistryPlugin, createController, ZapierAbortDrainSignal, ZapierReleaseTriggerMessageSignal, buildApplicationLifecycleEvent, AuthMechanism, DEPRECATION_NOTICE_EVENT, runWithCallerContext, isCoreCancelledSignal, isPositional, resolvePlugin, isZapierError, formatErrorMessage, getOsInfo, getPlatformVersions, getAgent, getTtyContext, getCiPlatform, isCi, isZapierConflictError, getReleaseId, getCurrentTimestamp, generateEventId, isZapierApprovalError, ZapierAuthenticationError } from '@zapier/zapier-sdk';
2
+ import { Command, CommanderError, Option, InvalidArgumentError } from 'commander';
3
+ import { getConnectionPlugin, defineMethod, apiPluginRef, resolveCredentialsPluginRef, eventEmissionPluginRef, sdkOptionsPluginRef, declareOptionalProperty, OutputPropertySchema, ZapierBundleError, isZapierBundleError, DEFAULT_CONFIG_PATH, declareMethod, ZapierValidationError, isZapierValidationError, ZapierUnknownError, manifestPluginRef, defineResolver, isPermanentHttpError, isZapierAuthenticationError, ZapierApiError, defineMethodOverride, zapierCoreOptions, injectCliLogin, definePlugin, omitExports, zapierSdkPlugin, BaseSdkOptionsSchema, disposeSdk, invalidateCachedToken, batch, toSnakeCase, ZapierError, isZapierReleaseTriggerMessageSignal, createSdk as createSdk$1, CORE_OPTIONS_ID as CORE_OPTIONS_ID$1, SDK_OPTIONS_ID as SDK_OPTIONS_ID$1, addPlugin as addPlugin$1, getOrCreateApiClient, isCredentialsObject, getRegistryPlugin, createController, ZapierAbortDrainSignal, ZapierReleaseTriggerMessageSignal, buildApplicationLifecycleEvent, AuthMechanism, DEPRECATION_NOTICE_EVENT, runWithCallerContext, isCoreCancelledSignal, getNegatable, isPositional, resolvePlugin, isZapierError, formatErrorMessage, getOsInfo, getPlatformVersions, getAgent, getTtyContext, getCiPlatform, isCi, isZapierConflictError, getReleaseId, getCurrentTimestamp, generateEventId, isZapierApprovalError, ZapierAuthenticationError } from '@zapier/zapier-sdk';
4
4
  import { z } from 'zod';
5
5
  import inquirer from 'inquirer';
6
6
  import chalk8 from 'chalk';
@@ -558,7 +558,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
558
558
 
559
559
  // package.json
560
560
  var package_default = {
561
- version: "0.69.0"};
561
+ version: "0.71.0"};
562
562
  var PACKAGE_MANAGERS = ["npm", "pnpm", "yarn", "bun"];
563
563
  var LOCKFILES = [
564
564
  ["pnpm-lock.yaml", "pnpm"],
@@ -822,6 +822,9 @@ function formatItemsGeneric(items, startingNumber = 0) {
822
822
  function toKebabCase(str) {
823
823
  return str.replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replace(/([a-z\d])([A-Z])/g, "$1-$2").toLowerCase();
824
824
  }
825
+ function kebabToCamelCase(str) {
826
+ return str.replace(/-([a-z])/g, (match) => match[1].toUpperCase());
827
+ }
825
828
  function formatMissingParamsError(error) {
826
829
  return [
827
830
  "Missing required parameters:",
@@ -1217,6 +1220,18 @@ function resolveOutputMode({
1217
1220
  if (hasUserSpecifiedMaxItems) return "collect";
1218
1221
  return "paginate";
1219
1222
  }
1223
+ function negationKebabName(param) {
1224
+ if (param.negatable === true) return `no-${toKebabCase(param.name)}`;
1225
+ if (typeof param.negatable === "string") return toKebabCase(param.negatable);
1226
+ return void 0;
1227
+ }
1228
+ function antonymAttributeName(param) {
1229
+ const negationKebab = negationKebabName(param);
1230
+ if (negationKebab === void 0 || negationKebab.startsWith("no-")) {
1231
+ return void 0;
1232
+ }
1233
+ return kebabToCamelCase(negationKebab);
1234
+ }
1220
1235
  function takesPositionalSlot(param) {
1221
1236
  return param.required || !!param.isPositional && !param.isDeprecated && !param.isAlias;
1222
1237
  }
@@ -1329,7 +1344,8 @@ function analyzeZodField(name, schema) {
1329
1344
  isPositional: isPositional(schema),
1330
1345
  elementType,
1331
1346
  deprecationMessage,
1332
- isDeprecated
1347
+ isDeprecated,
1348
+ negatable: getNegatable(schema)
1333
1349
  };
1334
1350
  }
1335
1351
  function positionalProjection(schema, positional) {
@@ -1714,15 +1730,25 @@ function collect(value, previous = []) {
1714
1730
  return previous;
1715
1731
  }
1716
1732
  function addCommand(program2, commandName, config2) {
1717
- const command = program2.command(commandName, { hidden: config2.hidden ?? false }).description(config2.description);
1733
+ const command = program2.command(commandName, { hidden: config2.hidden ?? false }).description(config2.description).allowExcessArguments(false);
1718
1734
  let hasPositionalArray = false;
1735
+ const lastPositionalParamName = [...config2.parameters].reverse().find(takesPositionalSlot)?.name;
1736
+ const booleanFlags2 = [];
1719
1737
  config2.parameters.forEach((param) => {
1720
1738
  const kebabName = toKebabCase(param.name);
1721
1739
  if (param.promptable && param.required) {
1722
- command.argument(
1723
- `[${kebabName}]`,
1724
- param.description || `${kebabName} parameter`
1725
- );
1740
+ if (param.type === "array" && !hasPositionalArray && param.name === lastPositionalParamName) {
1741
+ hasPositionalArray = true;
1742
+ command.argument(
1743
+ `[${kebabName}...]`,
1744
+ param.description || `${kebabName} parameter`
1745
+ );
1746
+ } else {
1747
+ command.argument(
1748
+ `[${kebabName}]`,
1749
+ param.description || `${kebabName} parameter`
1750
+ );
1751
+ }
1726
1752
  } else if (param.required && param.type === "array" && !hasPositionalArray) {
1727
1753
  hasPositionalArray = true;
1728
1754
  command.argument(
@@ -1759,6 +1785,24 @@ function addCommand(program2, commandName, config2) {
1759
1785
  const opt = new Option(flags.join(", "), param.description);
1760
1786
  if (param.isDeprecated) opt.hideHelp();
1761
1787
  command.addOption(opt);
1788
+ const negationKebab = negationKebabName(param);
1789
+ if (negationKebab !== void 0) {
1790
+ const negation = new Option(
1791
+ `--${negationKebab}`,
1792
+ `Disable --${kebabName}`
1793
+ );
1794
+ if (!negationKebab.startsWith("no-")) {
1795
+ negation.conflicts(param.name);
1796
+ }
1797
+ if (param.isDeprecated) negation.hideHelp();
1798
+ command.addOption(negation);
1799
+ }
1800
+ booleanFlags2.push({
1801
+ kebabName,
1802
+ attributeName: param.name,
1803
+ negationKebab,
1804
+ shortAlias: alias && alias.length === 1 ? alias : void 0
1805
+ });
1762
1806
  } else if (param.type === "array") {
1763
1807
  const flagSignature = flags.join(", ") + ` <value>`;
1764
1808
  const opt = new Option(flagSignature, param.description || "");
@@ -1788,24 +1832,128 @@ function addCommand(program2, commandName, config2) {
1788
1832
  if (config2.supportsJsonOutput === false && opt.name === "json") return;
1789
1833
  command.option(opt.flag, opt.description);
1790
1834
  });
1835
+ if (booleanFlags2.length > 0) {
1836
+ addBooleanFlagErrorHints({ command, booleanFlags: booleanFlags2 });
1837
+ rejectBooleanFlagValues({ command, booleanFlags: booleanFlags2 });
1838
+ }
1791
1839
  command.action(config2.handler);
1792
1840
  }
1841
+ function booleanFlagUsageHint(flag) {
1842
+ return flag.negationKebab !== void 0 ? `use --${flag.kebabName} to enable or --${flag.negationKebab} to disable` : `pass --${flag.kebabName} to enable or omit it`;
1843
+ }
1844
+ function addBooleanFlagErrorHints({
1845
+ command,
1846
+ booleanFlags: booleanFlags2
1847
+ }) {
1848
+ const originalError = command.error.bind(command);
1849
+ command.error = (message, errorOptions) => originalError(
1850
+ appendBooleanFlagHint({
1851
+ message,
1852
+ code: errorOptions?.code,
1853
+ command,
1854
+ booleanFlags: booleanFlags2
1855
+ }),
1856
+ errorOptions
1857
+ );
1858
+ }
1859
+ function rejectBooleanFlagValues({
1860
+ command,
1861
+ booleanFlags: booleanFlags2
1862
+ }) {
1863
+ command.hook("preAction", (_thisCommand, actionCommand) => {
1864
+ let root = actionCommand;
1865
+ while (root.parent) root = root.parent;
1866
+ const { rawArgs } = root;
1867
+ const terminatorIndex = rawArgs.indexOf("--");
1868
+ const tokens = terminatorIndex === -1 ? rawArgs : rawArgs.slice(0, terminatorIndex);
1869
+ for (const flag of booleanFlags2) {
1870
+ const spellings = new Set(
1871
+ [
1872
+ `--${flag.kebabName}`,
1873
+ flag.negationKebab === void 0 ? void 0 : `--${flag.negationKebab}`,
1874
+ flag.shortAlias === void 0 ? void 0 : `-${flag.shortAlias}`
1875
+ ].filter((spelling) => spelling !== void 0)
1876
+ );
1877
+ for (let i = 0; i < tokens.length - 1; i++) {
1878
+ if (!spellings.has(tokens[i])) continue;
1879
+ const next = tokens[i + 1].trim().toLowerCase();
1880
+ if (!BOOLEAN_TRUE_TOKENS.has(next) && !BOOLEAN_FALSE_TOKENS.has(next)) {
1881
+ continue;
1882
+ }
1883
+ actionCommand.error(
1884
+ `error: ${tokens[i]} is a boolean flag and takes no value, but was followed by '${tokens[i + 1]}': ${booleanFlagUsageHint(flag)}.`,
1885
+ { code: "zapierSdk.booleanFlagValue" }
1886
+ );
1887
+ }
1888
+ }
1889
+ });
1890
+ }
1891
+ function appendBooleanFlagHint({
1892
+ message,
1893
+ code,
1894
+ command,
1895
+ booleanFlags: booleanFlags2
1896
+ }) {
1897
+ if (code === "commander.unknownOption") {
1898
+ const flagWithValue = message.match(/'--([^=']+)=/);
1899
+ if (!flagWithValue) return message;
1900
+ const typedName = flagWithValue[1];
1901
+ const flag = booleanFlags2.find(
1902
+ (candidate) => candidate.kebabName === typedName || candidate.negationKebab === typedName
1903
+ );
1904
+ if (flag === void 0) return message;
1905
+ return `${message}
1906
+ (--${typedName} is a boolean flag and takes no value: ${booleanFlagUsageHint(flag)}.)`;
1907
+ }
1908
+ if (code === "commander.excessArguments") {
1909
+ const excessOperands = command.args.slice(
1910
+ command.registeredArguments.length
1911
+ );
1912
+ const strayBooleanToken = excessOperands.find((token) => {
1913
+ const normalized = token.trim().toLowerCase();
1914
+ return BOOLEAN_TRUE_TOKENS.has(normalized) || BOOLEAN_FALSE_TOKENS.has(normalized);
1915
+ });
1916
+ if (strayBooleanToken === void 0) return message;
1917
+ const usedBooleanFlag = booleanFlags2.find(
1918
+ (flag) => [flag.attributeName, flag.negationKebab].filter((name) => name !== void 0).some(
1919
+ (name) => command.getOptionValueSource(kebabToCamelCase(name)) === "cli"
1920
+ )
1921
+ );
1922
+ if (usedBooleanFlag === void 0) return message;
1923
+ return `${message}
1924
+ (Boolean flags take no value, so '${strayBooleanToken}' was read as an extra argument: ${booleanFlagUsageHint(usedBooleanFlag)}.)`;
1925
+ }
1926
+ return message;
1927
+ }
1793
1928
  function convertCliArgsToSdkParams(parameters, positionalArgs, options) {
1794
1929
  const sdkParams = {};
1795
1930
  let argIndex = 0;
1796
1931
  parameters.forEach((param) => {
1797
1932
  if (takesPositionalSlot(param) && argIndex < positionalArgs.length) {
1933
+ const positionalValue = positionalArgs[argIndex];
1934
+ argIndex++;
1935
+ if (Array.isArray(positionalValue) && positionalValue.length === 0) {
1936
+ return;
1937
+ }
1798
1938
  sdkParams[param.name] = convertValue(
1799
- positionalArgs[argIndex],
1939
+ positionalValue,
1800
1940
  param.type,
1801
1941
  param.elementType
1802
1942
  );
1803
- argIndex++;
1804
1943
  }
1805
1944
  });
1806
1945
  Object.entries(options).forEach(([key, value]) => {
1807
1946
  const camelKey = key.replace(/-([a-z])/g, (g) => g[1].toUpperCase());
1808
1947
  const param = parameters.find((p) => p.name === camelKey);
1948
+ if (param === void 0 && value === true) {
1949
+ const antonymTarget = parameters.find(
1950
+ (p) => antonymAttributeName(p) === camelKey
1951
+ );
1952
+ if (antonymTarget && sdkParams[antonymTarget.name] === void 0) {
1953
+ sdkParams[antonymTarget.name] = false;
1954
+ }
1955
+ return;
1956
+ }
1809
1957
  if (param && value !== void 0) {
1810
1958
  if (sdkParams[camelKey] !== void 0) {
1811
1959
  return;
@@ -1818,6 +1966,16 @@ function convertCliArgsToSdkParams(parameters, positionalArgs, options) {
1818
1966
  });
1819
1967
  return sdkParams;
1820
1968
  }
1969
+ var BOOLEAN_TRUE_TOKENS = /* @__PURE__ */ new Set(["true", "1", "yes", "y", "on"]);
1970
+ var BOOLEAN_FALSE_TOKENS = /* @__PURE__ */ new Set(["false", "0", "no", "n", "off"]);
1971
+ function parseCliBoolean(value) {
1972
+ const normalized = value.trim().toLowerCase();
1973
+ if (BOOLEAN_TRUE_TOKENS.has(normalized)) return true;
1974
+ if (BOOLEAN_FALSE_TOKENS.has(normalized)) return false;
1975
+ throw new InvalidArgumentError(
1976
+ `Expected a boolean (true or false), received "${value}".`
1977
+ );
1978
+ }
1821
1979
  function convertValue(value, type, elementType) {
1822
1980
  if (value === void 0) {
1823
1981
  return void 0;
@@ -1826,7 +1984,7 @@ function convertValue(value, type, elementType) {
1826
1984
  case "number":
1827
1985
  return Number(value);
1828
1986
  case "boolean":
1829
- return Boolean(value);
1987
+ return typeof value === "string" ? parseCliBoolean(value) : Boolean(value);
1830
1988
  case "array": {
1831
1989
  const arr = Array.isArray(value) ? value : [value];
1832
1990
  if (elementType !== "object") return arr;
@@ -8139,7 +8297,7 @@ function buildBoxLines(message) {
8139
8297
  // package.json with { type: 'json' }
8140
8298
  var package_default2 = {
8141
8299
  name: "@zapier/zapier-sdk-cli",
8142
- version: "0.69.0"};
8300
+ version: "0.71.0"};
8143
8301
 
8144
8302
  // src/sdk.ts
8145
8303
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -6861,7 +6861,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
6861
6861
  // package.json with { type: 'json' }
6862
6862
  var package_default = {
6863
6863
  name: "@zapier/zapier-sdk-cli",
6864
- version: "0.69.0"};
6864
+ version: "0.71.0"};
6865
6865
 
6866
6866
  // src/sdk.ts
6867
6867
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -6820,7 +6820,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
6820
6820
  // package.json with { type: 'json' }
6821
6821
  var package_default = {
6822
6822
  name: "@zapier/zapier-sdk-cli",
6823
- version: "0.69.0"};
6823
+ version: "0.71.0"};
6824
6824
 
6825
6825
  // src/sdk.ts
6826
6826
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
package/dist/index.cjs CHANGED
@@ -32,6 +32,7 @@ var crossSpawn = require('cross-spawn');
32
32
  var wrapAnsi = require('wrap-ansi');
33
33
  var Table = require('cli-table3');
34
34
  var experimental = require('@zapier/zapier-sdk/experimental');
35
+ require('commander');
35
36
 
36
37
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
37
38
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -6861,7 +6862,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
6861
6862
  // package.json with { type: 'json' }
6862
6863
  var package_default = {
6863
6864
  name: "@zapier/zapier-sdk-cli",
6864
- version: "0.69.0"};
6865
+ version: "0.71.0"};
6865
6866
 
6866
6867
  // src/sdk.ts
6867
6868
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -6945,7 +6946,7 @@ function createZapierCliSdk(options = {}) {
6945
6946
 
6946
6947
  // package.json
6947
6948
  var package_default2 = {
6948
- version: "0.69.0"};
6949
+ version: "0.71.0"};
6949
6950
 
6950
6951
  // src/telemetry/builders.ts
6951
6952
  function createCliBaseEvent(context = {}) {
@@ -7037,6 +7038,14 @@ var SHARED_COMMAND_CLI_OPTIONS = [
7037
7038
  description: "Output raw JSON instead of formatted results"
7038
7039
  }
7039
7040
  ];
7041
+ function negationKebabName(param) {
7042
+ if (param.negatable === true) return `no-${toKebabCase(param.name)}`;
7043
+ if (typeof param.negatable === "string") return toKebabCase(param.negatable);
7044
+ return void 0;
7045
+ }
7046
+ ({
7047
+ [zapierSdk.getConnectionPlugin.name]: /* @__PURE__ */ new Set(["connection"])
7048
+ });
7040
7049
 
7041
7050
  exports.RESERVED_CLI_OPTIONS = RESERVED_CLI_OPTIONS;
7042
7051
  exports.ReservedCliParameter = ReservedCliParameter;
@@ -7044,3 +7053,4 @@ exports.SHARED_COMMAND_CLI_OPTIONS = SHARED_COMMAND_CLI_OPTIONS;
7044
7053
  exports.buildCliCommandExecutedEvent = buildCliCommandExecutedEvent;
7045
7054
  exports.createZapierCliSdk = createZapierCliSdk;
7046
7055
  exports.getReservedCliOption = getReservedCliOption;
7056
+ exports.negationKebabName = negationKebabName;
package/dist/index.d.mts CHANGED
@@ -125,4 +125,15 @@ declare function getReservedCliOption(name: ReservedCliParameter): Readonly<CliO
125
125
  /** CLI options automatically added to every SDK-generated command. */
126
126
  declare const SHARED_COMMAND_CLI_OPTIONS: readonly Readonly<CliOption>[];
127
127
 
128
- export { type CliCommandExecutedEvent, type CliCommandExecutedEventData, type CliEventContext, RESERVED_CLI_OPTIONS, ReservedCliParameter, SHARED_COMMAND_CLI_OPTIONS, type ZapierCliSdkOptions, buildCliCommandExecutedEvent, createZapierCliSdk, getReservedCliOption };
128
+ /**
129
+ * The kebab-case flag name (without leading dashes) of a boolean param's
130
+ * disable spelling, or undefined when the param's schema doesn't declare
131
+ * `negatable` metadata. Exported for the docs generator, so the CLI's
132
+ * rendering of the metadata lives in one place.
133
+ */
134
+ declare function negationKebabName(param: {
135
+ name: string;
136
+ negatable?: true | string;
137
+ }): string | undefined;
138
+
139
+ export { type CliCommandExecutedEvent, type CliCommandExecutedEventData, type CliEventContext, RESERVED_CLI_OPTIONS, ReservedCliParameter, SHARED_COMMAND_CLI_OPTIONS, type ZapierCliSdkOptions, buildCliCommandExecutedEvent, createZapierCliSdk, getReservedCliOption, negationKebabName };
package/dist/index.d.ts CHANGED
@@ -125,4 +125,15 @@ declare function getReservedCliOption(name: ReservedCliParameter): Readonly<CliO
125
125
  /** CLI options automatically added to every SDK-generated command. */
126
126
  declare const SHARED_COMMAND_CLI_OPTIONS: readonly Readonly<CliOption>[];
127
127
 
128
- export { type CliCommandExecutedEvent, type CliCommandExecutedEventData, type CliEventContext, RESERVED_CLI_OPTIONS, ReservedCliParameter, SHARED_COMMAND_CLI_OPTIONS, type ZapierCliSdkOptions, buildCliCommandExecutedEvent, createZapierCliSdk, getReservedCliOption };
128
+ /**
129
+ * The kebab-case flag name (without leading dashes) of a boolean param's
130
+ * disable spelling, or undefined when the param's schema doesn't declare
131
+ * `negatable` metadata. Exported for the docs generator, so the CLI's
132
+ * rendering of the metadata lives in one place.
133
+ */
134
+ declare function negationKebabName(param: {
135
+ name: string;
136
+ negatable?: true | string;
137
+ }): string | undefined;
138
+
139
+ export { type CliCommandExecutedEvent, type CliCommandExecutedEventData, type CliEventContext, RESERVED_CLI_OPTIONS, ReservedCliParameter, SHARED_COMMAND_CLI_OPTIONS, type ZapierCliSdkOptions, buildCliCommandExecutedEvent, createZapierCliSdk, getReservedCliOption, negationKebabName };
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ import crypto, { createHash } from 'crypto';
7
7
  import * as path from 'path';
8
8
  import { resolve, join, dirname, basename, relative, extname } from 'path';
9
9
  import * as lockfile from 'proper-lockfile';
10
- import { defineMethod, apiPluginRef, resolveCredentialsPluginRef, eventEmissionPluginRef, sdkOptionsPluginRef, declareOptionalProperty, OutputPropertySchema, ZapierBundleError, isZapierBundleError, DEFAULT_CONFIG_PATH, declareMethod, ZapierValidationError, isZapierValidationError, ZapierUnknownError, manifestPluginRef, defineResolver, isPermanentHttpError, isZapierAuthenticationError, ZapierApiError, defineMethodOverride, zapierCoreOptions, injectCliLogin, definePlugin, omitExports, zapierSdkPlugin, invalidateCachedToken, batch, toSnakeCase, ZapierError, isZapierReleaseTriggerMessageSignal, getOrCreateApiClient, isCredentialsObject, createSdk, getRegistryPlugin, createController, ZapierAbortDrainSignal, ZapierReleaseTriggerMessageSignal, buildApplicationLifecycleEvent, AuthMechanism, isCoreCancelledSignal, ZapierAuthenticationError, CORE_OPTIONS_ID, SDK_OPTIONS_ID, addPlugin, getOsInfo, getPlatformVersions, getAgent, getTtyContext, getCiPlatform, isCi, getReleaseId, getCurrentTimestamp, generateEventId, DEPRECATION_NOTICE_EVENT } from '@zapier/zapier-sdk';
10
+ import { defineMethod, apiPluginRef, resolveCredentialsPluginRef, eventEmissionPluginRef, sdkOptionsPluginRef, declareOptionalProperty, OutputPropertySchema, ZapierBundleError, isZapierBundleError, DEFAULT_CONFIG_PATH, declareMethod, ZapierValidationError, isZapierValidationError, ZapierUnknownError, manifestPluginRef, defineResolver, isPermanentHttpError, isZapierAuthenticationError, ZapierApiError, defineMethodOverride, zapierCoreOptions, injectCliLogin, definePlugin, omitExports, zapierSdkPlugin, getConnectionPlugin, invalidateCachedToken, batch, toSnakeCase, ZapierError, isZapierReleaseTriggerMessageSignal, getOrCreateApiClient, isCredentialsObject, createSdk, getRegistryPlugin, createController, ZapierAbortDrainSignal, ZapierReleaseTriggerMessageSignal, buildApplicationLifecycleEvent, AuthMechanism, isCoreCancelledSignal, ZapierAuthenticationError, CORE_OPTIONS_ID, SDK_OPTIONS_ID, addPlugin, getOsInfo, getPlatformVersions, getAgent, getTtyContext, getCiPlatform, isCi, getReleaseId, getCurrentTimestamp, generateEventId, DEPRECATION_NOTICE_EVENT } from '@zapier/zapier-sdk';
11
11
  import { z } from 'zod';
12
12
  import chalk3 from 'chalk';
13
13
  import { hostname } from 'os';
@@ -32,6 +32,7 @@ import crossSpawn from 'cross-spawn';
32
32
  import wrapAnsi from 'wrap-ansi';
33
33
  import Table from 'cli-table3';
34
34
  import { triggerInboxResolver, DrainTriggerInboxSchema, WatchTriggerInboxSchema } from '@zapier/zapier-sdk/experimental';
35
+ import 'commander';
35
36
 
36
37
  var __defProp = Object.defineProperty;
37
38
  var __export = (target, all) => {
@@ -6820,7 +6821,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
6820
6821
  // package.json with { type: 'json' }
6821
6822
  var package_default = {
6822
6823
  name: "@zapier/zapier-sdk-cli",
6823
- version: "0.69.0"};
6824
+ version: "0.71.0"};
6824
6825
 
6825
6826
  // src/sdk.ts
6826
6827
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
@@ -6904,7 +6905,7 @@ function createZapierCliSdk(options = {}) {
6904
6905
 
6905
6906
  // package.json
6906
6907
  var package_default2 = {
6907
- version: "0.69.0"};
6908
+ version: "0.71.0"};
6908
6909
 
6909
6910
  // src/telemetry/builders.ts
6910
6911
  function createCliBaseEvent(context = {}) {
@@ -6996,5 +6997,13 @@ var SHARED_COMMAND_CLI_OPTIONS = [
6996
6997
  description: "Output raw JSON instead of formatted results"
6997
6998
  }
6998
6999
  ];
7000
+ function negationKebabName(param) {
7001
+ if (param.negatable === true) return `no-${toKebabCase(param.name)}`;
7002
+ if (typeof param.negatable === "string") return toKebabCase(param.negatable);
7003
+ return void 0;
7004
+ }
7005
+ ({
7006
+ [getConnectionPlugin.name]: /* @__PURE__ */ new Set(["connection"])
7007
+ });
6999
7008
 
7000
- export { RESERVED_CLI_OPTIONS, ReservedCliParameter, SHARED_COMMAND_CLI_OPTIONS, buildCliCommandExecutedEvent, createZapierCliSdk, getReservedCliOption };
7009
+ export { RESERVED_CLI_OPTIONS, ReservedCliParameter, SHARED_COMMAND_CLI_OPTIONS, buildCliCommandExecutedEvent, createZapierCliSdk, getReservedCliOption, negationKebabName };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk-cli",
3
- "version": "0.69.0",
3
+ "version": "0.71.0",
4
4
  "description": "Command line interface for Zapier SDK",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -95,8 +95,8 @@
95
95
  "typescript": "^5.8.3",
96
96
  "wrap-ansi": "^10.0.0",
97
97
  "zod": "4.3.6",
98
- "@zapier/zapier-sdk": "0.92.1",
99
- "@zapier/zapier-sdk-mcp": "0.18.22"
98
+ "@zapier/zapier-sdk": "0.94.0",
99
+ "@zapier/zapier-sdk-mcp": "0.19.0"
100
100
  },
101
101
  "devDependencies": {
102
102
  "@types/cross-spawn": "^6.0.6",