@wordbricks/velen 0.2.9 → 0.2.10

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.
Files changed (2) hide show
  1. package/bin/velen.js +4 -53
  2. package/package.json +2 -5
package/bin/velen.js CHANGED
@@ -13,59 +13,12 @@ const require = createRequire(import.meta.url);
13
13
  const CLI_PACKAGE_NAME = "@wordbricks/velen";
14
14
  const PLATFORM_PACKAGE_BY_TARGET = {
15
15
  "aarch64-apple-darwin": "velen-darwin-arm64",
16
- "aarch64-pc-windows-msvc": "velen-win32-arm64",
17
- "aarch64-unknown-linux-musl": "velen-linux-arm64",
18
- "x86_64-apple-darwin": "velen-darwin-x64",
19
- "x86_64-pc-windows-msvc": "velen-win32-x64",
20
- "x86_64-unknown-linux-musl": "velen-linux-x64",
21
16
  };
22
17
 
23
18
  const { platform, arch } = process;
24
19
  let targetTriple = null;
25
- switch (platform) {
26
- case "linux":
27
- case "android": {
28
- switch (arch) {
29
- case "x64":
30
- targetTriple = "x86_64-unknown-linux-musl";
31
- break;
32
- case "arm64":
33
- targetTriple = "aarch64-unknown-linux-musl";
34
- break;
35
- default:
36
- break;
37
- }
38
- break;
39
- }
40
- case "darwin": {
41
- switch (arch) {
42
- case "x64":
43
- targetTriple = "x86_64-apple-darwin";
44
- break;
45
- case "arm64":
46
- targetTriple = "aarch64-apple-darwin";
47
- break;
48
- default:
49
- break;
50
- }
51
- break;
52
- }
53
- case "win32": {
54
- switch (arch) {
55
- case "x64":
56
- targetTriple = "x86_64-pc-windows-msvc";
57
- break;
58
- case "arm64":
59
- targetTriple = "aarch64-pc-windows-msvc";
60
- break;
61
- default:
62
- break;
63
- }
64
- break;
65
- }
66
- default: {
67
- break;
68
- }
20
+ if (platform === "darwin" && arch === "arm64") {
21
+ targetTriple = "aarch64-apple-darwin";
69
22
  }
70
23
 
71
24
  if (!targetTriple) {
@@ -82,7 +35,7 @@ if (!platformPackage) {
82
35
 
83
36
  // CONTEXT: platform packages are installed through npm alias names so the
84
37
  // launcher resolves the alias folder, not the underlying published package id.
85
- const binaryName = platform === "win32" ? "velen.exe" : "velen";
38
+ const binaryName = "velen";
86
39
  const localVendorRoot = path.join(__dirname, "..", "vendor");
87
40
  const localBinaryPath = path.join(
88
41
  localVendorRoot,
@@ -112,9 +65,7 @@ try {
112
65
 
113
66
  const binaryPath = path.join(vendorRoot, targetTriple, "velen", binaryName);
114
67
 
115
- if (platform !== "win32") {
116
- ensureExecutable(binaryPath);
117
- }
68
+ ensureExecutable(binaryPath);
118
69
 
119
70
  const child = spawn(binaryPath, process.argv.slice(2), {
120
71
  env: process.env,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordbricks/velen",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "Velen CLI",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -23,9 +23,6 @@
23
23
  "node": ">=18"
24
24
  },
25
25
  "optionalDependencies": {
26
- "velen-darwin-arm64": "npm:@wordbricks/velen@0.2.9-darwin-arm64",
27
- "velen-darwin-x64": "npm:@wordbricks/velen@0.2.9-darwin-x64",
28
- "velen-linux-arm64": "npm:@wordbricks/velen@0.2.9-linux-arm64",
29
- "velen-linux-x64": "npm:@wordbricks/velen@0.2.9-linux-x64"
26
+ "velen-darwin-arm64": "npm:@wordbricks/velen@0.2.10-darwin-arm64"
30
27
  }
31
28
  }