@payloadcms/db-vercel-postgres 4.0.0-internal.c2b57ce → 4.0.0-internal.cd69eef
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/types.d.ts +5 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/license.md +1 -1
- package/package.json +4 -4
package/dist/types.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ export type VercelPostgresAdapter = {
|
|
|
91
91
|
poolOptions?: Args['pool'];
|
|
92
92
|
} & BasePostgresAdapter;
|
|
93
93
|
declare module 'payload' {
|
|
94
|
-
interface DatabaseAdapter extends Omit<Args, 'idType' | 'logger' | 'migrationDir' | 'pool'>, DrizzleAdapter {
|
|
94
|
+
interface DatabaseAdapter extends Omit<Args, 'extensions' | 'idType' | 'logger' | 'migrationDir' | 'pool'>, DrizzleAdapter {
|
|
95
95
|
afterSchemaInit: PostgresSchemaHook[];
|
|
96
96
|
beforeSchemaInit: PostgresSchemaHook[];
|
|
97
97
|
beginTransaction: (options?: PgTransactionConfig) => Promise<null | number | string>;
|
|
@@ -104,7 +104,7 @@ declare module 'payload' {
|
|
|
104
104
|
* Used for returning properly formed errors from unique fields
|
|
105
105
|
*/
|
|
106
106
|
fieldConstraints: Record<string, Record<string, string>>;
|
|
107
|
-
idType: Args['idType']
|
|
107
|
+
idType: NonNullable<Args['idType']>;
|
|
108
108
|
initializing: Promise<void>;
|
|
109
109
|
localesSuffix?: string;
|
|
110
110
|
logger: DrizzleConfig['logger'];
|
|
@@ -119,13 +119,16 @@ declare module 'payload' {
|
|
|
119
119
|
up: (args: MigrateUpArgs) => Promise<void>;
|
|
120
120
|
}[];
|
|
121
121
|
push: boolean;
|
|
122
|
+
readReplicasAfterWriteInterval: number;
|
|
122
123
|
rejectInitializing: () => void;
|
|
123
124
|
relationshipsSuffix?: string;
|
|
124
125
|
resolveInitializing: () => void;
|
|
125
126
|
schema: Record<string, unknown>;
|
|
126
127
|
schemaName?: Args['schemaName'];
|
|
128
|
+
sessions: DrizzleAdapter['sessions'];
|
|
127
129
|
tableNameMap: Map<string, string>;
|
|
128
130
|
tablesFilter?: string[];
|
|
131
|
+
transactionOptions: PgTransactionConfig | undefined;
|
|
129
132
|
versionsSuffix?: string;
|
|
130
133
|
}
|
|
131
134
|
}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EACV,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,aAAa,EAEb,kBAAkB,EACnB,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEnF,MAAM,MAAM,IAAI,GAAG;IACjB;;;;OAIG;IACH,eAAe,CAAC,EAAE,kBAAkB,EAAE,CAAA;IACtC;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,kBAAkB,EAAE,CAAA;IACvC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,iEAAiE;IACjE,wBAAwB,CAA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AAC,IAAI,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;YAC9C,IAAI,EAAE,MAAM,CAAA;YACZ,EAAE,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;SAC3C,EAAE,CAAA;QACH,IAAI,EAAE,OAAO,CAAA;QACb,8BAA8B,EAAE,MAAM,CAAA;QACtC,kBAAkB,EAAE,MAAM,IAAI,CAAA;QAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAA;QAC5B,mBAAmB,EAAE,MAAM,IAAI,CAAA;QAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QAC/B,UAAU,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,CAAA;QAC/B,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;QACpC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QACjC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;QACvB,kBAAkB,EAAE,mBAAmB,GAAG,SAAS,CAAA;QACnD,cAAc,CAAC,EAAE,MAAM,CAAA;KACxB;CACF"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { DrizzleAdapter } from '@payloadcms/drizzle'\nimport type {\n BasePostgresAdapter,\n GenericEnum,\n MigrateDownArgs,\n MigrateUpArgs,\n PostgresDB,\n PostgresSchemaHook,\n} from '@payloadcms/drizzle/postgres'\nimport type { VercelPool, VercelPostgresPoolConfig } from '@vercel/postgres'\nimport type { DrizzleConfig } from 'drizzle-orm'\nimport type { NodePgDatabase } from 'drizzle-orm/node-postgres'\nimport type { PgSchema, PgTableFn, PgTransactionConfig } from 'drizzle-orm/pg-core'\n\nexport type Args = {\n /**\n * Transform the schema after it's built.\n * You can use it to customize the schema with features that aren't supported by Payload.\n * Examples may include: composite indices, generated columns, vectors\n */\n afterSchemaInit?: PostgresSchemaHook[]\n /**\n * Enable this flag if you want to thread your own ID to create operation data, for example:\n * ```ts\n * // doc created with id 1\n * const doc = await payload.create({ collection: 'posts', data: {id: 1, title: \"my title\"}})\n * ```\n */\n allowIDOnCreate?: boolean\n /**\n * Transform the schema before it's built.\n * You can use it to preserve an existing database schema and if there are any collissions Payload will override them.\n * To generate Drizzle schema from the database, see [Drizzle Kit introspection](https://orm.drizzle.team/kit-docs/commands#introspect--pull)\n */\n beforeSchemaInit?: PostgresSchemaHook[]\n /**\n * Store blocks as JSON column instead of storing them in relational structure.\n */\n blocksAsJSON?: boolean\n connectionString?: string\n /**\n * Pass `true` to disale auto database creation if it doesn't exist.\n * @default false\n */\n disableCreateDatabase?: boolean\n extensions?: string[]\n /**\n * By default, we connect to a local database using the `pg` module instead of `@vercel/postgres`.\n * This is because `@vercel/postgres` doesn't work with local databases.\n * If you still want to use `@vercel/postgres` even locally you can pass `true` here\n * and you'd to spin up the database with a special Neon's Docker Compose setup - https://vercel.com/docs/storage/vercel-postgres/local-development#option-2:-local-postgres-instance-with-docker\n */\n forceUseVercelPostgres?: boolean\n /** Generated schema from payload generate:db-schema file path */\n generateSchemaOutputFile?: string\n idType?: 'serial' | 'uuid' | 'uuidv7'\n localesSuffix?: string\n logger?: DrizzleConfig['logger']\n migrationDir?: string\n /**\n * Optional pool configuration for Vercel Postgres\n * If not provided, vercel/postgres will attempt to use the Vercel environment variables\n */\n pool?: VercelPostgresPoolConfig\n prodMigrations?: {\n down: (args: MigrateDownArgs) => Promise<void>\n name: string\n up: (args: MigrateUpArgs) => Promise<void>\n }[]\n push?: boolean\n readReplicas?: string[]\n /**\n * How long (ms) after a write to keep routing reads to the primary instead\n * of a read replica. Prevents stale reads caused by replication lag.\n * Only relevant when `readReplicas` is set.\n * @default 2000\n */\n readReplicasAfterWriteInterval?: number\n relationshipsSuffix?: string\n /**\n * The schema name to use for the database\n *\n * @experimental This only works when there are not other tables or enums of the same name in the database under a different schema. Awaiting fix from Drizzle.\n */\n schemaName?: string\n tablesFilter?: string[]\n transactionOptions?: false | PgTransactionConfig\n versionsSuffix?: string\n}\n\nexport interface GeneratedDatabaseSchema {\n schemaUntyped: Record<string, unknown>\n}\n\ntype ResolveSchemaType<T> = 'schema' extends keyof T\n ? T['schema']\n : GeneratedDatabaseSchema['schemaUntyped']\n\ntype Drizzle = NodePgDatabase<ResolveSchemaType<GeneratedDatabaseSchema>>\n\nexport type VercelPostgresAdapter = {\n drizzle: Drizzle\n forceUseVercelPostgres?: boolean\n pool?: VercelPool\n poolOptions?: Args['pool']\n} & BasePostgresAdapter\n\ndeclare module 'payload' {\n export interface DatabaseAdapter\n extends Omit<Args, 'idType' | 'logger' | 'migrationDir' | 'pool'>,\n DrizzleAdapter {\n afterSchemaInit: PostgresSchemaHook[]\n beforeSchemaInit: PostgresSchemaHook[]\n beginTransaction: (options?: PgTransactionConfig) => Promise<null | number | string>\n drizzle: Drizzle\n enums: Record<string, GenericEnum>\n extensions: Record<string, boolean>\n extensionsFilter: Set<string>\n /**\n * An object keyed on each table, with a key value pair where the constraint name is the key, followed by the dot-notation field name\n * Used for returning properly formed errors from unique fields\n */\n fieldConstraints: Record<string, Record<string, string>>\n idType: Args['idType']
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { DrizzleAdapter } from '@payloadcms/drizzle'\nimport type {\n BasePostgresAdapter,\n GenericEnum,\n MigrateDownArgs,\n MigrateUpArgs,\n PostgresDB,\n PostgresSchemaHook,\n} from '@payloadcms/drizzle/postgres'\nimport type { VercelPool, VercelPostgresPoolConfig } from '@vercel/postgres'\nimport type { DrizzleConfig } from 'drizzle-orm'\nimport type { NodePgDatabase } from 'drizzle-orm/node-postgres'\nimport type { PgSchema, PgTableFn, PgTransactionConfig } from 'drizzle-orm/pg-core'\n\nexport type Args = {\n /**\n * Transform the schema after it's built.\n * You can use it to customize the schema with features that aren't supported by Payload.\n * Examples may include: composite indices, generated columns, vectors\n */\n afterSchemaInit?: PostgresSchemaHook[]\n /**\n * Enable this flag if you want to thread your own ID to create operation data, for example:\n * ```ts\n * // doc created with id 1\n * const doc = await payload.create({ collection: 'posts', data: {id: 1, title: \"my title\"}})\n * ```\n */\n allowIDOnCreate?: boolean\n /**\n * Transform the schema before it's built.\n * You can use it to preserve an existing database schema and if there are any collissions Payload will override them.\n * To generate Drizzle schema from the database, see [Drizzle Kit introspection](https://orm.drizzle.team/kit-docs/commands#introspect--pull)\n */\n beforeSchemaInit?: PostgresSchemaHook[]\n /**\n * Store blocks as JSON column instead of storing them in relational structure.\n */\n blocksAsJSON?: boolean\n connectionString?: string\n /**\n * Pass `true` to disale auto database creation if it doesn't exist.\n * @default false\n */\n disableCreateDatabase?: boolean\n extensions?: string[]\n /**\n * By default, we connect to a local database using the `pg` module instead of `@vercel/postgres`.\n * This is because `@vercel/postgres` doesn't work with local databases.\n * If you still want to use `@vercel/postgres` even locally you can pass `true` here\n * and you'd to spin up the database with a special Neon's Docker Compose setup - https://vercel.com/docs/storage/vercel-postgres/local-development#option-2:-local-postgres-instance-with-docker\n */\n forceUseVercelPostgres?: boolean\n /** Generated schema from payload generate:db-schema file path */\n generateSchemaOutputFile?: string\n idType?: 'serial' | 'uuid' | 'uuidv7'\n localesSuffix?: string\n logger?: DrizzleConfig['logger']\n migrationDir?: string\n /**\n * Optional pool configuration for Vercel Postgres\n * If not provided, vercel/postgres will attempt to use the Vercel environment variables\n */\n pool?: VercelPostgresPoolConfig\n prodMigrations?: {\n down: (args: MigrateDownArgs) => Promise<void>\n name: string\n up: (args: MigrateUpArgs) => Promise<void>\n }[]\n push?: boolean\n readReplicas?: string[]\n /**\n * How long (ms) after a write to keep routing reads to the primary instead\n * of a read replica. Prevents stale reads caused by replication lag.\n * Only relevant when `readReplicas` is set.\n * @default 2000\n */\n readReplicasAfterWriteInterval?: number\n relationshipsSuffix?: string\n /**\n * The schema name to use for the database\n *\n * @experimental This only works when there are not other tables or enums of the same name in the database under a different schema. Awaiting fix from Drizzle.\n */\n schemaName?: string\n tablesFilter?: string[]\n transactionOptions?: false | PgTransactionConfig\n versionsSuffix?: string\n}\n\nexport interface GeneratedDatabaseSchema {\n schemaUntyped: Record<string, unknown>\n}\n\ntype ResolveSchemaType<T> = 'schema' extends keyof T\n ? T['schema']\n : GeneratedDatabaseSchema['schemaUntyped']\n\ntype Drizzle = NodePgDatabase<ResolveSchemaType<GeneratedDatabaseSchema>>\n\nexport type VercelPostgresAdapter = {\n drizzle: Drizzle\n forceUseVercelPostgres?: boolean\n pool?: VercelPool\n poolOptions?: Args['pool']\n} & BasePostgresAdapter\n\ndeclare module 'payload' {\n export interface DatabaseAdapter\n extends Omit<Args, 'extensions' | 'idType' | 'logger' | 'migrationDir' | 'pool'>,\n DrizzleAdapter {\n afterSchemaInit: PostgresSchemaHook[]\n beforeSchemaInit: PostgresSchemaHook[]\n beginTransaction: (options?: PgTransactionConfig) => Promise<null | number | string>\n drizzle: Drizzle\n enums: Record<string, GenericEnum>\n extensions: Record<string, boolean>\n extensionsFilter: Set<string>\n /**\n * An object keyed on each table, with a key value pair where the constraint name is the key, followed by the dot-notation field name\n * Used for returning properly formed errors from unique fields\n */\n fieldConstraints: Record<string, Record<string, string>>\n idType: NonNullable<Args['idType']>\n initializing: Promise<void>\n localesSuffix?: string\n logger: DrizzleConfig['logger']\n pgSchema?: { table: PgTableFn } | PgSchema\n pool: VercelPool\n poolOptions: Args['pool']\n prodMigrations?: {\n down: (args: MigrateDownArgs) => Promise<void>\n name: string\n up: (args: MigrateUpArgs) => Promise<void>\n }[]\n push: boolean\n readReplicasAfterWriteInterval: number\n rejectInitializing: () => void\n relationshipsSuffix?: string\n resolveInitializing: () => void\n schema: Record<string, unknown>\n schemaName?: Args['schemaName']\n sessions: DrizzleAdapter['sessions']\n tableNameMap: Map<string, string>\n tablesFilter?: string[]\n transactionOptions: PgTransactionConfig | undefined\n versionsSuffix?: string\n }\n}\n"],"names":[],"mappings":"AAoGA,WAKuB"}
|
package/license.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2018-
|
|
3
|
+
Copyright (c) 2018-2026 Payload CMS, LLC <info@payloadcms.com>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
6
|
a copy of this software and associated documentation files (the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/db-vercel-postgres",
|
|
3
|
-
"version": "4.0.0-internal.
|
|
3
|
+
"version": "4.0.0-internal.cd69eef",
|
|
4
4
|
"description": "Vercel Postgres adapter for Payload",
|
|
5
5
|
"homepage": "https://payloadcms.com",
|
|
6
6
|
"repository": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"prompts": "2.4.2",
|
|
67
67
|
"to-snake-case": "1.0.0",
|
|
68
68
|
"uuid": "14.0.0",
|
|
69
|
-
"@payloadcms/drizzle": "4.0.0-internal.
|
|
69
|
+
"@payloadcms/drizzle": "4.0.0-internal.cd69eef"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@hyrious/esbuild-plugin-commonjs": "0.2.6",
|
|
@@ -74,10 +74,10 @@
|
|
|
74
74
|
"@types/to-snake-case": "1.0.0",
|
|
75
75
|
"esbuild": "0.27.1",
|
|
76
76
|
"@payloadcms/eslint-config": "3.28.0",
|
|
77
|
-
"payload": "4.0.0-internal.
|
|
77
|
+
"payload": "4.0.0-internal.cd69eef"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"payload": "4.0.0-internal.
|
|
80
|
+
"payload": "4.0.0-internal.cd69eef"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"build": "rimraf .dist && rimraf tsconfig.tsbuildinfo && pnpm build:types && pnpm build:swc && pnpm build:esbuild && pnpm renamePredefinedMigrations",
|