@learnrudi/cli 1.10.9 → 1.10.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.
- package/dist/index.cjs +17 -5
- package/dist/packages-manifest.json +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9002,12 +9002,12 @@ async function installSinglePackage(pkg, options = {}) {
|
|
|
9002
9002
|
const resourcesPath = process.env.RESOURCES_PATH;
|
|
9003
9003
|
const npmCmd = resourcesPath ? import_path6.default.join(resourcesPath, "bundled-runtimes", "node", "bin", "npm") : await findNpmExecutable();
|
|
9004
9004
|
if (!isAgentNpm && !import_fs5.default.existsSync(import_path6.default.join(installPath, "package.json"))) {
|
|
9005
|
-
execSync11(`"${npmCmd}" init -y`, { cwd: installPath, stdio: "pipe" });
|
|
9005
|
+
execSync11(`"${npmCmd}" init -y`, { cwd: installPath, stdio: "pipe", env: buildNpmEnv(npmCmd) });
|
|
9006
9006
|
}
|
|
9007
9007
|
const shouldIgnoreScripts = pkg.source?.type === "npm" && !allowScripts;
|
|
9008
9008
|
const installFlags = shouldIgnoreScripts ? "--ignore-scripts --no-audit --no-fund" : "--no-audit --no-fund";
|
|
9009
9009
|
const installCmd = isAgentNpm ? `install -g ${pkg.npmPackage} ${installFlags} --prefix "${npmInstallRoot}"` : `install ${pkg.npmPackage} ${installFlags}`;
|
|
9010
|
-
execSync11(`"${npmCmd}" ${installCmd}`, { cwd: installPath, stdio: "pipe" });
|
|
9010
|
+
execSync11(`"${npmCmd}" ${installCmd}`, { cwd: installPath, stdio: "pipe", env: buildNpmEnv(npmCmd) });
|
|
9011
9011
|
let bins = pkg.bins;
|
|
9012
9012
|
if (!bins || bins.length === 0) {
|
|
9013
9013
|
bins = discoverNpmBins(npmInstallRoot, pkg.npmPackage, npmScope);
|
|
@@ -9249,7 +9249,8 @@ async function uninstallPackage(id) {
|
|
|
9249
9249
|
const npmCmd = await findNpmExecutable();
|
|
9250
9250
|
const npmPrefix = getNodeRuntimeRoot();
|
|
9251
9251
|
execSync11(`"${npmCmd}" uninstall -g ${manifest.npmPackage} --prefix "${npmPrefix}" --no-audit --no-fund`, {
|
|
9252
|
-
stdio: "pipe"
|
|
9252
|
+
stdio: "pipe",
|
|
9253
|
+
env: buildNpmEnv(npmCmd)
|
|
9253
9254
|
});
|
|
9254
9255
|
} catch (error) {
|
|
9255
9256
|
console.warn(`[Installer] Warning: Failed to uninstall ${manifest.npmPackage}: ${error.message}`);
|
|
@@ -9434,7 +9435,7 @@ async function installStackDependencies(stackPath, onProgress) {
|
|
|
9434
9435
|
onProgress?.({ phase: "installing-deps", message: "Installing Node.js dependencies..." });
|
|
9435
9436
|
try {
|
|
9436
9437
|
const npmCmd = await findNpmExecutable();
|
|
9437
|
-
execSync11(`"${npmCmd}" install`, { cwd: nodePath, stdio: "pipe" });
|
|
9438
|
+
execSync11(`"${npmCmd}" install`, { cwd: nodePath, stdio: "pipe", env: buildNpmEnv(npmCmd) });
|
|
9438
9439
|
} catch (error) {
|
|
9439
9440
|
console.warn(`Warning: Failed to install Node.js dependencies: ${error.message}`);
|
|
9440
9441
|
}
|
|
@@ -9452,6 +9453,17 @@ async function installStackDependencies(stackPath, onProgress) {
|
|
|
9452
9453
|
}
|
|
9453
9454
|
}
|
|
9454
9455
|
}
|
|
9456
|
+
function buildNpmEnv(npmCmd) {
|
|
9457
|
+
if (!import_path6.default.isAbsolute(npmCmd)) {
|
|
9458
|
+
return process.env;
|
|
9459
|
+
}
|
|
9460
|
+
const npmBinDir = import_path6.default.dirname(npmCmd);
|
|
9461
|
+
const basePath = process.env.PATH || "";
|
|
9462
|
+
return {
|
|
9463
|
+
...process.env,
|
|
9464
|
+
PATH: [npmBinDir, basePath].join(import_path6.default.delimiter)
|
|
9465
|
+
};
|
|
9466
|
+
}
|
|
9455
9467
|
async function findNpmExecutable() {
|
|
9456
9468
|
const isWindows = process.platform === "win32";
|
|
9457
9469
|
const arch = process.arch === "arm64" ? "arm64" : "x64";
|
|
@@ -40821,7 +40833,7 @@ async function cmdStudio(args, flags) {
|
|
|
40821
40833
|
}
|
|
40822
40834
|
|
|
40823
40835
|
// src/index.js
|
|
40824
|
-
var VERSION2 = true ? "1.10.
|
|
40836
|
+
var VERSION2 = true ? "1.10.10" : process.env.npm_package_version || "0.0.0";
|
|
40825
40837
|
async function main() {
|
|
40826
40838
|
const { command, args, flags } = parseArgs(process.argv.slice(2));
|
|
40827
40839
|
if (flags.version || flags.v) {
|