@supatype/cli 0.2.1 โ†’ 0.3.1

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 (173) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-test.log +193 -157
  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/admin.d.ts.map +1 -1
  20. package/dist/commands/admin.js +21 -4
  21. package/dist/commands/admin.js.map +1 -1
  22. package/dist/commands/cache.d.ts +1 -1
  23. package/dist/commands/cache.js +3 -3
  24. package/dist/commands/cache.js.map +1 -1
  25. package/dist/commands/cloud.d.ts.map +1 -1
  26. package/dist/commands/cloud.js +2 -1
  27. package/dist/commands/cloud.js.map +1 -1
  28. package/dist/commands/deploy.d.ts.map +1 -1
  29. package/dist/commands/deploy.js +2 -1
  30. package/dist/commands/deploy.js.map +1 -1
  31. package/dist/commands/dev.d.ts.map +1 -1
  32. package/dist/commands/dev.js +61 -8
  33. package/dist/commands/dev.js.map +1 -1
  34. package/dist/commands/diff.d.ts.map +1 -1
  35. package/dist/commands/diff.js +2 -1
  36. package/dist/commands/diff.js.map +1 -1
  37. package/dist/commands/functions.d.ts.map +1 -1
  38. package/dist/commands/functions.js +6 -2
  39. package/dist/commands/functions.js.map +1 -1
  40. package/dist/commands/init.d.ts.map +1 -1
  41. package/dist/commands/init.js +13 -9
  42. package/dist/commands/init.js.map +1 -1
  43. package/dist/commands/keys.d.ts +35 -0
  44. package/dist/commands/keys.d.ts.map +1 -1
  45. package/dist/commands/keys.js +90 -6
  46. package/dist/commands/keys.js.map +1 -1
  47. package/dist/commands/migrate.d.ts.map +1 -1
  48. package/dist/commands/migrate.js +2 -1
  49. package/dist/commands/migrate.js.map +1 -1
  50. package/dist/commands/push.d.ts.map +1 -1
  51. package/dist/commands/push.js +61 -1
  52. package/dist/commands/push.js.map +1 -1
  53. package/dist/compose-services.d.ts.map +1 -1
  54. package/dist/compose-services.js +2 -1
  55. package/dist/compose-services.js.map +1 -1
  56. package/dist/dev-compose.d.ts +13 -0
  57. package/dist/dev-compose.d.ts.map +1 -1
  58. package/dist/dev-compose.js +119 -16
  59. package/dist/dev-compose.js.map +1 -1
  60. package/dist/engine-floor.d.ts +11 -1
  61. package/dist/engine-floor.d.ts.map +1 -1
  62. package/dist/engine-floor.js +49 -16
  63. package/dist/engine-floor.js.map +1 -1
  64. package/dist/functions-deno-types.d.ts +9 -0
  65. package/dist/functions-deno-types.d.ts.map +1 -1
  66. package/dist/functions-deno-types.js +45 -1
  67. package/dist/functions-deno-types.js.map +1 -1
  68. package/dist/functions-router-gen.d.ts.map +1 -1
  69. package/dist/functions-router-gen.js +113 -81
  70. package/dist/functions-router-gen.js.map +1 -1
  71. package/dist/kong-config.d.ts +1 -1
  72. package/dist/model-cache.d.ts +44 -0
  73. package/dist/model-cache.d.ts.map +1 -0
  74. package/dist/model-cache.js +106 -0
  75. package/dist/model-cache.js.map +1 -0
  76. package/dist/model-hooks.d.ts +5 -0
  77. package/dist/model-hooks.d.ts.map +1 -1
  78. package/dist/model-hooks.js +29 -1
  79. package/dist/model-hooks.js.map +1 -1
  80. package/dist/model-versioning.d.ts +80 -0
  81. package/dist/model-versioning.d.ts.map +1 -0
  82. package/dist/model-versioning.js +140 -0
  83. package/dist/model-versioning.js.map +1 -0
  84. package/dist/postgres-ctl.d.ts +55 -0
  85. package/dist/postgres-ctl.d.ts.map +1 -1
  86. package/dist/postgres-ctl.js +84 -8
  87. package/dist/postgres-ctl.js.map +1 -1
  88. package/dist/preview-config-check.d.ts +21 -0
  89. package/dist/preview-config-check.d.ts.map +1 -0
  90. package/dist/preview-config-check.js +47 -0
  91. package/dist/preview-config-check.js.map +1 -0
  92. package/dist/project-config.d.ts +182 -5
  93. package/dist/project-config.d.ts.map +1 -1
  94. package/dist/project-config.js +125 -8
  95. package/dist/project-config.js.map +1 -1
  96. package/dist/resolve-target.d.ts +9 -0
  97. package/dist/resolve-target.d.ts.map +1 -1
  98. package/dist/resolve-target.js.map +1 -1
  99. package/dist/rest-cache-admin.d.ts.map +1 -1
  100. package/dist/rest-cache-admin.js +6 -2
  101. package/dist/rest-cache-admin.js.map +1 -1
  102. package/dist/schema-ast-v2.d.ts +32 -1
  103. package/dist/schema-ast-v2.d.ts.map +1 -1
  104. package/dist/schema-ast-v2.js +14 -1
  105. package/dist/schema-ast-v2.js.map +1 -1
  106. package/dist/self-host-compose.d.ts +20 -1
  107. package/dist/self-host-compose.d.ts.map +1 -1
  108. package/dist/self-host-compose.js +227 -29
  109. package/dist/self-host-compose.js.map +1 -1
  110. package/dist/studio-admin-roles.d.ts +8 -1
  111. package/dist/studio-admin-roles.d.ts.map +1 -1
  112. package/dist/studio-admin-roles.js +16 -2
  113. package/dist/studio-admin-roles.js.map +1 -1
  114. package/dist/type-extractor.d.ts +7 -0
  115. package/dist/type-extractor.d.ts.map +1 -1
  116. package/dist/type-extractor.js +234 -3
  117. package/dist/type-extractor.js.map +1 -1
  118. package/package.json +2 -2
  119. package/src/api-config-cache.ts +142 -0
  120. package/src/cache-identity-scope.ts +92 -0
  121. package/src/cache-provider.ts +61 -0
  122. package/src/cli-version-embedded.ts +1 -1
  123. package/src/commands/add.ts +1 -1
  124. package/src/commands/admin.ts +23 -6
  125. package/src/commands/cache.ts +3 -3
  126. package/src/commands/cloud.ts +2 -1
  127. package/src/commands/deploy.ts +2 -1
  128. package/src/commands/dev.ts +68 -7
  129. package/src/commands/diff.ts +2 -1
  130. package/src/commands/functions.ts +6 -2
  131. package/src/commands/init.ts +13 -9
  132. package/src/commands/keys.ts +112 -7
  133. package/src/commands/migrate.ts +2 -1
  134. package/src/commands/push.ts +68 -1
  135. package/src/compose-services.ts +2 -1
  136. package/src/dev-compose.ts +151 -15
  137. package/src/engine-floor.ts +73 -16
  138. package/src/functions-deno-types.ts +48 -1
  139. package/src/functions-router-gen.ts +113 -81
  140. package/src/kong-config.ts +1 -1
  141. package/src/model-cache.ts +122 -0
  142. package/src/model-hooks.ts +26 -2
  143. package/src/model-versioning.ts +167 -0
  144. package/src/postgres-ctl.ts +103 -9
  145. package/src/preview-config-check.ts +52 -0
  146. package/src/project-config.ts +273 -11
  147. package/src/resolve-target.ts +11 -1
  148. package/src/rest-cache-admin.ts +8 -2
  149. package/src/schema-ast-v2.ts +47 -0
  150. package/src/self-host-compose.ts +250 -29
  151. package/src/studio-admin-roles.ts +16 -2
  152. package/src/type-extractor.ts +281 -2
  153. package/tests/api-config-cache-seed.test.ts +180 -0
  154. package/tests/cache-identity-scope.test.ts +61 -0
  155. package/tests/cache-provider-config.test.ts +132 -0
  156. package/tests/engine-floor.test.ts +43 -0
  157. package/tests/external-database-compose.test.ts +74 -3
  158. package/tests/field-masking-tier.test.ts +3 -3
  159. package/tests/fixtures/identity-scope-corpus.json +42 -0
  160. package/tests/functions-concurrency.test.ts +71 -0
  161. package/tests/init.test.ts +36 -2
  162. package/tests/keys-write.test.ts +148 -0
  163. package/tests/model-cache-declaration.test.ts +229 -0
  164. package/tests/model-cache-manifest.test.ts +99 -0
  165. package/tests/model-hooks.test.ts +55 -0
  166. package/tests/model-versions.test.ts +229 -0
  167. package/tests/native-keyspace.test.ts +130 -0
  168. package/tests/preview-config-check.test.ts +104 -0
  169. package/tests/rest-cache-admin.test.ts +36 -0
  170. package/tests/runtime-contract.test.ts +176 -22
  171. package/tests/studio-admin-roles.test.ts +32 -0
  172. package/tests/type-extractor.test.ts +113 -0
  173. 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.1 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.1 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) 296ms
