@prisma/composer 0.6.0-dev.14 → 0.6.0-dev.16

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.
Files changed (110) hide show
  1. package/dist/{app-config-CFsSXEVj-B242oUnm.d.mts → app-config-aIrriqVU-D6lJHzh2.d.mts} +42 -17
  2. package/dist/app-config-aIrriqVU-D6lJHzh2.d.mts.map +1 -0
  3. package/dist/bin.mjs +1337 -12
  4. package/dist/bin.mjs.map +1 -1
  5. package/dist/config-CL7Jbve2.d.mts +1 -0
  6. package/dist/config.d.mts +3 -3
  7. package/dist/container-transport-DKmKg5JQ-CoY4XPma.mjs +30 -0
  8. package/dist/container-transport-DKmKg5JQ-CoY4XPma.mjs.map +1 -0
  9. package/dist/control.d.mts +3 -216
  10. package/dist/control.mjs +1 -69
  11. package/dist/deploy-CL7Jbve2.d.mts +1 -0
  12. package/dist/deploy.d.mts +2 -2
  13. package/dist/deploy.mjs +1 -1
  14. package/dist/{deployment-summary-r47O6kFr-CcMYVOn5.mjs → deployment-summary-DswOl_9E-C03NJ98H.mjs} +2 -2
  15. package/dist/{deployment-summary-r47O6kFr-CcMYVOn5.mjs.map → deployment-summary-DswOl_9E-C03NJ98H.mjs.map} +1 -1
  16. package/dist/{dist-C5rZnr4n.mjs → dist-C0dNEgS-.mjs} +2 -2
  17. package/dist/{dist-C5rZnr4n.mjs.map → dist-C0dNEgS-.mjs.map} +1 -1
  18. package/dist/{errors-0e8IVwzi.mjs → errors-DkXcnjPx.mjs} +3 -2
  19. package/dist/{errors-0e8IVwzi.mjs.map → errors-DkXcnjPx.mjs.map} +1 -1
  20. package/dist/{execute-deploy-destroy-IT4vGkMc-oO8yjHPH.mjs → execute-deploy-destroy-DfVJUICu-AMM8CwgV.mjs} +30 -19
  21. package/dist/execute-deploy-destroy-DfVJUICu-AMM8CwgV.mjs.map +1 -0
  22. package/dist/{execute-deploy-destroy-IT4vGkMc-YM1Cv6cu.mjs → execute-deploy-destroy-DfVJUICu-quUQ08T8.mjs} +29 -19
  23. package/dist/execute-deploy-destroy-DfVJUICu-quUQ08T8.mjs.map +1 -0
  24. package/dist/{execute-dev-DLYyduEM-88uyvrbj.mjs → execute-dev-BMTFWfFc-B1whS-Rr.mjs} +25 -23
  25. package/dist/{execute-dev-DLYyduEM-88uyvrbj.mjs.map → execute-dev-BMTFWfFc-B1whS-Rr.mjs.map} +1 -1
  26. package/dist/{execute-dev-DLYyduEM-BuUGTm0g.mjs → execute-dev-BMTFWfFc-BoKbcFVF.mjs} +29 -20
  27. package/dist/{execute-dev-DLYyduEM-BuUGTm0g.mjs.map → execute-dev-BMTFWfFc-BoKbcFVF.mjs.map} +1 -1
  28. package/dist/{execute-log-VIOL4DBz-DBPH8By4.mjs → execute-log-Cay9hlKW-B0tmRtrY.mjs} +11 -7
  29. package/dist/execute-log-Cay9hlKW-B0tmRtrY.mjs.map +1 -0
  30. package/dist/{execute-log-VIOL4DBz-DKodBrxS.mjs → execute-log-Cay9hlKW-DrMeVOXq.mjs} +9 -7
  31. package/dist/execute-log-Cay9hlKW-DrMeVOXq.mjs.map +1 -0
  32. package/dist/family-DkH0si4D-Uov_MuHV.d.mts +27 -0
  33. package/dist/family-DkH0si4D-Uov_MuHV.d.mts.map +1 -0
  34. package/dist/family.d.mts +53 -0
  35. package/dist/family.d.mts.map +1 -0
  36. package/dist/family.mjs +1226 -0
  37. package/dist/family.mjs.map +1 -0
  38. package/dist/{graph-BJgUfGB0-kvgFzT4q.mjs → graph-BJgUfGB0-7fmubS_y.mjs} +2 -2
  39. package/dist/{graph-BJgUfGB0-kvgFzT4q.mjs.map → graph-BJgUfGB0-7fmubS_y.mjs.map} +1 -1
  40. package/dist/{graph-types-N6brq1zY-1VMNwtkJ.d.mts → graph-DqklX5Sf-CdNH3lA7.d.mts} +17 -2
  41. package/dist/graph-DqklX5Sf-CdNH3lA7.d.mts.map +1 -0
  42. package/dist/{index-DryPyF9U.d.mts → index-DuF5iI3i.d.mts} +2 -3
  43. package/dist/index-DuF5iI3i.d.mts.map +1 -0
  44. package/dist/index.d.mts +2 -3
  45. package/dist/index.mjs +2 -2
  46. package/dist/{local-target-DnA2E8IN.mjs → local-target-D3u_wuNF.mjs} +2 -2
  47. package/dist/{local-target-DnA2E8IN.mjs.map → local-target-D3u_wuNF.mjs.map} +1 -1
  48. package/dist/{local-target-DuSyWeYc.mjs → local-target-H0IWu_FM.mjs} +2 -2
  49. package/dist/{local-target-DuSyWeYc.mjs.map → local-target-H0IWu_FM.mjs.map} +1 -1
  50. package/dist/local-target.d.mts +1 -1
  51. package/dist/local-target.mjs +1 -1
  52. package/dist/log-DRnnWupy-9jbzL64M.d.mts +324 -0
  53. package/dist/log-DRnnWupy-9jbzL64M.d.mts.map +1 -0
  54. package/dist/{result-CzGChwbZ.mjs → log-DfT2hHqi-CDp9nfI5.mjs} +85 -90
  55. package/dist/log-DfT2hHqi-CDp9nfI5.mjs.map +1 -0
  56. package/dist/{nextjs-DLyeRR7M-DZODs9tk.d.mts → nextjs-DLyeRR7M-BfUbLXwr.d.mts} +3 -3
  57. package/dist/{nextjs-DLyeRR7M-DZODs9tk.d.mts.map → nextjs-DLyeRR7M-BfUbLXwr.d.mts.map} +1 -1
  58. package/dist/nextjs-control.d.mts +4 -4
  59. package/dist/nextjs.d.mts +1 -1
  60. package/dist/node-control.d.mts +3 -3
  61. package/dist/node.d.mts +2 -2
  62. package/dist/{pipeline-D3QoVzAB-D_ufjg3N.mjs → pipeline-AoW8zq4I-C6Qe0VaZ.mjs} +161 -42
  63. package/dist/{pipeline-D3QoVzAB-D_ufjg3N.mjs.map → pipeline-AoW8zq4I-C6Qe0VaZ.mjs.map} +1 -1
  64. package/dist/{pipeline-D3QoVzAB-Ci2aJ2mE.mjs → pipeline-AoW8zq4I-DM74ygtH.mjs} +164 -43
  65. package/dist/pipeline-AoW8zq4I-DM74ygtH.mjs.map +1 -0
  66. package/dist/report.d.mts +2 -2
  67. package/dist/report.mjs +1 -1
  68. package/dist/report.mjs.map +1 -1
  69. package/dist/{shared-CCaR42wo-BvegvmA_.mjs → result-B4XjxVK6.mjs} +127 -8
  70. package/dist/result-B4XjxVK6.mjs.map +1 -0
  71. package/dist/{result-CFqJKiqg.mjs → result-wonf1deB.mjs} +4 -18
  72. package/dist/result-wonf1deB.mjs.map +1 -0
  73. package/dist/run-alchemy-D44OZlyB-DA7s331N.mjs +93 -0
  74. package/dist/run-alchemy-D44OZlyB-DA7s331N.mjs.map +1 -0
  75. package/dist/run-alchemy-D44OZlyB-DeDTFsB6.mjs +93 -0
  76. package/dist/run-alchemy-D44OZlyB-DeDTFsB6.mjs.map +1 -0
  77. package/dist/service-rpc.d.mts +2 -2
  78. package/dist/service-rpc.mjs +2 -2
  79. package/dist/testing.d.mts +54 -2
  80. package/dist/testing.d.mts.map +1 -1
  81. package/dist/testing.mjs +150 -1
  82. package/dist/testing.mjs.map +1 -1
  83. package/package.json +13 -12
  84. package/src/exports/family.ts +14 -0
  85. package/src/exports/testing.ts +1 -0
  86. package/dist/app-config-CFsSXEVj-B242oUnm.d.mts.map +0 -1
  87. package/dist/cli-B3sWzFlb-CxEIzKsQ.mjs +0 -401
  88. package/dist/cli-B3sWzFlb-CxEIzKsQ.mjs.map +0 -1
  89. package/dist/config-ku5b_2YD.d.mts +0 -1
  90. package/dist/container-transport-DKmKg5JQ-BMRhx5w-.mjs +0 -75
  91. package/dist/container-transport-DKmKg5JQ-BMRhx5w-.mjs.map +0 -1
  92. package/dist/control.d.mts.map +0 -1
  93. package/dist/control.mjs.map +0 -1
  94. package/dist/deploy-ku5b_2YD.d.mts +0 -1
  95. package/dist/execute-deploy-destroy-IT4vGkMc-YM1Cv6cu.mjs.map +0 -1
  96. package/dist/execute-deploy-destroy-IT4vGkMc-oO8yjHPH.mjs.map +0 -1
  97. package/dist/execute-log-VIOL4DBz-DBPH8By4.mjs.map +0 -1
  98. package/dist/execute-log-VIOL4DBz-DKodBrxS.mjs.map +0 -1
  99. package/dist/graph-DqklX5Sf-BNS2aO1j.d.mts +0 -18
  100. package/dist/graph-DqklX5Sf-BNS2aO1j.d.mts.map +0 -1
  101. package/dist/graph-types-N6brq1zY-1VMNwtkJ.d.mts.map +0 -1
  102. package/dist/index-DryPyF9U.d.mts.map +0 -1
  103. package/dist/pipeline-D3QoVzAB-Ci2aJ2mE.mjs.map +0 -1
  104. package/dist/render-error-DsPN5qfr-CkVGj9uP.mjs +0 -30
  105. package/dist/render-error-DsPN5qfr-CkVGj9uP.mjs.map +0 -1
  106. package/dist/result-CFqJKiqg.mjs.map +0 -1
  107. package/dist/result-CzGChwbZ.mjs.map +0 -1
  108. package/dist/run-alchemy-hghRtddF-CQHOzlrW.mjs +0 -48
  109. package/dist/run-alchemy-hghRtddF-CQHOzlrW.mjs.map +0 -1
  110. package/dist/shared-CCaR42wo-BvegvmA_.mjs.map +0 -1
