From 12c5100bc83a367a3fc25496e9e63c924f69acb9 Mon Sep 17 00:00:00 2001 From: James Date: Fri, 16 Feb 2024 11:27:23 -0500 Subject: [PATCH] chore: pulls mongodb from main --- jest.config.js | 18 +- next.config.js | 9 +- package.json | 7 +- packages/db-mongodb/mock.js | 1 - packages/db-mongodb/package.json | 14 +- packages/db-mongodb/src/connect.ts | 7 + packages/db-mongodb/src/create.ts | 16 +- .../db-mongodb/src/createGlobalVersion.ts | 1 + packages/db-mongodb/src/createMigration.ts | 18 +- packages/db-mongodb/src/createVersion.ts | 1 + packages/db-mongodb/src/find.ts | 15 +- packages/db-mongodb/src/findGlobalVersions.ts | 15 +- packages/db-mongodb/src/findVersions.ts | 16 +- packages/db-mongodb/src/index.ts | 18 +- packages/db-mongodb/src/init.ts | 8 +- packages/db-mongodb/src/migrateFresh.ts | 54 +- packages/db-mongodb/src/queries/buildQuery.ts | 3 +- .../src/queries/buildSearchParams.ts | 14 +- .../db-mongodb/src/queries/parseParams.ts | 3 +- .../src/queries/sanitizeQueryValue.ts | 43 +- packages/db-mongodb/src/queryDrafts.ts | 11 +- .../src/transactions/beginTransaction.ts | 32 +- packages/db-mongodb/src/updateOne.ts | 16 +- .../db-mongodb/src/utilities/handleError.ts | 23 + pnpm-lock.yaml | 650 ++++++++---------- test/auth/config.ts | 11 +- test/auth/int.spec.ts | 48 +- tsconfig.json | 2 +- 28 files changed, 567 insertions(+), 507 deletions(-) delete mode 100644 packages/db-mongodb/mock.js create mode 100644 packages/db-mongodb/src/utilities/handleError.ts diff --git a/jest.config.js b/jest.config.js index 54432e620..5cb3c4125 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,9 +1,9 @@ -const nextJest = require('next/jest.js') +// const nextJest = require('next/jest.js') -const createJestConfig = nextJest({ - // Provide the path to your Next.js app to load next.config.js and .env files in your test environment - dir: './', -}) +// const createJestConfig = nextJest({ +// // Provide the path to your Next.js app to load next.config.js and .env files in your test environment +// dir: './', +// }) const customJestConfig = { globalSetup: './test/jest.setup.ts', @@ -12,10 +12,14 @@ const customJestConfig = { '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '/packages/payload/src/bundlers/mocks/fileMock.js', }, - // testEnvironment: 'node', + testEnvironment: 'node', testMatch: ['/packages/payload/src/**/*.spec.ts', '/test/**/*int.spec.ts'], testTimeout: 90000, + transform: { + '^.+\\.(t|j)sx?$': ['@swc/jest'], + }, verbose: true, } -module.exports = createJestConfig(customJestConfig) +// module.exports = createJestConfig(customJestConfig) +module.exports = customJestConfig diff --git a/next.config.js b/next.config.js index 05abf5457..2936bce4e 100644 --- a/next.config.js +++ b/next.config.js @@ -1,5 +1,9 @@ const path = require('path') +const withBundleAnalyzer = require('@next/bundle-analyzer')({ + enabled: process.env.ANALYZE === 'true', +}) + /** @type {import('next').NextConfig} */ const nextConfig = { experimental: { @@ -13,6 +17,9 @@ const nextConfig = { }, }, }, + typescript: { + ignoreBuildErrors: true, + }, webpack: (config) => { return { ...config, @@ -53,4 +60,4 @@ const nextConfig = { }, } -module.exports = nextConfig +module.exports = withBundleAnalyzer(nextConfig) diff --git a/package.json b/package.json index d3b93c0a8..a58a4b214 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "prepare": "husky install" }, "devDependencies": { + "@next/bundle-analyzer": "^14.1.0", "@payloadcms/eslint-config": "workspace:*", "@playwright/test": "1.40.1", "@swc/cli": "^0.1.62", @@ -81,7 +82,7 @@ "lexical": "0.12.5", "lint-staged": "^14.0.1", "minimist": "1.2.8", - "mongodb-memory-server": "8.13.0", + "mongodb-memory-server": "^9", "next": "14.1.1-canary.26", "node-fetch": "2.6.12", "node-mocks-http": "^1.14.1", @@ -126,7 +127,9 @@ }, "pnpm": { "overrides": { - "graphql": "^16.8.1" + "graphql": "^16.8.1", + "react": "^18.2.0", + "react-dom": "^18.2.0" } } } diff --git a/packages/db-mongodb/mock.js b/packages/db-mongodb/mock.js deleted file mode 100644 index d7e6099ea..000000000 --- a/packages/db-mongodb/mock.js +++ /dev/null @@ -1 +0,0 @@ -export const mongooseAdapter = () => ({}) diff --git a/packages/db-mongodb/package.json b/packages/db-mongodb/package.json index 49cba0f6e..bd447d873 100644 --- a/packages/db-mongodb/package.json +++ b/packages/db-mongodb/package.json @@ -1,6 +1,6 @@ { "name": "@payloadcms/db-mongodb", - "version": "1.1.0", + "version": "1.4.1", "description": "The officially supported MongoDB database adapter for Payload", "repository": "https://github.com/payloadcms/payload", "license": "MIT", @@ -11,13 +11,6 @@ "url": "https://payloadcms.com" }, "main": "./dist/index.js", - "exports": { - ".": { - "import": "./src/index.ts", - "require": "./src/index.ts", - "types": "./src/index.ts" - } - }, "types": "./dist/index.d.ts", "scripts": { "build": "pnpm build:swc && pnpm build:types", @@ -27,18 +20,17 @@ "prepublishOnly": "pnpm clean && pnpm build" }, "dependencies": { - "bson-ext": "^4.0.3", "bson-objectid": "2.0.4", "deepmerge": "4.3.1", "get-port": "5.1.1", - "mongoose": "7.6.8", + "mongoose": "6.12.3", "mongoose-paginate-v2": "1.7.22", "prompts": "2.4.2", + "http-status": "1.6.2", "uuid": "9.0.0" }, "devDependencies": { "@payloadcms/eslint-config": "workspace:*", - "mongodb-memory-server": "8.13.0", "payload": "workspace:*" }, "peerDependencies": { diff --git a/packages/db-mongodb/src/connect.ts b/packages/db-mongodb/src/connect.ts index f8f838ecd..6d9b356d3 100644 --- a/packages/db-mongodb/src/connect.ts +++ b/packages/db-mongodb/src/connect.ts @@ -27,6 +27,13 @@ export const connect: Connect = async function connect(this: MongooseAdapter, pa try { this.connection = (await mongoose.connect(urlToConnect, connectionOptions)).connection + const client = this.connection.getClient() + + if (!client.options.replicaSet) { + this.transactionOptions = false + this.beginTransaction = undefined + } + if (process.env.PAYLOAD_DROP_DATABASE === 'true') { this.payload.logger.info('---- DROPPING DATABASE ----') await mongoose.connection.dropDatabase() diff --git a/packages/db-mongodb/src/create.ts b/packages/db-mongodb/src/create.ts index 9ea72bd97..775caa07f 100644 --- a/packages/db-mongodb/src/create.ts +++ b/packages/db-mongodb/src/create.ts @@ -1,10 +1,9 @@ import type { Create } from 'payload/database' import type { Document, PayloadRequest } from 'payload/types' -import { ValidationError } from 'payload/errors' - import type { MongooseAdapter } from '.' +import handleError from './utilities/handleError' import { withSession } from './withSession' export const create: Create = async function create( @@ -17,18 +16,7 @@ export const create: Create = async function create( try { ;[doc] = await Model.create([data], options) } catch (error) { - // Handle uniqueness error from MongoDB - throw error.code === 11000 && error.keyValue - ? new ValidationError( - [ - { - field: Object.keys(error.keyValue)[0], - message: req.t('error:valueMustBeUnique'), - }, - ], - req.t, - ) - : error + handleError(error, req) } // doc.toJSON does not do stuff like converting ObjectIds to string, or date strings to date objects. That's why we use JSON.parse/stringify here diff --git a/packages/db-mongodb/src/createGlobalVersion.ts b/packages/db-mongodb/src/createGlobalVersion.ts index 63f63df5b..718ae918e 100644 --- a/packages/db-mongodb/src/createGlobalVersion.ts +++ b/packages/db-mongodb/src/createGlobalVersion.ts @@ -49,6 +49,7 @@ export const createGlobalVersion: CreateGlobalVersion = async function createGlo ], }, { $unset: { latest: 1 } }, + options, ) const result: Document = JSON.parse(JSON.stringify(doc)) diff --git a/packages/db-mongodb/src/createMigration.ts b/packages/db-mongodb/src/createMigration.ts index a86704c0c..280ae0d35 100644 --- a/packages/db-mongodb/src/createMigration.ts +++ b/packages/db-mongodb/src/createMigration.ts @@ -1,5 +1,5 @@ /* eslint-disable no-restricted-syntax, no-await-in-loop */ -// import type { CreateMigration } from 'payload/database' +import type { CreateMigration } from 'payload/database' import fs from 'fs' import path from 'path' @@ -18,7 +18,11 @@ ${downSQL ?? ` // Migration code`} }; ` -export const createMigration = async function createMigration({ file, migrationName, payload }) { +export const createMigration: CreateMigration = async function createMigration({ + file, + migrationName, + payload, +}) { const dir = payload.db.migrationDir if (!fs.existsSync(dir)) { fs.mkdirSync(dir) @@ -28,7 +32,7 @@ export const createMigration = async function createMigration({ file, migrationN // Check for predefined migration. // Either passed in via --file or prefixed with @payloadcms/db-mongodb/ - if (file || migrationName.startsWith('@payloadcms/db-mongodb/')) { + if (file || migrationName?.startsWith('@payloadcms/db-mongodb/')) { if (!file) file = migrationName const predefinedMigrationName = file.replace('@payloadcms/db-mongodb/', '') @@ -37,8 +41,8 @@ export const createMigration = async function createMigration({ file, migrationN // Check if predefined migration exists if (fs.existsSync(cleanPath)) { - // const { down, up } = require(cleanPath) - // migrationFileContent = migrationTemplate(up, down) + const { down, up } = require(cleanPath) + migrationFileContent = migrationTemplate(up, down) } else { payload.logger.error({ msg: `Canned migration ${predefinedMigrationName} not found.`, @@ -55,8 +59,8 @@ export const createMigration = async function createMigration({ file, migrationN const timestamp = `${formattedDate}_${formattedTime}` - const formattedName = migrationName.replace(/\W/g, '_') - const fileName = `${timestamp}_${formattedName}.ts` + const formattedName = migrationName?.replace(/\W/g, '_') + const fileName = migrationName ? `${timestamp}_${formattedName}.ts` : `${timestamp}_migration.ts` const filePath = `${dir}/${fileName}` fs.writeFileSync(filePath, migrationFileContent) payload.logger.info({ msg: `Migration created at ${filePath}` }) diff --git a/packages/db-mongodb/src/createVersion.ts b/packages/db-mongodb/src/createVersion.ts index 9fffeebe7..e26caf829 100644 --- a/packages/db-mongodb/src/createVersion.ts +++ b/packages/db-mongodb/src/createVersion.ts @@ -57,6 +57,7 @@ export const createVersion: CreateVersion = async function createVersion( ], }, { $unset: { latest: 1 } }, + options, ) const result: Document = JSON.parse(JSON.stringify(doc)) diff --git a/packages/db-mongodb/src/find.ts b/packages/db-mongodb/src/find.ts index efbdd2ea4..a3dcac136 100644 --- a/packages/db-mongodb/src/find.ts +++ b/packages/db-mongodb/src/find.ts @@ -55,21 +55,30 @@ export const find: Find = async function find( useEstimatedCount, } - if (!useEstimatedCount && this.disableIndexHints !== true) { - // Improve the performance of the countDocuments query which is used if useEstimatedCount is set to false by adding a hint. + if (!useEstimatedCount && Object.keys(query).length === 0 && this.disableIndexHints !== true) { + // Improve the performance of the countDocuments query which is used if useEstimatedCount is set to false by adding + // a hint. By default, if no hint is provided, MongoDB does not use an indexed field to count the returned documents, + // which makes queries very slow. This only happens when no query (filter) is provided. If one is provided, it uses + // the correct indexed field paginationOptions.useCustomCountFn = () => { return Promise.resolve( Model.countDocuments(query, { + ...options, hint: { _id: 1 }, }), ) } } - if (limit > 0) { + if (limit >= 0) { paginationOptions.limit = limit // limit must also be set here, it's ignored when pagination is false paginationOptions.options.limit = limit + + // Disable pagination if limit is 0 + if (limit === 0) { + paginationOptions.pagination = false + } } const result = await Model.paginate(query, paginationOptions) diff --git a/packages/db-mongodb/src/findGlobalVersions.ts b/packages/db-mongodb/src/findGlobalVersions.ts index d5a0f5095..ac8e99767 100644 --- a/packages/db-mongodb/src/findGlobalVersions.ts +++ b/packages/db-mongodb/src/findGlobalVersions.ts @@ -74,21 +74,30 @@ export const findGlobalVersions: FindGlobalVersions = async function findGlobalV useEstimatedCount, } - if (!useEstimatedCount && this.disableIndexHints !== true) { - // Improve the performance of the countDocuments query which is used if useEstimatedCount is set to false by adding a hint. + if (!useEstimatedCount && Object.keys(query).length === 0 && this.disableIndexHints !== true) { + // Improve the performance of the countDocuments query which is used if useEstimatedCount is set to false by adding + // a hint. By default, if no hint is provided, MongoDB does not use an indexed field to count the returned documents, + // which makes queries very slow. This only happens when no query (filter) is provided. If one is provided, it uses + // the correct indexed field paginationOptions.useCustomCountFn = () => { return Promise.resolve( Model.countDocuments(query, { + ...options, hint: { _id: 1 }, }), ) } } - if (limit > 0) { + if (limit >= 0) { paginationOptions.limit = limit // limit must also be set here, it's ignored when pagination is false paginationOptions.options.limit = limit + + // Disable pagination if limit is 0 + if (limit === 0) { + paginationOptions.pagination = false + } } const result = await Model.paginate(query, paginationOptions) diff --git a/packages/db-mongodb/src/findVersions.ts b/packages/db-mongodb/src/findVersions.ts index fa495ff4b..20636c0e5 100644 --- a/packages/db-mongodb/src/findVersions.ts +++ b/packages/db-mongodb/src/findVersions.ts @@ -63,7 +63,6 @@ export const findVersions: FindVersions = async function findVersions( lean: true, leanWithId: true, limit, - offset: skip || 0, options, page, pagination, @@ -71,21 +70,30 @@ export const findVersions: FindVersions = async function findVersions( useEstimatedCount, } - if (!useEstimatedCount && this.disableIndexHints !== true) { - // Improve the performance of the countDocuments query which is used if useEstimatedCount is set to false by adding a hint. + if (!useEstimatedCount && Object.keys(query).length === 0 && this.disableIndexHints !== true) { + // Improve the performance of the countDocuments query which is used if useEstimatedCount is set to false by adding + // a hint. By default, if no hint is provided, MongoDB does not use an indexed field to count the returned documents, + // which makes queries very slow. This only happens when no query (filter) is provided. If one is provided, it uses + // the correct indexed field paginationOptions.useCustomCountFn = () => { return Promise.resolve( Model.countDocuments(query, { + ...options, hint: { _id: 1 }, }), ) } } - if (limit > 0) { + if (limit >= 0) { paginationOptions.limit = limit // limit must also be set here, it's ignored when pagination is false paginationOptions.options.limit = limit + + // Disable pagination if limit is 0 + if (limit === 0) { + paginationOptions.pagination = false + } } const result = await Model.paginate(query, paginationOptions) diff --git a/packages/db-mongodb/src/index.ts b/packages/db-mongodb/src/index.ts index d211a4c5d..220965c1b 100644 --- a/packages/db-mongodb/src/index.ts +++ b/packages/db-mongodb/src/index.ts @@ -1,14 +1,13 @@ +import type { TransactionOptions } from 'mongodb' import type { ClientSession, ConnectOptions, Connection } from 'mongoose' import type { Payload } from 'payload' -import type { BaseDatabaseAdapter, DatabaseAdapterObj } from 'payload/database' +import type { BaseDatabaseAdapter } from 'payload/database' import fs from 'fs' import mongoose from 'mongoose' import path from 'path' import { createDatabaseAdapter } from 'payload/database' -export type { MigrateDownArgs, MigrateUpArgs } from './types' - import type { CollectionModel, GlobalModel } from './types' import { connect } from './connect' @@ -37,6 +36,9 @@ import { updateGlobalVersion } from './updateGlobalVersion' import { updateOne } from './updateOne' import { updateVersion } from './updateVersion' +export type { MigrateDownArgs, MigrateUpArgs } from './types' +import type { DatabaseAdapterObj } from 'payload/database' + export interface Args { /** Set to false to disable auto-pluralization of collection names, Defaults to true */ autoPluralization?: boolean @@ -48,6 +50,7 @@ export interface Args { /** Set to true to disable hinting to MongoDB to use 'id' as index. This is currently done when counting documents for pagination. Disabling this optimization might fix some problems with AWS DocumentDB. Defaults to false */ disableIndexHints?: boolean migrationDir?: string + transactionOptions?: TransactionOptions | false /** The URL to connect to MongoDB or false to start payload and prevent connecting */ url: false | string } @@ -76,7 +79,8 @@ declare module 'payload' { connection: Connection globals: GlobalModel mongoMemoryServer: any - // sessions: Record + sessions: Record + transactionOptions: TransactionOptions versions: { [slug: string]: CollectionModel } @@ -88,8 +92,9 @@ export function mongooseAdapter({ connectOptions, disableIndexHints = false, migrationDir: migrationDirArg, + transactionOptions = {}, url, -}: Args): DatabaseAdapterObj { +}: Args): DatabaseAdapterObj { function adapter({ payload }: { payload: Payload }) { const migrationDir = findMigrationDir(migrationDirArg) mongoose.set('strictQuery', false) @@ -106,11 +111,12 @@ export function mongooseAdapter({ globals: undefined, mongoMemoryServer: undefined, sessions: {}, + transactionOptions: transactionOptions === false ? undefined : transactionOptions, url, versions: {}, // DatabaseAdapter - beginTransaction, + beginTransaction: transactionOptions ? beginTransaction : undefined, commitTransaction, connect, create, diff --git a/packages/db-mongodb/src/init.ts b/packages/db-mongodb/src/init.ts index 1e74267ef..d74a4361e 100644 --- a/packages/db-mongodb/src/init.ts +++ b/packages/db-mongodb/src/init.ts @@ -48,7 +48,7 @@ export const init: Init = async function init(this: MongooseAdapter) { versionModelName, versionSchema, this.autoPluralization === true ? undefined : versionModelName, - ) as unknown as CollectionModel + ) as CollectionModel // this.payload.versions[collection.slug] = model; this.versions[collection.slug] = model } @@ -57,9 +57,11 @@ export const init: Init = async function init(this: MongooseAdapter) { collection.slug, schema, this.autoPluralization === true ? undefined : collection.slug, - ) as unknown as CollectionModel + ) as CollectionModel this.collections[collection.slug] = model + // TS expect error only needed until we launch 2.0.0 + // eslint-disable-next-line @typescript-eslint/ban-ts-comment this.payload.collections[collection.slug] = { config: collection, } @@ -92,7 +94,7 @@ export const init: Init = async function init(this: MongooseAdapter) { versionModelName, versionSchema, versionModelName, - ) as unknown as CollectionModel + ) as CollectionModel this.versions[global.slug] = versionsModel } }) diff --git a/packages/db-mongodb/src/migrateFresh.ts b/packages/db-mongodb/src/migrateFresh.ts index 1701026dc..c95a7db31 100644 --- a/packages/db-mongodb/src/migrateFresh.ts +++ b/packages/db-mongodb/src/migrateFresh.ts @@ -1,6 +1,9 @@ import type { PayloadRequest } from 'payload/types' import { readMigrationFiles } from 'payload/database' +import { commitTransaction } from 'payload/dist/utilities/commitTransaction' +import { initTransaction } from 'payload/dist/utilities/initTransaction' +import { killTransaction } from 'payload/dist/utilities/killTransaction' import prompts from 'prompts' import type { MongooseAdapter } from '.' @@ -8,25 +11,30 @@ import type { MongooseAdapter } from '.' /** * Drop the current database and run all migrate up functions */ -export async function migrateFresh(this: MongooseAdapter): Promise { +export async function migrateFresh( + this: MongooseAdapter, + { forceAcceptWarning = false }: { forceAcceptWarning?: boolean }, +): Promise { const { payload } = this - const { confirm: acceptWarning } = await prompts( - { - name: 'confirm', - initial: false, - message: `WARNING: This will drop your database and run all migrations. Are you sure you want to proceed?`, - type: 'confirm', - }, - { - onCancel: () => { - process.exit(0) + if (!forceAcceptWarning) { + const { confirm: acceptWarning } = await prompts( + { + name: 'confirm', + type: 'confirm', + initial: false, + message: `WARNING: This will drop your database and run all migrations. Are you sure you want to proceed?`, }, - }, - ) + { + onCancel: () => { + process.exit(0) + }, + }, + ) - if (!acceptWarning) { - process.exit(0) + if (!acceptWarning) { + process.exit(0) + } } payload.logger.info({ @@ -40,29 +48,29 @@ export async function migrateFresh(this: MongooseAdapter): Promise { msg: `Found ${migrationFiles.length} migration files.`, }) - let transactionID + const req = { payload } as PayloadRequest + // Run all migrate up for (const migration of migrationFiles) { payload.logger.info({ msg: `Migrating: ${migration.name}` }) try { const start = Date.now() - transactionID = await this.beginTransaction() - await migration.up({ payload }) + await initTransaction(req) + await migration.up({ payload, req }) await payload.create({ collection: 'payload-migrations', data: { name: migration.name, batch: 1, }, - req: { - transactionID, - } as PayloadRequest, + req, }) - await this.commitTransaction(transactionID) + + await commitTransaction(req) payload.logger.info({ msg: `Migrated: ${migration.name} (${Date.now() - start}ms)` }) } catch (err: unknown) { - await this.rollbackTransaction(transactionID) + await killTransaction(req) payload.logger.error({ err, msg: `Error running migration ${migration.name}. Rolling back.`, diff --git a/packages/db-mongodb/src/queries/buildQuery.ts b/packages/db-mongodb/src/queries/buildQuery.ts index 70151ab2e..f250d5f88 100644 --- a/packages/db-mongodb/src/queries/buildQuery.ts +++ b/packages/db-mongodb/src/queries/buildQuery.ts @@ -1,4 +1,5 @@ -import type { Field, Payload, Where } from 'payload/types' +import type { Payload } from 'payload' +import type { Field, Where } from 'payload/types' import { QueryError } from 'payload/errors' diff --git a/packages/db-mongodb/src/queries/buildSearchParams.ts b/packages/db-mongodb/src/queries/buildSearchParams.ts index 1ba2fd03c..389e2cea3 100644 --- a/packages/db-mongodb/src/queries/buildSearchParams.ts +++ b/packages/db-mongodb/src/queries/buildSearchParams.ts @@ -1,5 +1,6 @@ +import type { Payload } from 'payload' import type { PathToQuery } from 'payload/database' -import type { Field, Payload } from 'payload/types' +import type { Field } from 'payload/types' import type { Operator } from 'payload/types' import objectID from 'bson-objectid' @@ -15,7 +16,8 @@ import { sanitizeQueryValue } from './sanitizeQueryValue' type SearchParam = { path?: string - value: unknown + rawQuery?: unknown + value?: unknown } const subQueryOptions = { @@ -91,7 +93,11 @@ export async function buildSearchParam({ const [{ field, path }] = paths if (path) { - const { operator: formattedOperator, val: formattedValue } = sanitizeQueryValue({ + const { + operator: formattedOperator, + rawQuery, + val: formattedValue, + } = sanitizeQueryValue({ field, hasCustomID, operator, @@ -99,6 +105,8 @@ export async function buildSearchParam({ val, }) + if (rawQuery) return { value: rawQuery } + // If there are multiple collections to search through, // Recursively build up a list of query constraints if (paths.length > 1) { diff --git a/packages/db-mongodb/src/queries/parseParams.ts b/packages/db-mongodb/src/queries/parseParams.ts index b10f832d5..d65edb568 100644 --- a/packages/db-mongodb/src/queries/parseParams.ts +++ b/packages/db-mongodb/src/queries/parseParams.ts @@ -1,7 +1,8 @@ /* eslint-disable no-restricted-syntax */ /* eslint-disable no-await-in-loop */ import type { FilterQuery } from 'mongoose' -import type { Operator, Payload, Where } from 'payload/types' +import type { Payload } from 'payload' +import type { Operator, Where } from 'payload/types' import type { Field } from 'payload/types' import deepmerge from 'deepmerge' diff --git a/packages/db-mongodb/src/queries/sanitizeQueryValue.ts b/packages/db-mongodb/src/queries/sanitizeQueryValue.ts index c36430723..cbea7c6bf 100644 --- a/packages/db-mongodb/src/queries/sanitizeQueryValue.ts +++ b/packages/db-mongodb/src/queries/sanitizeQueryValue.ts @@ -17,7 +17,11 @@ export const sanitizeQueryValue = ({ operator, path, val, -}: SanitizeQueryValueArgs): { operator: string; val: unknown } => { +}: SanitizeQueryValueArgs): { + operator?: string + rawQuery?: unknown + val?: unknown +} => { let formattedValue = val let formattedOperator = operator @@ -70,6 +74,24 @@ export const sanitizeQueryValue = ({ formattedValue = null } + // Object equality requires the value to be the first key in the object that is being queried. + if ( + operator === 'equals' && + formattedValue && + typeof formattedValue === 'object' && + formattedValue.value && + formattedValue.relationTo + ) { + return { + rawQuery: { + $and: [ + { [`${path}.value`]: { $eq: formattedValue.value } }, + { [`${path}.relationTo`]: { $eq: formattedValue.relationTo } }, + ], + }, + } + } + if (operator === 'in' && Array.isArray(formattedValue)) { formattedValue = formattedValue.reduce((formattedValues, inVal) => { const newValues = [inVal] @@ -104,7 +126,7 @@ export const sanitizeQueryValue = ({ formattedValue = undefined } else { formattedValue = { - $geometry: { coordinates: [parseFloat(lng), parseFloat(lat)], type: 'Point' }, + $geometry: { type: 'Point', coordinates: [parseFloat(lng), parseFloat(lat)] }, } if (maxDistance) formattedValue.$maxDistance = parseFloat(maxDistance) @@ -135,6 +157,23 @@ export const sanitizeQueryValue = ({ if (operator === 'exists') { formattedValue = formattedValue === 'true' || formattedValue === true + + // Clearable fields + if (['relationship', 'select', 'upload'].includes(field.type)) { + if (formattedValue) { + return { + rawQuery: { + $and: [{ [path]: { $exists: true } }, { [path]: { $ne: null } }], + }, + } + } else { + return { + rawQuery: { + $or: [{ [path]: { $exists: false } }, { [path]: { $eq: null } }], + }, + } + } + } } return { operator: formattedOperator, val: formattedValue } diff --git a/packages/db-mongodb/src/queryDrafts.ts b/packages/db-mongodb/src/queryDrafts.ts index d26c5ed26..b77e5b97d 100644 --- a/packages/db-mongodb/src/queryDrafts.ts +++ b/packages/db-mongodb/src/queryDrafts.ts @@ -58,8 +58,15 @@ export const queryDrafts: QueryDrafts = async function queryDrafts( useEstimatedCount, } - if (!useEstimatedCount && this.disableIndexHints !== true) { - // Improve the performance of the countDocuments query which is used if useEstimatedCount is set to false by adding a hint. + if ( + !useEstimatedCount && + Object.keys(versionQuery).length === 0 && + this.disableIndexHints !== true + ) { + // Improve the performance of the countDocuments query which is used if useEstimatedCount is set to false by adding + // a hint. By default, if no hint is provided, MongoDB does not use an indexed field to count the returned documents, + // which makes queries very slow. This only happens when no query (filter) is provided. If one is provided, it uses + // the correct indexed field paginationOptions.useCustomCountFn = () => { return Promise.resolve( VersionModel.countDocuments(versionQuery, { diff --git a/packages/db-mongodb/src/transactions/beginTransaction.ts b/packages/db-mongodb/src/transactions/beginTransaction.ts index 8470452cb..9f33de461 100644 --- a/packages/db-mongodb/src/transactions/beginTransaction.ts +++ b/packages/db-mongodb/src/transactions/beginTransaction.ts @@ -1,34 +1,30 @@ -// @ts-expect-error // TODO: Fix this import import type { TransactionOptions } from 'mongodb' import type { BeginTransaction } from 'payload/database' import { APIError } from 'payload/errors' import { v4 as uuid } from 'uuid' -let transactionsNotAvailable: boolean +import type { MongooseAdapter } from '../index' + export const beginTransaction: BeginTransaction = async function beginTransaction( - options: TransactionOptions = {}, + this: MongooseAdapter, + options: TransactionOptions, ) { - let id = null if (!this.connection) { throw new APIError('beginTransaction called while no connection to the database exists') } - if (transactionsNotAvailable) return id - const client = this.connection.getClient() - if (!client.options.replicaSet) { - transactionsNotAvailable = true - } else { - id = uuid() - if (!this.sessions[id]) { - this.sessions[id] = await client.startSession() - } - if (this.sessions[id].inTransaction()) { - this.payload.logger.warn('beginTransaction called while transaction already exists') - } else { - await this.sessions[id].startTransaction(options) - } + const id = uuid() + + if (!this.sessions[id]) { + this.sessions[id] = client.startSession() } + if (this.sessions[id].inTransaction()) { + this.payload.logger.warn('beginTransaction called while transaction already exists') + } else { + this.sessions[id].startTransaction(options || (this.transactionOptions as TransactionOptions)) + } + return id } diff --git a/packages/db-mongodb/src/updateOne.ts b/packages/db-mongodb/src/updateOne.ts index 12fdc6819..5577bea20 100644 --- a/packages/db-mongodb/src/updateOne.ts +++ b/packages/db-mongodb/src/updateOne.ts @@ -1,10 +1,9 @@ import type { UpdateOne } from 'payload/database' import type { PayloadRequest } from 'payload/types' -import { ValidationError } from 'payload/errors' - import type { MongooseAdapter } from '.' +import handleError from './utilities/handleError' import sanitizeInternalFields from './utilities/sanitizeInternalFields' import { withSession } from './withSession' @@ -30,18 +29,7 @@ export const updateOne: UpdateOne = async function updateOne( try { result = await Model.findOneAndUpdate(query, data, options) } catch (error) { - // Handle uniqueness error from MongoDB - throw error.code === 11000 && error.keyValue - ? new ValidationError( - [ - { - field: Object.keys(error.keyValue)[0], - message: 'Value must be unique', - }, - ], - req.t, - ) - : error + handleError(error, req) } result = JSON.parse(JSON.stringify(result)) diff --git a/packages/db-mongodb/src/utilities/handleError.ts b/packages/db-mongodb/src/utilities/handleError.ts new file mode 100644 index 000000000..20179270e --- /dev/null +++ b/packages/db-mongodb/src/utilities/handleError.ts @@ -0,0 +1,23 @@ +import httpStatus from 'http-status' +import { APIError, ValidationError } from 'payload/errors' + +const handleError = (error, req) => { + // Handle uniqueness error from MongoDB + if (error.code === 11000 && error.keyValue) { + throw new ValidationError( + [ + { + field: Object.keys(error.keyValue)[0], + message: req.t('error:valueMustBeUnique'), + }, + ], + req.t, + ) + } else if (error.code === 11000) { + throw new APIError(req.t('error:valueMustBeUnique'), httpStatus.BAD_REQUEST) + } else { + throw error + } +} + +export default handleError diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 71410fcc3..c887a7b9e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,8 @@ settings: overrides: graphql: ^16.8.1 + react: ^18.2.0 + react-dom: ^18.2.0 importers: @@ -18,6 +20,9 @@ importers: specifier: 5.3.4 version: 5.3.4(react@18.2.0) devDependencies: + '@next/bundle-analyzer': + specifier: ^14.1.0 + version: 14.1.0 '@payloadcms/eslint-config': specifier: workspace:* version: link:packages/eslint-config-payload @@ -160,8 +165,8 @@ importers: specifier: 1.2.8 version: 1.2.8 mongodb-memory-server: - specifier: 8.13.0 - version: 8.13.0 + specifier: ^9 + version: 9.1.6 next: specifier: 14.1.1-canary.26 version: 14.1.1-canary.26(@babel/core@7.22.20)(react-dom@18.2.0)(react@18.2.0)(sass@1.70.0) @@ -301,9 +306,6 @@ importers: packages/db-mongodb: dependencies: - bson-ext: - specifier: ^4.0.3 - version: 4.0.3 bson-objectid: specifier: 2.0.4 version: 2.0.4 @@ -313,9 +315,12 @@ importers: get-port: specifier: 5.1.1 version: 5.1.1 + http-status: + specifier: 1.6.2 + version: 1.6.2 mongoose: - specifier: 7.6.8 - version: 7.6.8 + specifier: 6.12.3 + version: 6.12.3 mongoose-paginate-v2: specifier: 1.7.22 version: 1.7.22 @@ -329,9 +334,6 @@ importers: '@payloadcms/eslint-config': specifier: workspace:* version: link:../eslint-config-payload - mongodb-memory-server: - specifier: 8.13.0 - version: 8.13.0 payload: specifier: workspace:* version: link:../payload @@ -386,7 +388,7 @@ importers: version: link:../next next: specifier: 14.1.0 - version: 14.1.0(@babel/core@7.22.20)(react-dom@18.3.0-canary-b36ae8d7a-20231207)(react@18.3.0-canary-b36ae8d7a-20231207)(sass@1.70.0) + version: 14.1.0(@babel/core@7.22.20)(react-dom@18.2.0)(react@18.2.0)(sass@1.70.0) payload: specifier: workspace:* version: link:../payload @@ -394,11 +396,11 @@ importers: specifier: ^8.4.35 version: 8.4.35 react: - specifier: 18.3.0-canary-b36ae8d7a-20231207 - version: 18.3.0-canary-b36ae8d7a-20231207 + specifier: ^18.2.0 + version: 18.2.0 react-dom: - specifier: 18.3.0-canary-b36ae8d7a-20231207 - version: 18.3.0-canary-b36ae8d7a-20231207(react@18.3.0-canary-b36ae8d7a-20231207) + specifier: ^18.2.0 + version: 18.2.0(react@18.2.0) tailwindcss: specifier: ^3.4.1 version: 3.4.1(ts-node@10.9.1) @@ -516,7 +518,7 @@ importers: specifier: workspace:^0.x version: link:../live-preview react: - specifier: ^16.8.0 || ^17.0.0 || ^18.0.0 + specifier: ^18.2.0 version: 18.2.0 devDependencies: '@payloadcms/eslint-config': @@ -945,7 +947,7 @@ importers: specifier: workspace:* version: link:../payload react: - specifier: ^18.0.0 + specifier: ^18.2.0 version: 18.2.0 ts-node: specifier: 10.9.1 @@ -975,7 +977,7 @@ importers: specifier: workspace:* version: link:../payload react: - specifier: ^18.0.0 + specifier: ^18.2.0 version: 18.2.0 packages/plugin-search: @@ -997,7 +999,7 @@ importers: specifier: workspace:* version: link:../payload react: - specifier: ^18.0.0 + specifier: ^18.2.0 version: 18.2.0 packages/plugin-sentry: @@ -1012,7 +1014,7 @@ importers: specifier: ^4.18.2 version: 4.18.2 react: - specifier: ^16.8.0 || ^17.0.0 || ^18.0.0 + specifier: ^18.2.0 version: 18.2.0 devDependencies: '@payloadcms/eslint-config': @@ -1070,7 +1072,7 @@ importers: specifier: workspace:* version: link:../payload react: - specifier: ^18.0.0 + specifier: ^18.2.0 version: 18.2.0 packages/plugin-stripe: @@ -1107,7 +1109,7 @@ importers: specifier: ^2.7.1 version: 2.8.8 react: - specifier: ^18.0.0 + specifier: ^18.2.0 version: 18.2.0 webpack: specifier: ^5.78.0 @@ -1167,10 +1169,10 @@ importers: specifier: 4.17.21 version: 4.17.21 react: - specifier: 18.2.0 + specifier: ^18.2.0 version: 18.2.0 react-dom: - specifier: 18.2.0 + specifier: ^18.2.0 version: 18.2.0(react@18.2.0) react-error-boundary: specifier: ^4.0.11 @@ -1207,7 +1209,7 @@ importers: specifier: 0.2.0 version: 0.2.0 react: - specifier: 18.2.0 + specifier: ^18.2.0 version: 18.2.0 slate: specifier: 0.91.4 @@ -1298,7 +1300,7 @@ importers: specifier: 6.11.2 version: 6.11.2 react: - specifier: ^18.0.0 + specifier: ^18.2.0 version: 18.2.0 react-animate-height: specifier: 2.1.2 @@ -1416,7 +1418,7 @@ packages: resolution: {integrity: sha512-Nr1QJIbW/afYYGzYvrF70LtaHrIRtd4TNAglX8BvlfxJLZ45SAmueIKYl5tWoNBPzp65ymXGFK0Bb1vZUpuc9g==} dependencies: '@aws-crypto/util': 1.2.2 - '@aws-sdk/types': 3.413.0 + '@aws-sdk/types': 3.425.0 tslib: 1.14.1 dev: false @@ -1494,6 +1496,7 @@ packages: tslib: 2.6.2 transitivePeerDependencies: - aws-crt + dev: false /@aws-sdk/client-s3@3.427.0: resolution: {integrity: sha512-YKjJ9zgn0oE393HURKgvjNoX6lxUjb+dkTBE1GymFnGCPl6VxQbKXajXWNqUyN+oPPlZ2osEiljPaN0RserUjA==} @@ -1598,6 +1601,7 @@ packages: tslib: 2.6.2 transitivePeerDependencies: - aws-crt + dev: false /@aws-sdk/client-sso@3.427.0: resolution: {integrity: sha512-sFVFEmsQ1rmgYO1SgrOTxE/MTKpeE4hpOkm1WqhLQK7Ij136vXpjCxjH1JYZiHiUzO1wr9t4ex4dlB5J3VS/Xg==} @@ -1659,32 +1663,33 @@ packages: '@aws-sdk/util-endpoints': 3.413.0 '@aws-sdk/util-user-agent-browser': 3.413.0 '@aws-sdk/util-user-agent-node': 3.413.0 - '@smithy/config-resolver': 2.0.9 - '@smithy/fetch-http-handler': 2.1.4 - '@smithy/hash-node': 2.0.8 - '@smithy/invalid-dependency': 2.0.8 - '@smithy/middleware-content-length': 2.0.10 + '@smithy/config-resolver': 2.0.14 + '@smithy/fetch-http-handler': 2.2.3 + '@smithy/hash-node': 2.0.11 + '@smithy/invalid-dependency': 2.0.11 + '@smithy/middleware-content-length': 2.0.13 '@smithy/middleware-endpoint': 2.1.0 - '@smithy/middleware-retry': 2.0.11 - '@smithy/middleware-serde': 2.0.8 - '@smithy/middleware-stack': 2.0.1 - '@smithy/node-config-provider': 2.0.11 - '@smithy/node-http-handler': 2.1.4 - '@smithy/protocol-http': 3.0.4 + '@smithy/middleware-retry': 2.0.16 + '@smithy/middleware-serde': 2.0.11 + '@smithy/middleware-stack': 2.0.5 + '@smithy/node-config-provider': 2.1.1 + '@smithy/node-http-handler': 2.1.7 + '@smithy/protocol-http': 3.0.7 '@smithy/smithy-client': 2.1.11 - '@smithy/types': 2.3.2 - '@smithy/url-parser': 2.0.8 + '@smithy/types': 2.3.5 + '@smithy/url-parser': 2.0.11 '@smithy/util-base64': 2.0.0 '@smithy/util-body-length-browser': 2.0.0 '@smithy/util-body-length-node': 2.1.0 - '@smithy/util-defaults-mode-browser': 2.0.9 - '@smithy/util-defaults-mode-node': 2.0.11 - '@smithy/util-retry': 2.0.1 + '@smithy/util-defaults-mode-browser': 2.0.15 + '@smithy/util-defaults-mode-node': 2.0.19 + '@smithy/util-retry': 2.0.4 '@smithy/util-utf8': 2.0.0 fast-xml-parser: 4.2.5 tslib: 2.6.2 transitivePeerDependencies: - aws-crt + dev: false /@aws-sdk/client-sts@3.427.0: resolution: {integrity: sha512-le2wLJKILyWuRfPz2HbyaNtu5kEki+ojUkTqCU6FPDRrqUvEkaaCBH9Awo/2AtrCfRkiobop8RuTTj6cAnpiJg==} @@ -1743,6 +1748,7 @@ packages: tslib: 2.6.2 transitivePeerDependencies: - aws-crt + dev: false /@aws-sdk/credential-provider-env@3.413.0: resolution: {integrity: sha512-yeMOkfG20/RlzfPMtQuDB647AcPEvFEVYOWZzAWVJfldYQ5ybKr0d7sBkgG9sdAzGkK3Aw9dE4rigYI8EIqc1Q==} @@ -1753,6 +1759,7 @@ packages: '@smithy/property-provider': 2.0.12 '@smithy/types': 2.3.5 tslib: 2.6.2 + dev: false /@aws-sdk/credential-provider-env@3.425.0: resolution: {integrity: sha512-J20etnLvMKXRVi5FK4F8yOCNm2RTaQn5psQTGdDEPWJNGxohcSpzzls8U2KcMyUJ+vItlrThr4qwgpHG3i/N0w==} @@ -1780,6 +1787,7 @@ packages: tslib: 2.6.2 transitivePeerDependencies: - aws-crt + dev: false /@aws-sdk/credential-provider-ini@3.427.0: resolution: {integrity: sha512-NmH1cO/w98CKMltYec3IrJIIco19wRjATFNiw83c+FGXZ+InJwReqBnruxIOmKTx2KDzd6fwU1HOewS7UjaaaQ==} @@ -1816,6 +1824,7 @@ packages: tslib: 2.6.2 transitivePeerDependencies: - aws-crt + dev: false /@aws-sdk/credential-provider-node@3.427.0: resolution: {integrity: sha512-wYYbQ57nKL8OfgRbl8k6uXcdnYml+p3LSSfDUAuUEp1HKlQ8lOXFJ3BdLr5qrk7LhpyppSRnWBmh2c3kWa7ANQ==} @@ -1845,6 +1854,7 @@ packages: '@smithy/shared-ini-file-loader': 2.2.0 '@smithy/types': 2.3.5 tslib: 2.6.2 + dev: false /@aws-sdk/credential-provider-process@3.425.0: resolution: {integrity: sha512-YY6tkLdvtb1Fgofp3b1UWO+5vwS14LJ/smGmuGpSba0V7gFJRdcrJ9bcb9vVgAGuMdjzRJ+bUKlLLtqXkaykEw==} @@ -1870,6 +1880,7 @@ packages: tslib: 2.6.2 transitivePeerDependencies: - aws-crt + dev: false /@aws-sdk/credential-provider-sso@3.427.0: resolution: {integrity: sha512-c+tXyS/i49erHs4bAp6vKNYeYlyQ0VNMBgoco0LCn1rL0REtHbfhWMnqDLF6c2n3yIWDOTrQu0D73Idnpy16eA==} @@ -1894,6 +1905,7 @@ packages: '@smithy/property-provider': 2.0.12 '@smithy/types': 2.3.5 tslib: 2.6.2 + dev: false /@aws-sdk/credential-provider-web-identity@3.425.0: resolution: {integrity: sha512-/0R65TgRzL01JU3SzloivWNwdkbIhr06uY/F5pBHf/DynQqaspKNfdHn6AiozgSVDfwRHFjKBTUy6wvf3QFkuA==} @@ -1926,6 +1938,7 @@ packages: tslib: 2.6.2 transitivePeerDependencies: - aws-crt + dev: false /@aws-sdk/lib-storage@3.427.0(@aws-sdk/client-s3@3.427.0): resolution: {integrity: sha512-JE26Zo4SMMY2SGlD/FilF5MpLuP8D2IrW+ye/J77dwh91gyGnNa/lubJ7WbVjIAxgeaDHsAkcpNO4VR5k6JCKg==} @@ -1985,6 +1998,7 @@ packages: '@smithy/protocol-http': 3.0.4 '@smithy/types': 2.3.2 tslib: 2.6.2 + dev: false /@aws-sdk/middleware-host-header@3.425.0: resolution: {integrity: sha512-E5Gt41LObQ+cr8QnLthwsH3MtVSNXy1AKJMowDr85h0vzqA/FHUkgHyOGntgozzjXT5M0MaSRYxS0xwTR5D4Ew==} @@ -2011,6 +2025,7 @@ packages: '@aws-sdk/types': 3.413.0 '@smithy/types': 2.3.2 tslib: 2.6.2 + dev: false /@aws-sdk/middleware-logger@3.425.0: resolution: {integrity: sha512-INE9XWRXx2f4a/r2vOU0tAmgctVp7nEaEasemNtVBYhqbKLZvr9ndLBSgKGgJ8LIcXAoISipaMuFiqIGkFsm7A==} @@ -2029,6 +2044,7 @@ packages: '@smithy/protocol-http': 3.0.4 '@smithy/types': 2.3.2 tslib: 2.6.2 + dev: false /@aws-sdk/middleware-recursion-detection@3.425.0: resolution: {integrity: sha512-77gnzJ5b91bgD75L/ugpOyerx6lR3oyS4080X1YI58EzdyBMkDrHM4FbMcY2RynETi3lwXCFzLRyZjWXY1mRlw==} @@ -2059,6 +2075,7 @@ packages: '@aws-sdk/types': 3.413.0 '@smithy/types': 2.3.5 tslib: 2.6.2 + dev: false /@aws-sdk/middleware-sdk-sts@3.425.0: resolution: {integrity: sha512-JFojrg76oKAoBknnr9EL5N2aJ1mRCtBqXoZYST58GSx8uYdFQ89qS65VNQ8JviBXzsrCNAn4vDhZ5Ch5E6TxGQ==} @@ -2081,6 +2098,7 @@ packages: '@smithy/types': 2.3.2 '@smithy/util-middleware': 2.0.1 tslib: 2.6.2 + dev: false /@aws-sdk/middleware-signing@3.425.0: resolution: {integrity: sha512-ZpOfgJHk7ovQ0sSwg3tU4NxFOnz53lJlkJRf7S+wxQALHM0P2MJ6LYBrZaFMVsKiJxNIdZBXD6jclgHg72ZW6Q==} @@ -2112,6 +2130,7 @@ packages: '@smithy/protocol-http': 3.0.4 '@smithy/types': 2.3.2 tslib: 2.6.2 + dev: false /@aws-sdk/middleware-user-agent@3.427.0: resolution: {integrity: sha512-y9HxYsNvnA3KqDl8w1jHeCwz4P9CuBEtu/G+KYffLeAMBsMZmh4SIkFFCO9wE/dyYg6+yo07rYcnnIfy7WA0bw==} @@ -2133,6 +2152,7 @@ packages: '@smithy/util-config-provider': 2.0.0 '@smithy/util-middleware': 2.0.1 tslib: 2.6.2 + dev: false /@aws-sdk/region-config-resolver@3.425.0: resolution: {integrity: sha512-u7uv/iUOapIJdRgRkO3wnpYsUgV6ponsZJQgVg/8L+n+Vo5PQL5gAcIuAOwcYSKQPFaeK+KbmByI4SyOK203Vw==} @@ -2182,7 +2202,7 @@ packages: '@smithy/node-http-handler': 2.1.7 '@smithy/property-provider': 2.0.12 '@smithy/protocol-http': 3.0.7 - '@smithy/shared-ini-file-loader': 2.0.10 + '@smithy/shared-ini-file-loader': 2.2.0 '@smithy/smithy-client': 2.1.11 '@smithy/types': 2.3.5 '@smithy/url-parser': 2.0.11 @@ -2196,6 +2216,7 @@ packages: tslib: 2.6.2 transitivePeerDependencies: - aws-crt + dev: false /@aws-sdk/token-providers@3.427.0: resolution: {integrity: sha512-4E5E+4p8lJ69PBY400dJXF06LUHYx5lkKzBEsYqWWhoZcoftrvi24ltIhUDoGVLkrLcTHZIWSdFAWSos4hXqeg==} @@ -2244,7 +2265,7 @@ packages: engines: {node: '>=14.0.0'} requiresBuild: true dependencies: - '@smithy/types': 2.3.2 + '@smithy/types': 2.3.5 tslib: 2.6.2 /@aws-sdk/types@3.425.0: @@ -2268,6 +2289,7 @@ packages: dependencies: '@aws-sdk/types': 3.413.0 tslib: 2.6.2 + dev: false /@aws-sdk/util-endpoints@3.427.0: resolution: {integrity: sha512-rSyiAIFF/EVvity/+LWUqoTMJ0a25RAc9iqx0WZ4tf1UjuEXRRXxZEb+jEZg1bk+pY84gdLdx9z5E+MSJCZxNQ==} @@ -2292,6 +2314,7 @@ packages: '@smithy/types': 2.3.2 bowser: 2.11.0 tslib: 2.6.2 + dev: false /@aws-sdk/util-user-agent-browser@3.425.0: resolution: {integrity: sha512-22Y9iMtjGcFjGILR6/xdp1qRezlHVLyXtnpEsbuPTiernRCPk6zfAnK/ATH77r02MUjU057tdxVkd5umUBTn9Q==} @@ -2312,9 +2335,10 @@ packages: optional: true dependencies: '@aws-sdk/types': 3.413.0 - '@smithy/node-config-provider': 2.0.11 - '@smithy/types': 2.3.2 + '@smithy/node-config-provider': 2.1.1 + '@smithy/types': 2.3.5 tslib: 2.6.2 + dev: false /@aws-sdk/util-user-agent-node@3.425.0: resolution: {integrity: sha512-SIR4F5uQeeVAi8lv4OgRirtdtNi5zeyogTuQgGi9su8F/WP1N6JqxofcwpUY5f8/oJ2UlXr/tx1f09UHfJJzvA==} @@ -2748,10 +2772,15 @@ packages: dependencies: '@jridgewell/trace-mapping': 0.3.9 + /@discoveryjs/json-ext@0.5.7: + resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} + engines: {node: '>=10.0.0'} + dev: true + /@dnd-kit/accessibility@3.0.1(react@18.2.0): resolution: {integrity: sha512-HXRrwS9YUYQO9lFRc/49uO/VICbM+O+ZRpFDe9Pd1rwVv2PCNkRiTZRdxrDgng/UkvdC3Re9r2vwPpXXrWeFzg==} peerDependencies: - react: '>=16.8.0' + react: ^18.2.0 dependencies: react: 18.2.0 tslib: 2.6.2 @@ -2760,8 +2789,8 @@ packages: /@dnd-kit/core@6.0.8(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-lYaoP8yHTQSLlZe6Rr9qogouGUz9oRUj4AHhDQGQzq/hqaJRpFo65X+JKsdHf8oUFBzx5A+SJPUvxAwTF2OabA==} peerDependencies: - react: '>=16.8.0' - react-dom: '>=16.8.0' + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: '@dnd-kit/accessibility': 3.0.1(react@18.2.0) '@dnd-kit/utilities': 3.2.1(react@18.2.0) @@ -2774,7 +2803,7 @@ packages: resolution: {integrity: sha512-wDkBHHf9iCi1veM834Gbk1429bd4lHX4RpAwT0y2cHLf246GAvU2sVw/oxWNpPKQNQRQaeGXhAVgrOl1IT+iyA==} peerDependencies: '@dnd-kit/core': ^6.0.7 - react: '>=16.8.0' + react: ^18.2.0 dependencies: '@dnd-kit/core': 6.0.8(react-dom@18.2.0)(react@18.2.0) '@dnd-kit/utilities': 3.2.1(react@18.2.0) @@ -2785,7 +2814,7 @@ packages: /@dnd-kit/utilities@3.2.1(react@18.2.0): resolution: {integrity: sha512-OOXqISfvBw/1REtkSK2N3Fi2EQiLMlWUlqnOK/UpOISqBZPWpE6TqL+jcPtMOkE8TqYGiURvRdPSI9hltNUjEA==} peerDependencies: - react: '>=16.8.0' + react: ^18.2.0 dependencies: react: 18.2.0 tslib: 2.6.2 @@ -2843,7 +2872,7 @@ packages: resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==} peerDependencies: '@types/react': '*' - react: '>=16.8.0' + react: ^18.2.0 peerDependenciesMeta: '@types/react': optional: true @@ -2881,7 +2910,7 @@ packages: /@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@18.2.0): resolution: {integrity: sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==} peerDependencies: - react: '>=16.8.0' + react: ^18.2.0 dependencies: react: 18.2.0 dev: false @@ -3146,8 +3175,8 @@ packages: /@faceless-ui/modal@2.0.1(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-z1PaaLxwuX+1In4vhUxODZndGKdCY+WIqzvtnas3CaYGGCVJBSJ4jfv9UEEGZzcahmSy+71bEL89cUT6d36j1Q==} peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: body-scroll-lock: 3.1.5 focus-trap: 6.9.4 @@ -3160,8 +3189,8 @@ packages: /@faceless-ui/scroll-info@1.3.0(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-X+doJMzQqyVGpwV/YgXUAalNWepP2W8ThgZspKZLFG43zTYLVTU17BYCjjY+ggKuA3b0W3JyXZ2M8f247AdmHw==} peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -3170,8 +3199,8 @@ packages: /@faceless-ui/window-info@2.1.1(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-gMAgda7beR4CNpBIXjgRVn97ek0LG3PAj9lxmoYdg574IEzLFZAh3eAYtTaS2XLKgb4+IHhsuBzlGmHbeOo2Aw==} peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -3737,8 +3766,8 @@ packages: resolution: {integrity: sha512-pAbJQksin223Yp1p1VsPKxkRtSppVij+HcLTzP89q2QuSA0z0p/T+f5jZjs8eV6tecMtmrjizhdLTbk0jkej1w==} peerDependencies: lexical: 0.12.5 - react: '>=17.x' - react-dom: '>=17.x' + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: '@lexical/clipboard': 0.12.5(lexical@0.12.5) '@lexical/code': 0.12.5(lexical@0.12.5) @@ -3892,8 +3921,8 @@ packages: resolution: {integrity: sha512-NNDFdP+2HojtNhCkRfE6/D6ro6pBNihaOzMbGK84lNWzRu+CfBjwzGt4jmnqimLuqp5yE5viHS2vi+QOAnD5FQ==} peerDependencies: monaco-editor: '>= 0.25.0 < 1' - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: '@monaco-editor/loader': 1.3.3(monaco-editor@0.38.0) monaco-editor: 0.38.0 @@ -3907,6 +3936,15 @@ packages: sparse-bitfield: 3.0.3 optional: true + /@next/bundle-analyzer@14.1.0: + resolution: {integrity: sha512-RJWjnlMp/1WSW0ahAdawV22WgJiC6BVaFS5Xfhw6gP7NJEX3cAJjh4JqSHKGr8GnLNRaFCVTQdDPoX84E421BA==} + dependencies: + webpack-bundle-analyzer: 4.10.1 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: true + /@next/env@14.0.2: resolution: {integrity: sha512-HAW1sljizEaduEOes/m84oUqeIDAUYBR1CDwu2tobNlNDFP3cSm9d6QsOsGeNlIppU1p/p1+bWbYCbvwjFiceA==} dev: false @@ -4339,6 +4377,10 @@ packages: config-chain: 1.1.13 dev: true + /@polka/url@1.0.0-next.24: + resolution: {integrity: sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==} + dev: true + /@popperjs/core@2.11.8: resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} @@ -4417,7 +4459,7 @@ packages: resolution: {integrity: sha512-Q+htKzib5em0MdaQZMmPomaswaU3xhcVqmLi2CxqQypSjbYgBPPd+DuhrXKoWYLDDkkbY2uyfe4Lp3yLRWeXYw==} engines: {node: '>=8'} peerDependencies: - react: 15.x || 16.x || 17.x || 18.x + react: ^18.2.0 dependencies: '@sentry/browser': 7.77.0 '@sentry/types': 7.77.0 @@ -4514,7 +4556,7 @@ packages: engines: {node: '>=14.0.0'} requiresBuild: true dependencies: - '@smithy/types': 2.3.2 + '@smithy/types': 2.3.5 tslib: 2.6.2 /@smithy/chunked-blob-reader-native@2.0.0: @@ -4549,6 +4591,7 @@ packages: '@smithy/util-config-provider': 2.0.0 '@smithy/util-middleware': 2.0.1 tslib: 2.6.2 + dev: false /@smithy/credential-provider-imds@2.0.11: resolution: {integrity: sha512-uJJs8dnM5iXkn8a2GaKvlKMhcOJ+oJPYqY9gY3CM/EieCVObIDjxUtR/g8lU/k/A+OauA78GzScAfulmFjPOYA==} @@ -4556,10 +4599,11 @@ packages: requiresBuild: true dependencies: '@smithy/node-config-provider': 2.0.11 - '@smithy/property-provider': 2.0.9 - '@smithy/types': 2.3.2 + '@smithy/property-provider': 2.0.12 + '@smithy/types': 2.3.5 '@smithy/url-parser': 2.0.8 tslib: 2.6.2 + dev: false /@smithy/credential-provider-imds@2.0.16: resolution: {integrity: sha512-tKa2xF+69TvGxJT+lnJpGrKxUuAZDLYXFhqnPEgnHz+psTpkpcB4QRjHj63+uj83KaeFJdTfW201eLZeRn6FfA==} @@ -4629,6 +4673,7 @@ packages: '@smithy/types': 2.3.2 '@smithy/util-base64': 2.0.0 tslib: 2.6.2 + dev: false /@smithy/fetch-http-handler@2.2.3: resolution: {integrity: sha512-0G9sePU+0R+8d7cie+OXzNbbkjnD4RfBlVCs46ZEuQAMcxK8OniemYXSSkOc80CCk8Il4DnlYZcUSvsIs2OB2w==} @@ -4667,6 +4712,7 @@ packages: '@smithy/util-buffer-from': 2.0.0 '@smithy/util-utf8': 2.0.0 tslib: 2.6.2 + dev: false /@smithy/hash-stream-node@2.0.11: resolution: {integrity: sha512-Jn2yl+Dn0kvwKvSavvR1/BFVYa2wIkaJKWeTH48kno89gqHAJxMh1hrtBN6SJ7F8VhodNZTiNOlQVqCSfLheNQ==} @@ -4689,6 +4735,7 @@ packages: dependencies: '@smithy/types': 2.3.2 tslib: 2.6.2 + dev: false /@smithy/is-array-buffer@2.0.0: resolution: {integrity: sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==} @@ -4712,6 +4759,7 @@ packages: '@smithy/protocol-http': 3.0.4 '@smithy/types': 2.3.2 tslib: 2.6.2 + dev: false /@smithy/middleware-content-length@2.0.13: resolution: {integrity: sha512-Md2kxWpaec3bXp1oERFPQPBhOXCkGSAF7uc1E+4rkwjgw3/tqAXRtbjbggu67HJdwaif76As8AV6XxbD1HzqTQ==} @@ -4732,6 +4780,7 @@ packages: '@smithy/url-parser': 2.0.8 '@smithy/util-middleware': 2.0.1 tslib: 2.6.2 + dev: false /@smithy/middleware-endpoint@2.1.0: resolution: {integrity: sha512-e6HZbfrp9CNTJqIPSgkydB9mNQXiq5pkHF3ZB6rOzPPR9PkJBoGFo9TcM7FaaKFUaH4Kc20AX6WwwVyIlNhXTA==} @@ -4758,6 +4807,7 @@ packages: '@smithy/util-retry': 2.0.1 tslib: 2.6.2 uuid: 8.3.2 + dev: false /@smithy/middleware-retry@2.0.16: resolution: {integrity: sha512-Br5+0yoiMS0ugiOAfJxregzMMGIRCbX4PYo1kDHtLgvkA/d++aHbnHB819m5zOIAMPvPE7AThZgcsoK+WOsUTA==} @@ -4788,6 +4838,7 @@ packages: dependencies: '@smithy/types': 2.3.2 tslib: 2.6.2 + dev: false /@smithy/middleware-stack@2.0.1: resolution: {integrity: sha512-UexsfY6/oQZRjTQL56s9AKtMcR60tBNibSgNYX1I2WXaUaXg97W9JCkFyth85TzBWKDBTyhLfenrukS/kyu54A==} @@ -4796,6 +4847,7 @@ packages: dependencies: '@smithy/types': 2.3.2 tslib: 2.6.2 + dev: false /@smithy/middleware-stack@2.0.5: resolution: {integrity: sha512-bVQU/rZzBY7CbSxIrDTGZYnBWKtIw+PL/cRc9B7etZk1IKSOe0NvKMJyWllfhfhrTeMF6eleCzOihIQympAvPw==} @@ -4814,6 +4866,7 @@ packages: '@smithy/shared-ini-file-loader': 2.0.10 '@smithy/types': 2.3.2 tslib: 2.6.2 + dev: false /@smithy/node-config-provider@2.1.1: resolution: {integrity: sha512-1lF6s1YWBi1LBu2O30tD3jyTgMtuvk/Z1twzXM4GPYe4dmZix4nNREPJIPOcfFikNU2o0eTYP80+izx5F2jIJA==} @@ -4835,6 +4888,7 @@ packages: '@smithy/querystring-builder': 2.0.8 '@smithy/types': 2.3.2 tslib: 2.6.2 + dev: false /@smithy/node-http-handler@2.1.7: resolution: {integrity: sha512-PQIKZXlp3awCDn/xNlCSTFE7aYG/5Tx33M05NfQmWYeB5yV1GZZOSz4dXpwiNJYTXb9jPqjl+ueXXkwtEluFFA==} @@ -4860,8 +4914,9 @@ packages: engines: {node: '>=14.0.0'} requiresBuild: true dependencies: - '@smithy/types': 2.3.2 + '@smithy/types': 2.3.5 tslib: 2.6.2 + dev: false /@smithy/protocol-http@3.0.4: resolution: {integrity: sha512-CGfSWk6TRlbwa8YgrSXdn80Yu7pov3EV/h7TSfiCHhq6/LO3WymmqnzgH1f0qV2bdTDipIkTNp5dGCGN3Af/5g==} @@ -4870,6 +4925,7 @@ packages: dependencies: '@smithy/types': 2.3.2 tslib: 2.6.2 + dev: false /@smithy/protocol-http@3.0.7: resolution: {integrity: sha512-HnZW8y+r66ntYueCDbLqKwWcMNWW8o3eVpSrHNluwtBJ/EUWfQHRKSiu6vZZtc6PGfPQWgVfucoCE/C3QufMAA==} @@ -4896,6 +4952,7 @@ packages: '@smithy/types': 2.3.5 '@smithy/util-uri-escape': 2.0.0 tslib: 2.6.2 + dev: false /@smithy/querystring-parser@2.0.11: resolution: {integrity: sha512-YXe7jhi7s3dQ0Fu9dLoY/gLu6NCyy8tBWJL/v2c9i7/RLpHgKT+uT96/OqZkHizCJ4kr0ZD46tzMjql/o60KLg==} @@ -4912,6 +4969,7 @@ packages: dependencies: '@smithy/types': 2.3.5 tslib: 2.6.2 + dev: false /@smithy/service-error-classification@2.0.1: resolution: {integrity: sha512-QHa9+t+v4s0cMuDCcbjIJN67mNZ42/+fc3jKe8P6ZMPXZl5ksKk6a8vhZ/m494GZng5eFTc3OePv+NF9cG83yg==} @@ -4919,6 +4977,7 @@ packages: requiresBuild: true dependencies: '@smithy/types': 2.3.5 + dev: false /@smithy/service-error-classification@2.0.4: resolution: {integrity: sha512-77506l12I5gxTZqBkx3Wb0RqMG81bMYLaVQ+EqIWFwQDJRs5UFeXogKxSKojCmz1wLUziHZQXm03MBzPQiumQw==} @@ -4934,6 +4993,7 @@ packages: dependencies: '@smithy/types': 2.3.5 tslib: 2.6.2 + dev: false /@smithy/shared-ini-file-loader@2.2.0: resolution: {integrity: sha512-xFXqs4vAb5BdkzHSRrTapFoaqS4/3m/CGZzdw46fBjYZ0paYuLAoMY60ICCn1FfGirG+PiJ3eWcqJNe4/SkfyA==} @@ -4976,6 +5036,7 @@ packages: '@smithy/types': 2.3.2 '@smithy/util-stream': 2.0.11 tslib: 2.6.2 + dev: false /@smithy/types@2.3.2: resolution: {integrity: sha512-iH0cdKi7HQlzfAM3w2shFk/qZYKAqJWswtpmQpPtlruF+uFZeGEpMJjgDRyhWiddfVM4e2oP4nMaOBsMy6lXgg==} @@ -4983,6 +5044,7 @@ packages: requiresBuild: true dependencies: tslib: 2.6.2 + dev: false /@smithy/types@2.3.5: resolution: {integrity: sha512-ehyDt8M9hehyxrLQGoA1BGPou8Js1Ocoh5M0ngDhJMqbFmNK5N6Xhr9/ZExWkyIW8XcGkiMPq3ZUEE0ScrhbuQ==} @@ -5006,6 +5068,7 @@ packages: '@smithy/querystring-parser': 2.0.8 '@smithy/types': 2.3.2 tslib: 2.6.2 + dev: false /@smithy/util-base64@2.0.0: resolution: {integrity: sha512-Zb1E4xx+m5Lud8bbeYi5FkcMJMnn+1WUnJF3qD7rAdXpaL7UjkFQLdmW5fHadoKbdHpwH9vSR8EyTJFHJs++tA==} @@ -5064,6 +5127,7 @@ packages: '@smithy/types': 2.3.2 bowser: 2.11.0 tslib: 2.6.2 + dev: false /@smithy/util-defaults-mode-node@2.0.11: resolution: {integrity: sha512-tmqjNsfj+bgZN6jXBe6efZnukzILA7BUytHkzqikuRLNtR+0VVchQHvawD0w6vManh76rO81ydhioe7i4oBzuA==} @@ -5077,6 +5141,7 @@ packages: '@smithy/smithy-client': 2.1.11 '@smithy/types': 2.3.2 tslib: 2.6.2 + dev: false /@smithy/util-defaults-mode-node@2.0.19: resolution: {integrity: sha512-7pScU4jBFADB2MBYKM3zb5onMh6Nn0X3IfaFVLYPyCarTIZDLUtUl1GtruzEUJPmDzP+uGeqOtU589HDY0Ni6g==} @@ -5122,6 +5187,7 @@ packages: '@smithy/service-error-classification': 2.0.1 '@smithy/types': 2.3.2 tslib: 2.6.2 + dev: false /@smithy/util-retry@2.0.4: resolution: {integrity: sha512-b+n1jBBKc77C1E/zfBe1Zo7S9OXGBiGn55N0apfhZHxPUP/fMH5AhFUUcWaJh7NAnah284M5lGkBKuhnr3yK5w==} @@ -5145,6 +5211,7 @@ packages: '@smithy/util-hex-encoding': 2.0.0 '@smithy/util-utf8': 2.0.0 tslib: 2.6.2 + dev: false /@smithy/util-stream@2.0.16: resolution: {integrity: sha512-b5ZSRh1KzUzC7LoJcpfk7+iXGoRr3WylEfmPd4FnBLm90OwxSB9VgK1fDZwicfYxSEvWHdYXgvvjPtenEYBBhw==} @@ -5388,8 +5455,8 @@ packages: resolution: {integrity: sha512-sXOGON+WNTh3MLE9rve97ftaZukN3oNf2KjDy7YTx6hcTO2uuLHuCGynMDhFwGw/jYf4OJ2Qk0i4i79qMNNkyw==} engines: {node: '>=12'} peerDependencies: - react: ^18.0.0 - react-dom: ^18.0.0 + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: '@babel/runtime': 7.22.15 '@testing-library/dom': 8.20.1 @@ -6569,11 +6636,6 @@ packages: type-fest: 1.4.0 dev: true - /ansi-regex@2.1.1: - resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} - engines: {node: '>=0.10.0'} - dev: false - /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -6613,21 +6675,10 @@ packages: normalize-path: 3.0.0 picomatch: 2.3.1 - /aproba@1.2.0: - resolution: {integrity: sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==} - dev: false - /arch@2.2.0: resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} dev: true - /are-we-there-yet@1.1.7: - resolution: {integrity: sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==} - dependencies: - delegates: 1.0.0 - readable-stream: 2.3.8 - dev: false - /arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} @@ -6768,8 +6819,8 @@ packages: tslib: 2.6.2 dev: true - /async-mutex@0.3.2: - resolution: {integrity: sha512-HuTK7E7MT7jZEh1P9GtRW9+aTWiDWWi9InbZ5hjxrnRa39KS4BW04+xLBhYNS2aXhHUIKZSw3gj4Pn1pj+qGAA==} + /async-mutex@0.4.1: + resolution: {integrity: sha512-WfoBo4E/TbCX1G95XTjbWTE3X2XLG0m1Xbv2cwOtuPdyH9CZvnaA5nCt1ucjaKEgW2A5IF71hxrRhr83Je5xjA==} dependencies: tslib: 2.6.2 dev: true @@ -6815,7 +6866,7 @@ packages: /axios@1.4.0: resolution: {integrity: sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==} dependencies: - follow-redirects: 1.15.3 + follow-redirects: 1.15.3(debug@4.3.4) form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -7082,17 +7133,6 @@ packages: dependencies: node-int64: 0.4.0 - /bson-ext@4.0.3: - resolution: {integrity: sha512-uvhVHZ7+eAksEFFjyuomrGyUzLqOU/EvmB+bGdG0U3FfkRmEF23LuCVxDdNZSmifvkXNPxZ0lAv2xE57lLKMSA==} - engines: {node: '>=6.9.0'} - requiresBuild: true - dependencies: - bindings: 1.5.0 - bson: 4.7.2 - nan: 2.18.0 - prebuild-install: 6.1.4 - dev: false - /bson-objectid@2.0.4: resolution: {integrity: sha512-vgnKAUzcDoa+AeyYwXCoHyF2q6u/8H46dxu5JN+4/TZeq/Dlinn0K6GvxsCLb3LHUJl0m/TLiEK31kUwtgocMQ==} dev: false @@ -7102,11 +7142,12 @@ packages: engines: {node: '>=6.9.0'} dependencies: buffer: 5.7.1 + dev: false /bson@5.5.1: resolution: {integrity: sha512-ix0EwukN2EpC0SRWIj/7B5+A6uQMQy6KMREI9qQqvgpkV2frH63T0UDVd1SYedL6dNCmDBYB3QtXi4ISk9YT+g==} engines: {node: '>=14.20.1'} - dev: false + dev: true /buffer-crc32@0.2.13: resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} @@ -7423,11 +7464,6 @@ packages: resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} - /code-point-at@1.1.0: - resolution: {integrity: sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==} - engines: {node: '>=0.10.0'} - dev: false - /collect-v8-coverage@1.0.2: resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} @@ -7588,10 +7624,6 @@ packages: resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} dev: true - /console-control-strings@1.1.0: - resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} - dev: false - /console-table-printer@2.11.2: resolution: {integrity: sha512-uuUHie0sfPP542TKGzPFal0W1wo1beuKAqIZdaavcONx8OoqdnJRKjkinbRTOta4FaCa1RcIL+7mMJWX3pQGVg==} dependencies: @@ -7891,6 +7923,7 @@ packages: /core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + dev: true /cosmiconfig@7.1.0: resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} @@ -8110,6 +8143,10 @@ packages: mimic-fn: 3.1.0 dev: false + /debounce@1.2.1: + resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==} + dev: true + /debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: @@ -8160,13 +8197,6 @@ packages: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} dev: true - /decompress-response@4.2.1: - resolution: {integrity: sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==} - engines: {node: '>=8'} - dependencies: - mimic-response: 2.1.0 - dev: false - /decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} @@ -8315,10 +8345,6 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - /delegates@1.0.0: - resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} - dev: false - /depd@1.1.2: resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} engines: {node: '>= 0.6'} @@ -8345,12 +8371,6 @@ packages: engines: {node: '>=0.10.0'} dev: false - /detect-libc@1.0.3: - resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} - engines: {node: '>=0.10'} - hasBin: true - dev: false - /detect-libc@2.0.2: resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} engines: {node: '>=8'} @@ -8572,6 +8592,10 @@ packages: '@types/pg': 8.10.2 pg: 8.11.3 + /duplexer@0.1.2: + resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} + dev: true + /duplexify@4.1.2: resolution: {integrity: sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==} dependencies: @@ -8860,7 +8884,6 @@ packages: /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - dev: false /escape-string-regexp@5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} @@ -9707,7 +9730,7 @@ packages: tabbable: 5.3.3 dev: false - /follow-redirects@1.15.3: + /follow-redirects@1.15.3(debug@4.3.4): resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==} engines: {node: '>=4.0'} peerDependencies: @@ -9715,7 +9738,8 @@ packages: peerDependenciesMeta: debug: optional: true - dev: false + dependencies: + debug: 4.3.4(supports-color@5.5.0) /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -9832,19 +9856,6 @@ packages: /functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - /gauge@2.7.4: - resolution: {integrity: sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==} - dependencies: - aproba: 1.2.0 - console-control-strings: 1.1.0 - has-unicode: 2.0.1 - object-assign: 4.1.1 - signal-exit: 3.0.7 - string-width: 1.0.2 - strip-ansi: 3.0.1 - wide-align: 1.1.5 - dev: false - /gaxios@5.1.3: resolution: {integrity: sha512-95hVgBRgEIRQQQHIbnxBXeHbW4TqFk4ZDJW7wmVtvYar72FdhRIo1UGOLS2eRAKCPEdPBWu+M7+A33D9CdX9rA==} engines: {node: '>=12'} @@ -10327,6 +10338,13 @@ packages: - supports-color dev: true + /gzip-size@6.0.0: + resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} + engines: {node: '>=10'} + dependencies: + duplexer: 0.1.2 + dev: true + /handlebars@4.7.8: resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} engines: {node: '>=0.4.7'} @@ -10381,10 +10399,6 @@ packages: dependencies: has-symbols: 1.0.3 - /has-unicode@2.0.1: - resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} - dev: false - /has-yarn@3.0.0: resolution: {integrity: sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -10793,13 +10807,6 @@ packages: call-bind: 1.0.5 dev: false - /is-fullwidth-code-point@1.0.0: - resolution: {integrity: sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==} - engines: {node: '>=0.10.0'} - dependencies: - number-is-nan: 1.0.1 - dev: false - /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} @@ -11736,7 +11743,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.11.17 + '@types/node': 20.6.2 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true @@ -12426,12 +12433,6 @@ packages: engines: {node: '>=8'} dev: true - /md5-file@5.0.0: - resolution: {integrity: sha512-xbEFXCYVWrSx/gEKS1VPlg84h/4L20znVIulKw6kMfmBUAZNAnF00eczz9ICMl+/hjQGo5KSXRxbL/47X3rmMw==} - engines: {node: '>=10.13.0'} - hasBin: true - dev: true - /md5@2.3.0: resolution: {integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==} dependencies: @@ -12553,11 +12554,6 @@ packages: engines: {node: '>=4'} dev: true - /mimic-response@2.1.0: - resolution: {integrity: sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==} - engines: {node: '>=8'} - dev: false - /mimic-response@3.1.0: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} @@ -12666,38 +12662,44 @@ packages: '@types/whatwg-url': 8.2.2 whatwg-url: 11.0.0 - /mongodb-memory-server-core@8.13.0: - resolution: {integrity: sha512-4NTOzYOlRUilwb8CxOKix/XbZmac4cLpmEU03eaHx90lgEp+ARZM2PQtIOEg3nhHo97r9THIEv6Gs4LECokp0Q==} - engines: {node: '>=12.22.0'} + /mongodb-memory-server-core@9.1.6: + resolution: {integrity: sha512-3H/dq5II+XcSbK80hicMw4zFlDxcpjt4oWJq76RlOVuLoaf3AFqVheR6Vqx9ymlIqER4Jni58FMCIIRbesia1A==} + engines: {node: '>=14.20.1'} dependencies: - async-mutex: 0.3.2 + async-mutex: 0.4.1 camelcase: 6.3.0 debug: 4.3.4(supports-color@5.5.0) find-cache-dir: 3.3.2 - get-port: 5.1.1 - https-proxy-agent: 5.0.1 - md5-file: 5.0.0 - mongodb: 4.17.1 + follow-redirects: 1.15.3(debug@4.3.4) + https-proxy-agent: 7.0.2 + mongodb: 5.9.2 new-find-package-json: 2.0.0 semver: 7.5.4 - tar-stream: 2.2.0 + tar-stream: 3.1.6 tslib: 2.6.2 - uuid: 9.0.1 yauzl: 2.10.0 transitivePeerDependencies: - - aws-crt + - '@aws-sdk/credential-providers' + - '@mongodb-js/zstd' + - kerberos + - mongodb-client-encryption + - snappy - supports-color dev: true - /mongodb-memory-server@8.13.0: - resolution: {integrity: sha512-CyrKMwEmRePn8iQ3LtWQiOJxlGK0eM+NNTq3Yg8m7gaywepFu24mF7s13q87Kfuq0WgBuCJQ4t6VcUZJ4m+KWQ==} - engines: {node: '>=12.22.0'} + /mongodb-memory-server@9.1.6: + resolution: {integrity: sha512-gzcpgGYlPhuKmria37W+bvYy6W+OkX2UVG7MoP41OWFvQv2Hn7A+fLXkV+lsMmhog1lMQprdV6AR+gixgheLaw==} + engines: {node: '>=14.20.1'} requiresBuild: true dependencies: - mongodb-memory-server-core: 8.13.0 + mongodb-memory-server-core: 9.1.6 tslib: 2.6.2 transitivePeerDependencies: - - aws-crt + - '@aws-sdk/credential-providers' + - '@mongodb-js/zstd' + - kerberos + - mongodb-client-encryption + - snappy - supports-color dev: true @@ -12713,10 +12715,10 @@ packages: '@mongodb-js/saslprep': 1.1.0 transitivePeerDependencies: - aws-crt - dev: true + dev: false - /mongodb@5.9.1: - resolution: {integrity: sha512-NBGA8AfJxGPeB12F73xXwozt8ZpeIPmCUeWRwl9xejozTXFes/3zaep9zhzs1B/nKKsw4P3I4iPfXl3K7s6g+Q==} + /mongodb@5.9.2: + resolution: {integrity: sha512-H60HecKO4Bc+7dhOv4sJlgvenK4fQNqqUIlXxZYQNbfEWSALGAwGoyJd/0Qwk4TttFXUOHJ2ZJQe/52ScaUwtQ==} engines: {node: '>=14.20.1'} peerDependencies: '@aws-sdk/credential-providers': ^3.188.0 @@ -12741,30 +12743,26 @@ packages: socks: 2.7.1 optionalDependencies: '@mongodb-js/saslprep': 1.1.0 - dev: false + dev: true /mongoose-paginate-v2@1.7.22: resolution: {integrity: sha512-xW5GugkE21DJiu9e13EOxKt4ejEKQkRP/S1PkkXRjnk2rRZVKBcld1nPV+VJ/YCPfm8hb3sz9OvI7O38RmixkA==} engines: {node: '>=4.0.0'} dev: false - /mongoose@7.6.8: - resolution: {integrity: sha512-q9zAySH+UtOK5yonWyNcLfq3PxrY6s4gdta4qNGKNOE2yTVoY9FP4hQtvWYnv4rkdk7T8QmQMC7bbhJjDxIunw==} - engines: {node: '>=14.20.1'} + /mongoose@6.12.3: + resolution: {integrity: sha512-MNJymaaXali7w7rHBxVUoQ3HzHHMk/7I/+yeeoSa4rUzdjZwIWQznBNvVgc0A8ghuJwsuIkb5LyLV6gSjGjWyQ==} + engines: {node: '>=12.0.0'} dependencies: - bson: 5.5.1 + bson: 4.7.2 kareem: 2.5.1 - mongodb: 5.9.1 + mongodb: 4.17.1 mpath: 0.9.0 - mquery: 5.0.0 + mquery: 4.0.3 ms: 2.1.3 sift: 16.0.1 transitivePeerDependencies: - - '@aws-sdk/credential-providers' - - '@mongodb-js/zstd' - - kerberos - - mongodb-client-encryption - - snappy + - aws-crt - supports-color dev: false @@ -12773,15 +12771,20 @@ packages: engines: {node: '>=4.0.0'} dev: false - /mquery@5.0.0: - resolution: {integrity: sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==} - engines: {node: '>=14.0.0'} + /mquery@4.0.3: + resolution: {integrity: sha512-J5heI+P08I6VJ2Ky3+33IpCdAvlYGTSUjwTPxkAr8i8EoduPMBX2OY/wa3IKZIQl7MU4SbFk8ndgSKyB/cl1zA==} + engines: {node: '>=12.0.0'} dependencies: debug: 4.3.4(supports-color@5.5.0) transitivePeerDependencies: - supports-color dev: false + /mrmime@2.0.0: + resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} + engines: {node: '>=10'} + dev: true + /ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} @@ -12804,10 +12807,6 @@ packages: thenify-all: 1.6.0 dev: false - /nan@2.18.0: - resolution: {integrity: sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==} - dev: false - /nanoid@3.3.6: resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -12912,7 +12911,7 @@ packages: - babel-plugin-macros dev: false - /next@14.1.0(@babel/core@7.22.20)(react-dom@18.3.0-canary-b36ae8d7a-20231207)(react@18.3.0-canary-b36ae8d7a-20231207)(sass@1.70.0): + /next@14.1.0(@babel/core@7.22.20)(react-dom@18.2.0)(react@18.2.0)(sass@1.70.0): resolution: {integrity: sha512-wlzrsbfeSU48YQBjZhDzOwhWhGsy+uQycR8bHAOt1LY1bn3zZEcDyHQOEoN3aWzQ8LHCAJ1nqrWCc9XF2+O45Q==} engines: {node: '>=18.17.0'} hasBin: true @@ -12933,10 +12932,10 @@ packages: caniuse-lite: 1.0.30001579 graceful-fs: 4.2.11 postcss: 8.4.31 - react: 18.3.0-canary-b36ae8d7a-20231207 - react-dom: 18.3.0-canary-b36ae8d7a-20231207(react@18.3.0-canary-b36ae8d7a-20231207) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) sass: 1.70.0 - styled-jsx: 5.1.1(@babel/core@7.22.20)(react@18.3.0-canary-b36ae8d7a-20231207) + styled-jsx: 5.1.1(@babel/core@7.22.20)(react@18.2.0) optionalDependencies: '@next/swc-darwin-arm64': 14.1.0 '@next/swc-darwin-x64': 14.1.0 @@ -12991,12 +12990,6 @@ packages: - '@babel/core' - babel-plugin-macros - /node-abi@2.30.1: - resolution: {integrity: sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==} - dependencies: - semver: 5.7.2 - dev: false - /node-abi@3.47.0: resolution: {integrity: sha512-2s6B2CWZM//kPgwnuI0KrYwNjfdByE25zvAaEpq9IH4zcNsarH8Ihu/UuX6XMPEogDAxkuUFeZn60pXNHAqn3A==} engines: {node: '>=10'} @@ -13208,20 +13201,6 @@ packages: path-key: 4.0.0 dev: true - /npmlog@4.1.2: - resolution: {integrity: sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==} - dependencies: - are-we-there-yet: 1.1.7 - console-control-strings: 1.1.0 - gauge: 2.7.4 - set-blocking: 2.0.0 - dev: false - - /number-is-nan@1.0.1: - resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==} - engines: {node: '>=0.10.0'} - dev: false - /nwsapi@2.2.7: resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} dev: true @@ -13345,6 +13324,11 @@ packages: is-wsl: 2.2.0 dev: true + /opener@1.5.2: + resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} + hasBin: true + dev: true + /optionator@0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} @@ -13984,26 +13968,6 @@ packages: /postgres-range@1.1.3: resolution: {integrity: sha512-VdlZoocy5lCP0c/t66xAfclglEapXPCIVhqqJRncYpvbCgImF0w67aPKfbqUMr72tO2k5q0TdTZwCLjPTI6C9g==} - /prebuild-install@6.1.4: - resolution: {integrity: sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==} - engines: {node: '>=6'} - hasBin: true - dependencies: - detect-libc: 1.0.3 - expand-template: 2.0.3 - github-from-package: 0.0.0 - minimist: 1.2.8 - mkdirp-classic: 0.5.3 - napi-build-utils: 1.0.2 - node-abi: 2.30.1 - npmlog: 4.1.2 - pump: 3.0.0 - rc: 1.2.8 - simple-get: 3.1.1 - tar-fs: 2.1.1 - tunnel-agent: 0.6.0 - dev: false - /prebuild-install@7.1.1: resolution: {integrity: sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==} engines: {node: '>=10'} @@ -14081,6 +14045,7 @@ packages: /process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + dev: true /process-warning@2.2.0: resolution: {integrity: sha512-/1WZ8+VQjR6avWOgHeEPd7SDQmFQ1B5mC1eRXsCm5TarlNmx/wCsa5GEaxGm05BORRtyG/Ex/3xq3TuRvq57qg==} @@ -14253,8 +14218,8 @@ packages: resolution: {integrity: sha512-A9jfz/4CTdsIsE7WCQtO9UkOpMBcBRh8LxyHl2eoZz1ki02jpyUL5xt58gabd0CyeLQ8fRyQ+s2lyV2Ufu8Owg==} engines: {node: '>= 6.0.0'} peerDependencies: - react: '>=15.6.2' - react-dom: '>=15.6.2' + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: classnames: 2.3.2 prop-types: 15.8.1 @@ -14265,8 +14230,8 @@ packages: /react-datepicker@4.16.0(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-hNQ0PAg/LQoVbDUO/RWAdm/RYmPhN3cz7LuQ3hqbs24OSp69QCiKOJRrQ4jk1gv1jNR5oYu8SjjgfDh8q6Q1yw==} peerDependencies: - react: ^16.9.0 || ^17 || ^18 - react-dom: ^16.9.0 || ^17 || ^18 + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: '@popperjs/core': 2.11.8 classnames: 2.3.2 @@ -14282,8 +14247,8 @@ packages: resolution: {integrity: sha512-GrzyqQnjIMoej+jMjWvtVSsQqhXgzEGqpXlJ2dAGfOk7Q26qcm8Gu6xtI430PBUyZsERe8BJSQf+7VZZo8IBNQ==} engines: {node: '>= 8'} peerDependencies: - react: ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 - react-dom: ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: '@emotion/css': 11.11.2 classnames: 2.3.2 @@ -14303,21 +14268,11 @@ packages: react: 18.2.0 scheduler: 0.23.0 - /react-dom@18.3.0-canary-b36ae8d7a-20231207(react@18.3.0-canary-b36ae8d7a-20231207): - resolution: {integrity: sha512-deqPbiB1Uc5Fa7c+RbTbyKo6F1bGjVBbQjeY9pzH0mlIbKUsddU5OKEWnD8SY+UmatNkBJ6PlwcdZNG0IZ8oSw==} - peerDependencies: - react: 18.3.0-canary-b36ae8d7a-20231207 - dependencies: - loose-envify: 1.4.0 - react: 18.3.0-canary-b36ae8d7a-20231207 - scheduler: 0.24.0-canary-b36ae8d7a-20231207 - dev: false - /react-error-boundary@3.1.4(react@18.2.0): resolution: {integrity: sha512-uM9uPzZJTF6wRQORmSrvOIgt4lJ9MC1sNgEOj2XGsDTRE4kmpWxg7ENK9EWNKJRMAOY9z0MuF4yIfl6gp4sotA==} engines: {node: '>=10', npm: '>=6'} peerDependencies: - react: '>=16.13.1' + react: ^18.2.0 dependencies: '@babel/runtime': 7.22.15 react: 18.2.0 @@ -14326,7 +14281,7 @@ packages: /react-error-boundary@4.0.11(react@18.2.0): resolution: {integrity: sha512-U13ul67aP5DOSPNSCWQ/eO0AQEYzEFkVljULQIjMV0KlffTAhxuDoBKdO0pb/JZ8mDhMKFZ9NZi0BmLGUiNphw==} peerDependencies: - react: '>=16.13.1' + react: ^18.2.0 dependencies: '@babel/runtime': 7.22.15 react: 18.2.0 @@ -14338,7 +14293,7 @@ packages: /react-image-crop@10.1.8(react@18.2.0): resolution: {integrity: sha512-4rb8XtXNx7ZaOZarKKnckgz4xLMvds/YrU6mpJfGhGAsy2Mg4mIw1x+DCCGngVGq2soTBVVOxx2s/C6mTX9+pA==} peerDependencies: - react: '>=16.13.1' + react: ^18.2.0 dependencies: react: 18.2.0 dev: false @@ -14357,8 +14312,8 @@ packages: /react-onclickoutside@6.13.0(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-ty8So6tcUpIb+ZE+1HAhbLROvAIJYyJe/1vRrrcmW+jLsaM+/powDRqxzo6hSh9CuRZGSL1Q8mvcF5WRD93a0A==} peerDependencies: - react: ^15.5.x || ^16.x || ^17.x || ^18.x - react-dom: ^15.5.x || ^16.x || ^17.x || ^18.x + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -14368,8 +14323,8 @@ packages: resolution: {integrity: sha512-e1hj8lL3uM+sgSR4Lxzn5h1GxBlpa4CQz0XLF8kx4MDrDRWY0Ena4c97PUeSX9i5W3UAfDP0z0FXCTQkoXUl3Q==} peerDependencies: '@popperjs/core': ^2.0.0 - react: ^16.8.0 || ^17 || ^18 - react-dom: ^16.8.0 || ^17 || ^18 + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: '@popperjs/core': 2.11.8 react: 18.2.0 @@ -14380,7 +14335,7 @@ packages: /react-router-dom@5.3.4(react@18.2.0): resolution: {integrity: sha512-m4EqFMHv/Ih4kpcBCONHbkT68KoAeHN4p3lAGoNryfHi0dMy0kCzEZakiKRsvg5wHZ/JLrLW8o8KomWiz/qbYQ==} peerDependencies: - react: '>=15' + react: ^18.2.0 dependencies: '@babel/runtime': 7.22.15 history: 4.10.1 @@ -14395,7 +14350,7 @@ packages: /react-router@5.3.4(react@18.2.0): resolution: {integrity: sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA==} peerDependencies: - react: '>=15' + react: ^18.2.0 dependencies: '@babel/runtime': 7.22.15 history: 4.10.1 @@ -14412,8 +14367,8 @@ packages: /react-select@5.7.4(@types/react@18.2.15)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-NhuE56X+p9QDFh4BgeygHFIvJJszO1i1KSkg/JPcIJrbovyRtI+GuOEa4XzFCEpZRAEoEI8u/cAHK+jG/PgUzQ==} peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: '@babel/runtime': 7.22.15 '@emotion/cache': 11.11.0 @@ -14433,8 +14388,8 @@ packages: /react-toastify@10.0.4(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-etR3RgueY8pe88SA67wLm8rJmL1h+CLqUGHuAoNsseW35oTGJEri6eBTyaXnFKNQ80v/eO10hBYLgz036XRGgA==} peerDependencies: - react: '>=16' - react-dom: '>=16' + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: clsx: 2.1.0 react: 18.2.0 @@ -14444,8 +14399,8 @@ packages: /react-toastify@8.2.0(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-Pg2Ju7NngAamarFvLwqrFomJ57u/Ay6i6zfLurt/qPynWkAkOthu6vxfqYpJCyNhHRhR4hu7+bySSeWWJu6PAg==} peerDependencies: - react: '>=16' - react-dom: '>=16' + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: clsx: 1.2.1 react: 18.2.0 @@ -14455,8 +14410,8 @@ packages: /react-transition-group@4.4.5(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==} peerDependencies: - react: '>=16.6.0' - react-dom: '>=16.6.0' + react: ^18.2.0 + react-dom: ^18.2.0 dependencies: '@babel/runtime': 7.22.15 dom-helpers: 5.2.1 @@ -14472,13 +14427,6 @@ packages: dependencies: loose-envify: 1.4.0 - /react@18.3.0-canary-b36ae8d7a-20231207: - resolution: {integrity: sha512-RbfbBCv6urzbRdjeHf+4g0IbuuV0nEq3IAhT923l5r5MN0v8JQZqDaqt4u9UVoLZFKyjL5wRNFXZ5o2wvVxwkw==} - engines: {node: '>=0.10.0'} - dependencies: - loose-envify: 1.4.0 - dev: false - /read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} dependencies: @@ -14566,6 +14514,7 @@ packages: safe-buffer: 5.1.2 string_decoder: 1.1.1 util-deprecate: 1.0.2 + dev: true /readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} @@ -14892,6 +14841,7 @@ packages: /safe-buffer@5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + dev: true /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -14940,12 +14890,6 @@ packages: dependencies: loose-envify: 1.4.0 - /scheduler@0.24.0-canary-b36ae8d7a-20231207: - resolution: {integrity: sha512-DjjRgf6/5QoTCEDlaiUMs/h73eaL4ZjfQ7PJ6sXeFrftvKXp+ZBxKNnRInOj+PpDsoEpFR8oToi5VOZHrFEI1Q==} - dependencies: - loose-envify: 1.4.0 - dev: false - /schema-utils@3.3.0: resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} engines: {node: '>= 10.13.0'} @@ -15004,6 +14948,7 @@ packages: /semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true + dev: true /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} @@ -15066,10 +15011,6 @@ packages: transitivePeerDependencies: - supports-color - /set-blocking@2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - dev: false - /set-function-length@1.1.1: resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} engines: {node: '>= 0.4'} @@ -15158,14 +15099,6 @@ packages: /simple-concat@1.0.1: resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} - /simple-get@3.1.1: - resolution: {integrity: sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==} - dependencies: - decompress-response: 4.2.1 - once: 1.4.0 - simple-concat: 1.0.1 - dev: false - /simple-get@4.0.1: resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} dependencies: @@ -15206,6 +15139,15 @@ packages: resolution: {integrity: sha512-xMO/8eNREtaROt7tJvWJqHBDTMFN4eiQ5I4JRMuilwfnFcV5W9u7RUkueNkdw0jPqGMX36iCywelS5yilTuOxg==} dev: false + /sirv@2.0.4: + resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} + engines: {node: '>= 10'} + dependencies: + '@polka/url': 1.0.0-next.24 + mrmime: 2.0.0 + totalist: 3.0.1 + dev: true + /sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -15239,8 +15181,8 @@ packages: /slate-react@0.92.0(react-dom@18.2.0)(react@18.2.0)(slate@0.91.4): resolution: {integrity: sha512-xEDKu5RKw5f0N95l1UeNQnrB0Pxh4JPjpIZR/BVsMo0ININnLAknR99gLo46bl/Ffql4mr7LeaxQRoXxbFtJOQ==} peerDependencies: - react: '>=16.8.0' - react-dom: '>=16.8.0' + react: ^18.2.0 + react-dom: ^18.2.0 slate: '>=0.65.3' dependencies: '@juggle/resize-observer': 3.4.0 @@ -15467,15 +15409,6 @@ packages: char-regex: 1.0.2 strip-ansi: 6.0.1 - /string-width@1.0.2: - resolution: {integrity: sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==} - engines: {node: '>=0.10.0'} - dependencies: - code-point-at: 1.1.0 - is-fullwidth-code-point: 1.0.0 - strip-ansi: 3.0.1 - dev: false - /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -15536,19 +15469,13 @@ packages: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: safe-buffer: 5.1.2 + dev: true /string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 - /strip-ansi@3.0.1: - resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} - engines: {node: '>=0.10.0'} - dependencies: - ansi-regex: 2.1.1 - dev: false - /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -15641,7 +15568,7 @@ packages: peerDependencies: '@babel/core': '*' babel-plugin-macros: '*' - react: '>= 16.8.0 || 17.x.x || ^18.0.0-0' + react: ^18.2.0 peerDependenciesMeta: '@babel/core': optional: true @@ -15652,24 +15579,6 @@ packages: client-only: 0.0.1 react: 18.2.0 - /styled-jsx@5.1.1(@babel/core@7.22.20)(react@18.3.0-canary-b36ae8d7a-20231207): - resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@babel/core': '*' - babel-plugin-macros: '*' - react: '>= 16.8.0 || 17.x.x || ^18.0.0-0' - peerDependenciesMeta: - '@babel/core': - optional: true - babel-plugin-macros: - optional: true - dependencies: - '@babel/core': 7.22.20 - client-only: 0.0.1 - react: 18.3.0-canary-b36ae8d7a-20231207 - dev: false - /stylis@4.2.0: resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==} dev: false @@ -15995,6 +15904,11 @@ packages: ieee754: 1.2.1 dev: true + /totalist@3.0.1: + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} + engines: {node: '>=6'} + dev: true + /touch@3.1.0: resolution: {integrity: sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==} hasBin: true @@ -16501,8 +16415,8 @@ packages: /use-context-selector@1.4.1(react-dom@18.2.0)(react@18.2.0)(scheduler@0.23.0): resolution: {integrity: sha512-Io2ArvcRO+6MWIhkdfMFt+WKQX+Vb++W8DS2l03z/Vw/rz3BclKpM0ynr4LYGyU85Eke+Yx5oIhTY++QR0ZDoA==} peerDependencies: - react: '>=16.8.0' - react-dom: '*' + react: ^18.2.0 + react-dom: ^18.2.0 react-native: '*' scheduler: '>=0.19.0' peerDependenciesMeta: @@ -16520,7 +16434,7 @@ packages: resolution: {integrity: sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==} peerDependencies: '@types/react': '*' - react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^18.2.0 peerDependenciesMeta: '@types/react': optional: true @@ -16626,6 +16540,29 @@ packages: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} engines: {node: '>=12'} + /webpack-bundle-analyzer@4.10.1: + resolution: {integrity: sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ==} + engines: {node: '>= 10.13.0'} + hasBin: true + dependencies: + '@discoveryjs/json-ext': 0.5.7 + acorn: 8.10.0 + acorn-walk: 8.2.0 + commander: 7.2.0 + debounce: 1.2.1 + escape-string-regexp: 4.0.0 + gzip-size: 6.0.0 + html-escaper: 2.0.2 + is-plain-object: 5.0.0 + opener: 1.5.2 + picocolors: 1.0.0 + sirv: 2.0.4 + ws: 7.5.9 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: true + /webpack-sources@1.4.3: resolution: {integrity: sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==} dependencies: @@ -16775,12 +16712,6 @@ packages: dependencies: isexe: 2.0.0 - /wide-align@1.1.5: - resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} - dependencies: - string-width: 4.2.3 - dev: false - /widest-line@4.0.1: resolution: {integrity: sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==} engines: {node: '>=12'} @@ -16846,6 +16777,19 @@ packages: imurmurhash: 0.1.4 signal-exit: 3.0.7 + /ws@7.5.9: + resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: true + /ws@8.14.1: resolution: {integrity: sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A==} engines: {node: '>=10.0.0'} diff --git a/test/auth/config.ts b/test/auth/config.ts index fd8ab1663..77dbbcb8c 100644 --- a/test/auth/config.ts +++ b/test/auth/config.ts @@ -35,12 +35,8 @@ export default buildConfigWithDefaults({ name: 'adminOnlyField', type: 'text', access: { - read: ({ - req: { - user: { roles = [] }, - }, - }) => { - return roles.includes('admin') + read: ({ req: { user } }) => { + return user?.roles?.includes('admin') }, }, }, @@ -177,7 +173,8 @@ export default buildConfigWithDefaults({ }, access: { read: ({ req: { user } }) => { - if (user.collection === 'api-keys') { + if (!user) return false + if (user?.collection === 'api-keys') { return { id: { equals: user.id, diff --git a/test/auth/int.spec.ts b/test/auth/int.spec.ts index 03f658a1e..06f26d6a6 100644 --- a/test/auth/int.spec.ts +++ b/test/auth/int.spec.ts @@ -6,7 +6,7 @@ import type { User } from '../../packages/payload/src/auth' import { getPayload } from '../../packages/payload/src' import { devUser } from '../credentials' import { NextRESTClient } from '../helpers/NextRESTClient' -import { startMemoryDB } from '../startMemoryDB' +// import { startMemoryDB } from '../startMemoryDB' import configPromise from './config' import { namedSaveToJWTValue, saveToJWTKey, slug } from './shared' @@ -18,8 +18,8 @@ const { email, password } = devUser describe('Auth', () => { beforeAll(async () => { - const config = await startMemoryDB(configPromise) - payload = await getPayload({ config }) + // const config = await startMemoryDB(configPromise) + payload = await getPayload({ config: configPromise }) restClient = new NextRESTClient(payload.config) }) @@ -33,24 +33,32 @@ describe('Auth', () => { let token let user beforeAll(async () => { - const { data } = await restClient - .GRAPHQL_POST({ - body: JSON.stringify({ - query: `mutation { - loginUser(email: "${devUser.email}", password: "${devUser.password}") { - token - user { - id - email - } - } - }`, - }), - }) - .then((res) => res.json()) + const result = await payload.login({ + collection: 'users', + data: { + email: devUser.email, + password: devUser.password, + }, + }) - user = data.loginUser.user - token = data.loginUser.token + // const { data } = await restClient + // .GRAPHQL_POST({ + // body: JSON.stringify({ + // query: `mutation { + // loginUser(email: "${devUser.email}", password: "${devUser.password}") { + // token + // user { + // id + // email + // } + // } + // }`, + // }), + // }) + // .then((res) => res.json()) + + user = result.user + token = result.token }) it('should login', async () => { diff --git a/tsconfig.json b/tsconfig.json index 585868bd5..1dd0433d8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -41,7 +41,7 @@ "@payloadcms/translations/api": ["./packages/translations/src/all"], "@payloadcms/next/*": ["./packages/next/src/*"], "@payloadcms/graphql": ["./packages/graphql/src"], - "payload-config": ["./test/_community/config.ts"] + "payload-config": ["./test/auth/config.ts"] } }, "exclude": ["dist", "build", "temp", "node_modules"],