@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/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
  }