@gadicc/loom 1.15.4 → 1.16.0

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.
@@ -61,9 +61,17 @@ from the consumer's working directory.
61
61
  - Implementation files, generated wrappers, Drizzle configs, and direct job
62
62
  runners should not import `dotenv` or `@next/env` by hand.
63
63
  - After `vercel pull` in external CI, treat `.vercel/.env.<target>.local` as a
64
- plaintext secret file. Sensitive values are available to that build path but
65
- not to `vercel env run`; mask them before build output and load the pulled
66
- file explicitly for migrations.
64
+ plaintext secret file. Mask usable pulled values before build output.
65
+ Sensitive values are not readable there or through `vercel env run`; CLI
66
+ versions may write either an empty value or a redaction sentinel.
67
+ - For external prebuilds, query Vercel env metadata, preserve usable pulled
68
+ values, add unique build-only placeholders only for confirmed Sensitive
69
+ entries, and reject an artifact containing any placeholder marker. Preserve an
70
+ untouched pull snapshot for migrations; once database variables are Sensitive,
71
+ overlay a separately governed GitHub `MIGRATION_DATABASE_URL_UNPOOLED` secret
72
+ only for migration validation and the migration command. Readable pulled URLs
73
+ and the legacy `DATABASE_URL_UNPOOLED` secret remain supported during gradual
74
+ adoption.
67
75
 
68
76
  ## Re-establishing work context
69
77
 
@@ -24,14 +24,24 @@ Use this skill for the shared Better Auth boundary in a consuming app.
24
24
  list directly. The helper validates that list and returns `BETTER_AUTH_SECRET`
25
25
  as Better Auth's legacy fallback when it exists; do not parse the first
26
26
  version into a replacement singular environment variable.
27
- - Do not use a dummy build secret for a production artifact. Vercel's
28
- `vercel pull` build path can provide Sensitive variables to an external CI
29
- runner, and server-only variables are read again in the deployed runtime.
30
- - Treat `.vercel/.env.<target>.local` as a plaintext secret file. Keep it
31
- ignored, mask pulled values in GitHub Actions before later commands can log
32
- them, and do not cache or upload it as an artifact.
33
- - `vercel env run` does not provide Sensitive variables. CI commands that need
34
- the production secret set should run from the file created by `vercel pull`.
27
+ - Sensitive values are write-only after creation. Depending on Vercel CLI
28
+ version, `vercel pull` represents them as empty strings or non-secret
29
+ redaction sentinels; external CI does not receive their plaintext.
30
+ - For a local `vercel build --prod`, query Production variable metadata with
31
+ `vercel env ls production --format=json`, preserve every usable pulled value,
32
+ and replace only confirmed unreadable Sensitive values with unique, build-only
33
+ placeholders. Keep the required keys and expected Sensitive types in an
34
+ app-local policy.
35
+ - Scan `.vercel/output` for every unique placeholder before
36
+ `vercel deploy --prebuilt`. Server-only variables are attached from the Vercel
37
+ project at runtime, but the scan proves a build-time reference did not reach
38
+ the deployable artifact.
39
+ - Treat `.vercel/.env.<target>.local` as a plaintext secret file even though
40
+ Sensitive entries are redacted. Keep it ignored, mask usable pulled values in
41
+ GitHub Actions, and never cache or upload it as an artifact.
42
+ - `vercel env run` does not provide Sensitive values either. A command that
43
+ genuinely needs a secret outside Vercel runtime needs a separately governed
44
+ secret source; do not reuse a build placeholder.
35
45
 
36
46
  ## Rotation
37
47
 
@@ -29,9 +29,9 @@ Use this skill when working on the shared DB stack from a consuming app.
29
29
  should use the app's env-aware package scripts or
30
30
  `pnpm exec loom env -- <command>`. Do not add `dotenv` or `@next/env` imports
31
31
  to implementation files.
32
- - `createDrizzleConfig()` prefers `DATABASE_URL_UNPOOLED` when Vercel/Neon
33
- provides it and falls back to `DATABASE_URL`, so local environments do not
34
- need to define both.
32
+ - `createDrizzleConfig()` prefers `MIGRATION_DATABASE_URL_UNPOOLED`, then
33
+ `MIGRATION_DATABASE_URL`, before the gradual-adoption fallbacks
34
+ `DATABASE_URL_UNPOOLED` and `DATABASE_URL`.
35
35
  - App-specific fixture table selection, extra Valibot refinements, and auth
36
36
  integration should stay local unless they are being extracted deliberately.
37
37
 
@@ -71,11 +71,28 @@ Use this skill when working on the shared DB stack from a consuming app.
71
71
  - For Vercel production releases, confirm `vercel.json` disables automatic
72
72
  `main` deployments and GitHub Actions builds with Vercel production settings,
73
73
  uploads a staged production deployment with `--prebuilt --prod --skip-domain`,
74
- runs `db:migrate` with the env file produced by `vercel pull`, and then
75
- promotes the staged deployment. `vercel env run` omits Sensitive variables and
76
- is not the release migration boundary. Pass `--scope "$VERCEL_ORG_ID"` to
77
- Vercel CLI release commands so multi-account CI jobs do not resolve the wrong
78
- team.
74
+ runs `db:migrate`, and then promotes the staged deployment. Before adding
75
+ build-only placeholders, preserve an untouched copy of the pulled env file for
76
+ migrations. Before Vercel database variables become Sensitive, provide a
77
+ separately governed direct migration URL as the GitHub Environment secret
78
+ `MIGRATION_DATABASE_URL_UNPOOLED` and expose it only to validation and
79
+ migration steps. `vercel pull` and `vercel env run` cannot recover Sensitive
80
+ values. The pulled URL and legacy `DATABASE_URL_UNPOOLED` secret remain
81
+ supported during gradual adoption. Pass `--scope "$VERCEL_ORG_ID"` to Vercel
82
+ CLI release commands so multi-account CI jobs do not resolve the wrong team.
83
+ - Query Vercel Production variable metadata before an external build. Preserve
84
+ usable pulled values, insert unique placeholders only for confirmed unreadable
85
+ Sensitive values, and scan `.vercel/output` for those markers before uploading
86
+ the prebuilt artifact. Prefer `loom db release prepare-build-env` and
87
+ `loom db release verify-build-env`; keep only the declarative requirements
88
+ policy app-local.
89
+ - Use `loom db migrations verify-env` before a migration. It validates the
90
+ selected URL, precedence, database role, and direct-vs-pooled endpoint without
91
+ printing credentials.
92
+ - Once a dedicated direct URL has been provisioned, load it as
93
+ `MIGRATION_DATABASE_URL_UNPOOLED` in the local process and run
94
+ `loom db migrations setup-github`. Loom sends the value to GitHub over stdin,
95
+ records `LOOM_MIGRATION_DATABASE_ROLE`, and does not change Vercel variables.
79
96
  - Use `loom check --network` after wiring a production release workflow so Loom
80
97
  can verify the linked Vercel project plus GitHub's `VERCEL_TOKEN`,
81
98
  `VERCEL_ORG_ID`, and `VERCEL_PROJECT_ID` release configuration.