Opt-outs for the secure defaults; isPathVisibleIn in construction/logic
- setUnknownIpFactor (0 = old free pass), UNKNOWN_IP_FACTOR exported
- createContentHelpers({ settingsDepth }) and markdown/mcp isPathVisible overrides
- <RenderRichText safeLinks={false}>
- resolveRedirect({ draft: true }) for preview
- isPathVisibleIn(mode, path), pathOf, PathVisibility exported; page route uses it
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4585e0fc69
commit
0fd57c1d6a
@@ -18,6 +18,11 @@ describe('old-slug redirects and drafts', () => {
|
||||
expect(await resolveRedirect({ config, locale: 'pl', payload, segments: ['oferta'] })).toBeNull()
|
||||
})
|
||||
|
||||
test('draft: true (preview) redirects drafts too', async () => {
|
||||
const payload = payloadWith({ slug: 'tajny-projekt', _status: 'draft' })
|
||||
expect(await resolveRedirect({ config, draft: true, locale: 'pl', payload, segments: ['oferta'] })).toBe('/tajny-projekt')
|
||||
})
|
||||
|
||||
test('collections without drafts still redirect', async () => {
|
||||
const payload = payloadWith({ slug: 'kontakt-2' })
|
||||
expect(await resolveRedirect({ config, locale: 'pl', payload, segments: ['kontakt'] })).toBe('/kontakt-2')
|
||||
|
||||
Reference in New Issue
Block a user