@prisma/composer-prisma-cloud 0.1.0-dev.9 → 0.2.0

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 (37) hide show
  1. package/dist/control.d.mts +6 -29
  2. package/dist/control.mjs +452 -65
  3. package/dist/control.mjs.map +1 -1
  4. package/dist/cron/index.mjs +10 -2
  5. package/dist/cron/index.mjs.map +1 -1
  6. package/dist/cron/scheduler-entrypoint.mjs +69 -20
  7. package/dist/cron/scheduler-entrypoint.mjs.map +1 -1
  8. package/dist/cron/scheduler-service.mjs +10 -2
  9. package/dist/cron/scheduler-service.mjs.map +1 -1
  10. package/dist/index.d.mts +40 -1
  11. package/dist/index.mjs +41 -1
  12. package/dist/index.mjs.map +1 -1
  13. package/dist/{prisma-next-qPB8_Az6.mjs → prisma-next-DlU01kXJ-2sP5mQb6.mjs} +3 -3
  14. package/dist/prisma-next-DlU01kXJ-2sP5mQb6.mjs.map +1 -0
  15. package/dist/prisma-next.d.mts +1 -1
  16. package/dist/prisma-next.mjs +1 -1
  17. package/dist/storage/index.d.mts +11 -10
  18. package/dist/storage/index.mjs +11 -3
  19. package/dist/storage/index.mjs.map +1 -1
  20. package/dist/storage/storage-entrypoint.mjs +10 -0
  21. package/dist/storage/storage-entrypoint.mjs.map +1 -1
  22. package/dist/storage/storage-service.mjs +11 -3
  23. package/dist/storage/storage-service.mjs.map +1 -1
  24. package/dist/storage/testing.mjs.map +1 -1
  25. package/dist/streams/index.d.mts +13 -12
  26. package/dist/streams/index.mjs +12 -4
  27. package/dist/streams/index.mjs.map +1 -1
  28. package/dist/streams/streams-entrypoint.mjs +10 -0
  29. package/dist/streams/streams-entrypoint.mjs.map +1 -1
  30. package/dist/streams/streams-service.mjs +11 -3
  31. package/dist/streams/streams-service.mjs.map +1 -1
  32. package/dist/streams/testing.d.mts +1 -1
  33. package/dist/streams/testing.mjs.map +1 -1
  34. package/dist/testing.d.mts +1 -1
  35. package/dist/testing.mjs.map +1 -1
  36. package/package.json +14 -14
  37. package/dist/prisma-next-qPB8_Az6.mjs.map +0 -1
@@ -1,45 +1,20 @@
1
1
  import { t as ProviderParamEntry } from "./serializer-Cx5slrV4-xJfH6EWS.mjs";
2
- import * as Layer from "effect/Layer";
3
2
  import { createManagementApiClient } from "@prisma/management-api-sdk";
4
3
  import "effect/Context";
5
4
  import "effect/Effect";
5
+ import "effect/Layer";
6
6
  import "effect/Redacted";
7
7
  import "effect/Config";
8
8
  import "alchemy/Provider";
9
- import { Resource, StackServices } from "alchemy";
9
+ import { Resource } from "alchemy";
10
10
  import "effect/Schedule";
11
- import postgres from "postgres";
12
- import { State, StateStoreError } from "alchemy/State";
13
11
  import * as Output from "alchemy/Output";
14
- import { ExtensionDescriptor } from "@prisma/composer/config";
12
+ import { ExtensionDescriptor, StateDescriptor } from "@prisma/composer/config";
15
13
  //#region ../../1-prisma-cloud/0-lowering/lowering/dist/compute.d.mts
16
14
  /** Every region Prisma Compute serves — the runtime source of truth; `ComputeRegion` is derived from it so the two can never drift. */
17
15
  declare const COMPUTE_REGIONS: readonly ["us-east-1", "us-west-1", "eu-west-3", "eu-central-1", "ap-northeast-1", "ap-southeast-1"];
18
16
  type ComputeRegion = (typeof COMPUTE_REGIONS)[number];
19
17
  //#endregion
20
- //#region ../../1-prisma-cloud/0-lowering/lowering/dist/state.d.mts
21
- //#endregion
22
- //#region src/state/layer.d.ts
23
- /**
24
- * The hosted Alchemy state store. On layer init (scoped, once per stack
25
- * run): resolve the stage's Branch, find-or-create its `prisma-composer-state`
26
- * database, create a fresh connection, migrate the schema, and acquire the
27
- * (stack, stage) advisory lock — see `bootstrap.ts` and `lock.ts`. The
28
- * Management API plumbing (`ManagementClient`, `PrismaCredentials`) is
29
- * provided internally, so the returned layer's only requirements are the
30
- * ones alchemy itself already provides to every state store
31
- * (`StackServices`).
32
- *
33
- * Any bootstrap/lock/migration failure is wrapped into an operator-facing
34
- * `HostedStateBootstrapError` (naming the Project/Branch and the step that
35
- * failed, never the raw driver/API error — see `errors.ts`) before dying the
36
- * layer (loud, immediate, unrecoverable) rather than surfacing as a typed
37
- * error — matching core's `LowerOptions.state: Layer.Layer<State, never,
38
- * StackServices>` contract and alchemy's own convention (e.g. a missing
39
- * state store is `Effect.die` in `Stack.make`).
40
- */
41
- declare const prismaState: () => Layer.Layer<State, never, StackServices>;
42
- //#endregion
43
18
  //#region ../../1-prisma-cloud/1-extensions/target/dist/control.d.mts
44
19
  //#region src/descriptors/shared.d.ts
45
20
  /**
@@ -68,7 +43,9 @@ interface ProviderParam extends ProviderParamEntry {
68
43
  readonly value: (refs: readonly unknown[]) => Output.Output<unknown> | unknown | undefined;
69
44
  }
70
45
  //#endregion
71
- //#region src/exports/control.d.ts
46
+ //#region src/control/extension.d.ts
47
+ /** The user-facing state descriptor: `state: prismaState()` in `prisma-composer.config.ts` (ADR-0017). */
48
+ declare const prismaState: () => StateDescriptor;
72
49
  interface PrismaCloudOptions {
73
50
  /** Defaults to the PRISMA_WORKSPACE_ID environment variable. */
74
51
  workspaceId?: string;