@zapier/zapier-sdk-cli 0.44.1 → 0.46.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +381 -29
  3. package/bin/zapier-sdk-experimental.mjs +14 -0
  4. package/dist/cli.cjs +608 -38
  5. package/dist/cli.mjs +607 -37
  6. package/dist/experimental.cjs +3519 -0
  7. package/dist/experimental.d.mts +39 -0
  8. package/dist/experimental.d.ts +39 -0
  9. package/dist/experimental.mjs +3483 -0
  10. package/dist/index.cjs +507 -26
  11. package/dist/index.d.mts +3 -514
  12. package/dist/index.d.ts +3 -514
  13. package/dist/index.mjs +505 -24
  14. package/dist/package.json +14 -2
  15. package/dist/sdk-B3nKAZdN.d.mts +516 -0
  16. package/dist/sdk-B3nKAZdN.d.ts +516 -0
  17. package/dist/src/cli.js +26 -2
  18. package/dist/src/experimental.d.ts +33 -0
  19. package/dist/src/experimental.js +83 -0
  20. package/dist/src/generators/ast-generator.d.ts +2 -2
  21. package/dist/src/generators/ast-generator.js +1 -1
  22. package/dist/src/plugins/add/index.d.ts +2 -2
  23. package/dist/src/plugins/bundleCode/index.js +3 -12
  24. package/dist/src/plugins/curl/index.js +2 -2
  25. package/dist/src/plugins/curl/utils.d.ts +11 -1
  26. package/dist/src/plugins/curl/utils.js +14 -5
  27. package/dist/src/plugins/drainTriggerInbox/index.d.ts +46 -0
  28. package/dist/src/plugins/drainTriggerInbox/index.js +178 -0
  29. package/dist/src/plugins/generateAppTypes/index.d.ts +2 -2
  30. package/dist/src/plugins/index.d.ts +2 -0
  31. package/dist/src/plugins/index.js +2 -0
  32. package/dist/src/plugins/mcp/index.d.ts +1 -0
  33. package/dist/src/plugins/mcp/index.js +5 -1
  34. package/dist/src/plugins/watchTriggerInbox/index.d.ts +45 -0
  35. package/dist/src/plugins/watchTriggerInbox/index.js +157 -0
  36. package/dist/src/sdk.js +5 -1
  37. package/dist/src/utils/cli-generator.js +18 -1
  38. package/dist/src/utils/cli-renderer.d.ts +12 -0
  39. package/dist/src/utils/cli-renderer.js +22 -1
  40. package/dist/src/utils/parameter-resolver.d.ts +1 -0
  41. package/dist/src/utils/parameter-resolver.js +81 -10
  42. package/dist/src/utils/triggerDrain.d.ts +144 -0
  43. package/dist/src/utils/triggerDrain.js +351 -0
  44. package/dist/tsconfig.tsbuildinfo +1 -1
  45. package/package.json +16 -4
@@ -0,0 +1,39 @@
1
+ import { ZapierSdkOptions, Plugin, PluginProvides } from '@zapier/zapier-sdk/experimental';
2
+ import { Z as ZapierSdkCli } from './sdk-B3nKAZdN.mjs';
3
+ import '@zapier/zapier-sdk';
4
+ import 'zod';
5
+
6
+ /**
7
+ * Experimental CLI SDK factory.
8
+ *
9
+ * Mirror of `./sdk.ts`, but built on top of
10
+ * `@zapier/zapier-sdk/experimental` so the underlying SDK has every
11
+ * `meta.experimental: true` plugin registered. The CLI's runtime
12
+ * entry point (`cli.ts`) chooses between this and the stable factory
13
+ * based on three equivalent triggers detected before Commander parses:
14
+ * the `zapier-sdk-experimental` bin name (via `argv[1]`), the
15
+ * `--experimental` flag, or the `ZAPIER_EXPERIMENTAL=1` env var.
16
+ *
17
+ * Plugin chain matches `./sdk.ts` literally, with future CLI-only
18
+ * experimental plugins inserted at appropriate positions. Both
19
+ * factories are kept in sync by shape tests.
20
+ */
21
+
22
+ interface ZapierCliSdkOptions extends ZapierSdkOptions {
23
+ /**
24
+ * Extra plugins discovered from `@zapier/zapier-sdk` extension packages.
25
+ * Pre-resolved by `cli.ts` (`utils/extensions.ts`) so this factory stays
26
+ * synchronous. Each plugin is layered onto the chain after all built-in
27
+ * CLI plugins, so its functions appear in `getRegistry({ package: "cli" })`
28
+ * automatically.
29
+ */
30
+ extensions?: Plugin<unknown, PluginProvides>[];
31
+ }
32
+ /**
33
+ * Create a Zapier CLI SDK with experimental plugins registered. The
34
+ * returned shape is a superset of the stable CLI SDK — same plugins
35
+ * plus any marked experimental.
36
+ */
37
+ declare function createZapierCliSdk(options?: ZapierCliSdkOptions): ZapierSdkCli;
38
+
39
+ export { type ZapierCliSdkOptions, createZapierCliSdk };
@@ -0,0 +1,39 @@
1
+ import { ZapierSdkOptions, Plugin, PluginProvides } from '@zapier/zapier-sdk/experimental';
2
+ import { Z as ZapierSdkCli } from './sdk-B3nKAZdN.js';
3
+ import '@zapier/zapier-sdk';
4
+ import 'zod';
5
+
6
+ /**
7
+ * Experimental CLI SDK factory.
8
+ *
9
+ * Mirror of `./sdk.ts`, but built on top of
10
+ * `@zapier/zapier-sdk/experimental` so the underlying SDK has every
11
+ * `meta.experimental: true` plugin registered. The CLI's runtime
12
+ * entry point (`cli.ts`) chooses between this and the stable factory
13
+ * based on three equivalent triggers detected before Commander parses:
14
+ * the `zapier-sdk-experimental` bin name (via `argv[1]`), the
15
+ * `--experimental` flag, or the `ZAPIER_EXPERIMENTAL=1` env var.
16
+ *
17
+ * Plugin chain matches `./sdk.ts` literally, with future CLI-only
18
+ * experimental plugins inserted at appropriate positions. Both
19
+ * factories are kept in sync by shape tests.
20
+ */
21
+
22
+ interface ZapierCliSdkOptions extends ZapierSdkOptions {
23
+ /**
24
+ * Extra plugins discovered from `@zapier/zapier-sdk` extension packages.
25
+ * Pre-resolved by `cli.ts` (`utils/extensions.ts`) so this factory stays
26
+ * synchronous. Each plugin is layered onto the chain after all built-in
27
+ * CLI plugins, so its functions appear in `getRegistry({ package: "cli" })`
28
+ * automatically.
29
+ */
30
+ extensions?: Plugin<unknown, PluginProvides>[];
31
+ }
32
+ /**
33
+ * Create a Zapier CLI SDK with experimental plugins registered. The
34
+ * returned shape is a superset of the stable CLI SDK — same plugins
35
+ * plus any marked experimental.
36
+ */
37
+ declare function createZapierCliSdk(options?: ZapierCliSdkOptions): ZapierSdkCli;
38
+
39
+ export { type ZapierCliSdkOptions, createZapierCliSdk };