@love-moon/conductor-cli 0.15.2 → 0.17.0

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.
@@ -162,6 +162,16 @@ export function resolveGlobalInstallPrefix(packageRoot) {
162
162
  return normalized.slice(0, markerIndex);
163
163
  }
164
164
 
165
+ /**
166
+ * The directory of the running Node when it ships its own headers, which official tarballs, nvm
167
+ * and Homebrew all do. Handed to node-gyp as `npm_config_nodedir`, it compiles node-pty against
168
+ * those instead of downloading the headers from nodejs.org.
169
+ */
170
+ export function resolveBundledNodeDir(nodeExecutable = process.execPath, { existsSync = fs.existsSync } = {}) {
171
+ const nodeDir = path.dirname(path.dirname(nodeExecutable));
172
+ return existsSync(path.join(nodeDir, "include", "node", "common.gypi")) ? nodeDir : null;
173
+ }
174
+
165
175
  export function buildUpgradeCommand(options = {}) {
166
176
  const installMethod = resolveInstallMethod(options);
167
177
  if (installMethod === "homebrew") {