From 3fc46bc93d08760dd5229c088a76c5a7b686a8fe Mon Sep 17 00:00:00 2001 From: willbot Date: Wed, 22 Jul 2026 14:19:56 +0200 Subject: [PATCH] fix(prisma-cloud): carry the effect platform packages the alchemy CLI requires MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The deploy path runs the alchemy CLI, whose command tree imports the Cloudflare provider namespace and platform services at load time — requiring @effect/platform-node and @effect/platform-bun. alchemy declares both as optional peerDependencies, so a package-manager install of an app depending only on @prisma/composer-prisma-cloud never installs them, and prisma-composer deploy dies before planning anything: Cannot find module "@effect/platform-node/NodeServices" from ".../node_modules/alchemy/src/Cloudflare/Workers/WorkerBridge.ts" (then the @effect/platform-bun/BunRuntime twin from Util/PlatformServices). This workspace never sees the failure because pnpm resolves the optional peers into its own tree, and any app developed inside a checkout inherits them through parent-directory module resolution — only a standalone install hits it, which is exactly the consumer this package is for. Surfaced by the open-chat port (its FRICTION.md #11), which had to declare both packages as app devDependencies to deploy at all. Declaring them as real dependencies here puts the knowledge where it belongs: this package pins alchemy exactly and always drives its CLI, so alchemy's "optional" peers are, for every consumer of this package, mandatory. Versions are the ones the workspace already resolves. Co-Authored-By: Claude Fable 5 Signed-off-by: willbot Signed-off-by: Will Madden --- .../composer-prisma-cloud/package.json | 2 ++ pnpm-lock.yaml | 31 ++++++++----------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/packages/9-public/composer-prisma-cloud/package.json b/packages/9-public/composer-prisma-cloud/package.json index 69a322cd..3d9c7883 100644 --- a/packages/9-public/composer-prisma-cloud/package.json +++ b/packages/9-public/composer-prisma-cloud/package.json @@ -27,6 +27,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { + "@effect/platform-bun": "4.0.0-beta.97", + "@effect/platform-node": "4.0.0-beta.92", "@prisma-next/cli": "0.15.0", "@prisma-next/config-loader": "0.15.0", "@prisma-next/contract": "0.15.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b75f402..e85e963b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -922,6 +922,12 @@ importers: packages/9-public/composer-prisma-cloud: dependencies: + '@effect/platform-bun': + specifier: 4.0.0-beta.97 + version: 4.0.0-beta.97(effect@4.0.0-beta.93) + '@effect/platform-node': + specifier: 4.0.0-beta.92 + version: 4.0.0-beta.92(effect@4.0.0-beta.93)(ioredis@5.11.1) '@prisma-next/cli': specifier: 0.15.0 version: 0.15.0(typanion@3.14.0)(typescript@6.0.3) @@ -4973,7 +4979,6 @@ snapshots: transitivePeerDependencies: - bufferutil - utf-8-validate - optional: true '@effect/platform-node@4.0.0-beta.92(effect@4.0.0-beta.97)(ioredis@5.11.1)': dependencies: @@ -5220,8 +5225,7 @@ snapshots: '@img/sharp-win32-x64@0.34.5': optional: true - '@ioredis/commands@1.10.0': - optional: true + '@ioredis/commands@1.10.0': {} '@jridgewell/sourcemap-codec@1.5.5': {} @@ -6652,8 +6656,7 @@ snapshots: closest-match@1.3.3: {} - cluster-key-slot@1.1.1: - optional: true + cluster-key-slot@1.1.1: {} code-excerpt@4.0.0: dependencies: @@ -6686,7 +6689,6 @@ snapshots: debug@4.4.3: dependencies: ms: 2.1.3 - optional: true defu@6.1.7: {} @@ -6993,7 +6995,6 @@ snapshots: standard-as-callback: 2.1.0 transitivePeerDependencies: - supports-color - optional: true is-core-module@2.16.2: dependencies: @@ -7207,8 +7208,7 @@ snapshots: braces: 3.0.3 picomatch: 2.3.2 - mime@4.1.0: - optional: true + mime@4.1.0: {} mimic-fn@2.1.0: {} @@ -7216,8 +7216,7 @@ snapshots: minimist@1.2.8: {} - ms@2.1.3: - optional: true + ms@2.1.3: {} msgpackr-extract@3.0.4: dependencies: @@ -7479,13 +7478,11 @@ snapshots: dependencies: resolve: 1.22.12 - redis-errors@1.2.0: - optional: true + redis-errors@1.2.0: {} redis-parser@3.0.0: dependencies: redis-errors: 1.2.0 - optional: true regex-recursion@6.0.2: dependencies: @@ -7703,8 +7700,7 @@ snapshots: stackback@0.0.2: {} - standard-as-callback@2.1.0: - optional: true + standard-as-callback@2.1.0: {} std-env@4.2.0: {} @@ -7850,8 +7846,7 @@ snapshots: undici@7.28.0: {} - undici@8.7.0: - optional: true + undici@8.7.0: {} unenv@2.0.0-rc.24: dependencies: