@zapier/zapier-sdk-cli 0.84.5 → 0.85.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.
@@ -3033,9 +3033,9 @@ var CLI_EXTENSIONS_ID = "cli/extensions";
3033
3033
  var cliExtensionsPluginRef = zapierSdk.declareOptionalProperty({
3034
3034
  id: CLI_EXTENSIONS_ID
3035
3035
  });
3036
- var CLI_EXPERIMENTAL_ID = "cli/experimental";
3037
- var cliExperimentalPluginRef = zapierSdk.declareOptionalProperty({
3038
- id: CLI_EXPERIMENTAL_ID
3036
+ var CLI_STABILITY_ID = "cli/stability";
3037
+ var cliStabilityPluginRef = zapierSdk.declareOptionalProperty({
3038
+ id: CLI_STABILITY_ID
3039
3039
  });
3040
3040
  var McpSchema = zod.z.object({
3041
3041
  port: zod.z.string().optional().describe("Port to listen on (for future HTTP transport)")
@@ -3044,11 +3044,7 @@ var McpSchema = zod.z.object({
3044
3044
  // src/plugins/mcp/index.ts
3045
3045
  var mcpPlugin = zapierSdk.defineMethod({
3046
3046
  name: "mcp",
3047
- imports: [
3048
- zapierSdk.sdkOptionsPluginRef,
3049
- cliExtensionsPluginRef,
3050
- cliExperimentalPluginRef
3051
- ],
3047
+ imports: [zapierSdk.sdkOptionsPluginRef, cliExtensionsPluginRef, cliStabilityPluginRef],
3052
3048
  output: "raw",
3053
3049
  inputSchema: McpSchema,
3054
3050
  categories: ["utility"],
@@ -3058,7 +3054,7 @@ var mcpPlugin = zapierSdk.defineMethod({
3058
3054
  debug: imports.sdkOptions?.debug,
3059
3055
  maxConcurrentRequests: imports.sdkOptions?.maxConcurrentRequests,
3060
3056
  extensions: imports.extensions,
3061
- experimental: imports.experimental
3057
+ stability: imports.stability
3062
3058
  });
3063
3059
  }
3064
3060
  });
@@ -7197,7 +7193,7 @@ var createWorkflowCliPlugin = experimental.defineMethod({
7197
7193
  type: "create",
7198
7194
  itemType: "Workflow",
7199
7195
  categories: ["code-workflow"],
7200
- experimental: true,
7196
+ stability: "experimental",
7201
7197
  inputSchema: CreateWorkflowCliOptionsSchema,
7202
7198
  outputSchema: experimental.CreateWorkflowResponseSchema,
7203
7199
  skipOutputValidation: true,
@@ -7208,6 +7204,17 @@ var createWorkflowCliPlugin = experimental.defineMethod({
7208
7204
  creationAccessMethod: "sdk_cli"
7209
7205
  })
7210
7206
  });
7207
+ function warningBlock({
7208
+ banner,
7209
+ message,
7210
+ detail
7211
+ }) {
7212
+ console.warn();
7213
+ console.warn(chalk5__default.default.yellow.bold(banner) + chalk5__default.default.yellow(message));
7214
+ if (detail) console.warn(chalk5__default.default.yellow(` ${detail}`));
7215
+ console.warn();
7216
+ }
7217
+ var DEPRECATION_BANNER = "\u26A0\uFE0F DEPRECATION WARNING";
7211
7218
  var activeNotices = /* @__PURE__ */ new Map();
7212
7219
  function collectDeprecationNotice(event) {
7213
7220
  if (event.type !== zapierSdk.DEPRECATION_NOTICE_EVENT) return;
@@ -7224,21 +7231,33 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
7224
7231
  // package.json with { type: 'json' }
7225
7232
  var package_default = {
7226
7233
  name: "@zapier/zapier-sdk-cli",
7227
- version: "0.84.5"};
7234
+ version: "0.85.0"};
7228
7235
 
7229
7236
  // src/sdk.ts
7230
7237
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
7238
+ var warnedStabilityMethods = /* @__PURE__ */ new Set();
7231
7239
  var cliCoreOptions = {
7232
7240
  ...zapierSdk.zapierCoreOptions,
7233
7241
  logDeprecation: ({ methodName, deprecation }) => {
7234
7242
  if (warnedDeprecatedMethods.has(methodName)) return;
7235
7243
  warnedDeprecatedMethods.add(methodName);
7236
- console.warn();
7237
- console.warn(
7238
- chalk5__default.default.yellow.bold("\u26A0\uFE0F DEPRECATION WARNING") + chalk5__default.default.yellow(` - \`${toKebabCase(methodName)}\` is deprecated.`)
7239
- );
7240
- console.warn(chalk5__default.default.yellow(` ${deprecation.message}`));
7241
- console.warn();
7244
+ warningBlock({
7245
+ banner: DEPRECATION_BANNER,
7246
+ message: ` - \`${toKebabCase(methodName)}\` is deprecated.`,
7247
+ detail: deprecation.message
7248
+ });
7249
+ },
7250
+ logStabilityNotice: ({ methodName, stability }) => {
7251
+ if (stability === "stable") return;
7252
+ if (warnedStabilityMethods.has(methodName)) return;
7253
+ warnedStabilityMethods.add(methodName);
7254
+ warningBlock({
7255
+ banner: `\u26A0\uFE0F ${stability.toUpperCase()} COMMAND`,
7256
+ message: ` - \`${toKebabCase(methodName)}\` is marked ${stability}.`,
7257
+ // The detail line is the tier's consumer contract, so the CLI says the
7258
+ // same thing as the SDK's runtime notice and the generated docs.
7259
+ detail: zapierSdk.STABILITY_DEFINITIONS[stability]
7260
+ });
7242
7261
  }
7243
7262
  };
7244
7263
  zapierSdk.injectCliLogin(login_exports);
@@ -7321,7 +7340,7 @@ function createZapierCliSdk(options = {}) {
7321
7340
  [CLI_EXTENSIONS_ID]: extensions,
7322
7341
  // Built by the experimental factory: `mcp` reads this to launch the
7323
7342
  // experimental MCP server so the surfaces stay aligned.
7324
- [CLI_EXPERIMENTAL_ID]: true
7343
+ [CLI_STABILITY_ID]: "experimental"
7325
7344
  }
7326
7345
  });
7327
7346
  experimental.addPlugin(sdk, cliFetchOverride);
@@ -10,15 +10,17 @@ import 'zod/v4/core';
10
10
  *
11
11
  * Mirror of `./sdk.ts`, but built on top of
12
12
  * `@zapier/zapier-sdk/experimental` so the underlying SDK has every
13
- * `meta.experimental: true` plugin registered. The CLI's runtime
14
- * entry point (`cli.ts`) chooses between this and the stable factory
15
- * based on three equivalent triggers detected before Commander parses:
16
- * the `zapier-sdk-experimental` bin name (via `argv[1]`), the
17
- * `--experimental` flag, or the `ZAPIER_EXPERIMENTAL=1` env var.
13
+ * non-stable plugin registered (the experimental aggregate composes the
14
+ * beta one). The CLI's runtime entry point (`cli.ts`) chooses between
15
+ * this, the beta, and the stable factory based on equivalent triggers
16
+ * detected before Commander parses: `--stability experimental` /
17
+ * `ZAPIER_STABILITY=experimental`, or the released deprecated
18
+ * equivalents — the `zapier-sdk-experimental` bin, the `--experimental`
19
+ * flag, and the `ZAPIER_EXPERIMENTAL=1` env var.
18
20
  *
19
21
  * Plugin chain matches `./sdk.ts` literally, with future CLI-only
20
- * experimental plugins inserted at appropriate positions. Both
21
- * factories are kept in sync by shape tests.
22
+ * experimental plugins inserted at appropriate positions. All factories
23
+ * are kept in sync by the stability-ladder shape tests.
22
24
  */
23
25
 
24
26
  interface ZapierCliSdkOptions extends ZapierSdkOptions {
@@ -10,15 +10,17 @@ import 'zod/v4/core';
10
10
  *
11
11
  * Mirror of `./sdk.ts`, but built on top of
12
12
  * `@zapier/zapier-sdk/experimental` so the underlying SDK has every
13
- * `meta.experimental: true` plugin registered. The CLI's runtime
14
- * entry point (`cli.ts`) chooses between this and the stable factory
15
- * based on three equivalent triggers detected before Commander parses:
16
- * the `zapier-sdk-experimental` bin name (via `argv[1]`), the
17
- * `--experimental` flag, or the `ZAPIER_EXPERIMENTAL=1` env var.
13
+ * non-stable plugin registered (the experimental aggregate composes the
14
+ * beta one). The CLI's runtime entry point (`cli.ts`) chooses between
15
+ * this, the beta, and the stable factory based on equivalent triggers
16
+ * detected before Commander parses: `--stability experimental` /
17
+ * `ZAPIER_STABILITY=experimental`, or the released deprecated
18
+ * equivalents — the `zapier-sdk-experimental` bin, the `--experimental`
19
+ * flag, and the `ZAPIER_EXPERIMENTAL=1` env var.
18
20
  *
19
21
  * Plugin chain matches `./sdk.ts` literally, with future CLI-only
20
- * experimental plugins inserted at appropriate positions. Both
21
- * factories are kept in sync by shape tests.
22
+ * experimental plugins inserted at appropriate positions. All factories
23
+ * are kept in sync by the stability-ladder shape tests.
22
24
  */
23
25
 
24
26
  interface ZapierCliSdkOptions extends ZapierSdkOptions {
@@ -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 { definePlugin, apiPlugin, defineMethod, apiPluginRef, resolveCredentialsPluginRef, eventEmissionPluginRef, sdkOptionsPluginRef, declareOptionalProperty, OutputPropertySchema, ZapierBundleError, isZapierBundleError, DEFAULT_CONFIG_PATH, declareMethod, ZapierValidationError, isZapierValidationError, ZapierUnknownError, manifestPluginRef, defineResolver, isPermanentHttpError, isZapierAuthenticationError, ZapierApiError, defineOverride, fetchPlugin, zapierCoreOptions, injectCliLogin, omitExports, zapierSdkPlugin, invalidateCachedToken, batch, toSnakeCase, ZapierError, isZapierReleaseTriggerMessageSignal, createSdk, SDK_OPTIONS_ID, resolvePlugin, isCredentialsObject, getRegistryPlugin, createController, ZapierAbortDrainSignal, ZapierReleaseTriggerMessageSignal, buildApplicationLifecycleEvent, AuthMechanism, isCoreCancelledSignal, ZapierAuthenticationError, DEPRECATION_NOTICE_EVENT } from '@zapier/zapier-sdk';
10
+ import { definePlugin, apiPlugin, defineMethod, apiPluginRef, resolveCredentialsPluginRef, eventEmissionPluginRef, sdkOptionsPluginRef, declareOptionalProperty, OutputPropertySchema, ZapierBundleError, isZapierBundleError, DEFAULT_CONFIG_PATH, declareMethod, ZapierValidationError, isZapierValidationError, ZapierUnknownError, manifestPluginRef, defineResolver, isPermanentHttpError, isZapierAuthenticationError, ZapierApiError, defineOverride, fetchPlugin, zapierCoreOptions, injectCliLogin, omitExports, zapierSdkPlugin, invalidateCachedToken, batch, toSnakeCase, ZapierError, isZapierReleaseTriggerMessageSignal, createSdk, SDK_OPTIONS_ID, resolvePlugin, isCredentialsObject, getRegistryPlugin, createController, ZapierAbortDrainSignal, ZapierReleaseTriggerMessageSignal, buildApplicationLifecycleEvent, AuthMechanism, isCoreCancelledSignal, ZapierAuthenticationError, STABILITY_DEFINITIONS, DEPRECATION_NOTICE_EVENT } from '@zapier/zapier-sdk';
11
11
  import { z } from 'zod';
12
12
  import { triggerInboxResolver, DrainTriggerInboxSchema, WatchTriggerInboxSchema, declareMethod as declareMethod$1, defineMethod as defineMethod$1, CreateWorkflowResponseSchema, getAgent, injectCliLogin as injectCliLogin$1, INTERNAL_CREATE_WORKFLOW_FIELDS, CreateWorkflowOptionsSchema, definePlugin as definePlugin$1, omitExports as omitExports$1, zapierExperimentalSdkPlugin, createSdk as createSdk$1, CORE_OPTIONS_ID, SDK_OPTIONS_ID as SDK_OPTIONS_ID$1, addPlugin, formatExtensionPluginFailure } from '@zapier/zapier-sdk/experimental';
13
13
  import { hostname } from 'os';
@@ -2992,9 +2992,9 @@ var CLI_EXTENSIONS_ID = "cli/extensions";
2992
2992
  var cliExtensionsPluginRef = declareOptionalProperty({
2993
2993
  id: CLI_EXTENSIONS_ID
2994
2994
  });
2995
- var CLI_EXPERIMENTAL_ID = "cli/experimental";
2996
- var cliExperimentalPluginRef = declareOptionalProperty({
2997
- id: CLI_EXPERIMENTAL_ID
2995
+ var CLI_STABILITY_ID = "cli/stability";
2996
+ var cliStabilityPluginRef = declareOptionalProperty({
2997
+ id: CLI_STABILITY_ID
2998
2998
  });
2999
2999
  var McpSchema = z.object({
3000
3000
  port: z.string().optional().describe("Port to listen on (for future HTTP transport)")
@@ -3003,11 +3003,7 @@ var McpSchema = z.object({
3003
3003
  // src/plugins/mcp/index.ts
3004
3004
  var mcpPlugin = defineMethod({
3005
3005
  name: "mcp",
3006
- imports: [
3007
- sdkOptionsPluginRef,
3008
- cliExtensionsPluginRef,
3009
- cliExperimentalPluginRef
3010
- ],
3006
+ imports: [sdkOptionsPluginRef, cliExtensionsPluginRef, cliStabilityPluginRef],
3011
3007
  output: "raw",
3012
3008
  inputSchema: McpSchema,
3013
3009
  categories: ["utility"],
@@ -3017,7 +3013,7 @@ var mcpPlugin = defineMethod({
3017
3013
  debug: imports.sdkOptions?.debug,
3018
3014
  maxConcurrentRequests: imports.sdkOptions?.maxConcurrentRequests,
3019
3015
  extensions: imports.extensions,
3020
- experimental: imports.experimental
3016
+ stability: imports.stability
3021
3017
  });
3022
3018
  }
3023
3019
  });
@@ -7156,7 +7152,7 @@ var createWorkflowCliPlugin = defineMethod$1({
7156
7152
  type: "create",
7157
7153
  itemType: "Workflow",
7158
7154
  categories: ["code-workflow"],
7159
- experimental: true,
7155
+ stability: "experimental",
7160
7156
  inputSchema: CreateWorkflowCliOptionsSchema,
7161
7157
  outputSchema: CreateWorkflowResponseSchema,
7162
7158
  skipOutputValidation: true,
@@ -7167,6 +7163,17 @@ var createWorkflowCliPlugin = defineMethod$1({
7167
7163
  creationAccessMethod: "sdk_cli"
7168
7164
  })
7169
7165
  });
7166
+ function warningBlock({
7167
+ banner,
7168
+ message,
7169
+ detail
7170
+ }) {
7171
+ console.warn();
7172
+ console.warn(chalk5.yellow.bold(banner) + chalk5.yellow(message));
7173
+ if (detail) console.warn(chalk5.yellow(` ${detail}`));
7174
+ console.warn();
7175
+ }
7176
+ var DEPRECATION_BANNER = "\u26A0\uFE0F DEPRECATION WARNING";
7170
7177
  var activeNotices = /* @__PURE__ */ new Map();
7171
7178
  function collectDeprecationNotice(event) {
7172
7179
  if (event.type !== DEPRECATION_NOTICE_EVENT) return;
@@ -7183,21 +7190,33 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
7183
7190
  // package.json with { type: 'json' }
7184
7191
  var package_default = {
7185
7192
  name: "@zapier/zapier-sdk-cli",
7186
- version: "0.84.5"};
7193
+ version: "0.85.0"};
7187
7194
 
7188
7195
  // src/sdk.ts
7189
7196
  var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
7197
+ var warnedStabilityMethods = /* @__PURE__ */ new Set();
7190
7198
  var cliCoreOptions = {
7191
7199
  ...zapierCoreOptions,
7192
7200
  logDeprecation: ({ methodName, deprecation }) => {
7193
7201
  if (warnedDeprecatedMethods.has(methodName)) return;
7194
7202
  warnedDeprecatedMethods.add(methodName);
7195
- console.warn();
7196
- console.warn(
7197
- chalk5.yellow.bold("\u26A0\uFE0F DEPRECATION WARNING") + chalk5.yellow(` - \`${toKebabCase(methodName)}\` is deprecated.`)
7198
- );
7199
- console.warn(chalk5.yellow(` ${deprecation.message}`));
7200
- console.warn();
7203
+ warningBlock({
7204
+ banner: DEPRECATION_BANNER,
7205
+ message: ` - \`${toKebabCase(methodName)}\` is deprecated.`,
7206
+ detail: deprecation.message
7207
+ });
7208
+ },
7209
+ logStabilityNotice: ({ methodName, stability }) => {
7210
+ if (stability === "stable") return;
7211
+ if (warnedStabilityMethods.has(methodName)) return;
7212
+ warnedStabilityMethods.add(methodName);
7213
+ warningBlock({
7214
+ banner: `\u26A0\uFE0F ${stability.toUpperCase()} COMMAND`,
7215
+ message: ` - \`${toKebabCase(methodName)}\` is marked ${stability}.`,
7216
+ // The detail line is the tier's consumer contract, so the CLI says the
7217
+ // same thing as the SDK's runtime notice and the generated docs.
7218
+ detail: STABILITY_DEFINITIONS[stability]
7219
+ });
7201
7220
  }
7202
7221
  };
7203
7222
  injectCliLogin(login_exports);
@@ -7280,7 +7299,7 @@ function createZapierCliSdk(options = {}) {
7280
7299
  [CLI_EXTENSIONS_ID]: extensions,
7281
7300
  // Built by the experimental factory: `mcp` reads this to launch the
7282
7301
  // experimental MCP server so the surfaces stay aligned.
7283
- [CLI_EXPERIMENTAL_ID]: true
7302
+ [CLI_STABILITY_ID]: "experimental"
7284
7303
  }
7285
7304
  });
7286
7305
  addPlugin(sdk, cliFetchOverride);