9
+ โœ“ tests/access-composition.test.ts (26 tests) 223ms
10
+ โœ“ tests/model-hooks.test.ts (23 tests) 85ms
11
+ โœ“ tests/runtime-contract.test.ts (57 tests) 136ms
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
302
315
 
303
- โœ“ tests/dev-ui.test.ts (21 tests) 129ms
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) 178ms
327
+ โœ“ tests/external-database-compose.test.ts (23 tests) 10ms
328
+ โœ“ tests/model-constraints.test.ts (18 tests) 146ms
329
+ โœ“ tests/model-versions.test.ts (19 tests) 68ms
330
+ โœ“ tests/api-config-cache-seed.test.ts (15 tests) 33ms
331
+ โœ“ tests/model-cache-declaration.test.ts (18 tests) 83ms
332
+ โœ“ tests/field-masking-tier.test.ts (16 tests) 24ms
333
+
334
+ โœ“ tests/dev-ui.test.ts (21 tests) 92ms
304
335
 
305
336
  [supatype] Shutting downโ€ฆ
337
+ โœ“ tests/hooks-generator.test.ts (7 tests) 6819ms
338
+ โœ“ typechecks under strict mode, together with a handler that uses it  2673ms
339
+ โœ“ rejects a handler for a table that declares no hook  2226ms
340
+ โœ“ typechecks with a validator written the way the docs will show it  1871ms
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,53 @@
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) 14ms
350
+ โœ“ tests/config.test.ts (19 tests) 6870ms
351
+ โœ“ loads a valid supatype.config.ts (plain export default, no package imports)  881ms
352
+ โœ“ normalizes shorthand schema string to { path, pg_schema }  904ms
353
+ โœ“ loads a supatype.config.js (plain ESM)  821ms
354
+ โœ“ loads config without a versions section (latest by default)  791ms
355
+ โœ“ prefers supatype.config.ts over supatype.config.js when both exist  679ms
356
+ โœ“ supports optional output field in config  728ms
357
+ โœ“ merges supatype.local.config.ts over base  1156ms
358
+ โœ“ loads defineConfig import before @supatype/cli is installed (init scaffold)  898ms
359
+ โœ“ tests/db-preflight.test.ts (14 tests) 7ms
360
+ โœ“ tests/keys-write.test.ts (11 tests) 13ms
361
+ โœ“ tests/field-bounds.test.ts (23 tests) 9ms
362
+ โœ“ tests/cache-clean.test.ts (8 tests) 1641ms
363
+ โœ“ keeps pinned versions and removes the rest  545ms
364
+ โœ“ --force removes pinned versions  543ms
365
+ โœ“ explicit version removes even when pinned (with warning)  525ms
366
+ โœ“ tests/functions-deno-types.test.ts (7 tests) 2130ms
367
+ โœ“ tsc fails with Cannot find name Deno without ambient types  1467ms
368
+ โœ“ tsc passes for Deno.env after ensureFunctionsDenoTypes  648ms
369
+ โœ“ tests/cache-provider-config.test.ts (12 tests) 10ms
370
+ โœ“ tests/field-bounds-matrix.test.ts (124 tests) 21ms
371
+ โœ“ tests/engine-floor.test.ts (17 tests) 11ms
372
+ โœ“ tests/external-database-config.test.ts (14 tests) 8ms
373
+ โœ“ tests/compose-services.test.ts (12 tests) 9ms
374
+ โœ“ tests/field-validators.test.ts (10 tests) 45ms
375
+ โœ“ tests/native-keyspace.test.ts (10 tests) 29ms
376
+ โœ“ tests/command-chrome-coverage.test.ts (1 test) 17ms
377
+ โœ“ tests/hook-upload.test.ts (8 tests) 10ms
378
+ โœ“ tests/env-file.test.ts (9 tests) 12ms
344
379
  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
