@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.
- package/CHANGELOG.md +18 -0
- package/README.md +381 -29
- package/bin/zapier-sdk-experimental.mjs +14 -0
- package/dist/cli.cjs +608 -38
- package/dist/cli.mjs +607 -37
- package/dist/experimental.cjs +3519 -0
- package/dist/experimental.d.mts +39 -0
- package/dist/experimental.d.ts +39 -0
- package/dist/experimental.mjs +3483 -0
- package/dist/index.cjs +507 -26
- package/dist/index.d.mts +3 -514
- package/dist/index.d.ts +3 -514
- package/dist/index.mjs +505 -24
- package/dist/package.json +14 -2
- package/dist/sdk-B3nKAZdN.d.mts +516 -0
- package/dist/sdk-B3nKAZdN.d.ts +516 -0
- package/dist/src/cli.js +26 -2
- package/dist/src/experimental.d.ts +33 -0
- package/dist/src/experimental.js +83 -0
- package/dist/src/generators/ast-generator.d.ts +2 -2
- package/dist/src/generators/ast-generator.js +1 -1
- package/dist/src/plugins/add/index.d.ts +2 -2
- package/dist/src/plugins/bundleCode/index.js +3 -12
- package/dist/src/plugins/curl/index.js +2 -2
- package/dist/src/plugins/curl/utils.d.ts +11 -1
- package/dist/src/plugins/curl/utils.js +14 -5
- package/dist/src/plugins/drainTriggerInbox/index.d.ts +46 -0
- package/dist/src/plugins/drainTriggerInbox/index.js +178 -0
- package/dist/src/plugins/generateAppTypes/index.d.ts +2 -2
- package/dist/src/plugins/index.d.ts +2 -0
- package/dist/src/plugins/index.js +2 -0
- package/dist/src/plugins/mcp/index.d.ts +1 -0
- package/dist/src/plugins/mcp/index.js +5 -1
- package/dist/src/plugins/watchTriggerInbox/index.d.ts +45 -0
- package/dist/src/plugins/watchTriggerInbox/index.js +157 -0
- package/dist/src/sdk.js +5 -1
- package/dist/src/utils/cli-generator.js +18 -1
- package/dist/src/utils/cli-renderer.d.ts +12 -0
- package/dist/src/utils/cli-renderer.js +22 -1
- package/dist/src/utils/parameter-resolver.d.ts +1 -0
- package/dist/src/utils/parameter-resolver.js +81 -10
- package/dist/src/utils/triggerDrain.d.ts +144 -0
- package/dist/src/utils/triggerDrain.js +351 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- 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 };
|