@supatype/cli 0.1.5 → 0.1.7

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 (247) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-test.log +143 -93
  3. package/.turbo/turbo-typecheck.log +1 -1
  4. package/deno.d.ts +52 -0
  5. package/dist/augmentation-generator.d.ts +22 -0
  6. package/dist/augmentation-generator.d.ts.map +1 -1
  7. package/dist/augmentation-generator.js +43 -7
  8. package/dist/augmentation-generator.js.map +1 -1
  9. package/dist/binary-cache.d.ts +14 -0
  10. package/dist/binary-cache.d.ts.map +1 -1
  11. package/dist/binary-cache.js +33 -13
  12. package/dist/binary-cache.js.map +1 -1
  13. package/dist/cache-clean.d.ts +15 -0
  14. package/dist/cache-clean.d.ts.map +1 -0
  15. package/dist/cache-clean.js +76 -0
  16. package/dist/cache-clean.js.map +1 -0
  17. package/dist/cache-pins.d.ts +51 -0
  18. package/dist/cache-pins.d.ts.map +1 -0
  19. package/dist/cache-pins.js +184 -0
  20. package/dist/cache-pins.js.map +1 -0
  21. package/dist/cli-install-method.d.ts +19 -0
  22. package/dist/cli-install-method.d.ts.map +1 -0
  23. package/dist/cli-install-method.js +60 -0
  24. package/dist/cli-install-method.js.map +1 -0
  25. package/dist/cli.d.ts.map +1 -1
  26. package/dist/cli.js +6 -0
  27. package/dist/cli.js.map +1 -1
  28. package/dist/cloud-credentials.d.ts +34 -0
  29. package/dist/cloud-credentials.d.ts.map +1 -0
  30. package/dist/cloud-credentials.js +139 -0
  31. package/dist/cloud-credentials.js.map +1 -0
  32. package/dist/commands/admin.d.ts +11 -0
  33. package/dist/commands/admin.d.ts.map +1 -1
  34. package/dist/commands/admin.js +131 -22
  35. package/dist/commands/admin.js.map +1 -1
  36. package/dist/commands/cache.d.ts.map +1 -1
  37. package/dist/commands/cache.js +67 -71
  38. package/dist/commands/cache.js.map +1 -1
  39. package/dist/commands/cloud.d.ts.map +1 -1
  40. package/dist/commands/cloud.js +32 -8
  41. package/dist/commands/cloud.js.map +1 -1
  42. package/dist/commands/db.d.ts +1 -0
  43. package/dist/commands/db.d.ts.map +1 -1
  44. package/dist/commands/db.js +147 -1
  45. package/dist/commands/db.js.map +1 -1
  46. package/dist/commands/dev.d.ts.map +1 -1
  47. package/dist/commands/dev.js +50 -10
  48. package/dist/commands/dev.js.map +1 -1
  49. package/dist/commands/doctor.d.ts +28 -0
  50. package/dist/commands/doctor.d.ts.map +1 -1
  51. package/dist/commands/doctor.js +60 -3
  52. package/dist/commands/doctor.js.map +1 -1
  53. package/dist/commands/functions.d.ts +7 -0
  54. package/dist/commands/functions.d.ts.map +1 -1
  55. package/dist/commands/functions.js +40 -6
  56. package/dist/commands/functions.js.map +1 -1
  57. package/dist/commands/generate.d.ts.map +1 -1
  58. package/dist/commands/generate.js +5 -1
  59. package/dist/commands/generate.js.map +1 -1
  60. package/dist/commands/hooks.d.ts +12 -0
  61. package/dist/commands/hooks.d.ts.map +1 -0
  62. package/dist/commands/hooks.js +118 -0
  63. package/dist/commands/hooks.js.map +1 -0
  64. package/dist/commands/init.d.ts.map +1 -1
  65. package/dist/commands/init.js +41 -7
  66. package/dist/commands/init.js.map +1 -1
  67. package/dist/commands/internal.d.ts +6 -0
  68. package/dist/commands/internal.d.ts.map +1 -0
  69. package/dist/commands/internal.js +22 -0
  70. package/dist/commands/internal.js.map +1 -0
  71. package/dist/commands/keys.d.ts.map +1 -1
  72. package/dist/commands/keys.js +2 -0
  73. package/dist/commands/keys.js.map +1 -1
  74. package/dist/commands/link-helpers.d.ts.map +1 -1
  75. package/dist/commands/link-helpers.js +8 -2
  76. package/dist/commands/link-helpers.js.map +1 -1
  77. package/dist/commands/login.d.ts +7 -0
  78. package/dist/commands/login.d.ts.map +1 -0
  79. package/dist/commands/login.js +110 -0
  80. package/dist/commands/login.js.map +1 -0
  81. package/dist/commands/push.d.ts.map +1 -1
  82. package/dist/commands/push.js +110 -7
  83. package/dist/commands/push.js.map +1 -1
  84. package/dist/commands/self-update.d.ts +7 -0
  85. package/dist/commands/self-update.d.ts.map +1 -1
  86. package/dist/commands/self-update.js +18 -11
  87. package/dist/commands/self-update.js.map +1 -1
  88. package/dist/config.d.ts.map +1 -1
  89. package/dist/config.js +18 -3
  90. package/dist/config.js.map +1 -1
  91. package/dist/db-preflight.d.ts +78 -0
  92. package/dist/db-preflight.d.ts.map +1 -0
  93. package/dist/db-preflight.js +452 -0
  94. package/dist/db-preflight.js.map +1 -0
  95. package/dist/dev-compose.d.ts +1 -1
  96. package/dist/dev-compose.d.ts.map +1 -1
  97. package/dist/dev-compose.js +129 -72
  98. package/dist/dev-compose.js.map +1 -1
  99. package/dist/env-file.d.ts +40 -2
  100. package/dist/env-file.d.ts.map +1 -1
  101. package/dist/env-file.js +132 -11
  102. package/dist/env-file.js.map +1 -1
  103. package/dist/field-masking-tier.d.ts +50 -0
  104. package/dist/field-masking-tier.d.ts.map +1 -0
  105. package/dist/field-masking-tier.js +91 -0
  106. package/dist/field-masking-tier.js.map +1 -0
  107. package/dist/functions-deno-types.d.ts +24 -0
  108. package/dist/functions-deno-types.d.ts.map +1 -0
  109. package/dist/functions-deno-types.js +155 -0
  110. package/dist/functions-deno-types.js.map +1 -0
  111. package/dist/hook-upload.d.ts +30 -0
  112. package/dist/hook-upload.d.ts.map +1 -0
  113. package/dist/hook-upload.js +86 -0
  114. package/dist/hook-upload.js.map +1 -0
  115. package/dist/hooks-generator.d.ts +8 -0
  116. package/dist/hooks-generator.d.ts.map +1 -0
  117. package/dist/hooks-generator.js +332 -0
  118. package/dist/hooks-generator.js.map +1 -0
  119. package/dist/link.d.ts +4 -0
  120. package/dist/link.d.ts.map +1 -1
  121. package/dist/link.js +2 -0
  122. package/dist/link.js.map +1 -1
  123. package/dist/local-secrets.d.ts +71 -0
  124. package/dist/local-secrets.d.ts.map +1 -0
  125. package/dist/local-secrets.js +100 -0
  126. package/dist/local-secrets.js.map +1 -0
  127. package/dist/model-hooks.d.ts +73 -0
  128. package/dist/model-hooks.d.ts.map +1 -0
  129. package/dist/model-hooks.js +211 -0
  130. package/dist/model-hooks.js.map +1 -0
  131. package/dist/postgres-ctl.d.ts +11 -0
  132. package/dist/postgres-ctl.d.ts.map +1 -1
  133. package/dist/postgres-ctl.js +25 -2
  134. package/dist/postgres-ctl.js.map +1 -1
  135. package/dist/project-config.d.ts +121 -1
  136. package/dist/project-config.d.ts.map +1 -1
  137. package/dist/project-config.js +150 -1
  138. package/dist/project-config.js.map +1 -1
  139. package/dist/resolve-target.d.ts +4 -0
  140. package/dist/resolve-target.d.ts.map +1 -1
  141. package/dist/resolve-target.js +69 -73
  142. package/dist/resolve-target.js.map +1 -1
  143. package/dist/schema-ast-v2.d.ts +2 -1
  144. package/dist/schema-ast-v2.d.ts.map +1 -1
  145. package/dist/schema-ast-v2.js +4 -2
  146. package/dist/schema-ast-v2.js.map +1 -1
  147. package/dist/schema-push-lock.d.ts.map +1 -1
  148. package/dist/schema-push-lock.js +43 -16
  149. package/dist/schema-push-lock.js.map +1 -1
  150. package/dist/self-host-compose.d.ts +24 -0
  151. package/dist/self-host-compose.d.ts.map +1 -1
  152. package/dist/self-host-compose.js +301 -69
  153. package/dist/self-host-compose.js.map +1 -1
  154. package/dist/service-role-check.d.ts +21 -0
  155. package/dist/service-role-check.d.ts.map +1 -0
  156. package/dist/service-role-check.js +85 -0
  157. package/dist/service-role-check.js.map +1 -0
  158. package/dist/target-client.d.ts +17 -0
  159. package/dist/target-client.d.ts.map +1 -1
  160. package/dist/target-client.js +69 -17
  161. package/dist/target-client.js.map +1 -1
  162. package/dist/type-extractor.d.ts.map +1 -1
  163. package/dist/type-extractor.js +736 -32
  164. package/dist/type-extractor.js.map +1 -1
  165. package/dist/ui/runtime/command-chrome.js +1 -1
  166. package/dist/ui/runtime/command-chrome.js.map +1 -1
  167. package/dist/ui/runtime/stdin-after-ink.d.ts.map +1 -1
  168. package/dist/ui/runtime/stdin-after-ink.js +3 -1
  169. package/dist/ui/runtime/stdin-after-ink.js.map +1 -1
  170. package/package.json +4 -1
  171. package/scripts/generate-homebrew-formula.mjs +121 -0
  172. package/src/augmentation-generator.ts +46 -9
  173. package/src/binary-cache.ts +47 -15
  174. package/src/cache-clean.ts +81 -0
  175. package/src/cache-pins.ts +243 -0
  176. package/src/cli-install-method.ts +67 -0
  177. package/src/cli.ts +6 -0
  178. package/src/cloud-credentials.ts +183 -0
  179. package/src/commands/admin.ts +153 -28
  180. package/src/commands/cache.ts +90 -75
  181. package/src/commands/cloud.ts +32 -8
  182. package/src/commands/db.ts +162 -1
  183. package/src/commands/dev.ts +57 -8
  184. package/src/commands/doctor.ts +69 -3
  185. package/src/commands/functions.ts +42 -5
  186. package/src/commands/generate.ts +5 -1
  187. package/src/commands/hooks.ts +138 -0
  188. package/src/commands/init.ts +42 -8
  189. package/src/commands/internal.ts +23 -0
  190. package/src/commands/keys.ts +2 -0
  191. package/src/commands/link-helpers.ts +9 -2
  192. package/src/commands/login.ts +127 -0
  193. package/src/commands/push.ts +124 -7
  194. package/src/commands/self-update.ts +85 -13
  195. package/src/config.ts +22 -3
  196. package/src/db-preflight.ts +575 -0
  197. package/src/dev-compose.ts +144 -73
  198. package/src/env-file.ts +157 -11
  199. package/src/field-masking-tier.ts +107 -0
  200. package/src/functions-deno-types.ts +188 -0
  201. package/src/hook-upload.ts +107 -0
  202. package/src/hooks-generator.ts +352 -0
  203. package/src/link.ts +7 -0
  204. package/src/local-secrets.ts +104 -0
  205. package/src/model-hooks.ts +260 -0
  206. package/src/postgres-ctl.ts +29 -2
  207. package/src/project-config.ts +236 -2
  208. package/src/resolve-target.ts +113 -68
  209. package/src/schema-ast-v2.ts +5 -2
  210. package/src/schema-push-lock.ts +56 -17
  211. package/src/self-host-compose.ts +344 -68
  212. package/src/service-role-check.ts +111 -0
  213. package/src/target-client.ts +105 -18
  214. package/src/type-extractor.ts +883 -28
  215. package/src/ui/runtime/command-chrome.ts +1 -1
  216. package/src/ui/runtime/stdin-after-ink.ts +3 -1
  217. package/tests/access-composition.test.ts +667 -0
  218. package/tests/admin-studio-membership.test.ts +121 -0
  219. package/tests/api-schemas.test.ts +83 -0
  220. package/tests/archive-name-alias.test.ts +42 -0
  221. package/tests/augmentation-generator.test.ts +72 -4
  222. package/tests/cache-clean.test.ts +206 -0
  223. package/tests/cli-help.test.ts +3 -0
  224. package/tests/cli-install-method.test.ts +66 -0
  225. package/tests/command-chrome-coverage.test.ts +31 -26
  226. package/tests/command-chrome-wrap.test.ts +1 -0
  227. package/tests/db-preflight.test.ts +72 -0
  228. package/tests/doctor-render.test.ts +62 -0
  229. package/tests/doctor-service-role.test.ts +55 -0
  230. package/tests/env-file.test.ts +121 -0
  231. package/tests/external-database-compose.test.ts +184 -0
  232. package/tests/external-database-config.test.ts +154 -0
  233. package/tests/field-masking-tier.test.ts +184 -0
  234. package/tests/functions-deno-types.test.ts +197 -0
  235. package/tests/homebrew-formula.test.ts +58 -0
  236. package/tests/hook-upload.test.ts +125 -0
  237. package/tests/hooks-generator.test.ts +212 -0
  238. package/tests/init.test.ts +3 -0
  239. package/tests/local-secrets.test.ts +92 -0
  240. package/tests/model-hooks.test.ts +322 -0
  241. package/tests/runtime-contract.test.ts +113 -1
  242. package/tests/service-role-check.test.ts +109 -0
  243. package/tests/service-role-routes.test.ts +51 -0
  244. package/tests/target-client-refresh.test.ts +94 -0
  245. package/tests/type-extractor.test.ts +187 -0
  246. package/tsconfig.tsbuildinfo +1 -1
  247. package/tests/engine-distribution.test.ts +0 -418
