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
+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
|
||||
|
||||
Reference in New Issue
Block a user