@myapihq/cli 1.0.15 → 1.0.17
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/dist/commands/billing.js +26 -32
- package/dist/commands/config.js +20 -26
- package/dist/commands/domain.js +56 -67
- package/dist/commands/email.d.ts +2 -0
- package/dist/commands/email.js +107 -72
- package/dist/commands/funnel.d.ts +0 -3
- package/dist/commands/funnel.js +43 -91
- package/dist/commands/image.js +17 -21
- package/dist/commands/keys.js +22 -60
- package/dist/commands/org.js +37 -44
- package/dist/commands/setup.js +13 -49
- package/dist/commands/storage.js +18 -23
- package/dist/commands/url.d.ts +2 -0
- package/dist/commands/url.js +29 -0
- package/dist/commands/webhook.d.ts +2 -0
- package/dist/commands/webhook.js +64 -24
- package/dist/commands/workflow.d.ts +1 -0
- package/dist/commands/workflow.js +81 -43
- package/dist/config.js +6 -44
- package/dist/index.js +45 -55
- package/dist/output.js +5 -12
- package/dist/utils.js +2 -6
- package/package.json +5 -2
- package/src/commands/billing.ts +1 -1
- package/src/commands/email.ts +48 -8
- package/src/commands/funnel.ts +3 -33
- package/src/commands/url.ts +28 -0
- package/src/commands/webhook.ts +50 -9
- package/src/commands/workflow.ts +55 -18
- package/src/index.ts +28 -0
package/src/index.ts
CHANGED
|
@@ -3,14 +3,26 @@
|
|
|
3
3
|
import { parseArgs } from './utils.js';
|
|
4
4
|
import { error, info } from './output.js';
|
|
5
5
|
import { MyApiError } from '@myapihq/sdk';
|
|
6
|
+
import updateNotifier from 'update-notifier';
|
|
7
|
+
import * as fs from 'fs';
|
|
8
|
+
import * as path from 'path';
|
|
9
|
+
|
|
10
|
+
const pkgPath = new URL('../package.json', import.meta.url);
|
|
11
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
|
6
12
|
import * as keysCmd from './commands/keys.js';
|
|
7
13
|
import * as billingCmd from './commands/billing.js';
|
|
8
14
|
import * as orgCmd from './commands/org.js';
|
|
9
15
|
import * as setupCmd from './commands/setup.js';
|
|
10
16
|
import * as configCmd from './commands/config.js';
|
|
11
17
|
import * as domainCmd from './commands/domain.js';
|
|
18
|
+
import * as funnelCmd from './commands/funnel.js';
|
|
19
|
+
import * as urlCmd from './commands/url.js';
|
|
20
|
+
import * as webhookCmd from './commands/webhook.js';
|
|
21
|
+
import * as workflowCmd from './commands/workflow.js';
|
|
12
22
|
|
|
13
23
|
async function main() {
|
|
24
|
+
updateNotifier({ pkg }).notify();
|
|
25
|
+
|
|
14
26
|
const { args, flags } = parseArgs(process.argv.slice(2));
|
|
15
27
|
if (args.length === 0) { printHelp(); process.exit(0); }
|
|
16
28
|
const [command, subcommand, ...restArgs] = args;
|
|
@@ -62,6 +74,18 @@ async function main() {
|
|
|
62
74
|
case 'domain':
|
|
63
75
|
await domainCmd.run(subcommand, restArgs, flags);
|
|
64
76
|
break;
|
|
77
|
+
case 'funnel':
|
|
78
|
+
await funnelCmd.run(subcommand, restArgs, flags);
|
|
79
|
+
break;
|
|
80
|
+
case 'url':
|
|
81
|
+
await urlCmd.run(subcommand, restArgs, flags);
|
|
82
|
+
break;
|
|
83
|
+
case 'webhook':
|
|
84
|
+
await webhookCmd.run(subcommand, restArgs, flags);
|
|
85
|
+
break;
|
|
86
|
+
case 'workflow':
|
|
87
|
+
await workflowCmd.run(subcommand, restArgs, flags);
|
|
88
|
+
break;
|
|
65
89
|
default:
|
|
66
90
|
printHelp();
|
|
67
91
|
process.exit(0);
|
|
@@ -87,6 +111,10 @@ Commands:
|
|
|
87
111
|
setup Setup CLI credentials and view integration instructions
|
|
88
112
|
config Manage CLI defaults like org_id and domain
|
|
89
113
|
domain Manage domain configurations
|
|
114
|
+
funnel Manage headless funnels and pages
|
|
115
|
+
url Shorten URLs and manage links
|
|
116
|
+
webhook Manage inbound webhooks
|
|
117
|
+
workflow Manage workflow automations
|
|
90
118
|
|
|
91
119
|
Run "myapi <command> --help" for subcommand help.`);
|
|
92
120
|
}
|