Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 19 additions & 25 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
directories:
- "/"
- "/apps/*"
- "/packages/*"
- "/qa/tests/playwright"
target-branch: "main"
schedule:
interval: "weekly"
interval: "monthly"
allow:
- dependency-type: "direct"
# Skip regular update PRs, do only security updates
# https://docs.github.com/en/code-security/reference/supply-chain-security/dependabot-options-reference#open-pull-requests-limit-
open-pull-requests-limit: 0

- package-ecosystem: "npm"
directory: "/apps/ui"
schedule:
interval: "weekly"
allow:
- dependency-type: "direct"
open-pull-requests-limit: 0

- package-ecosystem: "npm"
directory: "/apps/strapi"
schedule:
interval: "weekly"
allow:
- dependency-type: "direct"
open-pull-requests-limit: 0
- dependency-name: "@strapi/*"
update-types:
- "version-update:semver-minor"
- "version-update:semver-patch"
groups:
strapi:
patterns:
- "@strapi/*"
group-by: "dependency-name"
update-types:
- "minor"
- "patch"
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- dev
- staging

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
2 changes: 1 addition & 1 deletion apps/strapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@strapi/plugin-color-picker": "5.52.2",
"@strapi/plugin-sentry": "5.52.2",
"@strapi/plugin-users-permissions": "5.52.2",
"@strapi/strapi": "5.52.2",
"@strapi/strapi": "catalog:",
"@strapi/utils": "5.52.2",
"jsonwebtoken": "9.0.3",
"lodash": "catalog:",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
"placeholderHeight": {
"type": "integer",
"default": 300
},
"thankYouImage": {
"type": "component",
"component": "utilities.basic-image",
"repeatable": false
},
"thankYouMessage": {
"type": "richtext"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import basicImagePopulate from "../utilities/basic-image"

export default {
populate: {
form: true,
form: {
populate: {
thankYouImage: basicImagePopulate,
},
},
},
}
2 changes: 2 additions & 0 deletions apps/strapi/types/generated/contentTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,8 @@ export interface ApiHubspotFormHubspotForm extends Struct.CollectionTypeSchema {
Schema.Attribute.DefaultTo<300>
portalId: Schema.Attribute.String & Schema.Attribute.Required
publishedAt: Schema.Attribute.DateTime
thankYouImage: Schema.Attribute.Component<"utilities.basic-image", false>
thankYouMessage: Schema.Attribute.RichText
updatedAt: Schema.Attribute.DateTime
updatedBy: Schema.Attribute.Relation<"oneToOne", "admin::user"> &
Schema.Attribute.Private
Expand Down
8 changes: 6 additions & 2 deletions apps/ui/src/app/[locale]/[[...rest]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import type { Locale } from "next-intl"
import { use } from "react"

import { StrapiPageView } from "@/components/layouts/StrapiPageView"
import { createFallbackPath, debugStaticParams } from "@/lib/build"
import {
createFallbackPath,
debugStaticParams,
withExportFallback,
} from "@/lib/build"
import { isDevelopment } from "@/lib/general-helpers"
import { getMetadataFromStrapi } from "@/lib/metadata"
import { fetchAllPages } from "@/lib/strapi-api/content/server"
Expand Down Expand Up @@ -49,7 +53,7 @@ export async function generateStaticParams({
rest: ["fallback"],
})

return params.length > 0 ? params : [fallbackPath]
return withExportFallback(params, fallbackPath)
}

export async function generateMetadata(
Expand Down
8 changes: 6 additions & 2 deletions apps/ui/src/app/[locale]/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import type { Locale } from "next-intl"
import { use } from "react"

import { StrapiBlogPostView } from "@/components/layouts/StrapiBlogPostView"
import { createFallbackPath, debugStaticParams } from "@/lib/build"
import {
createFallbackPath,
debugStaticParams,
withExportFallback,
} from "@/lib/build"
import { isDevelopment } from "@/lib/general-helpers"
import { getBlogPostMetadata } from "@/lib/metadata"
import { fetchAllBlogPosts } from "@/lib/strapi-api/content/server"
Expand Down Expand Up @@ -36,7 +40,7 @@ export async function generateStaticParams({
slug: "fallback",
})

return params.length > 0 ? params : [fallbackPath]
return withExportFallback(params, fallbackPath)
}

export async function generateMetadata(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import type { Locale } from "next-intl"
import { use } from "react"

import { CmsComparisonView } from "@/components/cms-comparison/CmsComparisonView"
import { createFallbackPath, debugStaticParams } from "@/lib/build"
import {
createFallbackPath,
debugStaticParams,
withExportFallback,
} from "@/lib/build"
import { isDevelopment } from "@/lib/general-helpers"
import { getCmsComparisonMetadata } from "@/lib/metadata"
import { fetchAllCmsComparisons } from "@/lib/strapi-api/content/server"
Expand Down Expand Up @@ -38,7 +42,7 @@ export async function generateStaticParams({
slug: "fallback",
})

return params.length > 0 ? params : [fallbackPath]
return withExportFallback(params, fallbackPath)
}

export async function generateMetadata(
Expand Down
8 changes: 6 additions & 2 deletions apps/ui/src/app/[locale]/user-stories/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import type { Locale } from "next-intl"

import { CaseStudyView } from "@/components/case-study/CaseStudyView"
import { createFallbackPath, debugStaticParams } from "@/lib/build"
import {
createFallbackPath,
debugStaticParams,
withExportFallback,
} from "@/lib/build"
import { isDevelopment } from "@/lib/general-helpers"
import { getCaseStudyMetadata } from "@/lib/metadata"
import { fetchAllCaseStudies } from "@/lib/strapi-api/content/server"
Expand Down Expand Up @@ -37,7 +41,7 @@ export async function generateStaticParams({
slug: "fallback",
})

return params.length > 0 ? params : [fallbackPath]
return withExportFallback(params, fallbackPath)
}

interface RouteProps {
Expand Down
9 changes: 4 additions & 5 deletions apps/ui/src/app/api/exit-preview/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ export async function GET(request: Request) {
dm.disable()

/**
* `dm.disable()` emits the deletion cookie with `sameSite=Lax`, which
* browsers reject in the cross-origin Strapi admin iframe — the same
* shortcoming `/api/preview` works around. Re-set the deletion with
* `sameSite=None` so exiting works from the iframe too (later `.set()`
* calls for the same cookie name override earlier pending ones).
* Re-set the deletion with the same attributes `/api/preview` uses.
* A partitioned cookie is only cleared by a deletion that is also
* `SameSite=None`, `Secure`, and `Partitioned`.
*/
const cookieStore = await cookies()
cookieStore.set({
Expand All @@ -30,6 +28,7 @@ export async function GET(request: Request) {
path: "/",
secure: true,
sameSite: "none",
partitioned: true,
})

return NextResponse.redirect(resolveRedirectTarget(request))
Expand Down
3 changes: 3 additions & 0 deletions apps/ui/src/app/api/preview/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ export async function GET(request: Request) {
path: "/",
secure: true,
sameSite: "none", // Allow cookie in cross-origin iframes
// Without this, browsers reject the cookie inside the Strapi
// admin iframe because that iframe is a different site from the frontend.
partitioned: true,
})
// --------------------------------------------------------------------
// Check if the locale in the request is a correct frontend locale
Expand Down
Loading
Loading