Skip to content

Commit ed61922

Browse files
authored
fix(dbAuth): Generate types after adding new pages to make routes.home() work (redwoodjs#10882)
1 parent 6870581 commit ed61922

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/cli/src/commands/generate/dbAuth/__tests__/dbAuth.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
global.__dirname = __dirname
22

33
vi.mock('fs-extra')
4+
vi.mock('execa')
45

56
import path from 'path'
67

packages/cli/src/commands/generate/dbAuth/dbAuth.js

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import path from 'path'
22

33
import { camelCase } from 'camel-case'
44
import Enquirer from 'enquirer'
5+
import execa from 'execa'
56
import fs from 'fs-extra'
67
import { Listr } from 'listr2'
78
import terminalLink from 'terminal-link'
@@ -396,6 +397,12 @@ const tasks = ({
396397
title: 'Adding scaffold import...',
397398
task: () => addScaffoldImport(),
398399
},
400+
{
401+
title: 'Generate types...',
402+
task: () => {
403+
execa.commandSync('yarn rw g types')
404+
},
405+
},
399406
{
400407
title: 'One more thing...',
401408
task: () => {

0 commit comments

Comments
 (0)