|
29 | 29 | ], |
30 | 30 | "outputs": ["{projectRoot}/atlas/.supabase-baseline-schema.sql"], |
31 | 31 | "options": { |
32 | | - "cwd": "{workspaceRoot}", |
| 32 | + "cwd": "{projectRoot}", |
33 | 33 | "commands": [ |
34 | | - "scripts/supabase-start-locked.sh {projectRoot}", |
35 | | - "cd {projectRoot} && scripts/atlas-dump-realtime-schema" |
| 34 | + "../../scripts/supabase-start-locked.sh .", |
| 35 | + "scripts/atlas-dump-realtime-schema" |
36 | 36 | ], |
37 | 37 | "parallel": false |
38 | 38 | }, |
|
63 | 63 | "inputs": ["migrations"], |
64 | 64 | "outputs": ["{projectRoot}/.nx-inputs/verify-migrations.txt"], |
65 | 65 | "options": { |
66 | | - "cwd": "{workspaceRoot}", |
| 66 | + "cwd": "{projectRoot}", |
67 | 67 | "commands": [ |
68 | | - "scripts/supabase-start-locked.sh {projectRoot}", |
69 | | - "cd {projectRoot} && mkdir -p .nx-inputs", |
70 | | - "cd {projectRoot} && supabase db reset > .nx-inputs/verify-migrations.txt 2>&1 || (cat .nx-inputs/verify-migrations.txt && exit 1)" |
| 68 | + "../../scripts/supabase-start-locked.sh .", |
| 69 | + "mkdir -p .nx-inputs", |
| 70 | + "supabase db reset > .nx-inputs/verify-migrations.txt 2>&1 || (cat .nx-inputs/verify-migrations.txt && exit 1)" |
71 | 71 | ], |
72 | 72 | "parallel": false |
73 | 73 | }, |
|
141 | 141 | "local": true, |
142 | 142 | "cache": false, |
143 | 143 | "options": { |
144 | | - "cwd": "{workspaceRoot}", |
| 144 | + "cwd": "{projectRoot}", |
145 | 145 | "commands": [ |
146 | | - "scripts/supabase-start-locked.sh {projectRoot}" |
| 146 | + "../../scripts/supabase-start-locked.sh ." |
147 | 147 | ], |
148 | 148 | "parallel": false |
149 | 149 | } |
|
153 | 153 | "local": true, |
154 | 154 | "cache": false, |
155 | 155 | "options": { |
156 | | - "cwd": "{workspaceRoot}", |
157 | | - "commands": ["scripts/supabase-start-locked.sh {projectRoot}"], |
| 156 | + "cwd": "{projectRoot}", |
| 157 | + "commands": ["../../scripts/supabase-start-locked.sh ."], |
158 | 158 | "parallel": false |
159 | 159 | } |
160 | 160 | }, |
|
193 | 193 | "local": true, |
194 | 194 | "cache": false, |
195 | 195 | "options": { |
196 | | - "cwd": "{workspaceRoot}", |
| 196 | + "cwd": "{projectRoot}", |
197 | 197 | "commands": [ |
198 | | - "scripts/supabase-start-locked.sh {projectRoot}", |
199 | | - "cd {projectRoot} && supabase db reset" |
| 198 | + "../../scripts/supabase-start-locked.sh .", |
| 199 | + "supabase db reset" |
200 | 200 | ], |
201 | 201 | "parallel": false |
202 | 202 | } |
|
213 | 213 | "inputs": ["schemas", "migrations", "pgtapTests"], |
214 | 214 | "cache": true, |
215 | 215 | "options": { |
216 | | - "cwd": "{workspaceRoot}", |
| 216 | + "cwd": "{projectRoot}", |
217 | 217 | "commands": [ |
218 | | - "scripts/supabase-start-locked.sh {projectRoot}", |
219 | | - "cd {projectRoot} && scripts/run-test-with-colors" |
| 218 | + "../../scripts/supabase-start-locked.sh .", |
| 219 | + "scripts/run-test-with-colors" |
220 | 220 | ], |
221 | 221 | "parallel": false |
222 | 222 | } |
|
237 | 237 | "inputs": ["migrations"], |
238 | 238 | "outputs": ["{projectRoot}/src/database-types.ts"], |
239 | 239 | "options": { |
| 240 | + "cwd": "{projectRoot}", |
240 | 241 | "commands": [ |
241 | | - "scripts/supabase-start-locked.sh {projectRoot}", |
242 | | - "cd {projectRoot} && echo 'Generating database types...'", |
243 | | - "cd {projectRoot} && supabase gen types --local --schema pgflow --schema pgmq > src/database-types.ts", |
244 | | - "cd {projectRoot} && echo 'Verifying generated types...'", |
245 | | - "cd {projectRoot} && grep -q 'pgflow' src/database-types.ts || (echo 'ERROR: Generated types file does not contain pgflow schema!' && exit 1)", |
246 | | - "cd {projectRoot} && [ -s src/database-types.ts ] || (echo 'ERROR: Generated types file is empty!' && exit 1)" |
| 242 | + "../../scripts/supabase-start-locked.sh .", |
| 243 | + "echo 'Generating database types...'", |
| 244 | + "supabase gen types --local --schema pgflow --schema pgmq > src/database-types.ts", |
| 245 | + "echo 'Verifying generated types...'", |
| 246 | + "grep -q 'pgflow' src/database-types.ts || (echo 'ERROR: Generated types file does not contain pgflow schema!' && exit 1)", |
| 247 | + "[ -s src/database-types.ts ] || (echo 'ERROR: Generated types file is empty!' && exit 1)" |
247 | 248 | ], |
248 | | - "cwd": "{workspaceRoot}", |
249 | 249 | "parallel": false |
250 | 250 | }, |
251 | 251 | "cache": true |
|
256 | 256 | "inputs": ["migrations", "databaseTypes"], |
257 | 257 | "outputs": ["{projectRoot}/.nx-inputs/verify-gen-types.txt"], |
258 | 258 | "options": { |
259 | | - "cwd": "{workspaceRoot}", |
| 259 | + "cwd": "{projectRoot}", |
260 | 260 | "commands": [ |
261 | | - "scripts/supabase-start-locked.sh {projectRoot}", |
262 | | - "cd {projectRoot} && mkdir -p .nx-inputs", |
263 | | - "cd {projectRoot} && echo 'Verifying database types are up-to-date...'", |
264 | | - "cd {projectRoot} && cp src/database-types.ts .nx-inputs/database-types.ts.backup", |
265 | | - "cd {projectRoot} && supabase gen types --local --schema pgflow --schema pgmq > .nx-inputs/database-types.ts.new", |
266 | | - "cd {projectRoot} && diff .nx-inputs/database-types.ts.backup .nx-inputs/database-types.ts.new > .nx-inputs/verify-gen-types.txt 2>&1 || (echo 'ERROR: Database types are out of date! Run \"nx gen-types core\" to update them.' && echo '=============================================' && echo 'Diff between current and generated types:' && echo '=============================================' && diff -u .nx-inputs/database-types.ts.backup .nx-inputs/database-types.ts.new || true && echo '=============================================' && exit 1)", |
267 | | - "cd {projectRoot} && echo 'Database types are up-to-date' > .nx-inputs/verify-gen-types.txt" |
| 261 | + "../../scripts/supabase-start-locked.sh .", |
| 262 | + "mkdir -p .nx-inputs", |
| 263 | + "echo 'Verifying database types are up-to-date...'", |
| 264 | + "cp src/database-types.ts .nx-inputs/database-types.ts.backup", |
| 265 | + "supabase gen types --local --schema pgflow --schema pgmq > .nx-inputs/database-types.ts.new", |
| 266 | + "diff .nx-inputs/database-types.ts.backup .nx-inputs/database-types.ts.new > .nx-inputs/verify-gen-types.txt 2>&1 || (echo 'ERROR: Database types are out of date! Run \"nx gen-types core\" to update them.' && echo '=============================================' && echo 'Diff between current and generated types:' && echo '=============================================' && diff -u .nx-inputs/database-types.ts.backup .nx-inputs/database-types.ts.new || true && echo '=============================================' && exit 1)", |
| 267 | + "echo 'Database types are up-to-date' > .nx-inputs/verify-gen-types.txt" |
268 | 268 | ], |
269 | 269 | "parallel": false |
270 | 270 | }, |
271 | 271 | "cache": true |
272 | 272 | }, |
273 | 273 | "test:types:vitest": { |
274 | 274 | "executor": "nx:run-commands", |
275 | | - "cache": true, |
276 | | - "dependsOn": ["build"], |
277 | | - "inputs": ["default", "^production"], |
| 275 | + "dependsOn": ["^build"], |
278 | 276 | "options": { |
279 | 277 | "cwd": "{projectRoot}", |
280 | | - "command": "pnpm vitest --typecheck.only --run" |
| 278 | + "command": "pnpm vitest --typecheck.only --run --config vitest.typecheck.config.ts" |
281 | 279 | } |
282 | 280 | }, |
283 | 281 | "test:types:strict": { |
|
0 commit comments