@supatype/cli 0.2.1 → 0.3.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 (162) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-test.log +180 -143
  3. package/.turbo/turbo-typecheck.log +1 -1
  4. package/dist/api-config-cache.d.ts +34 -0
  5. package/dist/api-config-cache.d.ts.map +1 -0
  6. package/dist/api-config-cache.js +123 -0
  7. package/dist/api-config-cache.js.map +1 -0
  8. package/dist/cache-identity-scope.d.ts +38 -0
  9. package/dist/cache-identity-scope.d.ts.map +1 -0
  10. package/dist/cache-identity-scope.js +70 -0
  11. package/dist/cache-identity-scope.js.map +1 -0
  12. package/dist/cache-provider.d.ts +30 -0
  13. package/dist/cache-provider.d.ts.map +1 -0
  14. package/dist/cache-provider.js +60 -0
  15. package/dist/cache-provider.js.map +1 -0
  16. package/dist/cli-version-embedded.js +1 -1
  17. package/dist/commands/add.js +1 -1
  18. package/dist/commands/add.js.map +1 -1
  19. package/dist/commands/cache.d.ts +1 -1
  20. package/dist/commands/cache.js +3 -3
  21. package/dist/commands/cache.js.map +1 -1
  22. package/dist/commands/cloud.d.ts.map +1 -1
  23. package/dist/commands/cloud.js +2 -1
  24. package/dist/commands/cloud.js.map +1 -1
  25. package/dist/commands/deploy.d.ts.map +1 -1
  26. package/dist/commands/deploy.js +2 -1
  27. package/dist/commands/deploy.js.map +1 -1
  28. package/dist/commands/dev.d.ts.map +1 -1
  29. package/dist/commands/dev.js +61 -8
  30. package/dist/commands/dev.js.map +1 -1
  31. package/dist/commands/diff.d.ts.map +1 -1
  32. package/dist/commands/diff.js +2 -1
  33. package/dist/commands/diff.js.map +1 -1
  34. package/dist/commands/functions.d.ts.map +1 -1
  35. package/dist/commands/functions.js +6 -2
  36. package/dist/commands/functions.js.map +1 -1
  37. package/dist/commands/init.d.ts.map +1 -1
  38. package/dist/commands/init.js +13 -9
  39. package/dist/commands/init.js.map +1 -1
  40. package/dist/commands/migrate.d.ts.map +1 -1
  41. package/dist/commands/migrate.js +2 -1
  42. package/dist/commands/migrate.js.map +1 -1
  43. package/dist/commands/push.d.ts.map +1 -1
  44. package/dist/commands/push.js +52 -1
  45. package/dist/commands/push.js.map +1 -1
  46. package/dist/compose-services.d.ts.map +1 -1
  47. package/dist/compose-services.js +2 -1
  48. package/dist/compose-services.js.map +1 -1
  49. package/dist/dev-compose.d.ts.map +1 -1
  50. package/dist/dev-compose.js +18 -7
  51. package/dist/dev-compose.js.map +1 -1
  52. package/dist/engine-floor.d.ts +11 -1
  53. package/dist/engine-floor.d.ts.map +1 -1
  54. package/dist/engine-floor.js +49 -16
  55. package/dist/engine-floor.js.map +1 -1
  56. package/dist/functions-deno-types.d.ts +9 -0
  57. package/dist/functions-deno-types.d.ts.map +1 -1
  58. package/dist/functions-deno-types.js +45 -1
  59. package/dist/functions-deno-types.js.map +1 -1
  60. package/dist/functions-router-gen.d.ts.map +1 -1
  61. package/dist/functions-router-gen.js +113 -81
  62. package/dist/functions-router-gen.js.map +1 -1
  63. package/dist/kong-config.d.ts +1 -1
  64. package/dist/model-cache.d.ts +17 -0
  65. package/dist/model-cache.d.ts.map +1 -0
  66. package/dist/model-cache.js +45 -0
  67. package/dist/model-cache.js.map +1 -0
  68. package/dist/model-hooks.d.ts +5 -0
  69. package/dist/model-hooks.d.ts.map +1 -1
  70. package/dist/model-hooks.js +29 -1
  71. package/dist/model-hooks.js.map +1 -1
  72. package/dist/model-versioning.d.ts +80 -0
  73. package/dist/model-versioning.d.ts.map +1 -0
  74. package/dist/model-versioning.js +140 -0
  75. package/dist/model-versioning.js.map +1 -0
  76. package/dist/postgres-ctl.d.ts +55 -0
  77. package/dist/postgres-ctl.d.ts.map +1 -1
  78. package/dist/postgres-ctl.js +84 -8
  79. package/dist/postgres-ctl.js.map +1 -1
  80. package/dist/preview-config-check.d.ts +21 -0
  81. package/dist/preview-config-check.d.ts.map +1 -0
  82. package/dist/preview-config-check.js +47 -0
  83. package/dist/preview-config-check.js.map +1 -0
  84. package/dist/project-config.d.ts +182 -5
  85. package/dist/project-config.d.ts.map +1 -1
  86. package/dist/project-config.js +125 -8
  87. package/dist/project-config.js.map +1 -1
  88. package/dist/resolve-target.d.ts +9 -0
  89. package/dist/resolve-target.d.ts.map +1 -1
  90. package/dist/resolve-target.js.map +1 -1
  91. package/dist/rest-cache-admin.d.ts.map +1 -1
  92. package/dist/rest-cache-admin.js +6 -2
  93. package/dist/rest-cache-admin.js.map +1 -1
  94. package/dist/schema-ast-v2.d.ts +32 -1
  95. package/dist/schema-ast-v2.d.ts.map +1 -1
  96. package/dist/schema-ast-v2.js +14 -1
  97. package/dist/schema-ast-v2.js.map +1 -1
  98. package/dist/self-host-compose.d.ts +20 -1
  99. package/dist/self-host-compose.d.ts.map +1 -1
  100. package/dist/self-host-compose.js +181 -27
  101. package/dist/self-host-compose.js.map +1 -1
  102. package/dist/studio-admin-roles.d.ts +8 -1
  103. package/dist/studio-admin-roles.d.ts.map +1 -1
  104. package/dist/studio-admin-roles.js +16 -2
  105. package/dist/studio-admin-roles.js.map +1 -1
  106. package/dist/type-extractor.d.ts +7 -0
  107. package/dist/type-extractor.d.ts.map +1 -1
  108. package/dist/type-extractor.js +234 -3
  109. package/dist/type-extractor.js.map +1 -1
  110. package/package.json +2 -2
  111. package/src/api-config-cache.ts +142 -0
  112. package/src/cache-identity-scope.ts +92 -0
  113. package/src/cache-provider.ts +61 -0
  114. package/src/cli-version-embedded.ts +1 -1
  115. package/src/commands/add.ts +1 -1
  116. package/src/commands/cache.ts +3 -3
  117. package/src/commands/cloud.ts +2 -1
  118. package/src/commands/deploy.ts +2 -1
  119. package/src/commands/dev.ts +68 -7
  120. package/src/commands/diff.ts +2 -1
  121. package/src/commands/functions.ts +6 -2
  122. package/src/commands/init.ts +13 -9
  123. package/src/commands/migrate.ts +2 -1
  124. package/src/commands/push.ts +57 -1
  125. package/src/compose-services.ts +2 -1
  126. package/src/dev-compose.ts +18 -7
  127. package/src/engine-floor.ts +73 -16
  128. package/src/functions-deno-types.ts +48 -1
  129. package/src/functions-router-gen.ts +113 -81
  130. package/src/kong-config.ts +1 -1
  131. package/src/model-cache.ts +74 -0
  132. package/src/model-hooks.ts +26 -2
  133. package/src/model-versioning.ts +167 -0
  134. package/src/postgres-ctl.ts +103 -9
  135. package/src/preview-config-check.ts +52 -0
  136. package/src/project-config.ts +273 -11
  137. package/src/resolve-target.ts +11 -1
  138. package/src/rest-cache-admin.ts +8 -2
  139. package/src/schema-ast-v2.ts +47 -0
  140. package/src/self-host-compose.ts +204 -27
  141. package/src/studio-admin-roles.ts +16 -2
  142. package/src/type-extractor.ts +281 -2
  143. package/tests/api-config-cache-seed.test.ts +180 -0
  144. package/tests/cache-identity-scope.test.ts +61 -0
  145. package/tests/cache-provider-config.test.ts +132 -0
  146. package/tests/engine-floor.test.ts +43 -0
  147. package/tests/external-database-compose.test.ts +74 -3
  148. package/tests/field-masking-tier.test.ts +3 -3
  149. package/tests/fixtures/identity-scope-corpus.json +42 -0
  150. package/tests/functions-concurrency.test.ts +71 -0
  151. package/tests/init.test.ts +36 -2
  152. package/tests/model-cache-declaration.test.ts +229 -0
  153. package/tests/model-cache-manifest.test.ts +99 -0
  154. package/tests/model-hooks.test.ts +55 -0
  155. package/tests/model-versions.test.ts +229 -0
  156. package/tests/native-keyspace.test.ts +130 -0
  157. package/tests/preview-config-check.test.ts +104 -0
  158. package/tests/rest-cache-admin.test.ts +36 -0
  159. package/tests/runtime-contract.test.ts +176 -22
  160. package/tests/studio-admin-roles.test.ts +32 -0
  161. package/tests/type-extractor.test.ts +113 -0
  162. package/tsconfig.tsbuildinfo +1 -1