@@ -1,4 +1,4 @@
1
1
 
2
- > @supatype/cli@0.1.5 build /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.1.7 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,12 +1,14 @@
1
1
 
2
- > @supatype/cli@0.1.5 test /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.1.7 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/type-extractor.test.ts (37 tests) 152ms
9
- ✓ tests/runtime-contract.test.ts (41 tests) 121ms
8
+ ✓ tests/access-composition.test.ts (26 tests) 98ms
9
+ ✓ tests/type-extractor.test.ts (43 tests) 197ms
10
+ ✓ tests/model-hooks.test.ts (19 tests) 72ms
11
+ ✓ tests/runtime-contract.test.ts (49 tests) 128ms
10
12
  stdout | tests/init.test.ts > scaffold() > creates all expected files
11
13
   created package.json
12
14
  created supatype.config.ts
@@ -259,6 +261,8 @@
259
261
  created functions/hello/index.ts
260
262
  created functions/_shared/README.md
261
263
  created functions/.env.local
264
+ created functions/deno.d.ts
265
+ created functions/tsconfig.json
262
266
  created .gitignore
263
267
 
264
268
  stdout | tests/init.test.ts > scaffold() > custom schema path is honored
@@ -291,9 +295,11 @@
291
295
  created public/.gitkeep
292
296
  created .gitignore
