@supatype/cli 0.3.3 → 0.3.4

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.3 build /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.3.4 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,13 +1,16 @@
1
1
 
2
- > @supatype/cli@0.3.3 test /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.3.4 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 (49 tests) 408ms
9
- ✓ tests/access-composition.test.ts (32 tests) 261ms
10
- ✓ tests/model-hooks.test.ts (23 tests) 118ms
8
+ ✓ tests/type-extractor.test.ts (49 tests) 233ms
9
+ ✓ tests/access-composition.test.ts (32 tests) 217ms
10
+ ✓ tests/model-hooks.test.ts (23 tests) 112ms
11
+ ✓ tests/runtime-contract.test.ts (64 tests) 222ms
12
+ ✓ tests/augmentation-generator.test.ts (24 tests) 26ms
13
+ ✓ tests/seed-ir.test.ts (15 tests) 46ms
11
14
  stdout | tests/init.test.ts > scaffold() > creates all expected files
12
15
   created package.json
13
16
  created supatype.config.ts
@@ -322,34 +325,31 @@
322
325
  created public/.gitkeep
323
326
  created .gitignore
324
327
 
325
- ✓ tests/init.test.ts (28 tests) 115ms
326
- ✓ tests/augmentation-generator.test.ts (24 tests) 40ms
327
- ✓ tests/runtime-contract.test.ts (64 tests) 177ms
328
- ✓ tests/seed-ir.test.ts (15 tests) 34ms
329
- ✓ tests/engine-floor.test.ts (28 tests) 36ms
330
- ✓ tests/external-database-compose.test.ts (23 tests) 24ms
331
- ✓ tests/model-constraints.test.ts (18 tests) 225ms
332
- ✓ tests/model-versions.test.ts (19 tests) 78ms
333
- ✓ tests/api-config-cache-seed.test.ts (15 tests) 34ms
334
- ✓ tests/model-cache-declaration.test.ts (18 tests) 92ms
335
- ✓ tests/field-masking-tier.test.ts (16 tests) 21ms
336
- ✓ tests/hooks-generator.test.ts (7 tests) 9843ms
337
- ✓ typechecks under strict mode, together with a handler that uses it  4001ms
338
- ✓ rejects a handler for a table that declares no hook  3169ms
339
- ✓ typechecks with a validator written the way the docs will show it  2605ms
340
-
341
- ✓ tests/dev-ui.test.ts (21 tests) 125ms
328
+ ✓ tests/init.test.ts (28 tests) 209ms
329
+ ✓ tests/engine-floor.test.ts (28 tests) 34ms
330
+ ✓ tests/external-database-compose.test.ts (23 tests) 38ms
331
+ ✓ tests/model-constraints.test.ts (18 tests) 222ms
332
+ ✓ tests/model-versions.test.ts (19 tests) 143ms
333
+ ✓ tests/api-config-cache-seed.test.ts (15 tests) 46ms
334
+ ✓ tests/model-cache-declaration.test.ts (18 tests) 114ms
335
+ ✓ tests/field-masking-tier.test.ts (16 tests) 18ms
336
+
337
+ ✓ tests/dev-ui.test.ts (21 tests) 166ms
342
338
 
343
339
  [supatype] Shutting down…
344
- ✓ tests/config.test.ts (19 tests) 9687ms
345
- ✓ loads a valid supatype.config.ts (plain export default, no package imports)  1202ms
346
- ✓ normalizes shorthand schema string to { path, pg_schema }  1007ms
347
- ✓ loads a supatype.config.js (plain ESM)  1367ms
348
- ✓ loads config without a versions section (latest by default)  1236ms
349
- ✓ prefers supatype.config.ts over supatype.config.js when both exist  1081ms
350
- ✓ supports optional output field in config  784ms
351
- ✓ merges supatype.local.config.ts over base  1833ms
352
- ✓ loads defineConfig import before @supatype/cli is installed (init scaffold)  1148ms
340
+ ✓ tests/hooks-generator.test.ts (7 tests) 9881ms
341
+ ✓ typechecks under strict mode, together with a handler that uses it  3886ms
342
+ ✓ rejects a handler for a table that declares no hook  3521ms
343
+ ✓ typechecks with a validator written the way the docs will show it  2367ms
344
+ ✓ tests/config.test.ts (19 tests) 9093ms
345
+ ✓ loads a valid supatype.config.ts (plain export default, no package imports)  1136ms
346
+ ✓ normalizes shorthand schema string to { path, pg_schema }  1487ms
347
+ ✓ loads a supatype.config.js (plain ESM)  1023ms
348
+ ✓ loads config without a versions section (latest by default)  1103ms
349
+ ✓ prefers supatype.config.ts over supatype.config.js when both exist  922ms
350
+ ✓ supports optional output field in config  858ms
351
+ ✓ merges supatype.local.config.ts over base  1337ms
352
+ ✓ loads defineConfig import before @supatype/cli is installed (init scaffold)  1214ms
353
353
  stdout | tests/docker-runtime.test.ts > requireDockerDaemon > exits when the daemon is unavailable
