@payloadcms/drizzle
Advanced tools
Comparing version 3.0.0-canary.e198dc5 to 3.0.0-canary.e1fc0e0
import type { CreateGlobalVersionArgs, TypeWithID, TypeWithVersion } from 'payload'; | ||
import type { DrizzleAdapter } from './types.js'; | ||
export declare function createGlobalVersion<T extends TypeWithID>(this: DrizzleAdapter, { autosave, globalSlug, publishedLocale, req, snapshot, versionData, }: CreateGlobalVersionArgs): Promise<TypeWithVersion<T>>; | ||
export declare function createGlobalVersion<T extends TypeWithID>(this: DrizzleAdapter, { autosave, createdAt, globalSlug, publishedLocale, req, snapshot, updatedAt, versionData, }: CreateGlobalVersionArgs): Promise<TypeWithVersion<T>>; | ||
//# sourceMappingURL=createGlobalVersion.d.ts.map |
@@ -5,3 +5,3 @@ import { sql } from 'drizzle-orm'; | ||
import { upsertRow } from './upsertRow/index.js'; | ||
export async function createGlobalVersion({ autosave, globalSlug, publishedLocale, req = {}, snapshot, versionData }) { | ||
export async function createGlobalVersion({ autosave, createdAt, globalSlug, publishedLocale, req = {}, snapshot, updatedAt, versionData }) { | ||
const db = this.sessions[await req?.transactionID]?.db || this.drizzle; | ||
@@ -14,5 +14,7 @@ const global = this.payload.globals.config.find(({ slug })=>slug === globalSlug); | ||
autosave, | ||
createdAt, | ||
latest: true, | ||
publishedLocale, | ||
snapshot, | ||
updatedAt, | ||
version: versionData | ||
@@ -19,0 +21,0 @@ }, |
import type { CreateVersionArgs, TypeWithID, TypeWithVersion } from 'payload'; | ||
import type { DrizzleAdapter } from './types.js'; | ||
export declare function createVersion<T extends TypeWithID>(this: DrizzleAdapter, { autosave, collectionSlug, parent, publishedLocale, req, snapshot, versionData, }: CreateVersionArgs<T>): Promise<TypeWithVersion<T>>; | ||
export declare function createVersion<T extends TypeWithID>(this: DrizzleAdapter, { autosave, collectionSlug, createdAt, parent, publishedLocale, req, snapshot, updatedAt, versionData, }: CreateVersionArgs<T>): Promise<TypeWithVersion<T>>; | ||
//# sourceMappingURL=createVersion.d.ts.map |
@@ -5,3 +5,3 @@ import { sql } from 'drizzle-orm'; | ||
import { upsertRow } from './upsertRow/index.js'; | ||
export async function createVersion({ autosave, collectionSlug, parent, publishedLocale, req = {}, snapshot, versionData }) { | ||
export async function createVersion({ autosave, collectionSlug, createdAt, parent, publishedLocale, req = {}, snapshot, updatedAt, versionData }) { | ||
const db = this.sessions[await req?.transactionID]?.db || this.drizzle; | ||
@@ -19,2 +19,3 @@ const collection = this.payload.collections[collectionSlug].config; | ||
autosave, | ||
createdAt, | ||
latest: true, | ||
@@ -24,7 +25,5 @@ parent, | ||
snapshot, | ||
updatedAt, | ||
version | ||
}; | ||
if ('createdAt' in version) { | ||
data.createdAt = version.createdAt; | ||
} | ||
const result = await upsertRow({ | ||
@@ -31,0 +30,0 @@ adapter: this, |
export { countDistinct } from '../postgres/countDistinct.js'; | ||
export { createDatabase } from '../postgres/createDatabase.js'; | ||
export { convertPathToJSONTraversal } from '../postgres/createJSONQuery/convertPathToJSONTraversal.js'; | ||
@@ -3,0 +4,0 @@ export { createJSONQuery } from '../postgres/createJSONQuery/index.js'; |
export { countDistinct } from '../postgres/countDistinct.js'; | ||
export { createDatabase } from '../postgres/createDatabase.js'; | ||
export { convertPathToJSONTraversal } from '../postgres/createJSONQuery/convertPathToJSONTraversal.js'; | ||
@@ -3,0 +4,0 @@ export { createJSONQuery } from '../postgres/createJSONQuery/index.js'; |
@@ -15,2 +15,3 @@ import type { DBQueryConfig } from 'drizzle-orm'; | ||
tableName: string; | ||
versions?: boolean; | ||
}; | ||
@@ -22,4 +23,4 @@ export type Result = { | ||
} & DBQueryConfig<'many', true, any, any>; | ||
export declare const buildFindManyArgs: ({ adapter, depth, fields, joinQuery, joins, locale, tableName, }: BuildFindQueryArgs) => Record<string, unknown>; | ||
export declare const buildFindManyArgs: ({ adapter, depth, fields, joinQuery, joins, locale, tableName, versions, }: BuildFindQueryArgs) => Record<string, unknown>; | ||
export {}; | ||
//# sourceMappingURL=buildFindManyArgs.d.ts.map |
import { traverseFields } from './traverseFields.js'; | ||
// Generate the Drizzle query for findMany based on | ||
// a collection field structure | ||
export const buildFindManyArgs = ({ adapter, depth, fields, joinQuery, joins = [], locale, tableName })=>{ | ||
export const buildFindManyArgs = ({ adapter, depth, fields, joinQuery, joins = [], locale, tableName, versions })=>{ | ||
const result = { | ||
@@ -66,3 +66,4 @@ extras: {}, | ||
topLevelArgs: result, | ||
topLevelTableName: tableName | ||
topLevelTableName: tableName, | ||
versions | ||
}); | ||
@@ -69,0 +70,0 @@ return result; |
@@ -7,4 +7,5 @@ import type { Field, FindArgs } from 'payload'; | ||
tableName: string; | ||
versions?: boolean; | ||
} & Omit<FindArgs, 'collection'>; | ||
export declare const findMany: ({ adapter, fields, joins: joinQuery, limit: limitArg, locale, page, pagination, req, skip, sort, tableName, where: whereArg, }: Args) => Promise<{ | ||
export declare const findMany: ({ adapter, fields, joins: joinQuery, limit: limitArg, locale, page, pagination, req, skip, sort, tableName, versions, where: whereArg, }: Args) => Promise<{ | ||
docs: any; | ||
@@ -11,0 +12,0 @@ hasNextPage: boolean; |
@@ -6,3 +6,3 @@ import { inArray } from 'drizzle-orm'; | ||
import { buildFindManyArgs } from './buildFindManyArgs.js'; | ||
export const findMany = async function find({ adapter, fields, joins: joinQuery, limit: limitArg, locale, page = 1, pagination, req = {}, skip, sort, tableName, where: whereArg }) { | ||
export const findMany = async function find({ adapter, fields, joins: joinQuery, limit: limitArg, locale, page = 1, pagination, req = {}, skip, sort, tableName, versions, where: whereArg }) { | ||
const db = adapter.sessions[await req.transactionID]?.db || adapter.drizzle; | ||
@@ -44,3 +44,4 @@ let limit = limitArg; | ||
joins, | ||
tableName | ||
tableName, | ||
versions | ||
}); | ||
@@ -47,0 +48,0 @@ selectDistinctMethods.push({ |
@@ -18,5 +18,6 @@ import type { Field, JoinQuery } from 'payload'; | ||
topLevelTableName: string; | ||
versions?: boolean; | ||
}; | ||
export declare const traverseFields: ({ _locales, adapter, currentArgs, currentTableName, depth, fields, joinQuery, joins, locale, path, tablePath, topLevelArgs, topLevelTableName, }: TraverseFieldArgs) => Record<string, unknown>; | ||
export declare const traverseFields: ({ _locales, adapter, currentArgs, currentTableName, depth, fields, joinQuery, joins, locale, path, tablePath, topLevelArgs, topLevelTableName, versions, }: TraverseFieldArgs) => Record<string, unknown>; | ||
export {}; | ||
//# sourceMappingURL=traverseFields.d.ts.map |
@@ -6,3 +6,3 @@ import { and, eq, sql } from 'drizzle-orm'; | ||
import { chainMethods } from './chainMethods.js'; | ||
export const traverseFields = ({ _locales, adapter, currentArgs, currentTableName, depth, fields, joinQuery = {}, joins, locale, path, tablePath, topLevelArgs, topLevelTableName })=>{ | ||
export const traverseFields = ({ _locales, adapter, currentArgs, currentTableName, depth, fields, joinQuery = {}, joins, locale, path, tablePath, topLevelArgs, topLevelTableName, versions })=>{ | ||
fields.forEach((field)=>{ | ||
@@ -53,3 +53,4 @@ if (fieldIsVirtual(field)) { | ||
topLevelArgs, | ||
topLevelTableName | ||
topLevelTableName, | ||
versions | ||
}); | ||
@@ -166,3 +167,4 @@ }); | ||
topLevelArgs, | ||
topLevelTableName | ||
topLevelTableName, | ||
versions | ||
}); | ||
@@ -185,44 +187,87 @@ break; | ||
const joinCollectionTableName = adapter.tableNameMap.get(toSnakeCase(field.collection)); | ||
const joinTableName = `${adapter.tableNameMap.get(toSnakeCase(field.collection))}${field.localized && adapter.payload.config.localization ? adapter.localesSuffix : ''}`; | ||
if (!adapter.tables[joinTableName][field.on]) { | ||
const db = adapter.drizzle; | ||
const joinTable = `${joinTableName}${adapter.relationshipsSuffix}`; | ||
const joins = [ | ||
{ | ||
const joins = []; | ||
const buildQueryResult = buildQuery({ | ||
adapter, | ||
fields, | ||
joins, | ||
locale, | ||
sort, | ||
tableName: joinCollectionTableName, | ||
where | ||
}); | ||
let subQueryWhere = buildQueryResult.where; | ||
const orderBy = buildQueryResult.orderBy; | ||
let joinLocalesCollectionTableName; | ||
const currentIDColumn = versions ? adapter.tables[currentTableName].parent : adapter.tables[currentTableName].id; | ||
// Handle hasMany _rels table | ||
if (field.hasMany) { | ||
const joinRelsCollectionTableName = `${joinCollectionTableName}${adapter.relationshipsSuffix}`; | ||
if (field.localized) { | ||
joinLocalesCollectionTableName = joinRelsCollectionTableName; | ||
} | ||
let columnReferenceToCurrentID; | ||
if (versions) { | ||
columnReferenceToCurrentID = `${topLevelTableName.replace('_', '').replace(new RegExp(`${adapter.versionsSuffix}$`), '')}_id`; | ||
} else { | ||
columnReferenceToCurrentID = `${topLevelTableName}_id`; | ||
} | ||
joins.push({ | ||
type: 'innerJoin', | ||
condition: and(eq(adapter.tables[joinRelsCollectionTableName].parent, adapter.tables[joinCollectionTableName].id), eq(sql.raw(`"${joinRelsCollectionTableName}"."${columnReferenceToCurrentID}"`), currentIDColumn), eq(adapter.tables[joinRelsCollectionTableName].path, field.on)), | ||
table: adapter.tables[joinRelsCollectionTableName] | ||
}); | ||
} else { | ||
// Handle localized without hasMany | ||
const foreignColumn = field.on.replaceAll('.', '_'); | ||
if (field.localized) { | ||
joinLocalesCollectionTableName = `${joinCollectionTableName}${adapter.localesSuffix}`; | ||
joins.push({ | ||
type: 'innerJoin', | ||
condition: and(eq(adapter.tables[joinTable].parent, adapter.tables[joinTableName].id), eq(sql.raw(`"${joinTable}"."${topLevelTableName}_id"`), adapter.tables[currentTableName].id)), | ||
table: adapter.tables[joinTable] | ||
condition: and(eq(adapter.tables[joinLocalesCollectionTableName]._parentID, adapter.tables[joinCollectionTableName].id), eq(adapter.tables[joinLocalesCollectionTableName][foreignColumn], currentIDColumn)), | ||
table: adapter.tables[joinLocalesCollectionTableName] | ||
}); | ||
// Handle without localized and without hasMany, just a condition append to where. With localized the inner join handles eq. | ||
} else { | ||
const constraint = eq(adapter.tables[joinCollectionTableName][foreignColumn], currentIDColumn); | ||
if (subQueryWhere) { | ||
subQueryWhere = and(subQueryWhere, constraint); | ||
} else { | ||
subQueryWhere = constraint; | ||
} | ||
]; | ||
const { orderBy, where: subQueryWhere } = buildQuery({ | ||
adapter, | ||
fields, | ||
joins, | ||
locale, | ||
sort, | ||
tableName: joinCollectionTableName, | ||
where: {} | ||
} | ||
} | ||
const chainedMethods = []; | ||
joins.forEach(({ type, condition, table })=>{ | ||
chainedMethods.push({ | ||
args: [ | ||
table, | ||
condition | ||
], | ||
method: type ?? 'leftJoin' | ||
}); | ||
const chainedMethods = []; | ||
joins.forEach(({ type, condition, table })=>{ | ||
chainedMethods.push({ | ||
args: [ | ||
table, | ||
condition | ||
], | ||
method: type ?? 'leftJoin' | ||
}); | ||
}); | ||
if (limit !== 0) { | ||
chainedMethods.push({ | ||
args: [ | ||
limit | ||
], | ||
method: 'limit' | ||
}); | ||
const subQuery = chainMethods({ | ||
methods: chainedMethods, | ||
query: db.select({ | ||
id: adapter.tables[joinTableName].id | ||
}).from(adapter.tables[joinTableName]).where(subQueryWhere).orderBy(orderBy.order(orderBy.column)).limit(11) | ||
}); | ||
const columnName = `${path.replaceAll('.', '_')}${field.name}`; | ||
const extras = field.localized ? _locales.extras : currentArgs.extras; | ||
if (adapter.name === 'sqlite') { | ||
extras[columnName] = sql` | ||
} | ||
const db = adapter.drizzle; | ||
const subQuery = chainMethods({ | ||
methods: chainedMethods, | ||
query: db.select({ | ||
id: adapter.tables[joinCollectionTableName].id, | ||
...joinLocalesCollectionTableName && { | ||
locale: adapter.tables[joinLocalesCollectionTableName].locale || adapter.tables[joinLocalesCollectionTableName]._locale | ||
} | ||
}).from(adapter.tables[joinCollectionTableName]).where(subQueryWhere).orderBy(orderBy.order(orderBy.column)) | ||
}); | ||
const columnName = `${path.replaceAll('.', '_')}${field.name}`; | ||
const jsonObjectSelect = field.localized ? sql.raw(`'_parentID', "id", '_locale', "${adapter.tables[joinLocalesCollectionTableName].locale ? 'locale' : '_locale'}"`) : sql.raw(`'id', "id"`); | ||
if (adapter.name === 'sqlite') { | ||
currentArgs.extras[columnName] = sql` | ||
COALESCE(( | ||
SELECT json_group_array("id") | ||
SELECT json_group_array(json_object(${jsonObjectSelect})) | ||
FROM ( | ||
@@ -233,6 +278,6 @@ ${subQuery} | ||
`.as(columnName); | ||
} else { | ||
extras[columnName] = sql` | ||
} else { | ||
currentArgs.extras[columnName] = sql` | ||
COALESCE(( | ||
SELECT json_agg("id") | ||
SELECT json_agg(json_build_object(${jsonObjectSelect})) | ||
FROM ( | ||
@@ -243,33 +288,3 @@ ${subQuery} | ||
`.as(columnName); | ||
} | ||
break; | ||
} | ||
const selectFields = {}; | ||
const withJoin = { | ||
columns: selectFields | ||
}; | ||
if (limit) { | ||
withJoin.limit = limit; | ||
} | ||
if (field.localized) { | ||
withJoin.columns._locale = true; | ||
withJoin.columns._parentID = true; | ||
} else { | ||
withJoin.columns.id = true; | ||
withJoin.columns.parent = true; | ||
} | ||
const { orderBy, where: joinWhere } = buildQuery({ | ||
adapter, | ||
fields, | ||
joins, | ||
locale, | ||
sort, | ||
tableName: joinTableName, | ||
where | ||
}); | ||
if (joinWhere) { | ||
withJoin.where = ()=>joinWhere; | ||
} | ||
withJoin.orderBy = orderBy.order(orderBy.column); | ||
currentArgs.with[`${path.replaceAll('.', '_')}${field.name}`] = withJoin; | ||
break; | ||
@@ -276,0 +291,0 @@ } |
@@ -35,2 +35,3 @@ export { count } from './count.js'; | ||
export { upsertRow } from './upsertRow/index.js'; | ||
export { buildIndexName } from './utilities/buildIndexName.js'; | ||
export { executeSchemaHooks } from './utilities/executeSchemaHooks.js'; | ||
@@ -37,0 +38,0 @@ export { extendDrizzleTable } from './utilities/extendDrizzleTable.js'; |
@@ -34,2 +34,3 @@ export { count } from './count.js'; | ||
export { upsertRow } from './upsertRow/index.js'; | ||
export { buildIndexName } from './utilities/buildIndexName.js'; | ||
export { executeSchemaHooks } from './utilities/executeSchemaHooks.js'; | ||
@@ -36,0 +37,0 @@ export { extendDrizzleTable } from './utilities/extendDrizzleTable.js'; |
@@ -77,3 +77,3 @@ import { commitTransaction, getMigrations, initTransaction, killTransaction, readMigrationFiles } from 'payload'; | ||
payload.logger.error({ | ||
error: err, | ||
err, | ||
msg: 'Error deleting dev migration' | ||
@@ -80,0 +80,0 @@ }); |
@@ -10,3 +10,3 @@ import fs from 'fs'; | ||
const require = createRequire(import.meta.url); | ||
export const createMigration = async function createMigration({ file, forceAcceptWarning, migrationName, payload }) { | ||
export const createMigration = async function createMigration({ file, forceAcceptWarning, migrationName, payload, skipVerify }) { | ||
const filename = fileURLToPath(import.meta.url); | ||
@@ -60,3 +60,3 @@ const dirname = path.dirname(filename); | ||
} | ||
if (!upSQL?.length && !downSQL?.length && !forceAcceptWarning) { | ||
if (!upSQL?.length && !downSQL?.length && !forceAcceptWarning && !skipVerify) { | ||
const { confirm: shouldCreateBlankMigration } = await prompts({ | ||
@@ -63,0 +63,0 @@ name: 'confirm', |
@@ -14,5 +14,6 @@ export const defaultDrizzleSnapshot = { | ||
tables: {}, | ||
version: '7' | ||
version: '7', | ||
views: {} | ||
}; | ||
//# sourceMappingURL=defaultSnapshot.js.map |
@@ -47,3 +47,2 @@ import { uniqueIndex } from 'drizzle-orm/pg-core'; | ||
fields: collection.fields, | ||
joins: collection.joins, | ||
tableName, | ||
@@ -50,0 +49,0 @@ timestamps: collection.timestamps, |
import type { PgColumnBuilder } from 'drizzle-orm/pg-core'; | ||
import type { Field, SanitizedJoins } from 'payload'; | ||
import type { Field } from 'payload'; | ||
import type { BaseExtraConfig, BasePostgresAdapter, RelationMap } from '../types.js'; | ||
@@ -15,5 +15,5 @@ type Args = { | ||
disableNotNull: boolean; | ||
disableRelsTableUnique?: boolean; | ||
disableUnique: boolean; | ||
fields: Field[]; | ||
joins?: SanitizedJoins; | ||
rootRelationships?: Set<string>; | ||
@@ -23,2 +23,3 @@ rootRelationsToBuild?: RelationMap; | ||
rootTableName?: string; | ||
rootUniqueRelationships?: Set<string>; | ||
tableName: string; | ||
@@ -41,4 +42,4 @@ timestamps?: boolean; | ||
}; | ||
export declare const buildTable: ({ adapter, baseColumns, baseExtraConfig, disableNotNull, disableUnique, fields, joins, rootRelationships, rootRelationsToBuild, rootTableIDColType, rootTableName: incomingRootTableName, tableName, timestamps, versions, withinLocalizedArrayOrBlock, }: Args) => Result; | ||
export declare const buildTable: ({ adapter, baseColumns, baseExtraConfig, disableNotNull, disableRelsTableUnique, disableUnique, fields, rootRelationships, rootRelationsToBuild, rootTableIDColType, rootTableName: incomingRootTableName, rootUniqueRelationships, tableName, timestamps, versions, withinLocalizedArrayOrBlock, }: Args) => Result; | ||
export {}; | ||
//# sourceMappingURL=build.d.ts.map |
@@ -5,6 +5,8 @@ import { relations } from 'drizzle-orm'; | ||
import { createTableName } from '../../createTableName.js'; | ||
import { buildIndexName } from '../../utilities/buildIndexName.js'; | ||
import { createIndex } from './createIndex.js'; | ||
import { parentIDColumnMap } from './parentIDColumnMap.js'; | ||
import { setColumnID } from './setColumnID.js'; | ||
import { traverseFields } from './traverseFields.js'; | ||
export const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, disableNotNull, disableUnique = false, fields, joins, rootRelationships, rootRelationsToBuild, rootTableIDColType, rootTableName: incomingRootTableName, tableName, timestamps, versions, withinLocalizedArrayOrBlock })=>{ | ||
export const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, disableNotNull, disableRelsTableUnique = false, disableUnique = false, fields, rootRelationships, rootRelationsToBuild, rootTableIDColType, rootTableName: incomingRootTableName, rootUniqueRelationships, tableName, timestamps, versions, withinLocalizedArrayOrBlock })=>{ | ||
const isRoot = !incomingRootTableName; | ||
@@ -21,2 +23,4 @@ const rootTableName = incomingRootTableName || tableName; | ||
const relationships = rootRelationships || new Set(); | ||
// Unique relationships to the base collection | ||
const uniqueRelationships = rootUniqueRelationships || new Set(); | ||
let relationshipsTable; | ||
@@ -34,6 +38,6 @@ // Drizzle relations | ||
disableNotNull, | ||
disableRelsTableUnique, | ||
disableUnique, | ||
fields, | ||
indexes, | ||
joins, | ||
localesColumns, | ||
@@ -48,2 +52,3 @@ localesIndexes, | ||
rootTableName, | ||
uniqueRelationships, | ||
versions, | ||
@@ -263,7 +268,8 @@ withinLocalizedArrayOrBlock | ||
} | ||
relationshipColumns[`${relationTo}ID`] = parentIDColumnMap[colType](`${formattedRelationTo}_id`); | ||
const colName = `${relationTo}ID`; | ||
relationshipColumns[colName] = parentIDColumnMap[colType](`${formattedRelationTo}_id`); | ||
relationExtraConfig[`${relationTo}IdFk`] = (cols)=>foreignKey({ | ||
name: `${relationshipsTableName}_${toSnakeCase(relationTo)}_fk`, | ||
columns: [ | ||
cols[`${relationTo}ID`] | ||
cols[colName] | ||
], | ||
@@ -274,2 +280,21 @@ foreignColumns: [ | ||
}).onDelete('cascade'); | ||
const indexColumns = [ | ||
colName | ||
]; | ||
const unique = !disableUnique && uniqueRelationships.has(relationTo); | ||
if (unique) { | ||
indexColumns.push('path'); | ||
} | ||
if (hasLocalizedRelationshipField) { | ||
indexColumns.push('locale'); | ||
} | ||
const indexName = buildIndexName({ | ||
name: `${relationshipsTableName}_${formattedRelationTo}_id`, | ||
adapter | ||
}); | ||
relationExtraConfig[indexName] = createIndex({ | ||
name: indexColumns, | ||
indexName, | ||
unique | ||
}); | ||
}); | ||
@@ -276,0 +301,0 @@ relationshipsTable = adapter.pgSchema.table(relationshipsTableName, relationshipColumns, (cols)=>{ |
import type { GenericColumn } from '../types.js'; | ||
type CreateIndexArgs = { | ||
columnName: string; | ||
indexName: string; | ||
name: string | string[]; | ||
tableName: string; | ||
unique?: boolean; | ||
}; | ||
export declare const createIndex: ({ name, columnName, tableName, unique }: CreateIndexArgs) => (table: { | ||
export declare const createIndex: ({ name, indexName, unique }: CreateIndexArgs) => (table: { | ||
[x: string]: GenericColumn; | ||
@@ -10,0 +9,0 @@ }) => import("drizzle-orm/pg-core").IndexBuilder; |
import { index, uniqueIndex } from 'drizzle-orm/pg-core'; | ||
export const createIndex = ({ name, columnName, tableName, unique })=>{ | ||
export const createIndex = ({ name, indexName, unique })=>{ | ||
return (table)=>{ | ||
@@ -14,5 +14,5 @@ let columns; | ||
if (unique) { | ||
return uniqueIndex(`${tableName}_${columnName}_idx`).on(columns[0], ...columns.slice(1)); | ||
return uniqueIndex(indexName).on(columns[0], ...columns.slice(1)); | ||
} | ||
return index(`${tableName}_${columnName}_idx`).on(columns[0], ...columns.slice(1)); | ||
return index(indexName).on(columns[0], ...columns.slice(1)); | ||
}; | ||
@@ -19,0 +19,0 @@ }; |
import type { IndexBuilder, PgColumnBuilder } from 'drizzle-orm/pg-core'; | ||
import type { Field, SanitizedJoins, TabAsField } from 'payload'; | ||
import type { Field, TabAsField } from 'payload'; | ||
import type { BasePostgresAdapter, GenericColumns, RelationMap } from '../types.js'; | ||
@@ -9,2 +9,3 @@ type Args = { | ||
disableNotNull: boolean; | ||
disableRelsTableUnique?: boolean; | ||
disableUnique?: boolean; | ||
@@ -15,3 +16,2 @@ fieldPrefix?: string; | ||
indexes: Record<string, (cols: GenericColumns) => IndexBuilder>; | ||
joins?: SanitizedJoins; | ||
localesColumns: Record<string, PgColumnBuilder>; | ||
@@ -26,2 +26,3 @@ localesIndexes: Record<string, (cols: GenericColumns) => IndexBuilder>; | ||
rootTableName: string; | ||
uniqueRelationships: Set<string>; | ||
versions: boolean; | ||
@@ -42,4 +43,4 @@ /** | ||
}; | ||
export declare const traverseFields: ({ adapter, columnPrefix, columns, disableNotNull, disableUnique, fieldPrefix, fields, forceLocalized, indexes, joins, localesColumns, localesIndexes, newTableName, parentTableName, relationships, relationsToBuild, rootRelationsToBuild, rootTableIDColType, rootTableName, versions, withinLocalizedArrayOrBlock, }: Args) => Result; | ||
export declare const traverseFields: ({ adapter, columnPrefix, columns, disableNotNull, disableRelsTableUnique, disableUnique, fieldPrefix, fields, forceLocalized, indexes, localesColumns, localesIndexes, newTableName, parentTableName, relationships, relationsToBuild, rootRelationsToBuild, rootTableIDColType, rootTableName, uniqueRelationships, versions, withinLocalizedArrayOrBlock, }: Args) => Result; | ||
export {}; | ||
//# sourceMappingURL=traverseFields.d.ts.map |
@@ -7,2 +7,3 @@ import { relations } from 'drizzle-orm'; | ||
import { createTableName } from '../../createTableName.js'; | ||
import { buildIndexName } from '../../utilities/buildIndexName.js'; | ||
import { hasLocalesTable } from '../../utilities/hasLocalesTable.js'; | ||
@@ -15,3 +16,3 @@ import { validateExistingBlockIsIdentical } from '../../utilities/validateExistingBlockIsIdentical.js'; | ||
import { withDefault } from './withDefault.js'; | ||
export const traverseFields = ({ adapter, columnPrefix, columns, disableNotNull, disableUnique = false, fieldPrefix, fields, forceLocalized, indexes, joins, localesColumns, localesIndexes, newTableName, parentTableName, relationships, relationsToBuild, rootRelationsToBuild, rootTableIDColType, rootTableName, versions, withinLocalizedArrayOrBlock })=>{ | ||
export const traverseFields = ({ adapter, columnPrefix, columns, disableNotNull, disableRelsTableUnique, disableUnique = false, fieldPrefix, fields, forceLocalized, indexes, localesColumns, localesIndexes, newTableName, parentTableName, relationships, relationsToBuild, rootRelationsToBuild, rootTableIDColType, rootTableName, uniqueRelationships, versions, withinLocalizedArrayOrBlock })=>{ | ||
const throwValidationError = true; | ||
@@ -55,10 +56,11 @@ let hasLocalizedField = false; | ||
} | ||
if ((field.unique || field.index) && ![ | ||
if ((field.unique || field.index || [ | ||
'relationship', | ||
'upload' | ||
].includes(field.type)) && ![ | ||
'array', | ||
'blocks', | ||
'group', | ||
'point', | ||
'relationship', | ||
'upload' | ||
].includes(field.type) && !('hasMany' in field && field.hasMany === true)) { | ||
'point' | ||
].includes(field.type) && !('hasMany' in field && field.hasMany === true) && !('relationTo' in field && Array.isArray(field.relationTo))) { | ||
const unique = disableUnique !== true && field.unique; | ||
@@ -72,3 +74,7 @@ if (unique) { | ||
} | ||
targetIndexes[`${newTableName}_${field.name}Idx`] = createIndex({ | ||
const indexName = buildIndexName({ | ||
name: `${newTableName}_${columnName}`, | ||
adapter | ||
}); | ||
targetIndexes[indexName] = createIndex({ | ||
name: field.localized ? [ | ||
@@ -78,4 +84,3 @@ fieldName, | ||
] : fieldName, | ||
columnName, | ||
tableName: newTableName, | ||
indexName, | ||
unique | ||
@@ -280,2 +285,3 @@ }); | ||
disableNotNull: disableNotNullFromHere, | ||
disableRelsTableUnique: true, | ||
disableUnique, | ||
@@ -287,2 +293,3 @@ fields: disableUnique ? idToUUID(field.fields) : field.fields, | ||
rootTableName, | ||
rootUniqueRelationships: uniqueRelationships, | ||
tableName: arrayTableName, | ||
@@ -399,2 +406,3 @@ versions, | ||
disableNotNull: disableNotNullFromHere, | ||
disableRelsTableUnique: true, | ||
disableUnique, | ||
@@ -406,2 +414,3 @@ fields: disableUnique ? idToUUID(block.fields) : block.fields, | ||
rootTableName, | ||
rootUniqueRelationships: uniqueRelationships, | ||
tableName: blockTableName, | ||
@@ -501,3 +510,2 @@ versions, | ||
indexes, | ||
joins, | ||
localesColumns, | ||
@@ -512,2 +520,3 @@ localesIndexes, | ||
rootTableName, | ||
uniqueRelationships, | ||
versions, | ||
@@ -547,3 +556,2 @@ withinLocalizedArrayOrBlock | ||
indexes, | ||
joins, | ||
localesColumns, | ||
@@ -558,2 +566,3 @@ localesIndexes, | ||
rootTableName, | ||
uniqueRelationships, | ||
versions, | ||
@@ -598,3 +607,2 @@ withinLocalizedArrayOrBlock: withinLocalizedArrayOrBlock || field.localized | ||
indexes, | ||
joins, | ||
localesColumns, | ||
@@ -609,2 +617,3 @@ localesIndexes, | ||
rootTableName, | ||
uniqueRelationships, | ||
versions, | ||
@@ -647,3 +656,2 @@ withinLocalizedArrayOrBlock | ||
indexes, | ||
joins, | ||
localesColumns, | ||
@@ -658,2 +666,3 @@ localesIndexes, | ||
rootTableName, | ||
uniqueRelationships, | ||
versions, | ||
@@ -685,5 +694,13 @@ withinLocalizedArrayOrBlock | ||
if (Array.isArray(field.relationTo)) { | ||
field.relationTo.forEach((relation)=>relationships.add(relation)); | ||
field.relationTo.forEach((relation)=>{ | ||
relationships.add(relation); | ||
if (field.unique && !disableUnique && !disableRelsTableUnique) { | ||
uniqueRelationships.add(relation); | ||
} | ||
}); | ||
} else if (field.hasMany) { | ||
relationships.add(field.relationTo); | ||
if (field.unique && !disableUnique && !disableRelsTableUnique) { | ||
uniqueRelationships.add(field.relationTo); | ||
} | ||
} else { | ||
@@ -722,24 +739,2 @@ // simple relationships get a column on the targetTable with a foreign key to the relationTo table | ||
break; | ||
case 'join': | ||
{ | ||
// fieldName could be 'posts' or 'group_posts' | ||
// using `on` as the key for the relation | ||
const localized = adapter.payload.config.localization && field.localized; | ||
const fieldSchemaPath = `${fieldPrefix || ''}${field.name}`; | ||
let target; | ||
const joinConfig = joins[field.collection].find(({ schemaPath })=>fieldSchemaPath === schemaPath); | ||
if (joinConfig.targetField.hasMany) { | ||
target = `${adapter.tableNameMap.get(toSnakeCase(field.collection))}${adapter.relationshipsSuffix}`; | ||
} else { | ||
target = `${adapter.tableNameMap.get(toSnakeCase(field.collection))}${localized ? adapter.localesSuffix : ''}`; | ||
} | ||
relationsToBuild.set(fieldName, { | ||
type: 'many', | ||
// joins are not localized on the parent table | ||
localized: false, | ||
relationName: field.on.replaceAll('.', '_'), | ||
target | ||
}); | ||
break; | ||
} | ||
default: | ||
@@ -746,0 +741,0 @@ break; |
@@ -7,3 +7,3 @@ import type { DrizzleSnapshotJSON } from 'drizzle-kit/api'; | ||
import type { Payload, PayloadRequest } from 'payload'; | ||
import type { QueryResult } from 'pg'; | ||
import type { ClientConfig, QueryResult } from 'pg'; | ||
import type { extendDrizzleTable, Operators } from '../index.js'; | ||
@@ -57,2 +57,12 @@ import type { BuildQueryJoinAliases, DrizzleAdapter, TransactionPg } from '../types.js'; | ||
}) => Promise<Record<string, unknown>[]>; | ||
export type CreateDatabase = (args?: { | ||
/** | ||
* Name of a database, defaults to the current one | ||
*/ | ||
name?: string; | ||
/** | ||
* Schema to create in addition to 'public'. Defaults from adapter.schemaName if exists. | ||
*/ | ||
schemaName?: string; | ||
}) => Promise<boolean>; | ||
type Schema = { | ||
@@ -77,4 +87,6 @@ enum: typeof pgEnum; | ||
countDistinct: CountDistinct; | ||
createDatabase: CreateDatabase; | ||
defaultDrizzleSnapshot: DrizzleSnapshotJSON; | ||
deleteWhere: DeleteWhere; | ||
disableCreateDatabase: boolean; | ||
drizzle: PostgresDB; | ||
@@ -96,2 +108,3 @@ dropDatabase: DropDatabase; | ||
pgSchema: Schema; | ||
poolOptions?: ClientConfig; | ||
prodMigrations?: { | ||
@@ -98,0 +111,0 @@ down: (args: MigrateDownArgs) => Promise<void>; |
@@ -29,3 +29,2 @@ import { asc, desc } from 'drizzle-orm'; | ||
tableName, | ||
useAlias: true, | ||
value: sortPath | ||
@@ -32,0 +31,0 @@ }); |
@@ -43,3 +43,2 @@ import type { SQL } from 'drizzle-orm'; | ||
tableNameSuffix?: string; | ||
useAlias?: boolean; | ||
/** | ||
@@ -55,4 +54,4 @@ * The raw value of the query before sanitization | ||
*/ | ||
export declare const getTableColumnFromPath: ({ adapter, aliasTable, collectionPath, columnPrefix, constraintPath: incomingConstraintPath, constraints, fields, joins, locale: incomingLocale, pathSegments: incomingSegments, rootTableName: incomingRootTableName, selectFields, tableName, tableNameSuffix, useAlias, value, }: Args) => TableColumn; | ||
export declare const getTableColumnFromPath: ({ adapter, aliasTable, collectionPath, columnPrefix, constraintPath: incomingConstraintPath, constraints, fields, joins, locale: incomingLocale, pathSegments: incomingSegments, rootTableName: incomingRootTableName, selectFields, tableName, tableNameSuffix, value, }: Args) => TableColumn; | ||
export {}; | ||
//# sourceMappingURL=getTableColumnFromPath.d.ts.map |
@@ -7,2 +7,3 @@ import { and, eq, like, sql } from 'drizzle-orm'; | ||
import { isPolymorphicRelationship } from '../utilities/isPolymorphicRelationship.js'; | ||
import { addJoinTable } from './addJoinTable.js'; | ||
import { getTableAlias } from './getTableAlias.js'; | ||
@@ -13,3 +14,3 @@ /** | ||
* @returns TableColumn | ||
*/ export const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPrefix = '', constraintPath: incomingConstraintPath, constraints = [], fields, joins, locale: incomingLocale, pathSegments: incomingSegments, rootTableName: incomingRootTableName, selectFields, tableName, tableNameSuffix = '', useAlias, value })=>{ | ||
*/ export const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPrefix = '', constraintPath: incomingConstraintPath, constraints = [], fields, joins, locale: incomingLocale, pathSegments: incomingSegments, rootTableName: incomingRootTableName, selectFields, tableName, tableNameSuffix = '', value })=>{ | ||
const fieldPath = incomingSegments[0]; | ||
@@ -67,3 +68,2 @@ let locale = incomingLocale; | ||
tableNameSuffix, | ||
useAlias, | ||
value | ||
@@ -90,3 +90,2 @@ }); | ||
tableNameSuffix: `${tableNameSuffix}${toSnakeCase(field.name)}_`, | ||
useAlias, | ||
value | ||
@@ -110,3 +109,2 @@ }); | ||
tableNameSuffix, | ||
useAlias, | ||
value | ||
@@ -119,4 +117,5 @@ }); | ||
newTableName = `${tableName}${adapter.localesSuffix}`; | ||
joins.push({ | ||
addJoinTable({ | ||
condition: eq(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID), | ||
joins, | ||
table: adapter.tables[newTableName] | ||
@@ -147,3 +146,2 @@ }); | ||
tableNameSuffix: `${tableNameSuffix}${toSnakeCase(field.name)}_`, | ||
useAlias, | ||
value | ||
@@ -157,4 +155,5 @@ }); | ||
if (locale && field.localized && adapter.payload.config.localization) { | ||
joins.push({ | ||
addJoinTable({ | ||
condition: and(eq(adapter.tables[tableName].id, adapter.tables[newTableName].parent), eq(adapter.tables[newTableName]._locale, locale)), | ||
joins, | ||
table: adapter.tables[newTableName] | ||
@@ -170,4 +169,5 @@ }); | ||
} else { | ||
joins.push({ | ||
addJoinTable({ | ||
condition: eq(adapter.tables[tableName].id, adapter.tables[newTableName].parent), | ||
joins, | ||
table: adapter.tables[newTableName] | ||
@@ -201,4 +201,5 @@ }); | ||
if (locale && field.localized && adapter.payload.config.localization) { | ||
joins.push({ | ||
addJoinTable({ | ||
condition: and(...joinConstraints, eq(adapter.tables[newTableName]._locale, locale)), | ||
joins, | ||
table: adapter.tables[newTableName] | ||
@@ -214,4 +215,5 @@ }); | ||
} else { | ||
joins.push({ | ||
addJoinTable({ | ||
condition: and(...joinConstraints), | ||
joins, | ||
table: adapter.tables[newTableName] | ||
@@ -235,4 +237,5 @@ }); | ||
if (locale && field.localized && adapter.payload.config.localization) { | ||
joins.push({ | ||
addJoinTable({ | ||
condition: and(eq(arrayParentTable.id, adapter.tables[newTableName]._parentID), eq(adapter.tables[newTableName]._locale, locale)), | ||
joins, | ||
table: adapter.tables[newTableName] | ||
@@ -248,4 +251,5 @@ }); | ||
} else { | ||
joins.push({ | ||
addJoinTable({ | ||
condition: eq(arrayParentTable.id, adapter.tables[newTableName]._parentID), | ||
joins, | ||
table: adapter.tables[newTableName] | ||
@@ -266,3 +270,2 @@ }); | ||
tableName: newTableName, | ||
useAlias, | ||
value | ||
@@ -324,3 +327,2 @@ }); | ||
tableName: newTableName, | ||
useAlias, | ||
value | ||
@@ -506,3 +508,2 @@ }); | ||
tableName: newTableName, | ||
useAlias, | ||
value | ||
@@ -549,3 +550,2 @@ }); | ||
tableName: newTableName, | ||
useAlias, | ||
value | ||
@@ -568,8 +568,6 @@ }); | ||
newTableName = `${tableName}${adapter.localesSuffix}`; | ||
newTable = useAlias ? getTableAlias({ | ||
adapter, | ||
tableName: newTableName | ||
}).newAliasTable : adapter.tables[newTableName]; | ||
joins.push({ | ||
newTable = adapter.tables[newTableName]; | ||
addJoinTable({ | ||
condition: eq(parentTable.id, newTable._parentID), | ||
joins, | ||
table: newTable | ||
@@ -576,0 +574,0 @@ }); |
@@ -164,4 +164,6 @@ import { APIError, createArrayFromCommaDelineated } from 'payload'; | ||
if (operator === 'exists') { | ||
formattedValue = formattedValue === 'true' || formattedValue === true; | ||
if (formattedValue === false) { | ||
formattedValue = val === 'true' || val === true; | ||
if (formattedValue) { | ||
operator = 'exists'; | ||
} else { | ||
operator = 'isNull'; | ||
@@ -168,0 +170,0 @@ } |
import { buildVersionCollectionFields, combineQueries } from 'payload'; | ||
import toSnakeCase from 'to-snake-case'; | ||
import { findMany } from './find/findMany.js'; | ||
export const queryDrafts = async function queryDrafts({ collection, limit, locale, page = 1, pagination, req = {}, sort, where }) { | ||
export const queryDrafts = async function queryDrafts({ collection, joins, limit, locale, page = 1, pagination, req = {}, sort, where }) { | ||
const collectionConfig = this.payload.collections[collection].config; | ||
@@ -16,2 +16,3 @@ const tableName = this.tableNameMap.get(`_${toSnakeCase(collectionConfig.slug)}${this.versionsSuffix}`); | ||
fields, | ||
joins, | ||
limit, | ||
@@ -24,2 +25,3 @@ locale, | ||
tableName, | ||
versions: true, | ||
where: combinedWhere | ||
@@ -32,5 +34,3 @@ }); | ||
id: doc.parent, | ||
...doc.version, | ||
createdAt: doc.createdAt, | ||
updatedAt: doc.updatedAt | ||
...doc.version | ||
}; | ||
@@ -37,0 +37,0 @@ return doc; |
@@ -319,4 +319,4 @@ import { fieldAffectsData, fieldIsVirtual } from 'payload/shared'; | ||
fieldResult = { | ||
docs: (hasNextPage ? fieldData.slice(0, limit) : fieldData).map((objOrID)=>({ | ||
id: typeof objOrID === 'object' ? objOrID.id : objOrID | ||
docs: (hasNextPage ? fieldData.slice(0, limit) : fieldData).map(({ id })=>({ | ||
id | ||
})), | ||
@@ -323,0 +323,0 @@ hasNextPage |
@@ -124,2 +124,4 @@ import { fieldAffectsData, fieldIsVirtual } from 'payload/shared'; | ||
Object.entries(data[field.name]).forEach(([localeKey, localeData])=>{ | ||
// preserve array ID if there is | ||
localeData._uuid = data.id || data._uuid; | ||
traverseFields({ | ||
@@ -150,2 +152,5 @@ adapter, | ||
} else { | ||
// preserve array ID if there is | ||
const groupData = data[field.name]; | ||
groupData._uuid = data.id || data._uuid; | ||
traverseFields({ | ||
@@ -158,3 +163,3 @@ adapter, | ||
columnPrefix: `${columnName}_`, | ||
data: data[field.name], | ||
data: groupData, | ||
existingLocales, | ||
@@ -187,2 +192,4 @@ fieldPrefix: `${fieldName}_`, | ||
Object.entries(data[tab.name]).forEach(([localeKey, localeData])=>{ | ||
// preserve array ID if there is | ||
localeData._uuid = data.id || data._uuid; | ||
traverseFields({ | ||
@@ -213,2 +220,5 @@ adapter, | ||
} else { | ||
const tabData = data[tab.name]; | ||
// preserve array ID if there is | ||
tabData._uuid = data.id || data._uuid; | ||
traverseFields({ | ||
@@ -221,3 +231,3 @@ adapter, | ||
columnPrefix: `${columnPrefix || ''}${toSnakeCase(tab.name)}_`, | ||
data: data[tab.name], | ||
data: tabData, | ||
existingLocales, | ||
@@ -224,0 +234,0 @@ fieldPrefix: `${fieldPrefix || ''}${tab.name}_`, |
@@ -120,2 +120,3 @@ import type { ColumnBaseConfig, ColumnDataType, DrizzleConfig, ExtractTablesWithRelations, Relation, Relations, SQL, TableRelationalConfig } from 'drizzle-orm'; | ||
idType: 'serial' | 'uuid'; | ||
indexes: Set<string>; | ||
initializing: Promise<void>; | ||
@@ -122,0 +123,0 @@ insert: Insert; |
{ | ||
"name": "@payloadcms/drizzle", | ||
"version": "3.0.0-canary.e198dc5", | ||
"version": "3.0.0-canary.e1fc0e0", | ||
"description": "A library of shared functions used by different payload database adapters", | ||
@@ -39,3 +39,3 @@ "homepage": "https://payloadcms.com", | ||
"console-table-printer": "2.11.2", | ||
"drizzle-orm": "0.34.1-1f15bfd", | ||
"drizzle-orm": "0.35.1", | ||
"prompts": "2.4.2", | ||
@@ -49,7 +49,7 @@ "to-snake-case": "1.0.0", | ||
"@types/to-snake-case": "1.0.0", | ||
"@payloadcms/eslint-config": "3.0.0-beta.97", | ||
"payload": "3.0.0-canary.e198dc5" | ||
"@payloadcms/eslint-config": "3.0.0-beta.112", | ||
"payload": "3.0.0-canary.e1fc0e0" | ||
}, | ||
"peerDependencies": { | ||
"payload": "3.0.0-canary.e198dc5" | ||
"payload": "3.0.0-canary.e1fc0e0" | ||
}, | ||
@@ -56,0 +56,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
898013
414
8129
+ Added@payloadcms/translations@3.0.0-canary.e1fc0e0(transitive)
+ Addeddrizzle-orm@0.35.1(transitive)
+ Addedjose@5.9.2(transitive)
+ Addedpayload@3.0.0-canary.e1fc0e0(transitive)
+ Addedpino@9.5.0(transitive)
+ Addedpino-abstract-transport@2.0.0(transitive)
+ Addedpino-pretty@11.3.0(transitive)
+ Addedprocess-warning@4.0.0(transitive)
- Removed@payloadcms/translations@3.0.0-canary.e198dc5(transitive)
- Removedbuffer-equal-constant-time@1.0.1(transitive)
- Removeddrizzle-orm@0.34.1-1f15bfd(transitive)
- Removedecdsa-sig-formatter@1.0.11(transitive)
- Removedjsonwebtoken@9.0.2(transitive)
- Removedjwa@1.4.1(transitive)
- Removedjws@3.2.2(transitive)
- Removedlodash.includes@4.3.0(transitive)
- Removedlodash.isboolean@3.0.3(transitive)
- Removedlodash.isinteger@4.0.4(transitive)
- Removedlodash.isnumber@3.0.3(transitive)
- Removedlodash.isplainobject@4.0.6(transitive)
- Removedlodash.isstring@4.0.1(transitive)
- Removedlodash.once@4.1.1(transitive)
- Removedms@2.1.3(transitive)
- Removedpayload@3.0.0-canary.e198dc5(transitive)
- Removedpino@9.3.1(transitive)
- Removedpino-abstract-transport@1.2.0(transitive)
- Removedpino-pretty@11.2.1(transitive)
- Removedprocess-warning@3.0.0(transitive)
- Removedsemver@7.6.3(transitive)
Updateddrizzle-orm@0.35.1