380
   created package.json
381
+ stderr | tests/link.test.ts > link model > migrates cloud.json into link.json
382
+ [supatype] Migrated .supatype/cloud.json โ†’ .supatype/link.json (legacy files kept; remove manually when ready).
347
383
  created supatype.config.ts
384
+
348
385
  created schema/index.ts
349
- [supatype] Migrated .supatype/cloud.json โ†’ .supatype/link.json (legacy files kept; remove manually when ready).
350
386
  created .env
351
387
  created seed.ts
352
-
353
388
  created seeds/.gitkeep
354
389
  created public/.gitkeep
355
390
  created .gitignore
356
391
 
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
392
+ โœ“ tests/link.test.ts (4 tests) 2351ms
393
+ โœ“ resolveTarget returns cloud mode with /api/v1 prefix  769ms
394
+ โœ“ resolveTarget returns self-host mode with /platform/v1 prefix  770ms
395
+ โœ“ targetSchemaRollback posts to /platform/v1 when linked  802ms
361
396
  stdout | tests/admin-ensure.test.ts > init admin seed in .env > writes SUPATYPE_ADMIN_* when scaffold options include credentials
362
397
   created package.json
363
398
  created supatype.config.ts
@@ -368,8 +403,8 @@
368
403
  created public/.gitkeep