354
354
  
355
355
  Start the Docker daemon (e.g. sudo systemctl start docker), then try again.
@@ -358,45 +358,45 @@
358
358
 
359
359
  docker: daemon down
360
360
 
361
- ✓ tests/docker-runtime.test.ts (10 tests) 17ms
362
- ✓ tests/db-preflight.test.ts (14 tests) 11ms
363
- ✓ tests/keys-write.test.ts (11 tests) 23ms
364
- ✓ tests/field-bounds.test.ts (23 tests) 17ms
365
- ✓ tests/cache-clean.test.ts (8 tests) 2011ms
366
- ✓ keeps pinned versions and removes the rest  634ms
367
- ✓ --force removes pinned versions  708ms
368
- ✓ explicit version removes even when pinned (with warning)  651ms
369
- ✓ tests/cache-provider-config.test.ts (12 tests) 14ms
370
- ✓ tests/functions-deno-types.test.ts (7 tests) 2963ms
371
- ✓ tsc fails with Cannot find name Deno without ambient types  2060ms
372
- ✓ tsc passes for Deno.env after ensureFunctionsDenoTypes  883ms
373
- ✓ tests/seed-connection.test.ts (13 tests) 15ms
374
- ✓ tests/field-bounds-matrix.test.ts (124 tests) 24ms
361
+ ✓ tests/docker-runtime.test.ts (10 tests) 14ms
362
+ ✓ tests/db-preflight.test.ts (14 tests) 10ms
363
+ ✓ tests/keys-write.test.ts (11 tests) 24ms
364
+ ✓ tests/field-bounds.test.ts (23 tests) 15ms
365
+ ✓ tests/cache-clean.test.ts (8 tests) 2007ms
366
+ ✓ keeps pinned versions and removes the rest  562ms
367
+ ✓ --force removes pinned versions  731ms
368
+ ✓ explicit version removes even when pinned (with warning)  698ms
369
+ ✓ tests/cache-provider-config.test.ts (12 tests) 12ms
370
+ ✓ tests/functions-deno-types.test.ts (7 tests) 2956ms
371
+ ✓ tsc fails with Cannot find name Deno without ambient types  2063ms
372
+ ✓ tsc passes for Deno.env after ensureFunctionsDenoTypes  879ms
373
+ ✓ tests/seed-connection.test.ts (13 tests) 16ms
374
+ ✓ tests/field-bounds-matrix.test.ts (124 tests) 34ms
375
375
  ✓ tests/external-database-config.test.ts (14 tests) 10ms
376
- ✓ tests/compose-services.test.ts (12 tests) 11ms
377
- ✓ tests/field-validators.test.ts (10 tests) 70ms
378
- ✓ tests/native-keyspace.test.ts (10 tests) 27ms
376
+ ✓ tests/compose-services.test.ts (12 tests) 12ms
377
+ ✓ tests/field-validators.test.ts (10 tests) 68ms
378
+ ✓ tests/native-keyspace.test.ts (10 tests) 39ms
379
379
  ✓ tests/db-port.test.ts (14 tests) 17ms
380
- ✓ tests/command-chrome-coverage.test.ts (1 test) 19ms
381
- ✓ tests/hook-upload.test.ts (8 tests) 10ms
382
- ✓ tests/env-file.test.ts (9 tests) 21ms
380
+ ✓ tests/command-chrome-coverage.test.ts (1 test) 22ms
381
+ ✓ tests/hook-upload.test.ts (8 tests) 14ms
382
+ ✓ tests/env-file.test.ts (9 tests) 17ms
383
383
  stdout | tests/link.test.ts > link model > migrates cloud.json into link.json
