@adhdev/daemon-core 1.0.18-rc.4 → 1.0.18-rc.6

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.mjs CHANGED
@@ -437,10 +437,10 @@ function readInjected(value) {
437
437
  }
438
438
  function getDaemonBuildInfo() {
439
439
  if (cached) return cached;
440
- const commit = readInjected(true ? "03520d83677e928145388b2b0666f08dd4cb0e4a" : void 0) ?? "unknown";
441
- const commitShort = readInjected(true ? "03520d83" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
442
- const version = readInjected(true ? "1.0.18-rc.4" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
443
- const builtAt = readInjected(true ? "2026-07-21T13:08:59.999Z" : void 0);
440
+ const commit = readInjected(true ? "a9f2898ed9e58f0b35cf6df7eb7618e088475c26" : void 0) ?? "unknown";
441
+ const commitShort = readInjected(true ? "a9f2898e" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
442
+ const version = readInjected(true ? "1.0.18-rc.6" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
443
+ const builtAt = readInjected(true ? "2026-07-22T00:47:11.069Z" : void 0);
444
444
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
445
445
  return cached;
446
446
  }
@@ -42648,6 +42648,26 @@ function findPortableNode22(homeDir, currentNode = process.execPath) {
42648
42648
  function packageRootForPrefix(prefix, packageName) {
42649
42649
  return path20.join(prefix, "node_modules", ...packageName.split("/"));
42650
42650
  }
42651
+ var CONPTY_PREBUILD_RELATIVE_PATH = path20.join(
42652
+ "node_modules",
42653
+ "adhdev",
42654
+ "node_modules",
42655
+ "node-pty",
42656
+ "prebuilds",
42657
+ "win32-x64",
42658
+ "conpty.node"
42659
+ );
42660
+ function resolveStagedConptyPrebuildPath(stagedPrefix) {
42661
+ return path20.join(stagedPrefix, CONPTY_PREBUILD_RELATIVE_PATH);
42662
+ }
42663
+ function verifyStagedConptyPrebuild(stagedPrefix) {
42664
+ const conptyPath = resolveStagedConptyPrebuildPath(stagedPrefix);
42665
+ if (!fs14.existsSync(conptyPath)) {
42666
+ throw new Error(
42667
+ `Staged install is missing required native addon: ${conptyPath}. Aborting activation to prevent a daemon boot crash.`
42668
+ );
42669
+ }
42670
+ }
42651
42671
  function readPackageCliEntry(prefix, packageName, targetVersion) {
42652
42672
  const packageRoot = packageRootForPrefix(prefix, packageName);
42653
42673
  const packageJsonPath = path20.join(packageRoot, "package.json");
@@ -42792,6 +42812,7 @@ async function performWindowsAtomicUpgrade(options) {
42792
42812
  try {
42793
42813
  hooks.log(`Installing ${packageName}@${targetVersion} into inactive prefix ${stagedPrefix}`);
42794
42814
  await hooks.install(stagedPrefix, portableNode);
42815
+ verifyStagedConptyPrebuild(stagedPrefix);
42795
42816
  const stagedCliEntry = readPackageCliEntry(stagedPrefix, packageName, targetVersion);
42796
42817
  pinStagedShims(stagedPrefix, portableNode, stagedCliEntry);
42797
42818
  validateStagedCli(portableNode, stagedCliEntry, targetVersion);
@@ -42845,7 +42866,12 @@ async function performWindowsAtomicUpgrade(options) {
42845
42866
  function createDefaultWindowsAtomicHooks(options) {
42846
42867
  return {
42847
42868
  install: (stagedPrefix, portableNode) => {
42848
- const env = { ...options.env, ADHDEV_BOOTSTRAP: "1" };
42869
+ const env = {
42870
+ ...options.env,
42871
+ ADHDEV_BOOTSTRAP: "1",
42872
+ npm_config_build_from_source: "false",
42873
+ "npm_config_build-from-source": "false"
42874
+ };
42849
42875
  const pathKey = Object.keys(env).find((key2) => key2.toLowerCase() === "path") || "Path";
42850
42876
  env[pathKey] = `${path20.dirname(portableNode)};${env[pathKey] || ""}`;
42851
42877
  execFileSync4(portableNode, [