IAPL rename: readEnv exported, the MCP server name left as it was, legacy:site needs a database
- readEnv / legacyEnvName exported from the root and /env (a project's own code reads IAPL_* with the IPAL_* fallback); the name constants hold the IAPL_ spelling — changelog and env.md say so - createMcpRoute: the default serverName stays 'ipal-site' (clients see it); the scripted step had changed it - legacy:site: the builds read the database; the script and PROGRAMISTA say which Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
926ba4a67e
commit
3d5106bc4a
@@ -305,6 +305,7 @@ Opt-in with `iapl({ cookieScanner: true })`; the plugin wires the collection, en
|
||||
| Export | Import from | What it does / when |
|
||||
|---|---|---|
|
||||
| `assertEnv(rules, { env?, label? })` | `@intecion/ipal-kit/env`, `@intecion/ipal-kit` | validates `process.env` against the rules at startup; collects every missing item and throws one error |
|
||||
| `readEnv(name, env?)`, `legacyEnvName(name)` | `@intecion/ipal-kit/env`, `@intecion/ipal-kit` | Value of a plugin variable: `IAPL_<NAME>` first, the spelling before 1.17.0 (`IPAL_<NAME>`) when it is missing or empty. `legacyEnvName('IAPL_NOINDEX')` → `'IPAL_NOINDEX'`. For your own code that reads `IAPL_*`. |
|
||||
| `iaplEnvRules({ storage?, emailGraph?, ipHeader?, turnstile?, serverUrlVar?, secretVar?, secretMinLength?, databaseVar?, databaseName? })` | `@intecion/ipal-kit/env`, `@intecion/ipal-kit` | ready rule set (`DATABASE_URI`, `PAYLOAD_SECRET`, `NEXT_PUBLIC_SERVER_URL` + `R2_*`/`GRAPH_*`/Turnstile/`IAPL_IP_HEADER` depending on the features used) for `assertEnv`; `R2_PUBLIC_URL` optional unless `storage: { requirePublicUrl: true }`; `secretMinLength` (default 32, `0` = off) is the minimum `PAYLOAD_SECRET` length in production; `databaseName: true \| { domain?, warn? }` only warns when the `DATABASE_URI` database is not `<domain without dots>_prod` / `_dev` |
|
||||
| `databaseNamesFor(domainOrUrl)` | `@intecion/ipal-kit/env`, `@intecion/ipal-kit` | the two database names for a site: `intecion.com` → `{ prod: 'intecioncom_prod', dev: 'intecioncom_dev' }` (`www.` dropped, dots removed) |
|
||||
| `databaseNameFromUri(uri)` | `@intecion/ipal-kit/env`, `@intecion/ipal-kit` | the database name (URI path) of a Mongo / Postgres `DATABASE_URI`; null for SQLite files or no name |
|
||||
|
||||
Reference in New Issue
Block a user