@514labs/moose-cli 0.3.174 → 0.3.176

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.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- exports.__esModule = true;
4
- var child_process_1 = require("child_process");
2
+ import { spawnSync } from "child_process";
5
3
  /**
6
4
  * Returns the executable path which is located inside `node_modules`
7
5
  * The naming convention is app-${os}-${arch}
@@ -11,9 +9,9 @@ var child_process_1 = require("child_process");
11
9
  * @example "x/xx/node_modules/app-darwin-arm64"
12
10
  */
13
11
  function getExePath() {
14
- var arch = process.arch;
15
- var os = process.platform;
16
- var extension = "";
12
+ const arch = process.arch;
13
+ let os = process.platform;
14
+ let extension = "";
17
15
  if (["win32", "cygwin"].includes(process.platform)) {
18
16
  os = "windows";
19
17
  extension = ".exe";
@@ -24,23 +22,22 @@ function getExePath() {
24
22
  try {
25
23
  // Since the binary will be located inside `node_modules`, we can simply call `require.resolve`
26
24
  // eslint-disable-next-line @typescript-eslint/no-var-requires
27
- return require.resolve("@514labs/moose-cli-".concat(os, "-").concat(arch, "/bin/moose-cli").concat(extension));
25
+ return require.resolve(`@514labs/moose-cli-${os}-${arch}/bin/moose-cli${extension}`);
28
26
  }
29
27
  catch (e) {
30
- throw new Error("Couldn't find application binary inside node_modules for ".concat(os, "-").concat(arch));
28
+ throw new Error(`Couldn't find application binary inside node_modules for ${os}-${arch}`);
31
29
  }
32
30
  }
33
31
  /**
34
32
  * Runs the application with args using nodejs spawn
35
33
  */
36
34
  function run() {
37
- var _a;
38
- var args = process.argv.slice(2);
35
+ const args = process.argv.slice(2);
39
36
  // ignore sigint in the node parent process
40
37
  // so that we can wait until we have processResult when the rust process returns
41
38
  // instead of prematurely exiting
42
- process.on("SIGINT", function () { });
43
- var processResult = (0, child_process_1.spawnSync)(getExePath(), args, { stdio: "inherit" });
44
- process.exit((_a = processResult.status) !== null && _a !== void 0 ? _a : 0);
39
+ process.on("SIGINT", () => { });
40
+ const processResult = spawnSync(getExePath(), args, { stdio: "inherit" });
41
+ process.exit(processResult.status ?? 0);
45
42
  }
46
43
  run();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@514labs/moose-cli",
3
- "version": "0.3.174",
3
+ "version": "0.3.176",
4
4
  "bin": {
5
5
  "moose": "dist/index.js",
6
6
  "moose-cli": "dist/index.js"
@@ -13,14 +13,14 @@
13
13
  "@typescript-eslint/eslint-plugin": "^5.62.0",
14
14
  "@typescript-eslint/parser": "^5.62.0",
15
15
  "eslint": "^8.46.0",
16
- "tsconfig": "0.0.0",
17
- "typescript": "^4.9.5"
16
+ "typescript": "^4.9.5",
17
+ "@repo/ts-config": "0.0.0"
18
18
  },
19
19
  "optionalDependencies": {
20
- "@514labs/moose-cli-darwin-arm64": "0.3.174",
21
- "@514labs/moose-cli-darwin-x64": "0.3.174",
22
- "@514labs/moose-cli-linux-arm64": "0.3.174",
23
- "@514labs/moose-cli-linux-x64": "0.3.174"
20
+ "@514labs/moose-cli-darwin-arm64": "0.3.176",
21
+ "@514labs/moose-cli-darwin-x64": "0.3.176",
22
+ "@514labs/moose-cli-linux-arm64": "0.3.176",
23
+ "@514labs/moose-cli-linux-x64": "0.3.176"
24
24
  },
25
25
  "scripts": {
26
26
  "typecheck": "tsc --noEmit",