@ekkolyth/miso 0.1.16 → 0.2.6

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  the agnostic package manager
4
4
 
5
- <img src="./internal/assets/miso.png" alt="miso" width="200"/>
5
+ <img src="https://raw.githubusercontent.com/ekkolyth/miso/main/internal/assets/miso.png" alt="miso" width="200"/>
6
6
 
7
7
  Miso is a tiny cli tool that let's you stop worrying about which package manager your projects are using. Use the tools you and your team want, without the hassle.
8
8
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -30,7 +30,7 @@ function resolveBinary() {
30
30
  process.exit(1);
31
31
  }
32
32
 
33
- return join(__dirname, binaryName);
33
+ return join(__dirname, 'bin', binaryName);
34
34
  }
35
35
 
36
36
  const binPath = resolveBinary();
package/misox.mjs ADDED
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawnSync } from 'node:child_process';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { dirname, join } from 'node:path';
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = dirname(__filename);
9
+
10
+ function resolveBinary() {
11
+ const platform = process.platform;
12
+ const arch = process.arch;
13
+
14
+ /** @type {Record<string, string>} */
15
+ const targets = {
16
+ 'darwin-x64': 'misox-darwin-amd64',
17
+ 'darwin-arm64': 'misox-darwin-arm64',
18
+ 'linux-x64': 'misox-linux-amd64',
19
+ 'linux-arm64': 'misox-linux-arm64',
20
+ };
21
+
22
+ const key = `${platform}-${arch}`;
23
+ const binaryName = targets[key];
24
+
25
+ if (!binaryName) {
26
+ console.error(
27
+ `Unsupported platform/arch: ${platform}/${arch}. ` +
28
+ 'Prebuilt binaries are only provided for darwin-x64, darwin-arm64, linux-x64, and linux-arm64.',
29
+ );
30
+ process.exit(1);
31
+ }
32
+
33
+ return join(__dirname, 'bin', binaryName);
34
+ }
35
+
36
+ const binPath = resolveBinary();
37
+
38
+ const result = spawnSync(binPath, process.argv.slice(2), {
39
+ stdio: 'inherit',
40
+ });
41
+
42
+ if (result.error) {
43
+ console.error(result.error.message);
44
+ process.exit(1);
45
+ }
46
+
47
+ process.exit(result.status ?? 0);
48
+
49
+
package/package.json CHANGED
@@ -1,14 +1,23 @@
1
1
  {
2
2
  "bin": {
3
- "miso": "./cli.mjs"
3
+ "miso": "./miso.mjs",
4
+ "misox": "./misox.mjs"
4
5
  },
5
6
  "description": "the agnostic package manager",
6
7
  "files": [
7
- "cli.mjs",
8
- "miso-darwin-amd64",
9
- "miso-darwin-arm64",
10
- "miso-linux-amd64",
11
- "miso-linux-arm64"
8
+ "README.md",
9
+ "miso.mjs",
10
+ "misox.mjs",
11
+ "bin/miso-darwin-amd64",
12
+ "bin/miso-darwin-arm64",
13
+ "bin/miso-linux-amd64",
14
+ "bin/miso-linux-arm64",
15
+ "bin/miso-windows-amd64.exe",
16
+ "bin/misox-darwin-amd64",
17
+ "bin/misox-darwin-arm64",
18
+ "bin/misox-linux-amd64",
19
+ "bin/misox-linux-arm64",
20
+ "bin/misox-windows-amd64.exe"
12
21
  ],
13
22
  "license": "MIT",
14
23
  "name": "@ekkolyth/miso",
@@ -16,5 +25,5 @@
16
25
  "type": "git",
17
26
  "url": "git+https://github.com/ekkolyth/miso.git"
18
27
  },
19
- "version": "0.1.16"
28
+ "version": "0.2.6"
20
29
  }