293
297
 
294
- ✓ tests/init.test.ts (26 tests) 65ms
298
+ ✓ tests/init.test.ts (26 tests) 83ms
299
+ ✓ tests/field-masking-tier.test.ts (16 tests) 17ms
300
+ ✓ tests/external-database-compose.test.ts (17 tests) 10ms
295
301
 
296
- ✓ tests/dev-ui.test.ts (21 tests) 142ms
302
+ ✓ tests/dev-ui.test.ts (21 tests) 137ms
297
303
 
298
304
  [supatype] Shutting down…
299
305
  stdout | tests/docker-runtime.test.ts > requireDockerDaemon > exits when the daemon is unavailable
@@ -305,16 +311,29 @@
305
311
  docker: daemon down
306
312
 
307
313
  ✓ tests/docker-runtime.test.ts (10 tests) 17ms
308
- ✓ tests/config.test.ts (19 tests) 5561ms
309
- ✓ loads a valid supatype.config.ts (plain export default, no package imports)  614ms
310
- ✓ normalizes shorthand schema string to { path, pg_schema }  528ms
311
- ✓ loads a supatype.config.js (plain ESM)  583ms
312
- ✓ loads config without a versions section (latest by default)  561ms
313
- ✓ prefers supatype.config.ts over supatype.config.js when both exist  598ms
314
- ✓ supports optional output field in config  538ms
315
- ✓ merges supatype.local.config.ts over base  1152ms
316
- ✓ loads defineConfig import before @supatype/cli is installed (init scaffold)  968ms
317
- ✓ tests/command-chrome-coverage.test.ts (1 test) 15ms
314
+ ✓ tests/hooks-generator.test.ts (5 tests) 4289ms
315
+ ✓ typechecks under strict mode, together with a handler that uses it  2129ms
316
+ ✓ rejects a handler for a table that declares no hook  2114ms
317
+ ✓ tests/config.test.ts (19 tests) 6755ms
318
+ ✓ loads a valid supatype.config.ts (plain export default, no package imports)  604ms
319
+ ✓ normalizes shorthand schema string to { path, pg_schema }  592ms
320
+ ✓ loads a supatype.config.js (plain ESM)  591ms
321
+ ✓ loads config without a versions section (latest by default)  882ms
322
+ ✓ prefers supatype.config.ts over supatype.config.js when both exist  724ms
323
+ ✓ supports optional output field in config  642ms
324
+ ✓ merges supatype.local.config.ts over base  1575ms
325
+ ✓ loads defineConfig import before @supatype/cli is installed (init scaffold)  1124ms
326
+ ✓ tests/functions-deno-types.test.ts (7 tests) 3039ms
327
+ ✓ tsc fails with Cannot find name Deno without ambient types  2224ms
328
+ ✓ tsc passes for Deno.env after ensureFunctionsDenoTypes  796ms
329
+ ✓ tests/external-database-config.test.ts (14 tests) 10ms
330
+ ✓ tests/cache-clean.test.ts (8 tests) 1812ms
331
+ ✓ keeps pinned versions and removes the rest  616ms
332
+ ✓ --force removes pinned versions  576ms
333
+ ✓ explicit version removes even when pinned (with warning)  588ms
334
+ ✓ tests/command-chrome-coverage.test.ts (1 test) 12ms
335
+ ✓ tests/env-file.test.ts (9 tests) 16ms
336
+ ✓ tests/hook-upload.test.ts (8 tests) 10ms
318
337
  stdout | tests/link.test.ts > link model > migrates cloud.json into link.json