@@ -1,4 +1,4 @@
1
1
 
2
- > @supatype/cli@0.2.1 build /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.3.0 build /home/runner/work/supatype/supatype/packages/cli
3
3
  > tsc --project tsconfig.json && node --input-type=module -e "import{cpSync,mkdirSync}from'node:fs';const a='dist/assets';mkdirSync(a,{recursive:true});cpSync('assets/supatype-logo-wordmark.ascii.txt',a+'/supatype-logo-wordmark.ascii.txt')"
4
4
 
@@ -1,14 +1,14 @@
1
1
 
2
- > @supatype/cli@0.2.1 test /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.3.0 test /home/runner/work/supatype/supatype/packages/cli
3
3
  > vitest run
4
4
 
5
5
 
6
6
   RUN  v4.0.18 /home/runner/work/supatype/supatype/packages/cli
7
7
 
8
- ✓ tests/access-composition.test.ts (26 tests) 389ms
9
- ✓ tests/type-extractor.test.ts (44 tests) 484ms
10
- ✓ tests/model-hooks.test.ts (21 tests) 110ms
11
- ✓ tests/runtime-contract.test.ts (49 tests) 212ms
8
+ ✓ tests/type-extractor.test.ts (48 tests) 507ms
9
+ ✓ tests/access-composition.test.ts (26 tests) 397ms
10
+ ✓ tests/model-hooks.test.ts (23 tests) 241ms
11
+ ✓ tests/runtime-contract.test.ts (57 tests) 323ms
12
12
  stdout | tests/init.test.ts > scaffold() > creates all expected files
13
13
   created package.json
14
14
  created supatype.config.ts
@@ -295,14 +295,49 @@
295
295
  created public/.gitkeep
296
296
  created .gitignore
297
297
 