369
404
  created .gitignore
370
405
 
371
- โœ“ tests/admin-ensure.test.ts (10 tests) 166ms
372
- โœ“ tests/service-role-check.test.ts (10 tests) 11ms
406
+ โœ“ tests/admin-ensure.test.ts (10 tests) 143ms
407
+ โœ“ tests/service-role-check.test.ts (10 tests) 9ms
373
408
  stdout | tests/admin-studio-membership.test.ts > first admin user creation > does not write a role into app_metadata
374
409
  [supatype] Admin user "admin@example.com" created (role: admin).
375
410
  [supatype] Log in at /admin after starting the dev server.
@@ -386,47 +421,51 @@
386
421
  [supatype] Admin user "admin@example.com" created (role: admin).
387
422
  [supatype] Log in at /admin after starting the dev server.
388
423
 
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
424
+ โœ“ tests/admin-studio-membership.test.ts (5 tests) 397ms
425
+ โœ“ tests/augmentation-generator.test.ts (6 tests) 12ms
426
+ โœ“ tests/pull-utils.test.ts (49 tests) 10ms
427
+ โœ“ tests/keys.test.ts (11 tests) 12833ms
428
+ โœ“ exits 0 with --secret  1269ms
429
+ โœ“ outputs ANON_KEY= line  1068ms
430
+ โœ“ outputs SERVICE_ROLE_KEY= line  1008ms
431
+ โœ“ ANON_KEY is a valid three-part JWT  1079ms
432
+ โœ“ SERVICE_ROLE_KEY payload has role: service_role  1036ms
433
+ โœ“ JWT has exp in the future  1028ms
434
+ โœ“ --exp-years changes the expiry window  2179ms
435
+ โœ“ reads JWT_SECRET from environment variable  1092ms
436
+ โœ“ reads JWT_SECRET from .env file  1039ms
437
+ โœ“ exits non-zero when no secret is available  1019ms
438
+ โœ“ keys --help shows --secret and --exp-years options  1010ms
439
+ โœ“ tests/preview-config-check.test.ts (9 tests) 5ms
440
+ โœ“ tests/schema-sources.test.ts (5 tests) 993ms
441
+ โœ“ buildSchemaSourcesPayload includes manifest metadata  485ms
442
+ โœ“ restore overwrites modified local files  476ms
407
443
  stderr | tests/binary-cache-cloud-overrides.test.ts > isLinkedToCloudProject > is true when .supatype/cloud.json has projectSlug
408
444
  [supatype] Migrated .supatype/cloud.json โ†’ .supatype/link.json (legacy files kept; remove manually when ready).
409
445
 
