From 09c68de2a3ab77bf6a8feaa3c7ce52242c945e68 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 9 Jan 2024 14:27:50 +0300 Subject: [PATCH 01/43] Migrate payload version 2 --- apps/charterafrica/package.json | 8 +- apps/charterafrica/payload.config.ts | 24 +- apps/charterafrica/server.ts | 22 +- .../src/payload/fields/richText.js | 7 +- .../src/payload/globals/Helpdesk.js | 5 +- pnpm-lock.yaml | 2600 ++++++++++++++--- 6 files changed, 2273 insertions(+), 393 deletions(-) diff --git a/apps/charterafrica/package.json b/apps/charterafrica/package.json index 76aadd6c3..5dc6462d2 100644 --- a/apps/charterafrica/package.json +++ b/apps/charterafrica/package.json @@ -51,9 +51,12 @@ "@nivo/pie": "^0.84.0", "@nivo/tooltip": "^0.84.0", "@nivo/waffle": "^0.84.0", + "@payloadcms/bundler-webpack": "^1.0.5", + "@payloadcms/db-mongodb": "^1.2.0", "@payloadcms/plugin-cloud-storage": "^1.1.1", "@payloadcms/plugin-nested-docs": "^1.0.9", "@payloadcms/plugin-seo": "^1.0.15", + "@payloadcms/richtext-slate": "^1.3.1", "@react-spring/web": "^9.7.3", "@sentry/nextjs": "^7.86.0", "airtable": "^0.12.2", @@ -65,7 +68,7 @@ "next": "^14.0.4", "next-seo": "^6.4.0", "nodemailer-sendgrid": "^1.0.3", - "payload": "^1.15.8", + "payload": "^2.6.0", "prop-types": "^15.8.1", "qs": "^6.11.2", "react": "^18.2.0", @@ -74,7 +77,7 @@ "react-share": "^5.0.3", "react-swipeable-views-react-18-fix": "^0.14.1", "scheduler": "^0.23.0", - "sharp": "^0.33.0", + "sharp": "^0.33.1", "slate": "^0.101.1", "swr": "^2.2.4", "video.js": "^8.6.1", @@ -95,6 +98,7 @@ "babel-jest": "^29.7.0", "eslint": "^8.55.0", "eslint-config-commons-ui": "workspace:*", + "eslint-import-resolver-typescript": "^3.6.1", "eslint-import-resolver-webpack": "^0.13.8", "eslint-plugin-import": "^2.29.0", "identity-obj-proxy": "^3.0.0", diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index 40a600e9c..b53e39ef9 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -6,6 +6,9 @@ import nestedDocs from "@payloadcms/plugin-nested-docs"; import seo from "@payloadcms/plugin-seo"; import dotenv from "dotenv"; import { buildConfig } from "payload/config"; +import { slateEditor } from "@payloadcms/richtext-slate"; +import { mongooseAdapter } from "@payloadcms/db-mongodb"; +import { webpackBundler } from '@payloadcms/bundler-webpack' import Authors from "./src/payload/collections/Authors"; import CommunityPlatforms from "./src/payload/collections/CommunityPlatforms"; @@ -73,6 +76,11 @@ const adapter = s3Adapter({ export default buildConfig({ serverURL: appURL, + editor: slateEditor({}), + db: mongooseAdapter({ + url: process.env.MONGO_URL, + migrationDir: "./migrations/v2" + }), collections: [ Authors, CommunityPlatforms, @@ -103,13 +111,14 @@ export default buildConfig({ ] as GlobalConfig[], ...(locales?.length ? { - localization: { - locales, - defaultLocale, - fallback: true, - }, - } + localization: { + locales, + defaultLocale, + fallback: true, + }, + } : undefined), + admin: { webpack: (config) => ({ ...config, @@ -123,6 +132,7 @@ export default buildConfig({ }, }, }), + bundler: webpackBundler() }, cors, csrf, @@ -178,4 +188,4 @@ export default buildConfig({ docs.reduce((url, doc) => `${url}/${doc.slug}`, ""), }), ], -}); +} as any); diff --git a/apps/charterafrica/server.ts b/apps/charterafrica/server.ts index 714574bb4..7055beda2 100644 --- a/apps/charterafrica/server.ts +++ b/apps/charterafrica/server.ts @@ -7,6 +7,9 @@ import next from "next"; import nodemailerSendgrid from "nodemailer-sendgrid"; import payload from "payload"; import { Payload } from "payload/dist/payload"; +import dotenv from "dotenv"; + +dotenv.config({ path: path.resolve(__dirname, "./.env.local") }); const projectDir = process.cwd(); loadEnvConfig(projectDir); @@ -37,18 +40,17 @@ const start = async (): Promise => { localPayload = await payload.init({ ...(sendGridAPIKey ? { - email: { - transportOptions: nodemailerSendgrid({ - apiKey: sendGridAPIKey, - }), - fromName: process.env.SENDGRID_FROM_NAME || "Admin", - fromAddress: - process.env.SENDGRID_FROM_EMAIL || "admin@example.com", - }, - } + email: { + transportOptions: nodemailerSendgrid({ + apiKey: sendGridAPIKey, + }), + fromName: process.env.SENDGRID_FROM_NAME || "Admin", + fromAddress: + process.env.SENDGRID_FROM_EMAIL || "admin@example.com", + }, + } : undefined), secret: process.env.PAYLOAD_SECRET_KEY, - mongoURL: process.env.MONGO_URL, express: server, onInit: (initPayload) => { initPayload.logger.info( diff --git a/apps/charterafrica/src/payload/fields/richText.js b/apps/charterafrica/src/payload/fields/richText.js index e84a3fa92..f833e44bf 100644 --- a/apps/charterafrica/src/payload/fields/richText.js +++ b/apps/charterafrica/src/payload/fields/richText.js @@ -1,4 +1,5 @@ import { deepmerge } from "@mui/utils"; +import { slateEditor } from "@payloadcms/richtext-slate"; import mapLinkTypeToHref from "../utils/mapLinkTypeToHref"; @@ -43,12 +44,16 @@ async function mapLinkToHrefAfterRead({ req: { payload }, value }) { return insertHref(value, payload); } -function richText(overrides) { +function richText({ admin, ...overrides }) { + const editor = slateEditor({ + admin, + }); const richTextResult = { type: "richText", hooks: { afterRead: [mapLinkToHrefAfterRead], }, + editor, }; return deepmerge(richTextResult, overrides); diff --git a/apps/charterafrica/src/payload/globals/Helpdesk.js b/apps/charterafrica/src/payload/globals/Helpdesk.js index de47489f3..afa158713 100644 --- a/apps/charterafrica/src/payload/globals/Helpdesk.js +++ b/apps/charterafrica/src/payload/globals/Helpdesk.js @@ -1,4 +1,5 @@ import linkGroup from "../fields/linkGroup"; +import richText from "../fields/richText"; const Helpdesk = { slug: "helpdesk", @@ -30,7 +31,7 @@ const Helpdesk = { localized: true, required: true, }, - { + richText({ name: "description", label: { en: "Description", @@ -42,7 +43,7 @@ const Helpdesk = { admin: { elements: ["ol", "ul", "link"], }, - }, + }), linkGroup(), ], admin: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 84ee0698e..28a30ecc5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,9 +1,5 @@ lockfileVersion: "6.0" -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - overrides: sharp: ^0.33.0 @@ -91,15 +87,24 @@ importers: "@nivo/waffle": specifier: ^0.84.0 version: 0.84.0(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0) + "@payloadcms/bundler-webpack": + specifier: ^1.0.5 + version: 1.0.5(@swc/core@1.3.100)(payload@2.6.0) + "@payloadcms/db-mongodb": + specifier: ^1.2.0 + version: 1.2.0(payload@2.6.0) "@payloadcms/plugin-cloud-storage": specifier: ^1.1.1 - version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@1.15.8) + version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.6.0) "@payloadcms/plugin-nested-docs": specifier: ^1.0.9 version: 1.0.9 "@payloadcms/plugin-seo": specifier: ^1.0.15 - version: 1.0.15(payload@1.15.8)(react@18.2.0) + version: 1.0.15(payload@2.6.0)(react@18.2.0) + "@payloadcms/richtext-slate": + specifier: ^1.3.1 + version: 1.3.1(payload@2.6.0)(react-dom@18.2.0) "@react-spring/web": specifier: ^9.7.3 version: 9.7.3(react-dom@18.2.0)(react@18.2.0) @@ -134,8 +139,8 @@ importers: specifier: ^1.0.3 version: 1.0.3 payload: - specifier: ^1.15.8 - version: 1.15.8(@types/react@18.2.45)(typescript@5.3.3) + specifier: ^2.6.0 + version: 2.6.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) prop-types: specifier: ^15.8.1 version: 15.8.1 @@ -162,7 +167,7 @@ importers: version: 0.23.0 sharp: specifier: ^0.33.0 - version: 0.33.0 + version: 0.33.1 slate: specifier: ^0.101.1 version: 0.101.4 @@ -218,12 +223,15 @@ importers: eslint-config-commons-ui: specifier: workspace:* version: link:../../packages/eslint-config-commons-ui + eslint-import-resolver-typescript: + specifier: ^3.6.1 + version: 3.6.1(eslint-import-resolver-webpack@0.13.8)(eslint-plugin-import@2.29.0)(eslint@8.55.0) eslint-import-resolver-webpack: specifier: ^0.13.8 version: 0.13.8(eslint-plugin-import@2.29.0)(webpack@5.89.0) eslint-plugin-import: specifier: ^2.29.0 - version: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + version: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) identity-obj-proxy: specifier: ^3.0.0 version: 3.0.0 @@ -286,7 +294,7 @@ importers: version: 14.0.4 "@payloadcms/plugin-cloud-storage": specifier: ^1.1.1 - version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@1.15.8) + version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.6.0) "@payloadcms/plugin-nested-docs": specifier: ^1.0.9 version: 1.0.9 @@ -389,7 +397,7 @@ importers: version: 0.13.8(eslint-plugin-import@2.29.0)(webpack@5.89.0) eslint-plugin-import: specifier: ^2.29.0 - version: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + version: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) identity-obj-proxy: specifier: ^3.0.0 version: 3.0.0 @@ -507,7 +515,7 @@ importers: version: 0.13.8(eslint-plugin-import@2.29.0)(webpack@5.89.0) eslint-plugin-import: specifier: ^2.29.0 - version: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + version: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) prettier: specifier: ^3.1.1 version: 3.1.1 @@ -727,7 +735,7 @@ importers: version: 5.3.2(@babel/core@7.23.6)(babel-plugin-module-resolver@4.1.0) eslint-plugin-import: specifier: ^2.29.0 - version: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + version: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) eslint-plugin-module-resolver: specifier: ^1.5.0 version: 1.5.0 @@ -908,7 +916,7 @@ importers: version: 0.13.8(eslint-plugin-import@2.29.0)(webpack@5.89.0) eslint-plugin-import: specifier: ^2.29.0 - version: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + version: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) identity-obj-proxy: specifier: ^3.0.0 version: 3.0.0 @@ -932,7 +940,7 @@ importers: version: 5.3.3 webpack: specifier: ^5.89.0 - version: 5.89.0 + version: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) packages/commons-ui-core: dependencies: @@ -1002,7 +1010,7 @@ importers: version: 5.3.3 webpack: specifier: ^5.89.0 - version: 5.89.0 + version: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) packages/commons-ui-next: dependencies: @@ -1060,7 +1068,7 @@ importers: version: 5.3.3 webpack: specifier: ^5.89.0 - version: 5.89.0 + version: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) packages/commons-ui-testing-library: dependencies: @@ -1127,7 +1135,7 @@ importers: version: 5.3.3 webpack: specifier: ^5.89.0 - version: 5.89.0 + version: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) packages/eslint-config-commons-ui: dependencies: @@ -1154,7 +1162,7 @@ importers: version: 1.1.0 eslint-plugin-import: specifier: ^2.29.0 - version: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + version: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) eslint-plugin-jest: specifier: ^27.6.0 version: 27.6.0(eslint@8.55.0)(typescript@5.3.3) @@ -4328,6 +4336,20 @@ packages: "@csstools/css-tokenizer": 2.2.1 dev: false + /@csstools/postcss-cascade-layers@4.0.1(postcss@8.4.31): + resolution: + { + integrity: sha512-UYFuFL9GgVnftg9v7tBvVEBRLaBeAD66euD+yYy5fYCUld9ZIWTJNCE30hm6STMEdt6FL5xzeVw1lAZ1tpvUEg==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/selector-specificity": 3.0.0(postcss-selector-parser@6.0.13) + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + /@csstools/postcss-cascade-layers@4.0.1(postcss@8.4.32): resolution: { @@ -4342,6 +4364,22 @@ packages: postcss-selector-parser: 6.0.13 dev: false + /@csstools/postcss-color-function@2.2.3(postcss@8.4.31): + resolution: + { + integrity: sha512-b1ptNkr1UWP96EEHqKBWWaV5m/0hgYGctgA/RVZhONeP1L3T/8hwoqDm9bB23yVCfOgE9U93KI9j06+pEkJTvw==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/css-color-parser": 1.4.0(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + "@csstools/postcss-progressive-custom-properties": 2.3.0(postcss@8.4.31) + postcss: 8.4.31 + dev: false + /@csstools/postcss-color-function@3.0.7(postcss@8.4.32): resolution: { @@ -4358,6 +4396,22 @@ packages: postcss: 8.4.32 dev: false + /@csstools/postcss-color-mix-function@1.0.3(postcss@8.4.31): + resolution: + { + integrity: sha512-QGXjGugTluqFZWzVf+S3wCiRiI0ukXlYqCi7OnpDotP/zaVTyl/aqZujLFzTOXy24BoWnu89frGMc79ohY5eog==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/css-color-parser": 1.4.0(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + "@csstools/postcss-progressive-custom-properties": 2.3.0(postcss@8.4.31) + postcss: 8.4.31 + dev: false + /@csstools/postcss-color-mix-function@2.0.7(postcss@8.4.32): resolution: { @@ -4389,6 +4443,19 @@ packages: postcss: 8.4.32 dev: false + /@csstools/postcss-font-format-keywords@3.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-ntkGj+1uDa/u6lpjPxnkPcjJn7ChO/Kcy08YxctOZI7vwtrdYvFhmE476dq8bj1yna306+jQ9gzXIG/SWfOaRg==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + /@csstools/postcss-font-format-keywords@3.0.0(postcss@8.4.32): resolution: { @@ -4417,6 +4484,22 @@ packages: postcss: 8.4.32 dev: false + /@csstools/postcss-gradients-interpolation-method@4.0.7(postcss@8.4.31): + resolution: + { + integrity: sha512-GT1CzE/Tyr/ei4j5BwKESkHAgg+Gzys/0mAY7W+UiR+XrcYk5hDbOrE/YJIx1rflfO/7La1bDoZtA0YnLl4qNA==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/css-color-parser": 1.4.0(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + "@csstools/postcss-progressive-custom-properties": 3.0.2(postcss@8.4.31) + postcss: 8.4.31 + dev: false + /@csstools/postcss-gradients-interpolation-method@4.0.7(postcss@8.4.32): resolution: { @@ -4433,6 +4516,21 @@ packages: postcss: 8.4.32 dev: false + /@csstools/postcss-hwb-function@3.0.6(postcss@8.4.31): + resolution: + { + integrity: sha512-uQgWt2Ho2yy2S6qthWY7mD5v57NKxi6dD1NB8nAybU5bJSsm+hLXRGm3/zbOH4xNrqO3Cl60DFSNlSrUME3Xjg==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/css-color-parser": 1.4.0(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + postcss: 8.4.31 + dev: false + /@csstools/postcss-hwb-function@3.0.6(postcss@8.4.32): resolution: { @@ -4448,6 +4546,20 @@ packages: postcss: 8.4.32 dev: false + /@csstools/postcss-ic-unit@3.0.2(postcss@8.4.31): + resolution: + { + integrity: sha512-n28Er7W9qc48zNjJnvTKuVHY26/+6YlA9WzJRksIHiAWOMxSH5IksXkw7FpkIOd+jLi59BMrX/BWrZMgjkLBHg==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/postcss-progressive-custom-properties": 3.0.2(postcss@8.4.31) + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + /@csstools/postcss-ic-unit@3.0.2(postcss@8.4.32): resolution: { @@ -4474,6 +4586,20 @@ packages: postcss: 8.4.32 dev: false + /@csstools/postcss-is-pseudo-class@4.0.3(postcss@8.4.31): + resolution: + { + integrity: sha512-/dt5M9Ty/x3Yiq0Nm/5PJJzwkVFchJgdjKVnryBPtoMCb9ohb/nDIJOwr/Wr3hK3FDs1EA1GE6PyRYsUmQPS8Q==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/selector-specificity": 3.0.0(postcss-selector-parser@6.0.13) + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + /@csstools/postcss-is-pseudo-class@4.0.3(postcss@8.4.32): resolution: { @@ -4488,6 +4614,18 @@ packages: postcss-selector-parser: 6.0.13 dev: false + /@csstools/postcss-logical-float-and-clear@2.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-Wki4vxsF6icRvRz8eF9bPpAvwaAt0RHwhVOyzfoFg52XiIMjb6jcbHkGxwpJXP4DVrnFEwpwmrz5aTRqOW82kg==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + dev: false + /@csstools/postcss-logical-float-and-clear@2.0.0(postcss@8.4.32): resolution: { @@ -4524,6 +4662,19 @@ packages: postcss: 8.4.32 dev: false + /@csstools/postcss-logical-resize@2.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-lCQ1aX8c5+WI4t5EoYf3alTzJNNocMqTb+u1J9CINdDhFh1fjovqK+0aHalUHsNstZmzFPNzIkU4Mb3eM9U8SA==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + /@csstools/postcss-logical-resize@2.0.0(postcss@8.4.32): resolution: { @@ -4537,6 +4688,19 @@ packages: postcss-value-parser: 4.2.0 dev: false + /@csstools/postcss-logical-viewport-units@2.0.3(postcss@8.4.31): + resolution: + { + integrity: sha512-xeVxqND5rlQyqLGdH7rX34sIm/JbbQKxpKQP8oD1YQqUHHCLQR9NUS57WqJKajxKN6AcNAMWJhb5LUH5RfPcyA==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/css-tokenizer": 2.2.1 + postcss: 8.4.31 + dev: false + /@csstools/postcss-logical-viewport-units@2.0.3(postcss@8.4.32): resolution: { @@ -4550,6 +4714,22 @@ packages: postcss: 8.4.32 dev: false + /@csstools/postcss-media-minmax@1.1.0(postcss@8.4.31): + resolution: + { + integrity: sha512-t5Li/DPC5QmW/6VFLfUvsw/4dNYYseWR0tOXDeJg/9EKUodBgNawz5tuk5vYKtNvoj+Q08odMuXcpS5YJj0AFA==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/css-calc": 1.1.4(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + "@csstools/media-query-list-parser": 2.1.5(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + postcss: 8.4.31 + dev: false + /@csstools/postcss-media-minmax@1.1.0(postcss@8.4.32): resolution: { @@ -4566,7 +4746,7 @@ packages: postcss: 8.4.32 dev: false - /@csstools/postcss-media-queries-aspect-ratio-number-values@2.0.3(postcss@8.4.32): + /@csstools/postcss-media-queries-aspect-ratio-number-values@2.0.3(postcss@8.4.31): resolution: { integrity: sha512-IPL8AvnwMYW+cWtp+j8cW3MFN0RyXNT4hLOvs6Rf2N+NcbvXhSyKxZuE3W9Cv4KjaNoNoGx1d0UhT6tktq6tUw==, @@ -4578,166 +4758,349 @@ packages: "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) "@csstools/css-tokenizer": 2.2.1 "@csstools/media-query-list-parser": 2.1.5(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) - postcss: 8.4.32 + postcss: 8.4.31 dev: false - /@csstools/postcss-nested-calc@3.0.0(postcss@8.4.32): + /@csstools/postcss-media-queries-aspect-ratio-number-values@2.0.3(postcss@8.4.32): resolution: { - integrity: sha512-HsB66aDWAouOwD/GcfDTS0a7wCuVWaTpXcjl5VKP0XvFxDiU+r0T8FG7xgb6ovZNZ+qzvGIwRM+CLHhDgXrYgQ==, + integrity: sha512-IPL8AvnwMYW+cWtp+j8cW3MFN0RyXNT4hLOvs6Rf2N+NcbvXhSyKxZuE3W9Cv4KjaNoNoGx1d0UhT6tktq6tUw==, } engines: { node: ^14 || ^16 || >=18 } peerDependencies: postcss: ^8.4 dependencies: + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + "@csstools/media-query-list-parser": 2.1.5(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) postcss: 8.4.32 - postcss-value-parser: 4.2.0 dev: false - /@csstools/postcss-normalize-display-values@3.0.1(postcss@8.4.32): + /@csstools/postcss-nested-calc@3.0.0(postcss@8.4.31): resolution: { - integrity: sha512-nUvRxI+ALJwkxZdPU4EDyuM380vP91sAGvI3jAOHs/sr3jfcCOzLkY6xKI1Mr526kZ3RivmMoYM/xq+XFyE/bw==, + integrity: sha512-HsB66aDWAouOwD/GcfDTS0a7wCuVWaTpXcjl5VKP0XvFxDiU+r0T8FG7xgb6ovZNZ+qzvGIwRM+CLHhDgXrYgQ==, } engines: { node: ^14 || ^16 || >=18 } peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.32 + postcss: 8.4.31 postcss-value-parser: 4.2.0 dev: false - /@csstools/postcss-oklab-function@3.0.7(postcss@8.4.32): + /@csstools/postcss-nested-calc@3.0.0(postcss@8.4.32): resolution: { - integrity: sha512-vBFTQD3CARB3u/XIGO44wWbcO7xG/4GsYqJlcPuUGRSK8mtxes6n4vvNFlIByyAZy2k4d4RY63nyvTbMpeNTaQ==, + integrity: sha512-HsB66aDWAouOwD/GcfDTS0a7wCuVWaTpXcjl5VKP0XvFxDiU+r0T8FG7xgb6ovZNZ+qzvGIwRM+CLHhDgXrYgQ==, } engines: { node: ^14 || ^16 || >=18 } peerDependencies: postcss: ^8.4 dependencies: - "@csstools/css-color-parser": 1.4.0(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) - "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) - "@csstools/css-tokenizer": 2.2.1 - "@csstools/postcss-progressive-custom-properties": 3.0.2(postcss@8.4.32) postcss: 8.4.32 + postcss-value-parser: 4.2.0 dev: false - /@csstools/postcss-progressive-custom-properties@3.0.2(postcss@8.4.32): + /@csstools/postcss-normalize-display-values@3.0.1(postcss@8.4.31): resolution: { - integrity: sha512-YEvTozk1SxnV/PGL5DllBVDuLQ+jiQhyCSQiZJ6CwBMU5JQ9hFde3i1qqzZHuclZfptjrU0JjlX4ePsOhxNzHw==, + integrity: sha512-nUvRxI+ALJwkxZdPU4EDyuM380vP91sAGvI3jAOHs/sr3jfcCOzLkY6xKI1Mr526kZ3RivmMoYM/xq+XFyE/bw==, } engines: { node: ^14 || ^16 || >=18 } peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.32 + postcss: 8.4.31 postcss-value-parser: 4.2.0 dev: false - /@csstools/postcss-relative-color-syntax@2.0.7(postcss@8.4.32): + /@csstools/postcss-normalize-display-values@3.0.1(postcss@8.4.32): resolution: { - integrity: sha512-2AiFbJSVF4EyymLxme4JzSrbXykHolx8DdZECHjYKMhoulhKLltx5ccYgtrK3BmXGd3v3nJrWFCc8JM8bjuiOg==, + integrity: sha512-nUvRxI+ALJwkxZdPU4EDyuM380vP91sAGvI3jAOHs/sr3jfcCOzLkY6xKI1Mr526kZ3RivmMoYM/xq+XFyE/bw==, } engines: { node: ^14 || ^16 || >=18 } peerDependencies: postcss: ^8.4 dependencies: - "@csstools/css-color-parser": 1.4.0(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) - "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) - "@csstools/css-tokenizer": 2.2.1 - "@csstools/postcss-progressive-custom-properties": 3.0.2(postcss@8.4.32) postcss: 8.4.32 + postcss-value-parser: 4.2.0 dev: false - /@csstools/postcss-scope-pseudo-class@3.0.0(postcss@8.4.32): + /@csstools/postcss-oklab-function@3.0.7(postcss@8.4.31): resolution: { - integrity: sha512-GFNVsD97OuEcfHmcT0/DAZWAvTM/FFBDQndIOLawNc1Wq8YqpZwBdHa063Lq+Irk7azygTT+Iinyg3Lt76p7rg==, + integrity: sha512-vBFTQD3CARB3u/XIGO44wWbcO7xG/4GsYqJlcPuUGRSK8mtxes6n4vvNFlIByyAZy2k4d4RY63nyvTbMpeNTaQ==, } engines: { node: ^14 || ^16 || >=18 } peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.32 - postcss-selector-parser: 6.0.13 + "@csstools/css-color-parser": 1.4.0(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + "@csstools/postcss-progressive-custom-properties": 3.0.2(postcss@8.4.31) + postcss: 8.4.31 dev: false - /@csstools/postcss-stepped-value-functions@3.0.2(postcss@8.4.32): + /@csstools/postcss-oklab-function@3.0.7(postcss@8.4.32): resolution: { - integrity: sha512-I3wX44MZVv+tDuWfrd3BTvRB/YRIM2F5v1MBtTI89sxpFn47mNpTwpPYUOGPVCgKlRDfZSlxIUYhUQmqRQZZFQ==, + integrity: sha512-vBFTQD3CARB3u/XIGO44wWbcO7xG/4GsYqJlcPuUGRSK8mtxes6n4vvNFlIByyAZy2k4d4RY63nyvTbMpeNTaQ==, } engines: { node: ^14 || ^16 || >=18 } peerDependencies: postcss: ^8.4 dependencies: - "@csstools/css-calc": 1.1.4(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-color-parser": 1.4.0(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) "@csstools/css-tokenizer": 2.2.1 + "@csstools/postcss-progressive-custom-properties": 3.0.2(postcss@8.4.32) postcss: 8.4.32 dev: false - /@csstools/postcss-text-decoration-shorthand@3.0.3(postcss@8.4.32): + /@csstools/postcss-progressive-custom-properties@2.3.0(postcss@8.4.31): resolution: { - integrity: sha512-d5J9m49HhqXRcw1S6vTZuviHi/iknUKGjBpChiNK1ARg9sSa3b8m5lsWz5Izs8ISORZdv2bZRwbw5Z2R6gQ9kQ==, + integrity: sha512-Zd8ojyMlsL919TBExQ1I0CTpBDdyCpH/yOdqatZpuC3sd22K4SwC7+Yez3Q/vmXMWSAl+shjNeFZ7JMyxMjK+Q==, } engines: { node: ^14 || ^16 || >=18 } peerDependencies: postcss: ^8.4 dependencies: - "@csstools/color-helpers": 3.0.2 - postcss: 8.4.32 + postcss: 8.4.31 postcss-value-parser: 4.2.0 dev: false - /@csstools/postcss-trigonometric-functions@3.0.2(postcss@8.4.32): + /@csstools/postcss-progressive-custom-properties@3.0.2(postcss@8.4.31): resolution: { - integrity: sha512-AwzNhF4QOKaLOKvMljwwFkeYXwufhRO15G+kKohHkyoNOL75xWkN+W2Y9ik9tSeAyDv+cYNlYaF+o/a79WjVjg==, + integrity: sha512-YEvTozk1SxnV/PGL5DllBVDuLQ+jiQhyCSQiZJ6CwBMU5JQ9hFde3i1qqzZHuclZfptjrU0JjlX4ePsOhxNzHw==, } engines: { node: ^14 || ^16 || >=18 } peerDependencies: postcss: ^8.4 dependencies: - "@csstools/css-calc": 1.1.4(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) - "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) - "@csstools/css-tokenizer": 2.2.1 - postcss: 8.4.32 + postcss: 8.4.31 + postcss-value-parser: 4.2.0 dev: false - /@csstools/postcss-unset-value@3.0.0(postcss@8.4.32): + /@csstools/postcss-progressive-custom-properties@3.0.2(postcss@8.4.32): resolution: { - integrity: sha512-P0JD1WHh3avVyKKRKjd0dZIjCEeaBer8t1BbwGMUDtSZaLhXlLNBqZ8KkqHzYWXOJgHleXAny2/sx8LYl6qhEA==, + integrity: sha512-YEvTozk1SxnV/PGL5DllBVDuLQ+jiQhyCSQiZJ6CwBMU5JQ9hFde3i1qqzZHuclZfptjrU0JjlX4ePsOhxNzHw==, } engines: { node: ^14 || ^16 || >=18 } peerDependencies: postcss: ^8.4 dependencies: postcss: 8.4.32 + postcss-value-parser: 4.2.0 dev: false - /@csstools/selector-specificity@3.0.0(postcss-selector-parser@6.0.13): + /@csstools/postcss-relative-color-syntax@2.0.7(postcss@8.4.31): resolution: { - integrity: sha512-hBI9tfBtuPIi885ZsZ32IMEU/5nlZH/KOVYJCOh7gyMxaVLGmLedYqFN6Ui1LXkI8JlC8IsuC0rF0btcRZKd5g==, + integrity: sha512-2AiFbJSVF4EyymLxme4JzSrbXykHolx8DdZECHjYKMhoulhKLltx5ccYgtrK3BmXGd3v3nJrWFCc8JM8bjuiOg==, } engines: { node: ^14 || ^16 || >=18 } peerDependencies: - postcss-selector-parser: ^6.0.13 + postcss: ^8.4 dependencies: - postcss-selector-parser: 6.0.13 + "@csstools/css-color-parser": 1.4.0(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + "@csstools/postcss-progressive-custom-properties": 3.0.2(postcss@8.4.31) + postcss: 8.4.31 dev: false - /@date-io/core@2.17.0: + /@csstools/postcss-relative-color-syntax@2.0.7(postcss@8.4.32): resolution: { - integrity: sha512-+EQE8xZhRM/hsY0CDTVyayMDDY5ihc4MqXCrPxooKw19yAzUIC6uUqsZeaOFNL9YKTNxYKrJP5DFgE8o5xRCOw==, + integrity: sha512-2AiFbJSVF4EyymLxme4JzSrbXykHolx8DdZECHjYKMhoulhKLltx5ccYgtrK3BmXGd3v3nJrWFCc8JM8bjuiOg==, } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/css-color-parser": 1.4.0(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + "@csstools/postcss-progressive-custom-properties": 3.0.2(postcss@8.4.32) + postcss: 8.4.32 + dev: false + + /@csstools/postcss-scope-pseudo-class@3.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-GFNVsD97OuEcfHmcT0/DAZWAvTM/FFBDQndIOLawNc1Wq8YqpZwBdHa063Lq+Irk7azygTT+Iinyg3Lt76p7rg==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + + /@csstools/postcss-scope-pseudo-class@3.0.0(postcss@8.4.32): + resolution: + { + integrity: sha512-GFNVsD97OuEcfHmcT0/DAZWAvTM/FFBDQndIOLawNc1Wq8YqpZwBdHa063Lq+Irk7azygTT+Iinyg3Lt76p7rg==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.32 + postcss-selector-parser: 6.0.13 + dev: false + + /@csstools/postcss-stepped-value-functions@3.0.2(postcss@8.4.31): + resolution: + { + integrity: sha512-I3wX44MZVv+tDuWfrd3BTvRB/YRIM2F5v1MBtTI89sxpFn47mNpTwpPYUOGPVCgKlRDfZSlxIUYhUQmqRQZZFQ==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/css-calc": 1.1.4(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + postcss: 8.4.31 + dev: false + + /@csstools/postcss-stepped-value-functions@3.0.2(postcss@8.4.32): + resolution: + { + integrity: sha512-I3wX44MZVv+tDuWfrd3BTvRB/YRIM2F5v1MBtTI89sxpFn47mNpTwpPYUOGPVCgKlRDfZSlxIUYhUQmqRQZZFQ==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/css-calc": 1.1.4(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + postcss: 8.4.32 + dev: false + + /@csstools/postcss-text-decoration-shorthand@3.0.3(postcss@8.4.31): + resolution: + { + integrity: sha512-d5J9m49HhqXRcw1S6vTZuviHi/iknUKGjBpChiNK1ARg9sSa3b8m5lsWz5Izs8ISORZdv2bZRwbw5Z2R6gQ9kQ==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/color-helpers": 3.0.2 + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + + /@csstools/postcss-text-decoration-shorthand@3.0.3(postcss@8.4.32): + resolution: + { + integrity: sha512-d5J9m49HhqXRcw1S6vTZuviHi/iknUKGjBpChiNK1ARg9sSa3b8m5lsWz5Izs8ISORZdv2bZRwbw5Z2R6gQ9kQ==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/color-helpers": 3.0.2 + postcss: 8.4.32 + postcss-value-parser: 4.2.0 + dev: false + + /@csstools/postcss-trigonometric-functions@3.0.2(postcss@8.4.31): + resolution: + { + integrity: sha512-AwzNhF4QOKaLOKvMljwwFkeYXwufhRO15G+kKohHkyoNOL75xWkN+W2Y9ik9tSeAyDv+cYNlYaF+o/a79WjVjg==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/css-calc": 1.1.4(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + postcss: 8.4.31 + dev: false + + /@csstools/postcss-trigonometric-functions@3.0.2(postcss@8.4.32): + resolution: + { + integrity: sha512-AwzNhF4QOKaLOKvMljwwFkeYXwufhRO15G+kKohHkyoNOL75xWkN+W2Y9ik9tSeAyDv+cYNlYaF+o/a79WjVjg==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/css-calc": 1.1.4(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + postcss: 8.4.32 + dev: false + + /@csstools/postcss-unset-value@3.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-P0JD1WHh3avVyKKRKjd0dZIjCEeaBer8t1BbwGMUDtSZaLhXlLNBqZ8KkqHzYWXOJgHleXAny2/sx8LYl6qhEA==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + dev: false + + /@csstools/postcss-unset-value@3.0.0(postcss@8.4.32): + resolution: + { + integrity: sha512-P0JD1WHh3avVyKKRKjd0dZIjCEeaBer8t1BbwGMUDtSZaLhXlLNBqZ8KkqHzYWXOJgHleXAny2/sx8LYl6qhEA==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.32 + dev: false + + /@csstools/selector-specificity@3.0.0(postcss-selector-parser@6.0.13): + resolution: + { + integrity: sha512-hBI9tfBtuPIi885ZsZ32IMEU/5nlZH/KOVYJCOh7gyMxaVLGmLedYqFN6Ui1LXkI8JlC8IsuC0rF0btcRZKd5g==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss-selector-parser: ^6.0.13 + dependencies: + postcss-selector-parser: 6.0.13 + dev: false + + /@date-io/core@2.17.0: + resolution: + { + integrity: sha512-+EQE8xZhRM/hsY0CDTVyayMDDY5ihc4MqXCrPxooKw19yAzUIC6uUqsZeaOFNL9YKTNxYKrJP5DFgE8o5xRCOw==, + } + dev: false + + /@date-io/date-fns@2.16.0(date-fns@2.30.0): + resolution: + { + integrity: sha512-bfm5FJjucqlrnQcXDVU5RD+nlGmL3iWgkHTq3uAZWVIuBu6dDmGa3m8a6zo2VQQpu8ambq9H22UyUpn7590joA==, + } + peerDependencies: + date-fns: ^2.0.0 + peerDependenciesMeta: + date-fns: + optional: true + dependencies: + "@date-io/core": 2.17.0 + date-fns: 2.30.0 dev: false /@date-io/date-fns@2.17.0(date-fns@2.30.0): @@ -4774,6 +5137,22 @@ packages: tslib: 2.6.2 dev: false + /@dnd-kit/core@6.0.8(react-dom@18.2.0)(react@18.2.0): + resolution: + { + integrity: sha512-lYaoP8yHTQSLlZe6Rr9qogouGUz9oRUj4AHhDQGQzq/hqaJRpFo65X+JKsdHf8oUFBzx5A+SJPUvxAwTF2OabA==, + } + peerDependencies: + react: ">=16.8.0" + react-dom: ">=16.8.0" + dependencies: + "@dnd-kit/accessibility": 3.1.0(react@18.2.0) + "@dnd-kit/utilities": 3.2.2(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + tslib: 2.6.2 + dev: false + /@dnd-kit/core@6.1.0(react-dom@18.2.0)(react@18.2.0): resolution: { @@ -4790,6 +5169,21 @@ packages: tslib: 2.6.2 dev: false + /@dnd-kit/sortable@7.0.2(@dnd-kit/core@6.0.8)(react@18.2.0): + resolution: + { + integrity: sha512-wDkBHHf9iCi1veM834Gbk1429bd4lHX4RpAwT0y2cHLf246GAvU2sVw/oxWNpPKQNQRQaeGXhAVgrOl1IT+iyA==, + } + peerDependencies: + "@dnd-kit/core": ^6.0.7 + react: ">=16.8.0" + dependencies: + "@dnd-kit/core": 6.0.8(react-dom@18.2.0)(react@18.2.0) + "@dnd-kit/utilities": 3.2.2(react@18.2.0) + react: 18.2.0 + tslib: 2.6.2 + dev: false + /@dnd-kit/sortable@7.0.2(@dnd-kit/core@6.1.0)(react@18.2.0): resolution: { @@ -5461,6 +5855,27 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + optionalDependencies: + "@img/sharp-libvips-darwin-arm64": 1.0.0 + dev: false + optional: true + + /@img/sharp-darwin-arm64@0.33.1: + resolution: + { + integrity: sha512-esr2BZ1x0bo+wl7Gx2hjssYhjrhUsD88VQulI0FrG8/otRQUOxLWHMBd1Y1qo2Gfg2KUvXNpT0ASnV9BzJCexw==, + } + engines: + { + glibc: ">=2.26", + node: ^18.17.0 || ^20.3.0 || >=21.0.0, + npm: ">=9.6.5", + pnpm: ">=7.1.0", + yarn: ">=3.2.0", + } + cpu: [arm64] + os: [darwin] + requiresBuild: true optionalDependencies: "@img/sharp-libvips-darwin-arm64": 1.0.0 optional: true @@ -5481,6 +5896,27 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + optionalDependencies: + "@img/sharp-libvips-darwin-x64": 1.0.0 + dev: false + optional: true + + /@img/sharp-darwin-x64@0.33.1: + resolution: + { + integrity: sha512-YrnuB3bXuWdG+hJlXtq7C73lF8ampkhU3tMxg5Hh+E7ikxbUVOU9nlNtVTloDXz6pRHt2y2oKJq7DY/yt+UXYw==, + } + engines: + { + glibc: ">=2.26", + node: ^18.17.0 || ^20.3.0 || >=21.0.0, + npm: ">=9.6.5", + pnpm: ">=7.1.0", + yarn: ">=3.2.0", + } + cpu: [x64] + os: [darwin] + requiresBuild: true optionalDependencies: "@img/sharp-libvips-darwin-x64": 1.0.0 optional: true @@ -5598,32 +6034,33 @@ packages: requiresBuild: true optionalDependencies: "@img/sharp-libvips-linux-arm64": 1.0.0 + dev: false optional: true - /@img/sharp-linux-arm@0.33.0: + /@img/sharp-linux-arm64@0.33.1: resolution: { - integrity: sha512-4horD3wMFd5a0ddbDY8/dXU9CaOgHjEHALAddXgafoR5oWq5s8X61PDgsSeh4Qupsdo6ycfPPSSNBrfVQnwwrg==, + integrity: sha512-59B5GRO2d5N3tIfeGHAbJps7cLpuWEQv/8ySd9109ohQ3kzyCACENkFVAnGPX00HwPTQcaBNF7HQYEfZyZUFfw==, } engines: { - glibc: ">=2.28", + glibc: ">=2.26", node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: ">=9.6.5", pnpm: ">=7.1.0", yarn: ">=3.2.0", } - cpu: [arm] + cpu: [arm64] os: [linux] requiresBuild: true optionalDependencies: - "@img/sharp-libvips-linux-arm": 1.0.0 + "@img/sharp-libvips-linux-arm64": 1.0.0 optional: true - /@img/sharp-linux-s390x@0.33.0: + /@img/sharp-linux-arm@0.33.0: resolution: { - integrity: sha512-TiVJbx38J2rNVfA309ffSOB+3/7wOsZYQEOlKqOUdWD/nqkjNGrX+YQGz7nzcf5oy2lC+d37+w183iNXRZNngQ==, + integrity: sha512-4horD3wMFd5a0ddbDY8/dXU9CaOgHjEHALAddXgafoR5oWq5s8X61PDgsSeh4Qupsdo6ycfPPSSNBrfVQnwwrg==, } engines: { @@ -5633,12 +6070,74 @@ packages: pnpm: ">=7.1.0", yarn: ">=3.2.0", } - cpu: [s390x] + cpu: [arm] os: [linux] requiresBuild: true optionalDependencies: - "@img/sharp-libvips-linux-s390x": 1.0.0 - optional: true + "@img/sharp-libvips-linux-arm": 1.0.0 + dev: false + optional: true + + /@img/sharp-linux-arm@0.33.1: + resolution: + { + integrity: sha512-Ii4X1vnzzI4j0+cucsrYA5ctrzU9ciXERfJR633S2r39CiD8npqH2GMj63uFZRCFt3E687IenAdbwIpQOJ5BNA==, + } + engines: + { + glibc: ">=2.28", + node: ^18.17.0 || ^20.3.0 || >=21.0.0, + npm: ">=9.6.5", + pnpm: ">=7.1.0", + yarn: ">=3.2.0", + } + cpu: [arm] + os: [linux] + requiresBuild: true + optionalDependencies: + "@img/sharp-libvips-linux-arm": 1.0.0 + optional: true + + /@img/sharp-linux-s390x@0.33.0: + resolution: + { + integrity: sha512-TiVJbx38J2rNVfA309ffSOB+3/7wOsZYQEOlKqOUdWD/nqkjNGrX+YQGz7nzcf5oy2lC+d37+w183iNXRZNngQ==, + } + engines: + { + glibc: ">=2.28", + node: ^18.17.0 || ^20.3.0 || >=21.0.0, + npm: ">=9.6.5", + pnpm: ">=7.1.0", + yarn: ">=3.2.0", + } + cpu: [s390x] + os: [linux] + requiresBuild: true + optionalDependencies: + "@img/sharp-libvips-linux-s390x": 1.0.0 + dev: false + optional: true + + /@img/sharp-linux-s390x@0.33.1: + resolution: + { + integrity: sha512-tRGrb2pHnFUXpOAj84orYNxHADBDIr0J7rrjwQrTNMQMWA4zy3StKmMvwsI7u3dEZcgwuMMooIIGWEWOjnmG8A==, + } + engines: + { + glibc: ">=2.28", + node: ^18.17.0 || ^20.3.0 || >=21.0.0, + npm: ">=9.6.5", + pnpm: ">=7.1.0", + yarn: ">=3.2.0", + } + cpu: [s390x] + os: [linux] + requiresBuild: true + optionalDependencies: + "@img/sharp-libvips-linux-s390x": 1.0.0 + optional: true /@img/sharp-linux-x64@0.33.0: resolution: @@ -5656,6 +6155,27 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + optionalDependencies: + "@img/sharp-libvips-linux-x64": 1.0.0 + dev: false + optional: true + + /@img/sharp-linux-x64@0.33.1: + resolution: + { + integrity: sha512-4y8osC0cAc1TRpy02yn5omBeloZZwS62fPZ0WUAYQiLhSFSpWJfY/gMrzKzLcHB9ulUV6ExFiu2elMaixKDbeg==, + } + engines: + { + glibc: ">=2.26", + node: ^18.17.0 || ^20.3.0 || >=21.0.0, + npm: ">=9.6.5", + pnpm: ">=7.1.0", + yarn: ">=3.2.0", + } + cpu: [x64] + os: [linux] + requiresBuild: true optionalDependencies: "@img/sharp-libvips-linux-x64": 1.0.0 optional: true @@ -5676,6 +6196,27 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + optionalDependencies: + "@img/sharp-libvips-linuxmusl-arm64": 1.0.0 + dev: false + optional: true + + /@img/sharp-linuxmusl-arm64@0.33.1: + resolution: + { + integrity: sha512-D3lV6clkqIKUizNS8K6pkuCKNGmWoKlBGh5p0sLO2jQERzbakhu4bVX1Gz+RS4vTZBprKlWaf+/Rdp3ni2jLfA==, + } + engines: + { + musl: ">=1.2.2", + node: ^18.17.0 || ^20.3.0 || >=21.0.0, + npm: ">=9.6.5", + pnpm: ">=7.1.0", + yarn: ">=3.2.0", + } + cpu: [arm64] + os: [linux] + requiresBuild: true optionalDependencies: "@img/sharp-libvips-linuxmusl-arm64": 1.0.0 optional: true @@ -5696,6 +6237,27 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + optionalDependencies: + "@img/sharp-libvips-linuxmusl-x64": 1.0.0 + dev: false + optional: true + + /@img/sharp-linuxmusl-x64@0.33.1: + resolution: + { + integrity: sha512-LOGKNu5w8uu1evVqUAUKTix2sQu1XDRIYbsi5Q0c/SrXhvJ4QyOx+GaajxmOg5PZSsSnCYPSmhjHHsRBx06/wQ==, + } + engines: + { + musl: ">=1.2.2", + node: ^18.17.0 || ^20.3.0 || >=21.0.0, + npm: ">=9.6.5", + pnpm: ">=7.1.0", + yarn: ">=3.2.0", + } + cpu: [x64] + os: [linux] + requiresBuild: true optionalDependencies: "@img/sharp-libvips-linuxmusl-x64": 1.0.0 optional: true @@ -5714,6 +6276,25 @@ packages: } cpu: [wasm32] requiresBuild: true + dependencies: + "@emnapi/runtime": 0.44.0 + dev: false + optional: true + + /@img/sharp-wasm32@0.33.1: + resolution: + { + integrity: sha512-vWI/sA+0p+92DLkpAMb5T6I8dg4z2vzCUnp8yvxHlwBpzN8CIcO3xlSXrLltSvK6iMsVMNswAv+ub77rsf25lA==, + } + engines: + { + node: ^18.17.0 || ^20.3.0 || >=21.0.0, + npm: ">=9.6.5", + pnpm: ">=7.1.0", + yarn: ">=3.2.0", + } + cpu: [wasm32] + requiresBuild: true dependencies: "@emnapi/runtime": 0.44.0 optional: true @@ -5733,6 +6314,24 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: false + optional: true + + /@img/sharp-win32-ia32@0.33.1: + resolution: + { + integrity: sha512-/xhYkylsKL05R+NXGJc9xr2Tuw6WIVl2lubFJaFYfW4/MQ4J+dgjIo/T4qjNRizrqs/szF/lC9a5+updmY9jaQ==, + } + engines: + { + node: ^18.17.0 || ^20.3.0 || >=21.0.0, + npm: ">=9.6.5", + pnpm: ">=7.1.0", + yarn: ">=3.2.0", + } + cpu: [ia32] + os: [win32] + requiresBuild: true optional: true /@img/sharp-win32-x64@0.33.0: @@ -5750,6 +6349,24 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: false + optional: true + + /@img/sharp-win32-x64@0.33.1: + resolution: + { + integrity: sha512-XaM69X0n6kTEsp9tVYYLhXdg7Qj32vYJlAKRutxUsm1UlgQNx6BOhHwZPwukCGXBU2+tH87ip2eV1I/E8MQnZg==, + } + engines: + { + node: ^18.17.0 || ^20.3.0 || >=21.0.0, + npm: ">=9.6.5", + pnpm: ">=7.1.0", + yarn: ">=3.2.0", + } + cpu: [x64] + os: [win32] + requiresBuild: true optional: true /@isaacs/cliui@8.0.2: @@ -6180,6 +6797,22 @@ packages: state-local: 1.0.7 dev: false + /@monaco-editor/react@4.5.1(monaco-editor@0.38.0)(react-dom@18.2.0)(react@18.2.0): + resolution: + { + integrity: sha512-NNDFdP+2HojtNhCkRfE6/D6ro6pBNihaOzMbGK84lNWzRu+CfBjwzGt4jmnqimLuqp5yE5viHS2vi+QOAnD5FQ==, + } + peerDependencies: + monaco-editor: ">= 0.25.0 < 1" + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + "@monaco-editor/loader": 1.4.0(monaco-editor@0.38.0) + monaco-editor: 0.38.0 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /@monaco-editor/react@4.6.0(monaco-editor@0.38.0)(react-dom@18.2.0)(react@18.2.0): resolution: { @@ -6840,7 +7473,85 @@ packages: } dev: false - /@payloadcms/plugin-cloud-storage@1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@1.15.8): + /@payloadcms/bundler-webpack@1.0.5(@swc/core@1.3.100)(payload@2.6.0): + resolution: + { + integrity: sha512-TjzRTGRDQPrxGoMZ+fV76Pzx3nXC37oSZe/+dA/5HM18fRA9vlu/z54r8HHvThZc7ywx0iRiSwgPZYzQu5xUVQ==, + } + peerDependencies: + payload: ^2.0.0 + dependencies: + compression: 1.7.4 + connect-history-api-fallback: 1.6.0 + css-loader: 5.2.7(webpack@5.89.0) + css-minimizer-webpack-plugin: 5.0.1(webpack@5.89.0) + file-loader: 6.2.0(webpack@5.89.0) + find-node-modules: 2.1.3 + html-webpack-plugin: 5.5.4(webpack@5.89.0) + md5: 2.3.0 + mini-css-extract-plugin: 1.6.2(webpack@5.89.0) + path-browserify: 1.0.1 + payload: 2.6.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + postcss: 8.4.31 + postcss-loader: 6.2.1(postcss@8.4.31)(webpack@5.89.0) + postcss-preset-env: 9.0.0(postcss@8.4.31) + process: 0.11.10 + sass-loader: 12.6.0(sass@1.69.5)(webpack@5.89.0) + style-loader: 2.0.0(webpack@5.89.0) + swc-loader: 0.2.3(@swc/core@1.3.100)(webpack@5.89.0) + swc-minify-webpack-plugin: 2.1.1(@swc/core@1.3.100)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(esbuild@0.18.20)(webpack@5.89.0) + url-loader: 4.1.1(file-loader@6.2.0)(webpack@5.89.0) + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) + webpack-bundle-analyzer: 4.10.1 + webpack-cli: 4.10.0(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0) + webpack-dev-middleware: 6.0.1(webpack@5.89.0) + webpack-hot-middleware: 2.25.4 + transitivePeerDependencies: + - "@parcel/css" + - "@swc/core" + - "@swc/css" + - "@webpack-cli/generators" + - "@webpack-cli/migrate" + - bufferutil + - clean-css + - csso + - esbuild + - fibers + - lightningcss + - node-sass + - sass + - sass-embedded + - supports-color + - uglify-js + - utf-8-validate + - webpack-dev-server + dev: false + + /@payloadcms/db-mongodb@1.2.0(payload@2.6.0): + resolution: + { + integrity: sha512-cRgy2Dl/KXBxvm4kBkrRZcWge9R3dWC2taocjFxaTlzM0SQrQQtwGej8IiKmnUAswz897YzkQR4wQQwidEtb3A==, + } + peerDependencies: + payload: ^2.0.0 + dependencies: + bson-objectid: 2.0.4 + deepmerge: 4.3.1 + get-port: 5.1.1 + http-status: 1.6.2 + mongoose: 6.12.3 + mongoose-aggregate-paginate-v2: 1.0.6 + mongoose-paginate-v2: 1.7.22 + payload: 2.6.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + prompts: 2.4.2 + uuid: 9.0.0 + transitivePeerDependencies: + - aws-crt + - supports-color + dev: false + + /@payloadcms/plugin-cloud-storage@1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.6.0): resolution: { integrity: sha512-WFqfZcT7R1LD+FfKKKYNsJPDRE+0VlYEMxzGuPKeUQn9w9sqTy2UD01YCEl0Zcyuq8fD9mRUjeLitSo1aAUimQ==, @@ -6863,7 +7574,7 @@ packages: dependencies: "@aws-sdk/client-s3": 3.472.0 "@aws-sdk/lib-storage": 3.472.0(@aws-sdk/client-s3@3.472.0) - payload: 1.15.8(@types/react@18.2.45)(typescript@5.3.3) + payload: 2.6.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) range-parser: 1.2.1 dev: false @@ -6887,15 +7598,51 @@ packages: react: 18.2.0 dev: false - /@pkgjs/parseargs@0.11.0: + /@payloadcms/plugin-seo@1.0.15(payload@2.6.0)(react@18.2.0): resolution: { - integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==, + integrity: sha512-7nU0DD3UZOOHsV2UIkOWL2JNCX+u1WNbEvZOiGpO6lB6YekuVIMqxHKbTdVR73UeW44lApvS9LTgif3XLQ5HDA==, } - engines: { node: ">=14" } - requiresBuild: true - dev: true - optional: true + peerDependencies: + payload: ^0.18.5 || ^1.0.0 || ^2.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + payload: 2.6.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + react: 18.2.0 + dev: false + + /@payloadcms/richtext-slate@1.3.1(payload@2.6.0)(react-dom@18.2.0): + resolution: + { + integrity: sha512-DwHDn0F7PTGP1WGLQmpNRUdfhwHQwOFpBzXuQtIqlykkj5AAsZrLmfjQabTHPOzKZdLkMRrxhYOGERi4F1T5Hw==, + } + peerDependencies: + payload: ^2.3.0 + dependencies: + "@faceless-ui/modal": 2.0.1(react-dom@18.2.0)(react@18.2.0) + i18next: 22.5.1 + is-hotkey: 0.2.0 + payload: 2.6.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + react: 18.2.0 + react-i18next: 11.18.6(i18next@22.5.1)(react-dom@18.2.0)(react@18.2.0) + slate: 0.91.4 + slate-history: 0.86.0(slate@0.91.4) + slate-hyperscript: 0.81.3(slate@0.91.4) + slate-react: 0.92.0(react-dom@18.2.0)(react@18.2.0)(slate@0.91.4) + transitivePeerDependencies: + - react-dom + - react-native + dev: false + + /@pkgjs/parseargs@0.11.0: + resolution: + { + integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==, + } + engines: { node: ">=14" } + requiresBuild: true + dev: true + optional: true /@pkgr/utils@2.4.2: resolution: @@ -6970,7 +7717,6 @@ packages: { integrity: sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==, } - dev: false /@popperjs/core@2.11.8: resolution: @@ -9422,9 +10168,9 @@ packages: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) resolve-url-loader: 5.0.0 - sass-loader: 12.6.0(webpack@5.89.0) + sass-loader: 12.6.0(sass@1.69.5)(webpack@5.89.0) semver: 7.5.4 - sharp: 0.33.0 + sharp: 0.33.1 style-loader: 3.3.3(webpack@5.89.0) styled-jsx: 5.1.1(@babel/core@7.23.6)(react@18.2.0) ts-dedent: 2.2.0 @@ -9907,6 +10653,18 @@ packages: requiresBuild: true optional: true + /@swc/core-darwin-arm64@1.3.76: + resolution: + { + integrity: sha512-ovviEhZ/1E81Z9OGrO0ivLWk4VCa3I3ZzM+cd3gugglRRwVwtlIaoIYqY5S3KiCAupDd1+UCl5X7Vbio7a/V8g==, + } + engines: { node: ">=10" } + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + /@swc/core-darwin-arm64@1.3.78: resolution: { @@ -9929,6 +10687,18 @@ packages: requiresBuild: true optional: true + /@swc/core-darwin-x64@1.3.76: + resolution: + { + integrity: sha512-tcySTDqs0SHCebtW35sCdcLWsmTEo7bEwx0gNL/spetqVT9fpFi6qU8qcnt7i2KaZHbeNl9g1aadu+Yrni+GzA==, + } + engines: { node: ">=10" } + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + /@swc/core-darwin-x64@1.3.78: resolution: { @@ -9940,6 +10710,18 @@ packages: requiresBuild: true optional: true + /@swc/core-linux-arm-gnueabihf@1.3.76: + resolution: + { + integrity: sha512-apgzpGWy1AwoMF4urAAASsAjE7rEzZFIF+p6utuxhS7cNHzE0AyEVDYJbo+pzBdlZ8orBdzzsHtFwoEgKOjebA==, + } + engines: { node: ">=10" } + cpu: [arm] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@swc/core-linux-arm-gnueabihf@1.3.78: resolution: { @@ -9962,6 +10744,18 @@ packages: requiresBuild: true optional: true + /@swc/core-linux-arm64-gnu@1.3.76: + resolution: + { + integrity: sha512-c3c0zz6S0eludqidDpuqbadE0WT3OZczyQxe9Vw8lFFXES85mvNGtwYzyGK2o7TICpsuHrndwDIoYpmpWk879g==, + } + engines: { node: ">=10" } + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@swc/core-linux-arm64-gnu@1.3.78: resolution: { @@ -9984,6 +10778,18 @@ packages: requiresBuild: true optional: true + /@swc/core-linux-arm64-musl@1.3.76: + resolution: + { + integrity: sha512-Is3bpq7F2qtlnkzEeOD6HIZJPpOmu3q6c82lKww90Q0NnrlSluVMozTHJgwVoFZyizH7uLnk0LuNcEAWLnmJIw==, + } + engines: { node: ">=10" } + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@swc/core-linux-arm64-musl@1.3.78: resolution: { @@ -10006,6 +10812,18 @@ packages: requiresBuild: true optional: true + /@swc/core-linux-x64-gnu@1.3.76: + resolution: + { + integrity: sha512-iwCeRzd9oSvUzqt7nU6p/ztceAWfnO9XVxBn502R5gs6QCBbE1HCKrWHDO77aKPK7ss+0NcIGHvXTd9L8/wRzw==, + } + engines: { node: ">=10" } + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@swc/core-linux-x64-gnu@1.3.78: resolution: { @@ -10028,6 +10846,18 @@ packages: requiresBuild: true optional: true + /@swc/core-linux-x64-musl@1.3.76: + resolution: + { + integrity: sha512-a671g4tW8kyFeuICsgq4uB9ukQfiIyXJT4V6YSnmqhCTz5mazWuDxZ5wKnx/1g5nXTl+U5cWH2TZaCJatp4GKA==, + } + engines: { node: ">=10" } + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@swc/core-linux-x64-musl@1.3.78: resolution: { @@ -10050,6 +10880,18 @@ packages: requiresBuild: true optional: true + /@swc/core-win32-arm64-msvc@1.3.76: + resolution: + { + integrity: sha512-+swEFtjdMezS0vKUhJC3psdSDtOJGY5pEOt4e8XOPvn7aQpKQ9LfF49XVtIwDSk5SGuWtVoLFzkSY3reWUJCyg==, + } + engines: { node: ">=10" } + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: false + optional: true + /@swc/core-win32-arm64-msvc@1.3.78: resolution: { @@ -10072,6 +10914,18 @@ packages: requiresBuild: true optional: true + /@swc/core-win32-ia32-msvc@1.3.76: + resolution: + { + integrity: sha512-5CqwAykpGBJ3PqGLOlWGLGIPpBAG1IwWVDUfro3hhjQ7XJxV5Z1aQf5V5OJ90HJVtrEAVx2xx59UV/Dh081LOg==, + } + engines: { node: ">=10" } + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: false + optional: true + /@swc/core-win32-ia32-msvc@1.3.78: resolution: { @@ -10094,6 +10948,18 @@ packages: requiresBuild: true optional: true + /@swc/core-win32-x64-msvc@1.3.76: + resolution: + { + integrity: sha512-CiMpWLLlR3Cew9067E7XxaLBwYYJ90r9EhGSO6V1pvYSWj7ET/Ppmtj1ZhzPJMqRXAP6xflfl5R5o4ee1m4WLA==, + } + engines: { node: ">=10" } + cpu: [x64] + os: [win32] + requiresBuild: true + dev: false + optional: true + /@swc/core-win32-x64-msvc@1.3.78: resolution: { @@ -10131,6 +10997,31 @@ packages: "@swc/core-win32-ia32-msvc": 1.3.100 "@swc/core-win32-x64-msvc": 1.3.100 + /@swc/core@1.3.76: + resolution: + { + integrity: sha512-aYYTA2aVYkwJAZepQXtPnkUthhOfn8qd6rsh+lrJxonFrjmpI7RHt2tMDVTXP6XDX7fvnvrVtT1bwZfmBFPh0Q==, + } + engines: { node: ">=10" } + requiresBuild: true + peerDependencies: + "@swc/helpers": ^0.5.0 + peerDependenciesMeta: + "@swc/helpers": + optional: true + optionalDependencies: + "@swc/core-darwin-arm64": 1.3.76 + "@swc/core-darwin-x64": 1.3.76 + "@swc/core-linux-arm-gnueabihf": 1.3.76 + "@swc/core-linux-arm64-gnu": 1.3.76 + "@swc/core-linux-arm64-musl": 1.3.76 + "@swc/core-linux-x64-gnu": 1.3.76 + "@swc/core-linux-x64-musl": 1.3.76 + "@swc/core-win32-arm64-msvc": 1.3.76 + "@swc/core-win32-ia32-msvc": 1.3.76 + "@swc/core-win32-x64-msvc": 1.3.76 + dev: false + /@swc/core@1.3.78: resolution: { @@ -10169,6 +11060,21 @@ packages: dependencies: tslib: 2.6.2 + /@swc/register@0.1.10(@swc/core@1.3.76): + resolution: + { + integrity: sha512-6STwH/q4dc3pitXLVkV7sP0Hiy+zBsU2wOF1aXpXR95pnH3RYHKIsDC+gvesfyB7jxNT9OOZgcqOp9RPxVTx9A==, + } + hasBin: true + peerDependencies: + "@swc/core": ^1.0.46 + dependencies: + "@swc/core": 1.3.76 + lodash.clonedeep: 4.5.0 + pirates: 4.0.6 + source-map-support: 0.5.21 + dev: false + /@swc/register@0.1.10(@swc/core@1.3.78): resolution: { @@ -11309,8 +12215,8 @@ packages: webpack: 4.x.x || 5.x.x webpack-cli: 4.x.x dependencies: - webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) - webpack-cli: 4.10.0(webpack@5.89.0) + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) + webpack-cli: 4.10.0(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0) /@webpack-cli/info@1.5.0(webpack-cli@4.10.0): resolution: @@ -11321,7 +12227,7 @@ packages: webpack-cli: 4.x.x dependencies: envinfo: 7.11.0 - webpack-cli: 4.10.0(webpack@5.89.0) + webpack-cli: 4.10.0(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0) /@webpack-cli/serve@1.7.0(webpack-cli@4.10.0): resolution: @@ -11335,7 +12241,7 @@ packages: webpack-dev-server: optional: true dependencies: - webpack-cli: 4.10.0(webpack@5.89.0) + webpack-cli: 4.10.0(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0) /@wry/caches@1.0.1: resolution: @@ -12113,6 +13019,25 @@ packages: engines: { node: ">=10.12.0" } dev: false + /autoprefixer@10.4.16(postcss@8.4.31): + resolution: + { + integrity: sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==, + } + engines: { node: ^10 || ^12 || >=14 } + hasBin: true + peerDependencies: + postcss: ^8.1.0 + dependencies: + browserslist: 4.22.2 + caniuse-lite: 1.0.30001568 + fraction.js: 4.3.7 + normalize-range: 0.1.2 + picocolors: 1.0.0 + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + /autoprefixer@10.4.16(postcss@8.4.32): resolution: { @@ -12530,6 +13455,13 @@ packages: } dev: false + /body-scroll-lock@4.0.0-beta.0: + resolution: + { + integrity: sha512-a7tP5+0Mw3YlUJcGAKUqIBkYYGlYxk2fnCasq/FUph1hadxlTRjF+gAcZksxANnaMnALjxEddmSi/H3OR8ugcQ==, + } + dev: false + /boolbase@1.0.0: resolution: { @@ -12771,7 +13703,7 @@ packages: } dependencies: base64-js: 1.5.1 - ieee754: 1.1.13 + ieee754: 1.2.1 isarray: 1.0.0 dev: false @@ -13774,6 +14706,19 @@ packages: engines: { node: ">=8" } dev: true + /css-blank-pseudo@6.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-VbfLlOWO7sBHBTn6pwDQzc07Z0SDydgDBfNfCE0nvrehdBNv9RKsuupIRa/qal0+fBZhAALyQDPMKz5lnvcchw==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + /css-blank-pseudo@6.0.0(postcss@8.4.32): resolution: { @@ -13799,6 +14744,21 @@ packages: postcss: 8.4.32 dev: false + /css-has-pseudo@6.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-X+r+JBuoO37FBOWVNhVJhxtSBUFHgHbrcc0CjFT28JEdOw1qaDwABv/uunyodUuSy2hMPe9j/HjssxSlvUmKjg==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/selector-specificity": 3.0.0(postcss-selector-parser@6.0.13) + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + postcss-value-parser: 4.2.0 + dev: false + /css-has-pseudo@6.0.0(postcss@8.4.32): resolution: { @@ -13833,7 +14793,7 @@ packages: postcss-value-parser: 4.2.0 schema-utils: 3.3.0 semver: 7.5.4 - webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) dev: false /css-loader@6.8.1(webpack@5.89.0): @@ -13890,7 +14850,19 @@ packages: postcss: 8.4.32 schema-utils: 4.2.0 serialize-javascript: 6.0.1 - webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) + dev: false + + /css-prefers-color-scheme@9.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-03QGAk/FXIRseDdLb7XAiu6gidQ0Nd8945xuM7VFVPpc6goJsG9uIO8xQjTxwbPdPIIV4o4AJoOJyt8gwDl67g==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 dev: false /css-prefers-color-scheme@9.0.0(postcss@8.4.32): @@ -14534,7 +15506,6 @@ packages: { integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==, } - dev: false /debug@2.6.9: resolution: @@ -14634,6 +15605,32 @@ packages: babel-plugin-macros: optional: true + /deep-equal@2.2.2: + resolution: + { + integrity: sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA==, + } + dependencies: + array-buffer-byte-length: 1.0.0 + call-bind: 1.0.5 + es-get-iterator: 1.1.3 + get-intrinsic: 1.2.2 + is-arguments: 1.1.1 + is-array-buffer: 3.0.2 + is-date-object: 1.0.5 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.2 + isarray: 2.0.5 + object-is: 1.1.5 + object-keys: 1.1.1 + object.assign: 4.1.5 + regexp.prototype.flags: 1.5.1 + side-channel: 1.0.4 + which-boxed-primitive: 1.0.2 + which-collection: 1.0.1 + which-typed-array: 1.1.13 + dev: false + /deep-equal@2.2.3: resolution: { @@ -14838,14 +15835,22 @@ packages: } engines: { node: ">= 0.8", npm: 1.2.8000 || >= 1.4.16 } - /detect-indent@6.1.0: + /detect-file@1.0.0: resolution: { - integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==, + integrity: sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==, } - engines: { node: ">=8" } - dev: true - + engines: { node: ">=0.10.0" } + dev: false + + /detect-indent@6.1.0: + resolution: + { + integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==, + } + engines: { node: ">=8" } + dev: true + /detect-libc@2.0.2: resolution: { @@ -15134,7 +16139,6 @@ packages: { integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==, } - dev: false /duplexify@3.7.1: resolution: @@ -15638,7 +16642,7 @@ packages: dependencies: confusing-browser-globals: 1.0.11 eslint: 8.55.0 - eslint-plugin-import: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + eslint-plugin-import: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) object.assign: 4.1.5 object.entries: 1.1.7 semver: 6.3.1 @@ -15659,7 +16663,7 @@ packages: dependencies: eslint: 8.55.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.0)(eslint@8.55.0) - eslint-plugin-import: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + eslint-plugin-import: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.55.0) eslint-plugin-react: 7.33.2(eslint@8.55.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.55.0) @@ -15730,6 +16734,31 @@ packages: transitivePeerDependencies: - supports-color + /eslint-import-resolver-typescript@3.6.1(eslint-import-resolver-webpack@0.13.8)(eslint-plugin-import@2.29.0)(eslint@8.55.0): + resolution: + { + integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==, + } + engines: { node: ^14.18.0 || >=16.0.0 } + peerDependencies: + eslint: "*" + eslint-plugin-import: "*" + dependencies: + debug: 4.3.4 + enhanced-resolve: 5.15.0 + eslint: 8.55.0 + eslint-module-utils: 2.8.0(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + eslint-plugin-import: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + fast-glob: 3.3.2 + get-tsconfig: 4.7.2 + is-core-module: 2.13.1 + is-glob: 4.0.3 + transitivePeerDependencies: + - "@typescript-eslint/parser" + - eslint-import-resolver-node + - eslint-import-resolver-webpack + - supports-color + /eslint-import-resolver-webpack@0.13.8(eslint-plugin-import@2.29.0)(webpack@5.89.0): resolution: { @@ -15743,7 +16772,7 @@ packages: array.prototype.find: 2.2.2 debug: 3.2.7 enhanced-resolve: 0.9.1 - eslint-plugin-import: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + eslint-plugin-import: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) find-root: 1.1.0 hasown: 2.0.0 interpret: 1.4.0 @@ -15756,7 +16785,7 @@ packages: transitivePeerDependencies: - supports-color - /eslint-module-utils@2.8.0(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0): + /eslint-module-utils@2.8.0(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0): resolution: { integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==, @@ -15783,11 +16812,12 @@ packages: debug: 3.2.7 eslint: 8.55.0 eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(eslint-import-resolver-webpack@0.13.8)(eslint-plugin-import@2.29.0)(eslint@8.55.0) eslint-import-resolver-webpack: 0.13.8(eslint-plugin-import@2.29.0)(webpack@5.89.0) transitivePeerDependencies: - supports-color - /eslint-plugin-import@2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0): + /eslint-plugin-import@2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0): resolution: { integrity: sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==, @@ -15808,7 +16838,7 @@ packages: doctrine: 2.1.0 eslint: 8.55.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + eslint-module-utils: 2.8.0(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -16298,6 +17328,16 @@ packages: } engines: { node: ">= 0.8.0" } + /expand-tilde@2.0.2: + resolution: + { + integrity: sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==, + } + engines: { node: ">=0.10.0" } + dependencies: + homedir-polyfill: 1.0.3 + dev: false + /expect@29.7.0: resolution: { @@ -16587,7 +17627,7 @@ packages: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) /file-system-cache@2.3.0: resolution: @@ -16700,6 +17740,16 @@ packages: pkg-dir: 7.0.0 dev: true + /find-node-modules@2.1.3: + resolution: + { + integrity: sha512-UC2I2+nx1ZuOBclWVNdcnbDR5dlrOdVb7xNjmT/lHE+LsgztWks3dG7boJ37yTS/venXw84B/mAW9uHVoC5QRg==, + } + dependencies: + findup-sync: 4.0.0 + merge: 2.1.1 + dev: false + /find-root@1.1.0: resolution: { @@ -16756,6 +17806,19 @@ packages: pkg-dir: 4.2.0 dev: true + /findup-sync@4.0.0: + resolution: + { + integrity: sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==, + } + engines: { node: ">= 8" } + dependencies: + detect-file: 1.0.0 + is-glob: 4.0.3 + micromatch: 4.0.5 + resolve-dir: 1.0.1 + dev: false + /flat-cache@3.2.0: resolution: { @@ -17195,7 +18258,6 @@ packages: integrity: sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==, } engines: { node: ">=8" } - dev: true /get-stdin@8.0.0: resolution: @@ -17230,6 +18292,15 @@ packages: call-bind: 1.0.5 get-intrinsic: 1.2.2 + /get-tsconfig@4.6.2: + resolution: + { + integrity: sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg==, + } + dependencies: + resolve-pkg-maps: 1.0.0 + dev: false + /get-tsconfig@4.7.2: resolution: { @@ -17237,7 +18308,6 @@ packages: } dependencies: resolve-pkg-maps: 1.0.0 - dev: false /getpass@0.1.7: resolution: @@ -17366,6 +18436,32 @@ packages: once: 1.4.0 dev: false + /global-modules@1.0.0: + resolution: + { + integrity: sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==, + } + engines: { node: ">=0.10.0" } + dependencies: + global-prefix: 1.0.2 + is-windows: 1.0.2 + resolve-dir: 1.0.1 + dev: false + + /global-prefix@1.0.2: + resolution: + { + integrity: sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==, + } + engines: { node: ">=0.10.0" } + dependencies: + expand-tilde: 2.0.2 + homedir-polyfill: 1.0.3 + ini: 1.3.8 + is-windows: 1.0.2 + which: 1.3.1 + dev: false + /global@4.4.0: resolution: { @@ -17456,6 +18552,18 @@ packages: tslib: 2.6.2 dev: true + /graphql-http@1.21.0(graphql@16.8.1): + resolution: + { + integrity: sha512-yrItPfHj5WeT4n7iusbVin+vGSQjXFAX6U/GnYytdCJRXVad1TWGtYFDZ2ROjCKpXQzIwvfbiWCEwfuXgR3B6A==, + } + engines: { node: ">=12" } + peerDependencies: + graphql: ">=0.11 <=16" + dependencies: + graphql: 16.8.1 + dev: false + /graphql-http@1.22.0(graphql@16.8.1): resolution: { @@ -17501,6 +18609,19 @@ packages: lodash.get: 4.4.2 dev: false + /graphql-scalars@1.22.2(graphql@16.8.1): + resolution: + { + integrity: sha512-my9FB4GtghqXqi/lWSVAOPiTzTnnEzdOXCsAC2bb5V7EFNQjVjwy3cSSbUvgYOtDuDibd+ZsCDhz+4eykYOlhQ==, + } + engines: { node: ">=10" } + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + graphql: 16.8.1 + tslib: 2.6.2 + dev: false + /graphql-scalars@1.22.4(graphql@16.8.1): resolution: { @@ -17588,7 +18709,6 @@ packages: engines: { node: ">=10" } dependencies: duplexer: 0.1.2 - dev: false /handlebars@4.7.8: resolution: @@ -17773,6 +18893,16 @@ packages: dependencies: react-is: 16.13.1 + /homedir-polyfill@1.0.3: + resolution: + { + integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==, + } + engines: { node: ">=0.10.0" } + dependencies: + parse-passwd: 1.0.0 + dev: false + /hosted-git-info@2.8.9: resolution: { @@ -17859,6 +18989,23 @@ packages: through2: 0.4.2 dev: false + /html-webpack-plugin@5.5.3(webpack@5.89.0): + resolution: + { + integrity: sha512-6YrDKTuqaP/TquFH7h4srYWsZx+x6k6+FbsTm0ziCwGHDP78Unr1r9F/H4+sGmMbX08GQcJ+K64x55b+7VM/jg==, + } + engines: { node: ">=10.13.0" } + peerDependencies: + webpack: ^5.20.0 + dependencies: + "@types/html-minifier-terser": 6.1.0 + html-minifier-terser: 6.1.0 + lodash: 4.17.21 + pretty-error: 4.0.0 + tapable: 2.2.1 + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) + dev: false + /html-webpack-plugin@5.5.4(webpack@5.89.0): resolution: { @@ -17873,7 +19020,7 @@ packages: lodash: 4.17.21 pretty-error: 4.0.0 tapable: 2.2.1 - webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) /htmlparser2@6.1.0: resolution: @@ -17938,6 +19085,14 @@ packages: sshpk: 1.18.0 dev: false + /http-status@1.6.2: + resolution: + { + integrity: sha512-oUExvfNckrpTpDazph7kNG8sQi5au3BeTo0idaZFXEhTaJKu7GNJCLHI0rYY2wljm548MSTM+Ljj/c6anqu2zQ==, + } + engines: { node: ">= 0.4.0" } + dev: false + /http-status@1.7.3: resolution: { @@ -18046,6 +19201,13 @@ packages: "@babel/runtime": 7.23.6 dev: false + /i18next-http-middleware@3.3.2: + resolution: + { + integrity: sha512-PSeLXQXr9Qiv9Q3GCWCoIJenKVbxCcVsXb7VMp/mOprV4gu+AMJT7VHw4+QEf6oYW6GU31QSLnfDpLNoSMtx3g==, + } + dev: false + /i18next-http-middleware@3.5.0: resolution: { @@ -18158,7 +19320,6 @@ packages: { integrity: sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==, } - dev: false /import-fresh@3.3.0: resolution: @@ -18217,6 +19378,13 @@ packages: integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==, } + /ini@1.3.8: + resolution: + { + integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==, + } + dev: false + /internal-slot@1.0.6: resolution: { @@ -18838,7 +20006,6 @@ packages: integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==, } engines: { node: ">=0.10.0" } - dev: true /is-wsl@2.2.0: resolution: @@ -19550,6 +20717,19 @@ packages: "@sideway/pinpoint": 2.0.0 dev: false + /joi@17.9.2: + resolution: + { + integrity: sha512-Itk/r+V4Dx0V3c7RLFdRh12IOjySm2/WGPMubBT92cQvRfYZhPM2W0hZlctjj72iES8jsRCwp7S/cRmWBnJ4nw==, + } + dependencies: + "@hapi/hoek": 9.3.0 + "@hapi/topo": 5.1.0 + "@sideway/address": 4.1.4 + "@sideway/formula": 3.0.1 + "@sideway/pinpoint": 2.0.0 + dev: false + /jose@4.15.4: resolution: { @@ -19903,6 +21083,19 @@ packages: - supports-color dev: false + /jsonwebtoken@9.0.1: + resolution: + { + integrity: sha512-K8wx7eJ5TPvEjuiVSkv167EVboBDv9PZdDoF7BgeQnBLVvZWW9clr2PsQHVJDTKaEIH5JBIwHujGcHp7GgI2eg==, + } + engines: { node: ">=12", npm: ">=6" } + dependencies: + jws: 3.2.2 + lodash: 4.17.21 + ms: 2.1.3 + semver: 7.5.4 + dev: false + /jsonwebtoken@9.0.2: resolution: { @@ -20841,6 +22034,13 @@ packages: } engines: { node: ">= 8" } + /merge@2.1.1: + resolution: + { + integrity: sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w==, + } + dev: false + /method-override@3.0.0: resolution: { @@ -21005,7 +22205,7 @@ packages: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) webpack-sources: 1.4.3 dev: false @@ -21188,6 +22388,23 @@ packages: - aws-crt dev: false + /mongodb@4.17.1: + resolution: + { + integrity: sha512-MBuyYiPUPRTqfH2dV0ya4dcr2E5N52ocBuZ8Sgg/M030nGF78v855B3Z27mZJnp8PxjnUquEnAtjOsphgMZOlQ==, + } + engines: { node: ">=12.9.0" } + dependencies: + bson: 4.7.2 + mongodb-connection-string-url: 2.6.0 + socks: 2.7.1 + optionalDependencies: + "@aws-sdk/credential-providers": 3.470.0 + "@mongodb-js/saslprep": 1.1.1 + transitivePeerDependencies: + - aws-crt + dev: false + /mongodb@6.3.0: resolution: { @@ -21258,6 +22475,25 @@ packages: - supports-color dev: false + /mongoose@6.12.3: + resolution: + { + integrity: sha512-MNJymaaXali7w7rHBxVUoQ3HzHHMk/7I/+yeeoSa4rUzdjZwIWQznBNvVgc0A8ghuJwsuIkb5LyLV6gSjGjWyQ==, + } + engines: { node: ">=12.0.0" } + dependencies: + bson: 4.7.2 + kareem: 2.5.1 + mongodb: 4.17.1 + mpath: 0.9.0 + mquery: 4.0.3 + ms: 2.1.3 + sift: 16.0.1 + transitivePeerDependencies: + - aws-crt + - supports-color + dev: false + /mpath@0.9.0: resolution: { @@ -21305,7 +22541,6 @@ packages: integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==, } engines: { node: ">=10" } - dev: false /ms@2.0.0: resolution: @@ -21671,6 +22906,14 @@ packages: engines: { node: ">=6.0.0" } dev: false + /nodemailer@6.9.8: + resolution: + { + integrity: sha512-cfrYUk16e67Ks051i4CntM9kshRYei1/o/Gi8K1d+R34OIs21xdFnW7Pt7EucmVKA0LKtqUGNcjMZ7ehjl49mQ==, + } + engines: { node: ">=6.0.0" } + dev: false + /normalize-package-data@2.5.0: resolution: { @@ -21960,7 +23203,6 @@ packages: integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==, } hasBin: true - dev: false /openid-client@5.6.1: resolution: @@ -22225,6 +23467,14 @@ packages: json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 + /parse-passwd@1.0.0: + resolution: + { + integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==, + } + engines: { node: ">=0.10.0" } + dev: false + /parse5@7.1.2: resolution: { @@ -22514,7 +23764,7 @@ packages: sass-loader: 12.6.0(sass@1.69.5)(webpack@5.89.0) scheduler: 0.23.0 scmp: 2.1.0 - sharp: 0.33.0 + sharp: 0.33.1 slate: 0.91.4 slate-history: 0.86.0(slate@0.91.4) slate-hyperscript: 0.81.3(slate@0.91.4) @@ -22522,14 +23772,14 @@ packages: style-loader: 2.0.0(webpack@5.89.0) swc-loader: 0.2.3(@swc/core@1.3.78)(webpack@5.89.0) swc-minify-webpack-plugin: 2.1.1(@swc/core@1.3.78)(webpack@5.89.0) - terser-webpack-plugin: 5.3.9(@swc/core@1.3.78)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(esbuild@0.18.20)(webpack@5.89.0) ts-essentials: 7.0.3(typescript@5.3.3) url-loader: 4.1.1(file-loader@6.2.0)(webpack@5.89.0) use-context-selector: 1.4.1(react-dom@18.2.0)(react@18.2.0)(scheduler@0.23.0) uuid: 8.3.2 webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) webpack-bundle-analyzer: 4.10.1 - webpack-cli: 4.10.0(webpack@5.89.0) + webpack-cli: 4.10.0(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0) webpack-dev-middleware: 6.0.1(webpack@5.89.0) webpack-hot-middleware: 2.25.4 transitivePeerDependencies: @@ -22557,44 +23807,153 @@ packages: - webpack-dev-server dev: false - /pbkdf2@3.1.2: - resolution: - { - integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==, - } - engines: { node: ">=0.12" } - dependencies: - create-hash: 1.2.0 - create-hmac: 1.1.7 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - dev: true - - /peek-readable@4.1.0: - resolution: - { - integrity: sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg==, - } - engines: { node: ">=8" } - dev: false - - /peek-stream@1.1.3: + /payload@2.6.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0): resolution: { - integrity: sha512-FhJ+YbOSBb9/rIl2ZeE/QHEsWn7PqNYt8ARAY3kIgNGOk13g9FGyIY6JIl/xB/3TFRVoTv5as0l11weORrTekA==, + integrity: sha512-DWRatMu9fkqClLvC3DStr1qY1M27tGjsmbFP+cQ7aN0vLpXGEMSorr1uOjtYGGElgapW2Cz2V8DRL4vtqBvRYA==, } + engines: { node: ">=14" } + hasBin: true dependencies: - buffer-from: 1.1.2 - duplexify: 3.7.1 - through2: 2.0.5 - dev: true - - /pend@1.2.0: - resolution: - { - integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==, - } + "@date-io/date-fns": 2.16.0(date-fns@2.30.0) + "@dnd-kit/core": 6.0.8(react-dom@18.2.0)(react@18.2.0) + "@dnd-kit/sortable": 7.0.2(@dnd-kit/core@6.0.8)(react@18.2.0) + "@faceless-ui/modal": 2.0.1(react-dom@18.2.0)(react@18.2.0) + "@faceless-ui/scroll-info": 1.3.0(react-dom@18.2.0)(react@18.2.0) + "@faceless-ui/window-info": 2.1.1(react-dom@18.2.0)(react@18.2.0) + "@monaco-editor/react": 4.5.1(monaco-editor@0.38.0)(react-dom@18.2.0)(react@18.2.0) + "@swc/core": 1.3.76 + "@swc/register": 0.1.10(@swc/core@1.3.76) + body-parser: 1.20.2 + body-scroll-lock: 4.0.0-beta.0 + bson-objectid: 2.0.4 + compression: 1.7.4 + conf: 10.2.0 + connect-history-api-fallback: 1.6.0 + console-table-printer: 2.11.2 + dataloader: 2.2.2 + date-fns: 2.30.0 + deep-equal: 2.2.2 + deepmerge: 4.3.1 + dotenv: 8.6.0 + express: 4.18.2 + express-fileupload: 1.4.0 + express-rate-limit: 5.5.1 + file-type: 16.5.4 + find-up: 4.1.0 + flatley: 5.2.0 + fs-extra: 10.1.0 + get-tsconfig: 4.6.2 + graphql: 16.8.1 + graphql-http: 1.21.0(graphql@16.8.1) + graphql-playground-middleware-express: 1.7.23(express@4.18.2) + graphql-query-complexity: 0.12.0(graphql@16.8.1) + graphql-scalars: 1.22.2(graphql@16.8.1) + graphql-type-json: 0.3.2(graphql@16.8.1) + html-webpack-plugin: 5.5.3(webpack@5.89.0) + http-status: 1.6.2 + i18next: 22.5.1 + i18next-browser-languagedetector: 6.1.8 + i18next-http-middleware: 3.3.2 + is-hotkey: 0.2.0 + is-plain-object: 5.0.0 + isomorphic-fetch: 3.0.0 + joi: 17.9.2 + json-schema-to-typescript: 11.0.3 + jsonwebtoken: 9.0.1 + jwt-decode: 3.1.2 + md5: 2.3.0 + method-override: 3.0.0 + micro-memoize: 4.1.2 + minimist: 1.2.8 + mkdirp: 1.0.4 + monaco-editor: 0.38.0 + nodemailer: 6.9.8 + object-to-formdata: 4.5.1 + passport: 0.6.0 + passport-anonymous: 1.0.1 + passport-headerapikey: 1.2.2 + passport-jwt: 4.0.1 + passport-local: 1.0.0 + pino: 8.15.0 + pino-pretty: 10.2.0 + pluralize: 8.0.0 + probe-image-size: 6.0.0 + process: 0.11.10 + qs: 6.11.2 + qs-middleware: 1.0.3 + react: 18.2.0 + react-animate-height: 2.1.2(react-dom@18.2.0)(react@18.2.0) + react-datepicker: 4.16.0(react-dom@18.2.0)(react@18.2.0) + react-diff-viewer-continued: 3.2.6(react-dom@18.2.0)(react@18.2.0) + react-dom: 18.2.0(react@18.2.0) + react-helmet: 6.1.0(react@18.2.0) + react-i18next: 11.18.6(i18next@22.5.1)(react-dom@18.2.0)(react@18.2.0) + react-image-crop: 10.1.8(react@18.2.0) + react-router-dom: 5.3.4(react@18.2.0) + react-router-navigation-prompt: 1.9.6(react-router-dom@5.3.4)(react@18.2.0) + react-select: 5.7.4(@types/react@18.2.45)(react-dom@18.2.0)(react@18.2.0) + react-toastify: 8.2.0(react-dom@18.2.0)(react@18.2.0) + sanitize-filename: 1.6.3 + sass: 1.69.4 + scheduler: 0.23.0 + scmp: 2.1.0 + sharp: 0.33.1 + swc-loader: 0.2.3(@swc/core@1.3.76)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(esbuild@0.18.20)(webpack@5.89.0) + ts-essentials: 7.0.3(typescript@5.3.3) + use-context-selector: 1.4.1(react-dom@18.2.0)(react@18.2.0)(scheduler@0.23.0) + uuid: 9.0.1 + transitivePeerDependencies: + - "@swc/helpers" + - "@types/react" + - encoding + - esbuild + - react-native + - supports-color + - typescript + - uglify-js + - webpack + dev: false + + /pbkdf2@3.1.2: + resolution: + { + integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==, + } + engines: { node: ">=0.12" } + dependencies: + create-hash: 1.2.0 + create-hmac: 1.1.7 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + dev: true + + /peek-readable@4.1.0: + resolution: + { + integrity: sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg==, + } + engines: { node: ">=8" } + dev: false + + /peek-stream@1.1.3: + resolution: + { + integrity: sha512-FhJ+YbOSBb9/rIl2ZeE/QHEsWn7PqNYt8ARAY3kIgNGOk13g9FGyIY6JIl/xB/3TFRVoTv5as0l11weORrTekA==, + } + dependencies: + buffer-from: 1.1.2 + duplexify: 3.7.1 + through2: 2.0.5 + dev: true + + /pend@1.2.0: + resolution: + { + integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==, + } dev: true /performance-now@2.1.0: @@ -22634,6 +23993,16 @@ packages: engines: { node: ">=6" } dev: true + /pino-abstract-transport@1.0.0: + resolution: + { + integrity: sha512-c7vo5OpW4wIS42hUVcT5REsL8ZljsUfBjqV/e2sFxmFEFZiq1XLUp5EYLtuDH6PEHq9W1egWqRbnLUP5FuZmOA==, + } + dependencies: + readable-stream: 4.4.2 + split2: 4.2.0 + dev: false + /pino-abstract-transport@1.1.0: resolution: { @@ -22644,6 +24013,29 @@ packages: split2: 4.2.0 dev: false + /pino-pretty@10.2.0: + resolution: + { + integrity: sha512-tRvpyEmGtc2D+Lr3FulIZ+R1baggQ4S3xD2Ar93KixFEDx6SEAUP3W5aYuEw1C73d6ROrNcB2IXLteW8itlwhA==, + } + hasBin: true + dependencies: + colorette: 2.0.20 + dateformat: 4.6.3 + fast-copy: 3.0.1 + fast-safe-stringify: 2.1.1 + help-me: 4.2.0 + joycon: 3.1.1 + minimist: 1.2.8 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 1.1.0 + pump: 3.0.0 + readable-stream: 4.4.2 + secure-json-parse: 2.7.0 + sonic-boom: 3.7.0 + strip-json-comments: 3.1.1 + dev: false + /pino-pretty@9.4.1: resolution: { @@ -22674,6 +24066,13 @@ packages: } dev: false + /pino-std-serializers@6.2.2: + resolution: + { + integrity: sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==, + } + dev: false + /pino@6.14.0: resolution: { @@ -22690,6 +24089,26 @@ packages: sonic-boom: 1.4.1 dev: false + /pino@8.15.0: + resolution: + { + integrity: sha512-olUADJByk4twxccmAxb1RiGKOSvddHugCV3wkqjyv+3Sooa2KLrmXrKEWOKi0XPCLasRR5jBXxioE1jxUa4KzQ==, + } + hasBin: true + dependencies: + atomic-sleep: 1.0.0 + fast-redact: 3.3.0 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 1.0.0 + pino-std-serializers: 6.2.2 + process-warning: 2.3.2 + quick-format-unescaped: 4.0.4 + real-require: 0.2.0 + safe-stable-stringify: 2.4.3 + sonic-boom: 3.7.0 + thread-stream: 2.4.1 + dev: false + /pirates@4.0.6: resolution: { @@ -22761,7 +24180,7 @@ packages: integrity: sha512-rygdNSWuYzs1GxxGjq2FiJdJB1AUaKhUHP/M7PIrSjAAGuoJC5ACiJx+cZZ+hDmMalxsxOMw0Sbbx3LF8jemGg==, } peerDependencies: - sharp: ^0.33.0 + sharp: ">= 0.30.6" dependencies: blurhash: 1.1.5 encoding: 0.1.13 @@ -22823,6 +24242,19 @@ packages: "@babel/runtime": 7.23.6 dev: true + /postcss-attribute-case-insensitive@6.0.2(postcss@8.4.31): + resolution: + { + integrity: sha512-IRuCwwAAQbgaLhxQdQcIIK0dCVXg3XDUnzgKD8iwdiYdwU4rMWRWyl/W9/0nA4ihVpq5pyALiHB2veBJ0292pw==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + /postcss-attribute-case-insensitive@6.0.2(postcss@8.4.32): resolution: { @@ -22850,6 +24282,19 @@ packages: postcss-value-parser: 4.2.0 dev: false + /postcss-clamp@4.1.0(postcss@8.4.31): + resolution: + { + integrity: sha512-ry4b1Llo/9zz+PKC+030KUnPITTJAHeOwjfAyyB60eT0AorGLdzp52s31OsPRHRf8NchkgFoG2y6fCfn1IV1Ow==, + } + engines: { node: ">=7.6.0" } + peerDependencies: + postcss: ^8.4.6 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + /postcss-clamp@4.1.0(postcss@8.4.32): resolution: { @@ -22863,6 +24308,20 @@ packages: postcss-value-parser: 4.2.0 dev: false + /postcss-color-functional-notation@6.0.2(postcss@8.4.31): + resolution: + { + integrity: sha512-FsjSmlSufuiFBsIqQ++VxFmvX7zKndZpBkHmfXr4wqhvzM92FTEkAh703iqWTl1U3faTgqioIqCbfqdWiFVwtw==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/postcss-progressive-custom-properties": 3.0.2(postcss@8.4.31) + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + /postcss-color-functional-notation@6.0.2(postcss@8.4.32): resolution: { @@ -22877,6 +24336,19 @@ packages: postcss-value-parser: 4.2.0 dev: false + /postcss-color-hex-alpha@9.0.2(postcss@8.4.31): + resolution: + { + integrity: sha512-SfPjgr//VQ/DOCf80STIAsdAs7sbIbxATvVmd+Ec7JvR8onz9pjawhq3BJM3Pie40EE3TyB0P6hft16D33Nlyg==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + /postcss-color-hex-alpha@9.0.2(postcss@8.4.32): resolution: { @@ -22890,6 +24362,19 @@ packages: postcss-value-parser: 4.2.0 dev: false + /postcss-color-rebeccapurple@9.0.1(postcss@8.4.31): + resolution: + { + integrity: sha512-ds4cq5BjRieizVb2PnvbJ0omg9VCo2/KzluvoFZbxuGpsGJ5BQSD93CHBooinEtangCM5YqUOerGDl4xGmOb6Q==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + /postcss-color-rebeccapurple@9.0.1(postcss@8.4.32): resolution: { @@ -22933,6 +24418,22 @@ packages: postcss-value-parser: 4.2.0 dev: false + /postcss-custom-media@10.0.2(postcss@8.4.31): + resolution: + { + integrity: sha512-zcEFNRmDm2fZvTPdI1pIW3W//UruMcLosmMiCdpQnrCsTRzWlKQPYMa1ud9auL0BmrryKK1+JjIGn19K0UjO/w==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/cascade-layer-name-parser": 1.0.5(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + "@csstools/media-query-list-parser": 2.1.5(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + postcss: 8.4.31 + dev: false + /postcss-custom-media@10.0.2(postcss@8.4.32): resolution: { @@ -22949,6 +24450,22 @@ packages: postcss: 8.4.32 dev: false + /postcss-custom-properties@13.3.2(postcss@8.4.31): + resolution: + { + integrity: sha512-2Coszybpo8lpLY24vy2CYv9AasiZ39/bs8Imv0pWMq55Gl8NWzfc24OAo3zIX7rc6uUJAqESnVOMZ6V6lpMjJA==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/cascade-layer-name-parser": 1.0.5(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + /postcss-custom-properties@13.3.2(postcss@8.4.32): resolution: { @@ -22965,6 +24482,22 @@ packages: postcss-value-parser: 4.2.0 dev: false + /postcss-custom-selectors@7.1.6(postcss@8.4.31): + resolution: + { + integrity: sha512-svsjWRaxqL3vAzv71dV0/65P24/FB8TbPX+lWyyf9SZ7aZm4S4NhCn7N3Bg+Z5sZunG3FS8xQ80LrCU9hb37cw==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/cascade-layer-name-parser": 1.0.5(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + /postcss-custom-selectors@7.1.6(postcss@8.4.32): resolution: { @@ -22981,6 +24514,19 @@ packages: postcss-selector-parser: 6.0.13 dev: false + /postcss-dir-pseudo-class@8.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-Oy5BBi0dWPwij/IA+yDYj+/OBMQ9EPqAzTHeSNUYrUWdll/PRJmcbiUj0MNcsBi681I1gcSTLvMERPaXzdbvJg==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + /postcss-dir-pseudo-class@8.0.0(postcss@8.4.32): resolution: { @@ -23042,6 +24588,20 @@ packages: postcss: 8.4.32 dev: false + /postcss-double-position-gradients@5.0.2(postcss@8.4.31): + resolution: + { + integrity: sha512-KTbvdOOy8z8zb0BTkEg4/1vqlRlApdvjw8/pFoehgQl0WVO+fezDGlvo0B8xRA+XccA7ohkQCULKNsiNOx70Cw==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/postcss-progressive-custom-properties": 3.0.2(postcss@8.4.31) + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + /postcss-double-position-gradients@5.0.2(postcss@8.4.32): resolution: { @@ -23056,66 +24616,155 @@ packages: postcss-value-parser: 4.2.0 dev: false - /postcss-focus-visible@9.0.0(postcss@8.4.32): + /postcss-focus-visible@9.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-zA4TbVaIaT8npZBEROhZmlc+GBKE8AELPHXE7i4TmIUEQhw/P/mSJfY9t6tBzpQ1rABeGtEOHYrW4SboQeONMQ==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + + /postcss-focus-visible@9.0.0(postcss@8.4.32): + resolution: + { + integrity: sha512-zA4TbVaIaT8npZBEROhZmlc+GBKE8AELPHXE7i4TmIUEQhw/P/mSJfY9t6tBzpQ1rABeGtEOHYrW4SboQeONMQ==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.32 + postcss-selector-parser: 6.0.13 + dev: false + + /postcss-focus-within@8.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-E7+J9nuQzZaA37D/MUZMX1K817RZGDab8qw6pFwzAkDd/QtlWJ9/WTKmzewNiuxzeq6WWY7ATiRePVoDKp+DnA==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + + /postcss-focus-within@8.0.0(postcss@8.4.32): + resolution: + { + integrity: sha512-E7+J9nuQzZaA37D/MUZMX1K817RZGDab8qw6pFwzAkDd/QtlWJ9/WTKmzewNiuxzeq6WWY7ATiRePVoDKp+DnA==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.32 + postcss-selector-parser: 6.0.13 + dev: false + + /postcss-font-variant@5.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA==, + } + peerDependencies: + postcss: ^8.1.0 + dependencies: + postcss: 8.4.31 + dev: false + + /postcss-font-variant@5.0.0(postcss@8.4.32): + resolution: + { + integrity: sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA==, + } + peerDependencies: + postcss: ^8.1.0 + dependencies: + postcss: 8.4.32 + dev: false + + /postcss-gap-properties@5.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-YjsEEL6890P7MCv6fch6Am1yq0EhQCJMXyT4LBohiu87+4/WqR7y5W3RIv53WdA901hhytgRvjlrAhibhW4qsA==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + dev: false + + /postcss-gap-properties@5.0.0(postcss@8.4.32): resolution: { - integrity: sha512-zA4TbVaIaT8npZBEROhZmlc+GBKE8AELPHXE7i4TmIUEQhw/P/mSJfY9t6tBzpQ1rABeGtEOHYrW4SboQeONMQ==, + integrity: sha512-YjsEEL6890P7MCv6fch6Am1yq0EhQCJMXyT4LBohiu87+4/WqR7y5W3RIv53WdA901hhytgRvjlrAhibhW4qsA==, } engines: { node: ^14 || ^16 || >=18 } peerDependencies: postcss: ^8.4 dependencies: postcss: 8.4.32 - postcss-selector-parser: 6.0.13 dev: false - /postcss-focus-within@8.0.0(postcss@8.4.32): + /postcss-image-set-function@6.0.1(postcss@8.4.31): resolution: { - integrity: sha512-E7+J9nuQzZaA37D/MUZMX1K817RZGDab8qw6pFwzAkDd/QtlWJ9/WTKmzewNiuxzeq6WWY7ATiRePVoDKp+DnA==, + integrity: sha512-VlZncC9hhZ5tg0JllY4g6Z28BeoPO8DIkelioEEkXL0AA0IORlqYpTi2L8TUnl4YQrlwvBgxVy+mdZJw5R/cIQ==, } engines: { node: ^14 || ^16 || >=18 } peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.32 - postcss-selector-parser: 6.0.13 + postcss: 8.4.31 + postcss-value-parser: 4.2.0 dev: false - /postcss-font-variant@5.0.0(postcss@8.4.32): + /postcss-image-set-function@6.0.1(postcss@8.4.32): resolution: { - integrity: sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA==, + integrity: sha512-VlZncC9hhZ5tg0JllY4g6Z28BeoPO8DIkelioEEkXL0AA0IORlqYpTi2L8TUnl4YQrlwvBgxVy+mdZJw5R/cIQ==, } + engines: { node: ^14 || ^16 || >=18 } peerDependencies: - postcss: ^8.1.0 + postcss: ^8.4 dependencies: postcss: 8.4.32 + postcss-value-parser: 4.2.0 dev: false - /postcss-gap-properties@5.0.0(postcss@8.4.32): + /postcss-initial@4.0.1(postcss@8.4.31): resolution: { - integrity: sha512-YjsEEL6890P7MCv6fch6Am1yq0EhQCJMXyT4LBohiu87+4/WqR7y5W3RIv53WdA901hhytgRvjlrAhibhW4qsA==, + integrity: sha512-0ueD7rPqX8Pn1xJIjay0AZeIuDoF+V+VvMt/uOnn+4ezUKhZM/NokDeP6DwMNyIoYByuN/94IQnt5FEkaN59xQ==, } - engines: { node: ^14 || ^16 || >=18 } peerDependencies: - postcss: ^8.4 + postcss: ^8.0.0 dependencies: - postcss: 8.4.32 + postcss: 8.4.31 dev: false - /postcss-image-set-function@6.0.1(postcss@8.4.32): + /postcss-lab-function@6.0.7(postcss@8.4.31): resolution: { - integrity: sha512-VlZncC9hhZ5tg0JllY4g6Z28BeoPO8DIkelioEEkXL0AA0IORlqYpTi2L8TUnl4YQrlwvBgxVy+mdZJw5R/cIQ==, + integrity: sha512-4d1lhDVPukHFqkMv4G5vVcK+tgY52vwb5uR1SWKOaO5389r2q8fMxBWuXSW+YtbCOEGP0/X9KERi9E9le2pJuw==, } engines: { node: ^14 || ^16 || >=18 } peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.32 - postcss-value-parser: 4.2.0 + "@csstools/css-color-parser": 1.4.0(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1) + "@csstools/css-parser-algorithms": 2.3.2(@csstools/css-tokenizer@2.2.1) + "@csstools/css-tokenizer": 2.2.1 + "@csstools/postcss-progressive-custom-properties": 3.0.2(postcss@8.4.31) + postcss: 8.4.31 dev: false /postcss-lab-function@6.0.7(postcss@8.4.32): @@ -23134,6 +24783,23 @@ packages: postcss: 8.4.32 dev: false + /postcss-loader@6.2.1(postcss@8.4.31)(webpack@5.89.0): + resolution: + { + integrity: sha512-WbbYpmAaKcux/P66bZ40bpWsBucjx/TTgVVzRZ9yUO8yQfVBlameJ0ZGVaPfH64hNSBh63a+ICP5nqOpBA0w+Q==, + } + engines: { node: ">= 12.13.0" } + peerDependencies: + postcss: ^7.0.0 || ^8.0.1 + webpack: ^5.0.0 + dependencies: + cosmiconfig: 7.1.0 + klona: 2.0.6 + postcss: 8.4.31 + semver: 7.5.4 + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) + dev: false + /postcss-loader@6.2.1(postcss@8.4.32)(webpack@5.89.0): resolution: { @@ -23170,6 +24836,19 @@ packages: - typescript dev: true + /postcss-logical@7.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-zYf3vHkoW82f5UZTEXChTJvH49Yl9X37axTZsJGxrCG2kOUwtaAoz9E7tqYg0lsIoJLybaL8fk/2mOi81zVIUw==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + /postcss-logical@7.0.0(postcss@8.4.32): resolution: { @@ -23318,6 +24997,20 @@ packages: icss-utils: 5.1.0(postcss@8.4.32) postcss: 8.4.32 + /postcss-nesting@12.0.1(postcss@8.4.31): + resolution: + { + integrity: sha512-6LCqCWP9pqwXw/njMvNK0hGY44Fxc4B2EsGbn6xDcxbNRzP8GYoxT7yabVVMLrX3quqOJ9hg2jYMsnkedOf8pA==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/selector-specificity": 3.0.0(postcss-selector-parser@6.0.13) + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + /postcss-nesting@12.0.1(postcss@8.4.32): resolution: { @@ -23449,6 +25142,18 @@ packages: postcss-value-parser: 4.2.0 dev: false + /postcss-opacity-percentage@2.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-lyDrCOtntq5Y1JZpBFzIWm2wG9kbEdujpNt4NLannF+J9c8CgFIzPa80YQfdza+Y+yFfzbYj/rfoOsYsooUWTQ==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.2 + dependencies: + postcss: 8.4.31 + dev: false + /postcss-opacity-percentage@2.0.0(postcss@8.4.32): resolution: { @@ -23475,6 +25180,19 @@ packages: postcss-value-parser: 4.2.0 dev: false + /postcss-overflow-shorthand@5.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-2rlxDyeSics/hC2FuMdPnWiP9WUPZ5x7FTuArXLFVpaSQ2woPSfZS4RD59HuEokbZhs/wPUQJ1E3MT6zVv94MQ==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + /postcss-overflow-shorthand@5.0.0(postcss@8.4.32): resolution: { @@ -23488,6 +25206,17 @@ packages: postcss-value-parser: 4.2.0 dev: false + /postcss-page-break@3.0.4(postcss@8.4.31): + resolution: + { + integrity: sha512-1JGu8oCjVXLa9q9rFTo4MbeeA5FMe00/9C7lN4va606Rdb+HkxXtXsmEDrIraQ11fGz/WvKWa8gMuCKkrXpTsQ==, + } + peerDependencies: + postcss: ^8 + dependencies: + postcss: 8.4.31 + dev: false + /postcss-page-break@3.0.4(postcss@8.4.32): resolution: { @@ -23499,6 +25228,19 @@ packages: postcss: 8.4.32 dev: false + /postcss-place@9.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-qLEPD9VPH5opDVemwmRaujODF9nExn24VOC3ghgVLEvfYN7VZLwJHes0q/C9YR5hI2UC3VgBE8Wkdp1TxCXhtg==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + dev: false + /postcss-place@9.0.0(postcss@8.4.32): resolution: { @@ -23512,6 +25254,74 @@ packages: postcss-value-parser: 4.2.0 dev: false + /postcss-preset-env@9.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-L0x/Nluq+/FkidIYjU7JtkmRL2/QmXuYkxuM3C5y9VG3iGLljF9PuBHQ7kzKRoVfwnca0VNN0Zb3a/bxVJ12vA==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + "@csstools/postcss-cascade-layers": 4.0.1(postcss@8.4.31) + "@csstools/postcss-color-function": 2.2.3(postcss@8.4.31) + "@csstools/postcss-color-mix-function": 1.0.3(postcss@8.4.31) + "@csstools/postcss-font-format-keywords": 3.0.0(postcss@8.4.31) + "@csstools/postcss-gradients-interpolation-method": 4.0.7(postcss@8.4.31) + "@csstools/postcss-hwb-function": 3.0.6(postcss@8.4.31) + "@csstools/postcss-ic-unit": 3.0.2(postcss@8.4.31) + "@csstools/postcss-is-pseudo-class": 4.0.3(postcss@8.4.31) + "@csstools/postcss-logical-float-and-clear": 2.0.0(postcss@8.4.31) + "@csstools/postcss-logical-resize": 2.0.0(postcss@8.4.31) + "@csstools/postcss-logical-viewport-units": 2.0.3(postcss@8.4.31) + "@csstools/postcss-media-minmax": 1.1.0(postcss@8.4.31) + "@csstools/postcss-media-queries-aspect-ratio-number-values": 2.0.3(postcss@8.4.31) + "@csstools/postcss-nested-calc": 3.0.0(postcss@8.4.31) + "@csstools/postcss-normalize-display-values": 3.0.1(postcss@8.4.31) + "@csstools/postcss-oklab-function": 3.0.7(postcss@8.4.31) + "@csstools/postcss-progressive-custom-properties": 3.0.2(postcss@8.4.31) + "@csstools/postcss-relative-color-syntax": 2.0.7(postcss@8.4.31) + "@csstools/postcss-scope-pseudo-class": 3.0.0(postcss@8.4.31) + "@csstools/postcss-stepped-value-functions": 3.0.2(postcss@8.4.31) + "@csstools/postcss-text-decoration-shorthand": 3.0.3(postcss@8.4.31) + "@csstools/postcss-trigonometric-functions": 3.0.2(postcss@8.4.31) + "@csstools/postcss-unset-value": 3.0.0(postcss@8.4.31) + autoprefixer: 10.4.16(postcss@8.4.31) + browserslist: 4.22.2 + css-blank-pseudo: 6.0.0(postcss@8.4.31) + css-has-pseudo: 6.0.0(postcss@8.4.31) + css-prefers-color-scheme: 9.0.0(postcss@8.4.31) + cssdb: 7.9.1 + postcss: 8.4.31 + postcss-attribute-case-insensitive: 6.0.2(postcss@8.4.31) + postcss-clamp: 4.1.0(postcss@8.4.31) + postcss-color-functional-notation: 6.0.2(postcss@8.4.31) + postcss-color-hex-alpha: 9.0.2(postcss@8.4.31) + postcss-color-rebeccapurple: 9.0.1(postcss@8.4.31) + postcss-custom-media: 10.0.2(postcss@8.4.31) + postcss-custom-properties: 13.3.2(postcss@8.4.31) + postcss-custom-selectors: 7.1.6(postcss@8.4.31) + postcss-dir-pseudo-class: 8.0.0(postcss@8.4.31) + postcss-double-position-gradients: 5.0.2(postcss@8.4.31) + postcss-focus-visible: 9.0.0(postcss@8.4.31) + postcss-focus-within: 8.0.0(postcss@8.4.31) + postcss-font-variant: 5.0.0(postcss@8.4.31) + postcss-gap-properties: 5.0.0(postcss@8.4.31) + postcss-image-set-function: 6.0.1(postcss@8.4.31) + postcss-initial: 4.0.1(postcss@8.4.31) + postcss-lab-function: 6.0.7(postcss@8.4.31) + postcss-logical: 7.0.0(postcss@8.4.31) + postcss-nesting: 12.0.1(postcss@8.4.31) + postcss-opacity-percentage: 2.0.0(postcss@8.4.31) + postcss-overflow-shorthand: 5.0.0(postcss@8.4.31) + postcss-page-break: 3.0.4(postcss@8.4.31) + postcss-place: 9.0.0(postcss@8.4.31) + postcss-pseudo-class-any-link: 9.0.0(postcss@8.4.31) + postcss-replace-overflow-wrap: 4.0.0(postcss@8.4.31) + postcss-selector-not: 7.0.1(postcss@8.4.31) + postcss-value-parser: 4.2.0 + dev: false + /postcss-preset-env@9.3.0(postcss@8.4.32): resolution: { @@ -23584,6 +25394,19 @@ packages: postcss-value-parser: 4.2.0 dev: false + /postcss-pseudo-class-any-link@9.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-QNCYIL98VKFKY6HGDEJpF6+K/sg9bxcUYnOmNHJxZS5wsFDFaVoPeG68WAuhsqwbIBSo/b9fjEnTwY2mTSD+uA==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + /postcss-pseudo-class-any-link@9.0.0(postcss@8.4.32): resolution: { @@ -23624,6 +25447,17 @@ packages: postcss-value-parser: 4.2.0 dev: false + /postcss-replace-overflow-wrap@4.0.0(postcss@8.4.31): + resolution: + { + integrity: sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw==, + } + peerDependencies: + postcss: ^8.0.3 + dependencies: + postcss: 8.4.31 + dev: false + /postcss-replace-overflow-wrap@4.0.0(postcss@8.4.32): resolution: { @@ -23635,6 +25469,19 @@ packages: postcss: 8.4.32 dev: false + /postcss-selector-not@7.0.1(postcss@8.4.31): + resolution: + { + integrity: sha512-1zT5C27b/zeJhchN7fP0kBr16Cc61mu7Si9uWWLoA3Px/D9tIJPKchJCkUH3tPO5D0pCFmGeApAv8XpXBQJ8SQ==, + } + engines: { node: ^14 || ^16 || >=18 } + peerDependencies: + postcss: ^8.4 + dependencies: + postcss: 8.4.31 + postcss-selector-parser: 6.0.13 + dev: false + /postcss-selector-not@7.0.1(postcss@8.4.32): resolution: { @@ -23850,6 +25697,13 @@ packages: } dev: false + /process-warning@2.3.2: + resolution: + { + integrity: sha512-n9wh8tvBe5sFmsqlg+XQhaQLumwpqoAUruLwjCopgTmUBjJ/fjtBsJzKleCaIGBOMXYEhp1YfKl4d7rJ5ZKJGA==, + } + dev: false + /process@0.11.10: resolution: { @@ -24212,6 +26066,25 @@ packages: react: 18.2.0 dev: false + /react-datepicker@4.16.0(react-dom@18.2.0)(react@18.2.0): + resolution: + { + integrity: sha512-hNQ0PAg/LQoVbDUO/RWAdm/RYmPhN3cz7LuQ3hqbs24OSp69QCiKOJRrQ4jk1gv1jNR5oYu8SjjgfDh8q6Q1yw==, + } + peerDependencies: + react: ^16.9.0 || ^17 || ^18 + react-dom: ^16.9.0 || ^17 || ^18 + dependencies: + "@popperjs/core": 2.11.8 + classnames: 2.3.2 + date-fns: 2.30.0 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-onclickoutside: 6.13.0(react-dom@18.2.0)(react@18.2.0) + react-popper: 2.3.0(@popperjs/core@2.11.8)(react-dom@18.2.0)(react@18.2.0) + dev: false + /react-datepicker@4.24.0(react-dom@18.2.0)(react@18.2.0): resolution: { @@ -24231,6 +26104,25 @@ packages: react-popper: 2.3.0(@popperjs/core@2.11.8)(react-dom@18.2.0)(react@18.2.0) dev: false + /react-diff-viewer-continued@3.2.6(react-dom@18.2.0)(react@18.2.0): + resolution: + { + integrity: sha512-GrzyqQnjIMoej+jMjWvtVSsQqhXgzEGqpXlJ2dAGfOk7Q26qcm8Gu6xtI430PBUyZsERe8BJSQf+7VZZo8IBNQ==, + } + engines: { node: ">= 8" } + peerDependencies: + react: ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + react-dom: ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + dependencies: + "@emotion/css": 11.11.2 + classnames: 2.3.2 + diff: 5.1.0 + memoize-one: 6.0.0 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /react-diff-viewer-continued@3.3.1(react-dom@18.2.0)(react@18.2.0): resolution: { @@ -24376,6 +26268,17 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /react-image-crop@10.1.8(react@18.2.0): + resolution: + { + integrity: sha512-4rb8XtXNx7ZaOZarKKnckgz4xLMvds/YrU6mpJfGhGAsy2Mg4mIw1x+DCCGngVGq2soTBVVOxx2s/C6mTX9+pA==, + } + peerDependencies: + react: ">=16.13.1" + dependencies: + react: 18.2.0 + dev: false + /react-is@16.13.1: resolution: { @@ -24562,6 +26465,30 @@ packages: tiny-warning: 1.0.3 dev: false + /react-select@5.7.4(@types/react@18.2.45)(react-dom@18.2.0)(react@18.2.0): + resolution: + { + integrity: sha512-NhuE56X+p9QDFh4BgeygHFIvJJszO1i1KSkg/JPcIJrbovyRtI+GuOEa4XzFCEpZRAEoEI8u/cAHK+jG/PgUzQ==, + } + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + "@babel/runtime": 7.23.6 + "@emotion/cache": 11.11.0 + "@emotion/react": 11.11.1(@types/react@18.2.45)(react@18.2.0) + "@floating-ui/dom": 1.5.3 + "@types/react-transition-group": 4.4.10 + memoize-one: 6.0.0 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-transition-group: 4.4.5(react-dom@18.2.0)(react@18.2.0) + use-isomorphic-layout-effect: 1.1.2(@types/react@18.2.45)(react@18.2.0) + transitivePeerDependencies: + - "@types/react" + dev: false + /react-select@5.8.0(@types/react@18.2.45)(react-dom@18.2.0)(react@18.2.0): resolution: { @@ -24880,6 +26807,14 @@ packages: } dev: false + /real-require@0.2.0: + resolution: + { + integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==, + } + engines: { node: ">= 12.13.0" } + dev: false + /recast@0.23.4: resolution: { @@ -25142,6 +27077,17 @@ packages: dependencies: resolve-from: 5.0.0 + /resolve-dir@1.0.1: + resolution: + { + integrity: sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==, + } + engines: { node: ">=0.10.0" } + dependencies: + expand-tilde: 2.0.2 + global-modules: 1.0.0 + dev: false + /resolve-from@4.0.0: resolution: { @@ -25168,7 +27114,6 @@ packages: { integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==, } - dev: false /resolve-url-loader@5.0.0: resolution: @@ -25397,6 +27342,14 @@ packages: get-intrinsic: 1.2.2 is-regex: 1.1.4 + /safe-stable-stringify@2.4.3: + resolution: + { + integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==, + } + engines: { node: ">=10" } + dev: false + /safer-buffer@2.1.2: resolution: { @@ -25450,34 +27403,19 @@ packages: neo-async: 2.6.2 sass: 1.69.5 webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) - dev: false - /sass-loader@12.6.0(webpack@5.89.0): + /sass@1.69.4: resolution: { - integrity: sha512-oLTaH0YCtX4cfnJZxKSLAyglED0naiYfNG1iXfU5w1LNZ+ukoA5DtyDIN5zmKVZwYNJP4KRc5Y3hkWga+7tYfA==, + integrity: sha512-+qEreVhqAy8o++aQfCJwp0sklr2xyEzkm9Pp/Igu9wNPoe7EZEQ8X/MBvvXggI2ql607cxKg/RKOwDj6pp2XDA==, } - engines: { node: ">= 12.13.0" } - peerDependencies: - fibers: ">= 3.1.0" - node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 - sass: ^1.3.0 - sass-embedded: "*" - webpack: ^5.0.0 - peerDependenciesMeta: - fibers: - optional: true - node-sass: - optional: true - sass: - optional: true - sass-embedded: - optional: true + engines: { node: ">=14.0.0" } + hasBin: true dependencies: - klona: 2.0.6 - neo-async: 2.6.2 - webpack: 5.89.0(@swc/core@1.3.100)(esbuild@0.18.20) - dev: true + chokidar: 3.5.3 + immutable: 4.3.4 + source-map-js: 1.0.2 + dev: false /sass@1.69.5: resolution: @@ -25490,7 +27428,6 @@ packages: chokidar: 3.5.3 immutable: 4.3.4 source-map-js: 1.0.2 - dev: false /sax@1.2.1: resolution: @@ -25751,6 +27688,39 @@ packages: "@img/sharp-wasm32": 0.33.0 "@img/sharp-win32-ia32": 0.33.0 "@img/sharp-win32-x64": 0.33.0 + dev: false + + /sharp@0.33.1: + resolution: + { + integrity: sha512-iAYUnOdTqqZDb3QjMneBKINTllCJDZ3em6WaWy7NPECM4aHncvqHRm0v0bN9nqJxMiwamv5KIdauJ6lUzKDpTQ==, + } + engines: { libvips: ">=8.15.0", node: ^18.17.0 || ^20.3.0 || >=21.0.0 } + requiresBuild: true + dependencies: + color: 4.2.3 + detect-libc: 2.0.2 + semver: 7.5.4 + optionalDependencies: + "@img/sharp-darwin-arm64": 0.33.1 + "@img/sharp-darwin-x64": 0.33.1 + "@img/sharp-libvips-darwin-arm64": 1.0.0 + "@img/sharp-libvips-darwin-x64": 1.0.0 + "@img/sharp-libvips-linux-arm": 1.0.0 + "@img/sharp-libvips-linux-arm64": 1.0.0 + "@img/sharp-libvips-linux-s390x": 1.0.0 + "@img/sharp-libvips-linux-x64": 1.0.0 + "@img/sharp-libvips-linuxmusl-arm64": 1.0.0 + "@img/sharp-libvips-linuxmusl-x64": 1.0.0 + "@img/sharp-linux-arm": 0.33.1 + "@img/sharp-linux-arm64": 0.33.1 + "@img/sharp-linux-s390x": 0.33.1 + "@img/sharp-linux-x64": 0.33.1 + "@img/sharp-linuxmusl-arm64": 0.33.1 + "@img/sharp-linuxmusl-x64": 0.33.1 + "@img/sharp-wasm32": 0.33.1 + "@img/sharp-win32-ia32": 0.33.1 + "@img/sharp-win32-x64": 0.33.1 /shebang-command@1.2.0: resolution: @@ -25876,7 +27846,6 @@ packages: "@polka/url": 1.0.0-next.24 mrmime: 1.0.1 totalist: 3.0.1 - dev: false /sisteransi@1.0.5: resolution: @@ -26564,7 +28533,7 @@ packages: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) dev: false /style-loader@3.3.3(webpack@5.89.0): @@ -26699,8 +28668,20 @@ packages: webpack: ">=2" dependencies: "@swc/core": 1.3.100 - webpack: 5.89.0(@swc/core@1.3.100)(esbuild@0.18.20) - dev: true + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) + + /swc-loader@0.2.3(@swc/core@1.3.76)(webpack@5.89.0): + resolution: + { + integrity: sha512-D1p6XXURfSPleZZA/Lipb3A8pZ17fP4NObZvFCDjK/OKljroqDpPmsBdTraWhVBqUNpcWBQY1imWdoPScRlQ7A==, + } + peerDependencies: + "@swc/core": ^1.2.147 + webpack: ">=2" + dependencies: + "@swc/core": 1.3.76 + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) + dev: false /swc-loader@0.2.3(@swc/core@1.3.78)(webpack@5.89.0): resolution: @@ -26715,6 +28696,19 @@ packages: webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) dev: false + /swc-minify-webpack-plugin@2.1.1(@swc/core@1.3.100)(webpack@5.89.0): + resolution: + { + integrity: sha512-/9ud/libNWUC5p71vXWhW/O2Nc0essW8D9pY4P4ol0ceM8OcFbNr41R9YFqTkmktqUL2t0WwXau+FkR4T1+PJA==, + } + peerDependencies: + "@swc/core": ^1.0.0 + webpack: ^5.0.0 + dependencies: + "@swc/core": 1.3.100 + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) + dev: false + /swc-minify-webpack-plugin@2.1.1(@swc/core@1.3.78)(webpack@5.89.0): resolution: { @@ -26911,115 +28905,6 @@ packages: serialize-javascript: 6.0.1 terser: 5.26.0 webpack: 5.89.0(@swc/core@1.3.100)(esbuild@0.18.20) - dev: true - - /terser-webpack-plugin@5.3.9(@swc/core@1.3.100)(webpack@5.89.0): - resolution: - { - integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==, - } - engines: { node: ">= 10.13.0" } - peerDependencies: - "@swc/core": "*" - esbuild: "*" - uglify-js: "*" - webpack: ^5.1.0 - peerDependenciesMeta: - "@swc/core": - optional: true - esbuild: - optional: true - uglify-js: - optional: true - dependencies: - "@jridgewell/trace-mapping": 0.3.20 - "@swc/core": 1.3.100 - jest-worker: 27.5.1 - schema-utils: 3.3.0 - serialize-javascript: 6.0.1 - terser: 5.26.0 - webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) - - /terser-webpack-plugin@5.3.9(@swc/core@1.3.78)(webpack@5.89.0): - resolution: - { - integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==, - } - engines: { node: ">= 10.13.0" } - peerDependencies: - "@swc/core": "*" - esbuild: "*" - uglify-js: "*" - webpack: ^5.1.0 - peerDependenciesMeta: - "@swc/core": - optional: true - esbuild: - optional: true - uglify-js: - optional: true - dependencies: - "@jridgewell/trace-mapping": 0.3.20 - "@swc/core": 1.3.78 - jest-worker: 27.5.1 - schema-utils: 3.3.0 - serialize-javascript: 6.0.1 - terser: 5.26.0 - webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) - - /terser-webpack-plugin@5.3.9(esbuild@0.18.20)(webpack@5.89.0): - resolution: - { - integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==, - } - engines: { node: ">= 10.13.0" } - peerDependencies: - "@swc/core": "*" - esbuild: "*" - uglify-js: "*" - webpack: ^5.1.0 - peerDependenciesMeta: - "@swc/core": - optional: true - esbuild: - optional: true - uglify-js: - optional: true - dependencies: - "@jridgewell/trace-mapping": 0.3.20 - esbuild: 0.18.20 - jest-worker: 27.5.1 - schema-utils: 3.3.0 - serialize-javascript: 6.0.1 - terser: 5.26.0 - webpack: 5.89.0(esbuild@0.18.20) - - /terser-webpack-plugin@5.3.9(webpack@5.89.0): - resolution: - { - integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==, - } - engines: { node: ">= 10.13.0" } - peerDependencies: - "@swc/core": "*" - esbuild: "*" - uglify-js: "*" - webpack: ^5.1.0 - peerDependenciesMeta: - "@swc/core": - optional: true - esbuild: - optional: true - uglify-js: - optional: true - dependencies: - "@jridgewell/trace-mapping": 0.3.20 - jest-worker: 27.5.1 - schema-utils: 3.3.0 - serialize-javascript: 6.0.1 - terser: 5.26.0 - webpack: 5.89.0 - dev: true /terser@5.26.0: resolution: @@ -27070,6 +28955,15 @@ packages: any-promise: 1.3.0 dev: false + /thread-stream@2.4.1: + resolution: + { + integrity: sha512-d/Ex2iWd1whipbT681JmTINKw0ZwOUBZm7+Gjs64DHuX34mmw8vJL2bFAaNacaW72zYiTJxSHi5abUuOi5nsfg==, + } + dependencies: + real-require: 0.2.0 + dev: false + /through2@0.4.2: resolution: { @@ -27225,7 +29119,6 @@ packages: integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==, } engines: { node: ">=6" } - dev: false /tough-cookie@2.5.0: resolution: @@ -27991,7 +29884,7 @@ packages: loader-utils: 2.0.4 mime-types: 2.1.35 schema-utils: 3.3.0 - webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) dev: false /url-parse@1.5.10: @@ -28193,13 +30086,20 @@ packages: hasBin: true dev: false + /uuid@9.0.0: + resolution: + { + integrity: sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==, + } + hasBin: true + dev: false + /uuid@9.0.1: resolution: { integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==, } hasBin: true - dev: true /v8-compile-cache-lib@3.0.1: resolution: @@ -29426,9 +31326,8 @@ packages: transitivePeerDependencies: - bufferutil - utf-8-validate - dev: false - /webpack-cli@4.10.0(webpack@5.89.0): + /webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0): resolution: { integrity: sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==, @@ -29463,6 +31362,7 @@ packages: interpret: 2.2.0 rechoir: 0.7.1 webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) + webpack-bundle-analyzer: 4.10.1 webpack-merge: 5.10.0 /webpack-dev-middleware@6.0.1(webpack@5.89.0): @@ -29479,7 +31379,7 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) dev: false /webpack-dev-middleware@6.1.1(webpack@5.89.0): @@ -29554,49 +31454,6 @@ packages: } dev: true - /webpack@5.89.0: - resolution: - { - integrity: sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==, - } - engines: { node: ">=10.13.0" } - hasBin: true - peerDependencies: - webpack-cli: "*" - peerDependenciesMeta: - webpack-cli: - optional: true - dependencies: - "@types/eslint-scope": 3.7.7 - "@types/estree": 1.0.5 - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/wasm-edit": 1.11.6 - "@webassemblyjs/wasm-parser": 1.11.6 - acorn: 8.11.2 - acorn-import-assertions: 1.9.0(acorn@8.11.2) - browserslist: 4.22.2 - chrome-trace-event: 1.0.3 - enhanced-resolve: 5.15.0 - es-module-lexer: 1.4.1 - eslint-scope: 5.1.1 - events: 3.3.0 - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - json-parse-even-better-errors: 2.3.1 - loader-runner: 4.3.0 - mime-types: 2.1.35 - neo-async: 2.6.2 - schema-utils: 3.3.0 - tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(webpack@5.89.0) - watchpack: 2.4.0 - webpack-sources: 3.2.3 - transitivePeerDependencies: - - "@swc/core" - - esbuild - - uglify-js - dev: true - /webpack@5.89.0(@swc/core@1.3.100)(esbuild@0.18.20): resolution: { @@ -29638,7 +31495,6 @@ packages: - "@swc/core" - esbuild - uglify-js - dev: true /webpack@5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0): resolution: @@ -29674,9 +31530,9 @@ packages: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(esbuild@0.18.20)(webpack@5.89.0) watchpack: 2.4.0 - webpack-cli: 4.10.0(webpack@5.89.0) + webpack-cli: 4.10.0(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0) webpack-sources: 3.2.3 transitivePeerDependencies: - "@swc/core" @@ -29717,9 +31573,9 @@ packages: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(@swc/core@1.3.78)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(esbuild@0.18.20)(webpack@5.89.0) watchpack: 2.4.0 - webpack-cli: 4.10.0(webpack@5.89.0) + webpack-cli: 4.10.0(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0) webpack-sources: 3.2.3 transitivePeerDependencies: - "@swc/core" @@ -29760,7 +31616,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(esbuild@0.18.20)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(esbuild@0.18.20)(webpack@5.89.0) watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -29936,7 +31792,6 @@ packages: hasBin: true dependencies: isexe: 2.0.0 - dev: true /which@2.0.2: resolution: @@ -30082,7 +31937,6 @@ packages: optional: true utf-8-validate: optional: true - dev: false /ws@8.15.1: resolution: @@ -30334,3 +32188,7 @@ packages: { integrity: sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==, } + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false From b3f8cab4624fadd541e6b744e649fe7768f62771 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 9 Jan 2024 14:44:06 +0300 Subject: [PATCH 02/43] Fix styles --- apps/charterafrica/payload.config.ts | 18 +++++++++--------- apps/charterafrica/server.ts | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index b53e39ef9..a23b8117a 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -8,7 +8,7 @@ import dotenv from "dotenv"; import { buildConfig } from "payload/config"; import { slateEditor } from "@payloadcms/richtext-slate"; import { mongooseAdapter } from "@payloadcms/db-mongodb"; -import { webpackBundler } from '@payloadcms/bundler-webpack' +import { webpackBundler } from "@payloadcms/bundler-webpack"; import Authors from "./src/payload/collections/Authors"; import CommunityPlatforms from "./src/payload/collections/CommunityPlatforms"; @@ -79,7 +79,7 @@ export default buildConfig({ editor: slateEditor({}), db: mongooseAdapter({ url: process.env.MONGO_URL, - migrationDir: "./migrations/v2" + migrationDir: "./migrations/v2", }), collections: [ Authors, @@ -111,12 +111,12 @@ export default buildConfig({ ] as GlobalConfig[], ...(locales?.length ? { - localization: { - locales, - defaultLocale, - fallback: true, - }, - } + localization: { + locales, + defaultLocale, + fallback: true, + }, + } : undefined), admin: { @@ -132,7 +132,7 @@ export default buildConfig({ }, }, }), - bundler: webpackBundler() + bundler: webpackBundler(), }, cors, csrf, diff --git a/apps/charterafrica/server.ts b/apps/charterafrica/server.ts index 7055beda2..2a1f2e85e 100644 --- a/apps/charterafrica/server.ts +++ b/apps/charterafrica/server.ts @@ -40,15 +40,15 @@ const start = async (): Promise => { localPayload = await payload.init({ ...(sendGridAPIKey ? { - email: { - transportOptions: nodemailerSendgrid({ - apiKey: sendGridAPIKey, - }), - fromName: process.env.SENDGRID_FROM_NAME || "Admin", - fromAddress: - process.env.SENDGRID_FROM_EMAIL || "admin@example.com", - }, - } + email: { + transportOptions: nodemailerSendgrid({ + apiKey: sendGridAPIKey, + }), + fromName: process.env.SENDGRID_FROM_NAME || "Admin", + fromAddress: + process.env.SENDGRID_FROM_EMAIL || "admin@example.com", + }, + } : undefined), secret: process.env.PAYLOAD_SECRET_KEY, express: server, From 594c216ce881e53fc84be9890c6b096fd07f8dcf Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Wed, 10 Jan 2024 13:55:19 +0300 Subject: [PATCH 03/43] update migrations --- apps/charterafrica/payload.config.ts | 14 +-- apps/charterafrica/server.ts | 21 ++-- .../20240110_095710_versions_v1_v2.ts | 107 ++++++++++++++++++ 3 files changed, 123 insertions(+), 19 deletions(-) create mode 100644 apps/charterafrica/src/migrations/20240110_095710_versions_v1_v2.ts diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index a23b8117a..754a6f198 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -79,7 +79,7 @@ export default buildConfig({ editor: slateEditor({}), db: mongooseAdapter({ url: process.env.MONGO_URL, - migrationDir: "./migrations/v2", + migrationDir: "./src/migrations", }), collections: [ Authors, @@ -111,12 +111,12 @@ export default buildConfig({ ] as GlobalConfig[], ...(locales?.length ? { - localization: { - locales, - defaultLocale, - fallback: true, - }, - } + localization: { + locales, + defaultLocale, + fallback: true, + }, + } : undefined), admin: { diff --git a/apps/charterafrica/server.ts b/apps/charterafrica/server.ts index 2a1f2e85e..791f2c7b5 100644 --- a/apps/charterafrica/server.ts +++ b/apps/charterafrica/server.ts @@ -7,9 +7,6 @@ import next from "next"; import nodemailerSendgrid from "nodemailer-sendgrid"; import payload from "payload"; import { Payload } from "payload/dist/payload"; -import dotenv from "dotenv"; - -dotenv.config({ path: path.resolve(__dirname, "./.env.local") }); const projectDir = process.cwd(); loadEnvConfig(projectDir); @@ -40,15 +37,15 @@ const start = async (): Promise => { localPayload = await payload.init({ ...(sendGridAPIKey ? { - email: { - transportOptions: nodemailerSendgrid({ - apiKey: sendGridAPIKey, - }), - fromName: process.env.SENDGRID_FROM_NAME || "Admin", - fromAddress: - process.env.SENDGRID_FROM_EMAIL || "admin@example.com", - }, - } + email: { + transportOptions: nodemailerSendgrid({ + apiKey: sendGridAPIKey, + }), + fromName: process.env.SENDGRID_FROM_NAME || "Admin", + fromAddress: + process.env.SENDGRID_FROM_EMAIL || "admin@example.com", + }, + } : undefined), secret: process.env.PAYLOAD_SECRET_KEY, express: server, diff --git a/apps/charterafrica/src/migrations/20240110_095710_versions_v1_v2.ts b/apps/charterafrica/src/migrations/20240110_095710_versions_v1_v2.ts new file mode 100644 index 000000000..b25834db3 --- /dev/null +++ b/apps/charterafrica/src/migrations/20240110_095710_versions_v1_v2.ts @@ -0,0 +1,107 @@ +import { + MigrateUpArgs, + MigrateDownArgs, +} from "@payloadcms/db-mongodb"; + +export async function up({ payload }: MigrateUpArgs): Promise { + async function migrateCollectionDocs(slug: string, docsAtATime = 100) { + const VersionsModel = payload.db.versions[slug] + const remainingDocs = await VersionsModel.aggregate( + [ + // Sort so that newest are first + { + $sort: { + updatedAt: -1, + }, + }, + // Group by parent ID + // take the $first of each + { + $group: { + _id: '$parent', + _versionID: { $first: '$_id' }, + createdAt: { $first: '$createdAt' }, + latest: { $first: '$latest' }, + updatedAt: { $first: '$updatedAt' }, + version: { $first: '$version' }, + }, + }, + { + $match: { + latest: { $eq: null }, + }, + }, + { + $limit: docsAtATime, + }, + ], + { + allowDiskUse: true, + }, + ).exec() + + if (!remainingDocs || remainingDocs.length === 0) { + const newVersions = await VersionsModel.find({ + latest: { + $eq: true, + }, + }) + + if (newVersions?.length) { + payload.logger.info( + `Migrated ${newVersions.length} documents in the "${slug}" versions collection.`, + ) + } + + return + } + + const remainingDocIds = remainingDocs.map((doc) => doc._versionID) + + await VersionsModel.updateMany( + { + _id: { + $in: remainingDocIds, + }, + }, + { + latest: true, + }, + ) + + await migrateCollectionDocs(slug) + } + + // For each collection + await Promise.all( + payload.config.collections.map(async ({ slug, versions }) => { + if (versions?.drafts) { + return migrateCollectionDocs(slug) + } + }), + ) + + // For each global + await Promise.all( + payload.config.globals.map(async ({ slug, versions }) => { + if (versions) { + const VersionsModel = payload.db.versions[slug] + + await VersionsModel.findOneAndUpdate( + {}, + { latest: true }, + { + sort: { updatedAt: -1 }, + }, + ).exec() + + payload.logger.info(`Migrated the "${slug}" global.`) + } + }), + ) + +}; + +export async function down({ payload }: MigrateDownArgs): Promise { + // Migration code +}; From 4bbe19fe0c1ac67908273a406490d020c56430e3 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Wed, 10 Jan 2024 14:00:34 +0300 Subject: [PATCH 04/43] Fix linting issues --- apps/charterafrica/payload.config.ts | 12 ++--- apps/charterafrica/server.ts | 18 +++---- .../20240110_095710_versions_v1_v2.ts | 50 +++++++++---------- 3 files changed, 38 insertions(+), 42 deletions(-) diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index 754a6f198..5d97ec929 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -111,12 +111,12 @@ export default buildConfig({ ] as GlobalConfig[], ...(locales?.length ? { - localization: { - locales, - defaultLocale, - fallback: true, - }, - } + localization: { + locales, + defaultLocale, + fallback: true, + }, + } : undefined), admin: { diff --git a/apps/charterafrica/server.ts b/apps/charterafrica/server.ts index 791f2c7b5..c19eb1e8c 100644 --- a/apps/charterafrica/server.ts +++ b/apps/charterafrica/server.ts @@ -37,15 +37,15 @@ const start = async (): Promise => { localPayload = await payload.init({ ...(sendGridAPIKey ? { - email: { - transportOptions: nodemailerSendgrid({ - apiKey: sendGridAPIKey, - }), - fromName: process.env.SENDGRID_FROM_NAME || "Admin", - fromAddress: - process.env.SENDGRID_FROM_EMAIL || "admin@example.com", - }, - } + email: { + transportOptions: nodemailerSendgrid({ + apiKey: sendGridAPIKey, + }), + fromName: process.env.SENDGRID_FROM_NAME || "Admin", + fromAddress: + process.env.SENDGRID_FROM_EMAIL || "admin@example.com", + }, + } : undefined), secret: process.env.PAYLOAD_SECRET_KEY, express: server, diff --git a/apps/charterafrica/src/migrations/20240110_095710_versions_v1_v2.ts b/apps/charterafrica/src/migrations/20240110_095710_versions_v1_v2.ts index b25834db3..df87bd2b5 100644 --- a/apps/charterafrica/src/migrations/20240110_095710_versions_v1_v2.ts +++ b/apps/charterafrica/src/migrations/20240110_095710_versions_v1_v2.ts @@ -1,11 +1,8 @@ -import { - MigrateUpArgs, - MigrateDownArgs, -} from "@payloadcms/db-mongodb"; +import { MigrateUpArgs, MigrateDownArgs } from "@payloadcms/db-mongodb"; export async function up({ payload }: MigrateUpArgs): Promise { async function migrateCollectionDocs(slug: string, docsAtATime = 100) { - const VersionsModel = payload.db.versions[slug] + const VersionsModel = payload.db.versions[slug]; const remainingDocs = await VersionsModel.aggregate( [ // Sort so that newest are first @@ -18,12 +15,12 @@ export async function up({ payload }: MigrateUpArgs): Promise { // take the $first of each { $group: { - _id: '$parent', - _versionID: { $first: '$_id' }, - createdAt: { $first: '$createdAt' }, - latest: { $first: '$latest' }, - updatedAt: { $first: '$updatedAt' }, - version: { $first: '$version' }, + _id: "$parent", + _versionID: { $first: "$_id" }, + createdAt: { $first: "$createdAt" }, + latest: { $first: "$latest" }, + updatedAt: { $first: "$updatedAt" }, + version: { $first: "$version" }, }, }, { @@ -38,25 +35,25 @@ export async function up({ payload }: MigrateUpArgs): Promise { { allowDiskUse: true, }, - ).exec() + ).exec(); if (!remainingDocs || remainingDocs.length === 0) { const newVersions = await VersionsModel.find({ latest: { $eq: true, }, - }) + }); if (newVersions?.length) { payload.logger.info( `Migrated ${newVersions.length} documents in the "${slug}" versions collection.`, - ) + ); } - return + return; } - const remainingDocIds = remainingDocs.map((doc) => doc._versionID) + const remainingDocIds = remainingDocs.map((doc) => doc._versionID); await VersionsModel.updateMany( { @@ -67,25 +64,25 @@ export async function up({ payload }: MigrateUpArgs): Promise { { latest: true, }, - ) + ); - await migrateCollectionDocs(slug) + await migrateCollectionDocs(slug); } // For each collection await Promise.all( payload.config.collections.map(async ({ slug, versions }) => { if (versions?.drafts) { - return migrateCollectionDocs(slug) + return migrateCollectionDocs(slug); } }), - ) + ); // For each global await Promise.all( payload.config.globals.map(async ({ slug, versions }) => { if (versions) { - const VersionsModel = payload.db.versions[slug] + const VersionsModel = payload.db.versions[slug]; await VersionsModel.findOneAndUpdate( {}, @@ -93,15 +90,14 @@ export async function up({ payload }: MigrateUpArgs): Promise { { sort: { updatedAt: -1 }, }, - ).exec() + ).exec(); - payload.logger.info(`Migrated the "${slug}" global.`) + payload.logger.info(`Migrated the "${slug}" global.`); } }), - ) - -}; + ); +} export async function down({ payload }: MigrateDownArgs): Promise { // Migration code -}; +} From a4fae5fcc214a4c679d64c9e3f806f474f6580cc Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Thu, 11 Jan 2024 14:01:33 +0300 Subject: [PATCH 05/43] Update old migrations to current versions --- ...update_blocks_rename_collection_to_item.js | 61 ----------------- ...pdate_blocks_rename_collection_to_items.ts | 66 +++++++++++++++++++ 2 files changed, 66 insertions(+), 61 deletions(-) delete mode 100644 apps/charterafrica/migrations/20230717085545-update_blocks_rename_collection_to_item.js create mode 100644 apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts diff --git a/apps/charterafrica/migrations/20230717085545-update_blocks_rename_collection_to_item.js b/apps/charterafrica/migrations/20230717085545-update_blocks_rename_collection_to_item.js deleted file mode 100644 index c2796df14..000000000 --- a/apps/charterafrica/migrations/20230717085545-update_blocks_rename_collection_to_item.js +++ /dev/null @@ -1,61 +0,0 @@ -module.exports = { - async up(db) { - await db.collection("pages").updateMany({}, [ - { - $set: { - blocks: { - $map: { - input: "$blocks", - in: { - $mergeObjects: [ - "$$this", - { - items: { - $map: { - input: "$$this.items", - in: { - item: "$$this.collection", - label: "$$this.label", - }, - }, - }, - }, - ], - }, - }, - }, - }, - }, - ]); - }, - - async down(db) { - await db.collection("pages").updateMany({}, [ - { - $set: { - blocks: { - $map: { - input: "$blocks", - in: { - $mergeObjects: [ - "$$this", - { - items: { - $map: { - input: "$$this.items", - in: { - collection: "$$this.item", - label: "$$this.label", - }, - }, - }, - }, - ], - }, - }, - }, - }, - }, - ]); - }, -}; diff --git a/apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts b/apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts new file mode 100644 index 000000000..852f22aa0 --- /dev/null +++ b/apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts @@ -0,0 +1,66 @@ +import { + MigrateUpArgs, + MigrateDownArgs, +} from "@payloadcms/db-mongodb"; + +export async function up({ payload }: MigrateUpArgs): Promise { + const { db } = payload; + await db.collections["pages"].updateMany({}, [ + { + $set: { + blocks: { + $map: { + input: "$blocks", + in: { + $mergeObjects: [ + "$$this", + { + items: { + $map: { + input: "$$this.items", + in: { + item: "$$this.collection", + label: "$$this.label", + }, + }, + }, + }, + ], + }, + }, + }, + }, + }, + ]); +}; + +export async function down({ payload }: MigrateDownArgs): Promise { + const { db } = payload; + await db.collections["pages"].updateMany({}, [ + { + $set: { + blocks: { + $map: { + input: "$blocks", + in: { + $mergeObjects: [ + "$$this", + { + items: { + $map: { + input: "$$this.items", + in: { + collection: "$$this.item", + label: "$$this.label", + }, + }, + }, + }, + ], + }, + }, + }, + }, + }, + ]); +} From e711ddd2b8638ad30fe4dc9c2918c9f6861de081 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Thu, 11 Jan 2024 14:05:36 +0300 Subject: [PATCH 06/43] Fix lint issues --- ...0111_075951_update_blocks_rename_collection_to_items.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts b/apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts index 852f22aa0..77fa939a1 100644 --- a/apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts +++ b/apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts @@ -1,7 +1,4 @@ -import { - MigrateUpArgs, - MigrateDownArgs, -} from "@payloadcms/db-mongodb"; +import { MigrateUpArgs, MigrateDownArgs } from "@payloadcms/db-mongodb"; export async function up({ payload }: MigrateUpArgs): Promise { const { db } = payload; @@ -32,7 +29,7 @@ export async function up({ payload }: MigrateUpArgs): Promise { }, }, ]); -}; +} export async function down({ payload }: MigrateDownArgs): Promise { const { db } = payload; From d874f78050b2c269773ed511141cdd784e7a85dd Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Mon, 15 Jan 2024 15:12:20 +0300 Subject: [PATCH 07/43] Fix failing migrations --- ...pdate_blocks_rename_collection_to_items.ts | 0 apps/charterafrica/package.json | 2 +- .../src/lib/data/common/processPageIndex.js | 4 +- pnpm-lock.yaml | 40 +++++++++---------- 4 files changed, 23 insertions(+), 23 deletions(-) rename apps/charterafrica/{src => }/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts (100%) diff --git a/apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts b/apps/charterafrica/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts similarity index 100% rename from apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts rename to apps/charterafrica/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts diff --git a/apps/charterafrica/package.json b/apps/charterafrica/package.json index 5dc6462d2..0642b5f68 100644 --- a/apps/charterafrica/package.json +++ b/apps/charterafrica/package.json @@ -68,7 +68,7 @@ "next": "^14.0.4", "next-seo": "^6.4.0", "nodemailer-sendgrid": "^1.0.3", - "payload": "^2.6.0", + "payload": "^2.8.1", "prop-types": "^15.8.1", "qs": "^6.11.2", "react": "^18.2.0", diff --git a/apps/charterafrica/src/lib/data/common/processPageIndex.js b/apps/charterafrica/src/lib/data/common/processPageIndex.js index d30029140..7d2e6ae50 100644 --- a/apps/charterafrica/src/lib/data/common/processPageIndex.js +++ b/apps/charterafrica/src/lib/data/common/processPageIndex.js @@ -48,8 +48,8 @@ const processSpotlight = (page, api, context) => { item: { ...itemData, image: { - src: itemData.image.url, - alt: itemData.image.alt, + src: itemData.image?.url ?? null, + alt: itemData.image?.alt ?? null, }, date: new Date(itemData.date).toLocaleDateString(locale, { year: "numeric", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 28a30ecc5..d9b1d4153 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -89,22 +89,22 @@ importers: version: 0.84.0(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0) "@payloadcms/bundler-webpack": specifier: ^1.0.5 - version: 1.0.5(@swc/core@1.3.100)(payload@2.6.0) + version: 1.0.5(@swc/core@1.3.100)(payload@2.8.1) "@payloadcms/db-mongodb": specifier: ^1.2.0 - version: 1.2.0(payload@2.6.0) + version: 1.2.0(payload@2.8.1) "@payloadcms/plugin-cloud-storage": specifier: ^1.1.1 - version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.6.0) + version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.8.1) "@payloadcms/plugin-nested-docs": specifier: ^1.0.9 version: 1.0.9 "@payloadcms/plugin-seo": specifier: ^1.0.15 - version: 1.0.15(payload@2.6.0)(react@18.2.0) + version: 1.0.15(payload@2.8.1)(react@18.2.0) "@payloadcms/richtext-slate": specifier: ^1.3.1 - version: 1.3.1(payload@2.6.0)(react-dom@18.2.0) + version: 1.3.1(payload@2.8.1)(react-dom@18.2.0) "@react-spring/web": specifier: ^9.7.3 version: 9.7.3(react-dom@18.2.0)(react@18.2.0) @@ -139,8 +139,8 @@ importers: specifier: ^1.0.3 version: 1.0.3 payload: - specifier: ^2.6.0 - version: 2.6.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + specifier: ^2.8.1 + version: 2.8.1(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) prop-types: specifier: ^15.8.1 version: 15.8.1 @@ -294,7 +294,7 @@ importers: version: 14.0.4 "@payloadcms/plugin-cloud-storage": specifier: ^1.1.1 - version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.6.0) + version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.8.1) "@payloadcms/plugin-nested-docs": specifier: ^1.0.9 version: 1.0.9 @@ -7473,7 +7473,7 @@ packages: } dev: false - /@payloadcms/bundler-webpack@1.0.5(@swc/core@1.3.100)(payload@2.6.0): + /@payloadcms/bundler-webpack@1.0.5(@swc/core@1.3.100)(payload@2.8.1): resolution: { integrity: sha512-TjzRTGRDQPrxGoMZ+fV76Pzx3nXC37oSZe/+dA/5HM18fRA9vlu/z54r8HHvThZc7ywx0iRiSwgPZYzQu5xUVQ==, @@ -7491,7 +7491,7 @@ packages: md5: 2.3.0 mini-css-extract-plugin: 1.6.2(webpack@5.89.0) path-browserify: 1.0.1 - payload: 2.6.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.8.1(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) postcss: 8.4.31 postcss-loader: 6.2.1(postcss@8.4.31)(webpack@5.89.0) postcss-preset-env: 9.0.0(postcss@8.4.31) @@ -7528,7 +7528,7 @@ packages: - webpack-dev-server dev: false - /@payloadcms/db-mongodb@1.2.0(payload@2.6.0): + /@payloadcms/db-mongodb@1.2.0(payload@2.8.1): resolution: { integrity: sha512-cRgy2Dl/KXBxvm4kBkrRZcWge9R3dWC2taocjFxaTlzM0SQrQQtwGej8IiKmnUAswz897YzkQR4wQQwidEtb3A==, @@ -7543,7 +7543,7 @@ packages: mongoose: 6.12.3 mongoose-aggregate-paginate-v2: 1.0.6 mongoose-paginate-v2: 1.7.22 - payload: 2.6.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.8.1(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) prompts: 2.4.2 uuid: 9.0.0 transitivePeerDependencies: @@ -7551,7 +7551,7 @@ packages: - supports-color dev: false - /@payloadcms/plugin-cloud-storage@1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.6.0): + /@payloadcms/plugin-cloud-storage@1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.8.1): resolution: { integrity: sha512-WFqfZcT7R1LD+FfKKKYNsJPDRE+0VlYEMxzGuPKeUQn9w9sqTy2UD01YCEl0Zcyuq8fD9mRUjeLitSo1aAUimQ==, @@ -7574,7 +7574,7 @@ packages: dependencies: "@aws-sdk/client-s3": 3.472.0 "@aws-sdk/lib-storage": 3.472.0(@aws-sdk/client-s3@3.472.0) - payload: 2.6.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.8.1(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) range-parser: 1.2.1 dev: false @@ -7598,7 +7598,7 @@ packages: react: 18.2.0 dev: false - /@payloadcms/plugin-seo@1.0.15(payload@2.6.0)(react@18.2.0): + /@payloadcms/plugin-seo@1.0.15(payload@2.8.1)(react@18.2.0): resolution: { integrity: sha512-7nU0DD3UZOOHsV2UIkOWL2JNCX+u1WNbEvZOiGpO6lB6YekuVIMqxHKbTdVR73UeW44lApvS9LTgif3XLQ5HDA==, @@ -7607,11 +7607,11 @@ packages: payload: ^0.18.5 || ^1.0.0 || ^2.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: - payload: 2.6.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.8.1(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) react: 18.2.0 dev: false - /@payloadcms/richtext-slate@1.3.1(payload@2.6.0)(react-dom@18.2.0): + /@payloadcms/richtext-slate@1.3.1(payload@2.8.1)(react-dom@18.2.0): resolution: { integrity: sha512-DwHDn0F7PTGP1WGLQmpNRUdfhwHQwOFpBzXuQtIqlykkj5AAsZrLmfjQabTHPOzKZdLkMRrxhYOGERi4F1T5Hw==, @@ -7622,7 +7622,7 @@ packages: "@faceless-ui/modal": 2.0.1(react-dom@18.2.0)(react@18.2.0) i18next: 22.5.1 is-hotkey: 0.2.0 - payload: 2.6.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.8.1(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) react: 18.2.0 react-i18next: 11.18.6(i18next@22.5.1)(react-dom@18.2.0)(react@18.2.0) slate: 0.91.4 @@ -23807,10 +23807,10 @@ packages: - webpack-dev-server dev: false - /payload@2.6.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0): + /payload@2.8.1(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0): resolution: { - integrity: sha512-DWRatMu9fkqClLvC3DStr1qY1M27tGjsmbFP+cQ7aN0vLpXGEMSorr1uOjtYGGElgapW2Cz2V8DRL4vtqBvRYA==, + integrity: sha512-g+FbNWmmx4b/4I9fLxXbx5cKNPCwWJBDTH2SoLqCooAsX5r/NS78Ae5KcWwRH+xVdoiMXG2vQ9Li4npJ+ckJlQ==, } engines: { node: ">=14" } hasBin: true From 1fc6329614db60337a94aac3cd37cfbbdbc2ecb5 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Mon, 15 Jan 2024 15:34:29 +0300 Subject: [PATCH 08/43] Update old migrations --- ...pdate_blocks_rename_collection_to_items.ts | 63 ------------------- ...pdate_blocks_rename_collection_to_items.ts | 36 +++++++++++ 2 files changed, 36 insertions(+), 63 deletions(-) delete mode 100644 apps/charterafrica/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts create mode 100644 apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts diff --git a/apps/charterafrica/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts b/apps/charterafrica/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts deleted file mode 100644 index 77fa939a1..000000000 --- a/apps/charterafrica/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { MigrateUpArgs, MigrateDownArgs } from "@payloadcms/db-mongodb"; - -export async function up({ payload }: MigrateUpArgs): Promise { - const { db } = payload; - await db.collections["pages"].updateMany({}, [ - { - $set: { - blocks: { - $map: { - input: "$blocks", - in: { - $mergeObjects: [ - "$$this", - { - items: { - $map: { - input: "$$this.items", - in: { - item: "$$this.collection", - label: "$$this.label", - }, - }, - }, - }, - ], - }, - }, - }, - }, - }, - ]); -} - -export async function down({ payload }: MigrateDownArgs): Promise { - const { db } = payload; - await db.collections["pages"].updateMany({}, [ - { - $set: { - blocks: { - $map: { - input: "$blocks", - in: { - $mergeObjects: [ - "$$this", - { - items: { - $map: { - input: "$$this.items", - in: { - collection: "$$this.item", - label: "$$this.label", - }, - }, - }, - }, - ], - }, - }, - }, - }, - }, - ]); -} diff --git a/apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts b/apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts new file mode 100644 index 000000000..63f78b1b0 --- /dev/null +++ b/apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts @@ -0,0 +1,36 @@ +import { MigrateUpArgs, MigrateDownArgs } from "@payloadcms/db-mongodb"; + +export async function up({ payload }: MigrateUpArgs): Promise { + const { db } = payload; + const collection = db.collections["pages"]; + const result = await collection.updateMany( + { "blocks.collection": { $exists: true } }, + { + $set: { + "blocks.$.items": "$blocks.$.collection", + }, + $unset: { + "blocks.$.collection": "", + }, + }, + ); + + console.log(`${result.modifiedCount} documents updated.`); +} + +export async function down({ payload }: MigrateDownArgs): Promise { + const { db } = payload; + const collection = db.collections["pages"]; + const result = await collection.updateMany( + { "blocks.items": { $exists: true } }, + { + $set: { + "blocks.$.collection": "$blocks.$.items", + }, + $unset: { + "blocks.$.items": "", + }, + }, + ); + console.log(`${result.modifiedCount} documents updated.`); +} From 6fc4642025391d0a1b482dbdddc3e969ec0cea8d Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Wed, 17 Jan 2024 16:55:44 +0300 Subject: [PATCH 09/43] FIX: Test build phase of migrations in docker compose --- Dockerfile.dev.charterafrica | 108 ++++++++++++++++++ .../20240110_095710_versions_v1_v2.ts | 0 ...pdate_blocks_rename_collection_to_items.ts | 0 apps/charterafrica/payload.config.ts | 14 +-- charterafrica-dev.yml | 19 +++ 5 files changed, 134 insertions(+), 7 deletions(-) create mode 100644 Dockerfile.dev.charterafrica rename apps/charterafrica/{src => }/migrations/20240110_095710_versions_v1_v2.ts (100%) rename apps/charterafrica/{src => }/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts (100%) create mode 100644 charterafrica-dev.yml diff --git a/Dockerfile.dev.charterafrica b/Dockerfile.dev.charterafrica new file mode 100644 index 000000000..97a7ef36a --- /dev/null +++ b/Dockerfile.dev.charterafrica @@ -0,0 +1,108 @@ +FROM node:18-alpine as node-alpine + +# Always install security updated e.g. https://pythonspeed.com/articles/security-updates-in-docker/ +# Update local cache so that other stages don't need to update cache +RUN apk update \ + && apk upgrade + + +FROM node-alpine as base + +# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. +RUN apk add --no-cache libc6-compat + +ARG PNPM_VERSION=8.5.0 + +RUN corepack enable && corepack prepare pnpm@${PNPM_VERSION} --activate + +WORKDIR /workspace + +COPY pnpm-lock.yaml . + +RUN pnpm fetch + + +FROM base as builder + + +WORKDIR /workspace + +COPY *.yaml *.json ./ +COPY packages ./packages +COPY apps/charterafrica ./apps/charterafrica + +# Use virtual store: https://pnpm.io/cli/fetch#usage-scenario +RUN pnpm install --recursive --offline --frozen-lockfile + +# NOTE: ARG values are only available **after** ARG statement & hence we need +# to separate NEXT_PUBLIC_APP_URL and PAYLOAD_PUBLIC_APP_URL into +# multiple ARG statements so that PAYLOAD can use the value defined +# in NEXT. +ARG NEXT_TELEMETRY_DISABLED=1 \ + # Needed by Next.js at build time + NEXT_PUBLIC_APP_NAME=charterAFRICA \ + NEXT_PUBLIC_APP_URL=http://localhost:3000 \ + NEXT_PUBLIC_GA_MEASUREMENT_ID="" \ + NEXT_PUBLIC_SENTRY_DSN="" \ + NEXT_PUBLIC_SEO_DISABLED="true" \ + # Needed by Next.js and server.ts at build time + PORT=3000 \ + # Sentry config for source maps upload (needed at build time only) + SENTRY_AUTH_TOKEN="" \ + SENTRY_ENV="" \ + SENTRY_ORG="" \ + SENTRY_PROJECT="" \ + # Needed by Payload at Next.js build time (see below for Payload's own + # build time vars) + MONGO_URL \ + # When building Next.js, point to the local Payload instance + PAYLOAD_PUBLIC_APP_URL=http://localhost:3000 \ + PAYLOAD_SECRET_KEY +RUN cd apps/charterafrica && npx payload migrate && cd ../../ +RUN pnpm build-next --filter=charterafrica + +# Needed by Payload at Payload build time +# When building Payload, set its public URL (same as Next.js) +ENV PAYLOAD_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL} + +RUN pnpm build-payload --filter=charterafrica + +# TODO(kilemensi): Optimize and improve this default runner +# i) Start with node-alpine or base and only copy/install +# what's needed in prod +# ii) Add user:group for security (nextjs:node) +# iii) ? +FROM builder as runner + +# Remember to remove local cache from runner +RUN rm -rf /var/cache/apk/* + +# We've already set defaults values for most of these ARGs; don't repeat +ARG NEXT_TELEMETRY_DISABLED \ + NEXT_PUBLIC_APP_NAME \ + NEXT_PUBLIC_APP_URL \ + NEXT_PUBLIC_GA_MEASUREMENT_ID \ + NEXT_PUBLIC_SENTRY_DSN \ + NEXT_PUBLIC_SEO_DISABLED \ + PAYLOAD_CONFIG_PATH="dist/payload.config.js" \ + PAYLOAD_PUBLIC_APP_URL \ + PORT \ + SENTRY_ENV + +ENV NODE_ENV=production \ + NEXT_PUBLIC_APP_NAME=${NEXT_PUBLIC_APP_NAME} \ + NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL} \ + NEXT_PUBLIC_GA_MEASUREMENT_ID=${NEXT_PUBLIC_GA_MEASUREMENT_ID} \ + NEXT_PUBLIC_SENTRY_DSN=${NEXT_PUBLIC_SENTRY_DSN} \ + NEXT_PUBLIC_SEO_DISABLED=${NEXT_PUBLIC_SEO_DISABLED} \ + NEXT_TELEMETRY_DISABLED=${NEXT_TELEMETRY_DISABLED} \ + PAYLOAD_CONFIG_PATH=${PAYLOAD_CONFIG_PATH} \ + PAYLOAD_PUBLIC_APP_URL=${PAYLOAD_PUBLIC_APP_URL} \ + PORT=${PORT} \ + SENTRY_ENV=${SENTRY_ENV} + +WORKDIR /workspace/apps/charterafrica + +EXPOSE ${PORT} + +CMD [ "node", "dist/server.js" ] diff --git a/apps/charterafrica/src/migrations/20240110_095710_versions_v1_v2.ts b/apps/charterafrica/migrations/20240110_095710_versions_v1_v2.ts similarity index 100% rename from apps/charterafrica/src/migrations/20240110_095710_versions_v1_v2.ts rename to apps/charterafrica/migrations/20240110_095710_versions_v1_v2.ts diff --git a/apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts b/apps/charterafrica/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts similarity index 100% rename from apps/charterafrica/src/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts rename to apps/charterafrica/migrations/20240111_075951_update_blocks_rename_collection_to_items.ts diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index 5d97ec929..c905b6431 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -79,7 +79,7 @@ export default buildConfig({ editor: slateEditor({}), db: mongooseAdapter({ url: process.env.MONGO_URL, - migrationDir: "./src/migrations", + migrationDir: "./migrations", }), collections: [ Authors, @@ -111,12 +111,12 @@ export default buildConfig({ ] as GlobalConfig[], ...(locales?.length ? { - localization: { - locales, - defaultLocale, - fallback: true, - }, - } + localization: { + locales, + defaultLocale, + fallback: true, + }, + } : undefined), admin: { diff --git a/charterafrica-dev.yml b/charterafrica-dev.yml new file mode 100644 index 000000000..8d0733554 --- /dev/null +++ b/charterafrica-dev.yml @@ -0,0 +1,19 @@ +version: "3.8" +services: + charterafrica: + build: + context: . + dockerfile: Dockerfile.dev.charterafrica + args: + MONGO_URL: ${MONGO_URL} + PAYLOAD_SECRET_KEY: ${PAYLOAD_SECRET_KEY} + SENTRY_AUTH_TOKEN: ${SENTRY_AUTH_TOKEN} + SENTRY_ORG: ${SENTRY_ORG} + NEXT_PUBLIC_SENTRY_DSN: ${CHARTERAFRICA_SENTRY_DSN} + SENTRY_ENV: ${SENTRY_ENV} + SENTRY_PROJECT: ${SENTRY_PROJECT} + ports: + - 3000:3000 + container_name: charterafrica + env_file: + - apps/charterafrica/.env.local From 409f98194ef7e993c5b0e78511e4b0e0928d2e16 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Wed, 17 Jan 2024 17:00:04 +0300 Subject: [PATCH 10/43] Fix lint issues --- apps/charterafrica/payload.config.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index c905b6431..2c7f9fb24 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -111,12 +111,12 @@ export default buildConfig({ ] as GlobalConfig[], ...(locales?.length ? { - localization: { - locales, - defaultLocale, - fallback: true, - }, - } + localization: { + locales, + defaultLocale, + fallback: true, + }, + } : undefined), admin: { From bfc98f5278242a15018adbcea3e875a4278e0886 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Thu, 18 Jan 2024 10:44:39 +0300 Subject: [PATCH 11/43] Remove unneeded updates --- apps/charterafrica/src/lib/data/common/processPageIndex.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/charterafrica/src/lib/data/common/processPageIndex.js b/apps/charterafrica/src/lib/data/common/processPageIndex.js index 7d2e6ae50..d30029140 100644 --- a/apps/charterafrica/src/lib/data/common/processPageIndex.js +++ b/apps/charterafrica/src/lib/data/common/processPageIndex.js @@ -48,8 +48,8 @@ const processSpotlight = (page, api, context) => { item: { ...itemData, image: { - src: itemData.image?.url ?? null, - alt: itemData.image?.alt ?? null, + src: itemData.image.url, + alt: itemData.image.alt, }, date: new Date(itemData.date).toLocaleDateString(locale, { year: "numeric", From 42936949f78007650c2e8ec9f737b78c51960d4b Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Thu, 18 Jan 2024 15:52:17 +0300 Subject: [PATCH 12/43] Add docker config --- .gitignore | 4 +- Dockerfile.charterafrica | 1 + Dockerfile.dev.charterafrica | 108 ----------------------------------- charterafrica-dev.yml | 19 ------ docker-compose.yml | 59 +++++++++++++++++++ scripts/charterafrica.sh | 8 +++ scripts/db-init.sh | 31 ++++++++++ 7 files changed, 102 insertions(+), 128 deletions(-) delete mode 100644 Dockerfile.dev.charterafrica delete mode 100644 charterafrica-dev.yml create mode 100644 docker-compose.yml create mode 100755 scripts/charterafrica.sh create mode 100755 scripts/db-init.sh diff --git a/.gitignore b/.gitignore index 8ae34be93..a2212853a 100644 --- a/.gitignore +++ b/.gitignore @@ -51,4 +51,6 @@ apps/promisetracker/public/data/** !apps/promisetracker/public/data/README.md # Storybook -storybook-static \ No newline at end of file +storybook-static + +mongo-keyfile \ No newline at end of file diff --git a/Dockerfile.charterafrica b/Dockerfile.charterafrica index ec49f44b8..0b138546c 100644 --- a/Dockerfile.charterafrica +++ b/Dockerfile.charterafrica @@ -59,6 +59,7 @@ ARG NEXT_TELEMETRY_DISABLED=1 \ PAYLOAD_PUBLIC_APP_URL=http://localhost:3000 \ PAYLOAD_SECRET_KEY +RUN cd apps/charterafrica && npx payload migrate && cd ../../ RUN pnpm build-next --filter=charterafrica # Needed by Payload at Payload build time diff --git a/Dockerfile.dev.charterafrica b/Dockerfile.dev.charterafrica deleted file mode 100644 index 97a7ef36a..000000000 --- a/Dockerfile.dev.charterafrica +++ /dev/null @@ -1,108 +0,0 @@ -FROM node:18-alpine as node-alpine - -# Always install security updated e.g. https://pythonspeed.com/articles/security-updates-in-docker/ -# Update local cache so that other stages don't need to update cache -RUN apk update \ - && apk upgrade - - -FROM node-alpine as base - -# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. -RUN apk add --no-cache libc6-compat - -ARG PNPM_VERSION=8.5.0 - -RUN corepack enable && corepack prepare pnpm@${PNPM_VERSION} --activate - -WORKDIR /workspace - -COPY pnpm-lock.yaml . - -RUN pnpm fetch - - -FROM base as builder - - -WORKDIR /workspace - -COPY *.yaml *.json ./ -COPY packages ./packages -COPY apps/charterafrica ./apps/charterafrica - -# Use virtual store: https://pnpm.io/cli/fetch#usage-scenario -RUN pnpm install --recursive --offline --frozen-lockfile - -# NOTE: ARG values are only available **after** ARG statement & hence we need -# to separate NEXT_PUBLIC_APP_URL and PAYLOAD_PUBLIC_APP_URL into -# multiple ARG statements so that PAYLOAD can use the value defined -# in NEXT. -ARG NEXT_TELEMETRY_DISABLED=1 \ - # Needed by Next.js at build time - NEXT_PUBLIC_APP_NAME=charterAFRICA \ - NEXT_PUBLIC_APP_URL=http://localhost:3000 \ - NEXT_PUBLIC_GA_MEASUREMENT_ID="" \ - NEXT_PUBLIC_SENTRY_DSN="" \ - NEXT_PUBLIC_SEO_DISABLED="true" \ - # Needed by Next.js and server.ts at build time - PORT=3000 \ - # Sentry config for source maps upload (needed at build time only) - SENTRY_AUTH_TOKEN="" \ - SENTRY_ENV="" \ - SENTRY_ORG="" \ - SENTRY_PROJECT="" \ - # Needed by Payload at Next.js build time (see below for Payload's own - # build time vars) - MONGO_URL \ - # When building Next.js, point to the local Payload instance - PAYLOAD_PUBLIC_APP_URL=http://localhost:3000 \ - PAYLOAD_SECRET_KEY -RUN cd apps/charterafrica && npx payload migrate && cd ../../ -RUN pnpm build-next --filter=charterafrica - -# Needed by Payload at Payload build time -# When building Payload, set its public URL (same as Next.js) -ENV PAYLOAD_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL} - -RUN pnpm build-payload --filter=charterafrica - -# TODO(kilemensi): Optimize and improve this default runner -# i) Start with node-alpine or base and only copy/install -# what's needed in prod -# ii) Add user:group for security (nextjs:node) -# iii) ? -FROM builder as runner - -# Remember to remove local cache from runner -RUN rm -rf /var/cache/apk/* - -# We've already set defaults values for most of these ARGs; don't repeat -ARG NEXT_TELEMETRY_DISABLED \ - NEXT_PUBLIC_APP_NAME \ - NEXT_PUBLIC_APP_URL \ - NEXT_PUBLIC_GA_MEASUREMENT_ID \ - NEXT_PUBLIC_SENTRY_DSN \ - NEXT_PUBLIC_SEO_DISABLED \ - PAYLOAD_CONFIG_PATH="dist/payload.config.js" \ - PAYLOAD_PUBLIC_APP_URL \ - PORT \ - SENTRY_ENV - -ENV NODE_ENV=production \ - NEXT_PUBLIC_APP_NAME=${NEXT_PUBLIC_APP_NAME} \ - NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL} \ - NEXT_PUBLIC_GA_MEASUREMENT_ID=${NEXT_PUBLIC_GA_MEASUREMENT_ID} \ - NEXT_PUBLIC_SENTRY_DSN=${NEXT_PUBLIC_SENTRY_DSN} \ - NEXT_PUBLIC_SEO_DISABLED=${NEXT_PUBLIC_SEO_DISABLED} \ - NEXT_TELEMETRY_DISABLED=${NEXT_TELEMETRY_DISABLED} \ - PAYLOAD_CONFIG_PATH=${PAYLOAD_CONFIG_PATH} \ - PAYLOAD_PUBLIC_APP_URL=${PAYLOAD_PUBLIC_APP_URL} \ - PORT=${PORT} \ - SENTRY_ENV=${SENTRY_ENV} - -WORKDIR /workspace/apps/charterafrica - -EXPOSE ${PORT} - -CMD [ "node", "dist/server.js" ] diff --git a/charterafrica-dev.yml b/charterafrica-dev.yml deleted file mode 100644 index 8d0733554..000000000 --- a/charterafrica-dev.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: "3.8" -services: - charterafrica: - build: - context: . - dockerfile: Dockerfile.dev.charterafrica - args: - MONGO_URL: ${MONGO_URL} - PAYLOAD_SECRET_KEY: ${PAYLOAD_SECRET_KEY} - SENTRY_AUTH_TOKEN: ${SENTRY_AUTH_TOKEN} - SENTRY_ORG: ${SENTRY_ORG} - NEXT_PUBLIC_SENTRY_DSN: ${CHARTERAFRICA_SENTRY_DSN} - SENTRY_ENV: ${SENTRY_ENV} - SENTRY_PROJECT: ${SENTRY_PROJECT} - ports: - - 3000:3000 - container_name: charterafrica - env_file: - - apps/charterafrica/.env.local diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..6560163a8 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,59 @@ +version: "3.8" + +services: + charterafrica: + depends_on: + mongodb_container: + condition: service_healthy + build: + context: . + dockerfile: Dockerfile.charterafrica + args: + MONGO_URL: mongodb://root:rootpassword@host.docker.internal:27017/charterafrica?authSource=admin + PAYLOAD_SECRET_KEY: ${PAYLOAD_SECRET_KEY} + SENTRY_AUTH_TOKEN: ${SENTRY_AUTH_TOKEN} + SENTRY_ORG: ${SENTRY_ORG} + NEXT_PUBLIC_SENTRY_DSN: ${CHARTERAFRICA_SENTRY_DSN} + SENTRY_ENV: ${SENTRY_ENV} + SENTRY_PROJECT: ${SENTRY_PROJECT} + ports: + - 3000:3000 + container_name: charterafrica + env_file: + - apps/charterafrica/.env.local + networks: + - net + + mongodb_container: + container_name: mongodb_container + image: mongo:latest + environment: + MONGO_INITDB_ROOT_USERNAME: root + MONGO_INITDB_ROOT_PASSWORD: rootpassword + ports: + - 27017:27017 + volumes: + - data_container:/data/db + - ./mongo-keyfile:/etc/mongo-keyfile + - ./scripts/db-init.sh:/scripts/db-init.sh + restart: always + healthcheck: + test: echo 'db.runCommand("ping").ok' | mongosh mongodb_container:27017/charterafrica --quiet + interval: 10s + timeout: 5s + retries: 3 + command: + [ + "--replSet", + "dbrs", + "--bind_ip_all", + "--keyFile", + "/etc/mongo-keyfile/mongo-keyfile", + ] + networks: + - net +volumes: + data_container: +networks: + net: + driver: bridge diff --git a/scripts/charterafrica.sh b/scripts/charterafrica.sh new file mode 100755 index 000000000..6b0b29984 --- /dev/null +++ b/scripts/charterafrica.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +docker-compose --env-file apps/charterafrica/.env.local up charterafrica --build -d + +sleep 5 + +docker exec mongodb_container /scripts/db-init.sh + diff --git a/scripts/db-init.sh b/scripts/db-init.sh new file mode 100755 index 000000000..f31f1b0a7 --- /dev/null +++ b/scripts/db-init.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +DELAY=5 + +mongosh -u root -p rootpassword --authenticationDatabase admin < Date: Thu, 18 Jan 2024 16:20:09 +0300 Subject: [PATCH 13/43] Reorder migratons --- ...2.ts => 20240118_131136_versions_v1_v2.ts} | 50 ++++++++++--------- 1 file changed, 27 insertions(+), 23 deletions(-) rename apps/charterafrica/migrations/{20240110_095710_versions_v1_v2.ts => 20240118_131136_versions_v1_v2.ts} (71%) diff --git a/apps/charterafrica/migrations/20240110_095710_versions_v1_v2.ts b/apps/charterafrica/migrations/20240118_131136_versions_v1_v2.ts similarity index 71% rename from apps/charterafrica/migrations/20240110_095710_versions_v1_v2.ts rename to apps/charterafrica/migrations/20240118_131136_versions_v1_v2.ts index df87bd2b5..b25834db3 100644 --- a/apps/charterafrica/migrations/20240110_095710_versions_v1_v2.ts +++ b/apps/charterafrica/migrations/20240118_131136_versions_v1_v2.ts @@ -1,8 +1,11 @@ -import { MigrateUpArgs, MigrateDownArgs } from "@payloadcms/db-mongodb"; +import { + MigrateUpArgs, + MigrateDownArgs, +} from "@payloadcms/db-mongodb"; export async function up({ payload }: MigrateUpArgs): Promise { async function migrateCollectionDocs(slug: string, docsAtATime = 100) { - const VersionsModel = payload.db.versions[slug]; + const VersionsModel = payload.db.versions[slug] const remainingDocs = await VersionsModel.aggregate( [ // Sort so that newest are first @@ -15,12 +18,12 @@ export async function up({ payload }: MigrateUpArgs): Promise { // take the $first of each { $group: { - _id: "$parent", - _versionID: { $first: "$_id" }, - createdAt: { $first: "$createdAt" }, - latest: { $first: "$latest" }, - updatedAt: { $first: "$updatedAt" }, - version: { $first: "$version" }, + _id: '$parent', + _versionID: { $first: '$_id' }, + createdAt: { $first: '$createdAt' }, + latest: { $first: '$latest' }, + updatedAt: { $first: '$updatedAt' }, + version: { $first: '$version' }, }, }, { @@ -35,25 +38,25 @@ export async function up({ payload }: MigrateUpArgs): Promise { { allowDiskUse: true, }, - ).exec(); + ).exec() if (!remainingDocs || remainingDocs.length === 0) { const newVersions = await VersionsModel.find({ latest: { $eq: true, }, - }); + }) if (newVersions?.length) { payload.logger.info( `Migrated ${newVersions.length} documents in the "${slug}" versions collection.`, - ); + ) } - return; + return } - const remainingDocIds = remainingDocs.map((doc) => doc._versionID); + const remainingDocIds = remainingDocs.map((doc) => doc._versionID) await VersionsModel.updateMany( { @@ -64,25 +67,25 @@ export async function up({ payload }: MigrateUpArgs): Promise { { latest: true, }, - ); + ) - await migrateCollectionDocs(slug); + await migrateCollectionDocs(slug) } // For each collection await Promise.all( payload.config.collections.map(async ({ slug, versions }) => { if (versions?.drafts) { - return migrateCollectionDocs(slug); + return migrateCollectionDocs(slug) } }), - ); + ) // For each global await Promise.all( payload.config.globals.map(async ({ slug, versions }) => { if (versions) { - const VersionsModel = payload.db.versions[slug]; + const VersionsModel = payload.db.versions[slug] await VersionsModel.findOneAndUpdate( {}, @@ -90,14 +93,15 @@ export async function up({ payload }: MigrateUpArgs): Promise { { sort: { updatedAt: -1 }, }, - ).exec(); + ).exec() - payload.logger.info(`Migrated the "${slug}" global.`); + payload.logger.info(`Migrated the "${slug}" global.`) } }), - ); -} + ) + +}; export async function down({ payload }: MigrateDownArgs): Promise { // Migration code -} +}; From 4e862f13c97a6fd5e482d677d22f52017ca2d42c Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Thu, 18 Jan 2024 16:36:06 +0300 Subject: [PATCH 14/43] Fix linting issues --- .../20240118_131136_versions_v1_v2.ts | 50 +++++++++---------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/apps/charterafrica/migrations/20240118_131136_versions_v1_v2.ts b/apps/charterafrica/migrations/20240118_131136_versions_v1_v2.ts index b25834db3..df87bd2b5 100644 --- a/apps/charterafrica/migrations/20240118_131136_versions_v1_v2.ts +++ b/apps/charterafrica/migrations/20240118_131136_versions_v1_v2.ts @@ -1,11 +1,8 @@ -import { - MigrateUpArgs, - MigrateDownArgs, -} from "@payloadcms/db-mongodb"; +import { MigrateUpArgs, MigrateDownArgs } from "@payloadcms/db-mongodb"; export async function up({ payload }: MigrateUpArgs): Promise { async function migrateCollectionDocs(slug: string, docsAtATime = 100) { - const VersionsModel = payload.db.versions[slug] + const VersionsModel = payload.db.versions[slug]; const remainingDocs = await VersionsModel.aggregate( [ // Sort so that newest are first @@ -18,12 +15,12 @@ export async function up({ payload }: MigrateUpArgs): Promise { // take the $first of each { $group: { - _id: '$parent', - _versionID: { $first: '$_id' }, - createdAt: { $first: '$createdAt' }, - latest: { $first: '$latest' }, - updatedAt: { $first: '$updatedAt' }, - version: { $first: '$version' }, + _id: "$parent", + _versionID: { $first: "$_id" }, + createdAt: { $first: "$createdAt" }, + latest: { $first: "$latest" }, + updatedAt: { $first: "$updatedAt" }, + version: { $first: "$version" }, }, }, { @@ -38,25 +35,25 @@ export async function up({ payload }: MigrateUpArgs): Promise { { allowDiskUse: true, }, - ).exec() + ).exec(); if (!remainingDocs || remainingDocs.length === 0) { const newVersions = await VersionsModel.find({ latest: { $eq: true, }, - }) + }); if (newVersions?.length) { payload.logger.info( `Migrated ${newVersions.length} documents in the "${slug}" versions collection.`, - ) + ); } - return + return; } - const remainingDocIds = remainingDocs.map((doc) => doc._versionID) + const remainingDocIds = remainingDocs.map((doc) => doc._versionID); await VersionsModel.updateMany( { @@ -67,25 +64,25 @@ export async function up({ payload }: MigrateUpArgs): Promise { { latest: true, }, - ) + ); - await migrateCollectionDocs(slug) + await migrateCollectionDocs(slug); } // For each collection await Promise.all( payload.config.collections.map(async ({ slug, versions }) => { if (versions?.drafts) { - return migrateCollectionDocs(slug) + return migrateCollectionDocs(slug); } }), - ) + ); // For each global await Promise.all( payload.config.globals.map(async ({ slug, versions }) => { if (versions) { - const VersionsModel = payload.db.versions[slug] + const VersionsModel = payload.db.versions[slug]; await VersionsModel.findOneAndUpdate( {}, @@ -93,15 +90,14 @@ export async function up({ payload }: MigrateUpArgs): Promise { { sort: { updatedAt: -1 }, }, - ).exec() + ).exec(); - payload.logger.info(`Migrated the "${slug}" global.`) + payload.logger.info(`Migrated the "${slug}" global.`); } }), - ) - -}; + ); +} export async function down({ payload }: MigrateDownArgs): Promise { // Migration code -}; +} From ae001a90a748adbb52565cb5afe7fcc14137e472 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Fri, 19 Jan 2024 09:06:00 +0300 Subject: [PATCH 15/43] Remove unnecessary dependancy --- apps/charterafrica/package.json | 3 +- apps/charterafrica/payload.config.ts | 14 +++---- pnpm-lock.yaml | 63 ++++++++-------------------- 3 files changed, 26 insertions(+), 54 deletions(-) diff --git a/apps/charterafrica/package.json b/apps/charterafrica/package.json index 000a1d953..0a1a3cf3f 100644 --- a/apps/charterafrica/package.json +++ b/apps/charterafrica/package.json @@ -52,7 +52,7 @@ "@nivo/tooltip": "^0.84.0", "@nivo/waffle": "^0.84.0", "@payloadcms/bundler-webpack": "^1.0.5", - "@payloadcms/db-mongodb": "^1.2.0", + "@payloadcms/db-mongodb": "^1.3.2", "@payloadcms/plugin-cloud-storage": "^1.1.1", "@payloadcms/plugin-nested-docs": "^1.0.9", "@payloadcms/plugin-seo": "^1.0.15", @@ -98,7 +98,6 @@ "babel-jest": "^29.7.0", "eslint": "^8.55.0", "eslint-config-commons-ui": "workspace:*", - "eslint-import-resolver-typescript": "^3.6.1", "eslint-import-resolver-webpack": "^0.13.8", "eslint-plugin-import": "^2.29.0", "identity-obj-proxy": "^3.0.0", diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index 2c7f9fb24..ff168b15a 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -111,12 +111,12 @@ export default buildConfig({ ] as GlobalConfig[], ...(locales?.length ? { - localization: { - locales, - defaultLocale, - fallback: true, - }, - } + localization: { + locales, + defaultLocale, + fallback: true, + }, + } : undefined), admin: { @@ -188,4 +188,4 @@ export default buildConfig({ docs.reduce((url, doc) => `${url}/${doc.slug}`, ""), }), ], -} as any); +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d9b1d4153..15f33ec31 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -91,8 +91,8 @@ importers: specifier: ^1.0.5 version: 1.0.5(@swc/core@1.3.100)(payload@2.8.1) "@payloadcms/db-mongodb": - specifier: ^1.2.0 - version: 1.2.0(payload@2.8.1) + specifier: ^1.3.2 + version: 1.3.2(payload@2.8.1) "@payloadcms/plugin-cloud-storage": specifier: ^1.1.1 version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.8.1) @@ -223,15 +223,12 @@ importers: eslint-config-commons-ui: specifier: workspace:* version: link:../../packages/eslint-config-commons-ui - eslint-import-resolver-typescript: - specifier: ^3.6.1 - version: 3.6.1(eslint-import-resolver-webpack@0.13.8)(eslint-plugin-import@2.29.0)(eslint@8.55.0) eslint-import-resolver-webpack: specifier: ^0.13.8 version: 0.13.8(eslint-plugin-import@2.29.0)(webpack@5.89.0) eslint-plugin-import: specifier: ^2.29.0 - version: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + version: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) identity-obj-proxy: specifier: ^3.0.0 version: 3.0.0 @@ -397,7 +394,7 @@ importers: version: 0.13.8(eslint-plugin-import@2.29.0)(webpack@5.89.0) eslint-plugin-import: specifier: ^2.29.0 - version: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + version: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) identity-obj-proxy: specifier: ^3.0.0 version: 3.0.0 @@ -515,7 +512,7 @@ importers: version: 0.13.8(eslint-plugin-import@2.29.0)(webpack@5.89.0) eslint-plugin-import: specifier: ^2.29.0 - version: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + version: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) prettier: specifier: ^3.1.1 version: 3.1.1 @@ -735,7 +732,7 @@ importers: version: 5.3.2(@babel/core@7.23.6)(babel-plugin-module-resolver@4.1.0) eslint-plugin-import: specifier: ^2.29.0 - version: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + version: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) eslint-plugin-module-resolver: specifier: ^1.5.0 version: 1.5.0 @@ -916,7 +913,7 @@ importers: version: 0.13.8(eslint-plugin-import@2.29.0)(webpack@5.89.0) eslint-plugin-import: specifier: ^2.29.0 - version: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + version: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) identity-obj-proxy: specifier: ^3.0.0 version: 3.0.0 @@ -1162,7 +1159,7 @@ importers: version: 1.1.0 eslint-plugin-import: specifier: ^2.29.0 - version: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + version: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) eslint-plugin-jest: specifier: ^27.6.0 version: 27.6.0(eslint@8.55.0)(typescript@5.3.3) @@ -7528,10 +7525,10 @@ packages: - webpack-dev-server dev: false - /@payloadcms/db-mongodb@1.2.0(payload@2.8.1): + /@payloadcms/db-mongodb@1.3.2(payload@2.8.1): resolution: { - integrity: sha512-cRgy2Dl/KXBxvm4kBkrRZcWge9R3dWC2taocjFxaTlzM0SQrQQtwGej8IiKmnUAswz897YzkQR4wQQwidEtb3A==, + integrity: sha512-4eXlhy1tLHNY6fluLZF89mgkveyPoMqvoC3z763iBbowECz5dWd8lWKuO43ce+N38TDeRRjfzG2x0HzwPuVzLQ==, } peerDependencies: payload: ^2.0.0 @@ -16642,7 +16639,7 @@ packages: dependencies: confusing-browser-globals: 1.0.11 eslint: 8.55.0 - eslint-plugin-import: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + eslint-plugin-import: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) object.assign: 4.1.5 object.entries: 1.1.7 semver: 6.3.1 @@ -16663,7 +16660,7 @@ packages: dependencies: eslint: 8.55.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.0)(eslint@8.55.0) - eslint-plugin-import: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + eslint-plugin-import: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.55.0) eslint-plugin-react: 7.33.2(eslint@8.55.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.55.0) @@ -16734,31 +16731,6 @@ packages: transitivePeerDependencies: - supports-color - /eslint-import-resolver-typescript@3.6.1(eslint-import-resolver-webpack@0.13.8)(eslint-plugin-import@2.29.0)(eslint@8.55.0): - resolution: - { - integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==, - } - engines: { node: ^14.18.0 || >=16.0.0 } - peerDependencies: - eslint: "*" - eslint-plugin-import: "*" - dependencies: - debug: 4.3.4 - enhanced-resolve: 5.15.0 - eslint: 8.55.0 - eslint-module-utils: 2.8.0(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) - eslint-plugin-import: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) - fast-glob: 3.3.2 - get-tsconfig: 4.7.2 - is-core-module: 2.13.1 - is-glob: 4.0.3 - transitivePeerDependencies: - - "@typescript-eslint/parser" - - eslint-import-resolver-node - - eslint-import-resolver-webpack - - supports-color - /eslint-import-resolver-webpack@0.13.8(eslint-plugin-import@2.29.0)(webpack@5.89.0): resolution: { @@ -16772,7 +16744,7 @@ packages: array.prototype.find: 2.2.2 debug: 3.2.7 enhanced-resolve: 0.9.1 - eslint-plugin-import: 2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + eslint-plugin-import: 2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) find-root: 1.1.0 hasown: 2.0.0 interpret: 1.4.0 @@ -16785,7 +16757,7 @@ packages: transitivePeerDependencies: - supports-color - /eslint-module-utils@2.8.0(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0): + /eslint-module-utils@2.8.0(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0): resolution: { integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==, @@ -16812,12 +16784,11 @@ packages: debug: 3.2.7 eslint: 8.55.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(eslint-import-resolver-webpack@0.13.8)(eslint-plugin-import@2.29.0)(eslint@8.55.0) eslint-import-resolver-webpack: 0.13.8(eslint-plugin-import@2.29.0)(webpack@5.89.0) transitivePeerDependencies: - supports-color - /eslint-plugin-import@2.29.0(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0): + /eslint-plugin-import@2.29.0(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0): resolution: { integrity: sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==, @@ -16838,7 +16809,7 @@ packages: doctrine: 2.1.0 eslint: 8.55.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) + eslint-module-utils: 2.8.0(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-webpack@0.13.8)(eslint@8.55.0) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -18308,6 +18279,7 @@ packages: } dependencies: resolve-pkg-maps: 1.0.0 + dev: false /getpass@0.1.7: resolution: @@ -27114,6 +27086,7 @@ packages: { integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==, } + dev: false /resolve-url-loader@5.0.0: resolution: From fa4d1adbe514d6f3a272b4de516003cdb1f5e875 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Fri, 19 Jan 2024 09:12:00 +0300 Subject: [PATCH 16/43] Fix lint issues --- apps/charterafrica/payload.config.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index ff168b15a..53d62be4f 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -111,12 +111,12 @@ export default buildConfig({ ] as GlobalConfig[], ...(locales?.length ? { - localization: { - locales, - defaultLocale, - fallback: true, - }, - } + localization: { + locales, + defaultLocale, + fallback: true, + }, + } : undefined), admin: { From eecbaa89e5902250a2561d3c704a6a05dd0249d0 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Fri, 19 Jan 2024 12:29:51 +0300 Subject: [PATCH 17/43] Use Make file --- .gitignore | 2 +- Dockerfile.charterafrica | 1 - Makefile | 10 ++++++++++ apps/charterafrica/payload.config.ts | 14 +++++++------- docker-compose.yml | 14 ++++---------- scripts/charterafrica.sh | 8 -------- 6 files changed, 22 insertions(+), 27 deletions(-) create mode 100644 Makefile delete mode 100755 scripts/charterafrica.sh diff --git a/.gitignore b/.gitignore index a2212853a..74d544686 100644 --- a/.gitignore +++ b/.gitignore @@ -53,4 +53,4 @@ apps/promisetracker/public/data/** # Storybook storybook-static -mongo-keyfile \ No newline at end of file +mongo-keyfile diff --git a/Dockerfile.charterafrica b/Dockerfile.charterafrica index 0b138546c..ec49f44b8 100644 --- a/Dockerfile.charterafrica +++ b/Dockerfile.charterafrica @@ -59,7 +59,6 @@ ARG NEXT_TELEMETRY_DISABLED=1 \ PAYLOAD_PUBLIC_APP_URL=http://localhost:3000 \ PAYLOAD_SECRET_KEY -RUN cd apps/charterafrica && npx payload migrate && cd ../../ RUN pnpm build-next --filter=charterafrica # Needed by Payload at Payload build time diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..ff758f6a5 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +# Makefile + +.PHONY: charterafrica init-db + +charterafrica: + docker-compose --env-file apps/charterafrica/.env.local up charterafrica --build + +init-db: + docker-compose up mongodb_container --build -d + docker exec mongodb_container /scripts/db-init.sh diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index 53d62be4f..478661f80 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -79,7 +79,7 @@ export default buildConfig({ editor: slateEditor({}), db: mongooseAdapter({ url: process.env.MONGO_URL, - migrationDir: "./migrations", + migrationDir: process.env.MIGRATIONS_DIR ?? "./migrations", }), collections: [ Authors, @@ -111,12 +111,12 @@ export default buildConfig({ ] as GlobalConfig[], ...(locales?.length ? { - localization: { - locales, - defaultLocale, - fallback: true, - }, - } + localization: { + locales, + defaultLocale, + fallback: true, + }, + } : undefined), admin: { diff --git a/docker-compose.yml b/docker-compose.yml index 6560163a8..0fe185312 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,12 +4,12 @@ services: charterafrica: depends_on: mongodb_container: - condition: service_healthy + condition: service_started build: context: . dockerfile: Dockerfile.charterafrica args: - MONGO_URL: mongodb://root:rootpassword@host.docker.internal:27017/charterafrica?authSource=admin + MONGO_URL: mongodb://root:rootpassword@host.docker.internal:27017/charterafrica?authSource=admin&directConnection=true PAYLOAD_SECRET_KEY: ${PAYLOAD_SECRET_KEY} SENTRY_AUTH_TOKEN: ${SENTRY_AUTH_TOKEN} SENTRY_ORG: ${SENTRY_ORG} @@ -26,7 +26,7 @@ services: mongodb_container: container_name: mongodb_container - image: mongo:latest + image: mongo:6.0.13 environment: MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: rootpassword @@ -43,13 +43,7 @@ services: timeout: 5s retries: 3 command: - [ - "--replSet", - "dbrs", - "--bind_ip_all", - "--keyFile", - "/etc/mongo-keyfile/mongo-keyfile", - ] + ["--replSet", "dbrs", "--bind_ip_all", "--keyFile", "/etc/mongo-keyfile"] networks: - net volumes: diff --git a/scripts/charterafrica.sh b/scripts/charterafrica.sh deleted file mode 100755 index 6b0b29984..000000000 --- a/scripts/charterafrica.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -docker-compose --env-file apps/charterafrica/.env.local up charterafrica --build -d - -sleep 5 - -docker exec mongodb_container /scripts/db-init.sh - From f7e2bbc917983b2156794adc1df95a1f21cfba42 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Fri, 19 Jan 2024 12:35:30 +0300 Subject: [PATCH 18/43] Fix config lint --- apps/charterafrica/payload.config.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index 478661f80..c9267ea1b 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -111,12 +111,12 @@ export default buildConfig({ ] as GlobalConfig[], ...(locales?.length ? { - localization: { - locales, - defaultLocale, - fallback: true, - }, - } + localization: { + locales, + defaultLocale, + fallback: true, + }, + } : undefined), admin: { From 55ae04e1d99e6fa5cb805084b6400e95850980e4 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Mon, 22 Jan 2024 12:12:47 +0300 Subject: [PATCH 19/43] Init db on start up --- Makefile | 5 ++--- data_container/scripts/db-init.js | 20 ++++++++++++++++++++ docker-compose.yml | 2 +- scripts/db-init.sh | 31 ------------------------------- 4 files changed, 23 insertions(+), 35 deletions(-) create mode 100755 data_container/scripts/db-init.js delete mode 100755 scripts/db-init.sh diff --git a/Makefile b/Makefile index ff758f6a5..76511e3d4 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,9 @@ # Makefile -.PHONY: charterafrica init-db +.PHONY: charterafrica charterafrica: - docker-compose --env-file apps/charterafrica/.env.local up charterafrica --build + docker-compose --env-file apps/charterafrica/.env.local up charterafrica --build -d init-db: docker-compose up mongodb_container --build -d - docker exec mongodb_container /scripts/db-init.sh diff --git a/data_container/scripts/db-init.js b/data_container/scripts/db-init.js new file mode 100755 index 000000000..fead4547c --- /dev/null +++ b/data_container/scripts/db-init.js @@ -0,0 +1,20 @@ +const config = { + _id: "dbrs", + version: 1, + members: [ + { + _id: 1, + host: "mongodb_container:27017", + priority: 1, + }, + ], +}; +console.log("==================>"); +rs.initiate(config, { force: true }); + +rs.status(); +db.createUser({ + user: "root", + pwd: "rootpassword", + roles: [{ role: "root", db: "admin" }], +}); diff --git a/docker-compose.yml b/docker-compose.yml index 0fe185312..9a410cb47 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,7 +35,7 @@ services: volumes: - data_container:/data/db - ./mongo-keyfile:/etc/mongo-keyfile - - ./scripts/db-init.sh:/scripts/db-init.sh + - ./data_container/scripts/db-init.js:/docker-entrypoint-initdb.d/db-init.js restart: always healthcheck: test: echo 'db.runCommand("ping").ok' | mongosh mongodb_container:27017/charterafrica --quiet diff --git a/scripts/db-init.sh b/scripts/db-init.sh deleted file mode 100755 index f31f1b0a7..000000000 --- a/scripts/db-init.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -DELAY=5 - -mongosh -u root -p rootpassword --authenticationDatabase admin < Date: Mon, 22 Jan 2024 12:29:10 +0300 Subject: [PATCH 20/43] Remove log --- data_container/scripts/db-init.js | 1 - 1 file changed, 1 deletion(-) diff --git a/data_container/scripts/db-init.js b/data_container/scripts/db-init.js index fead4547c..b95150d65 100755 --- a/data_container/scripts/db-init.js +++ b/data_container/scripts/db-init.js @@ -9,7 +9,6 @@ const config = { }, ], }; -console.log("==================>"); rs.initiate(config, { force: true }); rs.status(); From facb1e8c627ac0c3ac9ad8deb4dcf86ceff104da Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Mon, 22 Jan 2024 17:21:18 +0300 Subject: [PATCH 21/43] Rename mongo container, move volume mappings to contrib/docker --- .gitignore | 1 + Makefile | 6 +++--- apps/charterafrica/.env | 2 +- apps/charterafrica/payload.config.ts | 2 +- .../docker/scripts/dbInit.js | 2 +- docker-compose.yml | 21 ++++++++++++------- 6 files changed, 21 insertions(+), 13 deletions(-) rename data_container/scripts/db-init.js => contrib/docker/scripts/dbInit.js (87%) diff --git a/.gitignore b/.gitignore index 74d544686..2f38fdce2 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ apps/promisetracker/public/data/** storybook-static mongo-keyfile +contrib/docker/db diff --git a/Makefile b/Makefile index 76511e3d4..739f3850e 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ # Makefile -.PHONY: charterafrica +.PHONY: charterafrica mongodb charterafrica: docker-compose --env-file apps/charterafrica/.env.local up charterafrica --build -d -init-db: - docker-compose up mongodb_container --build -d +mongodb: + docker-compose up mongodb --build -d diff --git a/apps/charterafrica/.env b/apps/charterafrica/.env index ec6657b9f..9bea0cf37 100644 --- a/apps/charterafrica/.env +++ b/apps/charterafrica/.env @@ -4,5 +4,5 @@ NEXT_PUBLIC_SEO_DISABLED=true PAYLOAD_PUBLIC_LOCALES="en, fr, pt" PAYLOAD_PUBLIC_DEFAULT_LOCALE=en - +MIGRATIONS_DIR=./migrations SENTRY_ENV=local diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index c9267ea1b..0cb9766b6 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -79,7 +79,7 @@ export default buildConfig({ editor: slateEditor({}), db: mongooseAdapter({ url: process.env.MONGO_URL, - migrationDir: process.env.MIGRATIONS_DIR ?? "./migrations", + migrationDir: process.env.MIGRATIONS_DIR, }), collections: [ Authors, diff --git a/data_container/scripts/db-init.js b/contrib/docker/scripts/dbInit.js similarity index 87% rename from data_container/scripts/db-init.js rename to contrib/docker/scripts/dbInit.js index b95150d65..b9c75ac43 100755 --- a/data_container/scripts/db-init.js +++ b/contrib/docker/scripts/dbInit.js @@ -4,7 +4,7 @@ const config = { members: [ { _id: 1, - host: "mongodb_container:27017", + host: "mongodb:27017", priority: 1, }, ], diff --git a/docker-compose.yml b/docker-compose.yml index 9a410cb47..b3df4d919 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: "3.8" services: charterafrica: depends_on: - mongodb_container: + mongodb: condition: service_started build: context: . @@ -24,8 +24,8 @@ services: networks: - net - mongodb_container: - container_name: mongodb_container + mongodb: + container_name: mongodb image: mongo:6.0.13 environment: MONGO_INITDB_ROOT_USERNAME: root @@ -33,17 +33,24 @@ services: ports: - 27017:27017 volumes: - - data_container:/data/db + - ./contrib/docker/db:/data/db - ./mongo-keyfile:/etc/mongo-keyfile - - ./data_container/scripts/db-init.js:/docker-entrypoint-initdb.d/db-init.js + - ./contrib/docker/scripts/dbInit.js:/docker-entrypoint-initdb.d/dbInit.js:ro restart: always healthcheck: - test: echo 'db.runCommand("ping").ok' | mongosh mongodb_container:27017/charterafrica --quiet + test: echo 'db.runCommand("ping").ok' | mongosh mongodb:27017/charterafrica --quiet interval: 10s timeout: 5s retries: 3 command: - ["--replSet", "dbrs", "--bind_ip_all", "--keyFile", "/etc/mongo-keyfile"] + [ + "mongod", + "--replSet", + "dbrs", + "--bind_ip_all", + "--keyFile", + "/etc/mongo-keyfile", + ] networks: - net volumes: From ba52dbf2dfd6d4348e591fafe2f4547ea724fb2a Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 23 Jan 2024 13:16:09 +0300 Subject: [PATCH 22/43] Use Environment variables for mongdb --- docker-compose.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b3df4d919..51d056f2b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: context: . dockerfile: Dockerfile.charterafrica args: - MONGO_URL: mongodb://root:rootpassword@host.docker.internal:27017/charterafrica?authSource=admin&directConnection=true + MONGO_URL: mongodb://${MONGO_INITDB_ROOT_USERNAME:-root}:${MONGO_INITDB_ROOT_PASSWORD:-rootpassword}@host.docker.internal:${MONGODB_PORT:-27017}/charterafrica?authSource=admin&directConnection=true PAYLOAD_SECRET_KEY: ${PAYLOAD_SECRET_KEY} SENTRY_AUTH_TOKEN: ${SENTRY_AUTH_TOKEN} SENTRY_ORG: ${SENTRY_ORG} @@ -28,10 +28,12 @@ services: container_name: mongodb image: mongo:6.0.13 environment: - MONGO_INITDB_ROOT_USERNAME: root - MONGO_INITDB_ROOT_PASSWORD: rootpassword + MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-root} + MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:-rootpassword} ports: - - 27017:27017 + - ${MONGODB_PORT:-27017}:27017 + env_file: + - apps/charterafrica/.env.local volumes: - ./contrib/docker/db:/data/db - ./mongo-keyfile:/etc/mongo-keyfile From c9fe79b971a68a86c0d2b9e0d2b0a88cc085ecff Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 23 Jan 2024 16:36:48 +0300 Subject: [PATCH 23/43] Update editor config --- .gitignore | 2 +- apps/charterafrica/package.json | 8 +- .../blocks/DemocracyHelpdeskPageContent.js | 22 +- .../src/payload/blocks/EmbeddedDocuments.js | 12 +- .../src/payload/blocks/EmbeddedPlaylist.js | 11 +- .../charterafrica/src/payload/blocks/Error.js | 3 - apps/charterafrica/src/payload/blocks/Hero.js | 12 +- .../src/payload/blocks/Impressum.js | 22 +- apps/charterafrica/src/payload/blocks/Mooc.js | 12 +- .../src/payload/blocks/PageDescription.js | 34 ++- .../src/payload/blocks/PageHeader.js | 24 +- .../src/payload/blocks/PageInfo.js | 12 +- .../src/payload/blocks/Partners.js | 3 - .../src/payload/blocks/RichText.js | 32 +- .../payload/collections/CommunityPlatforms.js | 12 +- .../src/payload/collections/Events.js | 10 +- .../src/payload/collections/Explainers.js | 3 - .../src/payload/collections/Fellowships.js | 10 +- .../src/payload/collections/Grantees.js | 10 +- .../src/payload/collections/Grants.js | 10 +- .../src/payload/collections/News.js | 10 +- .../src/payload/collections/Partners.js | 10 +- .../src/payload/collections/Research.js | 10 +- .../src/payload/fields/accordion.js | 11 +- .../src/payload/fields/richText.js | 7 +- .../src/payload/globals/FocalCountries.js | 9 +- .../src/payload/globals/Footer.js | 21 +- .../src/payload/globals/Helpdesk.js | 10 +- docker-compose.yml | 2 +- pnpm-lock.yaml | 285 +++++++++++++----- 30 files changed, 431 insertions(+), 208 deletions(-) diff --git a/.gitignore b/.gitignore index 2f38fdce2..f09ae13a8 100644 --- a/.gitignore +++ b/.gitignore @@ -54,4 +54,4 @@ apps/promisetracker/public/data/** storybook-static mongo-keyfile -contrib/docker/db +data_container diff --git a/apps/charterafrica/package.json b/apps/charterafrica/package.json index 0a1a3cf3f..ae3829f4f 100644 --- a/apps/charterafrica/package.json +++ b/apps/charterafrica/package.json @@ -52,7 +52,7 @@ "@nivo/tooltip": "^0.84.0", "@nivo/waffle": "^0.84.0", "@payloadcms/bundler-webpack": "^1.0.5", - "@payloadcms/db-mongodb": "^1.3.2", + "@payloadcms/db-mongodb": "^1.2.0", "@payloadcms/plugin-cloud-storage": "^1.1.1", "@payloadcms/plugin-nested-docs": "^1.0.9", "@payloadcms/plugin-seo": "^1.0.15", @@ -68,7 +68,8 @@ "next": "^14.0.4", "next-seo": "^6.4.0", "nodemailer-sendgrid": "^1.0.3", - "payload": "^2.8.1", + "payload": "^2.8.2", + "prompts": "^2.4.2", "prop-types": "^15.8.1", "qs": "^6.11.2", "react": "^18.2.0", @@ -76,8 +77,9 @@ "react-leaflet": "^4.2.1", "react-share": "^5.0.3", "react-swipeable-views-react-18-fix": "^0.14.1", + "readline": "^1.3.0", "scheduler": "^0.23.0", - "sharp": "^0.33.1", + "sharp": "^0.33.2", "slate": "^0.101.1", "swr": "^2.2.4", "video.js": "^8.6.1", diff --git a/apps/charterafrica/src/payload/blocks/DemocracyHelpdeskPageContent.js b/apps/charterafrica/src/payload/blocks/DemocracyHelpdeskPageContent.js index d01795103..b3416dba7 100644 --- a/apps/charterafrica/src/payload/blocks/DemocracyHelpdeskPageContent.js +++ b/apps/charterafrica/src/payload/blocks/DemocracyHelpdeskPageContent.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import linkGroup from "../fields/linkGroup"; import richText from "../fields/richText"; @@ -11,10 +13,22 @@ const HelpdeskPageContent = { fr: "La description", pt: "Descrição", }, - admin: { - elements: ["h2", "h3", "h4", "h5", "h6", "link", "ol", "ul", "indent"], - leaves: ["bold", "code", "italic", "strikethrough", "underline"], - }, + editor: slateEditor({ + admin: { + elements: [ + "h2", + "h3", + "h4", + "h5", + "h6", + "link", + "ol", + "ul", + "indent", + ], + leaves: ["bold", "code", "italic", "strikethrough", "underline"], + }, + }), localized: true, }), linkGroup(), diff --git a/apps/charterafrica/src/payload/blocks/EmbeddedDocuments.js b/apps/charterafrica/src/payload/blocks/EmbeddedDocuments.js index 014880069..6f5b5e175 100644 --- a/apps/charterafrica/src/payload/blocks/EmbeddedDocuments.js +++ b/apps/charterafrica/src/payload/blocks/EmbeddedDocuments.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import documentCloudSource from "../fields/documentCloudSource"; import richText from "../fields/richText"; @@ -30,10 +32,12 @@ const EmbeddedDocuments = { pt: "Descrição", }, localized: true, - admin: { - elements: ["h3", "h4", "h5", "h6", "link", "ol", "ul", "indent"], - leaves: ["bold", "code", "italic", "underline"], - }, + editor: slateEditor({ + admin: { + elements: ["h3", "h4", "h5", "h6", "link", "ol", "ul", "indent"], + leaves: ["bold", "code", "italic", "underline"], + }, + }), }), ], }, diff --git a/apps/charterafrica/src/payload/blocks/EmbeddedPlaylist.js b/apps/charterafrica/src/payload/blocks/EmbeddedPlaylist.js index 619aeee8c..c9845401a 100644 --- a/apps/charterafrica/src/payload/blocks/EmbeddedPlaylist.js +++ b/apps/charterafrica/src/payload/blocks/EmbeddedPlaylist.js @@ -1,3 +1,4 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; import { select } from "payload/dist/fields/validations"; import richText from "../fields/richText"; @@ -69,10 +70,12 @@ const EmbeddedPlaylist = { pt: "Descrição", }, localized: true, - admin: { - elements: ["h3", "h4", "h5", "h6", "link", "ol", "ul", "indent"], - leaves: ["bold", "code", "italic", "underline"], - }, + editor: slateEditor({ + admin: { + elements: ["h3", "h4", "h5", "h6", "link", "ol", "ul", "indent"], + leaves: ["bold", "code", "italic", "underline"], + }, + }), }), ], }, diff --git a/apps/charterafrica/src/payload/blocks/Error.js b/apps/charterafrica/src/payload/blocks/Error.js index b41d1a9d5..f704aa607 100644 --- a/apps/charterafrica/src/payload/blocks/Error.js +++ b/apps/charterafrica/src/payload/blocks/Error.js @@ -46,9 +46,6 @@ const Error = { }, localized: true, required: true, - admin: { - elements: [], - }, }), linkGroup(), ], diff --git a/apps/charterafrica/src/payload/blocks/Hero.js b/apps/charterafrica/src/payload/blocks/Hero.js index 36bd01ef1..566f4d56c 100644 --- a/apps/charterafrica/src/payload/blocks/Hero.js +++ b/apps/charterafrica/src/payload/blocks/Hero.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import link from "../fields/link"; import richText from "../fields/richText"; import { @@ -37,10 +39,12 @@ const Hero = { }, required: true, localized: true, - admin: { - elements: [], - leaves: ["bold", "italic", "underline"], - }, + editor: slateEditor({ + admin: { + elements: [], + leaves: ["bold", "italic", "underline"], + }, + }), }), { name: "color", diff --git a/apps/charterafrica/src/payload/blocks/Impressum.js b/apps/charterafrica/src/payload/blocks/Impressum.js index 5ad3b4e07..56686a5ba 100644 --- a/apps/charterafrica/src/payload/blocks/Impressum.js +++ b/apps/charterafrica/src/payload/blocks/Impressum.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import richText from "../fields/richText"; const Impressum = { @@ -10,10 +12,22 @@ const Impressum = { }, required: true, localized: true, - admin: { - elements: ["h2", "h3", "h4", "h5", "h6", "link", "ol", "ul", "indent"], - leaves: ["bold", "italic", "strikethrough", "underline"], - }, + editor: slateEditor({ + admin: { + elements: [ + "h2", + "h3", + "h4", + "h5", + "h6", + "link", + "ol", + "ul", + "indent", + ], + leaves: ["bold", "italic", "strikethrough", "underline"], + }, + }), }), { name: "image", diff --git a/apps/charterafrica/src/payload/blocks/Mooc.js b/apps/charterafrica/src/payload/blocks/Mooc.js index 80eed84a5..318e02795 100644 --- a/apps/charterafrica/src/payload/blocks/Mooc.js +++ b/apps/charterafrica/src/payload/blocks/Mooc.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import linkGroup from "../fields/linkGroup"; import richText from "../fields/richText"; @@ -13,10 +15,12 @@ const Mooc = { }, required: true, localized: true, - admin: { - elements: [], - leaves: ["bold", "italic", "underline", "code"], - }, + editor: slateEditor({ + admin: { + elements: [], + leaves: ["bold", "italic", "underline", "code"], + }, + }), }), linkGroup(), { diff --git a/apps/charterafrica/src/payload/blocks/PageDescription.js b/apps/charterafrica/src/payload/blocks/PageDescription.js index 2338f4914..a45da6247 100644 --- a/apps/charterafrica/src/payload/blocks/PageDescription.js +++ b/apps/charterafrica/src/payload/blocks/PageDescription.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import richText from "../fields/richText"; const PageDescription = { @@ -20,21 +22,23 @@ const PageDescription = { }, required: true, localized: true, - admin: { - elements: [ - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "link", - "ol", - "ul", - "indent", - ], - leaves: ["bold", "code", "italic", "underline"], - }, + editor: slateEditor({ + admin: { + elements: [ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "link", + "ol", + "ul", + "indent", + ], + leaves: ["bold", "code", "italic", "underline"], + }, + }), }), ], }; diff --git a/apps/charterafrica/src/payload/blocks/PageHeader.js b/apps/charterafrica/src/payload/blocks/PageHeader.js index 771e03026..f0acc4a00 100644 --- a/apps/charterafrica/src/payload/blocks/PageHeader.js +++ b/apps/charterafrica/src/payload/blocks/PageHeader.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import linkGroup from "../fields/linkGroup"; import richText from "../fields/richText"; @@ -13,10 +15,12 @@ const PageHeader = { }, required: true, localized: true, - admin: { - elements: [], - leaves: ["bold", "italic", "strikethrough", "underline"], - }, + editor: slateEditor({ + admin: { + elements: [], + leaves: ["bold", "italic", "strikethrough", "underline"], + }, + }), }), { name: "variant", @@ -49,11 +53,13 @@ const PageHeader = { pt: "Descrição", }, localized: true, - admin: { - condition: (_, siblingData) => siblingData?.variant === "image", - elements: [], - leaves: ["bold", "italic", "strikethrough", "underline"], - }, + editor: slateEditor({ + admin: { + condition: (_, siblingData) => siblingData?.variant === "image", + elements: [], + leaves: ["bold", "italic", "strikethrough", "underline"], + }, + }), }), linkGroup({ linkConfig: { disableOpenInNewTab: true, required: false }, diff --git a/apps/charterafrica/src/payload/blocks/PageInfo.js b/apps/charterafrica/src/payload/blocks/PageInfo.js index 1a94169b3..255809fd5 100644 --- a/apps/charterafrica/src/payload/blocks/PageInfo.js +++ b/apps/charterafrica/src/payload/blocks/PageInfo.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import richText from "../fields/richText"; const PageInfo = { @@ -22,10 +24,12 @@ const PageInfo = { fr: "La description", pt: "Descrição", }, - admin: { - elements: [], - leaves: ["bold", "italic", "underline", "code"], - }, + editor: slateEditor({ + admin: { + elements: [], + leaves: ["bold", "italic", "underline", "code"], + }, + }), localized: true, }), ], diff --git a/apps/charterafrica/src/payload/blocks/Partners.js b/apps/charterafrica/src/payload/blocks/Partners.js index 32f06f351..f4377cdbc 100644 --- a/apps/charterafrica/src/payload/blocks/Partners.js +++ b/apps/charterafrica/src/payload/blocks/Partners.js @@ -33,9 +33,6 @@ const Partners = { fr: "La description", pt: "Descrição", }, - admin: { - elements: [], - }, localized: true, }), { diff --git a/apps/charterafrica/src/payload/blocks/RichText.js b/apps/charterafrica/src/payload/blocks/RichText.js index ae19f33fc..963f2a7ad 100644 --- a/apps/charterafrica/src/payload/blocks/RichText.js +++ b/apps/charterafrica/src/payload/blocks/RichText.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import blockFields from "../fields/blockFields"; import richText from "../fields/richText"; @@ -9,20 +11,22 @@ const RichText = { fields: [ richText({ name: "content", - admin: { - elements: [ - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "link", - "ol", - "ul", - "indent", - ], - }, + editor: slateEditor({ + admin: { + elements: [ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "link", + "ol", + "ul", + "indent", + ], + }, + }), }), ], }), diff --git a/apps/charterafrica/src/payload/collections/CommunityPlatforms.js b/apps/charterafrica/src/payload/collections/CommunityPlatforms.js index e2e5d3a9d..d2ed32070 100644 --- a/apps/charterafrica/src/payload/collections/CommunityPlatforms.js +++ b/apps/charterafrica/src/payload/collections/CommunityPlatforms.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import linkGroup from "../fields/linkGroup"; import richText from "../fields/richText"; @@ -43,10 +45,12 @@ const CommunityPlatforms = { }, localized: true, required: true, - admin: { - elements: [], - leaves: ["bold", "code", "italic", "strikethrough", "underline"], - }, + editor: slateEditor({ + admin: { + elements: [], + leaves: ["bold", "code", "italic", "strikethrough", "underline"], + }, + }), }), { name: "icon", diff --git a/apps/charterafrica/src/payload/collections/Events.js b/apps/charterafrica/src/payload/collections/Events.js index ec988dddc..24261b239 100644 --- a/apps/charterafrica/src/payload/collections/Events.js +++ b/apps/charterafrica/src/payload/collections/Events.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import content from "../fields/content"; import linkGroup from "../fields/linkGroup"; import publishedOn from "../fields/publishedOn"; @@ -87,9 +89,11 @@ const Events = { }, localized: true, required: true, - admin: { - elements: ["leaves"], - }, + editor: slateEditor({ + admin: { + elements: ["leaves"], + }, + }), }), content({ required: false }), linkGroup({ diff --git a/apps/charterafrica/src/payload/collections/Explainers.js b/apps/charterafrica/src/payload/collections/Explainers.js index 7c2eea9f3..6124a6c2c 100644 --- a/apps/charterafrica/src/payload/collections/Explainers.js +++ b/apps/charterafrica/src/payload/collections/Explainers.js @@ -49,9 +49,6 @@ const Explainers = { }, localized: true, required: true, - admin: { - elements: [], - }, }), { name: "image", diff --git a/apps/charterafrica/src/payload/collections/Fellowships.js b/apps/charterafrica/src/payload/collections/Fellowships.js index dc41fa08d..3048f3e4c 100644 --- a/apps/charterafrica/src/payload/collections/Fellowships.js +++ b/apps/charterafrica/src/payload/collections/Fellowships.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import content from "../fields/content"; import linkGroup from "../fields/linkGroup"; import publishedOn from "../fields/publishedOn"; @@ -87,9 +89,11 @@ const Fellowships = { pt: "Excerto", }, localized: true, - admin: { - elements: ["leaves"], - }, + editor: slateEditor({ + admin: { + elements: ["leaves"], + }, + }), }), content(), { diff --git a/apps/charterafrica/src/payload/collections/Grantees.js b/apps/charterafrica/src/payload/collections/Grantees.js index 29bf3a5f1..468e6a6af 100644 --- a/apps/charterafrica/src/payload/collections/Grantees.js +++ b/apps/charterafrica/src/payload/collections/Grantees.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import content from "../fields/content"; import linkGroup from "../fields/linkGroup"; import publishedOn from "../fields/publishedOn"; @@ -51,9 +53,11 @@ const Grantees = { pt: "Descrição", }, localized: true, - admin: { - elements: ["leaves"], - }, + editor: slateEditor({ + admin: { + elements: ["leaves"], + }, + }), }), linkGroup({ linkConfig: { diff --git a/apps/charterafrica/src/payload/collections/Grants.js b/apps/charterafrica/src/payload/collections/Grants.js index afed2b295..9784ff8fc 100644 --- a/apps/charterafrica/src/payload/collections/Grants.js +++ b/apps/charterafrica/src/payload/collections/Grants.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import content from "../fields/content"; import linkGroup from "../fields/linkGroup"; import publishedOn from "../fields/publishedOn"; @@ -86,9 +88,11 @@ const Grant = { pt: "Excerto", }, localized: true, - admin: { - elements: ["leaves"], - }, + editor: slateEditor({ + admin: { + elements: ["leaves"], + }, + }), }), content(), { diff --git a/apps/charterafrica/src/payload/collections/News.js b/apps/charterafrica/src/payload/collections/News.js index c5a4247bb..ac84d46bf 100644 --- a/apps/charterafrica/src/payload/collections/News.js +++ b/apps/charterafrica/src/payload/collections/News.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import authors from "../fields/authors"; import content from "../fields/content"; import publishedOn from "../fields/publishedOn"; @@ -53,9 +55,11 @@ const News = { pt: "Excerto", }, localized: true, - admin: { - elements: ["leaves"], - }, + editor: slateEditor({ + admin: { + elements: ["leaves"], + }, + }), }), tags(), content(), diff --git a/apps/charterafrica/src/payload/collections/Partners.js b/apps/charterafrica/src/payload/collections/Partners.js index 5ebb626b8..fe9bd71e9 100644 --- a/apps/charterafrica/src/payload/collections/Partners.js +++ b/apps/charterafrica/src/payload/collections/Partners.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import linkGroup from "../fields/linkGroup"; import richText from "../fields/richText"; @@ -87,9 +89,11 @@ const Partners = { fr: "La description", pt: "Descrição", }, - admin: { - elements: [], - }, + editor: slateEditor({ + admin: { + elements: [], + }, + }), localized: true, required: true, }), diff --git a/apps/charterafrica/src/payload/collections/Research.js b/apps/charterafrica/src/payload/collections/Research.js index cb5be8157..8e9c4ebcd 100644 --- a/apps/charterafrica/src/payload/collections/Research.js +++ b/apps/charterafrica/src/payload/collections/Research.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import authors from "../fields/authors"; import content from "../fields/content"; import publishedOn from "../fields/publishedOn"; @@ -53,9 +55,11 @@ const Research = { pt: "Excerto", }, localized: true, - admin: { - elements: ["leaves"], - }, + editor: slateEditor({ + admin: { + elements: ["leaves"], + }, + }), }), tags(), content(), diff --git a/apps/charterafrica/src/payload/fields/accordion.js b/apps/charterafrica/src/payload/fields/accordion.js index 8fad90aa3..7f06669db 100644 --- a/apps/charterafrica/src/payload/fields/accordion.js +++ b/apps/charterafrica/src/payload/fields/accordion.js @@ -1,4 +1,5 @@ import { deepmerge } from "@mui/utils"; +import { slateEditor } from "@payloadcms/richtext-slate"; import richText from "./richText"; @@ -52,10 +53,12 @@ function accordion({ richTextConfig, overrides = {} } = {}) { }, required: true, localized: true, - admin: { - elements: ["h6", "link", "ol", "ul", "indent"], - leaves: ["bold", "italic", "underline", "code"], - }, + editor: slateEditor({ + admin: { + elements: ["h6", "link", "ol", "ul", "indent"], + leaves: ["bold", "italic", "underline", "code"], + }, + }), }, richTextConfig, { clone: false }, diff --git a/apps/charterafrica/src/payload/fields/richText.js b/apps/charterafrica/src/payload/fields/richText.js index f833e44bf..e84a3fa92 100644 --- a/apps/charterafrica/src/payload/fields/richText.js +++ b/apps/charterafrica/src/payload/fields/richText.js @@ -1,5 +1,4 @@ import { deepmerge } from "@mui/utils"; -import { slateEditor } from "@payloadcms/richtext-slate"; import mapLinkTypeToHref from "../utils/mapLinkTypeToHref"; @@ -44,16 +43,12 @@ async function mapLinkToHrefAfterRead({ req: { payload }, value }) { return insertHref(value, payload); } -function richText({ admin, ...overrides }) { - const editor = slateEditor({ - admin, - }); +function richText(overrides) { const richTextResult = { type: "richText", hooks: { afterRead: [mapLinkToHrefAfterRead], }, - editor, }; return deepmerge(richTextResult, overrides); diff --git a/apps/charterafrica/src/payload/globals/FocalCountries.js b/apps/charterafrica/src/payload/globals/FocalCountries.js index bf1a64fc9..6a48011c2 100644 --- a/apps/charterafrica/src/payload/globals/FocalCountries.js +++ b/apps/charterafrica/src/payload/globals/FocalCountries.js @@ -1,3 +1,4 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; import { array } from "payload/dist/fields/validations"; import linkGroup from "../fields/linkGroup"; @@ -33,9 +34,11 @@ const FocalCountries = { }, localized: true, required: true, - admin: { - elements: ["h2", "h3", "h4", "h5", "h6", "ol", "ul", "link"], - }, + editor: slateEditor({ + admin: { + elements: ["h2", "h3", "h4", "h5", "h6", "ol", "ul", "link"], + }, + }), }), { name: "countries", diff --git a/apps/charterafrica/src/payload/globals/Footer.js b/apps/charterafrica/src/payload/globals/Footer.js index 79702dcdc..af6251078 100644 --- a/apps/charterafrica/src/payload/globals/Footer.js +++ b/apps/charterafrica/src/payload/globals/Footer.js @@ -1,3 +1,4 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; import { text, array } from "payload/dist/fields/validations"; import linkArray from "../fields/linkArray"; @@ -55,10 +56,12 @@ const Footer = { }, localized: true, required: true, - admin: { - elements: ["ol", "ul", "link"], - leaves: ["bold", "italic", "underline", "code"], - }, + editor: slateEditor({ + admin: { + elements: ["ol", "ul", "link"], + leaves: ["bold", "italic", "underline", "code"], + }, + }), }), richText({ name: "projectDescription", @@ -70,10 +73,12 @@ const Footer = { type: "richText", localized: true, required: true, - admin: { - elements: ["ol", "ul", "link"], - leaves: ["bold", "italic", "underline", "code"], - }, + editor: slateEditor({ + admin: { + elements: ["ol", "ul", "link"], + leaves: ["bold", "italic", "underline", "code"], + }, + }), }), { type: "group", diff --git a/apps/charterafrica/src/payload/globals/Helpdesk.js b/apps/charterafrica/src/payload/globals/Helpdesk.js index afa158713..53d2d4cad 100644 --- a/apps/charterafrica/src/payload/globals/Helpdesk.js +++ b/apps/charterafrica/src/payload/globals/Helpdesk.js @@ -1,3 +1,5 @@ +import { slateEditor } from "@payloadcms/richtext-slate"; + import linkGroup from "../fields/linkGroup"; import richText from "../fields/richText"; @@ -40,9 +42,11 @@ const Helpdesk = { type: "richText", localized: true, required: true, - admin: { - elements: ["ol", "ul", "link"], - }, + editor: slateEditor({ + admin: { + elements: ["ol", "ul", "link"], + }, + }), }), linkGroup(), ], diff --git a/docker-compose.yml b/docker-compose.yml index 51d056f2b..a32c491c2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,7 +35,7 @@ services: env_file: - apps/charterafrica/.env.local volumes: - - ./contrib/docker/db:/data/db + - ./data_container/db:/data/db - ./mongo-keyfile:/etc/mongo-keyfile - ./contrib/docker/scripts/dbInit.js:/docker-entrypoint-initdb.d/dbInit.js:ro restart: always diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15f33ec31..bd5df5281 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -89,22 +89,22 @@ importers: version: 0.84.0(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0) "@payloadcms/bundler-webpack": specifier: ^1.0.5 - version: 1.0.5(@swc/core@1.3.100)(payload@2.8.1) + version: 1.0.5(@swc/core@1.3.100)(payload@2.8.2) "@payloadcms/db-mongodb": - specifier: ^1.3.2 - version: 1.3.2(payload@2.8.1) + specifier: ^1.2.0 + version: 1.2.0(payload@2.8.2) "@payloadcms/plugin-cloud-storage": specifier: ^1.1.1 - version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.8.1) + version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.8.2) "@payloadcms/plugin-nested-docs": specifier: ^1.0.9 version: 1.0.9 "@payloadcms/plugin-seo": specifier: ^1.0.15 - version: 1.0.15(payload@2.8.1)(react@18.2.0) + version: 1.0.15(payload@2.8.2)(react@18.2.0) "@payloadcms/richtext-slate": specifier: ^1.3.1 - version: 1.3.1(payload@2.8.1)(react-dom@18.2.0) + version: 1.3.1(payload@2.8.2)(react-dom@18.2.0) "@react-spring/web": specifier: ^9.7.3 version: 9.7.3(react-dom@18.2.0)(react@18.2.0) @@ -139,8 +139,11 @@ importers: specifier: ^1.0.3 version: 1.0.3 payload: - specifier: ^2.8.1 - version: 2.8.1(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + specifier: ^2.8.2 + version: 2.8.2(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + prompts: + specifier: ^2.4.2 + version: 2.4.2 prop-types: specifier: ^15.8.1 version: 15.8.1 @@ -162,12 +165,15 @@ importers: react-swipeable-views-react-18-fix: specifier: ^0.14.1 version: 0.14.1(react@18.2.0) + readline: + specifier: ^1.3.0 + version: 1.3.0 scheduler: specifier: ^0.23.0 version: 0.23.0 sharp: specifier: ^0.33.0 - version: 0.33.1 + version: 0.33.0 slate: specifier: ^0.101.1 version: 0.101.4 @@ -291,7 +297,7 @@ importers: version: 14.0.4 "@payloadcms/plugin-cloud-storage": specifier: ^1.1.1 - version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.8.1) + version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.8.2) "@payloadcms/plugin-nested-docs": specifier: ^1.0.9 version: 1.0.9 @@ -5214,6 +5220,17 @@ packages: integrity: sha512-ZX/etZEZw8DR7zAB1eVQT40lNo0jeqpb6dCgOvctB6FIQ5PoXfMuNY8+ayQfu8tNQbAB8gQWSSJupR8NxeiZXw==, } requiresBuild: true + dependencies: + tslib: 2.6.2 + dev: false + optional: true + + /@emnapi/runtime@0.45.0: + resolution: + { + integrity: sha512-Txumi3td7J4A/xTTwlssKieHKTGl3j4A1tglBx72auZ49YK7ePY6XZricgIg9mnZT4xPfA+UPCUdnhRuEFDL+w==, + } + requiresBuild: true dependencies: tslib: 2.6.2 optional: true @@ -5857,10 +5874,10 @@ packages: dev: false optional: true - /@img/sharp-darwin-arm64@0.33.1: + /@img/sharp-darwin-arm64@0.33.2: resolution: { - integrity: sha512-esr2BZ1x0bo+wl7Gx2hjssYhjrhUsD88VQulI0FrG8/otRQUOxLWHMBd1Y1qo2Gfg2KUvXNpT0ASnV9BzJCexw==, + integrity: sha512-itHBs1rPmsmGF9p4qRe++CzCgd+kFYktnsoR1sbIAfsRMrJZau0Tt1AH9KVnufc2/tU02Gf6Ibujx+15qRE03w==, } engines: { @@ -5874,7 +5891,7 @@ packages: os: [darwin] requiresBuild: true optionalDependencies: - "@img/sharp-libvips-darwin-arm64": 1.0.0 + "@img/sharp-libvips-darwin-arm64": 1.0.1 optional: true /@img/sharp-darwin-x64@0.33.0: @@ -5898,10 +5915,10 @@ packages: dev: false optional: true - /@img/sharp-darwin-x64@0.33.1: + /@img/sharp-darwin-x64@0.33.2: resolution: { - integrity: sha512-YrnuB3bXuWdG+hJlXtq7C73lF8ampkhU3tMxg5Hh+E7ikxbUVOU9nlNtVTloDXz6pRHt2y2oKJq7DY/yt+UXYw==, + integrity: sha512-/rK/69Rrp9x5kaWBjVN07KixZanRr+W1OiyKdXcbjQD6KbW+obaTeBBtLUAtbBsnlTTmWthw99xqoOS7SsySDg==, } engines: { @@ -5915,7 +5932,7 @@ packages: os: [darwin] requiresBuild: true optionalDependencies: - "@img/sharp-libvips-darwin-x64": 1.0.0 + "@img/sharp-libvips-darwin-x64": 1.0.1 optional: true /@img/sharp-libvips-darwin-arm64@1.0.0: @@ -5927,6 +5944,18 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-darwin-arm64@1.0.1: + resolution: + { + integrity: sha512-kQyrSNd6lmBV7O0BUiyu/OEw9yeNGFbQhbxswS1i6rMDwBBSX+e+rPzu3S+MwAiGU3HdLze3PanQ4Xkfemgzcw==, + } + engines: { macos: ">=11", npm: ">=9.6.5", pnpm: ">=7.1.0", yarn: ">=3.2.0" } + cpu: [arm64] + os: [darwin] + requiresBuild: true optional: true /@img/sharp-libvips-darwin-x64@1.0.0: @@ -5939,6 +5968,19 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-darwin-x64@1.0.1: + resolution: + { + integrity: sha512-eVU/JYLPVjhhrd8Tk6gosl5pVlvsqiFlt50wotCvdkFGf+mDNBJxMh+bvav+Wt3EBnNZWq8Sp2I7XfSjm8siog==, + } + engines: + { macos: ">=10.13", npm: ">=9.6.5", pnpm: ">=7.1.0", yarn: ">=3.2.0" } + cpu: [x64] + os: [darwin] + requiresBuild: true optional: true /@img/sharp-libvips-linux-arm64@1.0.0: @@ -5951,6 +5993,19 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-linux-arm64@1.0.1: + resolution: + { + integrity: sha512-bnGG+MJjdX70mAQcSLxgeJco11G+MxTz+ebxlz8Y3dxyeb3Nkl7LgLI0mXupoO+u1wRNx/iRj5yHtzA4sde1yA==, + } + engines: + { glibc: ">=2.26", npm: ">=9.6.5", pnpm: ">=7.1.0", yarn: ">=3.2.0" } + cpu: [arm64] + os: [linux] + requiresBuild: true optional: true /@img/sharp-libvips-linux-arm@1.0.0: @@ -5963,6 +6018,19 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-linux-arm@1.0.1: + resolution: + { + integrity: sha512-FtdMvR4R99FTsD53IA3LxYGghQ82t3yt0ZQ93WMZ2xV3dqrb0E8zq4VHaTOuLEAuA83oDawHV3fd+BsAPadHIQ==, + } + engines: + { glibc: ">=2.28", npm: ">=9.6.5", pnpm: ">=7.1.0", yarn: ">=3.2.0" } + cpu: [arm] + os: [linux] + requiresBuild: true optional: true /@img/sharp-libvips-linux-s390x@1.0.0: @@ -5975,6 +6043,19 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-linux-s390x@1.0.1: + resolution: + { + integrity: sha512-3+rzfAR1YpMOeA2zZNp+aYEzGNWK4zF3+sdMxuCS3ey9HhDbJ66w6hDSHDMoap32DueFwhhs3vwooAB2MaK4XQ==, + } + engines: + { glibc: ">=2.28", npm: ">=9.6.5", pnpm: ">=7.1.0", yarn: ">=3.2.0" } + cpu: [s390x] + os: [linux] + requiresBuild: true optional: true /@img/sharp-libvips-linux-x64@1.0.0: @@ -5987,6 +6068,19 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-linux-x64@1.0.1: + resolution: + { + integrity: sha512-3NR1mxFsaSgMMzz1bAnnKbSAI+lHXVTqAHgc1bgzjHuXjo4hlscpUxc0vFSAPKI3yuzdzcZOkq7nDPrP2F8Jgw==, + } + engines: + { glibc: ">=2.26", npm: ">=9.6.5", pnpm: ">=7.1.0", yarn: ">=3.2.0" } + cpu: [x64] + os: [linux] + requiresBuild: true optional: true /@img/sharp-libvips-linuxmusl-arm64@1.0.0: @@ -5999,6 +6093,19 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-linuxmusl-arm64@1.0.1: + resolution: + { + integrity: sha512-5aBRcjHDG/T6jwC3Edl3lP8nl9U2Yo8+oTl5drd1dh9Z1EBfzUKAJFUDTDisDjUwc7N4AjnPGfCA3jl3hY8uDg==, + } + engines: + { musl: ">=1.2.2", npm: ">=9.6.5", pnpm: ">=7.1.0", yarn: ">=3.2.0" } + cpu: [arm64] + os: [linux] + requiresBuild: true optional: true /@img/sharp-libvips-linuxmusl-x64@1.0.0: @@ -6011,6 +6118,19 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: false + optional: true + + /@img/sharp-libvips-linuxmusl-x64@1.0.1: + resolution: + { + integrity: sha512-dcT7inI9DBFK6ovfeWRe3hG30h51cBAP5JXlZfx6pzc/Mnf9HFCQDLtYf4MCBjxaaTfjCCjkBxcy3XzOAo5txw==, + } + engines: + { musl: ">=1.2.2", npm: ">=9.6.5", pnpm: ">=7.1.0", yarn: ">=3.2.0" } + cpu: [x64] + os: [linux] + requiresBuild: true optional: true /@img/sharp-linux-arm64@0.33.0: @@ -6034,10 +6154,10 @@ packages: dev: false optional: true - /@img/sharp-linux-arm64@0.33.1: + /@img/sharp-linux-arm64@0.33.2: resolution: { - integrity: sha512-59B5GRO2d5N3tIfeGHAbJps7cLpuWEQv/8ySd9109ohQ3kzyCACENkFVAnGPX00HwPTQcaBNF7HQYEfZyZUFfw==, + integrity: sha512-pz0NNo882vVfqJ0yNInuG9YH71smP4gRSdeL09ukC2YLE6ZyZePAlWKEHgAzJGTiOh8Qkaov6mMIMlEhmLdKew==, } engines: { @@ -6051,7 +6171,7 @@ packages: os: [linux] requiresBuild: true optionalDependencies: - "@img/sharp-libvips-linux-arm64": 1.0.0 + "@img/sharp-libvips-linux-arm64": 1.0.1 optional: true /@img/sharp-linux-arm@0.33.0: @@ -6075,10 +6195,10 @@ packages: dev: false optional: true - /@img/sharp-linux-arm@0.33.1: + /@img/sharp-linux-arm@0.33.2: resolution: { - integrity: sha512-Ii4X1vnzzI4j0+cucsrYA5ctrzU9ciXERfJR633S2r39CiD8npqH2GMj63uFZRCFt3E687IenAdbwIpQOJ5BNA==, + integrity: sha512-Fndk/4Zq3vAc4G/qyfXASbS3HBZbKrlnKZLEJzPLrXoJuipFNNwTes71+Ki1hwYW5lch26niRYoZFAtZVf3EGA==, } engines: { @@ -6092,7 +6212,7 @@ packages: os: [linux] requiresBuild: true optionalDependencies: - "@img/sharp-libvips-linux-arm": 1.0.0 + "@img/sharp-libvips-linux-arm": 1.0.1 optional: true /@img/sharp-linux-s390x@0.33.0: @@ -6116,10 +6236,10 @@ packages: dev: false optional: true - /@img/sharp-linux-s390x@0.33.1: + /@img/sharp-linux-s390x@0.33.2: resolution: { - integrity: sha512-tRGrb2pHnFUXpOAj84orYNxHADBDIr0J7rrjwQrTNMQMWA4zy3StKmMvwsI7u3dEZcgwuMMooIIGWEWOjnmG8A==, + integrity: sha512-MBoInDXDppMfhSzbMmOQtGfloVAflS2rP1qPcUIiITMi36Mm5YR7r0ASND99razjQUpHTzjrU1flO76hKvP5RA==, } engines: { @@ -6133,7 +6253,7 @@ packages: os: [linux] requiresBuild: true optionalDependencies: - "@img/sharp-libvips-linux-s390x": 1.0.0 + "@img/sharp-libvips-linux-s390x": 1.0.1 optional: true /@img/sharp-linux-x64@0.33.0: @@ -6157,10 +6277,10 @@ packages: dev: false optional: true - /@img/sharp-linux-x64@0.33.1: + /@img/sharp-linux-x64@0.33.2: resolution: { - integrity: sha512-4y8osC0cAc1TRpy02yn5omBeloZZwS62fPZ0WUAYQiLhSFSpWJfY/gMrzKzLcHB9ulUV6ExFiu2elMaixKDbeg==, + integrity: sha512-xUT82H5IbXewKkeF5aiooajoO1tQV4PnKfS/OZtb5DDdxS/FCI/uXTVZ35GQ97RZXsycojz/AJ0asoz6p2/H/A==, } engines: { @@ -6174,7 +6294,7 @@ packages: os: [linux] requiresBuild: true optionalDependencies: - "@img/sharp-libvips-linux-x64": 1.0.0 + "@img/sharp-libvips-linux-x64": 1.0.1 optional: true /@img/sharp-linuxmusl-arm64@0.33.0: @@ -6198,10 +6318,10 @@ packages: dev: false optional: true - /@img/sharp-linuxmusl-arm64@0.33.1: + /@img/sharp-linuxmusl-arm64@0.33.2: resolution: { - integrity: sha512-D3lV6clkqIKUizNS8K6pkuCKNGmWoKlBGh5p0sLO2jQERzbakhu4bVX1Gz+RS4vTZBprKlWaf+/Rdp3ni2jLfA==, + integrity: sha512-F+0z8JCu/UnMzg8IYW1TMeiViIWBVg7IWP6nE0p5S5EPQxlLd76c8jYemG21X99UzFwgkRo5yz2DS+zbrnxZeA==, } engines: { @@ -6215,7 +6335,7 @@ packages: os: [linux] requiresBuild: true optionalDependencies: - "@img/sharp-libvips-linuxmusl-arm64": 1.0.0 + "@img/sharp-libvips-linuxmusl-arm64": 1.0.1 optional: true /@img/sharp-linuxmusl-x64@0.33.0: @@ -6239,10 +6359,10 @@ packages: dev: false optional: true - /@img/sharp-linuxmusl-x64@0.33.1: + /@img/sharp-linuxmusl-x64@0.33.2: resolution: { - integrity: sha512-LOGKNu5w8uu1evVqUAUKTix2sQu1XDRIYbsi5Q0c/SrXhvJ4QyOx+GaajxmOg5PZSsSnCYPSmhjHHsRBx06/wQ==, + integrity: sha512-+ZLE3SQmSL+Fn1gmSaM8uFusW5Y3J9VOf+wMGNnTtJUMUxFhv+P4UPaYEYT8tqnyYVaOVGgMN/zsOxn9pSsO2A==, } engines: { @@ -6256,7 +6376,7 @@ packages: os: [linux] requiresBuild: true optionalDependencies: - "@img/sharp-libvips-linuxmusl-x64": 1.0.0 + "@img/sharp-libvips-linuxmusl-x64": 1.0.1 optional: true /@img/sharp-wasm32@0.33.0: @@ -6278,10 +6398,10 @@ packages: dev: false optional: true - /@img/sharp-wasm32@0.33.1: + /@img/sharp-wasm32@0.33.2: resolution: { - integrity: sha512-vWI/sA+0p+92DLkpAMb5T6I8dg4z2vzCUnp8yvxHlwBpzN8CIcO3xlSXrLltSvK6iMsVMNswAv+ub77rsf25lA==, + integrity: sha512-fLbTaESVKuQcpm8ffgBD7jLb/CQLcATju/jxtTXR1XCLwbOQt+OL5zPHSDMmp2JZIeq82e18yE0Vv7zh6+6BfQ==, } engines: { @@ -6293,7 +6413,7 @@ packages: cpu: [wasm32] requiresBuild: true dependencies: - "@emnapi/runtime": 0.44.0 + "@emnapi/runtime": 0.45.0 optional: true /@img/sharp-win32-ia32@0.33.0: @@ -6314,10 +6434,10 @@ packages: dev: false optional: true - /@img/sharp-win32-ia32@0.33.1: + /@img/sharp-win32-ia32@0.33.2: resolution: { - integrity: sha512-/xhYkylsKL05R+NXGJc9xr2Tuw6WIVl2lubFJaFYfW4/MQ4J+dgjIo/T4qjNRizrqs/szF/lC9a5+updmY9jaQ==, + integrity: sha512-okBpql96hIGuZ4lN3+nsAjGeggxKm7hIRu9zyec0lnfB8E7Z6p95BuRZzDDXZOl2e8UmR4RhYt631i7mfmKU8g==, } engines: { @@ -6349,10 +6469,10 @@ packages: dev: false optional: true - /@img/sharp-win32-x64@0.33.1: + /@img/sharp-win32-x64@0.33.2: resolution: { - integrity: sha512-XaM69X0n6kTEsp9tVYYLhXdg7Qj32vYJlAKRutxUsm1UlgQNx6BOhHwZPwukCGXBU2+tH87ip2eV1I/E8MQnZg==, + integrity: sha512-E4magOks77DK47FwHUIGH0RYWSgRBfGdK56kIHSVeB9uIS4pPFr4N2kIVsXdQQo4LzOsENKV5KAhRlRL7eMAdg==, } engines: { @@ -7470,7 +7590,7 @@ packages: } dev: false - /@payloadcms/bundler-webpack@1.0.5(@swc/core@1.3.100)(payload@2.8.1): + /@payloadcms/bundler-webpack@1.0.5(@swc/core@1.3.100)(payload@2.8.2): resolution: { integrity: sha512-TjzRTGRDQPrxGoMZ+fV76Pzx3nXC37oSZe/+dA/5HM18fRA9vlu/z54r8HHvThZc7ywx0iRiSwgPZYzQu5xUVQ==, @@ -7488,7 +7608,7 @@ packages: md5: 2.3.0 mini-css-extract-plugin: 1.6.2(webpack@5.89.0) path-browserify: 1.0.1 - payload: 2.8.1(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.8.2(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) postcss: 8.4.31 postcss-loader: 6.2.1(postcss@8.4.31)(webpack@5.89.0) postcss-preset-env: 9.0.0(postcss@8.4.31) @@ -7525,10 +7645,10 @@ packages: - webpack-dev-server dev: false - /@payloadcms/db-mongodb@1.3.2(payload@2.8.1): + /@payloadcms/db-mongodb@1.2.0(payload@2.8.2): resolution: { - integrity: sha512-4eXlhy1tLHNY6fluLZF89mgkveyPoMqvoC3z763iBbowECz5dWd8lWKuO43ce+N38TDeRRjfzG2x0HzwPuVzLQ==, + integrity: sha512-cRgy2Dl/KXBxvm4kBkrRZcWge9R3dWC2taocjFxaTlzM0SQrQQtwGej8IiKmnUAswz897YzkQR4wQQwidEtb3A==, } peerDependencies: payload: ^2.0.0 @@ -7540,7 +7660,7 @@ packages: mongoose: 6.12.3 mongoose-aggregate-paginate-v2: 1.0.6 mongoose-paginate-v2: 1.7.22 - payload: 2.8.1(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.8.2(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) prompts: 2.4.2 uuid: 9.0.0 transitivePeerDependencies: @@ -7548,7 +7668,7 @@ packages: - supports-color dev: false - /@payloadcms/plugin-cloud-storage@1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.8.1): + /@payloadcms/plugin-cloud-storage@1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.8.2): resolution: { integrity: sha512-WFqfZcT7R1LD+FfKKKYNsJPDRE+0VlYEMxzGuPKeUQn9w9sqTy2UD01YCEl0Zcyuq8fD9mRUjeLitSo1aAUimQ==, @@ -7571,7 +7691,7 @@ packages: dependencies: "@aws-sdk/client-s3": 3.472.0 "@aws-sdk/lib-storage": 3.472.0(@aws-sdk/client-s3@3.472.0) - payload: 2.8.1(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.8.2(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) range-parser: 1.2.1 dev: false @@ -7595,7 +7715,7 @@ packages: react: 18.2.0 dev: false - /@payloadcms/plugin-seo@1.0.15(payload@2.8.1)(react@18.2.0): + /@payloadcms/plugin-seo@1.0.15(payload@2.8.2)(react@18.2.0): resolution: { integrity: sha512-7nU0DD3UZOOHsV2UIkOWL2JNCX+u1WNbEvZOiGpO6lB6YekuVIMqxHKbTdVR73UeW44lApvS9LTgif3XLQ5HDA==, @@ -7604,11 +7724,11 @@ packages: payload: ^0.18.5 || ^1.0.0 || ^2.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: - payload: 2.8.1(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.8.2(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) react: 18.2.0 dev: false - /@payloadcms/richtext-slate@1.3.1(payload@2.8.1)(react-dom@18.2.0): + /@payloadcms/richtext-slate@1.3.1(payload@2.8.2)(react-dom@18.2.0): resolution: { integrity: sha512-DwHDn0F7PTGP1WGLQmpNRUdfhwHQwOFpBzXuQtIqlykkj5AAsZrLmfjQabTHPOzKZdLkMRrxhYOGERi4F1T5Hw==, @@ -7619,7 +7739,7 @@ packages: "@faceless-ui/modal": 2.0.1(react-dom@18.2.0)(react@18.2.0) i18next: 22.5.1 is-hotkey: 0.2.0 - payload: 2.8.1(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.8.2(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) react: 18.2.0 react-i18next: 11.18.6(i18next@22.5.1)(react-dom@18.2.0)(react@18.2.0) slate: 0.91.4 @@ -10167,7 +10287,7 @@ packages: resolve-url-loader: 5.0.0 sass-loader: 12.6.0(sass@1.69.5)(webpack@5.89.0) semver: 7.5.4 - sharp: 0.33.1 + sharp: 0.33.2 style-loader: 3.3.3(webpack@5.89.0) styled-jsx: 5.1.1(@babel/core@7.23.6)(react@18.2.0) ts-dedent: 2.2.0 @@ -23736,7 +23856,7 @@ packages: sass-loader: 12.6.0(sass@1.69.5)(webpack@5.89.0) scheduler: 0.23.0 scmp: 2.1.0 - sharp: 0.33.1 + sharp: 0.33.2 slate: 0.91.4 slate-history: 0.86.0(slate@0.91.4) slate-hyperscript: 0.81.3(slate@0.91.4) @@ -23779,10 +23899,10 @@ packages: - webpack-dev-server dev: false - /payload@2.8.1(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0): + /payload@2.8.2(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0): resolution: { - integrity: sha512-g+FbNWmmx4b/4I9fLxXbx5cKNPCwWJBDTH2SoLqCooAsX5r/NS78Ae5KcWwRH+xVdoiMXG2vQ9Li4npJ+ckJlQ==, + integrity: sha512-n1WXnhZKe/wHFz4akW+w16OUzCU45i2fFJzgiXakMGC58JbvpDGo/yh287ENrdiHOdtb/a/YkPsKpa6lbZ+gBA==, } engines: { node: ">=14" } hasBin: true @@ -23870,7 +23990,7 @@ packages: sass: 1.69.4 scheduler: 0.23.0 scmp: 2.1.0 - sharp: 0.33.1 + sharp: 0.33.2 swc-loader: 0.2.3(@swc/core@1.3.76)(webpack@5.89.0) terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(esbuild@0.18.20)(webpack@5.89.0) ts-essentials: 7.0.3(typescript@5.3.3) @@ -26779,6 +26899,13 @@ packages: } dev: false + /readline@1.3.0: + resolution: + { + integrity: sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==, + } + dev: false + /real-require@0.2.0: resolution: { @@ -27663,37 +27790,37 @@ packages: "@img/sharp-win32-x64": 0.33.0 dev: false - /sharp@0.33.1: + /sharp@0.33.2: resolution: { - integrity: sha512-iAYUnOdTqqZDb3QjMneBKINTllCJDZ3em6WaWy7NPECM4aHncvqHRm0v0bN9nqJxMiwamv5KIdauJ6lUzKDpTQ==, + integrity: sha512-WlYOPyyPDiiM07j/UO+E720ju6gtNtHjEGg5vovUk1Lgxyjm2LFO+37Nt/UI3MMh2l6hxTWQWi7qk3cXJTutcQ==, } - engines: { libvips: ">=8.15.0", node: ^18.17.0 || ^20.3.0 || >=21.0.0 } + engines: { libvips: ">=8.15.1", node: ^18.17.0 || ^20.3.0 || >=21.0.0 } requiresBuild: true dependencies: color: 4.2.3 detect-libc: 2.0.2 semver: 7.5.4 optionalDependencies: - "@img/sharp-darwin-arm64": 0.33.1 - "@img/sharp-darwin-x64": 0.33.1 - "@img/sharp-libvips-darwin-arm64": 1.0.0 - "@img/sharp-libvips-darwin-x64": 1.0.0 - "@img/sharp-libvips-linux-arm": 1.0.0 - "@img/sharp-libvips-linux-arm64": 1.0.0 - "@img/sharp-libvips-linux-s390x": 1.0.0 - "@img/sharp-libvips-linux-x64": 1.0.0 - "@img/sharp-libvips-linuxmusl-arm64": 1.0.0 - "@img/sharp-libvips-linuxmusl-x64": 1.0.0 - "@img/sharp-linux-arm": 0.33.1 - "@img/sharp-linux-arm64": 0.33.1 - "@img/sharp-linux-s390x": 0.33.1 - "@img/sharp-linux-x64": 0.33.1 - "@img/sharp-linuxmusl-arm64": 0.33.1 - "@img/sharp-linuxmusl-x64": 0.33.1 - "@img/sharp-wasm32": 0.33.1 - "@img/sharp-win32-ia32": 0.33.1 - "@img/sharp-win32-x64": 0.33.1 + "@img/sharp-darwin-arm64": 0.33.2 + "@img/sharp-darwin-x64": 0.33.2 + "@img/sharp-libvips-darwin-arm64": 1.0.1 + "@img/sharp-libvips-darwin-x64": 1.0.1 + "@img/sharp-libvips-linux-arm": 1.0.1 + "@img/sharp-libvips-linux-arm64": 1.0.1 + "@img/sharp-libvips-linux-s390x": 1.0.1 + "@img/sharp-libvips-linux-x64": 1.0.1 + "@img/sharp-libvips-linuxmusl-arm64": 1.0.1 + "@img/sharp-libvips-linuxmusl-x64": 1.0.1 + "@img/sharp-linux-arm": 0.33.2 + "@img/sharp-linux-arm64": 0.33.2 + "@img/sharp-linux-s390x": 0.33.2 + "@img/sharp-linux-x64": 0.33.2 + "@img/sharp-linuxmusl-arm64": 0.33.2 + "@img/sharp-linuxmusl-x64": 0.33.2 + "@img/sharp-wasm32": 0.33.2 + "@img/sharp-win32-ia32": 0.33.2 + "@img/sharp-win32-x64": 0.33.2 /shebang-command@1.2.0: resolution: From 1fabff3594d34d7cee71f42d61af4d48c2a542d2 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 23 Jan 2024 17:52:30 +0300 Subject: [PATCH 24/43] Remove env file --- docker-compose.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a32c491c2..e7d35cf89 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,8 +19,6 @@ services: ports: - 3000:3000 container_name: charterafrica - env_file: - - apps/charterafrica/.env.local networks: - net @@ -32,8 +30,6 @@ services: MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:-rootpassword} ports: - ${MONGODB_PORT:-27017}:27017 - env_file: - - apps/charterafrica/.env.local volumes: - ./data_container/db:/data/db - ./mongo-keyfile:/etc/mongo-keyfile From 7a71ab6495f45ac1aa1eb6c4790e489e16f3a0ec Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Wed, 24 Jan 2024 09:37:31 +0300 Subject: [PATCH 25/43] Make runtime env file a variable --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index e7d35cf89..2ff1563ac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,8 @@ services: ports: - 3000:3000 container_name: charterafrica + env_file: + - ${ENV_FILE} networks: - net From 4241b0b1b7d8726350bc5d3762aa938ab09398f2 Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:42:08 +0300 Subject: [PATCH 26/43] Update README.md to include db setup Signed-off-by: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> --- apps/charterafrica/README.md | 16 +++++++++++++++- docker-compose.yml | 9 +++------ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/apps/charterafrica/README.md b/apps/charterafrica/README.md index 7926709fb..164e77e5c 100644 --- a/apps/charterafrica/README.md +++ b/apps/charterafrica/README.md @@ -16,7 +16,21 @@ and modify the `.env.local` file according to your needs. The default `.env` file is for the publicly visible environment variables. **DO NOT** include any secrets in it. All secrets should go into `env.local`. -For more, see <> +For more, see NextJS env var docs [here](https://nextjs.org/docs/basic-features/environment-variables). + +## Database setup + +Generate a new MongoDB keyfile by running the following command: + +```bash +openssl rand -base64 741 > ./mongo-keyfile +``` + +Start the database server: + +```bash +make mongodb +``` Then run the development server: diff --git a/docker-compose.yml b/docker-compose.yml index 2ff1563ac..40167bdb8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -44,12 +44,9 @@ services: retries: 3 command: [ - "mongod", - "--replSet", - "dbrs", - "--bind_ip_all", - "--keyFile", - "/etc/mongo-keyfile", + "sh", + "-c", + "chmod 600 /etc/mongo-keyfile && exec mongod --replSet dbrs --bind_ip_all --keyFile /etc/mongo-keyfile", ] networks: - net From de9f56037e0ba67b47dbf2b09a481aa9062667db Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Wed, 24 Jan 2024 11:55:57 +0300 Subject: [PATCH 27/43] Fix mongofile permissions Signed-off-by: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> --- apps/charterafrica/README.md | 1 + docker-compose.yml | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/charterafrica/README.md b/apps/charterafrica/README.md index 164e77e5c..204a07dd4 100644 --- a/apps/charterafrica/README.md +++ b/apps/charterafrica/README.md @@ -24,6 +24,7 @@ Generate a new MongoDB keyfile by running the following command: ```bash openssl rand -base64 741 > ./mongo-keyfile +chmod 600 ./mongo-keyfile ``` Start the database server: diff --git a/docker-compose.yml b/docker-compose.yml index 40167bdb8..2ff1563ac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -44,9 +44,12 @@ services: retries: 3 command: [ - "sh", - "-c", - "chmod 600 /etc/mongo-keyfile && exec mongod --replSet dbrs --bind_ip_all --keyFile /etc/mongo-keyfile", + "mongod", + "--replSet", + "dbrs", + "--bind_ip_all", + "--keyFile", + "/etc/mongo-keyfile", ] networks: - net From a491e0869d6eada3243d8672e6f408f8a81d0156 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Wed, 24 Jan 2024 16:56:30 +0300 Subject: [PATCH 28/43] UPDATE: We are using an image for MongoDB so we shouldn't need build. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 739f3850e..b80f295b4 100644 --- a/Makefile +++ b/Makefile @@ -6,4 +6,4 @@ charterafrica: docker-compose --env-file apps/charterafrica/.env.local up charterafrica --build -d mongodb: - docker-compose up mongodb --build -d + docker-compose up mongodb From db6ffe23d4e97705f0358928476ef1792028e2c0 Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Fri, 26 Jan 2024 10:43:50 +0300 Subject: [PATCH 29/43] Switch to using healthcheck to initialise cluster We can't create a ResultSet on docker init since the mongo node is not communicating with the outside world yet. --- docker-compose.yml | 44 +++++++++++++++----------------------------- 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2ff1563ac..5cd337400 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,48 +13,34 @@ services: PAYLOAD_SECRET_KEY: ${PAYLOAD_SECRET_KEY} SENTRY_AUTH_TOKEN: ${SENTRY_AUTH_TOKEN} SENTRY_ORG: ${SENTRY_ORG} - NEXT_PUBLIC_SENTRY_DSN: ${CHARTERAFRICA_SENTRY_DSN} + NEXT_PUBLIC_SENTRY_DSN: ${NEXT_PUBLIC_SENTRY_DSN} SENTRY_ENV: ${SENTRY_ENV} SENTRY_PROJECT: ${SENTRY_PROJECT} ports: - 3000:3000 - container_name: charterafrica - env_file: - - ${ENV_FILE} - networks: - - net mongodb: - container_name: mongodb image: mongo:6.0.13 environment: MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-root} MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:-rootpassword} ports: - - ${MONGODB_PORT:-27017}:27017 + - 27017:27017 volumes: - - ./data_container/db:/data/db + - db_data:/data/db - ./mongo-keyfile:/etc/mongo-keyfile - - ./contrib/docker/scripts/dbInit.js:/docker-entrypoint-initdb.d/dbInit.js:ro - restart: always + extra_hosts: + - "host.docker.internal:host-gateway" healthcheck: - test: echo 'db.runCommand("ping").ok' | mongosh mongodb:27017/charterafrica --quiet - interval: 10s - timeout: 5s - retries: 3 + # https://medium.com/workleap/the-only-local-mongodb-replica-set-with-docker-compose-guide-youll-ever-need-2f0b74dd8384 + test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'host.docker.internal:27017'}]}) }" | mongosh --port 27017 --quiet + interval: 5s + timeout: 30s + start_period: 0s + start_interval: 1s + retries: 30 command: - [ - "mongod", - "--replSet", - "dbrs", - "--bind_ip_all", - "--keyFile", - "/etc/mongo-keyfile", - ] - networks: - - net + ["--replSet", "rs0", "--bind_ip_all", "--keyFile", "/etc/mongo-keyfile"] + volumes: - data_container: -networks: - net: - driver: bridge + db_data: From 415043531f4c2b341366bc3c9fa3bad7032418ab Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Fri, 26 Jan 2024 10:44:57 +0300 Subject: [PATCH 30/43] Ensure healtchecks run when running mongodb This means switching from --detach to --wait --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b80f295b4..6d694c706 100644 --- a/Makefile +++ b/Makefile @@ -6,4 +6,5 @@ charterafrica: docker-compose --env-file apps/charterafrica/.env.local up charterafrica --build -d mongodb: - docker-compose up mongodb + docker-compose --env-file apps/charterafrica/.env.local up --wait mongodb + From ae8b75bae213c061e3ae0d16013afe5972b7c330 Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Fri, 26 Jan 2024 10:45:48 +0300 Subject: [PATCH 31/43] Remove unnecessary data directory binding We are now using a volume in docker-compose.yml --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index f09ae13a8..74d544686 100644 --- a/.gitignore +++ b/.gitignore @@ -54,4 +54,3 @@ apps/promisetracker/public/data/** storybook-static mongo-keyfile -data_container From f24289f21b414ff3eb7bdc1cd6a88a4a32a716cf Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Fri, 26 Jan 2024 10:50:34 +0300 Subject: [PATCH 32/43] Ensure mongodb is health before starting codeforafrica This should ensure ReplicaSet is created --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5cd337400..fe5517ae1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: charterafrica: depends_on: mongodb: - condition: service_started + condition: service_healthy build: context: . dockerfile: Dockerfile.charterafrica From 8a13afcddb311c244b73d9f4678b3f9a7f5a115c Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Fri, 26 Jan 2024 18:26:00 +0300 Subject: [PATCH 33/43] FEAT: Update Docker compose --- .gitignore | 1 + Makefile | 4 ++-- apps/charterafrica/payload.config.ts | 15 +++++++++------ contrib/docker/scripts/dbInit.js | 2 +- docker-compose.yml | 13 +++++++++++-- 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 74d544686..4e1a3a942 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ apps/promisetracker/public/data/** storybook-static mongo-keyfile +db_data diff --git a/Makefile b/Makefile index 6d694c706..593e189a2 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,8 @@ .PHONY: charterafrica mongodb charterafrica: - docker-compose --env-file apps/charterafrica/.env.local up charterafrica --build -d + docker compose --env-file apps/charterafrica/.env.local up charterafrica --build mongodb: - docker-compose --env-file apps/charterafrica/.env.local up --wait mongodb + docker compose --env-file apps/charterafrica/.env.local up --wait mongodb diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index 0cb9766b6..52b1ac419 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -77,6 +77,9 @@ const adapter = s3Adapter({ export default buildConfig({ serverURL: appURL, editor: slateEditor({}), + routes: { + admin: "/admin", + }, db: mongooseAdapter({ url: process.env.MONGO_URL, migrationDir: process.env.MIGRATIONS_DIR, @@ -111,12 +114,12 @@ export default buildConfig({ ] as GlobalConfig[], ...(locales?.length ? { - localization: { - locales, - defaultLocale, - fallback: true, - }, - } + localization: { + locales, + defaultLocale, + fallback: true, + }, + } : undefined), admin: { diff --git a/contrib/docker/scripts/dbInit.js b/contrib/docker/scripts/dbInit.js index b9c75ac43..d77bbfde5 100755 --- a/contrib/docker/scripts/dbInit.js +++ b/contrib/docker/scripts/dbInit.js @@ -1,5 +1,5 @@ const config = { - _id: "dbrs", + _id: "rs0", version: 1, members: [ { diff --git a/docker-compose.yml b/docker-compose.yml index fe5517ae1..29a280c6b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,9 +13,19 @@ services: PAYLOAD_SECRET_KEY: ${PAYLOAD_SECRET_KEY} SENTRY_AUTH_TOKEN: ${SENTRY_AUTH_TOKEN} SENTRY_ORG: ${SENTRY_ORG} - NEXT_PUBLIC_SENTRY_DSN: ${NEXT_PUBLIC_SENTRY_DSN} SENTRY_ENV: ${SENTRY_ENV} SENTRY_PROJECT: ${SENTRY_PROJECT} + environment: + S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY_ID} + S3_SECRET_ACCESS_KEY: ${S3_SECRET_ACCESS_KEY} + S3_BUCKET: ${S3_BUCKET} + S3_REGION: ${S3_REGION} + MONGO_URL: mongodb://${MONGO_INITDB_ROOT_USERNAME:-root}:${MONGO_INITDB_ROOT_PASSWORD:-rootpassword}@host.docker.internal:${MONGODB_PORT:-27017}/charterafrica?authSource=admin&directConnection=true + PAYLOAD_SECRET_KEY: ${PAYLOAD_SECRET_KEY} + SENTRY_AUTH_TOKEN: ${SENTRY_AUTH_TOKEN} + SENTRY_ORG: ${SENTRY_ORG} + SENTRY_ENV: ${SENTRY_ENV} + SENTRY_PROJECT: ${SENTRY_PROJECT} ports: - 3000:3000 @@ -37,7 +47,6 @@ services: interval: 5s timeout: 30s start_period: 0s - start_interval: 1s retries: 30 command: ["--replSet", "rs0", "--bind_ip_all", "--keyFile", "/etc/mongo-keyfile"] From 3f3871d068588d38675fc2a8bf06ef36109f240f Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Fri, 26 Jan 2024 18:30:04 +0300 Subject: [PATCH 34/43] Update docker-compose --- Makefile | 2 +- apps/charterafrica/payload.config.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 593e189a2..686c7821c 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ .PHONY: charterafrica mongodb charterafrica: - docker compose --env-file apps/charterafrica/.env.local up charterafrica --build + docker compose --env-file apps/charterafrica/.env.local up charterafrica --build -d mongodb: docker compose --env-file apps/charterafrica/.env.local up --wait mongodb diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index 52b1ac419..239524ccf 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -114,12 +114,12 @@ export default buildConfig({ ] as GlobalConfig[], ...(locales?.length ? { - localization: { - locales, - defaultLocale, - fallback: true, - }, - } + localization: { + locales, + defaultLocale, + fallback: true, + }, + } : undefined), admin: { From 7790c3ed0f13fbb32f13c6a2c344b5d4d99810ef Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Mon, 29 Jan 2024 12:49:10 +0300 Subject: [PATCH 35/43] Working Build Signed-off-by: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> --- apps/charterafrica/package.json | 4 +- apps/charterafrica/payload.config.ts | 2 +- pnpm-lock.yaml | 311 +++++++++++++++++++++++---- 3 files changed, 276 insertions(+), 41 deletions(-) diff --git a/apps/charterafrica/package.json b/apps/charterafrica/package.json index ae3829f4f..2509d278a 100644 --- a/apps/charterafrica/package.json +++ b/apps/charterafrica/package.json @@ -51,7 +51,7 @@ "@nivo/pie": "^0.84.0", "@nivo/tooltip": "^0.84.0", "@nivo/waffle": "^0.84.0", - "@payloadcms/bundler-webpack": "^1.0.5", + "@payloadcms/bundler-webpack": "^1.0.6", "@payloadcms/db-mongodb": "^1.2.0", "@payloadcms/plugin-cloud-storage": "^1.1.1", "@payloadcms/plugin-nested-docs": "^1.0.9", @@ -68,7 +68,7 @@ "next": "^14.0.4", "next-seo": "^6.4.0", "nodemailer-sendgrid": "^1.0.3", - "payload": "^2.8.2", + "payload": "^2.9.0", "prompts": "^2.4.2", "prop-types": "^15.8.1", "qs": "^6.11.2", diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index 239524ccf..1b3b8ebad 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -191,4 +191,4 @@ export default buildConfig({ docs.reduce((url, doc) => `${url}/${doc.slug}`, ""), }), ], -}); +} as any); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bd5df5281..6d8dbc30b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,5 +1,9 @@ lockfileVersion: "6.0" +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + overrides: sharp: ^0.33.0 @@ -88,23 +92,23 @@ importers: specifier: ^0.84.0 version: 0.84.0(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0) "@payloadcms/bundler-webpack": - specifier: ^1.0.5 - version: 1.0.5(@swc/core@1.3.100)(payload@2.8.2) + specifier: ^1.0.6 + version: 1.0.6(@swc/core@1.3.100)(payload@2.9.0) "@payloadcms/db-mongodb": specifier: ^1.2.0 - version: 1.2.0(payload@2.8.2) + version: 1.2.0(payload@2.9.0) "@payloadcms/plugin-cloud-storage": specifier: ^1.1.1 - version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.8.2) + version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.9.0) "@payloadcms/plugin-nested-docs": specifier: ^1.0.9 version: 1.0.9 "@payloadcms/plugin-seo": specifier: ^1.0.15 - version: 1.0.15(payload@2.8.2)(react@18.2.0) + version: 1.0.15(payload@2.9.0)(react@18.2.0) "@payloadcms/richtext-slate": specifier: ^1.3.1 - version: 1.3.1(payload@2.8.2)(react-dom@18.2.0) + version: 1.3.1(payload@2.9.0)(react-dom@18.2.0) "@react-spring/web": specifier: ^9.7.3 version: 9.7.3(react-dom@18.2.0)(react@18.2.0) @@ -139,8 +143,8 @@ importers: specifier: ^1.0.3 version: 1.0.3 payload: - specifier: ^2.8.2 - version: 2.8.2(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + specifier: ^2.9.0 + version: 2.9.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) prompts: specifier: ^2.4.2 version: 2.4.2 @@ -297,7 +301,7 @@ importers: version: 14.0.4 "@payloadcms/plugin-cloud-storage": specifier: ^1.1.1 - version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.8.2) + version: 1.1.1(payload@1.15.8) "@payloadcms/plugin-nested-docs": specifier: ^1.0.9 version: 1.0.9 @@ -943,7 +947,7 @@ importers: version: 5.3.3 webpack: specifier: ^5.89.0 - version: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) + version: 5.89.0 packages/commons-ui-core: dependencies: @@ -1013,7 +1017,7 @@ importers: version: 5.3.3 webpack: specifier: ^5.89.0 - version: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) + version: 5.89.0 packages/commons-ui-next: dependencies: @@ -1071,7 +1075,7 @@ importers: version: 5.3.3 webpack: specifier: ^5.89.0 - version: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) + version: 5.89.0 packages/commons-ui-testing-library: dependencies: @@ -1138,7 +1142,7 @@ importers: version: 5.3.3 webpack: specifier: ^5.89.0 - version: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) + version: 5.89.0 packages/eslint-config-commons-ui: dependencies: @@ -7590,10 +7594,10 @@ packages: } dev: false - /@payloadcms/bundler-webpack@1.0.5(@swc/core@1.3.100)(payload@2.8.2): + /@payloadcms/bundler-webpack@1.0.6(@swc/core@1.3.100)(payload@2.9.0): resolution: { - integrity: sha512-TjzRTGRDQPrxGoMZ+fV76Pzx3nXC37oSZe/+dA/5HM18fRA9vlu/z54r8HHvThZc7ywx0iRiSwgPZYzQu5xUVQ==, + integrity: sha512-hKnRqF2IhYCqNwb8FjKNnjR9fKCXVK2PJgPu3R89dvFhvMnwkbkbj86LMCC4dLmQ9RXmmh/drw4Q5acQ/Xec8g==, } peerDependencies: payload: ^2.0.0 @@ -7608,16 +7612,16 @@ packages: md5: 2.3.0 mini-css-extract-plugin: 1.6.2(webpack@5.89.0) path-browserify: 1.0.1 - payload: 2.8.2(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.9.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) postcss: 8.4.31 postcss-loader: 6.2.1(postcss@8.4.31)(webpack@5.89.0) postcss-preset-env: 9.0.0(postcss@8.4.31) process: 0.11.10 - sass-loader: 12.6.0(sass@1.69.5)(webpack@5.89.0) + sass-loader: 12.6.0(webpack@5.89.0) style-loader: 2.0.0(webpack@5.89.0) swc-loader: 0.2.3(@swc/core@1.3.100)(webpack@5.89.0) swc-minify-webpack-plugin: 2.1.1(@swc/core@1.3.100)(webpack@5.89.0) - terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(esbuild@0.18.20)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(webpack@5.89.0) url-loader: 4.1.1(file-loader@6.2.0)(webpack@5.89.0) webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) webpack-bundle-analyzer: 4.10.1 @@ -7645,7 +7649,7 @@ packages: - webpack-dev-server dev: false - /@payloadcms/db-mongodb@1.2.0(payload@2.8.2): + /@payloadcms/db-mongodb@1.2.0(payload@2.9.0): resolution: { integrity: sha512-cRgy2Dl/KXBxvm4kBkrRZcWge9R3dWC2taocjFxaTlzM0SQrQQtwGej8IiKmnUAswz897YzkQR4wQQwidEtb3A==, @@ -7660,7 +7664,7 @@ packages: mongoose: 6.12.3 mongoose-aggregate-paginate-v2: 1.0.6 mongoose-paginate-v2: 1.7.22 - payload: 2.8.2(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.9.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) prompts: 2.4.2 uuid: 9.0.0 transitivePeerDependencies: @@ -7668,7 +7672,7 @@ packages: - supports-color dev: false - /@payloadcms/plugin-cloud-storage@1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.8.2): + /@payloadcms/plugin-cloud-storage@1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.9.0): resolution: { integrity: sha512-WFqfZcT7R1LD+FfKKKYNsJPDRE+0VlYEMxzGuPKeUQn9w9sqTy2UD01YCEl0Zcyuq8fD9mRUjeLitSo1aAUimQ==, @@ -7691,7 +7695,32 @@ packages: dependencies: "@aws-sdk/client-s3": 3.472.0 "@aws-sdk/lib-storage": 3.472.0(@aws-sdk/client-s3@3.472.0) - payload: 2.8.2(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.9.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + range-parser: 1.2.1 + dev: false + + /@payloadcms/plugin-cloud-storage@1.1.1(payload@1.15.8): + resolution: + { + integrity: sha512-WFqfZcT7R1LD+FfKKKYNsJPDRE+0VlYEMxzGuPKeUQn9w9sqTy2UD01YCEl0Zcyuq8fD9mRUjeLitSo1aAUimQ==, + } + peerDependencies: + "@aws-sdk/client-s3": ^3.142.0 + "@aws-sdk/lib-storage": ^3.267.0 + "@azure/storage-blob": ^12.11.0 + "@google-cloud/storage": ^6.4.1 + payload: ^1.7.2 || ^2.0.0 + peerDependenciesMeta: + "@aws-sdk/client-s3": + optional: true + "@aws-sdk/lib-storage": + optional: true + "@azure/storage-blob": + optional: true + "@google-cloud/storage": + optional: true + dependencies: + payload: 1.15.8(@types/react@18.2.45)(typescript@5.3.3) range-parser: 1.2.1 dev: false @@ -7715,7 +7744,7 @@ packages: react: 18.2.0 dev: false - /@payloadcms/plugin-seo@1.0.15(payload@2.8.2)(react@18.2.0): + /@payloadcms/plugin-seo@1.0.15(payload@2.9.0)(react@18.2.0): resolution: { integrity: sha512-7nU0DD3UZOOHsV2UIkOWL2JNCX+u1WNbEvZOiGpO6lB6YekuVIMqxHKbTdVR73UeW44lApvS9LTgif3XLQ5HDA==, @@ -7724,11 +7753,11 @@ packages: payload: ^0.18.5 || ^1.0.0 || ^2.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: - payload: 2.8.2(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.9.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) react: 18.2.0 dev: false - /@payloadcms/richtext-slate@1.3.1(payload@2.8.2)(react-dom@18.2.0): + /@payloadcms/richtext-slate@1.3.1(payload@2.9.0)(react-dom@18.2.0): resolution: { integrity: sha512-DwHDn0F7PTGP1WGLQmpNRUdfhwHQwOFpBzXuQtIqlykkj5AAsZrLmfjQabTHPOzKZdLkMRrxhYOGERi4F1T5Hw==, @@ -7739,7 +7768,7 @@ packages: "@faceless-ui/modal": 2.0.1(react-dom@18.2.0)(react@18.2.0) i18next: 22.5.1 is-hotkey: 0.2.0 - payload: 2.8.2(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 2.9.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) react: 18.2.0 react-i18next: 11.18.6(i18next@22.5.1)(react-dom@18.2.0)(react@18.2.0) slate: 0.91.4 @@ -10285,7 +10314,7 @@ packages: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) resolve-url-loader: 5.0.0 - sass-loader: 12.6.0(sass@1.69.5)(webpack@5.89.0) + sass-loader: 12.6.0(webpack@5.89.0) semver: 7.5.4 sharp: 0.33.2 style-loader: 3.3.3(webpack@5.89.0) @@ -19412,6 +19441,7 @@ packages: { integrity: sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==, } + dev: false /import-fresh@3.3.0: resolution: @@ -23864,7 +23894,7 @@ packages: style-loader: 2.0.0(webpack@5.89.0) swc-loader: 0.2.3(@swc/core@1.3.78)(webpack@5.89.0) swc-minify-webpack-plugin: 2.1.1(@swc/core@1.3.78)(webpack@5.89.0) - terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(esbuild@0.18.20)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.78)(webpack@5.89.0) ts-essentials: 7.0.3(typescript@5.3.3) url-loader: 4.1.1(file-loader@6.2.0)(webpack@5.89.0) use-context-selector: 1.4.1(react-dom@18.2.0)(react@18.2.0)(scheduler@0.23.0) @@ -23899,10 +23929,10 @@ packages: - webpack-dev-server dev: false - /payload@2.8.2(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0): + /payload@2.9.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0): resolution: { - integrity: sha512-n1WXnhZKe/wHFz4akW+w16OUzCU45i2fFJzgiXakMGC58JbvpDGo/yh287ENrdiHOdtb/a/YkPsKpa6lbZ+gBA==, + integrity: sha512-C8QekOUOh1689qWWrCLNXhgC5K1LnKYFmFEru/GxhQBEO6SFEULdQHMnmjP1yrHARu1eVU24UdFVniKY+9oR7A==, } engines: { node: ">=14" } hasBin: true @@ -23992,7 +24022,7 @@ packages: scmp: 2.1.0 sharp: 0.33.2 swc-loader: 0.2.3(@swc/core@1.3.76)(webpack@5.89.0) - terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(esbuild@0.18.20)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.76)(webpack@5.89.0) ts-essentials: 7.0.3(typescript@5.3.3) use-context-selector: 1.4.1(react-dom@18.2.0)(react@18.2.0)(scheduler@0.23.0) uuid: 9.0.1 @@ -27503,6 +27533,33 @@ packages: neo-async: 2.6.2 sass: 1.69.5 webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) + dev: false + + /sass-loader@12.6.0(webpack@5.89.0): + resolution: + { + integrity: sha512-oLTaH0YCtX4cfnJZxKSLAyglED0naiYfNG1iXfU5w1LNZ+ukoA5DtyDIN5zmKVZwYNJP4KRc5Y3hkWga+7tYfA==, + } + engines: { node: ">= 12.13.0" } + peerDependencies: + fibers: ">= 3.1.0" + node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 + sass: ^1.3.0 + sass-embedded: "*" + webpack: ^5.0.0 + peerDependenciesMeta: + fibers: + optional: true + node-sass: + optional: true + sass: + optional: true + sass-embedded: + optional: true + dependencies: + klona: 2.0.6 + neo-async: 2.6.2 + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) /sass@1.69.4: resolution: @@ -27528,6 +27585,7 @@ packages: chokidar: 3.5.3 immutable: 4.3.4 source-map-js: 1.0.2 + dev: false /sax@1.2.1: resolution: @@ -29005,6 +29063,143 @@ packages: serialize-javascript: 6.0.1 terser: 5.26.0 webpack: 5.89.0(@swc/core@1.3.100)(esbuild@0.18.20) + dev: true + + /terser-webpack-plugin@5.3.9(@swc/core@1.3.100)(webpack@5.89.0): + resolution: + { + integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==, + } + engines: { node: ">= 10.13.0" } + peerDependencies: + "@swc/core": "*" + esbuild: "*" + uglify-js: "*" + webpack: ^5.1.0 + peerDependenciesMeta: + "@swc/core": + optional: true + esbuild: + optional: true + uglify-js: + optional: true + dependencies: + "@jridgewell/trace-mapping": 0.3.20 + "@swc/core": 1.3.100 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.1 + terser: 5.26.0 + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) + + /terser-webpack-plugin@5.3.9(@swc/core@1.3.76)(webpack@5.89.0): + resolution: + { + integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==, + } + engines: { node: ">= 10.13.0" } + peerDependencies: + "@swc/core": "*" + esbuild: "*" + uglify-js: "*" + webpack: ^5.1.0 + peerDependenciesMeta: + "@swc/core": + optional: true + esbuild: + optional: true + uglify-js: + optional: true + dependencies: + "@jridgewell/trace-mapping": 0.3.20 + "@swc/core": 1.3.76 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.1 + terser: 5.26.0 + webpack: 5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0) + dev: false + + /terser-webpack-plugin@5.3.9(@swc/core@1.3.78)(webpack@5.89.0): + resolution: + { + integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==, + } + engines: { node: ">= 10.13.0" } + peerDependencies: + "@swc/core": "*" + esbuild: "*" + uglify-js: "*" + webpack: ^5.1.0 + peerDependenciesMeta: + "@swc/core": + optional: true + esbuild: + optional: true + uglify-js: + optional: true + dependencies: + "@jridgewell/trace-mapping": 0.3.20 + "@swc/core": 1.3.78 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.1 + terser: 5.26.0 + webpack: 5.89.0(@swc/core@1.3.78)(webpack-cli@4.10.0) + + /terser-webpack-plugin@5.3.9(esbuild@0.18.20)(webpack@5.89.0): + resolution: + { + integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==, + } + engines: { node: ">= 10.13.0" } + peerDependencies: + "@swc/core": "*" + esbuild: "*" + uglify-js: "*" + webpack: ^5.1.0 + peerDependenciesMeta: + "@swc/core": + optional: true + esbuild: + optional: true + uglify-js: + optional: true + dependencies: + "@jridgewell/trace-mapping": 0.3.20 + esbuild: 0.18.20 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.1 + terser: 5.26.0 + webpack: 5.89.0(esbuild@0.18.20) + + /terser-webpack-plugin@5.3.9(webpack@5.89.0): + resolution: + { + integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==, + } + engines: { node: ">= 10.13.0" } + peerDependencies: + "@swc/core": "*" + esbuild: "*" + uglify-js: "*" + webpack: ^5.1.0 + peerDependenciesMeta: + "@swc/core": + optional: true + esbuild: + optional: true + uglify-js: + optional: true + dependencies: + "@jridgewell/trace-mapping": 0.3.20 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.1 + terser: 5.26.0 + webpack: 5.89.0 + dev: true /terser@5.26.0: resolution: @@ -31554,6 +31749,49 @@ packages: } dev: true + /webpack@5.89.0: + resolution: + { + integrity: sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==, + } + engines: { node: ">=10.13.0" } + hasBin: true + peerDependencies: + webpack-cli: "*" + peerDependenciesMeta: + webpack-cli: + optional: true + dependencies: + "@types/eslint-scope": 3.7.7 + "@types/estree": 1.0.5 + "@webassemblyjs/ast": 1.11.6 + "@webassemblyjs/wasm-edit": 1.11.6 + "@webassemblyjs/wasm-parser": 1.11.6 + acorn: 8.11.2 + acorn-import-assertions: 1.9.0(acorn@8.11.2) + browserslist: 4.22.2 + chrome-trace-event: 1.0.3 + enhanced-resolve: 5.15.0 + es-module-lexer: 1.4.1 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.0 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 3.3.0 + tapable: 2.2.1 + terser-webpack-plugin: 5.3.9(webpack@5.89.0) + watchpack: 2.4.0 + webpack-sources: 3.2.3 + transitivePeerDependencies: + - "@swc/core" + - esbuild + - uglify-js + dev: true + /webpack@5.89.0(@swc/core@1.3.100)(esbuild@0.18.20): resolution: { @@ -31595,6 +31833,7 @@ packages: - "@swc/core" - esbuild - uglify-js + dev: true /webpack@5.89.0(@swc/core@1.3.100)(webpack-cli@4.10.0): resolution: @@ -31630,7 +31869,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(esbuild@0.18.20)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(webpack@5.89.0) watchpack: 2.4.0 webpack-cli: 4.10.0(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0) webpack-sources: 3.2.3 @@ -31673,7 +31912,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(esbuild@0.18.20)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.78)(webpack@5.89.0) watchpack: 2.4.0 webpack-cli: 4.10.0(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0) webpack-sources: 3.2.3 @@ -31716,7 +31955,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(@swc/core@1.3.100)(esbuild@0.18.20)(webpack@5.89.0) + terser-webpack-plugin: 5.3.9(esbuild@0.18.20)(webpack@5.89.0) watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -32288,7 +32527,3 @@ packages: { integrity: sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==, } - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false From 43b982dbb4ed7dc0af91497e435c8c1a411bb228 Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:20:36 +0300 Subject: [PATCH 36/43] Remove as any typings Signed-off-by: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> --- apps/charterafrica/package.json | 2 +- apps/charterafrica/payload.config.ts | 16 ++++++++-------- pnpm-lock.yaml | 11 +++++++++-- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/apps/charterafrica/package.json b/apps/charterafrica/package.json index 2509d278a..a73ab10fd 100644 --- a/apps/charterafrica/package.json +++ b/apps/charterafrica/package.json @@ -54,7 +54,7 @@ "@payloadcms/bundler-webpack": "^1.0.6", "@payloadcms/db-mongodb": "^1.2.0", "@payloadcms/plugin-cloud-storage": "^1.1.1", - "@payloadcms/plugin-nested-docs": "^1.0.9", + "@payloadcms/plugin-nested-docs": "^1.0.11", "@payloadcms/plugin-seo": "^1.0.15", "@payloadcms/richtext-slate": "^1.3.1", "@react-spring/web": "^9.7.3", diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index 1b3b8ebad..7747c77c1 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -114,12 +114,12 @@ export default buildConfig({ ] as GlobalConfig[], ...(locales?.length ? { - localization: { - locales, - defaultLocale, - fallback: true, - }, - } + localization: { + locales, + defaultLocale, + fallback: true, + }, + } : undefined), admin: { @@ -183,7 +183,7 @@ export default buildConfig({ generateTitle: ({ doc }: any) => doc?.title?.value as string, generateURL: ({ doc, locale }: any) => doc?.slug?.value ? `${appURL}/${locale}/${doc.slug.value}` : undefined, - } as any), + }), nestedDocs({ collections: ["pages"], generateLabel: (_, doc) => doc.title as string, @@ -191,4 +191,4 @@ export default buildConfig({ docs.reduce((url, doc) => `${url}/${doc.slug}`, ""), }), ], -} as any); +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6d8dbc30b..5ff0c09ac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -101,8 +101,8 @@ importers: specifier: ^1.1.1 version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.9.0) "@payloadcms/plugin-nested-docs": - specifier: ^1.0.9 - version: 1.0.9 + specifier: ^1.0.11 + version: 1.0.11 "@payloadcms/plugin-seo": specifier: ^1.0.15 version: 1.0.15(payload@2.9.0)(react@18.2.0) @@ -7724,6 +7724,13 @@ packages: range-parser: 1.2.1 dev: false + /@payloadcms/plugin-nested-docs@1.0.11: + resolution: + { + integrity: sha512-Bh7CWNDleazNHeRZSNKO67lRnf24yHur69qP/tbbQNM2/RyanPFR2+fWOk/WO0K0/3k7IKzuMEF8n4L3eKek0w==, + } + dev: false + /@payloadcms/plugin-nested-docs@1.0.9: resolution: { From b5ff9b633c682881cf179e4af22d95cdf4b47683 Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:33:55 +0300 Subject: [PATCH 37/43] Upgrade payload dependencies Signed-off-by: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> --- apps/charterafrica/package.json | 8 +++--- pnpm-lock.yaml | 50 ++++++++++++++++++--------------- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/apps/charterafrica/package.json b/apps/charterafrica/package.json index a73ab10fd..68857bf20 100644 --- a/apps/charterafrica/package.json +++ b/apps/charterafrica/package.json @@ -52,11 +52,11 @@ "@nivo/tooltip": "^0.84.0", "@nivo/waffle": "^0.84.0", "@payloadcms/bundler-webpack": "^1.0.6", - "@payloadcms/db-mongodb": "^1.2.0", - "@payloadcms/plugin-cloud-storage": "^1.1.1", + "@payloadcms/db-mongodb": "^1.4.0", + "@payloadcms/plugin-cloud-storage": "^1.1.2", "@payloadcms/plugin-nested-docs": "^1.0.11", - "@payloadcms/plugin-seo": "^1.0.15", - "@payloadcms/richtext-slate": "^1.3.1", + "@payloadcms/plugin-seo": "^2.2.0", + "@payloadcms/richtext-slate": "^1.4.0", "@react-spring/web": "^9.7.3", "@sentry/nextjs": "^7.86.0", "airtable": "^0.12.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5ff0c09ac..46d3a699e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,20 +95,20 @@ importers: specifier: ^1.0.6 version: 1.0.6(@swc/core@1.3.100)(payload@2.9.0) "@payloadcms/db-mongodb": - specifier: ^1.2.0 - version: 1.2.0(payload@2.9.0) + specifier: ^1.4.0 + version: 1.4.0(payload@2.9.0) "@payloadcms/plugin-cloud-storage": - specifier: ^1.1.1 - version: 1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.9.0) + specifier: ^1.1.2 + version: 1.1.2(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.9.0) "@payloadcms/plugin-nested-docs": specifier: ^1.0.11 version: 1.0.11 "@payloadcms/plugin-seo": - specifier: ^1.0.15 - version: 1.0.15(payload@2.9.0)(react@18.2.0) + specifier: ^2.2.0 + version: 2.2.0(payload@2.9.0)(react@18.2.0) "@payloadcms/richtext-slate": - specifier: ^1.3.1 - version: 1.3.1(payload@2.9.0)(react-dom@18.2.0) + specifier: ^1.4.0 + version: 1.4.0(payload@2.9.0)(react-dom@18.2.0) "@react-spring/web": specifier: ^9.7.3 version: 9.7.3(react-dom@18.2.0)(react@18.2.0) @@ -7649,10 +7649,10 @@ packages: - webpack-dev-server dev: false - /@payloadcms/db-mongodb@1.2.0(payload@2.9.0): + /@payloadcms/db-mongodb@1.4.0(payload@2.9.0): resolution: { - integrity: sha512-cRgy2Dl/KXBxvm4kBkrRZcWge9R3dWC2taocjFxaTlzM0SQrQQtwGej8IiKmnUAswz897YzkQR4wQQwidEtb3A==, + integrity: sha512-9DVazhkV5+T2+NpIvIDMZ3AmJScjkj7r8OPwrz3BBvXXKid2NUDewTKFQSVtqWK6Ed5ArlvCAlk9J6zO3Q0+cA==, } peerDependencies: payload: ^2.0.0 @@ -7672,7 +7672,7 @@ packages: - supports-color dev: false - /@payloadcms/plugin-cloud-storage@1.1.1(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.9.0): + /@payloadcms/plugin-cloud-storage@1.1.1(payload@1.15.8): resolution: { integrity: sha512-WFqfZcT7R1LD+FfKKKYNsJPDRE+0VlYEMxzGuPKeUQn9w9sqTy2UD01YCEl0Zcyuq8fD9mRUjeLitSo1aAUimQ==, @@ -7693,20 +7693,19 @@ packages: "@google-cloud/storage": optional: true dependencies: - "@aws-sdk/client-s3": 3.472.0 - "@aws-sdk/lib-storage": 3.472.0(@aws-sdk/client-s3@3.472.0) - payload: 2.9.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) + payload: 1.15.8(@types/react@18.2.45)(typescript@5.3.3) range-parser: 1.2.1 dev: false - /@payloadcms/plugin-cloud-storage@1.1.1(payload@1.15.8): + /@payloadcms/plugin-cloud-storage@1.1.2(@aws-sdk/client-s3@3.472.0)(@aws-sdk/lib-storage@3.472.0)(payload@2.9.0): resolution: { - integrity: sha512-WFqfZcT7R1LD+FfKKKYNsJPDRE+0VlYEMxzGuPKeUQn9w9sqTy2UD01YCEl0Zcyuq8fD9mRUjeLitSo1aAUimQ==, + integrity: sha512-wBpEWv4VdfltBqEi5ECSrKQ/TtNvmBWT4DLCrTCOhpNuD8dYD2rp+0Eoj7cF8f6wU7DpS5rvdQ/8gxlqh0Armw==, } peerDependencies: "@aws-sdk/client-s3": ^3.142.0 "@aws-sdk/lib-storage": ^3.267.0 + "@azure/abort-controller": ^1.0.0 "@azure/storage-blob": ^12.11.0 "@google-cloud/storage": ^6.4.1 payload: ^1.7.2 || ^2.0.0 @@ -7715,12 +7714,17 @@ packages: optional: true "@aws-sdk/lib-storage": optional: true + "@azure/abort-controller": + optional: true "@azure/storage-blob": optional: true "@google-cloud/storage": optional: true dependencies: - payload: 1.15.8(@types/react@18.2.45)(typescript@5.3.3) + "@aws-sdk/client-s3": 3.472.0 + "@aws-sdk/lib-storage": 3.472.0(@aws-sdk/client-s3@3.472.0) + find-node-modules: 2.1.3 + payload: 2.9.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) range-parser: 1.2.1 dev: false @@ -7751,23 +7755,23 @@ packages: react: 18.2.0 dev: false - /@payloadcms/plugin-seo@1.0.15(payload@2.9.0)(react@18.2.0): + /@payloadcms/plugin-seo@2.2.0(payload@2.9.0)(react@18.2.0): resolution: { - integrity: sha512-7nU0DD3UZOOHsV2UIkOWL2JNCX+u1WNbEvZOiGpO6lB6YekuVIMqxHKbTdVR73UeW44lApvS9LTgif3XLQ5HDA==, + integrity: sha512-SekiWzl444AKGORJDufjKn7QK0W5fSn6d1mFqpJVPLFiNBWwbaUuR0N+rbtkEey5sUfFnaFKFA1lFDQYJqUClg==, } peerDependencies: - payload: ^0.18.5 || ^1.0.0 || ^2.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 + payload: ^2.7.0 + react: ^18.0.0 dependencies: payload: 2.9.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) react: 18.2.0 dev: false - /@payloadcms/richtext-slate@1.3.1(payload@2.9.0)(react-dom@18.2.0): + /@payloadcms/richtext-slate@1.4.0(payload@2.9.0)(react-dom@18.2.0): resolution: { - integrity: sha512-DwHDn0F7PTGP1WGLQmpNRUdfhwHQwOFpBzXuQtIqlykkj5AAsZrLmfjQabTHPOzKZdLkMRrxhYOGERi4F1T5Hw==, + integrity: sha512-nIQmo/q5ZeRylSXuUEn6DHgDXgye/SjMZ3HNPKhyEDe1ziiCvqpgb9CJ9m1DgPg1eDqh2OYxCUHipC21k0X0jw==, } peerDependencies: payload: ^2.3.0 From 524f5093bde853bec4d19fc8558f3f0e9ca883ef Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:37:20 +0300 Subject: [PATCH 38/43] Fix Formatting Signed-off-by: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> --- apps/charterafrica/payload.config.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/charterafrica/payload.config.ts b/apps/charterafrica/payload.config.ts index 7747c77c1..fd7b74148 100644 --- a/apps/charterafrica/payload.config.ts +++ b/apps/charterafrica/payload.config.ts @@ -114,12 +114,12 @@ export default buildConfig({ ] as GlobalConfig[], ...(locales?.length ? { - localization: { - locales, - defaultLocale, - fallback: true, - }, - } + localization: { + locales, + defaultLocale, + fallback: true, + }, + } : undefined), admin: { From 92862deb5947f96a8ab094f71bbcdf04055795a4 Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:48:40 +0300 Subject: [PATCH 39/43] Remove unused dependencies Signed-off-by: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> --- apps/charterafrica/package.json | 2 -- pnpm-lock.yaml | 13 ------------- 2 files changed, 15 deletions(-) diff --git a/apps/charterafrica/package.json b/apps/charterafrica/package.json index 68857bf20..5ab170958 100644 --- a/apps/charterafrica/package.json +++ b/apps/charterafrica/package.json @@ -69,7 +69,6 @@ "next-seo": "^6.4.0", "nodemailer-sendgrid": "^1.0.3", "payload": "^2.9.0", - "prompts": "^2.4.2", "prop-types": "^15.8.1", "qs": "^6.11.2", "react": "^18.2.0", @@ -77,7 +76,6 @@ "react-leaflet": "^4.2.1", "react-share": "^5.0.3", "react-swipeable-views-react-18-fix": "^0.14.1", - "readline": "^1.3.0", "scheduler": "^0.23.0", "sharp": "^0.33.2", "slate": "^0.101.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 46d3a699e..be395a06b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -145,9 +145,6 @@ importers: payload: specifier: ^2.9.0 version: 2.9.0(@types/react@18.2.45)(typescript@5.3.3)(webpack@5.89.0) - prompts: - specifier: ^2.4.2 - version: 2.4.2 prop-types: specifier: ^15.8.1 version: 15.8.1 @@ -169,9 +166,6 @@ importers: react-swipeable-views-react-18-fix: specifier: ^0.14.1 version: 0.14.1(react@18.2.0) - readline: - specifier: ^1.3.0 - version: 1.3.0 scheduler: specifier: ^0.23.0 version: 0.23.0 @@ -26940,13 +26934,6 @@ packages: } dev: false - /readline@1.3.0: - resolution: - { - integrity: sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==, - } - dev: false - /real-require@0.2.0: resolution: { From 72e7c1e07d9c98c734a09292fed325c406998691 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Mon, 5 Feb 2024 07:28:32 +0300 Subject: [PATCH 40/43] Use env vars for dbInit.js --- contrib/docker/scripts/dbInit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/docker/scripts/dbInit.js b/contrib/docker/scripts/dbInit.js index d77bbfde5..e19c39b4a 100755 --- a/contrib/docker/scripts/dbInit.js +++ b/contrib/docker/scripts/dbInit.js @@ -13,7 +13,7 @@ rs.initiate(config, { force: true }); rs.status(); db.createUser({ - user: "root", - pwd: "rootpassword", + user: process.env.MONGO_INITDB_ROOT_USERNAME || "root", + pwd: process.env.MONGO_INITDB_ROOT_PASSWORD || "rootpassword", roles: [{ role: "root", db: "admin" }], }); From ce8ce30cd3e5ab1773ee1e7c4ad1f1fafcbf3b31 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 6 Feb 2024 10:49:54 +0300 Subject: [PATCH 41/43] Remove dbInit now that we're creating the cluster in healthcheck --- .gitignore | 1 - Makefile | 5 ++++- contrib/docker/scripts/dbInit.js | 19 ------------------- 3 files changed, 4 insertions(+), 21 deletions(-) delete mode 100755 contrib/docker/scripts/dbInit.js diff --git a/.gitignore b/.gitignore index 4e1a3a942..74d544686 100644 --- a/.gitignore +++ b/.gitignore @@ -54,4 +54,3 @@ apps/promisetracker/public/data/** storybook-static mongo-keyfile -db_data diff --git a/Makefile b/Makefile index 686c7821c..5278516a8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Makefile -.PHONY: charterafrica mongodb +.PHONY: charterafrica mongodb mongodb-keyfile charterafrica: docker compose --env-file apps/charterafrica/.env.local up charterafrica --build -d @@ -8,3 +8,6 @@ charterafrica: mongodb: docker compose --env-file apps/charterafrica/.env.local up --wait mongodb +mongodb-keyfile: + openssl rand -base64 741 > ./mongo-keyfile + chmod 600 ./mongo-keyfile \ No newline at end of file diff --git a/contrib/docker/scripts/dbInit.js b/contrib/docker/scripts/dbInit.js deleted file mode 100755 index e19c39b4a..000000000 --- a/contrib/docker/scripts/dbInit.js +++ /dev/null @@ -1,19 +0,0 @@ -const config = { - _id: "rs0", - version: 1, - members: [ - { - _id: 1, - host: "mongodb:27017", - priority: 1, - }, - ], -}; -rs.initiate(config, { force: true }); - -rs.status(); -db.createUser({ - user: process.env.MONGO_INITDB_ROOT_USERNAME || "root", - pwd: process.env.MONGO_INITDB_ROOT_PASSWORD || "rootpassword", - roles: [{ role: "root", db: "admin" }], -}); From 2d5ad132a3f9969e3e6656054dc74132af43fd16 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 6 Feb 2024 14:54:42 +0300 Subject: [PATCH 42/43] Update Readme with new file --- Makefile | 3 ++- apps/charterafrica/README.md | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5278516a8..84ddc764d 100644 --- a/Makefile +++ b/Makefile @@ -10,4 +10,5 @@ mongodb: mongodb-keyfile: openssl rand -base64 741 > ./mongo-keyfile - chmod 600 ./mongo-keyfile \ No newline at end of file + chmod 600 ./mongo-keyfile + \ No newline at end of file diff --git a/apps/charterafrica/README.md b/apps/charterafrica/README.md index 204a07dd4..47a48c600 100644 --- a/apps/charterafrica/README.md +++ b/apps/charterafrica/README.md @@ -23,8 +23,7 @@ For more, see NextJS env var docs [here](https://nextjs.org/docs/basic-features/ Generate a new MongoDB keyfile by running the following command: ```bash -openssl rand -base64 741 > ./mongo-keyfile -chmod 600 ./mongo-keyfile +make mongodb-keyfile ``` Start the database server: From 4da89460c523e2d09e0dc151c878488d96622172 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 6 Feb 2024 14:58:35 +0300 Subject: [PATCH 43/43] Update Readme with commands to start the database server. --- apps/charterafrica/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/charterafrica/README.md b/apps/charterafrica/README.md index 47a48c600..08931369b 100644 --- a/apps/charterafrica/README.md +++ b/apps/charterafrica/README.md @@ -21,12 +21,14 @@ For more, see NextJS env var docs [here](https://nextjs.org/docs/basic-features/ ## Database setup Generate a new MongoDB keyfile by running the following command: +NB: Run this command on the root directory ```bash make mongodb-keyfile ``` Start the database server: +NB: Run this command on the root directory ```bash make mongodb