@supatype/cli 0.1.6 → 0.1.9

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 (477) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-test.log +152 -102
  3. package/.turbo/turbo-typecheck.log +1 -1
  4. package/LICENSE +202 -0
  5. package/deno.d.ts +52 -0
  6. package/dist/app/framework.js +1 -1
  7. package/dist/app/framework.js.map +1 -1
  8. package/dist/augmentation-generator.d.ts +22 -0
  9. package/dist/augmentation-generator.d.ts.map +1 -1
  10. package/dist/augmentation-generator.js +19 -5
  11. package/dist/augmentation-generator.js.map +1 -1
  12. package/dist/binary-cache.d.ts +42 -6
  13. package/dist/binary-cache.d.ts.map +1 -1
  14. package/dist/binary-cache.js +76 -44
  15. package/dist/binary-cache.js.map +1 -1
  16. package/dist/cache-clean.d.ts +15 -0
  17. package/dist/cache-clean.d.ts.map +1 -0
  18. package/dist/cache-clean.js +76 -0
  19. package/dist/cache-clean.js.map +1 -0
  20. package/dist/cache-pins.d.ts +51 -0
  21. package/dist/cache-pins.d.ts.map +1 -0
  22. package/dist/cache-pins.js +184 -0
  23. package/dist/cache-pins.js.map +1 -0
  24. package/dist/cli-artifacts.d.ts +32 -0
  25. package/dist/cli-artifacts.d.ts.map +1 -0
  26. package/dist/cli-artifacts.js +49 -0
  27. package/dist/cli-artifacts.js.map +1 -0
  28. package/dist/cli-install-method.d.ts +27 -0
  29. package/dist/cli-install-method.d.ts.map +1 -0
  30. package/dist/cli-install-method.js +78 -0
  31. package/dist/cli-install-method.js.map +1 -0
  32. package/dist/cli-package-version.d.ts +1 -1
  33. package/dist/cli-package-version.d.ts.map +1 -1
  34. package/dist/cli-package-version.js +6 -1
  35. package/dist/cli-package-version.js.map +1 -1
  36. package/dist/cli-standalone.d.ts +13 -4
  37. package/dist/cli-standalone.d.ts.map +1 -1
  38. package/dist/cli-standalone.js +86 -31
  39. package/dist/cli-standalone.js.map +1 -1
  40. package/dist/cli-version-embedded.d.ts +10 -0
  41. package/dist/cli-version-embedded.d.ts.map +1 -0
  42. package/dist/cli-version-embedded.js +13 -0
  43. package/dist/cli-version-embedded.js.map +1 -0
  44. package/dist/cli.d.ts.map +1 -1
  45. package/dist/cli.js +7 -1
  46. package/dist/cli.js.map +1 -1
  47. package/dist/cloud-credentials.d.ts +34 -0
  48. package/dist/cloud-credentials.d.ts.map +1 -0
  49. package/dist/cloud-credentials.js +139 -0
  50. package/dist/cloud-credentials.js.map +1 -0
  51. package/dist/commands/add.js +1 -1
  52. package/dist/commands/add.js.map +1 -1
  53. package/dist/commands/admin.d.ts +11 -0
  54. package/dist/commands/admin.d.ts.map +1 -1
  55. package/dist/commands/admin.js +123 -21
  56. package/dist/commands/admin.js.map +1 -1
  57. package/dist/commands/adopt.js +1 -1
  58. package/dist/commands/adopt.js.map +1 -1
  59. package/dist/commands/app.js +2 -2
  60. package/dist/commands/app.js.map +1 -1
  61. package/dist/commands/cache.d.ts +1 -1
  62. package/dist/commands/cache.d.ts.map +1 -1
  63. package/dist/commands/cache.js +69 -73
  64. package/dist/commands/cache.js.map +1 -1
  65. package/dist/commands/cloud.d.ts.map +1 -1
  66. package/dist/commands/cloud.js +32 -8
  67. package/dist/commands/cloud.js.map +1 -1
  68. package/dist/commands/db.d.ts +3 -2
  69. package/dist/commands/db.d.ts.map +1 -1
  70. package/dist/commands/db.js +149 -3
  71. package/dist/commands/db.js.map +1 -1
  72. package/dist/commands/deploy.d.ts +9 -9
  73. package/dist/commands/deploy.js +12 -12
  74. package/dist/commands/deploy.js.map +1 -1
  75. package/dist/commands/dev.d.ts +3 -3
  76. package/dist/commands/dev.d.ts.map +1 -1
  77. package/dist/commands/dev.js +63 -23
  78. package/dist/commands/dev.js.map +1 -1
  79. package/dist/commands/doctor.d.ts +28 -0
  80. package/dist/commands/doctor.d.ts.map +1 -1
  81. package/dist/commands/doctor.js +60 -3
  82. package/dist/commands/doctor.js.map +1 -1
  83. package/dist/commands/engine.d.ts +1 -1
  84. package/dist/commands/engine.js +1 -1
  85. package/dist/commands/functions.d.ts +7 -0
  86. package/dist/commands/functions.d.ts.map +1 -1
  87. package/dist/commands/functions.js +45 -11
  88. package/dist/commands/functions.js.map +1 -1
  89. package/dist/commands/generate.d.ts.map +1 -1
  90. package/dist/commands/generate.js +5 -1
  91. package/dist/commands/generate.js.map +1 -1
  92. package/dist/commands/hooks.d.ts +12 -0
  93. package/dist/commands/hooks.d.ts.map +1 -0
  94. package/dist/commands/hooks.js +118 -0
  95. package/dist/commands/hooks.js.map +1 -0
  96. package/dist/commands/init.d.ts.map +1 -1
  97. package/dist/commands/init.js +64 -30
  98. package/dist/commands/init.js.map +1 -1
  99. package/dist/commands/internal.d.ts +6 -0
  100. package/dist/commands/internal.d.ts.map +1 -0
  101. package/dist/commands/internal.js +22 -0
  102. package/dist/commands/internal.js.map +1 -0
  103. package/dist/commands/link-helpers.d.ts.map +1 -1
  104. package/dist/commands/link-helpers.js +8 -2
  105. package/dist/commands/link-helpers.js.map +1 -1
  106. package/dist/commands/login.d.ts +7 -0
  107. package/dist/commands/login.d.ts.map +1 -0
  108. package/dist/commands/login.js +110 -0
  109. package/dist/commands/login.js.map +1 -0
  110. package/dist/commands/logs.d.ts +1 -1
  111. package/dist/commands/migrate.js +5 -5
  112. package/dist/commands/migrate.js.map +1 -1
  113. package/dist/commands/pg.d.ts +1 -1
  114. package/dist/commands/pg.js +1 -1
  115. package/dist/commands/plugins.js +1 -1
  116. package/dist/commands/plugins.js.map +1 -1
  117. package/dist/commands/pull.js +2 -2
  118. package/dist/commands/pull.js.map +1 -1
  119. package/dist/commands/push.d.ts.map +1 -1
  120. package/dist/commands/push.js +110 -7
  121. package/dist/commands/push.js.map +1 -1
  122. package/dist/commands/self-host.d.ts +1 -1
  123. package/dist/commands/self-host.js +1 -1
  124. package/dist/commands/self-update.d.ts +3 -2
  125. package/dist/commands/self-update.d.ts.map +1 -1
  126. package/dist/commands/self-update.js +31 -16
  127. package/dist/commands/self-update.js.map +1 -1
  128. package/dist/commands/status.d.ts +1 -1
  129. package/dist/commands/update.d.ts +1 -1
  130. package/dist/commands/update.js +1 -1
  131. package/dist/config.d.ts +1 -1
  132. package/dist/config.d.ts.map +1 -1
  133. package/dist/config.js +19 -4
  134. package/dist/config.js.map +1 -1
  135. package/dist/db-preflight.d.ts +78 -0
  136. package/dist/db-preflight.d.ts.map +1 -0
  137. package/dist/db-preflight.js +452 -0
  138. package/dist/db-preflight.js.map +1 -0
  139. package/dist/dev-compose.d.ts +4 -4
  140. package/dist/dev-compose.d.ts.map +1 -1
  141. package/dist/dev-compose.js +143 -88
  142. package/dist/dev-compose.js.map +1 -1
  143. package/dist/dev-log-filter.d.ts +1 -1
  144. package/dist/dev-log-filter.d.ts.map +1 -1
  145. package/dist/dev-log-filter.js +1 -1
  146. package/dist/dev-log-filter.js.map +1 -1
  147. package/dist/dev-ports.d.ts +2 -2
  148. package/dist/dev-ports.d.ts.map +1 -1
  149. package/dist/dev-ports.js +2 -2
  150. package/dist/dev-ports.js.map +1 -1
  151. package/dist/dev-session.d.ts +5 -5
  152. package/dist/dev-session.d.ts.map +1 -1
  153. package/dist/dev-session.js +6 -6
  154. package/dist/dev-session.js.map +1 -1
  155. package/dist/dev-shutdown.d.ts +5 -5
  156. package/dist/dev-shutdown.d.ts.map +1 -1
  157. package/dist/dev-shutdown.js +7 -7
  158. package/dist/dev-shutdown.js.map +1 -1
  159. package/dist/dev-task-colors.d.ts +1 -1
  160. package/dist/dev-task-colors.d.ts.map +1 -1
  161. package/dist/dev-task-colors.js +1 -1
  162. package/dist/dev-task-colors.js.map +1 -1
  163. package/dist/docker-postgres.d.ts +5 -5
  164. package/dist/docker-postgres.d.ts.map +1 -1
  165. package/dist/docker-postgres.js +5 -5
  166. package/dist/docker-postgres.js.map +1 -1
  167. package/dist/docker-runtime.d.ts +2 -2
  168. package/dist/docker-runtime.d.ts.map +1 -1
  169. package/dist/docker-runtime.js +5 -5
  170. package/dist/docker-runtime.js.map +1 -1
  171. package/dist/engine-client.d.ts +1 -1
  172. package/dist/engine-client.js +3 -3
  173. package/dist/engine-client.js.map +1 -1
  174. package/dist/engine-push-output.js +1 -1
  175. package/dist/engine-push-output.js.map +1 -1
  176. package/dist/ensure-binary.d.ts.map +1 -1
  177. package/dist/ensure-binary.js +17 -0
  178. package/dist/ensure-binary.js.map +1 -1
  179. package/dist/ensure-component-binaries.js +1 -1
  180. package/dist/ensure-component-binaries.js.map +1 -1
  181. package/dist/env-file.d.ts +40 -2
  182. package/dist/env-file.d.ts.map +1 -1
  183. package/dist/env-file.js +132 -11
  184. package/dist/env-file.js.map +1 -1
  185. package/dist/field-masking-tier.d.ts +50 -0
  186. package/dist/field-masking-tier.d.ts.map +1 -0
  187. package/dist/field-masking-tier.js +91 -0
  188. package/dist/field-masking-tier.js.map +1 -0
  189. package/dist/functions-deno-types.d.ts +24 -0
  190. package/dist/functions-deno-types.d.ts.map +1 -0
  191. package/dist/functions-deno-types.js +155 -0
  192. package/dist/functions-deno-types.js.map +1 -0
  193. package/dist/functions-router-gen.js +1 -1
  194. package/dist/gitignore.d.ts +2 -2
  195. package/dist/gitignore.d.ts.map +1 -1
  196. package/dist/gitignore.js +3 -3
  197. package/dist/gitignore.js.map +1 -1
  198. package/dist/hook-upload.d.ts +30 -0
  199. package/dist/hook-upload.d.ts.map +1 -0
  200. package/dist/hook-upload.js +86 -0
  201. package/dist/hook-upload.js.map +1 -0
  202. package/dist/hooks-generator.d.ts +8 -0
  203. package/dist/hooks-generator.d.ts.map +1 -0
  204. package/dist/hooks-generator.js +332 -0
  205. package/dist/hooks-generator.js.map +1 -0
  206. package/dist/index.d.ts +1 -1
  207. package/dist/index.js +1 -1
  208. package/dist/init-project-detect.d.ts +1 -1
  209. package/dist/init-project-detect.d.ts.map +1 -1
  210. package/dist/init-project-detect.js +1 -1
  211. package/dist/init-project-detect.js.map +1 -1
  212. package/dist/link.d.ts +4 -0
  213. package/dist/link.d.ts.map +1 -1
  214. package/dist/link.js +2 -0
  215. package/dist/link.js.map +1 -1
  216. package/dist/local-secrets.d.ts +71 -0
  217. package/dist/local-secrets.d.ts.map +1 -0
  218. package/dist/local-secrets.js +100 -0
  219. package/dist/local-secrets.js.map +1 -0
  220. package/dist/main.d.ts +2 -0
  221. package/dist/main.d.ts.map +1 -0
  222. package/dist/main.js +20 -0
  223. package/dist/main.js.map +1 -0
  224. package/dist/model-hooks.d.ts +73 -0
  225. package/dist/model-hooks.d.ts.map +1 -0
  226. package/dist/model-hooks.js +211 -0
  227. package/dist/model-hooks.js.map +1 -0
  228. package/dist/pgbouncer-userlist.d.ts +1 -1
  229. package/dist/pgbouncer-userlist.d.ts.map +1 -1
  230. package/dist/pgbouncer-userlist.js +2 -2
  231. package/dist/pgbouncer-userlist.js.map +1 -1
  232. package/dist/postgres-ctl.d.ts +12 -1
  233. package/dist/postgres-ctl.d.ts.map +1 -1
  234. package/dist/postgres-ctl.js +28 -5
  235. package/dist/postgres-ctl.js.map +1 -1
  236. package/dist/process-manager.d.ts +2 -2
  237. package/dist/process-manager.d.ts.map +1 -1
  238. package/dist/process-manager.js +4 -4
  239. package/dist/process-manager.js.map +1 -1
  240. package/dist/project-config.d.ts +122 -2
  241. package/dist/project-config.d.ts.map +1 -1
  242. package/dist/project-config.js +150 -1
  243. package/dist/project-config.js.map +1 -1
  244. package/dist/pull-utils.d.ts +2 -2
  245. package/dist/pull-utils.d.ts.map +1 -1
  246. package/dist/pull-utils.js +4 -4
  247. package/dist/pull-utils.js.map +1 -1
  248. package/dist/realtime-launch.js +1 -1
  249. package/dist/realtime-launch.js.map +1 -1
  250. package/dist/release-pins.d.ts +1 -1
  251. package/dist/release-pins.js +2 -2
  252. package/dist/release-pins.js.map +1 -1
  253. package/dist/resolve-api-url.js +1 -1
  254. package/dist/resolve-api-url.js.map +1 -1
  255. package/dist/resolve-target.d.ts +4 -0
  256. package/dist/resolve-target.d.ts.map +1 -1
  257. package/dist/resolve-target.js +69 -73
  258. package/dist/resolve-target.js.map +1 -1
  259. package/dist/rest-cache-admin.js +2 -2
  260. package/dist/rest-cache-admin.js.map +1 -1
  261. package/dist/runtime-routes.d.ts +1 -1
  262. package/dist/runtime-routes.js +1 -1
  263. package/dist/schema-ast-v2.d.ts +5 -4
  264. package/dist/schema-ast-v2.d.ts.map +1 -1
  265. package/dist/schema-ast-v2.js +5 -3
  266. package/dist/schema-ast-v2.js.map +1 -1
  267. package/dist/schema-push-lock.d.ts.map +1 -1
  268. package/dist/schema-push-lock.js +43 -16
  269. package/dist/schema-push-lock.js.map +1 -1
  270. package/dist/scripts/postinstall.d.ts +1 -1
  271. package/dist/scripts/postinstall.js +1 -1
  272. package/dist/self-host-compose.d.ts +26 -2
  273. package/dist/self-host-compose.d.ts.map +1 -1
  274. package/dist/self-host-compose.js +305 -73
  275. package/dist/self-host-compose.js.map +1 -1
  276. package/dist/service-role-check.d.ts +21 -0
  277. package/dist/service-role-check.d.ts.map +1 -0
  278. package/dist/service-role-check.js +85 -0
  279. package/dist/service-role-check.js.map +1 -0
  280. package/dist/storage-provision.d.ts +1 -1
  281. package/dist/storage-provision.js +3 -3
  282. package/dist/storage-provision.js.map +1 -1
  283. package/dist/studio-dev-server.d.ts +1 -1
  284. package/dist/studio-dev-server.d.ts.map +1 -1
  285. package/dist/systemd.d.ts +1 -1
  286. package/dist/systemd.js +1 -1
  287. package/dist/target-client.d.ts +17 -0
  288. package/dist/target-client.d.ts.map +1 -1
  289. package/dist/target-client.js +69 -17
  290. package/dist/target-client.js.map +1 -1
  291. package/dist/tsx-runner.js +1 -1
  292. package/dist/tsx-runner.js.map +1 -1
  293. package/dist/type-extractor.d.ts.map +1 -1
  294. package/dist/type-extractor.js +738 -34
  295. package/dist/type-extractor.js.map +1 -1
  296. package/dist/type-resolver.js +1 -1
  297. package/dist/type-resolver.js.map +1 -1
  298. package/dist/ui/brand.d.ts +1 -1
  299. package/dist/ui/brand.js +1 -1
  300. package/dist/ui/components/LogoWordmark.d.ts +1 -1
  301. package/dist/ui/components/LogoWordmark.d.ts.map +1 -1
  302. package/dist/ui/components/LogoWordmark.js +1 -1
  303. package/dist/ui/components/LogoWordmark.js.map +1 -1
  304. package/dist/ui/components/SelectField.js +1 -1
  305. package/dist/ui/components/SelectField.js.map +1 -1
  306. package/dist/ui/confirm.d.ts +1 -1
  307. package/dist/ui/confirm.js +1 -1
  308. package/dist/ui/fatal.d.ts +1 -1
  309. package/dist/ui/fatal.d.ts.map +1 -1
  310. package/dist/ui/fatal.js +1 -1
  311. package/dist/ui/fatal.js.map +1 -1
  312. package/dist/ui/flows/prompt-fields.js +1 -1
  313. package/dist/ui/flows/prompt-fields.js.map +1 -1
  314. package/dist/ui/interactive.d.ts +1 -1
  315. package/dist/ui/interactive.d.ts.map +1 -1
  316. package/dist/ui/interactive.js +1 -1
  317. package/dist/ui/interactive.js.map +1 -1
  318. package/dist/ui/progress.d.ts +1 -1
  319. package/dist/ui/progress.js +1 -1
  320. package/dist/ui/runtime/command-chrome.js +2 -2
  321. package/dist/ui/runtime/command-chrome.js.map +1 -1
  322. package/dist/ui/runtime/run-clack-flow.js +1 -1
  323. package/dist/ui/runtime/run-clack-flow.js.map +1 -1
  324. package/dist/ui/runtime/stdin-after-ink.d.ts.map +1 -1
  325. package/dist/ui/runtime/stdin-after-ink.js +4 -2
  326. package/dist/ui/runtime/stdin-after-ink.js.map +1 -1
  327. package/dist/ui/theme.d.ts +1 -1
  328. package/dist/ui/theme.js +1 -1
  329. package/dist/valkey-sidecar.d.ts +1 -1
  330. package/dist/valkey-sidecar.d.ts.map +1 -1
  331. package/dist/valkey-sidecar.js +2 -2
  332. package/dist/valkey-sidecar.js.map +1 -1
  333. package/package.json +6 -2
  334. package/scripts/build-release-artifacts.sh +112 -0
  335. package/scripts/generate-homebrew-formula.mjs +123 -0
  336. package/scripts/mirror-deno-release.sh +1 -1
  337. package/src/TYPE-RESOLUTION.md +31 -31
  338. package/src/app/framework.ts +1 -1
  339. package/src/augmentation-generator.ts +19 -6
  340. package/src/binary-cache.ts +94 -47
  341. package/src/cache-clean.ts +81 -0
  342. package/src/cache-pins.ts +243 -0
  343. package/src/cli-artifacts.ts +65 -0
  344. package/src/cli-install-method.ts +87 -0
  345. package/src/cli-package-version.ts +5 -1
  346. package/src/cli-standalone.ts +116 -34
  347. package/src/cli-version-embedded.ts +12 -0
  348. package/src/cli.ts +7 -1
  349. package/src/cloud-credentials.ts +183 -0
  350. package/src/commands/add.ts +1 -1
  351. package/src/commands/admin.ts +142 -27
  352. package/src/commands/adopt.ts +1 -1
  353. package/src/commands/app.ts +2 -2
  354. package/src/commands/cache.ts +92 -77
  355. package/src/commands/cloud.ts +32 -8
  356. package/src/commands/db.ts +164 -3
  357. package/src/commands/deploy.ts +12 -12
  358. package/src/commands/dev.ts +72 -23
  359. package/src/commands/doctor.ts +69 -3
  360. package/src/commands/engine.ts +1 -1
  361. package/src/commands/functions.ts +47 -10
  362. package/src/commands/generate.ts +5 -1
  363. package/src/commands/hooks.ts +138 -0
  364. package/src/commands/init.ts +65 -31
  365. package/src/commands/internal.ts +23 -0
  366. package/src/commands/link-helpers.ts +9 -2
  367. package/src/commands/login.ts +127 -0
  368. package/src/commands/logs.ts +1 -1
  369. package/src/commands/migrate.ts +5 -5
  370. package/src/commands/pg.ts +1 -1
  371. package/src/commands/plugins.ts +1 -1
  372. package/src/commands/pull.ts +2 -2
  373. package/src/commands/push.ts +124 -7
  374. package/src/commands/self-host.ts +1 -1
  375. package/src/commands/self-update.ts +41 -19
  376. package/src/commands/status.ts +1 -1
  377. package/src/commands/update.ts +1 -1
  378. package/src/config.ts +23 -4
  379. package/src/db-preflight.ts +575 -0
  380. package/src/dev-compose.ts +158 -89
  381. package/src/dev-log-filter.ts +1 -1
  382. package/src/dev-ports.ts +3 -3
  383. package/src/dev-session.ts +6 -6
  384. package/src/dev-shutdown.ts +8 -8
  385. package/src/dev-task-colors.ts +1 -1
  386. package/src/docker-postgres.ts +6 -6
  387. package/src/docker-runtime.ts +5 -5
  388. package/src/engine-client.ts +3 -3
  389. package/src/engine-push-output.ts +1 -1
  390. package/src/ensure-binary.ts +20 -0
  391. package/src/ensure-component-binaries.ts +1 -1
  392. package/src/env-file.ts +157 -11
  393. package/src/field-masking-tier.ts +107 -0
  394. package/src/functions-deno-types.ts +188 -0
  395. package/src/functions-router-gen.ts +1 -1
  396. package/src/gitignore.ts +3 -3
  397. package/src/hook-upload.ts +107 -0
  398. package/src/hooks-generator.ts +352 -0
  399. package/src/index.ts +1 -1
  400. package/src/init-project-detect.ts +1 -1
  401. package/src/link.ts +7 -0
  402. package/src/local-secrets.ts +104 -0
  403. package/src/main.ts +20 -0
  404. package/src/model-hooks.ts +260 -0
  405. package/src/pgbouncer-userlist.ts +2 -2
  406. package/src/postgres-ctl.ts +32 -5
  407. package/src/process-manager.ts +4 -4
  408. package/src/project-config.ts +237 -3
  409. package/src/pull-utils.ts +4 -4
  410. package/src/realtime-launch.ts +1 -1
  411. package/src/release-pins.ts +2 -2
  412. package/src/resolve-api-url.ts +1 -1
  413. package/src/resolve-target.ts +113 -68
  414. package/src/rest-cache-admin.ts +2 -2
  415. package/src/runtime-routes.ts +2 -2
  416. package/src/schema-ast-v2.ts +8 -5
  417. package/src/schema-push-lock.ts +56 -17
  418. package/src/scripts/postinstall.ts +1 -1
  419. package/src/self-host-compose.ts +348 -72
  420. package/src/service-role-check.ts +111 -0
  421. package/src/storage-provision.ts +3 -3
  422. package/src/studio-dev-server.ts +1 -1
  423. package/src/systemd.ts +1 -1
  424. package/src/target-client.ts +105 -18
  425. package/src/tsx-runner.ts +1 -1
  426. package/src/type-extractor.ts +885 -30
  427. package/src/type-resolver.ts +1 -1
  428. package/src/ui/README.md +1 -1
  429. package/src/ui/brand.ts +1 -1
  430. package/src/ui/components/LogoWordmark.tsx +1 -1
  431. package/src/ui/components/SelectField.tsx +1 -1
  432. package/src/ui/confirm.ts +1 -1
  433. package/src/ui/fatal.ts +1 -1
  434. package/src/ui/flows/prompt-fields.tsx +1 -1
  435. package/src/ui/interactive.ts +1 -1
  436. package/src/ui/progress.ts +1 -1
  437. package/src/ui/runtime/command-chrome.ts +2 -2
  438. package/src/ui/runtime/run-clack-flow.tsx +1 -1
  439. package/src/ui/runtime/stdin-after-ink.ts +4 -2
  440. package/src/ui/theme.ts +1 -1
  441. package/src/valkey-sidecar.ts +2 -2
  442. package/tests/access-composition.test.ts +667 -0
  443. package/tests/admin-studio-membership.test.ts +121 -0
  444. package/tests/api-schemas.test.ts +83 -0
  445. package/tests/archive-name-alias.test.ts +42 -0
  446. package/tests/augmentation-generator.test.ts +28 -0
  447. package/tests/cache-clean.test.ts +206 -0
  448. package/tests/cli-help.test.ts +11 -2
  449. package/tests/cli-install-method.test.ts +66 -0
  450. package/tests/command-chrome-coverage.test.ts +31 -26
  451. package/tests/command-chrome-wrap.test.ts +1 -0
  452. package/tests/db-preflight.test.ts +72 -0
  453. package/tests/doctor-render.test.ts +62 -0
  454. package/tests/doctor-service-role.test.ts +55 -0
  455. package/tests/engine-push-output.test.ts +1 -1
  456. package/tests/env-file.test.ts +121 -0
  457. package/tests/external-database-compose.test.ts +184 -0
  458. package/tests/external-database-config.test.ts +154 -0
  459. package/tests/field-masking-tier.test.ts +184 -0
  460. package/tests/functions-deno-types.test.ts +197 -0
  461. package/tests/homebrew-formula.test.ts +100 -0
  462. package/tests/hook-upload.test.ts +125 -0
  463. package/tests/hooks-generator.test.ts +212 -0
  464. package/tests/init.test.ts +5 -2
  465. package/tests/keys.test.ts +8 -2
  466. package/tests/local-secrets.test.ts +92 -0
  467. package/tests/model-hooks.test.ts +322 -0
  468. package/tests/runtime-contract.test.ts +113 -1
  469. package/tests/service-role-check.test.ts +109 -0
  470. package/tests/service-role-routes.test.ts +51 -0
  471. package/tests/storage-provision.test.ts +1 -1
  472. package/tests/target-client-refresh.test.ts +94 -0
  473. package/tests/type-extractor.test.ts +187 -0
  474. package/tsconfig.tsbuildinfo +1 -1
  475. package/vitest.config.ts +7 -1
  476. package/scripts/build-release-bundle.mjs +0 -27
  477. package/tests/engine-distribution.test.ts +0 -418
