@supatype/cli 0.3.2 → 0.3.3
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 +163 -161
- package/.turbo/turbo-typecheck.log +1 -1
- package/CHANGELOG.md +77 -0
- package/dist/augmentation-generator.d.ts.map +1 -1
- package/dist/augmentation-generator.js +70 -15
- package/dist/augmentation-generator.js.map +1 -1
- package/dist/cli-version-embedded.js +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +3 -3
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +29 -19
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/seed.d.ts +27 -1
- package/dist/commands/seed.d.ts.map +1 -1
- package/dist/commands/seed.js +206 -33
- package/dist/commands/seed.js.map +1 -1
- package/dist/engine-client.d.ts +1 -0
- package/dist/engine-client.d.ts.map +1 -1
- package/dist/engine-client.js +47 -2
- package/dist/engine-client.js.map +1 -1
- package/dist/engine-floor.d.ts +27 -4
- package/dist/engine-floor.d.ts.map +1 -1
- package/dist/engine-floor.js +90 -9
- package/dist/engine-floor.js.map +1 -1
- package/dist/gitignore.d.ts.map +1 -1
- package/dist/gitignore.js +7 -0
- package/dist/gitignore.js.map +1 -1
- package/dist/hooks-generator.d.ts.map +1 -1
- package/dist/hooks-generator.js +18 -3
- package/dist/hooks-generator.js.map +1 -1
- package/dist/seed-connection.d.ts +60 -0
- package/dist/seed-connection.d.ts.map +1 -0
- package/dist/seed-connection.js +90 -0
- package/dist/seed-connection.js.map +1 -0
- package/dist/seed-ir.d.ts +66 -0
- package/dist/seed-ir.d.ts.map +1 -0
- package/dist/seed-ir.js +265 -0
- package/dist/seed-ir.js.map +1 -0
- package/dist/seed-runner.d.ts +44 -0
- package/dist/seed-runner.d.ts.map +1 -0
- package/dist/seed-runner.js +83 -0
- package/dist/seed-runner.js.map +1 -0
- package/dist/seed.d.ts +345 -0
- package/dist/seed.d.ts.map +1 -1
- package/dist/seed.js +138 -0
- package/dist/seed.js.map +1 -1
- package/dist/self-host-compose.d.ts.map +1 -1
- package/dist/self-host-compose.js +14 -8
- package/dist/self-host-compose.js.map +1 -1
- package/dist/type-extractor.d.ts.map +1 -1
- package/dist/type-extractor.js +73 -0
- package/dist/type-extractor.js.map +1 -1
- package/dist/type-generation.d.ts +29 -0
- package/dist/type-generation.d.ts.map +1 -1
- package/dist/type-generation.js +52 -0
- package/dist/type-generation.js.map +1 -1
- package/package.json +2 -2
- package/src/augmentation-generator.ts +73 -14
- package/src/cli-version-embedded.ts +1 -1
- package/src/commands/generate.ts +7 -3
- package/src/commands/init.ts +31 -21
- package/src/commands/seed.ts +294 -44
- package/src/engine-client.ts +52 -3
- package/src/engine-floor.ts +100 -9
- package/src/gitignore.ts +7 -0
- package/src/hooks-generator.ts +21 -6
- package/src/seed-connection.ts +146 -0
- package/src/seed-ir.ts +311 -0
- package/src/seed-runner.ts +109 -0
- package/src/seed.ts +408 -0
- package/src/self-host-compose.ts +14 -8
- package/src/type-extractor.ts +101 -0
- package/src/type-generation.ts +64 -0
- package/tests/access-composition.test.ts +123 -0
- package/tests/augmentation-generator.test.ts +149 -9
- package/tests/engine-floor.test.ts +93 -0
- package/tests/fixtures/seed_golden_ir.json +186 -0
- package/tests/runtime-contract.test.ts +31 -6
- package/tests/seed-connection.test.ts +158 -0
- package/tests/seed-ir.test.ts +436 -0
- package/tsconfig.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
> @supatype/cli@0.3.
|
|
2
|
+
> @supatype/cli@0.3.3 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,14 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
> @supatype/cli@0.3.
|
|
2
|
+
> @supatype/cli@0.3.3 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[2m62 tests[22m[2m)[22m[33m 309[2mms[22m[39m
|
|
8
|
+
[32m✓[39m tests/type-extractor.test.ts [2m([22m[2m49 tests[22m[2m)[22m[33m 408[2mms[22m[39m
|
|
9
|
+
[32m✓[39m tests/access-composition.test.ts [2m([22m[2m32 tests[22m[2m)[22m[32m 261[2mms[22m[39m
|
|
10
|
+
[32m✓[39m tests/model-hooks.test.ts [2m([22m[2m23 tests[22m[2m)[22m[32m 118[2mms[22m[39m
|
|
12
11
|
[90mstdout[2m | tests/init.test.ts[2m > [22m[2mscaffold()[2m > [22m[2mcreates all expected files
|
|
13
12
|
[22m[39m created package.json
|
|
14
13
|
created supatype.config.ts
|
|
@@ -323,22 +322,34 @@
|
|
|
323
322
|
created public/.gitkeep
|
|
324
323
|
created .gitignore
|
|
325
324
|
|
|
326
|
-
[32m✓[39m tests/init.test.ts [2m([22m[2m28 tests[22m[2m)[22m[32m
|
|
327
|
-
[32m✓[39m tests/
|
|
328
|
-
[32m✓[39m tests/
|
|
329
|
-
[32m✓[39m tests/
|
|
330
|
-
[32m✓[39m tests/
|
|
331
|
-
[32m✓[39m tests/
|
|
332
|
-
[32m✓[39m tests/model-
|
|
333
|
-
[32m✓[39m tests/
|
|
334
|
-
|
|
335
|
-
[32m✓[39m tests/
|
|
325
|
+
[32m✓[39m tests/init.test.ts [2m([22m[2m28 tests[22m[2m)[22m[32m 115[2mms[22m[39m
|
|
326
|
+
[32m✓[39m tests/augmentation-generator.test.ts [2m([22m[2m24 tests[22m[2m)[22m[32m 40[2mms[22m[39m
|
|
327
|
+
[32m✓[39m tests/runtime-contract.test.ts [2m([22m[2m64 tests[22m[2m)[22m[32m 177[2mms[22m[39m
|
|
328
|
+
[32m✓[39m tests/seed-ir.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m 34[2mms[22m[39m
|
|
329
|
+
[32m✓[39m tests/engine-floor.test.ts [2m([22m[2m28 tests[22m[2m)[22m[32m 36[2mms[22m[39m
|
|
330
|
+
[32m✓[39m tests/external-database-compose.test.ts [2m([22m[2m23 tests[22m[2m)[22m[32m 24[2mms[22m[39m
|
|
331
|
+
[32m✓[39m tests/model-constraints.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 225[2mms[22m[39m
|
|
332
|
+
[32m✓[39m tests/model-versions.test.ts [2m([22m[2m19 tests[22m[2m)[22m[32m 78[2mms[22m[39m
|
|
333
|
+
[32m✓[39m tests/api-config-cache-seed.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m 34[2mms[22m[39m
|
|
334
|
+
[32m✓[39m tests/model-cache-declaration.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 92[2mms[22m[39m
|
|
335
|
+
[32m✓[39m tests/field-masking-tier.test.ts [2m([22m[2m16 tests[22m[2m)[22m[32m 21[2mms[22m[39m
|
|
336
|
+
[32m✓[39m tests/hooks-generator.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m 9843[2mms[22m[39m
|
|
337
|
+
[33m[2m✓[22m[39m typechecks under strict mode, together with a handler that uses it [33m 4001[2mms[22m[39m
|
|
338
|
+
[33m[2m✓[22m[39m rejects a handler for a table that declares no hook [33m 3169[2mms[22m[39m
|
|
339
|
+
[33m[2m✓[22m[39m typechecks with a validator written the way the docs will show it [33m 2605[2mms[22m[39m
|
|
340
|
+
|
|
341
|
+
[32m✓[39m tests/dev-ui.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m 125[2mms[22m[39m
|
|
336
342
|
|
|
337
343
|
[supatype] Shutting down…
|
|
338
|
-
[32m✓[39m tests/
|
|
339
|
-
[33m[2m✓[22m[39m
|
|
340
|
-
[33m[2m✓[22m[39m
|
|
341
|
-
[33m[2m✓[22m[39m
|
|
344
|
+
[32m✓[39m tests/config.test.ts [2m([22m[2m19 tests[22m[2m)[22m[33m 9687[2mms[22m[39m
|
|
345
|
+
[33m[2m✓[22m[39m loads a valid supatype.config.ts (plain export default, no package imports) [33m 1202[2mms[22m[39m
|
|
346
|
+
[33m[2m✓[22m[39m normalizes shorthand schema string to { path, pg_schema } [33m 1007[2mms[22m[39m
|
|
347
|
+
[33m[2m✓[22m[39m loads a supatype.config.js (plain ESM) [33m 1367[2mms[22m[39m
|
|
348
|
+
[33m[2m✓[22m[39m loads config without a versions section (latest by default) [33m 1236[2mms[22m[39m
|
|
349
|
+
[33m[2m✓[22m[39m prefers supatype.config.ts over supatype.config.js when both exist [33m 1081[2mms[22m[39m
|
|
350
|
+
[33m[2m✓[22m[39m supports optional output field in config [33m 784[2mms[22m[39m
|
|
351
|
+
[33m[2m✓[22m[39m merges supatype.local.config.ts over base [33m 1833[2mms[22m[39m
|
|
352
|
+
[33m[2m✓[22m[39m loads defineConfig import before @supatype/cli is installed (init scaffold) [33m 1148[2mms[22m[39m
|
|
342
353
|
[90mstdout[2m | tests/docker-runtime.test.ts[2m > [22m[2mrequireDockerDaemon[2m > [22m[2mexits when the daemon is unavailable
|
|
343
354
|
[22m[39m
|
|
344
355
|
Start the Docker daemon (e.g. sudo systemctl start docker), then try again.
|
|
@@ -347,54 +358,45 @@
|
|
|
347
358
|
|
|
348
359
|
docker: daemon down
|
|
349
360
|
|
|
350
|
-
[32m✓[39m tests/docker-runtime.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m
|
|
351
|
-
[32m✓[39m tests/
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
[33m[2m✓[22m[39m
|
|
356
|
-
[33m[2m✓[22m[39m
|
|
357
|
-
[33m[2m✓[22m[39m
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
[32m✓[39m tests/
|
|
363
|
-
[32m✓[39m tests/
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
[32m✓[39m tests/
|
|
368
|
-
[32m✓[39m tests/
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
[32m✓[39m tests/
|
|
372
|
-
[32m✓[39m tests/engine-floor.test.ts [2m([22m[2m17 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
373
|
-
[32m✓[39m tests/external-database-config.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
374
|
-
[32m✓[39m tests/compose-services.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 13[2mms[22m[39m
|
|
375
|
-
[32m✓[39m tests/field-validators.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 81[2mms[22m[39m
|
|
376
|
-
[32m✓[39m tests/native-keyspace.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 39[2mms[22m[39m
|
|
377
|
-
[32m✓[39m tests/db-port.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 19[2mms[22m[39m
|
|
378
|
-
[32m✓[39m tests/command-chrome-coverage.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 18[2mms[22m[39m
|
|
379
|
-
[32m✓[39m tests/hook-upload.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
380
|
-
[32m✓[39m tests/env-file.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 20[2mms[22m[39m
|
|
361
|
+
[32m✓[39m tests/docker-runtime.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 17[2mms[22m[39m
|
|
362
|
+
[32m✓[39m tests/db-preflight.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
363
|
+
[32m✓[39m tests/keys-write.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 23[2mms[22m[39m
|
|
364
|
+
[32m✓[39m tests/field-bounds.test.ts [2m([22m[2m23 tests[22m[2m)[22m[32m 17[2mms[22m[39m
|
|
365
|
+
[32m✓[39m tests/cache-clean.test.ts [2m([22m[2m8 tests[22m[2m)[22m[33m 2011[2mms[22m[39m
|
|
366
|
+
[33m[2m✓[22m[39m keeps pinned versions and removes the rest [33m 634[2mms[22m[39m
|
|
367
|
+
[33m[2m✓[22m[39m --force removes pinned versions [33m 708[2mms[22m[39m
|
|
368
|
+
[33m[2m✓[22m[39m explicit version removes even when pinned (with warning) [33m 651[2mms[22m[39m
|
|
369
|
+
[32m✓[39m tests/cache-provider-config.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
370
|
+
[32m✓[39m tests/functions-deno-types.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m 2963[2mms[22m[39m
|
|
371
|
+
[33m[2m✓[22m[39m tsc fails with Cannot find name Deno without ambient types [33m 2060[2mms[22m[39m
|
|
372
|
+
[33m[2m✓[22m[39m tsc passes for Deno.env after ensureFunctionsDenoTypes [33m 883[2mms[22m[39m
|
|
373
|
+
[32m✓[39m tests/seed-connection.test.ts [2m([22m[2m13 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
374
|
+
[32m✓[39m tests/field-bounds-matrix.test.ts [2m([22m[2m124 tests[22m[2m)[22m[32m 24[2mms[22m[39m
|
|
375
|
+
[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 11[2mms[22m[39m
|
|
377
|
+
[32m✓[39m tests/field-validators.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 70[2mms[22m[39m
|
|
378
|
+
[32m✓[39m tests/native-keyspace.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 27[2mms[22m[39m
|
|
379
|
+
[32m✓[39m tests/db-port.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 17[2mms[22m[39m
|
|
380
|
+
[32m✓[39m tests/command-chrome-coverage.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 19[2mms[22m[39m
|
|
381
|
+
[32m✓[39m tests/hook-upload.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
382
|
+
[32m✓[39m tests/env-file.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 21[2mms[22m[39m
|
|
381
383
|
[90mstdout[2m | tests/link.test.ts[2m > [22m[2mlink model[2m > [22m[2mmigrates cloud.json into link.json
|
|
382
384
|
[22m[39m created package.json
|
|
383
385
|
created supatype.config.ts
|
|
384
386
|
created schema/index.ts
|
|
385
387
|
created .env
|
|
386
388
|
created seed.ts
|
|
389
|
+
[90mstderr[2m | tests/link.test.ts[2m > [22m[2mlink model[2m > [22m[2mmigrates cloud.json into link.json
|
|
387
390
|
created seeds/.gitkeep
|
|
388
391
|
created public/.gitkeep
|
|
389
392
|
created .gitignore
|
|
390
393
|
|
|
391
|
-
[90mstderr[2m | tests/link.test.ts[2m > [22m[2mlink model[2m > [22m[2mmigrates cloud.json into link.json
|
|
392
394
|
[22m[39m[supatype] Migrated .supatype/cloud.json → .supatype/link.json (legacy files kept; remove manually when ready).
|
|
393
395
|
|
|
394
|
-
[32m✓[39m tests/link.test.ts [2m([22m[2m4 tests[22m[2m)[22m[33m
|
|
395
|
-
[33m[2m✓[22m[39m resolveTarget returns cloud mode with /api/v1 prefix [33m
|
|
396
|
-
[33m[2m✓[22m[39m resolveTarget returns self-host mode with /platform/v1 prefix [33m
|
|
397
|
-
[33m[2m✓[22m[39m targetSchemaRollback posts to /platform/v1 when linked [33m
|
|
396
|
+
[32m✓[39m tests/link.test.ts [2m([22m[2m4 tests[22m[2m)[22m[33m 3123[2mms[22m[39m
|
|
397
|
+
[33m[2m✓[22m[39m resolveTarget returns cloud mode with /api/v1 prefix [33m 1060[2mms[22m[39m
|
|
398
|
+
[33m[2m✓[22m[39m resolveTarget returns self-host mode with /platform/v1 prefix [33m 1041[2mms[22m[39m
|
|
399
|
+
[33m[2m✓[22m[39m targetSchemaRollback posts to /platform/v1 when linked [33m 1011[2mms[22m[39m
|
|
398
400
|
[90mstdout[2m | tests/admin-ensure.test.ts[2m > [22m[2minit admin seed in .env[2m > [22m[2mwrites SUPATYPE_ADMIN_* when scaffold options include credentials
|
|
399
401
|
[22m[39m created package.json
|
|
400
402
|
created supatype.config.ts
|
|
@@ -405,8 +407,8 @@
|
|
|
405
407
|
created public/.gitkeep
|
|
406
408
|
created .gitignore
|
|
407
409
|
|
|
408
|
-
[32m✓[39m tests/admin-ensure.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m
|
|
409
|
-
[32m✓[39m tests/service-role-check.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m
|
|
410
|
+
[32m✓[39m tests/admin-ensure.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 182[2mms[22m[39m
|
|
411
|
+
[32m✓[39m tests/service-role-check.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
410
412
|
[90mstdout[2m | tests/admin-studio-membership.test.ts[2m > [22m[2mfirst admin user creation[2m > [22m[2mdoes not write a role into app_metadata
|
|
411
413
|
[22m[39m[supatype] Admin user "admin@example.com" created (role: admin).
|
|
412
414
|
[supatype] Log in at /admin after starting the dev server.
|
|
@@ -423,55 +425,55 @@
|
|
|
423
425
|
[22m[39m[supatype] Admin user "admin@example.com" created (role: admin).
|
|
424
426
|
[supatype] Log in at /admin after starting the dev server.
|
|
425
427
|
|
|
426
|
-
[32m✓[39m tests/admin-studio-membership.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m
|
|
427
|
-
[32m✓[39m tests/pull-utils.test.ts [2m([22m[2m49 tests[22m[2m)[22m[32m
|
|
428
|
-
[32m✓[39m tests/schema-sources.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m
|
|
429
|
-
[33m[2m✓[22m[39m buildSchemaSourcesPayload includes manifest metadata [33m
|
|
430
|
-
[33m[2m✓[22m[39m restore overwrites modified local files [33m
|
|
431
|
-
[32m✓[39m tests/preview-config-check.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m
|
|
432
|
-
[32m✓[39m tests/keys.test.ts [2m([22m[2m11 tests[22m[2m)[22m[33m
|
|
433
|
-
[33m[2m✓[22m[39m exits 0 with --secret [33m
|
|
434
|
-
[33m[2m✓[22m[39m outputs ANON_KEY= line [33m
|
|
435
|
-
[33m[2m✓[22m[39m outputs SERVICE_ROLE_KEY= line [33m
|
|
436
|
-
[33m[2m✓[22m[39m ANON_KEY is a valid three-part JWT [33m
|
|
437
|
-
[33m[2m✓[22m[39m SERVICE_ROLE_KEY payload has role: service_role [33m
|
|
438
|
-
[33m[2m✓[22m[39m JWT has exp in the future [33m
|
|
439
|
-
[33m[2m✓[22m[39m --exp-years changes the expiry window [33m
|
|
440
|
-
[33m[2m✓[22m[39m reads JWT_SECRET from environment variable [33m
|
|
441
|
-
[33m[2m✓[22m[39m reads JWT_SECRET from .env file [33m
|
|
442
|
-
[33m[2m✓[22m[39m exits non-zero when no secret is available [33m
|
|
443
|
-
[33m[2m✓[22m[39m keys --help shows --secret and --exp-years options [33m
|
|
428
|
+
[32m✓[39m tests/admin-studio-membership.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m 440[2mms[22m[39m
|
|
429
|
+
[32m✓[39m tests/pull-utils.test.ts [2m([22m[2m49 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
430
|
+
[32m✓[39m tests/schema-sources.test.ts [2m([22m[2m5 tests[22m[2m)[22m[33m 1223[2mms[22m[39m
|
|
431
|
+
[33m[2m✓[22m[39m buildSchemaSourcesPayload includes manifest metadata [33m 594[2mms[22m[39m
|
|
432
|
+
[33m[2m✓[22m[39m restore overwrites modified local files [33m 586[2mms[22m[39m
|
|
433
|
+
[32m✓[39m tests/preview-config-check.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
434
|
+
[32m✓[39m tests/keys.test.ts [2m([22m[2m11 tests[22m[2m)[22m[33m 17760[2mms[22m[39m
|
|
435
|
+
[33m[2m✓[22m[39m exits 0 with --secret [33m 1627[2mms[22m[39m
|
|
436
|
+
[33m[2m✓[22m[39m outputs ANON_KEY= line [33m 1464[2mms[22m[39m
|
|
437
|
+
[33m[2m✓[22m[39m outputs SERVICE_ROLE_KEY= line [33m 1362[2mms[22m[39m
|
|
438
|
+
[33m[2m✓[22m[39m ANON_KEY is a valid three-part JWT [33m 1546[2mms[22m[39m
|
|
439
|
+
[33m[2m✓[22m[39m SERVICE_ROLE_KEY payload has role: service_role [33m 1374[2mms[22m[39m
|
|
440
|
+
[33m[2m✓[22m[39m JWT has exp in the future [33m 1603[2mms[22m[39m
|
|
441
|
+
[33m[2m✓[22m[39m --exp-years changes the expiry window [33m 2946[2mms[22m[39m
|
|
442
|
+
[33m[2m✓[22m[39m reads JWT_SECRET from environment variable [33m 1496[2mms[22m[39m
|
|
443
|
+
[33m[2m✓[22m[39m reads JWT_SECRET from .env file [33m 1518[2mms[22m[39m
|
|
444
|
+
[33m[2m✓[22m[39m exits non-zero when no secret is available [33m 1378[2mms[22m[39m
|
|
445
|
+
[33m[2m✓[22m[39m keys --help shows --secret and --exp-years options [33m 1438[2mms[22m[39m
|
|
444
446
|
[90mstderr[2m | tests/binary-cache-cloud-overrides.test.ts[2m > [22m[2misLinkedToCloudProject[2m > [22m[2mis true when .supatype/cloud.json has projectSlug
|
|
445
447
|
[22m[39m[supatype] Migrated .supatype/cloud.json → .supatype/link.json (legacy files kept; remove manually when ready).
|
|
446
448
|
|
|
447
|
-
[32m✓[39m tests/binary-cache-cloud-overrides.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m
|
|
448
|
-
[32m✓[39m tests/
|
|
449
|
-
[32m✓[39m tests/
|
|
450
|
-
[32m✓[39m tests/
|
|
451
|
-
[32m✓[39m tests/
|
|
452
|
-
[32m✓[39m tests/
|
|
453
|
-
[32m✓[39m tests/
|
|
454
|
-
[32m✓[39m tests/functions-concurrency.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
455
|
-
[32m✓[39m tests/readiness-poll.test.ts [2m([22m[2m3 tests[22m[2m)[22m[33m
|
|
456
|
-
[33m[2m✓[22m[39m ends promptly when it carries a deadline [33m
|
|
457
|
-
[32m✓[39m tests/ast-derived-outputs.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
458
|
-
[32m✓[39m tests/self-host-keys.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
459
|
-
[32m✓[39m tests/functions-context-refresh.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
460
|
-
[32m✓[39m tests/api-schemas.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m
|
|
461
|
-
[32m✓[39m tests/gitignore-secrets.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
449
|
+
[32m✓[39m tests/binary-cache-cloud-overrides.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 22[2mms[22m[39m
|
|
450
|
+
[32m✓[39m tests/local-server-image-env.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 19[2mms[22m[39m
|
|
451
|
+
[32m✓[39m tests/homebrew-formula.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 214[2mms[22m[39m
|
|
452
|
+
[32m✓[39m tests/model-cache-manifest.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
453
|
+
[32m✓[39m tests/minisign.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 17[2mms[22m[39m
|
|
454
|
+
[32m✓[39m tests/client-generator.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
455
|
+
[32m✓[39m tests/local-secrets.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
456
|
+
[32m✓[39m tests/functions-concurrency.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
457
|
+
[32m✓[39m tests/readiness-poll.test.ts [2m([22m[2m3 tests[22m[2m)[22m[33m 331[2mms[22m[39m
|
|
458
|
+
[33m[2m✓[22m[39m ends promptly when it carries a deadline [33m 327[2mms[22m[39m
|
|
459
|
+
[32m✓[39m tests/ast-derived-outputs.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
460
|
+
[32m✓[39m tests/self-host-keys.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
461
|
+
[32m✓[39m tests/functions-context-refresh.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
462
|
+
[32m✓[39m tests/api-schemas.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 13[2mms[22m[39m
|
|
463
|
+
[32m✓[39m tests/gitignore-secrets.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 93[2mms[22m[39m
|
|
462
464
|
[90mstdout[2m | tests/storage-provision.test.ts[2m > [22m[2mprovisionBuckets[2m > [22m[2mPOSTs each bucket to the storage API
|
|
463
465
|
[22m[39m[supatype] Storage bucket "photos" ready.
|
|
464
466
|
|
|
465
467
|
[90mstdout[2m | tests/storage-provision.test.ts[2m > [22m[2mprovisionBuckets[2m > [22m[2mPOSTs each bucket to the storage API
|
|
466
468
|
[22m[39m[supatype] Storage bucket "avatars" ready.
|
|
467
469
|
|
|
468
|
-
[32m✓[39m tests/storage-provision.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
469
|
-
[32m✓[39m tests/strict.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
470
|
-
[32m✓[39m tests/cached-artifact-format.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
470
|
+
[32m✓[39m tests/storage-provision.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
471
|
+
[32m✓[39m tests/strict.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
472
|
+
[32m✓[39m tests/cached-artifact-format.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
471
473
|
[32m✓[39m tests/cache-identity-scope.test.ts [2m([22m[2m33 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
472
|
-
[32m✓[39m tests/target-client-refresh.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
473
|
-
[32m✓[39m tests/studio-admin-roles.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
474
|
-
[32m✓[39m tests/proxy-dev-app.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
474
|
+
[32m✓[39m tests/target-client-refresh.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
475
|
+
[32m✓[39m tests/studio-admin-roles.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
476
|
+
[32m✓[39m tests/proxy-dev-app.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
475
477
|
[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
|
|
476
478
|
[22m[39m created package.json
|
|
477
479
|
created supatype.config.ts
|
|
@@ -492,79 +494,79 @@
|
|
|
492
494
|
created public/.gitkeep
|
|
493
495
|
created .gitignore
|
|
494
496
|
|
|
495
|
-
[32m✓[39m tests/service-role-routes.test.ts [2m([22m[2m4 tests[22m[2m)[22m[33m
|
|
496
|
-
[33m[2m✓[22m[39m reads the declared list [33m
|
|
497
|
-
[33m[2m✓[22m[39m is an empty list when a project declares none [33m
|
|
498
|
-
[33m[2m✓[22m[39m sends what the project declared, hook entries included [33m
|
|
499
|
-
[32m✓[39m tests/
|
|
500
|
-
|
|
501
|
-
[33m[2m✓[22m[39m
|
|
502
|
-
[33m[2m✓[22m[39m
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
[33m[2m✓[22m[39m --help
|
|
507
|
-
[33m[2m✓[22m[39m --
|
|
508
|
-
[33m[2m✓[22m[39m
|
|
509
|
-
[33m[2m✓[22m[39m
|
|
510
|
-
[33m[2m✓[22m[39m
|
|
511
|
-
[33m[2m✓[22m[39m
|
|
512
|
-
[33m[2m✓[22m[39m
|
|
513
|
-
[33m[2m✓[22m[39m
|
|
514
|
-
[33m[2m✓[22m[39m
|
|
515
|
-
[33m[2m✓[22m[39m
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
[33m[2m✓[22m[39m app
|
|
519
|
-
[33m[2m✓[22m[39m
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
[32m✓[39m tests/engine-push-output.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
523
|
-
[32m✓[39m tests/type-resolver.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
524
|
-
[32m✓[39m tests/command-chrome-wrap.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
525
|
-
[32m✓[39m tests/doctor-render.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
497
|
+
[32m✓[39m tests/service-role-routes.test.ts [2m([22m[2m4 tests[22m[2m)[22m[33m 1771[2mms[22m[39m
|
|
498
|
+
[33m[2m✓[22m[39m reads the declared list [33m 592[2mms[22m[39m
|
|
499
|
+
[33m[2m✓[22m[39m is an empty list when a project declares none [33m 610[2mms[22m[39m
|
|
500
|
+
[33m[2m✓[22m[39m sends what the project declared, hook entries included [33m 565[2mms[22m[39m
|
|
501
|
+
[32m✓[39m tests/cli-help.test.ts [2m([22m[2m16 tests[22m[2m)[22m[33m 23059[2mms[22m[39m
|
|
502
|
+
[33m[2m✓[22m[39m --help lists all top-level commands [33m 1506[2mms[22m[39m
|
|
503
|
+
[33m[2m✓[22m[39m --version prints package.json version [33m 1416[2mms[22m[39m
|
|
504
|
+
[33m[2m✓[22m[39m self-update --help describes the command [33m 1380[2mms[22m[39m
|
|
505
|
+
[33m[2m✓[22m[39m init --help describes the init command [33m 1381[2mms[22m[39m
|
|
506
|
+
[33m[2m✓[22m[39m push --help describes the push command and --yes flag [33m 1515[2mms[22m[39m
|
|
507
|
+
[33m[2m✓[22m[39m diff --help describes the diff command [33m 1450[2mms[22m[39m
|
|
508
|
+
[33m[2m✓[22m[39m pull --help describes scaffold pull command [33m 1361[2mms[22m[39m
|
|
509
|
+
[33m[2m✓[22m[39m doctor --help describes drift report command [33m 1414[2mms[22m[39m
|
|
510
|
+
[33m[2m✓[22m[39m introspect --help describes database introspection command [33m 1491[2mms[22m[39m
|
|
511
|
+
[33m[2m✓[22m[39m adopt --help describes adoption ceremony command [33m 1400[2mms[22m[39m
|
|
512
|
+
[33m[2m✓[22m[39m reset --help shows --yes flag [33m 1420[2mms[22m[39m
|
|
513
|
+
[33m[2m✓[22m[39m app --help describes the app command with add/remove subcommands [33m 1412[2mms[22m[39m
|
|
514
|
+
[33m[2m✓[22m[39m app add --help shows --static and --port options [33m 1438[2mms[22m[39m
|
|
515
|
+
[33m[2m✓[22m[39m self-host --help shows compose only (legacy commands hidden) [33m 1571[2mms[22m[39m
|
|
516
|
+
[33m[2m✓[22m[39m self-host compose --help shows compose subcommands [33m 1453[2mms[22m[39m
|
|
517
|
+
[33m[2m✓[22m[39m unknown command exits non-zero [33m 1444[2mms[22m[39m
|
|
518
|
+
[32m✓[39m tests/compose-parsable-defaults.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
519
|
+
[32m✓[39m tests/app-command.test.ts [2m([22m[2m2 tests[22m[2m)[22m[33m 3088[2mms[22m[39m
|
|
520
|
+
[33m[2m✓[22m[39m sets app.mode=static and static_dir in supatype.config.ts [33m 1595[2mms[22m[39m
|
|
521
|
+
[33m[2m✓[22m[39m creates the static directory when missing [33m 1491[2mms[22m[39m
|
|
522
|
+
[32m✓[39m tests/rest-cache-admin.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 52[2mms[22m[39m
|
|
523
|
+
[32m✓[39m tests/init-dependency-versions.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 41[2mms[22m[39m
|
|
524
|
+
[32m✓[39m tests/engine-push-output.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
525
|
+
[32m✓[39m tests/type-resolver.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 17[2mms[22m[39m
|
|
526
|
+
[32m✓[39m tests/command-chrome-wrap.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
526
527
|
[32m✓[39m tests/cli-install-method.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
527
|
-
[32m✓[39m tests/port-in-use.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
528
|
-
[32m✓[39m tests/
|
|
529
|
-
[32m✓[39m tests/
|
|
530
|
-
[32m✓[39m tests/ensure-binary.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
531
|
-
[32m✓[39m tests/
|
|
532
|
-
|
|
533
|
-
[33m[2m✓[22m[39m evaluates
|
|
534
|
-
[33m[2m✓[22m[39m
|
|
535
|
-
[33m[2m✓[22m[39m
|
|
536
|
-
[33m[2m✓[22m[39m returns non-zero exit code on
|
|
537
|
-
[33m[2m✓[22m[39m
|
|
538
|
-
[33m[2m✓[22m[39m
|
|
539
|
-
|
|
540
|
-
[32m✓[39m tests/
|
|
528
|
+
[32m✓[39m tests/port-in-use.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 26[2mms[22m[39m
|
|
529
|
+
[32m✓[39m tests/doctor-render.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
530
|
+
[32m✓[39m tests/archive-name-alias.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
531
|
+
[32m✓[39m tests/ensure-binary.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
532
|
+
[32m✓[39m tests/init-project-detect.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
533
|
+
[32m✓[39m tests/tsx-runner.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m 3066[2mms[22m[39m
|
|
534
|
+
[33m[2m✓[22m[39m evaluates a simple expression and returns stdout [33m 381[2mms[22m[39m
|
|
535
|
+
[33m[2m✓[22m[39m evaluates TypeScript syntax (type annotations) [33m 436[2mms[22m[39m
|
|
536
|
+
[33m[2m✓[22m[39m can serialize a JSON object to stdout [33m 429[2mms[22m[39m
|
|
537
|
+
[33m[2m✓[22m[39m returns non-zero exit code on syntax error [33m 407[2mms[22m[39m
|
|
538
|
+
[33m[2m✓[22m[39m returns non-zero exit code on runtime error [33m 427[2mms[22m[39m
|
|
539
|
+
[33m[2m✓[22m[39m captures stderr separately from stdout [33m 388[2mms[22m[39m
|
|
540
|
+
[33m[2m✓[22m[39m runs a .ts file and returns its stdout [33m 591[2mms[22m[39m
|
|
541
|
+
[32m✓[39m tests/doctor-service-role.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
542
|
+
[32m✓[39m tests/required-host-components.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
541
543
|
[32m✓[39m tests/ui-messages.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
542
|
-
[32m✓[39m tests/
|
|
543
|
-
[32m✓[39m tests/
|
|
544
|
-
[32m✓[39m tests/ui-confirm.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
544
|
+
[32m✓[39m tests/normalize-admin-config.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
545
|
+
[32m✓[39m tests/dev-ports-owner.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
546
|
+
[32m✓[39m tests/ui-confirm.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
545
547
|
[32m✓[39m tests/docker-postgres.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
546
|
-
[32m✓[39m tests/binary-download-lock.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
547
|
-
[32m✓[39m tests/dev-session-lock.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
548
|
-
[32m✓[39m tests/config-load-failure.test.ts [2m([22m[2m2 tests[22m[2m)[22m[33m
|
|
549
|
-
[33m[2m✓[22m[39m is reported, rather than treated as absent [33m
|
|
550
|
-
[33m[2m✓[22m[39m does not stop the CLI working with no config at all [33m
|
|
551
|
-
[32m✓[39m tests/
|
|
552
|
-
[32m✓[39m tests/
|
|
553
|
-
[32m✓[39m tests/realtime-launch.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
548
|
+
[32m✓[39m tests/binary-download-lock.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 13[2mms[22m[39m
|
|
549
|
+
[32m✓[39m tests/dev-session-lock.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
550
|
+
[32m✓[39m tests/config-load-failure.test.ts [2m([22m[2m2 tests[22m[2m)[22m[33m 3614[2mms[22m[39m
|
|
551
|
+
[33m[2m✓[22m[39m is reported, rather than treated as absent [33m 2066[2mms[22m[39m
|
|
552
|
+
[33m[2m✓[22m[39m does not stop the CLI working with no config at all [33m 1545[2mms[22m[39m
|
|
553
|
+
[32m✓[39m tests/route-manifest.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
554
|
+
[32m✓[39m tests/dev-ports.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
555
|
+
[32m✓[39m tests/realtime-launch.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
554
556
|
[32m✓[39m tests/release-pins.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
555
557
|
[32m✓[39m tests/dev-ready-panel.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
556
558
|
[32m✓[39m tests/ensure-dev-api-config.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
557
|
-
[32m✓[39m tests/seed-discover.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
559
|
+
[32m✓[39m tests/seed-discover.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 19[2mms[22m[39m
|
|
558
560
|
[32m✓[39m tests/init-package-json.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
559
|
-
[32m✓[39m tests/pg-spawn-env.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
560
|
-
[32m✓[39m tests/resolve-api-url.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
561
|
+
[32m✓[39m tests/pg-spawn-env.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
562
|
+
[32m✓[39m tests/resolve-api-url.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
563
|
+
[32m✓[39m tests/migrate-from-v1.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
561
564
|
[32m✓[39m tests/cli-package-version.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
562
|
-
[32m✓[39m tests/
|
|
563
|
-
[32m✓[39m tests/postgres-archive-tag.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
565
|
+
[32m✓[39m tests/postgres-archive-tag.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
564
566
|
[32m✓[39m tests/stdin-after-ink.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
565
567
|
|
|
566
|
-
[2m Test Files [22m [1m[
|
|
567
|
-
[2m Tests [22m [1m[
|
|
568
|
-
[2m Start at [22m
|
|
569
|
-
[2m Duration [22m
|
|
568
|
+
[2m Test Files [22m [1m[32m103 passed[39m[22m[90m (103)[39m
|
|
569
|
+
[2m Tests [22m [1m[32m1112 passed[39m[22m[90m (1112)[39m
|
|
570
|
+
[2m Start at [22m 16:22:17
|
|
571
|
+
[2m Duration [22m 55.20s[2m (transform 7.96s, setup 0ms, import 58.00s, tests 85.16s, environment 24ms)[22m
|
|
570
572
|
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **seed:** a seed file now exports a default function and describes writes rather than
|
|
8
|
+
performing them. The calls are collected into a document that the engine validates against
|
|
9
|
+
the schema, orders by foreign key, batches, and applies in one transaction. There is no
|
|
10
|
+
connection to open, no SQL, no ordering to work out by hand, and a failure part way through
|
|
11
|
+
leaves nothing behind. See `references/seeding.md`.
|
|
12
|
+
* **seed:** `db` is typed from the project's schema by a generated builder. A reference to the
|
|
13
|
+
wrong model, a `where` on a column that does not identify a row, a time expression on a text
|
|
14
|
+
column, or a currency amount as a float are all compile errors.
|
|
15
|
+
* **seed:** `upsert`, `createMany`, nested `create` on the inverse side of a relation, and
|
|
16
|
+
`connect` by any unique key.
|
|
17
|
+
* **seed:** `$if` runs a block only when the database says so, evaluated by the engine at that
|
|
18
|
+
position inside the transaction. `$sql` puts a raw statement in the same transaction and the
|
|
19
|
+
same order as everything else.
|
|
20
|
+
* **seed:** `expr.now`, `expr.startOf`, `expr.ago` and `expr.default` are evaluated by Postgres
|
|
21
|
+
at seed time, so a fixture calendar stays ahead of whenever it is run.
|
|
22
|
+
* **seed:** `--status` reports what has been applied to an environment, including whether a file
|
|
23
|
+
has changed since it ran. `--atomic` runs every file in one transaction. `--connection` and
|
|
24
|
+
`--environment` were added alongside.
|
|
25
|
+
* **seed:** every run is recorded in `_supatype.seeds`, inside the same transaction as the writes
|
|
26
|
+
it describes, so the record can never claim a seed applied when it rolled back. A file may opt
|
|
27
|
+
into `runOnce` for a genuine one-time backfill.
|
|
28
|
+
* **seed:** failures arrive in the schema's terms. `Organiser.slug is already taken`, with the
|
|
29
|
+
file and the position in the document, rather than a Postgres constraint name.
|
|
30
|
+
* **seed:** exit codes distinguish a seed that failed (1) from an environment that is not set up
|
|
31
|
+
(2), so CI can tell which one to retry.
|
|
32
|
+
* **seed:** the connection string is resolved from the flag, the config, the environment and the
|
|
33
|
+
project's `.env` in that order, and when none of them has one the error names every source it
|
|
34
|
+
tried. Connection strings are redacted wherever they are printed.
|
|
35
|
+
* **generate:** writes the seed builder beside the generated client. It needs no database and no
|
|
36
|
+
running stack, which is what makes it safe to gitignore.
|
|
37
|
+
* **init:** the scaffolded seed uses the new contract and carries no connection string. The
|
|
38
|
+
scaffolded `package.json` runs `supatype seed` and gains a `prepare` script so a fresh clone
|
|
39
|
+
has a builder before anything imports it.
|
|
40
|
+
* **dev:** the database is always published to the host on `127.0.0.1`. Seeding is a host
|
|
41
|
+
process, so the previous rule left a fresh project with a database nothing on the host could
|
|
42
|
+
reach and a remedy nobody had reason to know about.
|
|
43
|
+
* **schema:** `After<>` and `Before<>` are parsed from the schema into the AST.
|
|
44
|
+
|
|
45
|
+
* **generate:** a rich text column is typed as the document it holds on the way out and as
|
|
46
|
+
`RichText | string` on the way in. The engine emits a trigger that normalises a plain string
|
|
47
|
+
into a Lexical document on insert and update, so prose can be written as prose while a read
|
|
48
|
+
always returns the document. The seed builder gets the same split, and a tightening with it:
|
|
49
|
+
the column was typed as any JSON at all, so a seed could write a bare number into one.
|
|
50
|
+
|
|
51
|
+
### Bug Fixes
|
|
52
|
+
|
|
53
|
+
* **generate:** the client augmentation follows the order the schema declares its models and
|
|
54
|
+
columns in. It sorted alphabetically, which threw away an order the author chose and the AST
|
|
55
|
+
preserved, and made it disagree with `types/database.ts` about the same table.
|
|
56
|
+
* **generate:** a `Slug` column is no longer demanded on insert. A trigger fills it, so the
|
|
57
|
+
generated type was asking for a value the database was about to overwrite.
|
|
58
|
+
* **generate:** a rich text column is typed as the Lexical document it holds. It was
|
|
59
|
+
`SerializedEditorState | string`, which made the augmentation disagree with
|
|
60
|
+
`types/database.ts` about the same column in the same project.
|
|
61
|
+
* **generate:** the augmentation's columns are indented into the block that holds them.
|
|
62
|
+
* **generate:** the augmentation and the database types use the same named types for storage
|
|
63
|
+
references and rich text, rather than one naming them and the other writing them out.
|
|
64
|
+
* **hooks:** the generated Deno stand-in for rich text loses its `| string` for the same reason,
|
|
65
|
+
and a storage reference is declared beside it.
|
|
66
|
+
* **generate:** the generated output paths are resolved in one place. `generate` applied defaults
|
|
67
|
+
and the seed runner did not, so a project that had configured no output got a builder written
|
|
68
|
+
and then a run that reported it missing.
|
|
69
|
+
* **engine:** a failed seed is reported with its result document. The engine exits non-zero and
|
|
70
|
+
prints what happened, and that was being discarded as a crash with no output.
|
|
71
|
+
* **seed:** a project pinned to an engine with no `seed` subcommand is told so, by name, before
|
|
72
|
+
anything is resolved or downloaded. It got a usage error about an unrecognised argument, which
|
|
73
|
+
names nothing about the project and reads like a broken install.
|
|
74
|
+
* **push:** a schema with a rich text column is refused on an engine that cannot normalise one.
|
|
75
|
+
The generated types accept a string on the way in and promise a document on the way out, and
|
|
76
|
+
the trigger is what makes the second half true; an older engine emits no trigger and rejects
|
|
77
|
+
nothing, so the push succeeded and a later read returned what the types call impossible.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"augmentation-generator.d.ts","sourceRoot":"","sources":["../src/augmentation-generator.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAC/C,WAAW,CAAC,EAAE;QACZ,EAAE,CAAC,EAAE;YAAE,SAAS,CAAC,EAAE,MAAM,CAAC;YAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;SAAE,CAAA;KACjD,CAAA;CACF;AAMD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAQxD;AAUD,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"augmentation-generator.d.ts","sourceRoot":"","sources":["../src/augmentation-generator.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAC/C,WAAW,CAAC,EAAE;QACZ,EAAE,CAAC,EAAE;YAAE,SAAS,CAAC,EAAE,MAAM,CAAC;YAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;SAAE,CAAA;KACjD,CAAA;CACF;AAMD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAQxD;AAUD,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAkD/D;AA0DD,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CAKvF;AA4BD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CAU1F;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CAO1F"}
|