410
- โœ“ tests/binary-cache-cloud-overrides.test.ts (11 tests) 20ms
411
- โœ“ 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
418
- โœ“ ends promptly when it carries a deadline  326ms
419
- โœ“ tests/api-schemas.test.ts (10 tests) 14ms
446
+ โœ“ tests/binary-cache-cloud-overrides.test.ts (11 tests) 15ms
447
+ โœ“ tests/homebrew-formula.test.ts (4 tests) 180ms
448
+ โœ“ tests/model-cache-manifest.test.ts (12 tests) 7ms
449
+ โœ“ tests/minisign.test.ts (5 tests) 11ms
450
+ โœ“ tests/local-server-image-env.test.ts (5 tests) 10ms
451
+ โœ“ tests/local-secrets.test.ts (5 tests) 7ms
452
+ โœ“ tests/functions-concurrency.test.ts (6 tests) 4ms
453
+ โœ“ tests/self-host-keys.test.ts (7 tests) 8ms
454
+ โœ“ tests/readiness-poll.test.ts (3 tests) 316ms
455
+ โœ“ ends promptly when it carries a deadline  313ms
456
+ โœ“ tests/api-schemas.test.ts (10 tests) 5ms
420
457
  stdout | tests/storage-provision.test.ts > provisionBuckets > POSTs each bucket to the storage API
421
458
  [supatype] Storage bucket "photos" ready.
422
459
 
423
460
  stdout | tests/storage-provision.test.ts > provisionBuckets > POSTs each bucket to the storage API
424
461
  [supatype] Storage bucket "avatars" ready.
425
462
 
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
463
+ โœ“ tests/storage-provision.test.ts (6 tests) 10ms
464
+ โœ“ tests/cached-artifact-format.test.ts (7 tests) 10ms
465
+ โœ“ tests/cache-identity-scope.test.ts (33 tests) 7ms
466
+ โœ“ tests/target-client-refresh.test.ts (3 tests) 8ms
467
+ โœ“ tests/studio-admin-roles.test.ts (6 tests) 5ms
468
+ โœ“ tests/proxy-dev-app.test.ts (7 tests) 5ms
430
469
  stdout | tests/app-command.test.ts > supatype app add --static > sets app.mode=static and static_dir in supatype.config.ts
431
470
   created package.json
432
471
  created supatype.config.ts
@@ -447,80 +486,77 @@
447
486
  created public/.gitkeep
448
487
  created .gitignore