298
- ✓ tests/init.test.ts (26 tests) 108ms
299
- ✓ tests/model-constraints.test.ts (18 tests) 98ms
300
- ✓ tests/external-database-compose.test.ts (17 tests) 15ms
301
- ✓ tests/field-masking-tier.test.ts (16 tests) 20ms
298
+ stdout | tests/init.test.ts > scaffold() > a scaffolded .env never names MinIO or its port
299
+  created package.json
300
+ created supatype.config.ts
301
+ created schema/index.ts
302
+ created .env
303
+ created seed.ts
304
+ created seeds/.gitkeep
305
+ created public/.gitkeep
306
+ created .gitignore
307
+ created package.json
308
+ created supatype.config.ts
309
+ created schema/index.ts
310
+ created .env
311
+ created seed.ts
312
+ created seeds/.gitkeep
313
+ created public/.gitkeep
314
+ created .gitignore
315
+
316
+ stdout | tests/init.test.ts > scaffold() > local storage points at the port the object store actually publishes
317
+  created package.json
318
+ created supatype.config.ts
319
+ created schema/index.ts
320
+ created .env
321
+ created seed.ts
322
+ created seeds/.gitkeep
323
+ created public/.gitkeep
324
+ created .gitignore
325
+
326
+ ✓ tests/init.test.ts (28 tests) 254ms
327
+ ✓ tests/external-database-compose.test.ts (23 tests) 15ms
328
+ ✓ tests/model-constraints.test.ts (18 tests) 174ms
329
+ ✓ tests/model-versions.test.ts (19 tests) 62ms
330
+ ✓ tests/api-config-cache-seed.test.ts (15 tests) 39ms
331
+ ✓ tests/model-cache-declaration.test.ts (18 tests) 102ms
332
+ ✓ tests/field-masking-tier.test.ts (16 tests) 16ms
302
333
 
303
- ✓ tests/dev-ui.test.ts (21 tests) 129ms
334
+ ✓ tests/dev-ui.test.ts (21 tests) 112ms
304
335
 
305
336
  [supatype] Shutting down…
337
+ ✓ tests/hooks-generator.test.ts (7 tests) 8217ms
338
+ ✓ typechecks under strict mode, together with a handler that uses it  2986ms
339
+ ✓ rejects a handler for a table that declares no hook  2753ms
340
+ ✓ typechecks with a validator written the way the docs will show it  2352ms
306
341
  stdout | tests/docker-runtime.test.ts > requireDockerDaemon > exits when the daemon is unavailable
307
342
  
308
343
  Start the Docker daemon (e.g. sudo systemctl start docker), then try again.
@@ -311,53 +346,52 @@
311
346
 
312
347
  docker: daemon down
313
348
 
314
- ✓ tests/docker-runtime.test.ts (10 tests) 26ms
315
- ✓ tests/hooks-generator.test.ts (7 tests) 8413ms
316
- ✓ typechecks under strict mode, together with a handler that uses it  2834ms
317
- ✓ rejects a handler for a table that declares no hook  2770ms
318
- ✓ typechecks with a validator written the way the docs will show it  2745ms
319
- ✓ tests/config.test.ts (19 tests) 8257ms
320
- ✓ loads a valid supatype.config.ts (plain export default, no package imports)  844ms
321
- ✓ normalizes shorthand schema string to { path, pg_schema }  881ms
322
- ✓ loads a supatype.config.js (plain ESM)  818ms
323
- ✓ loads config without a versions section (latest by default)  757ms
324
- ✓ prefers supatype.config.ts over supatype.config.js when both exist  901ms
325
- ✓ supports optional output field in config  843ms
326
- ✓ merges supatype.local.config.ts over base  1667ms
327
- ✓ loads defineConfig import before @supatype/cli is installed (init scaffold)  1527ms
328
- ✓ tests/db-preflight.test.ts (14 tests) 13ms
329
- ✓ tests/field-bounds.test.ts (23 tests) 21ms
330
- ✓ tests/cache-clean.test.ts (8 tests) 2699ms
331
- ✓ keeps pinned versions and removes the rest  908ms
332
- ✓ --force removes pinned versions  870ms
333
- ✓ explicit version removes even when pinned (with warning)  900ms
334
- ✓ tests/functions-deno-types.test.ts (7 tests) 3746ms
335
- ✓ tsc fails with Cannot find name Deno without ambient types  2517ms
336
- ✓ tsc passes for Deno.env after ensureFunctionsDenoTypes  1204ms
337
- ✓ tests/field-bounds-matrix.test.ts (124 tests) 49ms
338
- ✓ tests/external-database-config.test.ts (14 tests) 13ms
339
- ✓ tests/compose-services.test.ts (12 tests) 13ms
340
- ✓ tests/field-validators.test.ts (10 tests) 80ms
341
- ✓ tests/command-chrome-coverage.test.ts (1 test) 19ms
342
- ✓ tests/hook-upload.test.ts (8 tests) 16ms
343
- ✓ tests/env-file.test.ts (9 tests) 18ms
349
+ ✓ tests/docker-runtime.test.ts (10 tests) 18ms
350
+ ✓ tests/config.test.ts (19 tests) 8166ms
351
+ ✓ loads a valid supatype.config.ts (plain export default, no package imports)  865ms
352
+ ✓ normalizes shorthand schema string to { path, pg_schema }  869ms
353
+ ✓ loads a supatype.config.js (plain ESM)  966ms
354
+ ✓ loads config without a versions section (latest by default)  840ms
355
+ ✓ prefers supatype.config.ts over supatype.config.js when both exist  860ms
356
+ ✓ supports optional output field in config  886ms
357
+ ✓ merges supatype.local.config.ts over base  1488ms
358
+ ✓ loads defineConfig import before @supatype/cli is installed (init scaffold)  1378ms
359
+ ✓ tests/db-preflight.test.ts (14 tests) 9ms
360
+ ✓ tests/field-bounds.test.ts (23 tests) 14ms
361
+ ✓ tests/cache-clean.test.ts (8 tests) 2182ms
362
+ ✓ keeps pinned versions and removes the rest  633ms
363
+ ✓ --force removes pinned versions  817ms
364
+ ✓ explicit version removes even when pinned (with warning)  715ms
365
+ ✓ tests/cache-provider-config.test.ts (12 tests) 13ms
366
+ ✓ tests/functions-deno-types.test.ts (7 tests) 2958ms
367
+ ✓ tsc fails with Cannot find name Deno without ambient types  2009ms
368
+ ✓ tsc passes for Deno.env after ensureFunctionsDenoTypes  929ms
369
+ ✓ tests/field-bounds-matrix.test.ts (124 tests) 36ms
370
+ ✓ tests/engine-floor.test.ts (17 tests) 13ms
371
+ ✓ tests/external-database-config.test.ts (14 tests) 20ms
372
+ ✓ tests/compose-services.test.ts (12 tests) 12ms
373
+ ✓ tests/field-validators.test.ts (10 tests) 71ms
374
+ ✓ tests/native-keyspace.test.ts (10 tests) 39ms
375
+ ✓ tests/command-chrome-coverage.test.ts (1 test) 22ms
376
+ ✓ tests/hook-upload.test.ts (8 tests) 13ms
377
+ ✓ tests/env-file.test.ts (9 tests) 16ms
344
378
  stdout | tests/link.test.ts > link model > migrates cloud.json into link.json
