chore: merge
This commit is contained in:
@@ -48,6 +48,10 @@ module.exports = {
|
|||||||
parserOptions: {
|
parserOptions: {
|
||||||
project: ['./tsconfig.json'],
|
project: ['./tsconfig.json'],
|
||||||
tsconfigRootDir: __dirname,
|
tsconfigRootDir: __dirname,
|
||||||
|
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,
|
||||||
|
EXPERIMENTAL_useProjectService: true,
|
||||||
|
sourceType: 'module',
|
||||||
|
ecmaVersion: 'latest',
|
||||||
},
|
},
|
||||||
root: true,
|
root: true,
|
||||||
}
|
}
|
||||||
|
|||||||
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
@@ -229,6 +229,9 @@ jobs:
|
|||||||
path: ./*
|
path: ./*
|
||||||
key: ${{ github.sha }}-${{ github.run_number }}
|
key: ${{ github.sha }}-${{ github.run_number }}
|
||||||
|
|
||||||
|
- name: Install Playwright
|
||||||
|
run: pnpm exec playwright install
|
||||||
|
|
||||||
- name: E2E Tests
|
- name: E2E Tests
|
||||||
uses: nick-fields/retry@v2
|
uses: nick-fields/retry@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
7
.vscode/extensions.json
vendored
7
.vscode/extensions.json
vendored
@@ -1,3 +1,8 @@
|
|||||||
{
|
{
|
||||||
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "ortoni.ortoni"]
|
"recommendations": [
|
||||||
|
"dbaeumer.vscode-eslint",
|
||||||
|
"esbenp.prettier-vscode",
|
||||||
|
"firsttris.vscode-jest-runner",
|
||||||
|
"ms-playwright.playwright"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
"@payloadcms/eslint-config": "workspace:*",
|
"@payloadcms/eslint-config": "workspace:*",
|
||||||
"@types/mongoose-aggregate-paginate-v2": "1.0.9",
|
"@types/mongoose-aggregate-paginate-v2": "1.0.9",
|
||||||
"mongodb": "4.17.1",
|
"mongodb": "4.17.1",
|
||||||
"mongodb-memory-server": "8.13.0",
|
"mongodb-memory-server": "^9",
|
||||||
"payload": "workspace:*"
|
"payload": "workspace:*"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export const createGlobal: CreateGlobal = async function createGlobal(
|
|||||||
}
|
}
|
||||||
const options = withSession(this, req.transactionID)
|
const options = withSession(this, req.transactionID)
|
||||||
|
|
||||||
let [result] = await Model.create([global], options)
|
let [result] = (await Model.create([global], options)) as any
|
||||||
|
|
||||||
result = JSON.parse(JSON.stringify(result))
|
result = JSON.parse(JSON.stringify(result))
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,10 @@ import type { MongooseAdapter } from './index.js'
|
|||||||
|
|
||||||
export const destroy: Destroy = async function destroy(this: MongooseAdapter) {
|
export const destroy: Destroy = async function destroy(this: MongooseAdapter) {
|
||||||
if (this.mongoMemoryServer) {
|
if (this.mongoMemoryServer) {
|
||||||
this.mongoMemoryServer.stop()
|
await this.mongoMemoryServer.stop()
|
||||||
|
} else {
|
||||||
|
await mongoose.disconnect()
|
||||||
}
|
}
|
||||||
|
|
||||||
await mongoose.disconnect()
|
|
||||||
Object.keys(mongoose.models).map((model) => mongoose.deleteModel(model))
|
Object.keys(mongoose.models).map((model) => mongoose.deleteModel(model))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export const findGlobal: FindGlobal = async function findGlobal(
|
|||||||
where: combineQueries({ globalType: { equals: slug } }, where),
|
where: combineQueries({ globalType: { equals: slug } }, where),
|
||||||
})
|
})
|
||||||
|
|
||||||
let doc = await Model.findOne(query, {}, options)
|
let doc = (await Model.findOne(query, {}, options)) as any
|
||||||
|
|
||||||
if (!doc) {
|
if (!doc) {
|
||||||
return null
|
return null
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import type { TransactionOptions } from 'mongodb'
|
import type { TransactionOptions } from 'mongodb'
|
||||||
|
import type { MongoMemoryReplSet } from 'mongodb-memory-server'
|
||||||
import type { ClientSession, ConnectOptions, Connection } from 'mongoose'
|
import type { ClientSession, ConnectOptions, Connection } from 'mongoose'
|
||||||
import type { Payload } from 'payload'
|
import type { Payload } from 'payload'
|
||||||
import type { BaseDatabaseAdapter, DatabaseAdapterObj } from 'payload/database'
|
import type { BaseDatabaseAdapter, DatabaseAdapterObj } from 'payload/database'
|
||||||
@@ -52,7 +53,7 @@ export interface Args {
|
|||||||
/**
|
/**
|
||||||
* typed as any to avoid dependency
|
* typed as any to avoid dependency
|
||||||
*/
|
*/
|
||||||
mongoMemoryServer?: any
|
mongoMemoryServer?: MongoMemoryReplSet
|
||||||
transactionOptions?: TransactionOptions | false
|
transactionOptions?: TransactionOptions | false
|
||||||
/** The URL to connect to MongoDB or false to start payload and prevent connecting */
|
/** The URL to connect to MongoDB or false to start payload and prevent connecting */
|
||||||
url: false | string
|
url: false | string
|
||||||
@@ -65,7 +66,7 @@ export type MongooseAdapter = BaseDatabaseAdapter &
|
|||||||
}
|
}
|
||||||
connection: Connection
|
connection: Connection
|
||||||
globals: GlobalModel
|
globals: GlobalModel
|
||||||
mongoMemoryServer: any
|
mongoMemoryServer: MongoMemoryReplSet
|
||||||
sessions: Record<number | string, ClientSession>
|
sessions: Record<number | string, ClientSession>
|
||||||
versions: {
|
versions: {
|
||||||
[slug: string]: CollectionModel
|
[slug: string]: CollectionModel
|
||||||
@@ -81,7 +82,7 @@ declare module 'payload' {
|
|||||||
}
|
}
|
||||||
connection: Connection
|
connection: Connection
|
||||||
globals: GlobalModel
|
globals: GlobalModel
|
||||||
mongoMemoryServer: any
|
mongoMemoryServer: MongoMemoryReplSet
|
||||||
sessions: Record<number | string, ClientSession>
|
sessions: Record<number | string, ClientSession>
|
||||||
transactionOptions: TransactionOptions
|
transactionOptions: TransactionOptions
|
||||||
versions: {
|
versions: {
|
||||||
|
|||||||
@@ -25,16 +25,6 @@ const baseRules = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const reactRules = {
|
const reactRules = {
|
||||||
// react/jsx-max-props-per-line conflicts with prettier. Sometimes react/jsx-max-props-per-line tells you to put it on a new line, but prettier moves it back.
|
|
||||||
'react/jsx-max-props-per-line': 'off',
|
|
||||||
// react/jsx-one-expression-per-line conflicts with prettier. Sometimes react/jsx-one-expression-per-line tells you to put it on a new line, but prettier moves it back.
|
|
||||||
'react/jsx-one-expression-per-line': 'off',
|
|
||||||
// react/jsx-wrap-multilines conflicts with prettier. Sometimes react/jsx-wrap-multilines tells you to put it on a new line, but prettier moves it back.
|
|
||||||
'react/jsx-wrap-multilines': 'off',
|
|
||||||
// react/jsx-indent conflicts with prettier. Sometimes react/jsx-indent tells you to put it on a new line, but prettier moves it back.
|
|
||||||
'react/jsx-indent': 'off',
|
|
||||||
// react/jsx-curly-newline conflicts with prettier. Sometimes react/jsx-curly-newline tells you to put it on a new line, but prettier moves it back.
|
|
||||||
'react/jsx-curly-newline': 'off',
|
|
||||||
'react/no-unused-prop-types': 'off',
|
'react/no-unused-prop-types': 'off',
|
||||||
'react/prop-types': 'off',
|
'react/prop-types': 'off',
|
||||||
'react/require-default-props': 'off',
|
'react/require-default-props': 'off',
|
||||||
@@ -88,7 +78,6 @@ const baseExtends = [
|
|||||||
'eslint:recommended',
|
'eslint:recommended',
|
||||||
'plugin:perfectionist/recommended-natural',
|
'plugin:perfectionist/recommended-natural',
|
||||||
'plugin:regexp/recommended',
|
'plugin:regexp/recommended',
|
||||||
'prettier',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
/** @type {import('eslint').Linter.Config} */
|
/** @type {import('eslint').Linter.Config} */
|
||||||
@@ -124,7 +113,11 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
files: ['**/*.ts'],
|
files: ['**/*.ts'],
|
||||||
plugins: ['@typescript-eslint'],
|
plugins: ['@typescript-eslint'],
|
||||||
extends: [...baseExtends, 'plugin:@typescript-eslint/recommended-type-checked'],
|
extends: [
|
||||||
|
...baseExtends,
|
||||||
|
'plugin:@typescript-eslint/recommended-type-checked',
|
||||||
|
'prettier', // prettier needs to come last. It disables eslint rules conflicting with prettier
|
||||||
|
],
|
||||||
parser: '@typescript-eslint/parser',
|
parser: '@typescript-eslint/parser',
|
||||||
rules: {
|
rules: {
|
||||||
...baseRules,
|
...baseRules,
|
||||||
@@ -140,6 +133,7 @@ module.exports = {
|
|||||||
'plugin:react/recommended',
|
'plugin:react/recommended',
|
||||||
'plugin:react-hooks/recommended',
|
'plugin:react-hooks/recommended',
|
||||||
'./configs/react/index.js',
|
'./configs/react/index.js',
|
||||||
|
'prettier', // prettier needs to come last. It disables eslint rules conflicting with prettier
|
||||||
],
|
],
|
||||||
parser: '@typescript-eslint/parser',
|
parser: '@typescript-eslint/parser',
|
||||||
rules: {
|
rules: {
|
||||||
@@ -155,6 +149,7 @@ module.exports = {
|
|||||||
...baseExtends,
|
...baseExtends,
|
||||||
'plugin:@typescript-eslint/recommended-type-checked',
|
'plugin:@typescript-eslint/recommended-type-checked',
|
||||||
'./configs/jest/index.js',
|
'./configs/jest/index.js',
|
||||||
|
'prettier', // prettier needs to come last. It disables eslint rules conflicting with prettier
|
||||||
],
|
],
|
||||||
parser: '@typescript-eslint/parser',
|
parser: '@typescript-eslint/parser',
|
||||||
rules: {
|
rules: {
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"http-status": "1.6.2",
|
"http-status": "1.6.2",
|
||||||
"next": "14.2.0-canary.22",
|
"next": "14.2.0-canary.23",
|
||||||
"payload": "workspace:*"
|
"payload": "workspace:*"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
|||||||
@@ -78,13 +78,17 @@ export const Document: React.FC<AdminViewProps> = async ({
|
|||||||
let action: string
|
let action: string
|
||||||
|
|
||||||
if (collectionConfig) {
|
if (collectionConfig) {
|
||||||
docPermissions = await docAccessOperation({
|
try {
|
||||||
id,
|
docPermissions = await docAccessOperation({
|
||||||
collection: {
|
id,
|
||||||
config: collectionConfig,
|
collection: {
|
||||||
},
|
config: collectionConfig,
|
||||||
req,
|
},
|
||||||
})
|
req,
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
return <NotFoundClient />
|
||||||
|
}
|
||||||
|
|
||||||
fields = collectionConfig.fields
|
fields = collectionConfig.fields
|
||||||
action = `${serverURL}${apiRoute}/${collectionSlug}${isEditing ? `/${id}` : ''}`
|
action = `${serverURL}${apiRoute}/${collectionSlug}${isEditing ? `/${id}` : ''}`
|
||||||
|
|||||||
@@ -18,26 +18,29 @@ export const getCustomViewByRoute = ({
|
|||||||
|
|
||||||
const currentRoute = currentRouteWithAdmin.replace(adminRoute, '')
|
const currentRoute = currentRouteWithAdmin.replace(adminRoute, '')
|
||||||
|
|
||||||
const foundViewConfig = Object.entries(views).find(([, view]) => {
|
const foundViewConfig =
|
||||||
if (typeof view === 'object') {
|
views &&
|
||||||
const { exact, path: viewPath, sensitive, strict } = view
|
typeof views === 'object' &&
|
||||||
|
Object.entries(views).find(([, view]) => {
|
||||||
|
if (typeof view === 'object') {
|
||||||
|
const { exact, path: viewPath, sensitive, strict } = view
|
||||||
|
|
||||||
const keys = []
|
const keys = []
|
||||||
|
|
||||||
// run the view path through `pathToRegexp` to resolve any dynamic segments
|
// run the view path through `pathToRegexp` to resolve any dynamic segments
|
||||||
// i.e. `/admin/custom-view/:id` -> `/admin/custom-view/123`
|
// i.e. `/admin/custom-view/:id` -> `/admin/custom-view/123`
|
||||||
const regex = pathToRegexp(viewPath, keys, {
|
const regex = pathToRegexp(viewPath, keys, {
|
||||||
sensitive,
|
sensitive,
|
||||||
strict,
|
strict,
|
||||||
})
|
})
|
||||||
|
|
||||||
const match = regex.exec(currentRoute)
|
const match = regex.exec(currentRoute)
|
||||||
const viewRoute = match?.[0] || viewPath
|
const viewRoute = match?.[0] || viewPath
|
||||||
|
|
||||||
if (exact) return currentRoute === viewRoute
|
if (exact) return currentRoute === viewRoute
|
||||||
if (!exact) return viewRoute.startsWith(currentRoute)
|
if (!exact) return viewRoute.startsWith(currentRoute)
|
||||||
}
|
}
|
||||||
})?.[1]
|
})?.[1]
|
||||||
|
|
||||||
return typeof foundViewConfig === 'object' ? foundViewConfig.Component : null
|
return typeof foundViewConfig === 'object' ? foundViewConfig.Component : null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,16 @@ export type * from '../uploads/types.js'
|
|||||||
|
|
||||||
export type { DocumentPermissions, FieldPermissions } from '../auth/index.js'
|
export type { DocumentPermissions, FieldPermissions } from '../auth/index.js'
|
||||||
|
|
||||||
|
export type {
|
||||||
|
CollapsedPreferences,
|
||||||
|
DocumentPreferences,
|
||||||
|
FieldsPreferences,
|
||||||
|
InsideFieldsPreferences,
|
||||||
|
PreferenceRequest,
|
||||||
|
PreferenceUpdateRequest,
|
||||||
|
TabsPreferences,
|
||||||
|
} from '../preferences/types.js'
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
AfterChangeHook as CollectionAfterChangeHook,
|
AfterChangeHook as CollectionAfterChangeHook,
|
||||||
AfterDeleteHook as CollectionAfterDeleteHook,
|
AfterDeleteHook as CollectionAfterDeleteHook,
|
||||||
@@ -118,6 +128,4 @@ export type {
|
|||||||
SanitizedGlobalConfig,
|
SanitizedGlobalConfig,
|
||||||
} from './../globals/config/types.js'
|
} from './../globals/config/types.js'
|
||||||
|
|
||||||
export type { DocumentPreferences } from './../preferences/types.js'
|
|
||||||
|
|
||||||
export { validOperators } from './../types/constants.js'
|
export { validOperators } from './../types/constants.js'
|
||||||
|
|||||||
@@ -16,11 +16,12 @@ export type TabsPreferences = Array<{
|
|||||||
[path: string]: number
|
[path: string]: number
|
||||||
}>
|
}>
|
||||||
|
|
||||||
|
export type InsideFieldsPreferences = {
|
||||||
|
collapsed: CollapsedPreferences
|
||||||
|
tabIndex: number
|
||||||
|
}
|
||||||
export type FieldsPreferences = {
|
export type FieldsPreferences = {
|
||||||
[key: string]: {
|
[key: string]: InsideFieldsPreferences
|
||||||
collapsed: CollapsedPreferences
|
|
||||||
tabIndex: number
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DocumentPreferences = {
|
export type DocumentPreferences = {
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ import {
|
|||||||
import isDeepEqual from 'deep-equal'
|
import isDeepEqual from 'deep-equal'
|
||||||
import lexicalImport from 'lexical'
|
import lexicalImport from 'lexical'
|
||||||
const { $getNodeByKey } = lexicalImport
|
const { $getNodeByKey } = lexicalImport
|
||||||
|
import type { CollapsedPreferences } from 'payload/types'
|
||||||
|
|
||||||
import React, { useCallback } from 'react'
|
import React, { useCallback } from 'react'
|
||||||
|
|
||||||
import type { SanitizedClientEditorConfig } from '../../../lexical/config/types.js'
|
import type { SanitizedClientEditorConfig } from '../../../lexical/config/types.js'
|
||||||
@@ -68,15 +70,16 @@ export const BlockContent: React.FC<Props> = (props) => {
|
|||||||
void getDocPreferences().then((currentDocPreferences) => {
|
void getDocPreferences().then((currentDocPreferences) => {
|
||||||
const currentFieldPreferences = currentDocPreferences?.fields[field.name]
|
const currentFieldPreferences = currentDocPreferences?.fields[field.name]
|
||||||
|
|
||||||
const collapsedMap: { [key: string]: boolean } = currentFieldPreferences?.collapsed
|
const collapsedArray = currentFieldPreferences?.collapsed
|
||||||
|
|
||||||
if (collapsedMap && collapsedMap[formData.id] !== undefined) {
|
if (collapsedArray && collapsedArray.includes(formData.id)) {
|
||||||
setCollapsed(collapsedMap[formData.id])
|
initialState = true
|
||||||
initialState = collapsedMap[formData.id]
|
setCollapsed(true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return initialState
|
return initialState
|
||||||
})
|
})
|
||||||
|
|
||||||
const hasSubmitted = useFormSubmitted()
|
const hasSubmitted = useFormSubmitted()
|
||||||
|
|
||||||
const [errorCount, setErrorCount] = React.useState(0)
|
const [errorCount, setErrorCount] = React.useState(0)
|
||||||
@@ -153,22 +156,34 @@ export const BlockContent: React.FC<Props> = (props) => {
|
|||||||
[editor, nodeKey, hasSubmitted, formData],
|
[editor, nodeKey, hasSubmitted, formData],
|
||||||
)
|
)
|
||||||
|
|
||||||
const onCollapsedChange = useCallback(() => {
|
const onCollapsedChange = useCallback(
|
||||||
void getDocPreferences().then((currentDocPreferences) => {
|
(changedCollapsed: boolean) => {
|
||||||
const currentFieldPreferences = currentDocPreferences?.fields[field.name]
|
void getDocPreferences().then((currentDocPreferences) => {
|
||||||
|
const currentFieldPreferences = currentDocPreferences?.fields[field.name]
|
||||||
|
|
||||||
const collapsedMap: { [key: string]: boolean } = currentFieldPreferences?.collapsed
|
const collapsedArray = currentFieldPreferences?.collapsed
|
||||||
|
|
||||||
const newCollapsed: { [key: string]: boolean } =
|
const newCollapsed: CollapsedPreferences =
|
||||||
collapsedMap && collapsedMap?.size ? collapsedMap : {}
|
collapsedArray && collapsedArray?.length ? collapsedArray : []
|
||||||
|
|
||||||
newCollapsed[formData.id] = !collapsed
|
if (changedCollapsed) {
|
||||||
|
if (!newCollapsed.includes(formData.id)) {
|
||||||
|
newCollapsed.push(formData.id)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (newCollapsed.includes(formData.id)) {
|
||||||
|
newCollapsed.splice(newCollapsed.indexOf(formData.id), 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setDocFieldPreferences(field.name, {
|
setDocFieldPreferences(field.name, {
|
||||||
collapsed: newCollapsed,
|
collapsed: newCollapsed,
|
||||||
|
hello: 'hi',
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
},
|
||||||
}, [collapsed, getDocPreferences, field.name, setDocFieldPreferences, formData.id])
|
[getDocPreferences, field.name, setDocFieldPreferences, formData.id],
|
||||||
|
)
|
||||||
|
|
||||||
const removeBlock = useCallback(() => {
|
const removeBlock = useCallback(() => {
|
||||||
editor.update(() => {
|
editor.update(() => {
|
||||||
@@ -214,8 +229,8 @@ export const BlockContent: React.FC<Props> = (props) => {
|
|||||||
}
|
}
|
||||||
key={0}
|
key={0}
|
||||||
onToggle={(collapsed) => {
|
onToggle={(collapsed) => {
|
||||||
|
onCollapsedChange(collapsed)
|
||||||
setCollapsed(collapsed)
|
setCollapsed(collapsed)
|
||||||
onCollapsedChange()
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<RenderFields
|
<RenderFields
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import type { RichTextAdapter } from 'payload/types'
|
import type { RichTextAdapter } from 'payload/types'
|
||||||
|
|
||||||
import { DefaultCell } from '@payloadcms/next/views/List/Default/Cell/index.js'
|
|
||||||
import { mapFields } from '@payloadcms/ui/utilities'
|
import { mapFields } from '@payloadcms/ui/utilities'
|
||||||
import { sanitizeFields } from 'payload/config'
|
import { sanitizeFields } from 'payload/config'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
@@ -83,7 +82,6 @@ export const getGenerateComponentMap =
|
|||||||
})
|
})
|
||||||
|
|
||||||
const mappedFields = mapFields({
|
const mappedFields = mapFields({
|
||||||
DefaultCell,
|
|
||||||
config,
|
config,
|
||||||
disableAddingID: true,
|
disableAddingID: true,
|
||||||
fieldSchema: sanitizedFields,
|
fieldSchema: sanitizedFields,
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
"uuid": "9.0.1"
|
"uuid": "9.0.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"next": "14.2.0-canary.22",
|
"next": "14.2.0-canary.23",
|
||||||
"payload": "workspace:*",
|
"payload": "workspace:*",
|
||||||
"react": "^18.0.0"
|
"react": "^18.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,11 +9,10 @@ import { toast } from 'react-toastify'
|
|||||||
|
|
||||||
import type { DocumentDrawerProps } from './types.js'
|
import type { DocumentDrawerProps } from './types.js'
|
||||||
|
|
||||||
import { useFieldProps } from '../../forms/FieldPropsProvider/index.js'
|
|
||||||
import { useRelatedCollections } from '../../forms/fields/Relationship/AddNew/useRelatedCollections.js'
|
import { useRelatedCollections } from '../../forms/fields/Relationship/AddNew/useRelatedCollections.js'
|
||||||
import usePayloadAPI from '../../hooks/usePayloadAPI.js'
|
import usePayloadAPI from '../../hooks/usePayloadAPI.js'
|
||||||
import { X } from '../../icons/X/index.js'
|
import { X } from '../../icons/X/index.js'
|
||||||
import { formatDocTitle, useAuth } from '../../index.js'
|
import { formatDocTitle } from '../../index.js'
|
||||||
import { useComponentMap } from '../../providers/ComponentMapProvider/index.js'
|
import { useComponentMap } from '../../providers/ComponentMapProvider/index.js'
|
||||||
import { useConfig } from '../../providers/Config/index.js'
|
import { useConfig } from '../../providers/Config/index.js'
|
||||||
import { DocumentInfoProvider } from '../../providers/DocumentInfo/index.js'
|
import { DocumentInfoProvider } from '../../providers/DocumentInfo/index.js'
|
||||||
@@ -56,10 +55,6 @@ const Content: React.FC<DocumentDrawerProps> = ({
|
|||||||
const formattedQueryParams = queryString.stringify(formQueryParams)
|
const formattedQueryParams = queryString.stringify(formQueryParams)
|
||||||
const { getPreference } = usePreferences()
|
const { getPreference } = usePreferences()
|
||||||
|
|
||||||
const { permissions } = useAuth()
|
|
||||||
|
|
||||||
const { schemaPath } = useFieldProps()
|
|
||||||
|
|
||||||
const { componentMap } = useComponentMap()
|
const { componentMap } = useComponentMap()
|
||||||
|
|
||||||
const { Edit } = componentMap[`${collectionSlug ? 'collections' : 'globals'}`][collectionSlug]
|
const { Edit } = componentMap[`${collectionSlug ? 'collections' : 'globals'}`][collectionSlug]
|
||||||
@@ -112,7 +107,7 @@ const Content: React.FC<DocumentDrawerProps> = ({
|
|||||||
data: data || {},
|
data: data || {},
|
||||||
docPreferences,
|
docPreferences,
|
||||||
operation: isEditing ? 'update' : 'create',
|
operation: isEditing ? 'update' : 'create',
|
||||||
schemaPath,
|
schemaPath: collectionSlug,
|
||||||
},
|
},
|
||||||
serverURL,
|
serverURL,
|
||||||
})
|
})
|
||||||
@@ -123,7 +118,7 @@ const Content: React.FC<DocumentDrawerProps> = ({
|
|||||||
|
|
||||||
void getInitialState()
|
void getInitialState()
|
||||||
}
|
}
|
||||||
}, [apiRoute, data, isEditing, schemaPath, serverURL, collectionSlug, id, getPreference])
|
}, [apiRoute, data, isEditing, collectionSlug, serverURL, id, getPreference])
|
||||||
|
|
||||||
if (isError) return null
|
if (isError) return null
|
||||||
|
|
||||||
@@ -131,8 +126,6 @@ const Content: React.FC<DocumentDrawerProps> = ({
|
|||||||
return <LoadingOverlay />
|
return <LoadingOverlay />
|
||||||
}
|
}
|
||||||
|
|
||||||
const docPermissions = permissions?.collections[collectionSlug]
|
|
||||||
|
|
||||||
const title = formatDocTitle({
|
const title = formatDocTitle({
|
||||||
collectionConfig,
|
collectionConfig,
|
||||||
data,
|
data,
|
||||||
@@ -168,8 +161,11 @@ const Content: React.FC<DocumentDrawerProps> = ({
|
|||||||
collectionSlug={collectionConfig.slug}
|
collectionSlug={collectionConfig.slug}
|
||||||
disableActions
|
disableActions
|
||||||
disableLeaveWithoutSaving
|
disableLeaveWithoutSaving
|
||||||
docPermissions={docPermissions}
|
// Do NOT pass in the docPermissions we have here. This is because the permissions we have here do not have their where: { } returns resolved.
|
||||||
hasSavePermission={docPermissions?.update?.permission}
|
// If we set it to null though, the DocumentInfoProvider will fully-fetch the permissions from the server, and the where: { } returns will be resolved.
|
||||||
|
docPermissions={null}
|
||||||
|
// Same reason as above. We need to fully-fetch the docPreferences from the server. This is done in DocumentInfoProvider if we set it to null here.
|
||||||
|
hasSavePermission={null}
|
||||||
// isLoading,
|
// isLoading,
|
||||||
id={id}
|
id={id}
|
||||||
initialData={data}
|
initialData={data}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const Error: React.FC<ErrorProps> = (props) => {
|
|||||||
} = props
|
} = props
|
||||||
|
|
||||||
const { path: pathFromContext } = useFieldProps()
|
const { path: pathFromContext } = useFieldProps()
|
||||||
const path = pathFromProps || pathFromContext
|
const path = pathFromContext || pathFromProps
|
||||||
|
|
||||||
const hasSubmitted = useFormSubmitted()
|
const hasSubmitted = useFormSubmitted()
|
||||||
const field = useFormFields(([fields]) => (fields && fields?.[path]) || null)
|
const field = useFormFields(([fields]) => (fields && fields?.[path]) || null)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import React from 'react'
|
|||||||
import type { Props } from './types.js'
|
import type { Props } from './types.js'
|
||||||
|
|
||||||
import { useTranslation } from '../../providers/Translation/index.js'
|
import { useTranslation } from '../../providers/Translation/index.js'
|
||||||
|
import { useFieldProps } from '../FieldPropsProvider/index.js'
|
||||||
import './index.scss'
|
import './index.scss'
|
||||||
|
|
||||||
const baseClass = 'field-description'
|
const baseClass = 'field-description'
|
||||||
@@ -12,6 +13,8 @@ const baseClass = 'field-description'
|
|||||||
const FieldDescription: React.FC<Props> = (props) => {
|
const FieldDescription: React.FC<Props> = (props) => {
|
||||||
const { className, description, marginPlacement } = props
|
const { className, description, marginPlacement } = props
|
||||||
|
|
||||||
|
const { path } = useFieldProps()
|
||||||
|
|
||||||
const { i18n } = useTranslation()
|
const { i18n } = useTranslation()
|
||||||
|
|
||||||
if (description) {
|
if (description) {
|
||||||
@@ -20,6 +23,7 @@ const FieldDescription: React.FC<Props> = (props) => {
|
|||||||
className={[
|
className={[
|
||||||
baseClass,
|
baseClass,
|
||||||
className,
|
className,
|
||||||
|
`field-description-${path.replace(/\./g, '__')}`,
|
||||||
marginPlacement && `${baseClass}--margin-${marginPlacement}`,
|
marginPlacement && `${baseClass}--margin-${marginPlacement}`,
|
||||||
]
|
]
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export type Props = {
|
export type Props = {
|
||||||
className?: string
|
className?: string
|
||||||
description?: string
|
description?: Record<string, string> | string
|
||||||
marginPlacement?: 'bottom' | 'top'
|
marginPlacement?: 'bottom' | 'top'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export type FormFieldBase = {
|
|||||||
maxLength?: number
|
maxLength?: number
|
||||||
minLength?: number
|
minLength?: number
|
||||||
path?: string
|
path?: string
|
||||||
placeholder?: string
|
placeholder?: Record<string, string> | string
|
||||||
readOnly?: boolean
|
readOnly?: boolean
|
||||||
required?: boolean
|
required?: boolean
|
||||||
rtl?: boolean
|
rtl?: boolean
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ export const DocumentInfoProvider: React.FC<
|
|||||||
const [publishedDoc, setPublishedDoc] = useState<TypeWithID & TypeWithTimestamps>(null)
|
const [publishedDoc, setPublishedDoc] = useState<TypeWithID & TypeWithTimestamps>(null)
|
||||||
const [versions, setVersions] = useState<PaginatedDocs<TypeWithVersion<any>>>(null)
|
const [versions, setVersions] = useState<PaginatedDocs<TypeWithVersion<any>>>(null)
|
||||||
const [docPermissions, setDocPermissions] = useState<DocumentPermissions>(null)
|
const [docPermissions, setDocPermissions] = useState<DocumentPermissions>(null)
|
||||||
|
const [hasSavePermission, setHasSavePermission] = useState<boolean>(null)
|
||||||
|
|
||||||
const [unpublishedVersions, setUnpublishedVersions] =
|
const [unpublishedVersions, setUnpublishedVersions] =
|
||||||
useState<PaginatedDocs<TypeWithVersion<any>>>(null)
|
useState<PaginatedDocs<TypeWithVersion<any>>>(null)
|
||||||
@@ -220,15 +221,18 @@ export const DocumentInfoProvider: React.FC<
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
const json = await res.json()
|
const json = await res.json()
|
||||||
|
|
||||||
setDocPermissions(json)
|
setDocPermissions(json)
|
||||||
|
setHasSavePermission(json?.update?.permission)
|
||||||
} else {
|
} else {
|
||||||
// fallback to permissions from the entity type
|
// fallback to permissions from the entity type
|
||||||
// (i.e. create has no id)
|
// (i.e. create has no id)
|
||||||
setDocPermissions(permissions?.[pluralType]?.[slug])
|
setDocPermissions(permissions?.[pluralType]?.[slug])
|
||||||
|
setHasSavePermission(permissions?.[pluralType]?.[slug]?.update?.permission)
|
||||||
}
|
}
|
||||||
}, [serverURL, api, pluralType, slug, id, permissions, i18n.language, code])
|
}, [serverURL, api, pluralType, slug, id, permissions, i18n.language, code])
|
||||||
|
|
||||||
const getDocPreferences = useCallback(async () => {
|
const getDocPreferences = useCallback(() => {
|
||||||
return getPreference<DocumentPreferences>(preferencesKey)
|
return getPreference<DocumentPreferences>(preferencesKey)
|
||||||
}, [getPreference, preferencesKey])
|
}, [getPreference, preferencesKey])
|
||||||
|
|
||||||
@@ -267,14 +271,27 @@ export const DocumentInfoProvider: React.FC<
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const loadDocPermissions = async () => {
|
const loadDocPermissions = async () => {
|
||||||
const docPermissions: DocumentPermissions = props.docPermissions
|
const docPermissions: DocumentPermissions = props.docPermissions
|
||||||
if (!docPermissions) await getDocPermissions()
|
const hasSavePermission: boolean = props.hasSavePermission
|
||||||
else setDocPermissions(docPermissions)
|
|
||||||
|
if (!docPermissions || hasSavePermission === undefined || hasSavePermission === null) {
|
||||||
|
await getDocPermissions()
|
||||||
|
} else {
|
||||||
|
setDocPermissions(docPermissions)
|
||||||
|
setHasSavePermission(hasSavePermission)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (collectionSlug || globalSlug) {
|
if (collectionSlug || globalSlug) {
|
||||||
void loadDocPermissions()
|
void loadDocPermissions()
|
||||||
}
|
}
|
||||||
}, [getDocPermissions, props.docPermissions, setDocPermissions, collectionSlug, globalSlug])
|
}, [
|
||||||
|
getDocPermissions,
|
||||||
|
props.docPermissions,
|
||||||
|
props.hasSavePermission,
|
||||||
|
setDocPermissions,
|
||||||
|
collectionSlug,
|
||||||
|
globalSlug,
|
||||||
|
])
|
||||||
|
|
||||||
const value: DocumentInfoContext = {
|
const value: DocumentInfoContext = {
|
||||||
...props,
|
...props,
|
||||||
@@ -283,6 +300,7 @@ export const DocumentInfoProvider: React.FC<
|
|||||||
getDocPermissions,
|
getDocPermissions,
|
||||||
getDocPreferences,
|
getDocPreferences,
|
||||||
getVersions,
|
getVersions,
|
||||||
|
hasSavePermission,
|
||||||
onSave,
|
onSave,
|
||||||
publishedDoc,
|
publishedDoc,
|
||||||
setDocFieldPreferences,
|
setDocFieldPreferences,
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import type {
|
|||||||
DocumentPermissions,
|
DocumentPermissions,
|
||||||
DocumentPreferences,
|
DocumentPreferences,
|
||||||
FormState,
|
FormState,
|
||||||
|
InsideFieldsPreferences,
|
||||||
SanitizedCollectionConfig,
|
SanitizedCollectionConfig,
|
||||||
SanitizedGlobalConfig,
|
SanitizedGlobalConfig,
|
||||||
TypeWithID,
|
TypeWithID,
|
||||||
@@ -46,7 +47,10 @@ export type DocumentInfoContext = DocumentInfo & {
|
|||||||
getDocPermissions: () => Promise<void>
|
getDocPermissions: () => Promise<void>
|
||||||
getDocPreferences: () => Promise<DocumentPreferences>
|
getDocPreferences: () => Promise<DocumentPreferences>
|
||||||
getVersions: () => Promise<void>
|
getVersions: () => Promise<void>
|
||||||
setDocFieldPreferences: (field: string, fieldPreferences: { [key: string]: unknown }) => void
|
setDocFieldPreferences: (
|
||||||
|
field: string,
|
||||||
|
fieldPreferences: Partial<InsideFieldsPreferences> & { [key: string]: unknown },
|
||||||
|
) => void
|
||||||
setDocumentTitle: (title: string) => void
|
setDocumentTitle: (title: string) => void
|
||||||
setOnSave: (data: Data) => Promise<void> | void
|
setOnSave: (data: Data) => Promise<void> | void
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { useAuth } from '../Auth/index.js'
|
|||||||
import { useConfig } from '../Config/index.js'
|
import { useConfig } from '../Config/index.js'
|
||||||
|
|
||||||
type PreferencesContext = {
|
type PreferencesContext = {
|
||||||
getPreference: <T = any>(key: string) => Promise<T> | T
|
getPreference: <T = any>(key: string) => Promise<T>
|
||||||
/**
|
/**
|
||||||
* @param key - a string identifier for the property being set
|
* @param key - a string identifier for the property being set
|
||||||
* @param value - preference data to store
|
* @param value - preference data to store
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ export const mapFields = (args: {
|
|||||||
description:
|
description:
|
||||||
field.admin &&
|
field.admin &&
|
||||||
'description' in field.admin &&
|
'description' in field.admin &&
|
||||||
typeof field.admin?.description === 'string'
|
(typeof field.admin?.description === 'string' ||
|
||||||
|
typeof field.admin?.description === 'object')
|
||||||
? field.admin.description
|
? field.admin.description
|
||||||
: undefined,
|
: undefined,
|
||||||
}
|
}
|
||||||
@@ -219,6 +220,10 @@ export const mapFields = (args: {
|
|||||||
maxRows: 'maxRows' in field ? field.maxRows : undefined,
|
maxRows: 'maxRows' in field ? field.maxRows : undefined,
|
||||||
min: 'min' in field ? field.min : undefined,
|
min: 'min' in field ? field.min : undefined,
|
||||||
options: 'options' in field ? field.options : undefined,
|
options: 'options' in field ? field.options : undefined,
|
||||||
|
placeholder:
|
||||||
|
'admin' in field && 'placeholder' in field.admin
|
||||||
|
? field?.admin?.placeholder
|
||||||
|
: undefined,
|
||||||
readOnly:
|
readOnly:
|
||||||
'admin' in field && 'readOnly' in field.admin ? field.admin.readOnly : undefined,
|
'admin' in field && 'readOnly' in field.admin ? field.admin.readOnly : undefined,
|
||||||
relationTo: 'relationTo' in field ? field.relationTo : undefined,
|
relationTo: 'relationTo' in field ? field.relationTo : undefined,
|
||||||
|
|||||||
149
pnpm-lock.yaml
generated
149
pnpm-lock.yaml
generated
@@ -192,7 +192,7 @@ importers:
|
|||||||
version: 9.1.7
|
version: 9.1.7
|
||||||
next:
|
next:
|
||||||
specifier: 14.2.0-canary.22
|
specifier: 14.2.0-canary.22
|
||||||
version: 14.2.0-canary.22(@babel/core@7.24.0)(react-dom@18.2.0)(react@18.2.0)(sass@1.71.1)
|
version: 14.2.0-canary.22(@babel/core@7.24.0)(react-dom@18.2.0)(react@18.2.0)
|
||||||
node-mocks-http:
|
node-mocks-http:
|
||||||
specifier: ^1.14.1
|
specifier: ^1.14.1
|
||||||
version: 1.14.1
|
version: 1.14.1
|
||||||
@@ -577,8 +577,8 @@ importers:
|
|||||||
specifier: 1.6.2
|
specifier: 1.6.2
|
||||||
version: 1.6.2
|
version: 1.6.2
|
||||||
next:
|
next:
|
||||||
specifier: 14.2.0-canary.22
|
specifier: 14.2.0-canary.23
|
||||||
version: 14.2.0-canary.22(@babel/core@7.24.0)(react-dom@18.2.0)(react@18.2.0)(sass@1.71.1)
|
version: 14.2.0-canary.23(@babel/core@7.24.0)(react-dom@18.2.0)(react@18.2.0)(sass@1.71.1)
|
||||||
path-to-regexp:
|
path-to-regexp:
|
||||||
specifier: ^6.2.1
|
specifier: ^6.2.1
|
||||||
version: 6.2.1
|
version: 6.2.1
|
||||||
@@ -1346,8 +1346,8 @@ importers:
|
|||||||
specifier: 2.3.0
|
specifier: 2.3.0
|
||||||
version: 2.3.0
|
version: 2.3.0
|
||||||
next:
|
next:
|
||||||
specifier: 14.2.0-canary.22
|
specifier: 14.2.0-canary.23
|
||||||
version: 14.2.0-canary.22(@babel/core@7.24.0)(react-dom@18.2.0)(react@18.2.0)(sass@1.71.1)
|
version: 14.2.0-canary.23(@babel/core@7.24.0)(react-dom@18.2.0)(react@18.2.0)(sass@1.71.1)
|
||||||
object-to-formdata:
|
object-to-formdata:
|
||||||
specifier: 4.5.1
|
specifier: 4.5.1
|
||||||
version: 4.5.1
|
version: 4.5.1
|
||||||
@@ -4426,6 +4426,11 @@ packages:
|
|||||||
|
|
||||||
/@next/env@14.2.0-canary.22:
|
/@next/env@14.2.0-canary.22:
|
||||||
resolution: {integrity: sha512-c72nBWQcgDwc711vtF0juZ81WPEHJbj22QzEkaqaS2cJty9IiyXTVTVzJHA1dueN9fDFCH3BeWDxoVn4y7MO8A==}
|
resolution: {integrity: sha512-c72nBWQcgDwc711vtF0juZ81WPEHJbj22QzEkaqaS2cJty9IiyXTVTVzJHA1dueN9fDFCH3BeWDxoVn4y7MO8A==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@next/env@14.2.0-canary.23:
|
||||||
|
resolution: {integrity: sha512-cBlFB8Y/iE3K2NX/Km4tP4RZGLsv0D72KI9KxmZepKSkaQBSbtHM0YeHnZ51CFe9UQKzQ/1mPnCY89BjiyIQtQ==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/@next/eslint-plugin-next@14.1.0:
|
/@next/eslint-plugin-next@14.1.0:
|
||||||
resolution: {integrity: sha512-x4FavbNEeXx/baD/zC/SdrvkjSby8nBn8KcCREqk6UuwvwoAPZmaV8TFCAuo/cpovBRTIY67mHhe86MQQm/68Q==}
|
resolution: {integrity: sha512-x4FavbNEeXx/baD/zC/SdrvkjSby8nBn8KcCREqk6UuwvwoAPZmaV8TFCAuo/cpovBRTIY67mHhe86MQQm/68Q==}
|
||||||
@@ -4439,6 +4444,16 @@ packages:
|
|||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: true
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-darwin-arm64@14.2.0-canary.23:
|
||||||
|
resolution: {integrity: sha512-K1f7A/0ljZO7IX+M+phguFP8lxdqMgEv1x1+gC+UmyZ1c8Na1PgirGgUwdLKxuNjyxlRqY5lkQ/FDk2FOYBSLA==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [darwin]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-darwin-x64@14.2.0-canary.22:
|
/@next/swc-darwin-x64@14.2.0-canary.22:
|
||||||
@@ -4447,6 +4462,16 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: true
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-darwin-x64@14.2.0-canary.23:
|
||||||
|
resolution: {integrity: sha512-3Zg0aZZV9Z0+4QCVNMH/LLW1dRD2mVNtuFBoTI6/7rWUiGrm/9+58sKyjjg+cE9S/zAKvJoFZP7Ask9vnrk4tg==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [darwin]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-linux-arm64-gnu@14.2.0-canary.22:
|
/@next/swc-linux-arm64-gnu@14.2.0-canary.22:
|
||||||
@@ -4455,6 +4480,16 @@ packages:
|
|||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: true
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-linux-arm64-gnu@14.2.0-canary.23:
|
||||||
|
resolution: {integrity: sha512-OMt5uTXtEZNKaeSvviJQVXzARr3Jyk1BKUQVD10hKUa4edWBcmnrpdqiDVoDCGt9kMOdKdGqJHOJUk/jV/G15w==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [linux]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-linux-arm64-musl@14.2.0-canary.22:
|
/@next/swc-linux-arm64-musl@14.2.0-canary.22:
|
||||||
@@ -4463,6 +4498,16 @@ packages:
|
|||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: true
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-linux-arm64-musl@14.2.0-canary.23:
|
||||||
|
resolution: {integrity: sha512-vllciUQ4U99LCOBnsFt9QGf9AyE8yhBtNdNxbij5QsdQ/F53SamxrbYOgG7RisvRqFmWSQMfHdpGZOE0EUUsvQ==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [linux]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-linux-x64-gnu@14.2.0-canary.22:
|
/@next/swc-linux-x64-gnu@14.2.0-canary.22:
|
||||||
@@ -4471,6 +4516,16 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: true
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-linux-x64-gnu@14.2.0-canary.23:
|
||||||
|
resolution: {integrity: sha512-soKCxTCi0m0hOBSEchH2YTluvQzAEb8HIoQXxligU8C1fmFDX25pwQ4iSWmdvA6xDJn96PG2R64NyytTTMg9TQ==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [linux]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-linux-x64-musl@14.2.0-canary.22:
|
/@next/swc-linux-x64-musl@14.2.0-canary.22:
|
||||||
@@ -4479,6 +4534,16 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: true
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-linux-x64-musl@14.2.0-canary.23:
|
||||||
|
resolution: {integrity: sha512-Qr+4ySSYEh1hSSmUJ50oHtKopkqwo3RFb2CXpzcMqp+6U8WOMYBX+JTSCFdA3lSlUJqScIgoRoMDk9I3TZM71g==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [linux]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-win32-arm64-msvc@14.2.0-canary.22:
|
/@next/swc-win32-arm64-msvc@14.2.0-canary.22:
|
||||||
@@ -4487,6 +4552,16 @@ packages:
|
|||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: true
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-win32-arm64-msvc@14.2.0-canary.23:
|
||||||
|
resolution: {integrity: sha512-94HGrBqz9s7z6d6hlukbkF4LiU4Bw+a+C3i+J7pBA+3BHtIyffuqmnrP3HY92trP3M328GBN01H7/zqahcvwPQ==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [win32]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-win32-ia32-msvc@14.2.0-canary.22:
|
/@next/swc-win32-ia32-msvc@14.2.0-canary.22:
|
||||||
@@ -4495,6 +4570,16 @@ packages:
|
|||||||
cpu: [ia32]
|
cpu: [ia32]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: true
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-win32-ia32-msvc@14.2.0-canary.23:
|
||||||
|
resolution: {integrity: sha512-lrvn6ekxPyrBidQxA0kE3xyys8fCLlbhi1tl2FA0QUPHvgPbu2127Q7+UFnl/NGC9veZfCbw6b7TVFyvPseRsQ==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [ia32]
|
||||||
|
os: [win32]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@next/swc-win32-x64-msvc@14.2.0-canary.22:
|
/@next/swc-win32-x64-msvc@14.2.0-canary.22:
|
||||||
@@ -4503,6 +4588,16 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
dev: true
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-win32-x64-msvc@14.2.0-canary.23:
|
||||||
|
resolution: {integrity: sha512-T8zZcK8M5GYWzIKOlxcothb0sixdFSowUztZTNb/kmUK8Vz1Z+TFBxU00WvBDx9ymrGP2f4EKL9YQqu2d+BmcA==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [win32]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@nodelib/fs.scandir@2.1.5:
|
/@nodelib/fs.scandir@2.1.5:
|
||||||
@@ -12863,7 +12958,7 @@ packages:
|
|||||||
/next-tick@1.1.0:
|
/next-tick@1.1.0:
|
||||||
resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==}
|
resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==}
|
||||||
|
|
||||||
/next@14.2.0-canary.22(@babel/core@7.24.0)(react-dom@18.2.0)(react@18.2.0)(sass@1.71.1):
|
/next@14.2.0-canary.22(@babel/core@7.24.0)(react-dom@18.2.0)(react@18.2.0):
|
||||||
resolution: {integrity: sha512-nCqEuJLHRFDWpMfcql3D8V88GAGoEeZobxSCgi6ablFWMkzBGgrwZmsJi41OgtJnWwfF/c56MPXAgkFqbBcwyw==}
|
resolution: {integrity: sha512-nCqEuJLHRFDWpMfcql3D8V88GAGoEeZobxSCgi6ablFWMkzBGgrwZmsJi41OgtJnWwfF/c56MPXAgkFqbBcwyw==}
|
||||||
engines: {node: '>=18.17.0'}
|
engines: {node: '>=18.17.0'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@@ -12886,7 +12981,6 @@ packages:
|
|||||||
postcss: 8.4.31
|
postcss: 8.4.31
|
||||||
react: 18.2.0
|
react: 18.2.0
|
||||||
react-dom: 18.2.0(react@18.2.0)
|
react-dom: 18.2.0(react@18.2.0)
|
||||||
sass: 1.71.1
|
|
||||||
styled-jsx: 5.1.1(@babel/core@7.24.0)(react@18.2.0)
|
styled-jsx: 5.1.1(@babel/core@7.24.0)(react@18.2.0)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@next/swc-darwin-arm64': 14.2.0-canary.22
|
'@next/swc-darwin-arm64': 14.2.0-canary.22
|
||||||
@@ -12901,6 +12995,47 @@ packages:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@babel/core'
|
- '@babel/core'
|
||||||
- babel-plugin-macros
|
- babel-plugin-macros
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/next@14.2.0-canary.23(@babel/core@7.24.0)(react-dom@18.2.0)(react@18.2.0)(sass@1.71.1):
|
||||||
|
resolution: {integrity: sha512-HuQYIeSlmBmTueVIxn0Zjxx5I4MD6vG3p6AsFySTF7/hMSF5qFUCHGIj3YJRWsDcUw/LQhuGPNLaGUg119YegQ==}
|
||||||
|
engines: {node: '>=18.17.0'}
|
||||||
|
hasBin: true
|
||||||
|
peerDependencies:
|
||||||
|
'@opentelemetry/api': ^1.1.0
|
||||||
|
react: ^18.2.0
|
||||||
|
react-dom: ^18.2.0
|
||||||
|
sass: ^1.3.0
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@opentelemetry/api':
|
||||||
|
optional: true
|
||||||
|
sass:
|
||||||
|
optional: true
|
||||||
|
dependencies:
|
||||||
|
'@next/env': 14.2.0-canary.23
|
||||||
|
'@swc/helpers': 0.5.5
|
||||||
|
busboy: 1.6.0
|
||||||
|
caniuse-lite: 1.0.30001591
|
||||||
|
graceful-fs: 4.2.11
|
||||||
|
postcss: 8.4.31
|
||||||
|
react: 18.2.0
|
||||||
|
react-dom: 18.2.0(react@18.2.0)
|
||||||
|
sass: 1.71.1
|
||||||
|
styled-jsx: 5.1.1(@babel/core@7.24.0)(react@18.2.0)
|
||||||
|
optionalDependencies:
|
||||||
|
'@next/swc-darwin-arm64': 14.2.0-canary.23
|
||||||
|
'@next/swc-darwin-x64': 14.2.0-canary.23
|
||||||
|
'@next/swc-linux-arm64-gnu': 14.2.0-canary.23
|
||||||
|
'@next/swc-linux-arm64-musl': 14.2.0-canary.23
|
||||||
|
'@next/swc-linux-x64-gnu': 14.2.0-canary.23
|
||||||
|
'@next/swc-linux-x64-musl': 14.2.0-canary.23
|
||||||
|
'@next/swc-win32-arm64-msvc': 14.2.0-canary.23
|
||||||
|
'@next/swc-win32-ia32-msvc': 14.2.0-canary.23
|
||||||
|
'@next/swc-win32-x64-msvc': 14.2.0-canary.23
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- '@babel/core'
|
||||||
|
- babel-plugin-macros
|
||||||
|
dev: false
|
||||||
|
|
||||||
/node-abi@3.56.0:
|
/node-abi@3.56.0:
|
||||||
resolution: {integrity: sha512-fZjdhDOeRcaS+rcpve7XuwHBmktS1nS1gzgghwKUQQ8nTy2FdSDr6ZT8k6YhvlJeHmmQMYiT/IH9hfco5zeW2Q==}
|
resolution: {integrity: sha512-fZjdhDOeRcaS+rcpve7XuwHBmktS1nS1gzgghwKUQQ8nTy2FdSDr6ZT8k6YhvlJeHmmQMYiT/IH9hfco5zeW2Q==}
|
||||||
|
|||||||
BIN
templates/website/media/image-1.jpg
Normal file
BIN
templates/website/media/image-1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 132 KiB |
BIN
templates/website/media/image-2.jpg
Normal file
BIN
templates/website/media/image-2.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
@@ -1,14 +1,17 @@
|
|||||||
|
import type { Payload } from '../../packages/payload/src/index.js'
|
||||||
|
|
||||||
import { getPayload } from '../../packages/payload/src/index.js'
|
import { getPayload } from '../../packages/payload/src/index.js'
|
||||||
import { NextRESTClient } from '../helpers/NextRESTClient.js'
|
import { NextRESTClient } from '../helpers/NextRESTClient.js'
|
||||||
import { startMemoryDB } from '../startMemoryDB.js'
|
import { startMemoryDB } from '../startMemoryDB.js'
|
||||||
import configPromise from './config.js'
|
import configPromise from './config.js'
|
||||||
|
|
||||||
let restClient: NextRESTClient
|
let restClient: NextRESTClient
|
||||||
|
let payload: Payload
|
||||||
|
|
||||||
describe('Custom GraphQL', () => {
|
describe('Custom GraphQL', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
const config = await startMemoryDB(configPromise)
|
const config = await startMemoryDB(configPromise)
|
||||||
const payload = await getPayload({ config })
|
payload = await getPayload({ config })
|
||||||
restClient = new NextRESTClient(payload.config)
|
restClient = new NextRESTClient(payload.config)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,16 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useField, useFormFields, useFormSubmitted } from '@payloadcms/ui'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
const CustomError: React.FC<any> = (props) => {
|
const CustomError: React.FC<any> = (props) => {
|
||||||
const { showError = false } = props
|
const { path: pathFromProps } = props
|
||||||
|
const submitted = useFormSubmitted()
|
||||||
|
const { path } = useField(pathFromProps)
|
||||||
|
const field = useFormFields(([fields]) => (fields && fields?.[path]) || null)
|
||||||
|
const { valid } = field || {}
|
||||||
|
|
||||||
|
const showError = submitted && !valid
|
||||||
|
|
||||||
if (showError) {
|
if (showError) {
|
||||||
return <div className="custom-error">#custom-error</div>
|
return <div className="custom-error">#custom-error</div>
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
|
import { useFieldPath } from '@payloadcms/ui'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
const CustomLabel: React.FC<{ htmlFor: string }> = ({ htmlFor }) => {
|
const CustomLabel = () => {
|
||||||
|
const { path } = useFieldPath()
|
||||||
return (
|
return (
|
||||||
<label className="custom-label" htmlFor={htmlFor}>
|
<label className="custom-label" htmlFor={`field-${path.replace(/\./g, '__')}`}>
|
||||||
#label
|
#label
|
||||||
</label>
|
</label>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import CustomLabel from './CustomLabel.js'
|
|||||||
import { defaultText, textFieldsSlug } from './shared.js'
|
import { defaultText, textFieldsSlug } from './shared.js'
|
||||||
|
|
||||||
const TextFields: CollectionConfig = {
|
const TextFields: CollectionConfig = {
|
||||||
|
slug: textFieldsSlug,
|
||||||
admin: {
|
admin: {
|
||||||
useAsTitle: 'text',
|
useAsTitle: 'text',
|
||||||
},
|
},
|
||||||
@@ -14,16 +15,17 @@ const TextFields: CollectionConfig = {
|
|||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: 'text',
|
name: 'text',
|
||||||
required: true,
|
|
||||||
type: 'text',
|
type: 'text',
|
||||||
|
required: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'localizedText',
|
name: 'localizedText',
|
||||||
localized: true,
|
|
||||||
type: 'text',
|
type: 'text',
|
||||||
|
localized: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'i18nText',
|
name: 'i18nText',
|
||||||
|
type: 'text',
|
||||||
admin: {
|
admin: {
|
||||||
description: {
|
description: {
|
||||||
en: 'en description',
|
en: 'en description',
|
||||||
@@ -38,12 +40,11 @@ const TextFields: CollectionConfig = {
|
|||||||
en: 'Text en',
|
en: 'Text en',
|
||||||
es: 'Text es',
|
es: 'Text es',
|
||||||
},
|
},
|
||||||
type: 'text',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'defaultFunction',
|
name: 'defaultFunction',
|
||||||
defaultValue: () => defaultText,
|
|
||||||
type: 'text',
|
type: 'text',
|
||||||
|
defaultValue: () => defaultText,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'defaultAsync',
|
name: 'defaultAsync',
|
||||||
@@ -58,21 +59,22 @@ const TextFields: CollectionConfig = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'overrideLength',
|
name: 'overrideLength',
|
||||||
|
type: 'text',
|
||||||
label: 'Override the 40k text length default',
|
label: 'Override the 40k text length default',
|
||||||
maxLength: 50000,
|
maxLength: 50000,
|
||||||
type: 'text',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'fieldWithDefaultValue',
|
name: 'fieldWithDefaultValue',
|
||||||
|
type: 'text',
|
||||||
defaultValue: async () => {
|
defaultValue: async () => {
|
||||||
const defaultValue = new Promise((resolve) => setTimeout(() => resolve('some-value'), 1000))
|
const defaultValue = new Promise((resolve) => setTimeout(() => resolve('some-value'), 1000))
|
||||||
|
|
||||||
return defaultValue
|
return defaultValue
|
||||||
},
|
},
|
||||||
type: 'text',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'dependentOnFieldWithDefaultValue',
|
name: 'dependentOnFieldWithDefaultValue',
|
||||||
|
type: 'text',
|
||||||
hooks: {
|
hooks: {
|
||||||
beforeChange: [
|
beforeChange: [
|
||||||
({ data }) => {
|
({ data }) => {
|
||||||
@@ -80,36 +82,35 @@ const TextFields: CollectionConfig = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
type: 'text',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'customLabel',
|
name: 'customLabel',
|
||||||
|
type: 'text',
|
||||||
admin: {
|
admin: {
|
||||||
components: {
|
components: {
|
||||||
Label: CustomLabel,
|
Label: CustomLabel,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
type: 'text',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'customError',
|
name: 'customError',
|
||||||
|
type: 'text',
|
||||||
admin: {
|
admin: {
|
||||||
components: {
|
components: {
|
||||||
Error: CustomError,
|
Error: CustomError,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
minLength: 3,
|
minLength: 3,
|
||||||
type: 'text',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'beforeAndAfterInput',
|
name: 'beforeAndAfterInput',
|
||||||
|
type: 'text',
|
||||||
admin: {
|
admin: {
|
||||||
components: {
|
components: {
|
||||||
afterInput: [AfterInput],
|
afterInput: [AfterInput],
|
||||||
beforeInput: [BeforeInput],
|
beforeInput: [BeforeInput],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
type: 'text',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'hasMany',
|
name: 'hasMany',
|
||||||
@@ -141,7 +142,6 @@ const TextFields: CollectionConfig = {
|
|||||||
maxRows: 4,
|
maxRows: 4,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
slug: textFieldsSlug,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default TextFields
|
export default TextFields
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export const collectionSlugs: CollectionConfig[] = [
|
|||||||
LexicalFields,
|
LexicalFields,
|
||||||
LexicalMigrateFields,
|
LexicalMigrateFields,
|
||||||
{
|
{
|
||||||
|
slug: 'users',
|
||||||
admin: {
|
admin: {
|
||||||
useAsTitle: 'email',
|
useAsTitle: 'email',
|
||||||
},
|
},
|
||||||
@@ -41,11 +42,10 @@ export const collectionSlugs: CollectionConfig[] = [
|
|||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: 'canViewConditionalField',
|
name: 'canViewConditionalField',
|
||||||
defaultValue: true,
|
|
||||||
type: 'checkbox',
|
type: 'checkbox',
|
||||||
|
defaultValue: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
slug: 'users',
|
|
||||||
},
|
},
|
||||||
ArrayFields,
|
ArrayFields,
|
||||||
BlockFields,
|
BlockFields,
|
||||||
|
|||||||
@@ -63,13 +63,15 @@ export async function openNav(page: Page): Promise<void> {
|
|||||||
// use the `--nav-open` modifier class to check if the nav is open
|
// use the `--nav-open` modifier class to check if the nav is open
|
||||||
// this will prevent clicking nav links that are bleeding off the screen
|
// this will prevent clicking nav links that are bleeding off the screen
|
||||||
if (await page.locator('.template-default.template-default--nav-open').isVisible()) return
|
if (await page.locator('.template-default.template-default--nav-open').isVisible()) return
|
||||||
await page.locator('.nav-toggler').click()
|
// playwright: get first element with .nav-toggler which is VISIBLE (not hidden), could be 2 elements with .nav-toggler on mobile and desktop but only one is visible
|
||||||
|
await page.locator('.nav-toggler >> visible=true').click()
|
||||||
|
|
||||||
await expect(page.locator('.template-default.template-default--nav-open')).toBeVisible()
|
await expect(page.locator('.template-default.template-default--nav-open')).toBeVisible()
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function closeNav(page: Page): Promise<void> {
|
export async function closeNav(page: Page): Promise<void> {
|
||||||
if (!(await page.locator('.template-default.template-default--nav-open').isVisible())) return
|
if (!(await page.locator('.template-default.template-default--nav-open').isVisible())) return
|
||||||
await page.locator('#nav-toggler').click()
|
await page.locator('.nav-toggler >> visible=true').click()
|
||||||
await expect(page.locator('.template-default.template-default--nav-open')).toBeHidden()
|
await expect(page.locator('.template-default.template-default--nav-open')).toBeHidden()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import type { MongooseAdapter } from 'packages/db-mongodb/src/index.js'
|
||||||
|
|
||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
|
||||||
@@ -9,12 +11,12 @@ import { createSnapshot, dbSnapshot, restoreFromSnapshot } from './snapshot.js'
|
|||||||
type SeedFunction = (_payload: Payload) => Promise<void>
|
type SeedFunction = (_payload: Payload) => Promise<void>
|
||||||
|
|
||||||
export async function seedDB({
|
export async function seedDB({
|
||||||
shouldResetDB,
|
|
||||||
_payload,
|
_payload,
|
||||||
snapshotKey,
|
|
||||||
seedFunction,
|
|
||||||
uploadsDir,
|
|
||||||
collectionSlugs,
|
collectionSlugs,
|
||||||
|
seedFunction,
|
||||||
|
shouldResetDB,
|
||||||
|
snapshotKey,
|
||||||
|
uploadsDir,
|
||||||
}: {
|
}: {
|
||||||
_payload: Payload
|
_payload: Payload
|
||||||
collectionSlugs: string[]
|
collectionSlugs: string[]
|
||||||
@@ -71,9 +73,10 @@ export async function seedDB({
|
|||||||
// Dropping the db breaks indexes (on mongoose - did not test extensively on postgres yet), so we recreate them here
|
// Dropping the db breaks indexes (on mongoose - did not test extensively on postgres yet), so we recreate them here
|
||||||
if (shouldResetDB) {
|
if (shouldResetDB) {
|
||||||
if (isMongoose(_payload)) {
|
if (isMongoose(_payload)) {
|
||||||
|
const db = _payload.db as MongooseAdapter
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
...collectionSlugs.map(async (collectionSlug) => {
|
Object.entries(db.collections).map(async ([_, collection]) => {
|
||||||
await _payload.db.collections[collectionSlug].createIndexes()
|
await collection.createIndexes()
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import type { Page } from '@playwright/test'
|
import type { Page } from '@playwright/test'
|
||||||
|
import type { ChildProcessWithoutNullStreams } from 'child_process'
|
||||||
|
|
||||||
import { expect, test } from '@playwright/test'
|
import { expect, test } from '@playwright/test'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
@@ -6,6 +7,7 @@ import { fileURLToPath } from 'url'
|
|||||||
|
|
||||||
import type { Payload } from '../../packages/payload/src/index.js'
|
import type { Payload } from '../../packages/payload/src/index.js'
|
||||||
|
|
||||||
|
import wait from '../../packages/payload/src/utilities/wait.js'
|
||||||
import { exactText, initPageConsoleErrorCatch, saveDocAndAssert } from '../helpers.js'
|
import { exactText, initPageConsoleErrorCatch, saveDocAndAssert } from '../helpers.js'
|
||||||
import { AdminUrlUtil } from '../helpers/adminUrlUtil.js'
|
import { AdminUrlUtil } from '../helpers/adminUrlUtil.js'
|
||||||
import { initPayloadE2E } from '../helpers/configHelpers.js'
|
import { initPayloadE2E } from '../helpers/configHelpers.js'
|
||||||
@@ -15,7 +17,7 @@ import { startLivePreviewDemo } from './startLivePreviewDemo.js'
|
|||||||
const filename = fileURLToPath(import.meta.url)
|
const filename = fileURLToPath(import.meta.url)
|
||||||
const dirname = path.dirname(filename)
|
const dirname = path.dirname(filename)
|
||||||
|
|
||||||
const { beforeAll, describe } = test
|
const { beforeAll, describe, afterAll } = test
|
||||||
|
|
||||||
let payload: Payload
|
let payload: Payload
|
||||||
|
|
||||||
@@ -23,10 +25,11 @@ describe('Live Preview', () => {
|
|||||||
let page: Page
|
let page: Page
|
||||||
let serverURL: string
|
let serverURL: string
|
||||||
let url: AdminUrlUtil
|
let url: AdminUrlUtil
|
||||||
|
let nextProcess: ChildProcessWithoutNullStreams
|
||||||
|
|
||||||
const goToDoc = async (page: Page) => {
|
const goToDoc = async (page: Page) => {
|
||||||
await page.goto(url.list)
|
await page.goto(url.list)
|
||||||
const linkToDoc = page.locator('tbody tr:first-child .cell-id a').first()
|
const linkToDoc = page.locator('tbody tr:first-child .cell-slug a').first()
|
||||||
expect(linkToDoc).toBeTruthy()
|
expect(linkToDoc).toBeTruthy()
|
||||||
await linkToDoc.click()
|
await linkToDoc.click()
|
||||||
}
|
}
|
||||||
@@ -48,15 +51,22 @@ describe('Live Preview', () => {
|
|||||||
const context = await browser.newContext()
|
const context = await browser.newContext()
|
||||||
page = await context.newPage()
|
page = await context.newPage()
|
||||||
|
|
||||||
await startLivePreviewDemo({
|
nextProcess = await startLivePreviewDemo({
|
||||||
payload,
|
payload,
|
||||||
})
|
})
|
||||||
|
|
||||||
initPageConsoleErrorCatch(page)
|
initPageConsoleErrorCatch(page)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
afterAll(({ browser }) => {
|
||||||
|
if (nextProcess) {
|
||||||
|
nextProcess.kill(9)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
test('collection - has tab', async () => {
|
test('collection - has tab', async () => {
|
||||||
await goToDoc(page)
|
await goToDoc(page)
|
||||||
|
await wait(500)
|
||||||
const docURL = page.url()
|
const docURL = page.url()
|
||||||
const pathname = new URL(docURL).pathname
|
const pathname = new URL(docURL).pathname
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/escape-html": "^1.0.2",
|
"@types/escape-html": "^1.0.2",
|
||||||
|
"escape-html": "^1.0.3",
|
||||||
"next": "^13.5.3",
|
"next": "^13.5.3",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
|
|||||||
462
test/live-preview/next-app/pnpm-lock.yaml
generated
Normal file
462
test/live-preview/next-app/pnpm-lock.yaml
generated
Normal file
@@ -0,0 +1,462 @@
|
|||||||
|
lockfileVersion: '6.0'
|
||||||
|
|
||||||
|
settings:
|
||||||
|
autoInstallPeers: true
|
||||||
|
excludeLinksFromLockfile: false
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
'@types/escape-html':
|
||||||
|
specifier: ^1.0.2
|
||||||
|
version: 1.0.4
|
||||||
|
escape-html:
|
||||||
|
specifier: ^1.0.3
|
||||||
|
version: 1.0.3
|
||||||
|
next:
|
||||||
|
specifier: ^13.5.3
|
||||||
|
version: 13.5.6(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0)
|
||||||
|
react:
|
||||||
|
specifier: ^18.2.0
|
||||||
|
version: 18.2.0
|
||||||
|
react-dom:
|
||||||
|
specifier: ^18.2.0
|
||||||
|
version: 18.2.0(react@18.2.0)
|
||||||
|
sass:
|
||||||
|
specifier: ^1.68.0
|
||||||
|
version: 1.72.0
|
||||||
|
slate:
|
||||||
|
specifier: ^0.94.1
|
||||||
|
version: 0.94.1
|
||||||
|
|
||||||
|
devDependencies:
|
||||||
|
'@types/node':
|
||||||
|
specifier: ^20.6.2
|
||||||
|
version: 20.11.28
|
||||||
|
'@types/react':
|
||||||
|
specifier: ^18.2.22
|
||||||
|
version: 18.2.66
|
||||||
|
|
||||||
|
packages:
|
||||||
|
|
||||||
|
/@next/env@13.5.6:
|
||||||
|
resolution: {integrity: sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/@next/swc-darwin-arm64@13.5.6:
|
||||||
|
resolution: {integrity: sha512-5nvXMzKtZfvcu4BhtV0KH1oGv4XEW+B+jOfmBdpFI3C7FrB/MfujRpWYSBBO64+qbW8pkZiSyQv9eiwnn5VIQA==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [darwin]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-darwin-x64@13.5.6:
|
||||||
|
resolution: {integrity: sha512-6cgBfxg98oOCSr4BckWjLLgiVwlL3vlLj8hXg2b+nDgm4bC/qVXXLfpLB9FHdoDu4057hzywbxKvmYGmi7yUzA==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [darwin]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-linux-arm64-gnu@13.5.6:
|
||||||
|
resolution: {integrity: sha512-txagBbj1e1w47YQjcKgSU4rRVQ7uF29YpnlHV5xuVUsgCUf2FmyfJ3CPjZUvpIeXCJAoMCFAoGnbtX86BK7+sg==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [linux]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-linux-arm64-musl@13.5.6:
|
||||||
|
resolution: {integrity: sha512-cGd+H8amifT86ZldVJtAKDxUqeFyLWW+v2NlBULnLAdWsiuuN8TuhVBt8ZNpCqcAuoruoSWynvMWixTFcroq+Q==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [linux]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-linux-x64-gnu@13.5.6:
|
||||||
|
resolution: {integrity: sha512-Mc2b4xiIWKXIhBy2NBTwOxGD3nHLmq4keFk+d4/WL5fMsB8XdJRdtUlL87SqVCTSaf1BRuQQf1HvXZcy+rq3Nw==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [linux]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-linux-x64-musl@13.5.6:
|
||||||
|
resolution: {integrity: sha512-CFHvP9Qz98NruJiUnCe61O6GveKKHpJLloXbDSWRhqhkJdZD2zU5hG+gtVJR//tyW897izuHpM6Gtf6+sNgJPQ==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [linux]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-win32-arm64-msvc@13.5.6:
|
||||||
|
resolution: {integrity: sha512-aFv1ejfkbS7PUa1qVPwzDHjQWQtknzAZWGTKYIAaS4NMtBlk3VyA6AYn593pqNanlicewqyl2jUhQAaFV/qXsg==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [win32]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-win32-ia32-msvc@13.5.6:
|
||||||
|
resolution: {integrity: sha512-XqqpHgEIlBHvzwG8sp/JXMFkLAfGLqkbVsyN+/Ih1mR8INb6YCc2x/Mbwi6hsAgUnqQztz8cvEbHJUbSl7RHDg==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [ia32]
|
||||||
|
os: [win32]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@next/swc-win32-x64-msvc@13.5.6:
|
||||||
|
resolution: {integrity: sha512-Cqfe1YmOS7k+5mGu92nl5ULkzpKuxJrP3+4AEuPmrpFZ3BHxTY3TnHmU1On3bFmFFs6FbTcdF58CCUProGpIGQ==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [win32]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/@swc/helpers@0.5.2:
|
||||||
|
resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==}
|
||||||
|
dependencies:
|
||||||
|
tslib: 2.6.2
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/@types/escape-html@1.0.4:
|
||||||
|
resolution: {integrity: sha512-qZ72SFTgUAZ5a7Tj6kf2SHLetiH5S6f8G5frB2SPQ3EyF02kxdyBFf4Tz4banE3xCgGnKgWLt//a6VuYHKYJTg==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/@types/node@20.11.28:
|
||||||
|
resolution: {integrity: sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==}
|
||||||
|
dependencies:
|
||||||
|
undici-types: 5.26.5
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@types/prop-types@15.7.11:
|
||||||
|
resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@types/react@18.2.66:
|
||||||
|
resolution: {integrity: sha512-OYTmMI4UigXeFMF/j4uv0lBBEbongSgptPrHBxqME44h9+yNov+oL6Z3ocJKo0WyXR84sQUNeyIp9MRfckvZpg==}
|
||||||
|
dependencies:
|
||||||
|
'@types/prop-types': 15.7.11
|
||||||
|
'@types/scheduler': 0.16.8
|
||||||
|
csstype: 3.1.3
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@types/scheduler@0.16.8:
|
||||||
|
resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/anymatch@3.1.3:
|
||||||
|
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
|
||||||
|
engines: {node: '>= 8'}
|
||||||
|
dependencies:
|
||||||
|
normalize-path: 3.0.0
|
||||||
|
picomatch: 2.3.1
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/binary-extensions@2.3.0:
|
||||||
|
resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/braces@3.0.2:
|
||||||
|
resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dependencies:
|
||||||
|
fill-range: 7.0.1
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/busboy@1.6.0:
|
||||||
|
resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==}
|
||||||
|
engines: {node: '>=10.16.0'}
|
||||||
|
dependencies:
|
||||||
|
streamsearch: 1.1.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/caniuse-lite@1.0.30001597:
|
||||||
|
resolution: {integrity: sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/chokidar@3.6.0:
|
||||||
|
resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
|
||||||
|
engines: {node: '>= 8.10.0'}
|
||||||
|
dependencies:
|
||||||
|
anymatch: 3.1.3
|
||||||
|
braces: 3.0.2
|
||||||
|
glob-parent: 5.1.2
|
||||||
|
is-binary-path: 2.1.0
|
||||||
|
is-glob: 4.0.3
|
||||||
|
normalize-path: 3.0.0
|
||||||
|
readdirp: 3.6.0
|
||||||
|
optionalDependencies:
|
||||||
|
fsevents: 2.3.3
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/client-only@0.0.1:
|
||||||
|
resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/csstype@3.1.3:
|
||||||
|
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/escape-html@1.0.3:
|
||||||
|
resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/fill-range@7.0.1:
|
||||||
|
resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dependencies:
|
||||||
|
to-regex-range: 5.0.1
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/fsevents@2.3.3:
|
||||||
|
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
|
||||||
|
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
|
||||||
|
os: [darwin]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/glob-parent@5.1.2:
|
||||||
|
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
|
||||||
|
engines: {node: '>= 6'}
|
||||||
|
dependencies:
|
||||||
|
is-glob: 4.0.3
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/glob-to-regexp@0.4.1:
|
||||||
|
resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/graceful-fs@4.2.11:
|
||||||
|
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/immer@9.0.21:
|
||||||
|
resolution: {integrity: sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/immutable@4.3.5:
|
||||||
|
resolution: {integrity: sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/is-binary-path@2.1.0:
|
||||||
|
resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dependencies:
|
||||||
|
binary-extensions: 2.3.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/is-extglob@2.1.1:
|
||||||
|
resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
|
||||||
|
engines: {node: '>=0.10.0'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/is-glob@4.0.3:
|
||||||
|
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
|
||||||
|
engines: {node: '>=0.10.0'}
|
||||||
|
dependencies:
|
||||||
|
is-extglob: 2.1.1
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/is-number@7.0.0:
|
||||||
|
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
|
||||||
|
engines: {node: '>=0.12.0'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/is-plain-object@5.0.0:
|
||||||
|
resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==}
|
||||||
|
engines: {node: '>=0.10.0'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/js-tokens@4.0.0:
|
||||||
|
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/loose-envify@1.4.0:
|
||||||
|
resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
|
||||||
|
hasBin: true
|
||||||
|
dependencies:
|
||||||
|
js-tokens: 4.0.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/nanoid@3.3.7:
|
||||||
|
resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==}
|
||||||
|
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||||
|
hasBin: true
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/next@13.5.6(react-dom@18.2.0)(react@18.2.0)(sass@1.72.0):
|
||||||
|
resolution: {integrity: sha512-Y2wTcTbO4WwEsVb4A8VSnOsG1I9ok+h74q0ZdxkwM3EODqrs4pasq7O0iUxbcS9VtWMicG7f3+HAj0r1+NtKSw==}
|
||||||
|
engines: {node: '>=16.14.0'}
|
||||||
|
hasBin: true
|
||||||
|
peerDependencies:
|
||||||
|
'@opentelemetry/api': ^1.1.0
|
||||||
|
react: ^18.2.0
|
||||||
|
react-dom: ^18.2.0
|
||||||
|
sass: ^1.3.0
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@opentelemetry/api':
|
||||||
|
optional: true
|
||||||
|
sass:
|
||||||
|
optional: true
|
||||||
|
dependencies:
|
||||||
|
'@next/env': 13.5.6
|
||||||
|
'@swc/helpers': 0.5.2
|
||||||
|
busboy: 1.6.0
|
||||||
|
caniuse-lite: 1.0.30001597
|
||||||
|
postcss: 8.4.31
|
||||||
|
react: 18.2.0
|
||||||
|
react-dom: 18.2.0(react@18.2.0)
|
||||||
|
sass: 1.72.0
|
||||||
|
styled-jsx: 5.1.1(react@18.2.0)
|
||||||
|
watchpack: 2.4.0
|
||||||
|
optionalDependencies:
|
||||||
|
'@next/swc-darwin-arm64': 13.5.6
|
||||||
|
'@next/swc-darwin-x64': 13.5.6
|
||||||
|
'@next/swc-linux-arm64-gnu': 13.5.6
|
||||||
|
'@next/swc-linux-arm64-musl': 13.5.6
|
||||||
|
'@next/swc-linux-x64-gnu': 13.5.6
|
||||||
|
'@next/swc-linux-x64-musl': 13.5.6
|
||||||
|
'@next/swc-win32-arm64-msvc': 13.5.6
|
||||||
|
'@next/swc-win32-ia32-msvc': 13.5.6
|
||||||
|
'@next/swc-win32-x64-msvc': 13.5.6
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- '@babel/core'
|
||||||
|
- babel-plugin-macros
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/normalize-path@3.0.0:
|
||||||
|
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
|
||||||
|
engines: {node: '>=0.10.0'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/picocolors@1.0.0:
|
||||||
|
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/picomatch@2.3.1:
|
||||||
|
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
|
||||||
|
engines: {node: '>=8.6'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/postcss@8.4.31:
|
||||||
|
resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==}
|
||||||
|
engines: {node: ^10 || ^12 || >=14}
|
||||||
|
dependencies:
|
||||||
|
nanoid: 3.3.7
|
||||||
|
picocolors: 1.0.0
|
||||||
|
source-map-js: 1.0.2
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/react-dom@18.2.0(react@18.2.0):
|
||||||
|
resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==}
|
||||||
|
peerDependencies:
|
||||||
|
react: ^18.2.0
|
||||||
|
dependencies:
|
||||||
|
loose-envify: 1.4.0
|
||||||
|
react: 18.2.0
|
||||||
|
scheduler: 0.23.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/react@18.2.0:
|
||||||
|
resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==}
|
||||||
|
engines: {node: '>=0.10.0'}
|
||||||
|
dependencies:
|
||||||
|
loose-envify: 1.4.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/readdirp@3.6.0:
|
||||||
|
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
|
||||||
|
engines: {node: '>=8.10.0'}
|
||||||
|
dependencies:
|
||||||
|
picomatch: 2.3.1
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/sass@1.72.0:
|
||||||
|
resolution: {integrity: sha512-Gpczt3WA56Ly0Mn8Sl21Vj94s1axi9hDIzDFn9Ph9x3C3p4nNyvsqJoQyVXKou6cBlfFWEgRW4rT8Tb4i3XnVA==}
|
||||||
|
engines: {node: '>=14.0.0'}
|
||||||
|
hasBin: true
|
||||||
|
dependencies:
|
||||||
|
chokidar: 3.6.0
|
||||||
|
immutable: 4.3.5
|
||||||
|
source-map-js: 1.0.2
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/scheduler@0.23.0:
|
||||||
|
resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==}
|
||||||
|
dependencies:
|
||||||
|
loose-envify: 1.4.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/slate@0.94.1:
|
||||||
|
resolution: {integrity: sha512-GH/yizXr1ceBoZ9P9uebIaHe3dC/g6Plpf9nlUwnvoyf6V1UOYrRwkabtOCd3ZfIGxomY4P7lfgLr7FPH8/BKA==}
|
||||||
|
dependencies:
|
||||||
|
immer: 9.0.21
|
||||||
|
is-plain-object: 5.0.0
|
||||||
|
tiny-warning: 1.0.3
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/source-map-js@1.0.2:
|
||||||
|
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
|
||||||
|
engines: {node: '>=0.10.0'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/streamsearch@1.1.0:
|
||||||
|
resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
|
||||||
|
engines: {node: '>=10.0.0'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/styled-jsx@5.1.1(react@18.2.0):
|
||||||
|
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:
|
||||||
|
client-only: 0.0.1
|
||||||
|
react: 18.2.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/tiny-warning@1.0.3:
|
||||||
|
resolution: {integrity: sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/to-regex-range@5.0.1:
|
||||||
|
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
|
||||||
|
engines: {node: '>=8.0'}
|
||||||
|
dependencies:
|
||||||
|
is-number: 7.0.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/tslib@2.6.2:
|
||||||
|
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/undici-types@5.26.5:
|
||||||
|
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/watchpack@2.4.0:
|
||||||
|
resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==}
|
||||||
|
engines: {node: '>=10.13.0'}
|
||||||
|
dependencies:
|
||||||
|
glob-to-regexp: 0.4.1
|
||||||
|
graceful-fs: 4.2.11
|
||||||
|
dev: false
|
||||||
@@ -1,374 +0,0 @@
|
|||||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
||||||
# yarn lockfile v1
|
|
||||||
|
|
||||||
|
|
||||||
"@next/env@13.5.4":
|
|
||||||
version "13.5.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@next/env/-/env-13.5.4.tgz#777c3af16de2cf2f611b6c8126910062d13d222c"
|
|
||||||
integrity sha512-LGegJkMvRNw90WWphGJ3RMHMVplYcOfRWf2Be3td3sUa+1AaxmsYyANsA+znrGCBjXJNi4XAQlSoEfUxs/4kIQ==
|
|
||||||
|
|
||||||
"@next/swc-darwin-arm64@13.5.4":
|
|
||||||
version "13.5.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.4.tgz#241957774fef3f876dc714cfc0ca6f00f561737e"
|
|
||||||
integrity sha512-Df8SHuXgF1p+aonBMcDPEsaahNo2TCwuie7VXED4FVyECvdXfRT9unapm54NssV9tF3OQFKBFOdlje4T43VO0w==
|
|
||||||
|
|
||||||
"@next/swc-darwin-x64@13.5.4":
|
|
||||||
version "13.5.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.4.tgz#fa11bb97bf06cd45cbd554354b46bf93e22c025b"
|
|
||||||
integrity sha512-siPuUwO45PnNRMeZnSa8n/Lye5ZX93IJom9wQRB5DEOdFrw0JjOMu1GINB8jAEdwa7Vdyn1oJ2xGNaQpdQQ9Pw==
|
|
||||||
|
|
||||||
"@next/swc-linux-arm64-gnu@13.5.4":
|
|
||||||
version "13.5.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.4.tgz#dd3a482cd6871ed23b049066a0f3c4c2f955dc88"
|
|
||||||
integrity sha512-l/k/fvRP/zmB2jkFMfefmFkyZbDkYW0mRM/LB+tH5u9pB98WsHXC0WvDHlGCYp3CH/jlkJPL7gN8nkTQVrQ/2w==
|
|
||||||
|
|
||||||
"@next/swc-linux-arm64-musl@13.5.4":
|
|
||||||
version "13.5.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.4.tgz#ed6d7abaf5712cff2752ce5300d6bacc6aff1b18"
|
|
||||||
integrity sha512-YYGb7SlLkI+XqfQa8VPErljb7k9nUnhhRrVaOdfJNCaQnHBcvbT7cx/UjDQLdleJcfyg1Hkn5YSSIeVfjgmkTg==
|
|
||||||
|
|
||||||
"@next/swc-linux-x64-gnu@13.5.4":
|
|
||||||
version "13.5.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.4.tgz#977a040388e8a685a3a85e0dbdff90a4ee2a7189"
|
|
||||||
integrity sha512-uE61vyUSClnCH18YHjA8tE1prr/PBFlBFhxBZis4XBRJoR+txAky5d7gGNUIbQ8sZZ7LVkSVgm/5Fc7mwXmRAg==
|
|
||||||
|
|
||||||
"@next/swc-linux-x64-musl@13.5.4":
|
|
||||||
version "13.5.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.4.tgz#3e29a0ad8efc016196c3a120da04397eea328b2a"
|
|
||||||
integrity sha512-qVEKFYML/GvJSy9CfYqAdUexA6M5AklYcQCW+8JECmkQHGoPxCf04iMh7CPR7wkHyWWK+XLt4Ja7hhsPJtSnhg==
|
|
||||||
|
|
||||||
"@next/swc-win32-arm64-msvc@13.5.4":
|
|
||||||
version "13.5.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.4.tgz#18a236c3fe5a48d24b56d939e6a05488bb682b7e"
|
|
||||||
integrity sha512-mDSQfqxAlfpeZOLPxLymZkX0hYF3juN57W6vFHTvwKlnHfmh12Pt7hPIRLYIShk8uYRsKPtMTth/EzpwRI+u8w==
|
|
||||||
|
|
||||||
"@next/swc-win32-ia32-msvc@13.5.4":
|
|
||||||
version "13.5.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.4.tgz#255132243ab6fb20d3c7c92a585e2c4fa50368fe"
|
|
||||||
integrity sha512-aoqAT2XIekIWoriwzOmGFAvTtVY5O7JjV21giozBTP5c6uZhpvTWRbmHXbmsjZqY4HnEZQRXWkSAppsIBweKqw==
|
|
||||||
|
|
||||||
"@next/swc-win32-x64-msvc@13.5.4":
|
|
||||||
version "13.5.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.4.tgz#cc542907b55247c5634d9a8298e1c143a1847e25"
|
|
||||||
integrity sha512-cyRvlAxwlddlqeB9xtPSfNSCRy8BOa4wtMo0IuI9P7Y0XT2qpDrpFKRyZ7kUngZis59mPVla5k8X1oOJ8RxDYg==
|
|
||||||
|
|
||||||
"@swc/helpers@0.5.2":
|
|
||||||
version "0.5.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.2.tgz#85ea0c76450b61ad7d10a37050289eded783c27d"
|
|
||||||
integrity sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==
|
|
||||||
dependencies:
|
|
||||||
tslib "^2.4.0"
|
|
||||||
|
|
||||||
"@types/escape-html@^1.0.2":
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/escape-html/-/escape-html-1.0.2.tgz#072b7b13784fb3cee9c2450c22f36405983f5e3c"
|
|
||||||
integrity sha512-gaBLT8pdcexFztLSPRtriHeXY/Kn4907uOCZ4Q3lncFBkheAWOuNt53ypsF8szgxbEJ513UeBzcf4utN0EzEwA==
|
|
||||||
|
|
||||||
"@types/node@^20.6.2":
|
|
||||||
version "20.8.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.4.tgz#0e9ebb2ff29d5c3302fc84477d066fa7c6b441aa"
|
|
||||||
integrity sha512-ZVPnqU58giiCjSxjVUESDtdPk4QR5WQhhINbc9UBrKLU68MX5BF6kbQzTrkwbolyr0X8ChBpXfavr5mZFKZQ5A==
|
|
||||||
dependencies:
|
|
||||||
undici-types "~5.25.1"
|
|
||||||
|
|
||||||
"@types/prop-types@*":
|
|
||||||
version "15.7.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.8.tgz#805eae6e8f41bd19e88917d2ea200dc992f405d3"
|
|
||||||
integrity sha512-kMpQpfZKSCBqltAJwskgePRaYRFukDkm1oItcAbC3gNELR20XIBcN9VRgg4+m8DKsTfkWeA4m4Imp4DDuWy7FQ==
|
|
||||||
|
|
||||||
"@types/react@^18.2.22":
|
|
||||||
version "18.2.27"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.27.tgz#746e52b06f3ccd5d7a724fd53769b70792601440"
|
|
||||||
integrity sha512-Wfv7B7FZiR2r3MIqbAlXoY1+tXm4bOqfz4oRr+nyXdBqapDBZ0l/IGcSlAfvxIHEEJjkPU0MYAc/BlFPOcrgLw==
|
|
||||||
dependencies:
|
|
||||||
"@types/prop-types" "*"
|
|
||||||
"@types/scheduler" "*"
|
|
||||||
csstype "^3.0.2"
|
|
||||||
|
|
||||||
"@types/scheduler@*":
|
|
||||||
version "0.16.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.4.tgz#fedc3e5b15c26dc18faae96bf1317487cb3658cf"
|
|
||||||
integrity sha512-2L9ifAGl7wmXwP4v3pN4p2FLhD0O1qsJpvKmNin5VA8+UvNVb447UDaAEV6UdrkA+m/Xs58U1RFps44x6TFsVQ==
|
|
||||||
|
|
||||||
anymatch@~3.1.2:
|
|
||||||
version "3.1.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
|
|
||||||
integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==
|
|
||||||
dependencies:
|
|
||||||
normalize-path "^3.0.0"
|
|
||||||
picomatch "^2.0.4"
|
|
||||||
|
|
||||||
binary-extensions@^2.0.0:
|
|
||||||
version "2.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
|
|
||||||
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
|
|
||||||
|
|
||||||
braces@~3.0.2:
|
|
||||||
version "3.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
|
|
||||||
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
|
|
||||||
dependencies:
|
|
||||||
fill-range "^7.0.1"
|
|
||||||
|
|
||||||
busboy@1.6.0:
|
|
||||||
version "1.6.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893"
|
|
||||||
integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==
|
|
||||||
dependencies:
|
|
||||||
streamsearch "^1.1.0"
|
|
||||||
|
|
||||||
caniuse-lite@^1.0.30001406:
|
|
||||||
version "1.0.30001547"
|
|
||||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz#d4f92efc488aab3c7f92c738d3977c2a3180472b"
|
|
||||||
integrity sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==
|
|
||||||
|
|
||||||
"chokidar@>=3.0.0 <4.0.0":
|
|
||||||
version "3.5.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
|
|
||||||
integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
|
|
||||||
dependencies:
|
|
||||||
anymatch "~3.1.2"
|
|
||||||
braces "~3.0.2"
|
|
||||||
glob-parent "~5.1.2"
|
|
||||||
is-binary-path "~2.1.0"
|
|
||||||
is-glob "~4.0.1"
|
|
||||||
normalize-path "~3.0.0"
|
|
||||||
readdirp "~3.6.0"
|
|
||||||
optionalDependencies:
|
|
||||||
fsevents "~2.3.2"
|
|
||||||
|
|
||||||
client-only@0.0.1:
|
|
||||||
version "0.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1"
|
|
||||||
integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==
|
|
||||||
|
|
||||||
csstype@^3.0.2:
|
|
||||||
version "3.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b"
|
|
||||||
integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==
|
|
||||||
|
|
||||||
fill-range@^7.0.1:
|
|
||||||
version "7.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
|
|
||||||
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
|
|
||||||
dependencies:
|
|
||||||
to-regex-range "^5.0.1"
|
|
||||||
|
|
||||||
fsevents@~2.3.2:
|
|
||||||
version "2.3.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
|
|
||||||
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
|
|
||||||
|
|
||||||
glob-parent@~5.1.2:
|
|
||||||
version "5.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
|
|
||||||
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
|
|
||||||
dependencies:
|
|
||||||
is-glob "^4.0.1"
|
|
||||||
|
|
||||||
glob-to-regexp@^0.4.1:
|
|
||||||
version "0.4.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
|
|
||||||
integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==
|
|
||||||
|
|
||||||
graceful-fs@^4.1.2:
|
|
||||||
version "4.2.11"
|
|
||||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
|
|
||||||
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
|
|
||||||
|
|
||||||
immer@^9.0.6:
|
|
||||||
version "9.0.21"
|
|
||||||
resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.21.tgz#1e025ea31a40f24fb064f1fef23e931496330176"
|
|
||||||
integrity sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==
|
|
||||||
|
|
||||||
immutable@^4.0.0:
|
|
||||||
version "4.3.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.4.tgz#2e07b33837b4bb7662f288c244d1ced1ef65a78f"
|
|
||||||
integrity sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==
|
|
||||||
|
|
||||||
is-binary-path@~2.1.0:
|
|
||||||
version "2.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
|
|
||||||
integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
|
|
||||||
dependencies:
|
|
||||||
binary-extensions "^2.0.0"
|
|
||||||
|
|
||||||
is-extglob@^2.1.1:
|
|
||||||
version "2.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
|
|
||||||
integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
|
|
||||||
|
|
||||||
is-glob@^4.0.1, is-glob@~4.0.1:
|
|
||||||
version "4.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
|
|
||||||
integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
|
|
||||||
dependencies:
|
|
||||||
is-extglob "^2.1.1"
|
|
||||||
|
|
||||||
is-number@^7.0.0:
|
|
||||||
version "7.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
|
|
||||||
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
|
|
||||||
|
|
||||||
is-plain-object@^5.0.0:
|
|
||||||
version "5.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344"
|
|
||||||
integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==
|
|
||||||
|
|
||||||
"js-tokens@^3.0.0 || ^4.0.0":
|
|
||||||
version "4.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
|
||||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
|
||||||
|
|
||||||
loose-envify@^1.1.0:
|
|
||||||
version "1.4.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
|
|
||||||
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
|
|
||||||
dependencies:
|
|
||||||
js-tokens "^3.0.0 || ^4.0.0"
|
|
||||||
|
|
||||||
nanoid@^3.3.6:
|
|
||||||
version "3.3.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
|
|
||||||
integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==
|
|
||||||
|
|
||||||
next@^13.5.3:
|
|
||||||
version "13.5.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/next/-/next-13.5.4.tgz#7e6a93c9c2b9a2c78bf6906a6c5cc73ae02d5b4d"
|
|
||||||
integrity sha512-+93un5S779gho8y9ASQhb/bTkQF17FNQOtXLKAj3lsNgltEcF0C5PMLLncDmH+8X1EnJH1kbqAERa29nRXqhjA==
|
|
||||||
dependencies:
|
|
||||||
"@next/env" "13.5.4"
|
|
||||||
"@swc/helpers" "0.5.2"
|
|
||||||
busboy "1.6.0"
|
|
||||||
caniuse-lite "^1.0.30001406"
|
|
||||||
postcss "8.4.31"
|
|
||||||
styled-jsx "5.1.1"
|
|
||||||
watchpack "2.4.0"
|
|
||||||
optionalDependencies:
|
|
||||||
"@next/swc-darwin-arm64" "13.5.4"
|
|
||||||
"@next/swc-darwin-x64" "13.5.4"
|
|
||||||
"@next/swc-linux-arm64-gnu" "13.5.4"
|
|
||||||
"@next/swc-linux-arm64-musl" "13.5.4"
|
|
||||||
"@next/swc-linux-x64-gnu" "13.5.4"
|
|
||||||
"@next/swc-linux-x64-musl" "13.5.4"
|
|
||||||
"@next/swc-win32-arm64-msvc" "13.5.4"
|
|
||||||
"@next/swc-win32-ia32-msvc" "13.5.4"
|
|
||||||
"@next/swc-win32-x64-msvc" "13.5.4"
|
|
||||||
|
|
||||||
normalize-path@^3.0.0, normalize-path@~3.0.0:
|
|
||||||
version "3.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
|
|
||||||
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
|
|
||||||
|
|
||||||
picocolors@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
|
|
||||||
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
|
|
||||||
|
|
||||||
picomatch@^2.0.4, picomatch@^2.2.1:
|
|
||||||
version "2.3.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
|
||||||
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
|
||||||
|
|
||||||
postcss@8.4.31:
|
|
||||||
version "8.4.31"
|
|
||||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d"
|
|
||||||
integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==
|
|
||||||
dependencies:
|
|
||||||
nanoid "^3.3.6"
|
|
||||||
picocolors "^1.0.0"
|
|
||||||
source-map-js "^1.0.2"
|
|
||||||
|
|
||||||
react-dom@^18.2.0:
|
|
||||||
version "18.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
|
|
||||||
integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
|
|
||||||
dependencies:
|
|
||||||
loose-envify "^1.1.0"
|
|
||||||
scheduler "^0.23.0"
|
|
||||||
|
|
||||||
react@^18.2.0:
|
|
||||||
version "18.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
|
|
||||||
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
|
|
||||||
dependencies:
|
|
||||||
loose-envify "^1.1.0"
|
|
||||||
|
|
||||||
readdirp@~3.6.0:
|
|
||||||
version "3.6.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
|
|
||||||
integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
|
|
||||||
dependencies:
|
|
||||||
picomatch "^2.2.1"
|
|
||||||
|
|
||||||
sass@^1.68.0:
|
|
||||||
version "1.69.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/sass/-/sass-1.69.1.tgz#659b3b04452245dcf82f731684831e990ddb0c89"
|
|
||||||
integrity sha512-nc969GvTVz38oqKgYYVHM/Iq7Yl33IILy5uqaH2CWSiSUmRCvw+UR7tA3845Sp4BD5ykCUimvrT3k1EjTwpVUA==
|
|
||||||
dependencies:
|
|
||||||
chokidar ">=3.0.0 <4.0.0"
|
|
||||||
immutable "^4.0.0"
|
|
||||||
source-map-js ">=0.6.2 <2.0.0"
|
|
||||||
|
|
||||||
scheduler@^0.23.0:
|
|
||||||
version "0.23.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe"
|
|
||||||
integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==
|
|
||||||
dependencies:
|
|
||||||
loose-envify "^1.1.0"
|
|
||||||
|
|
||||||
slate@^0.94.1:
|
|
||||||
version "0.94.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/slate/-/slate-0.94.1.tgz#13b0ba7d0a7eeb0ec89a87598e9111cbbd685696"
|
|
||||||
integrity sha512-GH/yizXr1ceBoZ9P9uebIaHe3dC/g6Plpf9nlUwnvoyf6V1UOYrRwkabtOCd3ZfIGxomY4P7lfgLr7FPH8/BKA==
|
|
||||||
dependencies:
|
|
||||||
immer "^9.0.6"
|
|
||||||
is-plain-object "^5.0.0"
|
|
||||||
tiny-warning "^1.0.3"
|
|
||||||
|
|
||||||
"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
|
||||||
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
|
|
||||||
|
|
||||||
streamsearch@^1.1.0:
|
|
||||||
version "1.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764"
|
|
||||||
integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==
|
|
||||||
|
|
||||||
styled-jsx@5.1.1:
|
|
||||||
version "5.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.1.tgz#839a1c3aaacc4e735fed0781b8619ea5d0009d1f"
|
|
||||||
integrity sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==
|
|
||||||
dependencies:
|
|
||||||
client-only "0.0.1"
|
|
||||||
|
|
||||||
tiny-warning@^1.0.3:
|
|
||||||
version "1.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754"
|
|
||||||
integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==
|
|
||||||
|
|
||||||
to-regex-range@^5.0.1:
|
|
||||||
version "5.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
|
|
||||||
integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
|
|
||||||
dependencies:
|
|
||||||
is-number "^7.0.0"
|
|
||||||
|
|
||||||
tslib@^2.4.0:
|
|
||||||
version "2.6.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
|
|
||||||
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
|
|
||||||
|
|
||||||
undici-types@~5.25.1:
|
|
||||||
version "5.25.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3"
|
|
||||||
integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==
|
|
||||||
|
|
||||||
watchpack@2.4.0:
|
|
||||||
version "2.4.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d"
|
|
||||||
integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==
|
|
||||||
dependencies:
|
|
||||||
glob-to-regexp "^0.4.1"
|
|
||||||
graceful-fs "^4.1.2"
|
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import type { ChildProcessWithoutNullStreams } from 'child_process'
|
||||||
|
|
||||||
import { spawn } from 'child_process'
|
import { spawn } from 'child_process'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
import { fileURLToPath } from 'url'
|
import { fileURLToPath } from 'url'
|
||||||
@@ -13,7 +15,7 @@ const installNodeModules = async (args: { payload: Payload }): Promise<void> =>
|
|||||||
|
|
||||||
return new Promise(function (resolve) {
|
return new Promise(function (resolve) {
|
||||||
// Install the node modules for the Next.js app
|
// Install the node modules for the Next.js app
|
||||||
const installation = spawn('yarn', ['install'], {
|
const installation = spawn('pnpm', ['install', '--ignore-workspace'], {
|
||||||
cwd: path.resolve(dirname, './next-app'),
|
cwd: path.resolve(dirname, './next-app'),
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -37,14 +39,14 @@ const installNodeModules = async (args: { payload: Payload }): Promise<void> =>
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const bootNextApp = async (args: { payload: Payload }): Promise<void> => {
|
const bootNextApp = async (args: { payload: Payload }): Promise<ChildProcessWithoutNullStreams> => {
|
||||||
const { payload } = args
|
const { payload } = args
|
||||||
|
|
||||||
let started = false
|
let started = false
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
// Boot up the Next.js app
|
// Boot up the Next.js app
|
||||||
const app = spawn('yarn', ['dev'], {
|
const app = spawn('pnpm', ['dev'], {
|
||||||
cwd: path.resolve(dirname, './next-app'),
|
cwd: path.resolve(dirname, './next-app'),
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -57,7 +59,7 @@ const bootNextApp = async (args: { payload: Payload }): Promise<void> => {
|
|||||||
payload.logger.info(data.toString())
|
payload.logger.info(data.toString())
|
||||||
|
|
||||||
if (data.toString().includes('Ready in')) {
|
if (data.toString().includes('Ready in')) {
|
||||||
resolve()
|
resolve(app)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -72,7 +74,11 @@ const bootNextApp = async (args: { payload: Payload }): Promise<void> => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const startLivePreviewDemo = async (args: { payload: Payload }): Promise<void> => {
|
export const startLivePreviewDemo = async (args: {
|
||||||
|
payload: Payload
|
||||||
|
}): Promise<ChildProcessWithoutNullStreams> => {
|
||||||
await installNodeModules(args)
|
await installNodeModules(args)
|
||||||
await bootNextApp(args)
|
const process = await bootNextApp(args)
|
||||||
|
|
||||||
|
return process
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user