You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@moonrepo/cli

Package Overview
Dependencies
Maintainers
1
Versions
1365
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@moonrepo/cli - npm Package Compare versions

Comparing version
1.41.7
to
2.0.0-alpha.11
+2
-2
moonx.js
#!/usr/bin/env node
const cp = require('child_process');
const { findMoonExe } = require('./utils');
const { findMoonxExe } = require('./utils');
const result = cp.spawnSync(findMoonExe(), ['run', ...process.argv.slice(2)], {
const result = cp.spawnSync(findMoonxExe(), process.argv.slice(2), {
shell: false,

@@ -8,0 +8,0 @@ stdio: 'inherit',

{
"name": "@moonrepo/cli",
"version": "1.41.7",
"version": "2.0.0-alpha.11",
"type": "commonjs",

@@ -15,4 +15,3 @@ "description": "moon command line and core system.",

"moonx.js",
"utils.js",
"postinstall-old.js"
"utils.js"
],

@@ -22,3 +21,4 @@ "author": "Miles Johnson",

"bin": {
"moon": "moon.js"
"moon": "moon.js",
"moonx": "moonx.js"
},

@@ -30,17 +30,14 @@ "repository": {

},
"scripts": {
"__postinstall__": "node ./postinstall-old.js"
},
"dependencies": {
"detect-libc": "^2.0.4"
"detect-libc": "^2.1.2"
},
"optionalDependencies": {
"@moonrepo/core-linux-arm64-gnu": "1.41.7",
"@moonrepo/core-linux-arm64-musl": "1.41.7",
"@moonrepo/core-linux-x64-gnu": "1.41.7",
"@moonrepo/core-linux-x64-musl": "1.41.7",
"@moonrepo/core-macos-arm64": "1.41.7",
"@moonrepo/core-macos-x64": "1.41.7",
"@moonrepo/core-windows-x64-msvc": "1.41.7"
}
}
"@moonrepo/core-linux-arm64-gnu": "2.0.0-alpha.11",
"@moonrepo/core-linux-arm64-musl": "2.0.0-alpha.11",
"@moonrepo/core-linux-x64-gnu": "2.0.0-alpha.11",
"@moonrepo/core-linux-x64-musl": "2.0.0-alpha.11",
"@moonrepo/core-macos-arm64": "2.0.0-alpha.11",
"@moonrepo/core-windows-x64-msvc": "2.0.0-alpha.11"
},
"stableVersion": "1.41.8"
}

@@ -94,3 +94,3 @@ # @moonrepo/cli

- **Action distribution** - Distributes actions across multiple machines to increase throughput.
- **Incremental builds** - With our smart hashing, only rebuild projects that have been touched
- **Incremental builds** - With our smart hashing, only rebuild projects that have been changed
since the last build.

@@ -97,0 +97,0 @@

@@ -31,5 +31,5 @@ const fs = require('fs');

function findMoonExe() {
function findExe(name) {
const pkgPath = require.resolve(`@moonrepo/core-${triple}/package.json`);
const exePath = path.join(path.dirname(pkgPath), isWindows ? 'moon.exe' : 'moon');
const exePath = path.join(path.dirname(pkgPath), isWindows ? `${name}.exe` : name);

@@ -43,2 +43,11 @@ if (fs.existsSync(exePath)) {

function findMoonExe() {
return findExe('moon');
}
function findMoonxExe() {
return findExe('moonx');
}
exports.findMoonExe = findMoonExe;
exports.findMoonxExe = findMoonxExe;
#!/usr/bin/env node
// Based on the great parcel-css
// https://github.com/parcel-bundler/parcel-css/blob/master/cli/postinstall.js
const fs = require('fs');
const path = require('path');
const isMoonLocal =
fs.existsSync(path.join(__dirname, '../../.moon')) &&
fs.existsSync(path.join(__dirname, '../../crates'));
const isLinux = process.platform === 'linux';
const isMacos = process.platform === 'darwin';
const isWindows = process.platform === 'win32';
const platform = isWindows ? 'windows' : isMacos ? 'macos' : process.platform;
const arch =
process.env['npm_config_user_agent'] && process.env['npm_config_user_agent'].match(/^bun.*arm64$/)
? 'arm64'
: process.arch; // https://github.com/moonrepo/moon/issues/1103
const parts = [platform, arch];
if (isLinux) {
const { familySync } = require('detect-libc');
if (familySync() === 'musl') {
parts.push('musl');
} else if (process.arch === 'arm') {
parts.push('gnueabihf');
} else {
parts.push('gnu');
}
} else if (isWindows) {
parts.push('msvc');
}
const binary = isWindows ? 'moon.exe' : 'moon';
const triple = parts.join('-');
const pkgPath = path.dirname(require.resolve(`@moonrepo/core-${triple}/package.json`));
const binPath = path.join(pkgPath, binary);
try {
const linkPath = path.join(__dirname, binary);
if (fs.existsSync(binPath)) {
try {
fs.linkSync(binPath, linkPath);
} catch {
fs.copyFileSync(binPath, linkPath);
}
fs.chmodSync(linkPath, 0o755);
} else {
throw new Error();
}
} catch {
console.error(`Failed to find "${binary}" binary.`);
if (!isMoonLocal) {
// process.exit(1);
}
}