@@ -1,4 +1,4 @@
1
1
 
2
- > @supatype/cli@0.1.6 build /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.1.9 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.6 test /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.1.9 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) 359ms
9
- ✓ tests/runtime-contract.test.ts (41 tests) 117ms
8
+ ✓ tests/type-extractor.test.ts (43 tests) 286ms
9
+ ✓ tests/access-composition.test.ts (26 tests) 237ms
10
+ ✓ tests/model-hooks.test.ts (19 tests) 116ms
11
+ ✓ tests/runtime-contract.test.ts (49 tests) 173ms
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) 75ms
298
+ ✓ tests/init.test.ts (26 tests) 93ms
299
+ ✓ tests/field-masking-tier.test.ts (16 tests) 21ms
300
+ ✓ tests/external-database-compose.test.ts (17 tests) 21ms
295
301
 
296
- ✓ tests/dev-ui.test.ts (21 tests) 108ms
302
+ ✓ tests/dev-ui.test.ts (21 tests) 131ms
297
303
 
298
304
  [supatype] Shutting down…
299
305
  stdout | tests/docker-runtime.test.ts > requireDockerDaemon > exits when the daemon is unavailable
@@ -304,17 +310,30 @@
304
310
 
305
311
  docker: daemon down
306
312
 
307
- ✓ tests/docker-runtime.test.ts (10 tests) 15ms
308
- ✓ tests/config.test.ts (19 tests) 5676ms
309
- ✓ loads a valid supatype.config.ts (plain export default, no package imports)  614ms
310
- ✓ normalizes shorthand schema string to { path, pg_schema }  624ms
311
- ✓ loads a supatype.config.js (plain ESM)  610ms
312
- ✓ loads config without a versions section (latest by default)  536ms
313
- ✓ prefers supatype.config.ts over supatype.config.js when both exist  631ms
314
- ✓ supports optional output field in config  550ms
315
- ✓ merges supatype.local.config.ts over base  1135ms
316
- ✓ loads defineConfig import before @supatype/cli is installed (init scaffold)  964ms
317
- ✓ tests/command-chrome-coverage.test.ts (1 test) 14ms
313
+ ✓ tests/docker-runtime.test.ts (10 tests) 19ms
314
+ ✓ tests/hooks-generator.test.ts (5 tests) 6285ms
315
+ ✓ typechecks under strict mode, together with a handler that uses it  3112ms
316
+ ✓ rejects a handler for a table that declares no hook  3128ms
317
+ ✓ tests/config.test.ts (19 tests) 9051ms
318
+ ✓ loads a valid supatype.config.ts (plain export default, no package imports)  954ms
319
+ ✓ normalizes shorthand schema string to { path, pg_schema }  785ms
320
+ ✓ loads a supatype.config.js (plain ESM)  828ms
321
+ ✓ loads config without a versions section (latest by default)  967ms
322
+ ✓ prefers supatype.config.ts over supatype.config.js when both exist  1002ms
323
+ ✓ supports optional output field in config  963ms
324
+ ✓ merges supatype.local.config.ts over base  1972ms
325
+ ✓ loads defineConfig import before @supatype/cli is installed (init scaffold)  1567ms
326
+ ✓ tests/functions-deno-types.test.ts (7 tests) 4280ms
327
+ ✓ tsc fails with Cannot find name Deno without ambient types  3062ms
328
+ ✓ tsc passes for Deno.env after ensureFunctionsDenoTypes  1196ms
329
+ ✓ tests/external-database-config.test.ts (14 tests) 13ms
330
+ ✓ tests/cache-clean.test.ts (8 tests) 2483ms
331
+ ✓ keeps pinned versions and removes the rest  857ms
332
+ ✓ --force removes pinned versions  801ms
333
+ ✓ explicit version removes even when pinned (with warning)  808ms
334
+ ✓ tests/command-chrome-coverage.test.ts (1 test) 18ms
335
+ ✓ tests/hook-upload.test.ts (8 tests) 13ms
336
+ ✓ tests/env-file.test.ts (9 tests) 18ms
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,10 @@
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) 2999ms
332
- ✓ resolveTarget returns cloud mode with /api/v1 prefix  1046ms
333
- ✓ resolveTarget returns self-host mode with /platform/v1 prefix  986ms
334
- ✓ targetSchemaRollback posts to /platform/v1 when linked  955ms
350
+ ✓ tests/link.test.ts (4 tests) 3068ms
351
+ ✓ resolveTarget returns cloud mode with /api/v1 prefix  935ms
352
+ ✓ resolveTarget returns self-host mode with /platform/v1 prefix  1084ms
353
+ ✓ targetSchemaRollback posts to /platform/v1 when linked  1036ms
335
354
  stdout | tests/admin-ensure.test.ts > init admin seed in .env > writes SUPATYPE_ADMIN_* when scaffold options include credentials