345
- stderr | tests/link.test.ts > link model > migrates cloud.json into link.json
346
379
   created package.json
347
380
  created supatype.config.ts
348
- created schema/index.ts
381
+ stderr | tests/link.test.ts > link model > migrates cloud.json into link.json
349
382
  [supatype] Migrated .supatype/cloud.json → .supatype/link.json (legacy files kept; remove manually when ready).
383
+ created schema/index.ts
384
+
350
385
  created .env
351
386
  created seed.ts
352
-
353
387
  created seeds/.gitkeep
354
388
  created public/.gitkeep
355
389
  created .gitignore
356
390
 
357
- ✓ tests/link.test.ts (4 tests) 3807ms
358
- ✓ resolveTarget returns cloud mode with /api/v1 prefix  1230ms
359
- ✓ resolveTarget returns self-host mode with /platform/v1 prefix  1281ms
360
- ✓ targetSchemaRollback posts to /platform/v1 when linked  1279ms
391
+ ✓ tests/link.test.ts (4 tests) 3162ms
392
+ ✓ resolveTarget returns cloud mode with /api/v1 prefix  1108ms
393
+ ✓ resolveTarget returns self-host mode with /platform/v1 prefix  992ms
394
+ ✓ targetSchemaRollback posts to /platform/v1 when linked  1051ms
361
395
  stdout | tests/admin-ensure.test.ts > init admin seed in .env > writes SUPATYPE_ADMIN_* when scaffold options include credentials
362
396
   created package.json
363
397
  created supatype.config.ts
@@ -368,8 +402,8 @@
368
402
  created public/.gitkeep
369
403
  created .gitignore
370
404
 
371
- ✓ tests/admin-ensure.test.ts (10 tests) 166ms
372
- ✓ tests/service-role-check.test.ts (10 tests) 11ms
405
+ ✓ tests/admin-ensure.test.ts (10 tests) 149ms
406
+ ✓ tests/service-role-check.test.ts (10 tests) 13ms
373
407
  stdout | tests/admin-studio-membership.test.ts > first admin user creation > does not write a role into app_metadata
374
408
  [supatype] Admin user "admin@example.com" created (role: admin).
375
409
  [supatype] Log in at /admin after starting the dev server.
@@ -386,47 +420,51 @@
386
420
  [supatype] Admin user "admin@example.com" created (role: admin).
387
421
  [supatype] Log in at /admin after starting the dev server.
388
422
 
389
- ✓ tests/admin-studio-membership.test.ts (5 tests) 470ms
390
- ✓ tests/augmentation-generator.test.ts (6 tests) 23ms
391
- ✓ tests/pull-utils.test.ts (49 tests) 14ms
392
- ✓ tests/schema-sources.test.ts (5 tests) 1531ms
393
- ✓ buildSchemaSourcesPayload includes manifest metadata  734ms
394
- ✓ restore overwrites modified local files  742ms
395
- ✓ tests/keys.test.ts (11 tests) 21707ms
396
- ✓ exits 0 with --secret  2102ms
397
- ✓ outputs ANON_KEY= line  1906ms
398
- ✓ outputs SERVICE_ROLE_KEY= line  1832ms
399
- ✓ ANON_KEY is a valid three-part JWT  1714ms
400
- ✓ SERVICE_ROLE_KEY payload has role: service_role  1673ms
401
- ✓ JWT has exp in the future  1806ms
402
- ✓ --exp-years changes the expiry window  3534ms
403
- ✓ reads JWT_SECRET from environment variable  1820ms
404
- ✓ reads JWT_SECRET from .env file  1825ms
405
- ✓ exits non-zero when no secret is available  1640ms
406
- ✓ keys --help shows --secret and --exp-years options  1844ms
423
+ ✓ tests/admin-studio-membership.test.ts (5 tests) 499ms
424
+ ✓ tests/augmentation-generator.test.ts (6 tests) 13ms
425
+ ✓ tests/pull-utils.test.ts (49 tests) 13ms
426
+ ✓ tests/keys.test.ts (11 tests) 17971ms
427
+ ✓ exits 0 with --secret  1795ms
428
+ ✓ outputs ANON_KEY= line  1603ms
429
+ ✓ outputs SERVICE_ROLE_KEY= line  1405ms
430
+ ✓ ANON_KEY is a valid three-part JWT  1507ms
431
+ ✓ SERVICE_ROLE_KEY payload has role: service_role  1445ms
432
+ ✓ JWT has exp in the future  1351ms
433
+ ✓ --exp-years changes the expiry window  2906ms
434
+ ✓ reads JWT_SECRET from environment variable  1577ms
435
+ ✓ reads JWT_SECRET from .env file  1520ms
436
+ ✓ exits non-zero when no secret is available  1364ms
437
+ ✓ keys --help shows --secret and --exp-years options  1491ms
438
+ ✓ tests/schema-sources.test.ts (5 tests) 1311ms
439
+ ✓ buildSchemaSourcesPayload includes manifest metadata  664ms
440
+ ✓ restore overwrites modified local files  597ms
441
+ ✓ tests/preview-config-check.test.ts (9 tests) 12ms
407
442
  stderr | tests/binary-cache-cloud-overrides.test.ts > isLinkedToCloudProject > is true when .supatype/cloud.json has projectSlug
