Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/bucket/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"@aws-sdk/client-s3": "^3.1085.0",
"@prisma/composer": "workspace:0.6.0",
"@prisma/composer-prisma-cloud": "workspace:0.6.0",
"alchemy": "2.0.0-beta.59",
"effect": "4.0.0-beta.93"
"alchemy": "2.0.0-beta.67",
"effect": "4.0.0-beta.103"
},
"devDependencies": {
"@types/bun": "^1.3.13",
Expand Down
6 changes: 3 additions & 3 deletions examples/cron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"destroy": "( set -a; . \"${PRISMA_DEPLOY_ENV:-../../.env}\"; set +a; bun node_modules/.bin/prisma-composer destroy module.ts ${CRON_STACK_NAME:+--name \"$CRON_STACK_NAME\"} )"
},
"dependencies": {
"@effect/platform-bun": "4.0.0-beta.97",
"@effect/platform-bun": "4.0.0-beta.103",
"@prisma/composer": "workspace:0.6.0",
"@prisma/composer-prisma-cloud": "workspace:0.6.0",
"alchemy": "2.0.0-beta.59",
"alchemy": "2.0.0-beta.67",
"arktype": "^2.2.3",
"effect": "4.0.0-beta.93"
"effect": "4.0.0-beta.103"
},
"devDependencies": {
"@prisma/composer": "workspace:0.6.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/pn-widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@prisma-next/postgres": "0.16.0",
"@prisma/composer": "workspace:0.6.0",
"@prisma/composer-prisma-cloud": "workspace:0.6.0",
"effect": "4.0.0-beta.93",
"effect": "4.0.0-beta.103",
"pg": "8.22.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"@aws-sdk/client-s3": "^3.1085.0",
"@prisma/composer": "workspace:0.6.0",
"@prisma/composer-prisma-cloud": "workspace:0.6.0",
"alchemy": "2.0.0-beta.59",
"effect": "4.0.0-beta.93"
"alchemy": "2.0.0-beta.67",
"effect": "4.0.0-beta.103"
},
"devDependencies": {
"@prisma/composer": "workspace:0.6.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
"destroy": "( set -a; . ../../.env; set +a; bun node_modules/.bin/prisma-composer destroy module.ts --production ${STORE_STACK_NAME:+--name \"$STORE_STACK_NAME\"} )"
},
"dependencies": {
"@effect/platform-bun": "4.0.0-beta.97",
"@effect/platform-bun": "4.0.0-beta.103",
"@prisma/composer": "workspace:0.6.0",
"@prisma/composer-prisma-cloud": "workspace:0.6.0",
"@store/catalog": "workspace:0.6.0",
"@store/orders": "workspace:0.6.0",
"@store/promotions": "workspace:0.6.0",
"@store/storefront": "workspace:0.6.0",
"alchemy": "2.0.0-beta.59",
"alchemy": "2.0.0-beta.67",
"arktype": "^2.2.3",
"effect": "4.0.0-beta.93"
"effect": "4.0.0-beta.103"
},
"devDependencies": {
"@types/bun": "^1.3.13",
Expand Down
6 changes: 3 additions & 3 deletions examples/storefront-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"test": "bun test module.test.ts"
},
"dependencies": {
"@effect/platform-bun": "4.0.0-beta.97",
"@effect/platform-bun": "4.0.0-beta.103",
"@prisma/composer": "workspace:0.6.0",
"@prisma/composer-prisma-cloud": "workspace:0.6.0",
"@storefront-auth/auth": "workspace:0.6.0",
"@storefront-auth/storefront": "workspace:0.6.0",
"alchemy": "2.0.0-beta.59",
"alchemy": "2.0.0-beta.67",
"arktype": "^2.2.3",
"effect": "4.0.0-beta.93"
"effect": "4.0.0-beta.103"
},
"devDependencies": {
"@prisma/composer": "workspace:0.6.0",
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
"onlyBuiltDependencies": [
"prisma",
"@prisma/engines"
]
],
"patchedDependencies": {
"alchemy@2.0.0-beta.67": "patches/alchemy@2.0.0-beta.67.patch"
}
},
"version": "0.6.0"
}
4 changes: 2 additions & 2 deletions packages/0-framework/1-core/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
},
"dependencies": {
"@standard-schema/spec": "^1.1.0",
"alchemy": "2.0.0-beta.59",
"effect": "4.0.0-beta.93",
"alchemy": "2.0.0-beta.67",
"effect": "4.0.0-beta.103",
"@internal/foundation": "workspace:0.6.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/1-prisma-cloud/0-lowering/local-target/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"@internal/dev-emulators": "workspace:0.6.0",
"@internal/lowering": "workspace:0.6.0",
"@internal/s3-protocol": "workspace:0.6.0",
"alchemy": "2.0.0-beta.59",
"effect": "4.0.0-beta.93",
"alchemy": "2.0.0-beta.67",
"effect": "4.0.0-beta.103",
"tar": "^7.5.21"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ describe('instance-name drift (delta review finding A, #160)', () => {
const databaseAttributes = await Effect.runPromise(
databaseService.reconcile({
id: 'db',
fqn: 'db',
instanceId: 'db',
news: { projectId: 'p', name: DATABASE_ID, region: 'us-east-1' },
olds: undefined,
Expand All @@ -114,6 +115,7 @@ describe('instance-name drift (delta review finding A, #160)', () => {
const connectionAttributes = await Effect.runPromise(
connectionService.reconcile({
id: 'conn',
fqn: 'conn',
instanceId: 'conn',
news: { databaseId: databaseAttributes.id, name: 'conn' },
olds: undefined,
Expand Down Expand Up @@ -158,6 +160,7 @@ describe('instance-name drift (delta review finding A, #160)', () => {
const databaseAttributes = await Effect.runPromise(
databaseService.reconcile({
id: 'db',
fqn: 'db',
instanceId: 'db',
news: { projectId: 'p', name: DOTTED_ID, region: 'us-east-1' },
olds: undefined,
Expand All @@ -178,6 +181,7 @@ describe('instance-name drift (delta review finding A, #160)', () => {
const connectionAttributes = await Effect.runPromise(
connectionService.reconcile({
id: 'conn',
fqn: 'conn',
instanceId: 'conn',
news: { databaseId: databaseAttributes.id, name: 'conn' },
olds: undefined,
Expand Down
4 changes: 2 additions & 2 deletions packages/1-prisma-cloud/0-lowering/lowering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@internal/core": "workspace:0.6.0",
"@internal/foundation": "workspace:0.6.0",
"@prisma/management-api-sdk": "^1.50.0",
"alchemy": "2.0.0-beta.59",
"effect": "4.0.0-beta.93",
"alchemy": "2.0.0-beta.67",
"effect": "4.0.0-beta.103",
"postgres": "^3.4.9"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ describe('delete retry wiring (Effect.retry({ schedule, while }))', () => {
return yield* Effect.fail(deleteNotSafeError);
});

const shortCappedSchedule = Schedule.both(
Schedule.spaced('1 millis'),
Schedule.during('20 millis'),
const shortCappedSchedule = Schedule.spaced('1 millis').pipe(
Schedule.upTo({ duration: '20 millis' }),
);

const outcome = await Effect.runPromiseExit(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
const reconcile = (output: ServiceKeyAttributes | undefined) =>
serviceKeyProviderService.reconcile({
id: 'key',
fqn: 'key',
instanceId: 'key',
news: {},
olds: output === undefined ? undefined : {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ export const isDeleteNotSafeYet = (error: PrismaApiError): boolean =>
* for the platform to finish stopping the deployment, short enough to still
* fail loudly (rather than hang forever) if it never does.
*/
export const deleteSafeRetrySchedule = Schedule.both(
Schedule.exponential('2 seconds', 2),
Schedule.during('5 minutes'),
export const deleteSafeRetrySchedule = Schedule.exponential('2 seconds', 2).pipe(
Schedule.upTo({ duration: '5 minutes' }),
);

/** Every region Prisma Compute serves — the runtime source of truth; `ComputeRegion` is derived from it so the two can never drift. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const DeploymentProvider = () =>
}),
),
),
Effect.retry(Schedule.both(Schedule.spaced('2 seconds'), Schedule.during('2 minutes'))),
Effect.retry(Schedule.spaced('2 seconds').pipe(Schedule.upTo({ duration: '2 minutes' }))),
);

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const prismaStateLayer = (ids: {
// workspace) can refuse connections for a while after the Management
// API returns it, so retry the window out before failing.
yield* migratePrismaState(sql).pipe(
Effect.retry(Schedule.both(Schedule.spaced('5 seconds'), Schedule.during('2 minutes'))),
Effect.retry(Schedule.spaced('5 seconds').pipe(Schedule.upTo({ duration: '2 minutes' }))),
Effect.mapError(bootstrapError('schema migration')),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ export const isColdStartConnectError = (error: unknown): boolean => {
};

/** The same ~2-minute budget the bootstrap migration uses (`layer.ts`): retry every 5s, up to 2 minutes. */
const COLD_START_SCHEDULE = Schedule.both(
Schedule.spaced('5 seconds'),
Schedule.during('2 minutes'),
const COLD_START_SCHEDULE = Schedule.spaced('5 seconds').pipe(
Schedule.upTo({ duration: '2 minutes' }),
);

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/1-prisma-cloud/1-extensions/target/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"@prisma-next/postgres": "0.16.0",
"@prisma-next/sql-contract": "0.16.0",
"@standard-schema/spec": "^1.1.0",
"alchemy": "2.0.0-beta.59",
"alchemy": "2.0.0-beta.67",
"arktype": "^2.2.3",
"effect": "4.0.0-beta.93",
"effect": "4.0.0-beta.103",
"pathe": "^2.0.3",
"pg": "8.22.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { envSecret } from '../secret.ts';
const reconcile = (bytes: number, output: GeneratedParamAttributes | undefined) =>
generatedParamProviderService.reconcile({
id: 'gen',
fqn: 'gen',
instanceId: 'gen',
news: { bytes },
olds: output === undefined ? undefined : { bytes },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ describe.skipIf(pg === undefined)('PgWarm reconcile warms a real database', () =
const reconcile = (url: string) =>
pgWarmProviderService.reconcile({
id: 'db',
fqn: 'db',
instanceId: 'db',
news: { url },
olds: undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ describe.skipIf(pg === undefined)('PnMigration reconcile routes through applyPnM
const reconcile = (contractJson: unknown) =>
pnMigrationProviderService.reconcile({
id: 'db',
fqn: 'db',
instanceId: 'db',
news: {
url,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
const reconcile = (output: S3CredentialsAttributes | undefined) =>
s3CredentialsProviderService.reconcile({
id: 'creds',
fqn: 'creds',
instanceId: 'creds',
news: {},
olds: output === undefined ? undefined : {},
Expand Down
10 changes: 5 additions & 5 deletions packages/9-public/composer-prisma-cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@effect/platform-bun": "4.0.0-beta.93",
"@effect/platform-node": "4.0.0-beta.93",
"@effect/platform-node-shared": "4.0.0-beta.93",
"@effect/platform-bun": "4.0.0-beta.103",
"@effect/platform-node": "4.0.0-beta.103",
"@effect/platform-node-shared": "4.0.0-beta.103",
"@prisma-next/cli": "0.16.0",
"@prisma-next/config-loader": "0.16.0",
"@prisma-next/contract": "0.16.0",
Expand All @@ -51,9 +51,9 @@
"@prisma/composer": "workspace:0.6.0",
"@prisma/management-api-sdk": "^1.50.0",
"@standard-schema/spec": "^1.1.0",
"alchemy": "2.0.0-beta.59",
"alchemy": "2.0.0-beta.67",
"arktype": "^2.2.3",
"effect": "4.0.0-beta.93",
"effect": "4.0.0-beta.103",
"jose": "^6.1.3",
"pathe": "^2.0.3",
"pg": "8.22.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/9-public/composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@effect/vitest": "4.0.0-beta.93",
"@effect/vitest": "4.0.0-beta.103",
"@standard-schema/spec": "^1.1.0",
"alchemy": "2.0.0-beta.59",
"alchemy": "2.0.0-beta.67",
"arktype": "^2.2.3",
"c12": "^3.3.4",
"clipanion": "^3.2.1",
"effect": "4.0.0-beta.93",
"effect": "4.0.0-beta.103",
"esbuild": "^0.28.1",
"postgres": "^3.4.9",
"@prisma/management-api-sdk": "^1.50.0"
Expand Down
13 changes: 13 additions & 0 deletions patches/alchemy@2.0.0-beta.67.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/lib/Resource.d.ts b/lib/Resource.d.ts
index 4ddd84f22ded4d39f6690da7bffe19de527a2db8..e7b23ba27bf4c3837690acb9b866f56c0264a772 100644
--- a/lib/Resource.d.ts
+++ b/lib/Resource.d.ts
@@ -35,7 +35,7 @@ export interface ResourceClassLike<R extends ResourceLike> {
* `ProviderService` by `Provider.succeed`/`Provider.effect` so provider
* lookup can resolve state persisted under a pre-rename type.
*/
- Aliases?: readonly string[];
+ Aliases?: readonly string[] | undefined;
}
export type ResourceClass<R extends ResourceLike> = ResourceConstructor<R, R["Providers"] extends undefined ? Provider<R> : R["Providers"]> & Effect.Effect<ResourceConstructor<R>> & {
Self: Self<R>;
Loading
Loading