@514labs/moose-cli 0.0.0 → 0.3.32

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Tim Delisle, Nicolas Joseph
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -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.0.0",
3
+ "version": "0.3.32",
4
4
  "bin": {
5
5
  "igloo": "dist/index.js",
6
6
  "igloo-cli": "dist/index.js"
@@ -8,26 +8,24 @@
8
8
  "files": [
9
9
  "dist"
10
10
  ],
11
- "scripts": {
12
- "typecheck": "tsc --noEmit",
13
- "lint": "eslint .",
14
- "lint:fix": "eslint . --fix",
15
- "build": "tsc"
16
- },
17
11
  "devDependencies": {
18
12
  "@types/node": "18.16.19",
19
13
  "@typescript-eslint/eslint-plugin": "^5.62.0",
20
14
  "@typescript-eslint/parser": "^5.62.0",
21
15
  "eslint": "^8.46.0",
22
- "tsconfig": "workspace:0.0.0",
16
+ "tsconfig": "0.0.0",
23
17
  "typescript": "^4.9.5"
24
18
  },
25
19
  "optionalDependencies": {
26
- "@514labs/moose-cli-darwin-arm64": "latest",
27
- "@514labs/moose-cli-darwin-x64": "latest",
28
- "@514labs/moose-cli-linux-arm64": "latest",
29
- "@514labs/moose-cli-linux-x64": "latest",
30
- "@514labs/moose-cli-windows-arm64": "latest",
31
- "@514labs/moose-cli-windows-x64": "latest"
20
+ "@514labs/moose-cli-darwin-arm64": "0.3.32",
21
+ "@514labs/moose-cli-darwin-x64": "0.3.32",
22
+ "@514labs/moose-cli-linux-arm64": "0.3.32",
23
+ "@514labs/moose-cli-linux-x64": "0.3.32"
24
+ },
25
+ "scripts": {
26
+ "typecheck": "tsc --noEmit",
27
+ "lint": "eslint .",
28
+ "lint:fix": "eslint . --fix",
29
+ "build": "tsc"
32
30
  }
33
- }
31
+ }