336
355
   created package.json
337
356
  created supatype.config.ts
@@ -342,52 +361,102 @@
342
361
  created public/.gitkeep
343
362
  created .gitignore
344
363
 
345
- ✓ tests/admin-ensure.test.ts (10 tests) 162ms
346
- ✓ tests/pull-utils.test.ts (49 tests) 10ms
347
- ✓ tests/schema-sources.test.ts (5 tests) 1278ms
348
- ✓ buildSchemaSourcesPayload includes manifest metadata  639ms
349
- ✓ restore overwrites modified local files  599ms
364
+ ✓ tests/admin-ensure.test.ts (10 tests) 199ms
365
+ ✓ tests/service-role-check.test.ts (10 tests) 13ms
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) 524ms
383
+ ✓ tests/augmentation-generator.test.ts (6 tests) 13ms
384
+ ✓ tests/pull-utils.test.ts (49 tests) 9ms
385
+ ✓ tests/schema-sources.test.ts (5 tests) 1184ms
386
+ ✓ buildSchemaSourcesPayload includes manifest metadata  580ms
387
+ ✓ restore overwrites modified local files  558ms
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) 18ms
354
- ✓ tests/minisign.test.ts (5 tests) 14ms
355
- ✓ tests/augmentation-generator.test.ts (5 tests) 18ms
391
+ ✓ tests/binary-cache-cloud-overrides.test.ts (11 tests) 20ms
392
+ ✓ tests/homebrew-formula.test.ts (4 tests) 220ms
393
+ ✓ tests/minisign.test.ts (5 tests) 13ms
394
+ ✓ tests/local-secrets.test.ts (5 tests) 10ms
395
+ ✓ tests/api-schemas.test.ts (10 tests) 10ms
356
396
  stdout | tests/storage-provision.test.ts > provisionBuckets > POSTs each bucket to the storage API
