@514labs/moose-cli 0.3.45 → 0.3.47

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 ADDED
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ exports.__esModule = true;
4
+ var child_process_1 = require("child_process");
5
+ /**
6
+ * Returns the executable path which is located inside `node_modules`
7
+ * The naming convention is app-${os}-${arch}
8
+ * If the platform is `win32` or `cygwin`, executable will include a `.exe` extension.
9
+ * @see https://nodejs.org/api/os.html#osarch
10
+ * @see https://nodejs.org/api/os.html#osplatform
11
+ * @example "x/xx/node_modules/app-darwin-arm64"
12
+ */
13
+ function getExePath() {
14
+ var arch = process.arch;
15
+ var os = process.platform;
16
+ var extension = "";
17
+ if (["win32", "cygwin"].includes(process.platform)) {
18
+ os = "windows";
19
+ extension = ".exe";
20
+ }
21
+ if (os.startsWith("windows")) {
22
+ throw new Error("Windows is not supported yet. If you are a windows user, interested in windows support, please give us a shout at https://discord.gg/WX3V3K4QCc");
23
+ }
24
+ try {
25
+ // Since the binary will be located inside `node_modules`, we can simply call `require.resolve`
26
+ return require.resolve("@514labs/moose-cli-".concat(os, "-").concat(arch, "/bin/igloo-cli").concat(extension));
27
+ }
28
+ catch (e) {
29
+ throw new Error("Couldn't find application binary inside node_modules for ".concat(os, "-").concat(arch));
30
+ }
31
+ }
32
+ /**
33
+ * Runs the application with args using nodejs spawn
34
+ */
35
+ function run() {
36
+ var _a;
37
+ var args = process.argv.slice(2);
38
+ var processResult = (0, child_process_1.spawnSync)(getExePath(), args, { stdio: "inherit" });
39
+ process.exit((_a = processResult.status) !== null && _a !== void 0 ? _a : 0);
40
+ }
41
+ run();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@514labs/moose-cli",
3
- "version": "0.3.45",
3
+ "version": "0.3.47",
4
4
  "bin": {
5
5
  "igloo": "dist/index.js",
6
6
  "igloo-cli": "dist/index.js"
@@ -17,10 +17,10 @@
17
17
  "typescript": "^4.9.5"
18
18
  },
19
19
  "optionalDependencies": {
20
- "@514labs/moose-cli-darwin-arm64": "0.3.45",
21
- "@514labs/moose-cli-darwin-x64": "0.3.45",
22
- "@514labs/moose-cli-linux-arm64": "0.3.45",
23
- "@514labs/moose-cli-linux-x64": "0.3.45"
20
+ "@514labs/moose-cli-darwin-arm64": "0.3.47",
21
+ "@514labs/moose-cli-darwin-x64": "0.3.47",
22
+ "@514labs/moose-cli-linux-arm64": "0.3.47",
23
+ "@514labs/moose-cli-linux-x64": "0.3.47"
24
24
  },
25
25
  "scripts": {
26
26
  "typecheck": "tsc --noEmit",