@prisma/composer 0.30.0-dev.3 → 0.30.0-dev.4
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/dist/{app-config-BqBRS3nH-Cskusz-T.d.mts → app-config-TNPB00yf-2mJwfWXH.d.mts} +4 -4
- package/dist/{app-config-BqBRS3nH-Cskusz-T.d.mts.map → app-config-TNPB00yf-2mJwfWXH.d.mts.map} +1 -1
- package/dist/config-DFOOWMTu.d.mts +1 -0
- package/dist/config.d.mts +2 -2
- package/dist/control.d.mts +4 -4
- package/dist/control.mjs +3 -3
- package/dist/control.mjs.map +1 -1
- package/dist/deploy-DFOOWMTu.d.mts +1 -0
- package/dist/deploy.d.mts +2 -2
- package/dist/{deployment-summary-CU-eVvJM-J6GE7DdU.d.mts → deployment-summary-CU-eVvJM-BesRnvG4.d.mts} +3 -3
- package/dist/{deployment-summary-CU-eVvJM-J6GE7DdU.d.mts.map → deployment-summary-CU-eVvJM-BesRnvG4.d.mts.map} +1 -1
- package/dist/{dev-CBkh5DwC-CD46j8gr.mjs → dev-DbmjkSa6-CkHcovbU.mjs} +4 -4
- package/dist/{dev-CBkh5DwC-CD46j8gr.mjs.map → dev-DbmjkSa6-CkHcovbU.mjs.map} +1 -1
- package/dist/{execute-deploy-destroy-BPQ3WWfI-CvJnzzo6.mjs → execute-deploy-destroy-UKk_5-qQ-COVTI17n.mjs} +3 -3
- package/dist/{execute-deploy-destroy-BPQ3WWfI-CvJnzzo6.mjs.map → execute-deploy-destroy-UKk_5-qQ-COVTI17n.mjs.map} +1 -1
- package/dist/{execute-dev-DJxCNaiQ-BN2_izeM.mjs → execute-dev-_A1IRF4b-DAOnQ-OX.mjs} +6 -6
- package/dist/{execute-dev-DJxCNaiQ-BN2_izeM.mjs.map → execute-dev-_A1IRF4b-DAOnQ-OX.mjs.map} +1 -1
- package/dist/{execute-log-DTqRH_lb-Bxk4H-f9.mjs → execute-log-DsnSZiUz-YOdJfPuE.mjs} +3 -3
- package/dist/{execute-log-DTqRH_lb-Bxk4H-f9.mjs.map → execute-log-DsnSZiUz-YOdJfPuE.mjs.map} +1 -1
- package/dist/local-target.d.mts +1 -1
- package/dist/nextjs-control.d.mts +3 -3
- package/dist/node-control.d.mts +3 -3
- package/dist/report.d.mts +3 -3
- package/package.json +10 -10
- package/skills/prisma-composer-core-concepts/SKILL.md +8 -9
- package/dist/config-Du9pXwQX.d.mts +0 -1
- package/dist/deploy-Du9pXwQX.d.mts +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
|
|
2
2
|
import { t as DEV_DIR } from "./app-config-CGJHcFb--CIEFCG4V.mjs";
|
|
3
|
-
import { a as toStructured, o as notOk, s as ok } from "./dev-
|
|
3
|
+
import { a as toStructured, o as notOk, s as ok } from "./dev-DbmjkSa6-CkHcovbU.mjs";
|
|
4
4
|
import { r as resolveLocalTargets } from "./local-target-BUZG9uLx.mjs";
|
|
5
5
|
import { t as resolveAppIdentity } from "./pipeline-B-vJNch3-PBDKc8cX.mjs";
|
|
6
6
|
import { t as withEmulatorRetry } from "./emulator-retry-CV8rl69G-BgUzkxc-.mjs";
|
|
7
7
|
import * as path$1 from "node:path";
|
|
8
|
-
//#region ../../0-framework/3-tooling/cli/dist/execute-log-
|
|
8
|
+
//#region ../../0-framework/3-tooling/cli/dist/execute-log-DsnSZiUz.mjs
|
|
9
9
|
/**
|
|
10
10
|
* The log executor — run-log.ts's attach-and-tail (config → localTarget →
|
|
11
11
|
* container → attach → logs) with console and signal handling removed: the
|
|
@@ -154,4 +154,4 @@ async function executeLog(input, deps, cwd) {
|
|
|
154
154
|
//#endregion
|
|
155
155
|
export { LOG_QUEUE_LIMIT, executeLog };
|
|
156
156
|
|
|
157
|
-
//# sourceMappingURL=execute-log-
|
|
157
|
+
//# sourceMappingURL=execute-log-DsnSZiUz-YOdJfPuE.mjs.map
|
package/dist/{execute-log-DTqRH_lb-Bxk4H-f9.mjs.map → execute-log-DsnSZiUz-YOdJfPuE.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-log-
|
|
1
|
+
{"version":3,"file":"execute-log-DsnSZiUz-YOdJfPuE.mjs","names":["path"],"sources":["../../../0-framework/3-tooling/cli/dist/execute-log-DsnSZiUz.mjs"],"sourcesContent":["import { s as toStructured } from \"./dev-DbmjkSa6.mjs\";\nimport { t as resolveAppIdentity } from \"./pipeline-B-vJNch3.mjs\";\nimport { t as withEmulatorRetry } from \"./emulator-retry-CV8rl69G.mjs\";\nimport { notOk, ok } from \"@internal/foundation/result\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as path from \"node:path\";\nimport { DEV_DIR, resolveLocalTargets } from \"@internal/core/local-target\";\n//#region src/operations/execute-log.ts\n/**\n* The log executor — run-log.ts's attach-and-tail (config → localTarget →\n* container → attach → logs) with console and signal handling removed: the\n* merged stream comes back as an AsyncIterable, ended by the caller's\n* AbortSignal. Reached only by lazy import from log.ts — this module's\n* static graph transitively loads alchemy's provider tree, so the control\n* entry must never import it statically.\n*/\nfunction failureMessage(error) {\n\treturn error instanceof Error ? error.message : String(error);\n}\n/** The merge queue's bound: past this, the oldest line is dropped and the\n* consumer is told via a `lines-dropped` event — a log viewer tolerates loss\n* better than the host tolerates unbounded memory growth. Exported so tests\n* can size their floods relative to the bound. */\nconst LOG_QUEUE_LIMIT = 1e4;\n/**\n* Merges every attachment's log stream into one iterable: one pump per\n* attachment pushing into a shared bounded queue. A pump's throw becomes a\n* `stream-failed` event and ends that pump only; the merged iterable ends\n* when `input.signal` aborts, when every pump ends, or when the consumer\n* stops iterating (an early `break` aborts an internal controller so the\n* pumps tear down — the generator never waits on a source that will not\n* end). No event is delivered after the iterable has ended. Address\n* filtering and `tail` apply exactly as the CLI always has.\n*/\nasync function* mergeLogStreams(attachments, input) {\n\tconst controller = new AbortController();\n\tconst { signal } = controller;\n\tconst abortInternal = () => controller.abort();\n\tif (input.signal?.aborted === true) controller.abort();\n\tinput.signal?.addEventListener(\"abort\", abortInternal, { once: true });\n\tconst queue = [];\n\tlet dropped = 0;\n\tlet done = false;\n\tlet active = attachments.length;\n\tlet wake;\n\tconst notify = () => {\n\t\twake?.();\n\t\twake = void 0;\n\t};\n\tsignal.addEventListener(\"abort\", notify, { once: true });\n\tconst emit = (event) => {\n\t\tif (done) return;\n\t\ttry {\n\t\t\tinput.onEvent?.(event);\n\t\t} catch {}\n\t};\n\tconst pump = async (attachment) => {\n\t\ttry {\n\t\t\tfor await (const { service, line } of attachment.logs(signal, { tail: input.tail ?? 0 })) {\n\t\t\t\tif (signal.aborted) return;\n\t\t\t\tif (input.address !== void 0 && service !== input.address) continue;\n\t\t\t\tif (queue.length >= 1e4) {\n\t\t\t\t\tqueue.shift();\n\t\t\t\t\tdropped += 1;\n\t\t\t\t}\n\t\t\t\tqueue.push({\n\t\t\t\t\tservice,\n\t\t\t\t\tline\n\t\t\t\t});\n\t\t\t\tnotify();\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (!signal.aborted) emit({\n\t\t\t\tkind: \"stream-failed\",\n\t\t\t\tmessage: failureMessage(error)\n\t\t\t});\n\t\t} finally {\n\t\t\tactive -= 1;\n\t\t\tnotify();\n\t\t}\n\t};\n\tfor (const attachment of attachments) pump(attachment);\n\ttry {\n\t\twhile (true) {\n\t\t\tlet next = queue.shift();\n\t\t\twhile (next !== void 0) {\n\t\t\t\tif (dropped > 0) {\n\t\t\t\t\tconst count = dropped;\n\t\t\t\t\tdropped = 0;\n\t\t\t\t\temit({\n\t\t\t\t\t\tkind: \"lines-dropped\",\n\t\t\t\t\t\tcount\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tyield next;\n\t\t\t\tnext = queue.shift();\n\t\t\t}\n\t\t\tif (signal.aborted || active === 0) break;\n\t\t\tawait new Promise((resolve) => {\n\t\t\t\twake = resolve;\n\t\t\t});\n\t\t}\n\t} finally {\n\t\tdone = true;\n\t\tcontroller.abort();\n\t\tsignal.removeEventListener(\"abort\", notify);\n\t\tinput.signal?.removeEventListener(\"abort\", abortInternal);\n\t}\n}\n/** Resolves the running app and attaches to its log streams; the caller consumes `lines`. */\nasync function executeLog(input, deps, cwd) {\n\tif (process.platform === \"win32\") return notOk(new CliStructuredError(\"LOG.PLATFORM_UNSUPPORTED\", \"local dev is not supported on Windows yet.\"));\n\tconst devDir = path.join(cwd, DEV_DIR);\n\tlet name;\n\tconst attachments = [];\n\tlet services;\n\ttry {\n\t\tconst identity = deps.identity ?? await resolveAppIdentity(input.entry, input.name, cwd, input.config);\n\t\tname = identity.name;\n\t\tconst resolved = await resolveLocalTargets(identity.config);\n\t\tfor (const target of resolved.values()) try {\n\t\t\tconst container = await target.container.ensure({\n\t\t\t\tappName: name,\n\t\t\t\tstage: void 0\n\t\t\t});\n\t\t\tattachments.push(await withEmulatorRetry(() => target.attach({\n\t\t\t\tcontainer,\n\t\t\t\tdevDir\n\t\t\t})));\n\t\t} catch (error) {\n\t\t\tthrow toStructured(\"LOG.ATTACH_FAILED\", error);\n\t\t}\n\t\ttry {\n\t\t\tservices = (await Promise.all(attachments.map((a) => withEmulatorRetry(() => a.endpoints())))).flat();\n\t\t} catch (error) {\n\t\t\tthrow toStructured(\"LOG.ATTACH_FAILED\", error);\n\t\t}\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n\tif (services.length === 0) return ok({\n\t\tappName: name,\n\t\tservices: [],\n\t\tlines: mergeLogStreams([], input)\n\t});\n\tif (input.address !== void 0 && !services.some((s) => s.address === input.address)) return notOk(new CliStructuredError(\"LOG.ADDRESS_UNKNOWN\", `no service \"${input.address}\" in \"${name}\" — running services: ${services.map((s) => s.address).join(\", \")}.`));\n\treturn ok({\n\t\tappName: name,\n\t\tservices,\n\t\tlines: mergeLogStreams(attachments, input)\n\t});\n}\n//#endregion\nexport { LOG_QUEUE_LIMIT, executeLog };\n\n//# sourceMappingURL=execute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,qBAAqB,KAAK;EAC9C;CACD,SAAS,OAAO;EACf,IAAI,mBAAmB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;EACpD,MAAM;CACP;CACA,IAAI,SAAS,WAAW,GAAG,OAAO,GAAG;EACpC,SAAS;EACT,UAAU,CAAC;EACX,OAAO,gBAAgB,CAAC,GAAG,KAAK;CACjC,CAAC;CACD,IAAI,MAAM,YAAY,KAAK,KAAK,CAAC,SAAS,MAAM,MAAM,EAAE,YAAY,MAAM,OAAO,GAAG,OAAO,MAAM,IAAI,mBAAmB,uBAAuB,eAAe,MAAM,QAAQ,QAAQ,KAAK,wBAAwB,SAAS,KAAK,MAAM,EAAE,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;CAC9P,OAAO,GAAG;EACT,SAAS;EACT;EACA,OAAO,gBAAgB,aAAa,KAAK;CAC1C,CAAC;AACF"}
|
package/dist/local-target.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as PrismaAppConfig, _ as LocalTargetEmulatorsInput, c as ContainerInstance, g as LocalTargetDescriptor, h as LocalTargetAttachment, l as DEV_DIR, m as LocalTargetAttachInput, t as AlchemyStateLayer, v as LocalTargetProvidersInput } from "./app-config-
|
|
1
|
+
import { A as PrismaAppConfig, _ as LocalTargetEmulatorsInput, c as ContainerInstance, g as LocalTargetDescriptor, h as LocalTargetAttachment, l as DEV_DIR, m as LocalTargetAttachInput, t as AlchemyStateLayer, v as LocalTargetProvidersInput } from "./app-config-TNPB00yf-2mJwfWXH.mjs";
|
|
2
2
|
import * as Layer from "effect/Layer";
|
|
3
3
|
//#region ../../0-framework/1-core/core/dist/local-target.d.mts
|
|
4
4
|
//#region src/control/local-target.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as Bundle, i as AssembleInput, p as ExtensionDescriptor } from "./app-config-
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./deploy-
|
|
1
|
+
import { a as Bundle, i as AssembleInput, p as ExtensionDescriptor } from "./app-config-TNPB00yf-2mJwfWXH.mjs";
|
|
2
|
+
import "./config-DFOOWMTu.mjs";
|
|
3
|
+
import "./deploy-DFOOWMTu.mjs";
|
|
4
4
|
import { t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-D7UOddVQ.mjs";
|
|
5
5
|
//#region ../../0-framework/2-authoring/nextjs/dist/control.d.mts
|
|
6
6
|
//#region src/control/build.d.ts
|
package/dist/node-control.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as Bundle, i as AssembleInput, p as ExtensionDescriptor } from "./app-config-
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./deploy-
|
|
1
|
+
import { a as Bundle, i as AssembleInput, p as ExtensionDescriptor } from "./app-config-TNPB00yf-2mJwfWXH.mjs";
|
|
2
|
+
import "./config-DFOOWMTu.mjs";
|
|
3
|
+
import "./deploy-DFOOWMTu.mjs";
|
|
4
4
|
//#region ../../0-framework/2-authoring/node/dist/control.d.mts
|
|
5
5
|
//#region src/control/build.d.ts
|
|
6
6
|
declare function assemble(input: AssembleInput): Promise<Bundle>;
|
package/dist/report.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as DeploymentResult } from "./app-config-
|
|
2
|
-
import "./deploy-
|
|
3
|
-
import { r as captureEngineFailure } from "./deployment-summary-CU-eVvJM-
|
|
1
|
+
import { f as DeploymentResult } from "./app-config-TNPB00yf-2mJwfWXH.mjs";
|
|
2
|
+
import "./deploy-DFOOWMTu.mjs";
|
|
3
|
+
import { r as captureEngineFailure } from "./deployment-summary-CU-eVvJM-BesRnvG4.mjs";
|
|
4
4
|
//#region ../../0-framework/3-tooling/cli/dist/report.d.mts
|
|
5
5
|
//#region src/render-deployment.d.ts
|
|
6
6
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/composer",
|
|
3
|
-
"version": "0.30.0-dev.
|
|
3
|
+
"version": "0.30.0-dev.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Prisma Composer — build a Prisma App by composing Modules. Core authoring, deploy pipeline, and the service-rpc/node/nextjs authoring surfaces. The command family the `prisma` CLI mounts lives in @prisma/composer-cli.",
|
|
6
6
|
"exports": {
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
"@prisma/management-api-sdk": "^1.80.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@internal/assemble": "0.30.0-dev.
|
|
43
|
-
"@internal/cli": "0.30.0-dev.
|
|
44
|
-
"@internal/core": "0.30.0-dev.
|
|
45
|
-
"@internal/foundation": "0.30.0-dev.
|
|
46
|
-
"@internal/lowering": "0.30.0-dev.
|
|
47
|
-
"@internal/nextjs": "0.30.0-dev.
|
|
48
|
-
"@internal/node": "0.30.0-dev.
|
|
49
|
-
"@internal/service-rpc": "0.30.0-dev.
|
|
50
|
-
"@internal/tsdown-config": "0.30.0-dev.
|
|
42
|
+
"@internal/assemble": "0.30.0-dev.4",
|
|
43
|
+
"@internal/cli": "0.30.0-dev.4",
|
|
44
|
+
"@internal/core": "0.30.0-dev.4",
|
|
45
|
+
"@internal/foundation": "0.30.0-dev.4",
|
|
46
|
+
"@internal/lowering": "0.30.0-dev.4",
|
|
47
|
+
"@internal/nextjs": "0.30.0-dev.4",
|
|
48
|
+
"@internal/node": "0.30.0-dev.4",
|
|
49
|
+
"@internal/service-rpc": "0.30.0-dev.4",
|
|
50
|
+
"@internal/tsdown-config": "0.30.0-dev.4",
|
|
51
51
|
"@types/node": "^26.0.1",
|
|
52
52
|
"tsdown": "^0.22.7",
|
|
53
53
|
"typescript": "^6.0.3"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: prisma-composer-core-concepts
|
|
3
3
|
metadata:
|
|
4
4
|
library: "@prisma/composer"
|
|
5
|
-
library_version: "0.30.0-dev.
|
|
5
|
+
library_version: "0.30.0-dev.4"
|
|
6
6
|
version: 2026.9.1
|
|
7
7
|
description: >-
|
|
8
8
|
Use when deploying or managing an app that uses Prisma Composer
|
|
@@ -442,8 +442,8 @@ that surprise:
|
|
|
442
442
|
deploy. It watches built output and restarts a service when its build
|
|
443
443
|
changes.
|
|
444
444
|
`ready` prints only once every service accepts connections on its port, except a service declared `compute({ ..., listens: false })` (one that never listens, like the cron scheduler), which counts as running once its process starts. A service that exits before it listens, or does not listen within 30 seconds, fails `dev` (and stops the app's other services) with a message naming the service, its port, and its log file: on a first start it is in the deploy engine's output, before the error that the deploy engine exited (`DEV.CONVERGE_FAILED` from the `dev` operation); on a warm start it is the `DEV.SERVICE_START_FAILED` message. `PRISMA_COMPOSER_SERVICE_READY_TIMEOUT_MS` raises the 30-second limit (milliseconds); the compute emulator reads it when it starts, so a running emulator keeps its old value until its process ends. An emulator that does not accept connections fails `dev` and `log` with `DEV.EMULATOR_UNREACHABLE` after a few seconds of retries; nothing else is retried.
|
|
445
|
-
2. Ctrl-C stops the app's processes
|
|
446
|
-
Services belong to the directory `dev` runs in: two checkouts of one app (two git worktrees) run separate processes on separate ports and never restart each other's. `.prisma-composer/dev/emulator-instances.json` records which local
|
|
445
|
+
2. Ctrl-C (or `dev` ending on SIGTERM or a failure) stops the app's service processes and its local Postgres servers and keeps their data and ports: the next `dev` is a warm start. Starting clean, wiping this app's local instances and data first, is an explicit opt-in flag. On a fresh start, each service gets the lowest free port from 3000 up, in dependency order: a service before the services that call it, otherwise provision order. A warm start keeps the ports services already have.
|
|
446
|
+
Services, databases and buckets belong to the directory `dev` runs in: two checkouts of one app (two git worktrees) run separate processes on separate ports, with separate databases and buckets, and never restart or write into each other's. `.prisma-composer/dev/emulator-instances.json` records which local instance backs each node. A service or database keeps its port in its directory across runs, even while stopped. If a local instance is gone (a Composer upgrade discarded an emulator's state), the next `dev` re-creates it, empty, and asks for the old port, and a Prisma ORM database's (`postgres()`) committed migrations run again (a `rawPostgres()` database stays empty); when another directory has taken the port, the instance gets the lowest free one and `dev` prints `[dev] service "<address>" now uses port <new>: its previous port <old> is in use` (`database "<address>"` for a database). A directory keeps the local state of every app run from it: running a different app there (another entry, another `--name`) stops the previous app's services and databases, keeps their data and ports, and prints `[dev] stopped the local services of "<app>", the app run here before; its data is kept`; running it again resumes them. `--fresh` wipes only the app it starts. A stopped instance keeps its port reserved and a database its data, so a deleted checkout's instances keep theirs; there is no command to remove them yet.
|
|
447
447
|
3. `dev` does not print service logs. The `log` operation follows the
|
|
448
448
|
already-running app's merged logs; it never builds, provisions, starts, or
|
|
449
449
|
stops anything:
|
|
@@ -459,12 +459,11 @@ that surprise:
|
|
|
459
459
|
service it calls.
|
|
460
460
|
6. The emulators are machine-wide daemons shared by every `dev`, registered
|
|
461
461
|
under `~/.prisma-composer/emulators`. Set `PRISMA_COMPOSER_EMULATORS_DIR`
|
|
462
|
-
to an absolute directory to give a checkout or CI job its own compute
|
|
463
|
-
buckets daemons, registry and
|
|
464
|
-
fails with `DEV.EMULATORS_DIR_INVALID`.
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
the database for both. `emulatorRegistryRoot()` from
|
|
462
|
+
to an absolute directory to give a checkout or CI job its own compute,
|
|
463
|
+
Postgres and buckets daemons, registry and state; a relative path (or an
|
|
464
|
+
unexpanded `~`) fails with `DEV.EMULATORS_DIR_INVALID`. A local database's
|
|
465
|
+
data is kept by `@prisma/dev` in its own data directory under a name unique
|
|
466
|
+
to the database, whatever the variable says. `emulatorRegistryRoot()` from
|
|
468
467
|
`@prisma/composer-prisma-cloud/local-target` returns the directory in
|
|
469
468
|
effect.
|
|
470
469
|
7. Windows isn't supported yet.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./app-config-BqBRS3nH-Cskusz-T.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./app-config-BqBRS3nH-Cskusz-T.mjs";
|