357
397
  [supatype] Storage bucket "photos" ready.
358
398
 
359
399
  stdout | tests/storage-provision.test.ts > provisionBuckets > POSTs each bucket to the storage API
360
400
  [supatype] Storage bucket "avatars" ready.
361
401
 
362
- ✓ tests/storage-provision.test.ts (6 tests) 11ms
363
- ✓ tests/cached-artifact-format.test.ts (7 tests) 11ms
364
- ✓ tests/keys.test.ts (11 tests) 16492ms
365
- ✓ exits 0 with --secret  1514ms
366
- ✓ outputs ANON_KEY= line  1367ms
367
- ✓ outputs SERVICE_ROLE_KEY= line  1427ms
368
- ✓ ANON_KEY is a valid three-part JWT  1377ms
369
- ✓ SERVICE_ROLE_KEY payload has role: service_role  1329ms
370
- ✓ JWT has exp in the future  1352ms
371
- ✓ --exp-years changes the expiry window  2769ms
372
- ✓ reads JWT_SECRET from environment variable  1331ms
373
- ✓ reads JWT_SECRET from .env file  1328ms
374
- ✓ exits non-zero when no secret is available  1410ms
375
- ✓ keys --help shows --secret and --exp-years options  1280ms
376
- ✓ tests/proxy-dev-app.test.ts (7 tests) 6ms
377
- ✓ tests/init-dependency-versions.test.ts (4 tests) 66ms
378
- ✓ tests/type-resolver.test.ts (2 tests) 14ms
379
- ✓ tests/engine-push-output.test.ts (7 tests) 9ms
380
- ✓ tests/command-chrome-wrap.test.ts (3 tests) 6ms
381
- ✓ tests/ensure-binary.test.ts (2 tests) 12ms
382
- ✓ tests/init-project-detect.test.ts (4 tests) 11ms
383
- ✓ tests/tsx-runner.test.ts (7 tests) 3126ms
384
- ✓ evaluates a simple expression and returns stdout  437ms
385
- ✓ evaluates TypeScript syntax (type annotations)  386ms
386
- ✓ can serialize a JSON object to stdout  433ms
387
- ✓ returns non-zero exit code on syntax error  451ms
388
- ✓ returns non-zero exit code on runtime error  380ms
389
- ✓ captures stderr separately from stdout  453ms
390
- ✓ runs a .ts file and returns its stdout  581ms
402
+ ✓ tests/storage-provision.test.ts (6 tests) 13ms
403
+ ✓ tests/db-preflight.test.ts (6 tests) 7ms
404
+ ✓ tests/cached-artifact-format.test.ts (7 tests) 16ms
405
+ ✓ tests/keys.test.ts (11 tests) 18813ms
406
+ ✓ exits 0 with --secret  2003ms
407
+ ✓ outputs ANON_KEY= line  2049ms
408
+ ✓ outputs SERVICE_ROLE_KEY= line  1603ms
409
+ ✓ ANON_KEY is a valid three-part JWT  1419ms
410
+ ✓ SERVICE_ROLE_KEY payload has role: service_role  1615ms
411
+ ✓ JWT has exp in the future  1439ms
412
+ ✓ --exp-years changes the expiry window  2866ms
413
+ ✓ reads JWT_SECRET from environment variable  1553ms
414
+ ✓ reads JWT_SECRET from .env file  1495ms
415
+ ✓ exits non-zero when no secret is available  1357ms
416
+ ✓ keys --help shows --secret and --exp-years options  1406ms
417
+ ✓ tests/target-client-refresh.test.ts (3 tests) 12ms
418
+ ✓ tests/proxy-dev-app.test.ts (7 tests) 9ms
419
+ ✓ tests/init-dependency-versions.test.ts (4 tests) 42ms
420
+ ✓ tests/service-role-routes.test.ts (4 tests) 1898ms
421
+ ✓ reads the declared list  635ms
422
+ ✓ is an empty list when a project declares none  606ms
423
+ ✓ sends what the project declared, hook entries included  653ms
424
+ ✓ tests/type-resolver.test.ts (2 tests) 18ms
425
+ ✓ tests/engine-push-output.test.ts (7 tests) 8ms
426
+ ✓ tests/tsx-runner.test.ts (7 tests) 3014ms
427
+ ✓ evaluates a simple expression and returns stdout  415ms
428
+ ✓ evaluates TypeScript syntax (type annotations)  391ms
429
+ ✓ can serialize a JSON object to stdout  388ms
430
+ ✓ returns non-zero exit code on syntax error  431ms
431
+ ✓ returns non-zero exit code on runtime error  391ms
432
+ ✓ captures stderr separately from stdout  399ms
433
+ ✓ runs a .ts file and returns its stdout  592ms
434
+ ✓ tests/command-chrome-wrap.test.ts (3 tests) 7ms
435
+ ✓ tests/cli-install-method.test.ts (8 tests) 11ms
436
+ ✓ tests/doctor-render.test.ts (3 tests) 7ms
437
+ ✓ tests/archive-name-alias.test.ts (4 tests) 6ms
438
+ ✓ tests/ensure-binary.test.ts (2 tests) 10ms
439
+ ✓ tests/init-project-detect.test.ts (4 tests) 12ms
440
+ ✓ tests/cli-help.test.ts (16 tests) 23883ms
441
+ ✓ --help lists all top-level commands  1687ms
442
+ ✓ --version prints package.json version  2104ms
443
+ ✓ self-update --help describes the command  1369ms
444
+ ✓ init --help describes the init command  1554ms
445
+ ✓ push --help describes the push command and --yes flag  1369ms
446
+ ✓ diff --help describes the diff command  1409ms
447
+ ✓ pull --help describes scaffold pull command  1459ms
448
+ ✓ doctor --help describes drift report command  1413ms
449
+ ✓ introspect --help describes database introspection command  1369ms
450
+ ✓ adopt --help describes adoption ceremony command  1525ms
451
+ ✓ reset --help shows --yes flag  1309ms
452
+ ✓ app --help describes the app command with add/remove subcommands  1434ms
453
+ ✓ app add --help shows --static and --port options  1520ms
454
+ ✓ self-host --help shows compose only (legacy commands hidden)  1566ms
455
+ ✓ self-host compose --help shows compose subcommands  1432ms
456
+ ✓ unknown command exits non-zero  1359ms
457
+ ✓ tests/required-host-components.test.ts (4 tests) 11ms
458
+ ✓ tests/ui-messages.test.ts (5 tests) 8ms
459
+ ✓ tests/doctor-service-role.test.ts (4 tests) 6ms
391
460
  stdout | tests/app-command.test.ts > supatype app add --static > sets app.mode=static and static_dir in supatype.config.ts
