@opencode/browse 0.0.6-dev.17 → 0.0.6-dev.19

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.
@@ -8,26 +8,25 @@ import {
8
8
  compareVersions,
9
9
  readCurrent,
10
10
  writeCurrent,
11
- readState,
12
11
  updateState,
13
12
  npmRuntime,
14
- autoUpdateOverride,
13
+ effectiveMode,
15
14
  registryUrl,
16
15
  fetchPublished,
17
16
  installVersion,
18
17
  pruneVersions,
19
18
  switchVersion
20
- } from "./main-g5mke6rn.mjs";
19
+ } from "./main-yd50d95g.mjs";
21
20
  import {
22
21
  Service,
23
22
  layerFetch,
24
23
  restartRelay,
25
24
  startManagedRelay
26
- } from "./main-3qpkwaa7.mjs";
27
- import"./main-y7c1atbf.mjs";
28
- import"./main-4bht27ry.mjs";
25
+ } from "./main-8a245rm1.mjs";
26
+ import"./main-75rdz6bc.mjs";
27
+ import"./main-ts9jjqs8.mjs";
29
28
 
30
- // src/runtime-update.ts
29
+ // src/update/runtime-update.ts
31
30
  import { Effect } from "effect";
32
31
  import { existsSync } from "node:fs";
33
32
  var log = (line) => process.stdout.write(line + `
@@ -129,7 +128,7 @@ async function runNpmUpdate(args, layout) {
129
128
  const current = readCurrent(lay);
130
129
  const refused = await switchTo(lay, published.version, { previous: current.version, force: args.includes("--force") });
131
130
  if (refused) {
132
- const automatic = (autoUpdateOverride() ?? readState(lay).mode ?? "on") === "on";
131
+ const automatic = effectiveMode(lay) === "on";
133
132
  log(`! Installed ${published.version}, but the relay didn't restart (${refused}).`);
134
133
  log(automatic ? " It switches to the new version by itself once no agent is using the browser." : ` When no agent is using the browser, run \`${cliCommand("update")}\` again.`);
135
134
  return true;