384
384
   created package.json
385
385
  created supatype.config.ts
386
386
  created schema/index.ts
387
387
  created .env
388
388
  created seed.ts
389
- stderr | tests/link.test.ts > link model > migrates cloud.json into link.json
390
389
  created seeds/.gitkeep
391
390
  created public/.gitkeep
392
391
  created .gitignore
393
392
 
393
+ stderr | tests/link.test.ts > link model > migrates cloud.json into link.json
394
394
  [supatype] Migrated .supatype/cloud.json → .supatype/link.json (legacy files kept; remove manually when ready).
395
395
 
396
- ✓ tests/link.test.ts (4 tests) 3123ms
397
- ✓ resolveTarget returns cloud mode with /api/v1 prefix  1060ms
398
- ✓ resolveTarget returns self-host mode with /platform/v1 prefix  1041ms
399
- ✓ targetSchemaRollback posts to /platform/v1 when linked  1011ms
396
+ ✓ tests/link.test.ts (4 tests) 3052ms
397
+ ✓ resolveTarget returns cloud mode with /api/v1 prefix  984ms
398
+ ✓ resolveTarget returns self-host mode with /platform/v1 prefix  1012ms
399
+ ✓ targetSchemaRollback posts to /platform/v1 when linked  1043ms
400
400
  stdout | tests/admin-ensure.test.ts > init admin seed in .env > writes SUPATYPE_ADMIN_* when scaffold options include credentials
401
401
   created package.json
402
402
  created supatype.config.ts
@@ -407,8 +407,8 @@
407
407
  created public/.gitkeep
408
408
  created .gitignore
409
409
 
410
- ✓ tests/admin-ensure.test.ts (10 tests) 182ms
411
- ✓ tests/service-role-check.test.ts (10 tests) 15ms
410
+ ✓ tests/admin-ensure.test.ts (10 tests) 173ms
411
+ ✓ tests/service-role-check.test.ts (10 tests) 13ms
412
412
  stdout | tests/admin-studio-membership.test.ts > first admin user creation > does not write a role into app_metadata
413
413
  [supatype] Admin user "admin@example.com" created (role: admin).
414
414
  [supatype] Log in at /admin after starting the dev server.
@@ -425,55 +425,56 @@
425
425
  [supatype] Admin user "admin@example.com" created (role: admin).
426
426
  [supatype] Log in at /admin after starting the dev server.
427
427
 
428
- ✓ tests/admin-studio-membership.test.ts (5 tests) 440ms
429
- ✓ tests/pull-utils.test.ts (49 tests) 14ms
430
- ✓ tests/schema-sources.test.ts (5 tests) 1223ms
431
- ✓ buildSchemaSourcesPayload includes manifest metadata  594ms
432
- ✓ restore overwrites modified local files  586ms
433
- ✓ tests/preview-config-check.test.ts (9 tests) 6ms
434
- ✓ tests/keys.test.ts (11 tests) 17760ms
435
- ✓ exits 0 with --secret  1627ms
436
- ✓ outputs ANON_KEY= line  1464ms
437
- ✓ outputs SERVICE_ROLE_KEY= line  1362ms
438
- ✓ ANON_KEY is a valid three-part JWT  1546ms
439
- ✓ SERVICE_ROLE_KEY payload has role: service_role  1374ms
440
- ✓ JWT has exp in the future  1603ms
441
- ✓ --exp-years changes the expiry window  2946ms
442
- ✓ reads JWT_SECRET from environment variable  1496ms
443
- ✓ reads JWT_SECRET from .env file  1518ms
444
- ✓ exits non-zero when no secret is available  1378ms
445
- ✓ keys --help shows --secret and --exp-years options  1438ms
428
+ ✓ tests/admin-studio-membership.test.ts (5 tests) 562ms
429
+ ✓ tests/pull-utils.test.ts (49 tests) 10ms
430
+ ✓ tests/schema-sources.test.ts (5 tests) 1198ms
431
+ ✓ buildSchemaSourcesPayload includes manifest metadata  612ms
432
+ ✓ restore overwrites modified local files  544ms
433
+ ✓ tests/preview-config-check.test.ts (9 tests) 12ms
434
+ ✓ tests/keys.test.ts (11 tests) 17909ms
435
+ ✓ exits 0 with --secret  1677ms
436
+ ✓ outputs ANON_KEY= line  1546ms
437
+ ✓ outputs SERVICE_ROLE_KEY= line  1372ms
438
+ ✓ ANON_KEY is a valid three-part JWT  1425ms
439
+ ✓ SERVICE_ROLE_KEY payload has role: service_role  1469ms
440
+ ✓ JWT has exp in the future  1628ms
441
+ ✓ --exp-years changes the expiry window  2967ms
442
+ ✓ reads JWT_SECRET from environment variable  1526ms
443
+ ✓ reads JWT_SECRET from .env file  1486ms
444
+ ✓ exits non-zero when no secret is available  1489ms
445
+ ✓ keys --help shows --secret and --exp-years options  1319ms
446
446
  stderr | tests/binary-cache-cloud-overrides.test.ts > isLinkedToCloudProject > is true when .supatype/cloud.json has projectSlug
