@fungi.computer/computer 0.8.2 → 0.8.4
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/Dockerfile
CHANGED
|
@@ -60,10 +60,10 @@ COPY --from=terminal /opt/fungi/node_modules /opt/fungi/node_modules
|
|
|
60
60
|
COPY container/runtime-privileges.mjs /opt/fungi/
|
|
61
61
|
COPY --from=terminal /opt/fungi/runtime-privileges.node /opt/fungi/
|
|
62
62
|
COPY container/package.json container/computer-init.mjs container/computer-start.sh container/resource-bounds.mjs container/terminal-server.mjs container/terminal-runtime.mjs container/terminal-protocol.mjs /opt/fungi/
|
|
63
|
-
COPY container/terminal-assets/bashrc container/terminal-assets/git-prompt.sh /opt/fungi/terminal-assets/
|
|
63
|
+
COPY container/terminal-assets/bashrc container/terminal-assets/git-prompt.sh container/terminal-assets/global-tools.sh /opt/fungi/terminal-assets/
|
|
64
64
|
RUN chmod -R a+rX /opt/fungi \
|
|
65
65
|
&& printf '\n. /opt/fungi/terminal-assets/bashrc\n' >> /etc/bash.bashrc \
|
|
66
|
-
&& printf '. /opt/fungi/terminal-assets/bashrc\n' > /etc/profile.d/fungi-terminal.sh
|
|
66
|
+
&& printf '. /opt/fungi/terminal-assets/global-tools.sh\n. /opt/fungi/terminal-assets/bashrc\n' > /etc/profile.d/fungi-terminal.sh
|
|
67
67
|
|
|
68
68
|
# No customer process can invoke a setuid/setgid helper, including fusermount.
|
|
69
69
|
# FUSE is mounted while init is root, before either runtime listener opens.
|
|
@@ -21,4 +21,13 @@ chown "$uid:$uid" /workspace
|
|
|
21
21
|
ulimit -Su "$pids_max"
|
|
22
22
|
ulimit -Hu "$pids_max"
|
|
23
23
|
export HOME=/workspace
|
|
24
|
+
# The image's npm and pnpm prefixes are root-owned. Global installs go into
|
|
25
|
+
# user-owned folders in the persistent home; npm and pnpm create them on first
|
|
26
|
+
# use as this UID. Every Computer process (computerd exec, terminal) inherits
|
|
27
|
+
# this environment. terminal-assets/global-tools.sh (sourced from
|
|
28
|
+
# /etc/profile.d) restores the PATH entries for login shells, because Debian's
|
|
29
|
+
# /etc/profile resets PATH.
|
|
30
|
+
export NPM_CONFIG_PREFIX="$HOME/.npm-global"
|
|
31
|
+
export PNPM_HOME="$HOME/.local/share/pnpm"
|
|
32
|
+
export PATH="$NPM_CONFIG_PREFIX/bin:$PNPM_HOME/bin:$PATH"
|
|
24
33
|
exec node /opt/fungi/computer-init.mjs
|
|
@@ -33,3 +33,7 @@ proof checks real cells at wide and narrow widths, connection ordering, retries
|
|
|
33
33
|
and theme replay. Computerd command execution is separate and receives no
|
|
34
34
|
welcome bytes. Local image proof checks the prompt and absence of art/hints on
|
|
35
35
|
an interactive PTY, plus quiet non-interactive startup.
|
|
36
|
+
|
|
37
|
+
`global-tools.sh` restores the user-owned npm and pnpm global folders on PATH
|
|
38
|
+
for login shells (Debian's `/etc/profile` resets PATH); `computer-start.sh` sets
|
|
39
|
+
`NPM_CONFIG_PREFIX` and `PNPM_HOME` for every Computer process.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Debian's /etc/profile resets PATH for login shells, dropping the user-owned
|
|
2
|
+
# global tool folders computer-start.sh put on every Computer process's PATH.
|
|
3
|
+
# Restore them (idempotently) so `npm install -g` and `pnpm add -g` binaries
|
|
4
|
+
# resolve in login shells too, interactive or not.
|
|
5
|
+
[ -n "${NPM_CONFIG_PREFIX:-}" ] || return 0
|
|
6
|
+
case ":$PATH:" in
|
|
7
|
+
*":$NPM_CONFIG_PREFIX/bin:"*) ;;
|
|
8
|
+
*) PATH="$NPM_CONFIG_PREFIX/bin:${PNPM_HOME:+$PNPM_HOME/bin:}$PATH" ;;
|
|
9
|
+
esac
|
|
10
|
+
export PATH
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/computer",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"author": "Levi <levi@technomancy.dev>",
|
|
5
5
|
"description": "Cloudflare Computer host for one durable Fungi Computer",
|
|
6
6
|
"type": "module",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"tsx": "4.23.12",
|
|
78
78
|
"typescript": "5.9.3",
|
|
79
79
|
"uuid": "11.1.1",
|
|
80
|
-
"wrangler": "4.
|
|
80
|
+
"wrangler": "4.159.0"
|
|
81
81
|
},
|
|
82
82
|
"botanical": {
|
|
83
83
|
"role": "runtime",
|