IAPL rename, scripted: preferred names in src, bin, scripts, services, tests; bin files and skill folders moved
Replaced by an explicit list of forms only (ten exported names, runtime env names, project file names and marks, commands, skill names, the log prefix, the brand in prose). Package name, import paths, routes, CSS tokens, data attributes, custom keys, context flags, the cookie and kv keys are not touched. package.json keeps the five old bin names beside the five new ones. The old names stop working in this commit and come back as aliases in the next; docs follow. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
414a4702df
commit
0a4f001797
@@ -13,7 +13,7 @@ import path from 'path'
|
||||
import { getPayload } from 'payload'
|
||||
import { afterAll, beforeAll, describe, expect, test, vi } from 'vitest'
|
||||
|
||||
import { ipalKit } from '../src/plugin.js'
|
||||
import { iapl } from '../src/plugin.js'
|
||||
import { buildTestConfig } from './helpers.js'
|
||||
import { numericIds, testDatabase } from './http/db.js'
|
||||
import { cookiesOf, startPayloadServer, type TestServer } from './http/server.js'
|
||||
@@ -25,7 +25,7 @@ vi.mock('next/headers.js', async () => (await import('./http/server.js')).nextHe
|
||||
const TOTP_SECRET = 'JBSWY3DPEHPK3PXP'
|
||||
const PASSWORD = 'a-long-test-password-1'
|
||||
|
||||
/** A plugin the project lists AFTER ipalKit: its collection did not exist when ipalKit ran. */
|
||||
/** A plugin the project lists AFTER iapl: its collection did not exist when iapl ran. */
|
||||
const latePlugin: Plugin = (config: Config) => ({
|
||||
...config,
|
||||
collections: [
|
||||
@@ -47,7 +47,7 @@ const projectCollections: CollectionConfig[] = [
|
||||
auth: true,
|
||||
fields: [{ name: 'roles', type: 'select', hasMany: true, options: ['user', 'editor', 'admin'], saveToJWT: true }],
|
||||
},
|
||||
// The 2FA package's own per-entity opt-out, and ipal-kit's.
|
||||
// The 2FA package's own per-entity opt-out, and IAPL's.
|
||||
{
|
||||
slug: 'open-notes',
|
||||
access: { read: ({ req }) => Boolean(req.user), update: ({ req }) => Boolean(req.user) },
|
||||
@@ -100,7 +100,7 @@ const makeConfig = () =>
|
||||
db: testDatabase('sechttp'),
|
||||
editor: lexicalEditor(),
|
||||
plugins: [
|
||||
ipalKit({
|
||||
iapl({
|
||||
access: { authCollection: 'users' },
|
||||
consentLog: true,
|
||||
cookieScanner: { crawl: true },
|
||||
@@ -378,7 +378,7 @@ describe('per-entity opt-out from the second factor', () => {
|
||||
expect((await api('/open-notes', sessions.anonymous)).status).toBe(403) // its own rule still applies
|
||||
})
|
||||
|
||||
test("ipal-kit's key: custom.ipal.secondFactor", async () => {
|
||||
test("IAPL's key: custom.ipal.secondFactor", async () => {
|
||||
expect((await api('/open-tasks', sessions.passwordOnly)).status).toBe(200)
|
||||
expect((await api('/open-tasks', sessions.passwordOnly, { body: '{}', method: 'POST' })).status).toBe(403)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user