447
447
  [supatype] Migrated .supatype/cloud.json → .supatype/link.json (legacy files kept; remove manually when ready).
448
448
 
449
- ✓ tests/binary-cache-cloud-overrides.test.ts (11 tests) 22ms
450
- ✓ tests/local-server-image-env.test.ts (5 tests) 19ms
451
- ✓ tests/homebrew-formula.test.ts (4 tests) 214ms
452
- ✓ tests/model-cache-manifest.test.ts (12 tests) 9ms
453
- ✓ tests/minisign.test.ts (5 tests) 17ms
454
- ✓ tests/client-generator.test.ts (9 tests) 11ms
455
- ✓ tests/local-secrets.test.ts (5 tests) 11ms
456
- ✓ tests/functions-concurrency.test.ts (6 tests) 5ms
457
- ✓ tests/readiness-poll.test.ts (3 tests) 331ms
458
- ✓ ends promptly when it carries a deadline  327ms
459
- ✓ tests/ast-derived-outputs.test.ts (5 tests) 15ms
460
- ✓ tests/self-host-keys.test.ts (7 tests) 15ms
461
- ✓ tests/functions-context-refresh.test.ts (4 tests) 10ms
462
- ✓ tests/api-schemas.test.ts (10 tests) 13ms
463
- ✓ tests/gitignore-secrets.test.ts (5 tests) 93ms
449
+ ✓ tests/binary-cache-cloud-overrides.test.ts (11 tests) 16ms
450
+ ✓ tests/local-server-image-env.test.ts (5 tests) 15ms
451
+ ✓ tests/model-cache-manifest.test.ts (12 tests) 8ms
452
+ ✓ tests/homebrew-formula.test.ts (4 tests) 191ms
453
+ ✓ tests/minisign.test.ts (5 tests) 14ms
454
+ ✓ tests/client-generator.test.ts (9 tests) 10ms
455
+ ✓ tests/local-secrets.test.ts (5 tests) 13ms
456
+ ✓ tests/functions-concurrency.test.ts (6 tests) 4ms
457
+ ✓ tests/readiness-poll.test.ts (3 tests) 325ms
458
+ ✓ ends promptly when it carries a deadline  320ms
459
+ ✓ tests/ast-derived-outputs.test.ts (5 tests) 14ms
460
+ ✓ tests/functions-context-refresh.test.ts (4 tests) 12ms
461
+ ✓ tests/self-host-keys.test.ts (7 tests) 11ms
462
+ ✓ tests/gitignore-secrets.test.ts (5 tests) 102ms
463
+ ✓ tests/api-schemas.test.ts (10 tests) 9ms
464
464
  stdout | tests/storage-provision.test.ts > provisionBuckets > POSTs each bucket to the storage API
465
465
  [supatype] Storage bucket "photos" ready.
466
466
 
467
467
  stdout | tests/storage-provision.test.ts > provisionBuckets > POSTs each bucket to the storage API
468
468
  [supatype] Storage bucket "avatars" ready.
469
469
 
