forked from redwoodjs/redwood
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:redwoodjs/redwood into chore/web-pa…
…ckage-cjsonly-new-build * 'main' of github.com:redwoodjs/redwood: (66 commits) chore(testing dbAuth): Add "yes" prompt testing for WebAuthn (redwoodjs#10823) chore(testing dbAuth): Mock console.log to silence test output (redwoodjs#10821) chore(testing dbAuth): Remove duplicated tests (redwoodjs#10822) chore(testing dbAuth): Remove outdated code (redwoodjs#10820) chore(testing dbAuth): Consistent naming and fix blue squiggles (redwoodjs#10819) chore(testing dbAuth): provide mock implementations (redwoodjs#10818) feat(dbAuth): Only suggest dbAuth setup if needed (redwoodjs#10793) chore(dbAuth): Fix test for webauthn prompt in `g dbAuth` (redwoodjs#10814) fix(dbAuth): Print the correct "post message" after generation (redwoodjs#10813) fix(dbauth): Fix spacing issue in task titles (redwoodjs#10811) deps(docs): update braces package (redwoodjs#10809) chore(deps): bump braces from 3.0.2 to 3.0.3 in /tasks/check (redwoodjs#10808) chore(deps): update yarn to v4.3.0 (redwoodjs#10801) chore(deps): update dependency tsx to v4.15.2 (redwoodjs#10800) chore(deps): update dependency @clerk/types to v3.65.2 (redwoodjs#10795) chore(deps): update dependency firebase to v10.12.2 (redwoodjs#10802) chore(deps): update dependency rollup to v4.18.0 (redwoodjs#10799) chore(deps): update dependency jsdom to v24.1.0 (redwoodjs#10798) chore(deps): update dependency @types/vscode to v1.90.0 (redwoodjs#10796) chore(deps): update dependency @clerk/clerk-react to v4.32.2 (redwoodjs#10794) ...
- Loading branch information
Showing
174 changed files
with
3,023 additions
and
1,306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- Updates seeds script to be more generic, no more errors throw on first run (#10739) by @cannikin | ||
|
||
Updated the template seed script to not contain any actual seed data, just comments about how to use it when the time comes. The first time you migrate the console message will point you to the file, and the file will point you to a new docs page which goes into much more detail on usage. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- feat(cli): react compiler lint only setting (#10761) by @Josh-Walker-GM | ||
|
||
You can now add `lintOnly = true` within your `[experimental.reactCompiler]` TOML settings to enable the react compiler linting rules without the compiler itself enabled during code compilation. See [here](https://community.redwoodjs.com/t/react-compiler-setup-experimental/7128) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- fix(dbauth): Combine react imports (#10788) by @Tobbe | ||
|
||
Clean up imports in `g dbAuth` templates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- fix(dbauth): Don't duplicate authDecoder creation (#10791) by @Tobbe | ||
|
||
Make it possible to run the dbAuth setup command more than once without getting invalid code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- feat(dbAuth): Only suggest dbAuth setup if needed (#10793) by @Tobbe | ||
|
||
Detect if dbAuth is already setup, and don't suggest setting it up if it is. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- fix(dbauth): Fix spacing issue in task titles (#10811) by @Tobbe | ||
|
||
Fix double space issue in `yarn rw generate dbAuth` output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- fix(dbAuth): Print the correct "post message" after setup (#10813) by @Tobbe | ||
|
||
After running `yarn rw generate dbAuth` the correct message describing the | ||
needed manual steps is now printed if the user choses to enable WebAuthn | ||
support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ | |
"Flightcontrol", | ||
"graphiql", | ||
"memfs", | ||
"mojombo", | ||
"OGIMAGE", | ||
"opentelemetry", | ||
"pino", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,28 @@ | ||
import type { Prisma } from '@prisma/client' | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
import { db } from 'api/src/lib/db' | ||
|
||
// Manually apply seeds via the `yarn rw prisma db seed` command. | ||
// | ||
// Seeds automatically run the first time you run the `yarn rw prisma migrate dev` | ||
// command and every time you run the `yarn rw prisma migrate reset` command. | ||
// | ||
// See https://redwoodjs.com/docs/database-seeds for more info | ||
|
||
export default async () => { | ||
try { | ||
// Create your database records here! For example, seed some users: | ||
// | ||
// Manually seed via `yarn rw prisma db seed` | ||
// Seeds automatically with `yarn rw prisma migrate dev` and `yarn rw prisma migrate reset` | ||
// | ||
// Update "const data = []" to match your data model and seeding needs | ||
// const users = [ | ||
// { name: 'Alice', email: 'alice@redwoodjs.com }, | ||
// { name: 'Bob', email: 'bob@redwoodjs.com }, | ||
// ] | ||
// | ||
const data: Prisma.UserExampleCreateArgs['data'][] = [ | ||
// To try this example data with the UserExample model in schema.prisma, | ||
// uncomment the lines below and run 'yarn rw prisma migrate dev' | ||
// | ||
// { name: 'alice', email: 'alice@example.com' }, | ||
// { name: 'mark', email: 'mark@example.com' }, | ||
// { name: 'jackie', email: 'jackie@example.com' }, | ||
// { name: 'bob', email: 'bob@example.com' }, | ||
] | ||
console.log( | ||
"\nUsing the default './scripts/seed.{js,ts}' template\nEdit the file to add seed data\n" | ||
) | ||
// await db.user.createMany({ data: users }) | ||
|
||
// Note: if using PostgreSQL, using `createMany` to insert multiple records is much faster | ||
// @see: https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#createmany | ||
await Promise.all( | ||
// | ||
// Change to match your data model and seeding needs | ||
// | ||
data.map(async (data: Prisma.UserExampleCreateArgs['data']) => { | ||
const record = await db.userExample.create({ data }) | ||
console.log(record) | ||
}) | ||
console.info( | ||
'\n No seed data, skipping. See scripts/seed.ts to start seeding your database!\n' | ||
) | ||
} catch (error) { | ||
console.warn('Please define your seed data.') | ||
console.error(error) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,28 @@ | ||
import type { Prisma } from '@prisma/client' | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
import { db } from 'api/src/lib/db' | ||
|
||
// Manually apply seeds via the `yarn rw prisma db seed` command. | ||
// | ||
// Seeds automatically run the first time you run the `yarn rw prisma migrate dev` | ||
// command and every time you run the `yarn rw prisma migrate reset` command. | ||
// | ||
// See https://redwoodjs.com/docs/database-seeds for more info | ||
|
||
export default async () => { | ||
try { | ||
// Create your database records here! For example, seed some users: | ||
// | ||
// Manually seed via `yarn rw prisma db seed` | ||
// Seeds automatically with `yarn rw prisma migrate dev` and `yarn rw prisma migrate reset` | ||
// | ||
// Update "const data = []" to match your data model and seeding needs | ||
// const users = [ | ||
// { name: 'Alice', email: 'alice@redwoodjs.com }, | ||
// { name: 'Bob', email: 'bob@redwoodjs.com }, | ||
// ] | ||
// | ||
const data: Prisma.UserExampleCreateArgs['data'][] = [ | ||
// To try this example data with the UserExample model in schema.prisma, | ||
// uncomment the lines below and run 'yarn rw prisma migrate dev' | ||
// | ||
// { name: 'alice', email: 'alice@example.com' }, | ||
// { name: 'mark', email: 'mark@example.com' }, | ||
// { name: 'jackie', email: 'jackie@example.com' }, | ||
// { name: 'bob', email: 'bob@example.com' }, | ||
] | ||
console.log( | ||
"\nUsing the default './scripts/seed.{js,ts}' template\nEdit the file to add seed data\n" | ||
) | ||
// await db.user.createMany({ data: users }) | ||
|
||
// Note: if using PostgreSQL, using `createMany` to insert multiple records is much faster | ||
// @see: https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#createmany | ||
Promise.all( | ||
// | ||
// Change to match your data model and seeding needs | ||
// | ||
data.map(async (data: Prisma.UserExampleCreateArgs['data']) => { | ||
const record = await db.userExample.create({ data }) | ||
console.log(record) | ||
}) | ||
console.info( | ||
'\n No seed data, skipping. See scripts/seed.ts to start seeding your database!\n' | ||
) | ||
|
||
// If using dbAuth and seeding users, you'll need to add a `hashedPassword` | ||
// and associated `salt` to their record. Here's how to create them using | ||
// the same algorithm that dbAuth uses internally: | ||
// | ||
// import { hashPassword } from '@redwoodjs/auth-dbauth-api' | ||
// | ||
// const users = [ | ||
// { name: 'john', email: 'john@example.com', password: 'secret1' }, | ||
// { name: 'jane', email: 'jane@example.com', password: 'secret2' } | ||
// ] | ||
// | ||
// for (const user of users) { | ||
// const [hashedPassword, salt] = hashPassword(user.password) | ||
// await db.user.create({ | ||
// data: { | ||
// name: user.name, | ||
// email: user.email, | ||
// hashedPassword, | ||
// salt | ||
// } | ||
// }) | ||
// } | ||
} catch (error) { | ||
console.warn('Please define your seed data.') | ||
console.error(error) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
import type { TagDescriptor } from '@redwoodjs/web/dist/components/htmlTags' | ||
|
||
import App from './App' | ||
import { Document } from './Document' | ||
import Routes from './Routes' | ||
|
||
interface Props { | ||
css: string[] | ||
meta?: TagDescriptor[] | ||
location: { | ||
pathname: string | ||
hash?: string | ||
search?: string | ||
} | ||
} | ||
|
||
export const ServerEntry: React.FC<Props> = ({ css, meta, location }) => { | ||
export const ServerEntry: React.FC<Props> = ({ css, meta }) => { | ||
return ( | ||
<Document css={css} meta={meta}> | ||
<Routes location={location} /> | ||
<App> | ||
<Routes /> | ||
</App> | ||
</Document> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.