From 8b63286b23315aebb8bd4f2588af2e612bbb359f Mon Sep 17 00:00:00 2001 From: kilemensi Date: Mon, 2 Oct 2023 09:46:15 +0300 Subject: [PATCH 01/17] Upgrade payload & fix start --- apps/codeforafrica/package.json | 2 +- pnpm-lock.yaml | 974 +++++++++++++++++++++----------- 2 files changed, 647 insertions(+), 329 deletions(-) diff --git a/apps/codeforafrica/package.json b/apps/codeforafrica/package.json index 7213a2053..137fbd965 100644 --- a/apps/codeforafrica/package.json +++ b/apps/codeforafrica/package.json @@ -25,13 +25,13 @@ "build-server": "tsc --project tsconfig.server.json", "build-next": "NEXT_BUILD=true pnpm pnpm build-server && NEXT_BUILD=true PAYLOAD_CONFIG_PATH=dist/payload.config.js node dist/server.js", "build-payload": "payload build", + "start": "PAYLOAD_CONFIG_PATH=${PAYLOAD_CONFIG_PATH:-dist/payload.config.js} NODE_ENV=${NODE_ENV:-production} node dist/server.js", "dev": "NODE_OPTIONS='--inspect' ts-node --project tsconfig.server.json server.ts", "lint-check": "TIMING=1 eslint './'", "lint": "TIMING=1 eslint --fix './'", "jest": "jest", "playwright": "npx playwright test", "build": "next build", - "start": "next start", "clean": "rm -rf .next .turbo node_modules" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9531217ef..03e2a7cef 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -117,7 +117,7 @@ importers: version: 1.9.3 migrate-mongo: specifier: ^10.0.0 - version: 10.0.0(mongodb@5.7.0) + version: 10.0.0(mongodb@5.9.0) monaco-editor: specifier: ^0.38.0 version: 0.38.0 @@ -1223,7 +1223,7 @@ importers: version: 27.2.3(eslint@8.39.0)(typescript@4.9.5) eslint-plugin-jest-dom: specifier: ^5.0.1 - version: 5.0.1(@testing-library/dom@9.2.0)(eslint@8.39.0) + version: 5.0.1(@testing-library/dom@9.3.3)(eslint@8.39.0) eslint-plugin-json: specifier: ^3.1.0 version: 3.1.0 @@ -1527,47 +1527,49 @@ packages: tslib: 2.6.1 dev: false - /@aws-sdk/client-cognito-identity@3.385.0: + /@aws-sdk/client-cognito-identity@3.421.0: resolution: { - integrity: sha512-fRXZhxvBBeK/Jxb+sLPhyQmcduNSugSKJDz474A/wLK5UIuDOnKhDTjsa0OXMpY5DkqwdYLwDcGZtxUbEZ8DCQ==, + integrity: sha512-9htG14uDA/2XhU+vRhBcCG8GAOJ29rV53cxlc6I1YRKD6imXdU+X0ZfMPZCkPjEPGT4hHTpO0vR2J7zY8FXfzg==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: "@aws-crypto/sha256-browser": 3.0.0 "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/client-sts": 3.385.0 - "@aws-sdk/credential-provider-node": 3.385.0 - "@aws-sdk/middleware-host-header": 3.379.1 - "@aws-sdk/middleware-logger": 3.378.0 - "@aws-sdk/middleware-recursion-detection": 3.378.0 - "@aws-sdk/middleware-signing": 3.379.1 - "@aws-sdk/middleware-user-agent": 3.382.0 - "@aws-sdk/types": 3.378.0 - "@aws-sdk/util-endpoints": 3.382.0 - "@aws-sdk/util-user-agent-browser": 3.378.0 - "@aws-sdk/util-user-agent-node": 3.378.0 - "@smithy/config-resolver": 2.0.1 - "@smithy/fetch-http-handler": 2.0.1 - "@smithy/hash-node": 2.0.1 - "@smithy/invalid-dependency": 2.0.1 - "@smithy/middleware-content-length": 2.0.1 - "@smithy/middleware-endpoint": 2.0.1 - "@smithy/middleware-retry": 2.0.1 - "@smithy/middleware-serde": 2.0.1 - "@smithy/middleware-stack": 2.0.0 - "@smithy/node-config-provider": 2.0.1 - "@smithy/node-http-handler": 2.0.1 - "@smithy/protocol-http": 2.0.1 - "@smithy/smithy-client": 2.0.1 - "@smithy/types": 2.0.2 - "@smithy/url-parser": 2.0.1 + "@aws-sdk/client-sts": 3.421.0 + "@aws-sdk/credential-provider-node": 3.421.0 + "@aws-sdk/middleware-host-header": 3.418.0 + "@aws-sdk/middleware-logger": 3.418.0 + "@aws-sdk/middleware-recursion-detection": 3.418.0 + "@aws-sdk/middleware-signing": 3.418.0 + "@aws-sdk/middleware-user-agent": 3.418.0 + "@aws-sdk/region-config-resolver": 3.418.0 + "@aws-sdk/types": 3.418.0 + "@aws-sdk/util-endpoints": 3.418.0 + "@aws-sdk/util-user-agent-browser": 3.418.0 + "@aws-sdk/util-user-agent-node": 3.418.0 + "@smithy/config-resolver": 2.0.11 + "@smithy/fetch-http-handler": 2.2.0 + "@smithy/hash-node": 2.0.10 + "@smithy/invalid-dependency": 2.0.10 + "@smithy/middleware-content-length": 2.0.12 + "@smithy/middleware-endpoint": 2.0.10 + "@smithy/middleware-retry": 2.0.13 + "@smithy/middleware-serde": 2.0.10 + "@smithy/middleware-stack": 2.0.4 + "@smithy/node-config-provider": 2.0.13 + "@smithy/node-http-handler": 2.1.6 + "@smithy/protocol-http": 3.0.6 + "@smithy/smithy-client": 2.1.8 + "@smithy/types": 2.3.4 + "@smithy/url-parser": 2.0.10 "@smithy/util-base64": 2.0.0 "@smithy/util-body-length-browser": 2.0.0 - "@smithy/util-body-length-node": 2.0.0 - "@smithy/util-defaults-mode-browser": 2.0.1 - "@smithy/util-defaults-mode-node": 2.0.1 - "@smithy/util-retry": 2.0.0 + "@smithy/util-body-length-node": 2.1.0 + "@smithy/util-defaults-mode-browser": 2.0.12 + "@smithy/util-defaults-mode-node": 2.0.14 + "@smithy/util-retry": 2.0.3 "@smithy/util-utf8": 2.0.0 tslib: 2.6.1 transitivePeerDependencies: @@ -1727,44 +1729,46 @@ packages: - aws-crt dev: false - /@aws-sdk/client-sso@3.382.0: + /@aws-sdk/client-sso@3.421.0: resolution: { - integrity: sha512-ge11t4hJllOF8pBNF0p1X52lLqUsLGAoey24fvk3fyvvczeLpegGYh2kdLG0iwFTDgRxaUqK+kboH5Wy9ux/pw==, + integrity: sha512-40CmW7K2/FZEn3CbOjbpRYeVjKu6aJQlpRHcAgEJGNoVEAnRA3YNH4H0BN2iWWITfYg3B7sIjMm5VE9fCIK1Ng==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: "@aws-crypto/sha256-browser": 3.0.0 "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/middleware-host-header": 3.379.1 - "@aws-sdk/middleware-logger": 3.378.0 - "@aws-sdk/middleware-recursion-detection": 3.378.0 - "@aws-sdk/middleware-user-agent": 3.382.0 - "@aws-sdk/types": 3.378.0 - "@aws-sdk/util-endpoints": 3.382.0 - "@aws-sdk/util-user-agent-browser": 3.378.0 - "@aws-sdk/util-user-agent-node": 3.378.0 - "@smithy/config-resolver": 2.0.1 - "@smithy/fetch-http-handler": 2.0.1 - "@smithy/hash-node": 2.0.1 - "@smithy/invalid-dependency": 2.0.1 - "@smithy/middleware-content-length": 2.0.1 - "@smithy/middleware-endpoint": 2.0.1 - "@smithy/middleware-retry": 2.0.1 - "@smithy/middleware-serde": 2.0.1 - "@smithy/middleware-stack": 2.0.0 - "@smithy/node-config-provider": 2.0.1 - "@smithy/node-http-handler": 2.0.1 - "@smithy/protocol-http": 2.0.1 - "@smithy/smithy-client": 2.0.1 - "@smithy/types": 2.0.2 - "@smithy/url-parser": 2.0.1 + "@aws-sdk/middleware-host-header": 3.418.0 + "@aws-sdk/middleware-logger": 3.418.0 + "@aws-sdk/middleware-recursion-detection": 3.418.0 + "@aws-sdk/middleware-user-agent": 3.418.0 + "@aws-sdk/region-config-resolver": 3.418.0 + "@aws-sdk/types": 3.418.0 + "@aws-sdk/util-endpoints": 3.418.0 + "@aws-sdk/util-user-agent-browser": 3.418.0 + "@aws-sdk/util-user-agent-node": 3.418.0 + "@smithy/config-resolver": 2.0.11 + "@smithy/fetch-http-handler": 2.2.0 + "@smithy/hash-node": 2.0.10 + "@smithy/invalid-dependency": 2.0.10 + "@smithy/middleware-content-length": 2.0.12 + "@smithy/middleware-endpoint": 2.0.10 + "@smithy/middleware-retry": 2.0.13 + "@smithy/middleware-serde": 2.0.10 + "@smithy/middleware-stack": 2.0.4 + "@smithy/node-config-provider": 2.0.13 + "@smithy/node-http-handler": 2.1.6 + "@smithy/protocol-http": 3.0.6 + "@smithy/smithy-client": 2.1.8 + "@smithy/types": 2.3.4 + "@smithy/url-parser": 2.0.10 "@smithy/util-base64": 2.0.0 "@smithy/util-body-length-browser": 2.0.0 - "@smithy/util-body-length-node": 2.0.0 - "@smithy/util-defaults-mode-browser": 2.0.1 - "@smithy/util-defaults-mode-node": 2.0.1 - "@smithy/util-retry": 2.0.0 + "@smithy/util-body-length-node": 2.1.0 + "@smithy/util-defaults-mode-browser": 2.0.12 + "@smithy/util-defaults-mode-node": 2.0.14 + "@smithy/util-retry": 2.0.3 "@smithy/util-utf8": 2.0.0 tslib: 2.6.1 transitivePeerDependencies: @@ -1819,47 +1823,49 @@ packages: - aws-crt dev: false - /@aws-sdk/client-sts@3.385.0: + /@aws-sdk/client-sts@3.421.0: resolution: { - integrity: sha512-VdSDwICW2cBttbdj1izu6VYflJbZZKu3/FSaJGuGu8SgTvRsa56g6E5xfbUfR/SCstuETObKLusSfQZ6yxUnzA==, + integrity: sha512-/92NOZMcdkBcvGrINk5B/l+6DGcVzYE4Ab3ME4vcY9y//u2gd0yNn5YYRSzzjVBLvhDP3u6CbTfLX2Bm4qihPw==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: "@aws-crypto/sha256-browser": 3.0.0 "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/credential-provider-node": 3.385.0 - "@aws-sdk/middleware-host-header": 3.379.1 - "@aws-sdk/middleware-logger": 3.378.0 - "@aws-sdk/middleware-recursion-detection": 3.378.0 - "@aws-sdk/middleware-sdk-sts": 3.379.1 - "@aws-sdk/middleware-signing": 3.379.1 - "@aws-sdk/middleware-user-agent": 3.382.0 - "@aws-sdk/types": 3.378.0 - "@aws-sdk/util-endpoints": 3.382.0 - "@aws-sdk/util-user-agent-browser": 3.378.0 - "@aws-sdk/util-user-agent-node": 3.378.0 - "@smithy/config-resolver": 2.0.1 - "@smithy/fetch-http-handler": 2.0.1 - "@smithy/hash-node": 2.0.1 - "@smithy/invalid-dependency": 2.0.1 - "@smithy/middleware-content-length": 2.0.1 - "@smithy/middleware-endpoint": 2.0.1 - "@smithy/middleware-retry": 2.0.1 - "@smithy/middleware-serde": 2.0.1 - "@smithy/middleware-stack": 2.0.0 - "@smithy/node-config-provider": 2.0.1 - "@smithy/node-http-handler": 2.0.1 - "@smithy/protocol-http": 2.0.1 - "@smithy/smithy-client": 2.0.1 - "@smithy/types": 2.0.2 - "@smithy/url-parser": 2.0.1 + "@aws-sdk/credential-provider-node": 3.421.0 + "@aws-sdk/middleware-host-header": 3.418.0 + "@aws-sdk/middleware-logger": 3.418.0 + "@aws-sdk/middleware-recursion-detection": 3.418.0 + "@aws-sdk/middleware-sdk-sts": 3.418.0 + "@aws-sdk/middleware-signing": 3.418.0 + "@aws-sdk/middleware-user-agent": 3.418.0 + "@aws-sdk/region-config-resolver": 3.418.0 + "@aws-sdk/types": 3.418.0 + "@aws-sdk/util-endpoints": 3.418.0 + "@aws-sdk/util-user-agent-browser": 3.418.0 + "@aws-sdk/util-user-agent-node": 3.418.0 + "@smithy/config-resolver": 2.0.11 + "@smithy/fetch-http-handler": 2.2.0 + "@smithy/hash-node": 2.0.10 + "@smithy/invalid-dependency": 2.0.10 + "@smithy/middleware-content-length": 2.0.12 + "@smithy/middleware-endpoint": 2.0.10 + "@smithy/middleware-retry": 2.0.13 + "@smithy/middleware-serde": 2.0.10 + "@smithy/middleware-stack": 2.0.4 + "@smithy/node-config-provider": 2.0.13 + "@smithy/node-http-handler": 2.1.6 + "@smithy/protocol-http": 3.0.6 + "@smithy/smithy-client": 2.1.8 + "@smithy/types": 2.3.4 + "@smithy/url-parser": 2.0.10 "@smithy/util-base64": 2.0.0 "@smithy/util-body-length-browser": 2.0.0 - "@smithy/util-body-length-node": 2.0.0 - "@smithy/util-defaults-mode-browser": 2.0.1 - "@smithy/util-defaults-mode-node": 2.0.1 - "@smithy/util-retry": 2.0.0 + "@smithy/util-body-length-node": 2.1.0 + "@smithy/util-defaults-mode-browser": 2.0.12 + "@smithy/util-defaults-mode-node": 2.0.14 + "@smithy/util-retry": 2.0.3 "@smithy/util-utf8": 2.0.0 fast-xml-parser: 4.2.5 tslib: 2.6.1 @@ -1881,17 +1887,18 @@ packages: tslib: 2.5.0 dev: false - /@aws-sdk/credential-provider-cognito-identity@3.385.0: + /@aws-sdk/credential-provider-cognito-identity@3.421.0: resolution: { - integrity: sha512-NeWJgI2XdfO0ZM25KsfNx9CDmLByY3ymVc0ae4Os+bd8pJsFeo1rX3NSkyw8XGryEbOlVJ3Jz5W5huhjo4LvqQ==, + integrity: sha512-x+C7nonKomdBAljTAPtqhU6Xzzaqy08PV1vO5Cp/YYMye+uOGQ2+1x7cfaY5uIHZbbNRUhCmUBKGnwsUyTB1cQ==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/client-cognito-identity": 3.385.0 - "@aws-sdk/types": 3.378.0 + "@aws-sdk/client-cognito-identity": 3.421.0 + "@aws-sdk/types": 3.418.0 "@smithy/property-provider": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 tslib: 2.6.1 transitivePeerDependencies: - aws-crt @@ -1910,16 +1917,17 @@ packages: tslib: 2.6.1 dev: false - /@aws-sdk/credential-provider-env@3.378.0: + /@aws-sdk/credential-provider-env@3.418.0: resolution: { - integrity: sha512-B2OVdO9kBClDwGgWTBLAQwFV8qYTYGyVujg++1FZFSFMt8ORFdZ5fNpErvJtiSjYiOOQMzyBeSNhKyYNXCiJjQ==, + integrity: sha512-e74sS+x63EZUBO+HaI8zor886YdtmULzwKdctsZp5/37Xho1CVUNtEC+fYa69nigBD9afoiH33I4JggaHgrekQ==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/types": 3.378.0 + "@aws-sdk/types": 3.418.0 "@smithy/property-provider": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true @@ -1958,22 +1966,23 @@ packages: - aws-crt dev: false - /@aws-sdk/credential-provider-ini@3.385.0: + /@aws-sdk/credential-provider-ini@3.421.0: resolution: { - integrity: sha512-WBIR5GdfUzCGzynQYX/TuCXw3KJCkHBk6bVAsO1YmfR68XKVAxWmJPKovlK/rR6LIuV+iwUMNludO+SkmG0efg==, + integrity: sha512-J5yH/gkpAk6FMeH5F9u5Nr6oG+97tj1kkn5q49g3XMbtWw7GiynadxdtoRBCeIg1C7o2LOQx4B1AnhNhIw1z/g==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/credential-provider-env": 3.378.0 - "@aws-sdk/credential-provider-process": 3.378.0 - "@aws-sdk/credential-provider-sso": 3.385.0 - "@aws-sdk/credential-provider-web-identity": 3.378.0 - "@aws-sdk/types": 3.378.0 + "@aws-sdk/credential-provider-env": 3.418.0 + "@aws-sdk/credential-provider-process": 3.418.0 + "@aws-sdk/credential-provider-sso": 3.421.0 + "@aws-sdk/credential-provider-web-identity": 3.418.0 + "@aws-sdk/types": 3.418.0 "@smithy/credential-provider-imds": 2.0.1 "@smithy/property-provider": 2.0.1 - "@smithy/shared-ini-file-loader": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/shared-ini-file-loader": 2.0.12 + "@smithy/types": 2.3.4 tslib: 2.6.1 transitivePeerDependencies: - aws-crt @@ -2001,23 +2010,24 @@ packages: - aws-crt dev: false - /@aws-sdk/credential-provider-node@3.385.0: + /@aws-sdk/credential-provider-node@3.421.0: resolution: { - integrity: sha512-Lk8uu6jm/8OkbLX4Qnss8o5bnt0yQa0Tb7Azbh5/5otju5kStVAD2E+zMGrMP++NriGyZV87crduh0J8l4JUTA==, + integrity: sha512-g1dvdvfDj0u8B/gOsHR3o1arP4O4QE/dFm2IJBYr/eUdKISMUgbQULWtg4zdtAf0Oz4xN0723i7fpXAF1gTnRA==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/credential-provider-env": 3.378.0 - "@aws-sdk/credential-provider-ini": 3.385.0 - "@aws-sdk/credential-provider-process": 3.378.0 - "@aws-sdk/credential-provider-sso": 3.385.0 - "@aws-sdk/credential-provider-web-identity": 3.378.0 - "@aws-sdk/types": 3.378.0 + "@aws-sdk/credential-provider-env": 3.418.0 + "@aws-sdk/credential-provider-ini": 3.421.0 + "@aws-sdk/credential-provider-process": 3.418.0 + "@aws-sdk/credential-provider-sso": 3.421.0 + "@aws-sdk/credential-provider-web-identity": 3.418.0 + "@aws-sdk/types": 3.418.0 "@smithy/credential-provider-imds": 2.0.1 "@smithy/property-provider": 2.0.1 - "@smithy/shared-ini-file-loader": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/shared-ini-file-loader": 2.0.12 + "@smithy/types": 2.3.4 tslib: 2.6.1 transitivePeerDependencies: - aws-crt @@ -2037,17 +2047,18 @@ packages: tslib: 2.6.1 dev: false - /@aws-sdk/credential-provider-process@3.378.0: + /@aws-sdk/credential-provider-process@3.418.0: resolution: { - integrity: sha512-KFTIy7u+wXj3eDua4rgS0tODzMnXtXhAm1RxzCW9FL5JLBBrd82ymCj1Dp72217Sw5Do6NjCnDTTNkCHZMA77w==, + integrity: sha512-xPbdm2WKz1oH6pTkrJoUmr3OLuqvvcPYTQX0IIlc31tmDwDWPQjXGGFD/vwZGIZIkKaFpFxVMgAzfFScxox7dw==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/types": 3.378.0 + "@aws-sdk/types": 3.418.0 "@smithy/property-provider": 2.0.1 - "@smithy/shared-ini-file-loader": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/shared-ini-file-loader": 2.0.12 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true @@ -2069,19 +2080,20 @@ packages: - aws-crt dev: false - /@aws-sdk/credential-provider-sso@3.385.0: + /@aws-sdk/credential-provider-sso@3.421.0: resolution: { - integrity: sha512-ETFnS+4ZKTAgT8boVpIpRuXA9wWGpNqOcI1RXtjsaIgQ9s8uNn2JPa8l71gZh861mzBC8Hadp1EpNu+43w4lkg==, + integrity: sha512-f8T3L5rhImL6T6RTSvbOxaWw9k2fDOT2DZbNjcPz9ITWmwXj2NNbdHGWuRi3dv2HoY/nW2IJdNxnhdhbn6Fc1A==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/client-sso": 3.382.0 - "@aws-sdk/token-providers": 3.385.0 - "@aws-sdk/types": 3.378.0 + "@aws-sdk/client-sso": 3.421.0 + "@aws-sdk/token-providers": 3.418.0 + "@aws-sdk/types": 3.418.0 "@smithy/property-provider": 2.0.1 - "@smithy/shared-ini-file-loader": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/shared-ini-file-loader": 2.0.12 + "@smithy/types": 2.3.4 tslib: 2.6.1 transitivePeerDependencies: - aws-crt @@ -2100,42 +2112,43 @@ packages: tslib: 2.6.1 dev: false - /@aws-sdk/credential-provider-web-identity@3.378.0: + /@aws-sdk/credential-provider-web-identity@3.418.0: resolution: { - integrity: sha512-GWjydOszhc4xDF8xuPtBvboglXQr0gwCW1oHAvmLcOT38+Hd6qnKywnMSeoXYRPgoKfF9TkWQgW1jxplzCG0UA==, + integrity: sha512-do7ang565n9p3dS1JdsQY01rUfRx8vkxQqz5M8OlcEHBNiCdi2PvSjNwcBdrv/FKkyIxZb0TImOfBSt40hVdxQ==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/types": 3.378.0 + "@aws-sdk/types": 3.418.0 "@smithy/property-provider": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true - /@aws-sdk/credential-providers@3.385.0: + /@aws-sdk/credential-providers@3.421.0: resolution: { - integrity: sha512-II4WAFMk061Ud6n1Pux+5T3FQe6gLIwmpF+QgMH97TxJZWFiKyhmJ1Z0VArjo1wwcEPMyIN21Ij91ayop8agwQ==, + integrity: sha512-Mhz3r2N0YlOAhb1ZZYrP76VA1aIlJZw3IAwYwlS+hO4sAwp8iY6wCKiumqplXkVgK+ObLxlS9W/aW+2SAKsB7w==, } engines: { node: ">=14.0.0" } requiresBuild: true dependencies: - "@aws-sdk/client-cognito-identity": 3.385.0 - "@aws-sdk/client-sso": 3.382.0 - "@aws-sdk/client-sts": 3.385.0 - "@aws-sdk/credential-provider-cognito-identity": 3.385.0 - "@aws-sdk/credential-provider-env": 3.378.0 - "@aws-sdk/credential-provider-ini": 3.385.0 - "@aws-sdk/credential-provider-node": 3.385.0 - "@aws-sdk/credential-provider-process": 3.378.0 - "@aws-sdk/credential-provider-sso": 3.385.0 - "@aws-sdk/credential-provider-web-identity": 3.378.0 - "@aws-sdk/types": 3.378.0 + "@aws-sdk/client-cognito-identity": 3.421.0 + "@aws-sdk/client-sso": 3.421.0 + "@aws-sdk/client-sts": 3.421.0 + "@aws-sdk/credential-provider-cognito-identity": 3.421.0 + "@aws-sdk/credential-provider-env": 3.418.0 + "@aws-sdk/credential-provider-ini": 3.421.0 + "@aws-sdk/credential-provider-node": 3.421.0 + "@aws-sdk/credential-provider-process": 3.418.0 + "@aws-sdk/credential-provider-sso": 3.421.0 + "@aws-sdk/credential-provider-web-identity": 3.418.0 + "@aws-sdk/types": 3.418.0 "@smithy/credential-provider-imds": 2.0.1 "@smithy/property-provider": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 tslib: 2.6.1 transitivePeerDependencies: - aws-crt @@ -2381,16 +2394,17 @@ packages: tslib: 2.5.0 dev: false - /@aws-sdk/middleware-host-header@3.379.1: + /@aws-sdk/middleware-host-header@3.418.0: resolution: { - integrity: sha512-LI4KpAFWNWVr2aH2vRVblr0Y8tvDz23lj8LOmbDmCrzd5M21nxuocI/8nEAQj55LiTIf9Zs+dHCdsyegnFXdrA==, + integrity: sha512-LrMTdzalkPw/1ujLCKPLwCGvPMCmT4P+vOZQRbSEVZPnlZk+Aj++aL/RaHou0jL4kJH3zl8iQepriBt4a7UvXQ==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/types": 3.378.0 - "@smithy/protocol-http": 2.0.1 - "@smithy/types": 2.0.2 + "@aws-sdk/types": 3.418.0 + "@smithy/protocol-http": 3.0.6 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true @@ -2417,15 +2431,16 @@ packages: tslib: 2.5.0 dev: false - /@aws-sdk/middleware-logger@3.378.0: + /@aws-sdk/middleware-logger@3.418.0: resolution: { - integrity: sha512-l1DyaDLm3KeBMNMuANI3scWh8Xvu248x+vw6Z7ExWOhGXFmQ1MW7YvASg/SdxWkhlF9HmkkTif1LdMB22x6QDA==, + integrity: sha512-StKGmyPVfoO/wdNTtKemYwoJsqIl4l7oqarQY7VSf2Mp3mqaa+njLViHsQbirYpyqpgUEusOnuTlH5utxJ1NsQ==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/types": 3.378.0 - "@smithy/types": 2.0.2 + "@aws-sdk/types": 3.418.0 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true @@ -2442,16 +2457,17 @@ packages: tslib: 2.5.0 dev: false - /@aws-sdk/middleware-recursion-detection@3.378.0: + /@aws-sdk/middleware-recursion-detection@3.418.0: resolution: { - integrity: sha512-mUMfHAz0oGNIWiTZHTVJb+I515Hqs2zx1j36Le4MMiiaMkPW1SRUF1FIwGuc1wh6E8jB5q+XfEMriDjRi4TZRA==, + integrity: sha512-kKFrIQglBLUFPbHSDy1+bbe3Na2Kd70JSUC3QLMbUHmqipXN8KeXRfAj7vTv97zXl0WzG0buV++WcNwOm1rFjg==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/types": 3.378.0 - "@smithy/protocol-http": 2.0.1 - "@smithy/types": 2.0.2 + "@aws-sdk/types": 3.418.0 + "@smithy/protocol-http": 3.0.6 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true @@ -2497,16 +2513,17 @@ packages: tslib: 2.6.1 dev: false - /@aws-sdk/middleware-sdk-sts@3.379.1: + /@aws-sdk/middleware-sdk-sts@3.418.0: resolution: { - integrity: sha512-SK3gSyT0XbLiY12+AjLFYL9YngxOXHnZF3Z33Cdd4a+AUYrVBV7JBEEGD1Nlwrcmko+3XgaKlmgUaR5s91MYvg==, + integrity: sha512-cW8ijrCTP+mgihvcq4+TbhAcE/we5lFl4ydRqvTdtcSnYQAVQADg47rnTScQiFsPFEB3NKq7BGeyTJF9MKolPA==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/middleware-signing": 3.379.1 - "@aws-sdk/types": 3.378.0 - "@smithy/types": 2.0.2 + "@aws-sdk/middleware-signing": 3.418.0 + "@aws-sdk/types": 3.418.0 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true @@ -2537,19 +2554,20 @@ packages: tslib: 2.5.0 dev: false - /@aws-sdk/middleware-signing@3.379.1: + /@aws-sdk/middleware-signing@3.418.0: resolution: { - integrity: sha512-kBk2ZUvR84EM4fICjr8K+Ykpf8SI1UzzPp2/UVYZ0X+4H/ZCjfSqohGRwHykMqeplne9qHSL7/rGJs1H3l3gPg==, + integrity: sha512-onvs5KoYQE8OlOE740RxWBGtsUyVIgAo0CzRKOQO63ZEYqpL1Os+MS1CGzdNhvQnJgJruE1WW+Ix8fjN30zKPA==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/types": 3.378.0 + "@aws-sdk/types": 3.418.0 "@smithy/property-provider": 2.0.1 - "@smithy/protocol-http": 2.0.1 - "@smithy/signature-v4": 2.0.1 - "@smithy/types": 2.0.2 - "@smithy/util-middleware": 2.0.0 + "@smithy/protocol-http": 3.0.6 + "@smithy/signature-v4": 2.0.10 + "@smithy/types": 2.3.4 + "@smithy/util-middleware": 2.0.3 tslib: 2.6.1 dev: false optional: true @@ -2588,17 +2606,18 @@ packages: tslib: 2.5.0 dev: false - /@aws-sdk/middleware-user-agent@3.382.0: + /@aws-sdk/middleware-user-agent@3.418.0: resolution: { - integrity: sha512-LFRW1jmXOrOAd3911ktn6oaYmuurNnulbdRMOUdwz99GGdLVFipQhOi9idKswb8IOhPa4jEVQt25Kcv7ctvu0A==, + integrity: sha512-Jdcztg9Tal9SEAL0dKRrnpKrm6LFlWmAhvuwv0dQ7bNTJxIxyEFbpqdgy7mpQHsLVZgq1Aad/7gT/72c9igyZw==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/types": 3.378.0 - "@aws-sdk/util-endpoints": 3.382.0 - "@smithy/protocol-http": 2.0.1 - "@smithy/types": 2.0.2 + "@aws-sdk/types": 3.418.0 + "@aws-sdk/util-endpoints": 3.418.0 + "@smithy/protocol-http": 3.0.6 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true @@ -2675,6 +2694,22 @@ packages: tslib: 2.6.1 dev: false + /@aws-sdk/region-config-resolver@3.418.0: + resolution: + { + integrity: sha512-lJRZ/9TjZU6yLz+mAwxJkcJZ6BmyYoIJVo1p5+BN//EFdEmC8/c0c9gXMRzfISV/mqWSttdtccpAyN4/goHTYA==, + } + engines: { node: ">=14.0.0" } + requiresBuild: true + dependencies: + "@smithy/node-config-provider": 2.0.13 + "@smithy/types": 2.3.4 + "@smithy/util-config-provider": 2.0.0 + "@smithy/util-middleware": 2.0.3 + tslib: 2.6.1 + dev: false + optional: true + /@aws-sdk/service-error-classification@3.327.0: resolution: { @@ -2756,18 +2791,51 @@ packages: - aws-crt dev: false - /@aws-sdk/token-providers@3.385.0: + /@aws-sdk/token-providers@3.418.0: resolution: { - integrity: sha512-2A2Y7/bU5EaxQwLwLy7ojs+Wy5VOBkIlGPH7ZcpPaoQ1Hscwn3Wvx/DZmOvbyYfZ1CbIFutoHJlVxh6KZldUDw==, + integrity: sha512-9P7Q0VN0hEzTngy3Sz5eya2qEOEf0Q8qf1vB3um0gE6ID6EVAdz/nc/DztfN32MFxk8FeVBrCP5vWdoOzmd72g==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/types": 3.378.0 + "@aws-crypto/sha256-browser": 3.0.0 + "@aws-crypto/sha256-js": 3.0.0 + "@aws-sdk/middleware-host-header": 3.418.0 + "@aws-sdk/middleware-logger": 3.418.0 + "@aws-sdk/middleware-recursion-detection": 3.418.0 + "@aws-sdk/middleware-user-agent": 3.418.0 + "@aws-sdk/types": 3.418.0 + "@aws-sdk/util-endpoints": 3.418.0 + "@aws-sdk/util-user-agent-browser": 3.418.0 + "@aws-sdk/util-user-agent-node": 3.418.0 + "@smithy/config-resolver": 2.0.11 + "@smithy/fetch-http-handler": 2.2.0 + "@smithy/hash-node": 2.0.10 + "@smithy/invalid-dependency": 2.0.10 + "@smithy/middleware-content-length": 2.0.12 + "@smithy/middleware-endpoint": 2.0.10 + "@smithy/middleware-retry": 2.0.13 + "@smithy/middleware-serde": 2.0.10 + "@smithy/middleware-stack": 2.0.4 + "@smithy/node-config-provider": 2.0.13 + "@smithy/node-http-handler": 2.1.6 "@smithy/property-provider": 2.0.1 - "@smithy/shared-ini-file-loader": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/protocol-http": 3.0.6 + "@smithy/shared-ini-file-loader": 2.0.12 + "@smithy/smithy-client": 2.1.8 + "@smithy/types": 2.3.4 + "@smithy/url-parser": 2.0.10 + "@smithy/util-base64": 2.0.0 + "@smithy/util-body-length-browser": 2.0.0 + "@smithy/util-body-length-node": 2.1.0 + "@smithy/util-defaults-mode-browser": 2.0.12 + "@smithy/util-defaults-mode-node": 2.0.14 + "@smithy/util-retry": 2.0.3 + "@smithy/util-utf8": 2.0.0 tslib: 2.6.1 + transitivePeerDependencies: + - aws-crt dev: false optional: true @@ -2781,14 +2849,15 @@ packages: tslib: 2.5.0 dev: false - /@aws-sdk/types@3.378.0: + /@aws-sdk/types@3.418.0: resolution: { - integrity: sha512-qP0CvR/ItgktmN8YXpGQglzzR/6s0nrsQ4zIfx3HMwpsBTwuouYahcCtF1Vr82P4NFcoDA412EJahJ2pIqEd+w==, + integrity: sha512-y4PQSH+ulfFLY0+FYkaK4qbIaQI9IJNMO2xsxukW6/aNoApNymN1D2FSi2la8Qbp/iPjNDKsG8suNPm9NtsWXQ==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true @@ -2904,14 +2973,15 @@ packages: tslib: 2.5.0 dev: false - /@aws-sdk/util-endpoints@3.382.0: + /@aws-sdk/util-endpoints@3.418.0: resolution: { - integrity: sha512-flajPyjmjNG67fXk7l4GoTB/7J11VBqtFZXuuAZKhKU07Ia3IQupsFqNf5lV8D44ZgjnKH0fTGnv3dUALjW7Wg==, + integrity: sha512-sYSDwRTl7yE7LhHkPzemGzmIXFVHSsi3AQ1KeNEk84eBqxMHHcCc2kqklaBk2roXWe50QDgRMy1ikZUxvtzNHQ==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@aws-sdk/types": 3.378.0 + "@aws-sdk/types": 3.418.0 tslib: 2.6.1 dev: false optional: true @@ -3005,14 +3075,15 @@ packages: tslib: 2.5.0 dev: false - /@aws-sdk/util-user-agent-browser@3.378.0: + /@aws-sdk/util-user-agent-browser@3.418.0: resolution: { - integrity: sha512-FSCpagzftK1W+m7Ar6lpX7/Gr9y5P56nhFYz8U4EYQ4PkufS6czWX9YW+/FA5OYV0vlQ/SvPqMnzoHIPUNhZrQ==, + integrity: sha512-c4p4mc0VV/jIeNH0lsXzhJ1MpWRLuboGtNEpqE4s1Vl9ck2amv9VdUUZUmHbg+bVxlMgRQ4nmiovA4qIrqGuyg==, } + requiresBuild: true dependencies: - "@aws-sdk/types": 3.378.0 - "@smithy/types": 2.0.2 + "@aws-sdk/types": 3.418.0 + "@smithy/types": 2.3.4 bowser: 2.11.0 tslib: 2.6.1 dev: false @@ -3035,21 +3106,22 @@ packages: tslib: 2.5.0 dev: false - /@aws-sdk/util-user-agent-node@3.378.0: + /@aws-sdk/util-user-agent-node@3.418.0: resolution: { - integrity: sha512-IdwVJV0E96MkJeFte4dlWqvB+oiqCiZ5lOlheY3W9NynTuuX0GGYNC8Y9yIsV8Oava1+ujpJq0ww6qXdYxmO4A==, + integrity: sha512-BXMskXFtg+dmzSCgmnWOffokxIbPr1lFqa1D9kvM3l3IFRiFGx2IyDg+8MAhq11aPDLvoa/BDuQ0Yqma5izOhg==, } engines: { node: ">=14.0.0" } + requiresBuild: true peerDependencies: aws-crt: ">=1.0.0" peerDependenciesMeta: aws-crt: optional: true dependencies: - "@aws-sdk/types": 3.378.0 - "@smithy/node-config-provider": 2.0.1 - "@smithy/types": 2.0.2 + "@aws-sdk/types": 3.418.0 + "@smithy/node-config-provider": 2.0.13 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true @@ -3105,6 +3177,17 @@ packages: dependencies: "@babel/highlight": 7.22.5 + /@babel/code-frame@7.22.13: + resolution: + { + integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==, + } + engines: { node: ">=6.9.0" } + dependencies: + "@babel/highlight": 7.22.20 + chalk: 2.4.2 + dev: false + /@babel/code-frame@7.22.5: resolution: { @@ -3805,6 +3888,14 @@ packages: } engines: { node: ">=6.9.0" } + /@babel/helper-validator-identifier@7.22.20: + resolution: + { + integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==, + } + engines: { node: ">=6.9.0" } + dev: false + /@babel/helper-validator-identifier@7.22.5: resolution: { @@ -3853,6 +3944,18 @@ packages: transitivePeerDependencies: - supports-color + /@babel/highlight@7.22.20: + resolution: + { + integrity: sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==, + } + engines: { node: ">=6.9.0" } + dependencies: + "@babel/helper-validator-identifier": 7.22.20 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: false + /@babel/highlight@7.22.5: resolution: { @@ -6127,6 +6230,15 @@ packages: dependencies: regenerator-runtime: 0.13.11 + /@babel/runtime@7.23.1: + resolution: + { + integrity: sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g==, + } + engines: { node: ">=6.9.0" } + dependencies: + regenerator-runtime: 0.14.0 + /@babel/template@7.20.7: resolution: { @@ -8756,13 +8868,13 @@ packages: "@types/react": optional: true dependencies: - "@babel/runtime": 7.22.6 + "@babel/runtime": 7.23.1 "@material-ui/styles": 4.11.5(@types/react@18.2.15)(react-dom@18.2.0)(react@18.2.0) "@material-ui/system": 4.12.2(@types/react@18.2.15)(react-dom@18.2.0)(react@18.2.0) "@material-ui/types": 5.1.0(@types/react@18.2.15) "@material-ui/utils": 4.11.3(react-dom@18.2.0)(react@18.2.0) "@types/react": 18.2.15 - "@types/react-transition-group": 4.4.6 + "@types/react-transition-group": 4.4.7 clsx: 1.2.1 hoist-non-react-statics: 3.3.2 popper.js: 1.16.1-lts @@ -8788,7 +8900,7 @@ packages: "@types/react": optional: true dependencies: - "@babel/runtime": 7.22.6 + "@babel/runtime": 7.23.1 "@emotion/hash": 0.8.0 "@material-ui/types": 5.1.0(@types/react@18.2.15) "@material-ui/utils": 4.11.3(react-dom@18.2.0)(react@18.2.0) @@ -8823,7 +8935,7 @@ packages: "@types/react": optional: true dependencies: - "@babel/runtime": 7.22.6 + "@babel/runtime": 7.23.1 "@material-ui/utils": 4.11.3(react-dom@18.2.0)(react@18.2.0) "@types/react": 18.2.15 csstype: 2.6.21 @@ -8856,7 +8968,7 @@ packages: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - "@babel/runtime": 7.22.6 + "@babel/runtime": 7.23.1 prop-types: 15.8.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -8904,6 +9016,17 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@mongodb-js/saslprep@1.1.0: + resolution: + { + integrity: sha512-Xfijy7HvfzzqiOAhAepF4SGN5e9leLkMvg/OPOF97XemjfVCYN/oWa75wnkc6mltMSTwY+XlbhWgUOJmkFspSw==, + } + requiresBuild: true + dependencies: + sparse-bitfield: 3.0.3 + dev: false + optional: true + /@mui/base@5.0.0-alpha.121(@types/react@18.2.15)(react-dom@18.2.0)(react@18.2.0): resolution: { @@ -10347,28 +10470,31 @@ packages: dependencies: "@sinonjs/commons": 2.0.0 - /@smithy/abort-controller@2.0.1: + /@smithy/abort-controller@2.0.10: resolution: { - integrity: sha512-0s7XjIbsTwZyUW9OwXQ8J6x1UiA1TNCh60Vaw56nHahL7kUZsLhmTlWiaxfLkFtO2Utkj8YewcpHTYpxaTzO+w==, + integrity: sha512-xn7PnFD3m4rQIG00h1lPuDVnC2QMtTFhzRLX3y56KkgFaCysS7vpNevNBgmNUtmJ4eVFc+66Zucwo2KDLdicOg==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true - /@smithy/config-resolver@2.0.1: + /@smithy/config-resolver@2.0.11: resolution: { - integrity: sha512-l83Pm7hV+8CBQOCmBRopWDtF+CURUJol7NsuPYvimiDhkC2F8Ba9T1imSFE+pD1UIJ9jlsDPAnZfPJT5cjnuEw==, + integrity: sha512-q97FnlUmbai1c4JlQJgLVBsvSxgV/7Nvg/JK76E1nRq/U5UM56Eqo3dn2fY7JibqgJLg4LPsGdwtIyqyOk35CQ==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/types": 2.0.2 + "@smithy/node-config-provider": 2.0.13 + "@smithy/types": 2.3.4 "@smithy/util-config-provider": 2.0.0 - "@smithy/util-middleware": 2.0.0 + "@smithy/util-middleware": 2.0.3 tslib: 2.6.1 dev: false optional: true @@ -10379,63 +10505,84 @@ packages: integrity: sha512-8VxriuRINNEfVZjEFKBY75y9ZWAx73DZ5K/u+3LmB6r8WR2h3NaFxFKMlwlq0uzNdGhD1ouKBn9XWEGYHKiPLw==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: "@smithy/node-config-provider": 2.0.1 "@smithy/property-provider": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 "@smithy/url-parser": 2.0.1 tslib: 2.6.1 dev: false optional: true - /@smithy/eventstream-codec@2.0.1: + /@smithy/credential-provider-imds@2.0.13: resolution: { - integrity: sha512-/IiNB7gQM2y2ZC/GAWOWDa8+iXfhr1g9Xe5979cQEOdCWDISvrAiv18cn3OtIQUhbYOR3gm7QtCpkq1to2takQ==, + integrity: sha512-/xe3wNoC4j+BeTemH9t2gSKLBfyZmk8LXB2pQm/TOEYi+QhBgT+PSolNDfNAhrR68eggNE17uOimsrnwSkCt4w==, } + engines: { node: ">=14.0.0" } + requiresBuild: true + dependencies: + "@smithy/node-config-provider": 2.0.13 + "@smithy/property-provider": 2.0.11 + "@smithy/types": 2.3.4 + "@smithy/url-parser": 2.0.10 + tslib: 2.6.1 + dev: false + optional: true + + /@smithy/eventstream-codec@2.0.10: + resolution: + { + integrity: sha512-3SSDgX2nIsFwif6m+I4+ar4KDcZX463Noes8ekBgQHitULiWvaDZX8XqPaRQSQ4bl1vbeVXHklJfv66MnVO+lw==, + } + requiresBuild: true dependencies: "@aws-crypto/crc32": 3.0.0 - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 "@smithy/util-hex-encoding": 2.0.0 tslib: 2.6.1 dev: false optional: true - /@smithy/fetch-http-handler@2.0.1: + /@smithy/fetch-http-handler@2.2.0: resolution: { - integrity: sha512-/SoU/ClazgcdOxgE4zA7RX8euiELwpsrKCSvulVQvu9zpmqJRyEJn8ZTWYFV17/eHOBdHTs9kqodhNhsNT+cUw==, + integrity: sha512-P2808PM0CsEkXj3rnQAi3QyqRbAAi8iuePYUB5GveJ+dVd1WMv03NM+CYCI14IGXt1j/r7jHGvMJHO+Gv+kdMQ==, } + requiresBuild: true dependencies: - "@smithy/protocol-http": 2.0.1 - "@smithy/querystring-builder": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/protocol-http": 3.0.6 + "@smithy/querystring-builder": 2.0.10 + "@smithy/types": 2.3.4 "@smithy/util-base64": 2.0.0 tslib: 2.6.1 dev: false optional: true - /@smithy/hash-node@2.0.1: + /@smithy/hash-node@2.0.10: resolution: { - integrity: sha512-oTKYimQdF4psX54ZonpcIE+MXjMUWFxLCNosjPkJPFQ9whRX0K/PFX/+JZGRQh3zO9RlEOEUIbhy9NO+Wha6hw==, + integrity: sha512-jSTf6uzPk/Vf+8aQ7tVXeHfjxe9wRXSCqIZcBymSDTf7/YrVxniBdpyN74iI8ZUOx/Pyagc81OK5FROLaEjbXQ==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 "@smithy/util-buffer-from": 2.0.0 "@smithy/util-utf8": 2.0.0 tslib: 2.6.1 dev: false optional: true - /@smithy/invalid-dependency@2.0.1: + /@smithy/invalid-dependency@2.0.10: resolution: { - integrity: sha512-2q/Eb0AE662zwyMV+z+TL7deBwcHCgaZZGc0RItamBE8kak3MzCi/EZCNoFWoBfxgQ4jfR12wm8KKsSXhJzJtQ==, + integrity: sha512-zw9p/zsmJ2cFcW4KMz3CJoznlbRvEA6HG2mvEaX5eAca5dq4VGI2MwPDTfmteC/GsnURS4ogoMQ0p6aHM2SDVQ==, } + requiresBuild: true dependencies: - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true @@ -10446,75 +10593,83 @@ packages: integrity: sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: tslib: 2.6.1 dev: false optional: true - /@smithy/middleware-content-length@2.0.1: + /@smithy/middleware-content-length@2.0.12: resolution: { - integrity: sha512-IZhRSk5GkVBcrKaqPXddBS2uKhaqwBgaSgbBb1OJyGsKe7SxRFbclWS0LqOR9fKUkDl+3lL8E2ffpo6EQg0igw==, + integrity: sha512-QRhJTo5TjG7oF7np6yY4ZO9GDKFVzU/GtcqUqyEa96bLHE3yZHgNmsolOQ97pfxPHmFhH4vDP//PdpAIN3uI1Q==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/protocol-http": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/protocol-http": 3.0.6 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true - /@smithy/middleware-endpoint@2.0.1: + /@smithy/middleware-endpoint@2.0.10: resolution: { - integrity: sha512-uz/KI1MBd9WHrrkVFZO4L4Wyv24raf0oR4EsOYEeG5jPJO5U+C7MZGLcMxX8gWERDn1sycBDqmGv8fjUMLxT6w==, + integrity: sha512-O6m4puZc16xfenotZUHL4bRlMrwf4gTp+0I5l954M5KNd3dOK18P+FA/IIUgnXF/dX6hlCUcJkBp7nAzwrePKA==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/middleware-serde": 2.0.1 - "@smithy/types": 2.0.2 - "@smithy/url-parser": 2.0.1 - "@smithy/util-middleware": 2.0.0 + "@smithy/middleware-serde": 2.0.10 + "@smithy/types": 2.3.4 + "@smithy/url-parser": 2.0.10 + "@smithy/util-middleware": 2.0.3 tslib: 2.6.1 dev: false optional: true - /@smithy/middleware-retry@2.0.1: + /@smithy/middleware-retry@2.0.13: resolution: { - integrity: sha512-NKHF4i0gjSyjO6C0ZyjEpNqzGgIu7s8HOK6oT/1Jqws2Q1GynR1xV8XTUs1gKXeaNRzbzKQRewHHmfPwZjOtHA==, + integrity: sha512-zuOva8xgWC7KYG8rEXyWIcZv2GWszO83DCTU6IKcf/FKu6OBmSE+EYv3EUcCGY+GfiwCX0EyJExC9Lpq9b0w5Q==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/protocol-http": 2.0.1 - "@smithy/service-error-classification": 2.0.0 - "@smithy/types": 2.0.2 - "@smithy/util-middleware": 2.0.0 - "@smithy/util-retry": 2.0.0 + "@smithy/node-config-provider": 2.0.13 + "@smithy/protocol-http": 3.0.6 + "@smithy/service-error-classification": 2.0.3 + "@smithy/types": 2.3.4 + "@smithy/util-middleware": 2.0.3 + "@smithy/util-retry": 2.0.3 tslib: 2.6.1 uuid: 8.3.2 dev: false optional: true - /@smithy/middleware-serde@2.0.1: + /@smithy/middleware-serde@2.0.10: resolution: { - integrity: sha512-uKxPaC6ItH9ZXdpdqNtf8sda7GcU4SPMp0tomq/5lUg9oiMa/Q7+kD35MUrpKaX3IVXVrwEtkjCU9dogZ/RAUA==, + integrity: sha512-+A0AFqs768256H/BhVEsBF6HijFbVyAwYRVXY/izJFkTalVWJOp4JA0YdY0dpXQd+AlW0tzs+nMQCE1Ew+DcgQ==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true - /@smithy/middleware-stack@2.0.0: + /@smithy/middleware-stack@2.0.4: resolution: { - integrity: sha512-31XC1xNF65nlbc16yuh3wwTudmqs6qy4EseQUGF8A/p2m/5wdd/cnXJqpniy/XvXVwkHPz/GwV36HqzHtIKATQ==, + integrity: sha512-MW0KNKfh8ZGLagMZnxcLJWPNXoKqW6XV/st5NnCBmmA2e2JhrUjU0AJ5Ca/yjTyNEKs3xH7AQDwp1YmmpEpmQQ==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true @@ -10525,25 +10680,42 @@ packages: integrity: sha512-Zoel4CPkKRTQ2XxmozZUfqBYqjPKL53/SvTDhJHj+VBSiJy6MXRav1iDCyFPS92t40Uh+Yi+Km5Ch3hQ+c/zSA==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: "@smithy/property-provider": 2.0.1 - "@smithy/shared-ini-file-loader": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/shared-ini-file-loader": 2.0.12 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true - /@smithy/node-http-handler@2.0.1: + /@smithy/node-config-provider@2.0.13: resolution: { - integrity: sha512-Zv3fxk3p9tsmPT2CKMsbuwbbxnq2gzLDIulxv+yI6aE+02WPYorObbbe9gh7SW3weadMODL1vTfOoJ9yFypDzg==, + integrity: sha512-pPpLqYuJcOq1sj1EGu+DoZK47DUS4gepqSTNgRezmrjnzNlSU2/Dcc9Ebzs+WZ0Z5vXKazuE+k+NksFLo07/AA==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/abort-controller": 2.0.1 - "@smithy/protocol-http": 2.0.1 - "@smithy/querystring-builder": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/property-provider": 2.0.11 + "@smithy/shared-ini-file-loader": 2.0.12 + "@smithy/types": 2.3.4 + tslib: 2.6.1 + dev: false + optional: true + + /@smithy/node-http-handler@2.1.6: + resolution: + { + integrity: sha512-NspvD3aCwiUNtoSTcVHz0RZz1tQ/SaRIe1KPF+r0mAdCZ9eWuhIeJT8ZNPYa1ITn7/Lgg64IyFjqPynZ8KnYQw==, + } + engines: { node: ">=14.0.0" } + requiresBuild: true + dependencies: + "@smithy/abort-controller": 2.0.10 + "@smithy/protocol-http": 3.0.6 + "@smithy/querystring-builder": 2.0.10 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true @@ -10554,32 +10726,48 @@ packages: integrity: sha512-pmJRyY9SF6sutWIktIhe+bUdSQDxv/qZ4mYr3/u+u45riTPN7nmRxPo+e4sjWVoM0caKFjRSlj3tf5teRFy0Vg==, } engines: { node: ">=14.0.0" } + requiresBuild: true + dependencies: + "@smithy/types": 2.3.4 + tslib: 2.6.1 + dev: false + optional: true + + /@smithy/property-provider@2.0.11: + resolution: + { + integrity: sha512-kzuOadu6XvrnlF1iXofpKXYmo4oe19st9/DE8f5gHNaFepb4eTkR8gD8BSdTnNnv7lxfv6uOwZPg4VS6hemX1w==, + } + engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true - /@smithy/protocol-http@2.0.1: + /@smithy/protocol-http@3.0.6: resolution: { - integrity: sha512-mrkMAp0wtaDEIkgRObWYxI1Kun1tm6Iu6rK+X4utb6Ah7Uc3Kk4VIWwK/rBHdYGReiLIrxFCB1rq4a2gyZnSgg==, + integrity: sha512-F0jAZzwznMmHaggiZgc7YoS08eGpmLvhVktY/Taz6+OAOHfyIqWSDNgFqYR+WHW9z5fp2XvY4mEUrQgYMQ71jw==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true - /@smithy/querystring-builder@2.0.1: + /@smithy/querystring-builder@2.0.10: resolution: { - integrity: sha512-bp+93WFzx1FojVEIeFPtG0A1pKsFdCUcZvVdZdRlmNooOUrz9Mm9bneRd8hDwAQ37pxiZkCOxopSXXRQN10mYw==, + integrity: sha512-uujJGp8jzrrU1UHme8sUKEbawQTcTmUWsh8rbGXYD/lMwNLQ+9jQ9dMDWbbH9Hpoa9RER1BeL/38WzGrbpob2w==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 "@smithy/util-uri-escape": 2.0.0 tslib: 2.6.1 dev: false @@ -10591,71 +10779,92 @@ packages: integrity: sha512-h+e7k1z+IvI2sSbUBG9Aq46JsgLl4UqIUl6aigAlRBj+P6ocNXpM6Yn1vMBw5ijtXeZbYpd1YvCxwDgdw3jhmg==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true - /@smithy/service-error-classification@2.0.0: + /@smithy/querystring-parser@2.0.10: resolution: { - integrity: sha512-2z5Nafy1O0cTf69wKyNjGW/sNVMiqDnb4jgwfMG8ye8KnFJ5qmJpDccwIbJNhXIfbsxTg9SEec2oe1cexhMJvw==, + integrity: sha512-WSD4EU60Q8scacT5PIpx4Bahn6nWpt+MiYLcBkFt6fOj7AssrNeaNIU2Z0g40ftVmrwLcEOIKGX92ynbVDb3ZA==, } engines: { node: ">=14.0.0" } + requiresBuild: true + dependencies: + "@smithy/types": 2.3.4 + tslib: 2.6.1 dev: false optional: true - /@smithy/shared-ini-file-loader@2.0.1: + /@smithy/service-error-classification@2.0.3: resolution: { - integrity: sha512-a463YiZrPGvM+F336rIF8pLfQsHAdCRAn/BiI/EWzg5xLoxbC7GSxIgliDDXrOu0z8gT3nhVsif85eU6jyct3A==, + integrity: sha512-b+m4QCHXb7oKAkM/jHwHrl5gpqhFoMTHF643L0/vAEkegrcUWyh1UjyoHttuHcP5FnHVVy4EtpPtLkEYD+xMFw==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 + dev: false + optional: true + + /@smithy/shared-ini-file-loader@2.0.12: + resolution: + { + integrity: sha512-umi0wc4UBGYullAgYNUVfGLgVpxQyES47cnomTqzCKeKO5oudO4hyDNj+wzrOjqDFwK2nWYGVgS8Y0JgGietrw==, + } + engines: { node: ">=14.0.0" } + requiresBuild: true + dependencies: + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true - /@smithy/signature-v4@2.0.1: + /@smithy/signature-v4@2.0.10: resolution: { - integrity: sha512-jztv5Mirca42ilxmMDjzLdXcoAmRhZskGafGL49sRo5u7swEZcToEFrq6vtX5YMbSyTVrE9Teog5EFexY5Ff2Q==, + integrity: sha512-S6gcP4IXfO/VMswovrhxPpqvQvMal7ZRjM4NvblHSPpE5aNBYx67UkHFF3kg0hR3tJKqNpBGbxwq0gzpdHKLRA==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/eventstream-codec": 2.0.1 + "@smithy/eventstream-codec": 2.0.10 "@smithy/is-array-buffer": 2.0.0 - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 "@smithy/util-hex-encoding": 2.0.0 - "@smithy/util-middleware": 2.0.0 + "@smithy/util-middleware": 2.0.3 "@smithy/util-uri-escape": 2.0.0 "@smithy/util-utf8": 2.0.0 tslib: 2.6.1 dev: false optional: true - /@smithy/smithy-client@2.0.1: + /@smithy/smithy-client@2.1.8: resolution: { - integrity: sha512-LHC5m6tYpEu1iNbONfvMbwtErboyTZJfEIPoD78Ei5MVr36vZQCaCla5mvo36+q/a2NAk2//fA5Rx3I1Kf7+lQ==, + integrity: sha512-Puuc4wuhdTSs8wstkNJ/JtpaFwIh0qDE27zawfRVzzjpXprpT+4wROqO2+NVoZ+6GKv7kz7QgZx6AI5325bSeQ==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/middleware-stack": 2.0.0 - "@smithy/types": 2.0.2 - "@smithy/util-stream": 2.0.1 + "@smithy/middleware-stack": 2.0.4 + "@smithy/types": 2.3.4 + "@smithy/util-stream": 2.0.13 tslib: 2.6.1 dev: false optional: true - /@smithy/types@2.0.2: + /@smithy/types@2.3.4: resolution: { - integrity: sha512-wcymEjIXQ9+NEfE5Yt5TInAqe1o4n+Nh+rh00AwoazppmUt8tdo6URhc5gkDcOYrcvlDVAZE7uG69nDpEGUKxw==, + integrity: sha512-D7xlM9FOMFyFw7YnMXn9dK2KuN6+JhnrZwVt1fWaIu8hCk5CigysweeIT/H/nCo4YV+s8/oqUdLfexbkPZtvqw==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: tslib: 2.6.1 dev: false @@ -10666,9 +10875,23 @@ packages: { integrity: sha512-NpHVOAwddo+OyyIoujDL9zGL96piHWrTNXqltWmBvlUoWgt1HPyBuKs6oHjioyFnNZXUqveTOkEEq0U5w6Uv8A==, } + requiresBuild: true dependencies: "@smithy/querystring-parser": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/types": 2.3.4 + tslib: 2.6.1 + dev: false + optional: true + + /@smithy/url-parser@2.0.10: + resolution: + { + integrity: sha512-4TXQFGjHcqru8aH5VRB4dSnOFKCYNX6SR1Do6fwxZ+ExT2onLsh2W77cHpks7ma26W5jv6rI1u7d0+KX9F0aOw==, + } + requiresBuild: true + dependencies: + "@smithy/querystring-parser": 2.0.10 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true @@ -10679,6 +10902,7 @@ packages: integrity: sha512-Zb1E4xx+m5Lud8bbeYi5FkcMJMnn+1WUnJF3qD7rAdXpaL7UjkFQLdmW5fHadoKbdHpwH9vSR8EyTJFHJs++tA==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: "@smithy/util-buffer-from": 2.0.0 tslib: 2.6.1 @@ -10690,17 +10914,19 @@ packages: { integrity: sha512-JdDuS4ircJt+FDnaQj88TzZY3+njZ6O+D3uakS32f2VNnDo3vyEuNdBOh/oFd8Df1zSZOuH1HEChk2AOYDezZg==, } + requiresBuild: true dependencies: tslib: 2.6.1 dev: false optional: true - /@smithy/util-body-length-node@2.0.0: + /@smithy/util-body-length-node@2.1.0: resolution: { - integrity: sha512-ZV7Z/WHTMxHJe/xL/56qZwSUcl63/5aaPAGjkfynJm4poILjdD4GmFI+V+YWabh2WJIjwTKZ5PNsuvPQKt93Mg==, + integrity: sha512-/li0/kj/y3fQ3vyzn36NTLGmUwAICb7Jbe/CsWCktW363gh1MOcpEcSO3mJ344Gv2dqz8YJCLQpb6hju/0qOWw==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: tslib: 2.6.1 dev: false @@ -10712,6 +10938,7 @@ packages: integrity: sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: "@smithy/is-array-buffer": 2.0.0 tslib: 2.6.1 @@ -10724,37 +10951,42 @@ packages: integrity: sha512-xCQ6UapcIWKxXHEU4Mcs2s7LcFQRiU3XEluM2WcCjjBtQkUN71Tb+ydGmJFPxMUrW/GWMgQEEGipLym4XG0jZg==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: tslib: 2.6.1 dev: false optional: true - /@smithy/util-defaults-mode-browser@2.0.1: + /@smithy/util-defaults-mode-browser@2.0.12: resolution: { - integrity: sha512-w72Qwsb+IaEYEFtYICn0Do42eFju78hTaBzzJfT107lFOPdbjWjKnFutV+6GL/nZd5HWXY7ccAKka++C3NrjHw==, + integrity: sha512-BCsFPdNThMS2312/Zj3/TtFsXfO2BwkbDNsoWbdtZ0cAv9cE6vqGKllYXmq2Gj6u+Vv8V3wUgBUicNol6s/7Sg==, } engines: { node: ">= 10.0.0" } + requiresBuild: true dependencies: - "@smithy/property-provider": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/property-provider": 2.0.11 + "@smithy/smithy-client": 2.1.8 + "@smithy/types": 2.3.4 bowser: 2.11.0 tslib: 2.6.1 dev: false optional: true - /@smithy/util-defaults-mode-node@2.0.1: + /@smithy/util-defaults-mode-node@2.0.14: resolution: { - integrity: sha512-dNF45caelEBambo0SgkzQ0v76m4YM+aFKZNTtSafy7P5dVF8TbjZuR2UX1A5gJABD9XK6lzN+v/9Yfzj/EDgGg==, + integrity: sha512-EtomtYsWDkBGs0fLeF+7N2df+zIqGix+O4llWqQD+97rbo2hk+GBWeZzBkujKrzFeXNUbPkFqfvZPLdoq4S4XQ==, } engines: { node: ">= 10.0.0" } + requiresBuild: true dependencies: - "@smithy/config-resolver": 2.0.1 - "@smithy/credential-provider-imds": 2.0.1 - "@smithy/node-config-provider": 2.0.1 - "@smithy/property-provider": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/config-resolver": 2.0.11 + "@smithy/credential-provider-imds": 2.0.13 + "@smithy/node-config-provider": 2.0.13 + "@smithy/property-provider": 2.0.11 + "@smithy/smithy-client": 2.1.8 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true @@ -10765,44 +10997,50 @@ packages: integrity: sha512-c5xY+NUnFqG6d7HFh1IFfrm3mGl29lC+vF+geHv4ToiuJCBmIfzx6IeHLg+OgRdPFKDXIw6pvi+p3CsscaMcMA==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: tslib: 2.6.1 dev: false optional: true - /@smithy/util-middleware@2.0.0: + /@smithy/util-middleware@2.0.3: resolution: { - integrity: sha512-eCWX4ECuDHn1wuyyDdGdUWnT4OGyIzV0LN1xRttBFMPI9Ff/4heSHVxneyiMtOB//zpXWCha1/SWHJOZstG7kA==, + integrity: sha512-+FOCFYOxd2HO7v/0hkFSETKf7FYQWa08wh/x/4KUeoVBnLR4juw8Qi+TTqZI6E2h5LkzD9uOaxC9lAjrpVzaaA==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true - /@smithy/util-retry@2.0.0: + /@smithy/util-retry@2.0.3: resolution: { - integrity: sha512-/dvJ8afrElasuiiIttRJeoS2sy8YXpksQwiM/TcepqdRVp7u4ejd9C4IQURHNjlfPUT7Y6lCDSa2zQJbdHhVTg==, + integrity: sha512-gw+czMnj82i+EaH7NL7XKkfX/ZKrCS2DIWwJFPKs76bMgkhf0y1C94Lybn7f8GkBI9lfIOUdPYtzm19zQOC8sw==, } engines: { node: ">= 14.0.0" } + requiresBuild: true dependencies: - "@smithy/service-error-classification": 2.0.0 + "@smithy/service-error-classification": 2.0.3 + "@smithy/types": 2.3.4 tslib: 2.6.1 dev: false optional: true - /@smithy/util-stream@2.0.1: + /@smithy/util-stream@2.0.13: resolution: { - integrity: sha512-2a0IOtwIKC46EEo7E7cxDN8u2jwOiYYJqcFKA6rd5rdXqKakHT2Gc+AqHWngr0IEHUfW92zX12wRQKwyoqZf2Q==, + integrity: sha512-aeua6pN0WMdQtZNRRJ8J+mop57fezLMsApYbk5Q3q11pyHwZypVPuKoelr7K9PMJZcuYk90dQyUsUAd7hTCeRg==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: - "@smithy/fetch-http-handler": 2.0.1 - "@smithy/node-http-handler": 2.0.1 - "@smithy/types": 2.0.2 + "@smithy/fetch-http-handler": 2.2.0 + "@smithy/node-http-handler": 2.1.6 + "@smithy/types": 2.3.4 "@smithy/util-base64": 2.0.0 "@smithy/util-buffer-from": 2.0.0 "@smithy/util-hex-encoding": 2.0.0 @@ -10817,6 +11055,7 @@ packages: integrity: sha512-ebkxsqinSdEooQduuk9CbKcI+wheijxEb3utGXkCoYQkJnwTnLbH1JXGimJtUkQwNQbsbuYwG2+aFVyZf5TLaw==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: tslib: 2.6.1 dev: false @@ -10828,6 +11067,7 @@ packages: integrity: sha512-rctU1VkziY84n5OXe3bPNpKR001ZCME2JCaBBFgtiM2hfKbHFudc/BkMuPab8hRbLd0j3vbnBTTZ1igBf0wgiQ==, } engines: { node: ">=14.0.0" } + requiresBuild: true dependencies: "@smithy/util-buffer-from": 2.0.0 tslib: 2.6.1 @@ -13622,6 +13862,23 @@ packages: pretty-format: 27.5.1 dev: false + /@testing-library/dom@9.3.3: + resolution: + { + integrity: sha512-fB0R+fa3AUqbLHWyxXa2kGVtf1Fe1ZZFr0Zp6AIbIAzXb2mKbEXl+PCQNUOaq5lbTab5tfctfXRNsWXxa2f7Aw==, + } + engines: { node: ">=14" } + dependencies: + "@babel/code-frame": 7.22.13 + "@babel/runtime": 7.23.1 + "@types/aria-query": 5.0.2 + aria-query: 5.1.3 + chalk: 4.1.2 + dom-accessibility-api: 0.5.16 + lz-string: 1.5.0 + pretty-format: 27.5.1 + dev: false + /@testing-library/jest-dom@5.16.5: resolution: { @@ -13737,6 +13994,13 @@ packages: integrity: sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==, } + /@types/aria-query@5.0.2: + resolution: + { + integrity: sha512-PHKZuMN+K5qgKIWhBodXzQslTo5P+K/6LqeKXS6O/4liIDdZqaX5RXrCK++LAw+y/nptN48YmUMFiQHRSWYwtQ==, + } + dev: false + /@types/babel__core@7.20.0: resolution: { @@ -14206,6 +14470,13 @@ packages: integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==, } + /@types/prop-types@15.7.7: + resolution: + { + integrity: sha512-FbtmBWCcSa2J4zL781Zf1p5YUBXQomPEcep9QZCfRfQgTxz3pJWiDFLebohZ9fFntX5ibzOkSsrJ0TEew8cAog==, + } + dev: true + /@types/qs@6.9.7: resolution: { @@ -14253,6 +14524,15 @@ packages: dependencies: "@types/react": 18.2.15 + /@types/react-transition-group@4.4.7: + resolution: + { + integrity: sha512-ICCyBl5mvyqYp8Qeq9B5G/fyBSRC0zx3XM3sCC6KkcMsNeAHqXBKkmat4GqdJET5jtYUpZXrxI5flve5qhi2Eg==, + } + dependencies: + "@types/react": 18.2.23 + dev: true + /@types/react@16.14.43: resolution: { @@ -14284,6 +14564,17 @@ packages: "@types/scheduler": 0.16.3 csstype: 3.1.2 + /@types/react@18.2.23: + resolution: + { + integrity: sha512-qHLW6n1q2+7KyBEYnrZpcsAmU/iiCh9WGCKgXvMxx89+TYdJWRjZohVIo9XTcoLhfX3+/hP0Pbulu3bCZQ9PSA==, + } + dependencies: + "@types/prop-types": 15.7.7 + "@types/scheduler": 0.16.4 + csstype: 3.1.2 + dev: true + /@types/request@2.48.8: resolution: { @@ -14302,6 +14593,13 @@ packages: integrity: sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==, } + /@types/scheduler@0.16.4: + resolution: + { + integrity: sha512-2L9ifAGl7wmXwP4v3pN4p2FLhD0O1qsJpvKmNin5VA8+UvNVb447UDaAEV6UdrkA+m/Xs58U1RFps44x6TFsVQ==, + } + dev: true + /@types/semver@7.3.13: resolution: { @@ -16353,10 +16651,10 @@ packages: buffer: 5.7.1 dev: false - /bson@5.4.0: + /bson@5.5.0: resolution: { - integrity: sha512-WRZ5SQI5GfUuKnPTNmAYPiKIof3ORXAF4IRU5UcgmivNIon01rWQlw5RUH954dpu8yGL8T59YShVddIPaU/gFA==, + integrity: sha512-B+QB4YmDx9RStKv8LLSl/aVIEV3nYJc3cJNNTK2Cd1TL+7P+cNpw9mAPeCgc5K+j01Dv6sxUzcITXDx7ZU3F0w==, } engines: { node: ">=14.20.1" } dev: false @@ -16724,7 +17022,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 /chownr@1.1.4: resolution: @@ -19722,7 +20020,7 @@ packages: - supports-color dev: true - /eslint-plugin-jest-dom@5.0.1(@testing-library/dom@9.2.0)(eslint@8.39.0): + /eslint-plugin-jest-dom@5.0.1(@testing-library/dom@9.3.3)(eslint@8.39.0): resolution: { integrity: sha512-zD/BjNk12R5R9cxIu8oa2HfNeDSknI3ewtN8nygIUMQuieWDnTY9Np//6a1Z3G7Y3dx3l45hCUR4EphsgRmUtA==, @@ -19733,7 +20031,7 @@ packages: eslint: ^6.8.0 || ^7.0.0 || ^8.0.0 dependencies: "@babel/runtime": 7.22.6 - "@testing-library/dom": 9.2.0 + "@testing-library/dom": 9.3.3 eslint: 8.39.0 requireindex: 1.2.0 dev: false @@ -20478,6 +20776,7 @@ packages: integrity: sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==, } hasBin: true + requiresBuild: true dependencies: strnum: 1.0.5 dev: false @@ -21115,6 +21414,17 @@ packages: engines: { node: ^8.16.0 || ^10.6.0 || >=11.0.0 } os: [darwin] requiresBuild: true + dev: true + optional: true + + /fsevents@2.3.3: + resolution: + { + integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, + } + engines: { node: ^8.16.0 || ^10.6.0 || >=11.0.0 } + os: [darwin] + requiresBuild: true optional: true /function-bind@1.1.1: @@ -23359,7 +23669,7 @@ packages: micromatch: 4.0.5 walker: 1.0.8 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /jest-leak-detector@29.5.0: @@ -25072,6 +25382,7 @@ packages: { integrity: sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==, } + requiresBuild: true dev: false optional: true @@ -25188,7 +25499,7 @@ packages: braces: 3.0.2 picomatch: 2.3.1 - /migrate-mongo@10.0.0(mongodb@5.7.0): + /migrate-mongo@10.0.0(mongodb@5.9.0): resolution: { integrity: sha512-QA/bBKNMq/FmuK3fDbgwfNoW2riiU1wLDWGXv/tGhUItPLGqcciPPmu29SrnYAzRKMOVaGEXxzmrBs1zp5cQ7Q==, @@ -25204,7 +25515,7 @@ packages: fn-args: 5.0.0 fs-extra: 10.1.0 lodash: 4.17.21 - mongodb: 5.7.0 + mongodb: 5.9.0 p-each-series: 2.2.0 dev: false @@ -25445,22 +25756,22 @@ packages: mongodb-connection-string-url: 2.6.0 socks: 2.7.1 optionalDependencies: - "@aws-sdk/credential-providers": 3.385.0 + "@aws-sdk/credential-providers": 3.421.0 saslprep: 1.0.3 transitivePeerDependencies: - aws-crt dev: false - /mongodb@5.7.0: + /mongodb@5.9.0: resolution: { - integrity: sha512-zm82Bq33QbqtxDf58fLWBwTjARK3NSvKYjyz997KSy6hpat0prjeX/kxjbPVyZY60XYPDNETaHkHJI2UCzSLuw==, + integrity: sha512-g+GCMHN1CoRUA+wb1Agv0TI4YTSiWr42B5ulkiAfLLHitGK1R+PkSAf3Lr5rPZwi/3F04LiaZEW0Kxro9Fi2TA==, } engines: { node: ">=14.20.1" } peerDependencies: - "@aws-sdk/credential-providers": ^3.201.0 - "@mongodb-js/zstd": ^1.1.0 - kerberos: ^2.0.1 + "@aws-sdk/credential-providers": ^3.188.0 + "@mongodb-js/zstd": ^1.0.0 + kerberos: ^1.0.0 || ^2.0.0 mongodb-client-encryption: ">=2.3.0 <3" snappy: ^7.2.2 peerDependenciesMeta: @@ -25475,11 +25786,11 @@ packages: snappy: optional: true dependencies: - bson: 5.4.0 + bson: 5.5.0 mongodb-connection-string-url: 2.6.0 socks: 2.7.1 optionalDependencies: - saslprep: 1.0.3 + "@mongodb-js/saslprep": 1.1.0 dev: false /mongoose-aggregate-paginate-v2@1.0.6: @@ -29564,6 +29875,12 @@ packages: integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==, } + /regenerator-runtime@0.14.0: + resolution: + { + integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==, + } + /regenerator-transform@0.15.1: resolution: { @@ -29929,7 +30246,7 @@ packages: engines: { node: ">=10.0.0" } hasBin: true optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: false /rrweb-cssom@0.6.0: @@ -30887,6 +31204,7 @@ packages: { integrity: sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==, } + requiresBuild: true dependencies: memory-pager: 1.5.0 dev: false From df53b93646694217e23a20db4480325852e371f4 Mon Sep 17 00:00:00 2001 From: kilemensi Date: Mon, 2 Oct 2023 09:47:05 +0300 Subject: [PATCH 02/17] Enable selection of platform to show on nav bar --- apps/codeforafrica/src/lib/data/common/index.js | 7 ++++--- apps/codeforafrica/src/payload/fields/socialLinks.js | 2 +- .../src/payload/globals/Settings/NavigationTab.js | 7 +++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/apps/codeforafrica/src/lib/data/common/index.js b/apps/codeforafrica/src/lib/data/common/index.js index 81ff7e95e..d0470b03b 100644 --- a/apps/codeforafrica/src/lib/data/common/index.js +++ b/apps/codeforafrica/src/lib/data/common/index.js @@ -5,15 +5,16 @@ import { imageFromMedia } from "@/codeforafrica/lib/data/utils"; function getNavBar(settings) { const { - connect: { links: socialLinks = [] }, + connect: { links = [] }, primaryLogo: media, - primaryNavigation, + primaryNavigation: { menus = null, connect }, title, } = settings; + const socialLinks = links.filter((link) => link.platform === connect); return { logo: imageFromMedia({ alt: title, ...media }), - menus: primaryNavigation?.menus || null, + menus, socialLinks, }; } diff --git a/apps/codeforafrica/src/payload/fields/socialLinks.js b/apps/codeforafrica/src/payload/fields/socialLinks.js index 214e75895..7c179bd21 100644 --- a/apps/codeforafrica/src/payload/fields/socialLinks.js +++ b/apps/codeforafrica/src/payload/fields/socialLinks.js @@ -3,7 +3,7 @@ import { array } from "payload/dist/fields/validations"; import url from "./url"; -const socialMediaOptions = [ +export const socialMediaOptions = [ "Facebook", "Twitter", "Instagram", diff --git a/apps/codeforafrica/src/payload/globals/Settings/NavigationTab.js b/apps/codeforafrica/src/payload/globals/Settings/NavigationTab.js index d472f8239..81af9ca2c 100644 --- a/apps/codeforafrica/src/payload/globals/Settings/NavigationTab.js +++ b/apps/codeforafrica/src/payload/globals/Settings/NavigationTab.js @@ -1,5 +1,6 @@ import link from "../../fields/links/link"; import linkArray from "../../fields/links/linkArray"; +import { socialMediaOptions } from "../../fields/socialLinks"; const linkField = link({ disableOpenInNewTab: true, @@ -31,6 +32,12 @@ const NavigationTab = { }, }, }), + { + name: "connect", + type: "select", + label: "Connect", + options: socialMediaOptions, + }, ], }, ], From 80d3067b2ae3584bb06b1707c15957b31bf69505 Mon Sep 17 00:00:00 2001 From: kilemensi Date: Tue, 3 Oct 2023 14:01:16 +0300 Subject: [PATCH 03/17] Organise collections and globals Lets start with three categories: Publication, Organisation & Website --- apps/codeforafrica/src/payload/collections/Authors.js | 3 +++ apps/codeforafrica/src/payload/collections/Donors.js | 4 +++- .../src/payload/collections/GuidingPrinciples.js | 5 +++++ apps/codeforafrica/src/payload/collections/Impact.js | 4 +++- apps/codeforafrica/src/payload/collections/Media.js | 3 +++ apps/codeforafrica/src/payload/collections/Members.js | 4 +++- apps/codeforafrica/src/payload/collections/Pages.js | 1 + apps/codeforafrica/src/payload/collections/Partners.js | 4 +++- apps/codeforafrica/src/payload/collections/Posts.js | 4 +++- apps/codeforafrica/src/payload/collections/Projects.js | 3 +++ apps/codeforafrica/src/payload/collections/Tags.js | 3 +++ apps/codeforafrica/src/payload/collections/Teams.js | 4 +++- apps/codeforafrica/src/payload/fields/slug/index.js | 1 + apps/codeforafrica/src/payload/globals/Settings/index.js | 3 +++ 14 files changed, 40 insertions(+), 6 deletions(-) diff --git a/apps/codeforafrica/src/payload/collections/Authors.js b/apps/codeforafrica/src/payload/collections/Authors.js index 11bf3b44d..a2c9d8d50 100644 --- a/apps/codeforafrica/src/payload/collections/Authors.js +++ b/apps/codeforafrica/src/payload/collections/Authors.js @@ -4,6 +4,9 @@ const Authors = { read: () => true, }, admin: { + defaultColumns: ["fullName", "updatedAt"], + enableRichTextLink: false, + group: "Publication", useAsTitle: "fullName", }, fields: [ diff --git a/apps/codeforafrica/src/payload/collections/Donors.js b/apps/codeforafrica/src/payload/collections/Donors.js index b2637fc1d..b73045427 100644 --- a/apps/codeforafrica/src/payload/collections/Donors.js +++ b/apps/codeforafrica/src/payload/collections/Donors.js @@ -12,8 +12,10 @@ const Donors = { }, }, admin: { + defaultColumns: ["name", "slug", "updatedAt"], + enableRichTextLink: false, + group: "Organisation", useAsTitle: "name", - defaultColumns: ["name", "logo"], }, fields: [ { diff --git a/apps/codeforafrica/src/payload/collections/GuidingPrinciples.js b/apps/codeforafrica/src/payload/collections/GuidingPrinciples.js index a40661051..790b29c92 100644 --- a/apps/codeforafrica/src/payload/collections/GuidingPrinciples.js +++ b/apps/codeforafrica/src/payload/collections/GuidingPrinciples.js @@ -1,9 +1,13 @@ import image from "../fields/image"; import richText from "../fields/richText"; +import slug from "../fields/slug"; const GuidingPrinciples = { slug: "guiding-principles", admin: { + defaultColumns: ["title", "slug", "updatedAt"], + enableRichTextLink: false, + group: "Organisation", useAsTitle: "title", }, fields: [ @@ -15,6 +19,7 @@ const GuidingPrinciples = { type: "text", required: true, }, + slug({ fieldToUse: "title" }), image({ overrides: { name: "icon", diff --git a/apps/codeforafrica/src/payload/collections/Impact.js b/apps/codeforafrica/src/payload/collections/Impact.js index b09291ac9..7788337bc 100644 --- a/apps/codeforafrica/src/payload/collections/Impact.js +++ b/apps/codeforafrica/src/payload/collections/Impact.js @@ -4,8 +4,10 @@ import richText from "../fields/richText"; const Impact = { slug: "impact", admin: { + defaultColumns: ["title", "value", "updatedAt"], + enableRichTextLink: false, + group: "Organisation", useAsTitle: "title", - defaultColumns: ["title", "value"], }, access: { read: () => true, diff --git a/apps/codeforafrica/src/payload/collections/Media.js b/apps/codeforafrica/src/payload/collections/Media.js index 9b4cf0ae1..bbd5b3040 100644 --- a/apps/codeforafrica/src/payload/collections/Media.js +++ b/apps/codeforafrica/src/payload/collections/Media.js @@ -1,6 +1,9 @@ const Media = { slug: "media", admin: { + defaultColumns: ["alt", "updatedAt"], + enableRichTextLink: false, + group: "Publication", useAsTitle: "alt", }, access: { diff --git a/apps/codeforafrica/src/payload/collections/Members.js b/apps/codeforafrica/src/payload/collections/Members.js index 15971b2f7..ee35f6168 100644 --- a/apps/codeforafrica/src/payload/collections/Members.js +++ b/apps/codeforafrica/src/payload/collections/Members.js @@ -16,8 +16,10 @@ const Members = { }, }, admin: { + defaultColumns: ["name", "title", "team.name", "updatedAt"], + enableRichTextLink: false, + group: "Organisation", useAsTitle: "name", - defaultColumns: ["name", "title", "country"], }, fields: [ image({ diff --git a/apps/codeforafrica/src/payload/collections/Pages.js b/apps/codeforafrica/src/payload/collections/Pages.js index 3b3a25c3f..5292162f0 100644 --- a/apps/codeforafrica/src/payload/collections/Pages.js +++ b/apps/codeforafrica/src/payload/collections/Pages.js @@ -30,6 +30,7 @@ const Pages = { }, admin: { defaultColumns: ["fullTitle", "updatedAt"], + group: "Publication", preview: (doc, options) => formatDraftUrl("pages", doc, options), useAsTitle: "title", }, diff --git a/apps/codeforafrica/src/payload/collections/Partners.js b/apps/codeforafrica/src/payload/collections/Partners.js index 1afb94293..03a704cb2 100644 --- a/apps/codeforafrica/src/payload/collections/Partners.js +++ b/apps/codeforafrica/src/payload/collections/Partners.js @@ -19,8 +19,10 @@ const Partners = { }, }, admin: { + defaultColumns: ["name", "updatedAt"], + enableRichTextLink: false, + group: "Organisation", useAsTitle: "name", - defaultColumns: ["name", "logo"], }, access: { read: () => true, diff --git a/apps/codeforafrica/src/payload/collections/Posts.js b/apps/codeforafrica/src/payload/collections/Posts.js index 5c45464ed..b4f665ad0 100644 --- a/apps/codeforafrica/src/payload/collections/Posts.js +++ b/apps/codeforafrica/src/payload/collections/Posts.js @@ -18,8 +18,10 @@ const Posts = { drafts: true, }, admin: { - useAsTitle: "title", defaultColumns: ["title", "authors", "publishedOn"], + description: "Stories and Opportunities", + group: "Publication", + useAsTitle: "title", }, fields: [ { diff --git a/apps/codeforafrica/src/payload/collections/Projects.js b/apps/codeforafrica/src/payload/collections/Projects.js index e6dcbee15..4de1989f4 100644 --- a/apps/codeforafrica/src/payload/collections/Projects.js +++ b/apps/codeforafrica/src/payload/collections/Projects.js @@ -10,6 +10,9 @@ import nestCollectionUnderPage from "../utils/nestCollectionUnderPage"; const Projects = { slug: "projects", admin: { + defaultColumns: ["name", "tagLine", "updatedAt"], + enableRichTextLink: false, + group: "Organisation", useAsTitle: "name", }, fields: [ diff --git a/apps/codeforafrica/src/payload/collections/Tags.js b/apps/codeforafrica/src/payload/collections/Tags.js index 0f3cf7fe2..d132ec2a0 100644 --- a/apps/codeforafrica/src/payload/collections/Tags.js +++ b/apps/codeforafrica/src/payload/collections/Tags.js @@ -3,6 +3,9 @@ import slug from "../fields/slug"; const Tags = { slug: "tag", admin: { + defaultColumns: ["name", "updatedAt"], + enableRichTextLink: false, + group: "Publication", useAsTitle: "name", }, access: { diff --git a/apps/codeforafrica/src/payload/collections/Teams.js b/apps/codeforafrica/src/payload/collections/Teams.js index 011d59211..540edff0e 100644 --- a/apps/codeforafrica/src/payload/collections/Teams.js +++ b/apps/codeforafrica/src/payload/collections/Teams.js @@ -3,8 +3,10 @@ import slug from "../fields/slug"; const Teams = { slug: "teams", admin: { + defaultColumns: ["name", "updatedAt"], + enableRichTextLink: false, + group: "Organisation", useAsTitle: "name", - defaultColumns: ["name"], }, access: { read: () => true, diff --git a/apps/codeforafrica/src/payload/fields/slug/index.js b/apps/codeforafrica/src/payload/fields/slug/index.js index 48614ec87..7814a6d38 100644 --- a/apps/codeforafrica/src/payload/fields/slug/index.js +++ b/apps/codeforafrica/src/payload/fields/slug/index.js @@ -8,6 +8,7 @@ function slug({ fieldToUse = "title", overrides = undefined } = {}) { label: "Slug", type: "text", index: true, + unique: true, admin: { position: "sidebar", }, diff --git a/apps/codeforafrica/src/payload/globals/Settings/index.js b/apps/codeforafrica/src/payload/globals/Settings/index.js index da534b6ff..0e7c7314d 100644 --- a/apps/codeforafrica/src/payload/globals/Settings/index.js +++ b/apps/codeforafrica/src/payload/globals/Settings/index.js @@ -7,6 +7,9 @@ const Settings = { access: { read: () => true, }, + admin: { + group: "Website", + }, label: "Settings", fields: [ { From 9b4ca9452d549f71bfbb708edb766d26396000b1 Mon Sep 17 00:00:00 2001 From: kilemensi Date: Tue, 3 Oct 2023 14:02:27 +0300 Subject: [PATCH 04/17] Enable emails in payload --- apps/codeforafrica/package.json | 1 + apps/codeforafrica/server.ts | 28 ++++++++++++++++++++-------- pnpm-lock.yaml | 3 +++ 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/apps/codeforafrica/package.json b/apps/codeforafrica/package.json index 137fbd965..39a502301 100644 --- a/apps/codeforafrica/package.json +++ b/apps/codeforafrica/package.json @@ -62,6 +62,7 @@ "nanoid": "^4.0.2", "next": "~13.4.11", "next-seo": "^5.15.0", + "nodemailer-sendgrid": "^1.0.3", "payload": "^1.7.5", "prop-types": "^15.8.1", "qs": "^6.11.2", diff --git a/apps/codeforafrica/server.ts b/apps/codeforafrica/server.ts index 709fd5593..ae700638e 100644 --- a/apps/codeforafrica/server.ts +++ b/apps/codeforafrica/server.ts @@ -2,6 +2,7 @@ import path from "path"; import { spawn } from "child_process"; import express from "express"; import next from "next"; +import nodemailerSendgrid from "nodemailer-sendgrid"; import payload from "payload"; import { Payload } from "payload/dist/payload"; import { loadEnvConfig } from "@next/env"; @@ -9,9 +10,10 @@ import { loadEnvConfig } from "@next/env"; const projectDir = process.cwd(); loadEnvConfig(projectDir); -const hostname = process.env.NEXT_HOSTNAME || "localhost"; -const PORT = parseInt(process.env.PORT || "3000", 10); const dev = process.env.NODE_ENV !== "production"; +const hostname = process.env.NEXT_HOSTNAME || "localhost"; +const port = parseInt(process.env.PORT || "3000", 10); +const sendGridAPIKey = process.env.SENDGRID_API_KEY; if (!process.env.NEXT_MANUAL_SIG_HANDLE) { process.on("SIGTERM", () => process.exit(0)); @@ -24,6 +26,18 @@ const start = async (): Promise => { let localPayload: Payload; try { localPayload = await payload.init({ + ...(sendGridAPIKey + ? { + email: { + transportOptions: nodemailerSendgrid({ + apiKey: sendGridAPIKey, + }), + fromName: process.env.SENDGRID_FROM_NAME || "Code for Africa CMS", + fromAddress: + process.env.SENDGRID_FROM_EMAIL || "noreply@dodeforafrica.org", + }, + } + : undefined), secret: process.env.PAYLOAD_SECRET, mongoURL: process.env.MONGODB_URL, express: app, @@ -37,20 +51,18 @@ const start = async (): Promise => { } if (process.env.NEXT_BUILD) { - app.listen(PORT, async () => { + app.listen(port, async () => { localPayload.logger.info("NextJS is now building..."); const nextBuild = spawn( "pnpm", ["next", "build", path.resolve(projectDir)], { - shell: true, - stdio: "inherit", + shell: true, stdio: "inherit", }, ); nextBuild.on("close", (code) => { process.exit(code); }); - nextBuild.on("error", (err) => { localPayload.logger.error(err); process.exit(1); @@ -60,7 +72,7 @@ const start = async (): Promise => { return; } - const nextApp = next({ dev, hostname, port: PORT }); + const nextApp = next({ dev, hostname, port }); const nextHandler = nextApp.getRequestHandler(); nextApp.prepare().then(() => { localPayload.logger.info("NextJS started"); @@ -69,7 +81,7 @@ const start = async (): Promise => { app.post("*", (req: any, res: any) => nextHandler(req, res)); app.put("*", (req: any, res: any) => nextHandler(req, res)); - app.listen(PORT, async () => { + app.listen(port, async () => { localPayload.logger.info( `Next.js App URL: ${process.env.NEXT_PUBLIC_APP_URL}`, ); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 03e2a7cef..1bebe30a0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -338,6 +338,9 @@ importers: next-seo: specifier: ^5.15.0 version: 5.15.0(next@13.4.11)(react-dom@18.2.0)(react@18.2.0) + nodemailer-sendgrid: + specifier: ^1.0.3 + version: 1.0.3 payload: specifier: ^1.7.5 version: 1.11.8(@types/react@18.2.15)(typescript@4.9.5) From 1b3aeace0920dc2f73a529953f4f51ba35dd8a4e Mon Sep 17 00:00:00 2001 From: kilemensi Date: Tue, 3 Oct 2023 14:03:07 +0300 Subject: [PATCH 05/17] Enable custom Users collection and authorisation --- apps/codeforafrica/payload.config.ts | 3 + .../src/payload/access/isAdmin.js | 11 ++++ .../src/payload/access/isAdminOrPublished.js | 14 +++++ .../src/payload/access/isAdminOrSelf.js | 24 ++++++++ .../codeforafrica/src/payload/access/roles.js | 7 +++ .../src/payload/collections/Users.js | 58 +++++++++++++++++++ 6 files changed, 117 insertions(+) create mode 100644 apps/codeforafrica/src/payload/access/isAdmin.js create mode 100644 apps/codeforafrica/src/payload/access/isAdminOrPublished.js create mode 100644 apps/codeforafrica/src/payload/access/isAdminOrSelf.js create mode 100644 apps/codeforafrica/src/payload/access/roles.js create mode 100644 apps/codeforafrica/src/payload/collections/Users.js diff --git a/apps/codeforafrica/payload.config.ts b/apps/codeforafrica/payload.config.ts index 1e58ff8ef..8aca8191e 100644 --- a/apps/codeforafrica/payload.config.ts +++ b/apps/codeforafrica/payload.config.ts @@ -14,6 +14,7 @@ import Tags from "./src/payload/collections/Tags"; import Projects from "./src/payload/collections/Projects"; import Donors from "./src/payload/collections/Donors"; import Teams from "./src/payload/collections/Teams"; +import Users from "./src/payload/collections/Users"; import { CollectionConfig, GlobalConfig } from "payload/types"; import dotenv from "dotenv"; import seo from "@payloadcms/plugin-seo"; @@ -62,10 +63,12 @@ export default buildConfig({ Posts, Tags, Teams, + Users, ] as CollectionConfig[], globals: [Settings] as GlobalConfig[], admin: { css: path.resolve(__dirname, "./src/payload/admin/scss/custom.scss"), + user: Users.slug, webpack: (config) => ({ ...config, resolve: { diff --git a/apps/codeforafrica/src/payload/access/isAdmin.js b/apps/codeforafrica/src/payload/access/isAdmin.js new file mode 100644 index 000000000..08301afd9 --- /dev/null +++ b/apps/codeforafrica/src/payload/access/isAdmin.js @@ -0,0 +1,11 @@ +import { ROLE_ADMIN } from "./roles"; + +export const isAdmin = ({ req: { user } }) => { + // Return true or false based on if the user has an admin role + return Boolean(user?.roles?.includes(ROLE_ADMIN)); +}; + +export const isAdminFieldLevel = ({ req: { user } }) => { + // Return true or false based on if the user has an admin role + return Boolean(user?.roles?.includes(ROLE_ADMIN)); +}; diff --git a/apps/codeforafrica/src/payload/access/isAdminOrPublished.js b/apps/codeforafrica/src/payload/access/isAdminOrPublished.js new file mode 100644 index 000000000..c006014ec --- /dev/null +++ b/apps/codeforafrica/src/payload/access/isAdminOrPublished.js @@ -0,0 +1,14 @@ +import { ROLE_ADMIN } from "./roles"; + +export const isAdminOrPublished = ({ req: { user } }) => { + if (user?.roles?.includes(ROLE_ADMIN)) { + return true; + } + return { + _status: { + equals: "published", + }, + }; +}; + +export default undefined; diff --git a/apps/codeforafrica/src/payload/access/isAdminOrSelf.js b/apps/codeforafrica/src/payload/access/isAdminOrSelf.js new file mode 100644 index 000000000..4dfae4152 --- /dev/null +++ b/apps/codeforafrica/src/payload/access/isAdminOrSelf.js @@ -0,0 +1,24 @@ +import { ROLE_ADMIN } from "./roles"; + +export const isAdminOrSelf = ({ req: { user } }) => { + // Need to be logged in + if (user) { + // If user has role of 'admin' + if (user.roles?.includes(ROLE_ADMIN)) { + return true; + } + // If any other type of user, only provide access to themselves + return { + id: { + equals: user.id, + }, + }; + } + + // Reject everyone else + return false; +}; + +export const isAdminOrSelfFieldLevel = ({ id, req: { user } }) => { + return user?.roles?.includes(ROLE_ADMIN) || id === user?.id; +}; diff --git a/apps/codeforafrica/src/payload/access/roles.js b/apps/codeforafrica/src/payload/access/roles.js new file mode 100644 index 000000000..d060bbf8e --- /dev/null +++ b/apps/codeforafrica/src/payload/access/roles.js @@ -0,0 +1,7 @@ +export const ROLE_ADMIN = "admin"; +export const ROLE_EDITOR = "editor"; +export const ROLE_DEFAULT = ROLE_EDITOR; +export const ROLE_OPTIONS = [ + { label: "Admin", value: ROLE_ADMIN }, + { label: "Editor", value: ROLE_EDITOR }, +]; diff --git a/apps/codeforafrica/src/payload/collections/Users.js b/apps/codeforafrica/src/payload/collections/Users.js new file mode 100644 index 000000000..8d1c0fd0f --- /dev/null +++ b/apps/codeforafrica/src/payload/collections/Users.js @@ -0,0 +1,58 @@ +import { isAdmin, isAdminFieldLevel } from "../access/isAdmin"; +import { + isAdminOrSelf, + isAdminOrSelfFieldLevel, +} from "../access/isAdminOrSelf"; +import { ROLE_DEFAULT, ROLE_OPTIONS } from "../access/roles"; + +const Users = { + slug: "users", + access: { + create: isAdmin, + read: () => true, + update: isAdminOrSelf, + delete: isAdminOrSelf, + }, + admin: { + defaultColumns: ["firstName", "lastName", "email", "updatedAt"], + enableRichTextLink: false, + group: "Website", + useAsTitle: "email", + }, + auth: { + verify: true, + }, + fields: [ + { + type: "row", + fields: [ + { + name: "firstName", + type: "text", + required: true, + }, + { + name: "lastName", + type: "text", + required: true, + }, + ], + }, + { + name: "roles", + type: "select", + // Save this field to JWT so we can use from `req.user` + saveToJWT: true, + required: true, + defaultValue: [ROLE_DEFAULT], + access: { + read: isAdminOrSelfFieldLevel, + create: isAdminFieldLevel, + update: isAdminFieldLevel, + }, + options: ROLE_OPTIONS, + }, + ], +}; + +export default Users; From abe786264f8879742688a6cd2f27f0ca90d9f65e Mon Sep 17 00:00:00 2001 From: kilemensi Date: Tue, 3 Oct 2023 16:32:58 +0300 Subject: [PATCH 06/17] Clean up fields ready for localization - Remove unnecessary labels - Leave only en labels where necessary - Remove localized from fields; it will be added at higher level --- apps/codeforafrica/src/payload/fields/content.js | 1 - .../src/payload/fields/fullTitle/index.js | 11 ++++------- apps/codeforafrica/src/payload/fields/image.js | 1 - apps/codeforafrica/src/payload/fields/links/link.js | 4 ---- .../src/payload/fields/links/linkGroup.js | 5 ----- apps/codeforafrica/src/payload/fields/slug/index.js | 1 - apps/codeforafrica/src/payload/fields/socialLinks.js | 9 ++++++--- apps/codeforafrica/src/payload/fields/tags.js | 2 +- 8 files changed, 11 insertions(+), 23 deletions(-) diff --git a/apps/codeforafrica/src/payload/fields/content.js b/apps/codeforafrica/src/payload/fields/content.js index 893bfaf00..1951e5f53 100644 --- a/apps/codeforafrica/src/payload/fields/content.js +++ b/apps/codeforafrica/src/payload/fields/content.js @@ -10,7 +10,6 @@ const content = (overrides) => name: "content", type: "blocks", blocks: [RichText, MediaBlock, ExternalEmbed], - localized: true, }, overrides, ); diff --git a/apps/codeforafrica/src/payload/fields/fullTitle/index.js b/apps/codeforafrica/src/payload/fields/fullTitle/index.js index d745deb0e..8074aadae 100644 --- a/apps/codeforafrica/src/payload/fields/fullTitle/index.js +++ b/apps/codeforafrica/src/payload/fields/fullTitle/index.js @@ -1,13 +1,10 @@ +import { deepmerge } from "@mui/utils"; + import populateFullTitle from "./populateFullTitle"; -function fullTitle() { +function fullTitle({ overrides = undefined } = {}) { const fullTitleResult = { name: "fullTitle", - label: { - en: "Full title", - fr: "Titre complet ", - pt: "Título completo", - }, type: "text", hooks: { beforeChange: [populateFullTitle], @@ -19,7 +16,7 @@ function fullTitle() { }, }; - return fullTitleResult; + return deepmerge(fullTitleResult, overrides); } export default fullTitle; diff --git a/apps/codeforafrica/src/payload/fields/image.js b/apps/codeforafrica/src/payload/fields/image.js index b7d81c09e..c6ef5f402 100644 --- a/apps/codeforafrica/src/payload/fields/image.js +++ b/apps/codeforafrica/src/payload/fields/image.js @@ -4,7 +4,6 @@ function image({ overrides = undefined } = {}) { const imageResult = { name: "image", type: "upload", - label: "Image", relationTo: "media", filterOptions: { mimeType: { contains: "image" }, diff --git a/apps/codeforafrica/src/payload/fields/links/link.js b/apps/codeforafrica/src/payload/fields/links/link.js index 0dc3b5a56..88d80d0a7 100644 --- a/apps/codeforafrica/src/payload/fields/links/link.js +++ b/apps/codeforafrica/src/payload/fields/links/link.js @@ -42,16 +42,12 @@ const link = ({ { label: { en: "Custom URL", - fr: "URL personnalisée", - pt: "URL personalizado", }, value: "custom", }, { label: { en: "Internal link", - fr: "Lien interne", - pt: "Link interno", }, value: "internal", }, diff --git a/apps/codeforafrica/src/payload/fields/links/linkGroup.js b/apps/codeforafrica/src/payload/fields/links/linkGroup.js index 3931937bf..654b4e05f 100644 --- a/apps/codeforafrica/src/payload/fields/links/linkGroup.js +++ b/apps/codeforafrica/src/payload/fields/links/linkGroup.js @@ -8,11 +8,6 @@ import link from "./link"; function linkGroup({ linkConfig, overrides = {} } = {}) { const generatedLinkGroup = { name: "link", - label: { - en: "Link", - fr: "Lien", - pt: "Link", - }, type: "group", required: true, fields: [link(linkConfig)], diff --git a/apps/codeforafrica/src/payload/fields/slug/index.js b/apps/codeforafrica/src/payload/fields/slug/index.js index 7814a6d38..ef953b843 100644 --- a/apps/codeforafrica/src/payload/fields/slug/index.js +++ b/apps/codeforafrica/src/payload/fields/slug/index.js @@ -5,7 +5,6 @@ import formatSlug from "./formatSlug"; function slug({ fieldToUse = "title", overrides = undefined } = {}) { const slugResult = { name: "slug", - label: "Slug", type: "text", index: true, unique: true, diff --git a/apps/codeforafrica/src/payload/fields/socialLinks.js b/apps/codeforafrica/src/payload/fields/socialLinks.js index 7c179bd21..ac5c77d31 100644 --- a/apps/codeforafrica/src/payload/fields/socialLinks.js +++ b/apps/codeforafrica/src/payload/fields/socialLinks.js @@ -16,10 +16,13 @@ function socialLinks(overrides) { const defaults = { name: "links", type: "array", - label: "Links", labels: { - singular: "Link", - plural: "Links", + singular: { + en: "Link", + }, + plural: { + en: "Links", + }, }, minRows: 1, admin: { diff --git a/apps/codeforafrica/src/payload/fields/tags.js b/apps/codeforafrica/src/payload/fields/tags.js index d38440d6f..3186f4c76 100644 --- a/apps/codeforafrica/src/payload/fields/tags.js +++ b/apps/codeforafrica/src/payload/fields/tags.js @@ -3,10 +3,10 @@ import { deepmerge } from "@mui/utils"; const tags = (overrides) => { const field = { name: "tags", - required: true, type: "relationship", relationTo: "tag", hasMany: true, + required: true, }; return deepmerge(field, overrides); }; From 4aac7a04fd53aaa9f8446e92fab0327c04e2a3ed Mon Sep 17 00:00:00 2001 From: kilemensi Date: Tue, 3 Oct 2023 16:34:29 +0300 Subject: [PATCH 07/17] Enable localization; en only for now --- apps/codeforafrica/payload.config.ts | 31 ++++++++++++++----- .../src/payload/utils/locales.js | 5 +++ apps/codeforafrica/turbo.json | 14 +++++++-- 3 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 apps/codeforafrica/src/payload/utils/locales.js diff --git a/apps/codeforafrica/payload.config.ts b/apps/codeforafrica/payload.config.ts index 8aca8191e..ebb843d9d 100644 --- a/apps/codeforafrica/payload.config.ts +++ b/apps/codeforafrica/payload.config.ts @@ -1,7 +1,15 @@ import path from "path"; import { buildConfig } from "payload/config"; +import { CollectionConfig, GlobalConfig } from "payload/types"; +import { cloudStorage } from "@payloadcms/plugin-cloud-storage"; +import dotenv from "dotenv"; +import seo from "@payloadcms/plugin-seo"; +import nestedDocs from "@payloadcms/plugin-nested-docs"; +import { s3Adapter } from "@payloadcms/plugin-cloud-storage/s3"; + import Authors from "./src/payload/collections/Authors"; +import Donors from "./src/payload/collections/Donors"; import GuidingPrinciples from "./src/payload/collections/GuidingPrinciples"; import Impact from "./src/payload/collections/Impact"; import Media from "./src/payload/collections/Media"; @@ -9,18 +17,12 @@ import Members from "./src/payload/collections/Members"; import Pages from "./src/payload/collections/Pages"; import Partners from "./src/payload/collections/Partners"; import Posts from "./src/payload/collections/Posts"; +import Projects from "./src/payload/collections/Projects"; import Settings from "./src/payload/globals/Settings"; import Tags from "./src/payload/collections/Tags"; -import Projects from "./src/payload/collections/Projects"; -import Donors from "./src/payload/collections/Donors"; import Teams from "./src/payload/collections/Teams"; import Users from "./src/payload/collections/Users"; -import { CollectionConfig, GlobalConfig } from "payload/types"; -import dotenv from "dotenv"; -import seo from "@payloadcms/plugin-seo"; -import nestedDocs from "@payloadcms/plugin-nested-docs"; -import { cloudStorage } from "@payloadcms/plugin-cloud-storage"; -import { s3Adapter } from "@payloadcms/plugin-cloud-storage/s3"; +import { defaultLocale, locales } from "./src/payload/utils/locales"; dotenv.config(); dotenv.config({ path: "./.env.local" }); @@ -66,6 +68,15 @@ export default buildConfig({ Users, ] as CollectionConfig[], globals: [Settings] as GlobalConfig[], + ...(locales?.length + ? { + localization: { + locales, + defaultLocale, + fallback: true, + }, + } + : undefined), admin: { css: path.resolve(__dirname, "./src/payload/admin/scss/custom.scss"), user: Users.slug, @@ -84,6 +95,10 @@ export default buildConfig({ }, cors, csrf, + i18n: { + fallbackLng: "en", // default + debug: false, // default + }, plugins: [ cloudStorage({ collections: { diff --git a/apps/codeforafrica/src/payload/utils/locales.js b/apps/codeforafrica/src/payload/utils/locales.js new file mode 100644 index 000000000..11cf08c91 --- /dev/null +++ b/apps/codeforafrica/src/payload/utils/locales.js @@ -0,0 +1,5 @@ +export const locales = process.env.PAYLOAD_PUBLIC_LOCALES?.split(",") + ?.map((l) => l.trim()) + .filter(Boolean) || ["en"]; +export const defaultLocale = + process.env.PAYLOAD_PUBLIC_DEFAULT_LOCALE?.trim() || locales?.[0]; diff --git a/apps/codeforafrica/turbo.json b/apps/codeforafrica/turbo.json index 854195e02..cde8520e9 100644 --- a/apps/codeforafrica/turbo.json +++ b/apps/codeforafrica/turbo.json @@ -6,11 +6,21 @@ }, "build-next": { "outputs": [".next/**", "!.next/cache/**", "dist/**"], - "env": ["NEXT_PUBLIC_APP_NAME", "NEXT_PUBLIC_APP_URL"] + "env": [ + "NEXT_PUBLIC_APP_NAME", + "NEXT_PUBLIC_APP_URL", + "PAYLOAD_PUBLIC_APP_URL", + "PAYLOAD_PUBLIC_DEFAULT_LOCALE", + "PAYLOAD_PUBLIC_LOCALES" + ] }, "build-payload": { "outputs": ["build/**"], - "env": ["PAYLOAD_PUBLIC_APP_URL"] + "env": [ + "PAYLOAD_PUBLIC_APP_URL", + "PAYLOAD_PUBLIC_DEFAULT_LOCALE", + "PAYLOAD_PUBLIC_LOCALES" + ] } } } From 2c33b7de2ad3ba668507d39dbba5b6634edfa9df Mon Sep 17 00:00:00 2001 From: kilemensi Date: Tue, 3 Oct 2023 16:35:13 +0300 Subject: [PATCH 08/17] Clean up blocks (similar to fields) --- .../src/payload/blocks/ContactForm.js | 1 - .../src/payload/blocks/CustomPageHeader.js | 6 ++--- .../codeforafrica/src/payload/blocks/Error.js | 4 +-- .../src/payload/blocks/ExternalEmbed.js | 2 -- .../src/payload/blocks/GetInTouch.js | 6 ++--- .../src/payload/blocks/GuidingPrinciples.js | 4 --- apps/codeforafrica/src/payload/blocks/Hero.js | 4 +-- .../src/payload/blocks/JoinOurSlack.js | 6 ++--- .../src/payload/blocks/MeetOurTeam.js | 4 +-- .../src/payload/blocks/OurImpact.js | 3 +-- .../src/payload/blocks/OurMission.js | 5 +--- .../src/payload/blocks/OurPartners.js | 17 +------------ .../src/payload/blocks/OurTeam.js | 10 ++------ .../src/payload/blocks/OurWork.js | 25 ++++++------------- .../src/payload/blocks/PageHeader.js | 3 +-- .../codeforafrica/src/payload/blocks/Posts.js | 15 ++++------- .../src/payload/blocks/RichText.js | 1 + 17 files changed, 29 insertions(+), 87 deletions(-) diff --git a/apps/codeforafrica/src/payload/blocks/ContactForm.js b/apps/codeforafrica/src/payload/blocks/ContactForm.js index cd1e1bd4c..6ba29aa46 100644 --- a/apps/codeforafrica/src/payload/blocks/ContactForm.js +++ b/apps/codeforafrica/src/payload/blocks/ContactForm.js @@ -6,7 +6,6 @@ const ContactForm = { { name: "embedCode", type: "code", - label: "Embed Code", required: true, admin: { language: "html", diff --git a/apps/codeforafrica/src/payload/blocks/CustomPageHeader.js b/apps/codeforafrica/src/payload/blocks/CustomPageHeader.js index 278ba1909..6cbebe7f2 100644 --- a/apps/codeforafrica/src/payload/blocks/CustomPageHeader.js +++ b/apps/codeforafrica/src/payload/blocks/CustomPageHeader.js @@ -7,15 +7,13 @@ const CustomPageHeader = { fields: [ { name: "title", - label: "Title", - required: true, type: "text", + required: true, }, { name: "subtitle", - label: "Subtitle", - required: true, type: "text", + required: true, }, image({ overrides: { diff --git a/apps/codeforafrica/src/payload/blocks/Error.js b/apps/codeforafrica/src/payload/blocks/Error.js index c26e30934..8e7014fb3 100644 --- a/apps/codeforafrica/src/payload/blocks/Error.js +++ b/apps/codeforafrica/src/payload/blocks/Error.js @@ -3,17 +3,15 @@ import richText from "../fields/richText"; const Error = { slug: "error", imageURL: "/images/cms/blocks/error.png", - imageAltText: "Used in Error page.", + imageAltText: "Used to describe errors in error pages.", fields: [ { name: "title", - label: "Title", type: "text", required: true, }, richText({ name: "subtitle", - label: "Subtitle", admin: { elements: ["link"], }, diff --git a/apps/codeforafrica/src/payload/blocks/ExternalEmbed.js b/apps/codeforafrica/src/payload/blocks/ExternalEmbed.js index fd89a9b68..2d6fdadc3 100644 --- a/apps/codeforafrica/src/payload/blocks/ExternalEmbed.js +++ b/apps/codeforafrica/src/payload/blocks/ExternalEmbed.js @@ -37,7 +37,6 @@ const ExternalEmbed = { }, { name: "caption", - label: "Caption", type: "text", localized: true, admin: { @@ -46,7 +45,6 @@ const ExternalEmbed = { }, { name: "code", - label: "Code", type: "code", required: true, admin: { diff --git a/apps/codeforafrica/src/payload/blocks/GetInTouch.js b/apps/codeforafrica/src/payload/blocks/GetInTouch.js index b50433007..6218f095d 100644 --- a/apps/codeforafrica/src/payload/blocks/GetInTouch.js +++ b/apps/codeforafrica/src/payload/blocks/GetInTouch.js @@ -7,15 +7,13 @@ const GetInTouch = { fields: [ { name: "title", - label: "Title", - required: true, type: "text", + required: true, }, { name: "subtitle", - label: "Subtitle", - required: true, type: "text", + required: true, }, linkGroup({ overrides: { name: "action", label: "Action" } }), ], diff --git a/apps/codeforafrica/src/payload/blocks/GuidingPrinciples.js b/apps/codeforafrica/src/payload/blocks/GuidingPrinciples.js index 1ef993ab1..74ea13fdd 100644 --- a/apps/codeforafrica/src/payload/blocks/GuidingPrinciples.js +++ b/apps/codeforafrica/src/payload/blocks/GuidingPrinciples.js @@ -5,11 +5,7 @@ const GuidingPrinciples = { fields: [ { name: "title", - label: { - en: "Title", - }, type: "text", - localized: true, required: true, }, { diff --git a/apps/codeforafrica/src/payload/blocks/Hero.js b/apps/codeforafrica/src/payload/blocks/Hero.js index 0183a28e1..15ad94691 100644 --- a/apps/codeforafrica/src/payload/blocks/Hero.js +++ b/apps/codeforafrica/src/payload/blocks/Hero.js @@ -8,7 +8,6 @@ const Hero = { fields: [ richText({ name: "title", - label: "Title", required: true, admin: { elements: [], @@ -18,7 +17,6 @@ const Hero = { { name: "messages", type: "array", - label: "Messages", minRows: 3, maxRows: 3, fields: [ @@ -39,8 +37,8 @@ const Hero = { { name: "subtitle", label: "Description", - required: true, type: "text", + required: true, }, image({ overrides: { diff --git a/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js b/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js index 7bddbad80..ee50087ce 100644 --- a/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js +++ b/apps/codeforafrica/src/payload/blocks/JoinOurSlack.js @@ -7,15 +7,13 @@ const JoinOurSlack = { fields: [ { name: "title", - label: "Title", - required: true, type: "text", + required: true, }, { name: "subtitle", - label: "Subtitle", - required: true, type: "text", + required: true, }, linkGroup({ overrides: { name: "action", label: "Action" } }), ], diff --git a/apps/codeforafrica/src/payload/blocks/MeetOurTeam.js b/apps/codeforafrica/src/payload/blocks/MeetOurTeam.js index 40af98c82..fbd76d8cc 100644 --- a/apps/codeforafrica/src/payload/blocks/MeetOurTeam.js +++ b/apps/codeforafrica/src/payload/blocks/MeetOurTeam.js @@ -9,13 +9,11 @@ const MeetOurTeam = { fields: [ { name: "title", - label: "Title", - required: true, type: "text", + required: true, }, richText({ name: "description", - label: "Description", required: true, }), linkGroup({ overrides: { name: "action", label: "Action" } }), diff --git a/apps/codeforafrica/src/payload/blocks/OurImpact.js b/apps/codeforafrica/src/payload/blocks/OurImpact.js index d50570fdf..a4d6f80ce 100644 --- a/apps/codeforafrica/src/payload/blocks/OurImpact.js +++ b/apps/codeforafrica/src/payload/blocks/OurImpact.js @@ -3,11 +3,10 @@ import impacts from "../fields/impacts"; const OurImpact = { slug: "our-impact", imageURL: "/images/cms/blocks/our_impact.jpg", - imageAltText: "Show Our Impact", + imageAltText: "Show our impact.", fields: [ { name: "title", - label: "Title", type: "text", required: true, }, diff --git a/apps/codeforafrica/src/payload/blocks/OurMission.js b/apps/codeforafrica/src/payload/blocks/OurMission.js index 3fbf1dbdf..c84c1f4f5 100644 --- a/apps/codeforafrica/src/payload/blocks/OurMission.js +++ b/apps/codeforafrica/src/payload/blocks/OurMission.js @@ -3,23 +3,20 @@ import richText from "../fields/richText"; const OurMission = { slug: "our-mission", imageURL: "/images/cms/blocks/our_mission.jpg", - imageAltText: "Show Mission Statement", + imageAltText: "Our mission", fields: [ { name: "title", - label: "Title", type: "text", required: true, }, { name: "subtitle", - label: "Subtitle", type: "text", required: true, }, richText({ name: "description", - label: "Description", required: true, admin: { elements: [ diff --git a/apps/codeforafrica/src/payload/blocks/OurPartners.js b/apps/codeforafrica/src/payload/blocks/OurPartners.js index 8554afd10..720f15757 100644 --- a/apps/codeforafrica/src/payload/blocks/OurPartners.js +++ b/apps/codeforafrica/src/payload/blocks/OurPartners.js @@ -1,38 +1,23 @@ const Partners = { slug: "our-partners", imageURL: "/images/cms/blocks/partners.png", - imageAltText: "Our Partners", + imageAltText: "Our partners.", labels: { singular: { en: "Partners", - fr: "Partenaires", - pt: "Parceiros", }, plural: { en: "Partners", - fr: "Partenaires", - pt: "Parceiros", }, }, fields: [ { name: "title", - label: { - en: "Title", - fr: "Titre", - pt: "Título", - }, type: "text", - localized: true, required: true, }, { name: "partners", - label: { - en: "Partners", - fr: "Les partenaires", - pt: "Parceiros", - }, type: "relationship", relationTo: "partners", hasMany: true, diff --git a/apps/codeforafrica/src/payload/blocks/OurTeam.js b/apps/codeforafrica/src/payload/blocks/OurTeam.js index d89171708..52bd03989 100644 --- a/apps/codeforafrica/src/payload/blocks/OurTeam.js +++ b/apps/codeforafrica/src/payload/blocks/OurTeam.js @@ -1,7 +1,7 @@ const OurTeam = { slug: "our-team", imageURL: "/images/cms/blocks/team.png", - imageAltText: "Our Team", + imageAltText: "Our team.", labels: { singular: { en: "Team", @@ -13,11 +13,7 @@ const OurTeam = { fields: [ { name: "title", - label: { - en: "Title", - }, type: "text", - localized: true, required: true, }, { @@ -40,7 +36,6 @@ const OurTeam = { }, { name: "labels", - label: "Labels", type: "group", admin: { description: "Labels/Titles to be used in member view page", @@ -48,9 +43,8 @@ const OurTeam = { fields: [ { name: "projects", - label: "Projects", - required: true, type: "text", + required: true, defaultValue: "Projects", }, ], diff --git a/apps/codeforafrica/src/payload/blocks/OurWork.js b/apps/codeforafrica/src/payload/blocks/OurWork.js index 75468cc45..b9452f593 100644 --- a/apps/codeforafrica/src/payload/blocks/OurWork.js +++ b/apps/codeforafrica/src/payload/blocks/OurWork.js @@ -1,7 +1,7 @@ const OurWork = { slug: "our-work", imageURL: "/images/cms/blocks/projects.png", - imageAltText: "Our Work", + imageAltText: "Our work.", labels: { singular: { en: "Our Work", @@ -13,56 +13,47 @@ const OurWork = { fields: [ { name: "title", - label: { - en: "Title", - }, type: "text", + required: true, }, { name: "labels", - label: "Labels", type: "group", fields: [ { name: "description", - label: "Description", - required: true, type: "text", + required: true, defaultValue: "Description", }, { name: "details", - label: "Details", - required: true, type: "text", + required: true, defaultValue: "Details", }, { name: "team", - label: "Team", - required: true, type: "text", + required: true, defaultValue: "Team", }, { name: "projects", - label: "Projects", - required: true, type: "text", + required: true, defaultValue: "Explore other Projects", }, { name: "partners", - label: "Partners", - required: true, type: "text", + required: true, defaultValue: "Partners", }, { name: "donors", - label: "Donors", - required: true, type: "text", + required: true, defaultValue: "Donors", }, ], diff --git a/apps/codeforafrica/src/payload/blocks/PageHeader.js b/apps/codeforafrica/src/payload/blocks/PageHeader.js index 57b3e3b36..37d810022 100644 --- a/apps/codeforafrica/src/payload/blocks/PageHeader.js +++ b/apps/codeforafrica/src/payload/blocks/PageHeader.js @@ -1,16 +1,15 @@ const PageHeader = { slug: "page-header", imageURL: "/images/cms/blocks/page_header.jpg", + imageAltText: "Header for content pages such as contact page.", fields: [ { name: "title", - label: "Title", required: true, type: "text", }, { name: "subtitle", - label: "Subtitle", required: true, type: "text", }, diff --git a/apps/codeforafrica/src/payload/blocks/Posts.js b/apps/codeforafrica/src/payload/blocks/Posts.js index 9c571c857..f8a109806 100644 --- a/apps/codeforafrica/src/payload/blocks/Posts.js +++ b/apps/codeforafrica/src/payload/blocks/Posts.js @@ -26,14 +26,13 @@ const Posts = { { name: "primaryTag", label: "Post Type", - required: true, type: "select", - options: primaryTags, hasMany: false, + options: primaryTags, + required: true, }, { name: "stories", - label: "Stories", type: "group", fields: [ { @@ -44,9 +43,8 @@ const Posts = { }, { name: "title", - label: "Title", - required: true, type: "text", + required: true, defaultValue: "Stories", }, ], @@ -56,21 +54,18 @@ const Posts = { }, { name: "labels", - label: "Labels", type: "group", fields: [ { name: "search", - label: "Search", - required: true, type: "text", + required: true, defaultValue: "Search Posts", }, { name: "readMore", - label: "Read More", - required: true, type: "text", + required: true, defaultValue: "Read More", }, ], diff --git a/apps/codeforafrica/src/payload/blocks/RichText.js b/apps/codeforafrica/src/payload/blocks/RichText.js index ae19f33fc..7e5a3e2eb 100644 --- a/apps/codeforafrica/src/payload/blocks/RichText.js +++ b/apps/codeforafrica/src/payload/blocks/RichText.js @@ -9,6 +9,7 @@ const RichText = { fields: [ richText({ name: "content", + required: true, admin: { elements: [ "h1", From b9e407d15d2acfc7c6ea09ed5e5bd384f3566d33 Mon Sep 17 00:00:00 2001 From: kilemensi Date: Tue, 3 Oct 2023 16:35:45 +0300 Subject: [PATCH 09/17] Localise collections --- .../src/payload/collections/Authors.js | 5 +- .../src/payload/collections/Donors.js | 5 +- .../payload/collections/GuidingPrinciples.js | 9 ++-- .../src/payload/collections/Impact.js | 10 ++-- .../src/payload/collections/Members.js | 20 ++----- .../src/payload/collections/Pages.js | 10 ++-- .../src/payload/collections/Partners.js | 13 ++--- .../src/payload/collections/Posts.js | 27 ++++++---- .../src/payload/collections/Projects.js | 52 ++++++++----------- .../src/payload/collections/Tags.js | 5 +- .../src/payload/collections/Teams.js | 3 +- 11 files changed, 67 insertions(+), 92 deletions(-) diff --git a/apps/codeforafrica/src/payload/collections/Authors.js b/apps/codeforafrica/src/payload/collections/Authors.js index a2c9d8d50..6b5a84e13 100644 --- a/apps/codeforafrica/src/payload/collections/Authors.js +++ b/apps/codeforafrica/src/payload/collections/Authors.js @@ -13,14 +13,13 @@ const Authors = { { name: "fullName", type: "text", - label: "Full Name", - localized: false, required: true, + localized: true, }, { name: "bio", type: "textarea", - label: "Bio", + localized: true, }, ], }; diff --git a/apps/codeforafrica/src/payload/collections/Donors.js b/apps/codeforafrica/src/payload/collections/Donors.js index b73045427..0a9c8df5a 100644 --- a/apps/codeforafrica/src/payload/collections/Donors.js +++ b/apps/codeforafrica/src/payload/collections/Donors.js @@ -20,17 +20,16 @@ const Donors = { fields: [ { name: "name", - label: { - en: "Name", - }, type: "text", required: true, + localized: true, }, slug({ fieldToUse: "name" }), image({ overrides: { name: "logo", required: true, + localized: true, }, }), ], diff --git a/apps/codeforafrica/src/payload/collections/GuidingPrinciples.js b/apps/codeforafrica/src/payload/collections/GuidingPrinciples.js index 790b29c92..8cd6f9d77 100644 --- a/apps/codeforafrica/src/payload/collections/GuidingPrinciples.js +++ b/apps/codeforafrica/src/payload/collections/GuidingPrinciples.js @@ -13,25 +13,22 @@ const GuidingPrinciples = { fields: [ { name: "title", - label: { - en: "Title", - }, type: "text", required: true, + localized: true, }, slug({ fieldToUse: "title" }), image({ overrides: { name: "icon", required: true, + localized: true, }, }), richText({ name: "description", - label: { - en: "Description", - }, required: true, + localized: true, }), ], }; diff --git a/apps/codeforafrica/src/payload/collections/Impact.js b/apps/codeforafrica/src/payload/collections/Impact.js index 7788337bc..cfe1980df 100644 --- a/apps/codeforafrica/src/payload/collections/Impact.js +++ b/apps/codeforafrica/src/payload/collections/Impact.js @@ -15,25 +15,27 @@ const Impact = { fields: [ { name: "title", - label: "Title", type: "text", required: true, + localized: true, }, richText({ name: "description", + required: true, + localized: true, }), { name: "value", - label: "Value", type: "number", - required: true, min: 1, + required: true, + localized: true, }, image({ overrides: { name: "icon", - label: "Icon", required: true, + localized: true, }, }), ], diff --git a/apps/codeforafrica/src/payload/collections/Members.js b/apps/codeforafrica/src/payload/collections/Members.js index ee35f6168..dc3f1a17c 100644 --- a/apps/codeforafrica/src/payload/collections/Members.js +++ b/apps/codeforafrica/src/payload/collections/Members.js @@ -29,47 +29,35 @@ const Members = { }), { name: "name", - label: { - en: "Name", - }, type: "text", required: true, + localized: true, }, { name: "title", - label: { - en: "Title", - }, type: "text", required: true, + localized: true, }, slug({ fieldToUse: "name" }), { name: "country", - label: { en: "country" }, type: "select", options: allCountries, }, richText({ name: "description", - label: { - en: "Description", - fr: "La description", - pt: "Descrição", - }, - localized: true, required: true, + localized: true, }), socialLinks({ name: "connect", label: "Social Media Links", required: false, + localized: true, }), { name: "team", - label: { - en: "Team", - }, type: "relationship", relationTo: "teams", required: true, diff --git a/apps/codeforafrica/src/payload/collections/Pages.js b/apps/codeforafrica/src/payload/collections/Pages.js index 5292162f0..dce507c63 100644 --- a/apps/codeforafrica/src/payload/collections/Pages.js +++ b/apps/codeforafrica/src/payload/collections/Pages.js @@ -25,9 +25,6 @@ const Pages = { create: () => true, update: () => true, }, - versions: { - drafts: true, - }, admin: { defaultColumns: ["fullTitle", "updatedAt"], group: "Publication", @@ -39,8 +36,9 @@ const Pages = { name: "title", type: "text", required: true, + localized: true, }, - fullTitle(), + fullTitle({ overrides: { localized: true } }), slug(), { name: "blocks", @@ -67,11 +65,15 @@ const Pages = { OurTeam, OurWork, ], + localized: true, admin: { initCollapsed: true, }, }, ], + versions: { + drafts: true, + }, }; export default Pages; diff --git a/apps/codeforafrica/src/payload/collections/Partners.js b/apps/codeforafrica/src/payload/collections/Partners.js index 03a704cb2..75db5e6b5 100644 --- a/apps/codeforafrica/src/payload/collections/Partners.js +++ b/apps/codeforafrica/src/payload/collections/Partners.js @@ -9,13 +9,9 @@ const Partners = { labels: { singular: { en: "Partner", - fr: "Partenaire", - pt: "Parceiro", }, plural: { en: "Partners", - fr: "Partenaires", - pt: "Parceiros", }, }, admin: { @@ -45,22 +41,19 @@ const Partners = { overrides: { name: "logo", required: true, + localized: true, }, }), richText({ name: "description", - label: { - en: "Description", - fr: "La description", - pt: "Descrição", - }, - localized: true, required: true, + localized: true, }), socialLinks({ name: "connect", label: "Social Media Links", required: false, + localized: true, }), ], hooks: { diff --git a/apps/codeforafrica/src/payload/collections/Posts.js b/apps/codeforafrica/src/payload/collections/Posts.js index b4f665ad0..154b7803d 100644 --- a/apps/codeforafrica/src/payload/collections/Posts.js +++ b/apps/codeforafrica/src/payload/collections/Posts.js @@ -8,15 +8,16 @@ import tags from "../fields/tags"; const Posts = { slug: "posts", labels: { - singular: "Post", - plural: "Posts", + singular: { + en: "Post", + }, + plural: { + en: "Posts", + }, }, access: { read: () => true, }, - versions: { - drafts: true, - }, admin: { defaultColumns: ["title", "authors", "publishedOn"], description: "Stories and Opportunities", @@ -27,35 +28,39 @@ const Posts = { { name: "title", type: "text", - label: "Title", required: true, + localized: true, }, image({ overrides: { name: "coverImage", - label: "Cover Image", + required: true, + localized: true, }, }), - content(), + content({ minRows: 1, required: true, localized: true }), slug(), - publishedOn(), + publishedOn({ localized: true }), tags({ admin: { isSortable: true, position: "sidebar", }, }), - authors(), + authors({ localized: true }), { name: "excerpt", - label: "Excerpt", type: "textarea", required: true, + localized: true, admin: { position: "sidebar", }, }, ], + versions: { + drafts: true, + }, }; export default Posts; diff --git a/apps/codeforafrica/src/payload/collections/Projects.js b/apps/codeforafrica/src/payload/collections/Projects.js index 4de1989f4..534914759 100644 --- a/apps/codeforafrica/src/payload/collections/Projects.js +++ b/apps/codeforafrica/src/payload/collections/Projects.js @@ -18,34 +18,32 @@ const Projects = { fields: [ { name: "name", - label: { - en: "Name", - }, type: "text", required: true, + localized: true, }, image({ overrides: { - label: { - en: "Icon", - }, name: "icon", required: true, + localized: true, }, }), richText({ name: "title", - label: { en: "Title" }, + required: true, + localized: true, }), richText({ name: "subtitle", + required: true, + localized: true, }), { name: "tagLine", - label: { - en: "Tagline", - }, type: "text", + required: true, + localized: true, }, tags({ name: "tag", @@ -54,28 +52,23 @@ const Projects = { position: "sidebar", }, }), - linkGroup({ overrides: { name: "externalLink", label: "Link" } }), + linkGroup({ + overrides: { name: "externalLink", label: "Link", localized: true }, + }), image({ overrides: { - label: { - en: "Thumbnail", - }, name: "thumbnail", required: true, + localized: true, }, }), { name: "badges", type: "array", - label: { - en: "Badges", - }, + localized: true, fields: [ { name: "name", - label: { - en: "Name", - }, type: "text", required: true, }, @@ -94,13 +87,14 @@ const Projects = { }, richText({ name: "description", + required: true, + localized: true, }), linkArray({ overrides: { fields: [ { name: "type", - label: { en: "Type" }, type: "select", options: [ { @@ -120,34 +114,32 @@ const Projects = { disableOpenInNewTab: true, }), ], + localized: true, }, }), { name: "partners", - required: true, type: "relationship", relationTo: "partners", hasMany: true, + required: true, + localized: true, }, { name: "donors", - required: true, - label: { - en: "Donors", - }, type: "relationship", relationTo: "donors", hasMany: true, + required: true, + localized: true, }, { name: "team", - label: { - en: "Team", - }, - required: true, type: "relationship", relationTo: "members", hasMany: true, + required: true, + localized: true, }, slug({ fieldToUse: "name" }), ], diff --git a/apps/codeforafrica/src/payload/collections/Tags.js b/apps/codeforafrica/src/payload/collections/Tags.js index d132ec2a0..46c6deb60 100644 --- a/apps/codeforafrica/src/payload/collections/Tags.js +++ b/apps/codeforafrica/src/payload/collections/Tags.js @@ -14,11 +14,10 @@ const Tags = { fields: [ { name: "name", - label: "Name", type: "text", - localized: true, - required: true, unique: true, + required: true, + localized: true, }, slug({ fieldToUse: "name" }), ], diff --git a/apps/codeforafrica/src/payload/collections/Teams.js b/apps/codeforafrica/src/payload/collections/Teams.js index 540edff0e..96f1527a0 100644 --- a/apps/codeforafrica/src/payload/collections/Teams.js +++ b/apps/codeforafrica/src/payload/collections/Teams.js @@ -14,11 +14,10 @@ const Teams = { fields: [ { name: "name", - label: "Name", type: "text", + unique: true, localized: true, required: true, - unique: true, }, slug({ fieldToUse: "name" }), ], From 4909a3af65a0813b5c70ca3d2c3853876a76768a Mon Sep 17 00:00:00 2001 From: kilemensi Date: Tue, 3 Oct 2023 16:41:03 +0300 Subject: [PATCH 10/17] Localise globals --- .../payload/globals/Settings/EngagementTab.js | 5 ++-- .../payload/globals/Settings/GeneralTab.js | 7 +++--- .../payload/globals/Settings/NavigationTab.js | 23 +++++++++++-------- .../src/payload/globals/Settings/index.js | 1 - 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/apps/codeforafrica/src/payload/globals/Settings/EngagementTab.js b/apps/codeforafrica/src/payload/globals/Settings/EngagementTab.js index 169af1404..d7dc53f33 100644 --- a/apps/codeforafrica/src/payload/globals/Settings/EngagementTab.js +++ b/apps/codeforafrica/src/payload/globals/Settings/EngagementTab.js @@ -7,6 +7,7 @@ const EngagementTab = { name: "connect", type: "group", label: "Social Accounts", + localized: true, fields: [ { type: "collapsible", @@ -15,7 +16,6 @@ const EngagementTab = { { name: "title", type: "text", - label: "Title", admin: { description: "Text that appears on contact links e.g Stay in Touch", @@ -31,6 +31,7 @@ const EngagementTab = { name: "newsletter", type: "group", label: "Email Newsletter", + localized: true, fields: [ { type: "collapsible", @@ -39,13 +40,11 @@ const EngagementTab = { { name: "title", type: "text", - label: "Title", required: true, }, { name: "embedCode", type: "code", - label: "Embed Code", required: true, admin: { language: "html", diff --git a/apps/codeforafrica/src/payload/globals/Settings/GeneralTab.js b/apps/codeforafrica/src/payload/globals/Settings/GeneralTab.js index e14c4b83c..a1fa6fb64 100644 --- a/apps/codeforafrica/src/payload/globals/Settings/GeneralTab.js +++ b/apps/codeforafrica/src/payload/globals/Settings/GeneralTab.js @@ -12,11 +12,12 @@ const GeneralTab = { name: "title", type: "text", required: true, + localized: true, }, richText({ name: "description", - label: "Description", required: true, + localized: true, }), ], }, @@ -27,8 +28,8 @@ const GeneralTab = { image({ overrides: { name: "primaryLogo", - label: "Primary Logo", required: true, + localized: true, admin: { description: "Shown on main navigation bar.", }, @@ -37,7 +38,7 @@ const GeneralTab = { image({ overrides: { name: "secondaryLogo", - label: "Secondary Logo", + localized: true, admin: { description: "Shown on main footer. If not provided, primary logo will be reused.", diff --git a/apps/codeforafrica/src/payload/globals/Settings/NavigationTab.js b/apps/codeforafrica/src/payload/globals/Settings/NavigationTab.js index 81af9ca2c..6c2a3cf8b 100644 --- a/apps/codeforafrica/src/payload/globals/Settings/NavigationTab.js +++ b/apps/codeforafrica/src/payload/globals/Settings/NavigationTab.js @@ -12,7 +12,7 @@ const NavigationTab = { { name: "primaryNavigation", type: "group", - label: "Primary Navigation", + localized: true, fields: [ { type: "collapsible", @@ -21,10 +21,13 @@ const NavigationTab = { linkArray({ overrides: { name: "menus", - label: "Menus", labels: { - singular: "Menu", - plural: "Menus", + singular: { + en: "Menu", + }, + plural: { + en: "Menus", + }, }, fields: [linkField], admin: { @@ -35,7 +38,6 @@ const NavigationTab = { { name: "connect", type: "select", - label: "Connect", options: socialMediaOptions, }, ], @@ -45,7 +47,7 @@ const NavigationTab = { { name: "secondaryNavigation", type: "group", - label: "Secondary Navigation", + localized: true, fields: [ { type: "collapsible", @@ -54,10 +56,13 @@ const NavigationTab = { linkArray({ overrides: { name: "menus", - label: "Menus", labels: { - singular: "Menu", - plural: "Menus", + singular: { + en: "Menu", + }, + plural: { + en: "Menus", + }, }, fields: [linkField], admin: { diff --git a/apps/codeforafrica/src/payload/globals/Settings/index.js b/apps/codeforafrica/src/payload/globals/Settings/index.js index 0e7c7314d..1680b1186 100644 --- a/apps/codeforafrica/src/payload/globals/Settings/index.js +++ b/apps/codeforafrica/src/payload/globals/Settings/index.js @@ -10,7 +10,6 @@ const Settings = { admin: { group: "Website", }, - label: "Settings", fields: [ { type: "tabs", From 98db9e8363c8a1696cef8c53cdebf587091b9993 Mon Sep 17 00:00:00 2001 From: kilemensi Date: Tue, 3 Oct 2023 16:48:20 +0300 Subject: [PATCH 11/17] Disable telemetry in production --- apps/codeforafrica/package.json | 2 +- apps/codeforafrica/payload.config.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/codeforafrica/package.json b/apps/codeforafrica/package.json index 39a502301..3f3a101f2 100644 --- a/apps/codeforafrica/package.json +++ b/apps/codeforafrica/package.json @@ -23,7 +23,7 @@ "scripts": { "cms": "netlify-cms-proxy-server", "build-server": "tsc --project tsconfig.server.json", - "build-next": "NEXT_BUILD=true pnpm pnpm build-server && NEXT_BUILD=true PAYLOAD_CONFIG_PATH=dist/payload.config.js node dist/server.js", + "build-next": "NEXT_BUILD=true pnpm pnpm build-server && NEXT_BUILD=true PAYLOAD_CONFIG_PATH=${PAYLOAD_CONFIG_PATH:-dist/payload.config.js} node dist/server.js", "build-payload": "payload build", "start": "PAYLOAD_CONFIG_PATH=${PAYLOAD_CONFIG_PATH:-dist/payload.config.js} NODE_ENV=${NODE_ENV:-production} node dist/server.js", "dev": "NODE_OPTIONS='--inspect' ts-node --project tsconfig.server.json server.ts", diff --git a/apps/codeforafrica/payload.config.ts b/apps/codeforafrica/payload.config.ts index ebb843d9d..83c3e6173 100644 --- a/apps/codeforafrica/payload.config.ts +++ b/apps/codeforafrica/payload.config.ts @@ -123,4 +123,5 @@ export default buildConfig({ docs.reduce((url, doc) => `${url}/${doc.slug}`, ""), }), ] as any[], + telemetry: process?.env?.NODE_ENV !== "production", }); From c92140a1159669fd56d44fc908dea6ff3ceadfef Mon Sep 17 00:00:00 2001 From: kilemensi Date: Tue, 3 Oct 2023 17:11:50 +0300 Subject: [PATCH 12/17] Format & lint --- apps/codeforafrica/.eslintignore | 3 +++ apps/codeforafrica/server.ts | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/codeforafrica/.eslintignore b/apps/codeforafrica/.eslintignore index 63daf1ddf..c1d6df702 100644 --- a/apps/codeforafrica/.eslintignore +++ b/apps/codeforafrica/.eslintignore @@ -4,6 +4,9 @@ node_modules .pnp.js .pnpm-debug.log +# typescript +dist/ + # testing coverage diff --git a/apps/codeforafrica/server.ts b/apps/codeforafrica/server.ts index ae700638e..9145d9313 100644 --- a/apps/codeforafrica/server.ts +++ b/apps/codeforafrica/server.ts @@ -57,7 +57,8 @@ const start = async (): Promise => { "pnpm", ["next", "build", path.resolve(projectDir)], { - shell: true, stdio: "inherit", + shell: true, + stdio: "inherit", }, ); nextBuild.on("close", (code) => { From 41e01de5c765f26084877d9eac1108e1be3cb419 Mon Sep 17 00:00:00 2001 From: kilemensi Date: Tue, 3 Oct 2023 17:13:26 +0300 Subject: [PATCH 13/17] Fix eslintignore --- apps/codeforafrica/.eslintignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/codeforafrica/.eslintignore b/apps/codeforafrica/.eslintignore index c1d6df702..19d6cb9ac 100644 --- a/apps/codeforafrica/.eslintignore +++ b/apps/codeforafrica/.eslintignore @@ -13,7 +13,9 @@ coverage # next.js .next/ out/ -build + +# payload +build/ # misc .DS_Store From 5186d0503f95017acc6274ce1d36745bf7a3fbbd Mon Sep 17 00:00:00 2001 From: kilemensi Date: Wed, 4 Oct 2023 09:47:14 +0300 Subject: [PATCH 14/17] Enable draft mode --- .../src/pages/api/v1/draft/disable-draft.js | 5 +++++ .../src/pages/api/v1/draft/index.page.js | 20 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 apps/codeforafrica/src/pages/api/v1/draft/disable-draft.js create mode 100644 apps/codeforafrica/src/pages/api/v1/draft/index.page.js diff --git a/apps/codeforafrica/src/pages/api/v1/draft/disable-draft.js b/apps/codeforafrica/src/pages/api/v1/draft/disable-draft.js new file mode 100644 index 000000000..39febffb5 --- /dev/null +++ b/apps/codeforafrica/src/pages/api/v1/draft/disable-draft.js @@ -0,0 +1,5 @@ +// By default, the Draft Mode session ends when the browser is closed. +// This method clears it manually / on demand. +export default function handler(req, res) { + res.setDraftMode({ enable: false }); +} diff --git a/apps/codeforafrica/src/pages/api/v1/draft/index.page.js b/apps/codeforafrica/src/pages/api/v1/draft/index.page.js new file mode 100644 index 000000000..1c8385e03 --- /dev/null +++ b/apps/codeforafrica/src/pages/api/v1/draft/index.page.js @@ -0,0 +1,20 @@ +export default async function handler(req, res) { + // Since payload and Next.js are running on the same server process, lets + // make sure the user requesting to preview, is logged into Payload + // See "Tip" on: https://payloadcms.com/docs/authentication/overview#token-based-auth + if (!req.user) { + return res.status(401).json({ message: "UNAUTHORIZED_USER" }); + } + const { slug } = req.query; + res.setDraftMode({ enable: true }); + + // Guard against open redirect vulnerabilities + // Since slug will be a path, redirect to pathname instead of original slug + // just in case + const appUrl = new URL(process.env.NEXT_PUBLIC_APP_URL); + const requestedUrl = new URL(slug, appUrl); + if (requestedUrl.origin !== appUrl.origin) { + return res.status(401).json({ message: "UNAUTHORIZED_REDIRECT" }); + } + return res.redirect(requestedUrl.pathname); +} From 91e3a9eed74eb7d6f58d1cd7239c0f97100b5d6c Mon Sep 17 00:00:00 2001 From: kilemensi Date: Wed, 4 Oct 2023 10:32:49 +0300 Subject: [PATCH 15/17] Move disable-draft outside /draft --- .../api/v1/{draft/disable-draft.js => disable-draft.page.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/codeforafrica/src/pages/api/v1/{draft/disable-draft.js => disable-draft.page.js} (100%) diff --git a/apps/codeforafrica/src/pages/api/v1/draft/disable-draft.js b/apps/codeforafrica/src/pages/api/v1/disable-draft.page.js similarity index 100% rename from apps/codeforafrica/src/pages/api/v1/draft/disable-draft.js rename to apps/codeforafrica/src/pages/api/v1/disable-draft.page.js From 6783676785229949c041355282dde1f3e25ed41e Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Wed, 4 Oct 2023 15:31:56 +0300 Subject: [PATCH 16/17] Fix default value type --- apps/codeforafrica/src/payload/collections/Users.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/codeforafrica/src/payload/collections/Users.js b/apps/codeforafrica/src/payload/collections/Users.js index 8d1c0fd0f..60ff6a8e9 100644 --- a/apps/codeforafrica/src/payload/collections/Users.js +++ b/apps/codeforafrica/src/payload/collections/Users.js @@ -44,7 +44,7 @@ const Users = { // Save this field to JWT so we can use from `req.user` saveToJWT: true, required: true, - defaultValue: [ROLE_DEFAULT], + defaultValue: ROLE_DEFAULT, access: { read: isAdminOrSelfFieldLevel, create: isAdminFieldLevel, From 4d738a8a8e607cf474c2a1728e4b903d2b833712 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Wed, 4 Oct 2023 15:47:54 +0300 Subject: [PATCH 17/17] Revert to hasMany --- apps/codeforafrica/src/payload/collections/Users.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/codeforafrica/src/payload/collections/Users.js b/apps/codeforafrica/src/payload/collections/Users.js index 60ff6a8e9..814d37b80 100644 --- a/apps/codeforafrica/src/payload/collections/Users.js +++ b/apps/codeforafrica/src/payload/collections/Users.js @@ -44,7 +44,8 @@ const Users = { // Save this field to JWT so we can use from `req.user` saveToJWT: true, required: true, - defaultValue: ROLE_DEFAULT, + defaultValue: [ROLE_DEFAULT], + hasMany: true, access: { read: isAdminOrSelfFieldLevel, create: isAdminFieldLevel,