@supatype/cli 0.3.5 → 0.3.6

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @supatype/cli@0.3.5 build /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.3.6 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,16 +1,15 @@
1
1
 
2
- > @supatype/cli@0.3.5 test /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.3.6 test /home/runner/work/supatype/supatype/packages/cli
3
3
  > vitest run
4
4
 
5
5
 
6
6
   RUN  v4.0.18 /home/runner/work/supatype/supatype/packages/cli
7
7
 
8
- ✓ tests/access-composition.test.ts (32 tests) 310ms
9
- ✓ tests/type-extractor.test.ts (51 tests) 479ms
10
- ✓ tests/model-hooks.test.ts (23 tests) 194ms
11
- ✓ tests/runtime-contract.test.ts (64 tests) 285ms
12
- ✓ tests/augmentation-generator.test.ts (24 tests) 62ms
13
- ✓ tests/seed-ir.test.ts (15 tests) 41ms
8
+ ✓ tests/access-composition.test.ts (32 tests) 403ms
9
+ ✓ tests/type-extractor.test.ts (52 tests) 586ms
10
+ ✓ tests/model-hooks.test.ts (23 tests) 230ms
11
+ ✓ tests/runtime-contract.test.ts (64 tests) 240ms
12
+ ✓ tests/augmentation-generator.test.ts (24 tests) 57ms
14
13
  stdout | tests/init.test.ts > scaffold() > creates all expected files
15
14
   created package.json
16
15
  created supatype.config.ts
@@ -61,6 +60,7 @@
61
60
  created public/.gitkeep
62
61
  created .gitignore
63
62
 
63
+ ✓ tests/seed-ir.test.ts (15 tests) 74ms
64
64
  stdout | tests/init.test.ts > scaffold() > .env contains DATABASE_URL, JWT_SECRET, POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB
65
65
   created package.json
66
66
  created supatype.config.ts
@@ -325,32 +325,32 @@
325
325
  created public/.gitkeep
326
326
  created .gitignore
327
327
 
328
- ✓ tests/init.test.ts (28 tests) 158ms
329
- ✓ tests/engine-floor.test.ts (28 tests) 20ms
330
- ✓ tests/external-database-compose.test.ts (23 tests) 28ms
331
- ✓ tests/model-constraints.test.ts (18 tests) 107ms
332
- ✓ tests/model-versions.test.ts (19 tests) 105ms
333
- ✓ tests/api-config-cache-seed.test.ts (15 tests) 59ms
334
- ✓ tests/model-cache-declaration.test.ts (18 tests) 89ms
335
- ✓ tests/field-masking-tier.test.ts (16 tests) 24ms
336
- ✓ tests/hooks-generator.test.ts (7 tests) 8672ms
337
- ✓ typechecks under strict mode, together with a handler that uses it  3055ms
338
- ✓ rejects a handler for a table that declares no hook  3234ms
339
- ✓ typechecks with a validator written the way the docs will show it  2330ms
328
+ ✓ tests/init.test.ts (28 tests) 186ms
329
+ ✓ tests/engine-floor.test.ts (28 tests) 16ms
330
+ ✓ tests/external-database-compose.test.ts (23 tests) 27ms
331
+ ✓ tests/model-constraints.test.ts (18 tests) 215ms
332
+ ✓ tests/model-versions.test.ts (19 tests) 121ms
333
+ ✓ tests/api-config-cache-seed.test.ts (15 tests) 36ms
334
+ ✓ tests/model-cache-declaration.test.ts (18 tests) 87ms
335
+ ✓ tests/field-masking-tier.test.ts (16 tests) 19ms
336
+ ✓ tests/hooks-generator.test.ts (7 tests) 9417ms
337
+ ✓ typechecks under strict mode, together with a handler that uses it  3666ms
338
+ ✓ rejects a handler for a table that declares no hook  3282ms
339
+ ✓ typechecks with a validator written the way the docs will show it  2430ms
340
340
 
341
- ✓ tests/dev-ui.test.ts (21 tests) 107ms
341
+ ✓ tests/dev-ui.test.ts (21 tests) 101ms
342
342
 
343
343
  [supatype] Shutting down…