319
338
   created package.json
320
339
  created supatype.config.ts
@@ -328,10 +347,11 @@
328
347
  stderr | tests/link.test.ts > link model > migrates cloud.json into link.json
329
348
  [supatype] Migrated .supatype/cloud.json → .supatype/link.json (legacy files kept; remove manually when ready).
330
349
 
331
- ✓ tests/link.test.ts (4 tests) 2992ms
332
- ✓ resolveTarget returns cloud mode with /api/v1 prefix  973ms
333
- ✓ resolveTarget returns self-host mode with /platform/v1 prefix  1066ms
334
- ✓ targetSchemaRollback posts to /platform/v1 when linked  943ms
350
+ ✓ tests/link.test.ts (4 tests) 2993ms
351
+ ✓ resolveTarget returns cloud mode with /api/v1 prefix  944ms
352
+ ✓ resolveTarget returns self-host mode with /platform/v1 prefix  1021ms
353
+ ✓ targetSchemaRollback posts to /platform/v1 when linked  1017ms
354
+ ✓ tests/service-role-check.test.ts (10 tests) 16ms
335
355
  stdout | tests/admin-ensure.test.ts > init admin seed in .env > writes SUPATYPE_ADMIN_* when scaffold options include credentials
336
356
   created package.json
337
357
  created supatype.config.ts
@@ -342,52 +362,102 @@
342
362
  created public/.gitkeep
343
363
  created .gitignore
344
364
 
345
- ✓ tests/admin-ensure.test.ts (10 tests) 177ms
365
+ ✓ tests/admin-ensure.test.ts (10 tests) 167ms
366
+ stdout | tests/admin-studio-membership.test.ts > first admin user creation > does not write a role into app_metadata
367
+ [supatype] Admin user "admin@example.com" created (role: admin).
368
+ [supatype] Log in at /admin after starting the dev server.
369
+
370
+ stdout | tests/admin-studio-membership.test.ts > first admin user creation > grants Studio access through _supatype.studio_members
371
+ [supatype] Admin user "admin@example.com" created (role: admin).
372
+ [supatype] Log in at /admin after starting the dev server.
373
+
374
+ stdout | tests/admin-studio-membership.test.ts > first admin user creation > creates the membership table when it is absent
375
+ [supatype] Admin user "admin@example.com" created (role: admin).
376
+ [supatype] Log in at /admin after starting the dev server.
377
+
378
+ stdout | tests/admin-studio-membership.test.ts > first admin user creation > decides whether an admin exists from membership, not claims
379
+ [supatype] Admin user "admin@example.com" created (role: admin).
380
+ [supatype] Log in at /admin after starting the dev server.
381
+
382
+ ✓ tests/admin-studio-membership.test.ts (5 tests) 472ms
383
+ ✓ tests/augmentation-generator.test.ts (6 tests) 18ms
346
384
  ✓ tests/pull-utils.test.ts (49 tests) 12ms
347
- ✓ tests/schema-sources.test.ts (5 tests) 1214ms
348
- ✓ buildSchemaSourcesPayload includes manifest metadata  623ms
349
- ✓ restore overwrites modified local files  549ms
385
+ ✓ tests/schema-sources.test.ts (5 tests) 1217ms
386
+ ✓ buildSchemaSourcesPayload includes manifest metadata  547ms
387
+ ✓ restore overwrites modified local files  625ms
350
388
  stderr | tests/binary-cache-cloud-overrides.test.ts > isLinkedToCloudProject > is true when .supatype/cloud.json has projectSlug
351
389
  [supatype] Migrated .supatype/cloud.json → .supatype/link.json (legacy files kept; remove manually when ready).
352
390
 
353
- ✓ tests/binary-cache-cloud-overrides.test.ts (11 tests) 12ms
354
- ✓ tests/minisign.test.ts (5 tests) 12ms
391
+ ✓ tests/binary-cache-cloud-overrides.test.ts (11 tests) 21ms
392
+ ✓ tests/minisign.test.ts (5 tests) 14ms
393
+ ✓ tests/local-secrets.test.ts (5 tests) 10ms
394
+ ✓ tests/api-schemas.test.ts (10 tests) 7ms
355
395
  stdout | tests/storage-provision.test.ts > provisionBuckets > POSTs each bucket to the storage API
356
396
  [supatype] Storage bucket "photos" ready.
357
397
 
358
398
  stdout | tests/storage-provision.test.ts > provisionBuckets > POSTs each bucket to the storage API
359
399
  [supatype] Storage bucket "avatars" ready.
360
400
 
