forked from asyncapi/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrate @oclif/core from v2 to v3
- Loading branch information
Showing
6 changed files
with
110 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,4 @@ | ||
#!/usr/bin/env nod | ||
|
||
const oclif = require('@oclif/core') | ||
|
||
const path = require('path') | ||
const project = path.join(__dirname, '..', 'tsconfig.json') | ||
|
||
// In dev mode -> use ts-node and dev plugins | ||
process.env.NODE_ENV = 'development' | ||
|
||
require('ts-node').register({project}) | ||
|
||
// In dev mode, always show stack traces | ||
oclif.settings.debug = true; | ||
|
||
// Start the CLI | ||
oclif.run().then(oclif.flush).catch(oclif.Errors.handle) | ||
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning | ||
|
||
import {execute} from '@oclif/core'; | ||
await execute({development: true, dir: import.meta.url}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
#!/usr/bin/env node | ||
|
||
const oclif = require('@oclif/core'); | ||
import {execute} from '@oclif/core'; | ||
|
||
oclif.run() | ||
.then(require('@oclif/core/flush')) | ||
.catch((err) => { | ||
const oclifHandler = require('@oclif/core/handle'); | ||
return oclifHandler(err.message); | ||
}); | ||
await execute({dir: import.meta.url}); | ||
|
Oops, something went wrong.