chore: files for running tests
This commit is contained in:
@@ -286,7 +286,7 @@ export const upsertRow = async <T extends TypeWithID>({
|
|||||||
message: req.t('error:valueMustBeUnique'),
|
message: req.t('error:valueMustBeUnique'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
req?.t ?? i18nInit(req.payload.config.i18n).t,
|
req.t,
|
||||||
)
|
)
|
||||||
: error
|
: error
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,8 +38,6 @@ export const APIKeyAuthentication =
|
|||||||
collection: collectionConfig.slug,
|
collection: collectionConfig.slug,
|
||||||
depth: collectionConfig.auth.depth,
|
depth: collectionConfig.auth.depth,
|
||||||
overrideAccess: true,
|
overrideAccess: true,
|
||||||
// TODO(JAMES)(REVIEW): had to remove with new pattern
|
|
||||||
// req,
|
|
||||||
where,
|
where,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
import payload from '..'
|
import loadConfig from '../config/load'
|
||||||
|
|
||||||
export const build = async (): Promise<void> => {
|
export const build = async (): Promise<void> => {
|
||||||
await payload.init({
|
const config = await loadConfig() // Will throw its own error if it fails
|
||||||
disableDBConnect: true,
|
|
||||||
disableOnInit: true,
|
|
||||||
local: true,
|
|
||||||
})
|
|
||||||
|
|
||||||
await payload.config.admin.bundler.build(payload.config)
|
await config.admin.bundler.build(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
// when build.js is launched directly
|
// when build.js is launched directly
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
|
|
||||||
import type { User } from '../../packages/payload/src/auth'
|
import type { User } from '../../packages/payload/src/auth'
|
||||||
import type { UIField } from '../../packages/payload/src/fields/config/types'
|
import type { UIField } from '../../packages/payload/src/fields/config/types'
|
||||||
|
|
||||||
import { useAuth } from '../../packages/payload/src/admin/components/utilities/Auth'
|
import { useAuth } from '../../packages/ui'
|
||||||
|
|
||||||
export const AuthDebug: React.FC<UIField> = () => {
|
export const AuthDebug: React.FC<UIField> = () => {
|
||||||
const [state, setState] = useState<User | null | undefined>()
|
const [state, setState] = useState<User | null | undefined>()
|
||||||
|
|||||||
Reference in New Issue
Block a user