361
- ✓ tests/storage-provision.test.ts (6 tests) 23ms
401
+ ✓ tests/storage-provision.test.ts (6 tests) 13ms
402
+ ✓ tests/db-preflight.test.ts (6 tests) 5ms
362
403
  ✓ tests/cached-artifact-format.test.ts (7 tests) 12ms
363
- ✓ tests/keys.test.ts (11 tests) 15921ms
364
- ✓ exits 0 with --secret  1342ms
365
- ✓ outputs ANON_KEY= line  1343ms
366
- ✓ outputs SERVICE_ROLE_KEY= line  1278ms
367
- ✓ ANON_KEY is a valid three-part JWT  1288ms
368
- ✓ SERVICE_ROLE_KEY payload has role: service_role  1359ms
369
- ✓ JWT has exp in the future  1302ms
370
- ✓ --exp-years changes the expiry window  2717ms
371
- ✓ reads JWT_SECRET from environment variable  1354ms
372
- ✓ reads JWT_SECRET from .env file  1338ms
373
- ✓ exits non-zero when no secret is available  1355ms
374
- ✓ keys --help shows --secret and --exp-years options  1239ms
375
- ✓ tests/init-dependency-versions.test.ts (4 tests) 47ms
376
- ✓ tests/proxy-dev-app.test.ts (7 tests) 6ms
377
- ✓ tests/augmentation-generator.test.ts (3 tests) 19ms
378
- ✓ tests/type-resolver.test.ts (2 tests) 16ms
379
- ✓ tests/engine-push-output.test.ts (7 tests) 5ms
404
+ ✓ tests/proxy-dev-app.test.ts (7 tests) 11ms
405
+ ✓ tests/target-client-refresh.test.ts (3 tests) 10ms
406
+ ✓ tests/keys.test.ts (11 tests) 16648ms
407
+ ✓ exits 0 with --secret  1438ms
408
+ ✓ outputs ANON_KEY= line  1408ms
409
+ ✓ outputs SERVICE_ROLE_KEY= line  1435ms
410
+ ✓ ANON_KEY is a valid three-part JWT  1381ms
411
+ ✓ SERVICE_ROLE_KEY payload has role: service_role  1372ms
412
+ ✓ JWT has exp in the future  1374ms
413
+ ✓ --exp-years changes the expiry window  2746ms
414
+ ✓ reads JWT_SECRET from environment variable  1360ms
415
+ ✓ reads JWT_SECRET from .env file  1405ms
416
+ ✓ exits non-zero when no secret is available  1347ms
417
+ ✓ keys --help shows --secret and --exp-years options  1375ms
418
+ ✓ tests/init-dependency-versions.test.ts (4 tests) 41ms
419
+ ✓ tests/service-role-routes.test.ts (4 tests) 1870ms
420
+ ✓ reads the declared list  606ms
421
+ ✓ is an empty list when a project declares none  587ms
422
+ ✓ sends what the project declared, hook entries included  674ms
423
+ ✓ tests/type-resolver.test.ts (2 tests) 15ms
424
+ ✓ tests/engine-push-output.test.ts (7 tests) 6ms
425
+ ✓ tests/tsx-runner.test.ts (7 tests) 3011ms
426
+ ✓ evaluates a simple expression and returns stdout  423ms
427
+ ✓ evaluates TypeScript syntax (type annotations)  464ms
428
+ ✓ can serialize a JSON object to stdout  379ms
429
+ ✓ returns non-zero exit code on syntax error  403ms
430
+ ✓ returns non-zero exit code on runtime error  398ms
431
+ ✓ captures stderr separately from stdout  409ms
432
+ ✓ runs a .ts file and returns its stdout  531ms
433
+ ✓ tests/homebrew-formula.test.ts (2 tests) 119ms
380
434
  ✓ tests/command-chrome-wrap.test.ts (3 tests) 7ms
381
- ✓ tests/ensure-binary.test.ts (2 tests) 6ms
382
- ✓ tests/init-project-detect.test.ts (4 tests) 8ms
383
- ✓ tests/tsx-runner.test.ts (7 tests) 3124ms
384
- ✓ evaluates a simple expression and returns stdout  383ms
385
- ✓ evaluates TypeScript syntax (type annotations)  402ms
386
- ✓ can serialize a JSON object to stdout  441ms
387
- ✓ returns non-zero exit code on syntax error  476ms
388
- ✓ returns non-zero exit code on runtime error  381ms
389
- ✓ captures stderr separately from stdout  438ms
390
- ✓ runs a .ts file and returns its stdout  597ms
435
+ ✓ tests/cli-install-method.test.ts (8 tests) 6ms
436
+ ✓ tests/doctor-render.test.ts (3 tests) 6ms
437
+ ✓ tests/archive-name-alias.test.ts (4 tests) 5ms
438
+ ✓ tests/ensure-binary.test.ts (2 tests) 9ms
439
+ ✓ tests/init-project-detect.test.ts (4 tests) 10ms
440
+ ✓ tests/cli-help.test.ts (16 tests) 22039ms
441
+ ✓ --help lists all top-level commands  1416ms
442
+ ✓ --version prints package.json version  1343ms
443
+ ✓ self-update --help describes the command  1322ms
444
+ ✓ init --help describes the init command  1402ms
445
+ ✓ push --help describes the push command and --yes flag  1421ms
446
+ ✓ diff --help describes the diff command  1484ms
447
+ ✓ pull --help describes scaffold pull command  1404ms
448
+ ✓ doctor --help describes drift report command  1311ms
449
+ ✓ introspect --help describes database introspection command  1442ms
450
+ ✓ adopt --help describes adoption ceremony command  1317ms
451
+ ✓ reset --help shows --yes flag  1367ms
452
+ ✓ app --help describes the app command with add/remove subcommands  1295ms
453
+ ✓ app add --help shows --static and --port options  1418ms
454
+ ✓ self-host --help shows compose only (legacy commands hidden)  1380ms
455
+ ✓ self-host compose --help shows compose subcommands  1299ms
456
+ ✓ unknown command exits non-zero  1411ms
457
+ ✓ tests/required-host-components.test.ts (4 tests) 10ms
458
+ ✓ tests/doctor-service-role.test.ts (4 tests) 6ms
459
+ ✓ tests/ui-messages.test.ts (5 tests) 7ms
460
+ ✓ tests/normalize-admin-config.test.ts (1 test) 7ms
391
461
  stdout | tests/app-command.test.ts > supatype app add --static > sets app.mode=static and static_dir in supatype.config.ts
