@zapier/zapier-sdk-cli 0.6.2 → 0.6.4
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 +17 -0
- package/README.md +115 -12
- package/bin/{zapier-sdk.js → zapier-sdk.mjs} +1 -1
- package/dist/cli.cjs +1711 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/{cli.js → cli.mjs} +204 -456
- package/dist/index.cjs +770 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.mjs +739 -0
- package/dist/package.json +67 -0
- package/dist/src/cli.js +8 -14
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -1
- package/dist/src/plugins/bundleCode/index.d.ts +15 -0
- package/dist/src/{commands/bundle-code → plugins/bundleCode}/index.js +19 -1
- package/dist/src/{commands/bundle-code → plugins/bundleCode}/schemas.d.ts +8 -8
- package/dist/src/{commands/bundle-code → plugins/bundleCode}/schemas.js +4 -4
- package/dist/src/plugins/generateTypes/index.d.ts +21 -0
- package/dist/src/{commands/generate-types → plugins/generateTypes}/index.js +18 -0
- package/dist/src/{commands/generate-types → plugins/generateTypes}/schemas.d.ts +0 -3
- package/dist/src/{commands/generate-types → plugins/generateTypes}/schemas.js +1 -2
- package/dist/src/plugins/getConfigPath/index.d.ts +15 -0
- package/dist/src/plugins/getConfigPath/index.js +19 -0
- package/dist/src/plugins/getConfigPath/schemas.d.ts +3 -0
- package/dist/src/plugins/getConfigPath/schemas.js +5 -0
- package/dist/src/plugins/index.d.ts +6 -0
- package/dist/src/plugins/index.js +6 -0
- package/dist/src/plugins/login/index.d.ts +15 -0
- package/dist/src/plugins/login/index.js +26 -0
- package/dist/src/plugins/login/schemas.d.ts +9 -0
- package/dist/src/plugins/login/schemas.js +10 -0
- package/dist/src/plugins/logout/index.d.ts +15 -0
- package/dist/src/plugins/logout/index.js +18 -0
- package/dist/src/plugins/logout/schemas.d.ts +3 -0
- package/dist/src/plugins/logout/schemas.js +5 -0
- package/dist/src/plugins/mcp/index.d.ts +15 -0
- package/dist/src/plugins/mcp/index.js +24 -0
- package/dist/src/plugins/mcp/schemas.d.ts +9 -0
- package/dist/src/plugins/mcp/schemas.js +10 -0
- package/dist/src/sdk.d.ts +9 -0
- package/dist/src/sdk.js +22 -0
- package/dist/src/utils/cli-generator.js +4 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -8
- package/src/cli.ts +8 -21
- package/src/index.ts +2 -0
- package/src/{commands/bundle-code → plugins/bundleCode}/index.ts +39 -2
- package/src/{commands/bundle-code → plugins/bundleCode}/schemas.ts +4 -4
- package/src/{commands/generate-types → plugins/generateTypes}/index.ts +56 -3
- package/src/{commands/generate-types → plugins/generateTypes}/schemas.ts +0 -4
- package/src/plugins/getConfigPath/index.ts +42 -0
- package/src/plugins/getConfigPath/schemas.ts +8 -0
- package/src/plugins/index.ts +6 -0
- package/src/plugins/login/index.ts +48 -0
- package/src/plugins/login/schemas.ts +13 -0
- package/src/plugins/logout/index.ts +37 -0
- package/src/plugins/logout/schemas.ts +8 -0
- package/src/plugins/mcp/index.ts +43 -0
- package/src/plugins/mcp/schemas.ts +13 -0
- package/src/sdk.ts +43 -0
- package/src/utils/cli-generator.ts +5 -0
- package/tsconfig.build.json +15 -3
- package/tsconfig.json +2 -2
- package/tsup.config.ts +10 -4
- package/bin/zsdk.js +0 -4
- package/dist/index.js +0 -0
- package/dist/src/commands/bundle-code/cli.d.ts +0 -2
- package/dist/src/commands/bundle-code/cli.js +0 -77
- package/dist/src/commands/bundle-code/index.d.ts +0 -5
- package/dist/src/commands/configPath.d.ts +0 -2
- package/dist/src/commands/configPath.js +0 -9
- package/dist/src/commands/generate-types/cli.d.ts +0 -2
- package/dist/src/commands/generate-types/cli.js +0 -84
- package/dist/src/commands/generate-types/index.d.ts +0 -8
- package/dist/src/commands/index.d.ts +0 -6
- package/dist/src/commands/index.js +0 -6
- package/dist/src/commands/login.d.ts +0 -2
- package/dist/src/commands/login.js +0 -25
- package/dist/src/commands/logout.d.ts +0 -2
- package/dist/src/commands/logout.js +0 -16
- package/dist/src/commands/mcp.d.ts +0 -2
- package/dist/src/commands/mcp.js +0 -11
- package/src/commands/bundle-code/cli.ts +0 -118
- package/src/commands/configPath.ts +0 -10
- package/src/commands/generate-types/cli.ts +0 -126
- package/src/commands/index.ts +0 -6
- package/src/commands/login.ts +0 -34
- package/src/commands/logout.ts +0 -19
- package/src/commands/mcp.ts +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @zapier/zapier-sdk-cli
|
|
2
2
|
|
|
3
|
+
## 0.6.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4315531: All CLI commands are now just local plugins used to build a CLI specific SDK, and that CLI specific SDK is used to generate the CLI docs.
|
|
8
|
+
- Updated dependencies [4315531]
|
|
9
|
+
- @zapier/zapier-sdk-mcp@0.2.4
|
|
10
|
+
- @zapier/zapier-sdk@0.6.4
|
|
11
|
+
|
|
12
|
+
## 0.6.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [5b74010]
|
|
17
|
+
- @zapier/zapier-sdk@0.6.3
|
|
18
|
+
- @zapier/zapier-sdk-mcp@0.2.3
|
|
19
|
+
|
|
3
20
|
## 0.6.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -6,7 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
- [Installation](#installation)
|
|
8
8
|
- [Quick Start](#quick-start)
|
|
9
|
+
- [Global Options](#global-options)
|
|
9
10
|
- [Available Commands](#available-commands)
|
|
11
|
+
- [Accounts](#accounts)
|
|
12
|
+
- [`getProfile`](#getprofile)
|
|
13
|
+
- [`login`](#login)
|
|
14
|
+
- [`logout`](#logout)
|
|
10
15
|
- [Actions](#actions)
|
|
11
16
|
- [`getAction`](#getaction)
|
|
12
17
|
- [`listActions`](#listactions)
|
|
@@ -22,10 +27,12 @@
|
|
|
22
27
|
- [`listAuthentications`](#listauthentications)
|
|
23
28
|
- [HTTP Requests](#http-requests)
|
|
24
29
|
- [`request`](#request)
|
|
25
|
-
- [Users](#users)
|
|
26
|
-
- [`getProfile`](#getprofile)
|
|
27
30
|
- [Utilities](#utilities)
|
|
31
|
+
- [`bundleCode`](#bundlecode)
|
|
32
|
+
- [`generateTypes`](#generatetypes)
|
|
33
|
+
- [`getConfigPath`](#getconfigpath)
|
|
28
34
|
- [`lockVersion`](#lockversion)
|
|
35
|
+
- [`mcp`](#mcp)
|
|
29
36
|
|
|
30
37
|
## Installation
|
|
31
38
|
|
|
@@ -49,10 +56,59 @@ npx zapier-sdk list-apps
|
|
|
49
56
|
npx zapier-sdk generate-types slack --output ./types/slack.ts
|
|
50
57
|
```
|
|
51
58
|
|
|
59
|
+
## Global Options
|
|
60
|
+
|
|
61
|
+
These options are available for all commands:
|
|
62
|
+
|
|
63
|
+
| Option | Short | Description |
|
|
64
|
+
| ----------- | ----- | -------------------------------------------- |
|
|
65
|
+
| `--version` | `-v` | Display version number |
|
|
66
|
+
| `--help` | `-h` | Display help for command |
|
|
67
|
+
| `--debug` | | Enable debug logging |
|
|
68
|
+
| `--json` | | Output raw JSON instead of formatted results |
|
|
69
|
+
|
|
52
70
|
## Available Commands
|
|
53
71
|
|
|
54
72
|
The CLI automatically generates commands from the SDK registry. All SDK functions are available as CLI commands using kebab-case naming.
|
|
55
73
|
|
|
74
|
+
### Accounts
|
|
75
|
+
|
|
76
|
+
#### `get-profile`
|
|
77
|
+
|
|
78
|
+
Get current user's profile information
|
|
79
|
+
|
|
80
|
+
**Usage:**
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npx zapier-sdk get-profile
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
#### `login`
|
|
87
|
+
|
|
88
|
+
Log in to Zapier to access your account
|
|
89
|
+
|
|
90
|
+
**Options:**
|
|
91
|
+
|
|
92
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
93
|
+
| ----------- | -------- | -------- | ------- | --------------- | --------------------------------------- |
|
|
94
|
+
| `--timeout` | `string` | ❌ | — | — | Login timeout in seconds (default: 300) |
|
|
95
|
+
|
|
96
|
+
**Usage:**
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npx zapier-sdk login [--timeout]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
#### `logout`
|
|
103
|
+
|
|
104
|
+
Log out of your Zapier account
|
|
105
|
+
|
|
106
|
+
**Usage:**
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npx zapier-sdk logout
|
|
110
|
+
```
|
|
111
|
+
|
|
56
112
|
### Actions
|
|
57
113
|
|
|
58
114
|
#### `get-action`
|
|
@@ -278,19 +334,57 @@ Make authenticated HTTP requests through Zapier's Relay service
|
|
|
278
334
|
npx zapier-sdk request <url> [--method] [--body] [--authentication-id] [--callback-url] [--authentication-template] [--headers] [--relay-base-url]
|
|
279
335
|
```
|
|
280
336
|
|
|
281
|
-
###
|
|
337
|
+
### Utilities
|
|
282
338
|
|
|
283
|
-
#### `
|
|
339
|
+
#### `bundle-code`
|
|
284
340
|
|
|
285
|
-
|
|
341
|
+
Bundle TypeScript code into executable JavaScript
|
|
342
|
+
|
|
343
|
+
**Options:**
|
|
344
|
+
|
|
345
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
346
|
+
| ---------- | --------- | -------- | ------- | --------------- | -------------------------------------------------------- |
|
|
347
|
+
| `<input>` | `string` | ✅ | — | — | Input TypeScript file path to bundle |
|
|
348
|
+
| `--output` | `string` | ❌ | — | — | Output file path (defaults to input with .js extension) |
|
|
349
|
+
| `--string` | `boolean` | ❌ | — | — | Return bundled code as string instead of writing to file |
|
|
350
|
+
| `--minify` | `boolean` | ❌ | — | — | Minify the bundled output |
|
|
351
|
+
| `--target` | `string` | ❌ | — | — | ECMAScript target version |
|
|
352
|
+
| `--cjs` | `boolean` | ❌ | — | — | Output CommonJS format instead of ESM |
|
|
286
353
|
|
|
287
354
|
**Usage:**
|
|
288
355
|
|
|
289
356
|
```bash
|
|
290
|
-
npx zapier-sdk
|
|
357
|
+
npx zapier-sdk bundle-code <input> [--output] [--string] [--minify] [--target] [--cjs]
|
|
291
358
|
```
|
|
292
359
|
|
|
293
|
-
|
|
360
|
+
#### `generate-types`
|
|
361
|
+
|
|
362
|
+
Generate TypeScript SDK code for a specific app
|
|
363
|
+
|
|
364
|
+
**Options:**
|
|
365
|
+
|
|
366
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
367
|
+
| --------------------- | -------- | -------- | ------- | --------------- | ------------------------------------------------------- |
|
|
368
|
+
| `<appKey>` | `string` | ✅ | — | — | App key to generate SDK code for |
|
|
369
|
+
| `--authentication-id` | `number` | ❌ | — | — | Authentication ID to use for this action |
|
|
370
|
+
| `--output` | `string` | ❌ | — | — | Output file path (defaults to generated/<appKey>.ts) |
|
|
371
|
+
| `--lock-file-path` | `string` | ❌ | — | — | Path to the .zapierrc lock file (defaults to .zapierrc) |
|
|
372
|
+
|
|
373
|
+
**Usage:**
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
npx zapier-sdk generate-types <appKey> [--authentication-id] [--output] [--lock-file-path]
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
#### `get-config-path`
|
|
380
|
+
|
|
381
|
+
Show the path to the configuration file
|
|
382
|
+
|
|
383
|
+
**Usage:**
|
|
384
|
+
|
|
385
|
+
```bash
|
|
386
|
+
npx zapier-sdk get-config-path
|
|
387
|
+
```
|
|
294
388
|
|
|
295
389
|
#### `lock-version`
|
|
296
390
|
|
|
@@ -308,11 +402,20 @@ Execute lockVersion
|
|
|
308
402
|
npx zapier-sdk lock-version <appKey>
|
|
309
403
|
```
|
|
310
404
|
|
|
311
|
-
|
|
405
|
+
#### `mcp`
|
|
312
406
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
407
|
+
Start MCP server for Zapier SDK
|
|
408
|
+
|
|
409
|
+
**Options:**
|
|
410
|
+
|
|
411
|
+
| Option | Type | Required | Default | Possible Values | Description |
|
|
412
|
+
| -------- | -------- | -------- | ------- | --------------- | --------------------------------------------- |
|
|
413
|
+
| `--port` | `string` | ❌ | — | — | Port to listen on (for future HTTP transport) |
|
|
414
|
+
|
|
415
|
+
**Usage:**
|
|
416
|
+
|
|
417
|
+
```bash
|
|
418
|
+
npx zapier-sdk mcp [--port]
|
|
419
|
+
```
|
|
317
420
|
|
|
318
421
|
<!-- End Generated CLI Reference -->
|