@adhdev/daemon-core 0.9.76-rc.2 → 0.9.76-rc.3
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 +5 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/router.ts +5 -0
package/dist/index.js
CHANGED
|
@@ -20789,6 +20789,10 @@ async function maybeRunDaemonUpgradeHelperFromEnv() {
|
|
|
20789
20789
|
// src/commands/router.ts
|
|
20790
20790
|
var fs10 = __toESM(require("fs"));
|
|
20791
20791
|
var CHANNEL_NPM_TAG = { stable: "latest", preview: "next" };
|
|
20792
|
+
var CHANNEL_SERVER_URL = {
|
|
20793
|
+
stable: "https://api.adhf.dev",
|
|
20794
|
+
preview: "https://api-preview.adhf.dev"
|
|
20795
|
+
};
|
|
20792
20796
|
function normalizeReleaseChannel(value) {
|
|
20793
20797
|
if (typeof value !== "string") return null;
|
|
20794
20798
|
const normalized = value.trim().toLowerCase();
|
|
@@ -21485,6 +21489,7 @@ var DaemonCommandRouter = class {
|
|
|
21485
21489
|
const npmTag = CHANNEL_NPM_TAG[channel];
|
|
21486
21490
|
const latest = String(execNpmCommandSync(["view", `${pkgName}@${npmTag}`, "version"], { encoding: "utf-8", timeout: 1e4 }, npmSurface)).trim();
|
|
21487
21491
|
LOG.info("Upgrade", `Latest ${pkgName}@${npmTag}: v${latest}`);
|
|
21492
|
+
updateConfig({ updateChannel: channel, serverUrl: CHANNEL_SERVER_URL[channel] });
|
|
21488
21493
|
let currentInstalled = null;
|
|
21489
21494
|
try {
|
|
21490
21495
|
const currentJson = String(execNpmCommandSync(["ls", "-g", pkgName, "--depth=0", "--json"], {
|