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
+11
-11
@@ -18,13 +18,13 @@ const GENERATED = /^src\/app\/\(payload\)\//
|
||||
/** Sections in reading order: [title, AGENT.md / doc reference, path test]. */
|
||||
const SECTIONS = [
|
||||
['Project files', 'AGENT.md §13, §0a', (p) => !p.includes('/') || p.startsWith('docs/')],
|
||||
['Configuration', 'AGENT.md §3, ipal-setup stage 3', (p) => /^src\/[^/]+\.ts$/.test(p)],
|
||||
['Collections and globals', 'AGENT.md §5, ipal-nav, ipal-collection', (p) => /^src\/(collections|globals)\//.test(p)],
|
||||
['Configuration', 'AGENT.md §3, iapl-setup stage 3', (p) => /^src\/[^/]+\.ts$/.test(p)],
|
||||
['Collections and globals', 'AGENT.md §5, iapl-nav, iapl-collection', (p) => /^src\/(collections|globals)\//.test(p)],
|
||||
['Blocks', 'docs/block-library.md', (p) => p.startsWith('src/blocks/')],
|
||||
['Design tokens', 'docs/design-tokens.md', (p) => p.startsWith('src/design/') || p.startsWith('src/components/design/') || p.includes('/design/')],
|
||||
['Data layer', 'AGENT.md §3, PROGRAMISTA §2.7', (p) => p.startsWith('src/lib/')],
|
||||
['Layout and components', 'AGENT.md §6.8, ipal-nav, ipal-form', (p) => p.startsWith('src/components/') || p.startsWith('src/app/(frontend)/')],
|
||||
['SEO, GEO and ops routes', 'AGENT.md §0b, ipal-setup stages 7–8', (p) => p.startsWith('src/app/')],
|
||||
['Layout and components', 'AGENT.md §6.8, iapl-nav, iapl-form', (p) => p.startsWith('src/components/') || p.startsWith('src/app/(frontend)/')],
|
||||
['SEO, GEO and ops routes', 'AGENT.md §0b, iapl-setup stages 7–8', (p) => p.startsWith('src/app/')],
|
||||
['Seeds', 'docs/seeding.md, docs/block-library.md "Page templates"', (p) => p.startsWith('src/seed/')],
|
||||
['Smoke tests', 'AGENT.md §8a', (p) => p.startsWith('e2e/') || p === 'playwright.config.ts'],
|
||||
]
|
||||
@@ -60,7 +60,7 @@ export const DESCRIPTIONS = {
|
||||
'README.md': 'how to run the reference site and what is where',
|
||||
'docs/DEPLOY.md': 'the Coolify runbook: local check, app settings, MongoDB resource, env, targeted seeds, DNS, rollback',
|
||||
'e2e/create-test-admin.ts': 'two test admins with a known TOTP secret (the specs share out the five 2FA verify attempts per account), their stored verify counts cleared, and e-mail sending pointed at the tests\' mail sink (local / CI database only)',
|
||||
'e2e/late-staff-fixture.ts': 'test fixture, on only with E2E_LATE_STAFF=1: one plugin before ipalKit (staff collections of the config: roles with one more value, the plugin\'s roles, roles of the project\'s own) and one after it (a staff collection without rules, one whose roles field is text, copies of staff collections under new slugs — plain, with rules of their own, one rule used for another operation, other role values, the opt-out, not staff — and a visitor collection with open sign-up)',
|
||||
'e2e/late-staff-fixture.ts': 'test fixture, on only with E2E_LATE_STAFF=1: one plugin before iapl (staff collections of the config: roles with one more value, the plugin\'s roles, roles of the project\'s own) and one after it (a staff collection without rules, one whose roles field is text, copies of staff collections under new slugs — plain, with rules of their own, one rule used for another operation, other role values, the opt-out, not staff — and a visitor collection with open sign-up)',
|
||||
'e2e/late-staff.spec.ts': 'the account rules on a BUILT site (run by `pnpm e2e:built` after a webpack and a Turbopack build): a staff collection a later plugin adds, staff collections whose accounts can hold `admin`, and copies of staff collections — a visitor account gets nothing, nobody raises its own role or makes an admin, a copy is never wider than the plugin\'s rule',
|
||||
'e2e/global-setup.ts': 'Playwright global setup: resets the test admins and clears their stored 2FA attempt counts before every run, so specs do not depend on run order',
|
||||
'e2e/two-factor-setup.spec.ts': 'browser check of "2FA setup required": the first admin of a fresh site, a new editor, the administrator\'s reset on the account page',
|
||||
@@ -68,12 +68,12 @@ export const DESCRIPTIONS = {
|
||||
'e2e/smtp-sink.ts': 'a local mail sink for the smoke tests: reads what the site really sent (recipients, attachments)',
|
||||
'e2e/two-factor-back.spec.ts': 'browser test of the 2FA screens\' `back` link (twoFactor.safeBack): a prepared link — script or another host — ends on the admin root, an ordinary one is followed',
|
||||
'e2e/totp.ts': 'RFC 6238 code generator for the 2FA sign-in in the smoke test, and the address of the second test admin',
|
||||
'ipal-doctor.json': 'the production domain and launch state for ipal-doctor',
|
||||
'iapl-doctor.json': 'the production domain and launch state for iapl-doctor',
|
||||
'next.config.ts': 'security headers, enforced CSP, admin CSP, upload headers, images, no X-Powered-By',
|
||||
'package.json': 'scripts (build, start, seed, tokens, generate), pinned Payload versions and overrides',
|
||||
'playwright.config.ts': 'smoke tests against the built, seeded site',
|
||||
'postcss.config.mjs': 'Tailwind 4 through PostCSS',
|
||||
'starter.manifest.json': 'what `ipal-kit create` keeps, drops and turns into placeholders',
|
||||
'starter.manifest.json': 'what `iapl create` keeps, drops and turns into placeholders',
|
||||
'src/app/(frontend)/[locale]/[[...slug]]/page.tsx': 'the catch-all page: createPageRoute, ISR, redirects, maintenance, the language switcher links',
|
||||
'src/app/(frontend)/[locale]/actions.ts': 'the ONE form server action (createSubmitAction)',
|
||||
'src/app/(frontend)/[locale]/design/page.tsx': 'the design-token styleguide page (noindex)',
|
||||
@@ -98,7 +98,7 @@ export const DESCRIPTIONS = {
|
||||
'src/collections/Pages.ts': 'Pages: slug, blocks layout, AI summary, noindex, slug history, revalidation, system-page delete guard',
|
||||
'src/collections/Posts.ts': 'the blog collection (archive in System pages)',
|
||||
'src/collections/entryFields.ts': 'shared fields of archive collections (names the entry card reads)',
|
||||
'src/components/design/TokenPanel.tsx': 'one styleguide panel built from IPAL_TOKENS',
|
||||
'src/components/design/TokenPanel.tsx': 'one styleguide panel built from IAPL_TOKENS',
|
||||
'src/components/forms/formClasses.ts': 'the ONE place forms are styled, token utilities only',
|
||||
'src/components/layout/Footer.tsx': 'footer: columns, company data, legal links from System pages, NoSnippet',
|
||||
'src/components/layout/Header.tsx': 'header: logo from Site settings, resolveNav menu, language and theme switch, CTA',
|
||||
@@ -115,7 +115,7 @@ export const DESCRIPTIONS = {
|
||||
'src/instrumentation.ts': 'env validation at startup (assertEnv, database name rule)',
|
||||
'src/lib/content.ts': 'createContentHelpers: the ONLY access to Payload, routes, links, JSON-LD',
|
||||
'src/lib/globals.ts': 'cached getters for the project\'s own globals',
|
||||
'src/payload.config.ts': 'ipalKit with every module the site uses, R2, mail, 2FA, white-label',
|
||||
'src/payload.config.ts': 'iapl with every module the site uses, R2, mail, 2FA, white-label',
|
||||
'src/proxy.ts': 'the locale proxy with Markdown negotiation (not middleware.ts)',
|
||||
'src/seed/base.ts': 'BASE seed: templates, system pages, navigation, banner texts — kept by the starter',
|
||||
'src/seed/demo.ts': 'DEMO seed: the made-up company in pl and en — dropped by the starter',
|
||||
@@ -143,12 +143,12 @@ export function buildReferenceIndex(root) {
|
||||
'',
|
||||
'<!-- Generated by scripts/reference-index.mjs from reference/ — do not edit by hand (pnpm reference:index). -->',
|
||||
'',
|
||||
`The reference site is one complete client site on ipal-kit ${version} ("Example Studio", made up) that uses`,
|
||||
`The reference site is one complete client site on IAPL ${version} ("Example Studio", made up) that uses`,
|
||||
'every convention in AGENT.md. It lives in the plugin repo (`reference/`, not in the npm package). Copy the',
|
||||
'PATTERN of the file you need; change only the project\'s content. Files up to',
|
||||
`${FULL_MAX_LINES} lines are below in full; open the rest in the repo at the tag of your plugin version:`,
|
||||
'`https://git.intecion.net/IntecionSoftware/ipal-kit/src/tag/v<version>/reference/<path>`.',
|
||||
'If this index and AGENT.md disagree, report it with ipal-plugin-gap — it is a plugin bug.',
|
||||
'If this index and AGENT.md disagree, report it with iapl-plugin-gap — it is a plugin bug.',
|
||||
'',
|
||||
]
|
||||
const seen = new Set()
|
||||
|
||||
@@ -20,7 +20,7 @@ const args = process.argv.slice(2)
|
||||
const refArg = args.indexOf('--ref') >= 0 ? args[args.indexOf('--ref') + 1] : undefined
|
||||
|
||||
async function get(url) {
|
||||
const res = await fetch(url, { headers: { 'User-Agent': 'ipal-kit cookie-db refresh' } })
|
||||
const res = await fetch(url, { headers: { 'User-Agent': 'IAPL cookie-db refresh' } })
|
||||
if (!res.ok) {throw new Error(`${url}: HTTP ${res.status}`)}
|
||||
return res
|
||||
}
|
||||
|
||||
+14
-14
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env node
|
||||
// pnpm starter:gate — the release gate of `ipal-kit create` (prepublishOnly, after build:starter).
|
||||
// pnpm starter:gate — the release gate of `iapl create` (prepublishOnly, after build:starter).
|
||||
// Packs the plugin, creates a site from the PACKED tarball the way a developer does (pnpm dlx), then builds and
|
||||
// runs it the way Coolify does: frozen install, `pnpm generate:types && pnpm build`, `pnpm start`, MongoDB in its
|
||||
// own container. It runs the documented targeted seed in production mode, checks that a full seed is refused
|
||||
// there, and runs `ipal-doctor --strict` when the plugin ships it. Any failure exits 1 and blocks the publish.
|
||||
// there, and runs `iapl-doctor --strict` when the plugin ships it. Any failure exits 1 and blocks the publish.
|
||||
// pnpm starter:gate → everything, then cleans up (the work folder and the MongoDB container)
|
||||
// pnpm starter:gate --keep → leave .starter-gate/ for inspection
|
||||
// Needs Docker (MongoDB image mongo:7) and the npm registry (or a warm pnpm store). With the `nixpacks` CLI on
|
||||
@@ -125,13 +125,13 @@ async function main() {
|
||||
writeFileSync(answersFile, JSON.stringify(answers, null, 2))
|
||||
const started = Date.now()
|
||||
const created = sh(work, 'pnpm', ['--config.auto-install-peers=false', '--config.dlx-cache-max-age=0', 'dlx', tarball, 'create', domain, '--answers', answersFile, '--plugin-spec', `file:${tarball}`], {}, { allowFail: true })
|
||||
check('ipal-kit create (install, skills, tokens, types, import map, typecheck, secret check, first commit)', created === 0, `${((Date.now() - started) / 1000).toFixed(0)} s`)
|
||||
check('iapl create (install, skills, tokens, types, import map, typecheck, secret check, first commit)', created === 0, `${((Date.now() - started) / 1000).toFixed(0)} s`)
|
||||
const site = join(work, 'release-checkexample-web')
|
||||
// the site was made by THIS tarball: the bundle hash and commit the generator recorded, and the plugin it installed
|
||||
const made = JSON.parse(readFileSync(join(site, '.ipal', 'starter.json'), 'utf8'))
|
||||
check('generated by this tarball (bundle sha256, plugin version)', made.source?.bundleSha256 === bundleSha256 && made.ipalKit === version, `${bundleSha256.slice(0, 12)} · ${version}`)
|
||||
check('generated by this tarball (bundle sha256, plugin version)', made.source?.bundleSha256 === bundleSha256 && made.iapl === version, `${bundleSha256.slice(0, 12)} · ${version}`)
|
||||
check('bundle built from this commit', (made.source?.commit ?? '').replace(/-dirty$/, '') === commit, made.source?.commit ?? 'none')
|
||||
const installed = join(site, 'node_modules', '@intecion', 'ipal-kit')
|
||||
const installed = join(site, 'node_modules', '@intecion', 'IAPL')
|
||||
const installedSha = createHash('sha256').update(readFileSync(join(installed, 'dist', 'starter', 'template.json.gz'))).digest('hex')
|
||||
check('the site installed this tarball', installedSha === bundleSha256 && JSON.parse(readFileSync(join(installed, 'package.json'), 'utf8')).version === version)
|
||||
check('first commit, nothing left uncommitted', out('git', ['-C', site, 'status', '--porcelain']) === '' && out('git', ['-C', site, 'log', '--oneline']).split('\n').length === 1)
|
||||
@@ -140,9 +140,9 @@ async function main() {
|
||||
const env = {
|
||||
ALLOW_LOCAL_MEDIA: '1', // no R2 in the gate (never set in Coolify)
|
||||
DATABASE_URI: `mongodb://127.0.0.1:${mongoPort}/release-checkexample_dev`,
|
||||
IPAL_COOKIE_SCAN_TOKEN: 'release-gate-token-0123456789',
|
||||
IPAL_COOKIE_SCAN_URL: 'http://127.0.0.1:9',
|
||||
IPAL_IP_HEADER: 'x-forwarded-for',
|
||||
IAPL_COOKIE_SCAN_TOKEN: 'release-gate-token-0123456789',
|
||||
IAPL_COOKIE_SCAN_URL: 'http://127.0.0.1:9',
|
||||
IAPL_IP_HEADER: 'x-forwarded-for',
|
||||
NEXT_PUBLIC_SERVER_URL: `http://localhost:${PORT}`,
|
||||
PAYLOAD_SECRET: readFileSync(join(site, '.env'), 'utf8').match(/^PAYLOAD_SECRET=(.+)$/m)?.[1] ?? '',
|
||||
}
|
||||
@@ -174,13 +174,13 @@ async function main() {
|
||||
const llms = await (await fetch(`http://127.0.0.1:${PORT}/llms.txt`)).text()
|
||||
check('llms.txt names the site', llms.includes('Release Check'))
|
||||
|
||||
// 7. ipal-doctor, when this ipal-kit ships it
|
||||
if (existsSync(join(site, 'node_modules', '.bin', 'ipal-doctor'))) {
|
||||
const doctor = sh(site, 'pnpm', ['exec', 'ipal-doctor', '--strict', '--offline'], env, { allowFail: true })
|
||||
check('ipal-doctor --strict: zero findings', doctor === 0)
|
||||
// 7. iapl-doctor, when this IAPL ships it
|
||||
if (existsSync(join(site, 'node_modules', '.bin', 'iapl-doctor'))) {
|
||||
const doctor = sh(site, 'pnpm', ['exec', 'iapl-doctor', '--strict', '--offline'], env, { allowFail: true })
|
||||
check('iapl-doctor --strict: zero findings', doctor === 0)
|
||||
} else {
|
||||
results.push({ detail: 'not in this ipal-kit yet', name: 'ipal-doctor --strict', ok: null })
|
||||
log('- ipal-doctor --strict — skipped: not in this ipal-kit yet')
|
||||
results.push({ detail: 'not in this IAPL yet', name: 'iapl-doctor --strict', ok: null })
|
||||
log('- iapl-doctor --strict — skipped: not in this IAPL yet')
|
||||
}
|
||||
|
||||
// 8. Coolify's build pack itself, when the nixpacks CLI is available
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
// Maintainer script (not shipped): vendors the third-party agent skills into docs/agent/external/
|
||||
// at the commits pinned below. Projects never fetch anything — `ipal-skills --external` copies
|
||||
// at the commits pinned below. Projects never fetch anything — `iapl-skills --external` copies
|
||||
// these vendored folders. To update a pin: change `commit`, run this script, review the diff
|
||||
// (`git diff docs/agent/external`), run `pnpm vitest run test/externalSkills.test.ts`, commit.
|
||||
//
|
||||
@@ -21,7 +21,7 @@ const outDir = join(root, 'docs', 'agent', 'external')
|
||||
|
||||
const COMMON = `> **Project rules win.** Vendored by @intecion/ipal-kit as guidance. When this skill conflicts with
|
||||
> \`node_modules/@intecion/ipal-kit/docs/agent/AGENT.md\`, the project's \`AGENTS.md\` or \`DESIGN.md\`, those win:
|
||||
> ipal-kit features first (the \`ipal-reference\` skill), Payload 3 + Next 16 App Router, data from Server Components
|
||||
> IAPL features first (the \`iapl-reference\` skill), Payload 3 + Next 16 App Router, data from Server Components
|
||||
> through Payload / \`@/lib/content\`, every visible text from the CMS, design values from \`DESIGN.md\` tokens.
|
||||
> Never add a dependency this skill suggests without the owner's decision.`
|
||||
|
||||
@@ -58,7 +58,7 @@ const SOURCES = [
|
||||
license: 'MIT',
|
||||
licenseFile: 'LICENSE',
|
||||
override: `> **Tools:** never run \`npx lighthouse\` / \`npx @axe-core/cli\` unpinned — add them as devDependencies at fixed versions
|
||||
> first. Use the ipal-kit components (CookieBanner, AccessibilityWidget, RenderForm…) and fix their markup through
|
||||
> first. Use the IAPL components (CookieBanner, AccessibilityWidget, RenderForm…) and fix their markup through
|
||||
> their props or a plugin gap report, not by copying them.`,
|
||||
},
|
||||
{
|
||||
@@ -80,8 +80,8 @@ const SOURCES = [
|
||||
publisher: 'Payload CMS',
|
||||
license: 'MIT',
|
||||
licenseFile: 'LICENSE.md',
|
||||
override: `> **Reference only — Payload 3 (v3.92.1).** Never apply Payload 4 guidance. ipal-kit already provides users and roles,
|
||||
> 2FA, SEO, forms, i18n, the site globals, revalidation and storage — check the \`ipal-reference\` skill before you
|
||||
override: `> **Reference only — Payload 3 (v3.92.1).** Never apply Payload 4 guidance. IAPL already provides users and roles,
|
||||
> 2FA, SEO, forms, i18n, the site globals, revalidation and storage — check the \`iapl-reference\` skill before you
|
||||
> write Payload config, hooks or access rules by hand.`,
|
||||
},
|
||||
]
|
||||
@@ -168,8 +168,8 @@ try {
|
||||
}
|
||||
writeFileSync(join(to, 'SOURCE.md'), `# ${src.name}
|
||||
|
||||
Vendored by @intecion/ipal-kit (\`ipal-skills --external\`). Do not edit — regenerate with
|
||||
\`scripts/vendor-external-skills.mjs\` in the ipal-kit repository.
|
||||
Vendored by @intecion/ipal-kit (\`iapl-skills --external\`). Do not edit — regenerate with
|
||||
\`scripts/vendor-external-skills.mjs\` in the IAPL repository.
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
|
||||
Reference in New Issue
Block a user