Compare commits

...

3 Commits

Author SHA1 Message Date
Peer Richelsen 6da358c685
Merge branch 'main' into ee-to-ce 2021-11-14 10:01:29 +00:00
Peer Richelsen 823c637fe1 fixed ce in tailwind config 2021-11-12 18:18:12 +00:00
Peer Richelsen a710ce8eee renamed ee to ce (commercial edition) 2021-11-12 18:10:30 +00:00
32 changed files with 46 additions and 82 deletions

View File

@ -1,4 +1,4 @@
The Cal.com Enterprise Edition (EE) license (the “EE License”)
The Cal.com Commercial Edition (CE) license (the “CE License”)
Copyright (c) 2020-present Cal.com, Inc
With regard to the Cal.com Software:
@ -6,15 +6,15 @@ With regard to the Cal.com Software:
This software and associated documentation files (the "Software") may only be
used in production, if you (and any entity that you represent) have agreed to,
and are in compliance with, the Cal.com Subscription Terms available
at https://cal.com/terms (the “EE Terms”), or other agreements governing
at https://cal.com/terms (the “CE Terms”), or other agreements governing
the use of the Software, as mutually agreed by you and Cal.com, Inc ("Cal.com"),
and otherwise have a valid Cal.com Enterprise Edition subscription ("EE Subscription")
for the correct number of hosts as defined in the EE Terms ("Hosts"). Subject to the foregoing sentence,
and otherwise have a valid Cal.com Commercial Edition subscription ("CE Subscription")
for the correct number of hosts as defined in the CE Terms ("Hosts"). Subject to the foregoing sentence,
you are free to modify this Software and publish patches to the Software. You agree
that Cal.com and/or its licensors (as applicable) retain all right, title and interest in
and to all such modifications and/or patches, and all such modifications and/or
patches may only be used, copied, modified, displayed, distributed, or otherwise
exploited with a valid EE Subscription for the correct number of hosts.
exploited with a valid CE Subscription for the correct number of hosts.
Notwithstanding the foregoing, you may copy and modify the Software for development
and testing purposes, without requiring a subscription. You agree that Cal.com and/or
its licensors (as applicable) retain all right, title and interest in and to all such
@ -22,11 +22,11 @@ modifications. You are not granted any other rights beyond what is expressly sta
Subject to the foregoing, it is forbidden to copy, merge, publish, distribute, sublicense,
and/or sell the Software.
This EE License applies only to the part of this Software that is not distributed under
This CE License applies only to the part of this Software that is not distributed under
the MIT license. Any part of this Software distributed under the MIT license or which
is served client-side as an image, font, cascading stylesheet (CSS), file which produces
or is compiled, arranged, augmented, or combined into client-side JavaScript, in whole or
in part, is copyrighted under the MIT license. The full text of this EE License shall
in part, is copyrighted under the MIT license. The full text of this CE License shall
be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

View File