392
461
   created package.json
393
462
  created supatype.config.ts
@@ -398,11 +467,11 @@
398
467
  created public/.gitkeep
399
468
  created .gitignore
400
469
 
401
- ✓ tests/required-host-components.test.ts (4 tests) 7ms
402
- ✓ tests/ui-messages.test.ts (5 tests) 6ms
403
- ✓ tests/normalize-admin-config.test.ts (1 test) 6ms
404
- ✓ tests/dev-session-lock.test.ts (2 tests) 5ms
405
- ✓ tests/ui-confirm.test.ts (3 tests) 9ms
470
+ ✓ tests/normalize-admin-config.test.ts (1 test) 5ms
471
+ ✓ tests/ui-confirm.test.ts (3 tests) 8ms
472
+ ✓ tests/docker-postgres.test.ts (5 tests) 5ms
473
+ ✓ tests/binary-download-lock.test.ts (2 tests) 7ms
474
+ ✓ tests/dev-session-lock.test.ts (2 tests) 6ms
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) 21740ms
419
- ✓ --help lists all top-level commands  1404ms
420
- ✓ --version prints package.json version  1351ms
421
- ✓ self-update --help describes the command  1453ms
422
- ✓ init --help describes the init command  1404ms
423
- ✓ push --help describes the push command and --yes flag  1298ms
424
- ✓ diff --help describes the diff command  1321ms
425
- ✓ pull --help describes scaffold pull command  1347ms
426
- ✓ doctor --help describes drift report command  1376ms
427
- ✓ introspect --help describes database introspection command  1378ms
428
- ✓ adopt --help describes adoption ceremony command  1256ms
429
- ✓ reset --help shows --yes flag  1394ms
430
- ✓ app --help describes the app command with add/remove subcommands  1296ms
431
- ✓ app add --help shows --static and --port options  1311ms
432
- ✓ self-host --help shows compose only (legacy commands hidden)  1411ms
433
- ✓ self-host compose --help shows compose subcommands  1405ms
434
- ✓ unknown command exits non-zero  1327ms
435
- ✓ 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) 5ms
438
- ✓ tests/app-command.test.ts (2 tests) 2862ms
439
- ✓ sets app.mode=static and static_dir in supatype.config.ts  1426ms
440
- ✓ creates the static directory when missing  1433ms
441
- ✓ tests/studio-admin-roles.test.ts (3 tests) 4ms
442
- ✓ tests/realtime-launch.test.ts (1 test) 5ms
443
- ✓ tests/release-pins.test.ts (2 tests) 3ms
485
+ ✓ tests/dev-ports.test.ts (3 tests) 15ms
486
+ ✓ tests/route-manifest.test.ts (1 test) 4ms
487
+ ✓ tests/dev-ready-panel.test.ts (2 tests) 6ms
488
+ ✓ tests/studio-admin-roles.test.ts (3 tests) 5ms
489
+ ✓ tests/seed-discover.test.ts (2 tests) 13ms
490
+ ✓ tests/realtime-launch.test.ts (1 test) 6ms
491
+ ✓ tests/app-command.test.ts (2 tests) 3082ms
492
+ ✓ sets app.mode=static and static_dir in supatype.config.ts  1521ms
493
+ ✓ creates the static directory when missing  1556ms
494
+ ✓ tests/release-pins.test.ts (2 tests) 5ms
444
495
  ✓ tests/ensure-dev-api-config.test.ts (1 test) 5ms
