Compare commits
142 Commits
db-postgre
...
db-postgre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6afee662b | ||
|
|
0fc62446b8 | ||
|
|
823fde07c3 | ||
|
|
fe35b7d32c | ||
|
|
3b45b0d085 | ||
|
|
e10d5df0b2 | ||
|
|
3023118b71 | ||
|
|
80375d1798 | ||
|
|
589b492b2e | ||
|
|
bdeef377ea | ||
|
|
b76c5c8c11 | ||
|
|
58c9fecbae | ||
|
|
e88de5db60 | ||
|
|
ce75fab4fc | ||
|
|
5b57f1411a | ||
|
|
11ff2042f3 | ||
|
|
8f9481f8a7 | ||
|
|
5de32b2534 | ||
|
|
dbcffc688f | ||
|
|
17cf179d16 | ||
|
|
1dc86aa6e6 | ||
|
|
d8e0824547 | ||
|
|
1453547e35 | ||
|
|
4c6874449a | ||
|
|
332c9b3a98 | ||
|
|
73544b5b5e | ||
|
|
e03302160a | ||
|
|
edb530fc64 | ||
|
|
064b4baed8 | ||
|
|
4cb8259b8b | ||
|
|
34b2451b3b | ||
|
|
29ccd06553 | ||
|
|
a5971c12b3 | ||
|
|
0900baf8f9 | ||
|
|
d1a9a3e4d5 | ||
|
|
d27a33dc1d | ||
|
|
d01c586a90 | ||
|
|
caa0d7cf0d | ||
|
|
c40b5a1784 | ||
|
|
b0869ea0ed | ||
|
|
00faebed4b | ||
|
|
638a35a2e7 | ||
|
|
44bca2ed36 | ||
|
|
fa90cec758 | ||
|
|
2164dcc594 | ||
|
|
a3ae416085 | ||
|
|
02d2c51717 | ||
|
|
b3503e3dce | ||
|
|
2e5400fa7a | ||
|
|
48dc116f57 | ||
|
|
9b2ba7cc0e | ||
|
|
916923071a | ||
|
|
3ceb6efd32 | ||
|
|
8184e0005a | ||
|
|
1c0d43c61a | ||
|
|
0eb7b44735 | ||
|
|
c038acb3a4 | ||
|
|
f8c2ccf6b1 | ||
|
|
e6092fd36c | ||
|
|
e0eae77758 | ||
|
|
0780ff22bb | ||
|
|
e7f6bfbe9d | ||
|
|
23df60dba5 | ||
|
|
8919b86571 | ||
|
|
8104fac5ed | ||
|
|
59ef1263a5 | ||
|
|
813e3dbc98 | ||
|
|
12a23092e1 | ||
|
|
4a49beb552 | ||
|
|
80530c666e | ||
|
|
f53e2df951 | ||
|
|
db58e2bab2 | ||
|
|
d88e97e123 | ||
|
|
bb72e506e6 | ||
|
|
b1f727fd6a | ||
|
|
72af18229b | ||
|
|
af52b526c8 | ||
|
|
60525623bf | ||
|
|
0fba582926 | ||
|
|
5d1cad3adb | ||
|
|
e31f72da8e | ||
|
|
7aa058d604 | ||
|
|
64e80d242e | ||
|
|
e8f2ca484e | ||
|
|
ceca5c4e97 | ||
|
|
ee13736288 | ||
|
|
815bdfac0b | ||
|
|
7a7f0ed7e8 | ||
|
|
ad42d541b3 | ||
|
|
32ed95e1ee | ||
|
|
70e57fef18 | ||
|
|
0a07f607b9 | ||
|
|
3918fc7c21 | ||
|
|
13f71ac475 | ||
|
|
07720e777a | ||
|
|
efff47e400 | ||
|
|
453ac218ea | ||
|
|
d4b09bd9cd | ||
|
|
dd67e03fc1 | ||
|
|
548de80bee | ||
|
|
2c05fbbb5e | ||
|
|
9b54659818 | ||
|
|
e9f550406e | ||
|
|
98b87e2278 | ||
|
|
5f3d0169be | ||
|
|
35c2a085ef | ||
|
|
1ac943ed5e | ||
|
|
25cee8bb10 | ||
|
|
419aef452d | ||
|
|
ea52489126 | ||
|
|
e80c70acae | ||
|
|
70b0064d0b | ||
|
|
9636bf6efd | ||
|
|
8f4d0da4e0 | ||
|
|
f0f1dbdcb0 | ||
|
|
a895aee8b1 | ||
|
|
aa1dac08c1 | ||
|
|
b8cd1c6ba4 | ||
|
|
6344464bc6 | ||
|
|
5d4022f144 | ||
|
|
bf942fdfa6 | ||
|
|
d6c25783cf | ||
|
|
82e9d31127 | ||
|
|
399e606b34 | ||
|
|
0d18822062 | ||
|
|
00fc0343da | ||
|
|
6323965c65 | ||
|
|
6d6823c3e5 | ||
|
|
ca70298436 | ||
|
|
4f565759f6 | ||
|
|
df39602758 | ||
|
|
6ea6172afa | ||
|
|
486774796d | ||
|
|
1cd1c38764 | ||
|
|
f6d7da7510 | ||
|
|
cdc4cb971b | ||
|
|
e0191b54e1 | ||
|
|
2315781f18 | ||
|
|
a0a58e7fd2 | ||
|
|
e1813fb884 | ||
|
|
da184d40ec | ||
|
|
ca8675f89d |
66
.github/workflows/main.yml
vendored
66
.github/workflows/main.yml
vendored
@@ -2,9 +2,9 @@ name: build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, reopened, synchronize]
|
types: [ opened, reopened, synchronize ]
|
||||||
push:
|
push:
|
||||||
branches: ['main']
|
branches: [ 'main' ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
changes:
|
changes:
|
||||||
@@ -15,25 +15,25 @@ jobs:
|
|||||||
needs_build: ${{ steps.filter.outputs.needs_build }}
|
needs_build: ${{ steps.filter.outputs.needs_build }}
|
||||||
templates: ${{ steps.filter.outputs.templates }}
|
templates: ${{ steps.filter.outputs.templates }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 25
|
fetch-depth: 25
|
||||||
- uses: dorny/paths-filter@v2
|
- uses: dorny/paths-filter@v2
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
filters: |
|
filters: |
|
||||||
needs_build:
|
needs_build:
|
||||||
- '.github/workflows/**'
|
- '.github/workflows/**'
|
||||||
- 'packages/**'
|
- 'packages/**'
|
||||||
- 'test/**'
|
- 'test/**'
|
||||||
- 'pnpm-lock.yaml'
|
- 'pnpm-lock.yaml'
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
templates:
|
templates:
|
||||||
- 'templates/**'
|
- 'templates/**'
|
||||||
- name: Log all filter results
|
- name: Log all filter results
|
||||||
run: |
|
run: |
|
||||||
echo "needs_build: ${{ steps.filter.outputs.needs_build }}"
|
echo "needs_build: ${{ steps.filter.outputs.needs_build }}"
|
||||||
echo "templates: ${{ steps.filter.outputs.templates }}"
|
echo "templates: ${{ steps.filter.outputs.templates }}"
|
||||||
|
|
||||||
core-build:
|
core-build:
|
||||||
needs: changes
|
needs: changes
|
||||||
@@ -85,11 +85,15 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
database: [mongoose, postgres, supabase]
|
database: [mongoose, postgres, postgres-custom-schema, postgres-uuid, supabase]
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
POSTGRES_DB: payloadtests
|
POSTGRES_DB: payloadtests
|
||||||
|
AWS_ENDPOINT_URL: http://127.0.0.1:4566
|
||||||
|
AWS_ACCESS_KEY_ID: localstack
|
||||||
|
AWS_SECRET_ACCESS_KEY: localstack
|
||||||
|
AWS_REGION: us-east-1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Use Node.js 18
|
- name: Use Node.js 18
|
||||||
@@ -109,6 +113,9 @@ jobs:
|
|||||||
path: ./*
|
path: ./*
|
||||||
key: ${{ github.sha }}-${{ github.run_number }}
|
key: ${{ github.sha }}-${{ github.run_number }}
|
||||||
|
|
||||||
|
- name: Start LocalStack
|
||||||
|
run: pnpm docker:start
|
||||||
|
|
||||||
- name: Start PostgreSQL
|
- name: Start PostgreSQL
|
||||||
uses: CasperWA/postgresql-action@v1.2
|
uses: CasperWA/postgresql-action@v1.2
|
||||||
with:
|
with:
|
||||||
@@ -116,7 +123,7 @@ jobs:
|
|||||||
postgresql db: ${{ env.POSTGRES_DB }}
|
postgresql db: ${{ env.POSTGRES_DB }}
|
||||||
postgresql user: ${{ env.POSTGRES_USER }}
|
postgresql user: ${{ env.POSTGRES_USER }}
|
||||||
postgresql password: ${{ env.POSTGRES_PASSWORD }}
|
postgresql password: ${{ env.POSTGRES_PASSWORD }}
|
||||||
if: matrix.database == 'postgres'
|
if: startsWith(matrix.database, 'postgres')
|
||||||
|
|
||||||
- name: Install Supabase CLI
|
- name: Install Supabase CLI
|
||||||
uses: supabase/setup-cli@v1
|
uses: supabase/setup-cli@v1
|
||||||
@@ -132,14 +139,19 @@ jobs:
|
|||||||
|
|
||||||
- name: Wait for PostgreSQL
|
- name: Wait for PostgreSQL
|
||||||
run: sleep 30
|
run: sleep 30
|
||||||
if: matrix.database == 'postgres'
|
if: startsWith(matrix.database, 'postgres')
|
||||||
|
|
||||||
- name: Configure PostgreSQL
|
- name: Configure PostgreSQL
|
||||||
run: |
|
run: |
|
||||||
psql "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "CREATE ROLE runner SUPERUSER LOGIN;"
|
psql "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "CREATE ROLE runner SUPERUSER LOGIN;"
|
||||||
psql "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "SELECT version();"
|
psql "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "SELECT version();"
|
||||||
echo "POSTGRES_URL=postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" >> $GITHUB_ENV
|
echo "POSTGRES_URL=postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" >> $GITHUB_ENV
|
||||||
if: matrix.database == 'postgres'
|
if: startsWith(matrix.database, 'postgres')
|
||||||
|
|
||||||
|
- name: Configure PostgreSQL with custom schema
|
||||||
|
run: |
|
||||||
|
psql "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "CREATE SCHEMA custom;"
|
||||||
|
if: matrix.database == 'postgres-custom-schema'
|
||||||
|
|
||||||
- name: Configure Supabase
|
- name: Configure Supabase
|
||||||
run: |
|
run: |
|
||||||
@@ -162,7 +174,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
part: [1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8, 8/8]
|
part: [ 1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8, 8/8 ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Use Node.js 18
|
- name: Use Node.js 18
|
||||||
@@ -310,7 +322,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
template: [blank, website, ecommerce]
|
template: [ blank, website, ecommerce ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -6,7 +6,9 @@ dist
|
|||||||
|
|
||||||
test-results
|
test-results
|
||||||
.devcontainer
|
.devcontainer
|
||||||
|
.localstack
|
||||||
/migrations
|
/migrations
|
||||||
|
.localstack
|
||||||
|
|
||||||
# Created by https://www.toptal.com/developers/gitignore/api/node,macos,windows,webstorm,sublimetext,visualstudiocode
|
# Created by https://www.toptal.com/developers/gitignore/api/node,macos,windows,webstorm,sublimetext,visualstudiocode
|
||||||
# Edit at https://www.toptal.com/developers/gitignore?templates=node,macos,windows,webstorm,sublimetext,visualstudiocode
|
# Edit at https://www.toptal.com/developers/gitignore?templates=node,macos,windows,webstorm,sublimetext,visualstudiocode
|
||||||
|
|||||||
2
.idea/runConfigurations/Run_Dev_Fields.xml
generated
2
.idea/runConfigurations/Run_Dev_Fields.xml
generated
@@ -1,5 +1,5 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Run Dev Fields" type="NodeJSConfigurationType" application-parameters="fields" path-to-js-file="node_modules/.pnpm/nodemon@3.0.1/node_modules/nodemon/bin/nodemon.js" working-dir="$PROJECT_DIR$">
|
<configuration default="false" name="Run Dev Fields" type="NodeJSConfigurationType" application-parameters="fields" path-to-js-file="node_modules/.pnpm/nodemon@3.0.3/node_modules/nodemon/bin/nodemon.js" working-dir="$PROJECT_DIR$">
|
||||||
<method v="2" />
|
<method v="2" />
|
||||||
</configuration>
|
</configuration>
|
||||||
</component>
|
</component>
|
||||||
2
.idea/runConfigurations/Run_Dev__community.xml
generated
2
.idea/runConfigurations/Run_Dev__community.xml
generated
@@ -1,5 +1,5 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Run Dev _community" type="NodeJSConfigurationType" application-parameters="_community" path-to-js-file="node_modules/.pnpm/nodemon@3.0.1/node_modules/nodemon/bin/nodemon.js" working-dir="$PROJECT_DIR$">
|
<configuration default="false" name="Run Dev _community" type="NodeJSConfigurationType" application-parameters="_community" path-to-js-file="node_modules/.pnpm/nodemon@3.0.3/node_modules/nodemon/bin/nodemon.js" working-dir="$PROJECT_DIR$">
|
||||||
<method v="2" />
|
<method v="2" />
|
||||||
</configuration>
|
</configuration>
|
||||||
</component>
|
</component>
|
||||||
90
CHANGELOG.md
90
CHANGELOG.md
@@ -1,3 +1,93 @@
|
|||||||
|
## [2.12.0](https://github.com/payloadcms/payload/compare/v2.11.2...v2.12.0) (2024-04-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **plugin-seo:** adds Norwegian translation ([#5621](https://github.com/payloadcms/payload/issues/5621)) ([589b492](https://github.com/payloadcms/payload/commit/589b492b2e6bc578e6f17649ff6d936ffd88b8b5))
|
||||||
|
* **richtext-*:** add ability to provide custom Field and Error components ([#5574](https://github.com/payloadcms/payload/issues/5574)) ([02d2c51](https://github.com/payloadcms/payload/commit/02d2c517176a775c6eeb4b164d9e6b45d8f5e4c1))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **db-postgres:** error on delete having joins ([#5459](https://github.com/payloadcms/payload/issues/5459)) ([9169230](https://github.com/payloadcms/payload/commit/916923071a2c28077326bfd2059d1665ef47e94f))
|
||||||
|
* image resize tiff files ([#5415](https://github.com/payloadcms/payload/issues/5415)) ([8184e00](https://github.com/payloadcms/payload/commit/8184e0005af1b6da93d0921c31547515a4ce6343))
|
||||||
|
* number field with hasMany accept defaultValue array ([#5618](https://github.com/payloadcms/payload/issues/5618)) ([a3ae416](https://github.com/payloadcms/payload/commit/a3ae4160850290c194bb228e1fbeb8c7533cead3))
|
||||||
|
* regression of filterOptions using different transaction ([#5169](https://github.com/payloadcms/payload/issues/5169)) ([3ceb6ef](https://github.com/payloadcms/payload/commit/3ceb6efd32cfa9556c6656469fa43d61d7679b1d))
|
||||||
|
* **richtext-lexical:** Blocks: generated output schema is not fully correct ([#5259](https://github.com/payloadcms/payload/issues/5259)) ([e7f6bfb](https://github.com/payloadcms/payload/commit/e7f6bfbe9da4cab42c7ec7019371d5e79af17ec9))
|
||||||
|
* **richtext-lexical:** checklist html converter incorrectly outputting children ([#5570](https://github.com/payloadcms/payload/issues/5570)) ([2e5400f](https://github.com/payloadcms/payload/commit/2e5400fa7a5ac7441e00134a7f4299022228f64f))
|
||||||
|
* **richtext-lexical:** disable instanceof HTMLImageElement check as it causes issues when used on the server ([2164dcc](https://github.com/payloadcms/payload/commit/2164dcc594b5c16d7111b71cdb01f5f7aaa7e127))
|
||||||
|
* **richtext-lexical:** Link: add open-in-new-tab to html converter ([23df60d](https://github.com/payloadcms/payload/commit/23df60dba5682255ce6f60e3ee8e6901f6a70c7b))
|
||||||
|
* **richtext-lexical:** properly center add- and drag-block handles ([#5568](https://github.com/payloadcms/payload/issues/5568)) ([48dc116](https://github.com/payloadcms/payload/commit/48dc116f57113c3124ff93a50fa1189053e21d76))
|
||||||
|
* sets beforeValidateHook req type to required ([#5608](https://github.com/payloadcms/payload/issues/5608)) ([e10d5df](https://github.com/payloadcms/payload/commit/e10d5df0b2dd21b86cce44d0e36b31e9d3411b39))
|
||||||
|
|
||||||
|
## [2.11.2](https://github.com/payloadcms/payload/compare/v2.11.1...v2.11.2) (2024-02-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **db-postgres:** configurable custom schema to use ([#5047](https://github.com/payloadcms/payload/issues/5047)) ([e8f2ca4](https://github.com/payloadcms/payload/commit/e8f2ca484ee56cd7767d5111e46ebd24752ff8de))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Add Context Provider in EditMany Component ([#5005](https://github.com/payloadcms/payload/issues/5005)) ([70e57fe](https://github.com/payloadcms/payload/commit/70e57fef184f7fcf56344ea755465f246f2253a5))
|
||||||
|
* **db-mongodb:** unique sparse for not required fields ([#5114](https://github.com/payloadcms/payload/issues/5114)) ([815bdfa](https://github.com/payloadcms/payload/commit/815bdfac0b0afbff2a20e54d5aee64b90f6b3a77))
|
||||||
|
* **db-postgres:** set _parentID for array nested localized fields ([#5117](https://github.com/payloadcms/payload/issues/5117)) ([ceca5c4](https://github.com/payloadcms/payload/commit/ceca5c4e97f53f1346797a31b6abfc0375e98215))
|
||||||
|
* disabling API Key does not remove the key ([#5145](https://github.com/payloadcms/payload/issues/5145)) ([7a7f0ed](https://github.com/payloadcms/payload/commit/7a7f0ed7e8132253be607c111c160163b84bd770))
|
||||||
|
* handle thrown errors in config-level afterError hook ([#5147](https://github.com/payloadcms/payload/issues/5147)) ([32ed95e](https://github.com/payloadcms/payload/commit/32ed95e1ee87409db234f1b7bd6d2e462fd9ed5d))
|
||||||
|
* only replace the drawer content with full edit component if it exists ([#5144](https://github.com/payloadcms/payload/issues/5144)) ([0a07f60](https://github.com/payloadcms/payload/commit/0a07f607b9fb1217ad956cd05b2a84a4042a19ca))
|
||||||
|
* transaction error from access endpoint ([#5156](https://github.com/payloadcms/payload/issues/5156)) ([ad42d54](https://github.com/payloadcms/payload/commit/ad42d541b342ed56463b81cee6d6307df6f06d7f))
|
||||||
|
|
||||||
|
## [2.11.1](https://github.com/payloadcms/payload/compare/v2.11.0...v2.11.1) (2024-02-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **db-postgres:** adds idType to use uuid or serial id columns ([#3864](https://github.com/payloadcms/payload/issues/3864)) ([d6c2578](https://github.com/payloadcms/payload/commit/d6c25783cfa97983bf9db27ceb5ccd39a62c62f1))
|
||||||
|
* **db-postgres:** reconnect after disconnection from database ([#5086](https://github.com/payloadcms/payload/issues/5086)) ([bf942fd](https://github.com/payloadcms/payload/commit/bf942fdfa6ea9c26cf05295cc9db646bf31fa622))
|
||||||
|
* **plugin-search:** add req to beforeSync args for transactions ([#5068](https://github.com/payloadcms/payload/issues/5068)) ([98b87e2](https://github.com/payloadcms/payload/commit/98b87e22782c0a788f79326f22be05a6b176ad74))
|
||||||
|
* **richtext-lexical:** add justify aligment to AlignFeature ([#4035](https://github.com/payloadcms/payload/issues/4035)) ([#4868](https://github.com/payloadcms/payload/issues/4868)) ([6d6823c](https://github.com/payloadcms/payload/commit/6d6823c3e5609a58eeeeb8d043945a762f9463df))
|
||||||
|
* **richtext-lexical:** AddBlock handle for all nodes, even if they aren't empty paragraphs ([#5063](https://github.com/payloadcms/payload/issues/5063)) ([00fc034](https://github.com/payloadcms/payload/commit/00fc0343dabf184d5bab418d47c403b3ad11698f))
|
||||||
|
* **richtext-lexical:** Update lexical from 0.12.6 to 0.13.1, port over all useful changes from playground ([#5066](https://github.com/payloadcms/payload/issues/5066)) ([0d18822](https://github.com/payloadcms/payload/commit/0d18822062275c1826c8e2c3da2571a2b3483310))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **db-mongodb:** find versions pagination ([#5091](https://github.com/payloadcms/payload/issues/5091)) ([5d4022f](https://github.com/payloadcms/payload/commit/5d4022f1445e2809c01cb1dd599280f0a56cdc6e))
|
||||||
|
* **db-postgres:** query using blockType ([#5044](https://github.com/payloadcms/payload/issues/5044)) ([35c2a08](https://github.com/payloadcms/payload/commit/35c2a085efa6d5ad59779960874bc9728a17e3a0))
|
||||||
|
* filterOptions errors cause transaction to abort ([#5079](https://github.com/payloadcms/payload/issues/5079)) ([5f3d016](https://github.com/payloadcms/payload/commit/5f3d0169bee21e1c0963dbd7ede9fe5f1c46a5a5))
|
||||||
|
* **plugin-form-builder:** hooks do not respect transactions ([#5069](https://github.com/payloadcms/payload/issues/5069)) ([82e9d31](https://github.com/payloadcms/payload/commit/82e9d31127c8df83c5bed92a5ffdab76d331900f))
|
||||||
|
* remove collection findByID caching ([#5034](https://github.com/payloadcms/payload/issues/5034)) ([1ac943e](https://github.com/payloadcms/payload/commit/1ac943ed5e8416883b863147fdf3c23380955559))
|
||||||
|
* **richtext-lexical:** do not remove adjacent paragraph node when inserting certain nodes in empty editor ([#5061](https://github.com/payloadcms/payload/issues/5061)) ([6323965](https://github.com/payloadcms/payload/commit/6323965c652ea68dffeb716957b124d165b9ce96))
|
||||||
|
* **uploads:** account for serverURL when retrieving external file ([#5102](https://github.com/payloadcms/payload/issues/5102)) ([25cee8b](https://github.com/payloadcms/payload/commit/25cee8bb102bf80b3a4bfb4b4e46712722cc7f0d))
|
||||||
|
|
||||||
|
|
||||||
|
### ⚠ BREAKING CHANGES: @payloadcms/richtext-lexical
|
||||||
|
|
||||||
|
* **richtext-lexical:** Update lexical from 0.12.6 to 0.13.1, port over all useful changes from playground (#5066)
|
||||||
|
|
||||||
|
- You HAVE to make sure that any versions of the lexical packages (IF you have any installed) match the lexical version which richtext-lexical uses: v0.13.1. If you do not do this, you may be plagued by React useContext / "cannot find active editor state" errors
|
||||||
|
- Updates to lexical's API, e.g. the removal of INTERNAL_isPointSelection, could be breaking depending on your code. Please consult the [lexical changelog](https://github.com/facebook/lexical/blob/main/CHANGELOG.md).
|
||||||
|
|
||||||
|
## [2.11.0](https://github.com/payloadcms/payload/compare/v2.10.1...v2.11.0) (2024-02-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* exposes collapsible provider with more functionality ([#5043](https://github.com/payloadcms/payload/issues/5043)) ([df39602](https://github.com/payloadcms/payload/commit/df39602758ae8dc3765bb48e51f7a657babfa559))
|
||||||
|
|
||||||
|
## [2.10.1](https://github.com/payloadcms/payload/compare/v2.10.0...v2.10.1) (2024-02-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* clearable cells handle null values ([#5038](https://github.com/payloadcms/payload/issues/5038)) ([f6d7da7](https://github.com/payloadcms/payload/commit/f6d7da751039df25066b51bb91d6453e1a4efd82))
|
||||||
|
* **db-mongodb:** handle null values with exists ([#5037](https://github.com/payloadcms/payload/issues/5037)) ([cdc4cb9](https://github.com/payloadcms/payload/commit/cdc4cb971b9180ba2ed09741f5af1a3c18292828))
|
||||||
|
* **db-postgres:** handle nested docs with drafts ([#5012](https://github.com/payloadcms/payload/issues/5012)) ([da184d4](https://github.com/payloadcms/payload/commit/da184d40ece74bffb224002eb5df8f6987d65043))
|
||||||
|
* ensures docs with the same id are shown in relationship field select ([#4859](https://github.com/payloadcms/payload/issues/4859)) ([e1813fb](https://github.com/payloadcms/payload/commit/e1813fb884e0dc84203fcbab87527a99a4d3a5d7))
|
||||||
|
* query relationships by explicit id field ([#5022](https://github.com/payloadcms/payload/issues/5022)) ([a0a58e7](https://github.com/payloadcms/payload/commit/a0a58e7fd20dff54d210c968f4d5defd67441bdd))
|
||||||
|
* **richtext-lexical:** make editor reactive to initialValue changes ([#5010](https://github.com/payloadcms/payload/issues/5010)) ([2315781](https://github.com/payloadcms/payload/commit/2315781f1891ddde4b4c5f2f0cfa1c17af85b7a9))
|
||||||
|
|
||||||
## [2.10.0](https://github.com/payloadcms/payload/compare/v2.9.0...v2.10.0) (2024-02-06)
|
## [2.10.0](https://github.com/payloadcms/payload/compare/v2.9.0...v2.10.0) (2024-02-06)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -635,6 +635,37 @@ export const CustomArrayManager = () => {
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
### useCollapsible
|
||||||
|
|
||||||
|
The `useCollapsible` hook allows you to control parent collapsibles:
|
||||||
|
|
||||||
|
| Property | Description |
|
||||||
|
|---------------------------|--------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| **`collapsed`** | State of the collapsible. `true` if open, `false` if collapsed |
|
||||||
|
| **`isVisible`** | If nested, determine if the nearest collapsible is visible. `true` if no parent is closed, `false` otherwise |
|
||||||
|
| **`toggle`** | Toggles the state of the nearest collapsible |
|
||||||
|
| **`withinCollapsible`** | Determine when you are within another collaspible | |
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
import { useCollapsible } from 'payload/components/utilities'
|
||||||
|
|
||||||
|
const CustomComponent: React.FC = () => {
|
||||||
|
const { collapsed, toggle } = useCollapsible()
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<p className="field-type">I am {collapsed ? 'closed' : 'open'}</p>
|
||||||
|
<button onClick={toggle} type="button">
|
||||||
|
Toggle
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### useDocumentInfo
|
### useDocumentInfo
|
||||||
|
|
||||||
The `useDocumentInfo` hook provides lots of information about the document currently being edited, including the following:
|
The `useDocumentInfo` hook provides lots of information about the document currently being edited, including the following:
|
||||||
|
|||||||
@@ -37,11 +37,12 @@ export default buildConfig({
|
|||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Description |
|
| Option | Description |
|
||||||
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| `pool` | [Pool connection options](https://orm.drizzle.team/docs/quick-postgresql/node-postgres) that will be passed to Drizzle and `node-postgres`. |
|
| `pool` | [Pool connection options](https://orm.drizzle.team/docs/quick-postgresql/node-postgres) that will be passed to Drizzle and `node-postgres`. |
|
||||||
| `push` | Disable Drizzle's [`db push`](https://orm.drizzle.team/kit-docs/overview#prototyping-with-db-push) in development mode. By default, `push` is enabled for development mode only. |
|
| `push` | Disable Drizzle's [`db push`](https://orm.drizzle.team/kit-docs/overview#prototyping-with-db-push) in development mode. By default, `push` is enabled for development mode only. |
|
||||||
| `migrationDir` | Customize the directory that migrations are stored. |
|
| `migrationDir` | Customize the directory that migrations are stored. |
|
||||||
|
| `schemaName` | A string for the postgres schema to use, defaults to 'public'. |
|
||||||
|
|
||||||
### Access to Drizzle
|
### Access to Drizzle
|
||||||
|
|
||||||
|
|||||||
@@ -292,13 +292,11 @@ For auth-enabled Collections, this hook runs after successful `forgotPassword` o
|
|||||||
```ts
|
```ts
|
||||||
import { CollectionAfterForgotPasswordHook } from 'payload/types'
|
import { CollectionAfterForgotPasswordHook } from 'payload/types'
|
||||||
|
|
||||||
const afterLoginHook: CollectionAfterForgotPasswordHook = async ({
|
const afterForgotPasswordHook: CollectionAfterForgotPasswordHook = async ({
|
||||||
req, // full express request
|
args, // arguments passed into the operation
|
||||||
user, // user being logged in
|
context,
|
||||||
token, // user token
|
collection, // The collection which this hook is being run on
|
||||||
}) => {
|
}) => {...}
|
||||||
return user
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## TypeScript
|
## TypeScript
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ import { GlobalAfterChangeHook } from 'payload/types'
|
|||||||
|
|
||||||
const afterChangeHook: GlobalAfterChangeHook = async ({
|
const afterChangeHook: GlobalAfterChangeHook = async ({
|
||||||
doc, // full document data
|
doc, // full document data
|
||||||
previousDoc, // document data before updating the collection
|
previousDoc, // document data before updating the global
|
||||||
req, // full express request
|
req, // full express request
|
||||||
}) => {
|
}) => {
|
||||||
return data
|
return data
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ If your Hook simply performs a side-effect, such as updating a CRM, it might be
|
|||||||
|
|
||||||
#### Server-only execution
|
#### Server-only execution
|
||||||
|
|
||||||
Payload Hooks do not have any effect within the Payload Admin panel. You can safely [remove your hooks](/docs/admin/webpack#aliasing-server-only-modules) from your Admin panel's code by customizing the Webpack config, which not only keeps your Admin bundles' filesize small but also ensures that any server-side only code does not cause problems within browser environments.
|
Payload Hooks are only triggered on the server. You can safely [remove your hooks](/docs/admin/webpack#aliasing-server-only-modules) from your Admin panel's client-side code by customizing the Webpack config, which not only keeps your Admin bundles' filesize small but also ensures that any server-side only code does not cause problems within browser environments.
|
||||||
|
|
||||||
## Hook Types
|
## Hook Types
|
||||||
|
|
||||||
|
|||||||
@@ -290,5 +290,5 @@ If you've configured tests for your package, integrate them into your workf
|
|||||||
The best way to share and allow others to use your plugin once it is complete is to publish an NPM package. This process is straightforward and well documented, find out more about [creating and publishing a NPM package here](https://docs.npmjs.com/creating-and-publishing-scoped-public-packages/).
|
The best way to share and allow others to use your plugin once it is complete is to publish an NPM package. This process is straightforward and well documented, find out more about [creating and publishing a NPM package here](https://docs.npmjs.com/creating-and-publishing-scoped-public-packages/).
|
||||||
##### Add payload-plugin topic tag:
|
##### Add payload-plugin topic tag:
|
||||||
Apply the tag **payload-plugin** to your GitHub repository. This will boost the visibility of your plugin and ensure it gets listed with [existing payload plugins](https://github.com/topics/payload-plugin).
|
Apply the tag **payload-plugin** to your GitHub repository. This will boost the visibility of your plugin and ensure it gets listed with [existing payload plugins](https://github.com/topics/payload-plugin).
|
||||||
##### Use [Semantic Versioning](https://semver.org/) (SemVar):
|
##### Use [Semantic Versioning](https://semver.org/) (SemVer):
|
||||||
With the SemVar system you release version numbers that reflect the nature of changes (major, minor, patch). Ensure all major versions reference their Payload compatibility.
|
With the SemVer system you release version numbers that reflect the nature of changes (major, minor, patch). Ensure all major versions reference their Payload compatibility.
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ formBuilder({
|
|||||||
|
|
||||||
#### `beforeEmail`
|
#### `beforeEmail`
|
||||||
|
|
||||||
The `beforeEmail` property is a [beforeChange](<[beforeChange](https://payloadcms.com/docs/hooks/globals#beforechange)>) hook that is called just after emails are prepared, but before they are sent. This is a great place to inject your own HTML template to add custom styles.
|
The `beforeEmail` property is a [beforeChange](https://payloadcms.com/docs/hooks/globals#beforechange) hook that is called just after emails are prepared, but before they are sent. This is a great place to inject your own HTML template to add custom styles.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
// payload.config.ts
|
// payload.config.ts
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ const examplePageConfig: CollectionConfig = {
|
|||||||
|
|
||||||
This plugin supports localization by default. If the `localization` property is set in your Payload config,
|
This plugin supports localization by default. If the `localization` property is set in your Payload config,
|
||||||
the `breadcrumbs` field is automatically localized. For more details on how localization works in Payload, see
|
the `breadcrumbs` field is automatically localized. For more details on how localization works in Payload, see
|
||||||
the [Localization](https://payloadcms.com/docs/localization/overview) docs.
|
the [Localization](https://payloadcms.com/docs/configuration/localization) docs.
|
||||||
|
|
||||||
## TypeScript
|
## TypeScript
|
||||||
|
|
||||||
@@ -235,5 +235,5 @@ official [Nested Docs Plugin Example](https://github.com/payloadcms/payload/tree
|
|||||||
demonstrates exactly how to configure this plugin in Payload and implement it on your front-end.
|
demonstrates exactly how to configure this plugin in Payload and implement it on your front-end.
|
||||||
The [Templates Directory](https://github.com/payloadcms/payload/tree/main/templates) also contains an
|
The [Templates Directory](https://github.com/payloadcms/payload/tree/main/templates) also contains an
|
||||||
official [Website Template](https://github.com/payloadcms/payload/tree/main/templates/website)
|
official [Website Template](https://github.com/payloadcms/payload/tree/main/templates/website)
|
||||||
and [E-commerce Template](https://github.com/payloadcms/payload/tree/main/templates/ecommere), both of which use this
|
and [E-commerce Template](https://github.com/payloadcms/payload/tree/main/templates/ecommerce), both of which use this
|
||||||
plugin.
|
plugin.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ This plugin allows you to easily manage redirects for your application from with
|
|||||||
For example, if you have a page at `/about` and you want to change it to `/about-us`, you can create a redirect from the old page to the new one, then you can use this data to write HTTP redirects into your front-end application. This will ensure that users are redirected to the correct page without penalty because search engines are notified of the change at the request level. This is a very lightweight plugin that will allow you to integrate managed redirects for any front-end framework.
|
For example, if you have a page at `/about` and you want to change it to `/about-us`, you can create a redirect from the old page to the new one, then you can use this data to write HTTP redirects into your front-end application. This will ensure that users are redirected to the correct page without penalty because search engines are notified of the change at the request level. This is a very lightweight plugin that will allow you to integrate managed redirects for any front-end framework.
|
||||||
|
|
||||||
<Banner type="info">
|
<Banner type="info">
|
||||||
This plugin is completely open-source and the [source code can be found here](https://github.com/payloadcms/payload/tree/main/packages/plugin-redirects). If you need help, check out our [Community Help](https://payloadcms.com/community-help). If you think you've found a bug, please [open a new issue](https://github.com/payloadcms/payload/issues/new?assignees=&labels=plugin%3A%redirects&template=bug_report.md&title=plugin-redirects%3A) with as much detail as possible.
|
This plugin is completely open-source and the [source code can be found here](https://github.com/payloadcms/payload/tree/main/packages/plugin-redirects). If you need help, check out our [Community Help](https://payloadcms.com/community-help). If you think you've found a bug, please [open a new issue](https://github.com/payloadcms/payload/issues/new?assignees=&labels=plugin%3A%25redirects&template=bug_report.md&title=plugin-redirects%3A) with as much detail as possible.
|
||||||
</Banner>
|
</Banner>
|
||||||
|
|
||||||
##### Core features
|
##### Core features
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ This plugin automatically creates the `search` collection, but you can override
|
|||||||
|
|
||||||
#### `beforeSync`
|
#### `beforeSync`
|
||||||
|
|
||||||
Before creating or updating a search record, the `beforeSync` function runs. This is an [afterChange](<[afterChange](https://payloadcms.com/docs/hooks/globals#afterchange)>) hook that allows you to modify the data or provide fallbacks before its search record is created or updated.
|
Before creating or updating a search record, the `beforeSync` function runs. This is an [afterChange](https://payloadcms.com/docs/hooks/globals#afterchange) hook that allows you to modify the data or provide fallbacks before its search record is created or updated.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
// payload.config.ts
|
// payload.config.ts
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ import {
|
|||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
The [Templates Directory](https://github.com/payloadcms/payload/tree/main/templates) contains an official [Website Template](https://github.com/payloadcms/payload/tree/main/templates/website) and [E-commerce Template](https://github.com/payloadcms/payload/tree/main/templates/ecommere) which demonstrates exactly how to configure this plugin in Payload and implement it on your front-end.
|
The [Templates Directory](https://github.com/payloadcms/payload/tree/main/templates) contains an official [Website Template](https://github.com/payloadcms/payload/tree/main/templates/website) and [E-commerce Template](https://github.com/payloadcms/payload/tree/main/templates/ecommerce) which demonstrates exactly how to configure this plugin in Payload and implement it on your front-end.
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ To prevent DDoS, brute-force, and similar attacks, you can set IP-based rate lim
|
|||||||
|
|
||||||
| Option | Description |
|
| Option | Description |
|
||||||
| ---------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
| ---------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||||
| **`window`** | Time in milliseconds to track requests per IP. Defaults to `90000` (15 minutes). |
|
| **`window`** | Time in milliseconds to track requests per IP. Defaults to `900000` (15 minutes). |
|
||||||
| **`max`** | Number of requests served from a single IP before limiting. Defaults to `500`. |
|
| **`max`** | Number of requests served from a single IP before limiting. Defaults to `500`. |
|
||||||
| **`skip`** | Express middleware function that can return true (or promise resulting in true) that will bypass limit. |
|
| **`skip`** | Express middleware function that can return true (or promise resulting in true) that will bypass limit. |
|
||||||
| **`trustProxy`** | True or false, to enable to allow requests to pass through a proxy such as a load balancer or an `nginx` reverse proxy. |
|
| **`trustProxy`** | True or false, to enable to allow requests to pass through a proxy such as a load balancer or an `nginx` reverse proxy. |
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ Next, take a look at the [features we've already built](https://github.com/paylo
|
|||||||
Lexical saves data in JSON, but can also generate its HTML representation via two main methods:
|
Lexical saves data in JSON, but can also generate its HTML representation via two main methods:
|
||||||
|
|
||||||
1. **Outputting HTML from the Collection:** Create a new field in your collection to convert saved JSON content to HTML. Payload generates and outputs the HTML for use in your frontend.
|
1. **Outputting HTML from the Collection:** Create a new field in your collection to convert saved JSON content to HTML. Payload generates and outputs the HTML for use in your frontend.
|
||||||
2. **Generating HTML on the Frontend:** Convert JSON to HTML on-demand, either in your frontend or elsewhere.
|
2. **Generating HTML on any server** Convert JSON to HTML on-demand on the server.
|
||||||
|
|
||||||
The editor comes with built-in HTML serializers, simplifying the process of converting JSON to HTML.
|
The editor comes with built-in HTML serializers, simplifying the process of converting JSON to HTML.
|
||||||
|
|
||||||
@@ -213,7 +213,7 @@ const Pages: CollectionConfig = {
|
|||||||
```
|
```
|
||||||
The `lexicalHTML()` function creates a new field that automatically converts the referenced lexical richText field into HTML through an afterRead hook.
|
The `lexicalHTML()` function creates a new field that automatically converts the referenced lexical richText field into HTML through an afterRead hook.
|
||||||
|
|
||||||
#### Generating HTML in the Frontend:
|
#### Generating HTML anywhere on the server:
|
||||||
|
|
||||||
If you wish to convert JSON to HTML ad-hoc, use this code snippet:
|
If you wish to convert JSON to HTML ad-hoc, use this code snippet:
|
||||||
|
|
||||||
|
|||||||
@@ -168,7 +168,9 @@ Specifying custom `Type`s let you extend your custom elements by adding addition
|
|||||||
`collections/ExampleCollection.ts`
|
`collections/ExampleCollection.ts`
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { CollectionConfig } from 'payload/types'
|
import type { CollectionConfig } from 'payload/types'
|
||||||
|
|
||||||
|
import { slateEditor } from '@payloadcms/richtext-slate'
|
||||||
|
|
||||||
export const ExampleCollection: CollectionConfig = {
|
export const ExampleCollection: CollectionConfig = {
|
||||||
slug: 'example-collection',
|
slug: 'example-collection',
|
||||||
@@ -182,57 +184,59 @@ export const ExampleCollection: CollectionConfig = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
required: true,
|
required: true,
|
||||||
admin: {
|
editor: slateEditor({
|
||||||
elements: [
|
admin: {
|
||||||
'h2',
|
elements: [
|
||||||
'h3',
|
'h2',
|
||||||
'h4',
|
'h3',
|
||||||
'link',
|
'h4',
|
||||||
'blockquote',
|
'link',
|
||||||
{
|
'blockquote',
|
||||||
name: 'cta',
|
|
||||||
Button: CustomCallToActionButton,
|
|
||||||
Element: CustomCallToActionElement,
|
|
||||||
plugins: [
|
|
||||||
// any plugins that are required by this element go here
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
leaves: [
|
|
||||||
'bold',
|
|
||||||
'italic',
|
|
||||||
{
|
|
||||||
name: 'highlight',
|
|
||||||
Button: CustomHighlightButton,
|
|
||||||
Leaf: CustomHighlightLeaf,
|
|
||||||
plugins: [
|
|
||||||
// any plugins that are required by this leaf go here
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
link: {
|
|
||||||
// Inject your own fields into the Link element
|
|
||||||
fields: [
|
|
||||||
{
|
{
|
||||||
name: 'rel',
|
name: 'cta',
|
||||||
label: 'Rel Attribute',
|
Button: CustomCallToActionButton,
|
||||||
type: 'select',
|
Element: CustomCallToActionElement,
|
||||||
hasMany: true,
|
plugins: [
|
||||||
options: ['noopener', 'noreferrer', 'nofollow'],
|
// any plugins that are required by this element go here
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
upload: {
|
|
||||||
collections: {
|
|
||||||
media: {
|
|
||||||
fields: [
|
|
||||||
// any fields that you would like to save
|
|
||||||
// on an upload element in the `media` collection
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
],
|
||||||
|
leaves: [
|
||||||
|
'bold',
|
||||||
|
'italic',
|
||||||
|
{
|
||||||
|
name: 'highlight',
|
||||||
|
Button: CustomHighlightButton,
|
||||||
|
Leaf: CustomHighlightLeaf,
|
||||||
|
plugins: [
|
||||||
|
// any plugins that are required by this leaf go here
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
link: {
|
||||||
|
// Inject your own fields into the Link element
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'rel',
|
||||||
|
label: 'Rel Attribute',
|
||||||
|
type: 'select',
|
||||||
|
hasMany: true,
|
||||||
|
options: ['noopener', 'noreferrer', 'nofollow'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
upload: {
|
||||||
|
collections: {
|
||||||
|
media: {
|
||||||
|
fields: [
|
||||||
|
// any fields that you would like to save
|
||||||
|
// on an upload element in the `media` collection
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
}),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"@payloadcms/db-mongodb": "latest",
|
"@payloadcms/db-mongodb": "latest",
|
||||||
"@payloadcms/richtext-slate": "latest",
|
"@payloadcms/richtext-slate": "latest",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.19.2",
|
||||||
"payload": "latest"
|
"payload": "latest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -2810,6 +2810,11 @@ cookie@0.5.0:
|
|||||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
||||||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
||||||
|
|
||||||
|
cookie@0.6.0:
|
||||||
|
version "0.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
|
||||||
|
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
|
||||||
|
|
||||||
copyfiles@^2.4.1:
|
copyfiles@^2.4.1:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
||||||
@@ -3476,13 +3481,14 @@ es-to-primitive@^1.2.1:
|
|||||||
is-date-object "^1.0.1"
|
is-date-object "^1.0.1"
|
||||||
is-symbol "^1.0.2"
|
is-symbol "^1.0.2"
|
||||||
|
|
||||||
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
||||||
version "0.10.62"
|
version "0.10.64"
|
||||||
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5"
|
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714"
|
||||||
integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==
|
integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==
|
||||||
dependencies:
|
dependencies:
|
||||||
es6-iterator "^2.0.3"
|
es6-iterator "^2.0.3"
|
||||||
es6-symbol "^3.1.3"
|
es6-symbol "^3.1.3"
|
||||||
|
esniff "^2.0.1"
|
||||||
next-tick "^1.1.0"
|
next-tick "^1.1.0"
|
||||||
|
|
||||||
es6-iterator@^2.0.3:
|
es6-iterator@^2.0.3:
|
||||||
@@ -3663,6 +3669,16 @@ eslint@^8.19.0:
|
|||||||
strip-ansi "^6.0.1"
|
strip-ansi "^6.0.1"
|
||||||
text-table "^0.2.0"
|
text-table "^0.2.0"
|
||||||
|
|
||||||
|
esniff@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308"
|
||||||
|
integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==
|
||||||
|
dependencies:
|
||||||
|
d "^1.0.1"
|
||||||
|
es5-ext "^0.10.62"
|
||||||
|
event-emitter "^0.3.5"
|
||||||
|
type "^2.7.2"
|
||||||
|
|
||||||
espree@^9.6.0, espree@^9.6.1:
|
espree@^9.6.0, espree@^9.6.1:
|
||||||
version "9.6.1"
|
version "9.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
||||||
@@ -3748,7 +3764,7 @@ express-rate-limit@5.5.1:
|
|||||||
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
||||||
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
||||||
|
|
||||||
express@4.18.2, express@^4.17.1:
|
express@4.18.2:
|
||||||
version "4.18.2"
|
version "4.18.2"
|
||||||
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
||||||
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
||||||
@@ -3785,6 +3801,43 @@ express@4.18.2, express@^4.17.1:
|
|||||||
utils-merge "1.0.1"
|
utils-merge "1.0.1"
|
||||||
vary "~1.1.2"
|
vary "~1.1.2"
|
||||||
|
|
||||||
|
express@^4.19.2:
|
||||||
|
version "4.19.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465"
|
||||||
|
integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==
|
||||||
|
dependencies:
|
||||||
|
accepts "~1.3.8"
|
||||||
|
array-flatten "1.1.1"
|
||||||
|
body-parser "1.20.2"
|
||||||
|
content-disposition "0.5.4"
|
||||||
|
content-type "~1.0.4"
|
||||||
|
cookie "0.6.0"
|
||||||
|
cookie-signature "1.0.6"
|
||||||
|
debug "2.6.9"
|
||||||
|
depd "2.0.0"
|
||||||
|
encodeurl "~1.0.2"
|
||||||
|
escape-html "~1.0.3"
|
||||||
|
etag "~1.8.1"
|
||||||
|
finalhandler "1.2.0"
|
||||||
|
fresh "0.5.2"
|
||||||
|
http-errors "2.0.0"
|
||||||
|
merge-descriptors "1.0.1"
|
||||||
|
methods "~1.1.2"
|
||||||
|
on-finished "2.4.1"
|
||||||
|
parseurl "~1.3.3"
|
||||||
|
path-to-regexp "0.1.7"
|
||||||
|
proxy-addr "~2.0.7"
|
||||||
|
qs "6.11.0"
|
||||||
|
range-parser "~1.2.1"
|
||||||
|
safe-buffer "5.2.1"
|
||||||
|
send "0.18.0"
|
||||||
|
serve-static "1.15.0"
|
||||||
|
setprototypeof "1.2.0"
|
||||||
|
statuses "2.0.1"
|
||||||
|
type-is "~1.6.18"
|
||||||
|
utils-merge "1.0.1"
|
||||||
|
vary "~1.1.2"
|
||||||
|
|
||||||
ext@^1.1.2:
|
ext@^1.1.2:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
||||||
@@ -4508,9 +4561,9 @@ interpret@^2.2.0:
|
|||||||
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
||||||
|
|
||||||
ip@^2.0.0:
|
ip@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
|
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
|
||||||
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
|
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==
|
||||||
|
|
||||||
ipaddr.js@1.9.1:
|
ipaddr.js@1.9.1:
|
||||||
version "1.9.1"
|
version "1.9.1"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"@payloadcms/richtext-slate": "latest",
|
"@payloadcms/richtext-slate": "latest",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"escape-html": "^1.0.3",
|
"escape-html": "^1.0.3",
|
||||||
"express": "^4.17.1",
|
"express": "^4.19.2",
|
||||||
"next": "^13.4.8",
|
"next": "^13.4.8",
|
||||||
"payload": "latest",
|
"payload": "latest",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
|
|||||||
@@ -2963,6 +2963,11 @@ cookie@0.5.0:
|
|||||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
||||||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
||||||
|
|
||||||
|
cookie@0.6.0:
|
||||||
|
version "0.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
|
||||||
|
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
|
||||||
|
|
||||||
copyfiles@^2.4.1:
|
copyfiles@^2.4.1:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
||||||
@@ -3634,13 +3639,14 @@ es-to-primitive@^1.2.1:
|
|||||||
is-date-object "^1.0.1"
|
is-date-object "^1.0.1"
|
||||||
is-symbol "^1.0.2"
|
is-symbol "^1.0.2"
|
||||||
|
|
||||||
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
||||||
version "0.10.62"
|
version "0.10.64"
|
||||||
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5"
|
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714"
|
||||||
integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==
|
integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==
|
||||||
dependencies:
|
dependencies:
|
||||||
es6-iterator "^2.0.3"
|
es6-iterator "^2.0.3"
|
||||||
es6-symbol "^3.1.3"
|
es6-symbol "^3.1.3"
|
||||||
|
esniff "^2.0.1"
|
||||||
next-tick "^1.1.0"
|
next-tick "^1.1.0"
|
||||||
|
|
||||||
es6-iterator@^2.0.3:
|
es6-iterator@^2.0.3:
|
||||||
@@ -3822,6 +3828,16 @@ eslint@^8.19.0:
|
|||||||
strip-ansi "^6.0.1"
|
strip-ansi "^6.0.1"
|
||||||
text-table "^0.2.0"
|
text-table "^0.2.0"
|
||||||
|
|
||||||
|
esniff@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308"
|
||||||
|
integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==
|
||||||
|
dependencies:
|
||||||
|
d "^1.0.1"
|
||||||
|
es5-ext "^0.10.62"
|
||||||
|
event-emitter "^0.3.5"
|
||||||
|
type "^2.7.2"
|
||||||
|
|
||||||
espree@^9.6.0, espree@^9.6.1:
|
espree@^9.6.0, espree@^9.6.1:
|
||||||
version "9.6.1"
|
version "9.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
||||||
@@ -3907,7 +3923,7 @@ express-rate-limit@5.5.1:
|
|||||||
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
||||||
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
||||||
|
|
||||||
express@4.18.2, express@^4.17.1:
|
express@4.18.2:
|
||||||
version "4.18.2"
|
version "4.18.2"
|
||||||
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
||||||
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
||||||
@@ -3944,6 +3960,43 @@ express@4.18.2, express@^4.17.1:
|
|||||||
utils-merge "1.0.1"
|
utils-merge "1.0.1"
|
||||||
vary "~1.1.2"
|
vary "~1.1.2"
|
||||||
|
|
||||||
|
express@^4.19.2:
|
||||||
|
version "4.19.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465"
|
||||||
|
integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==
|
||||||
|
dependencies:
|
||||||
|
accepts "~1.3.8"
|
||||||
|
array-flatten "1.1.1"
|
||||||
|
body-parser "1.20.2"
|
||||||
|
content-disposition "0.5.4"
|
||||||
|
content-type "~1.0.4"
|
||||||
|
cookie "0.6.0"
|
||||||
|
cookie-signature "1.0.6"
|
||||||
|
debug "2.6.9"
|
||||||
|
depd "2.0.0"
|
||||||
|
encodeurl "~1.0.2"
|
||||||
|
escape-html "~1.0.3"
|
||||||
|
etag "~1.8.1"
|
||||||
|
finalhandler "1.2.0"
|
||||||
|
fresh "0.5.2"
|
||||||
|
http-errors "2.0.0"
|
||||||
|
merge-descriptors "1.0.1"
|
||||||
|
methods "~1.1.2"
|
||||||
|
on-finished "2.4.1"
|
||||||
|
parseurl "~1.3.3"
|
||||||
|
path-to-regexp "0.1.7"
|
||||||
|
proxy-addr "~2.0.7"
|
||||||
|
qs "6.11.0"
|
||||||
|
range-parser "~1.2.1"
|
||||||
|
safe-buffer "5.2.1"
|
||||||
|
send "0.18.0"
|
||||||
|
serve-static "1.15.0"
|
||||||
|
setprototypeof "1.2.0"
|
||||||
|
statuses "2.0.1"
|
||||||
|
type-is "~1.6.18"
|
||||||
|
utils-merge "1.0.1"
|
||||||
|
vary "~1.1.2"
|
||||||
|
|
||||||
ext@^1.1.2:
|
ext@^1.1.2:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
||||||
@@ -4701,9 +4754,9 @@ interpret@^2.2.0:
|
|||||||
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
||||||
|
|
||||||
ip@^2.0.0:
|
ip@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
|
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
|
||||||
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
|
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==
|
||||||
|
|
||||||
ipaddr.js@1.9.1:
|
ipaddr.js@1.9.1:
|
||||||
version "1.9.1"
|
version "1.9.1"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"@payloadcms/db-mongodb": "latest",
|
"@payloadcms/db-mongodb": "latest",
|
||||||
"@payloadcms/richtext-slate": "latest",
|
"@payloadcms/richtext-slate": "latest",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.19.2",
|
||||||
"payload": "latest"
|
"payload": "latest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -2810,6 +2810,11 @@ cookie@0.5.0:
|
|||||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
||||||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
||||||
|
|
||||||
|
cookie@0.6.0:
|
||||||
|
version "0.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
|
||||||
|
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
|
||||||
|
|
||||||
copyfiles@^2.4.1:
|
copyfiles@^2.4.1:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
||||||
@@ -3476,13 +3481,14 @@ es-to-primitive@^1.2.1:
|
|||||||
is-date-object "^1.0.1"
|
is-date-object "^1.0.1"
|
||||||
is-symbol "^1.0.2"
|
is-symbol "^1.0.2"
|
||||||
|
|
||||||
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
||||||
version "0.10.62"
|
version "0.10.64"
|
||||||
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5"
|
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714"
|
||||||
integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==
|
integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==
|
||||||
dependencies:
|
dependencies:
|
||||||
es6-iterator "^2.0.3"
|
es6-iterator "^2.0.3"
|
||||||
es6-symbol "^3.1.3"
|
es6-symbol "^3.1.3"
|
||||||
|
esniff "^2.0.1"
|
||||||
next-tick "^1.1.0"
|
next-tick "^1.1.0"
|
||||||
|
|
||||||
es6-iterator@^2.0.3:
|
es6-iterator@^2.0.3:
|
||||||
@@ -3663,6 +3669,16 @@ eslint@^8.19.0:
|
|||||||
strip-ansi "^6.0.1"
|
strip-ansi "^6.0.1"
|
||||||
text-table "^0.2.0"
|
text-table "^0.2.0"
|
||||||
|
|
||||||
|
esniff@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308"
|
||||||
|
integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==
|
||||||
|
dependencies:
|
||||||
|
d "^1.0.1"
|
||||||
|
es5-ext "^0.10.62"
|
||||||
|
event-emitter "^0.3.5"
|
||||||
|
type "^2.7.2"
|
||||||
|
|
||||||
espree@^9.6.0, espree@^9.6.1:
|
espree@^9.6.0, espree@^9.6.1:
|
||||||
version "9.6.1"
|
version "9.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
||||||
@@ -3748,7 +3764,7 @@ express-rate-limit@5.5.1:
|
|||||||
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
||||||
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
||||||
|
|
||||||
express@4.18.2, express@^4.17.1:
|
express@4.18.2:
|
||||||
version "4.18.2"
|
version "4.18.2"
|
||||||
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
||||||
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
||||||
@@ -3785,6 +3801,43 @@ express@4.18.2, express@^4.17.1:
|
|||||||
utils-merge "1.0.1"
|
utils-merge "1.0.1"
|
||||||
vary "~1.1.2"
|
vary "~1.1.2"
|
||||||
|
|
||||||
|
express@^4.19.2:
|
||||||
|
version "4.19.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465"
|
||||||
|
integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==
|
||||||
|
dependencies:
|
||||||
|
accepts "~1.3.8"
|
||||||
|
array-flatten "1.1.1"
|
||||||
|
body-parser "1.20.2"
|
||||||
|
content-disposition "0.5.4"
|
||||||
|
content-type "~1.0.4"
|
||||||
|
cookie "0.6.0"
|
||||||
|
cookie-signature "1.0.6"
|
||||||
|
debug "2.6.9"
|
||||||
|
depd "2.0.0"
|
||||||
|
encodeurl "~1.0.2"
|
||||||
|
escape-html "~1.0.3"
|
||||||
|
etag "~1.8.1"
|
||||||
|
finalhandler "1.2.0"
|
||||||
|
fresh "0.5.2"
|
||||||
|
http-errors "2.0.0"
|
||||||
|
merge-descriptors "1.0.1"
|
||||||
|
methods "~1.1.2"
|
||||||
|
on-finished "2.4.1"
|
||||||
|
parseurl "~1.3.3"
|
||||||
|
path-to-regexp "0.1.7"
|
||||||
|
proxy-addr "~2.0.7"
|
||||||
|
qs "6.11.0"
|
||||||
|
range-parser "~1.2.1"
|
||||||
|
safe-buffer "5.2.1"
|
||||||
|
send "0.18.0"
|
||||||
|
serve-static "1.15.0"
|
||||||
|
setprototypeof "1.2.0"
|
||||||
|
statuses "2.0.1"
|
||||||
|
type-is "~1.6.18"
|
||||||
|
utils-merge "1.0.1"
|
||||||
|
vary "~1.1.2"
|
||||||
|
|
||||||
ext@^1.1.2:
|
ext@^1.1.2:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
||||||
@@ -4508,9 +4561,9 @@ interpret@^2.2.0:
|
|||||||
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
||||||
|
|
||||||
ip@^2.0.0:
|
ip@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
|
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
|
||||||
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
|
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==
|
||||||
|
|
||||||
ipaddr.js@1.9.1:
|
ipaddr.js@1.9.1:
|
||||||
version "1.9.1"
|
version "1.9.1"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.19.2",
|
||||||
"payload": "latest",
|
"payload": "latest",
|
||||||
"handlebars": "^4.7.7",
|
"handlebars": "^4.7.7",
|
||||||
"inline-css": "^4.0.2"
|
"inline-css": "^4.0.2"
|
||||||
|
|||||||
@@ -2179,25 +2179,7 @@ bl@^4.0.3:
|
|||||||
inherits "^2.0.4"
|
inherits "^2.0.4"
|
||||||
readable-stream "^3.4.0"
|
readable-stream "^3.4.0"
|
||||||
|
|
||||||
body-parser@1.20.1:
|
body-parser@1.20.2, body-parser@^1.20.1:
|
||||||
version "1.20.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668"
|
|
||||||
integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==
|
|
||||||
dependencies:
|
|
||||||
bytes "3.1.2"
|
|
||||||
content-type "~1.0.4"
|
|
||||||
debug "2.6.9"
|
|
||||||
depd "2.0.0"
|
|
||||||
destroy "1.2.0"
|
|
||||||
http-errors "2.0.0"
|
|
||||||
iconv-lite "0.4.24"
|
|
||||||
on-finished "2.4.1"
|
|
||||||
qs "6.11.0"
|
|
||||||
raw-body "2.5.1"
|
|
||||||
type-is "~1.6.18"
|
|
||||||
unpipe "1.0.0"
|
|
||||||
|
|
||||||
body-parser@^1.20.1:
|
|
||||||
version "1.20.2"
|
version "1.20.2"
|
||||||
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd"
|
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd"
|
||||||
integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==
|
integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==
|
||||||
@@ -2631,10 +2613,10 @@ cookie-signature@1.0.6:
|
|||||||
resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
|
resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
|
||||||
integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==
|
integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==
|
||||||
|
|
||||||
cookie@0.5.0:
|
cookie@0.6.0:
|
||||||
version "0.5.0"
|
version "0.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
|
||||||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
|
||||||
|
|
||||||
cookiejar@^2.1.4:
|
cookiejar@^2.1.4:
|
||||||
version "2.1.4"
|
version "2.1.4"
|
||||||
@@ -3248,13 +3230,14 @@ es-module-lexer@^1.2.1:
|
|||||||
resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.0.tgz#6be9c9e0b4543a60cd166ff6f8b4e9dae0b0c16f"
|
resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.0.tgz#6be9c9e0b4543a60cd166ff6f8b4e9dae0b0c16f"
|
||||||
integrity sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==
|
integrity sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==
|
||||||
|
|
||||||
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
||||||
version "0.10.62"
|
version "0.10.64"
|
||||||
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5"
|
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714"
|
||||||
integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==
|
integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==
|
||||||
dependencies:
|
dependencies:
|
||||||
es6-iterator "^2.0.3"
|
es6-iterator "^2.0.3"
|
||||||
es6-symbol "^3.1.3"
|
es6-symbol "^3.1.3"
|
||||||
|
esniff "^2.0.1"
|
||||||
next-tick "^1.1.0"
|
next-tick "^1.1.0"
|
||||||
|
|
||||||
es6-iterator@^2.0.3:
|
es6-iterator@^2.0.3:
|
||||||
@@ -3380,6 +3363,16 @@ eslint@^8.19.0:
|
|||||||
strip-ansi "^6.0.1"
|
strip-ansi "^6.0.1"
|
||||||
text-table "^0.2.0"
|
text-table "^0.2.0"
|
||||||
|
|
||||||
|
esniff@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308"
|
||||||
|
integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==
|
||||||
|
dependencies:
|
||||||
|
d "^1.0.1"
|
||||||
|
es5-ext "^0.10.62"
|
||||||
|
event-emitter "^0.3.5"
|
||||||
|
type "^2.7.2"
|
||||||
|
|
||||||
espree@^9.6.0:
|
espree@^9.6.0:
|
||||||
version "9.6.1"
|
version "9.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
||||||
@@ -3463,17 +3456,17 @@ express-rate-limit@^5.5.1:
|
|||||||
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
||||||
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
||||||
|
|
||||||
express@^4.17.1, express@^4.18.2:
|
express@^4.18.2, express@^4.19.2:
|
||||||
version "4.18.2"
|
version "4.19.2"
|
||||||
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465"
|
||||||
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
accepts "~1.3.8"
|
accepts "~1.3.8"
|
||||||
array-flatten "1.1.1"
|
array-flatten "1.1.1"
|
||||||
body-parser "1.20.1"
|
body-parser "1.20.2"
|
||||||
content-disposition "0.5.4"
|
content-disposition "0.5.4"
|
||||||
content-type "~1.0.4"
|
content-type "~1.0.4"
|
||||||
cookie "0.5.0"
|
cookie "0.6.0"
|
||||||
cookie-signature "1.0.6"
|
cookie-signature "1.0.6"
|
||||||
debug "2.6.9"
|
debug "2.6.9"
|
||||||
depd "2.0.0"
|
depd "2.0.0"
|
||||||
@@ -4258,14 +4251,14 @@ interpret@^2.2.0:
|
|||||||
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
||||||
|
|
||||||
ip@^1.1.5:
|
ip@^1.1.5:
|
||||||
version "1.1.8"
|
version "1.1.9"
|
||||||
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48"
|
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.9.tgz#8dfbcc99a754d07f425310b86a99546b1151e396"
|
||||||
integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==
|
integrity sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==
|
||||||
|
|
||||||
ip@^2.0.0:
|
ip@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
|
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
|
||||||
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
|
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==
|
||||||
|
|
||||||
ipaddr.js@1.9.1:
|
ipaddr.js@1.9.1:
|
||||||
version "1.9.1"
|
version "1.9.1"
|
||||||
@@ -6390,16 +6383,6 @@ range-parser@^1.2.1, range-parser@~1.2.1:
|
|||||||
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
|
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
|
||||||
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
|
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
|
||||||
|
|
||||||
raw-body@2.5.1:
|
|
||||||
version "2.5.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857"
|
|
||||||
integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==
|
|
||||||
dependencies:
|
|
||||||
bytes "3.1.2"
|
|
||||||
http-errors "2.0.0"
|
|
||||||
iconv-lite "0.4.24"
|
|
||||||
unpipe "1.0.0"
|
|
||||||
|
|
||||||
raw-body@2.5.2, raw-body@^2.2.0:
|
raw-body@2.5.2, raw-body@^2.2.0:
|
||||||
version "2.5.2"
|
version "2.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a"
|
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"@payloadcms/plugin-form-builder": "^1.0.12",
|
"@payloadcms/plugin-form-builder": "^1.0.12",
|
||||||
"@payloadcms/plugin-seo": "^1.0.8",
|
"@payloadcms/plugin-seo": "^1.0.8",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.19.2",
|
||||||
"payload": "latest"
|
"payload": "latest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -2589,6 +2589,11 @@ cookie@0.5.0:
|
|||||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
||||||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
||||||
|
|
||||||
|
cookie@0.6.0:
|
||||||
|
version "0.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
|
||||||
|
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
|
||||||
|
|
||||||
copyfiles@^2.4.1:
|
copyfiles@^2.4.1:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
||||||
@@ -3159,13 +3164,14 @@ es-module-lexer@^1.2.1:
|
|||||||
resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.1.tgz#c1b0dd5ada807a3b3155315911f364dc4e909db1"
|
resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.1.tgz#c1b0dd5ada807a3b3155315911f364dc4e909db1"
|
||||||
integrity sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==
|
integrity sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==
|
||||||
|
|
||||||
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
||||||
version "0.10.62"
|
version "0.10.64"
|
||||||
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5"
|
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714"
|
||||||
integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==
|
integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==
|
||||||
dependencies:
|
dependencies:
|
||||||
es6-iterator "^2.0.3"
|
es6-iterator "^2.0.3"
|
||||||
es6-symbol "^3.1.3"
|
es6-symbol "^3.1.3"
|
||||||
|
esniff "^2.0.1"
|
||||||
next-tick "^1.1.0"
|
next-tick "^1.1.0"
|
||||||
|
|
||||||
es6-iterator@^2.0.3:
|
es6-iterator@^2.0.3:
|
||||||
@@ -3223,6 +3229,16 @@ eslint-scope@5.1.1:
|
|||||||
esrecurse "^4.3.0"
|
esrecurse "^4.3.0"
|
||||||
estraverse "^4.1.1"
|
estraverse "^4.1.1"
|
||||||
|
|
||||||
|
esniff@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308"
|
||||||
|
integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==
|
||||||
|
dependencies:
|
||||||
|
d "^1.0.1"
|
||||||
|
es5-ext "^0.10.62"
|
||||||
|
event-emitter "^0.3.5"
|
||||||
|
type "^2.7.2"
|
||||||
|
|
||||||
esrecurse@^4.3.0:
|
esrecurse@^4.3.0:
|
||||||
version "4.3.0"
|
version "4.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
|
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
|
||||||
@@ -3287,7 +3303,7 @@ express-rate-limit@5.5.1:
|
|||||||
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
||||||
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
||||||
|
|
||||||
express@4.18.2, express@^4.17.1:
|
express@4.18.2:
|
||||||
version "4.18.2"
|
version "4.18.2"
|
||||||
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
||||||
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
||||||
@@ -3324,6 +3340,43 @@ express@4.18.2, express@^4.17.1:
|
|||||||
utils-merge "1.0.1"
|
utils-merge "1.0.1"
|
||||||
vary "~1.1.2"
|
vary "~1.1.2"
|
||||||
|
|
||||||
|
express@^4.19.2:
|
||||||
|
version "4.19.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465"
|
||||||
|
integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==
|
||||||
|
dependencies:
|
||||||
|
accepts "~1.3.8"
|
||||||
|
array-flatten "1.1.1"
|
||||||
|
body-parser "1.20.2"
|
||||||
|
content-disposition "0.5.4"
|
||||||
|
content-type "~1.0.4"
|
||||||
|
cookie "0.6.0"
|
||||||
|
cookie-signature "1.0.6"
|
||||||
|
debug "2.6.9"
|
||||||
|
depd "2.0.0"
|
||||||
|
encodeurl "~1.0.2"
|
||||||
|
escape-html "~1.0.3"
|
||||||
|
etag "~1.8.1"
|
||||||
|
finalhandler "1.2.0"
|
||||||
|
fresh "0.5.2"
|
||||||
|
http-errors "2.0.0"
|
||||||
|
merge-descriptors "1.0.1"
|
||||||
|
methods "~1.1.2"
|
||||||
|
on-finished "2.4.1"
|
||||||
|
parseurl "~1.3.3"
|
||||||
|
path-to-regexp "0.1.7"
|
||||||
|
proxy-addr "~2.0.7"
|
||||||
|
qs "6.11.0"
|
||||||
|
range-parser "~1.2.1"
|
||||||
|
safe-buffer "5.2.1"
|
||||||
|
send "0.18.0"
|
||||||
|
serve-static "1.15.0"
|
||||||
|
setprototypeof "1.2.0"
|
||||||
|
statuses "2.0.1"
|
||||||
|
type-is "~1.6.18"
|
||||||
|
utils-merge "1.0.1"
|
||||||
|
vary "~1.1.2"
|
||||||
|
|
||||||
ext@^1.1.2:
|
ext@^1.1.2:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
||||||
@@ -3924,9 +3977,9 @@ interpret@^2.2.0:
|
|||||||
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
||||||
|
|
||||||
ip@^2.0.0:
|
ip@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
|
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
|
||||||
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
|
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==
|
||||||
|
|
||||||
ipaddr.js@1.9.1:
|
ipaddr.js@1.9.1:
|
||||||
version "1.9.1"
|
version "1.9.1"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"@payloadcms/richtext-slate": "^1.0.0",
|
"@payloadcms/richtext-slate": "^1.0.0",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.19.2",
|
||||||
"payload": "^2.0.0"
|
"payload": "^2.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -2974,6 +2974,11 @@ cookie@0.5.0:
|
|||||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
||||||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
||||||
|
|
||||||
|
cookie@0.6.0:
|
||||||
|
version "0.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
|
||||||
|
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
|
||||||
|
|
||||||
copyfiles@^2.4.1:
|
copyfiles@^2.4.1:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
||||||
@@ -3549,13 +3554,14 @@ es-module-lexer@^1.2.1:
|
|||||||
resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.4.1.tgz#41ea21b43908fe6a287ffcbe4300f790555331f5"
|
resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.4.1.tgz#41ea21b43908fe6a287ffcbe4300f790555331f5"
|
||||||
integrity sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==
|
integrity sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==
|
||||||
|
|
||||||
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
||||||
version "0.10.62"
|
version "0.10.64"
|
||||||
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5"
|
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714"
|
||||||
integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==
|
integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==
|
||||||
dependencies:
|
dependencies:
|
||||||
es6-iterator "^2.0.3"
|
es6-iterator "^2.0.3"
|
||||||
es6-symbol "^3.1.3"
|
es6-symbol "^3.1.3"
|
||||||
|
esniff "^2.0.1"
|
||||||
next-tick "^1.1.0"
|
next-tick "^1.1.0"
|
||||||
|
|
||||||
es6-iterator@^2.0.3:
|
es6-iterator@^2.0.3:
|
||||||
@@ -3613,6 +3619,16 @@ eslint-scope@5.1.1:
|
|||||||
esrecurse "^4.3.0"
|
esrecurse "^4.3.0"
|
||||||
estraverse "^4.1.1"
|
estraverse "^4.1.1"
|
||||||
|
|
||||||
|
esniff@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308"
|
||||||
|
integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==
|
||||||
|
dependencies:
|
||||||
|
d "^1.0.1"
|
||||||
|
es5-ext "^0.10.62"
|
||||||
|
event-emitter "^0.3.5"
|
||||||
|
type "^2.7.2"
|
||||||
|
|
||||||
esrecurse@^4.3.0:
|
esrecurse@^4.3.0:
|
||||||
version "4.3.0"
|
version "4.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
|
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
|
||||||
@@ -3677,7 +3693,7 @@ express-rate-limit@5.5.1:
|
|||||||
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
||||||
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
||||||
|
|
||||||
express@4.18.2, express@^4.17.1:
|
express@4.18.2:
|
||||||
version "4.18.2"
|
version "4.18.2"
|
||||||
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
||||||
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
||||||
@@ -3714,6 +3730,43 @@ express@4.18.2, express@^4.17.1:
|
|||||||
utils-merge "1.0.1"
|
utils-merge "1.0.1"
|
||||||
vary "~1.1.2"
|
vary "~1.1.2"
|
||||||
|
|
||||||
|
express@^4.19.2:
|
||||||
|
version "4.19.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465"
|
||||||
|
integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==
|
||||||
|
dependencies:
|
||||||
|
accepts "~1.3.8"
|
||||||
|
array-flatten "1.1.1"
|
||||||
|
body-parser "1.20.2"
|
||||||
|
content-disposition "0.5.4"
|
||||||
|
content-type "~1.0.4"
|
||||||
|
cookie "0.6.0"
|
||||||
|
cookie-signature "1.0.6"
|
||||||
|
debug "2.6.9"
|
||||||
|
depd "2.0.0"
|
||||||
|
encodeurl "~1.0.2"
|
||||||
|
escape-html "~1.0.3"
|
||||||
|
etag "~1.8.1"
|
||||||
|
finalhandler "1.2.0"
|
||||||
|
fresh "0.5.2"
|
||||||
|
http-errors "2.0.0"
|
||||||
|
merge-descriptors "1.0.1"
|
||||||
|
methods "~1.1.2"
|
||||||
|
on-finished "2.4.1"
|
||||||
|
parseurl "~1.3.3"
|
||||||
|
path-to-regexp "0.1.7"
|
||||||
|
proxy-addr "~2.0.7"
|
||||||
|
qs "6.11.0"
|
||||||
|
range-parser "~1.2.1"
|
||||||
|
safe-buffer "5.2.1"
|
||||||
|
send "0.18.0"
|
||||||
|
serve-static "1.15.0"
|
||||||
|
setprototypeof "1.2.0"
|
||||||
|
statuses "2.0.1"
|
||||||
|
type-is "~1.6.18"
|
||||||
|
utils-merge "1.0.1"
|
||||||
|
vary "~1.1.2"
|
||||||
|
|
||||||
ext@^1.1.2:
|
ext@^1.1.2:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
||||||
@@ -4347,9 +4400,9 @@ interpret@^2.2.0:
|
|||||||
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
||||||
|
|
||||||
ip@^2.0.0:
|
ip@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
|
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
|
||||||
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
|
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==
|
||||||
|
|
||||||
ipaddr.js@1.9.1:
|
ipaddr.js@1.9.1:
|
||||||
version "1.9.1"
|
version "1.9.1"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"@payloadcms/db-mongodb": "latest",
|
"@payloadcms/db-mongodb": "latest",
|
||||||
"@payloadcms/richtext-slate": "latest",
|
"@payloadcms/richtext-slate": "latest",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.19.2",
|
||||||
"payload": "latest"
|
"payload": "latest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -2810,6 +2810,11 @@ cookie@0.5.0:
|
|||||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
||||||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
||||||
|
|
||||||
|
cookie@0.6.0:
|
||||||
|
version "0.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
|
||||||
|
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
|
||||||
|
|
||||||
copyfiles@^2.4.1:
|
copyfiles@^2.4.1:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
||||||
@@ -3476,13 +3481,14 @@ es-to-primitive@^1.2.1:
|
|||||||
is-date-object "^1.0.1"
|
is-date-object "^1.0.1"
|
||||||
is-symbol "^1.0.2"
|
is-symbol "^1.0.2"
|
||||||
|
|
||||||
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
||||||
version "0.10.62"
|
version "0.10.64"
|
||||||
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5"
|
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714"
|
||||||
integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==
|
integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==
|
||||||
dependencies:
|
dependencies:
|
||||||
es6-iterator "^2.0.3"
|
es6-iterator "^2.0.3"
|
||||||
es6-symbol "^3.1.3"
|
es6-symbol "^3.1.3"
|
||||||
|
esniff "^2.0.1"
|
||||||
next-tick "^1.1.0"
|
next-tick "^1.1.0"
|
||||||
|
|
||||||
es6-iterator@^2.0.3:
|
es6-iterator@^2.0.3:
|
||||||
@@ -3663,6 +3669,16 @@ eslint@^8.19.0:
|
|||||||
strip-ansi "^6.0.1"
|
strip-ansi "^6.0.1"
|
||||||
text-table "^0.2.0"
|
text-table "^0.2.0"
|
||||||
|
|
||||||
|
esniff@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308"
|
||||||
|
integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==
|
||||||
|
dependencies:
|
||||||
|
d "^1.0.1"
|
||||||
|
es5-ext "^0.10.62"
|
||||||
|
event-emitter "^0.3.5"
|
||||||
|
type "^2.7.2"
|
||||||
|
|
||||||
espree@^9.6.0, espree@^9.6.1:
|
espree@^9.6.0, espree@^9.6.1:
|
||||||
version "9.6.1"
|
version "9.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
||||||
@@ -3748,7 +3764,7 @@ express-rate-limit@5.5.1:
|
|||||||
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
||||||
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
||||||
|
|
||||||
express@4.18.2, express@^4.17.1:
|
express@4.18.2:
|
||||||
version "4.18.2"
|
version "4.18.2"
|
||||||
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
||||||
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
||||||
@@ -3785,6 +3801,43 @@ express@4.18.2, express@^4.17.1:
|
|||||||
utils-merge "1.0.1"
|
utils-merge "1.0.1"
|
||||||
vary "~1.1.2"
|
vary "~1.1.2"
|
||||||
|
|
||||||
|
express@^4.19.2:
|
||||||
|
version "4.19.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465"
|
||||||
|
integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==
|
||||||
|
dependencies:
|
||||||
|
accepts "~1.3.8"
|
||||||
|
array-flatten "1.1.1"
|
||||||
|
body-parser "1.20.2"
|
||||||
|
content-disposition "0.5.4"
|
||||||
|
content-type "~1.0.4"
|
||||||
|
cookie "0.6.0"
|
||||||
|
cookie-signature "1.0.6"
|
||||||
|
debug "2.6.9"
|
||||||
|
depd "2.0.0"
|
||||||
|
encodeurl "~1.0.2"
|
||||||
|
escape-html "~1.0.3"
|
||||||
|
etag "~1.8.1"
|
||||||
|
finalhandler "1.2.0"
|
||||||
|
fresh "0.5.2"
|
||||||
|
http-errors "2.0.0"
|
||||||
|
merge-descriptors "1.0.1"
|
||||||
|
methods "~1.1.2"
|
||||||
|
on-finished "2.4.1"
|
||||||
|
parseurl "~1.3.3"
|
||||||
|
path-to-regexp "0.1.7"
|
||||||
|
proxy-addr "~2.0.7"
|
||||||
|
qs "6.11.0"
|
||||||
|
range-parser "~1.2.1"
|
||||||
|
safe-buffer "5.2.1"
|
||||||
|
send "0.18.0"
|
||||||
|
serve-static "1.15.0"
|
||||||
|
setprototypeof "1.2.0"
|
||||||
|
statuses "2.0.1"
|
||||||
|
type-is "~1.6.18"
|
||||||
|
utils-merge "1.0.1"
|
||||||
|
vary "~1.1.2"
|
||||||
|
|
||||||
ext@^1.1.2:
|
ext@^1.1.2:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
||||||
@@ -4508,9 +4561,9 @@ interpret@^2.2.0:
|
|||||||
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
||||||
|
|
||||||
ip@^2.0.0:
|
ip@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
|
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
|
||||||
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
|
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==
|
||||||
|
|
||||||
ipaddr.js@1.9.1:
|
ipaddr.js@1.9.1:
|
||||||
version "1.9.1"
|
version "1.9.1"
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ For more details on this, see the [CORS](https://payloadcms.com/docs/production/
|
|||||||
|
|
||||||
## Front-end
|
## Front-end
|
||||||
|
|
||||||
If you're building a website or other front-end for your tenant, you will need specify the `tenant` in your requests. For example, if you wanted to fetch all pages for the tenant `ABC`, you would make a request to `/api/pages?where[tenant][slug][equals]=abc`.
|
If you're building a website or other front-end for your tenant, you will need specify the `tenant` in your requests. For example, if you wanted to fetch all pages for the tenant `ABC`, you would make a request to `/api/pages?where[tenant.name][equals]=ABC`.
|
||||||
|
|
||||||
For a head start on building a website for your tenant(s), check out the official [Website Template](https://github.com/payloadcms/template-website). It includes a page layout builder, preview, SEO, and much more. It is not multi-tenant, though, but you can easily take the concepts from that example and apply them here.
|
For a head start on building a website for your tenant(s), check out the official [Website Template](https://github.com/payloadcms/template-website). It includes a page layout builder, preview, SEO, and much more. It is not multi-tenant, though, but you can easily take the concepts from that example and apply them here.
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"@payloadcms/db-mongodb": "latest",
|
"@payloadcms/db-mongodb": "latest",
|
||||||
"@payloadcms/richtext-slate": "latest",
|
"@payloadcms/richtext-slate": "latest",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.19.2",
|
||||||
"payload": "latest"
|
"payload": "latest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ app.get('/', (_, res) => {
|
|||||||
const start = async (): Promise<void> => {
|
const start = async (): Promise<void> => {
|
||||||
await payload.init({
|
await payload.init({
|
||||||
secret: process.env.PAYLOAD_SECRET,
|
secret: process.env.PAYLOAD_SECRET,
|
||||||
mongoURL: process.env.MONGODB_URI,
|
|
||||||
express: app,
|
express: app,
|
||||||
onInit: () => {
|
onInit: () => {
|
||||||
payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
|
payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
|
||||||
|
|||||||
@@ -2888,6 +2888,11 @@ cookie@0.5.0:
|
|||||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
||||||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
||||||
|
|
||||||
|
cookie@0.6.0:
|
||||||
|
version "0.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
|
||||||
|
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
|
||||||
|
|
||||||
copyfiles@^2.4.1:
|
copyfiles@^2.4.1:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
||||||
@@ -3559,13 +3564,14 @@ es-to-primitive@^1.2.1:
|
|||||||
is-date-object "^1.0.1"
|
is-date-object "^1.0.1"
|
||||||
is-symbol "^1.0.2"
|
is-symbol "^1.0.2"
|
||||||
|
|
||||||
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
||||||
version "0.10.62"
|
version "0.10.64"
|
||||||
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5"
|
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714"
|
||||||
integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==
|
integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==
|
||||||
dependencies:
|
dependencies:
|
||||||
es6-iterator "^2.0.3"
|
es6-iterator "^2.0.3"
|
||||||
es6-symbol "^3.1.3"
|
es6-symbol "^3.1.3"
|
||||||
|
esniff "^2.0.1"
|
||||||
next-tick "^1.1.0"
|
next-tick "^1.1.0"
|
||||||
|
|
||||||
es6-iterator@^2.0.3:
|
es6-iterator@^2.0.3:
|
||||||
@@ -3747,6 +3753,16 @@ eslint@^8.19.0:
|
|||||||
strip-ansi "^6.0.1"
|
strip-ansi "^6.0.1"
|
||||||
text-table "^0.2.0"
|
text-table "^0.2.0"
|
||||||
|
|
||||||
|
esniff@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308"
|
||||||
|
integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==
|
||||||
|
dependencies:
|
||||||
|
d "^1.0.1"
|
||||||
|
es5-ext "^0.10.62"
|
||||||
|
event-emitter "^0.3.5"
|
||||||
|
type "^2.7.2"
|
||||||
|
|
||||||
espree@^9.6.0, espree@^9.6.1:
|
espree@^9.6.0, espree@^9.6.1:
|
||||||
version "9.6.1"
|
version "9.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
||||||
@@ -3832,7 +3848,7 @@ express-rate-limit@5.5.1:
|
|||||||
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
||||||
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
||||||
|
|
||||||
express@4.18.2, express@^4.17.1:
|
express@4.18.2:
|
||||||
version "4.18.2"
|
version "4.18.2"
|
||||||
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
||||||
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
||||||
@@ -3869,6 +3885,43 @@ express@4.18.2, express@^4.17.1:
|
|||||||
utils-merge "1.0.1"
|
utils-merge "1.0.1"
|
||||||
vary "~1.1.2"
|
vary "~1.1.2"
|
||||||
|
|
||||||
|
express@^4.19.2:
|
||||||
|
version "4.19.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465"
|
||||||
|
integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==
|
||||||
|
dependencies:
|
||||||
|
accepts "~1.3.8"
|
||||||
|
array-flatten "1.1.1"
|
||||||
|
body-parser "1.20.2"
|
||||||
|
content-disposition "0.5.4"
|
||||||
|
content-type "~1.0.4"
|
||||||
|
cookie "0.6.0"
|
||||||
|
cookie-signature "1.0.6"
|
||||||
|
debug "2.6.9"
|
||||||
|
depd "2.0.0"
|
||||||
|
encodeurl "~1.0.2"
|
||||||
|
escape-html "~1.0.3"
|
||||||
|
etag "~1.8.1"
|
||||||
|
finalhandler "1.2.0"
|
||||||
|
fresh "0.5.2"
|
||||||
|
http-errors "2.0.0"
|
||||||
|
merge-descriptors "1.0.1"
|
||||||
|
methods "~1.1.2"
|
||||||
|
on-finished "2.4.1"
|
||||||
|
parseurl "~1.3.3"
|
||||||
|
path-to-regexp "0.1.7"
|
||||||
|
proxy-addr "~2.0.7"
|
||||||
|
qs "6.11.0"
|
||||||
|
range-parser "~1.2.1"
|
||||||
|
safe-buffer "5.2.1"
|
||||||
|
send "0.18.0"
|
||||||
|
serve-static "1.15.0"
|
||||||
|
setprototypeof "1.2.0"
|
||||||
|
statuses "2.0.1"
|
||||||
|
type-is "~1.6.18"
|
||||||
|
utils-merge "1.0.1"
|
||||||
|
vary "~1.1.2"
|
||||||
|
|
||||||
ext@^1.1.2:
|
ext@^1.1.2:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
||||||
@@ -4625,9 +4678,9 @@ interpret@^2.2.0:
|
|||||||
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
||||||
|
|
||||||
ip@^2.0.0:
|
ip@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
|
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
|
||||||
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
|
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==
|
||||||
|
|
||||||
ipaddr.js@1.9.1:
|
ipaddr.js@1.9.1:
|
||||||
version "1.9.1"
|
version "1.9.1"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"@payloadcms/richtext-slate": "latest",
|
"@payloadcms/richtext-slate": "latest",
|
||||||
"@payloadcms/plugin-nested-docs": "latest",
|
"@payloadcms/plugin-nested-docs": "latest",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.19.2",
|
||||||
"payload": "latest"
|
"payload": "latest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -2862,6 +2862,11 @@ cookie@0.5.0:
|
|||||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
||||||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
||||||
|
|
||||||
|
cookie@0.6.0:
|
||||||
|
version "0.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
|
||||||
|
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
|
||||||
|
|
||||||
copyfiles@^2.4.1:
|
copyfiles@^2.4.1:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
||||||
@@ -3533,13 +3538,14 @@ es-to-primitive@^1.2.1:
|
|||||||
is-date-object "^1.0.1"
|
is-date-object "^1.0.1"
|
||||||
is-symbol "^1.0.2"
|
is-symbol "^1.0.2"
|
||||||
|
|
||||||
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
||||||
version "0.10.62"
|
version "0.10.64"
|
||||||
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5"
|
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714"
|
||||||
integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==
|
integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==
|
||||||
dependencies:
|
dependencies:
|
||||||
es6-iterator "^2.0.3"
|
es6-iterator "^2.0.3"
|
||||||
es6-symbol "^3.1.3"
|
es6-symbol "^3.1.3"
|
||||||
|
esniff "^2.0.1"
|
||||||
next-tick "^1.1.0"
|
next-tick "^1.1.0"
|
||||||
|
|
||||||
es6-iterator@^2.0.3:
|
es6-iterator@^2.0.3:
|
||||||
@@ -3721,6 +3727,16 @@ eslint@^8.19.0:
|
|||||||
strip-ansi "^6.0.1"
|
strip-ansi "^6.0.1"
|
||||||
text-table "^0.2.0"
|
text-table "^0.2.0"
|
||||||
|
|
||||||
|
esniff@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308"
|
||||||
|
integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==
|
||||||
|
dependencies:
|
||||||
|
d "^1.0.1"
|
||||||
|
es5-ext "^0.10.62"
|
||||||
|
event-emitter "^0.3.5"
|
||||||
|
type "^2.7.2"
|
||||||
|
|
||||||
espree@^9.6.0, espree@^9.6.1:
|
espree@^9.6.0, espree@^9.6.1:
|
||||||
version "9.6.1"
|
version "9.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
||||||
@@ -3806,7 +3822,7 @@ express-rate-limit@5.5.1:
|
|||||||
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
||||||
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
||||||
|
|
||||||
express@4.18.2, express@^4.17.1:
|
express@4.18.2:
|
||||||
version "4.18.2"
|
version "4.18.2"
|
||||||
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
||||||
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
||||||
@@ -3843,6 +3859,43 @@ express@4.18.2, express@^4.17.1:
|
|||||||
utils-merge "1.0.1"
|
utils-merge "1.0.1"
|
||||||
vary "~1.1.2"
|
vary "~1.1.2"
|
||||||
|
|
||||||
|
express@^4.19.2:
|
||||||
|
version "4.19.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465"
|
||||||
|
integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==
|
||||||
|
dependencies:
|
||||||
|
accepts "~1.3.8"
|
||||||
|
array-flatten "1.1.1"
|
||||||
|
body-parser "1.20.2"
|
||||||
|
content-disposition "0.5.4"
|
||||||
|
content-type "~1.0.4"
|
||||||
|
cookie "0.6.0"
|
||||||
|
cookie-signature "1.0.6"
|
||||||
|
debug "2.6.9"
|
||||||
|
depd "2.0.0"
|
||||||
|
encodeurl "~1.0.2"
|
||||||
|
escape-html "~1.0.3"
|
||||||
|
etag "~1.8.1"
|
||||||
|
finalhandler "1.2.0"
|
||||||
|
fresh "0.5.2"
|
||||||
|
http-errors "2.0.0"
|
||||||
|
merge-descriptors "1.0.1"
|
||||||
|
methods "~1.1.2"
|
||||||
|
on-finished "2.4.1"
|
||||||
|
parseurl "~1.3.3"
|
||||||
|
path-to-regexp "0.1.7"
|
||||||
|
proxy-addr "~2.0.7"
|
||||||
|
qs "6.11.0"
|
||||||
|
range-parser "~1.2.1"
|
||||||
|
safe-buffer "5.2.1"
|
||||||
|
send "0.18.0"
|
||||||
|
serve-static "1.15.0"
|
||||||
|
setprototypeof "1.2.0"
|
||||||
|
statuses "2.0.1"
|
||||||
|
type-is "~1.6.18"
|
||||||
|
utils-merge "1.0.1"
|
||||||
|
vary "~1.1.2"
|
||||||
|
|
||||||
ext@^1.1.2:
|
ext@^1.1.2:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
||||||
@@ -4599,9 +4652,9 @@ interpret@^2.2.0:
|
|||||||
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
||||||
|
|
||||||
ip@^2.0.0:
|
ip@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
|
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
|
||||||
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
|
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==
|
||||||
|
|
||||||
ipaddr.js@1.9.1:
|
ipaddr.js@1.9.1:
|
||||||
version "1.9.1"
|
version "1.9.1"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"@payloadcms/richtext-slate": "latest",
|
"@payloadcms/richtext-slate": "latest",
|
||||||
"@payloadcms/plugin-redirects": "^1.0.0",
|
"@payloadcms/plugin-redirects": "^1.0.0",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.19.2",
|
||||||
"payload": "latest"
|
"payload": "latest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -2815,6 +2815,11 @@ cookie@0.5.0:
|
|||||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
||||||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
||||||
|
|
||||||
|
cookie@0.6.0:
|
||||||
|
version "0.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
|
||||||
|
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
|
||||||
|
|
||||||
copyfiles@^2.4.1:
|
copyfiles@^2.4.1:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
|
||||||
@@ -3481,13 +3486,14 @@ es-to-primitive@^1.2.1:
|
|||||||
is-date-object "^1.0.1"
|
is-date-object "^1.0.1"
|
||||||
is-symbol "^1.0.2"
|
is-symbol "^1.0.2"
|
||||||
|
|
||||||
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
||||||
version "0.10.62"
|
version "0.10.64"
|
||||||
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5"
|
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714"
|
||||||
integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==
|
integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==
|
||||||
dependencies:
|
dependencies:
|
||||||
es6-iterator "^2.0.3"
|
es6-iterator "^2.0.3"
|
||||||
es6-symbol "^3.1.3"
|
es6-symbol "^3.1.3"
|
||||||
|
esniff "^2.0.1"
|
||||||
next-tick "^1.1.0"
|
next-tick "^1.1.0"
|
||||||
|
|
||||||
es6-iterator@^2.0.3:
|
es6-iterator@^2.0.3:
|
||||||
@@ -3668,6 +3674,16 @@ eslint@^8.19.0:
|
|||||||
strip-ansi "^6.0.1"
|
strip-ansi "^6.0.1"
|
||||||
text-table "^0.2.0"
|
text-table "^0.2.0"
|
||||||
|
|
||||||
|
esniff@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308"
|
||||||
|
integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==
|
||||||
|
dependencies:
|
||||||
|
d "^1.0.1"
|
||||||
|
es5-ext "^0.10.62"
|
||||||
|
event-emitter "^0.3.5"
|
||||||
|
type "^2.7.2"
|
||||||
|
|
||||||
espree@^9.6.0, espree@^9.6.1:
|
espree@^9.6.0, espree@^9.6.1:
|
||||||
version "9.6.1"
|
version "9.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
|
||||||
@@ -3753,7 +3769,7 @@ express-rate-limit@5.5.1:
|
|||||||
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
||||||
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
||||||
|
|
||||||
express@4.18.2, express@^4.17.1:
|
express@4.18.2:
|
||||||
version "4.18.2"
|
version "4.18.2"
|
||||||
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
||||||
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
||||||
@@ -3790,6 +3806,43 @@ express@4.18.2, express@^4.17.1:
|
|||||||
utils-merge "1.0.1"
|
utils-merge "1.0.1"
|
||||||
vary "~1.1.2"
|
vary "~1.1.2"
|
||||||
|
|
||||||
|
express@^4.19.2:
|
||||||
|
version "4.19.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465"
|
||||||
|
integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==
|
||||||
|
dependencies:
|
||||||
|
accepts "~1.3.8"
|
||||||
|
array-flatten "1.1.1"
|
||||||
|
body-parser "1.20.2"
|
||||||
|
content-disposition "0.5.4"
|
||||||
|
content-type "~1.0.4"
|
||||||
|
cookie "0.6.0"
|
||||||
|
cookie-signature "1.0.6"
|
||||||
|
debug "2.6.9"
|
||||||
|
depd "2.0.0"
|
||||||
|
encodeurl "~1.0.2"
|
||||||
|
escape-html "~1.0.3"
|
||||||
|
etag "~1.8.1"
|
||||||
|
finalhandler "1.2.0"
|
||||||
|
fresh "0.5.2"
|
||||||
|
http-errors "2.0.0"
|
||||||
|
merge-descriptors "1.0.1"
|
||||||
|
methods "~1.1.2"
|
||||||
|
on-finished "2.4.1"
|
||||||
|
parseurl "~1.3.3"
|
||||||
|
path-to-regexp "0.1.7"
|
||||||
|
proxy-addr "~2.0.7"
|
||||||
|
qs "6.11.0"
|
||||||
|
range-parser "~1.2.1"
|
||||||
|
safe-buffer "5.2.1"
|
||||||
|
send "0.18.0"
|
||||||
|
serve-static "1.15.0"
|
||||||
|
setprototypeof "1.2.0"
|
||||||
|
statuses "2.0.1"
|
||||||
|
type-is "~1.6.18"
|
||||||
|
utils-merge "1.0.1"
|
||||||
|
vary "~1.1.2"
|
||||||
|
|
||||||
ext@^1.1.2:
|
ext@^1.1.2:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
||||||
@@ -4513,9 +4566,9 @@ interpret@^2.2.0:
|
|||||||
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
||||||
|
|
||||||
ip@^2.0.0:
|
ip@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
|
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
|
||||||
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
|
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==
|
||||||
|
|
||||||
ipaddr.js@1.9.1:
|
ipaddr.js@1.9.1:
|
||||||
version "1.9.1"
|
version "1.9.1"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"@payloadcms/db-mongodb": "^1.1.0",
|
"@payloadcms/db-mongodb": "^1.1.0",
|
||||||
"@payloadcms/richtext-slate": "^1.3.1",
|
"@payloadcms/richtext-slate": "^1.3.1",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"express": "^4.18.2",
|
"express": "^4.19.2",
|
||||||
"get-tsconfig": "^4.7.0",
|
"get-tsconfig": "^4.7.0",
|
||||||
"payload": "^2.4.0"
|
"payload": "^2.4.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3335,6 +3335,11 @@ cookie@0.5.0:
|
|||||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
||||||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
||||||
|
|
||||||
|
cookie@0.6.0:
|
||||||
|
version "0.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
|
||||||
|
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
|
||||||
|
|
||||||
cosmiconfig@^7.0.0:
|
cosmiconfig@^7.0.0:
|
||||||
version "7.1.0"
|
version "7.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6"
|
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6"
|
||||||
@@ -3928,13 +3933,14 @@ es-module-lexer@^1.2.1:
|
|||||||
resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.4.1.tgz#41ea21b43908fe6a287ffcbe4300f790555331f5"
|
resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.4.1.tgz#41ea21b43908fe6a287ffcbe4300f790555331f5"
|
||||||
integrity sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==
|
integrity sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==
|
||||||
|
|
||||||
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
||||||
version "0.10.62"
|
version "0.10.64"
|
||||||
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5"
|
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714"
|
||||||
integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==
|
integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==
|
||||||
dependencies:
|
dependencies:
|
||||||
es6-iterator "^2.0.3"
|
es6-iterator "^2.0.3"
|
||||||
es6-symbol "^3.1.3"
|
es6-symbol "^3.1.3"
|
||||||
|
esniff "^2.0.1"
|
||||||
next-tick "^1.1.0"
|
next-tick "^1.1.0"
|
||||||
|
|
||||||
es6-iterator@^2.0.3:
|
es6-iterator@^2.0.3:
|
||||||
@@ -3997,6 +4003,16 @@ eslint-scope@5.1.1:
|
|||||||
esrecurse "^4.3.0"
|
esrecurse "^4.3.0"
|
||||||
estraverse "^4.1.1"
|
estraverse "^4.1.1"
|
||||||
|
|
||||||
|
esniff@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308"
|
||||||
|
integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==
|
||||||
|
dependencies:
|
||||||
|
d "^1.0.1"
|
||||||
|
es5-ext "^0.10.62"
|
||||||
|
event-emitter "^0.3.5"
|
||||||
|
type "^2.7.2"
|
||||||
|
|
||||||
esprima@^4.0.0:
|
esprima@^4.0.0:
|
||||||
version "4.0.1"
|
version "4.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
|
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
|
||||||
@@ -4097,7 +4113,7 @@ express-rate-limit@5.5.1:
|
|||||||
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
||||||
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
||||||
|
|
||||||
express@4.18.2, express@^4.18.2:
|
express@4.18.2:
|
||||||
version "4.18.2"
|
version "4.18.2"
|
||||||
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
||||||
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
||||||
@@ -4134,6 +4150,43 @@ express@4.18.2, express@^4.18.2:
|
|||||||
utils-merge "1.0.1"
|
utils-merge "1.0.1"
|
||||||
vary "~1.1.2"
|
vary "~1.1.2"
|
||||||
|
|
||||||
|
express@^4.19.2:
|
||||||
|
version "4.19.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465"
|
||||||
|
integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==
|
||||||
|
dependencies:
|
||||||
|
accepts "~1.3.8"
|
||||||
|
array-flatten "1.1.1"
|
||||||
|
body-parser "1.20.2"
|
||||||
|
content-disposition "0.5.4"
|
||||||
|
content-type "~1.0.4"
|
||||||
|
cookie "0.6.0"
|
||||||
|
cookie-signature "1.0.6"
|
||||||
|
debug "2.6.9"
|
||||||
|
depd "2.0.0"
|
||||||
|
encodeurl "~1.0.2"
|
||||||
|
escape-html "~1.0.3"
|
||||||
|
etag "~1.8.1"
|
||||||
|
finalhandler "1.2.0"
|
||||||
|
fresh "0.5.2"
|
||||||
|
http-errors "2.0.0"
|
||||||
|
merge-descriptors "1.0.1"
|
||||||
|
methods "~1.1.2"
|
||||||
|
on-finished "2.4.1"
|
||||||
|
parseurl "~1.3.3"
|
||||||
|
path-to-regexp "0.1.7"
|
||||||
|
proxy-addr "~2.0.7"
|
||||||
|
qs "6.11.0"
|
||||||
|
range-parser "~1.2.1"
|
||||||
|
safe-buffer "5.2.1"
|
||||||
|
send "0.18.0"
|
||||||
|
serve-static "1.15.0"
|
||||||
|
setprototypeof "1.2.0"
|
||||||
|
statuses "2.0.1"
|
||||||
|
type-is "~1.6.18"
|
||||||
|
utils-merge "1.0.1"
|
||||||
|
vary "~1.1.2"
|
||||||
|
|
||||||
ext@^1.1.2:
|
ext@^1.1.2:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
|
||||||
@@ -4301,9 +4354,9 @@ focus-trap@^6.9.2:
|
|||||||
tabbable "^5.3.3"
|
tabbable "^5.3.3"
|
||||||
|
|
||||||
follow-redirects@^1.15.2:
|
follow-redirects@^1.15.2:
|
||||||
version "1.15.4"
|
version "1.15.6"
|
||||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf"
|
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
|
||||||
integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==
|
integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==
|
||||||
|
|
||||||
for-each@^0.3.3:
|
for-each@^0.3.3:
|
||||||
version "0.3.3"
|
version "0.3.3"
|
||||||
@@ -4835,9 +4888,9 @@ interpret@^2.2.0:
|
|||||||
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
||||||
|
|
||||||
ip@^2.0.0:
|
ip@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
|
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
|
||||||
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
|
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==
|
||||||
|
|
||||||
ipaddr.js@1.9.1:
|
ipaddr.js@1.9.1:
|
||||||
version "1.9.1"
|
version "1.9.1"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.19.2",
|
||||||
"payload": "latest"
|
"payload": "latest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -2058,25 +2058,7 @@ bl@^4.0.3:
|
|||||||
inherits "^2.0.4"
|
inherits "^2.0.4"
|
||||||
readable-stream "^3.4.0"
|
readable-stream "^3.4.0"
|
||||||
|
|
||||||
body-parser@1.20.1:
|
body-parser@1.20.2, body-parser@^1.20.1:
|
||||||
version "1.20.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668"
|
|
||||||
integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==
|
|
||||||
dependencies:
|
|
||||||
bytes "3.1.2"
|
|
||||||
content-type "~1.0.4"
|
|
||||||
debug "2.6.9"
|
|
||||||
depd "2.0.0"
|
|
||||||
destroy "1.2.0"
|
|
||||||
http-errors "2.0.0"
|
|
||||||
iconv-lite "0.4.24"
|
|
||||||
on-finished "2.4.1"
|
|
||||||
qs "6.11.0"
|
|
||||||
raw-body "2.5.1"
|
|
||||||
type-is "~1.6.18"
|
|
||||||
unpipe "1.0.0"
|
|
||||||
|
|
||||||
body-parser@^1.20.1:
|
|
||||||
version "1.20.2"
|
version "1.20.2"
|
||||||
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd"
|
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd"
|
||||||
integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==
|
integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==
|
||||||
@@ -2473,10 +2455,10 @@ cookie-signature@1.0.6:
|
|||||||
resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
|
resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
|
||||||
integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==
|
integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==
|
||||||
|
|
||||||
cookie@0.5.0:
|
cookie@0.6.0:
|
||||||
version "0.5.0"
|
version "0.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
|
||||||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
|
||||||
|
|
||||||
copyfiles@^2.4.1:
|
copyfiles@^2.4.1:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
@@ -3033,13 +3015,14 @@ es-module-lexer@^1.2.1:
|
|||||||
resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.0.tgz#6be9c9e0b4543a60cd166ff6f8b4e9dae0b0c16f"
|
resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.0.tgz#6be9c9e0b4543a60cd166ff6f8b4e9dae0b0c16f"
|
||||||
integrity sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==
|
integrity sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==
|
||||||
|
|
||||||
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
|
||||||
version "0.10.62"
|
version "0.10.64"
|
||||||
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5"
|
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714"
|
||||||
integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==
|
integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==
|
||||||
dependencies:
|
dependencies:
|
||||||
es6-iterator "^2.0.3"
|
es6-iterator "^2.0.3"
|
||||||
es6-symbol "^3.1.3"
|
es6-symbol "^3.1.3"
|
||||||
|
esniff "^2.0.1"
|
||||||
next-tick "^1.1.0"
|
next-tick "^1.1.0"
|
||||||
|
|
||||||
es6-iterator@^2.0.3:
|
es6-iterator@^2.0.3:
|
||||||
@@ -3097,6 +3080,16 @@ eslint-scope@5.1.1:
|
|||||||
esrecurse "^4.3.0"
|
esrecurse "^4.3.0"
|
||||||
estraverse "^4.1.1"
|
estraverse "^4.1.1"
|
||||||
|
|
||||||
|
esniff@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308"
|
||||||
|
integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==
|
||||||
|
dependencies:
|
||||||
|
d "^1.0.1"
|
||||||
|
es5-ext "^0.10.62"
|
||||||
|
event-emitter "^0.3.5"
|
||||||
|
type "^2.7.2"
|
||||||
|
|
||||||
esrecurse@^4.3.0:
|
esrecurse@^4.3.0:
|
||||||
version "4.3.0"
|
version "4.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
|
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
|
||||||
@@ -3154,17 +3147,17 @@ express-rate-limit@^5.5.1:
|
|||||||
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2"
|
||||||
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg==
|
||||||
|
|
||||||
express@^4.17.1, express@^4.18.2:
|
express@^4.18.2, express@^4.19.2:
|
||||||
version "4.18.2"
|
version "4.19.2"
|
||||||
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465"
|
||||||
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
accepts "~1.3.8"
|
accepts "~1.3.8"
|
||||||
array-flatten "1.1.1"
|
array-flatten "1.1.1"
|
||||||
body-parser "1.20.1"
|
body-parser "1.20.2"
|
||||||
content-disposition "0.5.4"
|
content-disposition "0.5.4"
|
||||||
content-type "~1.0.4"
|
content-type "~1.0.4"
|
||||||
cookie "0.5.0"
|
cookie "0.6.0"
|
||||||
cookie-signature "1.0.6"
|
cookie-signature "1.0.6"
|
||||||
debug "2.6.9"
|
debug "2.6.9"
|
||||||
depd "2.0.0"
|
depd "2.0.0"
|
||||||
@@ -3748,9 +3741,9 @@ interpret@^2.2.0:
|
|||||||
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
||||||
|
|
||||||
ip@^2.0.0:
|
ip@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
|
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105"
|
||||||
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
|
integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==
|
||||||
|
|
||||||
ipaddr.js@1.9.1:
|
ipaddr.js@1.9.1:
|
||||||
version "1.9.1"
|
version "1.9.1"
|
||||||
@@ -5675,16 +5668,6 @@ range-parser@^1.2.1, range-parser@~1.2.1:
|
|||||||
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
|
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
|
||||||
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
|
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
|
||||||
|
|
||||||
raw-body@2.5.1:
|
|
||||||
version "2.5.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857"
|
|
||||||
integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==
|
|
||||||
dependencies:
|
|
||||||
bytes "3.1.2"
|
|
||||||
http-errors "2.0.0"
|
|
||||||
iconv-lite "0.4.24"
|
|
||||||
unpipe "1.0.0"
|
|
||||||
|
|
||||||
raw-body@2.5.2:
|
raw-body@2.5.2:
|
||||||
version "2.5.2"
|
version "2.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a"
|
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a"
|
||||||
|
|||||||
24
package.json
24
package.json
@@ -15,9 +15,13 @@
|
|||||||
"dev:generate-graphql-schema": "ts-node -T ./test/generateGraphQLSchema.ts",
|
"dev:generate-graphql-schema": "ts-node -T ./test/generateGraphQLSchema.ts",
|
||||||
"dev:generate-types": "ts-node -T ./test/generateTypes.ts",
|
"dev:generate-types": "ts-node -T ./test/generateTypes.ts",
|
||||||
"dev:postgres": "pnpm --filter payload run dev:postgres",
|
"dev:postgres": "pnpm --filter payload run dev:postgres",
|
||||||
|
"docker:restart": "pnpm docker:stop --remove-orphans && pnpm docker:start",
|
||||||
|
"docker:start": "docker compose -f packages/plugin-cloud-storage/docker-compose.yml up -d",
|
||||||
|
"docker:stop": "docker compose -f packages/plugin-cloud-storage/docker-compose.yml down",
|
||||||
"fix": "eslint \"packages/**/*.ts\" --fix",
|
"fix": "eslint \"packages/**/*.ts\" --fix",
|
||||||
"lint": "eslint \"packages/**/*.ts\"",
|
"lint": "eslint \"packages/**/*.ts\"",
|
||||||
"lint-staged": "lint-staged",
|
"lint-staged": "lint-staged",
|
||||||
|
"prepare": "husky install",
|
||||||
"pretest": "pnpm build",
|
"pretest": "pnpm build",
|
||||||
"reinstall": "pnpm clean:unix && pnpm install",
|
"reinstall": "pnpm clean:unix && pnpm install",
|
||||||
"script:list-packages": "tsx ./scripts/list-packages.ts",
|
"script:list-packages": "tsx ./scripts/list-packages.ts",
|
||||||
@@ -29,10 +33,10 @@
|
|||||||
"test:e2e:headed": "cross-env DISABLE_LOGGING=true playwright test --headed",
|
"test:e2e:headed": "cross-env DISABLE_LOGGING=true playwright test --headed",
|
||||||
"test:int:postgres": "cross-env PAYLOAD_DATABASE=postgres DISABLE_LOGGING=true jest --forceExit --detectOpenHandles",
|
"test:int:postgres": "cross-env PAYLOAD_DATABASE=postgres DISABLE_LOGGING=true jest --forceExit --detectOpenHandles",
|
||||||
"test:int": "cross-env DISABLE_LOGGING=true jest --forceExit --detectOpenHandles",
|
"test:int": "cross-env DISABLE_LOGGING=true jest --forceExit --detectOpenHandles",
|
||||||
"translateNewKeys": "pnpm --filter payload run translateNewKeys",
|
"translateNewKeys": "pnpm --filter payload run translateNewKeys"
|
||||||
"prepare": "husky install"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@aws-sdk/client-s3": "^3.142.0",
|
||||||
"@payloadcms/eslint-config": "workspace:*",
|
"@payloadcms/eslint-config": "workspace:*",
|
||||||
"@playwright/test": "1.40.1",
|
"@playwright/test": "1.40.1",
|
||||||
"@swc/cli": "^0.1.62",
|
"@swc/cli": "^0.1.62",
|
||||||
@@ -77,12 +81,12 @@
|
|||||||
"jest": "29.7.0",
|
"jest": "29.7.0",
|
||||||
"jest-environment-jsdom": "29.7.0",
|
"jest-environment-jsdom": "29.7.0",
|
||||||
"jwt-decode": "3.1.2",
|
"jwt-decode": "3.1.2",
|
||||||
"lexical": "0.12.5",
|
"lexical": "0.13.1",
|
||||||
"lint-staged": "^14.0.1",
|
"lint-staged": "^14.0.1",
|
||||||
"minimist": "1.2.8",
|
"minimist": "1.2.8",
|
||||||
"mongodb-memory-server": "^9",
|
"mongodb-memory-server": "^9",
|
||||||
"node-fetch": "2.6.12",
|
"node-fetch": "2.6.12",
|
||||||
"nodemon": "3.0.2",
|
"nodemon": "3.0.3",
|
||||||
"prettier": "^3.0.3",
|
"prettier": "^3.0.3",
|
||||||
"prompts": "2.4.2",
|
"prompts": "2.4.2",
|
||||||
"qs": "6.11.2",
|
"qs": "6.11.2",
|
||||||
@@ -106,12 +110,12 @@
|
|||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"copyfiles": "2.4.1",
|
"copyfiles": "$copyfiles",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "$cross-env",
|
||||||
"dotenv": "8.6.0",
|
"dotenv": "$dotenv",
|
||||||
"drizzle-orm": "0.29.3",
|
"drizzle-orm": "$drizzle-orm",
|
||||||
"ts-node": "10.9.2",
|
"ts-node": "$ts-node",
|
||||||
"typescript": "5.2.2"
|
"typescript": "$typescript"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
"name": "@payloadcms/bundler-vite",
|
"name": "@payloadcms/bundler-vite",
|
||||||
"version": "0.1.6",
|
"version": "0.1.6",
|
||||||
"description": "The officially supported Vite bundler adapter for Payload",
|
"description": "The officially supported Vite bundler adapter for Payload",
|
||||||
"repository": "https://github.com/payloadcms/payload",
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/payloadcms/payload.git",
|
||||||
|
"directory": "packages/bundler-vite"
|
||||||
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://payloadcms.com",
|
"homepage": "https://payloadcms.com",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
"name": "@payloadcms/bundler-webpack",
|
"name": "@payloadcms/bundler-webpack",
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"description": "The officially supported Webpack bundler adapter for Payload",
|
"description": "The officially supported Webpack bundler adapter for Payload",
|
||||||
"repository": "https://github.com/payloadcms/payload",
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/payloadcms/payload.git",
|
||||||
|
"directory": "packages/bundler-webpack"
|
||||||
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://payloadcms.com",
|
"homepage": "https://payloadcms.com",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -2,9 +2,15 @@
|
|||||||
"name": "create-payload-app",
|
"name": "create-payload-app",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"homepage": "https://payloadcms.com",
|
||||||
"bin": {
|
"bin": {
|
||||||
"create-payload-app": "bin/cli.js"
|
"create-payload-app": "bin/cli.js"
|
||||||
},
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/payloadcms/payload.git",
|
||||||
|
"directory": "packages/create-payload-app"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "pnpm build:swc",
|
"build": "pnpm build:swc",
|
||||||
"build:swc": "swc ./src -d ./dist --config-file .swcrc",
|
"build:swc": "swc ./src -d ./dist --config-file .swcrc",
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@payloadcms/db-mongodb",
|
"name": "@payloadcms/db-mongodb",
|
||||||
"version": "1.4.0",
|
"version": "1.4.3",
|
||||||
"description": "The officially supported MongoDB database adapter for Payload",
|
"description": "The officially supported MongoDB database adapter for Payload",
|
||||||
"repository": "https://github.com/payloadcms/payload",
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/payloadcms/payload.git",
|
||||||
|
"directory": "packages/db-mongodb"
|
||||||
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://payloadcms.com",
|
"homepage": "https://payloadcms.com",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ export const findVersions: FindVersions = async function findVersions(
|
|||||||
lean: true,
|
lean: true,
|
||||||
leanWithId: true,
|
leanWithId: true,
|
||||||
limit,
|
limit,
|
||||||
offset: skip || 0,
|
|
||||||
options,
|
options,
|
||||||
page,
|
page,
|
||||||
pagination,
|
pagination,
|
||||||
|
|||||||
@@ -14,8 +14,10 @@ import type {
|
|||||||
DateField,
|
DateField,
|
||||||
EmailField,
|
EmailField,
|
||||||
Field,
|
Field,
|
||||||
|
FieldAffectingData,
|
||||||
GroupField,
|
GroupField,
|
||||||
JSONField,
|
JSONField,
|
||||||
|
NonPresentationalField,
|
||||||
NumberField,
|
NumberField,
|
||||||
PointField,
|
PointField,
|
||||||
RadioField,
|
RadioField,
|
||||||
@@ -23,12 +25,12 @@ import type {
|
|||||||
RichTextField,
|
RichTextField,
|
||||||
RowField,
|
RowField,
|
||||||
SelectField,
|
SelectField,
|
||||||
|
Tab,
|
||||||
TabsField,
|
TabsField,
|
||||||
TextField,
|
TextField,
|
||||||
TextareaField,
|
TextareaField,
|
||||||
UploadField,
|
UploadField,
|
||||||
} from 'payload/types'
|
} from 'payload/types'
|
||||||
import type { FieldAffectingData, NonPresentationalField, Tab, UnnamedTab } from 'payload/types'
|
|
||||||
|
|
||||||
import { Schema } from 'mongoose'
|
import { Schema } from 'mongoose'
|
||||||
import {
|
import {
|
||||||
@@ -61,7 +63,15 @@ const formatBaseSchema = (field: FieldAffectingData, buildSchemaOptions: BuildSc
|
|||||||
unique: (!disableUnique && field.unique) || false,
|
unique: (!disableUnique && field.unique) || false,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (schema.unique && (field.localized || draftsEnabled)) {
|
if (
|
||||||
|
schema.unique &&
|
||||||
|
(field.localized ||
|
||||||
|
draftsEnabled ||
|
||||||
|
(fieldAffectsData(field) &&
|
||||||
|
field.type !== 'group' &&
|
||||||
|
field.type !== 'tab' &&
|
||||||
|
field.required !== true))
|
||||||
|
) {
|
||||||
schema.sparse = true
|
schema.sparse = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,7 +89,6 @@ const localizeSchema = (
|
|||||||
) => {
|
) => {
|
||||||
if (fieldIsLocalized(entity) && localization && Array.isArray(localization.locales)) {
|
if (fieldIsLocalized(entity) && localization && Array.isArray(localization.locales)) {
|
||||||
return {
|
return {
|
||||||
localized: true,
|
|
||||||
type: localization.localeCodes.reduce(
|
type: localization.localeCodes.reduce(
|
||||||
(localeSchema, locale) => ({
|
(localeSchema, locale) => ({
|
||||||
...localeSchema,
|
...localeSchema,
|
||||||
@@ -89,6 +98,7 @@ const localizeSchema = (
|
|||||||
_id: false,
|
_id: false,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
localized: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return schema
|
return schema
|
||||||
@@ -140,7 +150,6 @@ const fieldToSchemaMap: Record<string, FieldSchemaGenerator> = {
|
|||||||
) => {
|
) => {
|
||||||
const baseSchema = {
|
const baseSchema = {
|
||||||
...formatBaseSchema(field, buildSchemaOptions),
|
...formatBaseSchema(field, buildSchemaOptions),
|
||||||
default: undefined,
|
|
||||||
type: [
|
type: [
|
||||||
buildSchema(config, field.fields, {
|
buildSchema(config, field.fields, {
|
||||||
allowIDField: true,
|
allowIDField: true,
|
||||||
@@ -153,6 +162,7 @@ const fieldToSchemaMap: Record<string, FieldSchemaGenerator> = {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
default: undefined,
|
||||||
}
|
}
|
||||||
|
|
||||||
schema.add({
|
schema.add({
|
||||||
@@ -166,8 +176,8 @@ const fieldToSchemaMap: Record<string, FieldSchemaGenerator> = {
|
|||||||
buildSchemaOptions: BuildSchemaOptions,
|
buildSchemaOptions: BuildSchemaOptions,
|
||||||
): void => {
|
): void => {
|
||||||
const fieldSchema = {
|
const fieldSchema = {
|
||||||
default: undefined,
|
|
||||||
type: [new Schema({}, { _id: false, discriminatorKey: 'blockType' })],
|
type: [new Schema({}, { _id: false, discriminatorKey: 'blockType' })],
|
||||||
|
default: undefined,
|
||||||
}
|
}
|
||||||
|
|
||||||
schema.add({
|
schema.add({
|
||||||
@@ -187,12 +197,12 @@ const fieldToSchemaMap: Record<string, FieldSchemaGenerator> = {
|
|||||||
if (field.localized && config.localization) {
|
if (field.localized && config.localization) {
|
||||||
config.localization.localeCodes.forEach((localeCode) => {
|
config.localization.localeCodes.forEach((localeCode) => {
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore Possible incorrect typing in mongoose types, this works
|
// @ts-expect-error Possible incorrect typing in mongoose types, this works
|
||||||
schema.path(`${field.name}.${localeCode}`).discriminator(blockItem.slug, blockSchema)
|
schema.path(`${field.name}.${localeCode}`).discriminator(blockItem.slug, blockSchema)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore Possible incorrect typing in mongoose types, this works
|
// @ts-expect-error Possible incorrect typing in mongoose types, this works
|
||||||
schema.path(field.name).discriminator(blockItem.slug, blockSchema)
|
schema.path(field.name).discriminator(blockItem.slug, blockSchema)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -325,14 +335,14 @@ const fieldToSchemaMap: Record<string, FieldSchemaGenerator> = {
|
|||||||
buildSchemaOptions: BuildSchemaOptions,
|
buildSchemaOptions: BuildSchemaOptions,
|
||||||
): void => {
|
): void => {
|
||||||
const baseSchema: SchemaTypeOptions<unknown> = {
|
const baseSchema: SchemaTypeOptions<unknown> = {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
enum: ['Point'],
|
||||||
|
},
|
||||||
coordinates: {
|
coordinates: {
|
||||||
|
type: [Number],
|
||||||
default: field.defaultValue || undefined,
|
default: field.defaultValue || undefined,
|
||||||
required: false,
|
required: false,
|
||||||
type: [Number],
|
|
||||||
},
|
|
||||||
type: {
|
|
||||||
enum: ['Point'],
|
|
||||||
type: String,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
if (buildSchemaOptions.disableUnique && field.unique && field.localized) {
|
if (buildSchemaOptions.disableUnique && field.unique && field.localized) {
|
||||||
@@ -366,11 +376,11 @@ const fieldToSchemaMap: Record<string, FieldSchemaGenerator> = {
|
|||||||
): void => {
|
): void => {
|
||||||
const baseSchema = {
|
const baseSchema = {
|
||||||
...formatBaseSchema(field, buildSchemaOptions),
|
...formatBaseSchema(field, buildSchemaOptions),
|
||||||
|
type: String,
|
||||||
enum: field.options.map((option) => {
|
enum: field.options.map((option) => {
|
||||||
if (typeof option === 'object') return option.value
|
if (typeof option === 'object') return option.value
|
||||||
return option
|
return option
|
||||||
}),
|
}),
|
||||||
type: String,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
schema.add({
|
schema.add({
|
||||||
@@ -388,7 +398,6 @@ const fieldToSchemaMap: Record<string, FieldSchemaGenerator> = {
|
|||||||
|
|
||||||
if (field.localized && config.localization) {
|
if (field.localized && config.localization) {
|
||||||
schemaToReturn = {
|
schemaToReturn = {
|
||||||
localized: true,
|
|
||||||
type: config.localization.localeCodes.reduce((locales, locale) => {
|
type: config.localization.localeCodes.reduce((locales, locale) => {
|
||||||
let localeSchema: { [key: string]: any } = {}
|
let localeSchema: { [key: string]: any } = {}
|
||||||
|
|
||||||
@@ -396,56 +405,57 @@ const fieldToSchemaMap: Record<string, FieldSchemaGenerator> = {
|
|||||||
localeSchema = {
|
localeSchema = {
|
||||||
...formatBaseSchema(field, buildSchemaOptions),
|
...formatBaseSchema(field, buildSchemaOptions),
|
||||||
_id: false,
|
_id: false,
|
||||||
relationTo: { enum: field.relationTo, type: String },
|
|
||||||
type: Schema.Types.Mixed,
|
type: Schema.Types.Mixed,
|
||||||
|
relationTo: { type: String, enum: field.relationTo },
|
||||||
value: {
|
value: {
|
||||||
refPath: `${field.name}.${locale}.relationTo`,
|
|
||||||
type: Schema.Types.Mixed,
|
type: Schema.Types.Mixed,
|
||||||
|
refPath: `${field.name}.${locale}.relationTo`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
localeSchema = {
|
localeSchema = {
|
||||||
...formatBaseSchema(field, buildSchemaOptions),
|
...formatBaseSchema(field, buildSchemaOptions),
|
||||||
ref: field.relationTo,
|
|
||||||
type: Schema.Types.Mixed,
|
type: Schema.Types.Mixed,
|
||||||
|
ref: field.relationTo,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...locales,
|
...locales,
|
||||||
[locale]: field.hasMany ? { default: undefined, type: [localeSchema] } : localeSchema,
|
[locale]: field.hasMany ? { type: [localeSchema], default: undefined } : localeSchema,
|
||||||
}
|
}
|
||||||
}, {}),
|
}, {}),
|
||||||
|
localized: true,
|
||||||
}
|
}
|
||||||
} else if (hasManyRelations) {
|
} else if (hasManyRelations) {
|
||||||
schemaToReturn = {
|
schemaToReturn = {
|
||||||
...formatBaseSchema(field, buildSchemaOptions),
|
...formatBaseSchema(field, buildSchemaOptions),
|
||||||
_id: false,
|
_id: false,
|
||||||
relationTo: { enum: field.relationTo, type: String },
|
|
||||||
type: Schema.Types.Mixed,
|
type: Schema.Types.Mixed,
|
||||||
|
relationTo: { type: String, enum: field.relationTo },
|
||||||
value: {
|
value: {
|
||||||
refPath: `${field.name}.relationTo`,
|
|
||||||
type: Schema.Types.Mixed,
|
type: Schema.Types.Mixed,
|
||||||
|
refPath: `${field.name}.relationTo`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if (field.hasMany) {
|
if (field.hasMany) {
|
||||||
schemaToReturn = {
|
schemaToReturn = {
|
||||||
default: undefined,
|
|
||||||
type: [schemaToReturn],
|
type: [schemaToReturn],
|
||||||
|
default: undefined,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
schemaToReturn = {
|
schemaToReturn = {
|
||||||
...formatBaseSchema(field, buildSchemaOptions),
|
...formatBaseSchema(field, buildSchemaOptions),
|
||||||
ref: field.relationTo,
|
|
||||||
type: Schema.Types.Mixed,
|
type: Schema.Types.Mixed,
|
||||||
|
ref: field.relationTo,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (field.hasMany) {
|
if (field.hasMany) {
|
||||||
schemaToReturn = {
|
schemaToReturn = {
|
||||||
default: undefined,
|
|
||||||
type: [schemaToReturn],
|
type: [schemaToReturn],
|
||||||
|
default: undefined,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -488,11 +498,11 @@ const fieldToSchemaMap: Record<string, FieldSchemaGenerator> = {
|
|||||||
): void => {
|
): void => {
|
||||||
const baseSchema = {
|
const baseSchema = {
|
||||||
...formatBaseSchema(field, buildSchemaOptions),
|
...formatBaseSchema(field, buildSchemaOptions),
|
||||||
|
type: String,
|
||||||
enum: field.options.map((option) => {
|
enum: field.options.map((option) => {
|
||||||
if (typeof option === 'object') return option.value
|
if (typeof option === 'object') return option.value
|
||||||
return option
|
return option
|
||||||
}),
|
}),
|
||||||
type: String,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buildSchemaOptions.draftsEnabled || !field.required) {
|
if (buildSchemaOptions.draftsEnabled || !field.required) {
|
||||||
@@ -576,8 +586,8 @@ const fieldToSchemaMap: Record<string, FieldSchemaGenerator> = {
|
|||||||
): void => {
|
): void => {
|
||||||
const baseSchema = {
|
const baseSchema = {
|
||||||
...formatBaseSchema(field, buildSchemaOptions),
|
...formatBaseSchema(field, buildSchemaOptions),
|
||||||
ref: field.relationTo,
|
|
||||||
type: Schema.Types.Mixed,
|
type: Schema.Types.Mixed,
|
||||||
|
ref: field.relationTo,
|
||||||
}
|
}
|
||||||
|
|
||||||
schema.add({
|
schema.add({
|
||||||
|
|||||||
@@ -157,6 +157,23 @@ export const sanitizeQueryValue = ({
|
|||||||
|
|
||||||
if (operator === 'exists') {
|
if (operator === 'exists') {
|
||||||
formattedValue = formattedValue === 'true' || formattedValue === true
|
formattedValue = formattedValue === 'true' || formattedValue === true
|
||||||
|
|
||||||
|
// Clearable fields
|
||||||
|
if (['relationship', 'select', 'upload'].includes(field.type)) {
|
||||||
|
if (formattedValue) {
|
||||||
|
return {
|
||||||
|
rawQuery: {
|
||||||
|
$and: [{ [path]: { $exists: true } }, { [path]: { $ne: null } }],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
rawQuery: {
|
||||||
|
$or: [{ [path]: { $exists: false } }, { [path]: { $eq: null } }],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return { operator: formattedOperator, val: formattedValue }
|
return { operator: formattedOperator, val: formattedValue }
|
||||||
|
|||||||
@@ -17,7 +17,11 @@ export const rollbackTransaction: RollbackTransaction = async function rollbackT
|
|||||||
}
|
}
|
||||||
|
|
||||||
// the first call for rollback should be aborted and deleted causing any other operations with the same transaction to fail
|
// the first call for rollback should be aborted and deleted causing any other operations with the same transaction to fail
|
||||||
await this.sessions[id].abortTransaction()
|
try {
|
||||||
await this.sessions[id].endSession()
|
await this.sessions[id].abortTransaction()
|
||||||
|
await this.sessions[id].endSession()
|
||||||
|
} catch (error) {
|
||||||
|
// ignore the error as it is likely a race condition from multiple errors
|
||||||
|
}
|
||||||
delete this.sessions[id]
|
delete this.sessions[id]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@payloadcms/db-postgres",
|
"name": "@payloadcms/db-postgres",
|
||||||
"version": "0.5.1",
|
"version": "0.7.1",
|
||||||
"description": "The officially supported Postgres database adapter for Payload",
|
"description": "The officially supported Postgres database adapter for Payload",
|
||||||
"repository": "https://github.com/payloadcms/payload",
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/payloadcms/payload.git",
|
||||||
|
"directory": "packages/db-postgres"
|
||||||
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://payloadcms.com",
|
"homepage": "https://payloadcms.com",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -1,13 +1,51 @@
|
|||||||
|
import type { Payload } from 'payload'
|
||||||
import type { Connect } from 'payload/database'
|
import type { Connect } from 'payload/database'
|
||||||
|
|
||||||
import { eq, sql } from 'drizzle-orm'
|
import { eq, sql } from 'drizzle-orm'
|
||||||
import { drizzle } from 'drizzle-orm/node-postgres'
|
import { drizzle } from 'drizzle-orm/node-postgres'
|
||||||
import { numeric, pgTable, timestamp, varchar } from 'drizzle-orm/pg-core'
|
import { numeric, timestamp, varchar } from 'drizzle-orm/pg-core'
|
||||||
import { Pool } from 'pg'
|
import { Pool } from 'pg'
|
||||||
import prompts from 'prompts'
|
import prompts from 'prompts'
|
||||||
|
|
||||||
import type { PostgresAdapter } from './types'
|
import type { PostgresAdapter } from './types'
|
||||||
|
|
||||||
|
const connectWithReconnect = async function ({
|
||||||
|
adapter,
|
||||||
|
payload,
|
||||||
|
reconnect = false,
|
||||||
|
}: {
|
||||||
|
adapter: PostgresAdapter
|
||||||
|
payload: Payload
|
||||||
|
reconnect?: boolean
|
||||||
|
}) {
|
||||||
|
let result
|
||||||
|
|
||||||
|
if (!reconnect) {
|
||||||
|
result = await adapter.pool.connect()
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
result = await adapter.pool.connect()
|
||||||
|
} catch (err) {
|
||||||
|
setTimeout(() => {
|
||||||
|
payload.logger.info('Reconnecting to postgres')
|
||||||
|
void connectWithReconnect({ adapter, payload, reconnect: true })
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!result) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
result.prependListener('error', (err) => {
|
||||||
|
try {
|
||||||
|
if (err.code === 'ECONNRESET') {
|
||||||
|
void connectWithReconnect({ adapter, payload, reconnect: true })
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
// swallow error
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export const connect: Connect = async function connect(this: PostgresAdapter, payload) {
|
export const connect: Connect = async function connect(this: PostgresAdapter, payload) {
|
||||||
this.schema = {
|
this.schema = {
|
||||||
...this.tables,
|
...this.tables,
|
||||||
@@ -17,14 +55,19 @@ export const connect: Connect = async function connect(this: PostgresAdapter, pa
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
this.pool = new Pool(this.poolOptions)
|
this.pool = new Pool(this.poolOptions)
|
||||||
await this.pool.connect()
|
await connectWithReconnect({ adapter: this, payload })
|
||||||
|
|
||||||
const logger = this.logger || false
|
const logger = this.logger || false
|
||||||
|
|
||||||
this.drizzle = drizzle(this.pool, { schema: this.schema, logger })
|
this.drizzle = drizzle(this.pool, { logger, schema: this.schema })
|
||||||
if (process.env.PAYLOAD_DROP_DATABASE === 'true') {
|
if (process.env.PAYLOAD_DROP_DATABASE === 'true') {
|
||||||
this.payload.logger.info('---- DROPPING TABLES ----')
|
this.payload.logger.info(`---- DROPPING TABLES SCHEMA(${this.schemaName || 'public'}) ----`)
|
||||||
await this.drizzle.execute(sql`drop schema public cascade;
|
await this.drizzle.execute(
|
||||||
create schema public;`)
|
sql.raw(`
|
||||||
|
drop schema if exists ${this.schemaName || 'public'} cascade;
|
||||||
|
create schema ${this.schemaName || 'public'};
|
||||||
|
`),
|
||||||
|
)
|
||||||
this.payload.logger.info('---- DROPPED TABLES ----')
|
this.payload.logger.info('---- DROPPED TABLES ----')
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -81,7 +124,7 @@ export const connect: Connect = async function connect(this: PostgresAdapter, pa
|
|||||||
await apply()
|
await apply()
|
||||||
|
|
||||||
// Migration table def in order to use query using drizzle
|
// Migration table def in order to use query using drizzle
|
||||||
const migrationsSchema = pgTable('payload_migrations', {
|
const migrationsSchema = this.pgSchema.table('payload_migrations', {
|
||||||
name: varchar('name'),
|
name: varchar('name'),
|
||||||
batch: numeric('batch'),
|
batch: numeric('batch'),
|
||||||
created_at: timestamp('created_at'),
|
created_at: timestamp('created_at'),
|
||||||
|
|||||||
@@ -1,47 +1,68 @@
|
|||||||
import type { DeleteOne } from 'payload/database'
|
import type { DeleteOne } from 'payload/database'
|
||||||
import type { PayloadRequest } from 'payload/types'
|
import type { PayloadRequest } from 'payload/types'
|
||||||
|
|
||||||
|
import { eq } from 'drizzle-orm'
|
||||||
import toSnakeCase from 'to-snake-case'
|
import toSnakeCase from 'to-snake-case'
|
||||||
|
|
||||||
import type { PostgresAdapter } from './types'
|
import type { PostgresAdapter } from './types'
|
||||||
|
|
||||||
import { buildFindManyArgs } from './find/buildFindManyArgs'
|
import { buildFindManyArgs } from './find/buildFindManyArgs'
|
||||||
import buildQuery from './queries/buildQuery'
|
import buildQuery from './queries/buildQuery'
|
||||||
|
import { selectDistinct } from './queries/selectDistinct'
|
||||||
import { transform } from './transform/read'
|
import { transform } from './transform/read'
|
||||||
|
|
||||||
export const deleteOne: DeleteOne = async function deleteOne(
|
export const deleteOne: DeleteOne = async function deleteOne(
|
||||||
this: PostgresAdapter,
|
this: PostgresAdapter,
|
||||||
{ collection, req = {} as PayloadRequest, where: incomingWhere },
|
{ collection: collectionSlug, req = {} as PayloadRequest, where: whereArg },
|
||||||
) {
|
) {
|
||||||
const db = this.sessions[req.transactionID]?.db || this.drizzle
|
const db = this.sessions[req.transactionID]?.db || this.drizzle
|
||||||
const collectionConfig = this.payload.collections[collection].config
|
const collection = this.payload.collections[collectionSlug].config
|
||||||
const tableName = toSnakeCase(collection)
|
const tableName = toSnakeCase(collectionSlug)
|
||||||
|
let docToDelete: Record<string, unknown>
|
||||||
|
|
||||||
const { where } = await buildQuery({
|
const { joinAliases, joins, selectFields, where } = await buildQuery({
|
||||||
adapter: this,
|
adapter: this,
|
||||||
fields: collectionConfig.fields,
|
fields: collection.fields,
|
||||||
|
locale: req.locale,
|
||||||
tableName,
|
tableName,
|
||||||
where: incomingWhere,
|
where: whereArg,
|
||||||
})
|
})
|
||||||
|
|
||||||
const findManyArgs = buildFindManyArgs({
|
const selectDistinctResult = await selectDistinct({
|
||||||
adapter: this,
|
adapter: this,
|
||||||
depth: 0,
|
chainedMethods: [{ args: [1], method: 'limit' }],
|
||||||
fields: collectionConfig.fields,
|
db,
|
||||||
|
joinAliases,
|
||||||
|
joins,
|
||||||
|
selectFields,
|
||||||
tableName,
|
tableName,
|
||||||
|
where,
|
||||||
})
|
})
|
||||||
|
|
||||||
findManyArgs.where = where
|
if (selectDistinctResult?.[0]?.id) {
|
||||||
|
docToDelete = await db.query[tableName].findFirst({
|
||||||
|
where: eq(this.tables[tableName].id, selectDistinctResult[0].id),
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
const findManyArgs = buildFindManyArgs({
|
||||||
|
adapter: this,
|
||||||
|
depth: 0,
|
||||||
|
fields: collection.fields,
|
||||||
|
tableName,
|
||||||
|
})
|
||||||
|
|
||||||
const docToDelete = await db.query[tableName].findFirst(findManyArgs)
|
findManyArgs.where = where
|
||||||
|
|
||||||
|
docToDelete = await db.query[tableName].findFirst(findManyArgs)
|
||||||
|
}
|
||||||
|
|
||||||
const result = transform({
|
const result = transform({
|
||||||
config: this.payload.config,
|
config: this.payload.config,
|
||||||
data: docToDelete,
|
data: docToDelete,
|
||||||
fields: collectionConfig.fields,
|
fields: collection.fields,
|
||||||
})
|
})
|
||||||
|
|
||||||
await db.delete(this.tables[tableName]).where(where)
|
await db.delete(this.tables[tableName]).where(eq(this.tables[tableName].id, docToDelete.id))
|
||||||
|
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import type { QueryPromise } from 'drizzle-orm'
|
||||||
|
|
||||||
export type ChainedMethods = {
|
export type ChainedMethods = {
|
||||||
args: unknown[]
|
args: unknown[]
|
||||||
method: string
|
method: string
|
||||||
@@ -8,7 +10,7 @@ export type ChainedMethods = {
|
|||||||
* @param methods
|
* @param methods
|
||||||
* @param query
|
* @param query
|
||||||
*/
|
*/
|
||||||
const chainMethods = ({ methods, query }): Promise<unknown> => {
|
const chainMethods = <T>({ methods, query }): QueryPromise<T> => {
|
||||||
return methods.reduce((query, { args, method }) => {
|
return methods.reduce((query, { args, method }) => {
|
||||||
return query[method](...args)
|
return query[method](...args)
|
||||||
}, query)
|
}, query)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import type { PostgresAdapter } from '../types'
|
|||||||
import type { ChainedMethods } from './chainMethods'
|
import type { ChainedMethods } from './chainMethods'
|
||||||
|
|
||||||
import buildQuery from '../queries/buildQuery'
|
import buildQuery from '../queries/buildQuery'
|
||||||
|
import { selectDistinct } from '../queries/selectDistinct'
|
||||||
import { transform } from '../transform/read'
|
import { transform } from '../transform/read'
|
||||||
import { buildFindManyArgs } from './buildFindManyArgs'
|
import { buildFindManyArgs } from './buildFindManyArgs'
|
||||||
import { chainMethods } from './chainMethods'
|
import { chainMethods } from './chainMethods'
|
||||||
@@ -39,7 +40,6 @@ export const findMany = async function find({
|
|||||||
let hasPrevPage: boolean
|
let hasPrevPage: boolean
|
||||||
let hasNextPage: boolean
|
let hasNextPage: boolean
|
||||||
let pagingCounter: number
|
let pagingCounter: number
|
||||||
let selectDistinctResult
|
|
||||||
|
|
||||||
const { joinAliases, joins, orderBy, selectFields, where } = await buildQuery({
|
const { joinAliases, joins, orderBy, selectFields, where } = await buildQuery({
|
||||||
adapter,
|
adapter,
|
||||||
@@ -69,36 +69,21 @@ export const findMany = async function find({
|
|||||||
tableName,
|
tableName,
|
||||||
})
|
})
|
||||||
|
|
||||||
// only fetch IDs when a sort or where query is used that needs to be done on join tables, otherwise these can be done directly on the table in findMany
|
selectDistinctMethods.push({ args: [skip || (page - 1) * limit], method: 'offset' })
|
||||||
if (Object.keys(joins).length > 0 || joinAliases.length > 0) {
|
selectDistinctMethods.push({ args: [limit === 0 ? undefined : limit], method: 'limit' })
|
||||||
if (where) {
|
|
||||||
selectDistinctMethods.push({ args: [where], method: 'where' })
|
|
||||||
}
|
|
||||||
|
|
||||||
joinAliases.forEach(({ condition, table }) => {
|
const selectDistinctResult = await selectDistinct({
|
||||||
selectDistinctMethods.push({
|
adapter,
|
||||||
args: [table, condition],
|
chainedMethods: selectDistinctMethods,
|
||||||
method: 'leftJoin',
|
db,
|
||||||
})
|
joinAliases,
|
||||||
})
|
joins,
|
||||||
|
selectFields,
|
||||||
Object.entries(joins).forEach(([joinTable, condition]) => {
|
tableName,
|
||||||
if (joinTable) {
|
where,
|
||||||
selectDistinctMethods.push({
|
})
|
||||||
args: [adapter.tables[joinTable], condition],
|
|
||||||
method: 'leftJoin',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
selectDistinctMethods.push({ args: [skip || (page - 1) * limit], method: 'offset' })
|
|
||||||
selectDistinctMethods.push({ args: [limit === 0 ? undefined : limit], method: 'limit' })
|
|
||||||
|
|
||||||
selectDistinctResult = await chainMethods({
|
|
||||||
methods: selectDistinctMethods,
|
|
||||||
query: db.selectDistinct(selectFields).from(table),
|
|
||||||
})
|
|
||||||
|
|
||||||
|
if (selectDistinctResult) {
|
||||||
if (selectDistinctResult.length === 0) {
|
if (selectDistinctResult.length === 0) {
|
||||||
return {
|
return {
|
||||||
docs: [],
|
docs: [],
|
||||||
@@ -112,13 +97,14 @@ export const findMany = async function find({
|
|||||||
totalDocs: 0,
|
totalDocs: 0,
|
||||||
totalPages: 0,
|
totalPages: 0,
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// set the id in an object for sorting later
|
||||||
|
selectDistinctResult.forEach(({ id }, i) => {
|
||||||
|
orderedIDMap[id] = i
|
||||||
|
})
|
||||||
|
orderedIDs = Object.keys(orderedIDMap)
|
||||||
|
findManyArgs.where = inArray(adapter.tables[tableName].id, orderedIDs)
|
||||||
}
|
}
|
||||||
// set the id in an object for sorting later
|
|
||||||
selectDistinctResult.forEach(({ id }, i) => {
|
|
||||||
orderedIDMap[id as number | string] = i
|
|
||||||
})
|
|
||||||
orderedIDs = Object.keys(orderedIDMap)
|
|
||||||
findManyArgs.where = inArray(adapter.tables[tableName].id, orderedIDs)
|
|
||||||
} else {
|
} else {
|
||||||
findManyArgs.limit = limitArg === 0 ? undefined : limitArg
|
findManyArgs.limit = limitArg === 0 ? undefined : limitArg
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export const traverseFields = ({
|
|||||||
with: {},
|
with: {},
|
||||||
}
|
}
|
||||||
|
|
||||||
const arrayTableName = `${currentTableName}_${toSnakeCase(field.name)}`
|
const arrayTableName = `${currentTableName}_${path}${toSnakeCase(field.name)}`
|
||||||
|
|
||||||
if (adapter.tables[`${arrayTableName}_locales`]) withArray.with._locales = _locales
|
if (adapter.tables[`${arrayTableName}_locales`]) withArray.with._locales = _locales
|
||||||
currentArgs.with[`${path}${field.name}`] = withArray
|
currentArgs.with[`${path}${field.name}`] = withArray
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export type { MigrateDownArgs, MigrateUpArgs } from './types'
|
|||||||
export function postgresAdapter(args: Args): PostgresAdapterResult {
|
export function postgresAdapter(args: Args): PostgresAdapterResult {
|
||||||
function adapter({ payload }: { payload: Payload }) {
|
function adapter({ payload }: { payload: Payload }) {
|
||||||
const migrationDir = findMigrationDir(args.migrationDir)
|
const migrationDir = findMigrationDir(args.migrationDir)
|
||||||
|
const idType = args.idType || 'serial'
|
||||||
return createDatabaseAdapter<PostgresAdapter>({
|
return createDatabaseAdapter<PostgresAdapter>({
|
||||||
name: 'postgres',
|
name: 'postgres',
|
||||||
|
|
||||||
@@ -50,12 +50,15 @@ export function postgresAdapter(args: Args): PostgresAdapterResult {
|
|||||||
drizzle: undefined,
|
drizzle: undefined,
|
||||||
enums: {},
|
enums: {},
|
||||||
fieldConstraints: {},
|
fieldConstraints: {},
|
||||||
|
idType,
|
||||||
logger: args.logger,
|
logger: args.logger,
|
||||||
|
pgSchema: undefined,
|
||||||
pool: undefined,
|
pool: undefined,
|
||||||
poolOptions: args.pool,
|
poolOptions: args.pool,
|
||||||
push: args.push,
|
push: args.push,
|
||||||
relations: {},
|
relations: {},
|
||||||
schema: {},
|
schema: {},
|
||||||
|
schemaName: args.schemaName,
|
||||||
sessions: {},
|
sessions: {},
|
||||||
tables: {},
|
tables: {},
|
||||||
|
|
||||||
@@ -68,7 +71,10 @@ export function postgresAdapter(args: Args): PostgresAdapterResult {
|
|||||||
createGlobalVersion,
|
createGlobalVersion,
|
||||||
createMigration,
|
createMigration,
|
||||||
createVersion,
|
createVersion,
|
||||||
defaultIDType: 'number',
|
/**
|
||||||
|
* This represents how a default ID is treated in Payload as were a field type
|
||||||
|
*/
|
||||||
|
defaultIDType: idType === 'serial' ? 'number' : 'text',
|
||||||
deleteMany,
|
deleteMany,
|
||||||
deleteOne,
|
deleteOne,
|
||||||
deleteVersions,
|
deleteVersions,
|
||||||
|
|||||||
@@ -2,16 +2,21 @@
|
|||||||
import type { Init } from 'payload/database'
|
import type { Init } from 'payload/database'
|
||||||
import type { SanitizedCollectionConfig } from 'payload/types'
|
import type { SanitizedCollectionConfig } from 'payload/types'
|
||||||
|
|
||||||
import { pgEnum } from 'drizzle-orm/pg-core'
|
import { pgEnum, pgSchema, pgTable } from 'drizzle-orm/pg-core'
|
||||||
import { buildVersionCollectionFields, buildVersionGlobalFields } from 'payload/versions'
|
import { buildVersionCollectionFields, buildVersionGlobalFields } from 'payload/versions'
|
||||||
import toSnakeCase from 'to-snake-case'
|
import toSnakeCase from 'to-snake-case'
|
||||||
|
|
||||||
import type { PostgresAdapter } from './types'
|
import type { PostgresAdapter } from './types'
|
||||||
|
|
||||||
import { buildTable } from './schema/build'
|
import { buildTable } from './schema/build'
|
||||||
import { getConfigIDType } from './schema/getConfigIDType'
|
|
||||||
|
|
||||||
export const init: Init = async function init(this: PostgresAdapter) {
|
export const init: Init = async function init(this: PostgresAdapter) {
|
||||||
|
if (this.schemaName) {
|
||||||
|
this.pgSchema = pgSchema(this.schemaName)
|
||||||
|
} else {
|
||||||
|
this.pgSchema = { table: pgTable }
|
||||||
|
}
|
||||||
|
|
||||||
if (this.payload.config.localization) {
|
if (this.payload.config.localization) {
|
||||||
this.enums.enum__locales = pgEnum(
|
this.enums.enum__locales = pgEnum(
|
||||||
'_locales',
|
'_locales',
|
||||||
@@ -24,9 +29,9 @@ export const init: Init = async function init(this: PostgresAdapter) {
|
|||||||
|
|
||||||
buildTable({
|
buildTable({
|
||||||
adapter: this,
|
adapter: this,
|
||||||
buildTexts: true,
|
|
||||||
buildNumbers: true,
|
buildNumbers: true,
|
||||||
buildRelationships: true,
|
buildRelationships: true,
|
||||||
|
buildTexts: true,
|
||||||
disableNotNull: !!collection?.versions?.drafts,
|
disableNotNull: !!collection?.versions?.drafts,
|
||||||
disableUnique: false,
|
disableUnique: false,
|
||||||
fields: collection.fields,
|
fields: collection.fields,
|
||||||
@@ -38,13 +43,11 @@ export const init: Init = async function init(this: PostgresAdapter) {
|
|||||||
const versionsTableName = `_${tableName}_v`
|
const versionsTableName = `_${tableName}_v`
|
||||||
const versionFields = buildVersionCollectionFields(collection)
|
const versionFields = buildVersionCollectionFields(collection)
|
||||||
|
|
||||||
const versionsParentIDColType = getConfigIDType(collection.fields)
|
|
||||||
|
|
||||||
buildTable({
|
buildTable({
|
||||||
adapter: this,
|
adapter: this,
|
||||||
buildTexts: true,
|
|
||||||
buildNumbers: true,
|
buildNumbers: true,
|
||||||
buildRelationships: true,
|
buildRelationships: true,
|
||||||
|
buildTexts: true,
|
||||||
disableNotNull: !!collection.versions?.drafts,
|
disableNotNull: !!collection.versions?.drafts,
|
||||||
disableUnique: true,
|
disableUnique: true,
|
||||||
fields: versionFields,
|
fields: versionFields,
|
||||||
@@ -59,9 +62,9 @@ export const init: Init = async function init(this: PostgresAdapter) {
|
|||||||
|
|
||||||
buildTable({
|
buildTable({
|
||||||
adapter: this,
|
adapter: this,
|
||||||
buildTexts: true,
|
|
||||||
buildNumbers: true,
|
buildNumbers: true,
|
||||||
buildRelationships: true,
|
buildRelationships: true,
|
||||||
|
buildTexts: true,
|
||||||
disableNotNull: !!global?.versions?.drafts,
|
disableNotNull: !!global?.versions?.drafts,
|
||||||
disableUnique: false,
|
disableUnique: false,
|
||||||
fields: global.fields,
|
fields: global.fields,
|
||||||
@@ -75,9 +78,9 @@ export const init: Init = async function init(this: PostgresAdapter) {
|
|||||||
|
|
||||||
buildTable({
|
buildTable({
|
||||||
adapter: this,
|
adapter: this,
|
||||||
buildTexts: true,
|
|
||||||
buildNumbers: true,
|
buildNumbers: true,
|
||||||
buildRelationships: true,
|
buildRelationships: true,
|
||||||
|
buildTexts: true,
|
||||||
disableNotNull: !!global.versions?.drafts,
|
disableNotNull: !!global.versions?.drafts,
|
||||||
disableUnique: true,
|
disableUnique: true,
|
||||||
fields: versionFields,
|
fields: versionFields,
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export async function migrate(this: PostgresAdapter): Promise<void> {
|
|||||||
latestBatch = Number(migrationsInDB[0]?.batch)
|
latestBatch = Number(migrationsInDB[0]?.batch)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
await createMigrationTable(this.drizzle)
|
await createMigrationTable(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (migrationsInDB.find((m) => m.batch === -1)) {
|
if (migrationsInDB.find((m) => m.batch === -1)) {
|
||||||
|
|||||||
@@ -44,8 +44,10 @@ export async function migrateFresh(
|
|||||||
msg: `Dropping database.`,
|
msg: `Dropping database.`,
|
||||||
})
|
})
|
||||||
|
|
||||||
await this.drizzle.execute(sql`drop schema public cascade;
|
await this.drizzle.execute(
|
||||||
create schema public;`)
|
sql.raw(`drop schema ${this.schemaName || 'public'} cascade;
|
||||||
|
create schema ${this.schemaName || 'public'};`),
|
||||||
|
)
|
||||||
|
|
||||||
const migrationFiles = await readMigrationFiles({ payload })
|
const migrationFiles = await readMigrationFiles({ payload })
|
||||||
payload.logger.debug({
|
payload.logger.debug({
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import type { SQL } from 'drizzle-orm'
|
import type { SQL } from 'drizzle-orm'
|
||||||
|
import type { PgTableWithColumns } from 'drizzle-orm/pg-core'
|
||||||
import type { Field, Where } from 'payload/types'
|
import type { Field, Where } from 'payload/types'
|
||||||
|
|
||||||
import { asc, desc } from 'drizzle-orm'
|
import { asc, desc } from 'drizzle-orm'
|
||||||
@@ -12,7 +13,7 @@ export type BuildQueryJoins = Record<string, SQL>
|
|||||||
|
|
||||||
export type BuildQueryJoinAliases = {
|
export type BuildQueryJoinAliases = {
|
||||||
condition: SQL
|
condition: SQL
|
||||||
table: GenericTable
|
table: GenericTable | PgTableWithColumns<any>
|
||||||
}[]
|
}[]
|
||||||
|
|
||||||
type BuildQueryArgs = {
|
type BuildQueryArgs = {
|
||||||
@@ -75,6 +76,7 @@ const buildQuery = async function buildQuery({
|
|||||||
pathSegments: sortPath.replace(/__/g, '.').split('.'),
|
pathSegments: sortPath.replace(/__/g, '.').split('.'),
|
||||||
selectFields,
|
selectFields,
|
||||||
tableName,
|
tableName,
|
||||||
|
value: sortPath,
|
||||||
})
|
})
|
||||||
orderBy.column = sortTable?.[sortTableColumnName]
|
orderBy.column = sortTable?.[sortTableColumnName]
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/* eslint-disable no-param-reassign */
|
/* eslint-disable no-param-reassign */
|
||||||
import type { SQL } from 'drizzle-orm'
|
import type { SQL } from 'drizzle-orm'
|
||||||
import type { Field, FieldAffectingData, TabAsField } from 'payload/types'
|
import type { PgTableWithColumns } from 'drizzle-orm/pg-core'
|
||||||
|
import type { Field, FieldAffectingData, NumberField, TabAsField, TextField } from 'payload/types'
|
||||||
|
|
||||||
import { and, eq, like, sql } from 'drizzle-orm'
|
import { and, eq, like, sql } from 'drizzle-orm'
|
||||||
import { alias } from 'drizzle-orm/pg-core'
|
import { alias } from 'drizzle-orm/pg-core'
|
||||||
@@ -15,7 +16,7 @@ import type { BuildQueryJoinAliases, BuildQueryJoins } from './buildQuery'
|
|||||||
|
|
||||||
type Constraint = {
|
type Constraint = {
|
||||||
columnName: string
|
columnName: string
|
||||||
table: GenericTable
|
table: GenericTable | PgTableWithColumns<any>
|
||||||
value: unknown
|
value: unknown
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,12 +27,12 @@ type TableColumn = {
|
|||||||
getNotNullColumnByValue?: (val: unknown) => string
|
getNotNullColumnByValue?: (val: unknown) => string
|
||||||
pathSegments?: string[]
|
pathSegments?: string[]
|
||||||
rawColumn?: SQL
|
rawColumn?: SQL
|
||||||
table: GenericTable
|
table: GenericTable | PgTableWithColumns<any>
|
||||||
}
|
}
|
||||||
|
|
||||||
type Args = {
|
type Args = {
|
||||||
adapter: PostgresAdapter
|
adapter: PostgresAdapter
|
||||||
aliasTable?: GenericTable
|
aliasTable?: GenericTable | PgTableWithColumns<any>
|
||||||
collectionPath: string
|
collectionPath: string
|
||||||
columnPrefix?: string
|
columnPrefix?: string
|
||||||
constraintPath?: string
|
constraintPath?: string
|
||||||
@@ -44,6 +45,14 @@ type Args = {
|
|||||||
rootTableName?: string
|
rootTableName?: string
|
||||||
selectFields: Record<string, GenericColumn>
|
selectFields: Record<string, GenericColumn>
|
||||||
tableName: string
|
tableName: string
|
||||||
|
/**
|
||||||
|
* If creating a new table name for arrays and blocks, this suffix should be appended to the table name
|
||||||
|
*/
|
||||||
|
tableNameSuffix?: string
|
||||||
|
/**
|
||||||
|
* The raw value of the query before sanitization
|
||||||
|
*/
|
||||||
|
value: unknown
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Transforms path to table and column name
|
* Transforms path to table and column name
|
||||||
@@ -65,6 +74,8 @@ export const getTableColumnFromPath = ({
|
|||||||
rootTableName: incomingRootTableName,
|
rootTableName: incomingRootTableName,
|
||||||
selectFields,
|
selectFields,
|
||||||
tableName,
|
tableName,
|
||||||
|
tableNameSuffix = '',
|
||||||
|
value,
|
||||||
}: Args): TableColumn => {
|
}: Args): TableColumn => {
|
||||||
const fieldPath = incomingSegments[0]
|
const fieldPath = incomingSegments[0]
|
||||||
let locale = incomingLocale
|
let locale = incomingLocale
|
||||||
@@ -83,8 +94,8 @@ export const getTableColumnFromPath = ({
|
|||||||
constraints,
|
constraints,
|
||||||
field: {
|
field: {
|
||||||
name: 'id',
|
name: 'id',
|
||||||
type: 'number',
|
type: adapter.idType === 'uuid' ? 'text' : 'number',
|
||||||
},
|
} as TextField | NumberField,
|
||||||
table: adapter.tables[newTableName],
|
table: adapter.tables[newTableName],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -125,6 +136,8 @@ export const getTableColumnFromPath = ({
|
|||||||
rootTableName,
|
rootTableName,
|
||||||
selectFields,
|
selectFields,
|
||||||
tableName: newTableName,
|
tableName: newTableName,
|
||||||
|
tableNameSuffix,
|
||||||
|
value,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
case 'tab': {
|
case 'tab': {
|
||||||
@@ -144,6 +157,8 @@ export const getTableColumnFromPath = ({
|
|||||||
rootTableName,
|
rootTableName,
|
||||||
selectFields,
|
selectFields,
|
||||||
tableName: newTableName,
|
tableName: newTableName,
|
||||||
|
tableNameSuffix: `${tableNameSuffix}${toSnakeCase(field.name)}_`,
|
||||||
|
value,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return getTableColumnFromPath({
|
return getTableColumnFromPath({
|
||||||
@@ -161,6 +176,8 @@ export const getTableColumnFromPath = ({
|
|||||||
rootTableName,
|
rootTableName,
|
||||||
selectFields,
|
selectFields,
|
||||||
tableName: newTableName,
|
tableName: newTableName,
|
||||||
|
tableNameSuffix,
|
||||||
|
value,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,11 +212,13 @@ export const getTableColumnFromPath = ({
|
|||||||
rootTableName,
|
rootTableName,
|
||||||
selectFields,
|
selectFields,
|
||||||
tableName: newTableName,
|
tableName: newTableName,
|
||||||
|
tableNameSuffix: `${tableNameSuffix}${toSnakeCase(field.name)}_`,
|
||||||
|
value,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'array': {
|
case 'array': {
|
||||||
newTableName = `${tableName}_${toSnakeCase(field.name)}`
|
newTableName = `${tableName}_${tableNameSuffix}${toSnakeCase(field.name)}`
|
||||||
constraintPath = `${constraintPath}${field.name}.%.`
|
constraintPath = `${constraintPath}${field.name}.%.`
|
||||||
if (locale && field.localized && adapter.payload.config.localization) {
|
if (locale && field.localized && adapter.payload.config.localization) {
|
||||||
joins[newTableName] = and(
|
joins[newTableName] = and(
|
||||||
@@ -232,12 +251,39 @@ export const getTableColumnFromPath = ({
|
|||||||
rootTableName,
|
rootTableName,
|
||||||
selectFields,
|
selectFields,
|
||||||
tableName: newTableName,
|
tableName: newTableName,
|
||||||
|
value,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'blocks': {
|
case 'blocks': {
|
||||||
let blockTableColumn: TableColumn
|
let blockTableColumn: TableColumn
|
||||||
let newTableName: string
|
let newTableName: string
|
||||||
|
|
||||||
|
// handle blockType queries
|
||||||
|
if (pathSegments[1] === 'blockType') {
|
||||||
|
// find the block config using the value
|
||||||
|
const blockTypes = Array.isArray(value) ? value : [value]
|
||||||
|
blockTypes.forEach((blockType) => {
|
||||||
|
const block = field.blocks.find((block) => block.slug === blockType)
|
||||||
|
newTableName = `${tableName}_blocks_${toSnakeCase(block.slug)}`
|
||||||
|
joins[newTableName] = eq(
|
||||||
|
adapter.tables[tableName].id,
|
||||||
|
adapter.tables[newTableName]._parentID,
|
||||||
|
)
|
||||||
|
constraints.push({
|
||||||
|
columnName: '_path',
|
||||||
|
table: adapter.tables[newTableName],
|
||||||
|
value: pathSegments[0],
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return {
|
||||||
|
constraints,
|
||||||
|
field,
|
||||||
|
getNotNullColumnByValue: () => 'id',
|
||||||
|
table: adapter.tables[tableName],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const hasBlockField = field.blocks.some((block) => {
|
const hasBlockField = field.blocks.some((block) => {
|
||||||
newTableName = `${tableName}_blocks_${toSnakeCase(block.slug)}`
|
newTableName = `${tableName}_blocks_${toSnakeCase(block.slug)}`
|
||||||
constraintPath = `${constraintPath}${field.name}.%.`
|
constraintPath = `${constraintPath}${field.name}.%.`
|
||||||
@@ -258,6 +304,7 @@ export const getTableColumnFromPath = ({
|
|||||||
rootTableName,
|
rootTableName,
|
||||||
selectFields: blockSelectFields,
|
selectFields: blockSelectFields,
|
||||||
tableName: newTableName,
|
tableName: newTableName,
|
||||||
|
value,
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// this is fine, not every block will have the field
|
// this is fine, not every block will have the field
|
||||||
@@ -298,9 +345,6 @@ export const getTableColumnFromPath = ({
|
|||||||
table: blockTableColumn.table,
|
table: blockTableColumn.table,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pathSegments[1] === 'blockType') {
|
|
||||||
throw new APIError('Querying on blockType is not supported')
|
|
||||||
}
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -340,7 +384,7 @@ export const getTableColumnFromPath = ({
|
|||||||
table: newAliasTable,
|
table: newAliasTable,
|
||||||
})
|
})
|
||||||
|
|
||||||
if (newCollectionPath === '') {
|
if (newCollectionPath === '' || newCollectionPath === 'id') {
|
||||||
return {
|
return {
|
||||||
columnName: `${field.relationTo}ID`,
|
columnName: `${field.relationTo}ID`,
|
||||||
constraints,
|
constraints,
|
||||||
@@ -388,6 +432,7 @@ export const getTableColumnFromPath = ({
|
|||||||
rootTableName: newTableName,
|
rootTableName: newTableName,
|
||||||
selectFields,
|
selectFields,
|
||||||
tableName: newTableName,
|
tableName: newTableName,
|
||||||
|
value,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,11 +63,7 @@ export async function parseParams({
|
|||||||
where: condition,
|
where: condition,
|
||||||
})
|
})
|
||||||
if (builtConditions.length > 0) {
|
if (builtConditions.length > 0) {
|
||||||
if (result) {
|
result = operatorMap[conditionOperator](...builtConditions)
|
||||||
result = operatorMap[conditionOperator](result, ...builtConditions)
|
|
||||||
} else {
|
|
||||||
result = operatorMap[conditionOperator](...builtConditions)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// It's a path - and there can be multiple comparisons on a single path.
|
// It's a path - and there can be multiple comparisons on a single path.
|
||||||
@@ -77,6 +73,7 @@ export async function parseParams({
|
|||||||
if (typeof pathOperators === 'object') {
|
if (typeof pathOperators === 'object') {
|
||||||
for (const operator of Object.keys(pathOperators)) {
|
for (const operator of Object.keys(pathOperators)) {
|
||||||
if (validOperators.includes(operator as Operator)) {
|
if (validOperators.includes(operator as Operator)) {
|
||||||
|
const val = where[relationOrPath][operator]
|
||||||
const {
|
const {
|
||||||
columnName,
|
columnName,
|
||||||
constraints: queryConstraints,
|
constraints: queryConstraints,
|
||||||
@@ -95,10 +92,9 @@ export async function parseParams({
|
|||||||
pathSegments: relationOrPath.replace(/__/g, '.').split('.'),
|
pathSegments: relationOrPath.replace(/__/g, '.').split('.'),
|
||||||
selectFields,
|
selectFields,
|
||||||
tableName,
|
tableName,
|
||||||
|
value: val,
|
||||||
})
|
})
|
||||||
|
|
||||||
const val = where[relationOrPath][operator]
|
|
||||||
|
|
||||||
queryConstraints.forEach(({ columnName: col, table: constraintTable, value }) => {
|
queryConstraints.forEach(({ columnName: col, table: constraintTable, value }) => {
|
||||||
if (typeof value === 'string' && value.indexOf('%') > -1) {
|
if (typeof value === 'string' && value.indexOf('%') > -1) {
|
||||||
constraints.push(operatorMap.like(constraintTable[col], value))
|
constraints.push(operatorMap.like(constraintTable[col], value))
|
||||||
@@ -169,6 +165,7 @@ export async function parseParams({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const sanitizedQueryValue = sanitizeQueryValue({
|
const sanitizedQueryValue = sanitizeQueryValue({
|
||||||
|
adapter,
|
||||||
field,
|
field,
|
||||||
operator,
|
operator,
|
||||||
relationOrPath,
|
relationOrPath,
|
||||||
|
|||||||
@@ -2,7 +2,10 @@ import { APIError } from 'payload/errors'
|
|||||||
import { type Field, type TabAsField, fieldAffectsData } from 'payload/types'
|
import { type Field, type TabAsField, fieldAffectsData } from 'payload/types'
|
||||||
import { createArrayFromCommaDelineated } from 'payload/utilities'
|
import { createArrayFromCommaDelineated } from 'payload/utilities'
|
||||||
|
|
||||||
|
import type { PostgresAdapter } from '../types'
|
||||||
|
|
||||||
type SanitizeQueryValueArgs = {
|
type SanitizeQueryValueArgs = {
|
||||||
|
adapter: PostgresAdapter
|
||||||
field: Field | TabAsField
|
field: Field | TabAsField
|
||||||
operator: string
|
operator: string
|
||||||
relationOrPath: string
|
relationOrPath: string
|
||||||
@@ -10,6 +13,7 @@ type SanitizeQueryValueArgs = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const sanitizeQueryValue = ({
|
export const sanitizeQueryValue = ({
|
||||||
|
adapter,
|
||||||
field,
|
field,
|
||||||
operator: operatorArg,
|
operator: operatorArg,
|
||||||
relationOrPath,
|
relationOrPath,
|
||||||
@@ -27,8 +31,10 @@ export const sanitizeQueryValue = ({
|
|||||||
) {
|
) {
|
||||||
const allPossibleIDTypes: (number | string)[] = []
|
const allPossibleIDTypes: (number | string)[] = []
|
||||||
formattedValue.forEach((val) => {
|
formattedValue.forEach((val) => {
|
||||||
if (typeof val === 'string') {
|
if (adapter.idType !== 'uuid' && typeof val === 'string') {
|
||||||
allPossibleIDTypes.push(val, parseInt(val))
|
allPossibleIDTypes.push(val, parseInt(val))
|
||||||
|
} else if (typeof val === 'string') {
|
||||||
|
allPossibleIDTypes.push(val)
|
||||||
} else {
|
} else {
|
||||||
allPossibleIDTypes.push(val, String(val))
|
allPossibleIDTypes.push(val, String(val))
|
||||||
}
|
}
|
||||||
|
|||||||
60
packages/db-postgres/src/queries/selectDistinct.ts
Normal file
60
packages/db-postgres/src/queries/selectDistinct.ts
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
import type { QueryPromise, SQL } from 'drizzle-orm'
|
||||||
|
|
||||||
|
import type { ChainedMethods } from '../find/chainMethods'
|
||||||
|
import type { DrizzleDB, PostgresAdapter } from '../types'
|
||||||
|
import type { BuildQueryJoinAliases, BuildQueryJoins } from './buildQuery'
|
||||||
|
|
||||||
|
import { chainMethods } from '../find/chainMethods'
|
||||||
|
import { type GenericColumn } from '../types'
|
||||||
|
|
||||||
|
type Args = {
|
||||||
|
adapter: PostgresAdapter
|
||||||
|
chainedMethods?: ChainedMethods
|
||||||
|
db: DrizzleDB
|
||||||
|
joinAliases: BuildQueryJoinAliases
|
||||||
|
joins: BuildQueryJoins
|
||||||
|
selectFields: Record<string, GenericColumn>
|
||||||
|
tableName: string
|
||||||
|
where: SQL
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Selects distinct records from a table only if there are joins that need to be used, otherwise return null
|
||||||
|
*/
|
||||||
|
export const selectDistinct = ({
|
||||||
|
adapter,
|
||||||
|
chainedMethods = [],
|
||||||
|
db,
|
||||||
|
joinAliases,
|
||||||
|
joins,
|
||||||
|
selectFields,
|
||||||
|
tableName,
|
||||||
|
where,
|
||||||
|
}: Args): QueryPromise<Record<string, GenericColumn> & { id: number | string }[]> => {
|
||||||
|
if (Object.keys(joins).length > 0 || joinAliases.length > 0) {
|
||||||
|
if (where) {
|
||||||
|
chainedMethods.push({ args: [where], method: 'where' })
|
||||||
|
}
|
||||||
|
|
||||||
|
joinAliases.forEach(({ condition, table }) => {
|
||||||
|
chainedMethods.push({
|
||||||
|
args: [table, condition],
|
||||||
|
method: 'leftJoin',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
Object.entries(joins).forEach(([joinTable, condition]) => {
|
||||||
|
if (joinTable) {
|
||||||
|
chainedMethods.push({
|
||||||
|
args: [adapter.tables[joinTable], condition],
|
||||||
|
method: 'leftJoin',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return chainMethods({
|
||||||
|
methods: chainedMethods,
|
||||||
|
query: db.selectDistinct(selectFields).from(adapter.tables[tableName]),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,26 +1,22 @@
|
|||||||
/* eslint-disable no-param-reassign */
|
/* eslint-disable no-param-reassign */
|
||||||
import type { Relation } from 'drizzle-orm'
|
import type { Relation } from 'drizzle-orm'
|
||||||
import type { IndexBuilder, PgColumnBuilder, UniqueConstraintBuilder } from 'drizzle-orm/pg-core'
|
import type {
|
||||||
|
IndexBuilder,
|
||||||
|
PgColumnBuilder,
|
||||||
|
PgTableWithColumns,
|
||||||
|
UniqueConstraintBuilder,
|
||||||
|
} from 'drizzle-orm/pg-core'
|
||||||
import type { Field } from 'payload/types'
|
import type { Field } from 'payload/types'
|
||||||
|
|
||||||
import { relations } from 'drizzle-orm'
|
import { relations } from 'drizzle-orm'
|
||||||
import {
|
import { index, integer, numeric, serial, timestamp, unique, varchar } from 'drizzle-orm/pg-core'
|
||||||
index,
|
|
||||||
integer,
|
|
||||||
numeric,
|
|
||||||
pgTable,
|
|
||||||
serial,
|
|
||||||
timestamp,
|
|
||||||
unique,
|
|
||||||
varchar,
|
|
||||||
} from 'drizzle-orm/pg-core'
|
|
||||||
import { fieldAffectsData } from 'payload/types'
|
import { fieldAffectsData } from 'payload/types'
|
||||||
import toSnakeCase from 'to-snake-case'
|
import toSnakeCase from 'to-snake-case'
|
||||||
|
|
||||||
import type { GenericColumns, GenericTable, PostgresAdapter } from '../types'
|
import type { GenericColumns, GenericTable, IDType, PostgresAdapter } from '../types'
|
||||||
|
|
||||||
import { getConfigIDType } from './getConfigIDType'
|
|
||||||
import { parentIDColumnMap } from './parentIDColumnMap'
|
import { parentIDColumnMap } from './parentIDColumnMap'
|
||||||
|
import { setColumnID } from './setColumnID'
|
||||||
import { traverseFields } from './traverseFields'
|
import { traverseFields } from './traverseFields'
|
||||||
|
|
||||||
type Args = {
|
type Args = {
|
||||||
@@ -77,27 +73,20 @@ export const buildTable = ({
|
|||||||
|
|
||||||
const localesColumns: Record<string, PgColumnBuilder> = {}
|
const localesColumns: Record<string, PgColumnBuilder> = {}
|
||||||
const localesIndexes: Record<string, (cols: GenericColumns) => IndexBuilder> = {}
|
const localesIndexes: Record<string, (cols: GenericColumns) => IndexBuilder> = {}
|
||||||
let localesTable: GenericTable
|
let localesTable: GenericTable | PgTableWithColumns<any>
|
||||||
let textsTable: GenericTable
|
let textsTable: GenericTable | PgTableWithColumns<any>
|
||||||
let numbersTable: GenericTable
|
let numbersTable: GenericTable | PgTableWithColumns<any>
|
||||||
|
|
||||||
// Relationships to the base collection
|
// Relationships to the base collection
|
||||||
const relationships: Set<string> = rootRelationships || new Set()
|
const relationships: Set<string> = rootRelationships || new Set()
|
||||||
|
|
||||||
let relationshipsTable: GenericTable
|
let relationshipsTable: GenericTable | PgTableWithColumns<any>
|
||||||
|
|
||||||
// Drizzle relations
|
// Drizzle relations
|
||||||
const relationsToBuild: Map<string, string> = new Map()
|
const relationsToBuild: Map<string, string> = new Map()
|
||||||
|
|
||||||
const idColType = getConfigIDType(fields)
|
const idColType: IDType = setColumnID({ adapter, columns, fields })
|
||||||
|
|
||||||
const idColTypeMap = {
|
|
||||||
integer: serial,
|
|
||||||
numeric,
|
|
||||||
varchar,
|
|
||||||
}
|
|
||||||
|
|
||||||
columns.id = idColTypeMap[idColType]('id').primaryKey()
|
|
||||||
;({
|
;({
|
||||||
hasLocalizedField,
|
hasLocalizedField,
|
||||||
hasLocalizedManyNumberField,
|
hasLocalizedManyNumberField,
|
||||||
@@ -143,7 +132,7 @@ export const buildTable = ({
|
|||||||
.notNull()
|
.notNull()
|
||||||
}
|
}
|
||||||
|
|
||||||
const table = pgTable(tableName, columns, (cols) => {
|
const table = adapter.pgSchema.table(tableName, columns, (cols) => {
|
||||||
const extraConfig = Object.entries(baseExtraConfig).reduce((config, [key, func]) => {
|
const extraConfig = Object.entries(baseExtraConfig).reduce((config, [key, func]) => {
|
||||||
config[key] = func(cols)
|
config[key] = func(cols)
|
||||||
return config
|
return config
|
||||||
@@ -165,7 +154,7 @@ export const buildTable = ({
|
|||||||
.references(() => table.id, { onDelete: 'cascade' })
|
.references(() => table.id, { onDelete: 'cascade' })
|
||||||
.notNull()
|
.notNull()
|
||||||
|
|
||||||
localesTable = pgTable(localeTableName, localesColumns, (cols) => {
|
localesTable = adapter.pgSchema.table(localeTableName, localesColumns, (cols) => {
|
||||||
return Object.entries(localesIndexes).reduce(
|
return Object.entries(localesIndexes).reduce(
|
||||||
(acc, [colName, func]) => {
|
(acc, [colName, func]) => {
|
||||||
acc[colName] = func(cols)
|
acc[colName] = func(cols)
|
||||||
@@ -208,7 +197,7 @@ export const buildTable = ({
|
|||||||
columns.locale = adapter.enums.enum__locales('locale')
|
columns.locale = adapter.enums.enum__locales('locale')
|
||||||
}
|
}
|
||||||
|
|
||||||
textsTable = pgTable(textsTableName, columns, (cols) => {
|
textsTable = adapter.pgSchema.table(textsTableName, columns, (cols) => {
|
||||||
const indexes: Record<string, IndexBuilder> = {
|
const indexes: Record<string, IndexBuilder> = {
|
||||||
orderParentIdx: index(`${textsTableName}_order_parent_idx`).on(cols.order, cols.parent),
|
orderParentIdx: index(`${textsTableName}_order_parent_idx`).on(cols.order, cols.parent),
|
||||||
}
|
}
|
||||||
@@ -252,7 +241,7 @@ export const buildTable = ({
|
|||||||
columns.locale = adapter.enums.enum__locales('locale')
|
columns.locale = adapter.enums.enum__locales('locale')
|
||||||
}
|
}
|
||||||
|
|
||||||
numbersTable = pgTable(numbersTableName, columns, (cols) => {
|
numbersTable = adapter.pgSchema.table(numbersTableName, columns, (cols) => {
|
||||||
const indexes: Record<string, IndexBuilder> = {
|
const indexes: Record<string, IndexBuilder> = {
|
||||||
orderParentIdx: index(`${numbersTableName}_order_parent_idx`).on(cols.order, cols.parent),
|
orderParentIdx: index(`${numbersTableName}_order_parent_idx`).on(cols.order, cols.parent),
|
||||||
}
|
}
|
||||||
@@ -300,7 +289,7 @@ export const buildTable = ({
|
|||||||
|
|
||||||
relationships.forEach((relationTo) => {
|
relationships.forEach((relationTo) => {
|
||||||
const formattedRelationTo = toSnakeCase(relationTo)
|
const formattedRelationTo = toSnakeCase(relationTo)
|
||||||
let colType = 'integer'
|
let colType = adapter.idType === 'uuid' ? 'uuid' : 'integer'
|
||||||
const relatedCollectionCustomID = adapter.payload.collections[
|
const relatedCollectionCustomID = adapter.payload.collections[
|
||||||
relationTo
|
relationTo
|
||||||
].config.fields.find((field) => fieldAffectsData(field) && field.name === 'id')
|
].config.fields.find((field) => fieldAffectsData(field) && field.name === 'id')
|
||||||
@@ -314,19 +303,23 @@ export const buildTable = ({
|
|||||||
|
|
||||||
const relationshipsTableName = `${tableName}_rels`
|
const relationshipsTableName = `${tableName}_rels`
|
||||||
|
|
||||||
relationshipsTable = pgTable(relationshipsTableName, relationshipColumns, (cols) => {
|
relationshipsTable = adapter.pgSchema.table(
|
||||||
const result: Record<string, unknown> = {
|
relationshipsTableName,
|
||||||
order: index(`${relationshipsTableName}_order_idx`).on(cols.order),
|
relationshipColumns,
|
||||||
parentIdx: index(`${relationshipsTableName}_parent_idx`).on(cols.parent),
|
(cols) => {
|
||||||
pathIdx: index(`${relationshipsTableName}_path_idx`).on(cols.path),
|
const result: Record<string, unknown> = {
|
||||||
}
|
order: index(`${relationshipsTableName}_order_idx`).on(cols.order),
|
||||||
|
parentIdx: index(`${relationshipsTableName}_parent_idx`).on(cols.parent),
|
||||||
|
pathIdx: index(`${relationshipsTableName}_path_idx`).on(cols.path),
|
||||||
|
}
|
||||||
|
|
||||||
if (hasLocalizedRelationshipField) {
|
if (hasLocalizedRelationshipField) {
|
||||||
result.localeIdx = index(`${relationshipsTableName}_locale_idx`).on(cols.locale)
|
result.localeIdx = index(`${relationshipsTableName}_locale_idx`).on(cols.locale)
|
||||||
}
|
}
|
||||||
|
|
||||||
return result
|
return result
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
|
||||||
adapter.tables[relationshipsTableName] = relationshipsTable
|
adapter.tables[relationshipsTableName] = relationshipsTable
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
import { type Field, fieldAffectsData } from 'payload/types'
|
|
||||||
|
|
||||||
export const getConfigIDType = (fields: Field[]): string => {
|
|
||||||
const idField = fields.find((field) => fieldAffectsData(field) && field.name === 'id')
|
|
||||||
|
|
||||||
if (idField) {
|
|
||||||
if (idField.type === 'number') {
|
|
||||||
return 'numeric'
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idField.type === 'text') {
|
|
||||||
return 'varchar'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 'integer'
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,13 @@
|
|||||||
import { integer, numeric, varchar } from 'drizzle-orm/pg-core'
|
import { integer, numeric, uuid, varchar } from 'drizzle-orm/pg-core'
|
||||||
|
|
||||||
export const parentIDColumnMap = {
|
import type { IDType } from '../types'
|
||||||
|
|
||||||
|
export const parentIDColumnMap: Record<
|
||||||
|
IDType,
|
||||||
|
typeof integer<string> | typeof numeric<string> | typeof uuid<string> | typeof varchar
|
||||||
|
> = {
|
||||||
integer,
|
integer,
|
||||||
numeric,
|
numeric,
|
||||||
|
uuid,
|
||||||
varchar,
|
varchar,
|
||||||
}
|
}
|
||||||
|
|||||||
33
packages/db-postgres/src/schema/setColumnID.ts
Normal file
33
packages/db-postgres/src/schema/setColumnID.ts
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import type { PgColumnBuilder } from 'drizzle-orm/pg-core'
|
||||||
|
|
||||||
|
import { numeric, serial, uuid, varchar } from 'drizzle-orm/pg-core'
|
||||||
|
import { type Field, fieldAffectsData } from 'payload/types'
|
||||||
|
import { flattenTopLevelFields } from 'payload/utilities'
|
||||||
|
|
||||||
|
import type { IDType, PostgresAdapter } from '../types'
|
||||||
|
|
||||||
|
type Args = { adapter: PostgresAdapter; columns: Record<string, PgColumnBuilder>; fields: Field[] }
|
||||||
|
export const setColumnID = ({ adapter, columns, fields }: Args): IDType => {
|
||||||
|
const idField = flattenTopLevelFields(fields).find(
|
||||||
|
(field) => fieldAffectsData(field) && field.name === 'id',
|
||||||
|
)
|
||||||
|
if (idField) {
|
||||||
|
if (idField.type === 'number') {
|
||||||
|
columns.id = numeric('id').primaryKey()
|
||||||
|
return 'numeric'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (idField.type === 'text') {
|
||||||
|
columns.id = varchar('id').primaryKey()
|
||||||
|
return 'varchar'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (adapter.idType === 'uuid') {
|
||||||
|
columns.id = uuid('id').defaultRandom().primaryKey()
|
||||||
|
return 'uuid'
|
||||||
|
}
|
||||||
|
|
||||||
|
columns.id = serial('id').primaryKey()
|
||||||
|
return 'integer'
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import type { Field, TabAsField } from 'payload/types'
|
|||||||
import { relations } from 'drizzle-orm'
|
import { relations } from 'drizzle-orm'
|
||||||
import {
|
import {
|
||||||
PgNumericBuilder,
|
PgNumericBuilder,
|
||||||
|
PgUUIDBuilder,
|
||||||
PgVarcharBuilder,
|
PgVarcharBuilder,
|
||||||
boolean,
|
boolean,
|
||||||
index,
|
index,
|
||||||
@@ -21,7 +22,7 @@ import { InvalidConfiguration } from 'payload/errors'
|
|||||||
import { fieldAffectsData, optionIsObject } from 'payload/types'
|
import { fieldAffectsData, optionIsObject } from 'payload/types'
|
||||||
import toSnakeCase from 'to-snake-case'
|
import toSnakeCase from 'to-snake-case'
|
||||||
|
|
||||||
import type { GenericColumns, PostgresAdapter } from '../types'
|
import type { GenericColumns, IDType, PostgresAdapter } from '../types'
|
||||||
|
|
||||||
import { hasLocalesTable } from '../utilities/hasLocalesTable'
|
import { hasLocalesTable } from '../utilities/hasLocalesTable'
|
||||||
import { buildTable } from './build'
|
import { buildTable } from './build'
|
||||||
@@ -93,7 +94,8 @@ export const traverseFields = ({
|
|||||||
let hasManyNumberField: 'index' | boolean = false
|
let hasManyNumberField: 'index' | boolean = false
|
||||||
let hasLocalizedManyNumberField = false
|
let hasLocalizedManyNumberField = false
|
||||||
|
|
||||||
let parentIDColType = 'integer'
|
let parentIDColType: IDType = 'integer'
|
||||||
|
if (columns.id instanceof PgUUIDBuilder) parentIDColType = 'uuid'
|
||||||
if (columns.id instanceof PgNumericBuilder) parentIDColType = 'numeric'
|
if (columns.id instanceof PgNumericBuilder) parentIDColType = 'numeric'
|
||||||
if (columns.id instanceof PgVarcharBuilder) parentIDColType = 'varchar'
|
if (columns.id instanceof PgVarcharBuilder) parentIDColType = 'varchar'
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,14 @@ import type {
|
|||||||
Relations,
|
Relations,
|
||||||
} from 'drizzle-orm'
|
} from 'drizzle-orm'
|
||||||
import type { NodePgDatabase, NodePgQueryResultHKT } from 'drizzle-orm/node-postgres'
|
import type { NodePgDatabase, NodePgQueryResultHKT } from 'drizzle-orm/node-postgres'
|
||||||
import type { PgColumn, PgEnum, PgTableWithColumns, PgTransaction } from 'drizzle-orm/pg-core'
|
import type {
|
||||||
|
PgColumn,
|
||||||
|
PgEnum,
|
||||||
|
PgSchema,
|
||||||
|
PgTableWithColumns,
|
||||||
|
PgTransaction,
|
||||||
|
} from 'drizzle-orm/pg-core'
|
||||||
|
import type { PgTableFn } from 'drizzle-orm/pg-core/table'
|
||||||
import type { Payload } from 'payload'
|
import type { Payload } from 'payload'
|
||||||
import type { BaseDatabaseAdapter } from 'payload/database'
|
import type { BaseDatabaseAdapter } from 'payload/database'
|
||||||
import type { PayloadRequest } from 'payload/types'
|
import type { PayloadRequest } from 'payload/types'
|
||||||
@@ -16,10 +23,12 @@ import type { Pool, PoolConfig } from 'pg'
|
|||||||
export type DrizzleDB = NodePgDatabase<Record<string, unknown>>
|
export type DrizzleDB = NodePgDatabase<Record<string, unknown>>
|
||||||
|
|
||||||
export type Args = {
|
export type Args = {
|
||||||
|
idType?: 'serial' | 'uuid'
|
||||||
logger?: DrizzleConfig['logger']
|
logger?: DrizzleConfig['logger']
|
||||||
migrationDir?: string
|
migrationDir?: string
|
||||||
pool: PoolConfig
|
pool: PoolConfig
|
||||||
push?: boolean
|
push?: boolean
|
||||||
|
schemaName?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GenericColumn = PgColumn<
|
export type GenericColumn = PgColumn<
|
||||||
@@ -56,12 +65,15 @@ export type PostgresAdapter = BaseDatabaseAdapter & {
|
|||||||
* Used for returning properly formed errors from unique fields
|
* Used for returning properly formed errors from unique fields
|
||||||
*/
|
*/
|
||||||
fieldConstraints: Record<string, Record<string, string>>
|
fieldConstraints: Record<string, Record<string, string>>
|
||||||
|
idType: Args['idType']
|
||||||
logger: DrizzleConfig['logger']
|
logger: DrizzleConfig['logger']
|
||||||
|
pgSchema?: { table: PgTableFn } | PgSchema
|
||||||
pool: Pool
|
pool: Pool
|
||||||
poolOptions: Args['pool']
|
poolOptions: Args['pool']
|
||||||
push: boolean
|
push: boolean
|
||||||
relations: Record<string, GenericRelation>
|
relations: Record<string, GenericRelation>
|
||||||
schema: Record<string, GenericEnum | GenericRelation | GenericTable>
|
schema: Record<string, GenericEnum | GenericRelation | GenericTable>
|
||||||
|
schemaName?: Args['schemaName']
|
||||||
sessions: {
|
sessions: {
|
||||||
[id: string]: {
|
[id: string]: {
|
||||||
db: DrizzleTransaction
|
db: DrizzleTransaction
|
||||||
@@ -69,9 +81,11 @@ export type PostgresAdapter = BaseDatabaseAdapter & {
|
|||||||
resolve: () => Promise<void>
|
resolve: () => Promise<void>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tables: Record<string, GenericTable>
|
tables: Record<string, GenericTable | PgTableWithColumns<any>>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type IDType = 'integer' | 'numeric' | 'uuid' | 'varchar'
|
||||||
|
|
||||||
export type PostgresAdapterResult = (args: { payload: Payload }) => PostgresAdapter
|
export type PostgresAdapterResult = (args: { payload: Payload }) => PostgresAdapter
|
||||||
|
|
||||||
export type MigrateUpArgs = { payload: Payload; req?: Partial<PayloadRequest> }
|
export type MigrateUpArgs = { payload: Payload; req?: Partial<PayloadRequest> }
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ import type { UpdateOne } from 'payload/database'
|
|||||||
|
|
||||||
import toSnakeCase from 'to-snake-case'
|
import toSnakeCase from 'to-snake-case'
|
||||||
|
|
||||||
import type { ChainedMethods } from './find/chainMethods'
|
|
||||||
import { chainMethods } from './find/chainMethods'
|
|
||||||
import type { PostgresAdapter } from './types'
|
import type { PostgresAdapter } from './types'
|
||||||
|
|
||||||
import buildQuery from './queries/buildQuery'
|
import buildQuery from './queries/buildQuery'
|
||||||
|
import { selectDistinct } from './queries/selectDistinct'
|
||||||
import { upsertRow } from './upsertRow'
|
import { upsertRow } from './upsertRow'
|
||||||
|
|
||||||
export const updateOne: UpdateOne = async function updateOne(
|
export const updateOne: UpdateOne = async function updateOne(
|
||||||
@@ -16,6 +16,7 @@ export const updateOne: UpdateOne = async function updateOne(
|
|||||||
const collection = this.payload.collections[collectionSlug].config
|
const collection = this.payload.collections[collectionSlug].config
|
||||||
const tableName = toSnakeCase(collectionSlug)
|
const tableName = toSnakeCase(collectionSlug)
|
||||||
const whereToUse = whereArg || { id: { equals: id } }
|
const whereToUse = whereArg || { id: { equals: id } }
|
||||||
|
let idToUpdate = id
|
||||||
|
|
||||||
const { joinAliases, joins, selectFields, where } = await buildQuery({
|
const { joinAliases, joins, selectFields, where } = await buildQuery({
|
||||||
adapter: this,
|
adapter: this,
|
||||||
@@ -25,42 +26,19 @@ export const updateOne: UpdateOne = async function updateOne(
|
|||||||
where: whereToUse,
|
where: whereToUse,
|
||||||
})
|
})
|
||||||
|
|
||||||
let idToUpdate = id
|
const selectDistinctResult = await selectDistinct({
|
||||||
|
adapter: this,
|
||||||
|
chainedMethods: [{ args: [1], method: 'limit' }],
|
||||||
|
db,
|
||||||
|
joinAliases,
|
||||||
|
joins,
|
||||||
|
selectFields,
|
||||||
|
tableName,
|
||||||
|
where,
|
||||||
|
})
|
||||||
|
|
||||||
// only fetch IDs when a sort or where query is used that needs to be done on join tables, otherwise these can be done directly on the table in findMany
|
if (selectDistinctResult?.[0]?.id) {
|
||||||
if (Object.keys(joins).length > 0 || joinAliases.length > 0) {
|
idToUpdate = selectDistinctResult?.[0]?.id
|
||||||
const selectDistinctMethods: ChainedMethods = []
|
|
||||||
|
|
||||||
if (where) {
|
|
||||||
selectDistinctMethods.push({ args: [where], method: 'where' })
|
|
||||||
}
|
|
||||||
|
|
||||||
joinAliases.forEach(({ condition, table }) => {
|
|
||||||
selectDistinctMethods.push({
|
|
||||||
args: [table, condition],
|
|
||||||
method: 'leftJoin',
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
Object.entries(joins).forEach(([joinTable, condition]) => {
|
|
||||||
if (joinTable) {
|
|
||||||
selectDistinctMethods.push({
|
|
||||||
args: [this.tables[joinTable], condition],
|
|
||||||
method: 'leftJoin',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
selectDistinctMethods.push({ args: [1], method: 'limit' })
|
|
||||||
|
|
||||||
const selectDistinctResult = await chainMethods({
|
|
||||||
methods: selectDistinctMethods,
|
|
||||||
query: db.selectDistinct(selectFields).from(this.tables[tableName]),
|
|
||||||
})
|
|
||||||
|
|
||||||
if (selectDistinctResult?.[0]?.id) {
|
|
||||||
idToUpdate = selectDistinctResult?.[0]?.id
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await upsertRow({
|
const result = await upsertRow({
|
||||||
@@ -70,8 +48,8 @@ export const updateOne: UpdateOne = async function updateOne(
|
|||||||
db,
|
db,
|
||||||
fields: collection.fields,
|
fields: collection.fields,
|
||||||
operation: 'update',
|
operation: 'update',
|
||||||
tableName: toSnakeCase(collectionSlug),
|
|
||||||
req,
|
req,
|
||||||
|
tableName: toSnakeCase(collectionSlug),
|
||||||
})
|
})
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|||||||
@@ -36,11 +36,11 @@ export const insertArrays = async ({ adapter, arrays, db, parentRows }: Args): P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const parentID = parentRows[parentRowIndex].id || parentRows[parentRowIndex]._parentID
|
const parentID = parentRows[parentRowIndex].id
|
||||||
|
|
||||||
// Add any sub arrays that need to be created
|
// Add any sub arrays that need to be created
|
||||||
// We will call this recursively below
|
// We will call this recursively below
|
||||||
arrayRows.forEach((arrayRow) => {
|
arrayRows.forEach((arrayRow, i) => {
|
||||||
if (Object.keys(arrayRow.arrays).length > 0) {
|
if (Object.keys(arrayRow.arrays).length > 0) {
|
||||||
rowsByTable[tableName].arrays.push(arrayRow.arrays)
|
rowsByTable[tableName].arrays.push(arrayRow.arrays)
|
||||||
}
|
}
|
||||||
@@ -53,6 +53,9 @@ export const insertArrays = async ({ adapter, arrays, db, parentRows }: Args): P
|
|||||||
arrayRowLocaleData._parentID = arrayRow.row.id
|
arrayRowLocaleData._parentID = arrayRow.row.id
|
||||||
arrayRowLocaleData._locale = arrayRowLocale
|
arrayRowLocaleData._locale = arrayRowLocale
|
||||||
rowsByTable[tableName].locales.push(arrayRowLocaleData)
|
rowsByTable[tableName].locales.push(arrayRowLocaleData)
|
||||||
|
if (!arrayRow.row.id) {
|
||||||
|
arrayRowLocaleData._getParentID = (rows) => rows[i].id
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -61,12 +64,23 @@ export const insertArrays = async ({ adapter, arrays, db, parentRows }: Args): P
|
|||||||
// Insert all corresponding arrays
|
// Insert all corresponding arrays
|
||||||
// (one insert per array table)
|
// (one insert per array table)
|
||||||
for (const [tableName, row] of Object.entries(rowsByTable)) {
|
for (const [tableName, row] of Object.entries(rowsByTable)) {
|
||||||
|
// the nested arrays need the ID for the parentID foreign key
|
||||||
|
let insertedRows: Args['parentRows']
|
||||||
if (row.rows.length > 0) {
|
if (row.rows.length > 0) {
|
||||||
await db.insert(adapter.tables[tableName]).values(row.rows).returning()
|
insertedRows = await db.insert(adapter.tables[tableName]).values(row.rows).returning()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert locale rows
|
// Insert locale rows
|
||||||
if (adapter.tables[`${tableName}_locales`] && row.locales.length > 0) {
|
if (adapter.tables[`${tableName}_locales`] && row.locales.length > 0) {
|
||||||
|
if (!row.locales[0]._parentID) {
|
||||||
|
row.locales = row.locales.map((localeRow, i) => {
|
||||||
|
if (typeof localeRow._getParentID === 'function') {
|
||||||
|
localeRow._parentID = localeRow._getParentID(insertedRows)
|
||||||
|
delete localeRow._getParentID
|
||||||
|
}
|
||||||
|
return localeRow
|
||||||
|
})
|
||||||
|
}
|
||||||
await db.insert(adapter.tables[`${tableName}_locales`]).values(row.locales).returning()
|
await db.insert(adapter.tables[`${tableName}_locales`]).values(row.locales).returning()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,7 +90,7 @@ export const insertArrays = async ({ adapter, arrays, db, parentRows }: Args): P
|
|||||||
adapter,
|
adapter,
|
||||||
arrays: row.arrays,
|
arrays: row.arrays,
|
||||||
db,
|
db,
|
||||||
parentRows: row.rows,
|
parentRows: insertedRows,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
import { sql } from 'drizzle-orm'
|
import { sql } from 'drizzle-orm'
|
||||||
|
|
||||||
import type { DrizzleDB } from '../types'
|
import type { PostgresAdapter } from '../types'
|
||||||
|
|
||||||
export const createMigrationTable = async (db: DrizzleDB): Promise<void> => {
|
export const createMigrationTable = async (adapter: PostgresAdapter): Promise<void> => {
|
||||||
await db.execute(sql`CREATE TABLE IF NOT EXISTS "payload_migrations" (
|
const prependSchema = adapter.schemaName ? `"${adapter.schemaName}".` : ''
|
||||||
|
|
||||||
|
await adapter.drizzle.execute(
|
||||||
|
sql.raw(`CREATE TABLE IF NOT EXISTS ${prependSchema}"payload_migrations" (
|
||||||
"id" serial PRIMARY KEY NOT NULL,
|
"id" serial PRIMARY KEY NOT NULL,
|
||||||
"name" varchar,
|
"name" varchar,
|
||||||
"batch" numeric,
|
"batch" numeric,
|
||||||
"updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL,
|
"updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL,
|
||||||
"created_at" timestamp(3) with time zone DEFAULT now() NOT NULL
|
"created_at" timestamp(3) with time zone DEFAULT now() NOT NULL
|
||||||
);`)
|
);`),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,18 @@ module.exports = {
|
|||||||
'class-methods-use-this': 'off',
|
'class-methods-use-this': 'off',
|
||||||
|
|
||||||
// By default, it errors for unused variables. This is annoying, warnings are enough.
|
// By default, it errors for unused variables. This is annoying, warnings are enough.
|
||||||
'@typescript-eslint/no-unused-vars': 'warn',
|
'@typescript-eslint/no-unused-vars': [
|
||||||
|
'warn',
|
||||||
|
{
|
||||||
|
vars: 'all',
|
||||||
|
args: 'after-used',
|
||||||
|
ignoreRestSiblings: false,
|
||||||
|
argsIgnorePattern: '^_',
|
||||||
|
varsIgnorePattern: '^_',
|
||||||
|
destructuredArrayIgnorePattern: '^_',
|
||||||
|
caughtErrorsIgnorePattern: '^ignore',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
'@typescript-eslint/no-use-before-define': 'off',
|
'@typescript-eslint/no-use-before-define': 'off',
|
||||||
'arrow-body-style': 0,
|
'arrow-body-style': 0,
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"description": "Payload styles for ESLint and Prettier",
|
"description": "Payload styles for ESLint and Prettier",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"homepage": "https://payloadcms.com",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/payloadcms/payload.git",
|
||||||
|
"directory": "packages/eslint-config"
|
||||||
|
},
|
||||||
"author": {
|
"author": {
|
||||||
"email": "info@payloadcms.com",
|
"email": "info@payloadcms.com",
|
||||||
"name": "Payload",
|
"name": "Payload",
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
"name": "@payloadcms/live-preview-react",
|
"name": "@payloadcms/live-preview-react",
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"description": "The official live preview React SDK for Payload",
|
"description": "The official live preview React SDK for Payload",
|
||||||
"repository": "https://github.com/payloadcms/payload",
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/payloadcms/payload.git",
|
||||||
|
"directory": "packages/live-preview-react"
|
||||||
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://payloadcms.com",
|
"homepage": "https://payloadcms.com",
|
||||||
"author": "Payload CMS, Inc.",
|
"author": "Payload CMS, Inc.",
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
"name": "@payloadcms/live-preview",
|
"name": "@payloadcms/live-preview",
|
||||||
"version": "0.2.2",
|
"version": "0.2.2",
|
||||||
"description": "The official live preview JavaScript SDK for Payload",
|
"description": "The official live preview JavaScript SDK for Payload",
|
||||||
"repository": "https://github.com/payloadcms/payload",
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/payloadcms/payload.git",
|
||||||
|
"directory": "packages/live-preview"
|
||||||
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://payloadcms.com",
|
"homepage": "https://payloadcms.com",
|
||||||
"author": "Payload CMS, Inc.",
|
"author": "Payload CMS, Inc.",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "payload",
|
"name": "payload",
|
||||||
"version": "2.10.0",
|
"version": "2.12.0",
|
||||||
"description": "Node, React and MongoDB Headless CMS and Application Framework",
|
"description": "Node, React and MongoDB Headless CMS and Application Framework",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
@@ -101,7 +101,6 @@
|
|||||||
"jwt-decode": "3.1.2",
|
"jwt-decode": "3.1.2",
|
||||||
"md5": "2.3.0",
|
"md5": "2.3.0",
|
||||||
"method-override": "3.0.0",
|
"method-override": "3.0.0",
|
||||||
"micro-memoize": "4.1.2",
|
|
||||||
"minimist": "1.2.8",
|
"minimist": "1.2.8",
|
||||||
"mkdirp": "1.0.4",
|
"mkdirp": "1.0.4",
|
||||||
"monaco-editor": "0.38.0",
|
"monaco-editor": "0.38.0",
|
||||||
@@ -193,7 +192,7 @@
|
|||||||
"get-port": "5.1.1",
|
"get-port": "5.1.1",
|
||||||
"mini-css-extract-plugin": "1.6.2",
|
"mini-css-extract-plugin": "1.6.2",
|
||||||
"node-fetch": "2.6.12",
|
"node-fetch": "2.6.12",
|
||||||
"nodemon": "3.0.1",
|
"nodemon": "3.0.3",
|
||||||
"object.assign": "4.1.4",
|
"object.assign": "4.1.4",
|
||||||
"object.entries": "1.1.6",
|
"object.entries": "1.1.6",
|
||||||
"passport-strategy": "1.0.0",
|
"passport-strategy": "1.0.0",
|
||||||
@@ -267,7 +266,8 @@
|
|||||||
],
|
],
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/payloadcms/payload.git"
|
"url": "https://github.com/payloadcms/payload.git",
|
||||||
|
"directory": "packages/payload"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/payloadcms/payload"
|
"url": "https://github.com/payloadcms/payload"
|
||||||
|
|||||||
@@ -24,11 +24,16 @@ export const Collapsible: React.FC<Props> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const [collapsedLocal, setCollapsedLocal] = useState(Boolean(initCollapsed))
|
const [collapsedLocal, setCollapsedLocal] = useState(Boolean(initCollapsed))
|
||||||
const [hoveringToggle, setHoveringToggle] = useState(false)
|
const [hoveringToggle, setHoveringToggle] = useState(false)
|
||||||
const isNested = useCollapsible()
|
const { withinCollapsible } = useCollapsible()
|
||||||
const { t } = useTranslation('fields')
|
const { t } = useTranslation('fields')
|
||||||
|
|
||||||
const collapsed = typeof collapsedFromProps === 'boolean' ? collapsedFromProps : collapsedLocal
|
const collapsed = typeof collapsedFromProps === 'boolean' ? collapsedFromProps : collapsedLocal
|
||||||
|
|
||||||
|
const toggleCollapsible = React.useCallback(() => {
|
||||||
|
if (typeof onToggle === 'function') onToggle(!collapsed)
|
||||||
|
setCollapsedLocal(!collapsed)
|
||||||
|
}, [onToggle, collapsed])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={[
|
className={[
|
||||||
@@ -36,14 +41,14 @@ export const Collapsible: React.FC<Props> = ({
|
|||||||
className,
|
className,
|
||||||
dragHandleProps && `${baseClass}--has-drag-handle`,
|
dragHandleProps && `${baseClass}--has-drag-handle`,
|
||||||
collapsed && `${baseClass}--collapsed`,
|
collapsed && `${baseClass}--collapsed`,
|
||||||
isNested && `${baseClass}--nested`,
|
withinCollapsible && `${baseClass}--nested`,
|
||||||
hoveringToggle && `${baseClass}--hovered`,
|
hoveringToggle && `${baseClass}--hovered`,
|
||||||
`${baseClass}--style-${collapsibleStyle}`,
|
`${baseClass}--style-${collapsibleStyle}`,
|
||||||
]
|
]
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.join(' ')}
|
.join(' ')}
|
||||||
>
|
>
|
||||||
<CollapsibleProvider>
|
<CollapsibleProvider collapsed={collapsed} toggle={toggleCollapsible}>
|
||||||
<div
|
<div
|
||||||
className={`${baseClass}__toggle-wrap`}
|
className={`${baseClass}__toggle-wrap`}
|
||||||
onMouseEnter={() => setHoveringToggle(true)}
|
onMouseEnter={() => setHoveringToggle(true)}
|
||||||
@@ -65,10 +70,7 @@ export const Collapsible: React.FC<Props> = ({
|
|||||||
]
|
]
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.join(' ')}
|
.join(' ')}
|
||||||
onClick={() => {
|
onClick={toggleCollapsible}
|
||||||
if (typeof onToggle === 'function') onToggle(!collapsed)
|
|
||||||
setCollapsedLocal(!collapsed)
|
|
||||||
}}
|
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<span>{t('toggleBlock')}</span>
|
<span>{t('toggleBlock')}</span>
|
||||||
|
|||||||
@@ -1,14 +1,35 @@
|
|||||||
import React, { createContext, useContext } from 'react'
|
import React, { createContext, useContext } from 'react'
|
||||||
|
|
||||||
const Context = createContext(false)
|
type ContextType = {
|
||||||
|
collapsed: boolean
|
||||||
|
isVisible: boolean
|
||||||
|
toggle: () => void
|
||||||
|
withinCollapsible: boolean
|
||||||
|
}
|
||||||
|
const Context = createContext({
|
||||||
|
collapsed: false,
|
||||||
|
isVisible: true,
|
||||||
|
toggle: () => {},
|
||||||
|
withinCollapsible: true,
|
||||||
|
})
|
||||||
|
|
||||||
export const CollapsibleProvider: React.FC<{
|
export const CollapsibleProvider: React.FC<{
|
||||||
children?: React.ReactNode
|
children?: React.ReactNode
|
||||||
|
collapsed?: boolean
|
||||||
|
toggle: () => void
|
||||||
withinCollapsible?: boolean
|
withinCollapsible?: boolean
|
||||||
}> = ({ children, withinCollapsible = true }) => {
|
}> = ({ children, collapsed, toggle, withinCollapsible = true }) => {
|
||||||
return <Context.Provider value={withinCollapsible}>{children}</Context.Provider>
|
const { collapsed: parentIsCollapsed, isVisible } = useCollapsible()
|
||||||
|
|
||||||
|
const contextValue = React.useMemo((): ContextType => {
|
||||||
|
return {
|
||||||
|
collapsed: Boolean(collapsed),
|
||||||
|
isVisible: isVisible && !parentIsCollapsed,
|
||||||
|
toggle,
|
||||||
|
withinCollapsible,
|
||||||
|
}
|
||||||
|
}, [collapsed, withinCollapsible, toggle, parentIsCollapsed, isVisible])
|
||||||
|
return <Context.Provider value={contextValue}>{children}</Context.Provider>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useCollapsible = (): boolean => useContext(Context)
|
export const useCollapsible = (): ContextType => useContext(Context)
|
||||||
|
|
||||||
export default Context
|
|
||||||
|
|||||||
@@ -52,21 +52,9 @@ const Content: React.FC<DocumentDrawerProps> = ({
|
|||||||
|
|
||||||
const { id, docPermissions, getDocPreferences } = useDocumentInfo()
|
const { id, docPermissions, getDocPreferences } = useDocumentInfo()
|
||||||
|
|
||||||
// The component definition could come from multiple places in the config
|
// If they are replacing the entire edit view, use that.
|
||||||
// we need to cascade into the proper component from the top-down
|
// Else let the DefaultEdit determine what to render.
|
||||||
// 1. "components.Edit"
|
const CustomEditView = typeof Edit === 'function' ? Edit : undefined
|
||||||
// 2. "components.Edit.Default"
|
|
||||||
// 3. "components.Edit.Default.Component"
|
|
||||||
const CustomEditView =
|
|
||||||
typeof Edit === 'function'
|
|
||||||
? Edit
|
|
||||||
: typeof Edit === 'object' && typeof Edit.Default === 'function'
|
|
||||||
? Edit.Default
|
|
||||||
: typeof Edit?.Default === 'object' &&
|
|
||||||
'Component' in Edit.Default &&
|
|
||||||
typeof Edit.Default.Component === 'function'
|
|
||||||
? Edit.Default.Component
|
|
||||||
: undefined
|
|
||||||
|
|
||||||
const [fields, setFields] = useState(() => formatFields(collectionConfig, true))
|
const [fields, setFields] = useState(() => formatFields(collectionConfig, true))
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import { fieldTypes } from '../../forms/field-types'
|
|||||||
import X from '../../icons/X'
|
import X from '../../icons/X'
|
||||||
import { useAuth } from '../../utilities/Auth'
|
import { useAuth } from '../../utilities/Auth'
|
||||||
import { useConfig } from '../../utilities/Config'
|
import { useConfig } from '../../utilities/Config'
|
||||||
|
import { DocumentInfoProvider } from '../../utilities/DocumentInfo'
|
||||||
import { OperationContext } from '../../utilities/OperationProvider'
|
import { OperationContext } from '../../utilities/OperationProvider'
|
||||||
import { SelectAllStatus, useSelection } from '../../views/collections/List/SelectionProvider'
|
import { SelectAllStatus, useSelection } from '../../views/collections/List/SelectionProvider'
|
||||||
import { Drawer, DrawerToggler } from '../Drawer'
|
import { Drawer, DrawerToggler } from '../Drawer'
|
||||||
@@ -120,53 +121,55 @@ const EditMany: React.FC<Props> = (props) => {
|
|||||||
{t('edit')}
|
{t('edit')}
|
||||||
</DrawerToggler>
|
</DrawerToggler>
|
||||||
<Drawer header={null} slug={drawerSlug}>
|
<Drawer header={null} slug={drawerSlug}>
|
||||||
<OperationContext.Provider value="update">
|
<DocumentInfoProvider collection={collection}>
|
||||||
<Form className={`${baseClass}__form`} onSuccess={onSuccess}>
|
<OperationContext.Provider value="update">
|
||||||
<div className={`${baseClass}__main`}>
|
<Form className={`${baseClass}__form`} onSuccess={onSuccess}>
|
||||||
<div className={`${baseClass}__header`}>
|
<div className={`${baseClass}__main`}>
|
||||||
<h2 className={`${baseClass}__header__title`}>
|
<div className={`${baseClass}__header`}>
|
||||||
{t('editingLabel', { count, label: getTranslation(plural, i18n) })}
|
<h2 className={`${baseClass}__header__title`}>
|
||||||
</h2>
|
{t('editingLabel', { count, label: getTranslation(plural, i18n) })}
|
||||||
<button
|
</h2>
|
||||||
aria-label={t('close')}
|
<button
|
||||||
className={`${baseClass}__header__close`}
|
aria-label={t('close')}
|
||||||
id={`close-drawer__${drawerSlug}`}
|
className={`${baseClass}__header__close`}
|
||||||
onClick={() => closeModal(drawerSlug)}
|
id={`close-drawer__${drawerSlug}`}
|
||||||
type="button"
|
onClick={() => closeModal(drawerSlug)}
|
||||||
>
|
type="button"
|
||||||
<X />
|
>
|
||||||
</button>
|
<X />
|
||||||
</div>
|
</button>
|
||||||
<FieldSelect fields={fields} setSelected={setSelected} />
|
</div>
|
||||||
<RenderFields fieldSchema={selected} fieldTypes={fieldTypes} />
|
<FieldSelect fields={fields} setSelected={setSelected} />
|
||||||
<div className={`${baseClass}__sidebar-wrap`}>
|
<RenderFields fieldSchema={selected} fieldTypes={fieldTypes} />
|
||||||
<div className={`${baseClass}__sidebar`}>
|
<div className={`${baseClass}__sidebar-wrap`}>
|
||||||
<div className={`${baseClass}__sidebar-sticky-wrap`}>
|
<div className={`${baseClass}__sidebar`}>
|
||||||
<div className={`${baseClass}__document-actions`}>
|
<div className={`${baseClass}__sidebar-sticky-wrap`}>
|
||||||
{collection.versions ? (
|
<div className={`${baseClass}__document-actions`}>
|
||||||
<React.Fragment>
|
{collection.versions ? (
|
||||||
<Publish
|
<React.Fragment>
|
||||||
|
<Publish
|
||||||
|
action={`${serverURL}${api}/${slug}${getQueryParams()}`}
|
||||||
|
disabled={selected.length === 0}
|
||||||
|
/>
|
||||||
|
<SaveDraft
|
||||||
|
action={`${serverURL}${api}/${slug}${getQueryParams()}`}
|
||||||
|
disabled={selected.length === 0}
|
||||||
|
/>
|
||||||
|
</React.Fragment>
|
||||||
|
) : (
|
||||||
|
<Submit
|
||||||
action={`${serverURL}${api}/${slug}${getQueryParams()}`}
|
action={`${serverURL}${api}/${slug}${getQueryParams()}`}
|
||||||
disabled={selected.length === 0}
|
disabled={selected.length === 0}
|
||||||
/>
|
/>
|
||||||
<SaveDraft
|
)}
|
||||||
action={`${serverURL}${api}/${slug}${getQueryParams()}`}
|
</div>
|
||||||
disabled={selected.length === 0}
|
|
||||||
/>
|
|
||||||
</React.Fragment>
|
|
||||||
) : (
|
|
||||||
<Submit
|
|
||||||
action={`${serverURL}${api}/${slug}${getQueryParams()}`}
|
|
||||||
disabled={selected.length === 0}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Form>
|
||||||
</Form>
|
</OperationContext.Provider>
|
||||||
</OperationContext.Provider>
|
</DocumentInfoProvider>
|
||||||
</Drawer>
|
</Drawer>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const Group: React.FC<Props> = (props) => {
|
|||||||
permissions,
|
permissions,
|
||||||
} = props
|
} = props
|
||||||
|
|
||||||
const isWithinCollapsible = useCollapsible()
|
const { withinCollapsible } = useCollapsible()
|
||||||
const isWithinGroup = useGroup()
|
const isWithinGroup = useGroup()
|
||||||
const isWithinRow = useRow()
|
const isWithinRow = useRow()
|
||||||
const isWithinTab = useTabs()
|
const isWithinTab = useTabs()
|
||||||
@@ -43,7 +43,7 @@ const Group: React.FC<Props> = (props) => {
|
|||||||
const groupHasErrors = submitted && errorCount > 0
|
const groupHasErrors = submitted && errorCount > 0
|
||||||
|
|
||||||
const path = pathFromProps || name
|
const path = pathFromProps || name
|
||||||
const isTopLevel = !(isWithinCollapsible || isWithinGroup || isWithinRow)
|
const isTopLevel = !(withinCollapsible || isWithinGroup || isWithinRow)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -51,7 +51,7 @@ const Group: React.FC<Props> = (props) => {
|
|||||||
fieldBaseClass,
|
fieldBaseClass,
|
||||||
baseClass,
|
baseClass,
|
||||||
isTopLevel && `${baseClass}--top-level`,
|
isTopLevel && `${baseClass}--top-level`,
|
||||||
isWithinCollapsible && `${baseClass}--within-collapsible`,
|
withinCollapsible && `${baseClass}--within-collapsible`,
|
||||||
isWithinGroup && `${baseClass}--within-group`,
|
isWithinGroup && `${baseClass}--within-group`,
|
||||||
isWithinRow && `${baseClass}--within-row`,
|
isWithinRow && `${baseClass}--within-row`,
|
||||||
isWithinTab && `${baseClass}--within-tab`,
|
isWithinTab && `${baseClass}--within-tab`,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const reduceToIDs = (options) =>
|
|||||||
return [...ids, ...reduceToIDs(option.options)]
|
return [...ids, ...reduceToIDs(option.options)]
|
||||||
}
|
}
|
||||||
|
|
||||||
return [...ids, option.value]
|
return [...ids, { id: option.value, relationTo: option.relationTo }]
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const sortOptions = (options: Option[]): Option[] =>
|
const sortOptions = (options: Option[]): Option[] =>
|
||||||
@@ -63,10 +63,12 @@ const optionsReducer = (state: OptionGroup[], action: Action): OptionGroup[] =>
|
|||||||
const optionsToAddTo = newOptions.find(
|
const optionsToAddTo = newOptions.find(
|
||||||
(optionGroup) => optionGroup.label === collection.labels.plural,
|
(optionGroup) => optionGroup.label === collection.labels.plural,
|
||||||
)
|
)
|
||||||
|
|
||||||
const newSubOptions = docs.reduce((docSubOptions, doc) => {
|
const newSubOptions = docs.reduce((docSubOptions, doc) => {
|
||||||
if (loadedIDs.indexOf(doc.id) === -1) {
|
if (
|
||||||
loadedIDs.push(doc.id)
|
loadedIDs.filter((item) => item.id === doc.id && item.relationTo === relation).length ===
|
||||||
|
0
|
||||||
|
) {
|
||||||
|
loadedIDs.push({ id: doc.id, relationTo: relation })
|
||||||
|
|
||||||
const docTitle = formatUseAsTitle({
|
const docTitle = formatUseAsTitle({
|
||||||
collection,
|
collection,
|
||||||
@@ -89,7 +91,10 @@ const optionsReducer = (state: OptionGroup[], action: Action): OptionGroup[] =>
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
ids.forEach((id) => {
|
ids.forEach((id) => {
|
||||||
if (!loadedIDs.includes(id)) {
|
if (
|
||||||
|
loadedIDs.filter((item) => item.id === id && item.relationTo === relation).length === 0
|
||||||
|
) {
|
||||||
|
loadedIDs.push({ id, relationTo: relation })
|
||||||
newSubOptions.push({
|
newSubOptions.push({
|
||||||
label: `${i18n.t('general:untitled')} - ID: ${id}`,
|
label: `${i18n.t('general:untitled')} - ID: ${id}`,
|
||||||
relationTo: relation,
|
relationTo: relation,
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import type { JSONSchema4 } from 'json-schema'
|
|||||||
import type { PayloadRequest } from '../../../../../express/types'
|
import type { PayloadRequest } from '../../../../../express/types'
|
||||||
import type { RequestContext } from '../../../../../express/types'
|
import type { RequestContext } from '../../../../../express/types'
|
||||||
import type { RichTextField, Validate } from '../../../../../fields/config/types'
|
import type { RichTextField, Validate } from '../../../../../fields/config/types'
|
||||||
|
import type { Payload } from '../../../../../payload'
|
||||||
import type { CellComponentProps } from '../../../views/collections/List/Cell/types'
|
import type { CellComponentProps } from '../../../views/collections/List/Cell/types'
|
||||||
|
|
||||||
export type RichTextFieldProps<
|
export type RichTextFieldProps<
|
||||||
@@ -28,16 +29,20 @@ type RichTextAdapterBase<
|
|||||||
siblingDoc: Record<string, unknown>
|
siblingDoc: Record<string, unknown>
|
||||||
}) => Promise<void> | null
|
}) => Promise<void> | null
|
||||||
outputSchema?: ({
|
outputSchema?: ({
|
||||||
|
collectionIDFieldTypes,
|
||||||
field,
|
field,
|
||||||
interfaceNameDefinitions,
|
interfaceNameDefinitions,
|
||||||
isRequired,
|
isRequired,
|
||||||
|
payload,
|
||||||
}: {
|
}: {
|
||||||
|
collectionIDFieldTypes: { [key: string]: 'number' | 'string' }
|
||||||
field: RichTextField<Value, AdapterProps, ExtraFieldProperties>
|
field: RichTextField<Value, AdapterProps, ExtraFieldProperties>
|
||||||
/**
|
/**
|
||||||
* Allows you to define new top-level interfaces that can be re-used in the output schema.
|
* Allows you to define new top-level interfaces that can be re-used in the output schema.
|
||||||
*/
|
*/
|
||||||
interfaceNameDefinitions: Map<string, JSONSchema4>
|
interfaceNameDefinitions: Map<string, JSONSchema4>
|
||||||
isRequired: boolean
|
isRequired: boolean
|
||||||
|
payload?: Payload
|
||||||
}) => JSONSchema4
|
}) => JSONSchema4
|
||||||
populationPromise?: (data: {
|
populationPromise?: (data: {
|
||||||
context: RequestContext
|
context: RequestContext
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ const TabsField: React.FC<Props> = (props) => {
|
|||||||
const { preferencesKey } = useDocumentInfo()
|
const { preferencesKey } = useDocumentInfo()
|
||||||
const { i18n } = useTranslation()
|
const { i18n } = useTranslation()
|
||||||
|
|
||||||
const isWithinCollapsible = useCollapsible()
|
const { withinCollapsible } = useCollapsible()
|
||||||
const [activeTabIndex, setActiveTabIndex] = useState<number>(0)
|
const [activeTabIndex, setActiveTabIndex] = useState<number>(0)
|
||||||
const tabsPrefKey = `tabs-${indexPath}`
|
const tabsPrefKey = `tabs-${indexPath}`
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ const TabsField: React.FC<Props> = (props) => {
|
|||||||
fieldBaseClass,
|
fieldBaseClass,
|
||||||
className,
|
className,
|
||||||
baseClass,
|
baseClass,
|
||||||
isWithinCollapsible && `${baseClass}--within-collapsible`,
|
withinCollapsible && `${baseClass}--within-collapsible`,
|
||||||
]
|
]
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.join(' ')}
|
.join(' ')}
|
||||||
|
|||||||
@@ -74,21 +74,22 @@ const DefaultCell: React.FC<Props> = (props) => {
|
|||||||
if (collection.upload && fieldAffectsData(field) && field.name === 'filename') {
|
if (collection.upload && fieldAffectsData(field) && field.name === 'filename') {
|
||||||
CellComponent = cellComponents.File
|
CellComponent = cellComponents.File
|
||||||
} else {
|
} else {
|
||||||
return (
|
if (!cellData && 'label' in field) {
|
||||||
<WrapElement {...wrapElementProps}>
|
return (
|
||||||
{(cellData === '' || typeof cellData === 'undefined') &&
|
<WrapElement {...wrapElementProps}>
|
||||||
'label' in field &&
|
{t('noLabel', {
|
||||||
t('noLabel', {
|
|
||||||
label: getTranslation(
|
label: getTranslation(
|
||||||
typeof field.label === 'function' ? 'data' : field.label || 'data',
|
typeof field.label === 'function' ? 'data' : field.label || 'data',
|
||||||
i18n,
|
i18n,
|
||||||
),
|
),
|
||||||
})}
|
})}
|
||||||
{typeof cellData === 'string' && cellData}
|
</WrapElement>
|
||||||
{typeof cellData === 'number' && cellData}
|
)
|
||||||
{typeof cellData === 'object' && JSON.stringify(cellData)}
|
} else if (typeof cellData === 'string' || typeof cellData === 'number') {
|
||||||
</WrapElement>
|
return <WrapElement {...wrapElementProps}>{cellData}</WrapElement>
|
||||||
)
|
} else if (typeof cellData === 'object') {
|
||||||
|
return <WrapElement {...wrapElementProps}>{JSON.stringify(cellData)}</WrapElement>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const useThumbnail = (
|
|||||||
return `${pathURL}/${thumbnailURL}`
|
return `${pathURL}/${thumbnailURL}`
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isImage(mimeType as string)) {
|
if (adminThumbnail || isImage(mimeType as string)) {
|
||||||
if (typeof adminThumbnail === 'undefined' && url) {
|
if (typeof adminThumbnail === 'undefined' && url) {
|
||||||
return url as string
|
return url as string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,14 @@ import { extractTranslations } from '../../translations/extractTranslations'
|
|||||||
const labels = extractTranslations(['authentication:enableAPIKey', 'authentication:apiKey'])
|
const labels = extractTranslations(['authentication:enableAPIKey', 'authentication:apiKey'])
|
||||||
|
|
||||||
const encryptKey: FieldHook = ({ req, value }) =>
|
const encryptKey: FieldHook = ({ req, value }) =>
|
||||||
value ? req.payload.encrypt(value as string) : undefined
|
value ? req.payload.encrypt(value as string) : null
|
||||||
const decryptKey: FieldHook = ({ req, value }) =>
|
const decryptKey: FieldHook = ({ req, value }) =>
|
||||||
value ? req.payload.decrypt(value as string) : undefined
|
value ? req.payload.decrypt(value as string) : undefined
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
name: 'enableAPIKey',
|
name: 'enableAPIKey',
|
||||||
|
type: 'checkbox',
|
||||||
admin: {
|
admin: {
|
||||||
components: {
|
components: {
|
||||||
Field: () => null,
|
Field: () => null,
|
||||||
@@ -21,10 +22,10 @@ export default [
|
|||||||
},
|
},
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
label: labels['authentication:enableAPIKey'],
|
label: labels['authentication:enableAPIKey'],
|
||||||
type: 'checkbox',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'apiKey',
|
name: 'apiKey',
|
||||||
|
type: 'text',
|
||||||
admin: {
|
admin: {
|
||||||
components: {
|
components: {
|
||||||
Field: () => null,
|
Field: () => null,
|
||||||
@@ -35,10 +36,10 @@ export default [
|
|||||||
beforeChange: [encryptKey],
|
beforeChange: [encryptKey],
|
||||||
},
|
},
|
||||||
label: labels['authentication:apiKey'],
|
label: labels['authentication:apiKey'],
|
||||||
type: 'text',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'apiKeyIndex',
|
name: 'apiKeyIndex',
|
||||||
|
type: 'text',
|
||||||
admin: {
|
admin: {
|
||||||
disabled: true,
|
disabled: true,
|
||||||
},
|
},
|
||||||
@@ -59,6 +60,5 @@ export default [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
type: 'text',
|
|
||||||
},
|
},
|
||||||
] as Field[]
|
] as Field[]
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ async function login<TSlug extends keyof GeneratedTypes['collections']>(
|
|||||||
overrideAccess,
|
overrideAccess,
|
||||||
req,
|
req,
|
||||||
req: {
|
req: {
|
||||||
|
fallbackLocale,
|
||||||
|
locale,
|
||||||
payload,
|
payload,
|
||||||
payload: { config, secret },
|
payload: { config, secret },
|
||||||
},
|
},
|
||||||
@@ -196,7 +198,9 @@ async function login<TSlug extends keyof GeneratedTypes['collections']>(
|
|||||||
context: req.context,
|
context: req.context,
|
||||||
depth,
|
depth,
|
||||||
doc: user,
|
doc: user,
|
||||||
|
fallbackLocale,
|
||||||
global: null,
|
global: null,
|
||||||
|
locale,
|
||||||
overrideAccess,
|
overrideAccess,
|
||||||
req,
|
req,
|
||||||
showHiddenFields,
|
showHiddenFields,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export async function generateTypes(): Promise<void> {
|
|||||||
|
|
||||||
logger.info('Compiling TS types for Collections and Globals...')
|
logger.info('Compiling TS types for Collections and Globals...')
|
||||||
|
|
||||||
const jsonSchema = configToJSONSchema(payload.config, payload.db.defaultIDType)
|
const jsonSchema = configToJSONSchema(payload.config, payload.db.defaultIDType, payload)
|
||||||
|
|
||||||
const declare = `declare module 'payload' {\n export interface GeneratedTypes extends Config {}\n}`
|
const declare = `declare module 'payload' {\n export interface GeneratedTypes extends Config {}\n}`
|
||||||
|
|
||||||
|
|||||||
@@ -56,30 +56,33 @@ const args = minimist(process.argv.slice(2))
|
|||||||
const scriptIndex = args._.findIndex((x) => x === 'build')
|
const scriptIndex = args._.findIndex((x) => x === 'build')
|
||||||
|
|
||||||
const script = scriptIndex === -1 ? args._[0] : args._[scriptIndex]
|
const script = scriptIndex === -1 ? args._[0] : args._[scriptIndex]
|
||||||
|
if (script) {
|
||||||
|
if (script.startsWith('migrate')) {
|
||||||
|
migrate(args).then(() => process.exit(0))
|
||||||
|
} else {
|
||||||
|
switch (script.toLowerCase()) {
|
||||||
|
case 'build': {
|
||||||
|
build()
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
if (script.startsWith('migrate')) {
|
case 'generate:types': {
|
||||||
migrate(args).then(() => process.exit(0))
|
generateTypes()
|
||||||
} else {
|
break
|
||||||
switch (script.toLowerCase()) {
|
}
|
||||||
case 'build': {
|
|
||||||
build()
|
case 'generate:graphqlschema': {
|
||||||
break
|
generateGraphQLSchema()
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
console.log(`Unknown script "${script}".`)
|
||||||
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'generate:types': {
|
|
||||||
generateTypes()
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
case 'generate:graphqlschema': {
|
|
||||||
generateGraphQLSchema()
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
|
||||||
console.log(`Unknown script "${script}".`)
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
console.error('No payload script specified. Did you mean to run `payload migrate`?')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export type BeforeValidateHook<T extends TypeWithID = any> = (args: {
|
|||||||
* `undefined` on 'create' operation
|
* `undefined` on 'create' operation
|
||||||
*/
|
*/
|
||||||
originalDoc?: T
|
originalDoc?: T
|
||||||
req?: PayloadRequest
|
req: PayloadRequest
|
||||||
}) => any
|
}) => any
|
||||||
|
|
||||||
export type BeforeChangeHook<T extends TypeWithID = any> = (args: {
|
export type BeforeChangeHook<T extends TypeWithID = any> = (args: {
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import type {
|
|||||||
import executeAccess from '../../auth/executeAccess'
|
import executeAccess from '../../auth/executeAccess'
|
||||||
import sendVerificationEmail from '../../auth/sendVerificationEmail'
|
import sendVerificationEmail from '../../auth/sendVerificationEmail'
|
||||||
import { registerLocalStrategy } from '../../auth/strategies/local/register'
|
import { registerLocalStrategy } from '../../auth/strategies/local/register'
|
||||||
import { fieldAffectsData } from '../../fields/config/types'
|
|
||||||
import { afterChange } from '../../fields/hooks/afterChange'
|
import { afterChange } from '../../fields/hooks/afterChange'
|
||||||
import { afterRead } from '../../fields/hooks/afterRead'
|
import { afterRead } from '../../fields/hooks/afterRead'
|
||||||
import { beforeChange } from '../../fields/hooks/beforeChange'
|
import { beforeChange } from '../../fields/hooks/beforeChange'
|
||||||
@@ -26,12 +25,12 @@ import { generateFileData } from '../../uploads/generateFileData'
|
|||||||
import { unlinkTempFiles } from '../../uploads/unlinkTempFiles'
|
import { unlinkTempFiles } from '../../uploads/unlinkTempFiles'
|
||||||
import { uploadFiles } from '../../uploads/uploadFiles'
|
import { uploadFiles } from '../../uploads/uploadFiles'
|
||||||
import { commitTransaction } from '../../utilities/commitTransaction'
|
import { commitTransaction } from '../../utilities/commitTransaction'
|
||||||
|
import flattenFields from '../../utilities/flattenTopLevelFields'
|
||||||
import { initTransaction } from '../../utilities/initTransaction'
|
import { initTransaction } from '../../utilities/initTransaction'
|
||||||
import { killTransaction } from '../../utilities/killTransaction'
|
import { killTransaction } from '../../utilities/killTransaction'
|
||||||
import sanitizeInternalFields from '../../utilities/sanitizeInternalFields'
|
import sanitizeInternalFields from '../../utilities/sanitizeInternalFields'
|
||||||
import { saveVersion } from '../../versions/saveVersion'
|
import { saveVersion } from '../../versions/saveVersion'
|
||||||
import { buildAfterOperation } from './utils'
|
import { buildAfterOperation } from './utils'
|
||||||
import flattenFields from '../../utilities/flattenTopLevelFields'
|
|
||||||
|
|
||||||
const unlinkFile = promisify(fs.unlink)
|
const unlinkFile = promisify(fs.unlink)
|
||||||
|
|
||||||
@@ -88,6 +87,8 @@ async function create<TSlug extends keyof GeneratedTypes['collections']>(
|
|||||||
overrideAccess,
|
overrideAccess,
|
||||||
overwriteExistingFiles = false,
|
overwriteExistingFiles = false,
|
||||||
req: {
|
req: {
|
||||||
|
fallbackLocale,
|
||||||
|
locale,
|
||||||
payload,
|
payload,
|
||||||
payload: { config, emailOptions },
|
payload: { config, emailOptions },
|
||||||
},
|
},
|
||||||
@@ -289,7 +290,9 @@ async function create<TSlug extends keyof GeneratedTypes['collections']>(
|
|||||||
context: req.context,
|
context: req.context,
|
||||||
depth,
|
depth,
|
||||||
doc: result,
|
doc: result,
|
||||||
|
fallbackLocale,
|
||||||
global: null,
|
global: null,
|
||||||
|
locale,
|
||||||
overrideAccess,
|
overrideAccess,
|
||||||
req,
|
req,
|
||||||
showHiddenFields,
|
showHiddenFields,
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ async function deleteOperation<TSlug extends keyof GeneratedTypes['collections']
|
|||||||
depth,
|
depth,
|
||||||
overrideAccess,
|
overrideAccess,
|
||||||
req: {
|
req: {
|
||||||
|
fallbackLocale,
|
||||||
locale,
|
locale,
|
||||||
payload: { config },
|
payload: { config },
|
||||||
payload,
|
payload,
|
||||||
@@ -149,9 +150,9 @@ async function deleteOperation<TSlug extends keyof GeneratedTypes['collections']
|
|||||||
if (collectionConfig.versions) {
|
if (collectionConfig.versions) {
|
||||||
await deleteCollectionVersions({
|
await deleteCollectionVersions({
|
||||||
id,
|
id,
|
||||||
|
slug: collectionConfig.slug,
|
||||||
payload,
|
payload,
|
||||||
req,
|
req,
|
||||||
slug: collectionConfig.slug,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,7 +179,9 @@ async function deleteOperation<TSlug extends keyof GeneratedTypes['collections']
|
|||||||
context: req.context,
|
context: req.context,
|
||||||
depth,
|
depth,
|
||||||
doc: result || doc,
|
doc: result || doc,
|
||||||
|
fallbackLocale,
|
||||||
global: null,
|
global: null,
|
||||||
|
locale,
|
||||||
overrideAccess,
|
overrideAccess,
|
||||||
req,
|
req,
|
||||||
showHiddenFields,
|
showHiddenFields,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user