392
462
   created package.json
393
463
  created supatype.config.ts
@@ -398,11 +468,10 @@
398
468
  created public/.gitkeep
399
469
  created .gitignore
400
470
 
401
- ✓ tests/required-host-components.test.ts (4 tests) 6ms
402
- ✓ tests/ui-messages.test.ts (5 tests) 7ms
403
- ✓ tests/normalize-admin-config.test.ts (1 test) 6ms
471
+ ✓ tests/ui-confirm.test.ts (3 tests) 10ms
472
+ ✓ tests/docker-postgres.test.ts (5 tests) 6ms
473
+ ✓ tests/binary-download-lock.test.ts (2 tests) 5ms
404
474
  ✓ tests/dev-session-lock.test.ts (2 tests) 5ms
405
- ✓ tests/ui-confirm.test.ts (3 tests) 5ms
406
475
  stdout | tests/app-command.test.ts > supatype app add --static > creates the static directory when missing
407
476
   created package.json
408
477
  created supatype.config.ts
@@ -413,47 +482,28 @@
413
482
  created public/.gitkeep
414
483
  created .gitignore
415
484
 
416
- ✓ tests/docker-postgres.test.ts (5 tests) 3ms
417
- ✓ tests/binary-download-lock.test.ts (2 tests) 6ms
418
- ✓ tests/cli-help.test.ts (16 tests) 21129ms
419
- ✓ --help lists all top-level commands  1374ms
420
- ✓ --version prints package.json version  1332ms
421
- ✓ self-update --help describes the command  1374ms
422
- ✓ init --help describes the init command  1306ms
423
- ✓ push --help describes the push command and --yes flag  1282ms
424
- ✓ diff --help describes the diff command  1325ms
425
- ✓ pull --help describes scaffold pull command  1308ms
426
- ✓ doctor --help describes drift report command  1269ms
427
- ✓ introspect --help describes database introspection command  1343ms
428
- ✓ adopt --help describes adoption ceremony command  1235ms
429
- ✓ reset --help shows --yes flag  1258ms
430
- ✓ app --help describes the app command with add/remove subcommands  1302ms
431
- ✓ app add --help shows --static and --port options  1369ms
432
- ✓ self-host --help shows compose only (legacy commands hidden)  1390ms
433
- ✓ self-host compose --help shows compose subcommands  1312ms
434
- ✓ unknown command exits non-zero  1342ms
435
485
  ✓ tests/dev-ports.test.ts (3 tests) 6ms
436
- ✓ tests/dev-ready-panel.test.ts (2 tests) 4ms
437
- ✓ tests/route-manifest.test.ts (1 test) 6ms
438
- ✓ tests/studio-admin-roles.test.ts (3 tests) 5ms
439
- ✓ tests/app-command.test.ts (2 tests) 2816ms
440
- ✓ sets app.mode=static and static_dir in supatype.config.ts  1454ms
441
- ✓ creates the static directory when missing  1359ms
442
- ✓ tests/realtime-launch.test.ts (1 test) 4ms
443
- ✓ tests/release-pins.test.ts (2 tests) 3ms
486
+ ✓ tests/route-manifest.test.ts (1 test) 5ms
487
+ ✓ tests/dev-ready-panel.test.ts (2 tests) 6ms
488
+ ✓ tests/studio-admin-roles.test.ts (3 tests) 3ms
489
+ ✓ tests/realtime-launch.test.ts (1 test) 5ms
490
+ ✓ tests/release-pins.test.ts (2 tests) 4ms
444
491
  ✓ tests/seed-discover.test.ts (2 tests) 18ms
445
- ✓ tests/ensure-dev-api-config.test.ts (1 test) 4ms
446
- ✓ tests/rest-cache-admin.test.ts (1 test) 38ms
447
- ✓ tests/init-package-json.test.ts (1 test) 4ms
492
+ ✓ tests/app-command.test.ts (2 tests) 2909ms
493
+ ✓ sets app.mode=static and static_dir in supatype.config.ts  1558ms
494
+ ✓ creates the static directory when missing  1349ms
495
+ ✓ tests/ensure-dev-api-config.test.ts (1 test) 5ms
496
+ ✓ tests/rest-cache-admin.test.ts (1 test) 35ms
497
+ ✓ tests/init-package-json.test.ts (1 test) 3ms
448
498
  ✓ tests/resolve-api-url.test.ts (2 tests) 4ms
449
499
  ✓ tests/pg-spawn-env.test.ts (2 tests) 4ms
450
- ✓ tests/cli-package-version.test.ts (1 test) 3ms
451
500
  ✓ tests/migrate-from-v1.test.ts (1 test) 15ms
452
- ✓ tests/postgres-archive-tag.test.ts (1 test) 3ms
501
+ ✓ tests/cli-package-version.test.ts (1 test) 3ms
502
+ ✓ tests/postgres-archive-tag.test.ts (1 test) 2ms
453
503
  ✓ tests/stdin-after-ink.test.ts (1 test) 3ms
454
504
 
455
-  Test Files  50 passed (50)
456
-  Tests  367 passed (367)
457
-  Start at  11:11:20
458
-  Duration  27.85s (transform 4.06s, setup 0ms, import 20.61s, tests 53.79s, environment 11ms)
505
+  Test Files  72 passed (72)
506
+  Tests  577 passed (577)
507
+  Start at  21:55:09
508
+  Duration  40.19s (transform 7.04s, setup 0ms, import 37.11s, tests 68.58s, environment 11ms)
459
509
 
@@ -1,4 +1,4 @@
1
1
 
