@adhdev/daemon-core 1.0.18-rc.3 → 1.0.18-rc.5

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.js CHANGED
@@ -442,10 +442,10 @@ function readInjected(value) {
442
442
  }
443
443
  function getDaemonBuildInfo() {
444
444
  if (cached) return cached;
445
- const commit = readInjected(true ? "96f3f1365be0d875f5089fc7ce7e4e254ca8e08d" : void 0) ?? "unknown";
446
- const commitShort = readInjected(true ? "96f3f136" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
447
- const version = readInjected(true ? "1.0.18-rc.3" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
448
- const builtAt = readInjected(true ? "2026-07-21T13:00:17.395Z" : void 0);
445
+ const commit = readInjected(true ? "a9f2898ed9e58f0b35cf6df7eb7618e088475c26" : void 0) ?? "unknown";
446
+ const commitShort = readInjected(true ? "a9f2898e" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
447
+ const version = readInjected(true ? "1.0.18-rc.5" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
448
+ const builtAt = readInjected(true ? "2026-07-22T00:35:55.872Z" : void 0);
449
449
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
450
450
  return cached;
451
451
  }
@@ -43081,6 +43081,26 @@ function findPortableNode22(homeDir, currentNode = process.execPath) {
43081
43081
  function packageRootForPrefix(prefix, packageName) {
43082
43082
  return path20.join(prefix, "node_modules", ...packageName.split("/"));
43083
43083
  }
43084
+ var CONPTY_PREBUILD_RELATIVE_PATH = path20.join(
43085
+ "node_modules",
43086
+ "adhdev",
43087
+ "node_modules",
43088
+ "node-pty",
43089
+ "prebuilds",
43090
+ "win32-x64",
43091
+ "conpty.node"
43092
+ );
43093
+ function resolveStagedConptyPrebuildPath(stagedPrefix) {
43094
+ return path20.join(stagedPrefix, CONPTY_PREBUILD_RELATIVE_PATH);
43095
+ }
43096
+ function verifyStagedConptyPrebuild(stagedPrefix) {
43097
+ const conptyPath = resolveStagedConptyPrebuildPath(stagedPrefix);
43098
+ if (!fs14.existsSync(conptyPath)) {
43099
+ throw new Error(
43100
+ `Staged install is missing required native addon: ${conptyPath}. Aborting activation to prevent a daemon boot crash.`
43101
+ );
43102
+ }
43103
+ }
43084
43104
  function readPackageCliEntry(prefix, packageName, targetVersion) {
43085
43105
  const packageRoot = packageRootForPrefix(prefix, packageName);
43086
43106
  const packageJsonPath = path20.join(packageRoot, "package.json");
@@ -43225,6 +43245,7 @@ async function performWindowsAtomicUpgrade(options) {
43225
43245
  try {
43226
43246
  hooks.log(`Installing ${packageName}@${targetVersion} into inactive prefix ${stagedPrefix}`);
43227
43247
  await hooks.install(stagedPrefix, portableNode);
43248
+ verifyStagedConptyPrebuild(stagedPrefix);
43228
43249
  const stagedCliEntry = readPackageCliEntry(stagedPrefix, packageName, targetVersion);
43229
43250
  pinStagedShims(stagedPrefix, portableNode, stagedCliEntry);
43230
43251
  validateStagedCli(portableNode, stagedCliEntry, targetVersion);
@@ -43278,7 +43299,12 @@ async function performWindowsAtomicUpgrade(options) {
43278
43299
  function createDefaultWindowsAtomicHooks(options) {
43279
43300
  return {
43280
43301
  install: (stagedPrefix, portableNode) => {
43281
- const env = { ...options.env, ADHDEV_BOOTSTRAP: "1" };
43302
+ const env = {
43303
+ ...options.env,
43304
+ ADHDEV_BOOTSTRAP: "1",
43305
+ npm_config_build_from_source: "false",
43306
+ "npm_config_build-from-source": "false"
43307
+ };
43282
43308
  const pathKey = Object.keys(env).find((key2) => key2.toLowerCase() === "path") || "Path";
43283
43309
  env[pathKey] = `${path20.dirname(portableNode)};${env[pathKey] || ""}`;
43284
43310
  (0, import_child_process6.execFileSync)(portableNode, [