@@ -208,9 +208,12 @@ COPY --chown=node:node app-templates/ /home/node/.cheatcode-template-manifests/
208208COPY --chown=node:node app-generators/ /home/node/.cheatcode-app-generators/
209209
210210# The generators provide source files only. Reviewed manifests and lockfiles are
211- # copied over them, then fetched into the node user's pnpm store so project creation
212- # can install the exact dependency graph offline. The Expo template artifact itself
213- # is pinned: create-expo-app's mutable "default" alias is intentionally not used.
211+ # copied over them, then the exact dependency graph is installed into immutable,
212+ # sandbox-local runtimes. Persistent /workspace is Daytona object-store FUSE: it is
213+ # the right home for user source, but copying dependency trees there is both slow and
214+ # non-atomic. The source-only templates stay separate so project creation copies only
215+ # editable files. The Expo template artifact itself is pinned: create-expo-app's
216+ # mutable "default" alias is intentionally not used.
214217ARG EXPO_TEMPLATE_VERSION=57.0.6
215218ARG EXPO_TEMPLATE_SHA256=4c2a276f05db27f4a4dfaa326123e72be33d7ad6878fdd46b8df7eb3376def3b
216219
@@ -222,13 +225,16 @@ RUN set -eux; \
222225 cp /home/node/.cheatcode-template-manifests/next/package.json /home/node/cheatcode-next-template/package.json; \
223226 cp /home/node/.cheatcode-template-manifests/next/pnpm-lock.yaml /home/node/cheatcode-next-template/pnpm-lock.yaml; \
224227 cp /home/node/.cheatcode-template-manifests/next/pnpm-workspace.yaml /home/node/cheatcode-next-template/pnpm-workspace.yaml; \
228+ cp /home/node/.cheatcode-template-manifests/next/next.config.ts /home/node/cheatcode-next-template/next.config.ts; \
225229 rm -rf \
226230 /home/node/cheatcode-next-template/.next \
227231 /home/node/cheatcode-next-template/node_modules \
228232 /home/node/cheatcode-next-template/AGENTS.md \
229233 /home/node/cheatcode-next-template/CLAUDE.md; \
230- cd /home/node/cheatcode-next-template; \
231- pnpm fetch --frozen-lockfile; \
234+ mkdir -p /home/node/.cheatcode/app-runtimes; \
235+ cp -a /home/node/cheatcode-next-template /home/node/.cheatcode/app-runtimes/next; \
236+ cd /home/node/.cheatcode/app-runtimes/next; \
237+ pnpm install --frozen-lockfile; \
232238 cd /workspace; \
233239 curl -fsSL \
234240 "https://registry.npmjs.org/expo-template-default/-/expo-template-default-${EXPO_TEMPLATE_VERSION}.tgz" \
@@ -246,7 +252,9 @@ RUN set -eux; \
246252 cd /home/node/cheatcode-expo-template; \
247253 node -e 'const fs=require("node:fs");const j=JSON.parse(fs.readFileSync("app.json","utf8"));j.expo??={};j.expo.name="cheatcode-expo-template";j.expo.slug="cheatcode-expo-template";j.expo.web={...(j.expo.web??{}),bundler:"metro",output:"single"};fs.writeFileSync("app.json",JSON.stringify(j,null,2)+"\n ")' ; \
248254 rm -rf .git .expo node_modules package-lock.json AGENTS.md CLAUDE.md .claude; \
249- pnpm fetch --frozen-lockfile; \
255+ cp -a /home/node/cheatcode-expo-template /home/node/.cheatcode/app-runtimes/expo; \
256+ cd /home/node/.cheatcode/app-runtimes/expo; \
257+ pnpm install --frozen-lockfile; \
250258 cd /workspace; \
251259 rm -rf \
252260 /tmp/expo-template-default.tgz \
0 commit comments