408
443
  [supatype] Migrated .supatype/cloud.json → .supatype/link.json (legacy files kept; remove manually when ready).
409
444
 
410
- ✓ tests/binary-cache-cloud-overrides.test.ts (11 tests) 20ms
445
+ ✓ tests/binary-cache-cloud-overrides.test.ts (11 tests) 21ms
446
+ ✓ tests/homebrew-formula.test.ts (4 tests) 223ms
447
+ ✓ tests/model-cache-manifest.test.ts (12 tests) 10ms
411
448
  ✓ tests/local-server-image-env.test.ts (5 tests) 12ms
412
- ✓ tests/homebrew-formula.test.ts (4 tests) 252ms
413
- ✓ tests/minisign.test.ts (5 tests) 17ms
414
- ✓ tests/local-secrets.test.ts (5 tests) 11ms
415
- ✓ tests/engine-floor.test.ts (11 tests) 12ms
416
- ✓ tests/self-host-keys.test.ts (7 tests) 13ms
417
- ✓ tests/readiness-poll.test.ts (3 tests) 333ms
449
+ ✓ tests/minisign.test.ts (5 tests) 11ms
450
+ ✓ tests/local-secrets.test.ts (5 tests) 10ms
451
+ ✓ tests/functions-concurrency.test.ts (6 tests) 4ms
452
+ ✓ tests/readiness-poll.test.ts (3 tests) 330ms
418
453
  ✓ ends promptly when it carries a deadline  326ms
419
- ✓ tests/api-schemas.test.ts (10 tests) 14ms
454
+ ✓ tests/self-host-keys.test.ts (7 tests) 14ms
455
+ ✓ tests/api-schemas.test.ts (10 tests) 6ms
420
456
  stdout | tests/storage-provision.test.ts > provisionBuckets > POSTs each bucket to the storage API
421
457
  [supatype] Storage bucket "photos" ready.
422
458
 
423
459
  stdout | tests/storage-provision.test.ts > provisionBuckets > POSTs each bucket to the storage API
424
460
  [supatype] Storage bucket "avatars" ready.
425
461
 
426
- ✓ tests/cached-artifact-format.test.ts (7 tests) 16ms
427
- ✓ tests/storage-provision.test.ts (6 tests) 14ms
428
- ✓ tests/target-client-refresh.test.ts (3 tests) 12ms
429
- ✓ tests/proxy-dev-app.test.ts (7 tests) 7ms
462
+ ✓ tests/storage-provision.test.ts (6 tests) 12ms
463
+ ✓ tests/cached-artifact-format.test.ts (7 tests) 10ms
464
+ ✓ tests/cache-identity-scope.test.ts (33 tests) 9ms
465
+ ✓ tests/target-client-refresh.test.ts (3 tests) 22ms
466
+ ✓ tests/studio-admin-roles.test.ts (6 tests) 8ms
467
+ ✓ tests/proxy-dev-app.test.ts (7 tests) 5ms
430
468
  stdout | tests/app-command.test.ts > supatype app add --static > sets app.mode=static and static_dir in supatype.config.ts
431
469
   created package.json
432
470
  created supatype.config.ts
@@ -447,80 +485,79 @@
447
485
  created public/.gitkeep
448
486
  created .gitignore
449
487
 