470
- ✓ tests/storage-provision.test.ts (6 tests) 12ms
471
- ✓ tests/strict.test.ts (7 tests) 7ms
472
- ✓ tests/cached-artifact-format.test.ts (7 tests) 10ms
470
+ ✓ tests/storage-provision.test.ts (6 tests) 13ms
471
+ ✓ tests/strict.test.ts (7 tests) 8ms
472
+ ✓ tests/cached-artifact-format.test.ts (7 tests) 13ms
473
+ ✓ tests/db-published-and-addressable.test.ts (4 tests) 6ms
473
474
  ✓ tests/cache-identity-scope.test.ts (33 tests) 12ms
474
- ✓ tests/target-client-refresh.test.ts (3 tests) 15ms
475
- ✓ tests/studio-admin-roles.test.ts (6 tests) 6ms
476
- ✓ tests/proxy-dev-app.test.ts (7 tests) 7ms
475
+ ✓ tests/target-client-refresh.test.ts (3 tests) 11ms
476
+ ✓ tests/studio-admin-roles.test.ts (6 tests) 8ms
477
+ ✓ tests/proxy-dev-app.test.ts (7 tests) 6ms
477
478
  stdout | tests/app-command.test.ts > supatype app add --static > sets app.mode=static and static_dir in supatype.config.ts
478
479
   created package.json
479
480
  created supatype.config.ts
@@ -494,79 +495,79 @@
494
495
  created public/.gitkeep
495
496
  created .gitignore
496
497
 
497
- ✓ tests/service-role-routes.test.ts (4 tests) 1771ms
498
- ✓ reads the declared list  592ms
499
- ✓ is an empty list when a project declares none  610ms
500
- ✓ sends what the project declared, hook entries included  565ms
501
- ✓ tests/cli-help.test.ts (16 tests) 23059ms
502
- ✓ --help lists all top-level commands  1506ms
503
- ✓ --version prints package.json version  1416ms
504
- ✓ self-update --help describes the command  1380ms
505
- ✓ init --help describes the init command  1381ms
506
- ✓ push --help describes the push command and --yes flag  1515ms
507
- ✓ diff --help describes the diff command  1450ms
508
- ✓ pull --help describes scaffold pull command  1361ms
509
- ✓ doctor --help describes drift report command  1414ms
510
- ✓ introspect --help describes database introspection command  1491ms
511
- ✓ adopt --help describes adoption ceremony command  1400ms
512
- ✓ reset --help shows --yes flag  1420ms
513
- ✓ app --help describes the app command with add/remove subcommands  1412ms
514
- ✓ app add --help shows --static and --port options  1438ms
515
- ✓ self-host --help shows compose only (legacy commands hidden)  1571ms
516
- ✓ self-host compose --help shows compose subcommands  1453ms
517
- ✓ unknown command exits non-zero  1444ms
518
- ✓ tests/compose-parsable-defaults.test.ts (2 tests) 7ms
519
- ✓ tests/app-command.test.ts (2 tests) 3088ms
520
- ✓ sets app.mode=static and static_dir in supatype.config.ts  1595ms
521
- ✓ creates the static directory when missing  1491ms
522
- ✓ tests/rest-cache-admin.test.ts (3 tests) 52ms
523
- ✓ tests/init-dependency-versions.test.ts (4 tests) 41ms
498
+ ✓ tests/service-role-routes.test.ts (4 tests) 1658ms
499
+ ✓ reads the declared list  538ms
500
+ ✓ is an empty list when a project declares none  532ms
501
+ ✓ sends what the project declared, hook entries included  584ms
502
+ ✓ tests/cli-help.test.ts (16 tests) 23281ms
503
+ ✓ --help lists all top-level commands  1493ms
504
+ ✓ --version prints package.json version  1517ms
505
+ ✓ self-update --help describes the command  1364ms
506
+ ✓ init --help describes the init command  1405ms
507
+ ✓ push --help describes the push command and --yes flag  1538ms
508
+ ✓ diff --help describes the diff command  1459ms
509
+ ✓ pull --help describes scaffold pull command  1423ms
510
+ ✓ doctor --help describes drift report command  1526ms
511
+ ✓ introspect --help describes database introspection command  1444ms
512
+ ✓ adopt --help describes adoption ceremony command  1508ms
513
+ ✓ reset --help shows --yes flag  1447ms
514
+ ✓ app --help describes the app command with add/remove subcommands  1249ms
515
+ ✓ app add --help shows --static and --port options  1475ms
516
+ ✓ self-host --help shows compose only (legacy commands hidden)  1394ms
517
+ ✓ self-host compose --help shows compose subcommands  1455ms
518
+ ✓ unknown command exits non-zero  1574ms
519
+ ✓ tests/rest-cache-admin.test.ts (3 tests) 42ms
520
+ ✓ tests/init-dependency-versions.test.ts (4 tests) 38ms
521
+ ✓ tests/compose-parsable-defaults.test.ts (2 tests) 8ms
522
+ ✓ tests/app-command.test.ts (2 tests) 3178ms
523
+ ✓ sets app.mode=static and static_dir in supatype.config.ts  1650ms
524
+ ✓ creates the static directory when missing  1526ms
524
525
  ✓ tests/engine-push-output.test.ts (7 tests) 7ms
