From 051e681701c90e436038ce62d0f823fb3406a20d Mon Sep 17 00:00:00 2001 From: Ansari Date: Wed, 10 May 2023 20:13:07 +0530 Subject: [PATCH 01/66] =?UTF-8?q?Long=20filename=20fix=20=F0=9F=97=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/components/dialog/Dialog.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/ui/components/dialog/Dialog.tsx b/packages/ui/components/dialog/Dialog.tsx index 07c92686b..81aa2d1f1 100644 --- a/packages/ui/components/dialog/Dialog.tsx +++ b/packages/ui/components/dialog/Dialog.tsx @@ -71,7 +71,9 @@ export function Dialog({

- {`"${document.title}" will be sent to ${unsentEmailsLength} recipients.`} + {`"${document.title.length > 20 ? document.title.substring(0, 7) + "..." + + document.title.substring(document.title.length - 7) : document.title}" + will be sent to ${unsentEmailsLength} recipients.`}

From 9b993c08f15cd316f097f23f44d09035b74963c7 Mon Sep 17 00:00:00 2001 From: Ansari Date: Mon, 15 May 2023 15:39:37 +0530 Subject: [PATCH 02/66] Truncate prop added --- packages/ui/components/dialog/Dialog.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/ui/components/dialog/Dialog.tsx b/packages/ui/components/dialog/Dialog.tsx index 81aa2d1f1..23a4821d1 100644 --- a/packages/ui/components/dialog/Dialog.tsx +++ b/packages/ui/components/dialog/Dialog.tsx @@ -19,6 +19,7 @@ type DialogProps = { formValues: FormValue[]; setLoading: (loading: boolean) => void; icon: React.ReactNode; + trunate: boolean; }; export function Dialog({ @@ -29,11 +30,17 @@ export function Dialog({ formValues, setLoading, icon, + trunate = true, }: DialogProps) { const unsentEmailsLength = formValues.filter( (s: any) => s.email && s.sendStatus != "SENT" ).length; + if (trunate && document.title.length > 20) { + document.title = document.title.substring(0, 7) + "..." + + document.title.substring(document.title.length - 7); + } + return ( @@ -71,9 +78,7 @@ export function Dialog({

- {`"${document.title.length > 20 ? document.title.substring(0, 7) + "..." + - document.title.substring(document.title.length - 7) : document.title}" - will be sent to ${unsentEmailsLength} recipients.`} + {`"${document.title}" will be sent to ${unsentEmailsLength} recipients.`}

From 8bf6594cf41aa45d498e5a22c06fa148bf023064 Mon Sep 17 00:00:00 2001 From: Ansari Date: Mon, 15 May 2023 15:43:29 +0530 Subject: [PATCH 03/66] =?UTF-8?q?prop=20name=20changed=20=F0=9F=93=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/components/dialog/Dialog.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ui/components/dialog/Dialog.tsx b/packages/ui/components/dialog/Dialog.tsx index 23a4821d1..c1244394a 100644 --- a/packages/ui/components/dialog/Dialog.tsx +++ b/packages/ui/components/dialog/Dialog.tsx @@ -19,7 +19,7 @@ type DialogProps = { formValues: FormValue[]; setLoading: (loading: boolean) => void; icon: React.ReactNode; - trunate: boolean; + trunateTitle: boolean; }; export function Dialog({ @@ -30,13 +30,13 @@ export function Dialog({ formValues, setLoading, icon, - trunate = true, + trunateTitle = true, }: DialogProps) { const unsentEmailsLength = formValues.filter( (s: any) => s.email && s.sendStatus != "SENT" ).length; - if (trunate && document.title.length > 20) { + if (trunateTitle && document.title.length > 20) { document.title = document.title.substring(0, 7) + "..." + document.title.substring(document.title.length - 7); } From 748f842115b41534a9b8ca09315ae3460d4eab88 Mon Sep 17 00:00:00 2001 From: Mythie Date: Thu, 25 May 2023 18:43:37 +1000 Subject: [PATCH 04/66] fix: update prop typo, extract truncate method --- apps/web/pages/documents/[id]/signed.tsx | 3 ++- packages/lib/helpers/index.ts | 1 + packages/lib/helpers/strings.ts | 13 +++++++++++++ packages/ui/components/dialog/Dialog.tsx | 14 ++++++-------- 4 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 packages/lib/helpers/index.ts create mode 100644 packages/lib/helpers/strings.ts diff --git a/apps/web/pages/documents/[id]/signed.tsx b/apps/web/pages/documents/[id]/signed.tsx index 53f375ab2..131cf734d 100644 --- a/apps/web/pages/documents/[id]/signed.tsx +++ b/apps/web/pages/documents/[id]/signed.tsx @@ -5,6 +5,7 @@ import prisma from "@documenso/prisma"; import { Button, IconButton } from "@documenso/ui"; import { NextPageWithLayout } from "../../_app"; import { ArrowDownTrayIcon, CheckBadgeIcon } from "@heroicons/react/24/outline"; +import { truncate } from "@documenso/lib/helpers"; const Signed: NextPageWithLayout = (props: any) => { const router = useRouter(); @@ -21,7 +22,7 @@ const Signed: NextPageWithLayout = (props: any) => {

It's done!

- You signed "{props.document.title}" + You signed "{truncate(props.document.title)}"

- {`"${document.title}" will be sent to ${unsentEmailsLength} recipients.`} + {`"${documentTitle}" will be sent to ${unsentEmailsLength} recipients.`}

From 3444d7fd9338c3b6da1860753b5fd020760f787a Mon Sep 17 00:00:00 2001 From: Doug Andrade Date: Sun, 28 May 2023 19:44:00 -0400 Subject: [PATCH 05/66] task: simplify next.config.js --- apps/web/next.config.js | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/apps/web/next.config.js b/apps/web/next.config.js index c7b94279e..1ea48cefb 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -4,22 +4,15 @@ require("dotenv").config({ path: "../../.env" }); const nextConfig = { reactStrictMode: true, swcMinify: false, + transpilePackages: [ + "@documenso/prisma", + "@documenso/lib", + "@documenso/ui", + "@documenso/pdf", + "@documenso/features", + "@documenso/signing", + "react-signature-canvas", + ], }; -const transpileModules = require("next-transpile-modules")([ - "@documenso/prisma", - "@documenso/lib", - "@documenso/ui", - "@documenso/pdf", - "@documenso/features", - "@documenso/signing", - "react-signature-canvas", -]); - -const plugins = [ - transpileModules -]; - -const moduleExports = () => plugins.reduce((acc, next) => next(acc), nextConfig); - -module.exports = moduleExports; +module.exports = nextConfig; From ad4d844b4d7c26961649719bbe99fda5086a1068 Mon Sep 17 00:00:00 2001 From: Doug Andrade Date: Sun, 28 May 2023 19:53:44 -0400 Subject: [PATCH 06/66] remove: next-transpile-modules dependency --- apps/web/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/web/package.json b/apps/web/package.json index a104e0fde..349936c8a 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -56,11 +56,10 @@ "eslint": "8.27.0", "eslint-config-next": "13.0.3", "file-loader": "^6.2.0", - "next-transpile-modules": "^10.0.0", "postcss": "^8.4.19", "sass": "^1.57.1", "stripe-cli": "^0.1.0", "tailwindcss": "^3.2.4", "typescript": "4.8.4" } -} \ No newline at end of file +} From b928993510b9c4633ffcf74de401b5c7453ff137 Mon Sep 17 00:00:00 2001 From: Doug Andrade Date: Sun, 28 May 2023 20:06:43 -0400 Subject: [PATCH 07/66] typo: /ressources >> /resources --- README.md | 10 ++++------ apps/web/{ressources => resources}/certificate.p12 | Bin apps/web/{ressources => resources}/example.pdf | Bin packages/signing/addDigitalSignature.ts | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) rename apps/web/{ressources => resources}/certificate.p12 (100%) rename apps/web/{ressources => resources}/example.pdf (100%) diff --git a/README.md b/README.md index 26316054f..0861312fb 100644 --- a/README.md +++ b/README.md @@ -78,8 +78,6 @@ The current project goal is to [release a production ready version](https://g - To contribute please see our [contribution guide](https://github.com/documenso/documenso/blob/main/CONTRIBUTING.md). - - # Tech Documenso is built using awesome open source tech including: @@ -123,7 +121,7 @@ Want to get up and running quickly? Follow these steps: - This will spin up a postgres database and inbucket mail server in docker containers. - Run `npm run dev` in the root directory - Want it even faster? Just use - ```sh + ```sh npm run d ``` @@ -157,10 +155,10 @@ Follow these steps to setup documenso on you local machine: --- - Optional: Seed the database using npm run db-seed to create a test user and document -- Optional: Upload and sign apps/web/ressources/example.pdf manually to test your setup +- Optional: Upload and sign apps/web/resources/example.pdf manually to test your setup - Optional: Create your own signing certificate - - A demo certificate is provided in `/app/web/ressources/certificate.p12` + - A demo certificate is provided in `/app/web/resources/certificate.p12` - To generate your own using these steps and a Linux Terminal or Windows Subsystem for Linux (WSL) see **[Create your own signing certificate](#creating-your-own-signing-certificate)**. ## Updating @@ -185,7 +183,7 @@ For the digital signature of your documents you need a signing certificate in .p 3. Combine the private key and the self-signed certificate to create the p12 certificate. You can run the following command to do this: \ openssl pkcs12 -export -out certificate.p12 -inkey private.key -in certificate.crt 4. You will be prompted to enter a password for the p12 file. Choose a strong password and remember it, as you will need it to use the certificate (**can be empty for dev certificates**) -5. Place the certificate /apps/web/ressource/certificate.p12 +5. Place the certificate /apps/web/resources/certificate.p12 # Docker diff --git a/apps/web/ressources/certificate.p12 b/apps/web/resources/certificate.p12 similarity index 100% rename from apps/web/ressources/certificate.p12 rename to apps/web/resources/certificate.p12 diff --git a/apps/web/ressources/example.pdf b/apps/web/resources/example.pdf similarity index 100% rename from apps/web/ressources/example.pdf rename to apps/web/resources/example.pdf diff --git a/packages/signing/addDigitalSignature.ts b/packages/signing/addDigitalSignature.ts index f4f565c8f..8bd219bb5 100644 --- a/packages/signing/addDigitalSignature.ts +++ b/packages/signing/addDigitalSignature.ts @@ -10,7 +10,7 @@ export const addDigitalSignature = async (documentAsBase64: string): Promise Date: Mon, 29 May 2023 08:01:12 +0000 Subject: [PATCH 08/66] fix: logo only on dashboard --- apps/web/components/navigation.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/web/components/navigation.tsx b/apps/web/components/navigation.tsx index c09d5b912..290023975 100644 --- a/apps/web/components/navigation.tsx +++ b/apps/web/components/navigation.tsx @@ -116,7 +116,6 @@ export default function TopNavigation() { href="/dashboard" className="flex flex-shrink-0 items-center gap-x-2 self-center overflow-hidden"> -

Documenso

From 8ecd5cf215a24f909a41e56f135f51d2b7e751e7 Mon Sep 17 00:00:00 2001 From: Mythie Date: Mon, 29 May 2023 18:47:54 +1000 Subject: [PATCH 09/66] fix: respect truncate title prop --- packages/ui/components/dialog/Dialog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/components/dialog/Dialog.tsx b/packages/ui/components/dialog/Dialog.tsx index 9cf3b446d..1e03135af 100644 --- a/packages/ui/components/dialog/Dialog.tsx +++ b/packages/ui/components/dialog/Dialog.tsx @@ -37,7 +37,7 @@ export function Dialog({ (s: any) => s.email && s.sendStatus != "SENT" ).length; - const documentTitle = truncate(document.title) + const documentTitle = truncateTitle ? truncate(document.title) : document.title; return ( From 2f3be1cfe5b0c0aa96c7b6d626e3735c1bfa6c43 Mon Sep 17 00:00:00 2001 From: Lee Robinson Date: Mon, 29 May 2023 10:38:24 -0500 Subject: [PATCH 10/66] Add turborepo to monorepo. --- .gitignore | 3 +++ apps/web/next.config.js | 27 ++++++++++----------------- package.json | 8 ++++---- turbo.json | 13 +++++++++++++ 4 files changed, 30 insertions(+), 21 deletions(-) create mode 100644 turbo.json diff --git a/.gitignore b/.gitignore index 9965f5ca6..d7f66a11a 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,6 @@ yarn-error.log* next-env.d.ts .env .env.example + +# turborepo +.turbo \ No newline at end of file diff --git a/apps/web/next.config.js b/apps/web/next.config.js index c7b94279e..1ea48cefb 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -4,22 +4,15 @@ require("dotenv").config({ path: "../../.env" }); const nextConfig = { reactStrictMode: true, swcMinify: false, + transpilePackages: [ + "@documenso/prisma", + "@documenso/lib", + "@documenso/ui", + "@documenso/pdf", + "@documenso/features", + "@documenso/signing", + "react-signature-canvas", + ], }; -const transpileModules = require("next-transpile-modules")([ - "@documenso/prisma", - "@documenso/lib", - "@documenso/ui", - "@documenso/pdf", - "@documenso/features", - "@documenso/signing", - "react-signature-canvas", -]); - -const plugins = [ - transpileModules -]; - -const moduleExports = () => plugins.reduce((acc, next) => next(acc), nextConfig); - -module.exports = moduleExports; +module.exports = nextConfig; diff --git a/package.json b/package.json index 9c2a55c14..12d9db61c 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,9 @@ "name": "documenso-monorepo", "version": "0.0.0", "scripts": { - "dev": "npm run dev -w apps/web", - "build": "npm i && cd apps && cd web && npm i && next build", - "start": "cd apps && cd web && next start", + "dev": "turbo run dev --filter=web", + "build": "turbo run build --filter=web", + "start": "turbo run start --filter=web", "db-migrate:dev": "prisma migrate dev", "db-seed": "prisma db seed", "db-studio": "prisma studio", @@ -54,4 +54,4 @@ "prettier-plugin-tailwindcss": "^0.2.5", "typescript": "4.8.4" } -} \ No newline at end of file +} diff --git a/turbo.json b/turbo.json new file mode 100644 index 000000000..3def58b36 --- /dev/null +++ b/turbo.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://turbo.build/schema.json", + "globalDependencies": [".env"], + "pipeline": { + "build": { + "outputs": [".next/**", "!.next/cache/**"] + }, + "dev": { + "cache": false, + "persistent": true + } + } +} From 82fbedf8e31b34c923697e857c0ae784968d7aa8 Mon Sep 17 00:00:00 2001 From: Piyush Maurya Date: Tue, 30 May 2023 00:23:18 +0530 Subject: [PATCH 11/66] fix: deprecated type checks and imports from @prisma --- packages/lib/server/getServerErrorFromUnknown.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/lib/server/getServerErrorFromUnknown.ts b/packages/lib/server/getServerErrorFromUnknown.ts index 8a4823082..fa53e8585 100644 --- a/packages/lib/server/getServerErrorFromUnknown.ts +++ b/packages/lib/server/getServerErrorFromUnknown.ts @@ -1,5 +1,5 @@ import { HttpError } from "@documenso/lib/server"; -import { NotFoundError, PrismaClientKnownRequestError } from "@prisma/client/runtime"; +import { PrismaClientKnownRequestError } from "@prisma/client/runtime/library"; export function getServerErrorFromUnknown(cause: unknown): HttpError { // Error was manually thrown and does not need to be parsed. @@ -18,7 +18,7 @@ export function getServerErrorFromUnknown(cause: unknown): HttpError { return new HttpError({ statusCode: 400, message: cause.message, cause }); } - if (cause instanceof NotFoundError) { + if (cause instanceof PrismaClientKnownRequestError) { return new HttpError({ statusCode: 404, message: cause.message, cause }); } From 1e6f65f92d3f5cd32f711aabcbfe8d12c574b094 Mon Sep 17 00:00:00 2001 From: Lee Robinson Date: Mon, 29 May 2023 19:46:24 -0500 Subject: [PATCH 12/66] Explicit deps --- turbo.json | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/turbo.json b/turbo.json index 3def58b36..d5daebec9 100644 --- a/turbo.json +++ b/turbo.json @@ -1,6 +1,26 @@ { "$schema": "https://turbo.build/schema.json", - "globalDependencies": [".env"], + "globalEnv": [ + "DATABASE_URL", + "NEXT_PUBLIC_WEBAPP_URL", + "NEXTAUTH_SECRET", + "NEXTAUTH_URL", + "CERT_FILE_PATH", + "CERT_PASSPHRASE", + "CERT_FILE_ENCODING", + "SENDGRID_API_KEY", + "SMTP_MAIL_HOST", + "SMTP_MAIL_PORT", + "SMTP_MAIL_USER", + "SMTP_MAIL_PASSWORD", + "MAIL_FROM", + "STRIPE_API_KEY", + "STRIPE_WEBHOOK_SECRET", + "NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID", + "NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID", + "NEXT_PUBLIC_ALLOW_SIGNUP", + "NEXT_PUBLIC_ALLOW_SUBSCRIPTIONS" + ], "pipeline": { "build": { "outputs": [".next/**", "!.next/cache/**"] From 007fe44db80cc8b7ee39b8c3ad870cf5890ace9e Mon Sep 17 00:00:00 2001 From: Doug Andrade Date: Mon, 29 May 2023 22:25:36 -0400 Subject: [PATCH 13/66] loading fonts with next/font --- apps/web/components/layout.tsx | 19 +++++++++++++++++-- apps/web/styles/tailwind.css | 32 -------------------------------- apps/web/tailwind.config.js | 4 ++-- 3 files changed, 19 insertions(+), 36 deletions(-) diff --git a/apps/web/components/layout.tsx b/apps/web/components/layout.tsx index 06a5bb2de..d9e8922e2 100644 --- a/apps/web/components/layout.tsx +++ b/apps/web/components/layout.tsx @@ -1,13 +1,28 @@ import { useEffect } from "react"; +import { Montserrat, Qwigley } from "next/font/google"; import Link from "next/link"; import { useRouter } from "next/router"; import { NEXT_PUBLIC_WEBAPP_URL } from "@documenso/lib/constants"; import { useSubscription } from "@documenso/lib/stripe"; +import { BillingWarning } from "./billing-warning"; import Navigation from "./navigation"; import { PaperAirplaneIcon } from "@heroicons/react/24/outline"; import { SubscriptionStatus } from "@prisma/client"; import { useSession } from "next-auth/react"; -import { BillingWarning } from "./billing-warning"; + +const montserrat = Montserrat({ + subsets: ["latin"], + weight: ["400", "700"], + display: "swap", + variable: "--font-sans", +}); + +const qwigley = Qwigley({ + subsets: ["latin"], + weight: ["400"], + display: "swap", + variable: "--font-qwigley", +}); function useRedirectToLoginIfUnauthenticated() { const { data: session, status } = useSession(); @@ -39,7 +54,7 @@ export default function Layout({ children }: any) { return ( <> -
+
diff --git a/apps/web/styles/tailwind.css b/apps/web/styles/tailwind.css index 2ea56f9bf..fcae13ac3 100644 --- a/apps/web/styles/tailwind.css +++ b/apps/web/styles/tailwind.css @@ -6,35 +6,3 @@ min-height: 100%; } -html, -body, -:host { - font-family: montserrat; -} - -@font-face { - font-family: "Qwigley"; - src: url("/fonts/Qwigley-Regular.ttf"); -} - -/* latin */ -@font-face { - font-family: "Montserrat"; - font-style: normal; - font-weight: 400; - font-display: swap; - src: url("/fonts/montserrat.woff2") format("woff2"); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, - U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} - -/* latin */ -@font-face { - font-family: "Montserrat"; - font-style: normal; - font-weight: 700; - font-display: swap; - src: url("/fonts/montserrat.woff2") format("woff2"); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, - U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} diff --git a/apps/web/tailwind.config.js b/apps/web/tailwind.config.js index bc846ebb5..ee8e474dc 100644 --- a/apps/web/tailwind.config.js +++ b/apps/web/tailwind.config.js @@ -12,8 +12,8 @@ module.exports = { theme: { extend: { fontFamily: { - monteserrat: ["Monteserrat", "serif"], - qwigley: ["Qwigley", "serif"], + sans: ["var(--font-sans)", ...defaultTheme.fontFamily.sans], + qwigley: ["var(--font-qwigley)", "serif"], }, colors: { neon: { From 3e944914744c3696d650295beac18a8703d0a846 Mon Sep 17 00:00:00 2001 From: Doug Andrade Date: Tue, 30 May 2023 02:17:34 -0400 Subject: [PATCH 14/66] fixed next/font load on ALL pages and toast. --- apps/web/components/layout.tsx | 17 +---------------- apps/web/pages/_app.tsx | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/apps/web/components/layout.tsx b/apps/web/components/layout.tsx index d9e8922e2..aa0fad8dc 100644 --- a/apps/web/components/layout.tsx +++ b/apps/web/components/layout.tsx @@ -1,5 +1,4 @@ import { useEffect } from "react"; -import { Montserrat, Qwigley } from "next/font/google"; import Link from "next/link"; import { useRouter } from "next/router"; import { NEXT_PUBLIC_WEBAPP_URL } from "@documenso/lib/constants"; @@ -10,20 +9,6 @@ import { PaperAirplaneIcon } from "@heroicons/react/24/outline"; import { SubscriptionStatus } from "@prisma/client"; import { useSession } from "next-auth/react"; -const montserrat = Montserrat({ - subsets: ["latin"], - weight: ["400", "700"], - display: "swap", - variable: "--font-sans", -}); - -const qwigley = Qwigley({ - subsets: ["latin"], - weight: ["400"], - display: "swap", - variable: "--font-qwigley", -}); - function useRedirectToLoginIfUnauthenticated() { const { data: session, status } = useSession(); const loading = status === "loading"; @@ -54,7 +39,7 @@ export default function Layout({ children }: any) { return ( <> -
+
diff --git a/apps/web/pages/_app.tsx b/apps/web/pages/_app.tsx index cd5541cbb..866b742c3 100644 --- a/apps/web/pages/_app.tsx +++ b/apps/web/pages/_app.tsx @@ -1,6 +1,7 @@ import { ReactElement, ReactNode } from "react"; import { NextPage } from "next"; import type { AppProps } from "next/app"; +import { Montserrat, Qwigley } from "next/font/google"; import { SubscriptionProvider } from "@documenso/lib/stripe/providers/subscription-provider"; import "../../../node_modules/placeholder-loading/src/scss/placeholder-loading.scss"; import "../../../node_modules/react-resizable/css/styles.css"; @@ -11,6 +12,20 @@ import "react-tooltip/dist/react-tooltip.css"; export { coloredConsole } from "@documenso/lib"; +const montserrat = Montserrat({ + subsets: ["latin"], + weight: ["400", "700"], + display: "swap", + variable: "--font-sans", +}); + +const qwigley = Qwigley({ + subsets: ["latin"], + weight: ["400"], + display: "swap", + variable: "--font-qwigley", +}); + export type NextPageWithLayout

= NextPage & { getLayout?: (page: ReactElement) => ReactNode; }; @@ -27,8 +42,10 @@ export default function App({ return ( - - {getLayout()} +

+ + {getLayout()} +
); From 307b0cc9d9cb2b82e18f508868e744d26cf1cf3f Mon Sep 17 00:00:00 2001 From: Doug Andrade Date: Tue, 30 May 2023 02:36:43 -0400 Subject: [PATCH 15/66] fixed height on login/signup pages --- apps/web/pages/_app.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/pages/_app.tsx b/apps/web/pages/_app.tsx index 866b742c3..a1193a681 100644 --- a/apps/web/pages/_app.tsx +++ b/apps/web/pages/_app.tsx @@ -42,10 +42,10 @@ export default function App({ return ( -
+
{getLayout()} -
+
); From d8ad4b4b2b5ddaccbcb461eb91baf94ae1b0b74f Mon Sep 17 00:00:00 2001 From: Mythie Date: Tue, 30 May 2023 18:56:41 +1000 Subject: [PATCH 16/66] fix: add turbo dep and start command --- package-lock.json | 153 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + turbo.json | 5 ++ 3 files changed, 159 insertions(+) diff --git a/package-lock.json b/package-lock.json index 3294ac71b..4e56abc72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,6 +40,7 @@ "npm-run-all": "^4.1.5", "prettier": "^2.8.7", "prettier-plugin-tailwindcss": "^0.2.5", + "turbo": "^1.9.9", "typescript": "4.8.4" } }, @@ -7665,6 +7666,102 @@ "node": "*" } }, + "node_modules/turbo": { + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/turbo/-/turbo-1.9.9.tgz", + "integrity": "sha512-+ZS66LOT7ahKHxh6XrIdcmf2Yk9mNpAbPEj4iF2cs0cAeaDU3xLVPZFF0HbSho89Uxwhx7b5HBgPbdcjQTwQkg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "turbo": "bin/turbo" + }, + "optionalDependencies": { + "turbo-darwin-64": "1.9.9", + "turbo-darwin-arm64": "1.9.9", + "turbo-linux-64": "1.9.9", + "turbo-linux-arm64": "1.9.9", + "turbo-windows-64": "1.9.9", + "turbo-windows-arm64": "1.9.9" + } + }, + "node_modules/turbo-darwin-64": { + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-1.9.9.tgz", + "integrity": "sha512-UDGM9E21eCDzF5t1F4rzrjwWutcup33e7ZjNJcW/mJDPorazZzqXGKEPIy9kXwKhamUUXfC7668r6ZuA1WXF2Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/turbo-darwin-arm64": { + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-1.9.9.tgz", + "integrity": "sha512-VyfkXzTJpYLTAQ9krq2myyEq7RPObilpS04lgJ4OO1piq76RNmSpX9F/t9JCaY9Pj/4TL7i0d8PM7NGhwEA5Ag==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/turbo-linux-64": { + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-1.9.9.tgz", + "integrity": "sha512-Fu1MY29Odg8dHOqXcpIIGC3T63XLOGgnGfbobXMKdrC7JQDvtJv8TUCYciRsyknZYjyyKK1z6zKuYIiDjf3KeQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/turbo-linux-arm64": { + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-1.9.9.tgz", + "integrity": "sha512-50LI8NafPuJxdnMCBeDdzgyt1cgjQG7FwkyY336v4e95WJPUVjrHdrKH6jYXhOUyrv9+jCJxwX1Yrg02t5yJ1g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/turbo-windows-64": { + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-1.9.9.tgz", + "integrity": "sha512-9IsTReoLmQl1IRsy3WExe2j2RKWXQyXujfJ4fXF+jp08KxjVF4/tYP2CIRJx/A7UP/7keBta27bZqzAjsmbSTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/turbo-windows-arm64": { + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-1.9.9.tgz", + "integrity": "sha512-CUu4hpeQo68JjDr0V0ygTQRLbS+/sNfdqEVV+Xz9136vpKn2WMQLAuUBVZV0Sp0S/7i+zGnplskT0fED+W46wQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", @@ -13859,6 +13956,62 @@ "safe-buffer": "^5.0.1" } }, + "turbo": { + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/turbo/-/turbo-1.9.9.tgz", + "integrity": "sha512-+ZS66LOT7ahKHxh6XrIdcmf2Yk9mNpAbPEj4iF2cs0cAeaDU3xLVPZFF0HbSho89Uxwhx7b5HBgPbdcjQTwQkg==", + "dev": true, + "requires": { + "turbo-darwin-64": "1.9.9", + "turbo-darwin-arm64": "1.9.9", + "turbo-linux-64": "1.9.9", + "turbo-linux-arm64": "1.9.9", + "turbo-windows-64": "1.9.9", + "turbo-windows-arm64": "1.9.9" + } + }, + "turbo-darwin-64": { + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-1.9.9.tgz", + "integrity": "sha512-UDGM9E21eCDzF5t1F4rzrjwWutcup33e7ZjNJcW/mJDPorazZzqXGKEPIy9kXwKhamUUXfC7668r6ZuA1WXF2Q==", + "dev": true, + "optional": true + }, + "turbo-darwin-arm64": { + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-1.9.9.tgz", + "integrity": "sha512-VyfkXzTJpYLTAQ9krq2myyEq7RPObilpS04lgJ4OO1piq76RNmSpX9F/t9JCaY9Pj/4TL7i0d8PM7NGhwEA5Ag==", + "dev": true, + "optional": true + }, + "turbo-linux-64": { + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-1.9.9.tgz", + "integrity": "sha512-Fu1MY29Odg8dHOqXcpIIGC3T63XLOGgnGfbobXMKdrC7JQDvtJv8TUCYciRsyknZYjyyKK1z6zKuYIiDjf3KeQ==", + "dev": true, + "optional": true + }, + "turbo-linux-arm64": { + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-1.9.9.tgz", + "integrity": "sha512-50LI8NafPuJxdnMCBeDdzgyt1cgjQG7FwkyY336v4e95WJPUVjrHdrKH6jYXhOUyrv9+jCJxwX1Yrg02t5yJ1g==", + "dev": true, + "optional": true + }, + "turbo-windows-64": { + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-1.9.9.tgz", + "integrity": "sha512-9IsTReoLmQl1IRsy3WExe2j2RKWXQyXujfJ4fXF+jp08KxjVF4/tYP2CIRJx/A7UP/7keBta27bZqzAjsmbSTA==", + "dev": true, + "optional": true + }, + "turbo-windows-arm64": { + "version": "1.9.9", + "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-1.9.9.tgz", + "integrity": "sha512-CUu4hpeQo68JjDr0V0ygTQRLbS+/sNfdqEVV+Xz9136vpKn2WMQLAuUBVZV0Sp0S/7i+zGnplskT0fED+W46wQ==", + "dev": true, + "optional": true + }, "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", diff --git a/package.json b/package.json index 12d9db61c..d5790a9e7 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "npm-run-all": "^4.1.5", "prettier": "^2.8.7", "prettier-plugin-tailwindcss": "^0.2.5", + "turbo": "^1.9.9", "typescript": "4.8.4" } } diff --git a/turbo.json b/turbo.json index d5daebec9..ea51341b1 100644 --- a/turbo.json +++ b/turbo.json @@ -25,6 +25,11 @@ "build": { "outputs": [".next/**", "!.next/cache/**"] }, + "start": { + "dependsOn": ["build"], + "cache": false, + "persistent": true + }, "dev": { "cache": false, "persistent": true From b5e03359c1b31c25d5aa68299828b7499ba488e5 Mon Sep 17 00:00:00 2001 From: Mythie Date: Tue, 30 May 2023 20:11:23 +1000 Subject: [PATCH 17/66] fix: mark truncateTitle as optional --- package-lock.json | 356 ----------------------- packages/ui/components/dialog/Dialog.tsx | 2 +- 2 files changed, 1 insertion(+), 357 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4e56abc72..3a7883179 100644 --- a/package-lock.json +++ b/package-lock.json @@ -93,7 +93,6 @@ "eslint": "8.27.0", "eslint-config-next": "13.0.3", "file-loader": "^6.2.0", - "next-transpile-modules": "^10.0.0", "postcss": "^8.4.19", "sass": "^1.57.1", "stripe-cli": "^0.1.0", @@ -634,36 +633,6 @@ "glob": "7.1.7" } }, - "node_modules/@next/swc-android-arm-eabi": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.4.tgz", - "integrity": "sha512-DWlalTSkLjDU11MY11jg17O1gGQzpRccM9Oes2yTqj2DpHndajrXHGxj9HGtJ+idq2k7ImUdJVWS2h2l/EDJOw==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-android-arm64": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.2.4.tgz", - "integrity": "sha512-sRavmUImUCf332Gy+PjIfLkMhiRX1Ez4SI+3vFDRs1N5eXp+uNzjFUK/oLMMOzk6KFSkbiK/3Wt8+dHQR/flNg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, "node_modules/@next/swc-darwin-arm64": { "version": "13.2.4", "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.4.tgz", @@ -679,156 +648,6 @@ "node": ">= 10" } }, - "node_modules/@next/swc-darwin-x64": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.4.tgz", - "integrity": "sha512-a6LBuoYGcFOPGd4o8TPo7wmv5FnMr+Prz+vYHopEDuhDoMSHOnC+v+Ab4D7F0NMZkvQjEJQdJS3rqgFhlZmKlw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-freebsd-x64": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.4.tgz", - "integrity": "sha512-kkbzKVZGPaXRBPisoAQkh3xh22r+TD+5HwoC5bOkALraJ0dsOQgSMAvzMXKsN3tMzJUPS0tjtRf1cTzrQ0I5vQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.4.tgz", - "integrity": "sha512-7qA1++UY0fjprqtjBZaOA6cas/7GekpjVsZn/0uHvquuITFCdKGFCsKNBx3S0Rpxmx6WYo0GcmhNRM9ru08BGg==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.4.tgz", - "integrity": "sha512-xzYZdAeq883MwXgcwc72hqo/F/dwUxCukpDOkx/j1HTq/J0wJthMGjinN9wH5bPR98Mfeh1MZJ91WWPnZOedOg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.4.tgz", - "integrity": "sha512-8rXr3WfmqSiYkb71qzuDP6I6R2T2tpkmf83elDN8z783N9nvTJf2E7eLx86wu2OJCi4T05nuxCsh4IOU3LQ5xw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.4.tgz", - "integrity": "sha512-Ngxh51zGSlYJ4EfpKG4LI6WfquulNdtmHg1yuOYlaAr33KyPJp4HeN/tivBnAHcZkoNy0hh/SbwDyCnz5PFJQQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.4.tgz", - "integrity": "sha512-gOvwIYoSxd+j14LOcvJr+ekd9fwYT1RyMAHOp7znA10+l40wkFiMONPLWiZuHxfRk+Dy7YdNdDh3ImumvL6VwA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.4.tgz", - "integrity": "sha512-q3NJzcfClgBm4HvdcnoEncmztxrA5GXqKeiZ/hADvC56pwNALt3ngDC6t6qr1YW9V/EPDxCYeaX4zYxHciW4Dw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-ia32-msvc": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.4.tgz", - "integrity": "sha512-/eZ5ncmHUYtD2fc6EUmAIZlAJnVT2YmxDsKs1Ourx0ttTtvtma/WKlMV5NoUsyOez0f9ExLyOpeCoz5aj+MPXw==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.4.tgz", - "integrity": "sha512-0MffFmyv7tBLlji01qc0IaPP/LVExzvj7/R5x1Jph1bTAIj4Vu81yFQWHHQAP6r4ff9Ukj1mBK6MDNVXm7Tcvw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -3653,7 +3472,6 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -7684,19 +7502,6 @@ "turbo-windows-arm64": "1.9.9" } }, - "node_modules/turbo-darwin-64": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-1.9.9.tgz", - "integrity": "sha512-UDGM9E21eCDzF5t1F4rzrjwWutcup33e7ZjNJcW/mJDPorazZzqXGKEPIy9kXwKhamUUXfC7668r6ZuA1WXF2Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, "node_modules/turbo-darwin-arm64": { "version": "1.9.9", "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-1.9.9.tgz", @@ -7710,58 +7515,6 @@ "darwin" ] }, - "node_modules/turbo-linux-64": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-1.9.9.tgz", - "integrity": "sha512-Fu1MY29Odg8dHOqXcpIIGC3T63XLOGgnGfbobXMKdrC7JQDvtJv8TUCYciRsyknZYjyyKK1z6zKuYIiDjf3KeQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/turbo-linux-arm64": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-1.9.9.tgz", - "integrity": "sha512-50LI8NafPuJxdnMCBeDdzgyt1cgjQG7FwkyY336v4e95WJPUVjrHdrKH6jYXhOUyrv9+jCJxwX1Yrg02t5yJ1g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/turbo-windows-64": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-1.9.9.tgz", - "integrity": "sha512-9IsTReoLmQl1IRsy3WExe2j2RKWXQyXujfJ4fXF+jp08KxjVF4/tYP2CIRJx/A7UP/7keBta27bZqzAjsmbSTA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/turbo-windows-arm64": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-1.9.9.tgz", - "integrity": "sha512-CUu4hpeQo68JjDr0V0ygTQRLbS+/sNfdqEVV+Xz9136vpKn2WMQLAuUBVZV0Sp0S/7i+zGnplskT0fED+W46wQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", @@ -8614,7 +8367,6 @@ "formidable": "^3.2.5", "next": "13.2.4", "next-auth": "^4.22.0", - "next-transpile-modules": "^10.0.0", "node-forge": "^1.3.1", "node-signpdf": "^1.5.0", "nodemailer": "^6.9.0", @@ -8778,84 +8530,12 @@ "glob": "7.1.7" } }, - "@next/swc-android-arm-eabi": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.4.tgz", - "integrity": "sha512-DWlalTSkLjDU11MY11jg17O1gGQzpRccM9Oes2yTqj2DpHndajrXHGxj9HGtJ+idq2k7ImUdJVWS2h2l/EDJOw==", - "optional": true - }, - "@next/swc-android-arm64": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.2.4.tgz", - "integrity": "sha512-sRavmUImUCf332Gy+PjIfLkMhiRX1Ez4SI+3vFDRs1N5eXp+uNzjFUK/oLMMOzk6KFSkbiK/3Wt8+dHQR/flNg==", - "optional": true - }, "@next/swc-darwin-arm64": { "version": "13.2.4", "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.4.tgz", "integrity": "sha512-S6vBl+OrInP47TM3LlYx65betocKUUlTZDDKzTiRDbsRESeyIkBtZ6Qi5uT2zQs4imqllJznVjFd1bXLx3Aa6A==", "optional": true }, - "@next/swc-darwin-x64": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.4.tgz", - "integrity": "sha512-a6LBuoYGcFOPGd4o8TPo7wmv5FnMr+Prz+vYHopEDuhDoMSHOnC+v+Ab4D7F0NMZkvQjEJQdJS3rqgFhlZmKlw==", - "optional": true - }, - "@next/swc-freebsd-x64": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.4.tgz", - "integrity": "sha512-kkbzKVZGPaXRBPisoAQkh3xh22r+TD+5HwoC5bOkALraJ0dsOQgSMAvzMXKsN3tMzJUPS0tjtRf1cTzrQ0I5vQ==", - "optional": true - }, - "@next/swc-linux-arm-gnueabihf": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.4.tgz", - "integrity": "sha512-7qA1++UY0fjprqtjBZaOA6cas/7GekpjVsZn/0uHvquuITFCdKGFCsKNBx3S0Rpxmx6WYo0GcmhNRM9ru08BGg==", - "optional": true - }, - "@next/swc-linux-arm64-gnu": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.4.tgz", - "integrity": "sha512-xzYZdAeq883MwXgcwc72hqo/F/dwUxCukpDOkx/j1HTq/J0wJthMGjinN9wH5bPR98Mfeh1MZJ91WWPnZOedOg==", - "optional": true - }, - "@next/swc-linux-arm64-musl": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.4.tgz", - "integrity": "sha512-8rXr3WfmqSiYkb71qzuDP6I6R2T2tpkmf83elDN8z783N9nvTJf2E7eLx86wu2OJCi4T05nuxCsh4IOU3LQ5xw==", - "optional": true - }, - "@next/swc-linux-x64-gnu": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.4.tgz", - "integrity": "sha512-Ngxh51zGSlYJ4EfpKG4LI6WfquulNdtmHg1yuOYlaAr33KyPJp4HeN/tivBnAHcZkoNy0hh/SbwDyCnz5PFJQQ==", - "optional": true - }, - "@next/swc-linux-x64-musl": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.4.tgz", - "integrity": "sha512-gOvwIYoSxd+j14LOcvJr+ekd9fwYT1RyMAHOp7znA10+l40wkFiMONPLWiZuHxfRk+Dy7YdNdDh3ImumvL6VwA==", - "optional": true - }, - "@next/swc-win32-arm64-msvc": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.4.tgz", - "integrity": "sha512-q3NJzcfClgBm4HvdcnoEncmztxrA5GXqKeiZ/hADvC56pwNALt3ngDC6t6qr1YW9V/EPDxCYeaX4zYxHciW4Dw==", - "optional": true - }, - "@next/swc-win32-ia32-msvc": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.4.tgz", - "integrity": "sha512-/eZ5ncmHUYtD2fc6EUmAIZlAJnVT2YmxDsKs1Ourx0ttTtvtma/WKlMV5NoUsyOez0f9ExLyOpeCoz5aj+MPXw==", - "optional": true - }, - "@next/swc-win32-x64-msvc": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.4.tgz", - "integrity": "sha512-0MffFmyv7tBLlji01qc0IaPP/LVExzvj7/R5x1Jph1bTAIj4Vu81yFQWHHQAP6r4ff9Ukj1mBK6MDNVXm7Tcvw==", - "optional": true - }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -11109,7 +10789,6 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, "optional": true, "peer": true }, @@ -13970,13 +13649,6 @@ "turbo-windows-arm64": "1.9.9" } }, - "turbo-darwin-64": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-1.9.9.tgz", - "integrity": "sha512-UDGM9E21eCDzF5t1F4rzrjwWutcup33e7ZjNJcW/mJDPorazZzqXGKEPIy9kXwKhamUUXfC7668r6ZuA1WXF2Q==", - "dev": true, - "optional": true - }, "turbo-darwin-arm64": { "version": "1.9.9", "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-1.9.9.tgz", @@ -13984,34 +13656,6 @@ "dev": true, "optional": true }, - "turbo-linux-64": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-1.9.9.tgz", - "integrity": "sha512-Fu1MY29Odg8dHOqXcpIIGC3T63XLOGgnGfbobXMKdrC7JQDvtJv8TUCYciRsyknZYjyyKK1z6zKuYIiDjf3KeQ==", - "dev": true, - "optional": true - }, - "turbo-linux-arm64": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-1.9.9.tgz", - "integrity": "sha512-50LI8NafPuJxdnMCBeDdzgyt1cgjQG7FwkyY336v4e95WJPUVjrHdrKH6jYXhOUyrv9+jCJxwX1Yrg02t5yJ1g==", - "dev": true, - "optional": true - }, - "turbo-windows-64": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-1.9.9.tgz", - "integrity": "sha512-9IsTReoLmQl1IRsy3WExe2j2RKWXQyXujfJ4fXF+jp08KxjVF4/tYP2CIRJx/A7UP/7keBta27bZqzAjsmbSTA==", - "dev": true, - "optional": true - }, - "turbo-windows-arm64": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-1.9.9.tgz", - "integrity": "sha512-CUu4hpeQo68JjDr0V0ygTQRLbS+/sNfdqEVV+Xz9136vpKn2WMQLAuUBVZV0Sp0S/7i+zGnplskT0fED+W46wQ==", - "dev": true, - "optional": true - }, "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", diff --git a/packages/ui/components/dialog/Dialog.tsx b/packages/ui/components/dialog/Dialog.tsx index 1e03135af..8f23ef8f4 100644 --- a/packages/ui/components/dialog/Dialog.tsx +++ b/packages/ui/components/dialog/Dialog.tsx @@ -20,7 +20,7 @@ type DialogProps = { formValues: FormValue[]; setLoading: (loading: boolean) => void; icon: React.ReactNode; - truncateTitle: boolean; + truncateTitle?: boolean; }; export function Dialog({ From 0a5de1823563b24edf447ea50c68a2627584318b Mon Sep 17 00:00:00 2001 From: Ansari Date: Tue, 30 May 2023 15:43:58 +0530 Subject: [PATCH 18/66] minor script fix --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d5790a9e7..31b44e7ed 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "db-migrate:dev": "prisma migrate dev", "db-seed": "prisma db seed", "db-studio": "prisma studio", - "docker:compose": "docker-compose -f ./docker/compose-without-app.yml", + "docker:compose": "docker compose -f ./docker/compose-without-app.yml || docker-compose -f ./docker/compose-without-app.yml", "docker:compose-up": "npm run docker:compose -- up -d", "docker:compose-down": "npm run docker:compose -- down", "stripe:listen": "stripe listen --forward-to localhost:3000/api/stripe/webhook", @@ -55,4 +55,4 @@ "turbo": "^1.9.9", "typescript": "4.8.4" } -} +} \ No newline at end of file From 19e960f5932ce8066cd0abc555c7c38bdaa9a53f Mon Sep 17 00:00:00 2001 From: Mythie Date: Wed, 31 May 2023 21:11:54 +1000 Subject: [PATCH 19/66] fix: improve stripe webhook endpoint Improve the stripe webhook endpoint by checking for subscriptions prior to performing an update to handle cases where accounts have no created subscription. This can happen in sitations such as when a checkout_session has been created but the payment fails. --- packages/lib/stripe/handlers/webhook.ts | 85 ++++++++++++++++++------- 1 file changed, 61 insertions(+), 24 deletions(-) diff --git a/packages/lib/stripe/handlers/webhook.ts b/packages/lib/stripe/handlers/webhook.ts index 390fc21de..609e652fe 100644 --- a/packages/lib/stripe/handlers/webhook.ts +++ b/packages/lib/stripe/handlers/webhook.ts @@ -25,9 +25,7 @@ export const webhookHandler = async (req: NextApiRequest, res: NextApiResponse) }); } - log("constructing body...") const body = await buffer(req); - log("constructed body") const event = stripe.webhooks.constructEvent(body, sig, process.env.STRIPE_WEBHOOK_SECRET!); log("event-type:", event.type); @@ -70,23 +68,38 @@ export const webhookHandler = async (req: NextApiRequest, res: NextApiResponse) if (event.type === "invoice.payment_succeeded") { const invoice = event.data.object as Stripe.Invoice; + if (invoice.billing_reason !== "subscription_cycle") { + return res.status(200).json({ + success: true, + message: "Webhook received", + }); + } + const customerId = typeof invoice.customer === "string" ? invoice.customer : invoice.customer?.id; const subscription = await stripe.subscriptions.retrieve(invoice.subscription as string); - await prisma.subscription.update({ + const hasSubscription = await prisma.subscription.findFirst({ where: { customerId, }, - data: { - status: SubscriptionStatus.ACTIVE, - planId: subscription.id, - priceId: subscription.items.data[0].price.id, - periodEnd: new Date(subscription.current_period_end * 1000), - }, }); + if (hasSubscription) { + await prisma.subscription.update({ + where: { + customerId, + }, + data: { + status: SubscriptionStatus.ACTIVE, + planId: subscription.id, + priceId: subscription.items.data[0].price.id, + periodEnd: new Date(subscription.current_period_end * 1000), + }, + }); + } + return res.status(200).json({ success: true, message: "Webhook received", @@ -98,15 +111,23 @@ export const webhookHandler = async (req: NextApiRequest, res: NextApiResponse) const customerId = failedInvoice.customer as string; - await prisma.subscription.update({ + const hasSubscription = await prisma.subscription.findFirst({ where: { customerId, }, - data: { - status: SubscriptionStatus.PAST_DUE, - }, }); + if (hasSubscription) { + await prisma.subscription.update({ + where: { + customerId, + }, + data: { + status: SubscriptionStatus.PAST_DUE, + }, + }); + } + return res.status(200).json({ success: true, message: "Webhook received", @@ -118,18 +139,26 @@ export const webhookHandler = async (req: NextApiRequest, res: NextApiResponse) const customerId = updatedSubscription.customer as string; - await prisma.subscription.update({ + const hasSubscription = await prisma.subscription.findFirst({ where: { customerId, }, - data: { - status: SubscriptionStatus.ACTIVE, - planId: updatedSubscription.id, - priceId: updatedSubscription.items.data[0].price.id, - periodEnd: new Date(updatedSubscription.current_period_end * 1000), - }, }); + if (hasSubscription) { + await prisma.subscription.update({ + where: { + customerId, + }, + data: { + status: SubscriptionStatus.ACTIVE, + planId: updatedSubscription.id, + priceId: updatedSubscription.items.data[0].price.id, + periodEnd: new Date(updatedSubscription.current_period_end * 1000), + }, + }); + } + return res.status(200).json({ success: true, message: "Webhook received", @@ -141,15 +170,23 @@ export const webhookHandler = async (req: NextApiRequest, res: NextApiResponse) const customerId = deletedSubscription.customer as string; - await prisma.subscription.update({ + const hasSubscription = await prisma.subscription.findFirst({ where: { customerId, }, - data: { - status: SubscriptionStatus.INACTIVE, - }, }); + if (hasSubscription) { + await prisma.subscription.update({ + where: { + customerId, + }, + data: { + status: SubscriptionStatus.INACTIVE, + }, + }); + } + return res.status(200).json({ success: true, message: "Webhook received", From dd4568b7fa34d122d10aae16e91fbe15a383228f Mon Sep 17 00:00:00 2001 From: Thanh Vu Date: Thu, 1 Jun 2023 13:58:18 +0700 Subject: [PATCH 20/66] typo: documentso >> documenso --- docker/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/build.sh b/docker/build.sh index 9a1ed88fb..aa2068910 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -22,7 +22,7 @@ echo "Git SHA: $GIT_SHA" docker build -f "$SCRIPT_DIR/Dockerfile" \ --progress=plain \ - -t "documentso:latest" \ + -t "documenso:latest" \ -t "documenso:$GIT_SHA" \ -t "documenso:$APP_VERSION" \ "$MONOREPO_ROOT" From 488cf58f0e7e166910cd8b3b66bcb0db0cf23ab3 Mon Sep 17 00:00:00 2001 From: Jonas Pardon Date: Thu, 1 Jun 2023 10:04:26 +0200 Subject: [PATCH 21/66] Fix typos in example env Just noticed some typos while setting up a local copy and thought I'd fix them up real quick. --- .env.example | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index a1faef3f0..ab8d15b45 100644 --- a/.env.example +++ b/.env.example @@ -4,8 +4,8 @@ # Option 3: Use the provided dx setup (RECOMMENDED) # => postgres://documenso:password@127.0.0.1:54320/documenso # -# ⚠ WARNING: The test database can be resetted or taken offline at any point. -# ⚠ WARNING: Please be aware that nothing written to the test databae is private. +# ⚠ WARNING: The test database can be reset or taken offline at any point. +# ⚠ WARNING: Please be aware that nothing written to the test database is private. DATABASE_URL='' # URL @@ -51,4 +51,4 @@ NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID= #FEATURE FLAGS # Allow users to register via the /signup page. Otherwise they will be redirect to the home page. NEXT_PUBLIC_ALLOW_SIGNUP=true -NEXT_PUBLIC_ALLOW_SUBSCRIPTIONS=true \ No newline at end of file +NEXT_PUBLIC_ALLOW_SUBSCRIPTIONS=true From 0a7ed0701cdf4ebe1846ec74679834dca6b66134 Mon Sep 17 00:00:00 2001 From: Mythie Date: Thu, 1 Jun 2023 23:25:49 +1000 Subject: [PATCH 22/66] fix: add turbo entries for other platforms to package-lock Package managers such as NPM behave strangely when adding packages such as swc and turborepo which contain platform variants. During a first time install they will include only the current devices platform while a clean node_modules and package-lock will result in all platforms being included. This change adds those missed platforms by performing the above step and porting it back to our existing package-lock. --- package-lock.json | 150 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 126 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3a7883179..8d104b0d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3472,6 +3472,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -7485,27 +7486,40 @@ } }, "node_modules/turbo": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/turbo/-/turbo-1.9.9.tgz", - "integrity": "sha512-+ZS66LOT7ahKHxh6XrIdcmf2Yk9mNpAbPEj4iF2cs0cAeaDU3xLVPZFF0HbSho89Uxwhx7b5HBgPbdcjQTwQkg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/turbo/-/turbo-1.10.1.tgz", + "integrity": "sha512-wq0YeSv6P/eEDXOL42jkMUr+T4z34dM8mdHu5u6C6OOAq8JuLJ72F/v4EVR1JmY8icyTkFz10ICLV0haUUYhbQ==", "dev": true, "hasInstallScript": true, "bin": { "turbo": "bin/turbo" }, "optionalDependencies": { - "turbo-darwin-64": "1.9.9", - "turbo-darwin-arm64": "1.9.9", - "turbo-linux-64": "1.9.9", - "turbo-linux-arm64": "1.9.9", - "turbo-windows-64": "1.9.9", - "turbo-windows-arm64": "1.9.9" + "turbo-darwin-64": "1.10.1", + "turbo-darwin-arm64": "1.10.1", + "turbo-linux-64": "1.10.1", + "turbo-linux-arm64": "1.10.1", + "turbo-windows-64": "1.10.1", + "turbo-windows-arm64": "1.10.1" } }, + "node_modules/turbo-darwin-64": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-1.10.1.tgz", + "integrity": "sha512-isLLoPuAOMNsYovOq9BhuQOZWQuU13zYsW988KkkaA4OJqOn7qwa9V/KBYCJL8uVQqtG+/Y42J37lO8RJjyXuA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, "node_modules/turbo-darwin-arm64": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-1.9.9.tgz", - "integrity": "sha512-VyfkXzTJpYLTAQ9krq2myyEq7RPObilpS04lgJ4OO1piq76RNmSpX9F/t9JCaY9Pj/4TL7i0d8PM7NGhwEA5Ag==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-1.10.1.tgz", + "integrity": "sha512-x1nloPR10fLElNCv17BKr0kCx/O5gse/UXAcVscMZH2tvRUtXrdBmut62uw2YU3J9hli2fszYjUWXkulVpQvFA==", "cpu": [ "arm64" ], @@ -7515,6 +7529,58 @@ "darwin" ] }, + "node_modules/turbo-linux-64": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-1.10.1.tgz", + "integrity": "sha512-abV+ODCeOlz0503OZlHhPWdy3VwJZc1jObf1VQj7uQM+JqJ/kXbMyqJIMQVz+m7QJUFdferYPRxGhYT/NbYK7Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/turbo-linux-arm64": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-1.10.1.tgz", + "integrity": "sha512-zRC3nZbHQ63tofOmbuySzEn1ROISWTkemYYr1L98rpmT5aVa0kERlGiYcfDwZh3cBso/Ylg/wxexRAaPzcCJYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/turbo-windows-64": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-1.10.1.tgz", + "integrity": "sha512-Irqz8IU+o7Q/5V44qatZBTunk+FQAOII1hZTsEU54ah62f9Y297K6/LSp+yncmVQOZlFVccXb6MDqcETExIQtA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/turbo-windows-arm64": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-1.10.1.tgz", + "integrity": "sha512-124IT15d2gyjC+NEn11pHOaVFvZDRHpxfF+LDUzV7YxfNIfV0mGkR3R/IyVXtQHOgqOdtQTbC4y411sm31+SEw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", @@ -10789,6 +10855,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, "optional": true, "peer": true }, @@ -13636,23 +13703,58 @@ } }, "turbo": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/turbo/-/turbo-1.9.9.tgz", - "integrity": "sha512-+ZS66LOT7ahKHxh6XrIdcmf2Yk9mNpAbPEj4iF2cs0cAeaDU3xLVPZFF0HbSho89Uxwhx7b5HBgPbdcjQTwQkg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/turbo/-/turbo-1.10.1.tgz", + "integrity": "sha512-wq0YeSv6P/eEDXOL42jkMUr+T4z34dM8mdHu5u6C6OOAq8JuLJ72F/v4EVR1JmY8icyTkFz10ICLV0haUUYhbQ==", "dev": true, "requires": { - "turbo-darwin-64": "1.9.9", - "turbo-darwin-arm64": "1.9.9", - "turbo-linux-64": "1.9.9", - "turbo-linux-arm64": "1.9.9", - "turbo-windows-64": "1.9.9", - "turbo-windows-arm64": "1.9.9" + "turbo-darwin-64": "1.10.1", + "turbo-darwin-arm64": "1.10.1", + "turbo-linux-64": "1.10.1", + "turbo-linux-arm64": "1.10.1", + "turbo-windows-64": "1.10.1", + "turbo-windows-arm64": "1.10.1" } }, + "turbo-darwin-64": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-1.10.1.tgz", + "integrity": "sha512-isLLoPuAOMNsYovOq9BhuQOZWQuU13zYsW988KkkaA4OJqOn7qwa9V/KBYCJL8uVQqtG+/Y42J37lO8RJjyXuA==", + "dev": true, + "optional": true + }, "turbo-darwin-arm64": { - "version": "1.9.9", - "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-1.9.9.tgz", - "integrity": "sha512-VyfkXzTJpYLTAQ9krq2myyEq7RPObilpS04lgJ4OO1piq76RNmSpX9F/t9JCaY9Pj/4TL7i0d8PM7NGhwEA5Ag==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-1.10.1.tgz", + "integrity": "sha512-x1nloPR10fLElNCv17BKr0kCx/O5gse/UXAcVscMZH2tvRUtXrdBmut62uw2YU3J9hli2fszYjUWXkulVpQvFA==", + "dev": true, + "optional": true + }, + "turbo-linux-64": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-1.10.1.tgz", + "integrity": "sha512-abV+ODCeOlz0503OZlHhPWdy3VwJZc1jObf1VQj7uQM+JqJ/kXbMyqJIMQVz+m7QJUFdferYPRxGhYT/NbYK7Q==", + "dev": true, + "optional": true + }, + "turbo-linux-arm64": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-1.10.1.tgz", + "integrity": "sha512-zRC3nZbHQ63tofOmbuySzEn1ROISWTkemYYr1L98rpmT5aVa0kERlGiYcfDwZh3cBso/Ylg/wxexRAaPzcCJYQ==", + "dev": true, + "optional": true + }, + "turbo-windows-64": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-1.10.1.tgz", + "integrity": "sha512-Irqz8IU+o7Q/5V44qatZBTunk+FQAOII1hZTsEU54ah62f9Y297K6/LSp+yncmVQOZlFVccXb6MDqcETExIQtA==", + "dev": true, + "optional": true + }, + "turbo-windows-arm64": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-1.10.1.tgz", + "integrity": "sha512-124IT15d2gyjC+NEn11pHOaVFvZDRHpxfF+LDUzV7YxfNIfV0mGkR3R/IyVXtQHOgqOdtQTbC4y411sm31+SEw==", "dev": true, "optional": true }, From 20b51198b402814de9e59c3ecb07df03fdf32d19 Mon Sep 17 00:00:00 2001 From: Robinhood Date: Thu, 1 Jun 2023 22:24:58 +0530 Subject: [PATCH 23/66] =?UTF-8?q?docker=20script=20updated=20=F0=9F=90=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 31b44e7ed..08d2a2788 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,8 @@ "db-migrate:dev": "prisma migrate dev", "db-seed": "prisma db seed", "db-studio": "prisma studio", - "docker:compose": "docker compose -f ./docker/compose-without-app.yml || docker-compose -f ./docker/compose-without-app.yml", - "docker:compose-up": "npm run docker:compose -- up -d", - "docker:compose-down": "npm run docker:compose -- down", + "docker:compose-up": "docker compose -f ./docker/compose-without-app.yml up -d || docker-compose -f ./docker/compose-without-app.yml up -d", + "docker:compose-down": "docker compose -f ./docker/compose-without-app.yml down || docker-compose -f ./docker/compose-without-app.yml down", "stripe:listen": "stripe listen --forward-to localhost:3000/api/stripe/webhook", "dx": "npm install && run-s docker:compose-up db-migrate:dev", "d": "npm install && run-s docker:compose-up db-migrate:dev && npm run db-seed && npm run dev" From 316fb49339e9fd1fa64ce6cc870c44c6bb147b24 Mon Sep 17 00:00:00 2001 From: Mythie Date: Fri, 2 Jun 2023 19:03:59 +1000 Subject: [PATCH 24/66] fix: disable subscriptions in example env --- .env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.example b/.env.example index ab8d15b45..f5c2486fe 100644 --- a/.env.example +++ b/.env.example @@ -51,4 +51,4 @@ NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID= #FEATURE FLAGS # Allow users to register via the /signup page. Otherwise they will be redirect to the home page. NEXT_PUBLIC_ALLOW_SIGNUP=true -NEXT_PUBLIC_ALLOW_SUBSCRIPTIONS=true +NEXT_PUBLIC_ALLOW_SUBSCRIPTIONS=false From a07febef4670133cfee2e64e7f91e396403dd8a1 Mon Sep 17 00:00:00 2001 From: AshutoshBhadauriya Date: Fri, 2 Jun 2023 15:06:26 +0530 Subject: [PATCH 25/66] Fix: alignment of div containing selecboxes in mobile and tab screens --- apps/web/pages/documents.tsx | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/apps/web/pages/documents.tsx b/apps/web/pages/documents.tsx index 905f59d09..e182ae89c 100644 --- a/apps/web/pages/documents.tsx +++ b/apps/web/pages/documents.tsx @@ -4,6 +4,7 @@ import Head from "next/head"; import { useRouter } from "next/router"; import { uploadDocument } from "@documenso/features"; import { deleteDocument, getDocuments } from "@documenso/lib/api"; +import { useSubscription } from "@documenso/lib/stripe"; import { Button, IconButton, SelectBox } from "@documenso/ui"; import Layout from "../components/layout"; import type { NextPageWithLayout } from "./_app"; @@ -20,7 +21,6 @@ import { } from "@heroicons/react/24/outline"; import { DocumentStatus } from "@prisma/client"; import { Tooltip as ReactTooltip } from "react-tooltip"; -import { useSubscription } from "@documenso/lib/stripe"; const DocumentsPage: NextPageWithLayout = (props: any) => { const router = useRouter(); @@ -145,17 +145,7 @@ const DocumentsPage: NextPageWithLayout = (props: any) => {
-
-
- {filteredDocuments.length != 1 ? filteredDocuments.length + " Documents" : "1 Document"} -
- +
{ value={selectedStatusFilter} onChange={handleStatusFilterChange} /> + +
+ {filteredDocuments.length != 1 ? filteredDocuments.length + " Documents" : "1 Document"} +