@ingram-tech/nk-dev 0.24.0 → 0.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/guide.md CHANGED
@@ -102,10 +102,16 @@ internal plumbing — forms included — under `/api/`.
102
102
  installed in PGlite automatically and in prod by one custom migration). So no
103
103
  `ids.x.decode(param)` before a query and no `ids.x.encode(row.id)` after one
104
104
  — `nextkit/no-id-codec-in-app-code` flags both; validate input with
105
- `ids.x.is(param)` instead. Session ids come in the same form from
106
- `createAuthHelpers(auth, { ids })` (and `backendJwtOptions({ ids })`), and
107
- `withRls*` decode a public `sub` before it reaches `auth.uid()`. At the
108
- shell, `bunx id758 decode inv_…`.
105
+ `ids.x.is(param)` instead. At the shell, `bunx id758 decode inv_…`.
106
+ - **Users and organizations are `usr_` / `org_` fleet-wide.** The prefixes are
107
+ `SHARED_ID_PREFIXES` from `@ingram-tech/nk-db/id`, and `createIdRegistry`
108
+ throws on any other prefix for `user` or `organization`, so a session or token
109
+ means the same thing in every app. Opt in with `createAuthHelpers(auth, { ids
110
+ })` (server reads), the `publicSessionIds({ ids })` Better Auth plugin (the
111
+ browser's `useSession()`), and `backendJwtOptions({ ids })` (bearer `sub`).
112
+ `withRls*` and `verifyBackendJwt` accept a raw-uuid or public `sub`, so tokens
113
+ issued before the switch keep working. A raw-SQL-heavy app may keep raw uuids
114
+ internally and skin only at its edges; the wire is the same.
109
115
  - **Migrations don't auto-apply on deploy.** Code ships ahead of the prod schema
110
116
  unless someone runs the migration against the target DB — a page that reads a
111
117
  newly-added column 500s in prod until then. Apply migrations with
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ingram-tech/nk-dev",
3
- "version": "0.24.0",
3
+ "version": "0.24.2",
4
4
  "description": "The nextkit dev toolchain in one package: the `nk` CLI plus shared oxlint/oxfmt, TypeScript, and Vitest config, the format-on-commit hook, and the AI agent guide. `nk init` scaffolds a site to use it.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -13,6 +13,11 @@
13
13
  "noEmit": true,
14
14
  "declaration": false,
15
15
  "declarationMap": false,
16
+ // TS 7 sizes its checker pool to the CPU count, and `next build` runs tsc
17
+ // against this config: the default pool peaks near 7 GB and OOMs a
18
+ // standard Vercel build machine. One checker costs ~3.3 GB and a few
19
+ // seconds; `tsc --checkers N` still overrides it for a local run.
20
+ "checkers": 1,
16
21
  "plugins": [{ "name": "next" }],
17
22
  "paths": {
18
23
  "@/*": ["./src/*"]