344
- ✓ tests/host-database.test.ts (15 tests) 38ms
345
- ✓ tests/config.test.ts (19 tests) 8275ms
346
- ✓ loads a valid supatype.config.ts (plain export default, no package imports)  1005ms
347
- ✓ normalizes shorthand schema string to { path, pg_schema }  1241ms
348
- ✓ loads a supatype.config.js (plain ESM)  953ms
349
- ✓ loads config without a versions section (latest by default)  977ms
350
- ✓ prefers supatype.config.ts over supatype.config.js when both exist  873ms
351
- ✓ supports optional output field in config  806ms
352
- ✓ merges supatype.local.config.ts over base  1444ms
353
- ✓ loads defineConfig import before @supatype/cli is installed (init scaffold)  951ms
344
+ ✓ tests/host-database.test.ts (15 tests) 17ms
345
+ ✓ tests/config.test.ts (19 tests) 9669ms
346
+ ✓ loads a valid supatype.config.ts (plain export default, no package imports)  1285ms
347
+ ✓ normalizes shorthand schema string to { path, pg_schema }  1034ms
348
+ ✓ loads a supatype.config.js (plain ESM)  1267ms
349
+ ✓ loads config without a versions section (latest by default)  1348ms
350
+ ✓ prefers supatype.config.ts over supatype.config.js when both exist  965ms
351
+ ✓ supports optional output field in config  1013ms
352
+ ✓ merges supatype.local.config.ts over base  1520ms
353
+ ✓ loads defineConfig import before @supatype/cli is installed (init scaffold)  1220ms
354
354
  stdout | tests/docker-runtime.test.ts > requireDockerDaemon > exits when the daemon is unavailable
355
355
  
356
356
  Start the Docker daemon (e.g. sudo systemctl start docker), then try again.
@@ -359,30 +359,30 @@
359
359
 
360
360
  docker: daemon down
361
361
 
362
- ✓ tests/docker-runtime.test.ts (10 tests) 23ms
363
- ✓ tests/db-preflight.test.ts (14 tests) 8ms
364
- ✓ tests/dev-db-reset.test.ts (8 tests) 181ms
365
- ✓ tests/keys-write.test.ts (11 tests) 15ms
366
- ✓ tests/field-bounds.test.ts (23 tests) 13ms
367
- ✓ tests/cache-clean.test.ts (8 tests) 1859ms
368
- ✓ keeps pinned versions and removes the rest  677ms
369
- ✓ --force removes pinned versions  615ms
370
- ✓ explicit version removes even when pinned (with warning)  550ms
371
- ✓ tests/functions-deno-types.test.ts (7 tests) 2587ms
372
- ✓ tsc fails with Cannot find name Deno without ambient types  1778ms
373
- ✓ tsc passes for Deno.env after ensureFunctionsDenoTypes  792ms
362
+ ✓ tests/docker-runtime.test.ts (10 tests) 16ms
363
+ ✓ tests/db-preflight.test.ts (14 tests) 13ms
364
+ ✓ tests/dev-db-reset.test.ts (8 tests) 183ms
365
+ ✓ tests/keys-write.test.ts (11 tests) 20ms
366
+ ✓ tests/cache-clean.test.ts (8 tests) 2179ms
367
+ ✓ keeps pinned versions and removes the rest  740ms
368
+ ✓ --force removes pinned versions  756ms
369
+ ✓ explicit version removes even when pinned (with warning)  666ms
370
+ ✓ tests/field-bounds.test.ts (23 tests) 14ms
374
371
  ✓ tests/cache-provider-config.test.ts (12 tests) 11ms
375
- ✓ tests/field-bounds-matrix.test.ts (124 tests) 23ms
372
+ ✓ tests/functions-deno-types.test.ts (7 tests) 2845ms
373
+ ✓ tsc fails with Cannot find name Deno without ambient types  2046ms
374
+ ✓ tsc passes for Deno.env after ensureFunctionsDenoTypes  779ms
375
+ ✓ tests/field-bounds-matrix.test.ts (124 tests) 28ms
376
376
  ✓ tests/external-database-config.test.ts (14 tests) 10ms
377
- ✓ tests/compose-services.test.ts (12 tests) 10ms
378
- ✓ tests/adopt-walkthrough.test.ts (12 tests) 11ms
379
- ✓ tests/dev-initial-push.test.ts (7 tests) 23ms
380
- ✓ tests/field-validators.test.ts (10 tests) 60ms
381
- ✓ tests/native-keyspace.test.ts (10 tests) 36ms
382
- ✓ tests/db-port.test.ts (14 tests) 11ms
383
- ✓ tests/command-chrome-coverage.test.ts (1 test) 11ms
377
+ ✓ tests/compose-services.test.ts (12 tests) 12ms
378
+ ✓ tests/adopt-walkthrough.test.ts (12 tests) 13ms
379
+ ✓ tests/dev-initial-push.test.ts (7 tests) 25ms
380
+ ✓ tests/field-validators.test.ts (10 tests) 48ms
381
+ ✓ tests/native-keyspace.test.ts (10 tests) 51ms
382
+ ✓ tests/db-port.test.ts (14 tests) 16ms
383
+ ✓ tests/command-chrome-coverage.test.ts (1 test) 12ms
384
384
  ✓ tests/hook-upload.test.ts (8 tests) 12ms