450
- ✓ tests/service-role-routes.test.ts (4 tests) 2190ms
451
- ✓ reads the declared list  675ms
452
- ✓ is an empty list when a project declares none  826ms
453
- ✓ sends what the project declared, hook entries included  685ms
454
- ✓ tests/app-command.test.ts (2 tests) 3695ms
455
- ✓ sets app.mode=static and static_dir in supatype.config.ts  1771ms
456
- ✓ creates the static directory when missing  1921ms
457
- ✓ tests/init-dependency-versions.test.ts (4 tests) 43ms
458
- ✓ tests/compose-parsable-defaults.test.ts (2 tests) 13ms
459
- ✓ tests/type-resolver.test.ts (2 tests) 19ms
460
- ✓ tests/engine-push-output.test.ts (7 tests) 10ms
461
- ✓ tests/cli-help.test.ts (16 tests) 28425ms
462
- ✓ --help lists all top-level commands  1744ms
463
- ✓ --version prints package.json version  1808ms
464
- ✓ self-update --help describes the command  1649ms
465
- ✓ init --help describes the init command  1945ms
466
- ✓ push --help describes the push command and --yes flag  1831ms
467
- ✓ diff --help describes the diff command  1706ms
468
- ✓ pull --help describes scaffold pull command  1765ms
469
- ✓ doctor --help describes drift report command  1814ms
470
- ✓ introspect --help describes database introspection command  1654ms
471
- ✓ adopt --help describes adoption ceremony command  1823ms
472
- ✓ reset --help shows --yes flag  1728ms
473
- ✓ app --help describes the app command with add/remove subcommands  1722ms
474
- ✓ app add --help shows --static and --port options  1724ms
475
- ✓ self-host --help shows compose only (legacy commands hidden)  1791ms
476
- ✓ self-host compose --help shows compose subcommands  1944ms
477
- ✓ unknown command exits non-zero  1769ms
478
- ✓ tests/command-chrome-wrap.test.ts (3 tests) 9ms
479
- ✓ tests/cli-install-method.test.ts (8 tests) 8ms
488
+ ✓ tests/service-role-routes.test.ts (4 tests) 1804ms
489
+ ✓ reads the declared list  608ms
490
+ ✓ is an empty list when a project declares none  599ms
491
+ ✓ sends what the project declared, hook entries included  592ms
492
+ ✓ tests/app-command.test.ts (2 tests) 3147ms
493
+ ✓ sets app.mode=static and static_dir in supatype.config.ts  1581ms
494
+ ✓ creates the static directory when missing  1564ms
495
+ ✓ tests/compose-parsable-defaults.test.ts (2 tests) 7ms
496
+ ✓ tests/rest-cache-admin.test.ts (3 tests) 45ms
497
+ ✓ tests/init-dependency-versions.test.ts (4 tests) 60ms
498
+ ✓ tests/type-resolver.test.ts (2 tests) 24ms
499
+ ✓ tests/engine-push-output.test.ts (7 tests) 8ms
500
+ ✓ tests/cli-help.test.ts (16 tests) 23650ms
501
+ ✓ --help lists all top-level commands  1432ms
502
+ ✓ --version prints package.json version  1508ms
503
+ ✓ self-update --help describes the command  1414ms
504
+ ✓ init --help describes the init command  1625ms
505
+ ✓ push --help describes the push command and --yes flag  1503ms
506
+ ✓ diff --help describes the diff command  1457ms
507
+ ✓ pull --help describes scaffold pull command  1344ms
508
+ ✓ doctor --help describes drift report command  1512ms
509
+ ✓ introspect --help describes database introspection command  1351ms
510
+ ✓ adopt --help describes adoption ceremony command  1533ms
511
+ ✓ reset --help shows --yes flag  1421ms
512
+ ✓ app --help describes the app command with add/remove subcommands  1491ms
513
+ ✓ app add --help shows --static and --port options  1418ms
514
+ ✓ self-host --help shows compose only (legacy commands hidden)  1477ms
515
+ ✓ self-host compose --help shows compose subcommands  1538ms
516
+ ✓ unknown command exits non-zero  1613ms
517
+ ✓ tests/command-chrome-wrap.test.ts (3 tests) 6ms
518
+ ✓ tests/cli-install-method.test.ts (8 tests) 6ms
480
519
  ✓ tests/port-in-use.test.ts (4 tests) 33ms
481
- ✓ tests/tsx-runner.test.ts (7 tests) 3630ms
482
- ✓ evaluates a simple expression and returns stdout  457ms
483
- ✓ evaluates TypeScript syntax (type annotations)  488ms
484
- ✓ can serialize a JSON object to stdout  479ms
485
- ✓ returns non-zero exit code on syntax error  544ms
486
- ✓ returns non-zero exit code on runtime error  511ms
487
- ✓ captures stderr separately from stdout  478ms
488
- ✓ runs a .ts file and returns its stdout  667ms
489
- ✓ tests/archive-name-alias.test.ts (4 tests) 10ms
490
- ✓ tests/ensure-binary.test.ts (2 tests) 12ms
491
- ✓ tests/init-project-detect.test.ts (4 tests) 14ms
520
+ ✓ tests/archive-name-alias.test.ts (4 tests) 6ms
492
521
  ✓ tests/doctor-render.test.ts (3 tests) 7ms
522
+ ✓ tests/ensure-binary.test.ts (2 tests) 12ms
523
+ ✓ tests/tsx-runner.test.ts (7 tests) 3052ms
524
+ ✓ evaluates a simple expression and returns stdout  383ms
525
+ ✓ evaluates TypeScript syntax (type annotations)  367ms
526
+ ✓ can serialize a JSON object to stdout  398ms
527
+ ✓ returns non-zero exit code on syntax error  381ms
528
+ ✓ returns non-zero exit code on runtime error  452ms
529
+ ✓ captures stderr separately from stdout  469ms
530
+ ✓ runs a .ts file and returns its stdout  597ms
531
+ ✓ tests/init-project-detect.test.ts (4 tests) 8ms
493
532
  ✓ tests/doctor-service-role.test.ts (4 tests) 7ms
494
533
  ✓ tests/dev-ports-owner.test.ts (6 tests) 6ms
495
- ✓ tests/required-host-components.test.ts (4 tests) 6ms
496
- ✓ tests/ui-messages.test.ts (5 tests) 8ms
497
- ✓ tests/normalize-admin-config.test.ts (1 test) 9ms
498
- ✓ tests/ui-confirm.test.ts (3 tests) 10ms
499
- ✓ tests/docker-postgres.test.ts (5 tests) 6ms
500
- ✓ tests/binary-download-lock.test.ts (2 tests) 15ms
534
+ ✓ tests/required-host-components.test.ts (4 tests) 7ms
535
+ ✓ tests/ui-messages.test.ts (5 tests) 5ms
536
+ ✓ tests/normalize-admin-config.test.ts (1 test) 8ms
537
+ ✓ tests/ui-confirm.test.ts (3 tests) 16ms
538
+ ✓ tests/docker-postgres.test.ts (5 tests) 5ms
539
+ ✓ tests/binary-download-lock.test.ts (2 tests) 7ms
501
540
  ✓ tests/dev-session-lock.test.ts (2 tests) 6ms
502
- ✓ tests/dev-ports.test.ts (3 tests) 7ms
541
+ ✓ tests/dev-ports.test.ts (3 tests) 6ms
503
542
  ✓ tests/route-manifest.test.ts (1 test) 5ms
