@cosmicdrift/kumiko-dev-server 0.417.0 → 0.419.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-dev-server",
3
- "version": "0.417.0",
3
+ "version": "0.419.0",
4
4
  "description": "Dev-tooling for Kumiko apps: local dev-server bootstrap (runDevApp), scaffolding. Its compose-stacks/env-schema subpaths are consumed at prod boot too — see @cosmicdrift/kumiko-server-runtime for the prod runner itself.",
5
5
  "license": "MIT",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -77,15 +77,15 @@
77
77
  "kumiko-upgrade": "./bin/kumiko-upgrade.ts"
78
78
  },
79
79
  "dependencies": {
80
- "@cosmicdrift/kumiko-bundled-features": "0.417.0",
81
- "@cosmicdrift/kumiko-feature-ast": "0.417.0",
82
- "@cosmicdrift/kumiko-framework": "0.417.0",
83
- "@cosmicdrift/kumiko-renderer": "0.417.0",
84
- "@cosmicdrift/kumiko-renderer-mail-html": "0.417.0",
85
- "@cosmicdrift/kumiko-guards": "0.417.0",
86
- "@cosmicdrift/kumiko-server-runtime": "0.417.0",
87
- "@cosmicdrift/kumiko-testing": "0.417.0",
88
- "@cosmicdrift/kumiko-types": "0.417.0",
80
+ "@cosmicdrift/kumiko-bundled-features": "0.419.0",
81
+ "@cosmicdrift/kumiko-feature-ast": "0.419.0",
82
+ "@cosmicdrift/kumiko-framework": "0.419.0",
83
+ "@cosmicdrift/kumiko-renderer": "0.419.0",
84
+ "@cosmicdrift/kumiko-renderer-mail-html": "0.419.0",
85
+ "@cosmicdrift/kumiko-guards": "0.419.0",
86
+ "@cosmicdrift/kumiko-server-runtime": "0.419.0",
87
+ "@cosmicdrift/kumiko-testing": "0.419.0",
88
+ "@cosmicdrift/kumiko-types": "0.419.0",
89
89
  "ts-morph": "^28.0.0",
90
90
  "zod": "^4.6.7"
91
91
  },
package/src/changes.json CHANGED
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "version": "0.418.0",
4
+ "type": "improvement",
5
+ "title": "Deploy Dockerfile runs bun on the build platform",
6
+ "detail": "The managed `deploy/Dockerfile` runs every bun step in a `--platform=$BUILDPLATFORM` stage. A new `deps` stage installs the server bundle's production dependencies with `--os=linux --cpu=<x64|arm64>` for the target, and the runtime stage only copies them. An amd64 image built on arm64 runners therefore never runs bun under QEMU, where it aborts. The managed public CI workflow builds `linux/arm64,linux/amd64`. Apps pick it up with `kumiko sync-managed --write`."
7
+ },
2
8
  {
3
9
  "version": "0.417.0",
4
10
  "type": "fix",
@@ -18,7 +18,8 @@ ARG BUILD_VERSION=dev
18
18
  ARG BUILD_TIME=unknown
19
19
 
20
20
  # ----- build: produces dist/ + dist-server/ ---------------------------------
21
- FROM oven/bun:${BUN_VERSION}-alpine AS build
21
+ # bun aborts under QEMU, so every bun step runs on the build host; the output is platform-neutral.
22
+ FROM --platform=$BUILDPLATFORM oven/bun:${BUN_VERSION}-alpine AS build
22
23
  WORKDIR /app
23
24
  {{#hasPrivateGhPackages}}
24
25
  # Registry auth for @cosmicdriftgamestudio: CI passes the token as the BuildKit
@@ -44,6 +45,17 @@ COPY . .
44
45
  RUN bun run build
45
46
  {{/installFromManifests}}
46
47
 
48
+ # ----- deps: production node_modules for the target CPU ---------------------
49
+ # Runs on the build host (bun aborts under QEMU); --os/--cpu fetch the target's
50
+ # native packages. `--frozen-lockfile` installs exactly the locked externals
51
+ # from the bun.lock kumiko-build wrote and fails on drift instead of resolving
52
+ # newer versions.
53
+ FROM --platform=$BUILDPLATFORM oven/bun:${BUN_VERSION}-alpine AS deps
54
+ ARG TARGETARCH
55
+ WORKDIR /app
56
+ COPY --from=build /app/dist-server ./
57
+ RUN bun install --production --frozen-lockfile --os=linux --cpu="$(case "$TARGETARCH" in amd64) echo x64 ;; arm64) echo arm64 ;; *) echo "unsupported TARGETARCH '$TARGETARCH'" >&2; exit 1 ;; esac)"
58
+
47
59
  # ----- runtime: bun-alpine, knows only the bundle artefact ------------------
48
60
  FROM oven/bun:${BUN_VERSION}-alpine AS runtime
49
61
  # Global ARGs are invisible inside a stage until re-declared — without this,
@@ -54,11 +66,9 @@ WORKDIR /app
54
66
 
55
67
  RUN addgroup -S app && adduser -S app -G app
56
68
 
57
- # Server bundle + its minimal package.json and the bun.lock kumiko-build wrote
58
- # next to it. `--frozen-lockfile` installs exactly the locked externals and
59
- # fails on drift instead of resolving newer versions.
69
+ # Server bundle + its minimal package.json; node_modules come from the deps stage.
60
70
  COPY --from=build --chown=app:app /app/dist-server ./
61
- RUN bun install --production --frozen-lockfile
71
+ COPY --from=deps --chown=app:app /app/node_modules ./node_modules
62
72
 
63
73
  # Client build (static assets) — served by runProdApp.staticDir.
64
74
  COPY --from=build --chown=app:app /app/dist ./dist
@@ -111,6 +111,9 @@ jobs:
111
111
  packages: write
112
112
  steps:
113
113
  - uses: actions/checkout@v7
114
+ - uses: docker/setup-qemu-action@v4
115
+ with:
116
+ platforms: amd64
114
117
  - uses: docker/setup-buildx-action@v4
115
118
  - uses: docker/login-action@v4
116
119
  with:
@@ -133,6 +136,6 @@ jobs:
133
136
  labels: ${{ steps.meta.outputs.labels }}
134
137
  cache-from: type=gha
135
138
  cache-to: type=gha,mode=max
136
- platforms: linux/arm64
139
+ platforms: linux/arm64,linux/amd64
137
140
  build-args: |
138
141
  BUILD_VERSION=${{ github.sha }}