Resolves the channel this process is running from.
Whether this channel's updater is qunitx's to run.
The command that upgrades this channel: deno install, npm install -g, deno add, git pull.
updateArgv rendered as one line, for printing.
The observable state detect reads. Every field defaults to this process, and every field is injectable so each channel is reachable in a test without that install existing.
-
denoDir: string
An explicit
DENO_DIR, which relocates the module cache off its recognisable path. -
execPath: string
process.execPath: the compiled binary itself, or the node/deno that is running it. -
fileExists: (target: string) => boolean
Existence probe for the only filesystem question asked: which manifest sits above the install.
-
isDeno: boolean
Whether the Deno global is present, which is what separates a
deno compilebuild from a SEA. -
modulePath: string
Absolute path of a file inside the installed package —
undefinedinside a SEA bundle. -
platform: NodeJS.Platform
Path semantics to apply. Defaults to the host's.
| { kind: "jsr-launcher"; binaryPath: string; version: string; }
| { kind: "npm-global"; prefix: string; }
| { kind: "npm-local"; projectRoot: string; manifest: string; }
| { kind: "deno-project"; projectRoot: string; manifest: string; }
| { kind: "deno-cache"; entry: string; }
| { kind: "source"; entry: string; }
The install channel this process is running from — the one thing upgrade must get right,
since only one of them can replace itself.
Usage
import * as mod from "lib/commands/upgrade/channel.ts";