525
- ✓ tests/type-resolver.test.ts (2 tests) 17ms
526
- ✓ tests/command-chrome-wrap.test.ts (3 tests) 8ms
526
+ ✓ tests/type-resolver.test.ts (2 tests) 16ms
527
+ ✓ tests/command-chrome-wrap.test.ts (3 tests) 7ms
527
528
  ✓ tests/cli-install-method.test.ts (8 tests) 8ms
528
- ✓ tests/port-in-use.test.ts (4 tests) 26ms
529
- ✓ tests/doctor-render.test.ts (3 tests) 8ms
530
- ✓ tests/archive-name-alias.test.ts (4 tests) 5ms
531
- ✓ tests/ensure-binary.test.ts (2 tests) 11ms
532
- ✓ tests/init-project-detect.test.ts (4 tests) 8ms
533
- ✓ tests/tsx-runner.test.ts (7 tests) 3066ms
534
- ✓ evaluates a simple expression and returns stdout  381ms
535
- ✓ evaluates TypeScript syntax (type annotations)  436ms
536
- ✓ can serialize a JSON object to stdout  429ms
537
- ✓ returns non-zero exit code on syntax error  407ms
538
- ✓ returns non-zero exit code on runtime error  427ms
539
- ✓ captures stderr separately from stdout  388ms
540
- ✓ runs a .ts file and returns its stdout  591ms
541
- ✓ tests/doctor-service-role.test.ts (4 tests) 8ms
542
- ✓ tests/required-host-components.test.ts (4 tests) 6ms
543
- ✓ tests/ui-messages.test.ts (5 tests) 7ms
544
- ✓ tests/normalize-admin-config.test.ts (1 test) 6ms
545
- ✓ tests/dev-ports-owner.test.ts (6 tests) 5ms
529
+ ✓ tests/port-in-use.test.ts (4 tests) 29ms
530
+ ✓ tests/doctor-render.test.ts (3 tests) 7ms
531
+ ✓ tests/archive-name-alias.test.ts (4 tests) 7ms
532
+ ✓ tests/init-project-detect.test.ts (4 tests) 12ms
533
+ ✓ tests/ensure-binary.test.ts (2 tests) 9ms
534
+ ✓ tests/tsx-runner.test.ts (7 tests) 2963ms
535
+ ✓ evaluates a simple expression and returns stdout  368ms
536
+ ✓ evaluates TypeScript syntax (type annotations)  445ms
537
+ ✓ can serialize a JSON object to stdout  372ms
538
+ ✓ returns non-zero exit code on syntax error  402ms
539
+ ✓ returns non-zero exit code on runtime error  411ms
540
+ ✓ captures stderr separately from stdout  403ms
541
+ ✓ runs a .ts file and returns its stdout  554ms
542
+ ✓ tests/doctor-service-role.test.ts (4 tests) 7ms
543
+ ✓ tests/required-host-components.test.ts (4 tests) 7ms
544
+ ✓ tests/ui-messages.test.ts (5 tests) 6ms
545
+ ✓ tests/dev-ports-owner.test.ts (6 tests) 8ms
546
+ ✓ tests/normalize-admin-config.test.ts (1 test) 8ms
546
547
  ✓ tests/ui-confirm.test.ts (3 tests) 9ms