445
- ✓ tests/seed-discover.test.ts (2 tests) 17ms
446
- ✓ tests/rest-cache-admin.test.ts (1 test) 38ms
447
- ✓ tests/resolve-api-url.test.ts (2 tests) 4ms
448
- ✓ tests/init-package-json.test.ts (1 test) 3ms
449
- ✓ tests/migrate-from-v1.test.ts (1 test) 15ms
450
- ✓ tests/pg-spawn-env.test.ts (2 tests) 4ms
451
- ✓ tests/cli-package-version.test.ts (1 test) 2ms
452
- ✓ tests/postgres-archive-tag.test.ts (1 test) 2ms
496
+ ✓ tests/rest-cache-admin.test.ts (1 test) 32ms
497
+ ✓ tests/init-package-json.test.ts (1 test) 4ms
498
+ ✓ tests/pg-spawn-env.test.ts (2 tests) 5ms
499
+ ✓ tests/migrate-from-v1.test.ts (1 test) 11ms
500
+ ✓ tests/resolve-api-url.test.ts (2 tests) 6ms
501
+ ✓ tests/cli-package-version.test.ts (1 test) 4ms
502
+ ✓ tests/postgres-archive-tag.test.ts (1 test) 3ms
453
503
  ✓ tests/stdin-after-ink.test.ts (1 test) 3ms
