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:
co-authored by
Claude Fable 5.2
parent
0a4f001797
commit
425fac14fb
@@ -143,3 +143,9 @@ export type IaplTokenName = `${(typeof LEGACY_DARK_ROLES)[number]}-dark` | Color
|
||||
|
||||
/** Standard breakpoints in rem (Tailwind 4 defaults). CSS variables can't be used in `@media`. */
|
||||
export const IAPL_BREAKPOINTS = { '2xl': 96, lg: 64, md: 48, sm: 40, xl: 80 } as const
|
||||
|
||||
/** @deprecated The name before 1.17.0; the same object as `IAPL_BREAKPOINTS`. Removed in 2.0. */
|
||||
export const IPAL_BREAKPOINTS = IAPL_BREAKPOINTS
|
||||
|
||||
/** @deprecated The name before 1.17.0; the same type as `IaplTokenName`. Removed in 2.0. */
|
||||
export type IpalTokenName = IaplTokenName
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export { COLOR_DEFAULTS, FLUID_TOKENS, INVERSE_SCOPE, IAPL_BREAKPOINTS, LEGACY_DARK_ROLES, STATIC_DEFAULTS } from './catalog.js'
|
||||
export type { ColorRole, IaplTokenName } from './catalog.js'
|
||||
export { COLOR_DEFAULTS, FLUID_TOKENS, IAPL_BREAKPOINTS, INVERSE_SCOPE, IPAL_BREAKPOINTS, LEGACY_DARK_ROLES, STATIC_DEFAULTS } from './catalog.js'
|
||||
export type { ColorRole, IaplTokenName, IpalTokenName } from './catalog.js'
|
||||
export { contrastRatio, parseColor } from './color.js'
|
||||
export { contrastReport } from './contrast.js'
|
||||
export type { ContrastRow } from './contrast.js'
|
||||
@@ -8,4 +8,4 @@ export { defineTokens, resolveColors } from './define.js'
|
||||
export type { ColorInput, TokensInput } from './define.js'
|
||||
export { FLUID_RANGES, FLUID_SCALE, fluidClamp } from './fluid.js'
|
||||
export type { FluidRange, RemValue } from './fluid.js'
|
||||
export { IAPL_TOKENS, iaplVar } from './names.js'
|
||||
export { IAPL_TOKENS, iaplVar, IPAL_TOKENS, ipalVar } from './names.js'
|
||||
|
||||
@@ -25,3 +25,9 @@ export const IAPL_TOKENS = Object.freeze(
|
||||
export function iaplVar(name: IaplTokenName, fallback?: string): string {
|
||||
return fallback === undefined ? `var(--ipal-${name})` : `var(--ipal-${name}, ${fallback})`
|
||||
}
|
||||
|
||||
/** @deprecated The name before 1.17.0; the same object as `IAPL_TOKENS`. Removed in 2.0. */
|
||||
export const IPAL_TOKENS = IAPL_TOKENS
|
||||
|
||||
/** @deprecated The name before 1.17.0; the same function as `iaplVar`. Removed in 2.0. */
|
||||
export const ipalVar = iaplVar
|
||||
|
||||
Reference in New Issue
Block a user