504
- ✓ tests/dev-ready-panel.test.ts (2 tests) 6ms
505
- ✓ tests/config-load-failure.test.ts (2 tests) 4661ms
506
- ✓ is reported, rather than treated as absent  2711ms
507
- ✓ does not stop the CLI working with no config at all  1946ms
508
- ✓ tests/studio-admin-roles.test.ts (3 tests) 4ms
543
+ ✓ tests/config-load-failure.test.ts (2 tests) 3799ms
544
+ ✓ is reported, rather than treated as absent  2235ms
545
+ ✓ does not stop the CLI working with no config at all  1561ms
546
+ ✓ tests/dev-ready-panel.test.ts (2 tests) 4ms
509
547
  ✓ tests/realtime-launch.test.ts (1 test) 6ms
510
- ✓ tests/seed-discover.test.ts (2 tests) 28ms
511
- ✓ tests/release-pins.test.ts (2 tests) 4ms
512
- ✓ tests/ensure-dev-api-config.test.ts (1 test) 6ms
513
- ✓ tests/rest-cache-admin.test.ts (1 test) 44ms
548
+ ✓ tests/release-pins.test.ts (2 tests) 5ms
549
+ ✓ tests/ensure-dev-api-config.test.ts (1 test) 4ms
550
+ ✓ tests/seed-discover.test.ts (2 tests) 22ms
514
551
  ✓ tests/init-package-json.test.ts (1 test) 4ms
552
+ ✓ tests/resolve-api-url.test.ts (2 tests) 4ms
553
+ ✓ tests/migrate-from-v1.test.ts (1 test) 12ms
515
554
  ✓ tests/pg-spawn-env.test.ts (2 tests) 5ms
516
- ✓ tests/migrate-from-v1.test.ts (1 test) 13ms
517
- ✓ tests/resolve-api-url.test.ts (2 tests) 7ms
518
555
  ✓ tests/cli-package-version.test.ts (1 test) 4ms
556
+ ✓ tests/stdin-after-ink.test.ts (1 test) 3ms
519
557
  ✓ tests/postgres-archive-tag.test.ts (1 test) 3ms
520
- ✓ tests/stdin-after-ink.test.ts (1 test) 4ms
521
558
 
522
-  Test Files  85 passed (85)
523
-  Tests  819 passed (819)
524
-  Start at  08:09:42
525
-  Duration  58.92s (transform 8.11s, setup 0ms, import 58.53s, tests 96.41s, environment 19ms)
559
+  Test Files  94 passed (94)
560
+  Tests  986 passed (986)
561
+  Start at  09:24:20
562
+  Duration  54.40s (transform 9.67s, setup 0ms, import 58.44s, tests 83.74s, environment 19ms)
526
563
 
@@ -1,4 +1,4 @@
1
1
 
2
- > @supatype/cli@0.2.1 typecheck /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.3.0 typecheck /home/runner/work/supatype/supatype/packages/cli
3
3
  > tsc --project tsconfig.json --noEmit && tsc --project tests/tsconfig.json --noEmit
4
4
 
