diff --git a/forge-ui/Dockerfile b/forge-ui/Dockerfile index 89b3c18..2e48f76 100644 --- a/forge-ui/Dockerfile +++ b/forge-ui/Dockerfile @@ -50,11 +50,11 @@ RUN --mount=type=tmpfs,target=/root/.bun/install/cache \ # Apply patches explicitly using POSIX GNU patch RUN cd opencode \ - && patch -p1 -d node_modules/@ai-sdk/xai < patches/@ai-sdk-xai@3.0.82.patch \ - && patch -p1 -d node_modules/@npmcli/agent < patches/@npmcli-agent@4.0.0.patch \ - && patch -p1 -d node_modules/@silvia-odwyer/photon-node < patches/@silvia-odwyer-photon-node@0.3.4.patch \ - && patch -p1 -d node_modules/@standard-community/standard-openapi < patches/@standard-community-standard-openapi@0.2.9.patch \ - && patch -p1 -d node_modules/solid-js < patches/solid-js@1.9.10.patch + && patch -p1 -l -d node_modules/@ai-sdk/xai < patches/@ai-sdk-xai@3.0.82.patch \ + && patch -p1 -l -d node_modules/@npmcli/agent < patches/@npmcli-agent@4.0.0.patch \ + && patch -p1 -l -d node_modules/@silvia-odwyer/photon-node < patches/@silvia-odwyer-photon-node@0.3.4.patch \ + && patch -p1 -l -d node_modules/@standard-community/standard-openapi < patches/@standard-community-standard-openapi@0.2.9.patch \ + && patch -p1 -l -d node_modules/solid-js < patches/solid-js@1.9.10.patch # Verify what's present so the log gives us a clear before/after for the # packages bun complained about. diff --git a/opencode/Dockerfile.forge b/opencode/Dockerfile.forge index 76b6898..5ba7567 100644 --- a/opencode/Dockerfile.forge +++ b/opencode/Dockerfile.forge @@ -53,11 +53,11 @@ RUN --mount=type=tmpfs,target=/root/.bun/install/cache \ bun install --no-save || bun install --no-save # Apply patches explicitly using POSIX GNU patch for 100% NAS/cloud/mac filesystem compatibility -RUN patch -p1 -d node_modules/@ai-sdk/xai < patches/@ai-sdk-xai@3.0.82.patch \ - && patch -p1 -d node_modules/@npmcli/agent < patches/@npmcli-agent@4.0.0.patch \ - && patch -p1 -d node_modules/@silvia-odwyer/photon-node < patches/@silvia-odwyer-photon-node@0.3.4.patch \ - && patch -p1 -d node_modules/@standard-community/standard-openapi < patches/@standard-community-standard-openapi@0.2.9.patch \ - && patch -p1 -d node_modules/solid-js < patches/solid-js@1.9.10.patch +RUN patch -p1 -l -d node_modules/@ai-sdk/xai < patches/@ai-sdk-xai@3.0.82.patch \ + && patch -p1 -l -d node_modules/@npmcli/agent < patches/@npmcli-agent@4.0.0.patch \ + && patch -p1 -l -d node_modules/@silvia-odwyer/photon-node < patches/@silvia-odwyer-photon-node@0.3.4.patch \ + && patch -p1 -l -d node_modules/@standard-community/standard-openapi < patches/@standard-community-standard-openapi@0.2.9.patch \ + && patch -p1 -l -d node_modules/solid-js < patches/solid-js@1.9.10.patch # Bun's isolated linker doesn't fully materialise every transitive dep into # per-workspace-member node_modules — registry deps often end up only at diff --git a/opencode/patches/@silvia-odwyer-photon-node@0.3.4.patch b/opencode/patches/@silvia-odwyer-photon-node@0.3.4.patch index f726789..22aae8e 100644 --- a/opencode/patches/@silvia-odwyer-photon-node@0.3.4.patch +++ b/opencode/patches/@silvia-odwyer-photon-node@0.3.4.patch @@ -274,8 +274,8 @@ index 8f4144d..29a964a 100644 const offset = table.grow(4); table.set(0, undefined); @@ -4509,7 +4510,8 @@ module.exports.__wbindgen_init_externref_table = function() { - ; - }; + ; + }; -const path = require('path').join(__dirname, 'photon_rs_bg.wasm'); +// Allow opencode's Bun compiled binary to point photon-node at its embedded wasm asset.