385
- ✓ tests/env-file.test.ts (9 tests) 15ms
385
+ ✓ tests/env-file.test.ts (9 tests) 19ms
386
386
  stdout | tests/link.test.ts > link model > migrates cloud.json into link.json
387
387
   created package.json
388
388
  created supatype.config.ts
@@ -396,10 +396,10 @@
396
396
  stderr | tests/link.test.ts > link model > migrates cloud.json into link.json
397
397
  [supatype] Migrated .supatype/cloud.json → .supatype/link.json (legacy files kept; remove manually when ready).
398
398
 
399
- ✓ tests/link.test.ts (4 tests) 2823ms
400
- ✓ resolveTarget returns cloud mode with /api/v1 prefix  922ms
401
- ✓ resolveTarget returns self-host mode with /platform/v1 prefix  938ms
402
- ✓ targetSchemaRollback posts to /platform/v1 when linked  951ms
399
+ ✓ tests/link.test.ts (4 tests) 3156ms
400
+ ✓ resolveTarget returns cloud mode with /api/v1 prefix  1100ms
401
+ ✓ resolveTarget returns self-host mode with /platform/v1 prefix  996ms
402
+ ✓ targetSchemaRollback posts to /platform/v1 when linked  1049ms
403
403
  stdout | tests/admin-ensure.test.ts > init admin seed in .env > writes SUPATYPE_ADMIN_* when scaffold options include credentials
404
404
   created package.json
405
405
  created supatype.config.ts
@@ -410,8 +410,8 @@
410
410
  created public/.gitkeep
411
411
  created .gitignore
412
412
 
413
- ✓ tests/admin-ensure.test.ts (10 tests) 160ms
414
- ✓ tests/service-role-check.test.ts (10 tests) 8ms
413
+ ✓ tests/admin-ensure.test.ts (10 tests) 176ms
414
+ ✓ tests/service-role-check.test.ts (10 tests) 12ms
415
415
  stdout | tests/admin-studio-membership.test.ts > first admin user creation > does not write a role into app_metadata
416
416
  [supatype] Admin user "admin@example.com" created (role: admin).
417
417
  [supatype] Log in at /admin after starting the dev server.
@@ -428,43 +428,43 @@
428
428
  [supatype] Admin user "admin@example.com" created (role: admin).
429
429
  [supatype] Log in at /admin after starting the dev server.
430
430
 
431
- ✓ tests/admin-studio-membership.test.ts (5 tests) 476ms
432
- ✓ tests/pull-utils.test.ts (49 tests) 11ms
433
- ✓ tests/keys.test.ts (11 tests) 14812ms
434
- ✓ exits 0 with --secret  1257ms
435
- ✓ outputs ANON_KEY= line  1279ms
436
- ✓ outputs SERVICE_ROLE_KEY= line  1245ms
437
- ✓ ANON_KEY is a valid three-part JWT  1293ms
438
- ✓ SERVICE_ROLE_KEY payload has role: service_role  1120ms
439
- ✓ JWT has exp in the future  1137ms
440
- ✓ --exp-years changes the expiry window  2593ms
441
- ✓ reads JWT_SECRET from environment variable  1218ms
442
- ✓ reads JWT_SECRET from .env file  1282ms
443
- ✓ exits non-zero when no secret is available  1163ms
444
- ✓ keys --help shows --secret and --exp-years options  1220ms
431
+ ✓ tests/admin-studio-membership.test.ts (5 tests) 397ms
432
+ ✓ tests/pull-utils.test.ts (49 tests) 15ms
433
+ ✓ tests/schema-sources.test.ts (5 tests) 1180ms
434
+ ✓ buildSchemaSourcesPayload includes manifest metadata  562ms
435
+ ✓ restore overwrites modified local files  578ms
445
436
  ✓ tests/preview-config-check.test.ts (9 tests) 7ms
446
- ✓ tests/schema-sources.test.ts (5 tests) 1129ms
447
- ✓ buildSchemaSourcesPayload includes manifest metadata  581ms
448
- ✓ restore overwrites modified local files  512ms
437
+ ✓ tests/keys.test.ts (11 tests) 17167ms
438
+ ✓ exits 0 with --secret  1421ms
439
+ ✓ outputs ANON_KEY= line  1469ms
440
+ ✓ outputs SERVICE_ROLE_KEY= line  1314ms
441
+ ✓ ANON_KEY is a valid three-part JWT  1458ms
442
+ ✓ SERVICE_ROLE_KEY payload has role: service_role  1318ms
443
+ ✓ JWT has exp in the future  1512ms
444
+ ✓ --exp-years changes the expiry window  2894ms
445
+ ✓ reads JWT_SECRET from environment variable  1392ms
446
+ ✓ reads JWT_SECRET from .env file  1564ms
447
+ ✓ exits non-zero when no secret is available  1410ms
448
+ ✓ keys --help shows --secret and --exp-years options  1409ms
449
449
  stderr | tests/binary-cache-cloud-overrides.test.ts > isLinkedToCloudProject > is true when .supatype/cloud.json has projectSlug
