Skip to content

Commit

Permalink
Updates @twilio/cli-core to version 7 (#35)
Browse files Browse the repository at this point in the history
* Updates @twilio/cli-core to version 7

Switches out @oclif/command and @oclif/config for @oclif/core.
Updates ./bin/run and commands/watch.js to use @oclif/core.
Adds new ./bin/dev script for debug running locally.
Adds src/index.js and main property in package.json

* Removes moment dependency
  • Loading branch information
philnash authored Oct 4, 2022
1 parent 10bef7d commit ad356ae
Show file tree
Hide file tree
Showing 7 changed files with 1,045 additions and 2,134 deletions.
15 changes: 15 additions & 0 deletions bin/dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env node

const oclif = require('@oclif/core');

// In dev mode -> use ts-node and dev plugins
process.env.NODE_ENV = 'development';

// In dev mode, always show stack traces
oclif.settings.debug = true;

// Configure the Twilio CLI environment
require('@twilio/cli-core').configureEnv();

// Start the CLI
oclif.run().then(oclif.flush).catch(oclif.Errors.handle);
3 changes: 3 additions & 0 deletions bin/dev.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node "%~dp0\dev" %*
13 changes: 8 additions & 5 deletions bin/run
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/usr/bin/env node
// Load up the command module *first* so that we're the parent rather than
// some other dependency.
const command = require('@oclif/command');

require('@twilio/cli-core').configureEnv();
command.run()
.then(require('@oclif/command/flush'))
.catch(require('@oclif/errors/handle'));
const oclif = require("@oclif/core");

require("@twilio/cli-core").configureEnv();

oclif
.run()
.then(require("@oclif/core/flush"))
.catch(require("@oclif/core/handle"));
Loading

0 comments on commit ad356ae

Please sign in to comment.