- 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]>
24 lines
1.2 KiB
JavaScript
Executable File
24 lines
1.2 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
// iapl — the IAPL command line (also installed as `ipal-kit`, its name before 1.17.0, which `pnpm dlx @intecion/ipal-kit` runs).
|
|
// pnpm dlx @intecion/ipal-kit@<version> create intecion.com → a new client site (docs/project-starter.md)
|
|
// pnpm exec iapl create intecion.com --dir ../intecioncom-web --answers answers.json
|
|
// `pnpm dlx <package>` runs the bin named after the package, so every subcommand lives here.
|
|
// The other tools keep their own bins: iapl-skills, iapl-blocks, iapl-tokens, iapl-doctor.
|
|
|
|
import { dirname, join } from 'node:path'
|
|
import { fileURLToPath, pathToFileURL } from 'node:url'
|
|
|
|
const USAGE = `Usage: iapl <command> [options]
|
|
create <domain> a new client site from the reference site (iapl create --help)
|
|
|
|
Other tools: iapl-skills, iapl-blocks, iapl-tokens, iapl-doctor`
|
|
|
|
const [command, ...args] = process.argv.slice(2)
|
|
if (command !== 'create') {
|
|
console.log(USAGE)
|
|
process.exit(command === undefined || command === '--help' || command === '-h' ? 0 : 1)
|
|
}
|
|
const pkgRoot = join(dirname(fileURLToPath(import.meta.url)), '..')
|
|
const { runCreateCli } = await import(pathToFileURL(join(pkgRoot, 'dist', 'modules', 'starter', 'cli.js')).href)
|
|
process.exit(await runCreateCli(args))
|