@moonrepo/cli 1.24.5 → 1.24.6-nightly.202405200035
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/CHANGELOG.md +6 -0
- package/moon.js +19 -0
- package/package.json +11 -10
- package/postinstall.js +6 -13
- package/moon +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
- More accurately monitors signals (ctrl+c) and shutdowns.
|
|
11
11
|
- Tasks can now be configured with a timeout.
|
|
12
12
|
|
|
13
|
+
## Unreleased
|
|
14
|
+
|
|
15
|
+
#### 🐞 Fixes
|
|
16
|
+
|
|
17
|
+
- Reworked the binary provided by `@moonrepo/cli` to work better on Windows.
|
|
18
|
+
|
|
13
19
|
## 1.24.5
|
|
14
20
|
|
|
15
21
|
#### 🐞 Fixes
|
package/moon.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const cp = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const result = cp.spawnSync(
|
|
7
|
+
path.join(__dirname, process.platform === 'win32' ? 'moon.exe' : 'moon'),
|
|
8
|
+
process.argv.slice(2),
|
|
9
|
+
{
|
|
10
|
+
shell: false,
|
|
11
|
+
stdio: 'inherit',
|
|
12
|
+
},
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
if (result.error) {
|
|
16
|
+
throw result.error;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
process.exitCode = result.status;
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonrepo/cli",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.6-nightly.202405200035",
|
|
4
|
+
"type": "commonjs",
|
|
4
5
|
"description": "moon command line and core system.",
|
|
5
6
|
"keywords": [
|
|
6
7
|
"moon",
|
|
@@ -9,13 +10,13 @@
|
|
|
9
10
|
"core"
|
|
10
11
|
],
|
|
11
12
|
"files": [
|
|
12
|
-
"moon",
|
|
13
|
+
"moon.js",
|
|
13
14
|
"postinstall.js"
|
|
14
15
|
],
|
|
15
16
|
"author": "Miles Johnson",
|
|
16
17
|
"license": "MIT",
|
|
17
18
|
"bin": {
|
|
18
|
-
"moon": "moon"
|
|
19
|
+
"moon": "moon.js"
|
|
19
20
|
},
|
|
20
21
|
"repository": {
|
|
21
22
|
"type": "git",
|
|
@@ -29,12 +30,12 @@
|
|
|
29
30
|
"detect-libc": "^2.0.3"
|
|
30
31
|
},
|
|
31
32
|
"optionalDependencies": {
|
|
32
|
-
"@moonrepo/core-linux-arm64-gnu": "1.24.
|
|
33
|
-
"@moonrepo/core-linux-arm64-musl": "1.24.
|
|
34
|
-
"@moonrepo/core-linux-x64-gnu": "1.24.
|
|
35
|
-
"@moonrepo/core-linux-x64-musl": "1.24.
|
|
36
|
-
"@moonrepo/core-macos-arm64": "1.24.
|
|
37
|
-
"@moonrepo/core-macos-x64": "1.24.
|
|
38
|
-
"@moonrepo/core-windows-x64-msvc": "1.24.
|
|
33
|
+
"@moonrepo/core-linux-arm64-gnu": "1.24.6",
|
|
34
|
+
"@moonrepo/core-linux-arm64-musl": "1.24.6",
|
|
35
|
+
"@moonrepo/core-linux-x64-gnu": "1.24.6",
|
|
36
|
+
"@moonrepo/core-linux-x64-musl": "1.24.6",
|
|
37
|
+
"@moonrepo/core-macos-arm64": "1.24.6",
|
|
38
|
+
"@moonrepo/core-macos-x64": "1.24.6",
|
|
39
|
+
"@moonrepo/core-windows-x64-msvc": "1.24.6"
|
|
39
40
|
}
|
|
40
41
|
}
|
package/postinstall.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
1
3
|
// Based on the great parcel-css
|
|
2
4
|
// https://github.com/parcel-bundler/parcel-css/blob/master/cli/postinstall.js
|
|
3
5
|
|
|
@@ -13,7 +15,10 @@ const isMacos = process.platform === 'darwin';
|
|
|
13
15
|
const isWindows = process.platform === 'win32';
|
|
14
16
|
|
|
15
17
|
const platform = isWindows ? 'windows' : isMacos ? 'macos' : process.platform;
|
|
16
|
-
const arch =
|
|
18
|
+
const arch =
|
|
19
|
+
process.env['npm_config_user_agent'] && process.env['npm_config_user_agent'].match(/^bun.*arm64$/)
|
|
20
|
+
? 'arm64'
|
|
21
|
+
: process.arch; // https://github.com/moonrepo/moon/issues/1103
|
|
17
22
|
const parts = [platform, arch];
|
|
18
23
|
|
|
19
24
|
if (isLinux) {
|
|
@@ -57,15 +62,3 @@ try {
|
|
|
57
62
|
// process.exit(1);
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
|
-
|
|
61
|
-
if (isWindows && !isMoonLocal) {
|
|
62
|
-
try {
|
|
63
|
-
fs.unlinkSync(path.join(__dirname, 'moon'));
|
|
64
|
-
|
|
65
|
-
// This is required for pnpm!
|
|
66
|
-
const pkg = require('./package.json');
|
|
67
|
-
pkg.bin.moon = binary;
|
|
68
|
-
|
|
69
|
-
fs.writeFileSync(path.join(__dirname, 'package.json'), JSON.stringify(pkg, null, 2));
|
|
70
|
-
} catch {}
|
|
71
|
-
}
|
package/moon
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
This file is necessary for package managers to link the core binary!
|