Update all Yarn dependencies (2022-07-29) (#3599)
* Update all Yarn dependencies (2022-07-29) * Adds syncpack config * Fixes mismatches * Update yarn.lock * RRule fixes * Locking dayjs to fix build * Type fixes * Fixes mismatches * Submodule sync * Update yarn.lock * Update event.ts * Conflict fixes * Fixes prisma warnings * Liting * Upgrade next, zod * Prevents articfact overwriting * Yarn fixes * Jest fixes * Submodule sync * Formatting * Submodule sync * Adds provider for react-tooltip * Removed dotenv-cli * Readds dotenv-cli * Skips getSchedule tests Until prisma is mocked properly * Fixes * Revert prisma seed script * E2E fixes * test * Removed deprecated req.page in middleware * Make tests stable * Unskip getSchedule tests * fixed 404 logo on cal video (#3885) * Removed PW aliases as aren't needed anymore Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>pull/3887/head
parent
d8fab68edd
commit
b8acf1e180
10
README.md
10
README.md
|
@ -64,9 +64,6 @@ That's where Cal.com comes in. Self-hosted or hosted by us. White-label by desig
|
|||
|
||||
<a href="https://www.producthunt.com/posts/calendso?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-calendso" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=291910&theme=light&period=monthly" alt="Cal.com - The open source Calendly alternative | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a> <a href="https://www.producthunt.com/posts/calendso?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-calendso" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=291910&theme=light" alt="Cal.com - The open source Calendly alternative | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a> <a href="https://www.producthunt.com/stories/how-this-open-source-calendly-alternative-rocketed-to-product-of-the-day" target="_blank"><img src="https://cal.com/maker-grant.svg" alt="Cal.com - The open source Calendly alternative | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||
|
||||
|
||||
|
||||
|
||||
### Built With
|
||||
|
||||
- [Next.js](https://nextjs.org/)
|
||||
|
@ -266,13 +263,13 @@ yarn workspace @calcom/web playwright-report
|
|||
|
||||
### Docker
|
||||
|
||||
The Docker configuration for Cal is an effort powered by people within the community.
|
||||
The Docker configuration for Cal is an effort powered by people within the community.
|
||||
|
||||
If you want to contribute to the Docker repository, [reply here](https://github.com/calcom/docker/discussions/32).
|
||||
|
||||
The Docker configuration can be found [in our docker repository](https://github.com/calcom/docker).
|
||||
|
||||
Issues with Docker? Find your answer or open a new discussion [here](https://github.com/calcom/docker/discussions) to ask the community.
|
||||
Issues with Docker? Find your answer or open a new discussion [here](https://github.com/calcom/docker/discussions) to ask the community.
|
||||
|
||||
Cal.com, Inc. does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk.
|
||||
|
||||
|
@ -328,7 +325,7 @@ We have a list of [help wanted](https://github.com/orgs/calcom/projects/1/views/
|
|||
10. The key will be created and you will be redirected back to the Credentials page. Select the newly generated client ID under OAuth 2.0 Client IDs.
|
||||
11. Select Download JSON. Copy the contents of this file and paste the entire JSON string in the .env file as the value for GOOGLE_API_CREDENTIALS key.
|
||||
|
||||
#### *Adding google calendar to Cal.com App Store*
|
||||
#### _Adding google calendar to Cal.com App Store_
|
||||
|
||||
After adding Google credentials, you can now Google Calendar App to the app store.
|
||||
You can repopulate the App store by running
|
||||
|
@ -344,6 +341,7 @@ following
|
|||
|
||||
1. Add extra redirect URL `<Cal.com URL>/api/auth/callback/google`
|
||||
1. Under 'OAuth concent screen', click "PUBLISH APP"
|
||||
|
||||
### Obtaining Microsoft Graph Client ID and Secret
|
||||
|
||||
1. Open [Azure App Registration](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps) and select New registration
|
||||
|
|
2
apps/api
2
apps/api
|
@ -1 +1 @@
|
|||
Subproject commit 7560fdbfc576f7a72ac840f9bef2b9fb92cbe3a3
|
||||
Subproject commit 1de91a5124012d62d23eaf30d95c801ee6d7117d
|
|
@ -1 +1 @@
|
|||
Subproject commit 544ded3da4649b01ea90b21cddf9830ce62adcb8
|
||||
Subproject commit 2fc5d892a062f0013fcc7c12b94d8f7159724867
|
|
@ -17,14 +17,14 @@
|
|||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"iframe-resizer-react": "^1.1.0",
|
||||
"next": "^12.2.0",
|
||||
"next": "^12.2.5",
|
||||
"nextra": "^1.1.0",
|
||||
"nextra-theme-docs": "^1.2.2",
|
||||
"react": "^18.1.0",
|
||||
"react-dom": "^18.1.0"
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@calcom/config": "*",
|
||||
"eslint": "^8.15.0"
|
||||
"eslint": "^8.20.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,16 +23,16 @@
|
|||
"@radix-ui/react-radio-group": "^0.1.1",
|
||||
"@radix-ui/react-slider": "^0.1.1",
|
||||
"@radix-ui/react-switch": "^0.1.1",
|
||||
"@radix-ui/react-tooltip": "^0.1.0",
|
||||
"next": "^12.2.0",
|
||||
"@radix-ui/react-tooltip": "^1.0.0",
|
||||
"next": "^12.2.5",
|
||||
"next-transpile-modules": "^9.0.0",
|
||||
"react": "18.1.0",
|
||||
"react-dom": "18.1.0",
|
||||
"react-feather": "^2.0.9",
|
||||
"react-hot-toast": "^2.2.0"
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-feather": "^2.0.10",
|
||||
"react-hot-toast": "^2.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.18.6",
|
||||
"@babel/core": "^7.18.9",
|
||||
"@calcom/config": "*",
|
||||
"@storybook/addon-a11y": "^6.5.9",
|
||||
"@storybook/addon-actions": "^6.5.9",
|
||||
|
@ -44,19 +44,19 @@
|
|||
"@storybook/manager-webpack5": "^6.5.9",
|
||||
"@storybook/react": "^6.5.9",
|
||||
"@types/node": "16.9.1",
|
||||
"@types/react": "18.0.9",
|
||||
"@types/react": "^18.0.9",
|
||||
"@types/react-dom": "18.0.4",
|
||||
"autoprefixer": "^10.4.7",
|
||||
"babel-loader": "^8.2.5",
|
||||
"chromatic": "^6.6.4",
|
||||
"eslint": "^8.15.0",
|
||||
"chromatic": "^6.7.1",
|
||||
"eslint": "^8.20.0",
|
||||
"postcss": "^8.4.13",
|
||||
"postcss-loader": "^7.0.0",
|
||||
"storybook-addon-designs": "^6.3.1",
|
||||
"storybook-addon-next": "^1.6.7",
|
||||
"tailwindcss": "^3.1.3",
|
||||
"tailwindcss": "^3.1.6",
|
||||
"tsconfig-paths-webpack-plugin": "^3.5.2",
|
||||
"typescript": "^4.6.4"
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"_id": "@calcom/storybook@0.1.0"
|
||||
|
|
|
@ -12,18 +12,18 @@
|
|||
"start": "PORT=4200 next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"highlight.js": "^11.5.1",
|
||||
"highlight.js": "^11.6.0",
|
||||
"isarray": "2.0.5",
|
||||
"next": "12.2.0",
|
||||
"next": "^12.2.5",
|
||||
"openapi-snippet": "^0.13.0",
|
||||
"react": "18.1.0",
|
||||
"react-dom": "18.1.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"swagger-ui-react": "4.11.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "16.9.1",
|
||||
"@types/react": "18.0.9",
|
||||
"@types/react": "^18.0.9",
|
||||
"@types/react-dom": "18.0.4",
|
||||
"typescript": "4.6.4"
|
||||
"typescript": "^4.7.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ import type { Config } from "@jest/types";
|
|||
const config: Config.InitialOptions = {
|
||||
verbose: true,
|
||||
roots: ["<rootDir>"],
|
||||
setupFiles: ["<rootDir>/test/jest-setup.js"],
|
||||
testMatch: ["**/test/lib/**/*.(spec|test).(ts|tsx|js)"],
|
||||
testPathIgnorePatterns: ["<rootDir>/.next", "<rootDir>/playwright/"],
|
||||
transform: {
|
||||
|
@ -10,6 +11,7 @@ const config: Config.InitialOptions = {
|
|||
},
|
||||
transformIgnorePatterns: ["/node_modules/", "^.+\\.module\\.(css|sass|scss)$"],
|
||||
testEnvironment: "jsdom",
|
||||
resolver: `<rootDir>/test/jest-resolver.js`,
|
||||
moduleNameMapper: {
|
||||
"^@components(.*)$": "<rootDir>/components$1",
|
||||
"^@lib(.*)$": "<rootDir>/lib$1",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { TooltipProvider } from "@radix-ui/react-tooltip";
|
||||
import { SessionProvider } from "next-auth/react";
|
||||
import { EventCollectionProvider } from "next-collect/client";
|
||||
import { appWithTranslation } from "next-i18next";
|
||||
|
@ -72,14 +73,16 @@ const AppProviders = (props: AppPropsWithChildren) => {
|
|||
<ContractsProvider>
|
||||
<SessionProvider session={session || undefined}>
|
||||
<CustomI18nextProvider {...props}>
|
||||
{/* color-scheme makes background:transparent not work which is required by embed. We need to ensure next-theme adds color-scheme to `body` instead of `html`(https://github.com/pacocoursey/next-themes/blob/main/src/index.tsx#L74). Once that's done we can enable color-scheme support */}
|
||||
<ThemeProvider
|
||||
enableColorScheme={false}
|
||||
storageKey={storageKey}
|
||||
forcedTheme={forcedTheme}
|
||||
attribute="class">
|
||||
{props.children}
|
||||
</ThemeProvider>
|
||||
<TooltipProvider>
|
||||
{/* color-scheme makes background:transparent not work which is required by embed. We need to ensure next-theme adds color-scheme to `body` instead of `html`(https://github.com/pacocoursey/next-themes/blob/main/src/index.tsx#L74). Once that's done we can enable color-scheme support */}
|
||||
<ThemeProvider
|
||||
enableColorScheme={false}
|
||||
storageKey={storageKey}
|
||||
forcedTheme={forcedTheme}
|
||||
attribute="class">
|
||||
{props.children}
|
||||
</ThemeProvider>
|
||||
</TooltipProvider>
|
||||
</CustomI18nextProvider>
|
||||
</SessionProvider>
|
||||
</ContractsProvider>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { collectEvents } from "next-collect/server";
|
||||
// eslint-disable-next-line @next/next/no-server-import-in-page
|
||||
import { NextMiddleware, NextResponse } from "next/server";
|
||||
|
||||
import { extendEventData, nextCollectBasicSettings } from "@calcom/lib/telemetry";
|
||||
|
|
|
@ -47,9 +47,9 @@
|
|||
"@hookform/error-message": "^2.0.0",
|
||||
"@hookform/resolvers": "^2.9.7",
|
||||
"@metamask/providers": "^8.1.1",
|
||||
"@next-auth/prisma-adapter": "^1.0.3",
|
||||
"@next-auth/prisma-adapter": "^1.0.4",
|
||||
"@next/bundle-analyzer": "12.1.6",
|
||||
"@radix-ui/react-avatar": "^0.1.0",
|
||||
"@radix-ui/react-avatar": "^0.1.4",
|
||||
"@radix-ui/react-collapsible": "^0.1.0",
|
||||
"@radix-ui/react-dialog": "^0.1.0",
|
||||
"@radix-ui/react-dropdown-menu": "^0.1.1",
|
||||
|
@ -58,106 +58,108 @@
|
|||
"@radix-ui/react-slider": "^0.1.1",
|
||||
"@radix-ui/react-switch": "^0.1.1",
|
||||
"@radix-ui/react-toggle-group": "^0.1.5",
|
||||
"@radix-ui/react-tooltip": "^0.1.0",
|
||||
"@stripe/react-stripe-js": "^1.8.0",
|
||||
"@stripe/stripe-js": "^1.29.0",
|
||||
"@radix-ui/react-tooltip": "^1.0.0",
|
||||
"@stripe/react-stripe-js": "^1.9.0",
|
||||
"@stripe/stripe-js": "^1.34.0",
|
||||
"@vercel/edge-functions-ui": "^0.2.1",
|
||||
"@wojtekmaj/react-daterange-picker": "^3.3.1",
|
||||
"accept-language-parser": "^1.5.0",
|
||||
"async": "^3.2.1",
|
||||
"async": "^3.2.4",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"classnames": "^2.3.1",
|
||||
"dotenv-cli": "^6.0.0",
|
||||
"googleapis": "^84.0.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
"handlebars": "^4.7.7",
|
||||
"ical.js": "^1.4.0",
|
||||
"ics": "^2.31.0",
|
||||
"ics": "^2.37.0",
|
||||
"jimp": "^0.16.1",
|
||||
"kbar": "^0.1.0-beta.36",
|
||||
"libphonenumber-js": "^1.9.53",
|
||||
"libphonenumber-js": "^1.10.10",
|
||||
"lodash": "^4.17.21",
|
||||
"markdown-it": "^13.0.1",
|
||||
"memory-cache": "^0.2.0",
|
||||
"micro": "^9.3.4",
|
||||
"micro": "^9.4.0",
|
||||
"mime-types": "^2.1.35",
|
||||
"next": "^12.2.0",
|
||||
"next": "^12.2.5",
|
||||
"next-auth": "^4.10.3",
|
||||
"next-axiom": "^0.10.0",
|
||||
"next-collect": "^0.2.0",
|
||||
"next-i18next": "^11.0.0",
|
||||
"next-mdx-remote": "^4.0.3",
|
||||
"next-collect": "^0.2.1",
|
||||
"next-i18next": "^11.3.0",
|
||||
"next-mdx-remote": "^4.1.0",
|
||||
"next-seo": "^4.26.0",
|
||||
"next-themes": "^0.2.0",
|
||||
"next-transpile-modules": "^9.0.0",
|
||||
"nock": "^13.2.8",
|
||||
"nodemailer": "^6.7.5",
|
||||
"nodemailer": "^6.7.7",
|
||||
"otplib": "^12.0.1",
|
||||
"qrcode": "^1.5.0",
|
||||
"react": "^18.1.0",
|
||||
"qrcode": "^1.5.1",
|
||||
"react": "^18.2.0",
|
||||
"react-colorful": "^5.5.1",
|
||||
"react-date-picker": "^8.3.6",
|
||||
"react-digit-input": "^2.1.0",
|
||||
"react-dom": "^18.1.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-easy-crop": "^3.5.2",
|
||||
"react-feather": "^2.0.10",
|
||||
"react-hook-form": "^7.31.1",
|
||||
"react-hot-toast": "^2.1.0",
|
||||
"react-hook-form": "^7.33.1",
|
||||
"react-hot-toast": "^2.3.0",
|
||||
"react-intl": "^5.25.1",
|
||||
"react-live-chat-loader": "^2.7.3",
|
||||
"react-multi-email": "^0.5.3",
|
||||
"react-phone-number-input": "^3.1.52",
|
||||
"react-query": "^3.39.0",
|
||||
"react-select": "^5.3.2",
|
||||
"react-timezone-select": "^1.3.1",
|
||||
"react-phone-number-input": "^3.2.6",
|
||||
"react-query": "^3.39.2",
|
||||
"react-select": "^5.4.0",
|
||||
"react-timezone-select": "^1.3.2",
|
||||
"react-use-intercom": "1.5.1",
|
||||
"react-virtualized-auto-sizer": "^1.0.6",
|
||||
"react-window": "^1.8.7",
|
||||
"rrule": "^2.6.9",
|
||||
"rrule": "^2.7.1",
|
||||
"short-uuid": "^4.2.0",
|
||||
"stripe": "^9.1.0",
|
||||
"stripe": "^9.16.0",
|
||||
"superjson": "1.9.1",
|
||||
"uuid": "^8.3.2",
|
||||
"web3": "^1.7.3",
|
||||
"zod": "^3.16.0"
|
||||
"web3": "^1.7.4",
|
||||
"zod": "^3.18.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.17.10",
|
||||
"@babel/core": "^7.18.9",
|
||||
"@calcom/config": "*",
|
||||
"@calcom/types": "*",
|
||||
"@microsoft/microsoft-graph-types-beta": "0.15.0-preview",
|
||||
"@playwright/test": "^1.22.1",
|
||||
"@playwright/test": "^1.25.0",
|
||||
"@types/accept-language-parser": "1.5.2",
|
||||
"@types/async": "^3.2.13",
|
||||
"@types/async": "^3.2.15",
|
||||
"@types/bcryptjs": "^2.4.2",
|
||||
"@types/glidejs__glide": "^3.4.2",
|
||||
"@types/jest": "^27.5.1",
|
||||
"@types/jest": "^28.1.7",
|
||||
"@types/lodash": "^4.14.182",
|
||||
"@types/markdown-it": "^12.2.3",
|
||||
"@types/memory-cache": "^0.2.2",
|
||||
"@types/micro": "7.3.6",
|
||||
"@types/micro": "7.3.7",
|
||||
"@types/mime-types": "^2.1.1",
|
||||
"@types/module-alias": "^2.0.1",
|
||||
"@types/node": "16.9.1",
|
||||
"@types/nodemailer": "^6.4.4",
|
||||
"@types/qrcode": "^1.4.1",
|
||||
"@types/react": "18.0.9",
|
||||
"@types/react-phone-number-input": "^3.0.13",
|
||||
"@types/react": "^18.0.9",
|
||||
"@types/react-phone-number-input": "^3.0.14",
|
||||
"@types/react-virtualized-auto-sizer": "^1.0.1",
|
||||
"@types/react-window": "^1.8.5",
|
||||
"@types/stripe": "^8.0.417",
|
||||
"@types/uuid": "8.3.1",
|
||||
"autoprefixer": "^10.4.7",
|
||||
"babel-jest": "^27.3.1",
|
||||
"env-cmd": "10.1.0",
|
||||
"eslint": "^8.16.0",
|
||||
"jest": "^26.0.0",
|
||||
"babel-jest": "^28.1.0",
|
||||
"env-cmd": "^10.1.0",
|
||||
"eslint": "^8.20.0",
|
||||
"jest": "^28.1.0",
|
||||
"jest-environment-jsdom": "^28.1.3",
|
||||
"jest-mock-extended": "^2.0.7",
|
||||
"mockdate": "^3.0.5",
|
||||
"module-alias": "^2.2.2",
|
||||
"postcss": "^8.4.13",
|
||||
"tailwindcss": "^3.1.3",
|
||||
"ts-jest": "^26.0.0",
|
||||
"ts-node": "^10.6.0",
|
||||
"typescript": "^4.6.4"
|
||||
"tailwindcss": "^3.1.6",
|
||||
"ts-jest": "^28.0.8",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^4.7.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { BookingStatus, Credential, Prisma, SchedulingType, WebhookTriggerEvents } from "@prisma/client";
|
||||
import async from "async";
|
||||
import type { NextApiRequest } from "next";
|
||||
import rrule from "rrule";
|
||||
import { RRule } from "rrule";
|
||||
import short from "short-uuid";
|
||||
import { v5 as uuidv5 } from "uuid";
|
||||
|
||||
|
@ -201,7 +201,7 @@ async function ensureAvailableUsers(
|
|||
try {
|
||||
if (eventType.recurringEvent) {
|
||||
const recurringEvent = parseRecurringEvent(eventType.recurringEvent);
|
||||
const allBookingDates = new rrule({ dtstart: new Date(input.dateFrom), ...recurringEvent }).all();
|
||||
const allBookingDates = new RRule({ dtstart: new Date(input.dateFrom), ...recurringEvent }).all();
|
||||
// Go through each date for the recurring event and check if each one's availability
|
||||
// DONE: Decreased computational complexity from O(2^n) to O(n) by refactoring this loop to stop
|
||||
// running at the first unavailable time.
|
||||
|
|
|
@ -3,8 +3,8 @@ import { signIn } from "next-auth/react";
|
|||
import { useRouter } from "next/router";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import stripe from "@calcom/app-store/stripepayment/lib/server";
|
||||
import { getPremiumPlanPrice } from "@calcom/app-store/stripepayment/lib/utils";
|
||||
import stripe from "@calcom/features/ee/payments/server/stripe";
|
||||
import { checkUsername } from "@calcom/lib/server/checkUsername";
|
||||
import prisma from "@calcom/prisma";
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import { useSession } from "next-auth/react";
|
|||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import RRule from "rrule";
|
||||
import { RRule } from "rrule";
|
||||
import { z } from "zod";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { expect } from "@playwright/test";
|
||||
import { UserPlan } from "@prisma/client";
|
||||
|
||||
import stripe from "@calcom/app-store/stripepayment/lib/server";
|
||||
import { getFreePlanPrice, getProPlanPrice } from "@calcom/app-store/stripepayment/lib/utils";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import stripe from "@calcom/features/ee/payments/server/stripe";
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import prisma from "@calcom/prisma";
|
||||
|
||||
|
@ -40,9 +40,11 @@ test.describe("Change username on settings", () => {
|
|||
// Click on save button
|
||||
await page.click("[data-testid=update-username-btn-desktop]");
|
||||
|
||||
await page.click("[data-testid=save-username]");
|
||||
// eslint-disable-next-line playwright/no-wait-for-timeout
|
||||
await page.waitForTimeout(400);
|
||||
await Promise.all([
|
||||
page.waitForResponse("**/viewer.updateProfile*"),
|
||||
page.click("[data-testid=save-username]"),
|
||||
]);
|
||||
|
||||
const newUpdatedUser = await prisma.user.findFirst({
|
||||
where: {
|
||||
id: user.id,
|
||||
|
|
|
@ -15,7 +15,8 @@ async function clickEmbedButton(page: Page) {
|
|||
const embedButton = page.locator("[data-testid=embed]");
|
||||
const embedUrl = await embedButton.getAttribute("data-test-embed-url");
|
||||
embedButton.click();
|
||||
return embedUrl;
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
return embedUrl!;
|
||||
}
|
||||
|
||||
async function clickFirstEventTypeEmbedButton(page: Page) {
|
||||
|
@ -158,25 +159,29 @@ test.describe("Embed Code Generator Tests", () => {
|
|||
});
|
||||
|
||||
test.describe("Event Type Edit Page", () => {
|
||||
//TODO: Instead of hardcoding, browse through actual events, as this ID might change in future
|
||||
const sixtyMinProEventId = "6";
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto(`/event-types/${sixtyMinProEventId}`);
|
||||
await page.goto(`/event-types`);
|
||||
await Promise.all([
|
||||
page.locator('[href*="/event-types/"]').first().click(),
|
||||
page.waitForNavigation({
|
||||
url: (url) => url.pathname.startsWith("/event-types/"),
|
||||
}),
|
||||
]);
|
||||
});
|
||||
|
||||
test("open Embed Dialog for the Event Type", async ({ page }) => {
|
||||
const basePage = new URL(page.url()).pathname;
|
||||
const embedUrl = await clickEmbedButton(page);
|
||||
|
||||
await expectToBeNavigatingToEmbedTypesDialog(page, {
|
||||
embedUrl,
|
||||
basePage: `/event-types/${sixtyMinProEventId}`,
|
||||
basePage,
|
||||
});
|
||||
|
||||
chooseEmbedType(page, "inline");
|
||||
|
||||
await expectToBeNavigatingToEmbedCodeAndPreviewDialog(page, {
|
||||
embedUrl,
|
||||
basePage: `/event-types/${sixtyMinProEventId}`,
|
||||
basePage,
|
||||
embedType: "inline",
|
||||
});
|
||||
|
||||
|
@ -188,7 +193,7 @@ test.describe("Embed Code Generator Tests", () => {
|
|||
|
||||
await expectToContainValidPreviewIframe(page, {
|
||||
embedType: "inline",
|
||||
calLink: "pro/60min",
|
||||
calLink: decodeURIComponent(embedUrl),
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
module.exports = (path, options) => {
|
||||
// Call the defaultResolver, so we leverage its cache, error handling, etc.
|
||||
return options.defaultResolver(path, {
|
||||
...options,
|
||||
// Use packageFilter to process parsed `package.json` before the resolution (see https://www.npmjs.com/package/resolve#resolveid-opts-cb)
|
||||
packageFilter: (pkg) => {
|
||||
// See https://github.com/microsoft/accessibility-insights-web/blob/40416a4ae6b91baf43102f58e069eff787de4de2/src/tests/common/resolver.js
|
||||
if (pkg.name === "uuid" || pkg.name === "nanoid") {
|
||||
delete pkg["exports"];
|
||||
delete pkg["module"];
|
||||
}
|
||||
return pkg;
|
||||
},
|
||||
});
|
||||
};
|
|
@ -0,0 +1,6 @@
|
|||
// This is a workaround for https://github.com/jsdom/jsdom/issues/2524#issuecomment-902027138
|
||||
|
||||
// See https://github.com/microsoft/accessibility-insights-web/blob/40416a4ae6b91baf43102f58e069eff787de4de2/src/tests/unit/jest-setup.ts
|
||||
const { TextEncoder, TextDecoder } = require("util");
|
||||
global.TextEncoder = TextEncoder;
|
||||
global.TextDecoder = TextDecoder;
|
|
@ -1 +1 @@
|
|||
Subproject commit 5261b5839e277012a50903cd5b110f9e89923e91
|
||||
Subproject commit a70f2f2b7018813313f8cf8520f3832e737d400c
|
19
package.json
19
package.json
|
@ -44,7 +44,7 @@
|
|||
"pre-commit": "lint-staged",
|
||||
"predev": "echo 'Checking env files'",
|
||||
"prepare": "husky install",
|
||||
"prisma": "yarn dotenv -e .env yarn workspace @calcom/prisma prisma",
|
||||
"prisma": "yarn workspace @calcom/prisma prisma",
|
||||
"start": "turbo run start --scope=\"@calcom/web\"",
|
||||
"test-e2e": "turbo run test --scope=\"@calcom/web\" && yarn turbo run test-e2e --scope=\"@calcom/web\" --concurrency=1",
|
||||
"test-playwright": "yarn playwright test --config=tests/config/playwright.config.ts",
|
||||
|
@ -55,17 +55,16 @@
|
|||
"devDependencies": {
|
||||
"@snaplet/copycat": "^0.3.0",
|
||||
"dotenv-checker": "^1.1.5",
|
||||
"dotenv-cli": "^6.0.0",
|
||||
"husky": "^8.0.1",
|
||||
"lint-staged": "^12.4.1",
|
||||
"prettier": "^2.5.1"
|
||||
"lint-staged": "^12.5.0",
|
||||
"prettier": "^2.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"turbo": "^1.4.3"
|
||||
},
|
||||
"resolutions": {
|
||||
"@types/node": "16.9.1",
|
||||
"@types/react": "18.0.9",
|
||||
"@types/react": "^18.0.9",
|
||||
"@types/react-dom": "18.0.4"
|
||||
},
|
||||
"lint-staged": {
|
||||
|
@ -85,5 +84,13 @@
|
|||
"npm": ">=7.0.0",
|
||||
"yarn": ">=1.19.0 < 2.0.0"
|
||||
},
|
||||
"packageManager": "yarn@1.22.17"
|
||||
"prisma": {
|
||||
"schema": "packages/prisma/schema.prisma",
|
||||
"seed": "ts-node --transpile-only ./packages/prisma/seed.ts"
|
||||
},
|
||||
"packageManager": "yarn@1.22.17",
|
||||
"syncpack": {
|
||||
"filter": "^(?!@calcom).*",
|
||||
"semverRange": ""
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,14 +22,14 @@
|
|||
"ink-select-input": "^4.2.1",
|
||||
"ink-text-input": "^4.0.3",
|
||||
"meow": "^9.0.0",
|
||||
"react": "18.1.0"
|
||||
"react": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chokidar": "^3.5.3",
|
||||
"@types/react": "^18.0.9",
|
||||
"eslint-plugin-react": "^7.30.0",
|
||||
"eslint-plugin-react-hooks": "^4.5.0",
|
||||
"ts-node": "^10.6.0",
|
||||
"typescript": "^4.6.4"
|
||||
"eslint-plugin-react": "^7.30.1",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^4.7.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ If we rename all existing apps to their slug names, we can remove type and then
|
|||
- Don't override icon.svg
|
||||
- For Video Apps
|
||||
- Update app-store/locations.ts
|
||||
- _metadata.ts should have locationType and locationLabel props.
|
||||
- \_metadata.ts should have locationType and locationLabel props.
|
||||
- Merge app-store:watch and app-store commands, introduce app-store --watch
|
||||
- Allow inputs in non interactive way as well - That would allow easily copy pasting commands.
|
||||
- An app created through CLI should be able to completely skip API validation for testing purposes. Credentials should be created with no API specified specific to the app. It would allow us to test any app end to end not worrying about the corresponding API endpoint.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"description": "Apple calendar runs both the macOS and iOS mobile operating systems. Offering online cloud backup of calendars using Apple’s iCloud service, it can sync with Google Calendar and Microsoft Exchange Server. Users can schedule events in their day that include time, location, duration, and extra notes.",
|
||||
"dependencies": {
|
||||
"@calcom/prisma": "*",
|
||||
"react-hook-form": "^7.31.1"
|
||||
"react-hook-form": "^7.33.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@calcom/types": "*"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"@calcom/lib": "*",
|
||||
"@calcom/prisma": "*",
|
||||
"@calcom/ui": "*",
|
||||
"react-hook-form": "^7.31.1"
|
||||
"react-hook-form": "^7.33.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@calcom/types": "*"
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@calcom/types": "*",
|
||||
"@types/jest": "^26.0.0",
|
||||
"jest": "^26.0.0",
|
||||
"ts-jest": "^26.0.0"
|
||||
"@types/jest": "^28.1.7",
|
||||
"jest": "^28.1.0",
|
||||
"ts-jest": "^28.0.8"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"@calcom/lib": "*",
|
||||
"@calcom/prisma": "*",
|
||||
"@calcom/ui": "*",
|
||||
"react-hook-form": "^7.31.1",
|
||||
"react-hook-form": "^7.33.1",
|
||||
"ews-javascript-api": "^0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"@calcom/lib": "*",
|
||||
"@calcom/prisma": "*",
|
||||
"@calcom/ui": "*",
|
||||
"react-hook-form": "^7.31.1",
|
||||
"react-hook-form": "^7.33.1",
|
||||
"ews-javascript-api": "^0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
"description": "A business communication platform that includes persistent chat rooms (channels), private groups and direct messaging.",
|
||||
"dependencies": {
|
||||
"@calcom/prisma": "*",
|
||||
"@slack/web-api": "^6.7.0",
|
||||
"slack-block-builder": "^2.5.0",
|
||||
"zod": "^3.16.0"
|
||||
"@slack/web-api": "^6.7.2",
|
||||
"slack-block-builder": "^2.6.0",
|
||||
"zod": "^3.18.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@calcom/types": "*"
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
"@calcom/lib": "*",
|
||||
"@calcom/prisma": "*",
|
||||
"@calcom/types": "*",
|
||||
"@stripe/react-stripe-js": "^1.8.0",
|
||||
"@stripe/stripe-js": "^1.29.0",
|
||||
"stripe": "^9.1.0",
|
||||
"@stripe/react-stripe-js": "^1.9.0",
|
||||
"@stripe/stripe-js": "^1.34.0",
|
||||
"stripe": "^9.16.0",
|
||||
"uuid": "^8.3.2",
|
||||
"zod": "^3.16.0"
|
||||
"zod": "^3.18.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@calcom/types": "*",
|
||||
"ts-node": "^10.6.0"
|
||||
"ts-node": "^10.9.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"description": "Connect your health data or wearables to trigger actions on your calendar.",
|
||||
"dependencies": {
|
||||
"@calcom/prisma": "*",
|
||||
"@tryvital/vital-node": "^1.3.6",
|
||||
"@tryvital/vital-node": "^1.4.1",
|
||||
"queue": "^6.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -10,23 +10,23 @@
|
|||
],
|
||||
"dependencies": {
|
||||
"@calcom/eslint-plugin-eslint": "*",
|
||||
"eslint-config-next": "^12.1.6",
|
||||
"eslint-config-next": "^12.2.3",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-config-turbo": "^0.0.3",
|
||||
"eslint-plugin-playwright": "^0.9.0",
|
||||
"eslint-plugin-prettier": "^4.0.0"
|
||||
"eslint-plugin-prettier": "^4.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/forms": "^0.5.1",
|
||||
"@tailwindcss/forms": "^0.5.2",
|
||||
"@tailwindcss/line-clamp": "^0.4.0",
|
||||
"@tailwindcss/typography": "^0.5.2",
|
||||
"@tailwindcss/typography": "^0.5.4",
|
||||
"@trivago/prettier-plugin-sort-imports": "3.2.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.25.0",
|
||||
"@typescript-eslint/parser": "^5.25.0",
|
||||
"eslint": "^8.15.0",
|
||||
"prettier": "^2.5.1",
|
||||
"prettier-plugin-tailwindcss": "^0.1.11",
|
||||
"tailwindcss": "^3.1.3",
|
||||
"typescript": "^4.6.4"
|
||||
"@typescript-eslint/eslint-plugin": "^5.31.0",
|
||||
"@typescript-eslint/parser": "^5.31.0",
|
||||
"eslint": "^8.20.0",
|
||||
"prettier": "^2.7.1",
|
||||
"prettier-plugin-tailwindcss": "^0.1.13",
|
||||
"tailwindcss": "^3.1.6",
|
||||
"typescript": "^4.7.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"@calcom/dayjs": "*",
|
||||
"@calcom/lib": "*",
|
||||
"ical.js": "^1.4.0",
|
||||
"ics": "^2.31.0",
|
||||
"ics": "^2.37.0",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,6 +1,31 @@
|
|||
/* eslint-disable @calcom/eslint/deprecated-imports */
|
||||
import dayjs from "dayjs";
|
||||
import dayjsBusinessTime from "dayjs-business-days2";
|
||||
import "dayjs/locale/ar";
|
||||
import "dayjs/locale/bg";
|
||||
import "dayjs/locale/cs";
|
||||
import "dayjs/locale/de";
|
||||
import "dayjs/locale/es";
|
||||
import "dayjs/locale/es-mx";
|
||||
import "dayjs/locale/fr";
|
||||
import "dayjs/locale/he";
|
||||
import "dayjs/locale/hu";
|
||||
import "dayjs/locale/it";
|
||||
import "dayjs/locale/ja";
|
||||
import "dayjs/locale/ko";
|
||||
import "dayjs/locale/nl";
|
||||
import "dayjs/locale/pl";
|
||||
import "dayjs/locale/pt";
|
||||
import "dayjs/locale/pt-br";
|
||||
import "dayjs/locale/ro";
|
||||
import "dayjs/locale/ru";
|
||||
import "dayjs/locale/sr";
|
||||
import "dayjs/locale/sv";
|
||||
import "dayjs/locale/tr";
|
||||
import "dayjs/locale/uk";
|
||||
import "dayjs/locale/vi";
|
||||
import "dayjs/locale/zh-cn";
|
||||
import "dayjs/locale/zh-tw";
|
||||
import customParseFormat from "dayjs/plugin/customParseFormat";
|
||||
import isBetween from "dayjs/plugin/isBetween";
|
||||
import isToday from "dayjs/plugin/isToday";
|
||||
|
@ -20,32 +45,6 @@ dayjs.extend(timeZone);
|
|||
dayjs.extend(toArray);
|
||||
dayjs.extend(utc);
|
||||
|
||||
require('dayjs/locale/ar');
|
||||
require('dayjs/locale/bg');
|
||||
require('dayjs/locale/cs');
|
||||
require('dayjs/locale/de');
|
||||
require('dayjs/locale/es');
|
||||
require('dayjs/locale/es-mx');
|
||||
require('dayjs/locale/fr');
|
||||
require('dayjs/locale/he');
|
||||
require('dayjs/locale/hu');
|
||||
require('dayjs/locale/it');
|
||||
require('dayjs/locale/ja');
|
||||
require('dayjs/locale/ko');
|
||||
require('dayjs/locale/nl');
|
||||
require('dayjs/locale/pl');
|
||||
require('dayjs/locale/pt');
|
||||
require('dayjs/locale/pt-br');
|
||||
require('dayjs/locale/ro');
|
||||
require('dayjs/locale/ru');
|
||||
require('dayjs/locale/sr');
|
||||
require('dayjs/locale/sv');
|
||||
require('dayjs/locale/tr');
|
||||
require('dayjs/locale/uk');
|
||||
require('dayjs/locale/vi');
|
||||
require('dayjs/locale/zh-tw');
|
||||
require('dayjs/locale/zh-cn');
|
||||
|
||||
export type Dayjs = dayjs.Dayjs;
|
||||
|
||||
export type { ConfigType } from "dayjs";
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"version": "1.0.0",
|
||||
"main": "./index.ts",
|
||||
"dependencies": {
|
||||
"dayjs": "^1.11.2",
|
||||
"dayjs-business-days2": "^1.1.0"
|
||||
"dayjs": "1.11.2",
|
||||
"dayjs-business-days2": "1.1.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
"dependencies": {
|
||||
"@calcom/dayjs": "*",
|
||||
"@calcom/lib": "*",
|
||||
"next-i18next": "^11.0.0",
|
||||
"rrule": "^2.6.9"
|
||||
"next-i18next": "^11.3.0",
|
||||
"rrule": "^2.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@calcom/types": "*"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TFunction } from "next-i18next";
|
||||
import rrule from "rrule";
|
||||
import { RRule } from "rrule";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { getEveryFreqFor } from "@calcom/lib/recurringStrings";
|
||||
|
@ -11,7 +11,7 @@ import { Info } from "./Info";
|
|||
function getRecurringWhen({ calEvent }: { calEvent: CalendarEvent }) {
|
||||
if (calEvent.recurringEvent) {
|
||||
const t = calEvent.attendees[0].language.translate;
|
||||
const rruleOptions = new rrule(calEvent.recurringEvent).options;
|
||||
const rruleOptions = new RRule(calEvent.recurringEvent).options;
|
||||
const recurringEvent: RecurringEvent = {
|
||||
freq: rruleOptions.freq,
|
||||
count: rruleOptions.count || 1,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { createEvent, DateArray } from "ics";
|
||||
import { TFunction } from "next-i18next";
|
||||
import rrule from "rrule";
|
||||
import { RRule } from "rrule";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { getRichDescription } from "@calcom/lib/CalEventParser";
|
||||
|
@ -27,7 +27,7 @@ export default class AttendeeScheduledEmail extends BaseEmail {
|
|||
let recurrenceRule: string | undefined = undefined;
|
||||
if (this.calEvent.recurringEvent?.count) {
|
||||
// ics appends "RRULE:" already, so removing it from RRule generated string
|
||||
recurrenceRule = new rrule(this.calEvent.recurringEvent).toString().replace("RRULE:", "");
|
||||
recurrenceRule = new RRule(this.calEvent.recurringEvent).toString().replace("RRULE:", "");
|
||||
}
|
||||
const icsEvent = createEvent({
|
||||
start: dayjs(this.calEvent.startTime)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { createEvent, DateArray, Person } from "ics";
|
||||
import { TFunction } from "next-i18next";
|
||||
import rrule from "rrule";
|
||||
import { RRule } from "rrule";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { getRichDescription } from "@calcom/lib/CalEventParser";
|
||||
|
@ -27,7 +27,7 @@ export default class OrganizerScheduledEmail extends BaseEmail {
|
|||
let recurrenceRule: string | undefined = undefined;
|
||||
if (this.calEvent.recurringEvent?.count) {
|
||||
// ics appends "RRULE:" already, so removing it from RRule generated string
|
||||
recurrenceRule = new rrule(this.calEvent.recurringEvent).toString().replace("RRULE:", "");
|
||||
recurrenceRule = new RRule(this.calEvent.recurringEvent).toString().replace("RRULE:", "");
|
||||
}
|
||||
const icsEvent = createEvent({
|
||||
start: dayjs(this.calEvent.startTime)
|
||||
|
|
|
@ -43,12 +43,11 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^10.4.7",
|
||||
"eslint": "^8.15.0",
|
||||
"eslint": "^8.20.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"postcss": "^8.4.13",
|
||||
"typescript": "^4.6.4",
|
||||
"vite": "^2.9.9",
|
||||
"tailwindcss": "^3.1.3"
|
||||
},
|
||||
"dependencies": {}
|
||||
"typescript": "^4.7.4",
|
||||
"vite": "^2.9.14",
|
||||
"tailwindcss": "^3.1.6"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
"module": "./dist/Cal.es.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"peerDependencies": {
|
||||
"react": "^18.1.0",
|
||||
"react-dom": "^18.1.0"
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
@ -41,13 +41,13 @@
|
|||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "18.0.9",
|
||||
"@types/react": "^18.0.9",
|
||||
"@types/react-dom": "18.0.4",
|
||||
"@vitejs/plugin-react": "^1.3.2",
|
||||
"eslint": "^8.15.0",
|
||||
"eslint": "^8.20.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"typescript": "^4.6.4",
|
||||
"vite": "^2.9.9"
|
||||
"typescript": "^4.7.4",
|
||||
"vite": "^2.9.14"
|
||||
},
|
||||
"dependencies": {
|
||||
"@calcom/embed-core": "*",
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
],
|
||||
"types": "./dist/index.d.ts",
|
||||
"devDependencies": {
|
||||
"eslint": "^8.15.0",
|
||||
"typescript": "^4.6.4"
|
||||
"eslint": "^8.20.0",
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@calcom/embed-core": "*"
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
"version": "0.1.0",
|
||||
"main": "./src/index.js",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/parser": "^5.25.0",
|
||||
"@typescript-eslint/utils": "^5.30.5",
|
||||
"eslint": "^8.15.0",
|
||||
"ts-node": "^10.6.0",
|
||||
"typescript": "^4.6.4"
|
||||
"@typescript-eslint/parser": "^5.31.0",
|
||||
"@typescript-eslint/utils": "^5.31.0",
|
||||
"eslint": "^8.20.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/eslint": "^8.4.5"
|
||||
|
|
|
@ -28,7 +28,12 @@ function ApiKeyListContainer() {
|
|||
title={t("api_keys")}
|
||||
subtitle={t("api_keys_subtitle")}
|
||||
actions={
|
||||
<Button color="minimal" size="icon" StartIcon={Icon.FiPlus} onClick={() => setNewApiKeyModal(true)} />
|
||||
<Button
|
||||
color="minimal"
|
||||
size="icon"
|
||||
StartIcon={Icon.FiPlus}
|
||||
onClick={() => setNewApiKeyModal(true)}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
<LicenseRequired>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"@sendgrid/client": "^7.6.2",
|
||||
"@sendgrid/mail": "^7.6.2",
|
||||
"twilio": "^3.75.1",
|
||||
"zod": "^3.16.0"
|
||||
"zod": "^3.18.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@calcom/tsconfig": "*"
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
import Stripe from "stripe";
|
||||
|
||||
declare global {
|
||||
// eslint-disable-next-line no-var
|
||||
var stripe: Stripe | undefined;
|
||||
}
|
||||
|
||||
const stripe =
|
||||
globalThis.stripe ||
|
||||
new Stripe(process.env.STRIPE_PRIVATE_KEY!, {
|
||||
apiVersion: "2020-08-27",
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
globalThis.stripe = stripe;
|
||||
}
|
||||
|
||||
export default stripe;
|
|
@ -108,7 +108,12 @@ export default function WorkflowListPage({ workflows }: Props) {
|
|||
<div className="flex justify-between space-x-2 rtl:space-x-reverse">
|
||||
<Dropdown>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button type="button" color="minimal" size="icon" StartIcon={Icon.FiMoreHorizontal} />
|
||||
<Button
|
||||
type="button"
|
||||
color="minimal"
|
||||
size="icon"
|
||||
StartIcon={Icon.FiMoreHorizontal}
|
||||
/>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
<DropdownMenuItem>
|
||||
|
|
|
@ -136,7 +136,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
|||
return (
|
||||
<Select
|
||||
isSearchable={false}
|
||||
className="flex-1 block w-full min-w-0 mt-3 text-sm rounded-sm"
|
||||
className="mt-3 block w-full min-w-0 flex-1 rounded-sm text-sm"
|
||||
onChange={(val) => {
|
||||
if (val) {
|
||||
form.setValue("trigger", val.value);
|
||||
|
@ -159,7 +159,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
|||
/>
|
||||
{showTimeSection && (
|
||||
<div className="mt-5 space-y-1">
|
||||
<label htmlFor="label" className="block mb-2 text-sm font-medium text-gray-700">
|
||||
<label htmlFor="label" className="mb-2 block text-sm font-medium text-gray-700">
|
||||
{t("how_long_before")}
|
||||
</label>
|
||||
<div className="flex">
|
||||
|
@ -167,7 +167,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
|||
type="number"
|
||||
min="1"
|
||||
defaultValue={form.getValues("time") || 24}
|
||||
className="block w-20 px-3 py-2 mr-5 text-sm border-gray-300 rounded-sm marker:border focus:border-neutral-800 focus:outline-none focus:ring-1 focus:ring-neutral-800"
|
||||
className="mr-5 block w-20 rounded-sm border-gray-300 px-3 py-2 text-sm marker:border focus:border-neutral-800 focus:outline-none focus:ring-1 focus:ring-neutral-800"
|
||||
{...form.register("time", { valueAsNumber: true })}
|
||||
/>
|
||||
<div className="w-28">
|
||||
|
@ -178,7 +178,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
|||
return (
|
||||
<Select
|
||||
isSearchable={false}
|
||||
className="flex-1 block min-w-0 text-sm rounded-sm"
|
||||
className="block min-w-0 flex-1 rounded-sm text-sm"
|
||||
onChange={(val) => {
|
||||
if (val) {
|
||||
form.setValue("timeUnit", val.value);
|
||||
|
@ -221,7 +221,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
|||
return (
|
||||
<Select
|
||||
isSearchable={false}
|
||||
className="flex-1 block w-full min-w-0 mt-3 text-sm rounded-sm"
|
||||
className="mt-3 block w-full min-w-0 flex-1 rounded-sm text-sm"
|
||||
onChange={(val) => {
|
||||
if (val) {
|
||||
let counter = 0;
|
||||
|
@ -270,7 +270,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
|||
<>
|
||||
<label
|
||||
htmlFor="sendTo"
|
||||
className="block mt-5 text-sm font-medium text-gray-700 dark:text-white">
|
||||
className="mt-5 block text-sm font-medium text-gray-700 dark:text-white">
|
||||
{t("phone_number")}
|
||||
</label>
|
||||
<div className="flex space-y-1">
|
||||
|
@ -291,7 +291,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
|||
countrySelectProps={{ className: "text-black" }}
|
||||
numberInputProps={{ className: "border-0 text-sm focus:ring-0 dark:bg-gray-700" }}
|
||||
className={classNames(
|
||||
"order-1 focus-within:border-brand block w-full rounded-sm border border-gray-300 py-px pl-3 ring-black focus-within:ring-1 disabled:text-gray-500 disabled:opacity-50 dark:border-gray-900 dark:bg-gray-700 dark:text-white dark:selection:bg-green-500 disabled:dark:text-gray-500",
|
||||
"focus-within:border-brand order-1 block w-full rounded-sm border border-gray-300 py-px pl-3 ring-black focus-within:ring-1 disabled:text-gray-500 disabled:opacity-50 dark:border-gray-900 dark:bg-gray-700 dark:text-white dark:selection:bg-green-500 disabled:dark:text-gray-500",
|
||||
!editNumberMode ? "text-gray-500 dark:text-gray-500" : ""
|
||||
)}
|
||||
/>
|
||||
|
@ -329,7 +329,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
|||
</>
|
||||
)}
|
||||
<div className="mt-5">
|
||||
<label htmlFor="label" className="block mt-5 text-sm font-medium text-gray-700">
|
||||
<label htmlFor="label" className="mt-5 block text-sm font-medium text-gray-700">
|
||||
{t("choose_template")}
|
||||
</label>
|
||||
<Controller
|
||||
|
@ -339,7 +339,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
|||
return (
|
||||
<Select
|
||||
isSearchable={false}
|
||||
className="flex-1 block w-full min-w-0 mt-3 text-sm rounded-sm"
|
||||
className="mt-3 block w-full min-w-0 flex-1 rounded-sm text-sm"
|
||||
onChange={(val) => {
|
||||
if (val) {
|
||||
form.setValue(`steps.${step.stepNumber - 1}.template`, val.value);
|
||||
|
@ -367,10 +367,10 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
|||
<>
|
||||
{isEmailSubjectNeeded && (
|
||||
<div className="mt-5 mb-2 ">
|
||||
<label className="block mt-3 mb-1 text-sm font-medium text-gray-700">
|
||||
<label className="mt-3 mb-1 block text-sm font-medium text-gray-700">
|
||||
{t("subject")}
|
||||
</label>
|
||||
<div className="bg-white border border-gray-300 rounded-sm mtext-sm border-1 focus-within:border-1 focus-within:border-black">
|
||||
<div className="mtext-sm border-1 focus-within:border-1 rounded-sm border border-gray-300 bg-white focus-within:border-black">
|
||||
<AddVariablesDropdown
|
||||
disabled={!editEmailBodyMode}
|
||||
addVariable={addVariable}
|
||||
|
@ -396,10 +396,10 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
|||
</div>
|
||||
</div>
|
||||
)}
|
||||
<label className="block mt-3 mb-1 text-sm font-medium text-gray-700 dark:text-white">
|
||||
<label className="mt-3 mb-1 block text-sm font-medium text-gray-700 dark:text-white">
|
||||
{isEmailSubjectNeeded ? t("email_body") : t("text_message")}
|
||||
</label>
|
||||
<div className="mb-2 text-sm bg-white border border-gray-300 rounded-sm border-1 focus-within:border-1 focus-within:border-black">
|
||||
<div className="border-1 focus-within:border-1 mb-2 rounded-sm border border-gray-300 bg-white text-sm focus-within:border-black">
|
||||
<AddVariablesDropdown
|
||||
disabled={!editEmailBodyMode}
|
||||
addVariable={addVariable}
|
||||
|
@ -429,14 +429,14 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
|||
type="button"
|
||||
onClick={() => setIsInfoParagraphOpen(!isInfoParagraphOpen)}>
|
||||
{isInfoParagraphOpen ? (
|
||||
<Icon.FiChevronDown className="h-5 text-gray-700 w5" />
|
||||
<Icon.FiChevronDown className="w5 h-5 text-gray-700" />
|
||||
) : (
|
||||
<Icon.FiChevronRight className="h-5 text-gray-700 w5" />
|
||||
<Icon.FiChevronRight className="w5 h-5 text-gray-700" />
|
||||
)}
|
||||
<span className="text-sm">{t("using_additional_inputs_as_variables")}</span>
|
||||
</button>
|
||||
{isInfoParagraphOpen && (
|
||||
<div className="w-full pr-6 mt-4 ml-6 text-sm">
|
||||
<div className="mt-4 ml-6 w-full pr-6 text-sm">
|
||||
<div className="lg:flex">
|
||||
<div className="lg:w-1/2">
|
||||
<p className="font-medium">{t("example_1")}:</p>
|
||||
|
|
|
@ -4,6 +4,5 @@
|
|||
"description": "Cal.com's main collocation of features",
|
||||
"authors": "Cal.com, Inc.",
|
||||
"version": "1.0.0",
|
||||
"main": "index.ts",
|
||||
"dependencies": {}
|
||||
"main": "index.ts"
|
||||
}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
/// <reference path="../types/ical.d.ts"/>
|
||||
import { Credential, Prisma } from "@prisma/client";
|
||||
import ICAL from "ical.js";
|
||||
import { Attendee, createEvent, DateArray, DurationObject, Person } from "ics";
|
||||
import type { Attendee, DateArray, DurationObject, Person } from "ics";
|
||||
import { createEvent } from "ics";
|
||||
import {
|
||||
createAccount,
|
||||
createCalendarObject,
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
"dependencies": {
|
||||
"@calcom/config": "*",
|
||||
"@calcom/dayjs": "*",
|
||||
"@prisma/client": "^4.1.0",
|
||||
"@prisma/client": "^4.2.1",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"ical.js": "^1.4.0",
|
||||
"ics": "^2.31.0",
|
||||
"next-i18next": "^11.0.0",
|
||||
"react-hot-toast": "^2.1.0",
|
||||
"rrule": "^2.6.9",
|
||||
"ics": "^2.37.0",
|
||||
"next-i18next": "^11.3.0",
|
||||
"react-hot-toast": "^2.3.0",
|
||||
"rrule": "^2.7.1",
|
||||
"tsdav": "2.0.2",
|
||||
"tslog": "^3.2.1",
|
||||
"uuid": "^8.3.2"
|
||||
|
@ -29,8 +29,8 @@
|
|||
"@calcom/tsconfig": "*",
|
||||
"@calcom/types": "*",
|
||||
"@faker-js/faker": "^7.3.0",
|
||||
"jest": "^26.0.0",
|
||||
"ts-jest": "^26.0.0",
|
||||
"typescript": "^4.6.4"
|
||||
"jest": "^28.1.0",
|
||||
"ts-jest": "^28.0.8",
|
||||
"typescript": "^4.7.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
import { CollectOpts, EventHandler } from "next-collect";
|
||||
import { useCollector } from "next-collect/client";
|
||||
// it's ok to do this since we're importing only types which are harmless
|
||||
// eslint-disable-next-line @next/next/no-server-import-in-page
|
||||
import type { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
import { CONSOLE_URL } from "./constants";
|
||||
|
@ -90,7 +88,7 @@ export const extendEventData = (
|
|||
typeof req.headers?.get === "function"
|
||||
? !!req.headers.get("x-vercel-id")
|
||||
: !!(req.headers as any)?.["x-vercel-id"];
|
||||
const pageUrl = original?.page_url || (req as any)?.page?.name || undefined;
|
||||
const pageUrl = original?.page_url || req.url || undefined;
|
||||
const cookies = req.cookies as { [key: string]: any };
|
||||
return {
|
||||
title: "",
|
||||
|
|
|
@ -23,13 +23,12 @@
|
|||
"npm-run-all": "^4.1.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"prisma": "^4.1.0",
|
||||
"ts-node": "^10.6.0",
|
||||
"zod": "^3.16.0",
|
||||
"@calcom/lib": "*",
|
||||
"zod-prisma": "^0.5.4",
|
||||
"@prisma/client": "^4.1.0",
|
||||
"dotenv-cli": "^6.0.0"
|
||||
"@prisma/client": "^4.2.1",
|
||||
"prisma": "^4.2.1",
|
||||
"ts-node": "^10.9.1",
|
||||
"zod": "^3.18.0",
|
||||
"zod-prisma": "^0.5.4"
|
||||
},
|
||||
"main": "index.ts",
|
||||
"types": "index.d.ts",
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
"version": "1.0.0",
|
||||
"main": "index.ts",
|
||||
"dependencies": {
|
||||
"@trpc/client": "^9.25.2",
|
||||
"@trpc/next": "^9.25.2",
|
||||
"@trpc/react": "^9.25.2",
|
||||
"@trpc/server": "^9.25.2",
|
||||
"@trpc/client": "^9.26.2",
|
||||
"@trpc/next": "^9.26.2",
|
||||
"@trpc/react": "^9.26.2",
|
||||
"@trpc/server": "^9.26.2",
|
||||
"superjson": "1.9.1",
|
||||
"zod": "^3.16.0"
|
||||
"zod": "^3.18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -116,9 +116,9 @@ export const apiKeysRouter = createProtectedRouter()
|
|||
|
||||
const apiKeyToDelete = await ctx.prisma.apiKey.findFirst({
|
||||
where: {
|
||||
id
|
||||
}
|
||||
})
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
await ctx.prisma.user.update({
|
||||
where: {
|
||||
|
@ -134,12 +134,12 @@ export const apiKeysRouter = createProtectedRouter()
|
|||
});
|
||||
|
||||
//remove all existing zapier webhooks, as we always have only one zapier API key and the running zaps won't work any more if this key is deleted
|
||||
if(apiKeyToDelete && apiKeyToDelete.appId === 'zapier'){
|
||||
if (apiKeyToDelete && apiKeyToDelete.appId === "zapier") {
|
||||
await ctx.prisma.webhook.deleteMany({
|
||||
where: {
|
||||
appId: 'zapier'
|
||||
}
|
||||
})
|
||||
appId: "zapier",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -85,8 +85,12 @@ const InputField = forwardRef<HTMLInputElement, InputFieldProps>(function InputF
|
|||
<Input id={id} placeholder={placeholder} className={className} {...passThrough} ref={ref} />
|
||||
)}
|
||||
{hint}
|
||||
{methods?.formState?.errors[props.name] && (
|
||||
<Alert className="mt-1" severity="error" message={methods.formState.errors[props.name].message} />
|
||||
{methods?.formState?.errors[props.name]?.message && (
|
||||
<Alert
|
||||
className="mt-1"
|
||||
severity="error"
|
||||
message={<>{methods.formState.errors[props.name]!.message}</>}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
@ -175,8 +179,12 @@ export const TextAreaField = forwardRef<HTMLTextAreaElement, TextAreaFieldProps>
|
|||
</Label>
|
||||
)}
|
||||
<TextArea ref={ref} placeholder={placeholder} {...passThrough} />
|
||||
{methods?.formState?.errors[props.name] && (
|
||||
<Alert className="mt-1" severity="error" message={methods.formState.errors[props.name].message} />
|
||||
{methods?.formState?.errors[props.name]?.message && (
|
||||
<Alert
|
||||
className="mt-1"
|
||||
severity="error"
|
||||
message={<>{methods.formState.errors[props.name]!.message}</>}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -16,19 +16,19 @@
|
|||
"@radix-ui/react-dialog": "^0.1.0",
|
||||
"@radix-ui/react-select": "^0.1.1",
|
||||
"downshift": "^6.1.7",
|
||||
"next": "^12.2.0",
|
||||
"react": "^18.1.0",
|
||||
"next": "^12.2.5",
|
||||
"react": "^18.2.0",
|
||||
"react-colorful": "^5.5.1",
|
||||
"react-feather": "^2.0.10",
|
||||
"react-icons": "^4.4.0",
|
||||
"react-query": "^3.39.0",
|
||||
"react-query": "^3.39.2",
|
||||
"react-select": "^5.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@calcom/config": "*",
|
||||
"@calcom/tsconfig": "*",
|
||||
"@types/react": "18.0.9",
|
||||
"@types/react": "^18.0.9",
|
||||
"@types/react-dom": "18.0.4",
|
||||
"typescript": "^4.6.4"
|
||||
"typescript": "^4.7.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ function HintsOrErrors<T extends FieldValues = FieldValues>(props: {
|
|||
return (
|
||||
<div className="text-gray mt-2 flex items-center text-sm text-red-700">
|
||||
<Info className="mr-1 h-3 w-3" />
|
||||
{fieldErrors.message}
|
||||
<>{fieldErrors.message}</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -320,8 +320,12 @@ export const TextAreaField = forwardRef<HTMLTextAreaElement, TextAreaFieldProps>
|
|||
</Label>
|
||||
)}
|
||||
<TextArea ref={ref} placeholder={placeholder} {...passThrough} />
|
||||
{methods?.formState?.errors[props.name] && (
|
||||
<Alert className="mt-1" severity="error" message={methods.formState.errors[props.name].message} />
|
||||
{methods?.formState?.errors[props.name]?.message && (
|
||||
<Alert
|
||||
className="mt-1"
|
||||
severity="error"
|
||||
message={<>{methods.formState.errors[props.name]!.message}</>}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
import { devices, PlaywrightTestConfig } from "@playwright/test";
|
||||
import { addAliases } from "module-alias";
|
||||
import dotEnv from "dotenv";
|
||||
import * as os from "os";
|
||||
import * as path from "path";
|
||||
|
||||
// Add aliases for the paths specified in the tsconfig.json file.
|
||||
// This is needed because playwright does not consider tsconfig.json
|
||||
// For more info, see:
|
||||
// https://stackoverflow.com/questions/69023682/typescript-playwright-error-cannot-find-module
|
||||
// https://github.com/microsoft/playwright/issues/7066#issuecomment-983984496
|
||||
addAliases({
|
||||
"@components": __dirname + "/apps/web/components",
|
||||
"@lib": __dirname + "/apps/web/lib",
|
||||
"@server": __dirname + "/apps/web/server",
|
||||
"@ee": __dirname + "/apps/web/ee",
|
||||
});
|
||||
|
||||
require("dotenv").config({ path: "../../.env" });
|
||||
dotEnv.config({ path: "../../.env" });
|
||||
|
||||
const outputDir = path.join(__dirname, "..", "..", "test-results");
|
||||
const testDir = path.join(__dirname, "..", "..", "apps/web/playwright");
|
||||
|
@ -36,7 +24,7 @@ const config: PlaywrightTestConfig = {
|
|||
["junit", { outputFile: path.join(outputDir, "reports/results.xml") }],
|
||||
],
|
||||
globalSetup: require.resolve("./globalSetup"),
|
||||
outputDir,
|
||||
outputDir: path.join(outputDir, "results"),
|
||||
webServer: {
|
||||
command: "NEXT_PUBLIC_IS_E2E=1 yarn workspace @calcom/web start -p 3000",
|
||||
port: 3000,
|
||||
|
|
Loading…
Reference in New Issue