@luvio/cli 0.62.4 → 0.63.3

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/bin/dev ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+
3
+ const oclif = require('@oclif/core')
4
+
5
+ const path = require('path')
6
+ const project = path.join(__dirname, '..', 'tsconfig.json')
7
+
8
+ // In dev mode -> use ts-node and dev plugins
9
+ process.env.NODE_ENV = 'development'
10
+
11
+ require('ts-node').register({project})
12
+
13
+ // In dev mode, always show stack traces
14
+ oclif.settings.debug = true;
15
+
16
+ // Start the CLI
17
+ oclif.run().then(oclif.flush).catch(oclif.Errors.handle)
package/bin/dev.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\dev" %*
package/bin/run CHANGED
@@ -1,13 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const fs = require('fs')
4
- const path = require('path')
5
- const project = path.join(__dirname, '../tsconfig.json')
6
- const dev = fs.existsSync(project)
3
+ const oclif = require('@oclif/core')
7
4
 
8
- if (dev) {
9
- require('ts-node').register({project})
10
- }
11
-
12
- require(`../${dev ? 'src' : 'lib'}`).run()
13
- .catch(require('@oclif/errors/handle'))
5
+ oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'))
@@ -1,4 +1,4 @@
1
- import { Command, flags } from '@oclif/command';
1
+ import { Command } from '@oclif/core';
2
2
  export default class Generate extends Command {
3
3
  static description: string;
4
4
  static examples: string[];
@@ -8,7 +8,7 @@ export default class Generate extends Command {
8
8
  description: string;
9
9
  }[];
10
10
  static flags: {
11
- plugin: flags.IOptionFlag<string | undefined>;
11
+ plugin: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
12
12
  };
13
13
  run(): Promise<void>;
14
14
  }
@@ -1,22 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const command_1 = require("@oclif/command");
4
+ const core_1 = require("@oclif/core");
5
5
  const compiler_1 = require("@luvio/compiler");
6
- const path_1 = tslib_1.__importDefault(require("path"));
7
- const reporter_1 = tslib_1.__importDefault(require("../reporter"));
8
- class Generate extends command_1.Command {
6
+ const path_1 = (0, tslib_1.__importDefault)(require("path"));
7
+ const reporter_1 = (0, tslib_1.__importDefault)(require("../reporter"));
8
+ class Generate extends core_1.Command {
9
9
  async run() {
10
- const { args, flags } = this.parse(Generate);
10
+ const { args, flags } = await this.parse(Generate);
11
11
  let plugin;
12
12
  if (flags.plugin) {
13
- plugin = await Promise.resolve().then(() => tslib_1.__importStar(require(path_1.default.resolve(flags.plugin))));
13
+ plugin = await Promise.resolve().then(() => (0, tslib_1.__importStar)(require(path_1.default.resolve(flags.plugin))));
14
14
  }
15
15
  const filePath = args.input;
16
- const parseErrors = await compiler_1.generate(filePath, args.outputDir, plugin);
16
+ const parseErrors = await (0, compiler_1.generate)(filePath, args.outputDir, plugin);
17
17
  if (Array.isArray(parseErrors)) {
18
18
  // eslint-disable-next-line no-console
19
- console.log(reporter_1.default(filePath, parseErrors));
19
+ console.log((0, reporter_1.default)(filePath, parseErrors));
20
20
  }
21
21
  }
22
22
  }
@@ -36,7 +36,7 @@ Generate.args = [
36
36
  },
37
37
  ];
38
38
  Generate.flags = {
39
- plugin: command_1.flags.string({
39
+ plugin: core_1.Flags.string({
40
40
  char: 'p',
41
41
  }),
42
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAChD,8CAA2C;AAC3C,wDAAwB;AACxB,mEAAmC;AAEnC,MAAqB,QAAS,SAAQ,iBAAO;IAwBzC,KAAK,CAAC,GAAG;QACL,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC7C,IAAI,MAAM,CAAC;QACX,IAAI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AK,CAAC,MAAM,CAAC,GAAC,CAAC;SACrD;QACD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,MAAM,WAAW,GAAG,MAAM,IAAA,mBAAQ,EAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QACrE,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;YAC5B,sCAAsC;YACtC,OAAO,CAAC,GAAG,CAAC,IAAA,kBAAQ,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;SAChD;IACL,CAAC;;AApCL,2BAqCC;AApCU,oBAAW,GAAG,4DAA4D,CAAC;AAE3E,iBAAQ,GAAG,CAAC,0CAA0C,CAAC,CAAC;AAExD,aAAI,GAAG;IACV;QACI,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,YAAY;KAC5B;IACD;QACI,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,kBAAkB;KAClC;CACJ,CAAC;AAEK,cAAK,GAAG;IACX,MAAM,EAAE,YAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;KACZ,CAAC;CACL,CAAC"}
package/lib/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { run } from '@oclif/command';
1
+ export { run } from '@oclif/core';
package/lib/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var command_1 = require("@oclif/command");
4
- Object.defineProperty(exports, "run", { enumerable: true, get: function () { return command_1.run; } });
3
+ exports.run = void 0;
4
+ var core_1 = require("@oclif/core");
5
+ Object.defineProperty(exports, "run", { enumerable: true, get: function () { return core_1.run; } });
5
6
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,0CAAqC;AAA5B,8FAAA,GAAG,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,oCAAkC;AAAzB,2FAAA,GAAG,OAAA"}
package/package.json CHANGED
@@ -1,15 +1,13 @@
1
1
  {
2
2
  "name": "@luvio/cli",
3
3
  "description": "CLI for Luvio Compiler",
4
- "version": "0.62.4",
4
+ "version": "0.63.3",
5
5
  "bin": {
6
6
  "luvio": "./bin/run"
7
7
  },
8
8
  "dependencies": {
9
- "@luvio/compiler": "0.62.4",
10
- "@oclif/command": "^1.5.19",
11
- "@oclif/config": "^1.13.3",
12
- "@oclif/plugin-help": "^2.2.1",
9
+ "@luvio/compiler": "0.63.3",
10
+ "@oclif/core": "^1.0.11",
13
11
  "chalk": "^4.0.0",
14
12
  "strip-ansi": "^6.0.0",
15
13
  "text-table": "^0.2.0"