547
- ✓ tests/docker-postgres.test.ts (5 tests) 5ms
548
- ✓ tests/binary-download-lock.test.ts (2 tests) 13ms
549
- ✓ tests/dev-session-lock.test.ts (2 tests) 5ms
550
- ✓ tests/config-load-failure.test.ts (2 tests) 3614ms
551
- ✓ is reported, rather than treated as absent  2066ms
552
- ✓ does not stop the CLI working with no config at all  1545ms
553
- ✓ tests/route-manifest.test.ts (1 test) 6ms
548
+ ✓ tests/docker-postgres.test.ts (5 tests) 4ms
549
+ ✓ tests/binary-download-lock.test.ts (2 tests) 7ms
550
+ ✓ tests/dev-session-lock.test.ts (2 tests) 4ms
554
551
  ✓ tests/dev-ports.test.ts (3 tests) 6ms
555
- ✓ tests/realtime-launch.test.ts (1 test) 4ms
556
- ✓ tests/release-pins.test.ts (2 tests) 6ms
552
+ ✓ tests/config-load-failure.test.ts (2 tests) 3819ms
553
+ ✓ is reported, rather than treated as absent  2219ms
554
+ ✓ does not stop the CLI working with no config at all  1597ms
555
+ ✓ tests/route-manifest.test.ts (1 test) 7ms
557
556
  ✓ tests/dev-ready-panel.test.ts (2 tests) 4ms
558
- ✓ tests/ensure-dev-api-config.test.ts (1 test) 4ms
557
+ ✓ tests/realtime-launch.test.ts (1 test) 5ms
558
+ ✓ tests/release-pins.test.ts (2 tests) 4ms
559
+ ✓ tests/ensure-dev-api-config.test.ts (1 test) 5ms
559
560
  ✓ tests/seed-discover.test.ts (2 tests) 19ms
560
561
  ✓ tests/init-package-json.test.ts (1 test) 4ms
561
- ✓ tests/pg-spawn-env.test.ts (2 tests) 7ms
562
+ ✓ tests/pg-spawn-env.test.ts (2 tests) 4ms
562
563
  ✓ tests/resolve-api-url.test.ts (2 tests) 4ms
563
- ✓ tests/migrate-from-v1.test.ts (1 test) 11ms
564
+ ✓ tests/migrate-from-v1.test.ts (1 test) 17ms
564
565
  ✓ tests/cli-package-version.test.ts (1 test) 4ms
565
- ✓ tests/postgres-archive-tag.test.ts (1 test) 2ms
566
+ ✓ tests/postgres-archive-tag.test.ts (1 test) 3ms
566
567
  ✓ tests/stdin-after-ink.test.ts (1 test) 3ms
567
568
 
568
-  Test Files  103 passed (103)
569
-  Tests  1112 passed (1112)
570
-  Start at  16:22:17
571
-  Duration  55.20s (transform 7.96s, setup 0ms, import 58.00s, tests 85.16s, environment 24ms)
569
+  Test Files  104 passed (104)
570
+  Tests  1116 passed (1116)
571
+  Start at  07:44:24
572
+  Duration  54.40s (transform 8.08s, setup 0ms, import 55.68s, tests 85.10s, environment 24ms)
572
573
 
@@ -1,4 +1,4 @@
1
1
 
2
- > @supatype/cli@0.3.3 typecheck /home/runner/work/supatype/supatype/packages/cli
2
+ > @supatype/cli@0.3.4 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.3";
12
+ export const EMBEDDED_CLI_VERSION = "0.3.4";
13
13
  //# sourceMappingURL=cli-version-embedded.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dev-compose.d.ts","sourceRoot":"","sources":["../src/dev-compose.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH,OAAO,E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G;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,qBAAqB,EAC7B,kBAAkB,CAAC,EAAE,MAAM,GAC1B,OAAO,CAOT;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,CAChD,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,qBAAqB,EAC7B,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CAQjB;AAoED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,qBAAqB,EAC7B,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,GACjB,IAAI,CAiFN;AAwlBD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,CA+DtG;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8ChG;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,EAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsRtH;AA+ID;;;;;;;;;;GAUG;AACH,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,oBAAoB,EAC3B,GAAG,EAAE,MAAM,EACX,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,qBAAqB,EAC7B,GAAG,EAAE,OAAO,EACZ,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,OAAO,CAAC,CAwClB"}
@@ -24,7 +24,7 @@ import { cacheSeedingNotes } from "./api-config-cache.js";
24
24
  import { refreshFunctionsContext } from "./functions-context-refresh.js";
