From c65ceb61fdbef493e4e03df13f29de0840accc97 Mon Sep 17 00:00:00 2001 From: Rihan Date: Tue, 18 Jun 2024 18:45:59 +0100 Subject: [PATCH 001/128] docs: install nuxt module using nuxi cli (#6113) change install docs to install using `nuxi module add`, which is the new standard way of installing modules across the Nuxt ecosystem, as it automatically adds it to nuxt.config.ts. --- .../900-prisma-nuxt-module.mdx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/content/200-orm/800-more/600-help-and-troubleshooting/100-help-articles/900-prisma-nuxt-module.mdx b/content/200-orm/800-more/600-help-and-troubleshooting/100-help-articles/900-prisma-nuxt-module.mdx index ff7e72017d..491addf406 100644 --- a/content/200-orm/800-more/600-help-and-troubleshooting/100-help-articles/900-prisma-nuxt-module.mdx +++ b/content/200-orm/800-more/600-help-and-troubleshooting/100-help-articles/900-prisma-nuxt-module.mdx @@ -26,21 +26,13 @@ This module provides several features to streamline the setup and usage of Prism npx nuxi@latest init test-nuxt-app ``` -2. Navigate to project directory and install `@prisma/nuxt`: +2. Navigate to project directory and install `@prisma/nuxt` using the Nuxt CLI: ```terminal cd test-nuxt-app - npm install @prisma/nuxt + npx nuxi@latest module add @prisma/nuxt ``` -3. Add `@prisma/nuxt` to your `nuxt.config.ts`: - ```typescript - export default defineNuxtConfig({ - modules: ["@prisma/nuxt"], - devtools: { enabled: true }, - }); - ``` - -4. Start the development server: +3. Start the development server: ```terminal npm run dev ``` @@ -85,7 +77,7 @@ This module provides several features to streamline the setup and usage of Prism 5. Install and generate a [Prisma Client](/orm/reference/prisma-client-reference) which enables you to query your DB 6. Prompt you to start the [Prisma Studio](/orm/tools/prisma-studio) -5. You can now use Prisma ORM in your project. If you accepted the prompt to add Prisma Studio, you can access Prisma Studio through the Nuxt Devtools. See the [usage section](#usage) to learn how to use Prisma Client in your app. +4. You can now use Prisma ORM in your project. If you accepted the prompt to add Prisma Studio, you can access Prisma Studio through the Nuxt Devtools. See the [usage section](#usage) to learn how to use Prisma Client in your app. ## Using a different database provider @@ -304,4 +296,4 @@ The `usePrismaClient` module does not currently allow for configuration of `Pris ### The `usePrismaClient` composable is not supported in edge runtimes -The `usePrismaClient` composable currently relies on a `PrismaClient` instance that does not work in edge runtimes. If you require edge support for the composable, please let us know on [Discord](https://pris.ly/discord) or [GitHub](https://github.com/prisma/nuxt-prisma). \ No newline at end of file +The `usePrismaClient` composable currently relies on a `PrismaClient` instance that does not work in edge runtimes. If you require edge support for the composable, please let us know on [Discord](https://pris.ly/discord) or [GitHub](https://github.com/prisma/nuxt-prisma). From f285d2d953246642a3807e4f7cefa2a910916c16 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Wed, 19 Jun 2024 00:00:18 +0200 Subject: [PATCH 002/128] fix(seeding): Small clarity fixes (#6032) * fix(seeding): Small clarity fixes * Update content/200-orm/300-prisma-migrate/300-workflows/10-seeding.mdx Co-authored-by: Jan Piotrowski --------- Co-authored-by: Jon Harrell <4829245+jharrell@users.noreply.github.com> --- .../300-prisma-migrate/300-workflows/10-seeding.mdx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/content/200-orm/300-prisma-migrate/300-workflows/10-seeding.mdx b/content/200-orm/300-prisma-migrate/300-workflows/10-seeding.mdx index da4b30b2d3..70893e2ae6 100644 --- a/content/200-orm/300-prisma-migrate/300-workflows/10-seeding.mdx +++ b/content/200-orm/300-prisma-migrate/300-workflows/10-seeding.mdx @@ -9,7 +9,7 @@ tocDepth: 3 This guide describes how to seed your database using Prisma Client and Prisma ORM's integrated seeding functionality. Seeding allows you to consistently re-create the same data in your database and can be used to: -- Populate your database with data that is required for your application to start - for example, a default language or a default currency. +- Populate your database with data that is required for your application to start, such as a default language or currency. - Provide basic data for validating and using your application in a development environment. This is particularly useful if you are using Prisma Migrate, which sometimes requires resetting your development database. @@ -57,17 +57,19 @@ This can be useful to reduce memory usage (RAM) and increase execution speed of ## Integrated seeding with Prisma Migrate -Database seeding happens in two ways with Prisma ORM: manually with `prisma db seed` and automatically in `prisma migrate dev` and `prisma migrate reset`. +Database seeding happens in two ways with Prisma ORM: manually with `prisma db seed` and automatically in `prisma migrate reset` and (in some scenarios) `prisma migrate dev`. With `prisma db seed`, _you_ decide when to invoke the seed command. It can be useful for a test setup or to prepare a new development environment, for example. -Prisma Migrate also integrates seamlessly with your seeds, assuming you follow the steps in the section below. When Prisma Migrate resets the development database, seeding is triggered automatically if you have a "seed" property in the "prisma" section in your package.json. +Prisma Migrate also integrates seamlessly with your seeds, assuming you follow the steps in the section below. Seeding is triggered automatically when Prisma Migrate resets the development database. Prisma Migrate resets the database and triggers seeding in the following scenarios: - You manually run the `prisma migrate reset` CLI command. - The database is reset interactively in the context of using `prisma migrate dev` - for example, as a result of migration history conflicts or database schema drift. -- When you want to use `prisma migrate dev` or `prisma migrate reset` without seeding, you can pass the --skip-seed flag. +- The database is actually created by `prisma migrate dev`, because it did not exist before. + +When you want to use `prisma migrate dev` or `prisma migrate reset` without seeding, you can pass the `--skip-seed` flag. ## Example seed scripts From 4f2023b9e164fc3baaccb52eb67942b2243b4817 Mon Sep 17 00:00:00 2001 From: Jon Harrell <4829245+jharrell@users.noreply.github.com> Date: Wed, 19 Jun 2024 10:38:58 -0500 Subject: [PATCH 003/128] fix(cookie banner): load enzuzo through gtm (#6114) * load enzuzo through gtm * add empty alt text --- docusaurus.config.ts | 11 ++--------- src/theme/Footer/Layout/index.tsx | 1 + 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 3c219536e1..73c9c810ef 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -34,7 +34,7 @@ const config: Config = { // kapa.ai script { src: "https://widget.kapa.ai/kapa-widget.bundle.js", - defer: true, + async: true, "data-website-id": "1b51bb03-43cc-4ef4-95f1-93288a91b560", "data-project-name": "Prisma", "data-project-color": "#2D3748", @@ -55,13 +55,10 @@ const config: Config = { "data-button-box-shadow": "drop-shadow(0px 0.724px 1.251px rgba(14, 18, 28, 0.02)) drop-shadow(0px 1.608px 2.909px rgba(14, 18, 28, 0.04)) drop-shadow(0px 2.793px 5.225px rgba(14, 18, 28, 0.06)) drop-shadow(0px 4.55px 8.671px rgba(14, 18, 28, 0.07)) drop-shadow(0px 7.485px 14.285px rgba(14, 18, 28, 0.08)) drop-shadow(0px 13.358px 24.966px rgba(14, 18, 28, 0.09)) drop-shadow(0px 33px 54px rgba(14, 18, 28, 0.07))", }, - // Enzuzo Cookies Consent script for prisma.io - { - src: "https://app.enzuzo.com/apps/enzuzo/static/js/__enzuzo-cookiebar.js?uuid=5606ab18-eb9a-11ee-98cc-b303d4429aa8", - }, // Tolt script { src: "https://cdn.tolt.io/tolt.js", + async: true, "data-tolt": "fda67739-7ed0-42d2-b716-6da0edbec191", }, ], @@ -70,10 +67,6 @@ const config: Config = { [ "classic", { - gtag: { - trackingID: "G-YS7QHR40SL", - anonymizeIP: true, - }, googleTagManager: { containerId: "GTM-KCGZPWB", }, diff --git a/src/theme/Footer/Layout/index.tsx b/src/theme/Footer/Layout/index.tsx index 19efcc5d03..d9bb7b531b 100644 --- a/src/theme/Footer/Layout/index.tsx +++ b/src/theme/Footer/Layout/index.tsx @@ -12,6 +12,7 @@ export default function FooterLayout({ style, links, logo, copyright }) {
From 9b3f4e077e2d0aa3aa8d97a83f52aac078535119 Mon Sep 17 00:00:00 2001 From: Elias Papavasileiou Date: Sun, 23 Jun 2024 06:24:33 +0300 Subject: [PATCH 004/128] docs(03-prisma-and-mongoose.mdx): fix bold subtitle typo (#6118) There was a space between the end of the word and the trailing two "*", resulting in the title not being bold on render and the "*" being visible. --- .../200-orm/800-more/400-comparisons/03-prisma-and-mongoose.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/200-orm/800-more/400-comparisons/03-prisma-and-mongoose.mdx b/content/200-orm/800-more/400-comparisons/03-prisma-and-mongoose.mdx index 3b1d86c8aa..2201e00fb2 100644 --- a/content/200-orm/800-more/400-comparisons/03-prisma-and-mongoose.mdx +++ b/content/200-orm/800-more/400-comparisons/03-prisma-and-mongoose.mdx @@ -213,7 +213,7 @@ await user.save() ## Updating objects -**Prisma ORM ** +**Prisma ORM** ```ts const user = await prisma.user.update({ From cbfbdc1c28aca232a35ab46d508057a4e6fb95c5 Mon Sep 17 00:00:00 2001 From: carlagn Date: Mon, 24 Jun 2024 09:53:04 +0100 Subject: [PATCH 005/128] feat: WEB-498 Add compliance icons to footer (#6117) * initial version for docusaurus footer with compliance logos * Hide iso and soc logos * Add links to trust prisma on compliance logos --- docusaurus.config.ts | 89 ++++++++++--------- src/css/custom.css | 58 +----------- src/theme/Footer/Layout/index.tsx | 13 ++- src/theme/Footer/Layout/styles.module.scss | 51 +++++++++-- src/theme/Footer/Links/MultiColumn/index.tsx | 10 ++- .../Links/MultiColumn/styles.module.scss | 22 ++++- static/img/icons/gdpr.svg | 22 +++++ static/img/icons/hipaa.svg | 21 +++++ static/img/icons/iso27.svg | 15 ++++ static/img/icons/soc2.svg | 7 ++ 10 files changed, 194 insertions(+), 114 deletions(-) create mode 100644 static/img/icons/gdpr.svg create mode 100644 static/img/icons/hipaa.svg create mode 100644 static/img/icons/iso27.svg create mode 100644 static/img/icons/soc2.svg diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 73c9c810ef..f98ee38e38 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -187,6 +187,51 @@ const config: Config = { footer: { style: "dark", links: [ + { + title: "socials", + items: [ + { + label: " ", + href: "https://discord.gg/KQyTW2H5ca", + customProps: { + icon: "fa-brands fa-discord", + internal: true, + }, + }, + { + label: " ", + href: "https://x.com/prisma", + customProps: { + icon: "fa-brands fa-x-twitter", + internal: true, + }, + }, + { + label: " ", + href: "https://www.youtube.com/prismadata", + customProps: { + icon: "fa-brands fa-youtube", + internal: true, + }, + }, + { + label: " ", + href: "https://pris.ly/whatsapp", + customProps: { + icon: "fa-brands fa-whatsapp", + internal: true, + }, + }, + { + label: " ", + href: "https://github.com/prisma", + customProps: { + icon: "fa-brands fa-github", + internal: true, + }, + }, + ], + }, { title: "Product", items: [ @@ -380,50 +425,6 @@ const config: Config = { }, ], }, - { - items: [ - { - label: " ", - href: "https://discord.gg/KQyTW2H5ca", - customProps: { - icon: "fa-brands fa-discord", - internal: true, - }, - }, - { - label: " ", - href: "https://x.com/prisma", - customProps: { - icon: "fa-brands fa-x-twitter", - internal: true, - }, - }, - { - label: " ", - href: "https://www.youtube.com/prismadata", - customProps: { - icon: "fa-brands fa-youtube", - internal: true, - }, - }, - { - label: " ", - href: "https://pris.ly/whatsapp", - customProps: { - icon: "fa-brands fa-whatsapp", - internal: true, - }, - }, - { - label: " ", - href: "https://github.com/prisma", - customProps: { - icon: "fa-brands fa-github", - internal: true, - }, - }, - ], - }, ], logo: { srcDark: "img/logo-white.svg", diff --git a/src/css/custom.css b/src/css/custom.css index c966dfd8bf..327afffcb5 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -734,6 +734,10 @@ hr { } } +.footer__item .fa-brands { + font-size: 24px !important; +} + .internal>i { display: none; } @@ -748,60 +752,6 @@ hr { height: 28px; } -.footer__col:last-child { - position: absolute; - height: var(--footer-bottom-height); - display: flex; - align-items: center; - justify-content: flex-end; - padding: 0; - width: auto; - top: calc(100% + 100px); - left: 0; -} - -@media (min-width: 520px) { - .footer__col:last-child { - top: calc(100% + 20px); - right: 0; - left: unset; - } -} - -@media (min-width: 768px) { - .footer__col:last-child { - top: calc(100% + 80px); - } -} - -@media (min-width: 1040px) { - .footer__col:last-child { - top: calc(100% + 120px); - } -} - -.footer__col:last-child>.footer__title { - display: none; -} - -.footer__col:last-child>ul { - display: flex; - gap: 20px; - font-size: 1.375rem; - color: white; -} - -.footer__col:last-child .footer__item a { - font-size: 1.375rem; - color: white; -} - -.footer__col:last-child, -.footer__item a:hover { - color: var(--indigo-link-color); - text-decoration: none; -} - .footer__copyright { text-align: left; font-size: 1.125rem; diff --git a/src/theme/Footer/Layout/index.tsx b/src/theme/Footer/Layout/index.tsx index d9bb7b531b..6cccfd5bd3 100644 --- a/src/theme/Footer/Layout/index.tsx +++ b/src/theme/Footer/Layout/index.tsx @@ -5,9 +5,11 @@ import React from "react"; import styles from "./styles.module.scss"; export default function FooterLayout({ style, links, logo, copyright }) { + console.log(links) return (