@@ -0,0 +1,34 @@
1
+ export interface CacheSeedResult {
2
+ /** Tables switched on by this push because the schema had just started declaring them. */
3
+ seeded: string[];
4
+ /** True when every declared table is switched off project-wide by `cache_max_ttl: 0`. */
5
+ ttlIsOff: boolean;
6
+ /** Tables the schema declares, whether or not this push changed anything. */
7
+ declared: string[];
8
+ }
9
+ /**
10
+ * Bring the local allowlist in line with new declarations, and report what is still in the way.
11
+ *
12
+ * Returns null when there is no file to seed — a cloud-only project, or a stack that has never
13
+ * been started. A missing file is not an error here: the file is the local server's, and `dev`
14
+ * creates it.
15
+ */
16
+ export declare function seedApiConfigCache(cwd: string, ast: unknown): CacheSeedResult | null;
17
+ /**
18
+ * §13.4's note, in the words of the project that will read it — or null when there is nothing to
19
+ * say.
20
+ *
21
+ * A free project with `cache` in its schema has asked for the paid feature **in code**. That is
22
+ * better qualified than any banner, and it is why this names the tables: "your cache is off" is a
23
+ * fact about the plan, while "posts and profiles are served from PostgREST on every request" is a
24
+ * fact about their project.
25
+ *
26
+ * Said once per push and never as an error. Declaring a cache on a tier that does not honour it is
27
+ * a correct declaration, not a mistake — the tier decides what runs, not what a schema may say —
28
+ * and a push that failed over it would be punishing someone for writing down their intent.
29
+ */
30
+ export declare function freeTierCacheNote(report: {
31
+ tables?: string[];
32
+ honoured?: boolean;
33
+ } | undefined): string | null;
34
+ //# sourceMappingURL=api-config-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-config-cache.d.ts","sourceRoot":"","sources":["../src/api-config-cache.ts"],"names":[],"mappings":"AAgCA,MAAM,WAAW,eAAe;IAC9B,0FAA0F;IAC1F,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,yFAAyF;IACzF,QAAQ,EAAE,OAAO,CAAA;IACjB,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI,CA4CpF;AAmBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAW9G"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Seed `.supatype/api-config.json`'s cache allowlist from what the schema declares.
3
+ *
4
+ * The declaration is a **ceiling**, not a switch: the server reads `cache` on the manifest as what
5
+ * *may* be cached and `cache_tables` as what *is*. Both are needed, and only one of them is written
6
+ * by a push — which on a local stack means a developer who wrote `cache: { enabled: true }`, pushed,
7
+ * and called `.cache({ server: true })` gets a BYPASS and no explanation short of opening Studio.
8
+ *
9
+ * So a push turns on what the schema newly declares, and **never touches an entry that already
10
+ * exists**. That asymmetry is the whole design:
11
+ *
12
+ * - Seeding a new table is not a decision anyone made differently. The schema is the only thing
13
+ * that has ever said anything about it.
14
+ * - Rewriting an existing entry is `push resets to declared`, which §13.2 rejects by name: an
15
+ * operator narrows a table during an incident, someone pushes an unrelated model, and the
16
+ * mitigation is reverted at the worst possible moment with nothing in the output to say so.
17
+ *
18
+ * It follows that a table dropped from the schema keeps its entry here. That is not a leak: the
19
+ * server intersects the allowlist with the declaration on every request, so an entry with no
20
+ * declaration behind it caches nothing. Removing it would be tidier and would also mean a push
21
+ * silently editing entries it did not create.
22
+ */
23
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
24
+ import { dirname, join } from "node:path";
25
+ import { manifestCache } from "./model-cache.js";
26
+ /**
27
+ * Bring the local allowlist in line with new declarations, and report what is still in the way.
28
+ *
29
+ * Returns null when there is no file to seed — a cloud-only project, or a stack that has never
30
+ * been started. A missing file is not an error here: the file is the local server's, and `dev`
31
+ * creates it.
32
+ */
33
+ export function seedApiConfigCache(cwd, ast) {
34
+ const declared = manifestCache(ast);
35
+ const declaredTables = Object.keys(declared).filter((t) => declared[t]?.enabled !== false).sort();
36
+ const path = join(cwd, ".supatype", "api-config.json");
37
+ if (!existsSync(path))
38
+ return null;
39
+ let parsed;
40
+ try {
41
+ parsed = JSON.parse(readFileSync(path, "utf8"));
42
+ }
43
+ catch {
44
+ // Malformed: the server reports this far more clearly than a push can, and rewriting it here
45
+ // would destroy whatever the author was in the middle of.
46
+ return null;
47
+ }
48
+ if (typeof parsed !== "object" || parsed === null)
49
+ return null;
50
+ const rest = asRecord(parsed["rest"]);
51
+ if (!rest)
52
+ return null;
53
+ const tables = asRecord(rest["cache_tables"]) ?? {};
54
+ const seeded = [];
55
+ for (const table of declaredTables) {
56
+ if (table in tables)
57
+ continue;
58
+ tables[table] = seedEntry(declared[table]);
59
+ seeded.push(table);
60
+ }
61
+ if (seeded.length > 0) {
62
+ rest["cache_tables"] = tables;
63
+ parsed["rest"] = rest;
64
+ mkdirSync(dirname(path), { recursive: true });
65
+ writeFileSync(path, `${JSON.stringify(parsed, null, 2)}\n`, "utf8");
66
+ }
67
+ const ttl = rest["cache_max_ttl"];
68
+ return {
69
+ seeded,
70
+ // The project-wide TTL is deliberately not written. Zero is an operator's off switch, and a
71
+ // push that turned it on would be overriding a decision rather than filling in a blank — so it
72
+ // is reported instead, where the person who can decide is reading.
73
+ ttlIsOff: declaredTables.length > 0 && (typeof ttl !== "number" || ttl <= 0),
74
+ declared: declaredTables,
75
+ };
76
+ }
77
+ /**
78
+ * What a newly declared table is switched on as.
79
+ *
80
+ * `allow_public` follows the declaration rather than defaulting off: the schema saying `public` is
81
+ * a considered statement that this table's reads are the same for everyone, and `push` has already
82
+ * refused it where the read rule varies by caller. Defaulting it off would make the declaration
83
+ * mean nothing until someone ticked a box that the schema had already justified.
84
+ */
85
+ function seedEntry(entry) {
86
+ return { enabled: true, allow_public: entry.public === true };
87
+ }
88
+ function asRecord(value) {
89
+ if (typeof value !== "object" || value === null || Array.isArray(value))
90
+ return null;
91
+ return value;
92
+ }
93
+ /**
94
+ * §13.4's note, in the words of the project that will read it — or null when there is nothing to
95
+ * say.
96
+ *
97
+ * A free project with `cache` in its schema has asked for the paid feature **in code**. That is
98
+ * better qualified than any banner, and it is why this names the tables: "your cache is off" is a
99
+ * fact about the plan, while "posts and profiles are served from PostgREST on every request" is a
100
+ * fact about their project.
101
+ *
102
+ * Said once per push and never as an error. Declaring a cache on a tier that does not honour it is
103
+ * a correct declaration, not a mistake — the tier decides what runs, not what a schema may say —
104
+ * and a push that failed over it would be punishing someone for writing down their intent.
105
+ */
106
+ export function freeTierCacheNote(report) {
107
+ // Absent, rather than `honoured: false`, is a control plane too old to answer. Silence is the
108
+ // only honest response to a question that was never asked.
109
+ if (!report || report.honoured !== false)
110
+ return null;
111
+ const tables = (report.tables ?? []).filter((t) => typeof t === "string" && t.length > 0);
112
+ if (tables.length === 0)
113
+ return null;
114
+ return (`${listed(tables)} declare a cache in your schema. On the free tier these are served from ` +
115
+ `PostgREST on every request — the declaration is stored and takes effect on a paid plan.`);
116
+ }
117
+ /** "posts", "posts and profiles", "posts, profiles and tags". */
118
+ function listed(tables) {
119
+ if (tables.length === 1)
120
+ return tables[0];
121
+ return `${tables.slice(0, -1).join(", ")} and ${tables[tables.length - 1]}`;
122
+ }
123
+ //# sourceMappingURL=api-config-cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-config-cache.js","sourceRoot":"","sources":["../src/api-config-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAA2B,MAAM,kBAAkB,CAAA;AAiBzE;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAW,EAAE,GAAY;IAC1D,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,CAAA;IACnC,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,Q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