450
450
  [supatype] Migrated .supatype/cloud.json → .supatype/link.json (legacy files kept; remove manually when ready).
451
451
 
452
- ✓ tests/binary-cache-cloud-overrides.test.ts (11 tests) 16ms
453
- ✓ tests/homebrew-formula.test.ts (4 tests) 195ms
454
- ✓ tests/model-cache-manifest.test.ts (12 tests) 5ms
455
- ✓ tests/local-server-image-env.test.ts (5 tests) 15ms
456
- ✓ tests/minisign.test.ts (5 tests) 9ms
452
+ ✓ tests/binary-cache-cloud-overrides.test.ts (11 tests) 13ms
453
+ ✓ tests/homebrew-formula.test.ts (4 tests) 226ms
454
+ ✓ tests/local-server-image-env.test.ts (5 tests) 12ms
455
+ ✓ tests/model-cache-manifest.test.ts (12 tests) 7ms
456
+ ✓ tests/minisign.test.ts (5 tests) 15ms
457
+ ✓ tests/client-generator.test.ts (9 tests) 12ms
457
458
  ✓ tests/local-secrets.test.ts (5 tests) 9ms
458
- ✓ tests/client-generator.test.ts (9 tests) 9ms
459
459
  ✓ tests/functions-concurrency.test.ts (6 tests) 5ms
460
- ✓ tests/readiness-poll.test.ts (3 tests) 320ms
461
- ✓ ends promptly when it carries a deadline  317ms
462
- ✓ tests/ast-derived-outputs.test.ts (5 tests) 11ms
463
- ✓ tests/self-host-keys.test.ts (7 tests) 12ms
464
- ✓ tests/functions-context-refresh.test.ts (4 tests) 10ms
460
+ ✓ tests/readiness-poll.test.ts (3 tests) 329ms
461
+ ✓ ends promptly when it carries a deadline  320ms
462
+ ✓ tests/ast-derived-outputs.test.ts (5 tests) 12ms
463
+ ✓ tests/functions-context-refresh.test.ts (4 tests) 11ms
464
+ ✓ tests/self-host-keys.test.ts (7 tests) 14ms
465
465
  ✓ tests/engine-push-output.test.ts (10 tests) 9ms
466
- ✓ tests/db-published-and-addressable.test.ts (4 tests) 6ms
467
- ✓ tests/gitignore-secrets.test.ts (5 tests) 42ms
466
+ ✓ tests/db-published-and-addressable.test.ts (4 tests) 5ms
467
+ ✓ tests/gitignore-secrets.test.ts (5 tests) 80ms
468
468
  ✓ tests/api-schemas.test.ts (10 tests) 8ms
469
469
  stdout | tests/storage-provision.test.ts > provisionBuckets > POSTs each bucket to the storage API
470
470
  [supatype] Storage bucket "photos" ready.
@@ -472,35 +472,35 @@
472
472
  stdout | tests/storage-provision.test.ts > provisionBuckets > POSTs each bucket to the storage API
473
473
  [supatype] Storage bucket "avatars" ready.
474
474
 