2
- > @supatype/cli@0.1.5 typecheck /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.1.7 typecheck /home/runner/work/supatype/supatype/packages/cli
3
3
  > tsc --project tsconfig.json --noEmit && tsc --project tests/tsconfig.json --noEmit
4
4
 
package/deno.d.ts ADDED
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Ambient Deno types for Supatype edge functions (IDE / tsserver).
3
+ * Runtime is Deno; this file is NOT a full Deno stdlib — it covers the
4
+ * APIs edge functions commonly use (env + a few filesystem helpers).
5
+ *
6
+ * Prefer referencing via `functions/deno.d.ts` (scaffolded by
7
+ * `supatype functions new` / init) or:
8
+ * /// <reference types="@supatype/cli/deno" />
9
+ */
10
+ /* eslint-disable @typescript-eslint/no-unused-vars */
11
+
12
+ interface DenoEnv {
13
+ /** Returns the value of the environment variable, or `undefined` if unset. */
14
+ get(key: string): string | undefined
15
+ set(key: string, value: string): void
16
+ delete(key: string): void
17
+ has(key: string): boolean
18
+ toObject(): { [key: string]: string }
19
+ }
20
+
21
+ declare namespace Deno {
22
+ const env: DenoEnv
23
+
24
+ namespace errors {
25
+ class NotFound extends Error {}
26
+ class PermissionDenied extends Error {}
27
+ }
28
+
29
+ interface DirEntry {
30
+ name: string
31
+ isFile: boolean
32
+ isDirectory: boolean
33
+ isSymlink: boolean
34
+ }
35
+
36
+ interface FileInfo {
37
+ isFile: boolean
38
+ isDirectory: boolean
39
+ isSymlink: boolean
40
+ size: number
41
+ mtime: Date | null
42
+ }
43
+
44
+ function readDir(path: string): AsyncIterable<DirEntry>
45
+ function readTextFile(path: string): Promise<string>
46
+ function stat(path: string): Promise<FileInfo>
47
+
48
+ function serve(
49
+ options: { port: number; hostname?: string; onListen?: (params: { hostname: string; port: number }) => void },
50
+ handler: (req: Request) => Response | Promise<Response>,
51
+ ): void
52
+ }
@@ -1,2 +1,24 @@
1
+ export interface AstModel {
2
+ name?: string;
3
+ tableName?: string;
4
+ fields: Record<string, Record<string, unknown>>;
5
+ annotations?: {
6
+ db?: {
7
+ tableName?: string;
8
+ indexes?: unknown[];
9
+ };
10
+ };
11
+ }
12
+ /**
13
+ * Shared with the hooks generator on purpose.
14
+ *
15
+ * A hook's `row` must be the same shape the client sees for that table, and two copies of this logic
16
+ * would drift — the client would gain a column type the hook handler did not, which is the failure
17
+ * mode this codebase has already paid for once.
18
+ */
19
+ export declare function resolveTableName(model: AstModel): string;
1
20
  export declare function generateClientAugmentation(ast: unknown): string;
21
+ export declare function generateRowType(fields: Record<string, Record<string, unknown>>): string;
22
+ export declare function generateInsertType(fields: Record<string, Record<string, unknown>>): string;
23
+ export declare function generateUpdateType(fields: Record<string, Record<string, unknown>>): string;
2
24
  //# sourceMappingURL=augmentation-generator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"augmentation-generator.d.ts","sourceRoot":"","sources":["../src/augmentation-generator.ts"],"names":[],"mappings":"AASA,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAyB/D"}
