Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions cli/bin/dev
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
#!/usr/bin/env node
/* eslint-disable @typescript-eslint/no-var-requires */

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

const path = require('path')
const project = path.join(__dirname, '..', 'tsconfig.json')
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'
process.env.NODE_ENV = "development";

require('ts-node').register({project})
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)
oclif.run().then(oclif.flush).catch(oclif.Errors.handle);
10 changes: 7 additions & 3 deletions cli/bin/run
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env node
/* eslint-disable @typescript-eslint/no-var-requires */

const oclif = require('@oclif/core')
process.env.NODE_ENV = 'production'
const oclif = require("@oclif/core");
process.env.NODE_ENV = "production";

oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'))
oclif
.run()
.then(require("@oclif/core/flush"))
.catch(require("@oclif/core/handle"));
2 changes: 1 addition & 1 deletion cli/src/commands/xlr/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class XLRCompile extends BaseCommand {
description: "Output directory to write results to.",
default: "./dist",
}),
mode: Flags.enum({
mode: Flags.string({
char: "m",
description:
"Search strategy for types to export: plugin (default, looks for exported EnchancedPlayerPlugin classes) or type (all exported types)",
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/xlr/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class XLRConvert extends BaseCommand {
char: "o",
description: "Output directory to write results to.",
}),
lang: Flags.enum({
lang: Flags.string({
char: "l",
description:
"Search strategy for types to export: plugin (default, looks for exported EnchancedPlayerPlugin classes) or type (all exported types)",
Expand Down
6 changes: 2 additions & 4 deletions cli/src/utils/base-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,7 @@ export abstract class BaseCommand extends Command {
return compilerContext;
}

exit(code?: number): void {
if (process.env.NODE_ENV !== "test") {
super.exit(code);
}
exit(code?: number): never {
super.exit(code);
}
}
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@
"@devtools-ds/themes": "^1.2.1",
"@devtools-ui/plugin": "0.3.0",
"@emotion/styled": "^11",
"@oclif/core": "1.9.0",
"@oclif/errors": "^1.3.6",
"@oclif/plugin-legacy": "^1.2.7",
"@oclif/plugin-plugins": "^1.9.0",
"@oclif/core": "^4.0.17",
"@oclif/plugin-legacy": "^2.0.16",
"@oclif/plugin-plugins": "^5.4.2",
"@player-ui/common-types-plugin": "0.7.3",
"@player-ui/expression-plugin": "0.7.3",
"@player-ui/player": "0.7.3",
Expand Down Expand Up @@ -122,7 +121,7 @@
"micromatch": "^4.0.2",
"mkdirp": "^1.0.4",
"modify-source-webpack-plugin": "^4.1.0",
"oclif": "^4.4.2",
"oclif": "^4.14.15",
"patch-package": "^6.4.7",
"prettier": "^2.4.1",
"react": "^18.2.0",
Expand Down
Loading