@prisma/composer-prisma-cloud 0.1.0 → 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.
- package/dist/control.d.mts +52 -38
- package/dist/control.mjs +1050 -326
- package/dist/control.mjs.map +1 -1
- package/dist/cron/index.d.mts +9 -6
- package/dist/cron/index.mjs +114 -5
- package/dist/cron/index.mjs.map +1 -1
- package/dist/cron/scheduler-entrypoint.mjs +281 -111
- package/dist/cron/scheduler-entrypoint.mjs.map +1 -1
- package/dist/cron/scheduler-service.mjs +114 -5
- package/dist/cron/scheduler-service.mjs.map +1 -1
- package/dist/index.d.mts +118 -23
- package/dist/index.mjs +44 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{prisma-next-COrwlg3N.mjs → prisma-next-DlU01kXJ-2sP5mQb6.mjs} +3 -3
- package/dist/prisma-next-DlU01kXJ-2sP5mQb6.mjs.map +1 -0
- package/dist/prisma-next.d.mts +1 -2
- package/dist/prisma-next.mjs +1 -1
- package/dist/provisioned-edges-DIQAR4q4-Bn9op-JG.mjs +151 -0
- package/dist/provisioned-edges-DIQAR4q4-Bn9op-JG.mjs.map +1 -0
- package/dist/{serializer-C2CsA7xm-29Eg2Tjl.mjs → serializer-CX4VYdf_-KKGoAxfx.mjs} +61 -7
- package/dist/serializer-CX4VYdf_-KKGoAxfx.mjs.map +1 -0
- package/dist/serializer-Cx5slrV4-xJfH6EWS.d.mts +36 -0
- package/dist/storage/index.d.mts +5 -16
- package/dist/storage/index.mjs +114 -3
- package/dist/storage/index.mjs.map +1 -1
- package/dist/storage/storage-entrypoint.mjs +7242 -12
- package/dist/storage/storage-entrypoint.mjs.map +1 -1
- package/dist/storage/storage-service.mjs +114 -3
- package/dist/storage/storage-service.mjs.map +1 -1
- package/dist/storage/testing.d.mts +7 -4
- package/dist/storage/testing.mjs.map +1 -1
- package/dist/streams/index.d.mts +250 -0
- package/dist/streams/index.mjs +4058 -0
- package/dist/streams/index.mjs.map +1 -0
- package/dist/streams/streams-entrypoint.mjs +48095 -0
- package/dist/streams/streams-entrypoint.mjs.map +1 -0
- package/dist/streams/streams-service.mjs +811 -0
- package/dist/streams/streams-service.mjs.map +1 -0
- package/dist/streams/testing.d.mts +33 -0
- package/dist/streams/testing.mjs +31335 -0
- package/dist/streams/testing.mjs.map +1 -0
- package/dist/testing.d.mts +1 -2
- package/dist/testing.mjs +1 -1
- package/dist/testing.mjs.map +1 -1
- package/package.json +27 -22
- package/dist/prisma-next-COrwlg3N.mjs.map +0 -1
- package/dist/serializer-C2CsA7xm-29Eg2Tjl.mjs.map +0 -1
package/dist/control.d.mts
CHANGED
|
@@ -1,56 +1,70 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { t as ProviderParamEntry } from "./serializer-Cx5slrV4-xJfH6EWS.mjs";
|
|
2
2
|
import { createManagementApiClient } from "@prisma/management-api-sdk";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import "effect/Context";
|
|
4
|
+
import "effect/Effect";
|
|
5
|
+
import "effect/Layer";
|
|
6
|
+
import "effect/Redacted";
|
|
7
|
+
import "effect/Config";
|
|
8
|
+
import "alchemy/Provider";
|
|
9
|
+
import { Resource } from "alchemy";
|
|
10
|
+
import "effect/Schedule";
|
|
11
|
+
import * as Output from "alchemy/Output";
|
|
12
|
+
import { ExtensionDescriptor, StateDescriptor } from "@prisma/composer/config";
|
|
13
|
+
//#region ../../1-prisma-cloud/0-lowering/lowering/dist/compute.d.mts
|
|
9
14
|
/** Every region Prisma Compute serves — the runtime source of truth; `ComputeRegion` is derived from it so the two can never drift. */
|
|
10
15
|
declare const COMPUTE_REGIONS: readonly ["us-east-1", "us-west-1", "eu-west-3", "eu-central-1", "ap-northeast-1", "ap-southeast-1"];
|
|
11
16
|
type ComputeRegion = (typeof COMPUTE_REGIONS)[number];
|
|
12
17
|
//#endregion
|
|
13
|
-
//#region ../../1-prisma-cloud/
|
|
14
|
-
//#region src/
|
|
18
|
+
//#region ../../1-prisma-cloud/1-extensions/target/dist/control.d.mts
|
|
19
|
+
//#region src/descriptors/shared.d.ts
|
|
15
20
|
/**
|
|
16
|
-
* The
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
21
|
+
* The provider-side reserved param for one brand's minted values (ADR-0031:
|
|
22
|
+
* "the provisioner owns mint, size, **aggregation**, stability, and
|
|
23
|
+
* rotation", and ADR-0019: the physical encoding is the target's). `value`
|
|
24
|
+
* is deploy-side: given every inbound edge's minted ref for one provider
|
|
25
|
+
* (possibly empty), it returns the typed value to store, or `undefined` to
|
|
26
|
+
* write no row. The returned value is encoded through the serializer's
|
|
27
|
+
* normal service-own literal path (JSON) — the same path any declared param
|
|
28
|
+
* takes — never a brand-invented wire format.
|
|
24
29
|
*
|
|
25
|
-
*
|
|
26
|
-
* `
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* error — matching core's `LowerOptions.state: Layer.Layer<State, never,
|
|
30
|
-
* StackServices>` contract and alchemy's own convention (e.g. a missing
|
|
31
|
-
* state store is `Effect.die` in `Stack.make`).
|
|
32
|
-
*/
|
|
33
|
-
declare const prismaState: (opts?: {
|
|
34
|
-
/** Defaults to the PRISMA_WORKSPACE_ID environment variable. */workspaceId?: string;
|
|
35
|
-
}) => Layer.Layer<State, never, StackServices>; //#endregion
|
|
36
|
-
//#region src/state/schema.d.ts
|
|
37
|
-
/**
|
|
38
|
-
* Idempotent schema migration for the Prisma-hosted state store — safe to run
|
|
39
|
-
* on every deploy, since `create table if not exists` no-ops once the tables
|
|
40
|
-
* exist. Run this against `sql` before serving a {@link StateService} built
|
|
41
|
-
* by `makePrismaStateService` over the same client.
|
|
30
|
+
* This is the seam that keeps `descriptors/compute.ts` brand-blind: a
|
|
31
|
+
* `ProviderParam` is registered beside its brand's provisioner in
|
|
32
|
+
* `control.ts`; the descriptor asks every registered entry about every
|
|
33
|
+
* exposing service and writes whatever comes back.
|
|
42
34
|
*/
|
|
35
|
+
interface ProviderParam extends ProviderParamEntry {
|
|
36
|
+
/**
|
|
37
|
+
* Every inbound edge's minted ref for this provider — POSSIBLY EMPTY. A
|
|
38
|
+
* provider with no wired consumers is still asked, because "no edges" and
|
|
39
|
+
* "no var" mean different things at boot: an absent var reads as "never
|
|
40
|
+
* provisioned" (local dev, tests). What an empty set means is this param's
|
|
41
|
+
* own call — deny everything, or emit nothing and let its reader fail closed.
|
|
42
|
+
*/
|
|
43
|
+
readonly value: (refs: readonly unknown[]) => Output.Output<unknown> | unknown | undefined;
|
|
44
|
+
}
|
|
43
45
|
//#endregion
|
|
44
|
-
//#region
|
|
45
|
-
|
|
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;
|
|
46
49
|
interface PrismaCloudOptions {
|
|
47
50
|
/** Defaults to the PRISMA_WORKSPACE_ID environment variable. */
|
|
48
51
|
workspaceId?: string;
|
|
49
52
|
/** Defaults to the PRISMA_REGION environment variable when set. */
|
|
50
53
|
region?: ComputeRegion;
|
|
51
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Builds the deploy-side registry from the boot-side list, keyed by brand —
|
|
57
|
+
* throws if a boot-side entry has no registered deploy-side `value(refs)`, so
|
|
58
|
+
* `RESERVED_PROVIDER_PARAMS` stays the single source of which reserved
|
|
59
|
+
* provider params exist: deploy can no longer write a row boot never
|
|
60
|
+
* stashes. Exported (rather than inlined into `PROVIDER_PARAMS` below) so
|
|
61
|
+
* `__tests__/provider-params.test.ts` can drive it directly with a
|
|
62
|
+
* deliberately incomplete value map and watch it throw.
|
|
63
|
+
*/
|
|
64
|
+
declare function buildProviderParams(entries: readonly ProviderParamEntry[], values: ReadonlyMap<symbol, ProviderParam['value']>): ReadonlyMap<symbol, ProviderParam>;
|
|
65
|
+
declare const PROVIDER_PARAMS: ReadonlyMap<symbol, ProviderParam>;
|
|
52
66
|
/** The Prisma Cloud extension descriptor — `prisma-composer.config.ts` lists it under `extensions`. */
|
|
53
|
-
declare const prismaCloud: (opts?: PrismaCloudOptions) => ExtensionDescriptor;
|
|
67
|
+
declare const prismaCloud: (opts?: PrismaCloudOptions) => ExtensionDescriptor;
|
|
54
68
|
//#endregion
|
|
55
|
-
export { PrismaCloudOptions, prismaCloud, prismaState };
|
|
69
|
+
export { PROVIDER_PARAMS, PrismaCloudOptions, buildProviderParams, prismaCloud, prismaState };
|
|
56
70
|
//# sourceMappingURL=control.d.mts.map
|