475
- ✓ tests/storage-provision.test.ts (6 tests) 15ms
476
- ✓ tests/strict.test.ts (7 tests) 8ms
477
- ✓ tests/cached-artifact-format.test.ts (7 tests) 15ms
478
- ✓ tests/host-connection-targets.test.ts (4 tests) 2180ms
479
- ✓ connects direct mode to the host-published database, not the container (#85)  580ms
480
- ✓ does the same for the local target used when there is no service key  511ms
481
- ✓ reads the project's .env for doctor and pull, not only the process environment  547ms
482
- ✓ still takes --connection over everything  541ms
483
- ✓ tests/cache-identity-scope.test.ts (33 tests) 7ms
484
- ✓ tests/proxy-dev-app.test.ts (7 tests) 5ms
485
- ✓ tests/target-client-refresh.test.ts (3 tests) 10ms
486
- ✓ tests/studio-admin-roles.test.ts (6 tests) 4ms
487
- ✓ tests/cli-help.test.ts (16 tests) 19955ms
488
- ✓ --help lists all top-level commands  1245ms
489
- ✓ --version prints package.json version  1115ms
490
- ✓ self-update --help describes the command  1249ms
491
- ✓ init --help describes the init command  1260ms
492
- ✓ push --help describes the push command and --yes flag  1280ms
493
- ✓ diff --help describes the diff command  1323ms
494
- ✓ pull --help describes scaffold pull command  1312ms
495
- ✓ doctor --help describes drift report command  1235ms
496
- ✓ introspect --help describes database introspection command  1249ms
497
- ✓ adopt --help describes adoption ceremony command  1167ms
498
- ✓ reset --help shows --yes flag  1251ms
499
- ✓ app --help describes the app command with add/remove subcommands  1190ms
500
- ✓ app add --help shows --static and --port options  1160ms
501
- ✓ self-host --help shows compose only (legacy commands hidden)  1346ms
502
- ✓ self-host compose --help shows compose subcommands  1314ms
503
- ✓ unknown command exits non-zero  1249ms
475
+ ✓ tests/storage-provision.test.ts (6 tests) 12ms
476
+ ✓ tests/strict.test.ts (7 tests) 10ms
477
+ ✓ tests/cached-artifact-format.test.ts (7 tests) 13ms
478
+ ✓ tests/proxy-dev-app.test.ts (7 tests) 7ms
479
+ ✓ tests/host-connection-targets.test.ts (4 tests) 2580ms
480
+ ✓ connects direct mode to the host-published database, not the container (#85)  634ms
481
+ ✓ does the same for the local target used when there is no service key  575ms
482
+ ✓ reads the project's .env for doctor and pull, not only the process environment  711ms
483
+ ✓ still takes --connection over everything  659ms
484
+ ✓ tests/cache-identity-scope.test.ts (33 tests) 9ms
485
+ ✓ tests/cli-help.test.ts (16 tests) 21902ms
486
+ ✓ --help lists all top-level commands  1394ms
487
+ ✓ --version prints package.json version  1395ms
488
+ ✓ self-update --help describes the command  1382ms
489
+ ✓ init --help describes the init command  1317ms
490
+ ✓ push --help describes the push command and --yes flag  1322ms
491
+ ✓ diff --help describes the diff command  1336ms
492
+ ✓ pull --help describes scaffold pull command  1355ms
493
+ ✓ doctor --help describes drift report command  1469ms
494
+ ✓ introspect --help describes database introspection command  1425ms
495
+ ✓ adopt --help describes adoption ceremony command  1345ms
496
+ ✓ reset --help shows --yes flag  1490ms
497
+ ✓ app --help describes the app command with add/remove subcommands  1291ms
498
+ ✓ app add --help shows --static and --port options  1197ms
499
+ ✓ self-host --help shows compose only (legacy commands hidden)  1345ms
500
+ ✓ self-host compose --help shows compose subcommands  1352ms
501
+ ✓ unknown command exits non-zero  1477ms
502
+ ✓ tests/target-client-refresh.test.ts (3 tests) 11ms
503
+ ✓ tests/studio-admin-roles.test.ts (6 tests) 7ms
504
504
  stdout | tests/app-command.test.ts > supatype app add --static > sets app.mode=static and static_dir in supatype.config.ts
505
505
   created package.json
506
506
  created supatype.config.ts
@@ -511,13 +511,13 @@
511
511
  created public/.gitkeep
512
512
  created .gitignore
513
513
 
514
- ✓ tests/compose-parsable-defaults.test.ts (2 tests) 8ms
515
- ✓ tests/rest-cache-admin.test.ts (3 tests) 38ms
516
- ✓ tests/init-dependency-versions.test.ts (4 tests) 37ms
517
- ✓ tests/service-role-routes.test.ts (4 tests) 1625ms
518
- ✓ reads the declared list  552ms
519
- ✓ is an empty list when a project declares none  575ms
520
- ✓ sends what the project declared, hook entries included  492ms
514
+ ✓ tests/compose-parsable-defaults.test.ts (2 tests) 7ms
515
+ ✓ tests/rest-cache-admin.test.ts (3 tests) 49ms
516
+ ✓ tests/init-dependency-versions.test.ts (4 tests) 51ms
517
+ ✓ tests/service-role-routes.test.ts (4 tests) 1835ms
518
+ ✓ reads the declared list  619ms
519
+ ✓ is an empty list when a project declares none  616ms
520
+ ✓ sends what the project declared, hook entries included  596ms
521
521
  stdout | tests/app-command.test.ts > supatype app add --static > creates the static directory when missing
522
522
   created package.json
523
523
  created supatype.config.ts
@@ -528,55 +528,56 @@
528
528
  created public/.gitkeep
529
529
  created .gitignore
530
530
 
531
- ✓ tests/type-resolver.test.ts (2 tests) 13ms
532
- ✓ tests/app-command.test.ts (2 tests) 2820ms
533
- ✓ sets app.mode=static and static_dir in supatype.config.ts  1431ms
534
- ✓ creates the static directory when missing  1387ms
535
- ✓ tests/command-chrome-wrap.test.ts (3 tests) 6ms
536
- ✓ tests/cli-install-method.test.ts (8 tests) 6ms
537
- ✓ tests/port-in-use.test.ts (4 tests) 23ms
538
- ✓ tests/archive-name-alias.test.ts (4 tests) 8ms
539
- ✓ tests/ensure-binary.test.ts (2 tests) 9ms
540
- ✓ tests/doctor-render.test.ts (3 tests) 6ms
541
- ✓ tests/init-project-detect.test.ts (4 tests) 10ms
542
- ✓ tests/tsx-runner.test.ts (7 tests) 2668ms
543
- ✓ evaluates TypeScript syntax (type annotations)  365ms
544
- ✓ can serialize a JSON object to stdout  391ms
531
+ ✓ tests/type-resolver.test.ts (2 tests) 15ms
532
+ ✓ tests/app-command.test.ts (2 tests) 3058ms
533
+ ✓ sets app.mode=static and static_dir in supatype.config.ts  1512ms
534
+ ✓ creates the static directory when missing  1544ms
535
+ ✓ tests/command-chrome-wrap.test.ts (3 tests) 9ms
536
+ ✓ tests/cli-install-method.test.ts (8 tests) 7ms
537
+ ✓ tests/port-in-use.test.ts (4 tests) 33ms
538
+ ✓ tests/tsx-runner.test.ts (7 tests) 3053ms
539
+ ✓ evaluates a simple expression and returns stdout  362ms
540
+ ✓ evaluates TypeScript syntax (type annotations)  432ms
541
+ ✓ can serialize a JSON object to stdout  409ms
545
542
  ✓ returns non-zero exit code on syntax error  401ms
546
- ✓ returns non-zero exit code on runtime error  329ms
547
- ✓ captures stderr separately from stdout  365ms
548
- ✓ runs a .ts file and returns its stdout  515ms
549
- ✓ tests/doctor-service-role.test.ts (4 tests) 9ms
550
- ✓ tests/dev-ports-owner.test.ts (6 tests) 4ms
551
- ✓ tests/required-host-components.test.ts (4 tests) 5ms
543
+ ✓ returns non-zero exit code on runtime error  429ms
544
+ ✓ captures stderr separately from stdout  412ms
545
+ ✓ runs a .ts file and returns its stdout  604ms
546
+ ✓ tests/archive-name-alias.test.ts (4 tests) 7ms
547
+ ✓ tests/ensure-binary.test.ts (2 tests) 9ms
548
+ ✓ tests/doctor-render.test.ts (3 tests) 7ms
549
+ ✓ tests/init-project-detect.test.ts (4 tests) 16ms
550
+ ✓ tests/doctor-service-role.test.ts (4 tests) 6ms
551
+ ✓ tests/required-host-components.test.ts (4 tests) 7ms
552
+ ✓ tests/dev-ports-owner.test.ts (6 tests) 5ms
553
+ ✓ tests/retired-no-cache.test.ts (4 tests) 7ms
552
554
  ✓ tests/ui-messages.test.ts (5 tests) 6ms
553
- ✓ tests/retired-no-cache.test.ts (4 tests) 8ms
554
- ✓ tests/normalize-admin-config.test.ts (1 test) 6ms
555
- ✓ tests/ui-confirm.test.ts (3 tests) 7ms
556
- ✓ tests/docker-postgres.test.ts (5 tests) 4ms
555
+ ✓ tests/normalize-admin-config.test.ts (1 test) 18ms
556
+ ✓ tests/ui-confirm.test.ts (3 tests) 8ms
557
+ ✓ tests/docker-postgres.test.ts (5 tests) 5ms
557
558
  ✓ tests/binary-download-lock.test.ts (2 tests) 6ms
558
559
  ✓ tests/dev-session-lock.test.ts (2 tests) 5ms
559
560
  ✓ tests/dev-ports.test.ts (3 tests) 6ms
560
- ✓ tests/route-manifest.test.ts (1 test) 4ms
561
- ✓ tests/config-load-failure.test.ts (2 tests) 3319ms
562
- ✓ is reported, rather than treated as absent  1957ms
563
- ✓ does not stop the CLI working with no config at all  1359ms
564
- ✓ tests/dev-ready-panel.test.ts (2 tests) 3ms
565
- ✓ tests/realtime-launch.test.ts (1 test) 3ms
566
- ✓ tests/release-pins.test.ts (2 tests) 3ms
567
- ✓ tests/seed-discover.test.ts (2 tests) 15ms
561
+ ✓ tests/config-load-failure.test.ts (2 tests) 3612ms
562
+ ✓ is reported, rather than treated as absent  2032ms
563
+ ✓ does not stop the CLI working with no config at all  1578ms
564
+ ✓ tests/route-manifest.test.ts (1 test) 6ms
565
+ ✓ tests/dev-ready-panel.test.ts (2 tests) 4ms
566
+ ✓ tests/realtime-launch.test.ts (1 test) 4ms
567
+ ✓ tests/release-pins.test.ts (2 tests) 4ms
568
+ ✓ tests/seed-discover.test.ts (2 tests) 20ms
568
569
  ✓ tests/ensure-dev-api-config.test.ts (1 test) 4ms
569
- ✓ tests/adopt-result.test.ts (2 tests) 4ms
570
+ ✓ tests/adopt-result.test.ts (2 tests) 5ms
570
571
  ✓ tests/init-package-json.test.ts (1 test) 3ms
571
- ✓ tests/pg-spawn-env.test.ts (2 tests) 3ms
572
- ✓ tests/resolve-api-url.test.ts (2 tests) 5ms
572
+ ✓ tests/resolve-api-url.test.ts (2 tests) 4ms
573
573
  ✓ tests/migrate-from-v1.test.ts (1 test) 14ms
574
+ ✓ tests/pg-spawn-env.test.ts (2 tests) 3ms
574
575
  ✓ tests/cli-package-version.test.ts (1 test) 3ms
575
576
  ✓ tests/postgres-archive-tag.test.ts (1 test) 2ms
576
577
  ✓ tests/stdin-after-ink.test.ts (1 test) 3ms
577
578
 
578
579
   Test Files  110 passed (110)
579
-  Tests  1160 passed (1160)
580
-  Start at  09:56:07
581
-  Duration  52.88s (transform 9.45s, setup 0ms, import 61.11s, tests 77.01s, environment 17ms)
580
+  Tests  1161 passed (1161)
581
+  Start at  20:59:12
582
+  Duration  59.72s (transform 9.76s, setup 0ms, import 68.59s, tests 86.38s, environment 19ms)
582
583
 
@@ -1,4 +1,4 @@
1
1
 
2
- > @supatype/cli@0.3.5 typecheck /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.3.6 typecheck /home/runner/work/supatype/supatype/packages/cli
3
3
  > tsc --project tsconfig.json --noEmit && tsc --project tests/tsconfig.json --noEmit
4
4
 
@@ -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.3.5";
12
+ export const EMBEDDED_CLI_VERSION = "0.3.6";
13
13
  //# sourceMappingURL=cli-version-embedded.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"type-extractor.d.ts","sourceRoot":"","sources":["../src/type-extractor.ts"],"names":[],"mappings":"AAeA,OAAO,EAOL,KAAK,oBAAoB,EAM1B,MAAM,oBAAoB,CAAA;AAG3B,YAAY,EAAE,oBAAoB,IAAI,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAM/G,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,GAAG,GAAE,MAAsB,GAC1B,oBAAoB,GAAG,IAAI,CAoI7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,gBAAgB,EAAE,CAAA;CAC1B;AAED,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,iBAAiB,CA4BrG;AAmiGD,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf"}
1
+ {"version":3,"file":"type-extractor.d.ts","sourceRoot":"","sources":["../src/type-extractor.ts"],"names":[],"mappings":"AAeA,OAAO,EAOL,KAAK,oBAAoB,EAM1B,MAAM,oBAAoB,CAAA;AAG3B,YAAY,EAAE,oBAAoB,IAAI,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAM/G,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,GAAG,GAAE,MAAsB,GAC1B,oBAAoB,GAAG,IAAI,CAoI7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,gBAAgB,EAAE,CAAA;CAC1B;AAED,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,iBAAiB,CA4BrG;AAshGD,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf"}
@@ -1042,10 +1042,7 @@ function parseAccessModeLiteral(typeNode, sourceFile) {
1042
1042
  return undefined;
1043
1043
  }
1044
1044
  function parseSizeStringLiteral(typeNode, sourceFile) {
1045
- if (ts.isLiteralTypeNode(typeNode) && ts.isStringLiteral(typeNode.literal)) {
1046
- return typeNode.literal.text;
1047
- }
1048
- return stripQuotes(typeNode.getText(sourceFile)) || undefined;
1045
+ return literalStringType(typeNode) ?? (stripQuotes(typeNode.getText(sourceFile)) || undefined);
1049
1046
  }
1050
1047
  function parseJsonStringLiteral(typeNode, sourceFile) {
1051
1048
  return parseSizeStringLiteral(typeNode, sourceFile);
@@ -1288,10 +1285,7 @@ function resolveBucketName(typeArg, sourceFile, bucketAliases, fallback) {
1288
1285
  if (ts.isTypeReferenceNode(typeArg) && ts.isIdentifier(typeArg.typeName)) {
1289
1286
  return bucketAliases.get(typeArg.typeName.text) ?? typeArg.typeName.text;
1290
1287
  }
1291
- if (ts.isLiteralTypeNode(typeArg) && ts.isStringLiteral(typeArg.literal)) {
1292
- return typeArg.literal.text;
1293
- }
1294
- return typeArg.getText(sourceFile).replace(/^['"]|['"]$/g, "") || fallback;
1288
+ return literalStringType(typeArg) ?? (typeArg.getText(sourceFile).replace(/^['"]|['"]$/g, "") || fallback);
1295
1289
  }
1296
1290
  function isBooleanLiteralType(typeNode, value) {
1297
1291
  if (value) {
@@ -1392,7 +1386,7 @@ function parseMetaLiteral(metaArg, sourceFile) {
1392
1386
  }
1393
1387
  else if (key === "searchable" && ts.isTupleTypeNode(member.type)) {
1394
1388
  result.searchable = member.type.elements
1395
- .map((el) => (ts.isLiteralTypeNode(el) && ts.isStringLiteral(el.literal) ? el.literal.text : null))
1389
+ .map(literalStringType)
1396
1390
  .filter((name) => name !== null);
1397
1391
  }
1398
1392
  else if (key === "versions") {
@@ -1400,10 +1394,10 @@ function parseMetaLiteral(metaArg, sourceFile) {
1400
1394
  if (versions !== undefined)
1401
1395
  result.versions = versions;
1402
1396
  }
1403
- else if (key === "tableName" &&
1404
- ts.isLiteralTypeNode(member.type) &&
1405
- ts.isStringLiteral(member.type.literal)) {
1406
- result.tableName = member.type.literal.text;
1397
+ else if (key === "tableName" || key === "label" || key === "labelPlural") {
1398
+ const text = literalStringType(member.type);
1399
+ if (text !== null)
1400
+ result[key] = text;
1407
1401
  }
1408
1402
  }
1409
1403
  return result;
@@ -1442,6 +1436,10 @@ function parseModelMeta(metaArg, sourceFile, modelName, fieldsArg, fields, resol
1442
1436
  options.autoLocalize = true;
1443
1437
  if (literal.versions !== undefined)
1444
1438
  options.versions = literal.versions;
1439
+ if (literal.label !== undefined)
1440
+ options.label = literal.label;
1441
+ if (literal.labelPlural !== undefined)
1442
+ options.labelPlural = literal.labelPlural;
1445
1443
  const access = parseModelAccess(metaArg, sourceFile, modelName, fields, resolveCtx);
1446
1444
  if (literal.versions !== undefined)
1447
1445
  assertVersionsWithoutFieldRules(access, modelName);
@@ -1817,8 +1815,10 @@ function parseModelIndexes(metaArg, sourceFile, fields) {
1817
1815
  const key = getPropertyName(member.name);
1818
1816
  if (!key)
1819
1817
  continue;
1820
- if (key === "name" && ts.isLiteralTypeNode(member.type) && ts.isStringLiteral(member.type.literal)) {
1821
- indexDef.name = member.type.literal.text;
1818
+ if (key === "name") {
1819
+ const name = literalStringType(member.type);
1820
+ if (name !== null)
1821
+ indexDef.name = name;
1822
1822
  }
1823
1823
  else if (key === "unique" && isBooleanLiteralType(member.type, true)) {
1824
1824
  indexDef.unique = true;
@@ -2631,10 +2631,10 @@ function parseRelationOptions(optsArg, sourceFile) {
2631
2631
  out.required = true;
2632
2632
  continue;
2633
2633
  }
2634
- if ((key === "onDelete" || key === "onUpdate" || key === "through") &&
2635
- ts.isLiteralTypeNode(member.type) &&
2636
- ts.isStringLiteral(member.type.literal)) {
2637
- out[key] = member.type.literal.text;
2634
+ if (key === "onDelete" || key === "onUpdate" || key === "through") {
2635
+ const text = literalStringType(member.type);
2636
+ if (text !== null)
2637
+ out[key] = text;
2638
2638
  }
2639
2639
  }
2640
2640
  return out;