449
488
 
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
480
- โœ“ 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
492
- โœ“ tests/doctor-render.test.ts (3 tests) 7ms
493
- โœ“ tests/doctor-service-role.test.ts (4 tests) 7ms
494
- โœ“ 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
501
- โœ“ tests/dev-session-lock.test.ts (2 tests) 6ms
502
- โœ“ tests/dev-ports.test.ts (3 tests) 7ms
503
- โœ“ 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
509
- โœ“ 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
514
- โœ“ tests/init-package-json.test.ts (1 test) 4ms
515
- โœ“ 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
- โœ“ tests/cli-package-version.test.ts (1 test) 4ms
519
- โœ“ tests/postgres-archive-tag.test.ts (1 test) 3ms
520
- โœ“ tests/stdin-after-ink.test.ts (1 test) 4ms
521
-
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)
489
+ โœ“ tests/service-role-routes.test.ts (4 tests) 1314ms
490
+ โœ“ reads the declared list  475ms
491
+ โœ“ is an empty list when a project declares none  437ms
492
+ โœ“ sends what the project declared, hook entries included  400ms
493
+ โœ“ tests/compose-parsable-defaults.test.ts (2 tests) 6ms
494
+ โœ“ tests/app-command.test.ts (2 tests) 2406ms
495
+ โœ“ sets app.mode=static and static_dir in supatype.config.ts  1266ms
496
+ โœ“ creates the static directory when missing  1139ms
497
+ โœ“ tests/rest-cache-admin.test.ts (3 tests) 34ms
498
+ โœ“ tests/init-dependency-versions.test.ts (4 tests) 23ms
499
+ โœ“ tests/type-resolver.test.ts (2 tests) 14ms
500
+ โœ“ tests/cli-help.test.ts (16 tests) 17210ms
501
+ โœ“ --help lists all top-level commands  1097ms
502
+ โœ“ --version prints package.json version  1092ms
503
+ โœ“ self-update --help describes the command  1017ms
504
+ โœ“ init --help describes the init command  1138ms
505
+ โœ“ push --help describes the push command and --yes flag  1144ms
506
+ โœ“ diff --help describes the diff command  1098ms
507
+ โœ“ pull --help describes scaffold pull command  1074ms
508
+ โœ“ doctor --help describes drift report command  1072ms
509
+ โœ“ introspect --help describes database introspection command  1044ms
510
+ โœ“ adopt --help describes adoption ceremony command  1086ms
511
+ โœ“ reset --help shows --yes flag  983ms
512
+ โœ“ app --help describes the app command with add/remove subcommands  918ms
513
+ โœ“ app add --help shows --static and --port options  1057ms
514
+ โœ“ self-host --help shows compose only (legacy commands hidden)  1115ms
515
+ โœ“ self-host compose --help shows compose subcommands  1131ms
516
+ โœ“ unknown command exits non-zero  1135ms
517
+ โœ“ tests/engine-push-output.test.ts (7 tests) 5ms
518
+ โœ“ tests/command-chrome-wrap.test.ts (3 tests) 5ms
519
+ โœ“ tests/doctor-render.test.ts (3 tests) 5ms
520
+ โœ“ tests/cli-install-method.test.ts (8 tests) 11ms
521
+ โœ“ tests/port-in-use.test.ts (4 tests) 17ms
522
+ โœ“ tests/archive-name-alias.test.ts (4 tests) 5ms
523
+ โœ“ tests/ensure-binary.test.ts (2 tests) 7ms
524
+ โœ“ tests/init-project-detect.test.ts (4 tests) 6ms
525
+ โœ“ tests/tsx-runner.test.ts (7 tests) 2317ms
526
+ โœ“ evaluates a simple expression and returns stdout  300ms
527
+ โœ“ can serialize a JSON object to stdout  336ms
528
+ โœ“ returns non-zero exit code on runtime error  349ms
529
+ โœ“ captures stderr separately from stdout  354ms
530
+ โœ“ runs a .ts file and returns its stdout  405ms
531
+ โœ“ tests/doctor-service-role.test.ts (4 tests) 4ms
532
+ โœ“ tests/required-host-components.test.ts (4 tests) 5ms
533
+ โœ“ tests/dev-ports-owner.test.ts (6 tests) 3ms
534
+ โœ“ tests/ui-messages.test.ts (5 tests) 7ms
535
+ โœ“ tests/normalize-admin-config.test.ts (1 test) 5ms
536
+ โœ“ tests/ui-confirm.test.ts (3 tests) 6ms
537
+ โœ“ tests/docker-postgres.test.ts (5 tests) 3ms
538
+ โœ“ tests/binary-download-lock.test.ts (2 tests) 5ms
539
+ โœ“ tests/dev-session-lock.test.ts (2 tests) 4ms
540
+ โœ“ tests/config-load-failure.test.ts (2 tests) 2749ms
541
+ โœ“ is reported, rather than treated as absent  1585ms
542
+ โœ“ does not stop the CLI working with no config at all  1162ms
543
+ โœ“ tests/dev-ports.test.ts (3 tests) 4ms
544
+ โœ“ tests/route-manifest.test.ts (1 test) 4ms
545
+ โœ“ tests/dev-ready-panel.test.ts (2 tests) 3ms
546
+ โœ“ tests/realtime-launch.test.ts (1 test) 4ms
547
+ โœ“ tests/release-pins.test.ts (2 tests) 3ms
548
+ โœ“ tests/ensure-dev-api-config.test.ts (1 test) 4ms
549
+ โœ“ tests/seed-discover.test.ts (2 tests) 10ms
550
+ โœ“ tests/init-package-json.test.ts (1 test) 3ms
551
+ โœ“ tests/pg-spawn-env.test.ts (2 tests) 3ms
552
+ โœ“ tests/resolve-api-url.test.ts (2 tests) 3ms
553
+ โœ“ tests/cli-package-version.test.ts (1 test) 2ms
554
+ โœ“ tests/migrate-from-v1.test.ts (1 test) 9ms
555
+ โœ“ tests/postgres-archive-tag.test.ts (1 test) 2ms
556
+ โœ“ tests/stdin-after-ink.test.ts (1 test) 2ms
557
+
558
+  Test Files  95 passed (95)
559
+  Tests  997 passed (997)
560
+  Start at  09:25:57
561
+  Duration  39.48s (transform 6.25s, setup 0ms, import 40.35s, tests 62.64s, environment 15ms)
526
562
 
@@ -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.1 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"}