@ -1,19 +1,19 @@
<!-- PROJECT LOGO -->
<div align="center">
<a href="https://cal.com/enterprise">
<a href="https://cal.com/sales">
<img src="https://user-images.githubusercontent.com/8019099/133430653-24422d2a-3c8d-4052-9ad6-0580597151ee.png" alt="Logo">
</a>
<a href="https://cal.com/enterprise">Get Started with Enterprise</a>
<a href="https://cal.com/sales">Get Started with the Commercial License</a>
</div>
# Enterprise Edition
# Commercial Edition
Welcome to the Enterprise Edition ("/ee") of Cal.com.
Welcome to the Commercial Edition ("/ce") of Cal.com, Inc.
The [/ee](https://github.com/calendso/calendso/tree/main/ee) subfolder is the place for all the **Pro** features from our [hosted](https://cal.com/pricing) plan and [enterprise-grade](https://cal.com/enterprise) features such as SSO, SAML, ADFS, OIDC, SCIM, SIEM, HRIS and much more.
The [/ce](https://github.com/calendso/calendso/tree/main/ce) subfolder is the place for all the **Pro** features from our [hosted](https://cal.com/pricing) plan and [enterprise-grade](https://cal.com/sales) features such as SSO, SAML, ADFS, OIDC, SCIM, SIEM, HRIS and much more.
> _❗ WARNING: This repository is copyrighted (unlike our [main repo](https://github.com/calendso/calendso)). You are not allowed to use this code to host your own version of app.cal.com without obtaining a proper [license](https://cal.com/enterprise) first❗_
> _❗ WARNING: This repository is copyrighted (unlike our [main repo](https://github.com/calendso/calendso)). You are not allowed to use this code to host your own version of app.cal.com without obtaining a proper [license](https://cal.com/sales) first❗_
## Setting up Stripe

View File

@ -1,12 +1,11 @@
import { CardElement, useStripe, useElements } from "@stripe/react-stripe-js";
import { StripeCardElementChangeEvent } from "@stripe/stripe-js";
import { PaymentData } from "ce/lib/stripe/server";
import { useRouter } from "next/router";
import { stringify } from "querystring";
import React, { useState } from "react";
import { SyntheticEvent } from "react";
import { PaymentData } from "@ee/lib/stripe/server";
import useDarkMode from "@lib/core/browser/useDarkMode";
import { useLocale } from "@lib/hooks/useLocale";

View File

@ -1,5 +1,8 @@
import { CreditCardIcon } from "@heroicons/react/solid";
import { Elements } from "@stripe/react-stripe-js";
import PaymentComponent from "ce/components/stripe/Payment";
import getStripe from "ce/lib/stripe/client";
import { PaymentPageProps } from "ce/pages/payment/[uid]";
import dayjs from "dayjs";
import timezone from "dayjs/plugin/timezone";
import toArray from "dayjs/plugin/toArray";
@ -8,10 +11,6 @@ import Head from "next/head";
import React, { FC, useEffect, useState } from "react";
import { FormattedNumber, IntlProvider } from "react-intl";
import PaymentComponent from "@ee/components/stripe/Payment";
import getStripe from "@ee/lib/stripe/client";
import { PaymentPageProps } from "@ee/pages/payment/[uid]";
import { useLocale } from "@lib/hooks/useLocale";
import useTheme from "@lib/hooks/useTheme";

View File

@ -1,9 +1,8 @@
import { Prisma } from "@prisma/client";
import stripe, { StripeData } from "ce/lib/stripe/server";
import type { NextApiRequest, NextApiResponse } from "next";
import { stringify } from "querystring";
import stripe, { StripeData } from "@ee/lib/stripe/server";
import { getSession } from "@lib/auth";
import prisma from "@lib/prisma";

View File

@ -1,7 +1,6 @@
import stripe from "ce/lib/stripe/server";
import type { NextApiRequest, NextApiResponse } from "next";
import stripe from "@ee/lib/stripe/server";
import { getSession } from "@lib/auth";
import prisma from "@lib/prisma";

View File

@ -1,9 +1,8 @@
import stripe from "ce/lib/stripe/server";
import { buffer } from "micro";
import type { NextApiRequest, NextApiResponse } from "next";
import Stripe from "stripe";
import stripe from "@ee/lib/stripe/server";
import { CalendarEvent } from "@lib/calendarClient";
import { HttpError } from "@lib/core/http/error";
import { getErrorFromUnknown } from "@lib/errors";

View File

@ -1,7 +1,6 @@
import { PaymentData } from "ce/lib/stripe/server";
import { GetServerSidePropsContext } from "next";
import { PaymentData } from "@ee/lib/stripe/server";
import { asStringOrThrow } from "@lib/asStringOrNull";
import prisma from "@lib/prisma";
import { inferSSRProps } from "@lib/types/inferSSRProps";

View File

@ -8,15 +8,14 @@ import {
LogoutIcon,
PuzzleIcon,
} from "@heroicons/react/solid";
import LicenseBanner from "ce/components/LicenseBanner";
import HelpMenuItemDynamic from "ce/lib/intercom/HelpMenuItemDynamic";
import { signOut, useSession } from "next-auth/client";
import Link from "next/link";
import { useRouter } from "next/router";
import React, { ReactNode, useEffect, useState } from "react";
import { Toaster } from "react-hot-toast";
import LicenseBanner from "@ee/components/LicenseBanner";
import HelpMenuItemDynamic from "@ee/lib/intercom/HelpMenuItemDynamic";
import classNames from "@lib/classNames";
import { shouldShowOnboarding } from "@lib/getting-started";
import { useLocale } from "@lib/hooks/useLocale";

View File

@ -6,6 +6,7 @@ import {
LocationMarkerIcon,
} from "@heroicons/react/solid";
import { EventTypeCustomInputType } from "@prisma/client";
import { createPaymentLink } from "ce/lib/stripe/client";
import dayjs from "dayjs";
import Head from "next/head";
import { useRouter } from "next/router";
@ -14,8 +15,6 @@ import { useCallback, useEffect, useState } from "react";
import { FormattedNumber, IntlProvider } from "react-intl";
import { ReactMultiEmail } from "react-multi-email";
import { createPaymentLink } from "@ee/lib/stripe/client";
import { asStringOrNull } from "@lib/asStringOrNull";
import { timeZone } from "@lib/clock";
import { useLocale } from "@lib/hooks/useLocale";

View File

@ -1,11 +1,10 @@
import { IdProvider } from "@radix-ui/react-id";
import DynamicIntercomProvider from "ce/lib/intercom/providerDynamic";
import { Provider } from "next-auth/client";
import { appWithTranslation } from "next-i18next";
import type { AppProps as NextAppProps } from "next/app";
import React, { ComponentProps, ReactNode } from "react";
import DynamicIntercomProvider from "@ee/lib/intercom/providerDynamic";
import { createTelemetryClient, TelemetryProvider } from "@lib/telemetry";
import { trpc } from "./trpc";

View File

@ -1,8 +1,7 @@
import { User, Booking, SchedulingType, BookingStatus } from "@prisma/client";
import { refund } from "ce/lib/stripe/server";
import type { NextApiRequest, NextApiResponse } from "next";
import { refund } from "@ee/lib/stripe/server";
import { getSession } from "@lib/auth";
import { CalendarEvent } from "@lib/calendarClient";
import EventRejectionMail from "@lib/emails/EventRejectionMail";

View File

@ -1,5 +1,6 @@
import { Credential, Prisma, SchedulingType } from "@prisma/client";
import async from "async";
import { handlePayment } from "ce/lib/stripe/server";
import dayjs from "dayjs";
import dayjsBusinessTime from "dayjs-business-time";
import isBetween from "dayjs/plugin/isBetween";
@ -9,8 +10,6 @@ import type { NextApiRequest, NextApiResponse } from "next";
import short from "short-uuid";
import { v5 as uuidv5 } from "uuid";
import { handlePayment } from "@ee/lib/stripe/server";
import { CalendarEvent, getBusyCalendarTimes } from "@lib/calendarClient";
import EventOrganizerRequestMail from "@lib/emails/EventOrganizerRequestMail";
import { getErrorFromUnknown } from "@lib/errors";

View File

@ -1,9 +1,8 @@
import { BookingStatus } from "@prisma/client";
import async from "async";
import { refund } from "ce/lib/stripe/server";
import { NextApiRequest, NextApiResponse } from "next";
import { refund } from "@ee/lib/stripe/server";
import { asStringOrNull } from "@lib/asStringOrNull";
import { getSession } from "@lib/auth";
import { CalendarEvent, deleteEvent } from "@lib/calendarClient";

View File

@ -1 +1 @@
export { default } from "@ee/pages/api/integrations/stripepayment/add";
export { default } from "ce/pages/api/integrations/stripepayment/add";

View File

@ -1 +1 @@
export { default } from "@ee/pages/api/integrations/stripepayment/callback";
export { default } from "ce/pages/api/integrations/stripepayment/callback";

View File

@ -1 +1 @@
export { default } from "@ee/pages/api/integrations/stripepayment/portal";
export { default } from "ce/pages/api/integrations/stripepayment/portal";

View File

@ -1 +1 @@
export { default, config } from "@ee/pages/api/integrations/stripepayment/webhook";
export { default, config } from "ce/pages/api/integrations/stripepayment/webhook";

View File

@ -15,6 +15,7 @@ import {
UsersIcon,
} from "@heroicons/react/solid";
import { EventTypeCustomInput, Prisma, SchedulingType } from "@prisma/client";
import { StripeData } from "ce/lib/stripe/server";
import dayjs from "dayjs";
import timezone from "dayjs/plugin/timezone";
import utc from "dayjs/plugin/utc";
@ -25,8 +26,6 @@ import { FormattedNumber, IntlProvider } from "react-intl";
import { useMutation } from "react-query";
import Select, { OptionTypeBase } from "react-select";
import { StripeData } from "@ee/lib/stripe/server";
import {
asNumberOrThrow,
asNumberOrUndefined,

View File

@ -1,5 +1,5 @@
import PaymentPage from "@ee/components/stripe/PaymentPage";
import { getServerSideProps } from "@ee/pages/payment/[uid]";
import PaymentPage from "ce/components/stripe/PaymentPage";
import { getServerSideProps } from "ce/pages/payment/[uid]";
import { inferSSRProps } from "@lib/types/inferSSRProps";

View File

@ -1,8 +1,7 @@
import { BookingStatus, Prisma } from "@prisma/client";
import { checkPremiumUsername } from "ce/lib/core/checkPremiumUsername";
import { z } from "zod";
import { checkPremiumUsername } from "@ee/lib/core/checkPremiumUsername";
import { checkRegularUsername } from "@lib/core/checkRegularUsername";
import { ALL_INTEGRATIONS } from "@lib/integrations/getIntegrations";
import slugify from "@lib/slugify";

View File

@ -3,7 +3,7 @@ module.exports = {
purge: [
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
"./ee/components/**/*.{js,ts,jsx,tsx}",
"./ce/components/**/*.{js,ts,jsx,tsx}",
],
darkMode: "class",
theme: {

View File

@ -1,25 +1,13 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"baseUrl": ".",
"paths": {
"@components/*": [
"components/*"
],
"@lib/*": [
"lib/*"
],
"@server/*": [
"server/*"
],
"@ee/*": [
"ee/*"
]
"@components/*": ["components/*"],
"@lib/*": ["lib/*"],
"@server/*": ["server/*"],
"@ee/*": ["ce/*"]
},
"skipLibCheck": true,
"strict": true,
@ -33,20 +21,10 @@
"isolatedModules": true,
"useUnknownInCatchVariables": true,
"jsx": "preserve",
"types": [
"@types/jest",
"jest-playwright-preset",
"expect-playwright"
],
"types": ["@types/jest", "jest-playwright-preset", "expect-playwright"],
"allowJs": false,
"incremental": true
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx"
],
"exclude": [
"node_modules"
]
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}