@supatype/cli 0.3.4 → 0.3.5
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 +172 -163
- package/.turbo/turbo-typecheck.log +1 -1
- package/CHANGELOG.md +36 -0
- package/dist/adopt-walkthrough.d.ts +40 -0
- package/dist/adopt-walkthrough.d.ts.map +1 -0
- package/dist/adopt-walkthrough.js +113 -0
- package/dist/adopt-walkthrough.js.map +1 -0
- package/dist/cli-version-embedded.js +1 -1
- package/dist/commands/admin.d.ts.map +1 -1
- package/dist/commands/admin.js +7 -16
- package/dist/commands/admin.js.map +1 -1
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +5 -6
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/db.js +3 -3
- package/dist/commands/db.js.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +7 -4
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +20 -5
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +5 -7
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.js +1 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +6 -3
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +10 -6
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/seed.js +2 -2
- package/dist/commands/seed.js.map +1 -1
- package/dist/dev-compose.d.ts +42 -0
- package/dist/dev-compose.d.ts.map +1 -1
- package/dist/dev-compose.js +116 -71
- package/dist/dev-compose.js.map +1 -1
- package/dist/dev-db-reset.d.ts +19 -0
- package/dist/dev-db-reset.d.ts.map +1 -0
- package/dist/dev-db-reset.js +75 -0
- package/dist/dev-db-reset.js.map +1 -0
- package/dist/dev-initial-push.d.ts +37 -0
- package/dist/dev-initial-push.d.ts.map +1 -0
- package/dist/dev-initial-push.js +91 -0
- package/dist/dev-initial-push.js.map +1 -0
- package/dist/dev-ports.d.ts.map +1 -1
- package/dist/dev-ports.js +1 -1
- package/dist/dev-ports.js.map +1 -1
- package/dist/diff-output.d.ts +2 -2
- package/dist/diff-output.d.ts.map +1 -1
- package/dist/diff-output.js +1 -1
- package/dist/diff-output.js.map +1 -1
- package/dist/engine-client.d.ts +5 -1
- package/dist/engine-client.d.ts.map +1 -1
- package/dist/engine-client.js +8 -6
- package/dist/engine-client.js.map +1 -1
- package/dist/engine-push-output.d.ts +10 -0
- package/dist/engine-push-output.d.ts.map +1 -1
- package/dist/engine-push-output.js +12 -0
- package/dist/engine-push-output.js.map +1 -1
- package/dist/{seed-connection.d.ts → host-database.d.ts} +20 -10
- package/dist/host-database.d.ts.map +1 -0
- package/dist/{seed-connection.js → host-database.js} +40 -14
- package/dist/host-database.js.map +1 -0
- package/dist/resolve-target.d.ts +2 -2
- package/dist/resolve-target.d.ts.map +1 -1
- package/dist/resolve-target.js +15 -11
- package/dist/resolve-target.js.map +1 -1
- package/dist/retired-no-cache.d.ts +18 -0
- package/dist/retired-no-cache.d.ts.map +1 -0
- package/dist/retired-no-cache.js +21 -0
- package/dist/retired-no-cache.js.map +1 -0
- package/dist/self-host-compose.d.ts +6 -0
- package/dist/self-host-compose.d.ts.map +1 -1
- package/dist/self-host-compose.js +9 -3
- package/dist/self-host-compose.js.map +1 -1
- package/dist/type-extractor.d.ts.map +1 -1
- package/dist/type-extractor.js +12 -6
- package/dist/type-extractor.js.map +1 -1
- package/package.json +2 -2
- package/src/adopt-walkthrough.ts +142 -0
- package/src/cli-version-embedded.ts +1 -1
- package/src/commands/admin.ts +7 -20
- package/src/commands/adopt.ts +5 -6
- package/src/commands/db.ts +3 -3
- package/src/commands/deploy.ts +7 -4
- package/src/commands/dev.ts +22 -6
- package/src/commands/doctor.ts +5 -7
- package/src/commands/init.ts +1 -1
- package/src/commands/migrate.ts +7 -4
- package/src/commands/push.ts +28 -10
- package/src/commands/seed.ts +2 -2
- package/src/dev-compose.ts +166 -77
- package/src/dev-db-reset.ts +95 -0
- package/src/dev-initial-push.ts +134 -0
- package/src/dev-ports.ts +1 -1
- package/src/diff-output.ts +2 -2
- package/src/engine-client.ts +5 -4
- package/src/engine-push-output.ts +19 -0
- package/src/{seed-connection.ts → host-database.ts} +42 -12
- package/src/resolve-target.ts +20 -14
- package/src/retired-no-cache.ts +27 -0
- package/src/self-host-compose.ts +10 -3
- package/src/type-extractor.ts +15 -5
- package/tests/adopt-result.test.ts +27 -0
- package/tests/adopt-walkthrough.test.ts +129 -0
- package/tests/dev-db-reset.test.ts +162 -0
- package/tests/dev-initial-push.test.ts +142 -0
- package/tests/engine-push-output.test.ts +30 -1
- package/tests/host-connection-targets.test.ts +84 -0
- package/tests/{seed-connection.test.ts → host-database.test.ts} +33 -15
- package/tests/retired-no-cache.test.ts +46 -0
- package/tests/type-extractor.test.ts +44 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/seed-connection.d.ts.map +0 -1
- package/dist/seed-connection.js.map +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
> @supatype/cli@0.3.
|
|
2
|
+
> @supatype/cli@0.3.5 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,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
> @supatype/cli@0.3.
|
|
2
|
+
> @supatype/cli@0.3.5 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/model-hooks.test.ts [2m([22m[2m23 tests[22m[2m)[22m[32m
|
|
11
|
-
[32m✓[39m tests/runtime-contract.test.ts [2m([22m[2m64 tests[22m[2m)[22m[32m
|
|
12
|
-
[32m✓[39m tests/augmentation-generator.test.ts [2m([22m[2m24 tests[22m[2m)[22m[32m
|
|
13
|
-
[32m✓[39m tests/seed-ir.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m
|
|
8
|
+
[32m✓[39m tests/access-composition.test.ts [2m([22m[2m32 tests[22m[2m)[22m[33m 310[2mms[22m[39m
|
|
9
|
+
[32m✓[39m tests/type-extractor.test.ts [2m([22m[2m51 tests[22m[2m)[22m[33m 479[2mms[22m[39m
|
|
10
|
+
[32m✓[39m tests/model-hooks.test.ts [2m([22m[2m23 tests[22m[2m)[22m[32m 194[2mms[22m[39m
|
|
11
|
+
[32m✓[39m tests/runtime-contract.test.ts [2m([22m[2m64 tests[22m[2m)[22m[32m 285[2mms[22m[39m
|
|
12
|
+
[32m✓[39m tests/augmentation-generator.test.ts [2m([22m[2m24 tests[22m[2m)[22m[32m 62[2mms[22m[39m
|
|
13
|
+
[32m✓[39m tests/seed-ir.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m 41[2mms[22m[39m
|
|
14
14
|
[90mstdout[2m | tests/init.test.ts[2m > [22m[2mscaffold()[2m > [22m[2mcreates all expected files
|
|
15
15
|
[22m[39m created package.json
|
|
16
16
|
created supatype.config.ts
|
|
@@ -325,31 +325,32 @@
|
|
|
325
325
|
created public/.gitkeep
|
|
326
326
|
created .gitignore
|
|
327
327
|
|
|
328
|
-
[32m✓[39m tests/init.test.ts [2m([22m[2m28 tests[22m[2m)[22m[32m
|
|
329
|
-
[32m✓[39m tests/engine-floor.test.ts [2m([22m[2m28 tests[22m[2m)[22m[32m
|
|
330
|
-
[32m✓[39m tests/external-database-compose.test.ts [2m([22m[2m23 tests[22m[2m)[22m[32m
|
|
331
|
-
[32m✓[39m tests/model-constraints.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m
|
|
332
|
-
[32m✓[39m tests/model-versions.test.ts [2m([22m[2m19 tests[22m[2m)[22m[32m
|
|
333
|
-
[32m✓[39m tests/api-config-cache-seed.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m
|
|
334
|
-
[32m✓[39m tests/model-cache-declaration.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m
|
|
335
|
-
[32m✓[39m tests/field-masking-tier.test.ts [2m([22m[2m16 tests[22m[2m)[22m[32m
|
|
328
|
+
[32m✓[39m tests/init.test.ts [2m([22m[2m28 tests[22m[2m)[22m[32m 158[2mms[22m[39m
|
|
329
|
+
[32m✓[39m tests/engine-floor.test.ts [2m([22m[2m28 tests[22m[2m)[22m[32m 20[2mms[22m[39m
|
|
330
|
+
[32m✓[39m tests/external-database-compose.test.ts [2m([22m[2m23 tests[22m[2m)[22m[32m 28[2mms[22m[39m
|
|
331
|
+
[32m✓[39m tests/model-constraints.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 107[2mms[22m[39m
|
|
332
|
+
[32m✓[39m tests/model-versions.test.ts [2m([22m[2m19 tests[22m[2m)[22m[32m 105[2mms[22m[39m
|
|
333
|
+
[32m✓[39m tests/api-config-cache-seed.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m 59[2mms[22m[39m
|
|
334
|
+
[32m✓[39m tests/model-cache-declaration.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 89[2mms[22m[39m
|
|
335
|
+
[32m✓[39m tests/field-masking-tier.test.ts [2m([22m[2m16 tests[22m[2m)[22m[32m 24[2mms[22m[39m
|
|
336
|
+
[32m✓[39m tests/hooks-generator.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m 8672[2mms[22m[39m
|
|
337
|
+
[33m[2m✓[22m[39m typechecks under strict mode, together with a handler that uses it [33m 3055[2mms[22m[39m
|
|
338
|
+
[33m[2m✓[22m[39m rejects a handler for a table that declares no hook [33m 3234[2mms[22m[39m
|
|
339
|
+
[33m[2m✓[22m[39m typechecks with a validator written the way the docs will show it [33m 2330[2mms[22m[39m
|
|
336
340
|
|
|
337
|
-
[32m✓[39m tests/dev-ui.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m
|
|
341
|
+
[32m✓[39m tests/dev-ui.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m 107[2mms[22m[39m
|
|
338
342
|
|
|
339
343
|
[supatype] Shutting down…
|
|
340
|
-
[32m✓[39m tests/
|
|
341
|
-
|
|
342
|
-
[33m[2m✓[22m[39m
|
|
343
|
-
[33m[2m✓[22m[39m
|
|
344
|
-
|
|
345
|
-
[33m[2m✓[22m[39m loads a
|
|
346
|
-
[33m[2m✓[22m[39m
|
|
347
|
-
[33m[2m✓[22m[39m
|
|
348
|
-
[33m[2m✓[22m[39m
|
|
349
|
-
[33m[2m✓[22m[39m
|
|
350
|
-
[33m[2m✓[22m[39m supports optional output field in config [33m 858[2mms[22m[39m
|
|
351
|
-
[33m[2m✓[22m[39m merges supatype.local.config.ts over base [33m 1337[2mms[22m[39m
|
|
352
|
-
[33m[2m✓[22m[39m loads defineConfig import before @supatype/cli is installed (init scaffold) [33m 1214[2mms[22m[39m
|
|
344
|
+
[32m✓[39m tests/host-database.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m 38[2mms[22m[39m
|
|
345
|
+
[32m✓[39m tests/config.test.ts [2m([22m[2m19 tests[22m[2m)[22m[33m 8275[2mms[22m[39m
|
|
346
|
+
[33m[2m✓[22m[39m loads a valid supatype.config.ts (plain export default, no package imports) [33m 1005[2mms[22m[39m
|
|
347
|
+
[33m[2m✓[22m[39m normalizes shorthand schema string to { path, pg_schema } [33m 1241[2mms[22m[39m
|
|
348
|
+
[33m[2m✓[22m[39m loads a supatype.config.js (plain ESM) [33m 953[2mms[22m[39m
|
|
349
|
+
[33m[2m✓[22m[39m loads config without a versions section (latest by default) [33m 977[2mms[22m[39m
|
|
350
|
+
[33m[2m✓[22m[39m prefers supatype.config.ts over supatype.config.js when both exist [33m 873[2mms[22m[39m
|
|
351
|
+
[33m[2m✓[22m[39m supports optional output field in config [33m 806[2mms[22m[39m
|
|
352
|
+
[33m[2m✓[22m[39m merges supatype.local.config.ts over base [33m 1444[2mms[22m[39m
|
|
353
|
+
[33m[2m✓[22m[39m loads defineConfig import before @supatype/cli is installed (init scaffold) [33m 951[2mms[22m[39m
|
|
353
354
|
[90mstdout[2m | tests/docker-runtime.test.ts[2m > [22m[2mrequireDockerDaemon[2m > [22m[2mexits when the daemon is unavailable
|
|
354
355
|
[22m[39m
|
|
355
356
|
Start the Docker daemon (e.g. sudo systemctl start docker), then try again.
|
|
@@ -358,28 +359,30 @@
|
|
|
358
359
|
|
|
359
360
|
docker: daemon down
|
|
360
361
|
|
|
361
|
-
[32m✓[39m tests/docker-runtime.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m
|
|
362
|
-
[32m✓[39m tests/db-preflight.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m
|
|
363
|
-
[32m✓[39m tests/
|
|
364
|
-
[32m✓[39m tests/
|
|
365
|
-
[32m✓[39m tests/
|
|
366
|
-
|
|
367
|
-
[33m[2m✓[22m[39m
|
|
368
|
-
[33m[2m✓[22m[39m
|
|
369
|
-
|
|
370
|
-
[32m✓[39m tests/functions-deno-types.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m
|
|
371
|
-
[33m[2m✓[22m[39m tsc fails with Cannot find name Deno without ambient types [33m
|
|
372
|
-
[33m[2m✓[22m[39m tsc passes for Deno.env after ensureFunctionsDenoTypes [33m
|
|
373
|
-
[32m✓[39m tests/
|
|
374
|
-
[32m✓[39m tests/field-bounds-matrix.test.ts [2m([22m[2m124 tests[22m[2m)[22m[32m
|
|
362
|
+
[32m✓[39m tests/docker-runtime.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 23[2mms[22m[39m
|
|
363
|
+
[32m✓[39m tests/db-preflight.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
364
|
+
[32m✓[39m tests/dev-db-reset.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 181[2mms[22m[39m
|
|
365
|
+
[32m✓[39m tests/keys-write.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
366
|
+
[32m✓[39m tests/field-bounds.test.ts [2m([22m[2m23 tests[22m[2m)[22m[32m 13[2mms[22m[39m
|
|
367
|
+
[32m✓[39m tests/cache-clean.test.ts [2m([22m[2m8 tests[22m[2m)[22m[33m 1859[2mms[22m[39m
|
|
368
|
+
[33m[2m✓[22m[39m keeps pinned versions and removes the rest [33m 677[2mms[22m[39m
|
|
369
|
+
[33m[2m✓[22m[39m --force removes pinned versions [33m 615[2mms[22m[39m
|
|
370
|
+
[33m[2m✓[22m[39m explicit version removes even when pinned (with warning) [33m 550[2mms[22m[39m
|
|
371
|
+
[32m✓[39m tests/functions-deno-types.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m 2587[2mms[22m[39m
|
|
372
|
+
[33m[2m✓[22m[39m tsc fails with Cannot find name Deno without ambient types [33m 1778[2mms[22m[39m
|
|
373
|
+
[33m[2m✓[22m[39m tsc passes for Deno.env after ensureFunctionsDenoTypes [33m 792[2mms[22m[39m
|
|
374
|
+
[32m✓[39m tests/cache-provider-config.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
375
|
+
[32m✓[39m tests/field-bounds-matrix.test.ts [2m([22m[2m124 tests[22m[2m)[22m[32m 23[2mms[22m[39m
|
|
375
376
|
[32m✓[39m tests/external-database-config.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
376
|
-
[32m✓[39m tests/compose-services.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m
|
|
377
|
-
[32m✓[39m tests/
|
|
378
|
-
[32m✓[39m tests/
|
|
379
|
-
[32m✓[39m tests/
|
|
380
|
-
[32m✓[39m tests/
|
|
381
|
-
[32m✓[39m tests/
|
|
382
|
-
[32m✓[39m tests/
|
|
377
|
+
[32m✓[39m tests/compose-services.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
378
|
+
[32m✓[39m tests/adopt-walkthrough.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
379
|
+
[32m✓[39m tests/dev-initial-push.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 23[2mms[22m[39m
|
|
380
|
+
[32m✓[39m tests/field-validators.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 60[2mms[22m[39m
|
|
381
|
+
[32m✓[39m tests/native-keyspace.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 36[2mms[22m[39m
|
|
382
|
+
[32m✓[39m tests/db-port.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
383
|
+
[32m✓[39m tests/command-chrome-coverage.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
384
|
+
[32m✓[39m tests/hook-upload.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
385
|
+
[32m✓[39m tests/env-file.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
383
386
|
[90mstdout[2m | tests/link.test.ts[2m > [22m[2mlink model[2m > [22m[2mmigrates cloud.json into link.json
|
|
384
387
|
[22m[39m created package.json
|
|
385
388
|
created supatype.config.ts
|
|
@@ -393,10 +396,10 @@
|
|
|
393
396
|
[90mstderr[2m | tests/link.test.ts[2m > [22m[2mlink model[2m > [22m[2mmigrates cloud.json into link.json
|
|
394
397
|
[22m[39m[supatype] Migrated .supatype/cloud.json → .supatype/link.json (legacy files kept; remove manually when ready).
|
|
395
398
|
|
|
396
|
-
[32m✓[39m tests/link.test.ts [2m([22m[2m4 tests[22m[2m)[22m[33m
|
|
397
|
-
[33m[2m✓[22m[39m resolveTarget returns cloud mode with /api/v1 prefix [33m
|
|
398
|
-
[33m[2m✓[22m[39m resolveTarget returns self-host mode with /platform/v1 prefix [33m
|
|
399
|
-
[33m[2m✓[22m[39m targetSchemaRollback posts to /platform/v1 when linked [33m
|
|
399
|
+
[32m✓[39m tests/link.test.ts [2m([22m[2m4 tests[22m[2m)[22m[33m 2823[2mms[22m[39m
|
|
400
|
+
[33m[2m✓[22m[39m resolveTarget returns cloud mode with /api/v1 prefix [33m 922[2mms[22m[39m
|
|
401
|
+
[33m[2m✓[22m[39m resolveTarget returns self-host mode with /platform/v1 prefix [33m 938[2mms[22m[39m
|
|
402
|
+
[33m[2m✓[22m[39m targetSchemaRollback posts to /platform/v1 when linked [33m 951[2mms[22m[39m
|
|
400
403
|
[90mstdout[2m | tests/admin-ensure.test.ts[2m > [22m[2minit admin seed in .env[2m > [22m[2mwrites SUPATYPE_ADMIN_* when scaffold options include credentials
|
|
401
404
|
[22m[39m created package.json
|
|
402
405
|
created supatype.config.ts
|
|
@@ -407,8 +410,8 @@
|
|
|
407
410
|
created public/.gitkeep
|
|
408
411
|
created .gitignore
|
|
409
412
|
|
|
410
|
-
[32m✓[39m tests/admin-ensure.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m
|
|
411
|
-
[32m✓[39m tests/service-role-check.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m
|
|
413
|
+
[32m✓[39m tests/admin-ensure.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 160[2mms[22m[39m
|
|
414
|
+
[32m✓[39m tests/service-role-check.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
412
415
|
[90mstdout[2m | tests/admin-studio-membership.test.ts[2m > [22m[2mfirst admin user creation[2m > [22m[2mdoes not write a role into app_metadata
|
|
413
416
|
[22m[39m[supatype] Admin user "admin@example.com" created (role: admin).
|
|
414
417
|
[supatype] Log in at /admin after starting the dev server.
|
|
@@ -425,56 +428,79 @@
|
|
|
425
428
|
[22m[39m[supatype] Admin user "admin@example.com" created (role: admin).
|
|
426
429
|
[supatype] Log in at /admin after starting the dev server.
|
|
427
430
|
|
|
428
|
-
[32m✓[39m tests/admin-studio-membership.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m
|
|
429
|
-
[32m✓[39m tests/pull-utils.test.ts [2m([22m[2m49 tests[22m[2m)[22m[32m
|
|
430
|
-
[32m✓[39m tests/
|
|
431
|
-
[33m[2m✓[22m[39m
|
|
432
|
-
[33m[2m✓[22m[39m
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
[33m[2m✓[22m[39m
|
|
436
|
-
[33m[2m✓[22m[39m
|
|
437
|
-
[33m[2m✓[22m[39m
|
|
438
|
-
[33m[2m✓[22m[39m
|
|
439
|
-
[33m[2m✓[22m[39m
|
|
440
|
-
[33m[2m✓[22m[39m
|
|
441
|
-
[33m[2m✓[22m[39m --exp-years
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
[33m[2m✓[22m[39m
|
|
445
|
-
[33m[2m✓[22m[39m
|
|
431
|
+
[32m✓[39m tests/admin-studio-membership.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m 476[2mms[22m[39m
|
|
432
|
+
[32m✓[39m tests/pull-utils.test.ts [2m([22m[2m49 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
433
|
+
[32m✓[39m tests/keys.test.ts [2m([22m[2m11 tests[22m[2m)[22m[33m 14812[2mms[22m[39m
|
|
434
|
+
[33m[2m✓[22m[39m exits 0 with --secret [33m 1257[2mms[22m[39m
|
|
435
|
+
[33m[2m✓[22m[39m outputs ANON_KEY= line [33m 1279[2mms[22m[39m
|
|
436
|
+
[33m[2m✓[22m[39m outputs SERVICE_ROLE_KEY= line [33m 1245[2mms[22m[39m
|
|
437
|
+
[33m[2m✓[22m[39m ANON_KEY is a valid three-part JWT [33m 1293[2mms[22m[39m
|
|
438
|
+
[33m[2m✓[22m[39m SERVICE_ROLE_KEY payload has role: service_role [33m 1120[2mms[22m[39m
|
|
439
|
+
[33m[2m✓[22m[39m JWT has exp in the future [33m 1137[2mms[22m[39m
|
|
440
|
+
[33m[2m✓[22m[39m --exp-years changes the expiry window [33m 2593[2mms[22m[39m
|
|
441
|
+
[33m[2m✓[22m[39m reads JWT_SECRET from environment variable [33m 1218[2mms[22m[39m
|
|
442
|
+
[33m[2m✓[22m[39m reads JWT_SECRET from .env file [33m 1282[2mms[22m[39m
|
|
443
|
+
[33m[2m✓[22m[39m exits non-zero when no secret is available [33m 1163[2mms[22m[39m
|
|
444
|
+
[33m[2m✓[22m[39m keys --help shows --secret and --exp-years options [33m 1220[2mms[22m[39m
|
|
445
|
+
[32m✓[39m tests/preview-config-check.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
446
|
+
[32m✓[39m tests/schema-sources.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m 1129[2mms[22m[39m
|
|
447
|
+
[33m[2m✓[22m[39m buildSchemaSourcesPayload includes manifest metadata [33m 581[2mms[22m[39m
|
|
448
|
+
[33m[2m✓[22m[39m restore overwrites modified local files [33m 512[2mms[22m[39m
|
|
446
449
|
[90mstderr[2m | tests/binary-cache-cloud-overrides.test.ts[2m > [22m[2misLinkedToCloudProject[2m > [22m[2mis true when .supatype/cloud.json has projectSlug
|
|
447
450
|
[22m[39m[supatype] Migrated .supatype/cloud.json → .supatype/link.json (legacy files kept; remove manually when ready).
|
|
448
451
|
|
|
449
452
|
[32m✓[39m tests/binary-cache-cloud-overrides.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 16[2mms[22m[39m
|
|
453
|
+
[32m✓[39m tests/homebrew-formula.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 195[2mms[22m[39m
|
|
454
|
+
[32m✓[39m tests/model-cache-manifest.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
450
455
|
[32m✓[39m tests/local-server-image-env.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
451
|
-
[32m✓[39m tests/
|
|
452
|
-
[32m✓[39m tests/
|
|
453
|
-
[32m✓[39m tests/
|
|
454
|
-
[32m✓[39m tests/
|
|
455
|
-
[32m✓[39m tests/
|
|
456
|
-
|
|
457
|
-
[32m✓[39m tests/
|
|
458
|
-
|
|
459
|
-
[32m✓[39m tests/
|
|
460
|
-
[32m✓[39m tests/
|
|
461
|
-
[32m✓[39m tests/
|
|
462
|
-
[32m✓[39m tests/gitignore-secrets.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
463
|
-
[32m✓[39m tests/api-schemas.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m
|
|
456
|
+
[32m✓[39m tests/minisign.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
457
|
+
[32m✓[39m tests/local-secrets.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
458
|
+
[32m✓[39m tests/client-generator.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
459
|
+
[32m✓[39m tests/functions-concurrency.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
460
|
+
[32m✓[39m tests/readiness-poll.test.ts [2m([22m[2m3 tests[22m[2m)[22m[33m 320[2mms[22m[39m
|
|
461
|
+
[33m[2m✓[22m[39m ends promptly when it carries a deadline [33m 317[2mms[22m[39m
|
|
462
|
+
[32m✓[39m tests/ast-derived-outputs.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
463
|
+
[32m✓[39m tests/self-host-keys.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
464
|
+
[32m✓[39m tests/functions-context-refresh.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
465
|
+
[32m✓[39m tests/engine-push-output.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
466
|
+
[32m✓[39m tests/db-published-and-addressable.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
467
|
+
[32m✓[39m tests/gitignore-secrets.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 42[2mms[22m[39m
|
|
468
|
+
[32m✓[39m tests/api-schemas.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
464
469
|
[90mstdout[2m | tests/storage-provision.test.ts[2m > [22m[2mprovisionBuckets[2m > [22m[2mPOSTs each bucket to the storage API
|
|
465
470
|
[22m[39m[supatype] Storage bucket "photos" ready.
|
|
466
471
|
|
|
467
472
|
[90mstdout[2m | tests/storage-provision.test.ts[2m > [22m[2mprovisionBuckets[2m > [22m[2mPOSTs each bucket to the storage API
|
|
468
473
|
[22m[39m[supatype] Storage bucket "avatars" ready.
|
|
469
474
|
|
|
470
|
-
[32m✓[39m tests/storage-provision.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
475
|
+
[32m✓[39m tests/storage-provision.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
471
476
|
[32m✓[39m tests/strict.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
472
|
-
[32m✓[39m tests/cached-artifact-format.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
473
|
-
[32m✓[39m tests/
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
477
|
+
[32m✓[39m tests/cached-artifact-format.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
478
|
+
[32m✓[39m tests/host-connection-targets.test.ts [2m([22m[2m4 tests[22m[2m)[22m[33m 2180[2mms[22m[39m
|
|
479
|
+
[33m[2m✓[22m[39m connects direct mode to the host-published database, not the container (#85) [33m 580[2mms[22m[39m
|
|
480
|
+
[33m[2m✓[22m[39m does the same for the local target used when there is no service key [33m 511[2mms[22m[39m
|
|
481
|
+
[33m[2m✓[22m[39m reads the project's .env for doctor and pull, not only the process environment [33m 547[2mms[22m[39m
|
|
482
|
+
[33m[2m✓[22m[39m still takes --connection over everything [33m 541[2mms[22m[39m
|
|
483
|
+
[32m✓[39m tests/cache-identity-scope.test.ts [2m([22m[2m33 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
484
|
+
[32m✓[39m tests/proxy-dev-app.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
485
|
+
[32m✓[39m tests/target-client-refresh.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
486
|
+
[32m✓[39m tests/studio-admin-roles.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
487
|
+
[32m✓[39m tests/cli-help.test.ts [2m([22m[2m16 tests[22m[2m)[22m[33m 19955[2mms[22m[39m
|
|
488
|
+
[33m[2m✓[22m[39m --help lists all top-level commands [33m 1245[2mms[22m[39m
|
|
489
|
+
[33m[2m✓[22m[39m --version prints package.json version [33m 1115[2mms[22m[39m
|
|
490
|
+
[33m[2m✓[22m[39m self-update --help describes the command [33m 1249[2mms[22m[39m
|
|
491
|
+
[33m[2m✓[22m[39m init --help describes the init command [33m 1260[2mms[22m[39m
|
|
492
|
+
[33m[2m✓[22m[39m push --help describes the push command and --yes flag [33m 1280[2mms[22m[39m
|
|
493
|
+
[33m[2m✓[22m[39m diff --help describes the diff command [33m 1323[2mms[22m[39m
|
|
494
|
+
[33m[2m✓[22m[39m pull --help describes scaffold pull command [33m 1312[2mms[22m[39m
|
|
495
|
+
[33m[2m✓[22m[39m doctor --help describes drift report command [33m 1235[2mms[22m[39m
|
|
496
|
+
[33m[2m✓[22m[39m introspect --help describes database introspection command [33m 1249[2mms[22m[39m
|
|
497
|
+
[33m[2m✓[22m[39m adopt --help describes adoption ceremony command [33m 1167[2mms[22m[39m
|
|
498
|
+
[33m[2m✓[22m[39m reset --help shows --yes flag [33m 1251[2mms[22m[39m
|
|
499
|
+
[33m[2m✓[22m[39m app --help describes the app command with add/remove subcommands [33m 1190[2mms[22m[39m
|
|
500
|
+
[33m[2m✓[22m[39m app add --help shows --static and --port options [33m 1160[2mms[22m[39m
|
|
501
|
+
[33m[2m✓[22m[39m self-host --help shows compose only (legacy commands hidden) [33m 1346[2mms[22m[39m
|
|
502
|
+
[33m[2m✓[22m[39m self-host compose --help shows compose subcommands [33m 1314[2mms[22m[39m
|
|
503
|
+
[33m[2m✓[22m[39m unknown command exits non-zero [33m 1249[2mms[22m[39m
|
|
478
504
|
[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
|
|
479
505
|
[22m[39m created package.json
|
|
480
506
|
created supatype.config.ts
|
|
@@ -485,6 +511,13 @@
|
|
|
485
511
|
created public/.gitkeep
|
|
486
512
|
created .gitignore
|
|
487
513
|
|
|
514
|
+
[32m✓[39m tests/compose-parsable-defaults.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
515
|
+
[32m✓[39m tests/rest-cache-admin.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 38[2mms[22m[39m
|
|
516
|
+
[32m✓[39m tests/init-dependency-versions.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 37[2mms[22m[39m
|
|
517
|
+
[32m✓[39m tests/service-role-routes.test.ts [2m([22m[2m4 tests[22m[2m)[22m[33m 1625[2mms[22m[39m
|
|
518
|
+
[33m[2m✓[22m[39m reads the declared list [33m 552[2mms[22m[39m
|
|
519
|
+
[33m[2m✓[22m[39m is an empty list when a project declares none [33m 575[2mms[22m[39m
|
|
520
|
+
[33m[2m✓[22m[39m sends what the project declared, hook entries included [33m 492[2mms[22m[39m
|
|
488
521
|
[90mstdout[2m | tests/app-command.test.ts[2m > [22m[2msupatype app add --static[2m > [22m[2mcreates the static directory when missing
|
|
489
522
|
[22m[39m created package.json
|
|
490
523
|
created supatype.config.ts
|
|
@@ -495,79 +528,55 @@
|
|
|
495
528
|
created public/.gitkeep
|
|
496
529
|
created .gitignore
|
|
497
530
|
|
|
498
|
-
[32m✓[39m tests/
|
|
499
|
-
|
|
500
|
-
[33m[2m✓[22m[39m
|
|
501
|
-
[33m[2m✓[22m[39m
|
|
502
|
-
[32m✓[39m tests/
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
[33m[2m✓[22m[39m init --help describes the init command [33m 1405[2mms[22m[39m
|
|
507
|
-
[33m[2m✓[22m[39m push --help describes the push command and --yes flag [33m 1538[2mms[22m[39m
|
|
508
|
-
[33m[2m✓[22m[39m diff --help describes the diff command [33m 1459[2mms[22m[39m
|
|
509
|
-
[33m[2m✓[22m[39m pull --help describes scaffold pull command [33m 1423[2mms[22m[39m
|
|
510
|
-
[33m[2m✓[22m[39m doctor --help describes drift report command [33m 1526[2mms[22m[39m
|
|
511
|
-
[33m[2m✓[22m[39m introspect --help describes database introspection command [33m 1444[2mms[22m[39m
|
|
512
|
-
[33m[2m✓[22m[39m adopt --help describes adoption ceremony command [33m 1508[2mms[22m[39m
|
|
513
|
-
[33m[2m✓[22m[39m reset --help shows --yes flag [33m 1447[2mms[22m[39m
|
|
514
|
-
[33m[2m✓[22m[39m app --help describes the app command with add/remove subcommands [33m 1249[2mms[22m[39m
|
|
515
|
-
[33m[2m✓[22m[39m app add --help shows --static and --port options [33m 1475[2mms[22m[39m
|
|
516
|
-
[33m[2m✓[22m[39m self-host --help shows compose only (legacy commands hidden) [33m 1394[2mms[22m[39m
|
|
517
|
-
[33m[2m✓[22m[39m self-host compose --help shows compose subcommands [33m 1455[2mms[22m[39m
|
|
518
|
-
[33m[2m✓[22m[39m unknown command exits non-zero [33m 1574[2mms[22m[39m
|
|
519
|
-
[32m✓[39m tests/rest-cache-admin.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 42[2mms[22m[39m
|
|
520
|
-
[32m✓[39m tests/init-dependency-versions.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 38[2mms[22m[39m
|
|
521
|
-
[32m✓[39m tests/compose-parsable-defaults.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
522
|
-
[32m✓[39m tests/app-command.test.ts [2m([22m[2m2 tests[22m[2m)[22m[33m 3178[2mms[22m[39m
|
|
523
|
-
[33m[2m✓[22m[39m sets app.mode=static and static_dir in supatype.config.ts [33m 1650[2mms[22m[39m
|
|
524
|
-
[33m[2m✓[22m[39m creates the static directory when missing [33m 1526[2mms[22m[39m
|
|
525
|
-
[32m✓[39m tests/engine-push-output.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
526
|
-
[32m✓[39m tests/type-resolver.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 16[2mms[22m[39m
|
|
527
|
-
[32m✓[39m tests/command-chrome-wrap.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
528
|
-
[32m✓[39m tests/cli-install-method.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
529
|
-
[32m✓[39m tests/port-in-use.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 29[2mms[22m[39m
|
|
530
|
-
[32m✓[39m tests/doctor-render.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
531
|
-
[32m✓[39m tests/archive-name-alias.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
532
|
-
[32m✓[39m tests/init-project-detect.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
531
|
+
[32m✓[39m tests/type-resolver.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 13[2mms[22m[39m
|
|
532
|
+
[32m✓[39m tests/app-command.test.ts [2m([22m[2m2 tests[22m[2m)[22m[33m 2820[2mms[22m[39m
|
|
533
|
+
[33m[2m✓[22m[39m sets app.mode=static and static_dir in supatype.config.ts [33m 1431[2mms[22m[39m
|
|
534
|
+
[33m[2m✓[22m[39m creates the static directory when missing [33m 1387[2mms[22m[39m
|
|
535
|
+
[32m✓[39m tests/command-chrome-wrap.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
536
|
+
[32m✓[39m tests/cli-install-method.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
537
|
+
[32m✓[39m tests/port-in-use.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 23[2mms[22m[39m
|
|
538
|
+
[32m✓[39m tests/archive-name-alias.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
533
539
|
[32m✓[39m tests/ensure-binary.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
534
|
-
[32m✓[39m tests/
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
[33m[2m✓[22m[39m
|
|
538
|
-
[33m[2m✓[22m[39m
|
|
539
|
-
[33m[2m✓[22m[39m returns non-zero exit code on
|
|
540
|
-
[33m[2m✓[22m[39m
|
|
541
|
-
[33m[2m✓[22m[39m
|
|
542
|
-
|
|
543
|
-
[32m✓[39m tests/
|
|
540
|
+
[32m✓[39m tests/doctor-render.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
541
|
+
[32m✓[39m tests/init-project-detect.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
542
|
+
[32m✓[39m tests/tsx-runner.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m 2668[2mms[22m[39m
|
|
543
|
+
[33m[2m✓[22m[39m evaluates TypeScript syntax (type annotations) [33m 365[2mms[22m[39m
|
|
544
|
+
[33m[2m✓[22m[39m can serialize a JSON object to stdout [33m 391[2mms[22m[39m
|
|
545
|
+
[33m[2m✓[22m[39m returns non-zero exit code on syntax error [33m 401[2mms[22m[39m
|
|
546
|
+
[33m[2m✓[22m[39m returns non-zero exit code on runtime error [33m 329[2mms[22m[39m
|
|
547
|
+
[33m[2m✓[22m[39m captures stderr separately from stdout [33m 365[2mms[22m[39m
|
|
548
|
+
[33m[2m✓[22m[39m runs a .ts file and returns its stdout [33m 515[2mms[22m[39m
|
|
549
|
+
[32m✓[39m tests/doctor-service-role.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
550
|
+
[32m✓[39m tests/dev-ports-owner.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
551
|
+
[32m✓[39m tests/required-host-components.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
544
552
|
[32m✓[39m tests/ui-messages.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
545
|
-
[32m✓[39m tests/
|
|
546
|
-
[32m✓[39m tests/normalize-admin-config.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
547
|
-
[32m✓[39m tests/ui-confirm.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
553
|
+
[32m✓[39m tests/retired-no-cache.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
554
|
+
[32m✓[39m tests/normalize-admin-config.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
555
|
+
[32m✓[39m tests/ui-confirm.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
548
556
|
[32m✓[39m tests/docker-postgres.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
549
|
-
[32m✓[39m tests/binary-download-lock.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
550
|
-
[32m✓[39m tests/dev-session-lock.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
557
|
+
[32m✓[39m tests/binary-download-lock.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
558
|
+
[32m✓[39m tests/dev-session-lock.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
551
559
|
[32m✓[39m tests/dev-ports.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
552
|
-
[32m✓[39m tests/
|
|
553
|
-
|
|
554
|
-
[33m[2m✓[22m[39m
|
|
555
|
-
|
|
556
|
-
[32m✓[39m tests/dev-ready-panel.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
557
|
-
[32m✓[39m tests/realtime-launch.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
558
|
-
[32m✓[39m tests/release-pins.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
559
|
-
[32m✓[39m tests/
|
|
560
|
-
[32m✓[39m tests/
|
|
561
|
-
[32m✓[39m tests/
|
|
562
|
-
[32m✓[39m tests/
|
|
563
|
-
[32m✓[39m tests/
|
|
564
|
-
[32m✓[39m tests/
|
|
565
|
-
[32m✓[39m tests/
|
|
566
|
-
[32m✓[39m tests/
|
|
560
|
+
[32m✓[39m tests/route-manifest.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
561
|
+
[32m✓[39m tests/config-load-failure.test.ts [2m([22m[2m2 tests[22m[2m)[22m[33m 3319[2mms[22m[39m
|
|
562
|
+
[33m[2m✓[22m[39m is reported, rather than treated as absent [33m 1957[2mms[22m[39m
|
|
563
|
+
[33m[2m✓[22m[39m does not stop the CLI working with no config at all [33m 1359[2mms[22m[39m
|
|
564
|
+
[32m✓[39m tests/dev-ready-panel.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
565
|
+
[32m✓[39m tests/realtime-launch.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
566
|
+
[32m✓[39m tests/release-pins.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
567
|
+
[32m✓[39m tests/seed-discover.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
568
|
+
[32m✓[39m tests/ensure-dev-api-config.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
569
|
+
[32m✓[39m tests/adopt-result.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
570
|
+
[32m✓[39m tests/init-package-json.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
571
|
+
[32m✓[39m tests/pg-spawn-env.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
572
|
+
[32m✓[39m tests/resolve-api-url.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
573
|
+
[32m✓[39m tests/migrate-from-v1.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
574
|
+
[32m✓[39m tests/cli-package-version.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
575
|
+
[32m✓[39m tests/postgres-archive-tag.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
567
576
|
[32m✓[39m tests/stdin-after-ink.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
568
577
|
|
|
569
|
-
[2m Test Files [22m [1m[
|
|
570
|
-
[2m Tests [22m [1m[
|
|
571
|
-
[2m Start at [22m
|
|
572
|
-
[2m Duration [22m
|
|
578
|
+
[2m Test Files [22m [1m[32m110 passed[39m[22m[90m (110)[39m
|
|
579
|
+
[2m Tests [22m [1m[32m1160 passed[39m[22m[90m (1160)[39m
|
|
580
|
+
[2m Start at [22m 09:56:07
|
|
581
|
+
[2m Duration [22m 52.88s[2m (transform 9.45s, setup 0ms, import 61.11s, tests 77.01s, environment 17ms)[22m
|
|
573
582
|
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
### Features
|
|
6
6
|
|
|
7
|
+
* **push:** when the engine refuses tables Supatype does not manage, `supatype push` and
|
|
8
|
+
`supatype dev` say which tables and that their declared access rules are not in force, and in a
|
|
9
|
+
terminal offer to adopt them there and then: the SQL adoption would run is shown, nothing is
|
|
10
|
+
applied without a second yes, and the push runs again afterwards. Without a terminal, or with
|
|
11
|
+
`--yes`, nothing is adopted and the command to run is printed. On a docker project adoption runs
|
|
12
|
+
through the compose schema-engine, so it reaches the stack's database. The refusal is read from
|
|
13
|
+
the engine's JSON reason, with its wording only as the fallback for an older engine.
|
|
14
|
+
* **adopt, doctor:** `--no-cache` is hidden and does nothing but say it is no longer needed: both
|
|
15
|
+
read the database live. It never worked from the CLI (Commander stores it as `cache: false` and
|
|
16
|
+
the commands read `noCache`), and `doctor` would have passed it to an engine subcommand that does
|
|
17
|
+
not accept it.
|
|
18
|
+
|
|
7
19
|
* **seed:** a seed file now exports a default function and describes writes rather than
|
|
8
20
|
performing them. The calls are collected into a document that the engine validates against
|
|
9
21
|
the schema, orders by foreign key, batches, and applies in one transaction. There is no
|
|
@@ -41,6 +53,9 @@
|
|
|
41
53
|
process, so the previous rule left a fresh project with a database nothing on the host could
|
|
42
54
|
reach and a remedy nobody had reason to know about.
|
|
43
55
|
* **schema:** `After<>` and `Before<>` are parsed from the schema into the AST.
|
|
56
|
+
* **dev:** `--reset-db` starts from an empty local database. It removes the Postgres data volume
|
|
57
|
+
and nothing else, after a prompt that names the volume. Without a TTY it is refused unless
|
|
58
|
+
`--yes` is passed as well. Nothing in `dev` removes data without it.
|
|
44
59
|
|
|
45
60
|
* **generate:** a rich text column is typed as the document it holds on the way out and as
|
|
46
61
|
`RichText | string` on the way in. The engine emits a trigger that normalises a plain string
|
|
@@ -50,6 +65,27 @@
|
|
|
50
65
|
|
|
51
66
|
### Bug Fixes
|
|
52
67
|
|
|
68
|
+
* **connection:** every command that runs the engine on the host finds the database the same way,
|
|
69
|
+
in seed's order: `--connection`, `database.external.url`, `connection` in the config,
|
|
70
|
+
`DATABASE_URL` in the environment, `DATABASE_URL` in the project's `.env`, then the project's own
|
|
71
|
+
database. `supatype adopt`, `introspect` and `migrate` on a docker project took the URL in
|
|
72
|
+
`.supatype/environment.json`, which describes the `db` container, and failed looking up the host
|
|
73
|
+
`db` (supatype#85). `doctor`, `pull` and `admin` read only the process environment, never `.env`.
|
|
74
|
+
The derived default for a docker project is now the published compose database rather than the
|
|
75
|
+
native layout (`postgres:postgres@127.0.0.1:5432/<name>`), which a docker stack does not have.
|
|
76
|
+
* **storage:** a bucket's `update` rule reaches the engine. Every key other than `read`, `create`
|
|
77
|
+
and `delete` was skipped without a word, so an overwrite rule the author wrote was never
|
|
78
|
+
enforced. Any other key in a bucket's `access` is now an error that names it.
|
|
79
|
+
* **push:** every push prints the engine's warnings, as `supatype diff` does, without repeating
|
|
80
|
+
the ones the diff before it showed. None did, so a push said nothing about a bucket operation it
|
|
81
|
+
had just made unreachable, and the warnings found after applying were shown nowhere.
|
|
82
|
+
* **dev:** a failed first schema push no longer wipes the local database. Every failure was
|
|
83
|
+
answered with `docker compose down -v`, which removes every volume in the stack, Postgres and
|
|
84
|
+
storage alike, so a push the engine refused on purpose (a table Supatype does not manage, a
|
|
85
|
+
destructive change) cost the developer their rows and uploaded files, and the second attempt
|
|
86
|
+
then succeeded against an empty database. Only a database that is not reachable yet is retried
|
|
87
|
+
now, and the retry only starts Postgres again. A refusal stops `dev` with the engine's message
|
|
88
|
+
and exits non-zero; for unmanaged tables it names `supatype adopt` as the remedy.
|
|
53
89
|
* **generate:** the client augmentation follows the order the schema declares its models and
|
|
54
90
|
columns in. It sorted alphabetically, which threw away an order the author chose and the AST
|
|
55
91
|
preserved, and made it disagree with `types/database.ts` about the same table.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** The `reason` the engine gives this refusal in its JSON output and its HTTP response. */
|
|
2
|
+
export declare const UNMANAGED_MODEL_TABLES = "unmanaged_model_tables";
|
|
3
|
+
/**
|
|
4
|
+
* The tables an unmanaged-tables refusal names, or null when the output is not that refusal.
|
|
5
|
+
*
|
|
6
|
+
* Read from the engine's JSON line first. The wording is only a fallback for an engine image that
|
|
7
|
+
* predates it, which is what a pinned version can still be.
|
|
8
|
+
*/
|
|
9
|
+
export declare function unmanagedTables(output: string): string[] | null;
|
|
10
|
+
/** Everything a failed push printed: the engine's stdout carries the JSON refusal. */
|
|
11
|
+
export declare function engineOutputOf(err: unknown): string;
|
|
12
|
+
/** How to adopt, wherever the database is. */
|
|
13
|
+
export interface AdoptionSteps {
|
|
14
|
+
/** The stamp statements adoption would run, without running them. */
|
|
15
|
+
preview: () => Promise<string[]>;
|
|
16
|
+
/** Run them, returning how many objects were stamped. */
|
|
17
|
+
apply: () => Promise<number>;
|
|
18
|
+
}
|
|
19
|
+
export interface AdoptionPolicy {
|
|
20
|
+
/** `--yes`: the caller agreed to a push without being asked, which is not agreeing to adopt. */
|
|
21
|
+
yes: boolean;
|
|
22
|
+
/** The command that would retry the push, named in what this prints. */
|
|
23
|
+
retry: string;
|
|
24
|
+
}
|
|
25
|
+
export type AdoptionOutcome = "adopted" | "declined";
|
|
26
|
+
/** Say what the refusal means, and offer to adopt in a terminal. */
|
|
27
|
+
export declare function offerAdoption(tables: readonly string[], steps: AdoptionSteps, policy: AdoptionPolicy): Promise<AdoptionOutcome>;
|
|
28
|
+
/**
|
|
29
|
+
* Push, and when the engine refuses unmanaged tables, offer to adopt them and push once more.
|
|
30
|
+
*
|
|
31
|
+
* Any other failure, a declined offer, or a second refusal is thrown as it came, so the caller's
|
|
32
|
+
* exit code still says the push did not happen.
|
|
33
|
+
*/
|
|
34
|
+
export declare function pushOfferingAdoption<T>(push: () => Promise<T>, steps: AdoptionSteps, policy: AdoptionPolicy): Promise<T>;
|
|
35
|
+
/** Adoption through a deploy target, for the push walkthrough on a direct or local target. */
|
|
36
|
+
export declare function targetAdoptionSteps(adopt: (yes: boolean) => Promise<{
|
|
37
|
+
stampStatements?: string[];
|
|
38
|
+
stamped?: number;
|
|
39
|
+
}>): AdoptionSteps;
|
|
40
|
+
//# sourceMappingURL=adopt-walkthrough.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adopt-walkthrough.d.ts","sourceRoot":"","sources":["../src/adopt-walkthrough.ts"],"names":[],"mappings":"AAkBA,2FAA2F;AAC3F,eAAO,MAAM,sBAAsB,2BAA2B,CAAA;AAK9D;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAe/D;AAED,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAGnD;AAED,8CAA8C;AAC9C,MAAM,WAAW,aAAa;IAC5B,qEAAqE;IACrE,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAChC,yDAAyD;IACzD,KAAK,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;CAC7B;AAED,MAAM,WAAW,cAAc;IAC7B,gGAAgG;IAChG,GAAG,EAAE,OAAO,CAAA;IACZ,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,CAAA;AAEpD,oEAAoE;AACpE,wBAAsB,aAAa,CACjC,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,eAAe,CAAC,CAiB1B;AAoBD;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACtB,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,CAAC,CAAC,CASZ;AAED,8FAA8F;AAC9F,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC;IAAE,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GACjF,aAAa,CAKf"}
|