@newskit-render/core 0.0.0-d55b7d88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ci/trigger-circleci-workflow.sh +37 -0
- package/.eslintignore +23 -0
- package/.eslintrc +74 -0
- package/.prettierignore +19 -0
- package/.prettierrc +7 -0
- package/CHANGELOG.md +7638 -0
- package/Dockerfile +14 -0
- package/Dockerfile.withNewRelic +15 -0
- package/README.md +274 -0
- package/__tests__/pages/__snapshots__/brightcove.test.tsx.snap +20 -0
- package/__tests__/pages/__snapshots__/home.test.tsx.snap +1195 -0
- package/__tests__/pages/brightcove.test.tsx +34 -0
- package/__tests__/pages/empty.test.tsx +10 -0
- package/__tests__/pages/home.test.tsx +16 -0
- package/app-context/InstrumentationContextProvider.tsx +36 -0
- package/assets/fontFamily.ts +416 -0
- package/assets/fonts/Graphik-Black-App.ttf +0 -0
- package/assets/fonts/Graphik-BlackItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Bold-App.ttf +0 -0
- package/assets/fonts/Graphik-BoldItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Extralight-App.ttf +0 -0
- package/assets/fonts/Graphik-ExtralightItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Light-App.ttf +0 -0
- package/assets/fonts/Graphik-LightItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Medium-App.ttf +0 -0
- package/assets/fonts/Graphik-Medium-Web.woff2 +0 -0
- package/assets/fonts/Graphik-MediumItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Regular-App.ttf +0 -0
- package/assets/fonts/Graphik-Regular-Web.woff2 +0 -0
- package/assets/fonts/Graphik-RegularItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Semibold-App.ttf +0 -0
- package/assets/fonts/Graphik-Semibold-Web.woff2 +0 -0
- package/assets/fonts/Graphik-SemiboldItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Super-App.ttf +0 -0
- package/assets/fonts/Graphik-SuperItalic-App.ttf +0 -0
- package/assets/fonts/Graphik-Thin-App.ttf +0 -0
- package/assets/fonts/Graphik-ThinItalic-App.ttf +0 -0
- package/assets/fonts/Montserrat-Black.ttf +0 -0
- package/assets/fonts/Montserrat-BlackItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Bold.ttf +0 -0
- package/assets/fonts/Montserrat-BoldItalic.ttf +0 -0
- package/assets/fonts/Montserrat-ExtraBold.ttf +0 -0
- package/assets/fonts/Montserrat-ExtraBoldItalic.ttf +0 -0
- package/assets/fonts/Montserrat-ExtraLight.ttf +0 -0
- package/assets/fonts/Montserrat-ExtraLightItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Italic.ttf +0 -0
- package/assets/fonts/Montserrat-Light.ttf +0 -0
- package/assets/fonts/Montserrat-LightItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Medium.ttf +0 -0
- package/assets/fonts/Montserrat-MediumItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Regular.ttf +0 -0
- package/assets/fonts/Montserrat-SemiBold.ttf +0 -0
- package/assets/fonts/Montserrat-SemiBoldItalic.ttf +0 -0
- package/assets/fonts/Montserrat-Thin.ttf +0 -0
- package/assets/fonts/Montserrat-ThinItalic.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Black-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-BlackItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Bold-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Bold-Web.woff2 +0 -0
- package/assets/fonts/PublicoHeadline-BoldItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Extrabold-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-ExtraboldItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Italic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Light-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-LightItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Medium-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-MediumItalic-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Roman-App.ttf +0 -0
- package/assets/fonts/PublicoHeadline-Roman-Web.woff2 +0 -0
- package/assets/fonts/PublicoText-Bold-App.ttf +0 -0
- package/assets/fonts/PublicoText-BoldItalic-App.ttf +0 -0
- package/assets/fonts/PublicoText-Italic-App.ttf +0 -0
- package/assets/fonts/PublicoText-Italic-Web.woff2 +0 -0
- package/assets/fonts/PublicoText-Roman-App.ttf +0 -0
- package/assets/fonts/PublicoText-Roman-Web.woff2 +0 -0
- package/assets/fonts/PublicoText-Semibold-App.ttf +0 -0
- package/assets/fonts/PublicoText-SemiboldItalic-App.ttf +0 -0
- package/assets/fonts/Roboto-Bold.ttf +0 -0
- package/assets/fonts/Roboto-Light.ttf +0 -0
- package/assets/fonts/Roboto-Medium.ttf +0 -0
- package/assets/fonts/Roboto-Regular.ttf +0 -0
- package/assets/fonts/TheSun-Bold.ttf +0 -0
- package/assets/fonts/TheSun-BoldItalic.ttf +0 -0
- package/assets/fonts/TheSun-HeavyCondensed.ttf +0 -0
- package/assets/fonts/TheSun-HeavyNarrow.ttf +0 -0
- package/assets/fonts/TheSun-Italic.ttf +0 -0
- package/assets/fonts/TheSun-Medium.ttf +0 -0
- package/assets/fonts/TheSun-MediumItalic.ttf +0 -0
- package/assets/fonts/TheSun-Regular.ttf +0 -0
- package/assets/fonts/TimesDigital-Bold.ttf +0 -0
- package/assets/fonts/TimesDigital-BoldItalic.ttf +0 -0
- package/assets/fonts/TimesDigital-BoldSC.ttf +0 -0
- package/assets/fonts/TimesDigital-Italic.ttf +0 -0
- package/assets/fonts/TimesDigital-Regular.ttf +0 -0
- package/assets/fonts/TimesDigital-RegularSC.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-Bold.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-BoldItalic.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-BoldSC.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-Italic.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-Regular.ttf +0 -0
- package/assets/fonts/TimesDigitalW04-RegularSC.ttf +0 -0
- package/assets/fonts/TimesModern-Regular.otf +0 -0
- package/assets/fonts/attribuitions.mdx +35 -0
- package/assets/fonts/bitter-medium.woff +0 -0
- package/assets/fonts/bitter-medium.woff2 +0 -0
- package/assets/fonts/bitter-mediumitalic.woff +0 -0
- package/assets/fonts/bitter-mediumitalic.woff2 +0 -0
- package/assets/fonts/bitter-regular.woff +0 -0
- package/assets/fonts/bitter-regular.woff2 +0 -0
- package/assets/fonts/bitter-semibold.woff +0 -0
- package/assets/fonts/bitter-semibold.woff2 +0 -0
- package/assets/fonts/dmmono-medium.woff +0 -0
- package/assets/fonts/dmmono-medium.woff2 +0 -0
- package/assets/fonts/dmsans-bold-webfont.woff +0 -0
- package/assets/fonts/dmsans-bold-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-bolditalic-webfont.woff +0 -0
- package/assets/fonts/dmsans-bolditalic-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-italic-webfont.woff +0 -0
- package/assets/fonts/dmsans-italic-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-medium-webfont.woff +0 -0
- package/assets/fonts/dmsans-medium-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-mediumitalic-webfont.woff +0 -0
- package/assets/fonts/dmsans-mediumitalic-webfont.woff2 +0 -0
- package/assets/fonts/dmsans-regular-webfont.woff +0 -0
- package/assets/fonts/dmsans-regular-webfont.woff2 +0 -0
- package/assets/fonts/notosans-bold-webfont.woff +0 -0
- package/assets/fonts/notosans-bold-webfont.woff2 +0 -0
- package/assets/fonts/notosans-italic-webfont.woff +0 -0
- package/assets/fonts/notosans-italic-webfont.woff2 +0 -0
- package/assets/fonts/notosans-medium-webfont.woff +0 -0
- package/assets/fonts/notosans-medium-webfont.woff2 +0 -0
- package/assets/fonts/notosans-regular-webfont.woff +0 -0
- package/assets/fonts/notosans-regular-webfont.woff2 +0 -0
- package/assets/fonts/poppins-bold-webfont.woff +0 -0
- package/assets/fonts/poppins-bold-webfont.woff2 +0 -0
- package/assets/fonts/poppins-bolditalic-webfont.woff +0 -0
- package/assets/fonts/poppins-bolditalic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-extrabold-webfont.woff +0 -0
- package/assets/fonts/poppins-extrabold-webfont.woff2 +0 -0
- package/assets/fonts/poppins-extrabolditalic-webfont.woff +0 -0
- package/assets/fonts/poppins-extrabolditalic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-italic-webfont.woff +0 -0
- package/assets/fonts/poppins-italic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-light-webfont.woff +0 -0
- package/assets/fonts/poppins-light-webfont.woff2 +0 -0
- package/assets/fonts/poppins-lightitalic-webfont.woff +0 -0
- package/assets/fonts/poppins-lightitalic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-medium-webfont.woff +0 -0
- package/assets/fonts/poppins-medium-webfont.woff2 +0 -0
- package/assets/fonts/poppins-mediumitalic-webfont.woff +0 -0
- package/assets/fonts/poppins-mediumitalic-webfont.woff2 +0 -0
- package/assets/fonts/poppins-regular-webfont.woff +0 -0
- package/assets/fonts/poppins-regular-webfont.woff2 +0 -0
- package/assets/fonts/poppins-semibold-webfont.woff +0 -0
- package/assets/fonts/poppins-semibold-webfont.woff2 +0 -0
- package/assets/fonts/poppins-semibolditalic-webfont.woff +0 -0
- package/assets/fonts/poppins-semibolditalic-webfont.woff2 +0 -0
- package/assets/fonts/source-serif-pro-600.woff +0 -0
- package/assets/fonts/source-serif-pro-600.woff2 +0 -0
- package/assets/fonts/source-serif-pro-600italic.woff +0 -0
- package/assets/fonts/source-serif-pro-600italic.woff2 +0 -0
- package/assets/fonts/source-serif-pro-700.woff +0 -0
- package/assets/fonts/source-serif-pro-700.woff2 +0 -0
- package/assets/fonts/source-serif-pro-700italic.woff +0 -0
- package/assets/fonts/source-serif-pro-700italic.woff2 +0 -0
- package/assets/fonts/source-serif-pro-italic.woff +0 -0
- package/assets/fonts/source-serif-pro-italic.woff2 +0 -0
- package/assets/fonts/source-serif-pro-regular.woff +0 -0
- package/assets/fonts/source-serif-pro-regular.woff2 +0 -0
- package/components/AccountDropdown/AccountDropdown.tsx +65 -0
- package/components/AccountDropdown/__tests__/AcountDropdown.test.tsx +83 -0
- package/components/AccountDropdown/accounts.ts +47 -0
- package/components/AccountDropdown/index.tsx +2 -0
- package/components/AccountDropdown/utils.ts +21 -0
- package/components/ErrorPage/ErrorPage.tsx +135 -0
- package/components/ad/index.tsx +35 -0
- package/components/article/Highlights.tsx +77 -0
- package/components/article/MetaBox.tsx +50 -0
- package/components/article/RelatedArticles.tsx +53 -0
- package/components/article/RelatedTopics.tsx +59 -0
- package/components/article/ShareBarComponent.tsx +53 -0
- package/components/article/__tests__/__snapshots__/index.test.tsx.snap +1568 -0
- package/components/article/__tests__/index.test.tsx +171 -0
- package/components/article/__tests__/mocks.ts +105 -0
- package/components/article/index.tsx +320 -0
- package/components/common/BackToHomepage.tsx +37 -0
- package/components/common/NavLink.tsx +26 -0
- package/components/common/NewskitLogo.tsx +52 -0
- package/components/common/NewskitLogoShort.tsx +48 -0
- package/components/common/SectionTitleBar.tsx +57 -0
- package/components/common/ShareButton.tsx +18 -0
- package/components/common/ViewMoreButton.tsx +20 -0
- package/components/common/iconNavLink/IconNavLink.tsx +70 -0
- package/components/common/iconNavLink/__tests__/IconNavLink.test.tsx +35 -0
- package/components/common/iconNavLink/index.ts +3 -0
- package/components/common/iconNavLink/types.ts +24 -0
- package/components/common/icons/IconAccount.tsx +13 -0
- package/components/common/icons/IconFilledTwitter.tsx +14 -0
- package/components/common/icons/StyledIconFilledChevronRight.tsx +12 -0
- package/components/footer/__snapshots__/index.test.tsx.snap +192 -0
- package/components/footer/index.test.tsx +13 -0
- package/components/footer/index.tsx +151 -0
- package/components/header/banner-messages.ts +39 -0
- package/components/header/index.tsx +52 -0
- package/components/header/navigation-links.ts +20 -0
- package/components/layout/Gutter.tsx +11 -0
- package/components/layout/LayoutTemplate.tsx +26 -0
- package/components/layout/MainGrid.tsx +66 -0
- package/components/layout/index.tsx +3 -0
- package/components/layout/layoutTypes.ts +13 -0
- package/components/section/ArticleSlice.tsx +35 -0
- package/components/section/CollectionBlock.tsx +54 -0
- package/components/section/SectionContext.tsx +9 -0
- package/components/section/__tests__/ArticleSlice.test.tsx +128 -0
- package/components/section/__tests__/CollectionBlock.test.tsx +83 -0
- package/components/section/__tests__/pageBlock.test.tsx +24 -0
- package/components/section/__tests__/sectionUtils.test.ts +94 -0
- package/components/section/index.tsx +39 -0
- package/components/section/layouts/Block.tsx +79 -0
- package/components/section/layouts/FallBack.tsx +24 -0
- package/components/section/layouts/Lead.tsx +43 -0
- package/components/section/layouts/Rows.tsx +82 -0
- package/components/section/layouts/SectionTitle.tsx +57 -0
- package/components/section/layouts/__tests__/Lead.test.tsx +37 -0
- package/components/section/layouts/__tests__/Rows.test.tsx +40 -0
- package/components/section/layouts/__tests__/SectionTitle.test.tsx +37 -0
- package/components/section/layouts/__tests__/__snapshots__/Lead.test.tsx.snap +180 -0
- package/components/section/layouts/__tests__/__snapshots__/SectionTitle.test.tsx.snap +354 -0
- package/components/section/layouts/gridUtils.ts +21 -0
- package/components/section/layouts/index.tsx +4 -0
- package/components/section/layouts/types.ts +13 -0
- package/components/section/pageBlock.tsx +23 -0
- package/components/section/sectionUtils.ts +61 -0
- package/components/teaser/index.test.tsx +50 -0
- package/components/teaser/index.tsx +64 -0
- package/components/teaser/teaserVariants.ts +33 -0
- package/components/teaser/variant-types.ts +49 -0
- package/components/teaser/variants/featureVariant.ts +42 -0
- package/components/teaser/variants/horizontal.ts +14 -0
- package/components/teaser/variants/titleTeaserVariant.ts +32 -0
- package/components/teaser/variants/titleVertical.ts +24 -0
- package/components/utils/index.test.ts +12 -0
- package/components/utils/index.ts +6 -0
- package/config/__tests__/index.test.ts +54 -0
- package/config/environment.ts +80 -0
- package/config/index.ts +2 -0
- package/config/multiTenancy.ts +11 -0
- package/constants/index.ts +2 -0
- package/context/app-context/AppContext.test.tsx +56 -0
- package/context/app-context/holidayStopListContextOverrides.ts +18 -0
- package/context/app-context/index.tsx +34 -0
- package/context/app-context/paymentMethodContext.tsx +70 -0
- package/context/index.tsx +2 -0
- package/context/multi-tenancy/MultiTenancy.test.tsx +48 -0
- package/context/multi-tenancy/index.tsx +32 -0
- package/css/index.ts +15 -0
- package/cypress/axe/terminal-log.js +19 -0
- package/cypress/config/visual.config.ts +11 -0
- package/cypress/config/visual.skip.config.ts +10 -0
- package/cypress/e2e/account/accessibility.cy.js +88 -0
- package/cypress/e2e/account/banners.cy.js +169 -0
- package/cypress/e2e/account/cancellation.cy.js +219 -0
- package/cypress/e2e/account/holiday-stops.cy.js +109 -0
- package/cypress/e2e/account/main-api.cy.js +102 -0
- package/cypress/e2e/account/newsletters-and-alerts.cy.js +149 -0
- package/cypress/e2e/account/newsletters-page.cy.js +69 -0
- package/cypress/e2e/account/payment-page.cy.js +98 -0
- package/cypress/e2e/account/personal-details.cy.js +1161 -0
- package/cypress/e2e/account/subscription-and-billing.cy.js +434 -0
- package/cypress/e2e/checkout/account-creation.cy.js +8 -0
- package/cypress/e2e/checkout/payment-details.cy.js +19 -0
- package/cypress/e2e/core/home-page.cy.js +6 -0
- package/cypress/e2e/help-hub/accessibility.cy.js +35 -0
- package/cypress/e2e/help-hub/article-page.cy.js +115 -0
- package/cypress/e2e/help-hub/landing-page.cy.js +94 -0
- package/cypress/e2e/help-hub/result-page.cy.js +117 -0
- package/cypress/fixtures/empty.html +10 -0
- package/cypress/fixtures/example.json +5 -0
- package/cypress/fixtures/holiday-stops.json +40 -0
- package/cypress/fixtures/paymentFailure.js +24 -0
- package/cypress/fixtures/testDates.js +26 -0
- package/cypress/support/commands.js +125 -0
- package/cypress/support/consentValues.js +5839 -0
- package/cypress/support/e2e.js +22 -0
- package/cypress/support/users.js +58 -0
- package/cypress/visual/account/print-visual-regression.cy.js +9 -0
- package/cypress/visual/account/visual-regression.cy.js +40 -0
- package/cypress/visual/empty/empty.cy.js +5 -0
- package/cypress.config.ts +38 -0
- package/helpers/__tests__/getUser.test.ts +45 -0
- package/helpers/__tests__/logger.test.ts +62 -0
- package/helpers/__tests__/useThemeDropdownObject.test.ts +49 -0
- package/helpers/a11y.ts +7 -0
- package/helpers/addCacheHeaders.ts +8 -0
- package/helpers/getUser.ts +37 -0
- package/helpers/getYear.ts +1 -0
- package/helpers/global-types.ts +186 -0
- package/helpers/logger/getWinstonLogger.ts +19 -0
- package/helpers/logger/index.ts +20 -0
- package/helpers/logger/replaceConsoleWithLogger.ts +14 -0
- package/helpers/mocks/articleMock.ts +50 -0
- package/helpers/mocks/getPageMock.ts +369 -0
- package/helpers/mocks/getRadioPostMock.ts +71 -0
- package/helpers/mocks/getRadioPostsMock.ts +26 -0
- package/helpers/mocks/getRecommendationsMock.ts +20 -0
- package/helpers/mocks/index.ts +7 -0
- package/helpers/multiTenancy.ts +19 -0
- package/helpers/setupTests.ts +5 -0
- package/helpers/test-utils.tsx +33 -0
- package/helpers/useThemeDropdownObject.tsx +73 -0
- package/infrastructure/.circleci/config.yml +1187 -0
- package/infrastructure/INFRASTRUCTURE.md +142 -0
- package/infrastructure/build_and_deploy.png +0 -0
- package/infrastructure/helm/Chart.yaml +21 -0
- package/infrastructure/helm/templates/_helpers.tpl +87 -0
- package/infrastructure/helm/templates/deployment.yaml +45 -0
- package/infrastructure/helm/templates/horizontalpodautoscaler.yaml +21 -0
- package/infrastructure/helm/templates/ingress.yaml +31 -0
- package/infrastructure/helm/templates/networkpolicy.yaml +26 -0
- package/infrastructure/helm/templates/secret.yaml +12 -0
- package/infrastructure/helm/templates/service.yaml +15 -0
- package/infrastructure/helm/values-dev.yaml +39 -0
- package/infrastructure/helm/values-local.yaml +30 -0
- package/infrastructure/helm/values-pr.yaml +40 -0
- package/infrastructure/helm/values-prod.yaml +39 -0
- package/infrastructure/helm/values-staging.yaml +39 -0
- package/infrastructure/helm/values.yaml +44 -0
- package/infrastructure/pull_request.png +0 -0
- package/infrastructure/release-documentation-cli.config.json +18 -0
- package/infrastructure/remove_pr.png +0 -0
- package/infrastructure/terraform-ecr/dev.tfvars +3 -0
- package/infrastructure/terraform-ecr/ecr.tf +69 -0
- package/infrastructure/terraform-ecr/main.tf +3 -0
- package/infrastructure/terraform-ecr/variables.tf +19 -0
- package/infrastructure/terraform-ecr/versions.tf +12 -0
- package/infrastructure/terraform-newrelic/alerts.tf +290 -0
- package/infrastructure/terraform-newrelic/dashboards.tf +347 -0
- package/infrastructure/terraform-newrelic/dev.tfvars +3 -0
- package/infrastructure/terraform-newrelic/lighthouse-script-dev.js +53 -0
- package/infrastructure/terraform-newrelic/lighthouse-script-prod.js +54 -0
- package/infrastructure/terraform-newrelic/lighthouse-script-stage.js +54 -0
- package/infrastructure/terraform-newrelic/main.tf +11 -0
- package/infrastructure/terraform-newrelic/monitors.tf +11 -0
- package/infrastructure/terraform-newrelic/prod.tfvars +3 -0
- package/infrastructure/terraform-newrelic/staging.tfvars +3 -0
- package/infrastructure/terraform-newrelic/variables.tf +33 -0
- package/infrastructure/terraform-newrelic/versions.tf +18 -0
- package/jest.config.js +40 -0
- package/jest.config.pact.js +18 -0
- package/newrelic.js +86 -0
- package/next-env.d.ts +5 -0
- package/next.config.js +95 -0
- package/package.json +127 -0
- package/pages/_app.tsx +117 -0
- package/pages/_document.tsx +112 -0
- package/pages/_error.tsx +68 -0
- package/pages/account/add/[field].tsx +34 -0
- package/pages/account/cancellation/index.tsx +22 -0
- package/pages/account/delete/confirm/index.tsx +16 -0
- package/pages/account/delete/error/index.tsx +16 -0
- package/pages/account/delete/index.tsx +16 -0
- package/pages/account/delete/success/index.tsx +16 -0
- package/pages/account/dream-team/index.tsx +19 -0
- package/pages/account/edit/[field].tsx +45 -0
- package/pages/account/family/index.tsx +19 -0
- package/pages/account/holiday-stop/index.tsx +19 -0
- package/pages/account/holiday-stop/previous-holiday-stops.tsx +19 -0
- package/pages/account/holiday-stop/upcoming-holiday-stops.tsx +19 -0
- package/pages/account/index.tsx +33 -0
- package/pages/account/newsletters/index.tsx +19 -0
- package/pages/account/newsletters-and-alerts/index.tsx +24 -0
- package/pages/account/payment/[paymentMethod].tsx +37 -0
- package/pages/account/payment/index.tsx +23 -0
- package/pages/account/payment-methods/index.tsx +21 -0
- package/pages/account/subscription-and-billing/index.tsx +29 -0
- package/pages/api/account/get-session/index.ts +33 -0
- package/pages/api/account/invoice/index.ts +35 -0
- package/pages/api/account/mutate/index.ts +8 -0
- package/pages/api/account/query/index.ts +7 -0
- package/pages/api/auth/[...nextauth].ts +11 -0
- package/pages/api/competitions-sitemap.ts +19 -0
- package/pages/api/feed.ts +23 -0
- package/pages/api/health-check.ts +7 -0
- package/pages/api/news-sitemap.ts +18 -0
- package/pages/api/pages-sitemap.ts +27 -0
- package/pages/api/robots.ts +19 -0
- package/pages/api/sitemap.ts +24 -0
- package/pages/checkout/account-creation/index.tsx +13 -0
- package/pages/checkout/payment-details/index.tsx +10 -0
- package/pages/empty.tsx +6 -0
- package/pages/help-hub/article/[title]/index.tsx +25 -0
- package/pages/help-hub/error.tsx +23 -0
- package/pages/help-hub/index.tsx +51 -0
- package/pages/help-hub/results.tsx +25 -0
- package/pages/index.tsx +19 -0
- package/pages/player/brightcove.tsx +19 -0
- package/pages/rss/create/index.tsx +18 -0
- package/pages/rss/feed/[feedId]/index.tsx +21 -0
- package/pages/rss/index.tsx +18 -0
- package/public/ads.min.js +8175 -0
- package/public/assets/display-base-header.svg +25 -0
- package/public/assets/display-personalDetails-header-sun.svg +55 -0
- package/public/assets/display-personalDetails-header-times.svg +90 -0
- package/public/assets/display-personalDetails-header-vr.svg +46 -0
- package/public/assets/dream-team.svg +10 -0
- package/public/assets/navigationPrimary-brandMark-sun.svg +9 -0
- package/public/assets/navigationPrimary-brandMark-times.svg +18 -0
- package/public/assets/navigationPrimary-brandMark-vr.svg +10 -0
- package/public/assets/newsletters/bestoftimes-101.png +0 -0
- package/public/assets/newsletters/books-115.png +0 -0
- package/public/assets/newsletters/environment-140.png +0 -0
- package/public/assets/newsletters/fashion-108.png +0 -0
- package/public/assets/newsletters/food-106.png +0 -0
- package/public/assets/newsletters/football-111.png +0 -0
- package/public/assets/newsletters/ireland-152.png +0 -0
- package/public/assets/newsletters/law-121.png +0 -0
- package/public/assets/newsletters/money-107.png +0 -0
- package/public/assets/newsletters/moneymentor-150.png +0 -0
- package/public/assets/newsletters/placeholder.png +0 -0
- package/public/assets/newsletters/politics-119.png +0 -0
- package/public/assets/newsletters/property-113.png +0 -0
- package/public/assets/newsletters/puzzles-125.png +0 -0
- package/public/assets/newsletters/scotland-134.png +0 -0
- package/public/assets/newsletters/theatre-127.png +0 -0
- package/public/assets/newsletters/travel-149.png +0 -0
- package/public/assets/newsletters/tv-133.png +0 -0
- package/public/assets/newsletters/us-153.png +0 -0
- package/public/assets/no-subscription.svg +15 -0
- package/public/assets/pending-activation.svg +16 -0
- package/public/assets/personal-details-header.svg +91 -0
- package/public/assets/plchldr150x100.png +0 -0
- package/public/assets/previous-subscription.svg +15 -0
- package/public/assets/primary-navigation-logo-white.svg +6 -0
- package/public/assets/primary-navigation-logo.svg +6 -0
- package/public/assets/tls-logo-white.svg +3 -0
- package/public/favicon.ico +0 -0
- package/public/icon.png +0 -0
- package/public/prebid.min.js +1 -0
- package/queries/getPage.ts +100 -0
- package/queries/getRadioPost.ts +61 -0
- package/queries/getRadioPosts.ts +16 -0
- package/queries/getUserSubscription.ts +9 -0
- package/queries/index.ts +3 -0
- package/scripts/k8s-local.sh +137 -0
- package/scripts/nr-exports.sh +7 -0
- package/temp/_app.tsx +15 -0
- package/temp/_document.tsx +61 -0
- package/temp/app-context-test.tsx +51 -0
- package/temp/app-context.tsx +25 -0
- package/temp/config-index.ts +1 -0
- package/temp/context-index.tsx +1 -0
- package/temp/header.tsx +45 -0
- package/temp/next.config.js +56 -0
- package/tsconfig.json +51 -0
- package/tsconfig.test.json +6 -0
- package/validation/index.tsx +24 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
resource "aws_ecr_repository" "ecr_repo" {
|
|
2
|
+
name = var.project_name
|
|
3
|
+
tags = var.default_tags
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
resource "aws_ecr_repository_policy" "ecr_repo_policy" {
|
|
7
|
+
repository = aws_ecr_repository.ecr_repo.name
|
|
8
|
+
policy = data.aws_iam_policy_document.ecr_cross_account.json
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
resource "aws_ecr_lifecycle_policy" "ecr_repo_lifecycle_policy" {
|
|
12
|
+
repository = aws_ecr_repository.ecr_repo.name
|
|
13
|
+
policy = <<EOF
|
|
14
|
+
{
|
|
15
|
+
"rules": [
|
|
16
|
+
{
|
|
17
|
+
"rulePriority": 1,
|
|
18
|
+
"description": "Expire untagged images older than 7 days",
|
|
19
|
+
"selection": {
|
|
20
|
+
"tagStatus": "untagged",
|
|
21
|
+
"countType": "sinceImagePushed",
|
|
22
|
+
"countUnit": "days",
|
|
23
|
+
"countNumber": 1
|
|
24
|
+
},
|
|
25
|
+
"action": {
|
|
26
|
+
"type": "expire"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"rulePriority": 2,
|
|
31
|
+
"description": "Keep last 10 PR images",
|
|
32
|
+
"selection": {
|
|
33
|
+
"tagStatus": "tagged",
|
|
34
|
+
"tagPrefixList": ["PR-"],
|
|
35
|
+
"countType": "imageCountMoreThan",
|
|
36
|
+
"countNumber": 100
|
|
37
|
+
},
|
|
38
|
+
"action": {
|
|
39
|
+
"type": "expire"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
EOF
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
data "aws_iam_policy_document" "ecr_cross_account" {
|
|
48
|
+
statement {
|
|
49
|
+
sid = "Cross-AWS-Account-ECR-Read"
|
|
50
|
+
effect = "Allow"
|
|
51
|
+
|
|
52
|
+
principals {
|
|
53
|
+
type = "AWS"
|
|
54
|
+
identifiers = formatlist("arn:aws:iam::%s:root", var.ecr_read_only_principals)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
actions = [
|
|
58
|
+
"ecr:BatchCheckLayerAvailability",
|
|
59
|
+
"ecr:BatchGetImage",
|
|
60
|
+
"ecr:DescribeImages",
|
|
61
|
+
"ecr:DescribeRepositories",
|
|
62
|
+
"ecr:GetDownloadUrlForLayer",
|
|
63
|
+
"ecr:GetLifecyclePolicy",
|
|
64
|
+
"ecr:GetLifecyclePolicyPreview",
|
|
65
|
+
"ecr:GetRepositoryPolicy",
|
|
66
|
+
"ecr:ListImages",
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
variable "ecr_read_only_principals" {
|
|
2
|
+
type = list(string)
|
|
3
|
+
description = "Read only access for following AWS principals"
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
variable "project_name" {
|
|
7
|
+
description = "Project name"
|
|
8
|
+
default = "<% PROJECT_NAME >"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
variable "default_tags" {
|
|
12
|
+
type = map(string)
|
|
13
|
+
|
|
14
|
+
default = {
|
|
15
|
+
ServiceCatalogueId = "<% SERVICE_CATALOGUE_ID >"
|
|
16
|
+
ServiceName = "<% SERVICE_NAME >"
|
|
17
|
+
Environment = "<% ENVIRONMENT >"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
resource "newrelic_alert_policy" "render_app_policy" {
|
|
2
|
+
name = "${var.prefix} - Alert Policy"
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
# Provision a Slack notification channel.
|
|
6
|
+
resource "newrelic_alert_channel" "slack_channel" {
|
|
7
|
+
name = "<% PROJECT_NAME >-alerts"
|
|
8
|
+
type = "slack"
|
|
9
|
+
|
|
10
|
+
config {
|
|
11
|
+
url = var.newrelic_slack_webhook
|
|
12
|
+
channel = "<% PROJECT_NAME >-alerts"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
# Stop the resouce from being marked as changed on every run
|
|
16
|
+
# https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/guides/getting_started#a-note-about-secrets
|
|
17
|
+
lifecycle {
|
|
18
|
+
ignore_changes = [config]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
resource "newrelic_alert_policy_channel" "render_app_newrelic_alert_policy_channel" {
|
|
23
|
+
policy_id = newrelic_alert_policy.render_app_policy.id
|
|
24
|
+
channel_ids = [newrelic_alert_channel.slack_channel.id]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
# Response time
|
|
28
|
+
resource "newrelic_alert_condition" "response_time_web" {
|
|
29
|
+
policy_id = newrelic_alert_policy.render_app_policy.id
|
|
30
|
+
name = "${var.prefix} - High Response Time (Web)"
|
|
31
|
+
type = "apm_app_metric"
|
|
32
|
+
entities = [data.newrelic_entity.render_app.application_id]
|
|
33
|
+
metric = "response_time_web"
|
|
34
|
+
condition_scope = "application"
|
|
35
|
+
term {
|
|
36
|
+
duration = 5
|
|
37
|
+
operator = "above"
|
|
38
|
+
priority = "critical"
|
|
39
|
+
threshold = "5"
|
|
40
|
+
time_function = "all"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
# Low throughput
|
|
45
|
+
resource "newrelic_alert_condition" "throughput_web" {
|
|
46
|
+
policy_id = newrelic_alert_policy.render_app_policy.id
|
|
47
|
+
name = "${var.prefix} - Low Throughput (Web)"
|
|
48
|
+
type = "apm_app_metric"
|
|
49
|
+
entities = [data.newrelic_entity.render_app.application_id]
|
|
50
|
+
metric = "throughput_web"
|
|
51
|
+
condition_scope = "application"
|
|
52
|
+
# Define a critical alert threshold that will
|
|
53
|
+
# trigger after 5 minutes below 5 requests per minute.
|
|
54
|
+
term {
|
|
55
|
+
priority = "critical"
|
|
56
|
+
duration = 5
|
|
57
|
+
operator = "below"
|
|
58
|
+
threshold = "5"
|
|
59
|
+
time_function = "all"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
# Error percentage
|
|
64
|
+
resource "newrelic_alert_condition" "error_percentage" {
|
|
65
|
+
policy_id = newrelic_alert_policy.render_app_policy.id
|
|
66
|
+
name = "${var.prefix} - High Error Percentage"
|
|
67
|
+
type = "apm_app_metric"
|
|
68
|
+
entities = [data.newrelic_entity.render_app.application_id]
|
|
69
|
+
metric = "error_percentage"
|
|
70
|
+
condition_scope = "application"
|
|
71
|
+
# Define a critical alert threshold that will trigger after 5 minutes above a 5% error rate.
|
|
72
|
+
term {
|
|
73
|
+
duration = 5
|
|
74
|
+
operator = "above"
|
|
75
|
+
threshold = "5"
|
|
76
|
+
time_function = "all"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
# High CPU usage
|
|
81
|
+
resource "newrelic_infra_alert_condition" "high_cpu" {
|
|
82
|
+
policy_id = newrelic_alert_policy.render_app_policy.id
|
|
83
|
+
name = "${var.prefix} - High CPU usage"
|
|
84
|
+
type = "infra_metric"
|
|
85
|
+
event = "SystemSample"
|
|
86
|
+
select = "cpuPercent"
|
|
87
|
+
comparison = "above"
|
|
88
|
+
where = "(`applicationId` = '${data.newrelic_entity.render_app.application_id}')"
|
|
89
|
+
# Define a critical alert threshold that will trigger after 5 minutes above 90% CPU utilization.
|
|
90
|
+
critical {
|
|
91
|
+
duration = 5
|
|
92
|
+
value = 90
|
|
93
|
+
time_function = "all"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/*
|
|
98
|
+
Newrelic Infrastructure alerts
|
|
99
|
+
*/
|
|
100
|
+
# Pods running less than desired for 3 minutes -> warning
|
|
101
|
+
# Pods running less than desired for 10 minutes -> critical
|
|
102
|
+
resource "newrelic_infra_alert_condition" "pods_availability" {
|
|
103
|
+
|
|
104
|
+
policy_id = newrelic_alert_policy.render_app_policy.id
|
|
105
|
+
name = "${var.prefix} - Pod availability"
|
|
106
|
+
type = "infra_metric"
|
|
107
|
+
event = "K8sReplicasetSample"
|
|
108
|
+
select = "podsDesired - podsReady"
|
|
109
|
+
where = "namespace = '${var.namespace}'"
|
|
110
|
+
comparison = "above"
|
|
111
|
+
description = "Pods running less than desired for 3 minutes -> warning, Pods running less than desired for 5 minutes -> critical"
|
|
112
|
+
|
|
113
|
+
warning {
|
|
114
|
+
duration = 5
|
|
115
|
+
value = 0
|
|
116
|
+
time_function = "all"
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
critical {
|
|
120
|
+
duration = 10
|
|
121
|
+
value = 0
|
|
122
|
+
time_function = "all"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
# Any pods unable to get scheduled
|
|
127
|
+
resource "newrelic_infra_alert_condition" "pods_scheduled" {
|
|
128
|
+
|
|
129
|
+
policy_id = newrelic_alert_policy.render_app_policy.id
|
|
130
|
+
name = "${var.prefix} - Pods unable to schedule"
|
|
131
|
+
type = "infra_metric"
|
|
132
|
+
event = "K8sPodSample"
|
|
133
|
+
select = "isScheduled"
|
|
134
|
+
where = "namespace = '${var.namespace}'"
|
|
135
|
+
comparison = "equal"
|
|
136
|
+
description = "Any pods unable to get scheduled"
|
|
137
|
+
|
|
138
|
+
warning {
|
|
139
|
+
duration = 3
|
|
140
|
+
value = 0
|
|
141
|
+
time_function = "all"
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
critical {
|
|
145
|
+
duration = 5
|
|
146
|
+
value = 0
|
|
147
|
+
time_function = "all"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
# Any pods with High CPU Usage
|
|
152
|
+
resource "newrelic_infra_alert_condition" "pods_cpu_usage" {
|
|
153
|
+
|
|
154
|
+
policy_id = newrelic_alert_policy.render_app_policy.id
|
|
155
|
+
name = "${var.prefix} - Pod High CPU"
|
|
156
|
+
type = "infra_metric"
|
|
157
|
+
event = "K8sContainerSample"
|
|
158
|
+
select = "cpuCoresUtilization"
|
|
159
|
+
where = "namespace = '${var.namespace}'"
|
|
160
|
+
comparison = "above"
|
|
161
|
+
description = "Any pods with High CPU Usage"
|
|
162
|
+
|
|
163
|
+
warning {
|
|
164
|
+
duration = 2
|
|
165
|
+
value = 60
|
|
166
|
+
time_function = "all"
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
critical {
|
|
170
|
+
duration = 4
|
|
171
|
+
value = 75
|
|
172
|
+
time_function = "all"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
# Any pods with High Memory Usage
|
|
177
|
+
resource "newrelic_infra_alert_condition" "pods_memory_usage" {
|
|
178
|
+
|
|
179
|
+
policy_id = newrelic_alert_policy.render_app_policy.id
|
|
180
|
+
name = "${var.prefix} - Pod High Memory"
|
|
181
|
+
type = "infra_metric"
|
|
182
|
+
event = "K8sContainerSample"
|
|
183
|
+
select = "memoryUtilization"
|
|
184
|
+
where = "namespace = '${var.namespace}'"
|
|
185
|
+
comparison = "above"
|
|
186
|
+
description = "Any pods with High Memory Usage"
|
|
187
|
+
|
|
188
|
+
warning {
|
|
189
|
+
duration = 2
|
|
190
|
+
value = 80
|
|
191
|
+
time_function = "all"
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
critical {
|
|
195
|
+
duration = 3
|
|
196
|
+
value = 95
|
|
197
|
+
time_function = "all"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
# Any pods with status Failed/Unknown
|
|
202
|
+
resource "newrelic_nrql_alert_condition" "pod_failed_unknown" {
|
|
203
|
+
account_id = var.newrelic_account_id
|
|
204
|
+
policy_id = newrelic_alert_policy.render_app_policy.id
|
|
205
|
+
name = "${var.prefix} - Pod Status Failed/Unknown"
|
|
206
|
+
enabled = "true"
|
|
207
|
+
violation_time_limit_seconds = 86400
|
|
208
|
+
description = "Any pods with status Failed/Unknown"
|
|
209
|
+
aggregation_window = 60
|
|
210
|
+
aggregation_method = "event_flow"
|
|
211
|
+
aggregation_delay = 120
|
|
212
|
+
|
|
213
|
+
nrql {
|
|
214
|
+
query = "SELECT uniqueCount(podName) FROM K8sPodSample WHERE namespace = '${var.namespace}' AND (status = 'Failed' OR status = 'Unknown')"
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
warning {
|
|
218
|
+
operator = "above"
|
|
219
|
+
threshold = 0.001
|
|
220
|
+
threshold_duration = 300
|
|
221
|
+
threshold_occurrences = "ALL"
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
critical {
|
|
225
|
+
operator = "above"
|
|
226
|
+
threshold = 0.001
|
|
227
|
+
threshold_duration = 300
|
|
228
|
+
threshold_occurrences = "ALL"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
resource "newrelic_nrql_alert_condition" "pod_pending" {
|
|
233
|
+
account_id = var.newrelic_account_id
|
|
234
|
+
policy_id = newrelic_alert_policy.render_app_policy.id
|
|
235
|
+
name = "${var.prefix} - Pod Status Pending"
|
|
236
|
+
enabled = "true"
|
|
237
|
+
violation_time_limit_seconds = 86400
|
|
238
|
+
description = "Warn if any containers are pending after 3 minutes, critical if any containers are pending after 5 minutes"
|
|
239
|
+
expiration_duration = 120
|
|
240
|
+
close_violations_on_expiration = true
|
|
241
|
+
aggregation_window = 60
|
|
242
|
+
aggregation_method = "event_flow"
|
|
243
|
+
aggregation_delay = 120
|
|
244
|
+
|
|
245
|
+
nrql {
|
|
246
|
+
query = "SELECT uniqueCount(podName) FROM K8sPodSample WHERE namespace = '${var.namespace}' AND status = 'Pending'"
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
# warn if any containers are pending after 3 minutes
|
|
250
|
+
warning {
|
|
251
|
+
operator = "above"
|
|
252
|
+
threshold = 0.001
|
|
253
|
+
threshold_duration = 180
|
|
254
|
+
threshold_occurrences = "ALL"
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
# critical if any containers are pending after 5 minutes
|
|
258
|
+
critical {
|
|
259
|
+
operator = "above"
|
|
260
|
+
threshold = 0.001
|
|
261
|
+
threshold_duration = 300
|
|
262
|
+
threshold_occurrences = "ALL"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
# Any services with restarts > 5 over all pods for 1 minute -> warning
|
|
267
|
+
resource "newrelic_nrql_alert_condition" "restart_count" {
|
|
268
|
+
account_id = var.newrelic_account_id
|
|
269
|
+
policy_id = newrelic_alert_policy.render_app_policy.id
|
|
270
|
+
name = "${var.prefix} - Container Restarts"
|
|
271
|
+
enabled = "true"
|
|
272
|
+
violation_time_limit_seconds = 86400
|
|
273
|
+
description = "Any services with restarts > 5 over all pods for 1 minute -> warning"
|
|
274
|
+
aggregation_window = 60
|
|
275
|
+
aggregation_method = "event_flow"
|
|
276
|
+
aggregation_delay = 120
|
|
277
|
+
|
|
278
|
+
nrql {
|
|
279
|
+
query = "SELECT uniqueCount(containerID) from K8sContainerSample WHERE namespace = '${var.namespace}' AND restartCount > 5"
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
# critical if any containers exceed 5 restarts
|
|
283
|
+
critical {
|
|
284
|
+
operator = "above"
|
|
285
|
+
threshold = 0.001
|
|
286
|
+
threshold_duration = 60
|
|
287
|
+
threshold_occurrences = "ALL"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|