@@ -1,11 +1,12 @@
1
- import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
1
+ import { t as CliStructuredError } from "./errors-DkXcnjPx.mjs";
2
2
  import { t as DEV_DIR } from "./app-config-joXc-BKm-CdcXqNMD.mjs";
3
- import { n as ok, o as toStructured, t as notOk } from "./result-CzGChwbZ.mjs";
4
- import { n as resolveLocalTargets } from "./local-target-DnA2E8IN.mjs";
5
- import { t as resolveAppIdentity } from "./pipeline-D3QoVzAB-Ci2aJ2mE.mjs";
3
+ import { d as toStructured } from "./log-DfT2hHqi-CDp9nfI5.mjs";
4
+ import { n as ok, t as notOk } from "./result-wonf1deB.mjs";
5
+ import { n as resolveLocalTargets } from "./local-target-D3u_wuNF.mjs";
6
+ import { t as resolveAppIdentity } from "./pipeline-AoW8zq4I-DM74ygtH.mjs";
6
7
  import { t as withEmulatorRetry } from "./emulator-retry-DGonap4g-S8BNrXFD.mjs";
7
8
  import * as path from "node:path";
8
- //#region ../../0-framework/3-tooling/cli/dist/execute-log-VIOL4DBz.mjs
9
+ //#region ../../0-framework/3-tooling/cli/dist/execute-log-Cay9hlKW.mjs
9
10
  /**
10
11
  * The log executor — run-log.ts's attach-and-tail (config → localTarget →
11
12
  * container → attach → logs) with console and signal handling removed: the
@@ -115,7 +116,10 @@ async function executeLog(input, deps, cwd) {
115
116
  const attachments = [];
116
117
  let services;
117
118
  try {
118
- const identity = deps.identity ?? await resolveAppIdentity(input.entry, input.name, cwd, { config: deps.config });
119
+ const identity = deps.identity ?? await resolveAppIdentity(input.entry, input.name, cwd, {
120
+ config: deps.config,
121
+ configPath: deps.configPath
122
+ });
119
123
  name = identity.name;
120
124
  const resolved = await resolveLocalTargets(identity.config);
121
125
  for (const target of resolved.values()) try {
@@ -154,4 +158,4 @@ async function executeLog(input, deps, cwd) {
154
158
  //#endregion
155
159
  export { LOG_QUEUE_LIMIT, executeLog };
156
160
 
157
- //# sourceMappingURL=execute-log-VIOL4DBz-DBPH8By4.mjs.map
161
+ //# sourceMappingURL=execute-log-Cay9hlKW-B0tmRtrY.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute-log-Cay9hlKW-B0tmRtrY.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/execute-log-Cay9hlKW.mjs"],"sourcesContent":["import { r as toStructured } from \"./shared-BTnATsqm.mjs\";\nimport { t as resolveAppIdentity } from \"./pipeline-AoW8zq4I.mjs\";\nimport { t as withEmulatorRetry } from \"./emulator-retry-DGonap4g.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as path from \"node:path\";\nimport { notOk, ok } from \"@internal/foundation/result\";\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, {\n\t\t\tconfig: deps.config,\n\t\t\tconfigPath: deps.configPath\n\t\t});\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-log-Cay9hlKW.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,SAAS,eAAe,OAAO;CAC9B,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC7D;;;;;AAKA,MAAM,kBAAkB;;;;;;;;;;;AAWxB,gBAAgB,gBAAgB,aAAa,OAAO;CACnD,MAAM,aAAa,IAAI,gBAAgB;CACvC,MAAM,EAAE,WAAW;CACnB,MAAM,sBAAsB,WAAW,MAAM;CAC7C,IAAI,MAAM,QAAQ,YAAY,MAAM,WAAW,MAAM;CACrD,MAAM,QAAQ,iBAAiB,SAAS,eAAe,EAAE,MAAM,KAAK,CAAC;CACrE,MAAM,QAAQ,CAAC;CACf,IAAI,UAAU;CACd,IAAI,OAAO;CACX,IAAI,SAAS,YAAY;CACzB,IAAI;CACJ,MAAM,eAAe;EACpB,OAAO;EACP,OAAO,KAAK;CACb;CACA,OAAO,iBAAiB,SAAS,QAAQ,EAAE,MAAM,KAAK,CAAC;CACvD,MAAM,QAAQ,UAAU;EACvB,IAAI,MAAM;EACV,IAAI;GACH,MAAM,UAAU,KAAK;EACtB,QAAQ,CAAC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";
3
- import { t as resolveAppIdentity } from "./pipeline-D3QoVzAB-D_ufjg3N.mjs";
4
- import { n as withEmulatorRetry, r as DEV_DIR, t as resolveLocalTargets } from "./local-target-DuSyWeYc.mjs";
1
+ import { c as CliStructuredError, n as ok, s as toStructured, t as notOk } from "./result-B4XjxVK6.mjs";
2
+ import { t as resolveAppIdentity } from "./pipeline-AoW8zq4I-C6Qe0VaZ.mjs";
3
+ import { n as withEmulatorRetry, r as DEV_DIR, t as resolveLocalTargets } from "./local-target-H0IWu_FM.mjs";
5
4
  import * as path from "node:path";
6
- //#region ../../0-framework/3-tooling/cli/dist/execute-log-VIOL4DBz.mjs
5
+ //#region ../../0-framework/3-tooling/cli/dist/execute-log-Cay9hlKW.mjs
7
6
  /**
8
7
  * The log executor — run-log.ts's attach-and-tail (config → localTarget →
9
8
  * container → attach → logs) with console and signal handling removed: the
@@ -113,7 +112,10 @@ async function executeLog(input, deps, cwd) {
113
112
  const attachments = [];
114
113
  let services;
115
114
  try {
116
- const identity = deps.identity ?? await resolveAppIdentity(input.entry, input.name, cwd, { config: deps.config });
115
+ const identity = deps.identity ?? await resolveAppIdentity(input.entry, input.name, cwd, {
116
+ config: deps.config,
117
+ configPath: deps.configPath
118
+ });
117
119
  name = identity.name;
118
120
  const resolved = await resolveLocalTargets(identity.config);
119
121
  for (const target of resolved.values()) try {
@@ -152,4 +154,4 @@ async function executeLog(input, deps, cwd) {
152
154
  //#endregion
153
155
  export { LOG_QUEUE_LIMIT, executeLog };
154
156
 
155
- //# sourceMappingURL=execute-log-VIOL4DBz-DKodBrxS.mjs.map
157
+ //# sourceMappingURL=execute-log-Cay9hlKW-DrMeVOXq.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute-log-Cay9hlKW-DrMeVOXq.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/execute-log-Cay9hlKW.mjs"],"sourcesContent":["import { r as toStructured } from \"./shared-BTnATsqm.mjs\";\nimport { t as resolveAppIdentity } from \"./pipeline-AoW8zq4I.mjs\";\nimport { t as withEmulatorRetry } from \"./emulator-retry-DGonap4g.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as path from \"node:path\";\nimport { notOk, ok } from \"@internal/foundation/result\";\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, {\n\t\t\tconfig: deps.config,\n\t\t\tconfigPath: deps.configPath\n\t\t});\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-log-Cay9hlKW.mjs.map"],"mappings":";;;;;;;;;;;;;AAgBA,SAAS,eAAe,OAAO;CAC9B,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC7D;;;;;AAKA,MAAM,kBAAkB;;;;;;;;;;;AAWxB,gBAAgB,gBAAgB,aAAa,OAAO;CACnD,MAAM,aAAa,IAAI,gBAAgB;CACvC,MAAM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AK;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"}
@@ -0,0 +1,27 @@
1
+ import { D as logWithDeps, S as destroyWithDeps, b as deployWithDeps, w as devWithDeps } from "./log-DRnnWupy-9jbzL64M.mjs";
2
+ import { CommandFamily } from "@prisma/cli-engine";
3
+ //#region ../../0-framework/3-tooling/cli/dist/family-DkH0si4D.d.mts
4
+ //#region src/family/family.d.ts
5
+ /**
6
+ * The control-plane operations the family's handlers call. These are the
7
+ * deps-taking variants, not the bare ones: a handler must inject the converge
8
+ * spawn adapter (so the ENGINE starts the child and owns signal policy) and
9
+ * the credentials the in-process leg authenticates with. A double that
10
+ * honours `deps.alchemy` therefore exercises the real settlement path
11
+ * against a scripted fake child.
12
+ */
13
+ interface ComposerOperations {
14
+ readonly deploy: typeof deployWithDeps;
15
+ readonly destroy: typeof destroyWithDeps;
16
+ readonly dev: typeof devWithDeps;
17
+ readonly log: typeof logWithDeps;
18
+ }
19
+ declare const realOperations: ComposerOperations;
20
+ interface CreateComposerFamilyOptions {
21
+ /** Defaults to the real control operations. */
22
+ readonly operations?: ComposerOperations | undefined;
23
+ }
24
+ declare function createComposerFamily(options?: CreateComposerFamilyOptions): CommandFamily;
25
+ //#endregion
26
+ export { realOperations as i, CreateComposerFamilyOptions as n, createComposerFamily as r, ComposerOperations as t };
27
+ //# sourceMappingURL=family-DkH0si4D-Uov_MuHV.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"family-DkH0si4D-Uov_MuHV.d.mts","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/family-DkH0si4D.d.mts"],"mappings":";;;;;;;;;;;;UAWU;WACC,eAAe;WACf,gBAAgB;WAChB,YAAY;WACZ,YAAY;;cAET,gBAAgB;UACpB;;WAEC,aAAa;;iBAEP,qBAAqB,UAAU,8BAA8B"}
@@ -0,0 +1,53 @@
1
+ import { ft as CliStructuredError$1 } from "./graph-DqklX5Sf-CdNH3lA7.mjs";
2
+ import { i as realOperations, n as CreateComposerFamilyOptions, r as createComposerFamily, t as ComposerOperations } from "./family-DkH0si4D-Uov_MuHV.mjs";
3
+ import { Cli, CliRunHooks, ConfigSection, HostProcess } from "@prisma/cli-engine";
4
+ import { CliStructuredError } from "@prisma/cli-engine/protocol";
5
+ //#region ../../0-framework/3-tooling/cli/dist/family.d.mts
6
+ //#region src/family/engine-cli.d.ts
7
+ declare const BINARY_NAME = "prisma-composer";
8
+ interface ComposerCliSpec {
9
+ /**
10
+ * The version to report. Supplied by the caller rather than read here: the
11
+ * version a user sees belongs to the package that shipped the executable,
12
+ * and this module is bundled into that package rather than being it.
13
+ */
14
+ readonly version: string;
15
+ readonly operations?: ComposerOperations | undefined;
16
+ }
17
+ declare function createComposerCli(spec: ComposerCliSpec): Cli;
18
+ /**
19
+ * Composes the Runtime and runs one invocation. Returns the exit code rather
20
+ * than exiting, so the caller owns the process — a bin assigns it to
21
+ * `process.exitCode` and lets the streams drain, as composer's CLI has always
22
+ * done.
23
+ *
24
+ * `prisma.config.ts` is not read here. The loader goes in as a function, and the
25
+ * engine calls it only when the command it is about to run declares a config
26
+ * section, passing it the file `--config` named; the loader resolves that
27
+ * against the host's cwd.
28
+ */
29
+ declare function runComposerCli(argv: readonly string[], host: HostProcess, spec: ComposerCliSpec, hooks?: CliRunHooks): Promise<number>;
30
+ //#endregion
31
+ //#region src/family/section.d.ts
32
+ interface ComposerSection {
33
+ /**
34
+ * Path to `prisma-composer.config.ts`, absolute or relative to the process
35
+ * cwd. Absent — the common case — means composer searches upward from the
36
+ * command's entry argument, as it always has.
37
+ */
38
+ readonly configPath?: string | undefined;
39
+ }
40
+ declare const composerSection: ConfigSection<ComposerSection>;
41
+ //#endregion
42
+ //#region src/family/translate-error.d.ts
43
+ /**
44
+ * Composer's own class of the same name — referenced through an inline import
45
+ * type rather than an import alias so the two same-named classes cannot be
46
+ * confused at a use site: the bare name is always the engine's.
47
+ */
48
+ type ComposerError = CliStructuredError$1;
49
+ /** Translates a composer failure into the engine's error type. Composer-side detail — `meta`, `where`, `docsUrl` — rides along untouched. */
50
+ declare function toEngineError(error: ComposerError): CliStructuredError;
51
+ //#endregion
52
+ export { BINARY_NAME, type ComposerCliSpec, type ComposerOperations, type ComposerSection, type CreateComposerFamilyOptions, composerSection, createComposerCli, createComposerFamily, realOperations, runComposerCli, toEngineError };
53
+ //# sourceMappingURL=family.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"family.d.mts","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/family.d.mts"],"mappings":";;;;;;cAIc;UACJ;;;;;;WAMC;WACA,aAAa;;iBAEP,kBAAkB,MAAM,kBAAkB;;;;;;;;;;;;iBAY1C,eAAe,yBAAyB,MAAM,aAAa,MAAM,iBAAiB,QAAQ,cAAc;;;UAG/G;;;;;;WAMC;;cAEG,iBAAiB,cAAc;;;;;;;;KAQxC,gBAAA;;iBAEY,cAAc,OAAO,gBAAgB"}