@deployfoundation/foundation-deploy 0.2.50 → 0.2.51

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.
@@ -20,6 +20,8 @@
20
20
  # playwright-core 1.63.0 (exact pins + frozen lockfile in
21
21
  # packages/infra/agent-image/open-slide/), whose Chrome Headless Shell
22
22
  # build is pinned by the playwright-core version
23
+ # - Node.js 24.22.1 (LTS) with npm, and pnpm through corepack, for the
24
+ # repositories the agent clones and tests (see the node-provider stage)
23
25
  #
24
26
  # Secrets bootstrap: the container receives ONE pointer env var,
25
27
  # RUNTIME_SECRET_ID. At start, server.ts fetches that JSON secret from Secrets
@@ -40,6 +42,9 @@ ARG GH_VERSION=2.97.0
40
42
  # no ECR access; a deploy pipeline can override it with a mirrored tag to stay
41
43
  # clear of Docker Hub's anonymous rate limit.
42
44
  ARG BUN_IMAGE=oven/bun:1.4.0-slim
45
+ # NODE_IMAGE: where the real Node.js comes from (node-provider stage). AWS's
46
+ # mirror of the Docker official image, like golang below.
47
+ ARG NODE_IMAGE=public.ecr.aws/docker/library/node:24.22.1-trixie-slim
43
48
  # GH_IMAGE: where the gh BINARY comes from. The default names the `gh-source`
44
49
  # stage below, so a local build compiles it; an override points at a prebuilt
45
50
  # image, and under BuildKit an unreferenced stage never runs — which takes the
@@ -129,6 +134,15 @@ COPY skills/slides/export_deck.mjs skills/slides/starter.tsx ./
129
134
  # below is what makes the choice load-bearing.
130
135
  FROM ${GH_IMAGE} AS gh-provider
131
136
 
137
+ # --- Node.js (repositories the agent works in) -------------------------------
138
+ # The bun base ships only Bun's `node` shim (/usr/local/bun-node-fallback-bin),
139
+ # which refuses real Node invocations ("Missing script to execute"). Turns in a
140
+ # Node repository then began by downloading and unpacking a Node tarball before
141
+ # they could typecheck or test anything (Olivia, every PR turn, 2026-10). The
142
+ # runtime stage copies the official build's binary and its bundled npm and
143
+ # corepack from here; nothing else from this image is used.
144
+ FROM ${NODE_IMAGE} AS node-provider
145
+
132
146
  # --- runtime ----------------------------------------------------------------
133
147
  FROM ${BUN_IMAGE}
134
148
 
@@ -142,8 +156,12 @@ ARG FOUNDATION_GITHUB_APP_ID=0
142
156
  # credential probe checks — without this pointer the omp Bedrock provider
143
157
  # refuses with "No API key found". The real IMDS control is the tool policy
144
158
  # denying 169.254.169.254, not an env var a raw curl could ignore.
159
+ #
160
+ # No NODE_ENV=production: nothing in Foundation reads it (the install below
161
+ # passes --production itself), and the agent's shell inherits the container
162
+ # env, so `pnpm install` and `npm install` in a cloned repository skipped its
163
+ # devDependencies and every typecheck or test then failed on missing modules.
145
164
  ENV AWS_EC2_METADATA_SERVICE_ENDPOINT=http://169.254.169.254 \
146
- NODE_ENV=production \
147
165
  PYTHONDONTWRITEBYTECODE=1 \
148
166
  PYTHONUNBUFFERED=1 \
149
167
  # omp env sheet: relocate the agent base to the baked container dir
@@ -239,6 +257,23 @@ RUN chmod 0755 /opt/sky/bin/export_deck
239
257
  ENV OPEN_SLIDE_HOME=/opt/open-slide \
240
258
  PLAYWRIGHT_BROWSERS_PATH=/opt/open-slide/browsers
241
259
 
260
+ # --- Node.js, npm and pnpm (node-provider stage) -----------------------------
261
+ # /usr/local/bin precedes the bun base's fallback directory on PATH, so `node`
262
+ # is the real binary from here on; the build fails if it is not. pnpm is a
263
+ # corepack shim: it runs the version a repository's `packageManager` names,
264
+ # fetched on first use into the runtime user's cache, so no repository's pin is
265
+ # baked into the product. The prompt corepack shows before that fetch would
266
+ # stall a non-interactive shell.
267
+ COPY --from=node-provider /usr/local/bin/node /usr/local/bin/node
268
+ COPY --from=node-provider /usr/local/lib/node_modules /usr/local/lib/node_modules
269
+ RUN ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
270
+ && ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx \
271
+ && ln -s ../lib/node_modules/corepack/dist/corepack.js /usr/local/bin/corepack \
272
+ && corepack enable --install-directory /usr/local/bin pnpm \
273
+ && test "$(command -v node)" = /usr/local/bin/node \
274
+ && node --version && npm --version && corepack --version
275
+ ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
276
+
242
277
  # /opt/sky/bin FIRST so `gh` and `aws` resolve to the wrappers, never the real
243
278
  # binaries.
244
279
  ENV PATH="/opt/sky/bin:${PATH}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deployfoundation/foundation-deploy",
3
- "version": "0.2.50",
3
+ "version": "0.2.51",
4
4
  "description": "Deploys one Foundation instance from a published, signed release: the CDK app and the deploy tool.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,