1
+ {"version":3,"file":"augmentation-generator.d.ts","sourceRoot":"","sources":["../src/augmentation-generator.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAC/C,WAAW,CAAC,EAAE;QACZ,EAAE,CAAC,EAAE;YAAE,SAAS,CAAC,EAAE,MAAM,CAAC;YAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;SAAE,CAAA;KACjD,CAAA;CACF;AAMD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAQxD;AAUD,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CA2B/D;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CAOvF;AAMD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CAU1F;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CAO1F"}
@@ -1,13 +1,42 @@
1
+ /**
2
+ * Shared with the hooks generator on purpose.
3
+ *
4
+ * A hook's `row` must be the same shape the client sees for that table, and two copies of this logic
5
+ * would drift — the client would gain a column type the hook handler did not, which is the failure
6
+ * mode this codebase has already paid for once.
7
+ */
8
+ export function resolveTableName(model) {
9
+ const fromAnnotations = model.annotations?.db?.tableName;
10
+ if (typeof fromAnnotations === "string" && fromAnnotations.length > 0)
11
+ return fromAnnotations;
12
+ if (typeof model.tableName === "string" && model.tableName.length > 0)
13
+ return model.tableName;
14
+ if (typeof model.name === "string" && model.name.length > 0) {
15
+ return model.name.replace(/([A-Z])/g, "_$1").replace(/^_/, "").toLowerCase();
16
+ }
17
+ return "unknown";
18
+ }
19
+ function fieldServerGenerated(meta) {
20
+ if (meta["serverGenerated"] === true)
21
+ return true;
22
+ const annotations = meta["annotations"];
23
+ if (typeof annotations !== "object" || annotations === null)
24
+ return false;
25
+ const db = annotations.db;
26
+ return db?.serverGenerated === true;
27
+ }
1
28
  export function generateClientAugmentation(ast) {
2
29
  const parsed = ast;
3
- const models = [...(parsed.models ?? [])].sort((a, b) => a.tableName.localeCompare(b.tableName));
30
+ const models = [...(parsed.models ?? [])]
31
+ .map((model) => ({ model, tableName: resolveTableName(model) }))
32
+ .sort((a, b) => a.tableName.localeCompare(b.tableName));
4
33
  const lines = [];
5
34
  lines.push("// Generated by supatype CLI — do not edit manually.");
6
35
  lines.push("");
7
36
  lines.push("declare module \"@supatype/client\" {");
8
37
  lines.push(" interface SupatypeModels {");
9
- for (const model of models) {
10
- lines.push(` ${quoteKey(model.tableName)}: {`);
38
+ for (const { model, tableName } of models) {
39
+ lines.push(` ${quoteKey(tableName)}: {`);
11
40
  lines.push(` Row: ${generateRowType(model.fields)}`);
12
41
  lines.push(` Insert: ${generateInsertType(model.fields)}`);
13
42
  lines.push(` Update: ${generateUpdateType(model.fields)}`);
@@ -20,7 +49,7 @@ export function generateClientAugmentation(ast) {
20
49
  lines.push("");
21
50
  return lines.join("\n");
22
51
  }
23
- function generateRowType(fields) {
52
+ export function generateRowType(fields) {
24
53
  const entries = Object.entries(fields).sort(([a], [b]) => a.localeCompare(b));
25
54
  if (entries.length === 0)
26
55
  return "Record<string, unknown>";
@@ -30,9 +59,9 @@ function generateRowType(fields) {
30
59
  return `{\n${body}\n}`;
31
60
  }
32
61
  function insertColumnOptionalOnInsert(meta) {
33
- return meta["default"] !== undefined || meta["serverGenerated"] === true;
62
+ return meta["default"] !== undefined || fieldServerGenerated(meta);
34
63
  }
35
- function generateInsertType(fields) {
64
+ export function generateInsertType(fields) {
36
65
  const entries = Object.entries(fields).sort(([a], [b]) => a.localeCompare(b));
37
66
  if (entries.length === 0)
38
67
  return "Record<string, unknown>";
@@ -44,7 +73,7 @@ function generateInsertType(fields) {
44
73
  .join("\n");
45
74
  return `{\n${body}\n}`;
46
75
  }
47
- function generateUpdateType(fields) {
76
+ export function generateUpdateType(fields) {
48
77
  const entries = Object.entries(fields).sort(([a], [b]) => a.localeCompare(b));
49
78
  if (entries.length === 0)
50
79
  return "Record<string, unknown>";
@@ -57,6 +86,13 @@ function toTsType(meta) {
57
86
  const kind = typeof meta["kind"] === "string" ? meta["kind"] : "json";
58
87
  const required = meta["required"] === true;
59
88
  const base = (() => {
89
+ // A field that knows its own shape says so. Without this, everything stored as JSONB collapses
90
+ // to `Record<string, unknown>` in the generated row — so `Currency` would arrive as an opaque
91
+ // object rather than `{ amount: string; code: "USD" }`, and the schema's precision would be
92
+ // lost exactly where a caller reads it.
93
+ const declared = meta["tsType"];
94
+ if (typeof declared === "string" && declared.length > 0)
95
+ return declared;
60
96
  switch (kind) {
61
97
  case "uuid":
62
98
  case "slug":
@@ -1 +1 @@
1
- {"version":3,"file":"augmentation-generator.js","sourceRoot":"","sources":["../src/augmentation-generator.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,0BAA0B,CAAC,GAAY;IACrD,MAAM,MAAM,GAAG,GAAe,CAAA;IAC9B,MAAM,MAAM,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;IAEhG,MAAM,KAAK,GAAa,EAAE,CAAA;IAC1B,KAAK,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAA;IAClE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACd,KAAK,CAAC,IAAI,CAAC,uCAA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S,CAAC,CAAC,CAAC,CAAC,CAAA;gBAChC,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;YAC1D,CAAC;YACD;gBACE,OAAO,SAAS,CAAA;QACpB,CAAC;IACH,CAAC,CAAC,EAAE,CAAA;IACJ,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,SAAS,CAAA;AAC3C,CAAC;AAED,SAAS,QAAQ,CAAC,GAAW;IAC3B,OAAO,4BAA4B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;AAC3E,CAAC"}
@@ -47,6 +47,15 @@ export declare function cachePath(component: Component, version: string): string
47
47
  export declare function cachedBinaryPath(component: Component, version: string, platform: PlatformId): string;
48
48
  /** True when the platform binary for `version` is present and passes format checks. */
49
49
  export declare function isCachedBinaryReady(component: Component, version: string, platform?: PlatformId): boolean;
50
+ /**
51
+ * Names a published archive may carry, most-canonical first.
52
+ *
53
+ * `supatype-postgres` published the Intel macOS archive as `darwin-x86_64` while every other platform
54
+ * used `amd64` — the spelling the CLI derives from `process.arch === "x64"`. Releases already on the CDN
55
+ * carry the old name, so both are accepted and the *signed* checksums manifest decides which exists.
56
+ * Nothing is guessed: the URL and the hash always come from the same manifest entry.
57
+ */
58
+ export declare function archiveNameCandidates(component: Component, version: string, platform: PlatformId): string[];
50
59
  export declare function currentPlatform(): PlatformId;
51
60
  /**
52
61
  * Resolve the binary path for a component.
@@ -76,6 +85,11 @@ export declare function download(component: Component, version: string, platform
76
85
  * raw file) and prehashed mode ("ED", over BLAKE2b-512(file)). Throws if invalid.
77
86
  */
78
87
  export declare function verifyMinisign(fileBytes: Buffer, sigFileContent: string, pubKeyStr: string): void;
88
+ /** Which published name matched, and its hash — both from the same signed manifest entry. */
89
+ export interface ChecksumMatch {
90
+ filename: string;
91
+ checksum: string;
92
+ }
79
93
  /** Confirm a downloaded/cached artifact matches the expected CDN format (tests, CI). */
80
94
  export declare function validateArtifactFormat(component: Component, filePath: string, platform: PlatformId): void;
81
95
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"binary-cache.d.ts","sourceRoot":"","sources":["../src/binary-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAoBH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAUhE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,UAAU,CAAA;AAExC,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAGxE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAGxE;AAED,yFAAyF;AACzF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAO7E;AAED,kEAAkE;AAClE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,EAAE,CAiB/E;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAyB1F;AAMD,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAqB,KAAK,SAAS,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAE3F,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAA;IAClC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAA;CACxB;AAQD,sFAAsF;AACtF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG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