runtime: a run subcommand to run a module entrypoint to completion (ADR 0052) #6

Merged
jschoubben merged 7 commits from feat/run-once-entry into main 2026-09-13 09:16:12 +00:00
Showing only changes of commit 78257cf151 - Show all commits
+10
View File
@@ -28,6 +28,16 @@ COPY package.json package-lock.json ./
# builds itself on install, which is what lets it be named by a git URL rather than fetched from a
# package registry this mesh does not yet run.
RUN npm install --no-audit --no-fund
# **And then compile the toolkit, because npm did not.** It declares a `prepare` script, which is
# the hook npm is supposed to run after installing a package from git — and this npm does not run
# it, so the package arrives as sources with every one of its entry points pointing at a compiled
# directory that is not there. The compile is therefore done here, explicitly: install the toolkit's
# own build dependencies inside it, build it, then drop them again so they do not travel into the
# image. Doing it by hand rather than relying on the hook is also the honest arrangement — a build
# that silently depended on a hook firing would break the day it stopped, in the same invisible way.
RUN npm --prefix node_modules/@novox/mesh-sdk install --no-audit --no-fund \
&& npm --prefix node_modules/@novox/mesh-sdk run build \
&& npm --prefix node_modules/@novox/mesh-sdk prune --omit=dev
COPY tsconfig.json ./
COPY src ./src
RUN npm run build