@remcp/remcp 0.2.204 → 0.2.205
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/package.json
CHANGED
|
@@ -20,7 +20,10 @@ function checkedDirectory(directory) {
|
|
|
20
20
|
if (!stats.isDirectory() || stats.isSymbolicLink()) throw new Error('unsafe addon directory');
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export function buildVettedMacTemperatureAddon({
|
|
23
|
+
export function buildVettedMacTemperatureAddon({
|
|
24
|
+
runtimeRoot, resolved, runCommand, warn = console.error,
|
|
25
|
+
nodeExecutable = process.execPath, environment = process.env,
|
|
26
|
+
}) {
|
|
24
27
|
try {
|
|
25
28
|
checkedDirectory(runtimeRoot);
|
|
26
29
|
const runtime = checkedManifest(path.join(runtimeRoot, 'package.json'));
|
|
@@ -51,10 +54,17 @@ export function buildVettedMacTemperatureAddon({ runtimeRoot, resolved, runComma
|
|
|
51
54
|
}
|
|
52
55
|
// Execute precisely this verified package's known node-gyp script. Do not
|
|
53
56
|
// re-enable arbitrary transitive lifecycle scripts in global npm install.
|
|
57
|
+
// launchd uses a minimal PATH: npm itself is invoked by absolute node path,
|
|
58
|
+
// but node-gyp's nested executable uses `#!/usr/bin/env node`. Without the
|
|
59
|
+
// running Node binary's directory, the verified native addon never builds.
|
|
60
|
+
const nativeBuildEnv = {
|
|
61
|
+
...environment,
|
|
62
|
+
PATH: [path.dirname(nodeExecutable), environment.PATH].filter(Boolean).join(path.delimiter),
|
|
63
|
+
};
|
|
54
64
|
runCommand(resolved.command, [
|
|
55
65
|
...resolved.args, '--prefix', addonRoot, 'run', 'install',
|
|
56
66
|
'--foreground-scripts', '--ignore-scripts=false', '--no-audit', '--no-fund',
|
|
57
|
-
], { timeout:90_000 });
|
|
67
|
+
], { timeout:90_000, env:nativeBuildEnv });
|
|
58
68
|
if (!fs.existsSync(nativeBinary) || !fs.lstatSync(nativeBinary).isFile())
|
|
59
69
|
throw new Error('native build did not create its module');
|
|
60
70
|
return true;
|