25
25
  import { DB_PORT_ENV, syncDatabaseUrlPort } from "./db-port.js";
26
26
  import { degraded } from "./strict.js";
27
- import { COMPOSE_PINNED_IMAGE_ENV_KEYS, composeDockerImageEnv, composeProjectName, exitComposeFailed, runDockerCompose, schemaEngineImageForPush, writeSelfHostCompose, selfHostComposePaths, } from "./self-host-compose.js";
27
+ import { COMPOSE_PINNED_IMAGE_ENV_KEYS, composeDockerImageEnv, composeProjectName, exitComposeFailed, publishesDbToHost, runDockerCompose, schemaEngineImageForPush, writeSelfHostCompose, selfHostComposePaths, } from "./self-host-compose.js";
28
28
  import { hasEngineOverride } from "./binary-cache.js";
29
29
  import { STUDIO_DEV_PORT, startStudioViteDevServer } from "./studio-dev-server.js";
30
30
  import { ensureLocalServerDockerImage, usesLocalServerImage, LOCAL_SERVER_DOCKER_IMAGE, } from "./compose-local-server-image.js";
@@ -94,9 +94,9 @@ export async function ensureDockerDbPublishedForHostEngine(cwd, config, brand) {
94
94
  if (resolveRuntimeProvider(config) !== "docker") {
95
95
  throw new Error("ensureDockerDbPublishedForHostEngine requires provider: docker");
96
96
  }
97
- if (!hasEngineOverride(config)) {
98
- throw new Error("Docker Postgres is not published to the host without overrides.engine. " +
99
- "Set overrides.engine in supatype.local.config.ts or pass --connection.");
97
+ if (!publishesDbToHost(config)) {
98
+ throw new Error("This project uses an external database, so there is no Docker Postgres to publish. " +
99
+ "Point DATABASE_URL at it, or pass --connection.");
100
100
  }
101
101
  const project = composeProjectName(config.project.name);
102
102
  const kongPort = await resolveKongPort(cwd, project);
@@ -824,9 +824,10 @@ export async function pushSchemaDocker(cwd, config) {
824
824
  // No dev db port for an external database: `ensureDevDbPort` allocates a host port for the `db`
825
825
  // container *and persists a matching DATABASE_URL*, which overwrote the operator's own URL, the
826
826
  // one the whole stack and every CLI command reads.
827
- const devDbPort = hasEngineOverride(config) && !usesExternalDatabase(config)
828
- ? await resolveDevDbPort(cwd)
829
- : undefined;
827
+ // Whatever compose publishes, `DATABASE_URL` has to point at. Gating this on
828
+ // `overrides.engine` while the compose file published unconditionally is what left a project
829
+ // with a database on 54329 and a URL still saying 5432.
830
+ const devDbPort = publishesDbToHost(config) ? await resolveDevDbPort(cwd) : undefined;
830
831
  const now = Math.floor(Date.now() / 1000);
831
832
  const jwtBase = { iss: "supatype", iat: now, exp: now + 315_360_000 };
832
833
  const anonKey = signJwt({ ...jwtBase, role: "anon" }, devJwtSecret(cwd));
@@ -865,9 +866,10 @@ export async function runDevCompose(cwd, config, opts) {
865
866
  // No dev db port for an external database: `ensureDevDbPort` allocates a host port for the `db`
866
867
  // container *and persists a matching DATABASE_URL*, which overwrote the operator's own URL, the
867
868
  // one the whole stack and every CLI command reads.
868
- const devDbPort = hasEngineOverride(config) && !usesExternalDatabase(config)
869
- ? await resolveDevDbPort(cwd)
870
- : undefined;
869
+ // Whatever compose publishes, `DATABASE_URL` has to point at. Gating this on
870
+ // `overrides.engine` while the compose file published unconditionally is what left a project
871
+ // with a database on 54329 and a URL still saying 5432.
872
+ const devDbPort = publishesDbToHost(config) ? await resolveDevDbPort(cwd) : undefined;
871
873
  const now = Math.floor(Date.now() / 1000);
872
874
  const jwtBase = { iss: "supatype", iat: now, exp: now + 315_360_000 };
873
875
  const anonKey = signJwt({ ...jwtBase, role: "anon" }, devJwtSecret(cwd));