@supatype/cli 0.1.10 → 0.1.12
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.
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-test.log +133 -133
- package/.turbo/turbo-typecheck.log +1 -1
- package/dist/cli-version-embedded.js +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +15 -18
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +16 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +15 -10
- package/dist/commands/push.js.map +1 -1
- package/dist/db-preflight.d.ts +23 -0
- package/dist/db-preflight.d.ts.map +1 -1
- package/dist/db-preflight.js +66 -1
- package/dist/db-preflight.js.map +1 -1
- package/dist/type-generation.d.ts +24 -0
- package/dist/type-generation.d.ts.map +1 -0
- package/dist/type-generation.js +44 -0
- package/dist/type-generation.js.map +1 -0
- package/package.json +1 -1
- package/src/cli-version-embedded.ts +1 -1
- package/src/commands/generate.ts +13 -21
- package/src/commands/init.ts +16 -5
- package/src/commands/push.ts +14 -8
- package/src/db-preflight.ts +89 -1
- package/src/type-generation.ts +60 -0
- package/tests/app-command.test.ts +12 -2
- package/tests/db-preflight.test.ts +80 -0
- package/tsconfig.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
> @supatype/cli@0.1.
|
|
2
|
+
> @supatype/cli@0.1.12 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
|
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
> @supatype/cli@0.1.
|
|
2
|
+
> @supatype/cli@0.1.12 test /home/runner/work/supatype/supatype/packages/cli
|
|
3
3
|
> vitest run
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
[1m[46m RUN [49m[22m [36mv4.0.18 [39m[90m/home/runner/work/supatype/supatype/packages/cli[39m
|
|
7
7
|
|
|
8
|
-
[32m✓[39m tests/
|
|
9
|
-
[32m✓[39m tests/
|
|
10
|
-
[32m✓[39m tests/
|
|
8
|
+
[32m✓[39m tests/access-composition.test.ts [2m([22m[2m26 tests[22m[2m)[22m[32m 157[2mms[22m[39m
|
|
9
|
+
[32m✓[39m tests/type-extractor.test.ts [2m([22m[2m43 tests[22m[2m)[22m[33m 304[2mms[22m[39m
|
|
10
|
+
[32m✓[39m tests/runtime-contract.test.ts [2m([22m[2m49 tests[22m[2m)[22m[32m 178[2mms[22m[39m
|
|
11
|
+
[32m✓[39m tests/model-hooks.test.ts [2m([22m[2m19 tests[22m[2m)[22m[32m 165[2mms[22m[39m
|
|
11
12
|
[90mstdout[2m | tests/init.test.ts[2m > [22m[2mscaffold()[2m > [22m[2mcreates all expected files
|
|
12
13
|
[22m[39m created package.json
|
|
13
14
|
created supatype.config.ts
|
|
@@ -294,12 +295,11 @@
|
|
|
294
295
|
created public/.gitkeep
|
|
295
296
|
created .gitignore
|
|
296
297
|
|
|
297
|
-
[32m✓[39m tests/init.test.ts [2m([22m[2m26 tests[22m[2m)[22m[32m
|
|
298
|
-
[32m✓[39m tests/
|
|
299
|
-
[32m✓[39m tests/field-masking-tier.test.ts [2m([22m[2m16 tests[22m[2m)[22m[32m
|
|
300
|
-
[32m✓[39m tests/external-database-compose.test.ts [2m([22m[2m17 tests[22m[2m)[22m[32m 43[2mms[22m[39m
|
|
298
|
+
[32m✓[39m tests/init.test.ts [2m([22m[2m26 tests[22m[2m)[22m[32m 155[2mms[22m[39m
|
|
299
|
+
[32m✓[39m tests/external-database-compose.test.ts [2m([22m[2m17 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
300
|
+
[32m✓[39m tests/field-masking-tier.test.ts [2m([22m[2m16 tests[22m[2m)[22m[32m 16[2mms[22m[39m
|
|
301
301
|
|
|
302
|
-
[32m✓[39m tests/dev-ui.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m
|
|
302
|
+
[32m✓[39m tests/dev-ui.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m 131[2mms[22m[39m
|
|
303
303
|
|
|
304
304
|
[supatype] Shutting down…
|
|
305
305
|
[90mstdout[2m | tests/docker-runtime.test.ts[2m > [22m[2mrequireDockerDaemon[2m > [22m[2mexits when the daemon is unavailable
|
|
@@ -310,29 +310,30 @@
|
|
|
310
310
|
|
|
311
311
|
docker: daemon down
|
|
312
312
|
|
|
313
|
-
[32m✓[39m tests/docker-runtime.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m
|
|
314
|
-
[32m✓[39m tests/hooks-generator.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m
|
|
315
|
-
[33m[2m✓[22m[39m typechecks under strict mode, together with a handler that uses it [33m
|
|
316
|
-
[33m[2m✓[22m[39m rejects a handler for a table that declares no hook [33m
|
|
317
|
-
[32m✓[39m tests/config.test.ts [2m([22m[2m19 tests[22m[2m)[22m[33m
|
|
318
|
-
[33m[2m✓[22m[39m loads a valid supatype.config.ts (plain export default, no package imports) [33m
|
|
319
|
-
[33m[2m✓[22m[39m normalizes shorthand schema string to { path, pg_schema } [33m
|
|
320
|
-
[33m[2m✓[22m[39m loads a supatype.config.js (plain ESM) [33m
|
|
321
|
-
[33m[2m✓[22m[39m loads config without a versions section (latest by default) [33m
|
|
322
|
-
[33m[2m✓[22m[39m prefers supatype.config.ts over supatype.config.js when both exist [33m
|
|
323
|
-
[33m[2m✓[22m[39m supports optional output field in config [33m
|
|
324
|
-
[33m[2m✓[22m[39m merges supatype.local.config.ts over base [33m
|
|
325
|
-
[33m[2m✓[22m[39m loads defineConfig import before @supatype/cli is installed (init scaffold) [33m
|
|
326
|
-
[32m✓[39m tests/
|
|
327
|
-
|
|
328
|
-
[33m[2m✓[22m[39m tsc
|
|
329
|
-
|
|
330
|
-
[32m✓[39m tests/
|
|
331
|
-
|
|
332
|
-
[33m[2m✓[22m[39m
|
|
333
|
-
[33m[2m✓[22m[39m
|
|
334
|
-
|
|
335
|
-
[32m✓[39m tests/
|
|
313
|
+
[32m✓[39m tests/docker-runtime.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 31[2mms[22m[39m
|
|
314
|
+
[32m✓[39m tests/hooks-generator.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m 6103[2mms[22m[39m
|
|
315
|
+
[33m[2m✓[22m[39m typechecks under strict mode, together with a handler that uses it [33m 3057[2mms[22m[39m
|
|
316
|
+
[33m[2m✓[22m[39m rejects a handler for a table that declares no hook [33m 3005[2mms[22m[39m
|
|
317
|
+
[32m✓[39m tests/config.test.ts [2m([22m[2m19 tests[22m[2m)[22m[33m 8949[2mms[22m[39m
|
|
318
|
+
[33m[2m✓[22m[39m loads a valid supatype.config.ts (plain export default, no package imports) [33m 762[2mms[22m[39m
|
|
319
|
+
[33m[2m✓[22m[39m normalizes shorthand schema string to { path, pg_schema } [33m 876[2mms[22m[39m
|
|
320
|
+
[33m[2m✓[22m[39m loads a supatype.config.js (plain ESM) [33m 841[2mms[22m[39m
|
|
321
|
+
[33m[2m✓[22m[39m loads config without a versions section (latest by default) [33m 938[2mms[22m[39m
|
|
322
|
+
[33m[2m✓[22m[39m prefers supatype.config.ts over supatype.config.js when both exist [33m 935[2mms[22m[39m
|
|
323
|
+
[33m[2m✓[22m[39m supports optional output field in config [33m 932[2mms[22m[39m
|
|
324
|
+
[33m[2m✓[22m[39m merges supatype.local.config.ts over base [33m 1930[2mms[22m[39m
|
|
325
|
+
[33m[2m✓[22m[39m loads defineConfig import before @supatype/cli is installed (init scaffold) [33m 1719[2mms[22m[39m
|
|
326
|
+
[32m✓[39m tests/db-preflight.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
327
|
+
[32m✓[39m tests/functions-deno-types.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m 4144[2mms[22m[39m
|
|
328
|
+
[33m[2m✓[22m[39m tsc fails with Cannot find name Deno without ambient types [33m 2908[2mms[22m[39m
|
|
329
|
+
[33m[2m✓[22m[39m tsc passes for Deno.env after ensureFunctionsDenoTypes [33m 1215[2mms[22m[39m
|
|
330
|
+
[32m✓[39m tests/external-database-config.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 13[2mms[22m[39m
|
|
331
|
+
[32m✓[39m tests/cache-clean.test.ts [2m([22m[2m8 tests[22m[2m)[22m[33m 2514[2mms[22m[39m
|
|
332
|
+
[33m[2m✓[22m[39m keeps pinned versions and removes the rest [33m 832[2mms[22m[39m
|
|
333
|
+
[33m[2m✓[22m[39m --force removes pinned versions [33m 820[2mms[22m[39m
|
|
334
|
+
[33m[2m✓[22m[39m explicit version removes even when pinned (with warning) [33m 829[2mms[22m[39m
|
|
335
|
+
[32m✓[39m tests/command-chrome-coverage.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 20[2mms[22m[39m
|
|
336
|
+
[32m✓[39m tests/hook-upload.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
336
337
|
[32m✓[39m tests/env-file.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 16[2mms[22m[39m
|
|
337
338
|
[90mstdout[2m | tests/link.test.ts[2m > [22m[2mlink model[2m > [22m[2mmigrates cloud.json into link.json
|
|
338
339
|
[22m[39m created package.json
|
|
@@ -343,14 +344,14 @@
|
|
|
343
344
|
created seeds/.gitkeep
|
|
344
345
|
created public/.gitkeep
|
|
345
346
|
created .gitignore
|
|
346
|
-
|
|
347
347
|
[90mstderr[2m | tests/link.test.ts[2m > [22m[2mlink model[2m > [22m[2mmigrates cloud.json into link.json
|
|
348
|
+
|
|
348
349
|
[22m[39m[supatype] Migrated .supatype/cloud.json → .supatype/link.json (legacy files kept; remove manually when ready).
|
|
349
350
|
|
|
350
|
-
[32m✓[39m tests/link.test.ts [2m([22m[2m4 tests[22m[2m)[22m[33m
|
|
351
|
-
[33m[2m✓[22m[39m resolveTarget returns cloud mode with /api/v1 prefix [33m
|
|
352
|
-
[33m[2m✓[22m[39m resolveTarget returns self-host mode with /platform/v1 prefix [33m
|
|
353
|
-
[33m[2m✓[22m[39m targetSchemaRollback posts to /platform/v1 when linked [33m
|
|
351
|
+
[32m✓[39m tests/link.test.ts [2m([22m[2m4 tests[22m[2m)[22m[33m 3151[2mms[22m[39m
|
|
352
|
+
[33m[2m✓[22m[39m resolveTarget returns cloud mode with /api/v1 prefix [33m 1039[2mms[22m[39m
|
|
353
|
+
[33m[2m✓[22m[39m resolveTarget returns self-host mode with /platform/v1 prefix [33m 1059[2mms[22m[39m
|
|
354
|
+
[33m[2m✓[22m[39m targetSchemaRollback posts to /platform/v1 when linked [33m 1043[2mms[22m[39m
|
|
354
355
|
[90mstdout[2m | tests/admin-ensure.test.ts[2m > [22m[2minit admin seed in .env[2m > [22m[2mwrites SUPATYPE_ADMIN_* when scaffold options include credentials
|
|
355
356
|
[22m[39m created package.json
|
|
356
357
|
created supatype.config.ts
|
|
@@ -361,7 +362,7 @@
|
|
|
361
362
|
created public/.gitkeep
|
|
362
363
|
created .gitignore
|
|
363
364
|
|
|
364
|
-
[32m✓[39m tests/admin-ensure.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m
|
|
365
|
+
[32m✓[39m tests/admin-ensure.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 187[2mms[22m[39m
|
|
365
366
|
[32m✓[39m tests/service-role-check.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
366
367
|
[90mstdout[2m | tests/admin-studio-membership.test.ts[2m > [22m[2mfirst admin user creation[2m > [22m[2mdoes not write a role into app_metadata
|
|
367
368
|
[22m[39m[supatype] Admin user "admin@example.com" created (role: admin).
|
|
@@ -379,82 +380,42 @@
|
|
|
379
380
|
[22m[39m[supatype] Admin user "admin@example.com" created (role: admin).
|
|
380
381
|
[supatype] Log in at /admin after starting the dev server.
|
|
381
382
|
|
|
382
|
-
[32m✓[39m tests/admin-studio-membership.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m
|
|
383
|
-
[32m✓[39m tests/augmentation-generator.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
384
|
-
[32m✓[39m tests/pull-utils.test.ts [2m([22m[2m49 tests[22m[2m)[22m[32m
|
|
385
|
-
[32m✓[39m tests/schema-sources.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m
|
|
386
|
-
[33m[2m✓[22m[39m buildSchemaSourcesPayload includes manifest metadata [33m
|
|
387
|
-
[33m[2m✓[22m[39m restore overwrites modified local files [33m
|
|
383
|
+
[32m✓[39m tests/admin-studio-membership.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m 488[2mms[22m[39m
|
|
384
|
+
[32m✓[39m tests/augmentation-generator.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 20[2mms[22m[39m
|
|
385
|
+
[32m✓[39m tests/pull-utils.test.ts [2m([22m[2m49 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
386
|
+
[32m✓[39m tests/schema-sources.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m 1281[2mms[22m[39m
|
|
387
|
+
[33m[2m✓[22m[39m buildSchemaSourcesPayload includes manifest metadata [33m 609[2mms[22m[39m
|
|
388
|
+
[33m[2m✓[22m[39m restore overwrites modified local files [33m 625[2mms[22m[39m
|
|
388
389
|
[90mstderr[2m | tests/binary-cache-cloud-overrides.test.ts[2m > [22m[2misLinkedToCloudProject[2m > [22m[2mis true when .supatype/cloud.json has projectSlug
|
|
389
390
|
[22m[39m[supatype] Migrated .supatype/cloud.json → .supatype/link.json (legacy files kept; remove manually when ready).
|
|
390
391
|
|
|
391
|
-
[32m✓[39m tests/binary-cache-cloud-overrides.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m
|
|
392
|
-
[32m✓[39m tests/homebrew-formula.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
393
|
-
[32m✓[39m tests/minisign.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
394
|
-
[32m✓[39m tests/local-secrets.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
395
|
-
[32m✓[39m tests/api-schemas.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m
|
|
392
|
+
[32m✓[39m tests/binary-cache-cloud-overrides.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 18[2mms[22m[39m
|
|
393
|
+
[32m✓[39m tests/homebrew-formula.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 208[2mms[22m[39m
|
|
394
|
+
[32m✓[39m tests/minisign.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 17[2mms[22m[39m
|
|
395
|
+
[32m✓[39m tests/local-secrets.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
396
|
+
[32m✓[39m tests/api-schemas.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
396
397
|
[90mstdout[2m | tests/storage-provision.test.ts[2m > [22m[2mprovisionBuckets[2m > [22m[2mPOSTs each bucket to the storage API
|
|
397
398
|
[22m[39m[supatype] Storage bucket "photos" ready.
|
|
398
399
|
|
|
399
400
|
[90mstdout[2m | tests/storage-provision.test.ts[2m > [22m[2mprovisionBuckets[2m > [22m[2mPOSTs each bucket to the storage API
|
|
400
401
|
[22m[39m[supatype] Storage bucket "avatars" ready.
|
|
401
402
|
|
|
402
|
-
[32m✓[39m tests/storage-provision.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
403
|
-
[32m✓[39m tests/
|
|
404
|
-
|
|
405
|
-
[33m[2m✓[22m[39m
|
|
406
|
-
[33m[2m✓[22m[39m outputs
|
|
407
|
-
[33m[2m✓[22m[39m
|
|
408
|
-
[33m[2m✓[22m[39m
|
|
409
|
-
[33m[2m✓[22m[39m
|
|
410
|
-
[33m[2m✓[22m[39m
|
|
411
|
-
[33m[2m✓[22m[39m
|
|
412
|
-
[33m[2m✓[22m[39m reads JWT_SECRET from
|
|
413
|
-
[33m[2m✓[22m[39m
|
|
414
|
-
[33m[2m✓[22m[39m
|
|
415
|
-
|
|
416
|
-
[32m✓[39m tests/
|
|
417
|
-
[32m✓[39m tests/
|
|
418
|
-
[32m✓[39m tests/proxy-dev-app.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
419
|
-
[32m✓[39m tests/init-dependency-versions.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 36[2mms[22m[39m
|
|
420
|
-
[32m✓[39m tests/service-role-routes.test.ts [2m([22m[2m4 tests[22m[2m)[22m[33m 1739[2mms[22m[39m
|
|
421
|
-
[33m[2m✓[22m[39m reads the declared list [33m 563[2mms[22m[39m
|
|
422
|
-
[33m[2m✓[22m[39m is an empty list when a project declares none [33m 574[2mms[22m[39m
|
|
423
|
-
[33m[2m✓[22m[39m sends what the project declared, hook entries included [33m 599[2mms[22m[39m
|
|
424
|
-
[32m✓[39m tests/type-resolver.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
425
|
-
[32m✓[39m tests/engine-push-output.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
426
|
-
[32m✓[39m tests/tsx-runner.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m 3049[2mms[22m[39m
|
|
427
|
-
[33m[2m✓[22m[39m evaluates a simple expression and returns stdout [33m 421[2mms[22m[39m
|
|
428
|
-
[33m[2m✓[22m[39m evaluates TypeScript syntax (type annotations) [33m 426[2mms[22m[39m
|
|
429
|
-
[33m[2m✓[22m[39m can serialize a JSON object to stdout [33m 420[2mms[22m[39m
|
|
430
|
-
[33m[2m✓[22m[39m returns non-zero exit code on syntax error [33m 371[2mms[22m[39m
|
|
431
|
-
[33m[2m✓[22m[39m returns non-zero exit code on runtime error [33m 411[2mms[22m[39m
|
|
432
|
-
[33m[2m✓[22m[39m captures stderr separately from stdout [33m 396[2mms[22m[39m
|
|
433
|
-
[33m[2m✓[22m[39m runs a .ts file and returns its stdout [33m 599[2mms[22m[39m
|
|
434
|
-
[32m✓[39m tests/command-chrome-wrap.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
435
|
-
[32m✓[39m tests/cli-install-method.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
436
|
-
[32m✓[39m tests/archive-name-alias.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
437
|
-
[32m✓[39m tests/ensure-binary.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
438
|
-
[32m✓[39m tests/doctor-render.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
439
|
-
[32m✓[39m tests/cli-help.test.ts [2m([22m[2m16 tests[22m[2m)[22m[33m 22876[2mms[22m[39m
|
|
440
|
-
[33m[2m✓[22m[39m --help lists all top-level commands [33m 1754[2mms[22m[39m
|
|
441
|
-
[33m[2m✓[22m[39m --version prints package.json version [33m 1969[2mms[22m[39m
|
|
442
|
-
[33m[2m✓[22m[39m self-update --help describes the command [33m 1402[2mms[22m[39m
|
|
443
|
-
[33m[2m✓[22m[39m init --help describes the init command [33m 1366[2mms[22m[39m
|
|
444
|
-
[33m[2m✓[22m[39m push --help describes the push command and --yes flag [33m 1463[2mms[22m[39m
|
|
445
|
-
[33m[2m✓[22m[39m diff --help describes the diff command [33m 1426[2mms[22m[39m
|
|
446
|
-
[33m[2m✓[22m[39m pull --help describes scaffold pull command [33m 1402[2mms[22m[39m
|
|
447
|
-
[33m[2m✓[22m[39m doctor --help describes drift report command [33m 1308[2mms[22m[39m
|
|
448
|
-
[33m[2m✓[22m[39m introspect --help describes database introspection command [33m 1310[2mms[22m[39m
|
|
449
|
-
[33m[2m✓[22m[39m adopt --help describes adoption ceremony command [33m 1341[2mms[22m[39m
|
|
450
|
-
[33m[2m✓[22m[39m reset --help shows --yes flag [33m 1254[2mms[22m[39m
|
|
451
|
-
[33m[2m✓[22m[39m app --help describes the app command with add/remove subcommands [33m 1366[2mms[22m[39m
|
|
452
|
-
[33m[2m✓[22m[39m app add --help shows --static and --port options [33m 1388[2mms[22m[39m
|
|
453
|
-
[33m[2m✓[22m[39m self-host --help shows compose only (legacy commands hidden) [33m 1358[2mms[22m[39m
|
|
454
|
-
[33m[2m✓[22m[39m self-host compose --help shows compose subcommands [33m 1350[2mms[22m[39m
|
|
455
|
-
[33m[2m✓[22m[39m unknown command exits non-zero [33m 1411[2mms[22m[39m
|
|
456
|
-
[32m✓[39m tests/init-project-detect.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
457
|
-
[32m✓[39m tests/doctor-service-role.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
403
|
+
[32m✓[39m tests/storage-provision.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
404
|
+
[32m✓[39m tests/cached-artifact-format.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
405
|
+
[32m✓[39m tests/keys.test.ts [2m([22m[2m11 tests[22m[2m)[22m[33m 18356[2mms[22m[39m
|
|
406
|
+
[33m[2m✓[22m[39m exits 0 with --secret [33m 1919[2mms[22m[39m
|
|
407
|
+
[33m[2m✓[22m[39m outputs ANON_KEY= line [33m 1898[2mms[22m[39m
|
|
408
|
+
[33m[2m✓[22m[39m outputs SERVICE_ROLE_KEY= line [33m 1634[2mms[22m[39m
|
|
409
|
+
[33m[2m✓[22m[39m ANON_KEY is a valid three-part JWT [33m 1372[2mms[22m[39m
|
|
410
|
+
[33m[2m✓[22m[39m SERVICE_ROLE_KEY payload has role: service_role [33m 1517[2mms[22m[39m
|
|
411
|
+
[33m[2m✓[22m[39m JWT has exp in the future [33m 1479[2mms[22m[39m
|
|
412
|
+
[33m[2m✓[22m[39m --exp-years changes the expiry window [33m 2842[2mms[22m[39m
|
|
413
|
+
[33m[2m✓[22m[39m reads JWT_SECRET from environment variable [33m 1572[2mms[22m[39m
|
|
414
|
+
[33m[2m✓[22m[39m reads JWT_SECRET from .env file [33m 1412[2mms[22m[39m
|
|
415
|
+
[33m[2m✓[22m[39m exits non-zero when no secret is available [33m 1301[2mms[22m[39m
|
|
416
|
+
[33m[2m✓[22m[39m keys --help shows --secret and --exp-years options [33m 1405[2mms[22m[39m
|
|
417
|
+
[32m✓[39m tests/target-client-refresh.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
418
|
+
[32m✓[39m tests/proxy-dev-app.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
458
419
|
[90mstdout[2m | tests/app-command.test.ts[2m > [22m[2msupatype app add --static[2m > [22m[2msets app.mode=static and static_dir in supatype.config.ts
|
|
459
420
|
[22m[39m created package.json
|
|
460
421
|
created supatype.config.ts
|
|
@@ -465,9 +426,6 @@
|
|
|
465
426
|
created public/.gitkeep
|
|
466
427
|
created .gitignore
|
|
467
428
|
|
|
468
|
-
[32m✓[39m tests/required-host-components.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
469
|
-
[32m✓[39m tests/ui-messages.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
470
|
-
[32m✓[39m tests/normalize-admin-config.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
471
429
|
[90mstdout[2m | tests/app-command.test.ts[2m > [22m[2msupatype app add --static[2m > [22m[2mcreates the static directory when missing
|
|
472
430
|
[22m[39m created package.json
|
|
473
431
|
created supatype.config.ts
|
|
@@ -478,35 +436,77 @@
|
|
|
478
436
|
created public/.gitkeep
|
|
479
437
|
created .gitignore
|
|
480
438
|
|
|
481
|
-
[32m✓[39m tests/
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
[32m✓[39m tests/
|
|
486
|
-
|
|
487
|
-
[33m[2m✓[22m[39m
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
[32m✓[39m tests/
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
439
|
+
[32m✓[39m tests/service-role-routes.test.ts [2m([22m[2m4 tests[22m[2m)[22m[33m 1708[2mms[22m[39m
|
|
440
|
+
[33m[2m✓[22m[39m reads the declared list [33m 627[2mms[22m[39m
|
|
441
|
+
[33m[2m✓[22m[39m is an empty list when a project declares none [33m 549[2mms[22m[39m
|
|
442
|
+
[33m[2m✓[22m[39m sends what the project declared, hook entries included [33m 527[2mms[22m[39m
|
|
443
|
+
[32m✓[39m tests/init-dependency-versions.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 38[2mms[22m[39m
|
|
444
|
+
[32m✓[39m tests/app-command.test.ts [2m([22m[2m2 tests[22m[2m)[22m[33m 3092[2mms[22m[39m
|
|
445
|
+
[33m[2m✓[22m[39m sets app.mode=static and static_dir in supatype.config.ts [33m 1528[2mms[22m[39m
|
|
446
|
+
[33m[2m✓[22m[39m creates the static directory when missing [33m 1558[2mms[22m[39m
|
|
447
|
+
[32m✓[39m tests/type-resolver.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 16[2mms[22m[39m
|
|
448
|
+
[32m✓[39m tests/engine-push-output.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
449
|
+
[32m✓[39m tests/tsx-runner.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m 3030[2mms[22m[39m
|
|
450
|
+
[33m[2m✓[22m[39m evaluates a simple expression and returns stdout [33m 451[2mms[22m[39m
|
|
451
|
+
[33m[2m✓[22m[39m evaluates TypeScript syntax (type annotations) [33m 361[2mms[22m[39m
|
|
452
|
+
[33m[2m✓[22m[39m can serialize a JSON object to stdout [33m 422[2mms[22m[39m
|
|
453
|
+
[33m[2m✓[22m[39m returns non-zero exit code on syntax error [33m 402[2mms[22m[39m
|
|
454
|
+
[33m[2m✓[22m[39m returns non-zero exit code on runtime error [33m 359[2mms[22m[39m
|
|
455
|
+
[33m[2m✓[22m[39m captures stderr separately from stdout [33m 379[2mms[22m[39m
|
|
456
|
+
[33m[2m✓[22m[39m runs a .ts file and returns its stdout [33m 650[2mms[22m[39m
|
|
457
|
+
[32m✓[39m tests/command-chrome-wrap.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
458
|
+
[32m✓[39m tests/cli-help.test.ts [2m([22m[2m16 tests[22m[2m)[22m[33m 24015[2mms[22m[39m
|
|
459
|
+
[33m[2m✓[22m[39m --help lists all top-level commands [33m 2056[2mms[22m[39m
|
|
460
|
+
[33m[2m✓[22m[39m --version prints package.json version [33m 1897[2mms[22m[39m
|
|
461
|
+
[33m[2m✓[22m[39m self-update --help describes the command [33m 1356[2mms[22m[39m
|
|
462
|
+
[33m[2m✓[22m[39m init --help describes the init command [33m 1430[2mms[22m[39m
|
|
463
|
+
[33m[2m✓[22m[39m push --help describes the push command and --yes flag [33m 1473[2mms[22m[39m
|
|
464
|
+
[33m[2m✓[22m[39m diff --help describes the diff command [33m 1439[2mms[22m[39m
|
|
465
|
+
[33m[2m✓[22m[39m pull --help describes scaffold pull command [33m 1415[2mms[22m[39m
|
|
466
|
+
[33m[2m✓[22m[39m doctor --help describes drift report command [33m 1476[2mms[22m[39m
|
|
467
|
+
[33m[2m✓[22m[39m introspect --help describes database introspection command [33m 1397[2mms[22m[39m
|
|
468
|
+
[33m[2m✓[22m[39m adopt --help describes adoption ceremony command [33m 1408[2mms[22m[39m
|
|
469
|
+
[33m[2m✓[22m[39m reset --help shows --yes flag [33m 1413[2mms[22m[39m
|
|
470
|
+
[33m[2m✓[22m[39m app --help describes the app command with add/remove subcommands [33m 1417[2mms[22m[39m
|
|
471
|
+
[33m[2m✓[22m[39m app add --help shows --static and --port options [33m 1474[2mms[22m[39m
|
|
472
|
+
[33m[2m✓[22m[39m self-host --help shows compose only (legacy commands hidden) [33m 1452[2mms[22m[39m
|
|
473
|
+
[33m[2m✓[22m[39m self-host compose --help shows compose subcommands [33m 1435[2mms[22m[39m
|
|
474
|
+
[33m[2m✓[22m[39m unknown command exits non-zero [33m 1469[2mms[22m[39m
|
|
475
|
+
[32m✓[39m tests/cli-install-method.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
476
|
+
[32m✓[39m tests/archive-name-alias.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
477
|
+
[32m✓[39m tests/ensure-binary.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
478
|
+
[32m✓[39m tests/init-project-detect.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
479
|
+
[32m✓[39m tests/doctor-render.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
480
|
+
[32m✓[39m tests/required-host-components.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
481
|
+
[32m✓[39m tests/ui-messages.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
482
|
+
[32m✓[39m tests/normalize-admin-config.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
483
|
+
[32m✓[39m tests/doctor-service-role.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
484
|
+
[32m✓[39m tests/ui-confirm.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
485
|
+
[32m✓[39m tests/docker-postgres.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
486
|
+
[32m✓[39m tests/binary-download-lock.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
487
|
+
[32m✓[39m tests/dev-session-lock.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
488
|
+
[32m✓[39m tests/dev-ports.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
489
|
+
[32m✓[39m tests/route-manifest.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
490
|
+
[32m✓[39m tests/config-load-failure.test.ts [2m([22m[2m2 tests[22m[2m)[22m[33m 3570[2mms[22m[39m
|
|
491
|
+
[33m[2m✓[22m[39m is reported, rather than treated as absent [33m 2076[2mms[22m[39m
|
|
492
|
+
[33m[2m✓[22m[39m does not stop the CLI working with no config at all [33m 1491[2mms[22m[39m
|
|
493
|
+
[32m✓[39m tests/dev-ready-panel.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
494
|
+
[32m✓[39m tests/studio-admin-roles.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
495
|
+
[32m✓[39m tests/realtime-launch.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
496
|
+
[32m✓[39m tests/release-pins.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
498
497
|
[32m✓[39m tests/ensure-dev-api-config.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
499
|
-
[32m✓[39m tests/
|
|
498
|
+
[32m✓[39m tests/seed-discover.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
499
|
+
[32m✓[39m tests/rest-cache-admin.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 39[2mms[22m[39m
|
|
500
500
|
[32m✓[39m tests/init-package-json.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
501
501
|
[32m✓[39m tests/pg-spawn-env.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
502
|
-
[32m✓[39m tests/resolve-api-url.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
503
|
-
[32m✓[39m tests/migrate-from-v1.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
504
|
-
[32m✓[39m tests/
|
|
505
|
-
[32m✓[39m tests/
|
|
502
|
+
[32m✓[39m tests/resolve-api-url.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
503
|
+
[32m✓[39m tests/migrate-from-v1.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
504
|
+
[32m✓[39m tests/cli-package-version.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
505
|
+
[32m✓[39m tests/postgres-archive-tag.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
506
506
|
[32m✓[39m tests/stdin-after-ink.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
507
507
|
|
|
508
508
|
[2m Test Files [22m [1m[32m73 passed[39m[22m[90m (73)[39m
|
|
509
|
-
[2m Tests [22m [1m[
|
|
510
|
-
[2m Start at [22m
|
|
511
|
-
[2m Duration [22m
|
|
509
|
+
[2m Tests [22m [1m[32m589 passed[39m[22m[90m (589)[39m
|
|
510
|
+
[2m Start at [22m 22:59:36
|
|
511
|
+
[2m Duration [22m 47.15s[2m (transform 6.84s, setup 0ms, import 43.14s, tests 82.45s, environment 17ms)[22m
|
|
512
512
|
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
// Annotated `string`, not left to inference: once a release stamps a value here, the
|
|
10
10
|
// inferred literal type makes the `!== ""` test in cliPackageVersion() a compile error
|
|
11
11
|
// (TS2367, no overlap), so the build would only fail during a release.
|
|
12
|
-
export const EMBEDDED_CLI_VERSION = "0.1.
|
|
12
|
+
export const EMBEDDED_CLI_VERSION = "0.1.12";
|
|
13
13
|
//# sourceMappingURL=cli-version-embedded.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAOxC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiCvD"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { resolve, dirname } from "node:path";
|
|
3
1
|
import { loadConfig, loadSchemaAst } from "../config.js";
|
|
4
2
|
import { hooksPathFromProject, schemaPathFromProject } from "../project-config.js";
|
|
5
|
-
import { ensureEngine, engineRequest } from "../engine-client.js";
|
|
6
|
-
import { generateClientAugmentation } from "../augmentation-generator.js";
|
|
7
3
|
import { writeHooksModule } from "../model-hooks.js";
|
|
4
|
+
import { writeGeneratedTypes } from "../type-generation.js";
|
|
8
5
|
import { error, info } from "../ui/messages.js";
|
|
9
6
|
export function registerGenerate(program) {
|
|
10
7
|
program
|
|
@@ -17,24 +14,24 @@ export function registerGenerate(program) {
|
|
|
17
14
|
const schemaPath = schemaPathFromProject(config, cwd);
|
|
18
15
|
const outputTypesPath = config.output?.types ?? "types/database.ts";
|
|
19
16
|
const outputClientPath = config.output?.client ?? "supatype/generated/index.d.ts";
|
|
20
|
-
await ensureEngine();
|
|
21
17
|
info("Loading schema...");
|
|
22
18
|
const ast = loadSchemaAst(schemaPath, cwd);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
// Shared with push, which used to delegate the writing to the engine and produce no files.
|
|
20
|
+
// Unlike push, this command always writes: the defaults above are the point of running it.
|
|
21
|
+
try {
|
|
22
|
+
const written = await writeGeneratedTypes({
|
|
23
|
+
cwd,
|
|
24
|
+
ast,
|
|
25
|
+
typesPath: outputTypesPath,
|
|
26
|
+
clientPath: outputClientPath,
|
|
27
|
+
});
|
|
28
|
+
for (const message of written)
|
|
29
|
+
info(message);
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
error(err instanceof Error ? err.message : String(err));
|
|
27
33
|
process.exit(1);
|
|
28
34
|
}
|
|
29
|
-
const outPath = resolve(cwd, outputTypesPath);
|
|
30
|
-
mkdirSync(dirname(outPath), { recursive: true });
|
|
31
|
-
writeFileSync(outPath, typesCode, "utf8");
|
|
32
|
-
info(`Types written to ${outputTypesPath}`);
|
|
33
|
-
const augmentationOutPath = resolve(cwd, outputClientPath);
|
|
34
|
-
const augmentationCode = generateClientAugmentation(ast);
|
|
35
|
-
mkdirSync(dirname(augmentationOutPath), { recursive: true });
|
|
36
|
-
writeFileSync(augmentationOutPath, augmentationCode, "utf8");
|
|
37
|
-
info(`Client augmentation written to ${outputClientPath}`);
|
|
38
35
|
const hooksPath = writeHooksModule(cwd, hooksPathFromProject(config, cwd), ast);
|
|
39
36
|
if (hooksPath !== null)
|
|
40
37
|
info(`Hook handler types written to ${hooksPath}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE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,MAAM,CAAA;IACnB,sDAAsD;IACtD,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC7B,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,GAAG,EAAE,kBAAkB,CAAA;IACvB,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAA;IAC5C,gEAAgE;IAChE,YAAY,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5B,kDAAkD;IAClD,iBAAiB,EAAE,OAAO,GAAG,IAAI,CAAA;IACjC,aAAa,EAAE,OAAO,CAAA;IACtB,mFAAmF;IACnF,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAqCD,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,gBAAgB,GAAE,gBAA0B,GAC3C,eAAe,CAajB;AAcD,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8GnD;AAwaD,wBAAgB,QAAQ,CACtB,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,eAAe,GAAG,MAAM,EACpC,IAAI,GAAE,sBAAyD,GAC9D,IAAI,CAiDN;AA2rBD,wBAAgB,sBAAsB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAStE"}
|
package/dist/commands/init.js
CHANGED
|
@@ -583,7 +583,22 @@ function packageJsonTemplate(opts, deps) {
|
|
|
583
583
|
if (opts.helloFunction) {
|
|
584
584
|
scripts.push(` "functions": "supatype functions serve"`);
|
|
585
585
|
}
|
|
586
|
-
|
|
586
|
+
// Both are development-time only, so they belong in devDependencies. Validated end to end
|
|
587
|
+
// against a real database: schema/index.ts imports @supatype/types with `import type`, which is
|
|
588
|
+
// erased at build; supatype.config.ts imports defineConfig, which only the CLI evaluates; and
|
|
589
|
+
// seed.ts is run by `tsx seed.ts`. Nothing `supatype push` or `supatype generate` writes refers
|
|
590
|
+
// to either package: the generated types import nothing, and the client augmentation declares a
|
|
591
|
+
// module for @supatype/client, which stays a real dependency.
|
|
592
|
+
//
|
|
593
|
+
// In dependencies they were installed by `npm install --omit=dev`, so every production install
|
|
594
|
+
// of a Supatype app pulled the whole CLI toolchain (ink, react, typescript, ts-morph, pg, tsx)
|
|
595
|
+
// to support three files that never run in production.
|
|
596
|
+
const devDeps = [
|
|
597
|
+
` "@supatype/cli": "^${deps.cli}"`,
|
|
598
|
+
` "@supatype/types": "^${deps.types}"`,
|
|
599
|
+
` "tsx": "^4.19.2"`,
|
|
600
|
+
` "typescript": "^5"`,
|
|
601
|
+
];
|
|
587
602
|
if (opts.app.viteDevUrl) {
|
|
588
603
|
devDeps.push(` "vite": "^6"`);
|
|
589
604
|
}
|
|
@@ -594,10 +609,6 @@ function packageJsonTemplate(opts, deps) {
|
|
|
594
609
|
"scripts": {
|
|
595
610
|
${scripts.join(",\n")}
|
|
596
611
|
},
|
|
597
|
-
"dependencies": {
|
|
598
|
-
"@supatype/cli": "^${deps.cli}",
|
|
599
|
-
"@supatype/types": "^${deps.types}"
|
|
600
|
-
},
|
|
601
612
|
"devDependencies": {
|
|
602
613
|
${devDeps.join(",\n")}
|
|
603
614
|
}
|