@payloadcms/db-postgres 3.32.0-internal.f2e77bd → 3.33.0-canary.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/exports/types-deprecated.d.ts +14 -0
- package/dist/exports/types-deprecated.d.ts.map +1 -0
- package/dist/exports/types-deprecated.js +5 -0
- package/dist/exports/types-deprecated.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { Args as _Args, GeneratedDatabaseSchema as _GeneratedDatabaseSchema, PostgresAdapter as _PostgresAdapter } from '../types.js';
|
2
|
+
/**
|
3
|
+
* @deprecated - import from `@payloadcms/db-postgres` instead
|
4
|
+
*/
|
5
|
+
export type Args = _Args;
|
6
|
+
/**
|
7
|
+
* @deprecated - import from `@payloadcms/db-postgres` instead
|
8
|
+
*/
|
9
|
+
export type GeneratedDatabaseSchema = _GeneratedDatabaseSchema;
|
10
|
+
/**
|
11
|
+
* @deprecated - import from `@payloadcms/db-postgres` instead
|
12
|
+
*/
|
13
|
+
export type PostgresAdapter = _PostgresAdapter;
|
14
|
+
//# sourceMappingURL=types-deprecated.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types-deprecated.d.ts","sourceRoot":"","sources":["../../src/exports/types-deprecated.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,IAAI,KAAK,EACb,uBAAuB,IAAI,wBAAwB,EACnD,eAAe,IAAI,gBAAgB,EACpC,MAAM,aAAa,CAAA;AAEpB;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,KAAK,CAAA;AAExB;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,wBAAwB,CAAA;AAE9D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/exports/types-deprecated.ts"],"sourcesContent":["import type {\n Args as _Args,\n GeneratedDatabaseSchema as _GeneratedDatabaseSchema,\n PostgresAdapter as _PostgresAdapter,\n} from '../types.js'\n\n/**\n * @deprecated - import from `@payloadcms/db-postgres` instead\n */\nexport type Args = _Args\n\n/**\n * @deprecated - import from `@payloadcms/db-postgres` instead\n */\nexport type GeneratedDatabaseSchema = _GeneratedDatabaseSchema\n\n/**\n * @deprecated - import from `@payloadcms/db-postgres` instead\n */\nexport type PostgresAdapter = _PostgresAdapter\n"],"names":[],"mappings":"AAgBA;;CAEC,GACD,WAA8C"}
|
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { DatabaseAdapterObj } from 'payload';
|
2
2
|
import type { Args, PostgresAdapter } from './types.js';
|
3
3
|
export declare function postgresAdapter(args: Args): DatabaseAdapterObj<PostgresAdapter>;
|
4
|
+
export type { Args as PostgresAdapterArgs, GeneratedDatabaseSchema, PostgresAdapter, } from './types.js';
|
4
5
|
export type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/drizzle/postgres';
|
5
6
|
export { geometryColumn } from '@payloadcms/drizzle/postgres';
|
6
7
|
export { sql } from 'drizzle-orm';
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAW,MAAM,SAAS,CAAA;AA0D1D,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAMvD,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,kBAAkB,CAAC,eAAe,CAAC,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAW,MAAM,SAAS,CAAA;AA0D1D,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAMvD,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAuJ/E;AAED,YAAY,EACV,IAAI,IAAI,mBAAmB,EAC3B,uBAAuB,EACvB,eAAe,GAChB,MAAM,YAAY,CAAA;AACnB,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { DatabaseAdapterObj, Payload } from 'payload'\n\nimport {\n beginTransaction,\n buildCreateMigration,\n commitTransaction,\n count,\n countGlobalVersions,\n countVersions,\n create,\n createGlobal,\n createGlobalVersion,\n createSchemaGenerator,\n createVersion,\n deleteMany,\n deleteOne,\n deleteVersions,\n destroy,\n find,\n findGlobal,\n findGlobalVersions,\n findMigrationDir,\n findOne,\n findVersions,\n migrate,\n migrateDown,\n migrateFresh,\n migrateRefresh,\n migrateReset,\n migrateStatus,\n operatorMap,\n queryDrafts,\n rollbackTransaction,\n updateGlobal,\n updateGlobalVersion,\n updateJobs,\n updateMany,\n updateOne,\n updateVersion,\n} from '@payloadcms/drizzle'\nimport {\n columnToCodeConverter,\n countDistinct,\n createDatabase,\n createExtensions,\n createJSONQuery,\n defaultDrizzleSnapshot,\n deleteWhere,\n dropDatabase,\n execute,\n init,\n insert,\n requireDrizzleKit,\n} from '@payloadcms/drizzle/postgres'\nimport { pgEnum, pgSchema, pgTable } from 'drizzle-orm/pg-core'\nimport { createDatabaseAdapter, defaultBeginTransaction } from 'payload'\nimport { fileURLToPath } from 'url'\n\nimport type { Args, PostgresAdapter } from './types.js'\n\nimport { connect } from './connect.js'\n\nconst filename = fileURLToPath(import.meta.url)\n\nexport function postgresAdapter(args: Args): DatabaseAdapterObj<PostgresAdapter> {\n const postgresIDType = args.idType || 'serial'\n const payloadIDType = postgresIDType === 'serial' ? 'number' : 'text'\n const allowIDOnCreate = args.allowIDOnCreate ?? false\n\n function adapter({ payload }: { payload: Payload }) {\n const migrationDir = findMigrationDir(args.migrationDir)\n let resolveInitializing\n let rejectInitializing\n let adapterSchema: PostgresAdapter['pgSchema']\n\n const initializing = new Promise<void>((res, rej) => {\n resolveInitializing = res\n rejectInitializing = rej\n })\n\n if (args.schemaName) {\n adapterSchema = pgSchema(args.schemaName)\n } else {\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n adapterSchema = { enum: pgEnum, table: pgTable }\n }\n\n const extensions = (args.extensions ?? []).reduce(\n (acc, name) => {\n acc[name] = true\n return acc\n },\n {} as Record<string, boolean>,\n )\n\n return createDatabaseAdapter<PostgresAdapter>({\n name: 'postgres',\n afterSchemaInit: args.afterSchemaInit ?? [],\n allowIDOnCreate,\n beforeSchemaInit: args.beforeSchemaInit ?? [],\n createDatabase,\n createExtensions,\n createMigration: buildCreateMigration({\n executeMethod: 'execute',\n filename,\n sanitizeStatements({ sqlExecute, statements }) {\n return `${sqlExecute}\\n ${statements.join('\\n')}\\`)`\n },\n }),\n defaultDrizzleSnapshot,\n disableCreateDatabase: args.disableCreateDatabase ?? false,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n drizzle: undefined,\n enums: {},\n extensions,\n features: {\n json: true,\n },\n fieldConstraints: {},\n generateSchema: createSchemaGenerator({\n columnToCodeConverter,\n corePackageSuffix: 'pg-core',\n defaultOutputFile: args.generateSchemaOutputFile,\n enumImport: 'pgEnum',\n schemaImport: 'pgSchema',\n tableImport: 'pgTable',\n }),\n idType: postgresIDType,\n initializing,\n localesSuffix: args.localesSuffix || '_locales',\n logger: args.logger,\n operators: operatorMap,\n pgSchema: adapterSchema,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n pool: undefined,\n poolOptions: args.pool,\n prodMigrations: args.prodMigrations,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n push: args.push,\n relations: {},\n relationshipsSuffix: args.relationshipsSuffix || '_rels',\n schema: {},\n schemaName: args.schemaName,\n sessions: {},\n tableNameMap: new Map<string, string>(),\n tables: {},\n tablesFilter: args.tablesFilter,\n transactionOptions: args.transactionOptions || undefined,\n versionsSuffix: args.versionsSuffix || '_v',\n\n // DatabaseAdapter\n beginTransaction:\n args.transactionOptions === false ? defaultBeginTransaction() : beginTransaction,\n commitTransaction,\n connect,\n count,\n countDistinct,\n countGlobalVersions,\n countVersions,\n create,\n createGlobal,\n createGlobalVersion,\n createJSONQuery,\n createVersion,\n defaultIDType: payloadIDType,\n deleteMany,\n deleteOne,\n deleteVersions,\n deleteWhere,\n destroy,\n dropDatabase,\n execute,\n find,\n findGlobal,\n findGlobalVersions,\n updateJobs,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n findOne,\n findVersions,\n indexes: new Set<string>(),\n init,\n insert,\n migrate,\n migrateDown,\n migrateFresh,\n migrateRefresh,\n migrateReset,\n migrateStatus,\n migrationDir,\n packageName: '@payloadcms/db-postgres',\n payload,\n queryDrafts,\n rawRelations: {},\n rawTables: {},\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n rejectInitializing,\n requireDrizzleKit,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n resolveInitializing,\n rollbackTransaction,\n updateGlobal,\n updateGlobalVersion,\n updateMany,\n updateOne,\n updateVersion,\n upsert: updateOne,\n })\n }\n\n return {\n allowIDOnCreate,\n defaultIDType: payloadIDType,\n init: adapter,\n }\n}\n\nexport type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/drizzle/postgres'\nexport { geometryColumn } from '@payloadcms/drizzle/postgres'\nexport { sql } from 'drizzle-orm'\n"],"names":["beginTransaction","buildCreateMigration","commitTransaction","count","countGlobalVersions","countVersions","create","createGlobal","createGlobalVersion","createSchemaGenerator","createVersion","deleteMany","deleteOne","deleteVersions","destroy","find","findGlobal","findGlobalVersions","findMigrationDir","findOne","findVersions","migrate","migrateDown","migrateFresh","migrateRefresh","migrateReset","migrateStatus","operatorMap","queryDrafts","rollbackTransaction","updateGlobal","updateGlobalVersion","updateJobs","updateMany","updateOne","updateVersion","columnToCodeConverter","countDistinct","createDatabase","createExtensions","createJSONQuery","defaultDrizzleSnapshot","deleteWhere","dropDatabase","execute","init","insert","requireDrizzleKit","pgEnum","pgSchema","pgTable","createDatabaseAdapter","defaultBeginTransaction","fileURLToPath","connect","filename","url","postgresAdapter","args","postgresIDType","idType","payloadIDType","allowIDOnCreate","adapter","payload","migrationDir","resolveInitializing","rejectInitializing","adapterSchema","initializing","Promise","res","rej","schemaName","enum","table","extensions","reduce","acc","name","afterSchemaInit","beforeSchemaInit","createMigration","executeMethod","sanitizeStatements","sqlExecute","statements","join","disableCreateDatabase","drizzle","undefined","enums","features","json","fieldConstraints","generateSchema","corePackageSuffix","defaultOutputFile","generateSchemaOutputFile","enumImport","schemaImport","tableImport","localesSuffix","logger","operators","pool","poolOptions","prodMigrations","push","relations","relationshipsSuffix","schema","sessions","tableNameMap","Map","tables","tablesFilter","transactionOptions","versionsSuffix","defaultIDType","indexes","Set","packageName","rawRelations","rawTables","upsert","geometryColumn","sql"],"mappings":"AAEA,SACEA,gBAAgB,EAChBC,oBAAoB,EACpBC,iBAAiB,EACjBC,KAAK,EACLC,mBAAmB,EACnBC,aAAa,EACbC,MAAM,EACNC,YAAY,EACZC,mBAAmB,EACnBC,qBAAqB,EACrBC,aAAa,EACbC,UAAU,EACVC,SAAS,EACTC,cAAc,EACdC,OAAO,EACPC,IAAI,EACJC,UAAU,EACVC,kBAAkB,EAClBC,gBAAgB,EAChBC,OAAO,EACPC,YAAY,EACZC,OAAO,EACPC,WAAW,EACXC,YAAY,EACZC,cAAc,EACdC,YAAY,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,4BAA4BpD;YAClEE;YACAoD;YACAnD;YACAkC;YACAjC;YACAC;YACAC;YACAC;YACAC;YACAgC;YACA9B;YACA6G,eAAe1D;YACflD;YACAC;YACAC;YACA6B;YACA5B;YACA6B;YACAC;YACA7B;YACAC;YACAC;YACAe;YACA,oFAAoF;YACpFb;YACAC;YACAoG,SAAS,IAAIC;YACb5E;YACAC;YACAzB;YACAC;YACAC;YACAC;YACAC;YACAC;YACAuC;YACAyD,aAAa;YACb1D;YACApC;YACA+F,cAAc,CAAC;YACfC,WAAW,CAAC;YACZ,oFAAoF;YACpFzD;YACApB;YACA,oFAAoF;YACpFmB;YACArC;YACAC;YACAC;YACAE;YACAC;YACAC;YACA0F,QAAQ3F;QACV;IACF;IAEA,OAAO;QACL4B;QACAyD,eAAe1D;QACfhB,MAAMkB;IACR;AACF;AAGA,SAAS+D,cAAc,QAAQ,+BAA8B;AAC7D,SAASC,GAAG,QAAQ,cAAa"}
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { DatabaseAdapterObj, Payload } from 'payload'\n\nimport {\n beginTransaction,\n buildCreateMigration,\n commitTransaction,\n count,\n countGlobalVersions,\n countVersions,\n create,\n createGlobal,\n createGlobalVersion,\n createSchemaGenerator,\n createVersion,\n deleteMany,\n deleteOne,\n deleteVersions,\n destroy,\n find,\n findGlobal,\n findGlobalVersions,\n findMigrationDir,\n findOne,\n findVersions,\n migrate,\n migrateDown,\n migrateFresh,\n migrateRefresh,\n migrateReset,\n migrateStatus,\n operatorMap,\n queryDrafts,\n rollbackTransaction,\n updateGlobal,\n updateGlobalVersion,\n updateJobs,\n updateMany,\n updateOne,\n updateVersion,\n} from '@payloadcms/drizzle'\nimport {\n columnToCodeConverter,\n countDistinct,\n createDatabase,\n createExtensions,\n createJSONQuery,\n defaultDrizzleSnapshot,\n deleteWhere,\n dropDatabase,\n execute,\n init,\n insert,\n requireDrizzleKit,\n} from '@payloadcms/drizzle/postgres'\nimport { pgEnum, pgSchema, pgTable } from 'drizzle-orm/pg-core'\nimport { createDatabaseAdapter, defaultBeginTransaction } from 'payload'\nimport { fileURLToPath } from 'url'\n\nimport type { Args, PostgresAdapter } from './types.js'\n\nimport { connect } from './connect.js'\n\nconst filename = fileURLToPath(import.meta.url)\n\nexport function postgresAdapter(args: Args): DatabaseAdapterObj<PostgresAdapter> {\n const postgresIDType = args.idType || 'serial'\n const payloadIDType = postgresIDType === 'serial' ? 'number' : 'text'\n const allowIDOnCreate = args.allowIDOnCreate ?? false\n\n function adapter({ payload }: { payload: Payload }) {\n const migrationDir = findMigrationDir(args.migrationDir)\n let resolveInitializing\n let rejectInitializing\n let adapterSchema: PostgresAdapter['pgSchema']\n\n const initializing = new Promise<void>((res, rej) => {\n resolveInitializing = res\n rejectInitializing = rej\n })\n\n if (args.schemaName) {\n adapterSchema = pgSchema(args.schemaName)\n } else {\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n adapterSchema = { enum: pgEnum, table: pgTable }\n }\n\n const extensions = (args.extensions ?? []).reduce(\n (acc, name) => {\n acc[name] = true\n return acc\n },\n {} as Record<string, boolean>,\n )\n\n return createDatabaseAdapter<PostgresAdapter>({\n name: 'postgres',\n afterSchemaInit: args.afterSchemaInit ?? [],\n allowIDOnCreate,\n beforeSchemaInit: args.beforeSchemaInit ?? [],\n createDatabase,\n createExtensions,\n createMigration: buildCreateMigration({\n executeMethod: 'execute',\n filename,\n sanitizeStatements({ sqlExecute, statements }) {\n return `${sqlExecute}\\n ${statements.join('\\n')}\\`)`\n },\n }),\n defaultDrizzleSnapshot,\n disableCreateDatabase: args.disableCreateDatabase ?? false,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n drizzle: undefined,\n enums: {},\n extensions,\n features: {\n json: true,\n },\n fieldConstraints: {},\n generateSchema: createSchemaGenerator({\n columnToCodeConverter,\n corePackageSuffix: 'pg-core',\n defaultOutputFile: args.generateSchemaOutputFile,\n enumImport: 'pgEnum',\n schemaImport: 'pgSchema',\n tableImport: 'pgTable',\n }),\n idType: postgresIDType,\n initializing,\n localesSuffix: args.localesSuffix || '_locales',\n logger: args.logger,\n operators: operatorMap,\n pgSchema: adapterSchema,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n pool: undefined,\n poolOptions: args.pool,\n prodMigrations: args.prodMigrations,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n push: args.push,\n relations: {},\n relationshipsSuffix: args.relationshipsSuffix || '_rels',\n schema: {},\n schemaName: args.schemaName,\n sessions: {},\n tableNameMap: new Map<string, string>(),\n tables: {},\n tablesFilter: args.tablesFilter,\n transactionOptions: args.transactionOptions || undefined,\n versionsSuffix: args.versionsSuffix || '_v',\n\n // DatabaseAdapter\n beginTransaction:\n args.transactionOptions === false ? defaultBeginTransaction() : beginTransaction,\n commitTransaction,\n connect,\n count,\n countDistinct,\n countGlobalVersions,\n countVersions,\n create,\n createGlobal,\n createGlobalVersion,\n createJSONQuery,\n createVersion,\n defaultIDType: payloadIDType,\n deleteMany,\n deleteOne,\n deleteVersions,\n deleteWhere,\n destroy,\n dropDatabase,\n execute,\n find,\n findGlobal,\n findGlobalVersions,\n updateJobs,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n findOne,\n findVersions,\n indexes: new Set<string>(),\n init,\n insert,\n migrate,\n migrateDown,\n migrateFresh,\n migrateRefresh,\n migrateReset,\n migrateStatus,\n migrationDir,\n packageName: '@payloadcms/db-postgres',\n payload,\n queryDrafts,\n rawRelations: {},\n rawTables: {},\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n rejectInitializing,\n requireDrizzleKit,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n resolveInitializing,\n rollbackTransaction,\n updateGlobal,\n updateGlobalVersion,\n updateMany,\n updateOne,\n updateVersion,\n upsert: updateOne,\n })\n }\n\n return {\n name: 'postgres',\n allowIDOnCreate,\n defaultIDType: payloadIDType,\n init: adapter,\n }\n}\n\nexport type {\n Args as PostgresAdapterArgs,\n GeneratedDatabaseSchema,\n PostgresAdapter,\n} from './types.js'\nexport type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/drizzle/postgres'\nexport { geometryColumn } from '@payloadcms/drizzle/postgres'\nexport { sql } from 'drizzle-orm'\n"],"names":["beginTransaction","buildCreateMigration","commitTransaction","count","countGlobalVersions","countVersions","create","createGlobal","createGlobalVersion","createSchemaGenerator","createVersion","deleteMany","deleteOne","deleteVersions","destroy","find","findGlobal","findGlobalVersions","findMigrationDir","findOne","findVersions","migrate","migrateDown","migrateFresh","migrateRefresh","migrateReset","migrateStatus","operatorMap","queryDrafts","rollbackTransaction","updateGlobal","updateGlobalVersion","updateJobs","updateMany","updateOne","updateVersion","columnToCodeConverter","countDistinct","createDatabase","createExtensions","createJSONQuery","defaultDrizzleSnapshot","deleteWhere","dropDatabase","execute","init","insert","requireDrizzleKit","pgEnum","pgSchema","pgTable","createDatabaseAdapter","defaultBeginTransaction","fileURLToPath","connect","filename","url","postgresAdapter","args","postgresIDType","idType","payloadIDType","allowIDOnCreate","adapter","payload","migrationDir","resolveInitializing","rejectInitializing","adapterSchema","initializing","Promise","res","rej","schemaName","enum","table","extensions","reduce","acc","name","afterSchemaInit","beforeSchemaInit","createMigration","executeMethod","sanitizeStatements","sqlExecute","statements","join","disableCreateDatabase","drizzle","undefined","enums","features","json","fieldConstraints","generateSchema","corePackageSuffix","defaultOutputFile","generateSchemaOutputFile","enumImport","schemaImport","tableImport","localesSuffix","logger","operators","pool","poolOptions","prodMigrations","push","relations","relationshipsSuffix","schema","sessions","tableNameMap","Map","tables","tablesFilter","transactionOptions","versionsSuffix","defaultIDType","indexes","Set","packageName","rawRelations","rawTables","upsert","geometryColumn","sql"],"mappings":"AAEA,SACEA,gBAAgB,EAChBC,oBAAoB,EACpBC,iBAAiB,EACjBC,KAAK,EACLC,mBAAmB,EACnBC,aAAa,EACbC,MAAM,EACNC,YAAY,EACZC,mBAAmB,EACnBC,qB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c,IAAIC;YAClBC,QAAQ,CAAC;YACTC,cAAc1D,KAAK0D,YAAY;YAC/BC,oBAAoB3D,KAAK2D,kBAAkB,IAAI3B;YAC/C4B,gBAAgB5D,KAAK4D,cAAc,IAAI;YAEvC,kBAAkB;YAClBtH,kBACE0D,KAAK2D,kBAAkB,KAAK,QAAQjE,4BAA4BpD;YAClEE;YACAoD;YACAnD;YACAkC;YACAjC;YACAC;YACAC;YACAC;YACAC;YACAgC;YACA9B;YACA6G,eAAe1D;YACflD;YACAC;YACAC;YACA6B;YACA5B;YACA6B;YACAC;YACA7B;YACAC;YACAC;YACAe;YACA,oFAAoF;YACpFb;YACAC;YACAoG,SAAS,IAAIC;YACb5E;YACAC;YACAzB;YACAC;YACAC;YACAC;YACAC;YACAC;YACAuC;YACAyD,aAAa;YACb1D;YACApC;YACA+F,cAAc,CAAC;YACfC,WAAW,CAAC;YACZ,oFAAoF;YACpFzD;YACApB;YACA,oFAAoF;YACpFmB;YACArC;YACAC;YACAC;YACAE;YACAC;YACAC;YACA0F,QAAQ3F;QACV;IACF;IAEA,OAAO;QACL6C,MAAM;QACNjB;QACAyD,eAAe1D;QACfhB,MAAMkB;IACR;AACF;AAQA,SAAS+D,cAAc,QAAQ,+BAA8B;AAC7D,SAASC,GAAG,QAAQ,cAAa"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@payloadcms/db-postgres",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.33.0-canary.0",
|
4
4
|
"description": "The officially supported Postgres database adapter for Payload",
|
5
5
|
"homepage": "https://payloadcms.com",
|
6
6
|
"repository": {
|
@@ -25,9 +25,9 @@
|
|
25
25
|
"default": "./dist/index.js"
|
26
26
|
},
|
27
27
|
"./types": {
|
28
|
-
"import": "./dist/types.js",
|
29
|
-
"types": "./dist/types.d.ts",
|
30
|
-
"default": "./dist/types.js"
|
28
|
+
"import": "./dist/exports/types-deprecated.js",
|
29
|
+
"types": "./dist/exports/types-deprecated.d.ts",
|
30
|
+
"default": "./dist/exports/types-deprecated.js"
|
31
31
|
},
|
32
32
|
"./migration-utils": {
|
33
33
|
"import": "./dist/exports/migration-utils.js",
|
@@ -70,17 +70,17 @@
|
|
70
70
|
"prompts": "2.4.2",
|
71
71
|
"to-snake-case": "1.0.0",
|
72
72
|
"uuid": "10.0.0",
|
73
|
-
"@payloadcms/drizzle": "3.
|
73
|
+
"@payloadcms/drizzle": "3.33.0-canary.0"
|
74
74
|
},
|
75
75
|
"devDependencies": {
|
76
76
|
"@hyrious/esbuild-plugin-commonjs": "^0.2.4",
|
77
77
|
"@types/to-snake-case": "1.0.0",
|
78
78
|
"esbuild": "0.24.2",
|
79
|
-
"
|
80
|
-
"
|
79
|
+
"payload": "3.33.0-canary.0",
|
80
|
+
"@payloadcms/eslint-config": "3.28.0"
|
81
81
|
},
|
82
82
|
"peerDependencies": {
|
83
|
-
"payload": "3.
|
83
|
+
"payload": "3.33.0-canary.0"
|
84
84
|
},
|
85
85
|
"scripts": {
|
86
86
|
"build": "rimraf .dist && rimraf tsconfig.tsbuildinfo && pnpm build:types && pnpm build:swc && pnpm build:esbuild && pnpm renamePredefinedMigrations",
|