electrobun 2.0.1-beta.2 → 2.0.1-beta.22
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/README.md +12 -10
- package/bin/electrobun.cjs +12 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Electrobun npm bootstrap
|
|
2
2
|
|
|
3
|
-
The `electrobun` npm package is a small
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
all commands to `hutch electrobun`.
|
|
3
|
+
The `electrobun` npm package is a small Hutch entry point for npm, pnpm, Yarn,
|
|
4
|
+
and Bun users. It contains no Electrobun runtime or SDK. The `electrobun`
|
|
5
|
+
command installs Hutch into `~/.hutch` (override with `HUTCH_HOME`) when
|
|
6
|
+
necessary and delegates all commands to `hutch electrobun`.
|
|
7
7
|
|
|
8
8
|
Create a project from the current stable template catalog:
|
|
9
9
|
|
|
@@ -20,14 +20,16 @@ npx electrobun init --beta
|
|
|
20
20
|
The npm bootstrap ships under the same release version as Electrobun, but it
|
|
21
21
|
does not contain or select the runtime by itself. An application's exact
|
|
22
22
|
Electrobun version is selected in `hutch.config.ts`; Hutch downloads the
|
|
23
|
-
matching runtime and SDK into the shared `~/.
|
|
24
|
-
into the project's `.hutch/devkit` sysroot. Installing a
|
|
25
|
-
uses stable templates unless `init` receives `--beta`.
|
|
23
|
+
matching runtime and SDK into the shared `~/.hutch/releases/electrobun` store
|
|
24
|
+
and projects the SDKs into the project's `.hutch/devkit` sysroot. Installing a
|
|
25
|
+
beta bootstrap still uses stable templates unless `init` receives `--beta`.
|
|
26
26
|
|
|
27
27
|
`DASH_RELEASE_OFFLINE=1` prevents this bootstrap from downloading a missing
|
|
28
|
-
Hutch installation. An already installed Hutch is still invoked,
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
Hutch installation. An already installed Hutch is still invoked, but
|
|
29
|
+
`electrobun init` requires network access for the current template catalog and
|
|
30
|
+
selected template. Builds can run without network access only when every exact
|
|
31
|
+
release and managed toolchain they require is already installed. The flag does
|
|
32
|
+
not put npm or another project package manager into offline mode.
|
|
31
33
|
|
|
32
34
|
You can install Hutch directly from <https://hutch.blackboard.sh> and run the
|
|
33
35
|
same commands without npm:
|
package/bin/electrobun.cjs
CHANGED
|
@@ -11,7 +11,9 @@ const installerBaseUrl = "https://hutch.blackboard.sh/hutch";
|
|
|
11
11
|
const maxInstallerBytes = 1024 * 1024;
|
|
12
12
|
const maxInstallerRedirects = 5;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// Hutch owns a separate release-channel contract: its stable executable is
|
|
15
|
+
// still published under Hutch's "production" channel.
|
|
16
|
+
function normalizeHutchChannel(value) {
|
|
15
17
|
if (value === "stable") return "production";
|
|
16
18
|
if (value === "production" || value === "canary") return value;
|
|
17
19
|
return null;
|
|
@@ -19,7 +21,7 @@ function normalizeChannel(value) {
|
|
|
19
21
|
|
|
20
22
|
function hutchChannel(environment) {
|
|
21
23
|
for (const key of ["ELECTROBUN_HUTCH_CHANNEL", "HUTCH_ACTIVE_CHANNEL"]) {
|
|
22
|
-
const selected =
|
|
24
|
+
const selected = normalizeHutchChannel(environment[key]);
|
|
23
25
|
if (selected) return selected;
|
|
24
26
|
}
|
|
25
27
|
return "production";
|
|
@@ -39,11 +41,16 @@ function hutchBinaryPath(channel, environment, platform, userHome) {
|
|
|
39
41
|
return environment.ELECTROBUN_HUTCH_BINARY;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
|
-
const dashHome = environment.DASH_HOME || path.join(userHome, ".dash");
|
|
43
|
-
const command = channel === "canary" ? "hutch-canary" : "hutch";
|
|
44
44
|
const pathApi = platform === "win32" ? path.win32 : path.posix;
|
|
45
|
+
// HUTCH_HOME is Hutch's own home; DASH_HOME stays honored as a deprecated
|
|
46
|
+
// fallback for Dash Desktop and older setups.
|
|
47
|
+
const hutchHome =
|
|
48
|
+
environment.HUTCH_HOME ||
|
|
49
|
+
environment.DASH_HOME ||
|
|
50
|
+
pathApi.join(userHome, ".hutch");
|
|
51
|
+
const command = channel === "canary" ? "hutch-canary" : "hutch";
|
|
45
52
|
return pathApi.join(
|
|
46
|
-
|
|
53
|
+
hutchHome,
|
|
47
54
|
"bin",
|
|
48
55
|
`${command}${platform === "win32" ? ".exe" : ""}`,
|
|
49
56
|
);
|