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
+4 -2
View File
@@ -1,6 +1,8 @@
import { readEnv } from '../shared/envName.js'
/**
* Whole-site noindex for staging, previews and test copies: set IAPL_NOINDEX=1
* in that environment's env. Then robots.txt disallows everything, every page
* in that environment's env (the old spelling IPAL_NOINDEX is still read). Then robots.txt disallows everything, every page
* gets `robots: noindex, nofollow`, and buildSecurityHeaders adds
* `X-Robots-Tag: noindex, nofollow` to every response (files and API too).
* Production never sets it — a forgotten staging copy indexed by Google is a
@@ -9,6 +11,6 @@
export const SITE_NOINDEX_ENV = 'IAPL_NOINDEX'
export function isSiteNoindex(): boolean {
const v = process.env[SITE_NOINDEX_ENV]?.trim().toLowerCase()
const v = readEnv(SITE_NOINDEX_ENV)?.trim().toLowerCase()
return v === '1' || v === 'true' || v === 'yes'
}