cal/apps/web/next.config.js

485 lines
14 KiB
JavaScript
Raw Normal View History

require("dotenv").config({ path: "../../.env" });
const CopyWebpackPlugin = require("copy-webpack-plugin");
const os = require("os");
const englishTranslation = require("./public/static/locales/en/common.json");
2022-07-27 17:19:59 -03:00
const { withAxiom } = require("next-axiom");
const { i18n } = require("./next-i18next.config");
const { pages } = require("./pages");
2022-06-03 13:50:48 -03:00
if (!process.env.NEXTAUTH_SECRET) throw new Error("Please set NEXTAUTH_SECRET");
if (!process.env.CALENDSO_ENCRYPTION_KEY) throw new Error("Please set CALENDSO_ENCRYPTION_KEY");
2021-09-21 17:18:41 -03:00
// So we can test deploy previews preview
if (process.env.VERCEL_URL && !process.env.NEXT_PUBLIC_WEBAPP_URL) {
process.env.NEXT_PUBLIC_WEBAPP_URL = "https://" + process.env.VERCEL_URL;
2021-09-21 17:18:41 -03:00
}
// Check for configuration of NEXTAUTH_URL before overriding
if (!process.env.NEXTAUTH_URL && process.env.NEXT_PUBLIC_WEBAPP_URL) {
process.env.NEXTAUTH_URL = process.env.NEXT_PUBLIC_WEBAPP_URL + "/api/auth";
}
if (!process.env.NEXT_PUBLIC_WEBSITE_URL) {
process.env.NEXT_PUBLIC_WEBSITE_URL = process.env.NEXT_PUBLIC_WEBAPP_URL;
}
if (process.env.CSP_POLICY === "strict" && process.env.NODE_ENV === "production") {
throw new Error(
"Strict CSP policy(for style-src) is not yet supported in production. You can experiment with it in Dev Mode"
);
}
2021-07-20 15:18:26 -03:00
if (!process.env.EMAIL_FROM) {
console.warn(
"\x1b[33mwarn",
"\x1b[0m",
"EMAIL_FROM environment variable is not set, this may indicate mailing is currently disabled. Please refer to the .env.example file."
);
}
2022-06-03 15:48:47 -03:00
if (!process.env.NEXTAUTH_URL) throw new Error("Please set NEXTAUTH_URL");
const validJson = (jsonString) => {
2021-07-20 15:18:26 -03:00
try {
const o = JSON.parse(jsonString);
if (o && typeof o === "object") {
return o;
}
2021-07-20 15:18:26 -03:00
} catch (e) {
console.error(e);
}
return false;
};
2021-07-20 15:18:26 -03:00
if (process.env.GOOGLE_API_CREDENTIALS && !validJson(process.env.GOOGLE_API_CREDENTIALS)) {
console.warn(
"\x1b[33mwarn",
"\x1b[0m",
'- Disabled \'Google Calendar\' integration. Reason: Invalid value for GOOGLE_API_CREDENTIALS environment variable. When set, this value needs to contain valid JSON like {"web":{"client_id":"<clid>","client_secret":"<secret>","redirect_uris":["<yourhost>/api/integrations/googlecalendar/callback>"]}. You can download this JSON from your OAuth Client @ https://console.cloud.google.com/apis/credentials.'
);
}
const informAboutDuplicateTranslations = () => {
const valueSet = new Set();
for (const key in englishTranslation) {
if (valueSet.has(englishTranslation[key])) {
console.warn("\x1b[33mDuplicate value found in:", "\x1b[0m", key);
} else {
valueSet.add(englishTranslation[key]);
}
}
};
informAboutDuplicateTranslations();
const getSubdomain = () => {
const _url = new URL(process.env.NEXT_PUBLIC_WEBAPP_URL);
const regex = new RegExp(/^([a-z]+\:\/{2})?((?<subdomain>[\w-]+)\.[\w-]+\.\w+)$/);
//console.log(_url.hostname, _url.hostname.match(regex));
return _url.hostname.match(regex)?.groups?.subdomain || null;
};
const plugins = [];
if (process.env.ANALYZE === "true") {
// only load dependency if env `ANALYZE` was set
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: true,
});
plugins.push(withBundleAnalyzer);
}
2022-07-27 17:19:59 -03:00
plugins.push(withAxiom);
New Booker Component (preparations for booker atom) (#6792) * Wip on booker atom * Wip on booker atom * Added correct icon imports * Fixed build * Responsive improvements * Removed package lock * Responsive tweaks * Animation improvements and cleanup * Animation improvements and event meta layout improvements. * Tweaked margins. * Added more event meta blocks * Layout tweaks * Converted booker layout to css grid and implemented multiple layout options * cleanup * Fixed build * Fixed build * Added temporary api route to enable/disable new booker * Added sticky behavior * Reverted yarn.lock and reinstalled new packages to see if this fixes build on vercel. * Ensure divider lines always have 100% height. * Improved animation config + initial load * Ensure to pass eventid to getschedule, otherwise custom availability schedule wont work and wont return any availability * Fixed divider line heights in booker * Fixed timezone select positioning * Added ability to view multiple days of timeslots * Added icons to booker toggle * Always show timeslots in timeslots view, also if no date is selected yet. In that case we show upcoming 5 days. * Fixed timeslots in small calendar view * Show selected day in calendar * Fixed booker timeslots view * Wip in making booking form work * Moved most of the booker atom stuff to features, since it belongs there. Atom should be a rather small wrapper. * Added create event functionality to booker form. * Added guests toggle to booker form and styled input addons in dark mode. * Added dynamic weekstart to booker * Added seats limit feature to timeslots. * Removed todo * Added correct event avatars * Added correct event name and icons * Added correct translation for minutes text in multi duration * Add rescheduling functionality to new booker. * Added selected booking time to booking meta in sidebar. * Abstracted away timeformat to custom hook * Added correct key props to all components in booker. * Fix build * Create some new custom hooks to have a lot less repitition in code. * Moved bookerform component inside booker directory since it is tied to it. * Added error messages to booker form, plus fixed bug in recurring events. * Added some comments <3 * Fixed todos in booker form. * Added loading state for timeslot selector, and added prefetching of next month, in case of multi day view showing 2 months at the same time. * Fixed import paths * Added away view * Validate uniqueness of event attendees. * Tweaked comment * #5798 added correct date format and style for selected date in booker. * UI improvements * Enable possibility to add booking values via query params. * Added functionality to update query params when user selects date/duration etc in booker * First steps in adding e2e test. * Fixes after merge with main, and added new form builder. * Implemented new form types and validation to booker, confirming new form builder. Validation still throwing wrong error keys though. * Added search to timezone dropdown * Added e2e test for booker (copy of current booker tests, only enabling cookie), plus fixed reschedule view. * Updated yarn.lock * Added new booker for team pages. * Fixed input addon (hover) styles. * Added dynamic booking. * Hide timeformat select for multi day view for now. * Cleanup and ui tweaks * removed log * Mobile improvements * Cleanup * Small design tweaks after talking to ciaran. * Text color and weight tweaks in booker * Added rainbow gates to new booker. * Added in default values which fixes form vallidation (???). * Added empty defaults for name and email * Added metadata * Reset yarn.lock * Fixed booker zod validation after change in main. * Icon tweak * Fixed timezone select styles after new classnames have been merged. * Updated seat availability styles. * Update yarn.lock * Added explanation for alchemy key to .env.example * Added tooltip to booker month/week/multiday toggle * Fixed timezoneselect styles in booker after select updates. * Updates bookingfields component by taking changes from current booker component * Removed remaining booker todos * Fix bookeventform * Fix for recurring event meta * Type fixes * Typefixes * Team event fixes * Avoid hydration errors by only rendering date picker client side. Remove web3 gates since we dont offer them anymore. Prevent timeslot select from staying open when switching to a different month. * Don't show calendar on mobile booker during booking. * Always align booker buttons to bottom * Don't show backend messages in error, rather show a helpful text like the current booker does as well. * Do invisible next rewrite based on cookie from next.config.js (#7949) * Do invisible next rewrite based on cookie from next.config.js * Name embed link instead of bookerPath * Rewrites only dynamic user pages --------- Co-authored-by: zomars <zomars@me.com> * Don't allow change of timezone when bookerform is visible * Don't add duration to query param if the event is not a multi duration event. * Update next.config.js * Added correct timezone formatting to event meta when timeslot is selected. * removed .env variable that isn't needed anymore. * Update Gates.tsx * Type fixes * Allows to run all tests with the new booker * Fixed timezone select styles after merge. * Don't throw error when event doesn't have hosts, rather return no users, which will result in no availability in UI. * Make booker errors of severity info instead of warning. * Ensure team avatars are shown, as well as filter on uniqueness of avatars. * Added all booked today message to timeslots. * Added cal.com logo to booker. * Fixed fragment classname error, minor mobile animation tweaks plus make all booked today text smaller for multi day layout. * Improved timezone select styles, and updated arguments of getbooking function after updates in main. * Prevent infinite loop in rewriting new booker. * Prevent infinite loop in rewriting new booker. * Moved new-booker pages to their own directory to prevent regexes confusing next and thus nut running getserversideprops after rewrite. Also adding clearing of old date in booker store, that could stick around when user immediately navigates back to the same page after booking. * Fixed cal logo color in darkmode for new booker. * Implemented new color tokens and theme variables. Also small design tweaks after merge with main. * Minor style tweaks * Show multiple locations in tooltip on booker #8222 * Radio button style tweaks * Fixed build * Updated calendar imports to new lucide names * Removed resetting of selected times logic, because otherwise url params wouldnt be taken into account which is actually what we want. So old values sticking around when navigating back is actually the desired behavior. * Updated tests to instead of always run the new booker in tests, have a utility to run both the new and old booker for specified tests. * Added comment and eslint disable for if statement in booker test. * Update packages/features/bookings/components/event-meta/Details.tsx Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * Fix badge types * Lazy loaded timezone select to save 85kb in bundle size. * Upgraded framer to latest. Als moved framer and react sticky deps to features instead of atoms. * Added new pagewrapper logic * Simplified rescheduling ssr fetches, this now also supports multi seat rescheduling. * Unset selected time when user is rescheduling directly after a new booking, otherwise it would show the form instead of new time selection. * Updated form builder logic as per form builder in current booker. * Updated form builder prefill logic as per logic in current booker. * Updated getbooking function to fetch correct details when a reschedule uid is used * Fixed booking questions test by NOT waiting for /book page because the new booker doesnt have this. * Added former meeting time to reschedule view. * Fixed types * Undo playwright config update by mistake. * Fixed event types test by only waiting for /book page in old booker * Set new booker cookie to one year in the future instead of 2050 * added reset mockdate to test * Temporary disabled test to see if this solves the out of memory error. * Deleted test to see if that fixes the memory error * Select first day when switching months in booker --------- Co-authored-by: zomars <zomars@me.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Sean Brydon <sean@cal.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-04-24 11:32:30 -03:00
// .* matches / as well(Note: *(i.e wildcard) doesn't match / but .*(i.e. RegExp) does)
// It would match /free/30min but not /bookings/upcoming because 'bookings' is an item in pages
// It would also not match /free/30min/embed because we are ensuring just two slashes
// ?!book ensures it doesn't match /free/book page which doesn't have a corresponding new-booker page.
// [^/]+ makes the RegExp match the full path, it seems like a partial match doesn't work.
// book$ ensures that only /book is excluded from rewrite(which is at the end always) and not /booked
// Important Note: When modifying these RegExps update apps/web/test/lib/next-config.test.ts as well
const userTypeRouteRegExp = `/:user((?!${pages.join("/|")})[^/]*)/:type((?!book$)[^/]+)`;
const teamTypeRouteRegExp = "/team/:slug/:type((?!book$)[^/]+)";
const privateLinkRouteRegExp = "/d/:link/:slug((?!book$)[^/]+)";
const embedUserTypeRouteRegExp = `/:user((?!${pages.join("|")}).*)/:type/embed`;
const embedTeamTypeRouteRegExp = "/team/:slug/:type/embed";
New Booker Component (preparations for booker atom) (#6792) * Wip on booker atom * Wip on booker atom * Added correct icon imports * Fixed build * Responsive improvements * Removed package lock * Responsive tweaks * Animation improvements and cleanup * Animation improvements and event meta layout improvements. * Tweaked margins. * Added more event meta blocks * Layout tweaks * Converted booker layout to css grid and implemented multiple layout options * cleanup * Fixed build * Fixed build * Added temporary api route to enable/disable new booker * Added sticky behavior * Reverted yarn.lock and reinstalled new packages to see if this fixes build on vercel. * Ensure divider lines always have 100% height. * Improved animation config + initial load * Ensure to pass eventid to getschedule, otherwise custom availability schedule wont work and wont return any availability * Fixed divider line heights in booker * Fixed timezone select positioning * Added ability to view multiple days of timeslots * Added icons to booker toggle * Always show timeslots in timeslots view, also if no date is selected yet. In that case we show upcoming 5 days. * Fixed timeslots in small calendar view * Show selected day in calendar * Fixed booker timeslots view * Wip in making booking form work * Moved most of the booker atom stuff to features, since it belongs there. Atom should be a rather small wrapper. * Added create event functionality to booker form. * Added guests toggle to booker form and styled input addons in dark mode. * Added dynamic weekstart to booker * Added seats limit feature to timeslots. * Removed todo * Added correct event avatars * Added correct event name and icons * Added correct translation for minutes text in multi duration * Add rescheduling functionality to new booker. * Added selected booking time to booking meta in sidebar. * Abstracted away timeformat to custom hook * Added correct key props to all components in booker. * Fix build * Create some new custom hooks to have a lot less repitition in code. * Moved bookerform component inside booker directory since it is tied to it. * Added error messages to booker form, plus fixed bug in recurring events. * Added some comments <3 * Fixed todos in booker form. * Added loading state for timeslot selector, and added prefetching of next month, in case of multi day view showing 2 months at the same time. * Fixed import paths * Added away view * Validate uniqueness of event attendees. * Tweaked comment * #5798 added correct date format and style for selected date in booker. * UI improvements * Enable possibility to add booking values via query params. * Added functionality to update query params when user selects date/duration etc in booker * First steps in adding e2e test. * Fixes after merge with main, and added new form builder. * Implemented new form types and validation to booker, confirming new form builder. Validation still throwing wrong error keys though. * Added search to timezone dropdown * Added e2e test for booker (copy of current booker tests, only enabling cookie), plus fixed reschedule view. * Updated yarn.lock * Added new booker for team pages. * Fixed input addon (hover) styles. * Added dynamic booking. * Hide timeformat select for multi day view for now. * Cleanup and ui tweaks * removed log * Mobile improvements * Cleanup * Small design tweaks after talking to ciaran. * Text color and weight tweaks in booker * Added rainbow gates to new booker. * Added in default values which fixes form vallidation (???). * Added empty defaults for name and email * Added metadata * Reset yarn.lock * Fixed booker zod validation after change in main. * Icon tweak * Fixed timezone select styles after new classnames have been merged. * Updated seat availability styles. * Update yarn.lock * Added explanation for alchemy key to .env.example * Added tooltip to booker month/week/multiday toggle * Fixed timezoneselect styles in booker after select updates. * Updates bookingfields component by taking changes from current booker component * Removed remaining booker todos * Fix bookeventform * Fix for recurring event meta * Type fixes * Typefixes * Team event fixes * Avoid hydration errors by only rendering date picker client side. Remove web3 gates since we dont offer them anymore. Prevent timeslot select from staying open when switching to a different month. * Don't show calendar on mobile booker during booking. * Always align booker buttons to bottom * Don't show backend messages in error, rather show a helpful text like the current booker does as well. * Do invisible next rewrite based on cookie from next.config.js (#7949) * Do invisible next rewrite based on cookie from next.config.js * Name embed link instead of bookerPath * Rewrites only dynamic user pages --------- Co-authored-by: zomars <zomars@me.com> * Don't allow change of timezone when bookerform is visible * Don't add duration to query param if the event is not a multi duration event. * Update next.config.js * Added correct timezone formatting to event meta when timeslot is selected. * removed .env variable that isn't needed anymore. * Update Gates.tsx * Type fixes * Allows to run all tests with the new booker * Fixed timezone select styles after merge. * Don't throw error when event doesn't have hosts, rather return no users, which will result in no availability in UI. * Make booker errors of severity info instead of warning. * Ensure team avatars are shown, as well as filter on uniqueness of avatars. * Added all booked today message to timeslots. * Added cal.com logo to booker. * Fixed fragment classname error, minor mobile animation tweaks plus make all booked today text smaller for multi day layout. * Improved timezone select styles, and updated arguments of getbooking function after updates in main. * Prevent infinite loop in rewriting new booker. * Prevent infinite loop in rewriting new booker. * Moved new-booker pages to their own directory to prevent regexes confusing next and thus nut running getserversideprops after rewrite. Also adding clearing of old date in booker store, that could stick around when user immediately navigates back to the same page after booking. * Fixed cal logo color in darkmode for new booker. * Implemented new color tokens and theme variables. Also small design tweaks after merge with main. * Minor style tweaks * Show multiple locations in tooltip on booker #8222 * Radio button style tweaks * Fixed build * Updated calendar imports to new lucide names * Removed resetting of selected times logic, because otherwise url params wouldnt be taken into account which is actually what we want. So old values sticking around when navigating back is actually the desired behavior. * Updated tests to instead of always run the new booker in tests, have a utility to run both the new and old booker for specified tests. * Added comment and eslint disable for if statement in booker test. * Update packages/features/bookings/components/event-meta/Details.tsx Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * Fix badge types * Lazy loaded timezone select to save 85kb in bundle size. * Upgraded framer to latest. Als moved framer and react sticky deps to features instead of atoms. * Added new pagewrapper logic * Simplified rescheduling ssr fetches, this now also supports multi seat rescheduling. * Unset selected time when user is rescheduling directly after a new booking, otherwise it would show the form instead of new time selection. * Updated form builder logic as per form builder in current booker. * Updated form builder prefill logic as per logic in current booker. * Updated getbooking function to fetch correct details when a reschedule uid is used * Fixed booking questions test by NOT waiting for /book page because the new booker doesnt have this. * Added former meeting time to reschedule view. * Fixed types * Undo playwright config update by mistake. * Fixed event types test by only waiting for /book page in old booker * Set new booker cookie to one year in the future instead of 2050 * added reset mockdate to test * Temporary disabled test to see if this solves the out of memory error. * Deleted test to see if that fixes the memory error * Select first day when switching months in booker --------- Co-authored-by: zomars <zomars@me.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Sean Brydon <sean@cal.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-04-24 11:32:30 -03:00
/** @type {import("next").NextConfig} */
const nextConfig = {
i18n,
productionBrowserSourceMaps: true,
2022-08-30 18:24:17 -03:00
/* We already do type check on GH actions */
typescript: {
ignoreBuildErrors: !!process.env.CI,
},
/* We already do linting on GH actions */
eslint: {
2022-08-30 18:24:17 -03:00
ignoreDuringBuilds: !!process.env.CI,
},
transpilePackages: [
"@calcom/app-store",
"@calcom/core",
"@calcom/dayjs",
"@calcom/emails",
"@calcom/embed-core",
"@calcom/embed-react",
"@calcom/embed-snippet",
"@calcom/features",
"@calcom/lib",
"@calcom/prisma",
"@calcom/trpc",
"@calcom/ui",
"lucide-react",
],
modularizeImports: {
"@calcom/ui/components/icon": {
transform: "lucide-react/dist/esm/icons/{{ kebabCase member }}",
preventFullImport: true,
},
"@calcom/features/insights/components": {
transform: "@calcom/features/insights/components/{{member}}",
skipDefaultConversion: true,
preventFullImport: true,
},
lodash: {
transform: "lodash/{{member}}",
},
// TODO: We need to have all components in `@calcom/ui/components` in order to use this
// "@calcom/ui": {
// transform: "@calcom/ui/components/{{member}}",
// },
},
images: {
unoptimized: true,
},
Generate SSG Page used as cache for user's third-party calendar (#6775) * Generate SSG Page used as cache for user's third-party calendars * remove next-build-id dependency * yarn.lock from main * add support to get cached data from multiple months * Update apps/web/pages/[user]/calendar-cache/[month].tsx Co-authored-by: Omar López <zomars@me.com> * Update apps/web/pages/[user]/calendar-cache/[month].tsx Co-authored-by: Omar López <zomars@me.com> * Update packages/core/CalendarManager.ts Co-authored-by: Omar López <zomars@me.com> * Add api endpoint that revalidates the current month and 3 more ahead * Revalidate calendar cache when user connect new calendar. * Revalidate calendar cache when user remove a calendar. * Revalidate calendar cache when user change de selected calendars- * Change revalidateCalendarCache function to @calcom/lib/server * Remove the memory cache from getCachedResults * refetch availability slots in a 3 seconds interval * Hotfix: Event Name (#6863) (#6864) * feat: make key unique (#6861) * version 2.5.9 (#6868) * Use Calendar component view=day for drop-in replacement troubleshooter (#6869) * Use Calendar component view=day for drop-in replacement troubleshooter * Setting the id to undefined makes the busy time selected * Updated event title to include title+source * lots of small changes by me and ciaran (#6871) * Hotfix: For old Plausible installs enabled in an EventType, give a default value (#6860) * Add default for trackingId for old plausible installs in event-types * Fix types * fix: filter booking in upcoming (#6406) * fix: filter booking in upcoming Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: test Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: wipe-my-cal failing test Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Peer Richelsen <peer@cal.com> * fix workflows when duplicating event types (#6873) * fix: get location url from metadata (#6774) * fix: get location url from metadata Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: replace location Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: type error Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: use zod Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * Updates heroku deployment template (#6879) * Hide button (#6895) * Fixed some inconsistencies within single event type page (#6887) * Fixed some inconsistencies within single event type page * Fix layout shift on AvailabilityTab * fix(date-overrides): alignment of edit & delete btns (#6892) * When unchecking the common schedule, schedule should be nulled (#6898) * theme for storybook * nit border change (#6899) * fix: metadata not saved while creating a booking. (#6866) * feat: add metadata to booking creation * fix: bug * Beginning of Strict CSP Compliance (#6841) * Add CSP Support and enable it initially for Login page * Update README * Make sure that CSP is not enabled if CSP_POLICY isnt set * Add a new value for x-csp header that tells if instance has opted-in to CSP or not * Add more src to CSP * Fix typo in header name * Remove duplicate headers fn * Add https://eu.ui-avatars.com/api/ * Add CSP_POLICY to env.example * v2.5.10 * fix: add req.headers (#6921) Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * add-console-vars (#6929) * Admin Wizard Choose License (#6574) * Implementation * i18n * More i18n * extracted i18n, needs api to get most recent price, added hint: update later * Fixing i18n var * Fix booking filters not working for admin (#6576) * fix: react-select overflow issue in some modals. (#6587) * feat: add a disable overflow prop * feat: use the disable overflow prop * Tailwind Merge (#6596) * Tailwind Merge * Fix merge classNames * [CAL-808] /availability/single - UI issue on buttons beside time inputs (#6561) * [CAL-808] /availability/single - UI issue on buttons beside time inputs * Update apps/web/public/static/locales/en/common.json * Update packages/features/schedules/components/Schedule.tsx * create new translation for tooltip Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> * Bye bye submodules (#6585) * WIP * Uses ssh instead * Update .gitignore * Update .gitignore * Update Makefile * Update git-setup.sh * Update git-setup.sh * Replaced Makefile with bash script * Update package.json * fix: show button on empty string (#6601) Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: add delete in dropdown (#6599) Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * Update README.md * Update README.md * Changed a neutral- classes to gray (#6603) * Changed a neutral- classes to gray * Changed all border-1 to border * Update package.json * Test fixes * Yarn lock fixes * Fix string equality check in git-setup.sh * [CAL-811] Avatar icon not redirecting user back to the main page (#6586) * Remove cursor-pointer, remove old Avatar* files * Fixed styling for checkedSelect + some cleanup Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> * Harsh/add member invite (#6598) Co-authored-by: Guest <guest@pop-os.localdomain> Co-authored-by: root <harsh.singh@gocomet.com> * Regenerated lockfile without upgrade (#6610) * fix: remove annoying outline when <Button /> clicked (#6537) * fix: remove annoying outline when <Button /> clicked * Delete yarn.lock * remove 1 on 1 icon (#6609) * removed 1-on-1 badge * changed user to users for group events * fix: case-sensitivity in apps path (#6552) * fix: lowercase slug * fix: make fallback blocking * Fix FAB (#6611) * feat: add LocationSelect component (#6571) * feat: add LocationSelect component Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: type error Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * chore: type error Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * Update booking filters design (#6543) * Update booking filters * Add filter on YOUR bookings * Fix pending members showing up in list * Reduce the avatar size to 'sm' for now * Bugfix/dropdown menu trigger as child remove class names (#6614) * Fix UsernameTextfield to take right height * Remove className side-effect * Incorrect resolution version fixed * Converted mobile DropdownMenuTrigger styles into Button * v2.5.3 * fix: use items-center (#6618) * fix tooltip and modal stacking issues (#6491) * fix tooltip and modal stacking issues * use z-index in larger screens and less Co-authored-by: Alex van Andel <me@alexvanandel.com> * Temporary fix (#6626) * Fix Ga4 tracking (#6630) * generic <UpgradeScreen> component (#6594) * first attempt of <UpgradeScreen> * changes to icons * reverted changes back to initial state, needs fix: teams not showing * WIP * Fix weird reactnode error * Fix loading text * added upgradeTip to routing forms * icon colors * create and use hook to check if user has team plan * use useTeamPlan for upgradeTeamsBadge * replace huge svg with compressed jpeg * responsive fixes * Update packages/ui/components/badge/UpgradeTeamsBadge.tsx Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * Give team plan features to E2E tests * Allow option to make a user part of team int ests * Remove flash of paywall for team user * Add team user for typeform tests as well Co-authored-by: Peer Richelsen <peer@cal.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> * Removing env var to rely on db * Restoring i18n keys, set loading moved * Fixing tailwind-preset glob * Wizard width fix for md+ screens * Converting licenses options to radix radio * Applying feedback + other tweaks * Reverting this, not this PR related * Unneeded code removal * Reverting unneeded style change * Applying feedback * Removing licenseType * Upgrades typescript * Update yarn lock * Typings * Hotfix: ping,riverside,whereby and around not showing up in list (#6712) * Hotfix: ping,riverside,whereby and around not showing up in list (#6712) (#6713) * Adds deployment settings to DB (#6706) * WIP * Adds DeploymentTheme * Add missing migrations * Adds client extensions for deployment * Cleanup * Delete migration.sql * Relying on both, env var and new model * Restoring env example doc for backward compat * Maximum call stack size exceeded fix? * Revert upgrade * Update index.ts * Delete index.ts * Not exposing license key, fixed radio behavior * Covering undefined env var * Self contained checkLicense * Feedback * Moar feedback * Feedback * Feedback * Feedback * Cleanup --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Co-authored-by: Peer Richelsen <peer@cal.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Nafees Nazik <84864519+G3root@users.noreply.github.com> Co-authored-by: GitStart-Cal.com <121884634+gitstart-calcom@users.noreply.github.com> Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Omar López <zomars@me.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Harsh Singh <51085015+harshsinghatz@users.noreply.github.com> Co-authored-by: Guest <guest@pop-os.localdomain> Co-authored-by: root <harsh.singh@gocomet.com> Co-authored-by: Luis Cadillo <luiscaf3r@gmail.com> Co-authored-by: Mohammed Cherfaoui <hi@cherfaoui.dev> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> * added two new tips (#6915) * [CAL-488] Timezone selection has a weird double dropdown (#6851) Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> * fix: color and line height of icon (#6913) * fix: use destination calendar email (#6886) * fix: use destination calendar email to display correct primary email Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: simplify logic Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: dropdown title in bookings page (#6924) * fixes the broken max size of members on teams page (#6926) * fix: display provider name instead of url (#6914) Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: add sortByLabel (#6797) Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * Email Variables Bug (#6943) * Remove _subject translations for zh-CN, needs retranslation * minor timezone-select improvements (#6944) * fixed timezone select positioning and hover * fixed timezone select positioning and hover * Give trackingId a default value because if user doesnt interact with trackingId input it is not set (#6945) * Block /auth/:path, nothing else. (#6949) * Block /auth/:path, nothing else. * Also add /signup * fix start icon in button (#6950) Co-authored-by: CarinaWolli <wollencarina@gmail.com> * Fixes localisation of {EVENT_DATE} in workflows (#6907) * translate {EVENT_DATE} variable to correct language * fix locale for cron schedule reminder emails/sms * fix type error * add missing locale to attendees * fix type error * code clean up * revert last commit * using Intl for date translations --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com> * Allow account linking for Google and SAML providers (#6874) * allow account linking for self-hosted instances, both Google and SAML are verified emails * allow account linking for Google and SSO if emails match with existing username/password account * Tweaked find user by email since we now have multiple providers (other than credentials provider) * feat/payment-service-6438-cal-767 (#6677) * WIP paymentService * Changes for payment Service * Fix for stripe payment flow * Remove logs/comments * Refactored refund for stripe app * Move stripe handlePayment to own lib * Move stripe delete payments to paymentService * lint fix * Change handleRefundError as generic function * remove log * remove logs * remove logs * Return stripe default export to lib/server * Fixing types * Fix types * Upgrades typescript * Update yarn lock * Typings * Hotfix: ping,riverside,whereby and around not showing up in list (#6712) * Hotfix: ping,riverside,whereby and around not showing up in list (#6712) (#6713) * Adds deployment settings to DB (#6706) * WIP * Adds DeploymentTheme * Add missing migrations * Adds client extensions for deployment * Cleanup * Revert "lint fix" This reverts commit e1a2e4a357e58e6673c47399888ae2e00d1351a6. * Add validation * Revert changes removed in force push * Removing abstract class and just leaving interface implementation * Fix types for handlePayments * Fix payment test appStore import * Fix stripe metadata in event type * Move migration to separate PR * Revert "Move migration to separate PR" This reverts commit 48aa64e0724a522d3cc2fefaaaee5792ee9cd9e6. * Update packages/prisma/migrations/20230125175109_remove_type_from_payment_and_add_app_relationship/migration.sql Co-authored-by: Omar López <zomars@me.com> --------- Co-authored-by: zomars <zomars@me.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> * Small UI fixes for seats & destination calendars (#6859) * Do not add former time for events on seats * Default display destination calendar * Add seats badge to event type item * Add string * Actively watch seats enabled option for requires confirmation * Only show former time when there is a rescheduleUid * fix: use typedquery hook in duplicate dialog (#6730) * fix: use typedquery hook in duplicate dialog Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * Update packages/features/eventtypes/components/DuplicateDialog.tsx --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Co-authored-by: Peer Richelsen <peer@cal.com> Co-authored-by: Omar López <zomars@me.com> * Fixing admin wizard step done (#6954) * Feature/maintenance mode (#6930) * Implement maintenance mode with Vercel Edge Config * Error log is spam during development/ added \n in .env.example * Exclude _next, /api for /maintenance page * Re-instate previous config * rtl: begone * Added note to explain why /auth/login covers the maintenance page. --------- Co-authored-by: Omar López <zomars@me.com> * Update package.json * I18N Caching (#6823) * Caching Logic Changes Enabled this function to change its cache value based on incoming paths value * Invalidate I18N Cache Invalidating the I18N cache when a user saves changes to their General settings * Removes deprecated useLocale location * Overriding the default getSchedule cache to have a revalidation time of 1 second * Update apps/web/pages/api/trpc/[trpc].ts * Updated cache values to match the comment --------- Co-authored-by: zomars <zomars@me.com> * feat: return `x-vercel-ip-timezone` in headers (#6849) * feat: add trpc to matcher and pass vercel timezone header * feat: pass request to context * feat: return timezone in header * refactor: split context * fix: remove tsignore comment * Update [trpc].ts --------- Co-authored-by: zomars <zomars@me.com> * log the json url for testing * use WEBAPP_URL constant instead env.NEXT_PUBLIC_WEBAPP_URL * remove the commented selectedCalendars var, it is not necessary * Caching fixes * Separate selectedDate slots from month slots * Update [trpc].ts * Log headers * Update [trpc].ts * Update package.json * Fixes/trpc headers (#7045) * Cache fixes * Testing * SWR breaks embed tests * Prevent refetching day on month switch * Skeleton fixes --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: Nafees Nazik <84864519+G3root@users.noreply.github.com> Co-authored-by: Ben Hybert <53020786+Hybes@users.noreply.github.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Peer Richelsen <peer@cal.com> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Sai Deepesh <saideepesh000@gmail.com> Co-authored-by: alannnc <alannnc@gmail.com> Co-authored-by: Leo Giovanetti <hello@leog.me> Co-authored-by: GitStart-Cal.com <121884634+gitstart-calcom@users.noreply.github.com> Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Harsh Singh <51085015+harshsinghatz@users.noreply.github.com> Co-authored-by: Guest <guest@pop-os.localdomain> Co-authored-by: root <harsh.singh@gocomet.com> Co-authored-by: Luis Cadillo <luiscaf3r@gmail.com> Co-authored-by: Mohammed Cherfaoui <hi@cherfaoui.dev> Co-authored-by: Joe Shajan <joeshajan1551@gmail.com> Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Co-authored-by: Aaron Presley <155617+AaronPresley@users.noreply.github.com>
2023-02-13 15:42:53 -03:00
webpack: (config, { webpack, buildId }) => {
config.plugins.push(
new CopyWebpackPlugin({
patterns: [
{
2022-08-31 06:26:16 -03:00
from: "../../packages/app-store/**/static/**",
to({ context, absoluteFilename }) {
// Adds compatibility for windows path
if (os.platform() === "win32") {
const absoluteFilenameWin = absoluteFilename.replaceAll("\\", "/");
const contextWin = context.replaceAll("\\", "/");
const appName = /app-store\/(.*)\/static/.exec(absoluteFilenameWin);
return Promise.resolve(`${contextWin}/public/app-store/${appName[1]}/[name][ext]`);
}
const appName = /app-store\/(.*)\/static/.exec(absoluteFilename);
return Promise.resolve(`${context}/public/app-store/${appName[1]}/[name][ext]`);
},
},
],
})
);
Generate SSG Page used as cache for user's third-party calendar (#6775) * Generate SSG Page used as cache for user's third-party calendars * remove next-build-id dependency * yarn.lock from main * add support to get cached data from multiple months * Update apps/web/pages/[user]/calendar-cache/[month].tsx Co-authored-by: Omar López <zomars@me.com> * Update apps/web/pages/[user]/calendar-cache/[month].tsx Co-authored-by: Omar López <zomars@me.com> * Update packages/core/CalendarManager.ts Co-authored-by: Omar López <zomars@me.com> * Add api endpoint that revalidates the current month and 3 more ahead * Revalidate calendar cache when user connect new calendar. * Revalidate calendar cache when user remove a calendar. * Revalidate calendar cache when user change de selected calendars- * Change revalidateCalendarCache function to @calcom/lib/server * Remove the memory cache from getCachedResults * refetch availability slots in a 3 seconds interval * Hotfix: Event Name (#6863) (#6864) * feat: make key unique (#6861) * version 2.5.9 (#6868) * Use Calendar component view=day for drop-in replacement troubleshooter (#6869) * Use Calendar component view=day for drop-in replacement troubleshooter * Setting the id to undefined makes the busy time selected * Updated event title to include title+source * lots of small changes by me and ciaran (#6871) * Hotfix: For old Plausible installs enabled in an EventType, give a default value (#6860) * Add default for trackingId for old plausible installs in event-types * Fix types * fix: filter booking in upcoming (#6406) * fix: filter booking in upcoming Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: test Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: wipe-my-cal failing test Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Peer Richelsen <peer@cal.com> * fix workflows when duplicating event types (#6873) * fix: get location url from metadata (#6774) * fix: get location url from metadata Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: replace location Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: type error Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: use zod Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * Updates heroku deployment template (#6879) * Hide button (#6895) * Fixed some inconsistencies within single event type page (#6887) * Fixed some inconsistencies within single event type page * Fix layout shift on AvailabilityTab * fix(date-overrides): alignment of edit & delete btns (#6892) * When unchecking the common schedule, schedule should be nulled (#6898) * theme for storybook * nit border change (#6899) * fix: metadata not saved while creating a booking. (#6866) * feat: add metadata to booking creation * fix: bug * Beginning of Strict CSP Compliance (#6841) * Add CSP Support and enable it initially for Login page * Update README * Make sure that CSP is not enabled if CSP_POLICY isnt set * Add a new value for x-csp header that tells if instance has opted-in to CSP or not * Add more src to CSP * Fix typo in header name * Remove duplicate headers fn * Add https://eu.ui-avatars.com/api/ * Add CSP_POLICY to env.example * v2.5.10 * fix: add req.headers (#6921) Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * add-console-vars (#6929) * Admin Wizard Choose License (#6574) * Implementation * i18n * More i18n * extracted i18n, needs api to get most recent price, added hint: update later * Fixing i18n var * Fix booking filters not working for admin (#6576) * fix: react-select overflow issue in some modals. (#6587) * feat: add a disable overflow prop * feat: use the disable overflow prop * Tailwind Merge (#6596) * Tailwind Merge * Fix merge classNames * [CAL-808] /availability/single - UI issue on buttons beside time inputs (#6561) * [CAL-808] /availability/single - UI issue on buttons beside time inputs * Update apps/web/public/static/locales/en/common.json * Update packages/features/schedules/components/Schedule.tsx * create new translation for tooltip Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> * Bye bye submodules (#6585) * WIP * Uses ssh instead * Update .gitignore * Update .gitignore * Update Makefile * Update git-setup.sh * Update git-setup.sh * Replaced Makefile with bash script * Update package.json * fix: show button on empty string (#6601) Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: add delete in dropdown (#6599) Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * Update README.md * Update README.md * Changed a neutral- classes to gray (#6603) * Changed a neutral- classes to gray * Changed all border-1 to border * Update package.json * Test fixes * Yarn lock fixes * Fix string equality check in git-setup.sh * [CAL-811] Avatar icon not redirecting user back to the main page (#6586) * Remove cursor-pointer, remove old Avatar* files * Fixed styling for checkedSelect + some cleanup Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> * Harsh/add member invite (#6598) Co-authored-by: Guest <guest@pop-os.localdomain> Co-authored-by: root <harsh.singh@gocomet.com> * Regenerated lockfile without upgrade (#6610) * fix: remove annoying outline when <Button /> clicked (#6537) * fix: remove annoying outline when <Button /> clicked * Delete yarn.lock * remove 1 on 1 icon (#6609) * removed 1-on-1 badge * changed user to users for group events * fix: case-sensitivity in apps path (#6552) * fix: lowercase slug * fix: make fallback blocking * Fix FAB (#6611) * feat: add LocationSelect component (#6571) * feat: add LocationSelect component Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: type error Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * chore: type error Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * Update booking filters design (#6543) * Update booking filters * Add filter on YOUR bookings * Fix pending members showing up in list * Reduce the avatar size to 'sm' for now * Bugfix/dropdown menu trigger as child remove class names (#6614) * Fix UsernameTextfield to take right height * Remove className side-effect * Incorrect resolution version fixed * Converted mobile DropdownMenuTrigger styles into Button * v2.5.3 * fix: use items-center (#6618) * fix tooltip and modal stacking issues (#6491) * fix tooltip and modal stacking issues * use z-index in larger screens and less Co-authored-by: Alex van Andel <me@alexvanandel.com> * Temporary fix (#6626) * Fix Ga4 tracking (#6630) * generic <UpgradeScreen> component (#6594) * first attempt of <UpgradeScreen> * changes to icons * reverted changes back to initial state, needs fix: teams not showing * WIP * Fix weird reactnode error * Fix loading text * added upgradeTip to routing forms * icon colors * create and use hook to check if user has team plan * use useTeamPlan for upgradeTeamsBadge * replace huge svg with compressed jpeg * responsive fixes * Update packages/ui/components/badge/UpgradeTeamsBadge.tsx Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * Give team plan features to E2E tests * Allow option to make a user part of team int ests * Remove flash of paywall for team user * Add team user for typeform tests as well Co-authored-by: Peer Richelsen <peer@cal.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> * Removing env var to rely on db * Restoring i18n keys, set loading moved * Fixing tailwind-preset glob * Wizard width fix for md+ screens * Converting licenses options to radix radio * Applying feedback + other tweaks * Reverting this, not this PR related * Unneeded code removal * Reverting unneeded style change * Applying feedback * Removing licenseType * Upgrades typescript * Update yarn lock * Typings * Hotfix: ping,riverside,whereby and around not showing up in list (#6712) * Hotfix: ping,riverside,whereby and around not showing up in list (#6712) (#6713) * Adds deployment settings to DB (#6706) * WIP * Adds DeploymentTheme * Add missing migrations * Adds client extensions for deployment * Cleanup * Delete migration.sql * Relying on both, env var and new model * Restoring env example doc for backward compat * Maximum call stack size exceeded fix? * Revert upgrade * Update index.ts * Delete index.ts * Not exposing license key, fixed radio behavior * Covering undefined env var * Self contained checkLicense * Feedback * Moar feedback * Feedback * Feedback * Feedback * Cleanup --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Co-authored-by: Peer Richelsen <peer@cal.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Nafees Nazik <84864519+G3root@users.noreply.github.com> Co-authored-by: GitStart-Cal.com <121884634+gitstart-calcom@users.noreply.github.com> Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Omar López <zomars@me.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Harsh Singh <51085015+harshsinghatz@users.noreply.github.com> Co-authored-by: Guest <guest@pop-os.localdomain> Co-authored-by: root <harsh.singh@gocomet.com> Co-authored-by: Luis Cadillo <luiscaf3r@gmail.com> Co-authored-by: Mohammed Cherfaoui <hi@cherfaoui.dev> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> * added two new tips (#6915) * [CAL-488] Timezone selection has a weird double dropdown (#6851) Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> * fix: color and line height of icon (#6913) * fix: use destination calendar email (#6886) * fix: use destination calendar email to display correct primary email Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: simplify logic Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: dropdown title in bookings page (#6924) * fixes the broken max size of members on teams page (#6926) * fix: display provider name instead of url (#6914) Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * fix: add sortByLabel (#6797) Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * Email Variables Bug (#6943) * Remove _subject translations for zh-CN, needs retranslation * minor timezone-select improvements (#6944) * fixed timezone select positioning and hover * fixed timezone select positioning and hover * Give trackingId a default value because if user doesnt interact with trackingId input it is not set (#6945) * Block /auth/:path, nothing else. (#6949) * Block /auth/:path, nothing else. * Also add /signup * fix start icon in button (#6950) Co-authored-by: CarinaWolli <wollencarina@gmail.com> * Fixes localisation of {EVENT_DATE} in workflows (#6907) * translate {EVENT_DATE} variable to correct language * fix locale for cron schedule reminder emails/sms * fix type error * add missing locale to attendees * fix type error * code clean up * revert last commit * using Intl for date translations --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com> * Allow account linking for Google and SAML providers (#6874) * allow account linking for self-hosted instances, both Google and SAML are verified emails * allow account linking for Google and SSO if emails match with existing username/password account * Tweaked find user by email since we now have multiple providers (other than credentials provider) * feat/payment-service-6438-cal-767 (#6677) * WIP paymentService * Changes for payment Service * Fix for stripe payment flow * Remove logs/comments * Refactored refund for stripe app * Move stripe handlePayment to own lib * Move stripe delete payments to paymentService * lint fix * Change handleRefundError as generic function * remove log * remove logs * remove logs * Return stripe default export to lib/server * Fixing types * Fix types * Upgrades typescript * Update yarn lock * Typings * Hotfix: ping,riverside,whereby and around not showing up in list (#6712) * Hotfix: ping,riverside,whereby and around not showing up in list (#6712) (#6713) * Adds deployment settings to DB (#6706) * WIP * Adds DeploymentTheme * Add missing migrations * Adds client extensions for deployment * Cleanup * Revert "lint fix" This reverts commit e1a2e4a357e58e6673c47399888ae2e00d1351a6. * Add validation * Revert changes removed in force push * Removing abstract class and just leaving interface implementation * Fix types for handlePayments * Fix payment test appStore import * Fix stripe metadata in event type * Move migration to separate PR * Revert "Move migration to separate PR" This reverts commit 48aa64e0724a522d3cc2fefaaaee5792ee9cd9e6. * Update packages/prisma/migrations/20230125175109_remove_type_from_payment_and_add_app_relationship/migration.sql Co-authored-by: Omar López <zomars@me.com> --------- Co-authored-by: zomars <zomars@me.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> * Small UI fixes for seats & destination calendars (#6859) * Do not add former time for events on seats * Default display destination calendar * Add seats badge to event type item * Add string * Actively watch seats enabled option for requires confirmation * Only show former time when there is a rescheduleUid * fix: use typedquery hook in duplicate dialog (#6730) * fix: use typedquery hook in duplicate dialog Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * Update packages/features/eventtypes/components/DuplicateDialog.tsx --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Co-authored-by: Peer Richelsen <peer@cal.com> Co-authored-by: Omar López <zomars@me.com> * Fixing admin wizard step done (#6954) * Feature/maintenance mode (#6930) * Implement maintenance mode with Vercel Edge Config * Error log is spam during development/ added \n in .env.example * Exclude _next, /api for /maintenance page * Re-instate previous config * rtl: begone * Added note to explain why /auth/login covers the maintenance page. --------- Co-authored-by: Omar López <zomars@me.com> * Update package.json * I18N Caching (#6823) * Caching Logic Changes Enabled this function to change its cache value based on incoming paths value * Invalidate I18N Cache Invalidating the I18N cache when a user saves changes to their General settings * Removes deprecated useLocale location * Overriding the default getSchedule cache to have a revalidation time of 1 second * Update apps/web/pages/api/trpc/[trpc].ts * Updated cache values to match the comment --------- Co-authored-by: zomars <zomars@me.com> * feat: return `x-vercel-ip-timezone` in headers (#6849) * feat: add trpc to matcher and pass vercel timezone header * feat: pass request to context * feat: return timezone in header * refactor: split context * fix: remove tsignore comment * Update [trpc].ts --------- Co-authored-by: zomars <zomars@me.com> * log the json url for testing * use WEBAPP_URL constant instead env.NEXT_PUBLIC_WEBAPP_URL * remove the commented selectedCalendars var, it is not necessary * Caching fixes * Separate selectedDate slots from month slots * Update [trpc].ts * Log headers * Update [trpc].ts * Update package.json * Fixes/trpc headers (#7045) * Cache fixes * Testing * SWR breaks embed tests * Prevent refetching day on month switch * Skeleton fixes --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: Nafees Nazik <84864519+G3root@users.noreply.github.com> Co-authored-by: Ben Hybert <53020786+Hybes@users.noreply.github.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Peer Richelsen <peer@cal.com> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Sai Deepesh <saideepesh000@gmail.com> Co-authored-by: alannnc <alannnc@gmail.com> Co-authored-by: Leo Giovanetti <hello@leog.me> Co-authored-by: GitStart-Cal.com <121884634+gitstart-calcom@users.noreply.github.com> Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Harsh Singh <51085015+harshsinghatz@users.noreply.github.com> Co-authored-by: Guest <guest@pop-os.localdomain> Co-authored-by: root <harsh.singh@gocomet.com> Co-authored-by: Luis Cadillo <luiscaf3r@gmail.com> Co-authored-by: Mohammed Cherfaoui <hi@cherfaoui.dev> Co-authored-by: Joe Shajan <joeshajan1551@gmail.com> Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Co-authored-by: Aaron Presley <155617+AaronPresley@users.noreply.github.com>
2023-02-13 15:42:53 -03:00
config.plugins.push(new webpack.DefinePlugin({ "process.env.BUILD_ID": JSON.stringify(buildId) }));
config.resolve.fallback = {
...config.resolve.fallback, // if you miss it, all the other options in fallback, specified
// by next.js will be dropped. Doesn't make much sense, but how it is
fs: false,
};
/**
* TODO: Find more possible barrels for this project.
* @see https://github.com/vercel/next.js/issues/12557#issuecomment-1196931845
**/
config.module.rules.push({
test: [/lib\/.*.tsx?/i],
sideEffects: false,
});
return config;
},
async rewrites() {
const defaultSubdomain = getSubdomain();
const subdomain = defaultSubdomain ? `(?!${defaultSubdomain})[^.]+` : "[^.]+";
const beforeFiles = [
{
has: [
{
type: "host",
value: `^(?<orgSlug>${subdomain})\\..*`,
},
],
source: "/",
destination: "/team/:orgSlug",
},
{
has: [
{
type: "host",
value: `^(?<orgSlug>${subdomain})\\..*`,
},
],
source: `/:user((?!${pages.join("|")}|_next|public)[a-zA-Z0-9\-_]+)`,
destination: "/org/:orgSlug/:user",
},
{
has: [
{
type: "host",
value: `^(?<orgSlug>${subdomain}[^.]+)\\..*`,
},
],
source: `/:user((?!${pages.join("|")}|_next|public))/:path*`,
destination: "/:user/:path*",
},
];
let afterFiles = [
feat: Organizations (#8993) * Initial commit * Adding feature flag * feat: Orgs Schema Changing `scopedMembers` to `orgUsers` (#9209) * Change scopedMembers to orgMembers * Change to orgUsers * Letting duplicate slugs for teams to support orgs * Covering null on unique clauses * Supporting having the orgId in the session cookie * feat: organization event type filter (#9253) Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> * Missing changes to support orgs schema changes * feat: Onboarding process to create an organization (#9184) * Desktop first banner, mobile pending * Removing dead code and img * WIP * Adds Email verification template+translations for organizations (#9202) * First step done * Merge branch 'feat/organizations-onboarding' of github.com:calcom/cal.com into feat/organizations-onboarding * Step 2 done, avatar not working * Covering null on unique clauses * Onboarding admins step * Last step to create teams * Moving change password handler, improving verifying code flow * Clearing error before submitting * Reverting email testing api changes * Reverting having the banner for now * Consistent exported components * Remove unneeded files from banner * Removing uneeded code * Fixing avatar selector * Using meta component for head/descr * Missing i18n strings * Feedback * Making an org avatar (temp) * Check for subteams slug clashes with usernames * Fixing create teams onsuccess * feedback * Making sure we check requestedSlug now --------- Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * feat: [CAL-1816] Organization subdomain support (#9345) * Desktop first banner, mobile pending * Removing dead code and img * WIP * Adds Email verification template+translations for organizations (#9202) * First step done * Merge branch 'feat/organizations-onboarding' of github.com:calcom/cal.com into feat/organizations-onboarding * Step 2 done, avatar not working * Covering null on unique clauses * Onboarding admins step * Last step to create teams * Moving change password handler, improving verifying code flow * Clearing error before submitting * Reverting email testing api changes * Reverting having the banner for now * Consistent exported components * Remove unneeded files from banner * Removing uneeded code * Fixing avatar selector * Using meta component for head/descr * Missing i18n strings * Feedback * Making an org avatar (temp) * Check for subteams slug clashes with usernames * Fixing create teams onsuccess * Covering users and subteams, excluding non-org users * Unpublished teams shows correctly * Create subdomain in Vercel * feedback * Renaming Vercel env vars * Vercel domain check before creation * Supporting cal-staging.com * Change to have vercel detect it * vercel domain check data message error * Remove check domain * Making sure we check requestedSlug now * Feedback and unneeded code * Reverting unneeded changes * Unneeded changes --------- Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * Vercel subdomain creation in PROD only * Making sure we let localhost still work * Feedback * Type check fixes * feat: Organization branding in side menu (#9279) * Desktop first banner, mobile pending * Removing dead code and img * WIP * Adds Email verification template+translations for organizations (#9202) * First step done * Merge branch 'feat/organizations-onboarding' of github.com:calcom/cal.com into feat/organizations-onboarding * Step 2 done, avatar not working * Covering null on unique clauses * Onboarding admins step * Last step to create teams * Moving change password handler, improving verifying code flow * Clearing error before submitting * Reverting email testing api changes * Reverting having the banner for now * Consistent exported components * Remove unneeded files from banner * Removing uneeded code * Fixing avatar selector * Org branding provider used in shell sidebar * Using meta component for head/descr * Missing i18n strings * Feedback * Making an org avatar (temp) * Using org avatar (temp) * Not showing org logo if not set * User onboarding with org branding (slug) * Check for subteams slug clashes with usernames * Fixing create teams onsuccess * feedback * Feedback * Org public profile * Public profiles for team event types * Added setup profile alert * Using org avatar on subteams avatar * Making sure we show the set up profile on org only * Profile username availability rely on org hook * Update apps/web/pages/team/[slug].tsx Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * Update apps/web/pages/team/[slug].tsx Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> --------- Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * feat: Organization support for event types page (#9449) * Desktop first banner, mobile pending * Removing dead code and img * WIP * Adds Email verification template+translations for organizations (#9202) * First step done * Merge branch 'feat/organizations-onboarding' of github.com:calcom/cal.com into feat/organizations-onboarding * Step 2 done, avatar not working * Covering null on unique clauses * Onboarding admins step * Last step to create teams * Moving change password handler, improving verifying code flow * Clearing error before submitting * Reverting email testing api changes * Reverting having the banner for now * Consistent exported components * Remove unneeded files from banner * Removing uneeded code * Fixing avatar selector * Org branding provider used in shell sidebar * Using meta component for head/descr * Missing i18n strings * Feedback * Making an org avatar (temp) * Using org avatar (temp) * Not showing org logo if not set * User onboarding with org branding (slug) * Check for subteams slug clashes with usernames * Fixing create teams onsuccess * feedback * Feedback * Org public profile * Public profiles for team event types * Added setup profile alert * Using org avatar on subteams avatar * Processing orgs and children as profile options * Reverting change not belonging to this PR * Making sure we show the set up profile on org only * Removing console.log * Comparing memberships to choose the highest one --------- Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * Type errors * Refactor and type fixes * Update orgDomains.ts * Feedback * Reverting * NIT * fix issue getting org slug from domain * Improving orgDomains util * Host comes with port * Update useRouterQuery.ts * Feedback * Feedback * Feedback * Feedback: SSR for user event-types to have org context * chore: Cache node_modules (#9492) * Adding check for cache hit * Adding a separate install step first * Put the restore cache steps back * Revert the uses type for restoring cache * Added step to restore nm cache * Removed the cache-hit check * Comments and naming * Removed extra install command * Updated the name of the linting step to be more clear * Removes the need for useEffect here * Feedback * Feedback * Cookie domain needs a dot * Type fix * Update apps/web/public/static/locales/en/common.json Co-authored-by: Omar López <zomars@me.com> * Update packages/emails/src/templates/OrganizationAccountVerifyEmail.tsx * Feedback --------- Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Efraín Rochín <roae.85@gmail.com> Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2023-06-14 18:40:20 -03:00
{
source: "/org/:slug",
destination: "/team/:slug",
},
{
source: "/:user/avatar.png",
destination: "/api/user/avatar?username=:user",
},
{
source: "/team/:teamname/avatar.png",
destination: "/api/user/avatar?teamname=:teamname",
},
{
source: "/forms/:formQuery*",
destination: "/apps/routing-forms/routing-link/:formQuery*",
},
{
source: "/router",
destination: "/apps/routing-forms/router",
},
{
source: "/success/:path*",
has: [
{
type: "query",
key: "uid",
value: "(?<uid>.*)",
},
],
destination: "/booking/:uid/:path*",
},
{
source: "/cancel/:path*",
destination: "/booking/:path*",
},
// Keep cookie based booker enabled just in case we disable new-booker globally
...[
{
source: userTypeRouteRegExp,
destination: "/new-booker/:user/:type",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
{
source: teamTypeRouteRegExp,
destination: "/new-booker/team/:slug/:type",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
{
source: privateLinkRouteRegExp,
destination: "/new-booker/d/:link/:slug",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
],
// Keep cookie based booker enabled to test new-booker embed in production
...[
{
source: embedUserTypeRouteRegExp,
destination: "/new-booker/:user/:type/embed",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
{
source: embedTeamTypeRouteRegExp,
destination: "/new-booker/team/:slug/:type/embed",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
],
/* TODO: have these files being served from another deployment or CDN {
source: "/embed/embed.js",
destination: process.env.NEXT_PUBLIC_EMBED_LIB_URL?,
}, */
/**
* Enables new booker using cookie. It works even if NEW_BOOKER_ENABLED_FOR_NON_EMBED, NEW_BOOKER_ENABLED_FOR_EMBED are disabled
*/
];
// Enable New Booker for all Embed Requests
if (process.env.NEW_BOOKER_ENABLED_FOR_EMBED === "1") {
console.log("Enabling New Booker for Embed");
afterFiles.push(
...[
{
source: `/:user((?!${pages.join("|")}).*)/:type/embed`,
destination: "/new-booker/:user/:type/embed",
},
{
source: "/team/:slug/:type/embed",
destination: "/new-booker/team/:slug/:type/embed",
},
]
);
}
// Enable New Booker for All but embed Requests
if (process.env.NEW_BOOKER_ENABLED_FOR_NON_EMBED === "1") {
console.log("Enabling New Booker for Non-Embed");
afterFiles.push(
...[
{
source: userTypeRouteRegExp,
destination: "/new-booker/:user/:type",
},
{
source: teamTypeRouteRegExp,
destination: "/new-booker/team/:slug/:type",
},
{
source: privateLinkRouteRegExp,
destination: "/new-booker/d/:link/:slug",
},
]
);
}
return {
beforeFiles,
afterFiles,
};
},
async headers() {
return [
{
source: "/auth/:path*",
headers: [
{
key: "X-Frame-Options",
value: "DENY",
},
],
},
{
source: "/signup",
headers: [
{
key: "X-Frame-Options",
value: "DENY",
},
],
},
{
source: "/:path*",
headers: [
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "Referrer-Policy",
value: "strict-origin-when-cross-origin",
},
],
},
];
},
async redirects() {
const redirects = [
{
source: "/api/app-store/:path*",
destination: "/app-store/:path*",
permanent: true,
},
{
source: "/auth/signup",
destination: "/signup",
permanent: true,
},
{
2021-07-20 15:18:26 -03:00
source: "/settings",
2022-09-15 08:09:06 -03:00
destination: "/settings/my-account/profile",
permanent: true,
2021-07-20 15:18:26 -03:00
},
2022-09-19 11:38:21 -03:00
{
source: "/settings/teams",
destination: "/teams",
permanent: true,
},
{
source: "/settings/admin",
destination: "/settings/admin/flags",
permanent: true,
},
2.0 Settings / My Account {View} (#3874) * Fix breadcrumb colors * HorizontalTabs * Team List Item WIP * Horizontal Tabs * Cards * Remove team list item WIP * Login Page * Add welcome back i118n * EventType page work * Update EventType Icons * WIP Availability * Horizontal Tab Work * Add build command for in root * Update build DIr/command * Add Edit Button + change buttons to v2 * Availablitiy page * Fix IPAD * Make mobile look a little nicer * WIP bookingshell * Remove list items from breaking build * Mian bulk of Booking Page. * Few updates to components * Fix chormatic feedback * Fix banner * Fix Empty Screen * Text area + embded window fixes * Semi fix avatar * Troubleshoot container + Active on count * Improve mobile * NITS * Fix padding on input * Fix icons * Starting to move event types settings to tabs * Begin migration to single page form * Single page tabs * Limits Page * Advanced tab * Add RHF to dependancies * Most of advanced tab * Solved RHF mismtach * Build fixes * RHF conditionals fixes * Improved legibility * Major refactor/organisation into optional V2 UI * Portal EditLocationModal * Fix dialoug form * Update imports * Auto Animate + custom inputs WIP * Custom Inputs * WIP Apps * Fixing stories imports * Stripe app * Remove duplicate dialog * Remove duplicate dialog * Fix embed URL * Fix app toggles + number of active apps * Fix container padding on disabledBorder prop * Removes strict * EventType Team page WIP * Fix embed * NIT * Add Darkmode gray color * V2 Shell WIP * Create my account folder * Add profile section * Fix headings on shell V2 * Fix mobile layout with V2 shell * V2 create event type button * Checked Team Select * Hidden to happen on save - not on toggle * Team Attendee Select animation * WIP * Fix scheduling type and remove multi select label * Fix overflow on teams url * Finish profile fields * Show toast on success * General tab WIP * Even Type move order handles * Add switching of destination calendar * List calendar and delete * Render empty screenwhen no calendars * Fix Embed TS errors * Fix TS errors * Fix Eslint errors * Fix TS errors for UI * Fix ESLINT error * added SidebarCard for promo to v2 and storybook (#3906) Co-authored-by: Julian Benegas <julianbenegas99@gmail.com> Co-authored-by: Alan <alannnc@gmail.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> * Tooltip Provider - Wrapper due to dep upgrade * public event type list darkmode * V2 Color changes to public booking * Remove unused component * Fix typecheck * Transfer to SSR * Appearance screen made * V2 image uploader * WIP appearance page * Remove unnecessary data from viewer.me * Add profile translations * Add translations to general page * Add calendar switch * Add calendar switch * Add translations to appearance page * Clean up conferencing page * Settings sidebar fixes * Updates middleware * Update SettingsLayout.tsx * Settings layout improvements * Type fix Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Hariom Balhara <hariombalhara@gmail.com> Co-authored-by: Julian Benegas <julianbenegas99@gmail.com> Co-authored-by: Alan <alannnc@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-25 21:11:41 -03:00
/* V2 testers get redirected to the new settings */
{
source: "/settings/profile",
destination: "/settings/my-account/profile",
permanent: false,
},
{
source: "/settings/security",
destination: "/settings/security/password",
permanent: false,
},
{
source: "/bookings",
destination: "/bookings/upcoming",
permanent: true,
},
{
source: "/call/:path*",
destination: "/video/:path*",
permanent: false,
},
/* Attempt to mitigate DDoS attack */
{
source: "/api/auth/:path*",
has: [
{
type: "query",
key: "callbackUrl",
// prettier-ignore
value: "^(?!https?:\/\/).*$",
},
],
destination: "/404",
permanent: false,
},
{
source: "/booking/direct/:action/:email/:bookingUid/:oldToken",
destination: "/api/link?action=:action&email=:email&bookingUid=:bookingUid&oldToken=:oldToken",
permanent: true,
},
{
source: "/support",
destination: "/event-types?openIntercom=true",
permanent: true,
},
2021-07-20 15:18:26 -03:00
];
if (process.env.NEXT_PUBLIC_WEBAPP_URL === "https://app.cal.com") {
redirects.push(
{
source: "/apps/dailyvideo",
destination: "/apps/daily-video",
permanent: true,
},
{
source: "/apps/huddle01_video",
destination: "/apps/huddle01",
permanent: true,
},
{
source: "/apps/jitsi_video",
destination: "/apps/jitsi",
permanent: true,
}
);
}
return redirects;
2021-07-20 15:18:26 -03:00
},
};
2023-04-17 19:22:44 -03:00
module.exports = () => plugins.reduce((acc, next) => next(acc), nextConfig);