454
504
 
455
-  Test Files  50 passed (50)
456
-  Tests  369 passed (369)
457
-  Start at  19:08:23
458
-  Duration  29.59s (transform 5.28s, setup 0ms, import 23.25s, tests 55.39s, environment 14ms)
505
+  Test Files  72 passed (72)
506
+  Tests  579 passed (579)
507
+  Start at  21:59:06
508
+  Duration  46.40s (transform 6.56s, setup 0ms, import 43.32s, tests 79.59s, environment 14ms)
459
509
 
@@ -1,4 +1,4 @@
1
1
 
2
- > @supatype/cli@0.1.6 typecheck /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.1.9 typecheck /home/runner/work/supatype/supatype/packages/cli
3
3
  > tsc --project tsconfig.json --noEmit && tsc --project tests/tsconfig.json --noEmit
4
4
 
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
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
+ }
@@ -21,7 +21,7 @@ const FRAMEWORK_DETECTION = [
21
21
  { dep: "@remix-run/react", framework: "remix-spa" },
22
22
  { dep: "@sveltejs/kit", framework: "sveltekit" },
23
23
  { dep: "nuxt", framework: "nuxt" },
24
- // Vite last many frameworks use Vite under the hood
24
+ // Vite last: many frameworks use Vite under the hood
25
25
  { dep: "vite", framework: "vite" },
26
26
  ];
27
27
  /**