@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.
- package/db/drizzle-config.d.ts +2 -1
- package/db/drizzle-config.js +6 -3
- package/esm/src/cli/migrationEnv.d.ts +16 -0
- package/esm/src/cli/migrationEnv.d.ts.map +1 -0
- package/esm/src/cli/migrationEnv.js +46 -0
- package/esm/src/cli/mod.d.ts +12 -0
- package/esm/src/cli/mod.d.ts.map +1 -1
- package/esm/src/cli/mod.js +240 -7
- package/esm/src/cli/vercelBuildEnv.d.ts +30 -0
- package/esm/src/cli/vercelBuildEnv.d.ts.map +1 -0
- package/esm/src/cli/vercelBuildEnv.js +186 -0
- package/package.json +2 -2
- package/script/src/cli/migrationEnv.d.ts +16 -0
- package/script/src/cli/migrationEnv.d.ts.map +1 -0
- package/script/src/cli/migrationEnv.js +49 -0
- package/script/src/cli/mod.d.ts +12 -0
- package/script/src/cli/mod.d.ts.map +1 -1
- package/script/src/cli/mod.js +241 -7
- package/script/src/cli/vercelBuildEnv.d.ts +30 -0
- package/script/src/cli/vercelBuildEnv.d.ts.map +1 -0
- package/script/src/cli/vercelBuildEnv.js +191 -0
- package/skills/loom/SKILL.md +11 -3
- package/skills/loom-auth/SKILL.md +18 -8
- package/skills/loom-db/SKILL.md +25 -8
package/skills/loom/SKILL.md
CHANGED
|
@@ -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.
|
|
65
|
-
not
|
|
66
|
-
|
|
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
|
-
-
|
|
28
|
-
`vercel pull`
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
|
package/skills/loom-db/SKILL.md
CHANGED
|
@@ -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 `
|
|
33
|
-
|
|
34
|
-
|
|
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
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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.
|