IAPL rename: the old names keep working, and a second cookie name and counter key for new sites

- exports: ipalKit, IpalOptions, ipalEnvRules, IpalEnvFeatures, ipalT, ipalVar, IPAL_TOKENS,
  IPAL_BREAKPOINTS, IpalTokenName, IpalGlobalSlug are aliases of the iapl names
- env: IAPL_* is read first, IPAL_* as fallback (readEnv; EnvRule.aliases for assertEnv);
  the crawler service reads IPAL_CRAWLER_SITES too
- doctor: reads ipal-doctor.json when it is the only one, the old pointer block, ipal-audit-skip
  and old skill folders; new rule legacy-names (info) and storage-names (warning)
- iapl-skills: installs iapl-*, removes the 16 old folders by exact name, rewrites the old
  pointer block in place; a project's own ipal-* skill stays
- storageNames: 'ipal' (default) | 'iapl': the cookie the scanner declares and the 2FA counter's
  kv prefix; <PageStats visitorCookie>, IAPL_VISITOR_COOKIE, verifyLimit.keyPrefix
- test/legacyNames.test.ts: 24 tests for all of the above

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-25 17:31:13 +01:00
co-authored by Claude Fable 5.2
parent 0a4f001797
commit 425fac14fb
43 changed files with 683 additions and 82 deletions
+10 -8
View File
@@ -1,6 +1,6 @@
export { lightboxNotificationFields } from './globals/Notifications/fields.js'
export { applyGlobalOverrides } from './globals/overrides.js'
export type { GlobalOverride, GlobalOverrides, IaplGlobalSlug } from './globals/overrides.js'
export type { GlobalOverride, GlobalOverrides, IaplGlobalSlug, IpalGlobalSlug } from './globals/overrides.js'
export type { AccessOption, Role } from './modules/access/index.js'
export {
adminOnly,
@@ -55,7 +55,7 @@ export type { AccountsOptions } from './modules/access/types.js'
export { A11Y_COOKIE, A11Y_DEFAULT, a11yAttributes, parseA11y, serializeA11y } from './modules/accessibility/state.js'
export type { A11yState } from './modules/accessibility/state.js'
export { applyAdminI18n } from './modules/admin-i18n/apply.js'
export { ADMIN_LANGUAGES, adminDocumentTitle, adminTexts, defineTexts, formatDateTime, formatNumber, iaplT } from './modules/admin-i18n/index.js'
export { ADMIN_LANGUAGES, adminDocumentTitle, adminTexts, defineTexts, formatDateTime, formatNumber, iaplT, ipalT } from './modules/admin-i18n/index.js'
export type { AdminLanguage, AdminText, AdminTextKey } from './modules/admin-i18n/index.js'
export { rowLabel } from './modules/admin-ui/index.js'
export type { RowLabelProps } from './modules/admin-ui/index.js'
@@ -216,8 +216,8 @@ export type { MailAdapterArgs } from './modules/email/mailAdapter.js'
export { panelSmtpAdapter } from './modules/email/panelSmtpAdapter.js'
export type { PanelSmtpAdapterArgs } from './modules/email/panelSmtpAdapter.js'
// Boot-time environment validation (fail fast on misconfigured deploys).
export { assertEnv, checkDatabaseName, databaseNameFromUri, databaseNamesFor, iaplEnvRules } from './modules/env/index.js'
export type { AssertEnvOptions, EnvKind, EnvRule, IaplEnvFeatures } from './modules/env/index.js'
export { assertEnv, checkDatabaseName, databaseNameFromUri, databaseNamesFor, iaplEnvRules, ipalEnvRules } from './modules/env/index.js'
export type { AssertEnvOptions, EnvKind, EnvRule, IaplEnvFeatures, IpalEnvFeatures } from './modules/env/index.js'
export type { FormAttachmentsOption, FormFileScanInput, FormFileScanResult, FormSubmitEndpointOptions } from './modules/forms/attachments/config.js'
export { buildFileBlock, fileBlock } from './modules/forms/attachments/fileBlock.js'
export { FORM_FILE_TYPES, formatFileSize, RISKY_FILE_EXTENSIONS } from './modules/forms/attachments/fileTypes.js'
@@ -452,6 +452,8 @@ export type { ClientIpOptions, RateLimitStore } from './modules/shared/rateLimit
export { buildSlugField, toSlug } from './modules/slug/index.js'
export { STATS_SLUG } from './modules/stats/index.js'
export type { StatsOptions, StatsPage, StatsVisit } from './modules/stats/index.js'
export { IAPL_VISITOR_COOKIE, VISITOR_COOKIE, visitorCookieFor } from './modules/stats/visitorCookie.js'
export type { StorageNames } from './modules/stats/visitorCookie.js'
export { buildImagesConfig } from './modules/storage/buildImagesConfig.js'
export type { ImagesConfig } from './modules/storage/buildImagesConfig.js'
export { buildR2Storage } from './modules/storage/index.js'
@@ -459,9 +461,9 @@ export { isTheme, isThemeSetting, LEGACY_THEME_STORAGE_KEY, THEME_ATTRIBUTE, THE
export type { Theme, ThemeConfig, ThemeSetting } from './modules/theme/index.js'
// Imported from the file, not the turnstile barrel — that one re-exports verify,
// which imports 'server-only'.
export { defineTokens, IAPL_BREAKPOINTS, IAPL_TOKENS, iaplVar } from './modules/tokens/index.js'
export type { IaplTokenName, TokensInput } from './modules/tokens/index.js'
export { defineTokens, IAPL_BREAKPOINTS, IAPL_TOKENS, iaplVar, IPAL_BREAKPOINTS, IPAL_TOKENS, ipalVar } from './modules/tokens/index.js'
export type { IaplTokenName, IpalTokenName, TokensInput } from './modules/tokens/index.js'
export { getTurnstileConfig, TURNSTILE_SECRET_ENV, turnstileSecretFromEnv } from './modules/turnstile/config.js'
export type { TurnstileConfig } from './modules/turnstile/config.js'
export { iapl } from './plugin.js'
export type { IaplOptions, ThemeOptions } from './types.js'
export { iapl, ipalKit } from './plugin.js'
export type { IaplOptions, IpalOptions, ThemeOptions } from './types.js'