From 9775dd5c47ee3f12285c819d0ebb1c4fa7740c4b Mon Sep 17 00:00:00 2001 From: Alex Tkachev Date: Tue, 3 Sep 2024 17:55:48 +0400 Subject: [PATCH 1/4] feat(SLB-429): add Edit link to content pages --- apps/decap/package.json | 2 +- apps/decap/src/collections/page.ts | 11 +- apps/website/netlify.toml | 5 + apps/website/package.json | 2 +- apps/website/static/set-drupal-session.html | 18 + packages/drupal/custom/custom.module | 56 +++ packages/drupal/custom/directives.graphql | 8 + .../GraphQL/Directive/EntityEditLink.php | 34 ++ packages/schema/src/fragments/Page.gql | 4 + packages/schema/src/schema.graphql | 24 +- packages/schema/turbo.json | 2 +- packages/ui/.storybook/preview.tsx | 15 +- packages/ui/package.json | 4 +- .../components/Molecules/ContentEditLink.tsx | 63 +++ .../src/components/Organisms/PageDisplay.tsx | 2 + .../ui/src/components/Routes/Page.stories.tsx | 4 + pnpm-lock.yaml | 459 +++++++++++------- 17 files changed, 540 insertions(+), 173 deletions(-) create mode 100644 apps/website/static/set-drupal-session.html create mode 100644 packages/drupal/custom/src/Plugin/GraphQL/Directive/EntityEditLink.php create mode 100644 packages/ui/src/components/Molecules/ContentEditLink.tsx diff --git a/apps/decap/package.json b/apps/decap/package.json index fbd478fcb..f0dcf5f96 100644 --- a/apps/decap/package.json +++ b/apps/decap/package.json @@ -35,7 +35,7 @@ "zod": "^3.23.8" }, "devDependencies": { - "@amazeelabs/decap-cms-backend-token-auth": "^1.1.7", + "@amazeelabs/decap-cms-backend-token-auth": "^1.2.1", "@types/node": "^18", "@types/react": "^18.2.46", "@types/react-dom": "^18.2.18", diff --git a/apps/decap/src/collections/page.ts b/apps/decap/src/collections/page.ts index f7d441f10..c4d79eb5a 100644 --- a/apps/decap/src/collections/page.ts +++ b/apps/decap/src/collections/page.ts @@ -214,9 +214,18 @@ export const getPages: SilverbackSource = () => { }; const page = pageSchema.safeParse(input); if (page.success) { + const editUrl = `${process.env.NETLIFY_URL || 'http://127.0.0.1:8000'}/admin/#/collections/page/entries/${file.replace(/\.yml$/, '')}`; pages.push([ `${page.data.id}:${lang}`, - { ...page.data, _decap_id: id }, + { + ...page.data, + _decap_id: id, + editLink: { + __typename: 'EditLink', + url: editUrl, + type: 'decap', + }, + }, ]); } else { console.warn(`Error parsing ${file} (${lang}):`); diff --git a/apps/website/netlify.toml b/apps/website/netlify.toml index 58f3e6585..e14f23bb3 100644 --- a/apps/website/netlify.toml +++ b/apps/website/netlify.toml @@ -22,3 +22,8 @@ [[edge_functions]] path = "/.netlify/functions/github-proxy/*" function = "github-proxy-auth" + +[[headers]] + for = "/set-drupal-session" + [headers.values] + Content-Security-Policy = "frame-ancestors *" diff --git a/apps/website/package.json b/apps/website/package.json index f1fcf4e46..b0c07e380 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -4,7 +4,7 @@ "dependencies": { "@amazeelabs/bridge-gatsby": "^1.2.7", "@amazeelabs/cloudinary-responsive-image": "^1.6.15", - "@amazeelabs/decap-cms-backend-token-auth": "^1.1.7", + "@amazeelabs/decap-cms-backend-token-auth": "^1.2.1", "@amazeelabs/gatsby-plugin-operations": "^1.1.3", "@amazeelabs/gatsby-plugin-static-dirs": "^1.0.1", "@amazeelabs/gatsby-source-silverback": "^1.14.0", diff --git a/apps/website/static/set-drupal-session.html b/apps/website/static/set-drupal-session.html new file mode 100644 index 000000000..608753b94 --- /dev/null +++ b/apps/website/static/set-drupal-session.html @@ -0,0 +1,18 @@ + + + + + + + + + diff --git a/packages/drupal/custom/custom.module b/packages/drupal/custom/custom.module index baac13c42..cfc1b7871 100644 --- a/packages/drupal/custom/custom.module +++ b/packages/drupal/custom/custom.module @@ -269,3 +269,59 @@ function custom_file_download($uri) { throw new AccessDeniedHttpException(); } } + +/** + * Implements hook_preprocess_HOOK() for "html". + */ +function custom_preprocess_html(&$variables) { + _custom_add_session_iframe_to_page($variables); +} + +/** + * Adds a hidden iframe to set the session expiration time on the frontend. + * + * @param array $variables + * Variables passed to hook_preprocess_html(). + * + * @return void + */ +function _custom_add_session_iframe_to_page(array &$variables): void { + $variables['page_bottom']['frontend_session_iframe'] = [ + '#cache' => [ + 'max-age' => 0, + ], + ]; + // Do not add the iframe if silverback_iframe_theme is the current theme. We + // don't want to load the iframe in the iframe. + $isDefaultTheme = \Drupal::theme()->getActiveTheme()->getName() === \Drupal::config('system.theme')->get('default'); + if ($isDefaultTheme) { + // Currently, any authenticated user is considered an editor. + $isEditor = \Drupal::currentUser()->isAuthenticated(); + if ($isEditor) { + // Guess the probable session expiration time. + /** @var \Drupal\Core\Session\MetadataBag $sessionMeta */ + $sessionMeta = \Drupal::service('session_manager.metadata_bag'); + /** @var \Drupal\Core\Session\SessionConfiguration $sessionConfig */ + $sessionConfig = \Drupal::service('session_configuration'); + $sessionOptions = $sessionConfig->getOptions(\Drupal::request()); + $cookieLifetime = $sessionOptions['cookie_lifetime']; + $gcLifetime = $sessionOptions['gc_maxlifetime']; + $gcExpire = $sessionMeta->getLastUsed() + $gcLifetime; + $cookieExpire = $sessionMeta->getCreated() + $cookieLifetime; + $sessionExpire = date('c', min($cookieExpire, $gcExpire)); + } + else { + // Unset the session expiration time. + $sessionExpire = ''; + } + $variables['page_bottom']['frontend_session_iframe'] += [ + '#type' => 'html_tag', + '#tag' => 'iframe', + '#value' => '', + '#attributes' => [ + 'src' => (getenv('NETLIFY_URL') ?: 'http://127.0.0.1:8000') . '/set-drupal-session?session_expire=' . rawurlencode($sessionExpire), + 'style' => 'width: 0; height: 0; border: none;', + ], + ]; + } +} diff --git a/packages/drupal/custom/directives.graphql b/packages/drupal/custom/directives.graphql index c80242397..a8500b596 100644 --- a/packages/drupal/custom/directives.graphql +++ b/packages/drupal/custom/directives.graphql @@ -17,3 +17,11 @@ Provided by the "custom" module. Implemented in "Drupal\custom\Plugin\GraphQL\Directive\ParentValue". """ directive @resolveParent repeatable on FIELD_DEFINITION | SCALAR | UNION | ENUM | INTERFACE | OBJECT + +""" +Resolves the edit link of an entity. + +Provided by the "custom" module. +Implemented in "Drupal\custom\Plugin\GraphQL\Directive\PEntityEditLink". +""" +directive @resolveEntityEditLink repeatable on FIELD_DEFINITION | SCALAR | UNION | ENUM | INTERFACE | OBJECT diff --git a/packages/drupal/custom/src/Plugin/GraphQL/Directive/EntityEditLink.php b/packages/drupal/custom/src/Plugin/GraphQL/Directive/EntityEditLink.php new file mode 100644 index 000000000..4fe30d5dc --- /dev/null +++ b/packages/drupal/custom/src/Plugin/GraphQL/Directive/EntityEditLink.php @@ -0,0 +1,34 @@ +compose( + $builder->produce('entity_url') + ->map('entity', $builder->fromParent()) + ->map('rel', $builder->fromValue('edit-form')), + $builder->produce('url_path')->map('url', $builder->fromParent()), + $builder->callback(function ($path) { + // Can't use "absolute" option when building the URL, because Gatsby + // tricks Drupal to think its base URL is Netlify URL. + return (getenv('LAGOON_ROUTE') ?: 'http://127.0.0.1:8888') . $path; + }) + ); + } + +} diff --git a/packages/schema/src/fragments/Page.gql b/packages/schema/src/fragments/Page.gql index e822c9c8d..a855f8f33 100644 --- a/packages/schema/src/fragments/Page.gql +++ b/packages/schema/src/fragments/Page.gql @@ -1,6 +1,10 @@ fragment Page on Page { locale path + editLink { + url + type + } translations { locale path diff --git a/packages/schema/src/schema.graphql b/packages/schema/src/schema.graphql index 6ada8a7f7..e18a4fc90 100644 --- a/packages/schema/src/schema.graphql +++ b/packages/schema/src/schema.graphql @@ -78,6 +78,20 @@ enum Locale @default @value(string: "en") { de } +enum Backend @default @value(string: "drupal") { + drupal + decap +} + +interface Editable { + editLink: EditLink +} + +type EditLink { + url: Url! @resolveEntityEditLink + type: Backend! @value(string: "drupal") +} + type ContentHubResult @default @value(json: "{\"total\": 0, \"items\": []}") { total: Int! items: [CardItem]! @prop(key: "rows") @@ -128,11 +142,12 @@ type FooterNavigation implements Navigation @menu(menu_id: "footer") { items: [NavigationItem]! @lang @resolveMenuItems } -interface Page implements CardItem @resolveEntityBundle { +interface Page implements CardItem & Editable @resolveEntityBundle { id: ID! translations: [Page] locale: Locale! path: Url! + editLink: EditLink title: String! teaserImage: MediaImage hero: Hero @@ -140,11 +155,13 @@ interface Page implements CardItem @resolveEntityBundle { metaTags: [MetaTag] } -type DecapPage implements Page & CardItem @sourceFrom(fn: "getPages") { +type DecapPage implements Page & Editable & CardItem + @sourceFrom(fn: "getPages") { id: ID! translations: [Page] @decapPageTranslations locale: Locale! path: Url! + editLink: EditLink title: String! teaserImage: MediaImage hero: Hero @@ -155,13 +172,14 @@ type DecapPage implements Page & CardItem @sourceFrom(fn: "getPages") { """ A generic page. """ -type DrupalPage implements Page & CardItem +type DrupalPage implements Page & Editable & CardItem @entity(type: "node", bundle: "page") @type(id: "page") { id: ID! @resolveEntityUuid locale: Locale! @resolveEntityLanguage translations: [Page] @resolveEntityTranslations path: Url! @resolveEntityPath + editLink: EditLink @resolveParent title: String! @resolveProperty(path: "title.value") teaserImage: MediaImage @resolveEditorBlocks(path: "body.value") diff --git a/packages/schema/turbo.json b/packages/schema/turbo.json index 006026389..d84984c53 100644 --- a/packages/schema/turbo.json +++ b/packages/schema/turbo.json @@ -4,7 +4,7 @@ "tasks": { "prep:directives": { "dependsOn": ["@custom/cms#prep:composer"], - "inputs": ["package.json"], + "inputs": ["package.json", "../drupal/custom/directives.graphql"], "outputs": ["src/directives.graphql"] }, "prep:codegen": { diff --git a/packages/ui/.storybook/preview.tsx b/packages/ui/.storybook/preview.tsx index d0a2f9e0b..a85a87e2d 100644 --- a/packages/ui/.storybook/preview.tsx +++ b/packages/ui/.storybook/preview.tsx @@ -21,6 +21,14 @@ const LocationDecorator: Decorator = (Story, ctx) => { ); }; +const IsStorybookDecorator: Decorator = (Story) => { + // This var is documented but does not exist in our setup for some reason. + // https://storybook.js.org/docs/faq#how-can-my-code-detect-if-it-is-running-in-storybook + // @ts-ignore + window.IS_STORYBOOK = true; + return ; +}; + declare global { interface Window { __STORYBOOK_PREVIEW__: { @@ -117,4 +125,9 @@ export const parameters = { }, }; -export const decorators = [LocationDecorator, IntlDecorator, SWRCacheDecorator]; +export const decorators = [ + LocationDecorator, + IntlDecorator, + SWRCacheDecorator, + IsStorybookDecorator, +]; diff --git a/packages/ui/package.json b/packages/ui/package.json index 5aa19dc32..1bc2d3dc3 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -49,6 +49,7 @@ "framer-motion": "^10.17.4", "hast-util-is-element": "^2.1.3", "hast-util-select": "^5.0.5", + "js-cookie": "^3.0.5", "query-string": "^9.0.0", "react-hook-form": "^7.49.2", "swr": "^2.2.4", @@ -80,10 +81,11 @@ "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.10", "@types/hast": "^2.3.9", + "@types/js-cookie": "^3.0.6", + "@types/node": "~18.15.3", "@types/react": "^18.2.46", "@types/react-body-classname": "^1.1.10", "@types/react-dom": "^18.2.18", - "@types/node": "~18.15.3", "@vitejs/plugin-react-swc": "^3.5.0", "autoprefixer": "^10.4.16", "axe-playwright": "^2.0.1", diff --git a/packages/ui/src/components/Molecules/ContentEditLink.tsx b/packages/ui/src/components/Molecules/ContentEditLink.tsx new file mode 100644 index 000000000..3e2fcc356 --- /dev/null +++ b/packages/ui/src/components/Molecules/ContentEditLink.tsx @@ -0,0 +1,63 @@ +import { useIntl } from '@amazeelabs/react-intl'; +import { PageFragment } from '@custom/schema'; +import Cookies from 'js-cookie'; +import React, { useEffect, useState } from 'react'; + +import { UnreachableCaseError } from '../../utils/unreachable-case-error'; + +type Props = Required['editLink']; + +export function ContentEditLink({ url, type }: Props) { + const intl = useIntl(); + const [shouldDisplay, setShouldDisplay] = useState(false); + useEffect(() => { + if (isLoggedIn(type)) { + setShouldDisplay(true); + } + }, [type]); + return shouldDisplay ? ( +
+ + {intl.formatMessage({ defaultMessage: 'Edit', id: 'wEQDC6' })} + +
+ ) : null; +} + +function isLoggedIn(type: Props['type']): boolean { + if (typeof window === 'undefined') { + return false; + } + if ('IS_STORYBOOK' in window && window.IS_STORYBOOK) { + return true; + } + + /* eslint-disable no-case-declarations */ + switch (type) { + case 'drupal': + const sessionExpire = localStorage.getItem('drupalSessionExpire'); + if (!sessionExpire) { + return false; + } + let isLoggedInDrupal = false; + try { + isLoggedInDrupal = Date.now() < new Date(sessionExpire).getTime(); + } catch (error) { + console.error(error); + } + return isLoggedInDrupal; + + case 'decap': + const isLoggedInDecap = !!Cookies.get('decap-cms-logged-in'); + return isLoggedInDecap; + + default: + throw new UnreachableCaseError(type); + } + /* eslint-enable no-case-declarations */ +} diff --git a/packages/ui/src/components/Organisms/PageDisplay.tsx b/packages/ui/src/components/Organisms/PageDisplay.tsx index 2db9ac979..76b67bd96 100644 --- a/packages/ui/src/components/Organisms/PageDisplay.tsx +++ b/packages/ui/src/components/Organisms/PageDisplay.tsx @@ -5,6 +5,7 @@ import React from 'react'; import { isTruthy } from '../../utils/isTruthy'; import { UnreachableCaseError } from '../../utils/unreachable-case-error'; import { BreadCrumbs } from '../Molecules/Breadcrumbs'; +import { ContentEditLink } from '../Molecules/ContentEditLink'; import { PageTransition } from '../Molecules/PageTransition'; import { BlockAccordion } from './PageContent/BlockAccordion'; import { BlockConditional } from './PageContent/BlockConditional'; @@ -24,6 +25,7 @@ export function PageDisplay(page: PageFragment) { return (
+ {page.editLink ? : null} {!page.hero && } {page.hero && } {page?.content?.filter(isTruthy).map((block, index) => { diff --git a/packages/ui/src/components/Routes/Page.stories.tsx b/packages/ui/src/components/Routes/Page.stories.tsx index 5095cbd2a..fa2ac06eb 100644 --- a/packages/ui/src/components/Routes/Page.stories.tsx +++ b/packages/ui/src/components/Routes/Page.stories.tsx @@ -49,6 +49,10 @@ export const Default = { }, ], path: '/test' as Url, + editLink: { + type: 'drupal', + url: '/test/edit' as Url, + }, content: [ { __typename: 'BlockImageTeasers', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a13bd3622..8db12ab7c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ importers: devDependencies: '@commitlint/cli': specifier: ^18.4.3 - version: 18.4.3(@types/node@20.11.17)(typescript@5.3.3) + version: 18.4.3(@types/node@18.15.13)(typescript@5.3.3) '@commitlint/config-conventional': specifier: ^18.4.3 version: 18.4.3 @@ -64,7 +64,7 @@ importers: version: 5.3.3 vitest: specifier: ^1.1.1 - version: 1.1.1(@types/node@20.11.17) + version: 1.1.1(@types/node@18.15.13) apps/cms: dependencies: @@ -154,8 +154,8 @@ importers: version: 3.23.8 devDependencies: '@amazeelabs/decap-cms-backend-token-auth': - specifier: ^1.1.7 - version: 1.1.7(@emotion/react@11.11.4)(@types/react@18.2.46)(decap-cms-lib-auth@3.0.5)(immutable@3.8.2)(lodash@4.17.21)(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0) + specifier: ^1.2.1 + version: 1.2.1(@emotion/react@11.11.4)(@types/react@18.2.46)(decap-cms-lib-auth@3.0.5)(immutable@3.8.2)(lodash@4.17.21)(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0) '@types/node': specifier: ^18 version: 18.0.0 @@ -296,8 +296,8 @@ importers: specifier: ^1.6.15 version: 1.6.15 '@amazeelabs/decap-cms-backend-token-auth': - specifier: ^1.1.7 - version: 1.1.7(@emotion/react@11.11.4)(@types/react@18.3.3)(decap-cms-lib-auth@3.0.5)(immutable@3.8.2)(lodash@4.17.21)(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0) + specifier: ^1.2.1 + version: 1.2.1(@emotion/react@11.11.4)(@types/react@18.3.3)(decap-cms-lib-auth@3.0.5)(immutable@3.8.2)(lodash@4.17.21)(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0) '@amazeelabs/gatsby-plugin-operations': specifier: ^1.1.3 version: 1.1.3 @@ -306,7 +306,7 @@ importers: version: 1.0.1 '@amazeelabs/gatsby-source-silverback': specifier: ^1.14.0 - version: 1.14.0(@types/node@20.11.17)(gatsby-plugin-sharp@5.13.1)(gatsby@5.13.1)(typescript@4.9.5) + version: 1.14.0(@types/node@18.15.13)(gatsby-plugin-sharp@5.13.1)(gatsby@5.13.1)(typescript@4.9.5) '@amazeelabs/publisher': specifier: ^2.4.32 version: 2.4.32(@types/react@18.3.3)(react@18.2.0)(typescript@4.9.5) @@ -366,7 +366,7 @@ importers: version: 2.1.35 netlify-cli: specifier: ^17.21.1 - version: 17.21.1(@types/node@20.11.17) + version: 17.21.1(@types/node@18.15.13) react: specifier: ^18.2.0 version: 18.2.0 @@ -400,7 +400,7 @@ importers: version: 2.0.3 vitest: specifier: ^1.1.1 - version: 1.1.1(@types/node@20.11.17)(happy-dom@12.10.3) + version: 1.1.1(@types/node@18.15.13)(happy-dom@12.10.3) packages/drupal/custom: {} @@ -571,6 +571,9 @@ importers: hast-util-select: specifier: ^5.0.5 version: 5.0.5 + js-cookie: + specifier: ^3.0.5 + version: 3.0.5 query-string: specifier: ^9.0.0 version: 9.0.0 @@ -647,6 +650,9 @@ importers: '@types/hast': specifier: ^2.3.9 version: 2.3.9 + '@types/js-cookie': + specifier: ^3.0.6 + version: 3.0.6 '@types/node': specifier: ~18.15.3 version: 18.15.3 @@ -892,13 +898,13 @@ packages: - encoding - supports-color - /@amazeelabs/decap-cms-backend-token-auth@1.1.7(@emotion/react@11.11.4)(@types/react@18.2.46)(decap-cms-lib-auth@3.0.5)(immutable@3.8.2)(lodash@4.17.21)(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-DvhrEzR0X0BrhF+vBCVU+qC76UrZj0mM117ij+gTz8U+6P+kjfy6IuMsWfvz+SvO1zqetG458y2mG7m8ZdUh/w==} + /@amazeelabs/decap-cms-backend-token-auth@1.2.1(@emotion/react@11.11.4)(@types/react@18.2.46)(decap-cms-lib-auth@3.0.5)(immutable@3.8.2)(lodash@4.17.21)(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-Pk4HVRQzcuFaszp/panQb7S7QEgbqdFR+mMLLk+MkzP3qMbVuRRIHa/w4wYzMvGIPCTV+ZlDzHv/HGZ67MZ/Hg==} peerDependencies: - react: ^18.2.0 - react-dom: ^18.2.0 + react: ^18.3.1 + react-dom: ^18.3.1 dependencies: - '@amazeelabs/token-auth-middleware': 1.1.1 + '@amazeelabs/token-auth-middleware': 1.1.7 '@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.46)(react@18.2.0) decap-cms-backend-github: 3.1.2(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(decap-cms-lib-auth@3.0.5)(decap-cms-lib-util@3.0.4)(decap-cms-ui-default@3.1.1)(lodash@4.17.21)(prop-types@15.8.1)(react@18.2.0) decap-cms-lib-util: 3.0.4(immutable@3.8.2)(lodash@4.17.21) @@ -914,13 +920,13 @@ packages: - prop-types dev: true - /@amazeelabs/decap-cms-backend-token-auth@1.1.7(@emotion/react@11.11.4)(@types/react@18.3.3)(decap-cms-lib-auth@3.0.5)(immutable@3.8.2)(lodash@4.17.21)(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-DvhrEzR0X0BrhF+vBCVU+qC76UrZj0mM117ij+gTz8U+6P+kjfy6IuMsWfvz+SvO1zqetG458y2mG7m8ZdUh/w==} + /@amazeelabs/decap-cms-backend-token-auth@1.2.1(@emotion/react@11.11.4)(@types/react@18.3.3)(decap-cms-lib-auth@3.0.5)(immutable@3.8.2)(lodash@4.17.21)(prop-types@15.8.1)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-Pk4HVRQzcuFaszp/panQb7S7QEgbqdFR+mMLLk+MkzP3qMbVuRRIHa/w4wYzMvGIPCTV+ZlDzHv/HGZ67MZ/Hg==} peerDependencies: - react: ^18.2.0 - react-dom: ^18.2.0 + react: ^18.3.1 + react-dom: ^18.3.1 dependencies: - '@amazeelabs/token-auth-middleware': 1.1.1 + '@amazeelabs/token-auth-middleware': 1.1.7 '@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.3.3)(react@18.2.0) decap-cms-backend-github: 3.1.2(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(decap-cms-lib-auth@3.0.5)(decap-cms-lib-util@3.0.4)(decap-cms-ui-default@3.1.1)(lodash@4.17.21)(prop-types@15.8.1)(react@18.2.0) decap-cms-lib-util: 3.0.4(immutable@3.8.2)(lodash@4.17.21) @@ -1052,17 +1058,17 @@ packages: - utf-8-validate dev: false - /@amazeelabs/gatsby-source-silverback@1.14.0(@types/node@18.15.13)(gatsby-plugin-sharp@5.13.1)(gatsby@5.13.3)(typescript@5.4.4): + /@amazeelabs/gatsby-source-silverback@1.14.0(@types/node@18.15.13)(gatsby-plugin-sharp@5.13.1)(gatsby@5.13.1)(typescript@4.9.5): resolution: {integrity: sha512-tIL4lPx7mQDBH5XiouXgTEhOIXF/oKDss0OYbHJEbxXVofv4IDifZcZZO1Hw9oWmrTSaJhYoC2Bdm+2kdvxf6g==} peerDependencies: gatsby-plugin-sharp: ^5.13.1 dependencies: '@amazeelabs/graphql-directives': 1.3.2 fetch-retry: 5.0.6 - gatsby-graphql-source-toolkit: 2.0.4(gatsby@5.13.3) - gatsby-plugin-sharp: 5.13.1(gatsby@5.13.3)(graphql@16.8.1) + gatsby-graphql-source-toolkit: 2.0.4(gatsby@5.13.1) + gatsby-plugin-sharp: 5.13.1(gatsby@5.13.1)(graphql@16.8.1) graphql: 16.8.1 - graphql-config: 5.0.3(@types/node@18.15.13)(graphql@16.8.1)(typescript@5.4.4) + graphql-config: 5.0.3(@types/node@18.15.13)(graphql@16.8.1)(typescript@4.9.5) isomorphic-fetch: 3.0.0 lodash-es: 4.17.21 node-fetch: 3.3.2 @@ -1077,17 +1083,17 @@ packages: - utf-8-validate dev: false - /@amazeelabs/gatsby-source-silverback@1.14.0(@types/node@20.11.17)(gatsby-plugin-sharp@5.13.1)(gatsby@5.13.1)(typescript@4.9.5): + /@amazeelabs/gatsby-source-silverback@1.14.0(@types/node@18.15.13)(gatsby-plugin-sharp@5.13.1)(gatsby@5.13.3)(typescript@5.4.4): resolution: {integrity: sha512-tIL4lPx7mQDBH5XiouXgTEhOIXF/oKDss0OYbHJEbxXVofv4IDifZcZZO1Hw9oWmrTSaJhYoC2Bdm+2kdvxf6g==} peerDependencies: gatsby-plugin-sharp: ^5.13.1 dependencies: '@amazeelabs/graphql-directives': 1.3.2 fetch-retry: 5.0.6 - gatsby-graphql-source-toolkit: 2.0.4(gatsby@5.13.1) - gatsby-plugin-sharp: 5.13.1(gatsby@5.13.1)(graphql@16.8.1) + gatsby-graphql-source-toolkit: 2.0.4(gatsby@5.13.3) + gatsby-plugin-sharp: 5.13.1(gatsby@5.13.3)(graphql@16.8.1) graphql: 16.8.1 - graphql-config: 5.0.3(@types/node@20.11.17)(graphql@16.8.1)(typescript@4.9.5) + graphql-config: 5.0.3(@types/node@18.15.13)(graphql@16.8.1)(typescript@5.4.4) isomorphic-fetch: 3.0.0 lodash-es: 4.17.21 node-fetch: 3.3.2 @@ -1283,6 +1289,10 @@ packages: /@amazeelabs/token-auth-middleware@1.1.1: resolution: {integrity: sha512-Wzz3ZbccMQ0EkYupue3xzL0OB7A+nenKRXmjMKu15pMDUzisC207MluGIFizf7ftcW+KTLBslEwxlN1ayZFwJA==} + dev: false + + /@amazeelabs/token-auth-middleware@1.1.7: + resolution: {integrity: sha512-C11BmlW9X4GDC8C93Sj0WLI1C6DNAsMgRBVDT1LGfqg6gB0s52atfP38TM3zhnAnwvyZf++5ZrzrZH/76kDAEg==} /@ampproject/remapping@2.3.0: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} @@ -2753,14 +2763,14 @@ packages: resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} engines: {node: '>=0.1.90'} - /@commitlint/cli@18.4.3(@types/node@20.11.17)(typescript@5.3.3): + /@commitlint/cli@18.4.3(@types/node@18.15.13)(typescript@5.3.3): resolution: {integrity: sha512-zop98yfB3A6NveYAZ3P1Mb6bIXuCeWgnUfVNkH4yhIMQpQfzFwseadazOuSn0OOfTt0lWuFauehpm9GcqM5lww==} engines: {node: '>=v18'} hasBin: true dependencies: '@commitlint/format': 18.6.1 '@commitlint/lint': 18.6.1 - '@commitlint/load': 18.6.1(@types/node@20.11.17)(typescript@5.3.3) + '@commitlint/load': 18.6.1(@types/node@18.15.13)(typescript@5.3.3) '@commitlint/read': 18.6.1 '@commitlint/types': 18.6.1 execa: 5.1.1 @@ -2831,7 +2841,7 @@ packages: '@commitlint/types': 18.6.1 dev: true - /@commitlint/load@18.6.1(@types/node@20.11.17)(typescript@5.3.3): + /@commitlint/load@18.6.1(@types/node@18.15.13)(typescript@5.3.3): resolution: {integrity: sha512-p26x8734tSXUHoAw0ERIiHyW4RaI4Bj99D8YgUlVV9SedLf8hlWAfyIFhHRIhfPngLlCe0QYOdRKYFt8gy56TA==} engines: {node: '>=v18'} dependencies: @@ -2841,7 +2851,7 @@ packages: '@commitlint/types': 18.6.1 chalk: 4.1.2 cosmiconfig: 8.3.6(typescript@5.3.3) - cosmiconfig-typescript-loader: 5.0.0(@types/node@20.11.17)(cosmiconfig@8.3.6)(typescript@5.3.3) + cosmiconfig-typescript-loader: 5.0.0(@types/node@18.15.13)(cosmiconfig@8.3.6)(typescript@5.3.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -3094,6 +3104,7 @@ packages: '@types/react': 18.3.3 hoist-non-react-statics: 3.3.2 react: 18.2.0 + dev: false /@emotion/serialize@1.1.4: resolution: {integrity: sha512-RIN04MBT8g+FnDwgvIUi8czvr1LU1alUMI05LekWB5DGyTm8cCBMCRpq3GqaiyEDRptEXOyXnvZ58GZYu4kBxQ==} @@ -3146,6 +3157,7 @@ packages: '@emotion/utils': 1.2.1 '@types/react': 18.3.3 react: 18.2.0 + dev: false /@emotion/unitless@0.8.1: resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==} @@ -4682,24 +4694,6 @@ packages: - '@types/node' dev: false - /@graphql-tools/executor-http@1.0.9(@types/node@20.11.17)(graphql@16.8.1): - resolution: {integrity: sha512-+NXaZd2MWbbrWHqU4EhXcrDbogeiCDmEbrAN+rMn4Nu2okDjn2MTFDbTIab87oEubQCH4Te1wDkWPKrzXup7+Q==} - engines: {node: '>=16.0.0'} - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - dependencies: - '@graphql-tools/utils': 10.1.2(graphql@16.8.1) - '@repeaterjs/repeater': 3.0.5 - '@whatwg-node/fetch': 0.9.17 - extract-files: 11.0.0 - graphql: 16.8.1 - meros: 1.3.0(@types/node@20.11.17) - tslib: 2.6.2 - value-or-promise: 1.0.12 - transitivePeerDependencies: - - '@types/node' - dev: false - /@graphql-tools/executor-legacy-ws@1.0.6(graphql@16.8.1): resolution: {integrity: sha512-lDSxz9VyyquOrvSuCCnld3256Hmd+QI2lkmkEv7d4mdzkxkK4ddAWW1geQiWrQvWmdsmcnGGlZ7gDGbhEExwqg==} engines: {node: '>=16.0.0'} @@ -5031,33 +5025,6 @@ packages: - utf-8-validate dev: false - /@graphql-tools/url-loader@8.0.2(@types/node@20.11.17)(graphql@16.8.1): - resolution: {integrity: sha512-1dKp2K8UuFn7DFo1qX5c1cyazQv2h2ICwA9esHblEqCYrgf69Nk8N7SODmsfWg94OEaI74IqMoM12t7eIGwFzQ==} - engines: {node: '>=16.0.0'} - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - dependencies: - '@ardatan/sync-fetch': 0.0.1 - '@graphql-tools/delegate': 10.0.4(graphql@16.8.1) - '@graphql-tools/executor-graphql-ws': 1.1.2(graphql@16.8.1) - '@graphql-tools/executor-http': 1.0.9(@types/node@20.11.17)(graphql@16.8.1) - '@graphql-tools/executor-legacy-ws': 1.0.6(graphql@16.8.1) - '@graphql-tools/utils': 10.1.2(graphql@16.8.1) - '@graphql-tools/wrap': 10.0.5(graphql@16.8.1) - '@types/ws': 8.5.10 - '@whatwg-node/fetch': 0.9.17 - graphql: 16.8.1 - isomorphic-ws: 5.0.0(ws@8.16.0) - tslib: 2.6.2 - value-or-promise: 1.0.12 - ws: 8.16.0 - transitivePeerDependencies: - - '@types/node' - - bufferutil - - encoding - - utf-8-validate - dev: false - /@graphql-tools/utils@10.1.2(graphql@16.8.1): resolution: {integrity: sha512-fX13CYsDnX4yifIyNdiN0cVygz/muvkreWWem6BBw130+ODbRRgfiVveL0NizCEnKXkpvdeTy9Bxvo9LIKlhrw==} engines: {node: '>=16.0.0'} @@ -5202,6 +5169,7 @@ packages: /@humanwhocodes/config-array@0.5.0: resolution: {integrity: sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead requiresBuild: true dependencies: '@humanwhocodes/object-schema': 1.2.1 @@ -5217,6 +5185,7 @@ packages: /@humanwhocodes/object-schema@1.2.1: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + deprecated: Use @eslint/object-schema instead requiresBuild: true /@iarna/toml@2.2.5: @@ -5436,7 +5405,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 18.15.3 + '@types/node': 18.15.13 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -5457,14 +5426,14 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.15.3 + '@types/node': 18.15.13 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@18.15.3) + jest-config: 29.7.0(@types/node@18.15.13) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -5499,7 +5468,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.15.3 + '@types/node': 18.15.13 jest-mock: 29.7.0 dev: true @@ -5526,7 +5495,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 18.15.3 + '@types/node': 18.15.13 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -5559,7 +5528,7 @@ packages: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 18.15.3 + '@types/node': 18.15.13 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -5645,7 +5614,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.11.17 + '@types/node': 18.15.13 '@types/yargs': 16.0.9 chalk: 4.1.2 dev: false @@ -6027,7 +5996,7 @@ packages: yargs: 17.7.2 dev: false - /@netlify/build@29.36.6(@opentelemetry/api@1.8.0)(@types/node@20.11.17): + /@netlify/build@29.36.6(@opentelemetry/api@1.8.0)(@types/node@18.15.13): resolution: {integrity: sha512-crNoY5Vr7tAodBfYdz8weM+NTw5q6W6ArkowNw6QhKXa4iRXT5MY6H0c2ztsge9o5gAYs55bDhBpKiPcZlzDlA==} engines: {node: ^14.16.0 || >=16.0.0} hasBin: true @@ -6092,7 +6061,7 @@ packages: strip-ansi: 7.1.0 supports-color: 9.4.0 terminal-link: 3.0.0 - ts-node: 10.9.2(@types/node@20.11.17)(typescript@5.4.4) + ts-node: 10.9.2(@types/node@18.15.13)(typescript@5.4.4) typescript: 5.4.4 uuid: 9.0.0 yargs: 17.7.2 @@ -9786,7 +9755,7 @@ packages: dependencies: '@types/http-cache-semantics': 4.0.4 '@types/keyv': 3.1.4 - '@types/node': 20.11.17 + '@types/node': 18.15.13 '@types/responselike': 1.0.3 /@types/chai-subset@1.3.5: @@ -9825,12 +9794,12 @@ packages: /@types/cors@2.8.17: resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==} dependencies: - '@types/node': 20.11.17 + '@types/node': 18.15.13 /@types/cross-spawn@6.0.6: resolution: {integrity: sha512-fXRhhUkG4H3TQk5dBhQ7m/JDdSNHKwR2BBia62lhwEIq9xGiQKLxd6LymNhn47SjXhsUEPmxi+PKw2OkW4LLjA==} dependencies: - '@types/node': 18.15.3 + '@types/node': 18.15.13 dev: true /@types/debug@0.0.30: @@ -9942,19 +9911,19 @@ packages: resolution: {integrity: sha512-rTtf75rwyP9G2qO5yRpYtdJ6aU1QqEhWbtW55qEgquEDa6bXW0s2TWZfDm02GuppjEozOWG/F2UnPq5hAQb+gw==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.11.17 + '@types/node': 18.15.13 /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.15.3 + '@types/node': 18.15.13 dev: true /@types/graceful-fs@4.1.9: resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} dependencies: - '@types/node': 18.15.3 + '@types/node': 18.15.13 dev: true /@types/hast@2.3.10: @@ -9991,7 +9960,7 @@ packages: /@types/http-proxy@1.17.14: resolution: {integrity: sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==} dependencies: - '@types/node': 20.11.17 + '@types/node': 18.15.13 /@types/image-size@0.8.0: resolution: {integrity: sha512-hMlhu25ji75dXQk2uZkN3pTJ+lWrgKr8M1fTpyyFvuu+SJZBdGa5gDm4BVNobWXHZbOU11mBj0vciYp7qOfAFg==} @@ -10017,6 +9986,10 @@ packages: dependencies: '@types/istanbul-lib-report': 3.0.3 + /@types/js-cookie@3.0.6: + resolution: {integrity: sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ==} + dev: true + /@types/js-yaml@4.0.9: resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==} dev: true @@ -10038,7 +10011,7 @@ packages: /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 20.11.17 + '@types/node': 18.15.13 /@types/lodash@4.17.0: resolution: {integrity: sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==} @@ -10073,7 +10046,7 @@ packages: /@types/mkdirp@0.5.2: resolution: {integrity: sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==} dependencies: - '@types/node': 20.11.17 + '@types/node': 18.15.13 /@types/mousetrap@1.6.15: resolution: {integrity: sha512-qL0hyIMNPow317QWW/63RvL1x5MVMV+Ru3NaY9f/CuEpCqrmb7WeuK2071ZY5hczOnm38qExWM2i2WtkXLSqFw==} @@ -10212,7 +10185,7 @@ packages: /@types/responselike@1.0.3: resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} dependencies: - '@types/node': 20.11.17 + '@types/node': 18.15.13 /@types/retry@0.12.1: resolution: {integrity: sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==} @@ -10222,7 +10195,7 @@ packages: resolution: {integrity: sha512-YyP+VfeaqAyFmXoTh3HChxOQMyjByRMsHU7kc5KOJkSlXudhMhQIALbYV7rHh/l8d2lX3VUQzprrcAgWdRuU8g==} dependencies: '@types/glob': 5.0.38 - '@types/node': 20.11.17 + '@types/node': 18.15.13 /@types/sax@1.2.7: resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} @@ -10299,7 +10272,7 @@ packages: /@types/wait-on@5.3.4: resolution: {integrity: sha512-EBsPjFMrFlMbbUFf9D1Fp+PAB2TwmUn7a3YtHyD9RLuTIk1jDd8SxXVAoez2Ciy+8Jsceo2MYEYZzJ/DvorOKw==} dependencies: - '@types/node': 18.15.3 + '@types/node': 18.15.13 dev: true /@types/wordpress__block-editor@11.5.0(react-dom@18.2.0)(react@18.2.0): @@ -10525,7 +10498,7 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 5.62.0(eslint@7.32.0)(typescript@5.3.3) + '@typescript-eslint/parser': 5.62.0(eslint@7.32.0)(typescript@5.4.4) '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/type-utils': 5.62.0(eslint@7.32.0)(typescript@5.4.4) '@typescript-eslint/utils': 5.62.0(eslint@7.32.0)(typescript@5.4.4) @@ -10684,7 +10657,6 @@ packages: typescript: 5.4.4 transitivePeerDependencies: - supports-color - dev: false /@typescript-eslint/parser@6.17.0(eslint@7.0.0)(typescript@5.3.3): resolution: {integrity: sha512-C4bBaX2orvhK+LlwrY8oWGmSl4WolCfYm513gEccdWZj0CwGadbIADb0FtVEcI+WzUyjyoBj2JRP8g25E6IB8A==} @@ -10998,7 +10970,6 @@ packages: typescript: 5.4.4 transitivePeerDependencies: - supports-color - dev: false /@typescript-eslint/typescript-estree@6.17.0(typescript@5.3.3): resolution: {integrity: sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg==} @@ -12042,7 +12013,7 @@ packages: /@wry/context@0.4.4: resolution: {integrity: sha512-LrKVLove/zw6h2Md/KZyWxIkFM6AoyKp71OqpH9Hiip1csjPVoD3tPxlbQUNxEnHENks3UGgNpSBCAfq9KWuag==} dependencies: - '@types/node': 20.11.17 + '@types/node': 18.15.13 tslib: 1.14.1 /@wry/equality@0.1.11: @@ -14749,7 +14720,7 @@ packages: object-assign: 4.1.1 vary: 1.1.2 - /cosmiconfig-typescript-loader@5.0.0(@types/node@20.11.17)(cosmiconfig@8.3.6)(typescript@5.3.3): + /cosmiconfig-typescript-loader@5.0.0(@types/node@18.15.13)(cosmiconfig@8.3.6)(typescript@5.3.3): resolution: {integrity: sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==} engines: {node: '>=v16'} peerDependencies: @@ -14757,7 +14728,7 @@ packages: cosmiconfig: '>=8.2' typescript: '>=4' dependencies: - '@types/node': 20.11.17 + '@types/node': 18.15.13 cosmiconfig: 8.3.6(typescript@5.3.3) jiti: 1.21.0 typescript: 5.3.3 @@ -15523,8 +15494,8 @@ packages: prop-types: ^15.7.2 react: ^18.2.0 dependencies: - '@emotion/react': 11.11.4(@types/react@18.3.3)(react@18.2.0) - '@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.3.3)(react@18.2.0) + '@emotion/react': 11.11.4(@types/react@18.2.46)(react@18.2.0) + '@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.46)(react@18.2.0) apollo-cache-inmemory: 1.6.6(graphql@16.8.1) apollo-client: 2.6.10(graphql@16.8.1) apollo-link-context: 1.0.20(graphql@16.8.1) @@ -15754,8 +15725,8 @@ packages: prop-types: ^15.7.2 react: ^18.2.0 dependencies: - '@emotion/react': 11.11.4(@types/react@18.3.3)(react@18.2.0) - '@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.3.3)(react@18.2.0) + '@emotion/react': 11.11.4(@types/react@18.2.46)(react@18.2.0) + '@emotion/styled': 11.11.5(@emotion/react@11.11.4)(@types/react@18.2.46)(react@18.2.0) lodash: 4.17.21 prop-types: 15.8.1 react: 18.2.0 @@ -16799,7 +16770,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.17 - '@types/node': 20.11.17 + '@types/node': 18.15.13 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -17318,7 +17289,7 @@ packages: confusing-browser-globals: 1.0.11 eslint: 7.32.0 eslint-plugin-flowtype: 5.10.0(eslint@7.32.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0)(eslint@7.32.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.17.0)(eslint@7.32.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@7.32.0) eslint-plugin-react: 7.34.1(eslint@7.32.0) eslint-plugin-react-hooks: 4.6.0(eslint@7.32.0) @@ -17392,7 +17363,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.62.0(eslint@7.32.0)(typescript@4.9.5) + '@typescript-eslint/parser': 5.62.0(eslint@7.32.0)(typescript@5.4.4) debug: 3.2.7 eslint: 7.32.0 eslint-import-resolver-node: 0.3.9 @@ -17428,6 +17399,35 @@ packages: - supports-color dev: true + /eslint-module-utils@2.8.1(@typescript-eslint/parser@6.17.0)(eslint-import-resolver-node@0.3.9)(eslint@7.32.0): + resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + dependencies: + '@typescript-eslint/parser': 6.17.0(eslint@7.32.0)(typescript@5.3.3) + debug: 3.2.7 + eslint: 7.32.0 + eslint-import-resolver-node: 0.3.9 + transitivePeerDependencies: + - supports-color + dev: true + /eslint-plugin-flowtype@5.10.0(eslint@7.32.0): resolution: {integrity: sha512-vcz32f+7TP+kvTUyMXZmCnNujBQZDNmcqPImw8b9PZ+16w1Qdm6ryRuYZYVaG9xRqqmAPr2Cs9FAX5gN+x/bjw==} engines: {node: ^10.12.0 || >=12.0.0} @@ -17470,7 +17470,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.62.0(eslint@7.32.0)(typescript@4.9.5) + '@typescript-eslint/parser': 5.62.0(eslint@7.32.0)(typescript@5.4.4) array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 @@ -17529,6 +17529,41 @@ packages: - supports-color dev: true + /eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.17.0)(eslint@7.32.0): + resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + dependencies: + '@typescript-eslint/parser': 6.17.0(eslint@7.32.0)(typescript@5.3.3) + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.5 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 7.32.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.17.0)(eslint-import-resolver-node@0.3.9)(eslint@7.32.0) + hasown: 2.0.2 + is-core-module: 2.13.1 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.0 + semver: 6.3.1 + tsconfig-paths: 3.15.0 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + dev: true + /eslint-plugin-jsx-a11y@6.8.0(eslint@7.32.0): resolution: {integrity: sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA==} engines: {node: '>=4.0'} @@ -18875,7 +18910,7 @@ packages: semver: 7.6.0 tapable: 1.1.3 typescript: 5.3.3 - webpack: 5.91.0(@swc/core@1.3.102) + webpack: 5.91.0(esbuild@0.19.12) dev: true /fork-ts-checker-webpack-plugin@6.5.3(eslint@7.32.0)(typescript@5.4.4)(webpack@5.91.0): @@ -20788,7 +20823,7 @@ packages: - typescript - utf-8-validate - /graphql-config@5.0.3(@types/node@18.15.13)(graphql@16.8.1)(typescript@5.4.4): + /graphql-config@5.0.3(@types/node@18.15.13)(graphql@16.8.1)(typescript@4.9.5): resolution: {integrity: sha512-BNGZaoxIBkv9yy6Y7omvsaBUHOzfFcII3UN++tpH8MGOKFPFkCPZuwx09ggANMt8FgyWP1Od8SWPmrUEZca4NQ==} engines: {node: '>= 16.0.0'} peerDependencies: @@ -20804,7 +20839,7 @@ packages: '@graphql-tools/merge': 9.0.3(graphql@16.8.1) '@graphql-tools/url-loader': 8.0.2(@types/node@18.15.13)(graphql@16.8.1) '@graphql-tools/utils': 10.1.2(graphql@16.8.1) - cosmiconfig: 8.3.6(typescript@5.4.4) + cosmiconfig: 8.3.6(typescript@4.9.5) graphql: 16.8.1 jiti: 1.21.0 minimatch: 4.2.3 @@ -20818,7 +20853,7 @@ packages: - utf-8-validate dev: false - /graphql-config@5.0.3(@types/node@20.11.17)(graphql@16.8.1)(typescript@4.9.5): + /graphql-config@5.0.3(@types/node@18.15.13)(graphql@16.8.1)(typescript@5.4.4): resolution: {integrity: sha512-BNGZaoxIBkv9yy6Y7omvsaBUHOzfFcII3UN++tpH8MGOKFPFkCPZuwx09ggANMt8FgyWP1Od8SWPmrUEZca4NQ==} engines: {node: '>= 16.0.0'} peerDependencies: @@ -20832,9 +20867,9 @@ packages: '@graphql-tools/json-file-loader': 8.0.1(graphql@16.8.1) '@graphql-tools/load': 8.0.2(graphql@16.8.1) '@graphql-tools/merge': 9.0.3(graphql@16.8.1) - '@graphql-tools/url-loader': 8.0.2(@types/node@20.11.17)(graphql@16.8.1) + '@graphql-tools/url-loader': 8.0.2(@types/node@18.15.13)(graphql@16.8.1) '@graphql-tools/utils': 10.1.2(graphql@16.8.1) - cosmiconfig: 8.3.6(typescript@4.9.5) + cosmiconfig: 8.3.6(typescript@5.4.4) graphql: 16.8.1 jiti: 1.21.0 minimatch: 4.2.3 @@ -22715,6 +22750,46 @@ packages: - ts-node dev: true + /jest-config@29.7.0(@types/node@18.15.13): + resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true + dependencies: + '@babel/core': 7.24.4 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 18.15.13 + babel-jest: 29.7.0(@babel/core@7.24.4) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + dev: true + /jest-config@29.7.0(@types/node@18.15.3): resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -22811,7 +22886,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 18.15.3 + '@types/node': 18.15.13 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -22872,7 +22947,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 18.15.3 + '@types/node': 18.15.13 jest-util: 29.7.0 dev: true @@ -22999,7 +23074,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.15.3 + '@types/node': 18.15.13 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -23057,7 +23132,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 18.15.3 + '@types/node': 18.15.13 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -23110,7 +23185,7 @@ packages: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 18.15.3 + '@types/node': 18.15.13 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -23122,7 +23197,7 @@ packages: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.11.17 + '@types/node': 18.15.13 merge-stream: 2.0.0 supports-color: 7.2.0 @@ -23130,7 +23205,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.11.17 + '@types/node': 18.15.13 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -23138,7 +23213,7 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 18.15.3 + '@types/node': 18.15.13 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -23190,6 +23265,11 @@ packages: /js-base64@3.7.7: resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==} + /js-cookie@3.0.5: + resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} + engines: {node: '>=14'} + dev: false + /js-sha256@0.9.0: resolution: {integrity: sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==} @@ -24549,18 +24629,6 @@ packages: '@types/node': 18.15.13 dev: false - /meros@1.3.0(@types/node@20.11.17): - resolution: {integrity: sha512-2BNGOimxEz5hmjUG2FwoxCt5HN7BXdaWyFqEwxPTrJzVdABtrL4TiHTcsWSFAxPQ/tOnEaQEJh3qWq71QRMY+w==} - engines: {node: '>=13'} - peerDependencies: - '@types/node': '>=13' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@types/node': 20.11.17 - dev: false - /methods@1.1.2: resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} engines: {node: '>= 0.6'} @@ -25272,7 +25340,7 @@ packages: resolution: {integrity: sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==} dev: false - /netlify-cli@17.21.1(@types/node@20.11.17): + /netlify-cli@17.21.1(@types/node@18.15.13): resolution: {integrity: sha512-B8QveV55h2dFCTnk5LInVW1MiXPINTQ61IkEtih15CVYpvVSQy+he8M6hdpucq83VqaF/phaJkb3Si2ligOxxw==} engines: {node: '>=18.14.0'} hasBin: true @@ -25281,7 +25349,7 @@ packages: '@bugsnag/js': 7.20.2 '@fastify/static': 6.10.2 '@netlify/blobs': 7.0.1 - '@netlify/build': 29.36.6(@opentelemetry/api@1.8.0)(@types/node@20.11.17) + '@netlify/build': 29.36.6(@opentelemetry/api@1.8.0)(@types/node@18.15.13) '@netlify/build-info': 7.13.2 '@netlify/config': 20.12.1 '@netlify/edge-bundler': 11.3.0 @@ -28167,7 +28235,7 @@ packages: strip-ansi: 6.0.1 text-table: 0.2.0 typescript: 5.3.3 - webpack: 5.91.0(@swc/core@1.3.102) + webpack: 5.91.0(esbuild@0.19.12) transitivePeerDependencies: - eslint - supports-color @@ -31479,6 +31547,31 @@ packages: terser: 5.30.3 webpack: 5.91.0(@swc/core@1.3.102) + /terser-webpack-plugin@5.3.10(esbuild@0.19.12)(webpack@5.91.0): + resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} + 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.25 + esbuild: 0.19.12 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.2 + terser: 5.30.3 + webpack: 5.91.0(esbuild@0.19.12) + dev: true + /terser-webpack-plugin@5.3.10(webpack@5.91.0): resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} engines: {node: '>= 10.13.0'} @@ -31862,7 +31955,7 @@ packages: resolution: {integrity: sha512-PGcnJoTBnVGy6yYNFxWVNkdcAuAMstvutN9MgDJIV6L0oG8fB+ZNNy1T+wJzah8RPGor1mZuPQkVfXNDpy9eHA==} dev: true - /ts-node@10.9.2(@types/node@20.11.17)(typescript@5.4.4): + /ts-node@10.9.2(@types/node@18.15.13)(typescript@5.4.4): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: @@ -31881,7 +31974,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.11.17 + '@types/node': 18.15.13 acorn: 8.11.3 acorn-walk: 8.3.2 arg: 4.1.3 @@ -31989,7 +32082,6 @@ packages: dependencies: tslib: 1.14.1 typescript: 5.4.4 - dev: false /tsx@4.7.1: resolution: {integrity: sha512-8d6VuibXHtlN5E3zFkgY8u4DX7Y3Z27zvvPKVmLon/D4AjuKzarkUBTLDBgj9iTQ0hg5xM7c/mYiRVM+HETf0g==} @@ -33027,7 +33119,7 @@ packages: - terser dev: true - /vite-node@1.1.1(@types/node@18.15.3): + /vite-node@1.1.1(@types/node@18.15.13): resolution: {integrity: sha512-2bGE5w4jvym5v8llF6Gu1oBrmImoNSs4WmRVcavnG2me6+8UQntTqLiAMFyiAobp+ZXhj5ZFhI7SmLiFr/jrow==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -33036,7 +33128,7 @@ packages: debug: 4.3.4 pathe: 1.1.2 picocolors: 1.0.0 - vite: 5.2.8(@types/node@18.15.3) + vite: 5.2.8(@types/node@18.15.13) transitivePeerDependencies: - '@types/node' - less @@ -33048,7 +33140,7 @@ packages: - terser dev: true - /vite-node@1.1.1(@types/node@20.11.17): + /vite-node@1.1.1(@types/node@18.15.3): resolution: {integrity: sha512-2bGE5w4jvym5v8llF6Gu1oBrmImoNSs4WmRVcavnG2me6+8UQntTqLiAMFyiAobp+ZXhj5ZFhI7SmLiFr/jrow==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -33057,7 +33149,7 @@ packages: debug: 4.3.4 pathe: 1.1.2 picocolors: 1.0.0 - vite: 5.2.8(@types/node@20.11.17) + vite: 5.2.8(@types/node@18.15.3) transitivePeerDependencies: - '@types/node' - less @@ -33222,7 +33314,6 @@ packages: rollup: 4.14.1 optionalDependencies: fsevents: 2.3.3 - optional: true /vite@5.2.8(@types/node@18.15.3): resolution: {integrity: sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==} @@ -33558,7 +33649,7 @@ packages: - terser dev: true - /vitest@1.1.1(@types/node@18.15.3)(happy-dom@12.10.3): + /vitest@1.1.1(@types/node@18.15.13): resolution: {integrity: sha512-Ry2qs4UOu/KjpXVfOCfQkTnwSXYGrqTbBZxw6reIYEFjSy1QUARRg5pxiI5BEXy+kBVntxUYNMlq4Co+2vD3fQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -33583,7 +33674,7 @@ packages: jsdom: optional: true dependencies: - '@types/node': 18.15.3 + '@types/node': 18.15.13 '@vitest/expect': 1.1.1 '@vitest/runner': 1.1.1 '@vitest/snapshot': 1.1.1 @@ -33594,7 +33685,6 @@ packages: chai: 4.4.1 debug: 4.3.4 execa: 8.0.1 - happy-dom: 12.10.3 local-pkg: 0.5.0 magic-string: 0.30.9 pathe: 1.1.2 @@ -33603,8 +33693,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.6.0 tinypool: 0.8.3 - vite: 5.2.8(@types/node@18.15.3) - vite-node: 1.1.1(@types/node@18.15.3) + vite: 5.2.8(@types/node@18.15.13) + vite-node: 1.1.1(@types/node@18.15.13) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -33616,7 +33706,7 @@ packages: - terser dev: true - /vitest@1.1.1(@types/node@20.11.17): + /vitest@1.1.1(@types/node@18.15.13)(happy-dom@12.10.3): resolution: {integrity: sha512-Ry2qs4UOu/KjpXVfOCfQkTnwSXYGrqTbBZxw6reIYEFjSy1QUARRg5pxiI5BEXy+kBVntxUYNMlq4Co+2vD3fQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -33641,7 +33731,7 @@ packages: jsdom: optional: true dependencies: - '@types/node': 20.11.17 + '@types/node': 18.15.13 '@vitest/expect': 1.1.1 '@vitest/runner': 1.1.1 '@vitest/snapshot': 1.1.1 @@ -33652,6 +33742,7 @@ packages: chai: 4.4.1 debug: 4.3.4 execa: 8.0.1 + happy-dom: 12.10.3 local-pkg: 0.5.0 magic-string: 0.30.9 pathe: 1.1.2 @@ -33660,8 +33751,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.6.0 tinypool: 0.8.3 - vite: 5.2.8(@types/node@20.11.17) - vite-node: 1.1.1(@types/node@20.11.17) + vite: 5.2.8(@types/node@18.15.13) + vite-node: 1.1.1(@types/node@18.15.13) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -33673,7 +33764,7 @@ packages: - terser dev: true - /vitest@1.1.1(@types/node@20.11.17)(happy-dom@12.10.3): + /vitest@1.1.1(@types/node@18.15.3)(happy-dom@12.10.3): resolution: {integrity: sha512-Ry2qs4UOu/KjpXVfOCfQkTnwSXYGrqTbBZxw6reIYEFjSy1QUARRg5pxiI5BEXy+kBVntxUYNMlq4Co+2vD3fQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -33698,7 +33789,7 @@ packages: jsdom: optional: true dependencies: - '@types/node': 20.11.17 + '@types/node': 18.15.3 '@vitest/expect': 1.1.1 '@vitest/runner': 1.1.1 '@vitest/snapshot': 1.1.1 @@ -33718,8 +33809,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.6.0 tinypool: 0.8.3 - vite: 5.2.8(@types/node@20.11.17) - vite-node: 1.1.1(@types/node@20.11.17) + vite: 5.2.8(@types/node@18.15.3) + vite-node: 1.1.1(@types/node@18.15.3) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -34029,6 +34120,46 @@ packages: - uglify-js dev: false + /webpack@5.91.0(esbuild@0.19.12): + resolution: {integrity: sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==} + 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.12.1 + '@webassemblyjs/wasm-edit': 1.12.1 + '@webassemblyjs/wasm-parser': 1.12.1 + acorn: 8.11.3 + acorn-import-assertions: 1.9.0(acorn@8.11.3) + browserslist: 4.23.0 + chrome-trace-event: 1.0.3 + enhanced-resolve: 5.16.0 + es-module-lexer: 1.5.0 + 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.10(esbuild@0.19.12)(webpack@5.91.0) + watchpack: 2.4.1 + webpack-sources: 3.2.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + dev: true + /website-scraper@5.3.1: resolution: {integrity: sha512-gogqPXD2gVsxoyd2yRiympw3rA5GuEpD1CaDEJ/J8zzanx7hkbTtneoO1SGs436PpLbWVcUge+6APGLhzsuZPA==} engines: {node: '>=14.14'} @@ -34210,7 +34341,7 @@ packages: /wkx@0.5.0: resolution: {integrity: sha512-Xng/d4Ichh8uN4l0FToV/258EjMGU9MGcA0HV2d9B/ZpZB3lqQm7nkOdZdm5GhKtLLhAE7PiVQwN4eN+2YJJUg==} dependencies: - '@types/node': 20.11.17 + '@types/node': 18.15.13 dev: false /wordwrap@1.0.0: @@ -34581,9 +34712,9 @@ packages: resolution: {integrity: sha512-2cN1tPkDVkwCy5ickKrI7vijSjPksFRfqS6237NzT0vqSsztTNnQdHw9mmN7uBdk3gceVXU0a+21jFzFzAc9+g==} engines: {node: '>=12.7.0'} peerDependencies: - '@types/react': 18.3.3 + '@types/react': '>=16.8' immer: '>=9.0.6' - react: 19.0.0-rc.0 + react: '>=16.8' peerDependenciesMeta: '@types/react': optional: true From 13abb68419146bbbfa62e949e09693979e286226 Mon Sep 17 00:00:00 2001 From: Alex Tkachev Date: Wed, 4 Sep 2024 11:36:56 +0400 Subject: [PATCH 2/4] chore(SLB-429): adjust preview test --- tests/e2e/specs/drupal/preview.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/specs/drupal/preview.spec.ts b/tests/e2e/specs/drupal/preview.spec.ts index 0ca958f7b..0affafdb2 100644 --- a/tests/e2e/specs/drupal/preview.spec.ts +++ b/tests/e2e/specs/drupal/preview.spec.ts @@ -21,7 +21,7 @@ test.describe('instant preview', () => { ).toBeVisible(); await expect( page - .frameLocator('iframe') + .frameLocator('iframe.external-preview-entity__iframe') .getByRole('heading', { name: 'This is visible instantly.' }), ).toBeVisible(); From 70666bb3d5668aa9ad5efc3047fe03602652a13c Mon Sep 17 00:00:00 2001 From: Alex Tkachev Date: Wed, 4 Sep 2024 12:38:56 +0400 Subject: [PATCH 3/4] chore: make decap work Also, make it readonly in non-prod environments. --- .lagoon/Dockerfile | 5 +++++ INIT.md | 1 + apps/decap/src/main.tsx | 19 +++++++++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.lagoon/Dockerfile b/.lagoon/Dockerfile index 5c0858c05..e2a5b46d9 100644 --- a/.lagoon/Dockerfile +++ b/.lagoon/Dockerfile @@ -35,6 +35,11 @@ RUN --mount=type=cache,target=/tmp/cache composer install --no-dev WORKDIR /app +# Decap config. +ENV VITE_DECAP_REPO='AmazeeLabs/silverback-template' +ARG LAGOON_GIT_BRANCH +ENV VITE_DECAP_BRANCH="$LAGOON_GIT_BRANCH" + # Copy the all package sources, install and prepare them. COPY . /app RUN --mount=type=cache,target=/tmp/cache pnpm i && \ diff --git a/INIT.md b/INIT.md index 3cfc2e1e2..da68e590c 100644 --- a/INIT.md +++ b/INIT.md @@ -53,6 +53,7 @@ replace( [ '.lagoon.yml', 'README.md', + '.lagoon/Dockerfile', 'apps/cms/config/sync/system.site.yml', 'apps/cms/config/sync/slack.settings.yml', 'apps/cms/scaffold/settings.php.append.txt', diff --git a/apps/decap/src/main.tsx b/apps/decap/src/main.tsx index 5a9d031d8..5b043a283 100644 --- a/apps/decap/src/main.tsx +++ b/apps/decap/src/main.tsx @@ -7,6 +7,7 @@ import { } from '@custom/schema'; import { Page } from '@custom/ui/routes/Page'; import CMS from 'decap-cms-app'; +import { InitOptions } from 'decap-cms-core'; import css from '../node_modules/@custom/ui/build/styles.css?raw'; import { PageCollection, pageSchema } from './collections/page'; @@ -31,7 +32,7 @@ if ( ); } -CMS.init({ +const cmsConfig: InitOptions = { config: { load_config_file: false, publish_mode: 'editorial_workflow', @@ -86,7 +87,21 @@ CMS.init({ PageCollection, ], }, -}); +}; + +// Make CMS readonly on non-prod environments. +if ( + window.location.hostname !== 'localhost' && + import.meta.env.VITE_DECAP_BRANCH !== 'prod' +) { + cmsConfig.config.collections.forEach((collection) => { + collection.publish = false; + collection.create = false; + collection.delete = false; + }); +} + +CMS.init(cmsConfig); CMS.registerPreviewTemplate( 'page', From 1ef4311999774909ef3cd83d8df01d2eb4b5f63f Mon Sep 17 00:00:00 2001 From: Alex Tkachev Date: Wed, 4 Sep 2024 13:43:34 +0400 Subject: [PATCH 4/4] chore: fix deploy workflow It was failing with Command "start-test" not found Also, run deploy workflow only when needed --- .github/workflows/deploy.yml | 11 ++++++----- apps/website/package.json | 4 ++-- pnpm-lock.yaml | 11 +++-------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 256e3f6df..ee228eefd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,8 +6,11 @@ on: - dev jobs: - test: + deploy: name: Deploy + if: + (github.ref == 'refs/heads/prod' && vars.NETLIFY_PROD_ID) || (github.ref + == 'refs/heads/dev' && vars.NETLIFY_DEV_ID) runs-on: ubuntu-latest steps: - name: Checkout @@ -60,8 +63,7 @@ jobs: working-directory: ../deploy if: github.ref == 'refs/heads/dev' && - steps.netlify-check.outputs.available == 'true' && vars.NETLIFY_DEV_ID - != '' + steps.netlify-check.outputs.available == 'true' env: NETLIFY_SITE_ID: ${{ vars.NETLIFY_DEV_ID }} NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} @@ -71,8 +73,7 @@ jobs: working-directory: ../deploy if: github.ref == 'refs/heads/prod' && - steps.netlify-check.outputs.available == 'true' && - vars.NETLIFY_PROD_ID != '' + steps.netlify-check.outputs.available == 'true' env: NETLIFY_SITE_ID: ${{ vars.NETLIFY_PROD_ID }} NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} diff --git a/apps/website/package.json b/apps/website/package.json index b0c07e380..dbe015871 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -29,7 +29,8 @@ "mime-types": "^2.1.35", "netlify-cli": "^17.21.1", "react": "^18.2.0", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "start-server-and-test": "^2.0.3" }, "devDependencies": { "@netlify/edge-functions": "^2.3.1", @@ -39,7 +40,6 @@ "@types/react-dom": "^18.3.0", "@types/serve-static": "^1.15.5", "happy-dom": "^12.10.3", - "start-server-and-test": "^2.0.3", "vitest": "^1.1.1" }, "scripts": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8db12ab7c..3796464bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -373,6 +373,9 @@ importers: react-dom: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) + start-server-and-test: + specifier: ^2.0.3 + version: 2.0.3 devDependencies: '@netlify/edge-functions': specifier: ^2.3.1 @@ -395,9 +398,6 @@ importers: happy-dom: specifier: ^12.10.3 version: 12.10.3 - start-server-and-test: - specifier: ^2.0.3 - version: 2.0.3 vitest: specifier: ^1.1.1 version: 1.1.1(@types/node@18.15.13)(happy-dom@12.10.3) @@ -13010,7 +13010,6 @@ packages: proxy-from-env: 1.1.0 transitivePeerDependencies: - debug - dev: true /axobject-query@3.2.1: resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} @@ -13983,7 +13982,6 @@ packages: /check-more-types@2.24.0: resolution: {integrity: sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==} engines: {node: '>= 0.8.0'} - dev: true /cheerio-select@2.1.0: resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==} @@ -23597,7 +23595,6 @@ packages: /lazy-ass@1.6.0: resolution: {integrity: sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==} engines: {node: '> 0.8'} - dev: true /lazy-universal-dotenv@4.0.0: resolution: {integrity: sha512-aXpZJRnTkpK6gQ/z4nk+ZBLd/Qdp118cvPruLSIQzQNRhKwEcdXCOzXuF55VDqIiuAaY3UGZ10DJtvZzDcvsxg==} @@ -30777,7 +30774,6 @@ packages: wait-on: 7.2.0(debug@4.3.4) transitivePeerDependencies: - supports-color - dev: true /state-toggle@1.0.3: resolution: {integrity: sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==} @@ -33848,7 +33844,6 @@ packages: rxjs: 7.8.1 transitivePeerDependencies: - debug - dev: true /wait-port@0.2.14: resolution: {integrity: sha512-kIzjWcr6ykl7WFbZd0TMae8xovwqcqbx6FM9l+7agOgUByhzdjfzZBPK2CPufldTOMxbUivss//Sh9MFawmPRQ==}