|
37 | 37 | "build:esm": "cpy wrapper.mjs dist/esm/",
|
38 | 38 | "docs": "typedoc src/index.ts --out docs/v2",
|
39 | 39 | "docs:json": "typedoc --json docs/v2/spec.json --excludeExternals src/index.ts",
|
40 |
| - "test": "run-s format:check test:types db:clean db:run test:run db:clean && node test/smoke.cjs && node test/smoke.mjs", |
| 40 | + "test": "run-s format:check test:types db:clean db:run test:generated-types test:run db:clean && node test/smoke.cjs && node test/smoke.mjs", |
41 | 41 | "test:run": "jest --runInBand --coverage",
|
| 42 | + "test:generated-types": "run-s db:generate-test-types && git diff --exit-code test/types.generated.ts || (echo '❌ Generated types are not up to date. Run npm run db:generate-test-types.' && exit 1)", |
42 | 43 | "test:update": "run-s db:clean db:run db:generate-test-types && jest --runInBand --updateSnapshot && run-s db:clean",
|
43 | 44 | "test:types": "run-s build && tsd --files 'test/**/*.test*.ts'",
|
44 | 45 | "test:types:watch": "chokidar 'src/**/*.ts' 'test/**/*.ts' -c 'npm run test:types'",
|
45 | 46 | "type-check": "tsc --noEmit --project tsconfig.json",
|
46 | 47 | "type-check:test": "tsc --noEmit --project tsconfig.test.json",
|
47 | 48 | "db:clean": "cd test/db && docker compose down --volumes",
|
48 | 49 | "db:run": "cd test/db && docker compose up --detach && wait-for-localhost 3000",
|
49 |
| - "db:generate-test-types": "cd test/db && docker compose up --detach && wait-for-localhost 8080 && curl --location 'http://0.0.0.0:8080/generators/typescript?included_schemas=public,personal&detect_one_to_one_relationships=true' > ../types.generated.ts && sed -i '' 's/export type Json = .*/export type Json = unknown;/' ../types.generated.ts" |
| 50 | + "db:generate-test-types": "cd test/db && docker compose up --detach && wait-for-localhost 8080 && curl --location 'http://0.0.0.0:8080/generators/typescript?included_schemas=public,personal&detect_one_to_one_relationships=true' > ../types.generated.ts && node ../scripts/update-json-type.js && prettier --write ../types.generated.ts" |
50 | 51 | },
|
51 | 52 | "dependencies": {
|
52 | 53 | "@supabase/node-fetch": "^2.6.14"
|
|
0 commit comments