@wwchen/stack 0.10.1 → 0.11.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.
Files changed (71) hide show
  1. package/README.md +42 -25
  2. package/blocks/AGENTS.md +8 -20
  3. package/blocks/CLAUDE.md +9 -27
  4. package/blocks/env.example +1 -7
  5. package/blocks/gitignore +0 -6
  6. package/dist/cli/builtin.d.ts +4 -3
  7. package/dist/cli/builtin.js +31 -36
  8. package/dist/cli/check.d.ts +5 -0
  9. package/dist/cli/check.js +39 -0
  10. package/dist/cli/context.d.ts +1 -18
  11. package/dist/cli/context.js +0 -22
  12. package/dist/cli/discover.d.ts +15 -0
  13. package/dist/cli/discover.js +156 -0
  14. package/dist/cli/generate.d.ts +6 -0
  15. package/dist/cli/generate.js +94 -0
  16. package/dist/cli/host.d.ts +1 -1
  17. package/dist/cli/host.js +90 -72
  18. package/dist/cli/owned.d.ts +33 -0
  19. package/dist/cli/owned.js +151 -0
  20. package/dist/cli/{sync-blocks.d.ts → sync.d.ts} +6 -2
  21. package/dist/cli/{sync-blocks.js → sync.js} +46 -18
  22. package/dist/configs/vitest.d.ts +3 -1
  23. package/dist/configs/vitest.js +8 -6
  24. package/dist/index.d.ts +2 -2
  25. package/dist/index.js +1 -1
  26. package/dist/next/config.d.ts +2 -0
  27. package/dist/next/config.js +10 -6
  28. package/dist/next/health.d.ts +1 -1
  29. package/dist/next/health.js +1 -1
  30. package/dist/stack/contracts.d.ts +65 -15
  31. package/dist/stack/contracts.js +30 -6
  32. package/files/.claude/rules/stack-ui.md +24 -0
  33. package/files/next.config.ts +6 -0
  34. package/files/src/app/api/health/route.ts +9 -0
  35. package/package.json +6 -37
  36. package/dist/cli/db.d.ts +0 -4
  37. package/dist/cli/db.js +0 -43
  38. package/dist/cli/dev.d.ts +0 -4
  39. package/dist/cli/dev.js +0 -70
  40. package/dist/cli/neon.d.ts +0 -79
  41. package/dist/cli/neon.js +0 -394
  42. package/dist/cli/run.d.ts +0 -2
  43. package/dist/cli/run.js +0 -29
  44. package/dist/db/branches.d.ts +0 -11
  45. package/dist/db/branches.js +0 -19
  46. package/dist/db/doctor.d.ts +0 -9
  47. package/dist/db/doctor.js +0 -120
  48. package/dist/db/env.d.ts +0 -14
  49. package/dist/db/env.js +0 -15
  50. package/dist/db/explaining-pool.d.ts +0 -11
  51. package/dist/db/explaining-pool.js +0 -55
  52. package/dist/db/health.d.ts +0 -10
  53. package/dist/db/health.js +0 -26
  54. package/dist/db/index.d.ts +0 -21
  55. package/dist/db/index.js +0 -32
  56. package/dist/db/migration-status.d.ts +0 -5
  57. package/dist/db/migration-status.js +0 -38
  58. package/dist/db/schema-changes.d.ts +0 -13
  59. package/dist/db/schema-changes.js +0 -99
  60. package/dist/db/ssl.d.ts +0 -4
  61. package/dist/db/ssl.js +0 -17
  62. package/dist/db/target.d.ts +0 -19
  63. package/dist/db/target.js +0 -66
  64. package/dist/db/testing/index.d.ts +0 -23
  65. package/dist/db/testing/index.js +0 -67
  66. package/dist/db/testing/isolate.d.ts +0 -1
  67. package/dist/db/testing/isolate.js +0 -3
  68. package/dist/db/testing/pglite.d.ts +0 -20
  69. package/dist/db/testing/pglite.js +0 -79
  70. package/dist/env/testing.d.ts +0 -6
  71. package/dist/env/testing.js +0 -13
@@ -1,13 +0,0 @@
1
- // The environment the test helpers (`@wwchen/stack/db/testing`) read and write, kept here so that src/env/ stays the one place in the package that touches `process.env`.
2
- /** `TEST_DATABASE_URL`: a real Postgres server for test databases (a CI job's service); else PGlite. */
3
- export function testDatabaseUrl(source = process.env) {
4
- const url = source.TEST_DATABASE_URL?.trim();
5
- return url ? url : undefined;
6
- }
7
- /**
8
- * Points DATABASE_URL at a closed port before anything loads `.env`: an env loader never overrides a variable that is already set, so `.env`, which may name a real, remote database, cannot reach a test. A test that needs a database starts its own.
9
- */
10
- export function isolateTestEnv(target = process.env) {
11
- target.DATABASE_URL = "postgres://unused:unused@127.0.0.1:1/unused";
12
- target.DATABASE_URL_UNPOOLED = "";
13
- }