ipal-upgrade: the 1.13.0 section walks through the 7 "What projects must update" items with checks. PROGRAMISTA §6: item 47 for 1.13.0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
72c059515d
commit
e53d09b720
@@ -55,16 +55,32 @@ a custom table of contents (→ `extractHeadings` + `TableOfContents` + `heading
|
||||
the banner → `<CookieBanner settings="detailed">` and remove the copy. With `detailed`: Cookie Settings → Cookies filled in
|
||||
(scan, **ipal-consent-check**) and Detail labels in every language.
|
||||
|
||||
**→ the release after 1.12.3 (security/performance + SEO):** Postgres: `migrate:create` → `migrate` (Site Settings →
|
||||
Search & AI: `search_verification_*`, `ai_crawlers_policy`, the `ai_crawlers_rules` table, localized `llms_intro`).
|
||||
Remove the workarounds: a plugin after `ipalKit` that adds `afterChange` to the plugin globals → `ipalKit({ revalidatePath })`;
|
||||
a hand-written global revalidation hook → `buildGlobalRevalidateHook({ revalidatePath })`; a plugin that rewrites the access
|
||||
of a plugin global → `globalOverrides`; `consentFieldName` passed only because the option was ignored → `forms.consentFieldName`
|
||||
works now. `app/robots.ts` → `export { getRobots as default }` + `force-dynamic`; `createSearchRoute({ …, isPathVisible })`.
|
||||
Behaviour to check: `getSettings` reads at `depth: 1` (code that reads a relation of a relation → `settingsDepth: 2`);
|
||||
`sitemap()` throws at runtime instead of returning `[]` (`sitemapRoute` answers 503); the injected `users` collection is
|
||||
locked down (`access.authAccess` to loosen); a `twoFactor.collectionSlug` other than `admin.user` stops startup
|
||||
(`allowCollectionMismatch`); requests without a client IP are limited (`setUnknownIpFactor`); `enabled: false` keeps the schema.
|
||||
**→ 1.13.0 (PROGRAMISTA §6, item 47; CHANGELOG "What projects must update" — do all 7, in order):**
|
||||
1. **Project without `access`** (no `roles` field): every logged-in account can now use the plugin's admin and editor
|
||||
features (Site Integrations, settings globals, test e-mail, stats, consent records, forms, form submissions); before,
|
||||
nobody could through the API. Check who can log in (`grep -rn "auth:" src/collections`, open sign-up, customer
|
||||
accounts). Untrusted accounts → add `access` (roles), or narrow with `globalOverrides`, `forms.formOverrides` /
|
||||
`forms.formSubmissionOverrides`, `consentLog.collectionOverrides`, `stats.collectionOverrides`. Verify: log in as a
|
||||
non-staff account → `GET /api/globals/site-integrations` is 403.
|
||||
2. **Project with `access`:** plain `user` accounts can no longer edit Site Settings, Cookie Settings, Notifications or
|
||||
forms, or create/delete users. List staff accounts in the panel (Users → Roles) and give them `editor` / `admin`, or
|
||||
loosen with `globalOverrides`, `forms.formOverrides.access`, `access.authAccess`. Verify: an editor saves Site Settings.
|
||||
3. **Postgres/SQLite:** `pnpm payload migrate:create` → `migrate` (Site Settings → Search & AI:
|
||||
`search_verification_*`, `ai_crawlers_policy`, the `ai_crawlers_rules` table, localized `llms_intro`). With
|
||||
`enabled: false` the migration now keeps (or restores) the plugin's tables — check it has no DROP TABLE. MongoDB: nothing.
|
||||
4. `pnpm payload generate:importmap`, `pnpm ipal:skills`, `rm -rf .next`.
|
||||
5. **Behaviour to check** (grep the project, fix what applies): `getSettings` / `getSiteShell` read at `depth: 1` (code
|
||||
that reads a relation of a relation → `createContentHelpers({ settingsDepth: 2 })`); `sitemap()` throws at runtime
|
||||
instead of returning `[]` (`sitemapRoute` answers 503); a `twoFactor.collectionSlug` other than `admin.user` stops
|
||||
startup (`allowCollectionMismatch: true`); requests without a client IP share one limited bucket (proxy hides the IP
|
||||
→ `IPAL_IP_HEADER`, or `setUnknownIpFactor`); `RenderRichText` turns unsafe link URLs into `#` (`safeLinks`).
|
||||
6. **Review the new options with the user** (AGENT.md §7.1): `consentMode: 'basic'`, `revalidatePath`,
|
||||
`turnstileHostnames`, Site Settings → Search & AI (verification codes, or keep DNS verification), `app/robots.ts` →
|
||||
`export { getRobots as default }` + `force-dynamic`, `createSearchRoute({ …, isPathVisible })`, `access.firstUserAdmin`.
|
||||
7. **Remove the workarounds:** a plugin after `ipalKit` that adds `afterChange` or access to the plugin globals →
|
||||
`ipalKit({ revalidatePath })` / `globalOverrides`; a hand-written global revalidation hook →
|
||||
`buildGlobalRevalidateHook({ revalidatePath })`; `consentFieldName` passed only because the option was ignored →
|
||||
`forms.consentFieldName` works now; your own seed guard / upsert code → `@intecion/ipal-kit/seed` (`createSeeder`).
|
||||
|
||||
## 2. Inventory (no code changes)
|
||||
For **every** item in the PROGRAMISTA §6 table show evidence (grep / file) of whether
|
||||
|
||||
@@ -644,6 +644,7 @@ Do one item at a time, build, check. Order by importance:
|
||||
| 44 | **1.11.1** — `CmsLink['appearance']` replaced with an own type because the type depended on field order | types per shape: `CmsLink`, `CmsLinkPlain`, `CmsLinkNoLabel`; `pnpm generate:types` and fix the imports | links.md |
|
||||
| 45 | **1.11.1** — format description in a form field label / time as text | the **Placeholder** field in the admin panel, the **Time** type; Postgres: `migrate:create` | forms.md |
|
||||
| 46 | **1.12.3** — own cookie settings window / cookie list in the banner written in the project | `<CookieBanner settings="detailed">` (list from Cookie Settings → Cookies, captions: Detail labels); delete your own version; Postgres: `migrate:create` | consent.md |
|
||||
| 47 | **1.13.0** — staff access, Search & AI, seed scripts, workarounds around plugin globals | without `access`: every logged-in account gets the staff features → `access` or `globalOverrides` / `formOverrides` / `formSubmissionOverrides` / `collectionOverrides`; with `access`: staff need `editor`/`admin`; Postgres: `migrate:create`; check `settingsDepth`, `sitemap()` throwing, 2FA slug, client IP; own seed code → `@intecion/ipal-kit/seed`; global hooks/access plugins → `revalidatePath` / `globalOverrides` | CHANGELOG 1.13.0, AGENT.md §7.1, seo.md, seeding.md |
|
||||
|
||||
After updating the package: `pnpm ipal:skills` (new skill versions), `pnpm payload generate:importmap`, `rm -rf .next`, restart dev, grep for the new symbol in
|
||||
`node_modules/@intecion/ipal-kit/dist`.
|
||||
|
||||
Reference in New Issue
Block a user