first commit
This commit is contained in:
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.git
|
||||||
|
.github
|
||||||
|
.env.example
|
62
.env.example
Normal file
62
.env.example
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
# Set this value to 'agree' to accept our license:
|
||||||
|
# LICENSE: https://github.com/calendso/calendso/blob/main/LICENSE
|
||||||
|
#
|
||||||
|
# Summary of terms:
|
||||||
|
# - The codebase has to stay open source, whether it was modified or not
|
||||||
|
# - You can not repackage or sell the codebase
|
||||||
|
# - Acquire a commercial license to remove these terms by emailing: license@cal.com
|
||||||
|
NEXT_PUBLIC_LICENSE_CONSENT=
|
||||||
|
LICENSE=
|
||||||
|
|
||||||
|
# BASE_URL and NEXT_PUBLIC_APP_URL are both deprecated. Both are replaced with one variable, NEXT_PUBLIC_WEBAPP_URL
|
||||||
|
# BASE_URL=http://localhost:3000
|
||||||
|
# NEXT_PUBLIC_APP_URL=http://localhost:3000
|
||||||
|
|
||||||
|
NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
|
||||||
|
NEXT_PUBLIC_API_V2_URL=http://localhost:5555/api/v2
|
||||||
|
|
||||||
|
# Configure NEXTAUTH_URL manually if needed, otherwise it will resolve to {NEXT_PUBLIC_WEBAPP_URL}/api/auth
|
||||||
|
# NEXTAUTH_URL=http://localhost:3000/api/auth
|
||||||
|
|
||||||
|
# It is highly recommended that the NEXTAUTH_SECRET must be overridden and very unique
|
||||||
|
# Use `openssl rand -base64 32` to generate a key
|
||||||
|
NEXTAUTH_SECRET=secret
|
||||||
|
|
||||||
|
# Encryption key that will be used to encrypt CalDAV credentials, choose a random string, for example with `dd if=/dev/urandom bs=1K count=1 | md5sum`
|
||||||
|
CALENDSO_ENCRYPTION_KEY=secret
|
||||||
|
|
||||||
|
# Deprecation note: JWT_SECRET is no longer used
|
||||||
|
# JWT_SECRET=secret
|
||||||
|
|
||||||
|
POSTGRES_USER=unicorn_user
|
||||||
|
POSTGRES_PASSWORD=magical_password
|
||||||
|
POSTGRES_DB=calendso
|
||||||
|
DATABASE_HOST=database:5432
|
||||||
|
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}
|
||||||
|
# Needed to run migrations while using a connection pooler like PgBouncer
|
||||||
|
# Use the same one as DATABASE_URL if you're not using a connection pooler
|
||||||
|
DATABASE_DIRECT_URL=${DATABASE_URL}
|
||||||
|
GOOGLE_API_CREDENTIALS={}
|
||||||
|
|
||||||
|
# Set this to '1' if you don't want Cal to collect anonymous usage
|
||||||
|
CALCOM_TELEMETRY_DISABLED=
|
||||||
|
|
||||||
|
# Used for the Office 365 / Outlook.com Calendar integration
|
||||||
|
MS_GRAPH_CLIENT_ID=
|
||||||
|
MS_GRAPH_CLIENT_SECRET=
|
||||||
|
|
||||||
|
# Used for the Zoom integration
|
||||||
|
ZOOM_CLIENT_ID=
|
||||||
|
ZOOM_CLIENT_SECRET=
|
||||||
|
|
||||||
|
# E-mail settings
|
||||||
|
# Configures the global From: header whilst sending emails.
|
||||||
|
EMAIL_FROM=notifications@example.com
|
||||||
|
|
||||||
|
# Configure SMTP settings (@see https://nodemailer.com/smtp/).
|
||||||
|
EMAIL_SERVER_HOST=smtp.example.com
|
||||||
|
EMAIL_SERVER_PORT=587
|
||||||
|
EMAIL_SERVER_USER=email_user
|
||||||
|
EMAIL_SERVER_PASSWORD=email_password
|
||||||
|
|
||||||
|
NODE_ENV=production
|
7
.github/dependabot.yml
vendored
Normal file
7
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
# Maintain dependencies for GitHub Actions
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
60
.github/workflows/create-release.yaml
vendored
Normal file
60
.github/workflows/create-release.yaml
vendored
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
name: "Create Release"
|
||||||
|
|
||||||
|
on: # yamllint disable-line rule:truthy
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
RELEASE_TAG:
|
||||||
|
description: 'v{Major}.{Minor}.{Patch}'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: "Release"
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout source
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.ACTIONS_ACCESS_TOKEN }}
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Create branch and tag submodule
|
||||||
|
run: |
|
||||||
|
git config user.email "actions@github.com"
|
||||||
|
git config user.name "actions-user"
|
||||||
|
git submodule update --init --remote
|
||||||
|
git checkout -b 'release-${{ inputs.RELEASE_TAG }}'
|
||||||
|
(cd calcom && git fetch --tags origin && git checkout 'refs/tags/${{ inputs.RELEASE_TAG }}')
|
||||||
|
git add calcom
|
||||||
|
git commit -m "tag version Cal.com version ${{ inputs.RELEASE_TAG }}"
|
||||||
|
git push origin 'release-${{ inputs.RELEASE_TAG }}'
|
||||||
|
|
||||||
|
# note: instead of secrets.GITHUB_TOKEN here, we need to use a PAT
|
||||||
|
# so that the release creation triggers the image build workflow
|
||||||
|
- name: "Create release"
|
||||||
|
uses: "actions/github-script@v6"
|
||||||
|
with:
|
||||||
|
github-token: "${{ secrets.ACTIONS_ACCESS_TOKEN }}"
|
||||||
|
script: |
|
||||||
|
const isPreRelease = '${{ inputs.RELEASE_TAG }}'.includes('-rc');
|
||||||
|
try {
|
||||||
|
const response = await github.rest.repos.createRelease({
|
||||||
|
draft: false,
|
||||||
|
generate_release_notes: true,
|
||||||
|
body: 'For Cal.com release details, see: https://github.com/calcom/cal.com/releases/tag/${{ inputs.RELEASE_TAG }}',
|
||||||
|
name: '${{ inputs.RELEASE_TAG }}',
|
||||||
|
target_commitish: 'release-${{ inputs.RELEASE_TAG }}',
|
||||||
|
owner: context.repo.owner,
|
||||||
|
prerelease: isPreRelease,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
tag_name: '${{ inputs.RELEASE_TAG }}',
|
||||||
|
});
|
||||||
|
|
||||||
|
core.exportVariable('RELEASE_ID', response.data.id);
|
||||||
|
core.exportVariable('RELEASE_UPLOAD_URL', response.data.upload_url);
|
||||||
|
} catch (error) {
|
||||||
|
core.setFailed(error.message);
|
||||||
|
}
|
199
.github/workflows/docker-build-push-dockerhub.yml
vendored
Normal file
199
.github/workflows/docker-build-push-dockerhub.yml
vendored
Normal file
@ -0,0 +1,199 @@
|
|||||||
|
# This is a basic workflow to help you get started with Actions
|
||||||
|
|
||||||
|
name: Build and push image to DockerHub
|
||||||
|
|
||||||
|
# Controls when the workflow will run
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
# update on run of Update Calendso nightly submodule update
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["Update Calendso"]
|
||||||
|
branches: [main]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
# Allow running workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
# Uncomment below to allow specific version workflow run
|
||||||
|
# inputs:
|
||||||
|
# version:
|
||||||
|
# description: 'Version to build'
|
||||||
|
# required: true
|
||||||
|
|
||||||
|
# Leaving in example for releases. Initially we simply push to 'latest'
|
||||||
|
# on:
|
||||||
|
# release:
|
||||||
|
# types: [ created ]
|
||||||
|
|
||||||
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
|
jobs:
|
||||||
|
# This workflow contains a single job called "build"
|
||||||
|
build:
|
||||||
|
# The type of runner that the job will run on
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
|
steps:
|
||||||
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
uses: jlumbroso/free-disk-space@main
|
||||||
|
with:
|
||||||
|
# Free about 4.5 GB, elminating our disk space issues
|
||||||
|
tool-cache: true
|
||||||
|
|
||||||
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it, uncomment below
|
||||||
|
# - name: Checkout code at specified version
|
||||||
|
# uses: actions/checkout@v2
|
||||||
|
# with:
|
||||||
|
# ref: ${{ github.event.inputs.version }}
|
||||||
|
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Git submodule update
|
||||||
|
run: |
|
||||||
|
git submodule update --init
|
||||||
|
|
||||||
|
- name: Log in to the Docker Hub registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
# Username used to log against the Docker registry
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
# Password or personal access token used to log against the Docker registry
|
||||||
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||||
|
# Log out from the Docker registry at the end of a job
|
||||||
|
logout: true # optional, default is true
|
||||||
|
|
||||||
|
- name: Log in to the Github Container registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
docker.io/calendso/calendso
|
||||||
|
docker.io/calcom/cal.com
|
||||||
|
ghcr.io/calcom/cal.com
|
||||||
|
# Add flavor latest only on full releases, not on pre-releases
|
||||||
|
flavor: |
|
||||||
|
latest=${{ !github.event.release.prerelease }}
|
||||||
|
|
||||||
|
- name: Copy env
|
||||||
|
run: |
|
||||||
|
grep -o '^[^#]*' .env.example > .env
|
||||||
|
cat .env >> $GITHUB_ENV
|
||||||
|
echo "DATABASE_HOST=localhost:5432" >> $GITHUB_ENV
|
||||||
|
eval $(sed -e '/^#/d' -e 's/^/export /' -e 's/$/;/' .env) ;
|
||||||
|
|
||||||
|
# Temporarily disable ARM build due to runner performance issues
|
||||||
|
# - name: Set up QEMU
|
||||||
|
# uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
|
- name: Start database
|
||||||
|
run: |
|
||||||
|
docker compose up -d database
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
driver-opts: |
|
||||||
|
network=container:database
|
||||||
|
buildkitd-flags: |
|
||||||
|
--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
|
||||||
|
# config-inline: |
|
||||||
|
# [worker.oci]
|
||||||
|
# max-parallelism = 1
|
||||||
|
|
||||||
|
- name: Build image
|
||||||
|
id: docker_build
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: ./
|
||||||
|
file: ./Dockerfile
|
||||||
|
load: true # Load the image into the Docker daemon
|
||||||
|
push: false # Do not push the image at this stage
|
||||||
|
platforms: linux/amd64
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
build-args: |
|
||||||
|
NEXT_PUBLIC_WEBAPP_URL=${{ env.NEXT_PUBLIC_WEBAPP_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_URL=${{ env.NEXT_PUBLIC_API_V2_URL }}
|
||||||
|
NEXT_PUBLIC_LICENSE_CONSENT=${{ env.NEXT_PUBLIC_LICENSE_CONSENT }}
|
||||||
|
NEXT_PUBLIC_TELEMETRY_KEY=${{ env.NEXT_PUBLIC_TELEMETRY_KEY }}
|
||||||
|
DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }}
|
||||||
|
DATABASE_DIRECT_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }}
|
||||||
|
|
||||||
|
- name: Test runtime
|
||||||
|
run: |
|
||||||
|
tags="${{ steps.meta.outputs.tags }}"
|
||||||
|
IFS=',' read -ra ADDR <<< "$tags" # Convert string to array using ',' as delimiter
|
||||||
|
tag=${ADDR[0]} # Get the first tag
|
||||||
|
|
||||||
|
docker run --rm --network stack \
|
||||||
|
-p 3000:3000 \
|
||||||
|
-e DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@database/${{ env.POSTGRES_DB }} \
|
||||||
|
-e DATABASE_DIRECT_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@database/${{ env.POSTGRES_DB }} \
|
||||||
|
-e NEXTAUTH_SECRET=${{ env.NEXTAUTH_SECRET }} \
|
||||||
|
-e CALENDSO_ENCRYPTION_KEY=${{ env.CALENDSO_ENCRYPTION_KEY }} \
|
||||||
|
$tag &
|
||||||
|
|
||||||
|
server_pid=$!
|
||||||
|
|
||||||
|
|
||||||
|
echo "Waiting for the server to start..."
|
||||||
|
sleep 120
|
||||||
|
|
||||||
|
echo ${{ env.NEXT_PUBLIC_WEBAPP_URL }}/auth/login
|
||||||
|
|
||||||
|
for i in {1..60}; do
|
||||||
|
echo "Checking server health ($i/60)..."
|
||||||
|
response=$(curl -o /dev/null -s -w "%{http_code}" ${{ env.NEXT_PUBLIC_WEBAPP_URL }}/auth/login)
|
||||||
|
echo "HTTP Status Code: $response"
|
||||||
|
if [[ "$response" == "200" ]] || [[ "$response" == "307" ]]; then
|
||||||
|
echo "Server is healthy"
|
||||||
|
# Now, shutdown the server
|
||||||
|
kill $server_pid
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Server health check failed"
|
||||||
|
kill $server_pid
|
||||||
|
exit 1
|
||||||
|
env:
|
||||||
|
NEXTAUTH_SECRET: 'EI4qqDpcfdvf4A+0aQEEx8JjHxHSy4uWiZw/F32K+pA='
|
||||||
|
CALENDSO_ENCRYPTION_KEY: '0zfLtY99wjeLnsM7qsa8xsT+Q0oSgnOL'
|
||||||
|
|
||||||
|
- name: Push image
|
||||||
|
id: docker_push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: ./
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
platforms: linux/amd64
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
build-args: |
|
||||||
|
NEXT_PUBLIC_WEBAPP_URL=${{ env.NEXT_PUBLIC_WEBAPP_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_URL=${{ env.NEXT_PUBLIC_API_V2_URL }}
|
||||||
|
NEXT_PUBLIC_LICENSE_CONSENT=${{ env.NEXT_PUBLIC_LICENSE_CONSENT }}
|
||||||
|
NEXT_PUBLIC_TELEMETRY_KEY=${{ env.NEXT_PUBLIC_TELEMETRY_KEY }}
|
||||||
|
DATABASE_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }}
|
||||||
|
DATABASE_DIRECT_URL=postgresql://${{ env.POSTGRES_USER }}:${{ env.POSTGRES_PASSWORD }}@${{ env.DATABASE_HOST }}/${{ env.POSTGRES_DB }}
|
||||||
|
if: ${{ !github.event.release.prerelease }}
|
||||||
|
|
||||||
|
- name: Image digest
|
||||||
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
|
|
||||||
|
- name: Cleanup
|
||||||
|
run: |
|
||||||
|
docker compose down
|
14
.github/workflows/scarf-data-export.yml
vendored
Normal file
14
.github/workflows/scarf-data-export.yml
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
name: Export Scarf data
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
export-scarf-data:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: docker://scarf.docker.scarf.sh/scarf-sh/scarf-postgres-exporter:latest
|
||||||
|
env:
|
||||||
|
SCARF_API_TOKEN: ${{ secrets.SCARF_API_TOKEN }}
|
||||||
|
SCARF_ENTITY_NAME: Calcom
|
||||||
|
PSQL_CONN_STRING: ${{ secrets.PSQL_CONN_STRING }}
|
26
.github/workflows/update-submodules.yml
vendored
Normal file
26
.github/workflows/update-submodules.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: Update Calendso
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 4 * * *"
|
||||||
|
workflow_dispatch: ~
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync:
|
||||||
|
name: 'Submodules Sync'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Git submodule update
|
||||||
|
run: |
|
||||||
|
git submodule update --remote --init
|
||||||
|
|
||||||
|
- name: Commit
|
||||||
|
run: |
|
||||||
|
git config user.email "actions@github.com"
|
||||||
|
git config user.name "actions-user"
|
||||||
|
git commit -am "Auto updated submodule references" && git push || echo "No changes to commit"
|
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# .env file
|
||||||
|
.env
|
||||||
|
.DS_Store
|
0
.gitmodules
vendored
Normal file
0
.gitmodules
vendored
Normal file
81
Dockerfile
Normal file
81
Dockerfile
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
FROM node:18 as builder
|
||||||
|
|
||||||
|
WORKDIR /calcom
|
||||||
|
|
||||||
|
ARG NEXT_PUBLIC_LICENSE_CONSENT
|
||||||
|
ARG CALCOM_TELEMETRY_DISABLED
|
||||||
|
ARG DATABASE_URL
|
||||||
|
ARG NEXTAUTH_SECRET=secret
|
||||||
|
ARG CALENDSO_ENCRYPTION_KEY=secret
|
||||||
|
ARG MAX_OLD_SPACE_SIZE=4096
|
||||||
|
ARG NEXT_PUBLIC_API_V2_URL
|
||||||
|
|
||||||
|
ENV NEXT_PUBLIC_WEBAPP_URL=http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER \
|
||||||
|
NEXT_PUBLIC_API_V2_URL=$NEXT_PUBLIC_API_V2_URL \
|
||||||
|
NEXT_PUBLIC_LICENSE_CONSENT=$NEXT_PUBLIC_LICENSE_CONSENT \
|
||||||
|
CALCOM_TELEMETRY_DISABLED=$CALCOM_TELEMETRY_DISABLED \
|
||||||
|
DATABASE_URL=$DATABASE_URL \
|
||||||
|
DATABASE_DIRECT_URL=$DATABASE_URL \
|
||||||
|
NEXTAUTH_SECRET=${NEXTAUTH_SECRET} \
|
||||||
|
CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY} \
|
||||||
|
NODE_OPTIONS=--max-old-space-size=${MAX_OLD_SPACE_SIZE}
|
||||||
|
|
||||||
|
COPY calcom/package.json calcom/yarn.lock calcom/.yarnrc.yml calcom/playwright.config.ts calcom/turbo.json calcom/git-init.sh calcom/git-setup.sh ./
|
||||||
|
COPY calcom/.yarn ./.yarn
|
||||||
|
COPY calcom/apps/web ./apps/web
|
||||||
|
COPY calcom/apps/api/v2 ./apps/api/v2
|
||||||
|
COPY calcom/packages ./packages
|
||||||
|
COPY calcom/tests ./tests
|
||||||
|
|
||||||
|
RUN yarn config set httpTimeout 1200000
|
||||||
|
RUN npx turbo prune --scope=@calcom/web --docker
|
||||||
|
RUN yarn install
|
||||||
|
RUN yarn db-deploy
|
||||||
|
RUN yarn --cwd packages/prisma seed-app-store
|
||||||
|
# Build and make embed servable from web/public/embed folder
|
||||||
|
RUN yarn --cwd packages/embeds/embed-core workspace @calcom/embed-core run build
|
||||||
|
RUN yarn --cwd apps/web workspace @calcom/web run build
|
||||||
|
|
||||||
|
# RUN yarn plugin import workspace-tools && \
|
||||||
|
# yarn workspaces focus --all --production
|
||||||
|
RUN rm -rf node_modules/.cache .yarn/cache apps/web/.next/cache
|
||||||
|
|
||||||
|
FROM node:18 as builder-two
|
||||||
|
|
||||||
|
WORKDIR /calcom
|
||||||
|
ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
|
||||||
|
|
||||||
|
ENV NODE_ENV production
|
||||||
|
|
||||||
|
COPY calcom/package.json calcom/.yarnrc.yml calcom/turbo.json ./
|
||||||
|
COPY calcom/.yarn ./.yarn
|
||||||
|
COPY --from=builder /calcom/yarn.lock ./yarn.lock
|
||||||
|
COPY --from=builder /calcom/node_modules ./node_modules
|
||||||
|
COPY --from=builder /calcom/packages ./packages
|
||||||
|
COPY --from=builder /calcom/apps/web ./apps/web
|
||||||
|
COPY --from=builder /calcom/packages/prisma/schema.prisma ./prisma/schema.prisma
|
||||||
|
COPY scripts scripts
|
||||||
|
|
||||||
|
# Save value used during this build stage. If NEXT_PUBLIC_WEBAPP_URL and BUILT_NEXT_PUBLIC_WEBAPP_URL differ at
|
||||||
|
# run-time, then start.sh will find/replace static values again.
|
||||||
|
ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \
|
||||||
|
BUILT_NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL
|
||||||
|
|
||||||
|
RUN scripts/replace-placeholder.sh http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER ${NEXT_PUBLIC_WEBAPP_URL}
|
||||||
|
|
||||||
|
FROM node:18 as runner
|
||||||
|
|
||||||
|
|
||||||
|
WORKDIR /calcom
|
||||||
|
COPY --from=builder-two /calcom ./
|
||||||
|
ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
|
||||||
|
ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \
|
||||||
|
BUILT_NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL
|
||||||
|
|
||||||
|
ENV NODE_ENV production
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=30s --timeout=30s --retries=5 \
|
||||||
|
CMD wget --spider http://localhost:3000 || exit 1
|
||||||
|
|
||||||
|
CMD ["/calcom/scripts/start.sh"]
|
81
Dockerfile alt
Normal file
81
Dockerfile alt
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
FROM node:18 AS builder
|
||||||
|
|
||||||
|
WORKDIR /calcom
|
||||||
|
|
||||||
|
ARG NEXT_PUBLIC_LICENSE_CONSENT
|
||||||
|
ARG CALCOM_TELEMETRY_DISABLED
|
||||||
|
ARG DATABASE_URL
|
||||||
|
ARG NEXTAUTH_SECRET=secret
|
||||||
|
ARG CALENDSO_ENCRYPTION_KEY=secret
|
||||||
|
ARG MAX_OLD_SPACE_SIZE=4096
|
||||||
|
ARG NEXT_PUBLIC_API_V2_URL
|
||||||
|
|
||||||
|
ENV NEXT_PUBLIC_WEBAPP_URL=http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER \
|
||||||
|
NEXT_PUBLIC_API_V2_URL=$NEXT_PUBLIC_API_V2_URL \
|
||||||
|
NEXT_PUBLIC_LICENSE_CONSENT=$NEXT_PUBLIC_LICENSE_CONSENT \
|
||||||
|
CALCOM_TELEMETRY_DISABLED=$CALCOM_TELEMETRY_DISABLED \
|
||||||
|
DATABASE_URL=$DATABASE_URL \
|
||||||
|
DATABASE_DIRECT_URL=$DATABASE_URL \
|
||||||
|
NEXTAUTH_SECRET=${NEXTAUTH_SECRET} \
|
||||||
|
CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY} \
|
||||||
|
NODE_OPTIONS=--max-old-space-size=${MAX_OLD_SPACE_SIZE}
|
||||||
|
|
||||||
|
COPY calcom/package.json calcom/yarn.lock calcom/.yarnrc.yml calcom/playwright.config.ts calcom/turbo.json calcom/git-init.sh calcom/git-setup.sh ./
|
||||||
|
COPY calcom/.yarn ./.yarn
|
||||||
|
COPY ./calcom/. /calcom
|
||||||
|
COPY calcom/apps/api/v2 ./apps/api/v2
|
||||||
|
COPY calcom/packages ./packages
|
||||||
|
COPY calcom/tests ./tests
|
||||||
|
|
||||||
|
RUN yarn config set httpTimeout 1200000
|
||||||
|
RUN npx turbo prune --scope=@calcom/web --docker
|
||||||
|
RUN yarn install
|
||||||
|
RUN yarn db-deploy
|
||||||
|
RUN yarn --cwd packages/prisma seed-app-store
|
||||||
|
# Build and make embed servable from web/public/embed folder
|
||||||
|
RUN yarn --cwd packages/embeds/embed-core workspace @calcom/embed-core run build
|
||||||
|
RUN yarn --cwd apps/web workspace @calcom/web run build
|
||||||
|
|
||||||
|
# RUN yarn plugin import workspace-tools && \
|
||||||
|
# yarn workspaces focus --all --production
|
||||||
|
RUN rm -rf node_modules/.cache .yarn/cache apps/web/.next/cache
|
||||||
|
|
||||||
|
FROM node:18 AS builder-two
|
||||||
|
|
||||||
|
WORKDIR /calcom
|
||||||
|
ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
|
COPY calcom/package.json calcom/.yarnrc.yml calcom/turbo.json ./
|
||||||
|
COPY calcom/.yarn ./.yarn
|
||||||
|
COPY --from=builder /calcom/yarn.lock ./yarn.lock
|
||||||
|
COPY --from=builder /calcom/node_modules ./node_modules
|
||||||
|
COPY --from=builder /calcom/packages ./packages
|
||||||
|
COPY --from=builder /calcom/apps/web ./apps/web
|
||||||
|
COPY --from=builder /calcom/packages/prisma/schema.prisma ./prisma/schema.prisma
|
||||||
|
COPY scripts scripts
|
||||||
|
|
||||||
|
# Save value used during this build stage. If NEXT_PUBLIC_WEBAPP_URL and BUILT_NEXT_PUBLIC_WEBAPP_URL differ at
|
||||||
|
# run-time, then start.sh will find/replace static values again.
|
||||||
|
ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \
|
||||||
|
BUILT_NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL
|
||||||
|
|
||||||
|
RUN scripts/replace-placeholder.sh http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER ${NEXT_PUBLIC_WEBAPP_URL}
|
||||||
|
|
||||||
|
FROM node:18 AS runner
|
||||||
|
|
||||||
|
|
||||||
|
WORKDIR /calcom
|
||||||
|
COPY --from=builder-two /calcom ./
|
||||||
|
ARG NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
|
||||||
|
ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \
|
||||||
|
BUILT_NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=30s --timeout=30s --retries=5 \
|
||||||
|
CMD wget --spider http://localhost:3000 || exit 1
|
||||||
|
|
||||||
|
CMD ["/calcom/scripts/start.sh"]
|
1
Dockerfile.render
Normal file
1
Dockerfile.render
Normal file
@ -0,0 +1 @@
|
|||||||
|
FROM calcom.docker.scarf.sh/calcom/cal.com
|
1
Fehlercodes.txt
Normal file
1
Fehlercodes.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fehlercode:031 -> .env-Datei ändern und NEXT_PUBLIC_LICENSE_CONSENT Variable auf 'agree' setzen.
|
19
LICENSE
Normal file
19
LICENSE
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Copyright (c) 2021 Calendso
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice 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 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
|
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
||||||
|
OR OTHER DEALINGS IN THE SOFTWARE.
|
1
Notizen.txt
Normal file
1
Notizen.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
calcom/apps/web/public/static/locales/de/common.json -> Bis Zeile 415
|
276
README.md
Normal file
276
README.md
Normal file
@ -0,0 +1,276 @@
|
|||||||
|
<!-- PROJECT LOGO -->
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://github.com/calcom/cal.com">
|
||||||
|
<img src="https://user-images.githubusercontent.com/8019099/133430653-24422d2a-3c8d-4052-9ad6-0580597151ee.png" alt="Logo">
|
||||||
|
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<h3 align="center">Cal.com (formerly Calendso)</h3>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
The open-source Calendly alternative. (Docker Edition)
|
||||||
|
<br />
|
||||||
|
<a href="https://cal.com"><strong>Learn more »</strong></a>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<a href="https://cal.com/slack">Slack</a>
|
||||||
|
·
|
||||||
|
<a href="https://cal.com">Website</a>
|
||||||
|
·
|
||||||
|
<a href="https://github.com/calcom/cal.com/issues">Core Cal.com related Issues</a>
|
||||||
|
·
|
||||||
|
<a href="https://github.com/calcom/docker/issues">Docker specific Issues</a>
|
||||||
|
·
|
||||||
|
<a href="https://cal.com/roadmap">Roadmap</a>
|
||||||
|
</p>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
# Docker
|
||||||
|
|
||||||
|
This image can be found on DockerHub at [https://hub.docker.com/r/calcom/cal.com](https://hub.docker.com/r/calcom/cal.com)
|
||||||
|
|
||||||
|
The Docker configuration for Cal.com is an effort powered by people within the community. Cal.com, Inc. does not yet provide official support for Docker, but we will accept fixes and documentation at this time. Use at your own risk.
|
||||||
|
|
||||||
|
## Important Notes
|
||||||
|
|
||||||
|
This Docker Image is managed by the Cal.com Community. Join the team [here](https://github.com/calcom/docker/discussions/32). Support for this image can be found via the repository, located at [https://github.com/calcom/docker](https://github.com/calcom/docker)
|
||||||
|
|
||||||
|
**Currently, this image is intended for local development/evaluation use only, as there are specific requirements for providing environmental variables at build-time in order to specify a non-localhost BASE_URL. (this is due to the nature of the static site compilation, which embeds the variable values). The ability to update these variables at runtime is in-progress and will be available in the future.**
|
||||||
|
|
||||||
|
For Production, for the time being, please checkout the repository and build/push your own image privately.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
Make sure you have `docker` & `docker compose` installed on the server / system. Both are installed by most docker utilities, including Docker Desktop and Rancher Desktop.
|
||||||
|
|
||||||
|
Note: `docker compose` without the hyphen is now the primary method of using docker-compose, per the Docker documentation.
|
||||||
|
|
||||||
|
## (Most users) Running Cal.com with Docker Compose
|
||||||
|
|
||||||
|
If you are evaluating Cal.com or running with minimal to no modifications, this option is for you.
|
||||||
|
|
||||||
|
1. Clone calcom/docker
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/calcom/docker.git
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Change into the directory
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd docker
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Prepare your configuration: Rename `.env.example` to `.env` and then update `.env`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp .env.example .env
|
||||||
|
```
|
||||||
|
|
||||||
|
Most configurations can be left as-is, but for configuration options see [Important Run-time variables](#important-run-time-variables) below.
|
||||||
|
|
||||||
|
Update the appropriate values in your .env file, then proceed.
|
||||||
|
|
||||||
|
4. (optional) Pre-Pull the images by running the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose pull
|
||||||
|
```
|
||||||
|
|
||||||
|
This will use the default image locations as specified by `image:` in the docker-compose.yaml file.
|
||||||
|
|
||||||
|
Note: To aid with support, by default Scarf.sh is used as registry proxy for download metrics.
|
||||||
|
|
||||||
|
5. Start Cal.com via docker compose
|
||||||
|
|
||||||
|
(Most basic users, and for First Run) To run the complete stack, which includes a local Postgres database, Cal.com web app, and Prisma Studio:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
To run Cal.com web app and Prisma Studio against a remote database, ensure that DATABASE_URL is configured for an available database and run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d calcom studio
|
||||||
|
```
|
||||||
|
|
||||||
|
To run only the Cal.com web app, ensure that DATABASE_URL is configured for an available database and run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d calcom
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note: to run in attached mode for debugging, remove `-d` from your desired run command.**
|
||||||
|
|
||||||
|
6. Open a browser to [http://localhost:3000](http://localhost:3000), or your defined NEXT_PUBLIC_WEBAPP_URL. The first time you run Cal.com, a setup wizard will initialize. Define your first user, and you're ready to go!
|
||||||
|
|
||||||
|
## Updating Cal.com
|
||||||
|
|
||||||
|
1. Stop the Cal.com stack
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose down
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Pull the latest changes
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose pull
|
||||||
|
```
|
||||||
|
3. Update env vars as necessary.
|
||||||
|
4. Re-start the Cal.com stack
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
## (Advanced users) Build and Run Cal.com
|
||||||
|
|
||||||
|
1. Clone calcom/docker
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/calcom/docker.git calcom-docker
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Change into the directory
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd calcom-docker
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Update the calcom submodule.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git submodule update --remote --init
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: DO NOT use recursive submodule update, otherwise you will receive a git authentication error.
|
||||||
|
|
||||||
|
4. Rename `.env.example` to `.env` and then update `.env`
|
||||||
|
|
||||||
|
For configuration options see [Build-time variables](#build-time-variables) below. Update the appropriate values in your .env file, then proceed.
|
||||||
|
|
||||||
|
5. Build the Cal.com docker image:
|
||||||
|
|
||||||
|
Note: Due to application configuration requirements, an available database is currently required during the build process.
|
||||||
|
|
||||||
|
a) If hosting elsewhere, configure the `DATABASE_URL` in the .env file, and skip the next step
|
||||||
|
|
||||||
|
b) If a local or temporary database is required, start a local database via docker compose.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d database
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Build Cal.com via docker compose (DOCKER_BUILDKIT=0 must be provided to allow a network bridge to be used at build time. This requirement will be removed in the future)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
DOCKER_BUILDKIT=0 docker compose build calcom
|
||||||
|
```
|
||||||
|
|
||||||
|
7. Start Cal.com via docker compose
|
||||||
|
|
||||||
|
(Most basic users, and for First Run) To run the complete stack, which includes a local Postgres database, Cal.com web app, and Prisma Studio:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
To run Cal.com web app and Prisma Studio against a remote database, ensure that DATABASE_URL is configured for an available database and run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d calcom studio
|
||||||
|
```
|
||||||
|
|
||||||
|
To run only the Cal.com web app, ensure that DATABASE_URL is configured for an available database and run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d calcom
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note: to run in attached mode for debugging, remove `-d` from your desired run command.**
|
||||||
|
|
||||||
|
8. Open a browser to [http://localhost:3000](http://localhost:3000), or your defined NEXT_PUBLIC_WEBAPP_URL. The first time you run Cal.com, a setup wizard will initialize. Define your first user, and you're ready to go!
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
### Important Run-time variables
|
||||||
|
|
||||||
|
These variables must also be provided at runtime
|
||||||
|
|
||||||
|
| Variable | Description | Required | Default |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| CALCOM_LICENSE_KEY | Enterprise License Key | optional | |
|
||||||
|
| NEXT_PUBLIC_WEBAPP_URL | Base URL of the site. NOTE: if this value differs from the value used at build-time, there will be a slight delay during container start (to update the statically built files). | optional | `http://localhost:3000` |
|
||||||
|
| NEXTAUTH_URL | Location of the auth server. By default, this is the Cal.com docker instance itself. | optional | `{NEXT_PUBLIC_WEBAPP_URL}/api/auth` |
|
||||||
|
| NEXTAUTH_SECRET | must match build variable | required | `secret` |
|
||||||
|
| CALENDSO_ENCRYPTION_KEY | must match build variable | required | `secret` |
|
||||||
|
| DATABASE_URL | database url with credentials - if using a connection pooler, this setting should point there | required | `postgresql://unicorn_user:magical_password@database:5432/calendso` |
|
||||||
|
| DATABASE_DIRECT_URL | direct database url with credentials if using a connection pooler (e.g. PgBouncer, Prisma Accelerate, etc.) | optional | |
|
||||||
|
|
||||||
|
### Build-time variables
|
||||||
|
|
||||||
|
If building the image yourself, these variables must be provided at the time of the docker build, and can be provided by updating the .env file. Currently, if you require changes to these variables, you must follow the instructions to build and publish your own image.
|
||||||
|
|
||||||
|
Updating these variables is not required for evaluation, but is required for running in production. Instructions for generating variables can be found in the [cal.com instructions](https://github.com/calcom/cal.com)
|
||||||
|
|
||||||
|
| Variable | Description | Required | Default |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| NEXT_PUBLIC_WEBAPP_URL | Base URL injected into static files | optional | `http://localhost:3000` |
|
||||||
|
| NEXT_PUBLIC_LICENSE_CONSENT | license consent - true/false | | |
|
||||||
|
| CALCOM_TELEMETRY_DISABLED | Allow cal.com to collect anonymous usage data (set to `1` to disable) | | |
|
||||||
|
| DATABASE_URL | database url with credentials - if using a connection pooler, this setting should point there | required | `postgresql://unicorn_user:magical_password@database:5432/calendso` |
|
||||||
|
| DATABASE_DIRECT_URL | direct database url with credentials if using a connection pooler (e.g. PgBouncer, Prisma Accelerate, etc.) | optional | |
|
||||||
|
| NEXTAUTH_SECRET | Cookie encryption key | required | `secret` |
|
||||||
|
| CALENDSO_ENCRYPTION_KEY | Authentication encryption key | required | `secret` |
|
||||||
|
|
||||||
|
## Git Submodules
|
||||||
|
|
||||||
|
This repository uses a git submodule.
|
||||||
|
|
||||||
|
For users building their own images, to update the calcom submodule, use the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git submodule update --remote --init
|
||||||
|
```
|
||||||
|
|
||||||
|
For more advanced usage, please refer to the git documentation: [https://git-scm.com/book/en/v2/Git-Tools-Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### SSL edge termination
|
||||||
|
|
||||||
|
If running behind a load balancer which handles SSL certificates, you will need to add the environmental variable `NODE_TLS_REJECT_UNAUTHORIZED=0` to prevent requests from being rejected. Only do this if you know what you are doing and trust the services/load-balancers directing traffic to your service.
|
||||||
|
|
||||||
|
### Failed to commit changes: Invalid 'prisma.user.create()'
|
||||||
|
|
||||||
|
Certain versions may have trouble creating a user if the field `metadata` is empty. Using an empty json object `{}` as the field value should resolve this issue. Also, the `id` field will autoincrement, so you may also try leaving the value of `id` as empty.
|
||||||
|
|
||||||
|
### CLIENT_FETCH_ERROR
|
||||||
|
|
||||||
|
If you experience this error, it may be the way the default Auth callback in the server is using the WEBAPP_URL as a base url. The container does not necessarily have access to the same DNS as your local machine, and therefor needs to be configured to resolve to itself. You may be able to correct this by configuring `NEXTAUTH_URL=http://localhost:3000/api/auth`, to help the backend loop back to itself.
|
||||||
|
```
|
||||||
|
docker-calcom-1 | @calcom/web:start: [next-auth][error][CLIENT_FETCH_ERROR]
|
||||||
|
docker-calcom-1 | @calcom/web:start: https://next-auth.js.org/errors#client_fetch_error request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost {
|
||||||
|
docker-calcom-1 | @calcom/web:start: error: {
|
||||||
|
docker-calcom-1 | @calcom/web:start: message: 'request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost',
|
||||||
|
docker-calcom-1 | @calcom/web:start: stack: 'FetchError: request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost\n' +
|
||||||
|
docker-calcom-1 | @calcom/web:start: ' at ClientRequest.<anonymous> (/calcom/node_modules/next/dist/compiled/node-fetch/index.js:1:65756)\n' +
|
||||||
|
docker-calcom-1 | @calcom/web:start: ' at ClientRequest.emit (node:events:513:28)\n' +
|
||||||
|
docker-calcom-1 | @calcom/web:start: ' at ClientRequest.emit (node:domain:489:12)\n' +
|
||||||
|
docker-calcom-1 | @calcom/web:start: ' at Socket.socketErrorListener (node:_http_client:494:9)\n' +
|
||||||
|
docker-calcom-1 | @calcom/web:start: ' at Socket.emit (node:events:513:28)\n' +
|
||||||
|
docker-calcom-1 | @calcom/web:start: ' at Socket.emit (node:domain:489:12)\n' +
|
||||||
|
docker-calcom-1 | @calcom/web:start: ' at emitErrorNT (node:internal/streams/destroy:157:8)\n' +
|
||||||
|
docker-calcom-1 | @calcom/web:start: ' at emitErrorCloseNT (node:internal/streams/destroy:122:3)\n' +
|
||||||
|
docker-calcom-1 | @calcom/web:start: ' at processTicksAndRejections (node:internal/process/task_queues:83:21)',
|
||||||
|
docker-calcom-1 | @calcom/web:start: name: 'FetchError'
|
||||||
|
docker-calcom-1 | @calcom/web:start: },
|
||||||
|
docker-calcom-1 | @calcom/web:start: url: 'http://testing.localhost:3000/api/auth/session',
|
||||||
|
docker-calcom-1 | @calcom/web:start: message: 'request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost'
|
||||||
|
docker-calcom-1 | @calcom/web:start: }
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=81cda9f7-a102-453b-ac01-51c35650bd70" />
|
38
SECURITY.md
Normal file
38
SECURITY.md
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Security
|
||||||
|
Contact: security@cal.com
|
||||||
|
|
||||||
|
Based on [https://supabase.com/.well-known/security.txt](https://supabase.com/.well-known/security.txt)
|
||||||
|
|
||||||
|
At Cal.com, we consider the security of our systems a top priority. But no matter how much effort we put into system security, there can still be vulnerabilities present.
|
||||||
|
|
||||||
|
If you discover a vulnerability, we would like to know about it so we can take steps to address it as quickly as possible. We would like to ask you to help us better protect our clients and our systems.
|
||||||
|
|
||||||
|
## Out of scope vulnerabilities:
|
||||||
|
|
||||||
|
* Clickjacking on pages with no sensitive actions.
|
||||||
|
* Unauthenticated/logout/login CSRF.
|
||||||
|
* Attacks requiring MITM or physical access to a user's device.
|
||||||
|
* Any activity that could lead to the disruption of our service (DoS).
|
||||||
|
* Content spoofing and text injection issues without showing an attack vector/without being able to modify HTML/CSS.
|
||||||
|
* Email spoofing
|
||||||
|
* Missing DNSSEC, CAA, CSP headers
|
||||||
|
* Lack of Secure or HTTP only flag on non-sensitive cookies
|
||||||
|
* Deadlinks
|
||||||
|
|
||||||
|
## Please do the following:
|
||||||
|
|
||||||
|
* E-mail your findings to [security@cal.com](mailto:security@cal.com).
|
||||||
|
* Do not run automated scanners on our infrastructure or dashboard. If you wish to do this, contact us and we will set up a sandbox for you.
|
||||||
|
* Do not take advantage of the vulnerability or problem you have discovered, for example by downloading more data than necessary to demonstrate the vulnerability or deleting or modifying other people's data,
|
||||||
|
* Do not reveal the problem to others until it has been resolved,
|
||||||
|
* Do not use attacks on physical security, social engineering, distributed denial of service, spam or applications of third parties,
|
||||||
|
* Do provide sufficient information to reproduce the problem, so we will be able to resolve it as quickly as possible. Usually, the IP address or the URL of the affected system and a description of the vulnerability will be sufficient, but complex vulnerabilities may require further explanation.
|
||||||
|
|
||||||
|
## What we promise:
|
||||||
|
|
||||||
|
* We will respond to your report within 3 business days with our evaluation of the report and an expected resolution date,
|
||||||
|
* If you have followed the instructions above, we will not take any legal action against you in regard to the report,
|
||||||
|
* We will handle your report with strict confidentiality, and not pass on your personal details to third parties without your permission,
|
||||||
|
* We will keep you informed of the progress towards resolving the problem,
|
||||||
|
* In the public information concerning the problem reported, we will give your name as the discoverer of the problem (unless you desire otherwise), and
|
||||||
|
* We strive to resolve all problems as quickly as possible, and we would like to play an active role in the ultimate publication on the problem after it is resolved.
|
8
calcom/.changeset/README.md
Normal file
8
calcom/.changeset/README.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Changesets
|
||||||
|
|
||||||
|
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
||||||
|
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
||||||
|
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
||||||
|
|
||||||
|
We have a quick list of common questions to get you started engaging with this project in
|
||||||
|
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
11
calcom/.changeset/config.json
Normal file
11
calcom/.changeset/config.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
|
||||||
|
"changelog": "@changesets/cli/changelog",
|
||||||
|
"commit": false,
|
||||||
|
"fixed": [],
|
||||||
|
"linked": [],
|
||||||
|
"access": "public",
|
||||||
|
"baseBranch": "main",
|
||||||
|
"updateInternalDependencies": "patch",
|
||||||
|
"ignore": []
|
||||||
|
}
|
16
calcom/.editorconfig
Normal file
16
calcom/.editorconfig
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# See http://EditorConfig.org for more information
|
||||||
|
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# Every File
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
139
calcom/.env.appStore.example
Normal file
139
calcom/.env.appStore.example
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
# ********** INDEX **********
|
||||||
|
#
|
||||||
|
# - APP STORE
|
||||||
|
# - BASECAMP
|
||||||
|
# - DAILY.CO VIDEO
|
||||||
|
# - GOOGLE CALENDAR/MEET/LOGIN
|
||||||
|
# - HUBSPOT
|
||||||
|
# - OFFICE 365
|
||||||
|
# - SLACK
|
||||||
|
# - STRIPE
|
||||||
|
# - TANDEM
|
||||||
|
# - ZOOM
|
||||||
|
# - GIPHY
|
||||||
|
# - VITAL
|
||||||
|
# - ZAPIER
|
||||||
|
# - LARK
|
||||||
|
# - WEB3
|
||||||
|
# - SALESFORCE
|
||||||
|
# - ZOHOCRM
|
||||||
|
# - ZOHO_BIGIN
|
||||||
|
|
||||||
|
# - APP STORE **********************************************************************************************
|
||||||
|
# ⚠️ ⚠️ ⚠️ THESE WILL BE MIGRATED TO THE DATABASE TO PREVENT AWS's 4KB ENV QUOTA ⚠️ ⚠️ ⚠️
|
||||||
|
|
||||||
|
# - BASECAMP
|
||||||
|
# Used to enable Basecamp integration with Cal.com
|
||||||
|
# @see https://github.com/calcom/cal.com#obtaining-basecamp-client-id-and-secret
|
||||||
|
BASECAMP3_CLIENT_ID=
|
||||||
|
BASECAMP3_CLIENT_SECRET=
|
||||||
|
BASECAMP3_USER_AGENT=
|
||||||
|
|
||||||
|
# - DAILY.CO VIDEO
|
||||||
|
# Enables Cal Video. to get your key
|
||||||
|
# 1. Visit our [Daily.co Partnership Form](https://go.cal.com/daily) and enter your information
|
||||||
|
# 2. From within your dashboard, go to the [developers](https://dashboard.daily.co/developers) tab.
|
||||||
|
# @see https://github.com/calcom/cal.com#obtaining-daily-api-credentials
|
||||||
|
|
||||||
|
DAILY_API_KEY=
|
||||||
|
DAILY_SCALE_PLAN=''
|
||||||
|
DAILY_WEBHOOK_SECRET=''
|
||||||
|
DAILY_MEETING_ENDED_WEBHOOK_SECRET=''
|
||||||
|
|
||||||
|
# - GOOGLE CALENDAR/MEET/LOGIN
|
||||||
|
# Needed to enable Google Calendar integration and Login with Google
|
||||||
|
# @see https://github.com/calcom/cal.com#obtaining-the-google-api-credentials
|
||||||
|
GOOGLE_API_CREDENTIALS=
|
||||||
|
|
||||||
|
# To enable Login with Google you need to:
|
||||||
|
# 1. Set `GOOGLE_API_CREDENTIALS` above
|
||||||
|
# 2. Set `GOOGLE_LOGIN_ENABLED` to `true`
|
||||||
|
# When self-hosting please ensure you configure the Google integration as an Internal app so no one else can login to your instance
|
||||||
|
# @see https://support.google.com/cloud/answer/6158849#public-and-internal&zippy=%2Cpublic-and-internal-applications
|
||||||
|
GOOGLE_LOGIN_ENABLED=false
|
||||||
|
|
||||||
|
# - HUBSPOT
|
||||||
|
# Used for the HubSpot integration
|
||||||
|
# @see https://github.com/calcom/cal.com/#obtaining-hubspot-client-id-and-secret
|
||||||
|
HUBSPOT_CLIENT_ID=""
|
||||||
|
HUBSPOT_CLIENT_SECRET=""
|
||||||
|
|
||||||
|
# - OFFICE 365
|
||||||
|
# Used for the Office 365 / Outlook.com Calendar / MS Teams integration
|
||||||
|
# @see https://github.com/calcom/cal.com/#Obtaining-Microsoft-Graph-Client-ID-and-Secret
|
||||||
|
MS_GRAPH_CLIENT_ID=
|
||||||
|
MS_GRAPH_CLIENT_SECRET=
|
||||||
|
|
||||||
|
# - SLACK
|
||||||
|
# @see https://github.com/calcom/cal.com/#obtaining-slack-client-id-and-secret-and-signing-secret
|
||||||
|
SLACK_SIGNING_SECRET=
|
||||||
|
SLACK_CLIENT_ID=
|
||||||
|
SLACK_CLIENT_SECRET=
|
||||||
|
|
||||||
|
# - STRIPE
|
||||||
|
NEXT_PUBLIC_STRIPE_PUBLIC_KEY= # pk_test_...
|
||||||
|
STRIPE_PRIVATE_KEY= # sk_test_...
|
||||||
|
STRIPE_WEBHOOK_SECRET= # whsec_...
|
||||||
|
STRIPE_CLIENT_ID= # ca_...
|
||||||
|
PAYMENT_FEE_FIXED=10 # Take 10 additional cents commission
|
||||||
|
PAYMENT_FEE_PERCENTAGE=0.005 # Take 0.5% commission
|
||||||
|
|
||||||
|
# - TANDEM
|
||||||
|
# Used for the Tandem integration -- contact support@tandem.chat for API access.
|
||||||
|
TANDEM_CLIENT_ID=""
|
||||||
|
TANDEM_CLIENT_SECRET=""
|
||||||
|
TANDEM_BASE_URL="https://tandem.chat"
|
||||||
|
|
||||||
|
# - ZOOM
|
||||||
|
# Used for the Zoom integration
|
||||||
|
# @see https://github.com/calcom/cal.com/#obtaining-zoom-client-id-and-secret
|
||||||
|
ZOOM_CLIENT_ID=
|
||||||
|
ZOOM_CLIENT_SECRET=
|
||||||
|
|
||||||
|
# - GIPHY
|
||||||
|
# Used for the Giphy integration
|
||||||
|
# @see https://support.giphy.com/hc/en-us/articles/360020283431-Request-A-GIPHY-API-Key
|
||||||
|
GIPHY_API_KEY=
|
||||||
|
|
||||||
|
# - VITAL
|
||||||
|
# Used for the vital integration
|
||||||
|
# @see https://github.com/calcom/cal.com/#obtaining-vital-api-keys
|
||||||
|
VITAL_API_KEY=
|
||||||
|
VITAL_WEBHOOK_SECRET=
|
||||||
|
# "sandbox" | "prod" | "production" | "development"
|
||||||
|
VITAL_DEVELOPMENT_MODE="sandbox"
|
||||||
|
# "us" | "eu"
|
||||||
|
VITAL_REGION="us"
|
||||||
|
|
||||||
|
# - ZAPIER
|
||||||
|
# Used for the Zapier integration
|
||||||
|
# @see https://github.com/calcom/cal.com/blob/main/packages/app-store/zapier/README.md
|
||||||
|
ZAPIER_INVITE_LINK=""
|
||||||
|
|
||||||
|
# - LARK
|
||||||
|
# Needed to enable Lark Calendar integration and Login with Lark
|
||||||
|
# @see <https://open.larksuite.com/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/g>
|
||||||
|
LARK_OPEN_APP_ID=""
|
||||||
|
LARK_OPEN_APP_SECRET=""
|
||||||
|
LARK_OPEN_VERIFICATION_TOKEN=""
|
||||||
|
|
||||||
|
# - SALESFORCE
|
||||||
|
# Used for the Salesforce (Sales Cloud) app
|
||||||
|
SALESFORCE_CONSUMER_KEY=""
|
||||||
|
SALESFORCE_CONSUMER_SECRET=""
|
||||||
|
|
||||||
|
# - ZOHOCRM
|
||||||
|
# Used for the Zoho CRM integration
|
||||||
|
ZOHOCRM_CLIENT_ID=""
|
||||||
|
ZOHOCRM_CLIENT_SECRET=""
|
||||||
|
|
||||||
|
|
||||||
|
# - REVERT
|
||||||
|
# Used for the Pipedrive integration (via/ Revert (https://revert.dev))
|
||||||
|
# @see https://github.com/calcom/cal.com/#obtaining-revert-api-keys
|
||||||
|
REVERT_API_KEY=
|
||||||
|
REVERT_PUBLIC_TOKEN=
|
||||||
|
|
||||||
|
# NOTE: If you're self hosting Revert, update this URL to point to your own instance.
|
||||||
|
REVERT_API_URL=https://api.revert.dev/
|
||||||
|
# *********************************************************************************************************
|
365
calcom/.env.example
Normal file
365
calcom/.env.example
Normal file
@ -0,0 +1,365 @@
|
|||||||
|
# ********** INDEX **********
|
||||||
|
#
|
||||||
|
# - LICENSE (DEPRECATED)
|
||||||
|
# - DATABASE
|
||||||
|
# - SHARED
|
||||||
|
# - NEXTAUTH
|
||||||
|
# - E-MAIL SETTINGS
|
||||||
|
# - ORGANIZATIONS
|
||||||
|
|
||||||
|
# - LICENSE (DEPRECATED) ************************************************************************************
|
||||||
|
# https://github.com/calcom/cal.com/blob/main/LICENSE
|
||||||
|
#
|
||||||
|
# Summary of terms:
|
||||||
|
# - The codebase has to stay open source, whether it was modified or not
|
||||||
|
# - You can not repackage or sell the codebase
|
||||||
|
# - Acquire a commercial license to remove these terms by visiting: cal.com/sales
|
||||||
|
#
|
||||||
|
# To enable enterprise-only features, as an admin, go to /auth/setup to select your license and follow
|
||||||
|
# instructions. This environment variable is deprecated although still supported for backward compatibility.
|
||||||
|
# @see https://console.cal.com
|
||||||
|
CALCOM_LICENSE_KEY=
|
||||||
|
# ***********************************************************************************************************
|
||||||
|
|
||||||
|
# - DATABASE ************************************************************************************************
|
||||||
|
DATABASE_URL="postgresql://postgres:@localhost:5450/calendso"
|
||||||
|
# Needed to run migrations while using a connection pooler like PgBouncer
|
||||||
|
# Use the same one as DATABASE_URL if you're not using a connection pooler
|
||||||
|
DATABASE_DIRECT_URL="postgresql://postgres:@localhost:5450/calendso"
|
||||||
|
INSIGHTS_DATABASE_URL=
|
||||||
|
|
||||||
|
# Uncomment to enable a dedicated connection pool for Prisma using Prisma Data Proxy
|
||||||
|
# Cold boots will be faster and you'll be able to scale your DB independently of your app.
|
||||||
|
# @see https://www.prisma.io/docs/data-platform/data-proxy/use-data-proxy
|
||||||
|
# PRISMA_GENERATE_DATAPROXY=true
|
||||||
|
PRISMA_GENERATE_DATAPROXY=
|
||||||
|
|
||||||
|
# ***********************************************************************************************************
|
||||||
|
|
||||||
|
# - SHARED **************************************************************************************************
|
||||||
|
# Set this to http://app.cal.local:3000 if you want to enable organizations, and
|
||||||
|
# check variable ORGANIZATIONS_ENABLED at the bottom of this file
|
||||||
|
NEXT_PUBLIC_WEBAPP_URL='http://localhost:3000'
|
||||||
|
# Change to 'http://localhost:3001' if running the website simultaneously
|
||||||
|
NEXT_PUBLIC_WEBSITE_URL='http://localhost:3000'
|
||||||
|
NEXT_PUBLIC_CONSOLE_URL='http://localhost:3004'
|
||||||
|
NEXT_PUBLIC_EMBED_LIB_URL='http://localhost:3000/embed/embed.js'
|
||||||
|
|
||||||
|
# To enable SAML login, set both these variables
|
||||||
|
# @see https://github.com/calcom/cal.com/tree/main/packages/features/ee#setting-up-saml-login
|
||||||
|
# SAML_DATABASE_URL="postgresql://postgres:@localhost:5450/cal-saml"
|
||||||
|
SAML_DATABASE_URL=
|
||||||
|
# SAML_ADMINS='pro@example.com'
|
||||||
|
SAML_ADMINS=
|
||||||
|
# NEXT_PUBLIC_HOSTED_CAL_FEATURES=1
|
||||||
|
NEXT_PUBLIC_HOSTED_CAL_FEATURES=
|
||||||
|
# For additional security set to a random secret and use that value as the client_secret during the OAuth 2.0 flow.
|
||||||
|
SAML_CLIENT_SECRET_VERIFIER=
|
||||||
|
|
||||||
|
# If you use Heroku to deploy Postgres (or use self-signed certs for Postgres) then uncomment the follow line.
|
||||||
|
# @see https://devcenter.heroku.com/articles/connecting-heroku-postgres#connecting-in-node-js
|
||||||
|
# PGSSLMODE='no-verify'
|
||||||
|
PGSSLMODE=
|
||||||
|
|
||||||
|
# Define which hostnames are expected for the app to work on
|
||||||
|
ALLOWED_HOSTNAMES='"cal.com","cal.dev","cal-staging.com","cal.community","cal.local:3000","localhost:3000"'
|
||||||
|
# Reserved orgs subdomains for our own usage
|
||||||
|
RESERVED_SUBDOMAINS='"app","auth","docs","design","console","go","status","api","saml","www","matrix","developer","cal","my","team","support","security","blog","learn","admin"'
|
||||||
|
|
||||||
|
# - NEXTAUTH
|
||||||
|
# @see: https://github.com/calendso/calendso/issues/263
|
||||||
|
# @see: https://next-auth.js.org/configuration/options#nextauth_url
|
||||||
|
# Required for Vercel hosting - set NEXTAUTH_URL to equal your NEXT_PUBLIC_WEBAPP_URL
|
||||||
|
NEXTAUTH_URL='http://localhost:3000'
|
||||||
|
# @see: https://next-auth.js.org/configuration/options#nextauth_secret
|
||||||
|
# You can use: `openssl rand -base64 32` to generate one
|
||||||
|
NEXTAUTH_SECRET=
|
||||||
|
# Used for cross-domain cookie authentication
|
||||||
|
NEXTAUTH_COOKIE_DOMAIN=
|
||||||
|
|
||||||
|
# Set this to '1' if you don't want Cal to collect anonymous usage
|
||||||
|
CALCOM_TELEMETRY_DISABLED=
|
||||||
|
|
||||||
|
# ApiKey for cronjobs
|
||||||
|
CRON_API_KEY='0cc0e6c35519bba620c9360cfe3e68d0'
|
||||||
|
|
||||||
|
# Whether to automatically keep app metadata in the database in sync with the metadata/config files. When disabled, the
|
||||||
|
# sync runs in a reporting-only dry-run mode.
|
||||||
|
CRON_ENABLE_APP_SYNC=false
|
||||||
|
|
||||||
|
# Application Key for symmetric encryption and decryption
|
||||||
|
# must be 32 bytes for AES256 encryption algorithm
|
||||||
|
# You can use: `openssl rand -base64 32` to generate one
|
||||||
|
CALENDSO_ENCRYPTION_KEY=
|
||||||
|
|
||||||
|
# Intercom Config
|
||||||
|
NEXT_PUBLIC_INTERCOM_APP_ID=
|
||||||
|
|
||||||
|
# Secret to enable Intercom Identity Verification
|
||||||
|
INTERCOM_SECRET=
|
||||||
|
|
||||||
|
# Zendesk Config
|
||||||
|
NEXT_PUBLIC_ZENDESK_KEY=
|
||||||
|
|
||||||
|
# Help Scout Config
|
||||||
|
NEXT_PUBLIC_HELPSCOUT_KEY=
|
||||||
|
|
||||||
|
# Fresh Chat Config
|
||||||
|
NEXT_PUBLIC_FRESHCHAT_TOKEN=
|
||||||
|
NEXT_PUBLIC_FRESHCHAT_HOST=
|
||||||
|
|
||||||
|
# Google OAuth credentials
|
||||||
|
# To enable Login with Google you need to:
|
||||||
|
# 1. Set `GOOGLE_API_CREDENTIALS` above
|
||||||
|
# 2. Set `GOOGLE_LOGIN_ENABLED` to `true`
|
||||||
|
# When self-hosting please ensure you configure the Google integration as an Internal app so no one else can login to your instance
|
||||||
|
# @see https://support.google.com/cloud/answer/6158849#public-and-internal&zippy=%2Cpublic-and-internal-applications
|
||||||
|
GOOGLE_LOGIN_ENABLED=false
|
||||||
|
|
||||||
|
# - GOOGLE CALENDAR/MEET/LOGIN
|
||||||
|
# Needed to enable Google Calendar integration and Login with Google
|
||||||
|
# @see https://github.com/calcom/cal.com#obtaining-the-google-api-credentials
|
||||||
|
GOOGLE_API_CREDENTIALS=
|
||||||
|
|
||||||
|
# Inbox to send user feedback
|
||||||
|
SEND_FEEDBACK_EMAIL=
|
||||||
|
|
||||||
|
# Sengrid
|
||||||
|
# Used for email reminders in workflows and internal sync services
|
||||||
|
SENDGRID_API_KEY=
|
||||||
|
SENDGRID_EMAIL=
|
||||||
|
NEXT_PUBLIC_SENDGRID_SENDER_NAME=
|
||||||
|
|
||||||
|
# Sentry
|
||||||
|
# Used for capturing exceptions and logging messages
|
||||||
|
NEXT_PUBLIC_SENTRY_DSN=
|
||||||
|
|
||||||
|
# Formbricks Experience Management Integration
|
||||||
|
NEXT_PUBLIC_FORMBRICKS_HOST_URL=https://app.formbricks.com
|
||||||
|
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID=
|
||||||
|
FORMBRICKS_FEEDBACK_SURVEY_ID=
|
||||||
|
|
||||||
|
# AvatarAPI
|
||||||
|
# Used to pre-fill avatar during signup
|
||||||
|
AVATARAPI_USERNAME=
|
||||||
|
AVATARAPI_PASSWORD=
|
||||||
|
|
||||||
|
# Twilio
|
||||||
|
# Used to send SMS reminders in workflows
|
||||||
|
TWILIO_SID=
|
||||||
|
TWILIO_TOKEN=
|
||||||
|
TWILIO_MESSAGING_SID=
|
||||||
|
TWILIO_PHONE_NUMBER=
|
||||||
|
TWILIO_WHATSAPP_PHONE_NUMBER=
|
||||||
|
# For NEXT_PUBLIC_SENDER_ID only letters, numbers and spaces are allowed (max. 11 characters)
|
||||||
|
NEXT_PUBLIC_SENDER_ID=
|
||||||
|
TWILIO_VERIFY_SID=
|
||||||
|
|
||||||
|
# Set it to "1" if you need to run E2E tests locally.
|
||||||
|
NEXT_PUBLIC_IS_E2E=
|
||||||
|
|
||||||
|
# Used for internal billing system
|
||||||
|
NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE=
|
||||||
|
NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE=
|
||||||
|
NEXT_PUBLIC_IS_PREMIUM_NEW_PLAN=0
|
||||||
|
NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE=
|
||||||
|
STRIPE_TEAM_MONTHLY_PRICE_ID=
|
||||||
|
STRIPE_ORG_MONTHLY_PRICE_ID=
|
||||||
|
STRIPE_WEBHOOK_SECRET=
|
||||||
|
STRIPE_WEBHOOK_SECRET_APPS=
|
||||||
|
STRIPE_PRIVATE_KEY=
|
||||||
|
STRIPE_CLIENT_ID=
|
||||||
|
|
||||||
|
|
||||||
|
# Use for internal Public API Keys and optional
|
||||||
|
API_KEY_PREFIX=cal_
|
||||||
|
# ***********************************************************************************************************
|
||||||
|
|
||||||
|
# - E-MAIL SETTINGS *****************************************************************************************
|
||||||
|
# Cal uses nodemailer (@see https://nodemailer.com/about/) to provide email sending. As such we are trying to
|
||||||
|
# allow access to the nodemailer transports from the .env file. E-mail templates are accessible within lib/emails/
|
||||||
|
# Configures the global From: header whilst sending emails.
|
||||||
|
EMAIL_FROM='notifications@yourselfhostedcal.com'
|
||||||
|
EMAIL_FROM_NAME='Cal.com'
|
||||||
|
|
||||||
|
# Configure SMTP settings (@see https://nodemailer.com/smtp/).
|
||||||
|
# Configuration to receive emails locally (mailhog)
|
||||||
|
EMAIL_SERVER_HOST='localhost'
|
||||||
|
EMAIL_SERVER_PORT=1025
|
||||||
|
|
||||||
|
# Note: The below configuration for Office 365 has been verified to work.
|
||||||
|
# EMAIL_SERVER_HOST='smtp.office365.com'
|
||||||
|
# EMAIL_SERVER_PORT=587
|
||||||
|
# EMAIL_SERVER_USER='<office365_emailAddress>'
|
||||||
|
# Keep in mind that if you have 2FA enabled, you will need to provision an App Password.
|
||||||
|
# EMAIL_SERVER_PASSWORD='<office365_password>'
|
||||||
|
|
||||||
|
# The following configuration for Gmail has been verified to work.
|
||||||
|
# EMAIL_SERVER_HOST='smtp.gmail.com'
|
||||||
|
# EMAIL_SERVER_PORT=465
|
||||||
|
# EMAIL_SERVER_USER='<gmail_emailAddress>'
|
||||||
|
## You will need to provision an App Password.
|
||||||
|
## @see https://support.google.com/accounts/answer/185833
|
||||||
|
# EMAIL_SERVER_PASSWORD='<gmail_app_password>'
|
||||||
|
|
||||||
|
# Used for E2E for email testing
|
||||||
|
# Set it to "1" if you need to email checks in E2E tests locally
|
||||||
|
# Make sure to run mailhog container manually or with `yarn dx`
|
||||||
|
E2E_TEST_MAILHOG_ENABLED=
|
||||||
|
|
||||||
|
# Resend
|
||||||
|
# Send transactional email using resend
|
||||||
|
# RESEND_API_KEY=
|
||||||
|
|
||||||
|
# **********************************************************************************************************
|
||||||
|
|
||||||
|
# Cloudflare Turnstile
|
||||||
|
NEXT_PUBLIC_CLOUDFLARE_SITEKEY=
|
||||||
|
CLOUDFLARE_TURNSTILE_SECRET=
|
||||||
|
|
||||||
|
# Set the following value to true if you wish to enable Team Impersonation
|
||||||
|
NEXT_PUBLIC_TEAM_IMPERSONATION=false
|
||||||
|
|
||||||
|
# Close.com internal CRM
|
||||||
|
CLOSECOM_API_KEY=
|
||||||
|
|
||||||
|
# Sendgrid internal sync service
|
||||||
|
SENDGRID_SYNC_API_KEY=
|
||||||
|
|
||||||
|
# Change your Brand
|
||||||
|
NEXT_PUBLIC_APP_NAME="Cal.com"
|
||||||
|
NEXT_PUBLIC_SUPPORT_MAIL_ADDRESS="help@cal.com"
|
||||||
|
NEXT_PUBLIC_COMPANY_NAME="Cal.com, Inc."
|
||||||
|
# Set this to true in to disable new signups
|
||||||
|
# NEXT_PUBLIC_DISABLE_SIGNUP=true
|
||||||
|
NEXT_PUBLIC_DISABLE_SIGNUP=
|
||||||
|
|
||||||
|
# Set this to 'non-strict' to enable CSP for support pages. 'strict' isn't supported yet. Also, check the README for details.
|
||||||
|
# Content Security Policy
|
||||||
|
CSP_POLICY=
|
||||||
|
|
||||||
|
# Vercel Edge Config
|
||||||
|
EDGE_CONFIG=
|
||||||
|
|
||||||
|
NEXT_PUBLIC_MINUTES_TO_BOOK=5 # Minutes
|
||||||
|
NEXT_PUBLIC_BOOKER_NUMBER_OF_DAYS_TO_LOAD=0 # Override the booker to only load X number of days worth of data
|
||||||
|
|
||||||
|
# Control time intervals on a user's Schedule availability
|
||||||
|
NEXT_PUBLIC_AVAILABILITY_SCHEDULE_INTERVAL=
|
||||||
|
|
||||||
|
# - ORGANIZATIONS *******************************************************************************************
|
||||||
|
# Enable Organizations non-prod domain setup, works in combination with organizations feature flag
|
||||||
|
# This is mainly needed locally, because for orgs to work a full domain name needs to point
|
||||||
|
# to the app, i.e. app.cal.local instead of using localhost, which is very disruptive
|
||||||
|
#
|
||||||
|
# This variable should only be set to 1 or true if you are in a non-prod environment and you want to
|
||||||
|
# use organizations
|
||||||
|
ORGANIZATIONS_ENABLED=
|
||||||
|
|
||||||
|
# This variable should only be set to 1 or true if you want to autolink external provider sing-ups with
|
||||||
|
# existing organizations based on email domain address
|
||||||
|
ORGANIZATIONS_AUTOLINK=
|
||||||
|
|
||||||
|
# Vercel Config to create subdomains for organizations
|
||||||
|
# Get it from https://vercel.com/<TEAM_OR_USER_NAME>/<PROJECT_SLUG>/settings
|
||||||
|
PROJECT_ID_VERCEL=
|
||||||
|
# Get it from: https://vercel.com/teams/<TEAM_SLUG>/settings
|
||||||
|
TEAM_ID_VERCEL=
|
||||||
|
# Get it from: https://vercel.com/account/tokens
|
||||||
|
AUTH_BEARER_TOKEN_VERCEL=
|
||||||
|
# Add the main domain that you want to use for testing vercel domain management for organizations. This is necessary because WEBAPP_URL of local isn't a valid public domain
|
||||||
|
# Would create org1.example.com for an org with slug org1
|
||||||
|
# LOCAL_TESTING_DOMAIN_VERCEL="example.com"
|
||||||
|
|
||||||
|
## Set it to 1 if you use cloudflare to manage your DNS and would like us to manage the DNS for you for organizations
|
||||||
|
# CLOUDFLARE_DNS=1
|
||||||
|
## Get it from: https://dash.cloudflare.com/profile/api-tokens. Select Edit Zone template and choose a zone(your domain)
|
||||||
|
# AUTH_BEARER_TOKEN_CLOUDFLARE=
|
||||||
|
## Zone ID can be found in the Overview tab of your domain in Cloudflare
|
||||||
|
# CLOUDFLARE_ZONE_ID=
|
||||||
|
## It should usually work with the default value. This is the DNS CNAME record content to point to Vercel domain
|
||||||
|
# CLOUDFLARE_VERCEL_CNAME=cname.vercel-dns.com
|
||||||
|
|
||||||
|
# - APPLE CALENDAR
|
||||||
|
# Used for E2E tests on Apple Calendar
|
||||||
|
E2E_TEST_APPLE_CALENDAR_EMAIL=""
|
||||||
|
E2E_TEST_APPLE_CALENDAR_PASSWORD=""
|
||||||
|
|
||||||
|
# - CALCOM QA ACCOUNT
|
||||||
|
# Used for E2E tests on Cal.com that require 3rd party integrations
|
||||||
|
E2E_TEST_CALCOM_QA_EMAIL="qa@example.com"
|
||||||
|
# Replace with your own password
|
||||||
|
E2E_TEST_CALCOM_QA_PASSWORD="password"
|
||||||
|
E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS=
|
||||||
|
E2E_TEST_CALCOM_GCAL_KEYS=
|
||||||
|
|
||||||
|
# - APP CREDENTIAL SYNC ***********************************************************************************
|
||||||
|
# Used for self-hosters that are implementing Cal.com into their applications that already have certain integrations
|
||||||
|
# Under settings/admin/apps ensure that all app secrets are set the same as the parent application
|
||||||
|
# You can use: `openssl rand -base64 32` to generate one
|
||||||
|
CALCOM_CREDENTIAL_SYNC_SECRET=""
|
||||||
|
# This is the header name that will be used to verify the webhook secret. Should be in lowercase
|
||||||
|
CALCOM_CREDENTIAL_SYNC_HEADER_NAME="calcom-credential-sync-secret"
|
||||||
|
# This the endpoint from which the token is fetched
|
||||||
|
CALCOM_CREDENTIAL_SYNC_ENDPOINT=""
|
||||||
|
# Key should match on Cal.com and your application
|
||||||
|
# must be 24 bytes for AES256 encryption algorithm
|
||||||
|
# You can use: `openssl rand -base64 24` to generate one
|
||||||
|
CALCOM_APP_CREDENTIAL_ENCRYPTION_KEY=""
|
||||||
|
|
||||||
|
# - OIDC E2E TEST *******************************************************************************************
|
||||||
|
|
||||||
|
# Ensure this ADMIN EMAIL is present in the SAML_ADMINS list
|
||||||
|
E2E_TEST_SAML_ADMIN_EMAIL=
|
||||||
|
E2E_TEST_SAML_ADMIN_PASSWORD=
|
||||||
|
|
||||||
|
E2E_TEST_OIDC_CLIENT_ID=
|
||||||
|
E2E_TEST_OIDC_CLIENT_SECRET=
|
||||||
|
E2E_TEST_OIDC_PROVIDER_DOMAIN=
|
||||||
|
|
||||||
|
E2E_TEST_OIDC_USER_EMAIL=
|
||||||
|
E2E_TEST_OIDC_USER_PASSWORD=
|
||||||
|
|
||||||
|
# ***********************************************************************************************************
|
||||||
|
|
||||||
|
# provide a value between 0 and 100 to ensure the percentage of traffic
|
||||||
|
# redirected from the legacy to the future pages
|
||||||
|
AB_TEST_BUCKET_PROBABILITY=50
|
||||||
|
# whether we redirect to the future/event-types from event-types or not
|
||||||
|
APP_ROUTER_EVENT_TYPES_ENABLED=0
|
||||||
|
APP_ROUTER_SETTINGS_ADMIN_ENABLED=0
|
||||||
|
APP_ROUTER_APPS_INSTALLED_CATEGORY_ENABLED=0
|
||||||
|
APP_ROUTER_APPS_SLUG_ENABLED=0
|
||||||
|
APP_ROUTER_APPS_SLUG_SETUP_ENABLED=0
|
||||||
|
# whether we redirect to the future/apps/categories from /apps/categories or not
|
||||||
|
APP_ROUTER_APPS_CATEGORIES_ENABLED=0
|
||||||
|
# whether we redirect to the future/apps/categories/[category] from /apps/categories/[category] or not
|
||||||
|
APP_ROUTER_APPS_CATEGORIES_CATEGORY_ENABLED=0
|
||||||
|
APP_ROUTER_BOOKINGS_STATUS_ENABLED=0
|
||||||
|
APP_ROUTER_WORKFLOWS_ENABLED=0
|
||||||
|
APP_ROUTER_SETTINGS_TEAMS_ENABLED=0
|
||||||
|
APP_ROUTER_GETTING_STARTED_STEP_ENABLED=0
|
||||||
|
APP_ROUTER_APPS_ENABLED=0
|
||||||
|
APP_ROUTER_VIDEO_ENABLED=0
|
||||||
|
APP_ROUTER_TEAMS_ENABLED=0
|
||||||
|
|
||||||
|
# disable setry server source maps
|
||||||
|
SENTRY_DISABLE_SERVER_WEBPACK_PLUGIN=1
|
||||||
|
|
||||||
|
# api v2
|
||||||
|
NEXT_PUBLIC_API_V2_URL="http://localhost:5555/api/v2"
|
||||||
|
|
||||||
|
# Tasker features
|
||||||
|
TASKER_ENABLE_WEBHOOKS=0
|
||||||
|
TASKER_ENABLE_EMAILS=0
|
||||||
|
|
||||||
|
# Ratelimiting via unkey
|
||||||
|
UNKEY_ROOT_KEY=
|
||||||
|
|
||||||
|
|
||||||
|
# Used for Cal.ai Enterprise Voice AI Agents
|
||||||
|
# https://retellai.com
|
||||||
|
RETELL_AI_KEY=
|
||||||
|
|
||||||
|
# Used to disallow emails as being added as guests on bookings
|
||||||
|
BLACKLISTED_GUEST_EMAILS=
|
9
calcom/.eslintignore
Normal file
9
calcom/.eslintignore
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
node_modules
|
||||||
|
apps/api/v2/dist
|
||||||
|
packages/platform/**/dist/*
|
||||||
|
**/**/node_modules
|
||||||
|
**/**/.next
|
||||||
|
**/**/public
|
||||||
|
packages/prisma/zod
|
||||||
|
apps/web/public/embed
|
||||||
|
packages/ui/components/icon/dynamicIconImports.tsx
|
1
calcom/.eslintrc.js
Normal file
1
calcom/.eslintrc.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
module.exports = require("./packages/config/eslint-preset");
|
81
calcom/.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
81
calcom/.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
name: Bug report
|
||||||
|
description: "Please make sure you have checked for any duplicate issues."
|
||||||
|
title: "(bug)"
|
||||||
|
labels: ["🐛 bug"]
|
||||||
|
assignees: []
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
id: issue-summary
|
||||||
|
attributes:
|
||||||
|
label: Issue Summary
|
||||||
|
description: A summary of the issue. This needs to be a clear detailed-rich summary.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: steps-to-reproduce
|
||||||
|
attributes:
|
||||||
|
label: Steps to Reproduce
|
||||||
|
value: |
|
||||||
|
1. (for example) Went to ...
|
||||||
|
2. Clicked on...
|
||||||
|
3. ...
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: expected-behavior
|
||||||
|
attributes:
|
||||||
|
label: Expected behavior
|
||||||
|
description: A clear and concise description of what you expected to happen.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: other-information
|
||||||
|
attributes:
|
||||||
|
label: Other information
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: screenshots
|
||||||
|
attributes:
|
||||||
|
label: Screenshots
|
||||||
|
description: If applicable, add screenshots to help explain your problem.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: checkboxes
|
||||||
|
id: environment
|
||||||
|
attributes:
|
||||||
|
label: Environment
|
||||||
|
options:
|
||||||
|
- label: app.cal.com
|
||||||
|
- label: Self-hosted Cal
|
||||||
|
- type: textarea
|
||||||
|
id: desktop-version
|
||||||
|
attributes:
|
||||||
|
label: Desktop (please complete the following information)
|
||||||
|
description: |
|
||||||
|
examples:
|
||||||
|
- **OS**: [e.g. iOS]
|
||||||
|
- **Browser**: [e.g. chrome, safari]
|
||||||
|
- **Version**: [e.g. 22]
|
||||||
|
value: |
|
||||||
|
- OS:
|
||||||
|
- Node:
|
||||||
|
- npm:
|
||||||
|
render: markdown
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: markdown
|
||||||
|
id: nodejs-version
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
#### Node.JS version
|
||||||
|
|
||||||
|
[e.g. v18.15.0]
|
||||||
|
- type: markdown
|
||||||
|
id: anything-else
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
#### Anything else?
|
||||||
|
|
||||||
|
- Screen recording, console logs, network requests: You can make a recording with [Loom](https://www.loom.com).
|
||||||
|
- Anything else that you think could be an issue?
|
5
calcom/.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
calcom/.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: Questions
|
||||||
|
url: https://github.com/calcom/cal.com/discussions
|
||||||
|
about: Need help selfhosting or ask a general question about the project? Open a discussion
|
41
calcom/.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
41
calcom/.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: Feature request
|
||||||
|
description: "Suggest an idea for this project \U0001F680"
|
||||||
|
title: ""
|
||||||
|
labels: ["✨ feature", "🚨 needs approval"],
|
||||||
|
assignees: []
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
id: problem-description
|
||||||
|
attributes:
|
||||||
|
label: Is your feature request related to a problem? Please describe.
|
||||||
|
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: solution-description
|
||||||
|
attributes:
|
||||||
|
label: Describe the solution you'd like
|
||||||
|
description: A clear and concise description of what you want to happen.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: alternate-solution-description
|
||||||
|
attributes:
|
||||||
|
label: Describe alternatives you've considered
|
||||||
|
description: A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: additional-context
|
||||||
|
attributes:
|
||||||
|
label: Additional context
|
||||||
|
description: Add any other context or screenshots about the feature request here.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: markdown
|
||||||
|
id: cal-info
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
### How we code at Cal.com
|
||||||
|
|
||||||
|
- Follow Best Practices lined out in our [Contributor Docs](https://github.com/calcom/cal.com/blob/main/CONTRIBUTING.md)
|
34
calcom/.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
34
calcom/.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
## What does this PR do?
|
||||||
|
|
||||||
|
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
|
||||||
|
|
||||||
|
- Fixes #XXXX (GitHub issue number)
|
||||||
|
- Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)
|
||||||
|
|
||||||
|
<!-- Please provide a loom video for visual changes to speed up reviews
|
||||||
|
Loom Video: https://www.loom.com/
|
||||||
|
-->
|
||||||
|
|
||||||
|
## Mandatory Tasks (DO NOT REMOVE)
|
||||||
|
|
||||||
|
- [ ] I have self-reviewed the code (A decent size PR without self-review might be rejected).
|
||||||
|
- [ ] I have added a Docs issue [here](https://github.com/calcom/docs/issues/new) if this PR makes changes that would require a [documentation change](https://docs.cal.com). If N/A, write N/A here and check the checkbox.
|
||||||
|
- [ ] I confirm automated tests are in place that prove my fix is effective or that my feature works.
|
||||||
|
|
||||||
|
## How should this be tested?
|
||||||
|
|
||||||
|
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Write details that help to start the tests -->
|
||||||
|
|
||||||
|
- Are there environment variables that should be set?
|
||||||
|
- What are the minimal test data to have?
|
||||||
|
- What is expected (happy path) to have (input and output)?
|
||||||
|
- Any other important info that could help to test that PR
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
|
||||||
|
<!-- Remove bullet points below that don't apply to you -->
|
||||||
|
|
||||||
|
- I haven't read the [contributing guide](https://github.com/calcom/cal.com/blob/main/CONTRIBUTING.md)
|
||||||
|
- My code doesn't follow the style guidelines of this project
|
||||||
|
- I haven't commented my code, particularly in hard-to-understand areas
|
||||||
|
- I haven't checked if my changes generate no new warnings
|
35
calcom/.github/actions/cache-build/action.yml
vendored
Normal file
35
calcom/.github/actions/cache-build/action.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: Cache production build binaries
|
||||||
|
description: "Cache or restore if necessary"
|
||||||
|
inputs:
|
||||||
|
node_version:
|
||||||
|
required: false
|
||||||
|
default: v18.x
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Cache production build
|
||||||
|
uses: buildjet/cache@v4
|
||||||
|
id: cache-build
|
||||||
|
env:
|
||||||
|
# WARN: Don't touch this cache key. Currently github.sha refers to the latest commit in main
|
||||||
|
# and not the branch that's attempting to merge to main, which causes CI errors when merged
|
||||||
|
# to main.
|
||||||
|
# TODO: Fix this problem if intending to modify this cache key.
|
||||||
|
cache-name: prod-build
|
||||||
|
key-1: ${{ inputs.node_version }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
key-2: ${{ hashFiles('apps/**/**.[jt]s', 'apps/**/**.[jt]sx', 'packages/**/**.[jt]s', 'packages/**/**.[jt]sx', '!**/node_modules') }}
|
||||||
|
key-3: ${{ github.event.pull_request.number || github.ref }}
|
||||||
|
key-4: ${{ github.sha }}
|
||||||
|
key-5: ${{ github.event.pull_request.head.sha }}
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{ github.workspace }}/apps/web/.next
|
||||||
|
${{ github.workspace }}/apps/web/public/embed
|
||||||
|
**/.turbo/**
|
||||||
|
**/dist/**
|
||||||
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}-${{ env.key-4 }}-${{ env.key-5 }}
|
||||||
|
- run: |
|
||||||
|
export NODE_OPTIONS="--max_old_space_size=8192"
|
||||||
|
yarn build
|
||||||
|
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||||
|
shell: bash
|
44
calcom/.github/actions/cache-db/action.yml
vendored
Normal file
44
calcom/.github/actions/cache-db/action.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
name: Cache database between jobs
|
||||||
|
description: "Cache or restore if necessary"
|
||||||
|
inputs:
|
||||||
|
DATABASE_URL:
|
||||||
|
required: false
|
||||||
|
default: "postgresql://postgres:postgres@localhost:5432/calendso"
|
||||||
|
path:
|
||||||
|
required: false
|
||||||
|
default: "backups/backup.sql"
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Cache database
|
||||||
|
id: cache-db
|
||||||
|
uses: buildjet/cache@v4
|
||||||
|
env:
|
||||||
|
cache-name: cache-db
|
||||||
|
key-1: ${{ hashFiles('packages/prisma/schema.prisma', 'packages/prisma/migrations/**/**.sql', 'packages/prisma/*.ts') }}
|
||||||
|
key-2: ${{ github.event.pull_request.number || github.ref }}
|
||||||
|
key-3: ${{ github.event.pull_request.head.sha }}
|
||||||
|
DATABASE_URL: ${{ inputs.DATABASE_URL }}
|
||||||
|
DATABASE_DIRECT_URL: ${{ inputs.DATABASE_URL }}
|
||||||
|
E2E_TEST_CALCOM_QA_EMAIL: ${{ inputs.E2E_TEST_CALCOM_QA_EMAIL }}
|
||||||
|
E2E_TEST_CALCOM_QA_PASSWORD: ${{ inputs.E2E_TEST_CALCOM_QA_PASSWORD }}
|
||||||
|
E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS: ${{ inputs.E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS }}
|
||||||
|
with:
|
||||||
|
path: ${{ inputs.path }}
|
||||||
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}
|
||||||
|
- run: echo ${{ env.E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS }} && yarn db-seed
|
||||||
|
if: steps.cache-db.outputs.cache-hit != 'true'
|
||||||
|
shell: bash
|
||||||
|
- name: Postgres Dump Backup
|
||||||
|
if: steps.cache-db.outputs.cache-hit != 'true'
|
||||||
|
uses: tj-actions/pg-dump@v2.3
|
||||||
|
with:
|
||||||
|
database_url: ${{ inputs.DATABASE_URL }}
|
||||||
|
path: ${{ inputs.path }}
|
||||||
|
options: "-O"
|
||||||
|
- name: Postgres Backup Restore
|
||||||
|
if: steps.cache-db.outputs.cache-hit == 'true'
|
||||||
|
uses: tj-actions/pg-restore@v4.5
|
||||||
|
with:
|
||||||
|
database_url: ${{ inputs.DATABASE_URL }}
|
||||||
|
backup_file: ${{ inputs.path }}
|
10
calcom/.github/actions/dangerous-git-checkout/action.yml
vendored
Normal file
10
calcom/.github/actions/dangerous-git-checkout/action.yml
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
name: Dangerous git Checkout
|
||||||
|
description: "Git Checkout from PR code so we can run checks from forks"
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
fetch-depth: 2
|
71
calcom/.github/actions/yarn-install/action.yml
vendored
Normal file
71
calcom/.github/actions/yarn-install/action.yml
vendored
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
########################################################################################
|
||||||
|
# "yarn install" composite action for yarn 2/3/4+ and "nodeLinker: node-modules" #
|
||||||
|
#--------------------------------------------------------------------------------------#
|
||||||
|
# Cache: #
|
||||||
|
# - Downloaded zip archive (multi-arch, preserved across yarn.lock changes) #
|
||||||
|
# - Yarn install state (discarded on yarn.lock changes) #
|
||||||
|
# References: #
|
||||||
|
# - bench: https://gist.github.com/belgattitude/0ecd26155b47e7be1be6163ecfbb0f0b #
|
||||||
|
# - vs @setup/node: https://github.com/actions/setup-node/issues/325 #
|
||||||
|
########################################################################################
|
||||||
|
|
||||||
|
name: "Yarn install"
|
||||||
|
description: "Run yarn install with node_modules linker and cache enabled"
|
||||||
|
inputs:
|
||||||
|
node_version:
|
||||||
|
required: false
|
||||||
|
default: v18.x
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Use Node ${{ inputs.node_version }}
|
||||||
|
uses: buildjet/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: ${{ inputs.node_version }}
|
||||||
|
- name: Expose yarn config as "$GITHUB_OUTPUT"
|
||||||
|
id: yarn-config
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "CACHE_FOLDER=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
# Yarn rotates the downloaded cache archives, @see https://github.com/actions/setup-node/issues/325
|
||||||
|
# Yarn cache is also reusable between arch and os.
|
||||||
|
- name: Restore yarn cache
|
||||||
|
uses: buildjet/cache@v4
|
||||||
|
id: yarn-download-cache
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-config.outputs.CACHE_FOLDER }}
|
||||||
|
key: yarn-download-cache-${{ hashFiles('yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
yarn-download-cache-
|
||||||
|
|
||||||
|
# Invalidated on yarn.lock changes
|
||||||
|
- name: Restore node_modules
|
||||||
|
id: yarn-nm-cache
|
||||||
|
uses: buildjet/cache@v4
|
||||||
|
with:
|
||||||
|
path: "**/node_modules/"
|
||||||
|
key: ${{ runner.os }}-yarn-nm-cache-${{ hashFiles('yarn.lock', '.yarnrc.yml') }}
|
||||||
|
|
||||||
|
# Invalidated on yarn.lock changes
|
||||||
|
- name: Restore yarn install state
|
||||||
|
id: yarn-install-state-cache
|
||||||
|
uses: buildjet/cache@v4
|
||||||
|
with:
|
||||||
|
path: .yarn/ci-cache/
|
||||||
|
key: ${{ runner.os }}-yarn-install-state-cache-${{ hashFiles('yarn.lock', '.yarnrc.yml') }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
yarn install --inline-builds
|
||||||
|
yarn prisma generate
|
||||||
|
env:
|
||||||
|
# CI optimizations. Overrides yarnrc.yml options (or their defaults) in the CI action.
|
||||||
|
YARN_ENABLE_IMMUTABLE_INSTALLS: "false" # So it doesn't try to remove our private submodule deps
|
||||||
|
YARN_ENABLE_GLOBAL_CACHE: "false" # Use local cache folder to keep downloaded archives
|
||||||
|
YARN_INSTALL_STATE_PATH: .yarn/ci-cache/install-state.gz # Very small speedup when lock does not change
|
||||||
|
YARN_NM_MODE: "hardlinks-local" # Reduce node_modules size
|
||||||
|
# Other environment variables
|
||||||
|
HUSKY: "0" # By default do not run HUSKY install
|
19
calcom/.github/actions/yarn-playwright-install/action.yml
vendored
Normal file
19
calcom/.github/actions/yarn-playwright-install/action.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
name: Install playwright binaries
|
||||||
|
description: "Install playwright, cache and restore if necessary"
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Cache playwright binaries
|
||||||
|
id: playwright-cache
|
||||||
|
uses: buildjet/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/Library/Caches/ms-playwright
|
||||||
|
~/.cache/ms-playwright
|
||||||
|
${{ github.workspace }}/node_modules/playwright
|
||||||
|
key: cache-playwright-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: cache-playwright-
|
||||||
|
- name: Yarn playwright install
|
||||||
|
shell: bash
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn playwright install
|
10
calcom/.github/labeler.yml
vendored
Normal file
10
calcom/.github/labeler.yml
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
"❗️ migrations":
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- packages/prisma/migrations/**/migration.sql
|
||||||
|
|
||||||
|
"❗️ .env changes":
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- .env.example
|
||||||
|
- .env.appStore.example
|
18
calcom/.github/matchers/tsc-absolute.json
vendored
Normal file
18
calcom/.github/matchers/tsc-absolute.json
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"owner": "tsc-absolute",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "(?:^|\\s)([^\\s].*)[\\(:](\\d+)[,:](\\d+)(?:\\):\\s+|\\s+-\\s+)(error|warning|info)\\s+(TS\\d+)\\s*:\\s*(.*)$",
|
||||||
|
"file": 1,
|
||||||
|
"line": 2,
|
||||||
|
"column": 3,
|
||||||
|
"severity": 4,
|
||||||
|
"code": 5,
|
||||||
|
"message": 6
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
85
calcom/.github/workflows/all-checks.yml
vendored
Normal file
85
calcom/.github/workflows/all-checks.yml
vendored
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
name: All checks
|
||||||
|
|
||||||
|
on:
|
||||||
|
merge_group:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
type-check:
|
||||||
|
name: Type check
|
||||||
|
uses: ./.github/workflows/check-types.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
lint:
|
||||||
|
name: Linters
|
||||||
|
uses: ./.github/workflows/lint.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
unit-test:
|
||||||
|
name: Tests
|
||||||
|
uses: ./.github/workflows/unit-tests.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build-api-v1:
|
||||||
|
name: Production builds
|
||||||
|
uses: ./.github/workflows/api-v1-production-build.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build-api-v2:
|
||||||
|
name: Production builds
|
||||||
|
uses: ./.github/workflows/api-v2-production-build.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Production builds
|
||||||
|
uses: ./.github/workflows/production-build-without-database.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
integration-test:
|
||||||
|
name: Tests
|
||||||
|
needs: [lint, build, build-api-v1, build-api-v2]
|
||||||
|
uses: ./.github/workflows/integration-tests.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
e2e:
|
||||||
|
name: Tests
|
||||||
|
needs: [lint, build, build-api-v1, build-api-v2]
|
||||||
|
uses: ./.github/workflows/e2e.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
e2e-app-store:
|
||||||
|
name: Tests
|
||||||
|
needs: [lint, build, build-api-v1, build-api-v2]
|
||||||
|
uses: ./.github/workflows/e2e-app-store.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
e2e-embed:
|
||||||
|
name: Tests
|
||||||
|
needs: [lint, build, build-api-v1, build-api-v2]
|
||||||
|
uses: ./.github/workflows/e2e-embed.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
e2e-embed-react:
|
||||||
|
name: Tests
|
||||||
|
needs: [lint, build, build-api-v1, build-api-v2]
|
||||||
|
uses: ./.github/workflows/e2e-embed-react.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
analyze:
|
||||||
|
name: Analyze Build
|
||||||
|
needs: [build]
|
||||||
|
uses: ./.github/workflows/nextjs-bundle-analysis.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
required:
|
||||||
|
needs: [lint, type-check, unit-test, integration-test, build, build-api-v1, build-api-v2, e2e, e2e-embed, e2e-embed-react, e2e-app-store]
|
||||||
|
if: always()
|
||||||
|
runs-on: buildjet-2vcpu-ubuntu-2204
|
||||||
|
steps:
|
||||||
|
- name: fail if conditional jobs failed
|
||||||
|
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')
|
||||||
|
run: exit 1
|
93
calcom/.github/workflows/api-v1-production-build.yml
vendored
Normal file
93
calcom/.github/workflows/api-v1-production-build.yml
vendored
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
name: Production Builds
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
env:
|
||||||
|
ALLOWED_HOSTNAMES: ${{ vars.CI_ALLOWED_HOSTNAMES }}
|
||||||
|
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
|
||||||
|
DATABASE_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DATABASE_DIRECT_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_EMAIL: ${{ secrets.E2E_TEST_APPLE_CALENDAR_EMAIL }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_PASSWORD: ${{ secrets.E2E_TEST_APPLE_CALENDAR_PASSWORD }}
|
||||||
|
E2E_TEST_CALCOM_QA_EMAIL: ${{ secrets.E2E_TEST_CALCOM_QA_EMAIL }}
|
||||||
|
E2E_TEST_CALCOM_QA_PASSWORD: ${{ secrets.E2E_TEST_CALCOM_QA_PASSWORD }}
|
||||||
|
E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS: ${{ secrets.E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS }}
|
||||||
|
E2E_TEST_CALCOM_GCAL_KEYS: ${{ secrets.E2E_TEST_CALCOM_GCAL_KEYS }}
|
||||||
|
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
|
||||||
|
GOOGLE_LOGIN_ENABLED: ${{ vars.CI_GOOGLE_LOGIN_ENABLED }}
|
||||||
|
NEXTAUTH_SECRET: ${{ secrets.CI_NEXTAUTH_SECRET }}
|
||||||
|
NEXTAUTH_URL: ${{ secrets.CI_NEXTAUTH_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_ROOT_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_ROOT_URL }}
|
||||||
|
NEXT_PUBLIC_IS_E2E: ${{ vars.CI_NEXT_PUBLIC_IS_E2E }}
|
||||||
|
NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED: ${{ vars.CI_NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED }}
|
||||||
|
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
||||||
|
NEXT_PUBLIC_WEBAPP_URL: ${{ vars.CI_NEXT_PUBLIC_WEBAPP_URL }}
|
||||||
|
NEXT_PUBLIC_WEBSITE_URL: ${{ vars.CI_NEXT_PUBLIC_WEBSITE_URL }}
|
||||||
|
PAYMENT_FEE_FIXED: ${{ vars.CI_PAYMENT_FEE_FIXED }}
|
||||||
|
PAYMENT_FEE_PERCENTAGE: ${{ vars.CI_PAYMENT_FEE_PERCENTAGE }}
|
||||||
|
SAML_ADMINS: ${{ secrets.CI_SAML_ADMINS }}
|
||||||
|
SAML_DATABASE_URL: ${{ secrets.CI_SAML_DATABASE_URL }}
|
||||||
|
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
||||||
|
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
|
||||||
|
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
|
||||||
|
SENDGRID_API_KEY: ${{ secrets.CI_SENDGRID_API_KEY }}
|
||||||
|
SENDGRID_EMAIL: ${{ secrets.CI_SENDGRID_EMAIL }}
|
||||||
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
|
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build API v1
|
||||||
|
runs-on: buildjet-4vcpu-ubuntu-2204
|
||||||
|
timeout-minutes: 30
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:13
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: calendso
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: ./.github/actions/yarn-install
|
||||||
|
- uses: ./.github/actions/cache-db
|
||||||
|
- name: Cache API v1 production build
|
||||||
|
uses: buildjet/cache@v4
|
||||||
|
id: cache-api-v1-build
|
||||||
|
env:
|
||||||
|
cache-name: api-v1-build
|
||||||
|
key-1: ${{ hashFiles('yarn.lock') }}
|
||||||
|
key-2: ${{ hashFiles('apps/api/v1/**.[jt]s', 'apps/api/v1/**.[jt]sx', '!**/node_modules') }}
|
||||||
|
key-3: ${{ github.event.pull_request.number || github.ref }}
|
||||||
|
# Ensures production-build.yml will always be fresh
|
||||||
|
key-4: ${{ github.sha }}
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{ github.workspace }}/apps/api/v1/.next
|
||||||
|
**/.turbo/**
|
||||||
|
**/dist/**
|
||||||
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}-${{ env.key-4 }}
|
||||||
|
- run: |
|
||||||
|
export NODE_OPTIONS="--max_old_space_size=8192"
|
||||||
|
if [ ${{ steps.cache-api-v1-build.outputs.cache-hit }} == 'true' ]; then
|
||||||
|
echo "Cache hit for API v1 build. Skipping build."
|
||||||
|
else
|
||||||
|
yarn turbo run build --filter=@calcom/api...
|
||||||
|
fi
|
||||||
|
shell: bash
|
62
calcom/.github/workflows/api-v2-production-build.yml
vendored
Normal file
62
calcom/.github/workflows/api-v2-production-build.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
name: Production Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
env:
|
||||||
|
DATABASE_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DATABASE_DIRECT_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build API v2
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
runs-on: buildjet-4vcpu-ubuntu-2204
|
||||||
|
timeout-minutes: 30
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:13
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: calendso
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: ./.github/actions/yarn-install
|
||||||
|
- name: Cache API v2 production build
|
||||||
|
uses: buildjet/cache@v4
|
||||||
|
id: cache-api-v2-build
|
||||||
|
env:
|
||||||
|
cache-name: api-v2-build
|
||||||
|
key-1: ${{ hashFiles('yarn.lock') }}
|
||||||
|
key-2: ${{ hashFiles('apps/api/v2/**.[jt]s', 'apps/api/v2/**.[jt]sx', '!**/node_modules') }}
|
||||||
|
key-3: ${{ github.event.pull_request.number || github.ref }}
|
||||||
|
# Ensures production-build.yml will always be fresh
|
||||||
|
key-4: ${{ github.sha }}
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
**/dist/**
|
||||||
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}-${{ env.key-4 }}
|
||||||
|
- run: |
|
||||||
|
export NODE_OPTIONS="--max_old_space_size=8192"
|
||||||
|
if [ ${{ steps.cache-api-v2-build.outputs.cache-hit }} == 'true' ]; then
|
||||||
|
echo "Cache hit for API v2 build. Skipping build."
|
||||||
|
else
|
||||||
|
yarn workspace @calcom/api-v2 run generate-schemas
|
||||||
|
rm -rf apps/api/v2/node_modules
|
||||||
|
yarn install
|
||||||
|
yarn workspace @calcom/api-v2 run build
|
||||||
|
fi
|
||||||
|
shell: bash
|
33
calcom/.github/workflows/cache-clean.yml
vendored
Normal file
33
calcom/.github/workflows/cache-clean.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: cleanup caches by a branch
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cleanup:
|
||||||
|
runs-on: buildjet-2vcpu-ubuntu-2204
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Cleanup
|
||||||
|
run: |
|
||||||
|
gh extension install actions/gh-actions-cache
|
||||||
|
|
||||||
|
REPO=${{ github.repository }}
|
||||||
|
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
|
||||||
|
|
||||||
|
echo "Fetching list of cache key"
|
||||||
|
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
|
||||||
|
|
||||||
|
## Setting this to not fail the workflow while deleting cache keys.
|
||||||
|
set +e
|
||||||
|
echo "Deleting caches..."
|
||||||
|
for cacheKey in $cacheKeysForPR
|
||||||
|
do
|
||||||
|
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
|
||||||
|
done
|
||||||
|
echo "Done"
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
39
calcom/.github/workflows/check-if-ui-has-changed.yml
vendored
Normal file
39
calcom/.github/workflows/check-if-ui-has-changed.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# .github/workflows/chromatic.yml
|
||||||
|
|
||||||
|
# Workflow name
|
||||||
|
name: "Chromatic"
|
||||||
|
|
||||||
|
# Event for the workflow
|
||||||
|
on:
|
||||||
|
pull_request_target: # So we can test on forks
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- apps/storybook/**
|
||||||
|
- packages/ui/**
|
||||||
|
workflow_dispatch:
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
# List of jobs
|
||||||
|
jobs:
|
||||||
|
chromatic-deployment:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }} # So we can test on forks
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn
|
||||||
|
# 👇 Adds Chromatic as a step in the workflow
|
||||||
|
- name: Publish to Chromatic
|
||||||
|
uses: chromaui/action@v1
|
||||||
|
# Options required to the GitHub Chromatic Action
|
||||||
|
with:
|
||||||
|
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
|
||||||
|
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
||||||
|
workingDir: "apps/storybook"
|
||||||
|
buildScriptName: "build"
|
21
calcom/.github/workflows/check-types.yml
vendored
Normal file
21
calcom/.github/workflows/check-types.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name: Check types
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: --max-old-space-size=4096
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
jobs:
|
||||||
|
check-types:
|
||||||
|
runs-on: buildjet-4vcpu-ubuntu-2204
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: ./.github/actions/yarn-install
|
||||||
|
- name: Show info
|
||||||
|
run: node -e "console.log(require('v8').getHeapStatistics())"
|
||||||
|
- name: Configure TSC problem matcher
|
||||||
|
run: |
|
||||||
|
echo "::remove-matcher owner=tsc::"
|
||||||
|
echo "::add-matcher::.github/matchers/tsc-absolute.json"
|
||||||
|
- run: yarn type-check:ci
|
23
calcom/.github/workflows/cron-bookingReminder.yml
vendored
Normal file
23
calcom/.github/workflows/cron-bookingReminder.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
name: Cron - bookingReminder
|
||||||
|
|
||||||
|
on:
|
||||||
|
# "Scheduled workflows run on the latest commit on the default or base branch."
|
||||||
|
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
|
||||||
|
schedule:
|
||||||
|
# Runs "At every 15th minute." (see https://crontab.guru)
|
||||||
|
- cron: "*/15 * * * *"
|
||||||
|
jobs:
|
||||||
|
cron-bookingReminder:
|
||||||
|
env:
|
||||||
|
APP_URL: ${{ secrets.APP_URL }}
|
||||||
|
CRON_API_KEY: ${{ secrets.CRON_API_KEY }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: cURL request
|
||||||
|
if: ${{ env.APP_URL && env.CRON_API_KEY }}
|
||||||
|
run: |
|
||||||
|
curl ${{ secrets.APP_URL }}/api/cron/bookingReminder \
|
||||||
|
-X POST \
|
||||||
|
-H 'content-type: application/json' \
|
||||||
|
-H 'authorization: ${{ secrets.CRON_API_KEY }}' \
|
||||||
|
-sSf
|
24
calcom/.github/workflows/cron-changeTimeZone.yml
vendored
Normal file
24
calcom/.github/workflows/cron-changeTimeZone.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Cron - changeTimeZone
|
||||||
|
|
||||||
|
on:
|
||||||
|
# "Scheduled workflows run on the latest commit on the default or base branch."
|
||||||
|
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
|
||||||
|
schedule:
|
||||||
|
# Runs "At every full hour." (see https://crontab.guru)
|
||||||
|
- cron: "0 * * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cron-scheduleEmailReminders:
|
||||||
|
env:
|
||||||
|
APP_URL: ${{ secrets.APP_URL }}
|
||||||
|
CRON_API_KEY: ${{ secrets.CRON_API_KEY }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: cURL request
|
||||||
|
if: ${{ env.APP_URL && env.CRON_API_KEY }}
|
||||||
|
run: |
|
||||||
|
curl ${{ secrets.APP_URL }}/api/cron/changeTimeZone \
|
||||||
|
-X POST \
|
||||||
|
-H 'content-type: application/json' \
|
||||||
|
-H 'authorization: ${{ secrets.CRON_API_KEY }}' \
|
||||||
|
-sSf
|
24
calcom/.github/workflows/cron-downgradeUsers.yml
vendored
Normal file
24
calcom/.github/workflows/cron-downgradeUsers.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Cron - downgradeUsers
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
# "Scheduled workflows run on the latest commit on the default or base branch."
|
||||||
|
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
|
||||||
|
schedule:
|
||||||
|
# Runs "At 00:00 on day-of-month 1." (see https://crontab.guru)
|
||||||
|
- cron: "0 0 1 * *"
|
||||||
|
jobs:
|
||||||
|
cron-downgradeUsers:
|
||||||
|
env:
|
||||||
|
APP_URL: ${{ secrets.APP_URL }}
|
||||||
|
CRON_API_KEY: ${{ secrets.CRON_API_KEY }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: cURL request
|
||||||
|
if: ${{ env.APP_URL && env.CRON_API_KEY }}
|
||||||
|
run: |
|
||||||
|
curl ${{ secrets.APP_URL }}/api/cron/downgradeUsers \
|
||||||
|
-X POST \
|
||||||
|
-H 'content-type: application/json' \
|
||||||
|
-H 'authorization: ${{ secrets.CRON_API_KEY }}' \
|
||||||
|
-sSf
|
33
calcom/.github/workflows/cron-monthlyDigestEmail.yml
vendored
Normal file
33
calcom/.github/workflows/cron-monthlyDigestEmail.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Cron - monthlyDigestEmail
|
||||||
|
|
||||||
|
on:
|
||||||
|
# "Scheduled workflows run on the latest commit on the default or base branch."
|
||||||
|
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
|
||||||
|
schedule:
|
||||||
|
# Runs on the 28th, 29th, 30th and 31st of every month (see https://crontab.guru)
|
||||||
|
- cron: "59 23 28-31 * *"
|
||||||
|
jobs:
|
||||||
|
cron-monthlyDigestEmail:
|
||||||
|
env:
|
||||||
|
APP_URL: ${{ secrets.APP_URL }}
|
||||||
|
CRON_API_KEY: ${{ secrets.CRON_API_KEY }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check if today is the last day of the month
|
||||||
|
id: check-last-day
|
||||||
|
run: |
|
||||||
|
LAST_DAY=$(date -d tomorrow +%d)
|
||||||
|
if [ "$LAST_DAY" == "01" ]; then
|
||||||
|
echo "is_last_day=true" >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
echo "is_last_day=false" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: cURL request
|
||||||
|
if: ${{ env.APP_URL && env.CRON_API_KEY && steps.check-last-day.outputs.is_last_day == 'true' }}
|
||||||
|
run: |
|
||||||
|
curl ${{ secrets.APP_URL }}/api/cron/monthlyDigestEmail \
|
||||||
|
-X POST \
|
||||||
|
-H 'content-type: application/json' \
|
||||||
|
-H 'authorization: ${{ secrets.CRON_API_KEY }}' \
|
||||||
|
--fail
|
23
calcom/.github/workflows/cron-scheduleEmailReminders.yml
vendored
Normal file
23
calcom/.github/workflows/cron-scheduleEmailReminders.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
name: Cron - scheduleEmailReminders
|
||||||
|
|
||||||
|
on:
|
||||||
|
# "Scheduled workflows run on the latest commit on the default or base branch."
|
||||||
|
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
|
||||||
|
schedule:
|
||||||
|
# Runs "At every 15th minute." (see https://crontab.guru)
|
||||||
|
- cron: "*/15 * * * *"
|
||||||
|
jobs:
|
||||||
|
cron-scheduleEmailReminders:
|
||||||
|
env:
|
||||||
|
APP_URL: ${{ secrets.APP_URL }}
|
||||||
|
CRON_API_KEY: ${{ secrets.CRON_API_KEY }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: cURL request
|
||||||
|
if: ${{ env.APP_URL && env.CRON_API_KEY }}
|
||||||
|
run: |
|
||||||
|
curl ${{ secrets.APP_URL }}/api/cron/workflows/scheduleEmailReminders \
|
||||||
|
-X POST \
|
||||||
|
-H 'content-type: application/json' \
|
||||||
|
-H 'authorization: ${{ secrets.CRON_API_KEY }}' \
|
||||||
|
-sSf
|
23
calcom/.github/workflows/cron-scheduleSMSReminders.yml
vendored
Normal file
23
calcom/.github/workflows/cron-scheduleSMSReminders.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
name: Cron - scheduleSMSReminders
|
||||||
|
|
||||||
|
on:
|
||||||
|
# "Scheduled workflows run on the latest commit on the default or base branch."
|
||||||
|
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
|
||||||
|
schedule:
|
||||||
|
# Runs "At every 15th minute." (see https://crontab.guru)
|
||||||
|
- cron: "*/15 * * * *"
|
||||||
|
jobs:
|
||||||
|
cron-scheduleSMSReminders:
|
||||||
|
env:
|
||||||
|
APP_URL: ${{ secrets.APP_URL }}
|
||||||
|
CRON_API_KEY: ${{ secrets.CRON_API_KEY }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: cURL request
|
||||||
|
if: ${{ env.APP_URL && env.CRON_API_KEY }}
|
||||||
|
run: |
|
||||||
|
curl ${{ secrets.APP_URL }}/api/cron/workflows/scheduleSMSReminders \
|
||||||
|
-X POST \
|
||||||
|
-H 'content-type: application/json' \
|
||||||
|
-H 'authorization: ${{ secrets.CRON_API_KEY }}' \
|
||||||
|
-sSf
|
23
calcom/.github/workflows/cron-scheduleWhatsappReminders.yml
vendored
Normal file
23
calcom/.github/workflows/cron-scheduleWhatsappReminders.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
name: Cron - scheduleWhatsappReminders
|
||||||
|
|
||||||
|
on:
|
||||||
|
# "Scheduled workflows run on the latest commit on the default or base branch."
|
||||||
|
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
|
||||||
|
schedule:
|
||||||
|
# Runs "At every 15th minute." (see https://crontab.guru)
|
||||||
|
- cron: "*/15 * * * *"
|
||||||
|
jobs:
|
||||||
|
cron-scheduleWhatsappReminders:
|
||||||
|
env:
|
||||||
|
APP_URL: ${{ secrets.APP_URL }}
|
||||||
|
CRON_API_KEY: ${{ secrets.CRON_API_KEY }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: cURL request
|
||||||
|
if: ${{ env.APP_URL && env.CRON_API_KEY }}
|
||||||
|
run: |
|
||||||
|
curl ${{ secrets.APP_URL }}/api/cron/workflows/scheduleWhatsappReminders \
|
||||||
|
-X POST \
|
||||||
|
-H 'content-type: application/json' \
|
||||||
|
-H 'authorization: ${{ secrets.CRON_API_KEY }}' \
|
||||||
|
-sSf
|
27
calcom/.github/workflows/cron-stale-issue.yml
vendored
Normal file
27
calcom/.github/workflows/cron-stale-issue.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
name: Cron - mark stale for inactive issues
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
on:
|
||||||
|
# "Scheduled workflows run on the latest commit on the default or base branch."
|
||||||
|
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
|
||||||
|
schedule:
|
||||||
|
# Runs "At 00:00." every day (see https://crontab.guru)
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
jobs:
|
||||||
|
stale:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/stale@v7
|
||||||
|
with:
|
||||||
|
days-before-close: -1
|
||||||
|
days-before-issue-stale: 60
|
||||||
|
days-before-issue-close: -1
|
||||||
|
days-before-pr-stale: 14
|
||||||
|
days-before-pr-close: -1
|
||||||
|
stale-pr-message: "This PR is being marked as stale due to inactivity."
|
||||||
|
close-pr-message: "This PR is being closed due to inactivity. Please reopen if work is intended to be continued."
|
||||||
|
operations-per-run: 100
|
24
calcom/.github/workflows/cron-syncAppMeta.yml
vendored
Normal file
24
calcom/.github/workflows/cron-syncAppMeta.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Cron - syncAppMeta
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
# "Scheduled workflows run on the latest commit on the default or base branch."
|
||||||
|
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
|
||||||
|
schedule:
|
||||||
|
# Runs "At 00:00 on day-of-month 1." (see https://crontab.guru)
|
||||||
|
- cron: "0 0 1 * *"
|
||||||
|
jobs:
|
||||||
|
cron-syncAppMeta:
|
||||||
|
env:
|
||||||
|
APP_URL: ${{ secrets.APP_URL }}
|
||||||
|
CRON_API_KEY: ${{ secrets.CRON_API_KEY }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: cURL request
|
||||||
|
if: ${{ env.APP_URL && env.CRON_API_KEY }}
|
||||||
|
run: |
|
||||||
|
curl ${{ secrets.APP_URL }}/api/cron/syncAppMeta \
|
||||||
|
-X POST \
|
||||||
|
-H 'content-type: application/json' \
|
||||||
|
-H 'authorization: ${{ secrets.CRON_API_KEY }}' \
|
||||||
|
-sSf
|
23
calcom/.github/workflows/cron-webhooks-triggers.yml
vendored
Normal file
23
calcom/.github/workflows/cron-webhooks-triggers.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
name: Cron - webhookTriggers
|
||||||
|
|
||||||
|
on:
|
||||||
|
# "Scheduled workflows run on the latest commit on the default or base branch."
|
||||||
|
# — https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
|
||||||
|
schedule:
|
||||||
|
# Runs “every 5 minutes” (see https://crontab.guru)
|
||||||
|
- cron: "*/5 * * * *"
|
||||||
|
jobs:
|
||||||
|
cron-webhookTriggers:
|
||||||
|
env:
|
||||||
|
APP_URL: ${{ secrets.APP_URL }}
|
||||||
|
CRON_API_KEY: ${{ secrets.CRON_API_KEY }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: cURL request
|
||||||
|
if: ${{ env.APP_URL && env.CRON_API_KEY }}
|
||||||
|
run: |
|
||||||
|
curl ${{ secrets.APP_URL }}/api/cron/webhookTriggers \
|
||||||
|
-X POST \
|
||||||
|
-H 'content-type: application/json' \
|
||||||
|
-H 'authorization: ${{ secrets.CRON_API_KEY }}' \
|
||||||
|
--fail
|
42
calcom/.github/workflows/crowdin.yml
vendored
Normal file
42
calcom/.github/workflows/crowdin.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
name: Crowdin Action
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
synchronize-with-crowdin:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: crowdin action
|
||||||
|
uses: crowdin/github-action@v1.13.0
|
||||||
|
with:
|
||||||
|
# upload sources
|
||||||
|
upload_sources: true
|
||||||
|
|
||||||
|
# upload translations (& auto-approve 'em)
|
||||||
|
upload_translations_args: '--auto-approve-imported'
|
||||||
|
upload_translations: true
|
||||||
|
push_translations: true
|
||||||
|
|
||||||
|
# download translations
|
||||||
|
download_translations: true
|
||||||
|
|
||||||
|
# GH config
|
||||||
|
commit_message: "New Crowdin translations by Github Action"
|
||||||
|
localization_branch_name: main
|
||||||
|
create_pull_request: false
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||||
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||||
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
17
calcom/.github/workflows/delete-buildjet-cache.yml
vendored
Normal file
17
calcom/.github/workflows/delete-buildjet-cache.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
name: Manually Delete BuildJet Cache
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
cache_key:
|
||||||
|
description: "BuildJet Cache Key to Delete"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
jobs:
|
||||||
|
manually-delete-buildjet-cache:
|
||||||
|
runs-on: buildjet-2vcpu-ubuntu-2204
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- uses: buildjet/cache-delete@v1
|
||||||
|
with:
|
||||||
|
cache_key: ${{ inputs.cache_key }}
|
79
calcom/.github/workflows/e2e-api-v2.yml
vendored
Normal file
79
calcom/.github/workflows/e2e-api-v2.yml
vendored
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
name: E2E
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
env:
|
||||||
|
ALLOWED_HOSTNAMES: ${{ vars.CI_ALLOWED_HOSTNAMES }}
|
||||||
|
API_KEY_PREFIX: ${{ secrets.CI_API_KEY_PREFIX }}
|
||||||
|
API_PORT: ${{ vars.CI_API_V2_PORT }}
|
||||||
|
CALCOM_LICENSE_KEY: ${{ secrets.CI_CALCOM_LICENSE_KEY }}
|
||||||
|
DAILY_API_KEY: ${{ secrets.CI_DAILY_API_KEY }}
|
||||||
|
DATABASE_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DATABASE_READ_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DATABASE_WRITE_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DATABASE_DIRECT_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
|
||||||
|
IS_E2E: true
|
||||||
|
NEXTAUTH_SECRET: ${{ secrets.CI_NEXTAUTH_SECRET }}
|
||||||
|
NEXTAUTH_URL: ${{ secrets.CI_NEXTAUTH_URL }}
|
||||||
|
NODE_OPTIONS: --max-old-space-size=4096
|
||||||
|
REDIS_URL: "redis://localhost:6379"
|
||||||
|
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
||||||
|
STRIPE_API_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
||||||
|
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
|
||||||
|
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
|
||||||
|
jobs:
|
||||||
|
e2e:
|
||||||
|
timeout-minutes: 20
|
||||||
|
name: E2E API v2
|
||||||
|
runs-on: buildjet-8vcpu-ubuntu-2204
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:13
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: calendso
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
redis:
|
||||||
|
image: redis:latest
|
||||||
|
ports:
|
||||||
|
- 6379:6379
|
||||||
|
options: >-
|
||||||
|
--health-cmd "redis-cli ping"
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: ./.github/actions/yarn-install
|
||||||
|
- uses: ./.github/actions/yarn-playwright-install
|
||||||
|
- uses: ./.github/actions/cache-db
|
||||||
|
- name: Run Tests
|
||||||
|
working-directory: apps/api/v2
|
||||||
|
run: |
|
||||||
|
yarn test:e2e
|
||||||
|
EXIT_CODE=$?
|
||||||
|
echo "yarn test:e2e command exit code: $EXIT_CODE"
|
||||||
|
exit $EXIT_CODE
|
||||||
|
- name: Upload Test Results
|
||||||
|
if: ${{ always() }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: test-results-api-v2
|
||||||
|
path: test-results
|
102
calcom/.github/workflows/e2e-app-store.yml
vendored
Normal file
102
calcom/.github/workflows/e2e-app-store.yml
vendored
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
name: E2E App Store Tests
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
contents: read
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: --max-old-space-size=4096
|
||||||
|
ALLOWED_HOSTNAMES: ${{ vars.CI_ALLOWED_HOSTNAMES }}
|
||||||
|
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
|
||||||
|
DAILY_API_KEY: ${{ secrets.CI_DAILY_API_KEY }}
|
||||||
|
DATABASE_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DATABASE_DIRECT_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DEPLOYSENTINEL_API_KEY: ${{ secrets.DEPLOYSENTINEL_API_KEY }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_EMAIL: ${{ secrets.E2E_TEST_APPLE_CALENDAR_EMAIL }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_PASSWORD: ${{ secrets.E2E_TEST_APPLE_CALENDAR_PASSWORD }}
|
||||||
|
E2E_TEST_MAILHOG_ENABLED: ${{ vars.E2E_TEST_MAILHOG_ENABLED }}
|
||||||
|
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
|
||||||
|
EMAIL_SERVER_HOST: ${{ secrets.CI_EMAIL_SERVER_HOST }}
|
||||||
|
EMAIL_SERVER_PORT: ${{ secrets.CI_EMAIL_SERVER_PORT }}
|
||||||
|
EMAIL_SERVER_USER: ${{ secrets.CI_EMAIL_SERVER_USER }}
|
||||||
|
EMAIL_SERVER_PASSWORD: ${{ secrets.CI_EMAIL_SERVER_PASSWORD}}
|
||||||
|
GOOGLE_LOGIN_ENABLED: ${{ vars.CI_GOOGLE_LOGIN_ENABLED }}
|
||||||
|
NEXTAUTH_SECRET: ${{ secrets.CI_NEXTAUTH_SECRET }}
|
||||||
|
NEXTAUTH_URL: ${{ secrets.CI_NEXTAUTH_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_ROOT_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_ROOT_URL }}
|
||||||
|
NEXT_PUBLIC_IS_E2E: ${{ vars.CI_NEXT_PUBLIC_IS_E2E }}
|
||||||
|
NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED: ${{ vars.CI_NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED }}
|
||||||
|
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
||||||
|
NEXT_PUBLIC_WEBAPP_URL: ${{ vars.CI_NEXT_PUBLIC_WEBAPP_URL }}
|
||||||
|
NEXT_PUBLIC_WEBSITE_URL: ${{ vars.CI_NEXT_PUBLIC_WEBSITE_URL }}
|
||||||
|
PAYMENT_FEE_FIXED: ${{ vars.CI_PAYMENT_FEE_FIXED }}
|
||||||
|
PAYMENT_FEE_PERCENTAGE: ${{ vars.CI_PAYMENT_FEE_PERCENTAGE }}
|
||||||
|
SAML_ADMINS: ${{ secrets.CI_SAML_ADMINS }}
|
||||||
|
SAML_DATABASE_URL: ${{ secrets.CI_SAML_DATABASE_URL }}
|
||||||
|
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
||||||
|
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
|
||||||
|
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
|
||||||
|
SENDGRID_API_KEY: ${{ secrets.CI_SENDGRID_API_KEY }}
|
||||||
|
SENDGRID_EMAIL: ${{ secrets.CI_SENDGRID_EMAIL }}
|
||||||
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
|
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||||
|
jobs:
|
||||||
|
e2e-app-store:
|
||||||
|
timeout-minutes: 20
|
||||||
|
name: E2E App Store
|
||||||
|
runs-on: buildjet-4vcpu-ubuntu-2204
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:13
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: calendso
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
mailhog:
|
||||||
|
image: mailhog/mailhog:v1.0.1
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
ports:
|
||||||
|
- 8025:8025
|
||||||
|
- 1025:1025
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: ./.github/actions/yarn-install
|
||||||
|
- uses: ./.github/actions/yarn-playwright-install
|
||||||
|
- uses: ./.github/actions/cache-db
|
||||||
|
env:
|
||||||
|
DATABASE_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DATABASE_DIRECT_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
E2E_TEST_CALCOM_QA_EMAIL: ${{ secrets.E2E_TEST_CALCOM_QA_EMAIL }}
|
||||||
|
E2E_TEST_CALCOM_QA_PASSWORD: ${{ secrets.E2E_TEST_CALCOM_QA_PASSWORD }}
|
||||||
|
E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS: ${{ secrets.E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS }}
|
||||||
|
E2E_TEST_CALCOM_GCAL_KEYS: ${{ secrets.E2E_TEST_CALCOM_GCAL_KEYS }}
|
||||||
|
- uses: ./.github/actions/cache-build
|
||||||
|
- name: Run Tests
|
||||||
|
run: yarn e2e:app-store
|
||||||
|
- name: Upload Test Results
|
||||||
|
if: ${{ always() }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: app-store-results
|
||||||
|
path: test-results
|
89
calcom/.github/workflows/e2e-embed-react.yml
vendored
Normal file
89
calcom/.github/workflows/e2e-embed-react.yml
vendored
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
name: E2E Embed React tests and booking flow (for non-embed as well)
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
contents: read
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: --max-old-space-size=4096
|
||||||
|
ALLOWED_HOSTNAMES: ${{ vars.CI_ALLOWED_HOSTNAMES }}
|
||||||
|
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
|
||||||
|
DAILY_API_KEY: ${{ secrets.CI_DAILY_API_KEY }}
|
||||||
|
DATABASE_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DATABASE_DIRECT_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DEPLOYSENTINEL_API_KEY: ${{ secrets.DEPLOYSENTINEL_API_KEY }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_EMAIL: ${{ secrets.E2E_TEST_APPLE_CALENDAR_EMAIL }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_PASSWORD: ${{ secrets.E2E_TEST_APPLE_CALENDAR_PASSWORD }}
|
||||||
|
E2E_TEST_MAILHOG_ENABLED: ${{ vars.E2E_TEST_MAILHOG_ENABLED }}
|
||||||
|
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
|
||||||
|
EMAIL_SERVER_HOST: ${{ secrets.CI_EMAIL_SERVER_HOST }}
|
||||||
|
EMAIL_SERVER_PORT: ${{ secrets.CI_EMAIL_SERVER_PORT }}
|
||||||
|
EMAIL_SERVER_USER: ${{ secrets.CI_EMAIL_SERVER_USER }}
|
||||||
|
EMAIL_SERVER_PASSWORD: ${{ secrets.CI_EMAIL_SERVER_PASSWORD}}
|
||||||
|
GOOGLE_LOGIN_ENABLED: ${{ vars.CI_GOOGLE_LOGIN_ENABLED }}
|
||||||
|
NEXTAUTH_SECRET: ${{ secrets.CI_NEXTAUTH_SECRET }}
|
||||||
|
NEXTAUTH_URL: ${{ secrets.CI_NEXTAUTH_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_ROOT_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_ROOT_URL }}
|
||||||
|
NEXT_PUBLIC_IS_E2E: ${{ vars.CI_NEXT_PUBLIC_IS_E2E }}
|
||||||
|
NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED: ${{ vars.CI_NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED }}
|
||||||
|
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
||||||
|
NEXT_PUBLIC_WEBAPP_URL: ${{ vars.CI_NEXT_PUBLIC_WEBAPP_URL }}
|
||||||
|
NEXT_PUBLIC_WEBSITE_URL: ${{ vars.CI_NEXT_PUBLIC_WEBSITE_URL }}
|
||||||
|
PAYMENT_FEE_FIXED: ${{ vars.CI_PAYMENT_FEE_FIXED }}
|
||||||
|
PAYMENT_FEE_PERCENTAGE: ${{ vars.CI_PAYMENT_FEE_PERCENTAGE }}
|
||||||
|
SAML_ADMINS: ${{ secrets.CI_SAML_ADMINS }}
|
||||||
|
SAML_DATABASE_URL: ${{ secrets.CI_SAML_DATABASE_URL }}
|
||||||
|
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
||||||
|
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
|
||||||
|
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
|
||||||
|
SENDGRID_API_KEY: ${{ secrets.CI_SENDGRID_API_KEY }}
|
||||||
|
SENDGRID_EMAIL: ${{ secrets.CI_SENDGRID_EMAIL }}
|
||||||
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
|
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||||
|
jobs:
|
||||||
|
e2e-embed:
|
||||||
|
timeout-minutes: 20
|
||||||
|
name: E2E Embed React
|
||||||
|
runs-on: buildjet-4vcpu-ubuntu-2204
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:13
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: calendso
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: ./.github/actions/yarn-install
|
||||||
|
- uses: ./.github/actions/yarn-playwright-install
|
||||||
|
- uses: ./.github/actions/cache-db
|
||||||
|
- uses: ./.github/actions/cache-build
|
||||||
|
- name: Run Tests
|
||||||
|
run: |
|
||||||
|
yarn e2e:embed-react
|
||||||
|
yarn workspace @calcom/embed-react packaged:tests
|
||||||
|
- name: Upload Test Results
|
||||||
|
if: ${{ always() }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: embed-react-results
|
||||||
|
path: test-results
|
95
calcom/.github/workflows/e2e-embed.yml
vendored
Normal file
95
calcom/.github/workflows/e2e-embed.yml
vendored
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
name: E2E Embed Core tests and booking flow (for non-embed as well)
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
contents: read
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: --max-old-space-size=4096
|
||||||
|
ALLOWED_HOSTNAMES: ${{ vars.CI_ALLOWED_HOSTNAMES }}
|
||||||
|
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
|
||||||
|
DAILY_API_KEY: ${{ secrets.CI_DAILY_API_KEY }}
|
||||||
|
DATABASE_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DATABASE_DIRECT_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DEPLOYSENTINEL_API_KEY: ${{ secrets.DEPLOYSENTINEL_API_KEY }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_EMAIL: ${{ secrets.E2E_TEST_APPLE_CALENDAR_EMAIL }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_PASSWORD: ${{ secrets.E2E_TEST_APPLE_CALENDAR_PASSWORD }}
|
||||||
|
E2E_TEST_MAILHOG_ENABLED: ${{ vars.E2E_TEST_MAILHOG_ENABLED }}
|
||||||
|
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
|
||||||
|
EMAIL_SERVER_HOST: ${{ secrets.CI_EMAIL_SERVER_HOST }}
|
||||||
|
EMAIL_SERVER_PORT: ${{ secrets.CI_EMAIL_SERVER_PORT }}
|
||||||
|
EMAIL_SERVER_USER: ${{ secrets.CI_EMAIL_SERVER_USER }}
|
||||||
|
EMAIL_SERVER_PASSWORD: ${{ secrets.CI_EMAIL_SERVER_PASSWORD}}
|
||||||
|
GOOGLE_LOGIN_ENABLED: ${{ vars.CI_GOOGLE_LOGIN_ENABLED }}
|
||||||
|
NEXTAUTH_SECRET: ${{ secrets.CI_NEXTAUTH_SECRET }}
|
||||||
|
NEXTAUTH_URL: ${{ secrets.CI_NEXTAUTH_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_ROOT_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_ROOT_URL }}
|
||||||
|
NEXT_PUBLIC_IS_E2E: ${{ vars.CI_NEXT_PUBLIC_IS_E2E }}
|
||||||
|
NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED: ${{ vars.CI_NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED }}
|
||||||
|
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
||||||
|
NEXT_PUBLIC_WEBAPP_URL: ${{ vars.CI_NEXT_PUBLIC_WEBAPP_URL }}
|
||||||
|
NEXT_PUBLIC_WEBSITE_URL: ${{ vars.CI_NEXT_PUBLIC_WEBSITE_URL }}
|
||||||
|
PAYMENT_FEE_FIXED: ${{ vars.CI_PAYMENT_FEE_FIXED }}
|
||||||
|
PAYMENT_FEE_PERCENTAGE: ${{ vars.CI_PAYMENT_FEE_PERCENTAGE }}
|
||||||
|
SAML_ADMINS: ${{ secrets.CI_SAML_ADMINS }}
|
||||||
|
SAML_DATABASE_URL: ${{ secrets.CI_SAML_DATABASE_URL }}
|
||||||
|
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
||||||
|
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
|
||||||
|
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
|
||||||
|
SENDGRID_API_KEY: ${{ secrets.CI_SENDGRID_API_KEY }}
|
||||||
|
SENDGRID_EMAIL: ${{ secrets.CI_SENDGRID_EMAIL }}
|
||||||
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
|
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||||
|
jobs:
|
||||||
|
e2e-embed:
|
||||||
|
timeout-minutes: 20
|
||||||
|
name: E2E Embed Core
|
||||||
|
runs-on: buildjet-4vcpu-ubuntu-2204
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:13
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: calendso
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
mailhog:
|
||||||
|
image: mailhog/mailhog:v1.0.1
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
ports:
|
||||||
|
- 8025:8025
|
||||||
|
- 1025:1025
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: ./.github/actions/yarn-install
|
||||||
|
- uses: ./.github/actions/yarn-playwright-install
|
||||||
|
- uses: ./.github/actions/cache-db
|
||||||
|
- uses: ./.github/actions/cache-build
|
||||||
|
- name: Run Tests
|
||||||
|
run: yarn e2e:embed
|
||||||
|
- name: Upload Test Results
|
||||||
|
if: ${{ always() }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: embed-core-results
|
||||||
|
path: test-results
|
96
calcom/.github/workflows/e2e.yml
vendored
Normal file
96
calcom/.github/workflows/e2e.yml
vendored
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
name: E2E
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
contents: read
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: --max-old-space-size=4096
|
||||||
|
ALLOWED_HOSTNAMES: ${{ vars.CI_ALLOWED_HOSTNAMES }}
|
||||||
|
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
|
||||||
|
DAILY_API_KEY: ${{ secrets.CI_DAILY_API_KEY }}
|
||||||
|
DATABASE_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DATABASE_DIRECT_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DEPLOYSENTINEL_API_KEY: ${{ secrets.DEPLOYSENTINEL_API_KEY }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_EMAIL: ${{ secrets.E2E_TEST_APPLE_CALENDAR_EMAIL }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_PASSWORD: ${{ secrets.E2E_TEST_APPLE_CALENDAR_PASSWORD }}
|
||||||
|
E2E_TEST_MAILHOG_ENABLED: ${{ vars.E2E_TEST_MAILHOG_ENABLED }}
|
||||||
|
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
|
||||||
|
EMAIL_SERVER_HOST: ${{ secrets.CI_EMAIL_SERVER_HOST }}
|
||||||
|
EMAIL_SERVER_PORT: ${{ secrets.CI_EMAIL_SERVER_PORT }}
|
||||||
|
EMAIL_SERVER_USER: ${{ secrets.CI_EMAIL_SERVER_USER }}
|
||||||
|
EMAIL_SERVER_PASSWORD: ${{ secrets.CI_EMAIL_SERVER_PASSWORD}}
|
||||||
|
GOOGLE_LOGIN_ENABLED: ${{ vars.CI_GOOGLE_LOGIN_ENABLED }}
|
||||||
|
NEXTAUTH_SECRET: ${{ secrets.CI_NEXTAUTH_SECRET }}
|
||||||
|
NEXTAUTH_URL: ${{ secrets.CI_NEXTAUTH_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_ROOT_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_ROOT_URL }}
|
||||||
|
NEXT_PUBLIC_IS_E2E: ${{ vars.CI_NEXT_PUBLIC_IS_E2E }}
|
||||||
|
NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED: ${{ vars.CI_NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED }}
|
||||||
|
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
||||||
|
NEXT_PUBLIC_WEBAPP_URL: ${{ vars.CI_NEXT_PUBLIC_WEBAPP_URL }}
|
||||||
|
NEXT_PUBLIC_WEBSITE_URL: ${{ vars.CI_NEXT_PUBLIC_WEBSITE_URL }}
|
||||||
|
PAYMENT_FEE_FIXED: ${{ vars.CI_PAYMENT_FEE_FIXED }}
|
||||||
|
PAYMENT_FEE_PERCENTAGE: ${{ vars.CI_PAYMENT_FEE_PERCENTAGE }}
|
||||||
|
SAML_ADMINS: ${{ secrets.CI_SAML_ADMINS }}
|
||||||
|
SAML_DATABASE_URL: ${{ secrets.CI_SAML_DATABASE_URL }}
|
||||||
|
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
||||||
|
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
|
||||||
|
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
|
||||||
|
SENDGRID_API_KEY: ${{ secrets.CI_SENDGRID_API_KEY }}
|
||||||
|
SENDGRID_EMAIL: ${{ secrets.CI_SENDGRID_EMAIL }}
|
||||||
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
|
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||||
|
jobs:
|
||||||
|
e2e:
|
||||||
|
timeout-minutes: 20
|
||||||
|
name: E2E (${{ matrix.shard }}/${{ strategy.job-total }})
|
||||||
|
runs-on: buildjet-8vcpu-ubuntu-2204
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:13
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: calendso
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
mailhog:
|
||||||
|
image: mailhog/mailhog:v1.0.1
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
ports:
|
||||||
|
- 8025:8025
|
||||||
|
- 1025:1025
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
shard: [1, 2, 3, 4]
|
||||||
|
steps:
|
||||||
|
- uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: ./.github/actions/yarn-install
|
||||||
|
- uses: ./.github/actions/yarn-playwright-install
|
||||||
|
- uses: ./.github/actions/cache-db
|
||||||
|
- uses: ./.github/actions/cache-build
|
||||||
|
- name: Run Tests
|
||||||
|
run: yarn e2e --shard=${{ matrix.shard }}/${{ strategy.job-total }}
|
||||||
|
- name: Upload Test Results
|
||||||
|
if: ${{ always() }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: test-results-${{ matrix.shard }}_${{ strategy.job-total }}
|
||||||
|
path: test-results
|
92
calcom/.github/workflows/integration-tests.yml
vendored
Normal file
92
calcom/.github/workflows/integration-tests.yml
vendored
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
name: Integration
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: --max-old-space-size=4096
|
||||||
|
ALLOWED_HOSTNAMES: ${{ vars.CI_ALLOWED_HOSTNAMES }}
|
||||||
|
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
|
||||||
|
DAILY_API_KEY: ${{ secrets.CI_DAILY_API_KEY }}
|
||||||
|
DATABASE_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DATABASE_DIRECT_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DEPLOYSENTINEL_API_KEY: ${{ secrets.DEPLOYSENTINEL_API_KEY }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_EMAIL: ${{ secrets.E2E_TEST_APPLE_CALENDAR_EMAIL }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_PASSWORD: ${{ secrets.E2E_TEST_APPLE_CALENDAR_PASSWORD }}
|
||||||
|
E2E_TEST_MAILHOG_ENABLED: ${{ vars.E2E_TEST_MAILHOG_ENABLED }}
|
||||||
|
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
|
||||||
|
EMAIL_SERVER_HOST: ${{ secrets.CI_EMAIL_SERVER_HOST }}
|
||||||
|
EMAIL_SERVER_PORT: ${{ secrets.CI_EMAIL_SERVER_PORT }}
|
||||||
|
EMAIL_SERVER_USER: ${{ secrets.CI_EMAIL_SERVER_USER }}
|
||||||
|
EMAIL_SERVER_PASSWORD: ${{ secrets.CI_EMAIL_SERVER_PASSWORD}}
|
||||||
|
GOOGLE_LOGIN_ENABLED: ${{ vars.CI_GOOGLE_LOGIN_ENABLED }}
|
||||||
|
NEXTAUTH_SECRET: ${{ secrets.CI_NEXTAUTH_SECRET }}
|
||||||
|
NEXTAUTH_URL: ${{ secrets.CI_NEXTAUTH_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_ROOT_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_ROOT_URL }}
|
||||||
|
NEXT_PUBLIC_IS_E2E: ${{ vars.CI_NEXT_PUBLIC_IS_E2E }}
|
||||||
|
NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED: ${{ vars.CI_NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED }}
|
||||||
|
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
||||||
|
NEXT_PUBLIC_WEBAPP_URL: ${{ vars.CI_NEXT_PUBLIC_WEBAPP_URL }}
|
||||||
|
NEXT_PUBLIC_WEBSITE_URL: ${{ vars.CI_NEXT_PUBLIC_WEBSITE_URL }}
|
||||||
|
PAYMENT_FEE_FIXED: ${{ vars.CI_PAYMENT_FEE_FIXED }}
|
||||||
|
PAYMENT_FEE_PERCENTAGE: ${{ vars.CI_PAYMENT_FEE_PERCENTAGE }}
|
||||||
|
SAML_ADMINS: ${{ secrets.CI_SAML_ADMINS }}
|
||||||
|
SAML_DATABASE_URL: ${{ secrets.CI_SAML_DATABASE_URL }}
|
||||||
|
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
||||||
|
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
|
||||||
|
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
|
||||||
|
SENDGRID_API_KEY: ${{ secrets.CI_SENDGRID_API_KEY }}
|
||||||
|
SENDGRID_EMAIL: ${{ secrets.CI_SENDGRID_EMAIL }}
|
||||||
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
|
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||||
|
jobs:
|
||||||
|
integration:
|
||||||
|
timeout-minutes: 20
|
||||||
|
name: Integration
|
||||||
|
runs-on: buildjet-8vcpu-ubuntu-2204
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:13
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: calendso
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
mailhog:
|
||||||
|
image: mailhog/mailhog:v1.0.1
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
ports:
|
||||||
|
- 8025:8025
|
||||||
|
- 1025:1025
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: ./.github/actions/yarn-install
|
||||||
|
- uses: ./.github/actions/cache-db
|
||||||
|
- name: Run Tests
|
||||||
|
run: yarn test -- --integrationTestsOnly
|
||||||
|
# TODO: Generate test results so we can upload them
|
||||||
|
# - name: Upload Test Results
|
||||||
|
# if: ${{ always() }}
|
||||||
|
# uses: actions/upload-artifact@v4
|
||||||
|
# with:
|
||||||
|
# name: test-results
|
||||||
|
# path: test-results
|
95
calcom/.github/workflows/labeler.yml
vendored
Normal file
95
calcom/.github/workflows/labeler.yml
vendored
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
name: "Pull Request Labeler"
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
workflow_dispatch:
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
jobs:
|
||||||
|
labeler:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/labeler@v5
|
||||||
|
with:
|
||||||
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
team-labels:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: equitybee/team-label-action@main
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.EQUITY_BEE_TEAM_LABELER_ACTION_TOKEN }}
|
||||||
|
organization-name: calcom
|
||||||
|
ignore-labels: "admin, app-store, ai, authentication, automated-testing, devops, billing, bookings, caldav, calendar-apps, ci, console, crm-apps, docs, documentation, emails, embeds, event-types, i18n, impersonation, manual-testing, ui, performance, ops-stack, organizations, public-api, routing-forms, seats, teams, webhooks, workflows, zapier"
|
||||||
|
apply-labels-from-issue:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: none
|
||||||
|
issues: read
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Apply labels from linked issue to PR
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
script: |
|
||||||
|
async function getLinkedIssues(owner, repo, prNumber) {
|
||||||
|
const query = `query GetLinkedIssues($owner: String!, $repo: String!, $prNumber: Int!) {
|
||||||
|
repository(owner: $owner, name: $repo) {
|
||||||
|
pullRequest(number: $prNumber) {
|
||||||
|
closingIssuesReferences(first: 10) {
|
||||||
|
nodes {
|
||||||
|
number
|
||||||
|
labels(first: 10) {
|
||||||
|
nodes {
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}`;
|
||||||
|
|
||||||
|
const variables = {
|
||||||
|
owner: owner,
|
||||||
|
repo: repo,
|
||||||
|
prNumber: prNumber,
|
||||||
|
};
|
||||||
|
|
||||||
|
const result = await github.graphql(query, variables);
|
||||||
|
return result.repository.pullRequest.closingIssuesReferences.nodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
const pr = context.payload.pull_request;
|
||||||
|
const linkedIssues = await getLinkedIssues(
|
||||||
|
context.repo.owner,
|
||||||
|
context.repo.repo,
|
||||||
|
pr.number
|
||||||
|
);
|
||||||
|
|
||||||
|
const labelsToAdd = new Set();
|
||||||
|
for (const issue of linkedIssues) {
|
||||||
|
if (issue.labels && issue.labels.nodes) {
|
||||||
|
for (const label of issue.labels.nodes) {
|
||||||
|
labelsToAdd.add(label.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (labelsToAdd.size) {
|
||||||
|
await github.rest.issues.addLabels({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
issue_number: pr.number,
|
||||||
|
labels: Array.from(labelsToAdd),
|
||||||
|
});
|
||||||
|
}
|
27
calcom/.github/workflows/lint.yml
vendored
Normal file
27
calcom/.github/workflows/lint.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
name: Lint
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
contents: read
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: buildjet-4vcpu-ubuntu-2204
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: ./.github/actions/yarn-install
|
||||||
|
- name: Run Linting with Reports
|
||||||
|
run: yarn lint:report
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Merge lint reports
|
||||||
|
run: jq -s '[.[]]|flatten' lint-results/*.json &> lint-results/eslint_report.json
|
||||||
|
|
||||||
|
- name: Upload ESLint report
|
||||||
|
if: ${{ always() }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: lint-results
|
||||||
|
path: lint-results
|
131
calcom/.github/workflows/nextjs-bundle-analysis.yml
vendored
Normal file
131
calcom/.github/workflows/nextjs-bundle-analysis.yml
vendored
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
name: "Next.js Bundle Analysis"
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
env:
|
||||||
|
ALLOWED_HOSTNAMES: ${{ vars.CI_ALLOWED_HOSTNAMES }}
|
||||||
|
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
|
||||||
|
DAILY_API_KEY: ${{ secrets.CI_DAILY_API_KEY }}
|
||||||
|
DATABASE_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DATABASE_DIRECT_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DEPLOYSENTINEL_API_KEY: ${{ secrets.DEPLOYSENTINEL_API_KEY }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_EMAIL: ${{ secrets.E2E_TEST_APPLE_CALENDAR_EMAIL }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_PASSWORD: ${{ secrets.E2E_TEST_APPLE_CALENDAR_PASSWORD }}
|
||||||
|
E2E_TEST_MAILHOG_ENABLED: ${{ vars.E2E_TEST_MAILHOG_ENABLED }}
|
||||||
|
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
|
||||||
|
EMAIL_SERVER_HOST: ${{ secrets.CI_EMAIL_SERVER_HOST }}
|
||||||
|
EMAIL_SERVER_PORT: ${{ secrets.CI_EMAIL_SERVER_PORT }}
|
||||||
|
EMAIL_SERVER_USER: ${{ secrets.CI_EMAIL_SERVER_USER }}
|
||||||
|
EMAIL_SERVER_PASSWORD: ${{ secrets.CI_EMAIL_SERVER_PASSWORD}}
|
||||||
|
GOOGLE_LOGIN_ENABLED: ${{ vars.CI_GOOGLE_LOGIN_ENABLED }}
|
||||||
|
NEXTAUTH_SECRET: ${{ secrets.CI_NEXTAUTH_SECRET }}
|
||||||
|
NEXTAUTH_URL: ${{ secrets.CI_NEXTAUTH_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_ROOT_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_ROOT_URL }}
|
||||||
|
NEXT_PUBLIC_IS_E2E: ${{ vars.CI_NEXT_PUBLIC_IS_E2E }}
|
||||||
|
NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED: ${{ vars.CI_NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED }}
|
||||||
|
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
||||||
|
NEXT_PUBLIC_WEBAPP_URL: ${{ vars.CI_NEXT_PUBLIC_WEBAPP_URL }}
|
||||||
|
NEXT_PUBLIC_WEBSITE_URL: ${{ vars.CI_NEXT_PUBLIC_WEBSITE_URL }}
|
||||||
|
PAYMENT_FEE_FIXED: ${{ vars.CI_PAYMENT_FEE_FIXED }}
|
||||||
|
PAYMENT_FEE_PERCENTAGE: ${{ vars.CI_PAYMENT_FEE_PERCENTAGE }}
|
||||||
|
SAML_ADMINS: ${{ secrets.CI_SAML_ADMINS }}
|
||||||
|
SAML_DATABASE_URL: ${{ secrets.CI_SAML_DATABASE_URL }}
|
||||||
|
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
||||||
|
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
|
||||||
|
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
|
||||||
|
SENDGRID_API_KEY: ${{ secrets.CI_SENDGRID_API_KEY }}
|
||||||
|
SENDGRID_EMAIL: ${{ secrets.CI_SENDGRID_EMAIL }}
|
||||||
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
|
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
if: always()
|
||||||
|
runs-on: buildjet-2vcpu-ubuntu-2204
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: ./.github/actions/yarn-install
|
||||||
|
- uses: ./.github/actions/cache-build
|
||||||
|
- name: Analyze bundle
|
||||||
|
run: |
|
||||||
|
cd apps/web
|
||||||
|
npx -p nextjs-bundle-analysis@0.5.0 report
|
||||||
|
|
||||||
|
- name: Upload bundle
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: bundle
|
||||||
|
path: apps/web/.next/analyze/__bundle_analysis.json
|
||||||
|
|
||||||
|
- name: Download base branch bundle stats
|
||||||
|
uses: dawidd6/action-download-artifact@v2
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
workflow: nextjs-bundle-analysis.yml
|
||||||
|
branch: ${{ github.event.pull_request.base.ref }}
|
||||||
|
path: apps/web/.next/analyze/base
|
||||||
|
|
||||||
|
# And here's the second place - this runs after we have both the current and
|
||||||
|
# base branch bundle stats, and will compare them to determine what changed.
|
||||||
|
# There are two configurable arguments that come from package.json:
|
||||||
|
#
|
||||||
|
# - budget: optional, set a budget (bytes) against which size changes are measured
|
||||||
|
# it's set to 350kb here by default, as informed by the following piece:
|
||||||
|
# https://infrequently.org/2021/03/the-performance-inequality-gap/
|
||||||
|
#
|
||||||
|
# - red-status-percentage: sets the percent size increase where you get a red
|
||||||
|
# status indicator, defaults to 20%
|
||||||
|
#
|
||||||
|
# Either of these arguments can be changed or removed by editing the `nextBundleAnalysis`
|
||||||
|
# entry in your package.json file.
|
||||||
|
- name: Compare with base branch bundle
|
||||||
|
if: success()
|
||||||
|
run: |
|
||||||
|
cd apps/web
|
||||||
|
ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare
|
||||||
|
|
||||||
|
- name: Get comment body
|
||||||
|
id: get-comment-body
|
||||||
|
if: success() && github.event.number
|
||||||
|
run: |
|
||||||
|
cd apps/web
|
||||||
|
body=$(cat .next/analyze/__bundle_analysis_comment.txt)
|
||||||
|
body="${body//'%'/'%25'}"
|
||||||
|
body="${body//$'\n'/'%0A'}"
|
||||||
|
body="${body//$'\r'/'%0D'}"
|
||||||
|
echo ::set-output name=body::$body
|
||||||
|
|
||||||
|
- name: Find Comment
|
||||||
|
uses: peter-evans/find-comment@v2
|
||||||
|
if: success() && github.event.number
|
||||||
|
id: fc
|
||||||
|
with:
|
||||||
|
issue-number: ${{ github.event.number }}
|
||||||
|
body-includes: "<!-- __NEXTJS_BUNDLE_@calcom/web -->"
|
||||||
|
|
||||||
|
- name: Create Comment
|
||||||
|
uses: peter-evans/create-or-update-comment@v3
|
||||||
|
if: success() && github.event.number && steps.fc.outputs.comment-id == 0
|
||||||
|
with:
|
||||||
|
issue-number: ${{ github.event.number }}
|
||||||
|
body: ${{ steps.get-comment-body.outputs.body }}
|
||||||
|
|
||||||
|
- name: Update Comment
|
||||||
|
uses: peter-evans/create-or-update-comment@v3
|
||||||
|
if: success() && github.event.number && steps.fc.outputs.comment-id != 0
|
||||||
|
with:
|
||||||
|
issue-number: ${{ github.event.number }}
|
||||||
|
body: ${{ steps.get-comment-body.outputs.body }}
|
||||||
|
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||||
|
edit-mode: replace
|
17
calcom/.github/workflows/pr-review.yml
vendored
Normal file
17
calcom/.github/workflows/pr-review.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
name: PR Reviewed
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_review:
|
||||||
|
types: [submitted]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
label-pr:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Label PR as ready for E2E
|
||||||
|
if: github.event.review.state == 'approved'
|
||||||
|
uses: actions-ecosystem/action-add-labels@v1
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
labels: 'ready-for-e2e'
|
191
calcom/.github/workflows/pr.yml
vendored
Normal file
191
calcom/.github/workflows/pr.yml
vendored
Normal file
@ -0,0 +1,191 @@
|
|||||||
|
name: PR Update
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types: [opened, synchronize, reopened, labeled]
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- gh-actions-test-branch
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
changes:
|
||||||
|
name: Detect changes
|
||||||
|
runs-on: buildjet-2vcpu-ubuntu-2204
|
||||||
|
permissions:
|
||||||
|
pull-requests: read
|
||||||
|
outputs:
|
||||||
|
has-files-requiring-all-checks: ${{ steps.filter.outputs.has-files-requiring-all-checks }}
|
||||||
|
commit-sha: ${{ steps.get_sha.outputs.commit-sha }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: dorny/paths-filter@v3
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
has-files-requiring-all-checks:
|
||||||
|
- "!(**.md|.github/CODEOWNERS)"
|
||||||
|
- name: Get Latest Commit SHA
|
||||||
|
id: get_sha
|
||||||
|
run: |
|
||||||
|
echo "commit-sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
check-label:
|
||||||
|
needs: [changes]
|
||||||
|
runs-on: buildjet-2vcpu-ubuntu-2204
|
||||||
|
name: Check for E2E label
|
||||||
|
permissions:
|
||||||
|
pull-requests: read
|
||||||
|
outputs:
|
||||||
|
run-e2e: ${{ steps.check-if-pr-has-label.outputs.run-e2e == 'true' && (github.event.action != 'labeled' || (github.event.action == 'labeled' && github.event.label.name == 'ready-for-e2e')) }}
|
||||||
|
steps:
|
||||||
|
- name: Check if PR exists with ready-for-e2e label for this SHA
|
||||||
|
id: check-if-pr-has-label
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
let labels = [];
|
||||||
|
|
||||||
|
if (context.payload.pull_request) {
|
||||||
|
labels = context.payload.pull_request.labels;
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
const sha = '${{ needs.changes.outputs.commit-sha }}';
|
||||||
|
console.log('sha', sha);
|
||||||
|
const { data: prs } = await github.rest.repos.listPullRequestsAssociatedWithCommit({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
commit_sha: sha
|
||||||
|
});
|
||||||
|
|
||||||
|
if (prs.length === 0) {
|
||||||
|
core.setOutput('run-e2e', false);
|
||||||
|
console.log(`No pull requests found for commit SHA ${sha}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const pr = prs[0];
|
||||||
|
console.log(`PR number: ${pr.number}`);
|
||||||
|
console.log(`PR title: ${pr.title}`);
|
||||||
|
console.log(`PR state: ${pr.state}`);
|
||||||
|
console.log(`PR URL: ${pr.html_url}`);
|
||||||
|
|
||||||
|
labels = pr.labels;
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
core.setOutput('run-e2e', false);
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const labelFound = labels.map(l => l.name).includes('ready-for-e2e');
|
||||||
|
console.log('Found the label?', labelFound);
|
||||||
|
core.setOutput('run-e2e', labelFound);
|
||||||
|
|
||||||
|
type-check:
|
||||||
|
name: Type check
|
||||||
|
needs: [changes, check-label]
|
||||||
|
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||||
|
uses: ./.github/workflows/check-types.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
lint:
|
||||||
|
name: Linters
|
||||||
|
needs: [changes, check-label]
|
||||||
|
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||||
|
uses: ./.github/workflows/lint.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
unit-test:
|
||||||
|
name: Tests
|
||||||
|
needs: [changes, check-label]
|
||||||
|
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||||
|
uses: ./.github/workflows/unit-tests.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build-api-v1:
|
||||||
|
name: Production builds
|
||||||
|
needs: [changes, check-label]
|
||||||
|
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||||
|
uses: ./.github/workflows/api-v1-production-build.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build-api-v2:
|
||||||
|
name: Production builds
|
||||||
|
needs: [changes, check-label]
|
||||||
|
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||||
|
uses: ./.github/workflows/api-v2-production-build.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Production builds
|
||||||
|
needs: [changes, check-label]
|
||||||
|
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||||
|
uses: ./.github/workflows/production-build-without-database.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
integration-test:
|
||||||
|
name: Tests
|
||||||
|
needs: [changes, check-label, build, build-api-v1, build-api-v2]
|
||||||
|
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||||
|
uses: ./.github/workflows/integration-tests.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
e2e:
|
||||||
|
name: Tests
|
||||||
|
needs: [changes, check-label, build, build-api-v1, build-api-v2]
|
||||||
|
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||||
|
uses: ./.github/workflows/e2e.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
e2e-api-v2:
|
||||||
|
name: Tests
|
||||||
|
needs: [changes, check-label, build, build-api-v1, build-api-v2]
|
||||||
|
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||||
|
uses: ./.github/workflows/e2e-api-v2.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
e2e-app-store:
|
||||||
|
name: Tests
|
||||||
|
needs: [changes, check-label, build, build-api-v1, build-api-v2]
|
||||||
|
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||||
|
uses: ./.github/workflows/e2e-app-store.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
e2e-embed:
|
||||||
|
name: Tests
|
||||||
|
needs: [changes, check-label, build, build-api-v1, build-api-v2]
|
||||||
|
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||||
|
uses: ./.github/workflows/e2e-embed.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
e2e-embed-react:
|
||||||
|
name: Tests
|
||||||
|
needs: [changes, check-label, build, build-api-v1, build-api-v2]
|
||||||
|
if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||||
|
uses: ./.github/workflows/e2e-embed-react.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
analyze:
|
||||||
|
name: Analyze Build
|
||||||
|
needs: [build]
|
||||||
|
uses: ./.github/workflows/nextjs-bundle-analysis.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
required:
|
||||||
|
needs: [changes, lint, type-check, unit-test, integration-test, check-label, build, build-api-v1, build-api-v2, e2e, e2e-api-v2, e2e-embed, e2e-embed-react, e2e-app-store]
|
||||||
|
if: always()
|
||||||
|
runs-on: buildjet-2vcpu-ubuntu-2204
|
||||||
|
steps:
|
||||||
|
- name: fail if conditional jobs failed
|
||||||
|
if: needs.changes.outputs.has-files-requiring-all-checks == 'true' && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled'))
|
||||||
|
run: exit 1
|
49
calcom/.github/workflows/production-build-without-database.yml
vendored
Normal file
49
calcom/.github/workflows/production-build-without-database.yml
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
name: Production Builds
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
env:
|
||||||
|
ALLOWED_HOSTNAMES: ${{ vars.CI_ALLOWED_HOSTNAMES }}
|
||||||
|
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
|
||||||
|
DAILY_API_KEY: ${{ secrets.CI_DAILY_API_KEY }}
|
||||||
|
DATABASE_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
DATABASE_DIRECT_URL: ${{ secrets.CI_DATABASE_URL }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_EMAIL: ${{ secrets.E2E_TEST_APPLE_CALENDAR_EMAIL }}
|
||||||
|
E2E_TEST_APPLE_CALENDAR_PASSWORD: ${{ secrets.E2E_TEST_APPLE_CALENDAR_PASSWORD }}
|
||||||
|
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
|
||||||
|
GOOGLE_LOGIN_ENABLED: ${{ vars.CI_GOOGLE_LOGIN_ENABLED }}
|
||||||
|
NEXTAUTH_SECRET: ${{ secrets.CI_NEXTAUTH_SECRET }}
|
||||||
|
NEXTAUTH_URL: ${{ secrets.CI_NEXTAUTH_URL }}
|
||||||
|
NEXT_PUBLIC_IS_E2E: ${{ vars.CI_NEXT_PUBLIC_IS_E2E }}
|
||||||
|
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
|
||||||
|
NEXT_PUBLIC_WEBAPP_URL: ${{ vars.CI_NEXT_PUBLIC_WEBAPP_URL }}
|
||||||
|
NEXT_PUBLIC_WEBSITE_URL: ${{ vars.CI_NEXT_PUBLIC_WEBSITE_URL }}
|
||||||
|
PAYMENT_FEE_FIXED: ${{ vars.CI_PAYMENT_FEE_FIXED }}
|
||||||
|
PAYMENT_FEE_PERCENTAGE: ${{ vars.CI_PAYMENT_FEE_PERCENTAGE }}
|
||||||
|
SAML_ADMINS: ${{ secrets.CI_SAML_ADMINS }}
|
||||||
|
SAML_DATABASE_URL: ${{ secrets.CI_SAML_DATABASE_URL }}
|
||||||
|
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
|
||||||
|
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
|
||||||
|
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
|
||||||
|
SENDGRID_API_KEY: ${{ secrets.CI_SENDGRID_API_KEY }}
|
||||||
|
SENDGRID_EMAIL: ${{ secrets.CI_SENDGRID_EMAIL }}
|
||||||
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
|
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||||
|
NEXT_PUBLIC_API_V2_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_URL }}
|
||||||
|
NEXT_PUBLIC_API_V2_ROOT_URL: ${{ secrets.CI_NEXT_PUBLIC_API_V2_ROOT_URL }}
|
||||||
|
NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED: ${{ vars.CI_NEXT_PUBLIC_ORG_SELF_SERVE_ENABLED }}
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Web App
|
||||||
|
runs-on: buildjet-4vcpu-ubuntu-2204
|
||||||
|
timeout-minutes: 30
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: ./.github/actions/yarn-install
|
||||||
|
- uses: ./.github/actions/cache-build
|
47
calcom/.github/workflows/release-docker.yaml
vendored
Normal file
47
calcom/.github/workflows/release-docker.yaml
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
name: "Release Docker"
|
||||||
|
|
||||||
|
on: # yamllint disable-line rule:truthy
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- created
|
||||||
|
# in case manual trigger is needed
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
RELEASE_TAG:
|
||||||
|
description: "v{Major}.{Minor}.{Patch}"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: "Remote Release"
|
||||||
|
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: "Determine tag"
|
||||||
|
run: 'echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV'
|
||||||
|
|
||||||
|
- name: "Run remote release workflow"
|
||||||
|
uses: "actions/github-script@v6"
|
||||||
|
with:
|
||||||
|
# Requires a personal access token with Actions Read and write permissions on calcom/docker.
|
||||||
|
github-token: "${{ secrets.DOCKER_REPO_ACCESS_TOKEN }}"
|
||||||
|
script: |
|
||||||
|
try {
|
||||||
|
const response = await github.rest.actions.createWorkflowDispatch({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: 'docker',
|
||||||
|
workflow_id: 'create-release.yaml',
|
||||||
|
ref: 'main',
|
||||||
|
inputs: {
|
||||||
|
"RELEASE_TAG": process.env.RELEASE_TAG
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(response);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
core.setFailed(error.message);
|
||||||
|
}
|
17
calcom/.github/workflows/release.yml
vendored
Normal file
17
calcom/.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
# Pattern matched against refs/tags
|
||||||
|
tags:
|
||||||
|
- "*" # Push events to every tag not containing /
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: main # Always checkout main even for tagged releases
|
||||||
|
fetch-depth: 0
|
||||||
|
token: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||||
|
- run: git push origin +main:production
|
39
calcom/.github/workflows/semantic-pull-requests.yml
vendored
Normal file
39
calcom/.github/workflows/semantic-pull-requests.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: "Validate PRs"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
- edited
|
||||||
|
- synchronize
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validate-pr:
|
||||||
|
name: Validate PR title
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: amannn/action-semantic-pull-request@v5
|
||||||
|
id: lint_pr_title
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: marocchino/sticky-pull-request-comment@v2
|
||||||
|
# When the previous steps fails, the workflow would stop. By adding this
|
||||||
|
# condition you can continue the execution with the populated error message.
|
||||||
|
if: always() && (steps.lint_pr_title.outputs.error_message != null)
|
||||||
|
with:
|
||||||
|
header: pr-title-lint-error
|
||||||
|
message: |
|
||||||
|
Hey there and thank you for opening this pull request! 👋🏼
|
||||||
|
|
||||||
|
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
|
||||||
|
|
||||||
|
Details:
|
||||||
|
|
||||||
|
```
|
||||||
|
${{ steps.lint_pr_title.outputs.error_message }}
|
||||||
|
```
|
21
calcom/.github/workflows/submodule-sync.yml
vendored
Normal file
21
calcom/.github/workflows/submodule-sync.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name: Submodule Sync
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
# Runs "At minute 15 past every 4th hour." (see https://crontab.guru)
|
||||||
|
- cron: "15 */4 * * *"
|
||||||
|
workflow_dispatch: ~
|
||||||
|
jobs:
|
||||||
|
submodule-sync:
|
||||||
|
name: Submodule update
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
token: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||||
|
- name: Commit
|
||||||
|
run: |
|
||||||
|
git config user.email "actions@github.com"
|
||||||
|
git config user.name "github-actions"
|
||||||
|
git commit -am "Auto updated submodule references" && git push || echo "No changes to commit"
|
22
calcom/.github/workflows/unit-tests.yml
vendored
Normal file
22
calcom/.github/workflows/unit-tests.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: Unit
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Unit
|
||||||
|
timeout-minutes: 20
|
||||||
|
runs-on: buildjet-2vcpu-ubuntu-2204
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: ./.github/actions/yarn-install
|
||||||
|
- run: yarn test
|
||||||
|
# We could add different timezones here that we need to run our tests in
|
||||||
|
- run: TZ=America/Los_Angeles yarn test -- --timeZoneDependentTestsOnly
|
||||||
|
- name: Run API v2 tests
|
||||||
|
working-directory: apps/api/v2
|
||||||
|
run: |
|
||||||
|
export NODE_OPTIONS="--max_old_space_size=8192"
|
||||||
|
yarn test
|
17
calcom/.github/workflows/yarn-install.yml
vendored
Normal file
17
calcom/.github/workflows/yarn-install.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
name: Yarn install
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
setup:
|
||||||
|
name: Yarn install & cache
|
||||||
|
runs-on: buildjet-4vcpu-ubuntu-2204
|
||||||
|
timeout-minutes: 10
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/dangerous-git-checkout
|
||||||
|
- uses: ./.github/actions/yarn-install
|
98
calcom/.gitignore
vendored
Normal file
98
calcom/.gitignore
vendored
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# .env file
|
||||||
|
.env
|
||||||
|
!packages/prisma/.env
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
node_modules
|
||||||
|
.pnp
|
||||||
|
.pnp.js
|
||||||
|
|
||||||
|
# testing
|
||||||
|
coverage
|
||||||
|
/test-results/
|
||||||
|
**/playwright/videos
|
||||||
|
**/playwright/screenshots
|
||||||
|
**/playwright/artifacts
|
||||||
|
**/playwright/results
|
||||||
|
**/playwright/reports/*
|
||||||
|
|
||||||
|
# next.js
|
||||||
|
.next/
|
||||||
|
out/
|
||||||
|
build
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
*.pem
|
||||||
|
|
||||||
|
# debug
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
|
|
||||||
|
# local env files
|
||||||
|
.env.local
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
!.env.appStore.example
|
||||||
|
|
||||||
|
# vercel
|
||||||
|
.vercel
|
||||||
|
|
||||||
|
# Webstorm
|
||||||
|
.idea
|
||||||
|
|
||||||
|
### VisualStudioCode template
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
*.code-workspace
|
||||||
|
|
||||||
|
# Local History for Visual Studio Code
|
||||||
|
.history/
|
||||||
|
|
||||||
|
# Typescript
|
||||||
|
tsconfig.tsbuildinfo
|
||||||
|
|
||||||
|
# turbo
|
||||||
|
.turbo
|
||||||
|
|
||||||
|
# Prisma generated files
|
||||||
|
packages/prisma/zod/*.ts
|
||||||
|
packages/prisma/enums
|
||||||
|
|
||||||
|
# Builds
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Linting
|
||||||
|
lint-results
|
||||||
|
|
||||||
|
#Storybook
|
||||||
|
apps/storybook/build-storybook.log
|
||||||
|
|
||||||
|
# Snaplet
|
||||||
|
.snaplet/snapshots
|
||||||
|
.snaplet/structure.d.ts
|
||||||
|
|
||||||
|
# Submodules
|
||||||
|
.gitmodules
|
||||||
|
apps/website
|
||||||
|
apps/console
|
||||||
|
apps/auth
|
||||||
|
|
||||||
|
# Yarn Modern
|
||||||
|
.pnp.*
|
||||||
|
.yarn/*
|
||||||
|
!.yarn/patches
|
||||||
|
!.yarn/plugins
|
||||||
|
!.yarn/releases
|
||||||
|
!.yarn/sdks
|
||||||
|
!.yarn/versions
|
45
calcom/.gitpod.yml
Normal file
45
calcom/.gitpod.yml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
tasks:
|
||||||
|
- init: |
|
||||||
|
yarn &&
|
||||||
|
cp .env.example .env &&
|
||||||
|
next_auth_secret=$(openssl rand -base64 32) &&
|
||||||
|
calendso_encryption_key=$(openssl rand -base64 24) &&
|
||||||
|
sed -i -e "s|^NEXTAUTH_SECRET=.*|NEXTAUTH_SECRET=$next_auth_secret|" \
|
||||||
|
-e "s|^CALENDSO_ENCRYPTION_KEY=.*|CALENDSO_ENCRYPTION_KEY=$calendso_encryption_key|" \
|
||||||
|
-e "s|http://localhost:3000|https://localhost:3000|" \
|
||||||
|
-e "s|localhost:3000|3000-$GITPOD_WORKSPACE_ID.$GITPOD_WORKSPACE_CLUSTER_HOST|" .env
|
||||||
|
command: yarn dx
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- port: 3000
|
||||||
|
visibility: public
|
||||||
|
onOpen: open-preview
|
||||||
|
- port: 5420
|
||||||
|
visibility: private
|
||||||
|
onOpen: ignore
|
||||||
|
- port: 1025
|
||||||
|
visibility: private
|
||||||
|
onOpen: ignore
|
||||||
|
- port: 8025
|
||||||
|
visibility: private
|
||||||
|
onOpen: ignore
|
||||||
|
|
||||||
|
github:
|
||||||
|
prebuilds:
|
||||||
|
master: true
|
||||||
|
pullRequests: true
|
||||||
|
pullRequestsFromForks: true
|
||||||
|
addCheck: true
|
||||||
|
addComment: true
|
||||||
|
addBadge: true
|
||||||
|
|
||||||
|
vscode:
|
||||||
|
extensions:
|
||||||
|
- DavidAnson.vscode-markdownlint
|
||||||
|
- yzhang.markdown-all-in-one
|
||||||
|
- esbenp.prettier-vscode
|
||||||
|
- dbaeumer.vscode-eslint
|
||||||
|
- bradlc.vscode-tailwindcss
|
||||||
|
- ban.spellright
|
||||||
|
- stripe.vscode-stripe
|
||||||
|
- Prisma.prisma
|
6
calcom/.husky/post-receive
Executable file
6
calcom/.husky/post-receive
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
echo "Updating submodules recursively"
|
||||||
|
pwd
|
||||||
|
git submodule update --init --recursive
|
6
calcom/.husky/pre-commit
Executable file
6
calcom/.husky/pre-commit
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
yarn lint-staged
|
||||||
|
|
||||||
|
yarn app-store:build && git add packages/app-store/*.generated.*
|
7
calcom/.kodiak.toml
Normal file
7
calcom/.kodiak.toml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
version = 1
|
||||||
|
|
||||||
|
[update]
|
||||||
|
autoupdate_label = "♻️ autoupdate"
|
||||||
|
|
||||||
|
[approve]
|
||||||
|
auto_approve_usernames = ["dependabot", "github-actions"]
|
2
calcom/.npmrc
Normal file
2
calcom/.npmrc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# used in tandem with package.json engine to only enable yarn
|
||||||
|
engine-strict=true
|
1
calcom/.nvmrc
Normal file
1
calcom/.nvmrc
Normal file
@ -0,0 +1 @@
|
|||||||
|
v18
|
20
calcom/.prettierignore
Normal file
20
calcom/.prettierignore
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
node_modules
|
||||||
|
.next
|
||||||
|
public
|
||||||
|
**/**/node_modules
|
||||||
|
**/**/.next
|
||||||
|
**/**/public
|
||||||
|
|
||||||
|
*.lock
|
||||||
|
*.log
|
||||||
|
|
||||||
|
.gitignore
|
||||||
|
.npmignore
|
||||||
|
.prettierignore
|
||||||
|
.DS_Store
|
||||||
|
.eslintignore
|
||||||
|
packages/prisma/zod
|
||||||
|
packages/prisma/enums
|
||||||
|
apps/web/public/embed
|
||||||
|
apps/api/v2/swagger/documentation.json
|
||||||
|
packages/ui/components/icon/dynamicIconImports.tsx
|
1
calcom/.prettierrc.js
Normal file
1
calcom/.prettierrc.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
module.exports = require("./packages/config/prettier-preset");
|
4
calcom/.snaplet/config.json
Normal file
4
calcom/.snaplet/config.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"projectId": "cl4u26bwz7962859ply7ibuo43t",
|
||||||
|
"targetDatabaseUrl": "postgresql://postgres@localhost:5450/calendso"
|
||||||
|
}
|
3
calcom/.snaplet/manifest.json
Normal file
3
calcom/.snaplet/manifest.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"version": "0.22.3"
|
||||||
|
}
|
267
calcom/.snaplet/transform.ts
Normal file
267
calcom/.snaplet/transform.ts
Normal file
@ -0,0 +1,267 @@
|
|||||||
|
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||||
|
/// <reference path=".snaplet/snaplet.d.ts" />
|
||||||
|
// This config was generated by Snaplet make sure to check it over before using it.
|
||||||
|
import { copycat as c } from "@snaplet/copycat";
|
||||||
|
import { defineConfig } from "snaplet";
|
||||||
|
|
||||||
|
// c.setHashKey(REPLACE_ME_WITH_YOUR_HASH_KEY);
|
||||||
|
|
||||||
|
function hasStringProp<T extends string>(x: unknown, key: T): x is { [key in T]: string } {
|
||||||
|
return !!x && typeof x === "object" && key in x;
|
||||||
|
}
|
||||||
|
|
||||||
|
function replaceKeyIfExists<T extends string>(x: object, key: T) {
|
||||||
|
if (hasStringProp(x, key)) {
|
||||||
|
return { ...x, [key]: c.uuid(x[key]) };
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
function generateSlug(x: string) {
|
||||||
|
return c.words(x, { max: 3 }).split(" ").join("-");
|
||||||
|
}
|
||||||
|
|
||||||
|
function replaceSensitiveKeys(record: object) {
|
||||||
|
return {
|
||||||
|
...record,
|
||||||
|
...replaceKeyIfExists(record, "client_id"),
|
||||||
|
...replaceKeyIfExists(record, "client_secret"),
|
||||||
|
...replaceKeyIfExists(record, "public_key"),
|
||||||
|
...replaceKeyIfExists(record, "api_key"),
|
||||||
|
...replaceKeyIfExists(record, "signing_secret"),
|
||||||
|
...replaceKeyIfExists(record, "access_token"),
|
||||||
|
...replaceKeyIfExists(record, "refresh_token"),
|
||||||
|
...replaceKeyIfExists(record, "stripe_user_id"),
|
||||||
|
...replaceKeyIfExists(record, "stripe_publishable_key"),
|
||||||
|
...replaceKeyIfExists(record, "accessToken"),
|
||||||
|
...replaceKeyIfExists(record, "refreshToken"),
|
||||||
|
...replaceKeyIfExists(record, "bot_user_id"),
|
||||||
|
...replaceKeyIfExists(record, "app_id"),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const generateUsername = (x: string) => `${c.firstName(x)}-${c.lastName(x)}${c.int(x, { min: 2, max: 99 })}`;
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
transform: {
|
||||||
|
$mode: "unsafe",
|
||||||
|
public: {
|
||||||
|
Account({ row }) {
|
||||||
|
return {
|
||||||
|
refresh_token: c.uuid(row.refresh_token),
|
||||||
|
access_token: c.uuid(row.access_token),
|
||||||
|
expires_at: c.int(row.expires_at, {
|
||||||
|
min: 0,
|
||||||
|
max: Math.pow(4, 8) - 1,
|
||||||
|
}),
|
||||||
|
token_type: c.uuid(row.token_type),
|
||||||
|
id_token: c.uuid(row.id_token),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
ApiKey: ({ row }) => ({
|
||||||
|
hashedKey: c.uuid(row.hashedKey),
|
||||||
|
note: c.fullName(row.note),
|
||||||
|
createdAt: c.dateString(row.createdAt, {
|
||||||
|
minYear: 2020,
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
App: ({ row }) => ({
|
||||||
|
keys: replaceSensitiveKeys(row.keys),
|
||||||
|
}),
|
||||||
|
App_RoutingForms_Form({ row }) {
|
||||||
|
return {
|
||||||
|
name: c.fullName(row.name),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
Attendee: ({ row }) => ({
|
||||||
|
email: c.email(row.email),
|
||||||
|
name: c.fullName(row.name),
|
||||||
|
timeZone: c.timezone(row.timeZone),
|
||||||
|
locale: c.fullName(row.locale),
|
||||||
|
}),
|
||||||
|
Availability({ row }) {
|
||||||
|
return {
|
||||||
|
startTime: c
|
||||||
|
.dateString(row.startTime, {
|
||||||
|
minYear: 2020,
|
||||||
|
})
|
||||||
|
.slice(11, 19),
|
||||||
|
endTime: c
|
||||||
|
.dateString(row.endTime, {
|
||||||
|
minYear: 2020,
|
||||||
|
})
|
||||||
|
.slice(11, 19),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
Booking({ row }) {
|
||||||
|
return {
|
||||||
|
title: c.fullName(row.title),
|
||||||
|
startTime: c.dateString(row.startTime, {
|
||||||
|
minYear: 2020,
|
||||||
|
}),
|
||||||
|
endTime: c.dateString(row.endTime, {
|
||||||
|
minYear: 2020,
|
||||||
|
}),
|
||||||
|
location: c.sentence(row.location),
|
||||||
|
metadata: {
|
||||||
|
[c.word(row.metadata)]: c.words(row.metadata),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
Credential: ({ row }) => ({
|
||||||
|
key: typeof row.key === "string" ? c.uuid(row.key) : replaceSensitiveKeys(row.key),
|
||||||
|
}),
|
||||||
|
EventType: ({ row }) => ({
|
||||||
|
slug: generateSlug(row.slug),
|
||||||
|
timeZone: c.timezone(row.timeZone),
|
||||||
|
eventName: c.words(row.eventName, { max: 3 }),
|
||||||
|
currency: c.sentence(row.currency),
|
||||||
|
}),
|
||||||
|
EventTypeCustomInput({ row }) {
|
||||||
|
return {
|
||||||
|
label: c.fullName(row.label),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
Feature({ row }) {
|
||||||
|
return {
|
||||||
|
slug: c.uuid(row.slug),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
InstantMeetingToken({ row }) {
|
||||||
|
return {
|
||||||
|
token: c.uuid(row.token),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
OAuthClient({ row }) {
|
||||||
|
return {
|
||||||
|
name: c.fullName(row.name),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
OutOfOfficeEntry({ row }) {
|
||||||
|
return {
|
||||||
|
start: c.dateString(row.start, {
|
||||||
|
minYear: 2020,
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
Payment({ row }) {
|
||||||
|
return {
|
||||||
|
amount: c.int(row.amount, {
|
||||||
|
min: 0,
|
||||||
|
max: Math.pow(4, 8) - 1,
|
||||||
|
}),
|
||||||
|
currency: c.sentence(row.currency),
|
||||||
|
data: {
|
||||||
|
[c.word(row.data)]: c.words(row.data),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
ResetPasswordRequest: ({ row }) => ({
|
||||||
|
email: c.email(row.email),
|
||||||
|
}),
|
||||||
|
Schedule: ({ row }) => ({
|
||||||
|
name: c.fullName(row.name),
|
||||||
|
timeZone: c.timezone(row.timeZone),
|
||||||
|
}),
|
||||||
|
Session({ row }) {
|
||||||
|
return {
|
||||||
|
sessionToken: c.uuid(row.sessionToken),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
Team: ({ row }) => ({
|
||||||
|
bio: c.sentence(row.bio),
|
||||||
|
name: c.words(row.name, { max: 2 }),
|
||||||
|
slug: generateSlug(row.slug),
|
||||||
|
timeZone: c.timezone(row.timeZone),
|
||||||
|
logoUrl: c.username(row.logoUrl),
|
||||||
|
}),
|
||||||
|
TempOrgRedirect({ row }) {
|
||||||
|
return {
|
||||||
|
from: c.dateString(row.from, {
|
||||||
|
maxYear: 1999,
|
||||||
|
}),
|
||||||
|
toUrl: c.city(row.toUrl),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
VerificationToken({ row }) {
|
||||||
|
return {
|
||||||
|
id: c
|
||||||
|
.int(row.id, {
|
||||||
|
min: 1,
|
||||||
|
max: Math.pow(4, 8) - 1,
|
||||||
|
})
|
||||||
|
.toString(),
|
||||||
|
identifier: c.uuid(row.identifier),
|
||||||
|
token: c.uuid(row.token),
|
||||||
|
expires: c.dateString(row.expires, {
|
||||||
|
minYear: 2020,
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
VerifiedNumber({ row }) {
|
||||||
|
return {
|
||||||
|
phoneNumber: c.phoneNumber(row.phoneNumber),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
Webhook({ row }) {
|
||||||
|
return {
|
||||||
|
subscriberUrl: c.url(row.subscriberUrl),
|
||||||
|
secret: c.streetAddress(row.secret),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
WebhookScheduledTriggers({ row }) {
|
||||||
|
return {
|
||||||
|
jobName: c.fullName(row.jobName),
|
||||||
|
payload: c.password(row.payload),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
WorkflowStep({ row }) {
|
||||||
|
return {
|
||||||
|
sendTo: c.oneOf(row.sendTo, [
|
||||||
|
"Man",
|
||||||
|
"Woman",
|
||||||
|
"Transgender",
|
||||||
|
"Non-binary/non-conforming",
|
||||||
|
"Not specified",
|
||||||
|
]),
|
||||||
|
sender: c.oneOf(row.sender, [
|
||||||
|
"Man",
|
||||||
|
"Woman",
|
||||||
|
"Transgender",
|
||||||
|
"Non-binary/non-conforming",
|
||||||
|
"Not specified",
|
||||||
|
]),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
users: ({ row }) =>
|
||||||
|
row.role !== "ADMIN"
|
||||||
|
? {
|
||||||
|
bio: c.sentence(row.bio),
|
||||||
|
email: c.email(row.email),
|
||||||
|
name: c.fullName(row.name),
|
||||||
|
password: c.password(row.password),
|
||||||
|
timeZone: c.timezone(row.timeZone),
|
||||||
|
username: generateUsername(row.username),
|
||||||
|
metadata: {
|
||||||
|
[c.word(row.metadata)]: c.words(row.metadata),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: row,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
subset: {
|
||||||
|
enabled: true,
|
||||||
|
version: "3",
|
||||||
|
targets: [
|
||||||
|
{
|
||||||
|
table: "public.users",
|
||||||
|
rowLimit: 100,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
keepDisconnectedTables: false,
|
||||||
|
followNullableRelations: true,
|
||||||
|
maxCyclesLoop: 0,
|
||||||
|
eager: false,
|
||||||
|
taskSortAlgorithm: "children",
|
||||||
|
},
|
||||||
|
});
|
14
calcom/.vscode/extensions.json
vendored
Normal file
14
calcom/.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"DavidAnson.vscode-markdownlint", // markdown linting
|
||||||
|
"yzhang.markdown-all-in-one", // nicer markdown support
|
||||||
|
"esbenp.prettier-vscode", // prettier plugin
|
||||||
|
"dbaeumer.vscode-eslint", // eslint plugin
|
||||||
|
"bradlc.vscode-tailwindcss", // hinting / autocompletion for tailwind
|
||||||
|
"ban.spellright", // Spell check for docs
|
||||||
|
"stripe.vscode-stripe", // stripe VSCode extension
|
||||||
|
"Prisma.prisma", // syntax|format|completion for prisma
|
||||||
|
"rebornix.project-snippets", // Share useful snippets between collaborators
|
||||||
|
"inlang.vs-code-extension" // improved i18n DX
|
||||||
|
]
|
||||||
|
}
|
21
calcom/.vscode/launch.json
vendored
Normal file
21
calcom/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "Next.js Node Debug",
|
||||||
|
"runtimeExecutable": "${workspaceFolder}/node_modules/next/dist/bin/next",
|
||||||
|
"env": {
|
||||||
|
"NODE_OPTIONS": "--inspect"
|
||||||
|
},
|
||||||
|
"cwd": "${workspaceFolder}/apps/web",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"sourceMapPathOverrides": {
|
||||||
|
"meteor://💻app/*": "${workspaceFolder}/*",
|
||||||
|
"webpack:///./~/*": "${workspaceFolder}/node_modules/*",
|
||||||
|
"webpack://?:*/*": "${workspaceFolder}/*"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
11
calcom/.vscode/settings.json
vendored
Normal file
11
calcom/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
|
"editor.formatOnSave": false,
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"source.fixAll.eslint": "explicit"
|
||||||
|
},
|
||||||
|
"typescript.preferences.importModuleSpecifier": "non-relative",
|
||||||
|
"spellright.language": ["en"],
|
||||||
|
"spellright.documentTypes": ["markdown", "typescript", "typescriptreact"],
|
||||||
|
"tailwindCSS.experimental.classRegex": [["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]]
|
||||||
|
}
|
74
calcom/.vscode/tasks.json
vendored
Normal file
74
calcom/.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"presentation": {
|
||||||
|
"echo": false,
|
||||||
|
"reveal": "always",
|
||||||
|
"focus": false,
|
||||||
|
"panel": "dedicated",
|
||||||
|
"showReuseMessage": true
|
||||||
|
},
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "Launch Cal.com Development terminals",
|
||||||
|
"dependsOn": [
|
||||||
|
"Web App(3000)",
|
||||||
|
"Website(3001)",
|
||||||
|
"Embed Core(3100)",
|
||||||
|
"Embed React(3101)",
|
||||||
|
"Prisma Studio(5555)",
|
||||||
|
"Maildev(587)"
|
||||||
|
],
|
||||||
|
// Mark as the default build task so cmd/ctrl+shift+b will create them
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// The name that shows up in terminal tab
|
||||||
|
"label": "Web App(3000)",
|
||||||
|
// The task will launch a shell
|
||||||
|
"type": "shell",
|
||||||
|
"command": "yarn dev",
|
||||||
|
// Set the shell type
|
||||||
|
// Mark as a background task to avoid the spinner animation on the terminal tab
|
||||||
|
"isBackground": false,
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Website(3001)",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "cd apps/website && yarn dev",
|
||||||
|
"isBackground": false,
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Embed Core(3100)",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "cd packages/embeds/embed-core && yarn dev",
|
||||||
|
"isBackground": false,
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Embed React(3101)",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "cd packages/embeds/embed-react && yarn dev",
|
||||||
|
"isBackground": false,
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Prisma Studio(5555)",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "yarn db-studio",
|
||||||
|
"isBackground": false,
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Maildev(587)",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "maildev -s 587",
|
||||||
|
"isBackground": false,
|
||||||
|
"problemMatcher": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
4
calcom/.well-known/security.txt
Normal file
4
calcom/.well-known/security.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Contact: security@cal.com
|
||||||
|
Preferred-Languages: en
|
||||||
|
Canonical: https://cal.com/.well-known/security.txt
|
||||||
|
Policy: https://github.com/calcom/cal.com/security/policy
|
8
calcom/.yarn/patches/dayjs-npm-1.11.2-644b12fe04.patch
Normal file
8
calcom/.yarn/patches/dayjs-npm-1.11.2-644b12fe04.patch
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
diff --git a/plugin/timezone.js b/plugin/timezone.js
|
||||||
|
index fb6112a96f03f53ba78162ac323dce17f635161d..991e4e5410a32f5a69cb6e0e9476a9c529657aae 100644
|
||||||
|
--- a/plugin/timezone.js
|
||||||
|
+++ b/plugin/timezone.js
|
||||||
|
@@ -1 +1 @@
|
||||||
|
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_timezone=e()}(this,(function(){"use strict";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,a=function(t,n,i){void 0===i&&(i={});var o=new Date(t),r=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=t+"|"+i,r=e[o];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),e[o]=r),r}(n,i);return r.formatToParts(o)},u=function(e,n){for(var i=a(e,n),r=[],u=0;u<i.length;u+=1){var f=i[u],s=f.type,m=f.value,c=t[s];c>=0&&(r[c]=parseInt(m,10))}var d=r[3],l=24===d?0:d,v=r[0]+"-"+r[1]+"-"+r[2]+" "+l+":"+r[4]+":"+r[5]+":000",h=+e;return(o.utc(v).valueOf()-(h-=h%1e3))/6e4},f=i.prototype;f.tz=function(t,e){void 0===t&&(t=r);var n=this.utcOffset(),i=this.toDate(),a=i.toLocaleString("en-US",{timeZone:t}),u=Math.round((i-new Date(a))/1e3/60),f=o(a).$set("millisecond",this.$ms).utcOffset(15*-Math.round(i.getTimezoneOffset()/15)-u,!0);if(e){var s=f.utcOffset();f=f.add(n-s,"minute")}return f.$x.$timezone=t,f},f.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return"timezonename"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return s.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,f=u(+o(),a);if("string"!=typeof t)return o(t).tz(a);var s=function(t,e,n){var i=t-60*e*1e3,o=u(i,n);if(e===o)return[i,e];var r=u(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),f,a),m=s[0],c=s[1],d=o(m).utcOffset(c);return d.$x.$timezone=a,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t}}}));
|
||||||
|
\ No newline at end of file
|
||||||
|
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_timezone=e()}(this,(function(){"use strict";function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},t.apply(this,arguments)}var e={year:0,month:1,day:2,hour:3,minute:4,second:5},n={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},i={},r={};return function(o,a,u){var f,s=function(e,r,o){void 0===o&&(o={});var a=new Date(e),u=function(e,r){void 0===r&&(r={});var o=r.timeZoneName||"short",a=e+"|"+o,u=i[a];return u||(u=new Intl.DateTimeFormat("en-US",t({},n,{hour12:!1,timeZone:e,timeZoneName:o})),i[a]=u),u}(r,o);return u.formatToParts(a)},m=function(t,n){for(var i=s(t,n),r=[],o=0;o<i.length;o+=1){var a=i[o],f=a.type,m=a.value,c=e[f];c>=0&&(r[c]=parseInt(m,10))}var l=r[3],d=24===l?0:l,h=r[0]+"-"+r[1]+"-"+r[2]+" "+d+":"+r[4]+":"+r[5]+":000",v=+t;return(u.utc(h).valueOf()-(v-=v%1e3))/6e4},c=a.prototype;c.tz=function(e,i){void 0===e&&(e=f);var o=this.utcOffset(),a=this.toDate(),s=function(e){var i=r[e];return i||(i=new Intl.DateTimeFormat("en-US",t({},n,{timeZone:e})),r[e]=i),i}(e).format(a),m=Math.round((a-new Date(s))/1e3/60),c=u(s,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(15*-Math.round(a.getTimezoneOffset()/15)-m,!0);if(i){var l=c.utcOffset();c=c.add(o-l,"minute")}return c.$x.$timezone=e,c},c.offsetName=function(t){var e=this.$x.$timezone||u.tz.guess(),n=s(this.valueOf(),e,{timeZoneName:t}).find((function(t){return"timezonename"===t.type.toLowerCase()}));return n&&n.value};var l=c.startOf;c.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return l.call(this,t,e);var n=u(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(n,t,e).tz(this.$x.$timezone,!0)},u.tz=function(t,e,n){var i=n&&e,r=n||e||f,o=m(+u(),r);if("string"!=typeof t)return u(t).tz(r);var a=function(t,e,n){var i=t-60*e*1e3,r=m(i,n);if(e===r)return[i,e];var o=m(i-=60*(r-e)*1e3,n);return r===o?[i,r]:[t-60*Math.min(r,o)*1e3,Math.max(r,o)]}(u.utc(t,i).valueOf(),o,r),s=a[0],c=a[1],l=u(s).utcOffset(c);return l.$x.$timezone=r,l},u.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},u.tz.setDefault=function(t){f=t}}}));
|
8
calcom/.yarn/patches/dayjs-npm-1.11.4-97921cd375.patch
Normal file
8
calcom/.yarn/patches/dayjs-npm-1.11.4-97921cd375.patch
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
diff --git a/plugin/timezone.js b/plugin/timezone.js
|
||||||
|
index fb6112a96f03f53ba78162ac323dce17f635161d..991e4e5410a32f5a69cb6e0e9476a9c529657aae 100644
|
||||||
|
--- a/plugin/timezone.js
|
||||||
|
+++ b/plugin/timezone.js
|
||||||
|
@@ -1 +1 @@
|
||||||
|
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_timezone=e()}(this,(function(){"use strict";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,a=function(t,n,i){void 0===i&&(i={});var o=new Date(t),r=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=t+"|"+i,r=e[o];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),e[o]=r),r}(n,i);return r.formatToParts(o)},u=function(e,n){for(var i=a(e,n),r=[],u=0;u<i.length;u+=1){var f=i[u],s=f.type,m=f.value,c=t[s];c>=0&&(r[c]=parseInt(m,10))}var d=r[3],l=24===d?0:d,v=r[0]+"-"+r[1]+"-"+r[2]+" "+l+":"+r[4]+":"+r[5]+":000",h=+e;return(o.utc(v).valueOf()-(h-=h%1e3))/6e4},f=i.prototype;f.tz=function(t,e){void 0===t&&(t=r);var n=this.utcOffset(),i=this.toDate(),a=i.toLocaleString("en-US",{timeZone:t}),u=Math.round((i-new Date(a))/1e3/60),f=o(a).$set("millisecond",this.$ms).utcOffset(15*-Math.round(i.getTimezoneOffset()/15)-u,!0);if(e){var s=f.utcOffset();f=f.add(n-s,"minute")}return f.$x.$timezone=t,f},f.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return"timezonename"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return s.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,f=u(+o(),a);if("string"!=typeof t)return o(t).tz(a);var s=function(t,e,n){var i=t-60*e*1e3,o=u(i,n);if(e===o)return[i,e];var r=u(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),f,a),m=s[0],c=s[1],d=o(m).utcOffset(c);return d.$x.$timezone=a,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t}}}));
|
||||||
|
\ No newline at end of file
|
||||||
|
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_timezone=e()}(this,(function(){"use strict";function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},t.apply(this,arguments)}var e={year:0,month:1,day:2,hour:3,minute:4,second:5},n={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},i={},r={};return function(o,a,u){var f,s=function(e,r,o){void 0===o&&(o={});var a=new Date(e),u=function(e,r){void 0===r&&(r={});var o=r.timeZoneName||"short",a=e+"|"+o,u=i[a];return u||(u=new Intl.DateTimeFormat("en-US",t({},n,{hour12:!1,timeZone:e,timeZoneName:o})),i[a]=u),u}(r,o);return u.formatToParts(a)},m=function(t,n){for(var i=s(t,n),r=[],o=0;o<i.length;o+=1){var a=i[o],f=a.type,m=a.value,c=e[f];c>=0&&(r[c]=parseInt(m,10))}var l=r[3],d=24===l?0:l,h=r[0]+"-"+r[1]+"-"+r[2]+" "+d+":"+r[4]+":"+r[5]+":000",v=+t;return(u.utc(h).valueOf()-(v-=v%1e3))/6e4},c=a.prototype;c.tz=function(e,i){void 0===e&&(e=f);var o=this.utcOffset(),a=this.toDate(),s=function(e){var i=r[e];return i||(i=new Intl.DateTimeFormat("en-US",t({},n,{timeZone:e})),r[e]=i),i}(e).format(a),m=Math.round((a-new Date(s))/1e3/60),c=u(s,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(15*-Math.round(a.getTimezoneOffset()/15)-m,!0);if(i){var l=c.utcOffset();c=c.add(o-l,"minute")}return c.$x.$timezone=e,c},c.offsetName=function(t){var e=this.$x.$timezone||u.tz.guess(),n=s(this.valueOf(),e,{timeZoneName:t}).find((function(t){return"timezonename"===t.type.toLowerCase()}));return n&&n.value};var l=c.startOf;c.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return l.call(this,t,e);var n=u(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(n,t,e).tz(this.$x.$timezone,!0)},u.tz=function(t,e,n){var i=n&&e,r=n||e||f,o=m(+u(),r);if("string"!=typeof t)return u(t).tz(r);var a=function(t,e,n){var i=t-60*e*1e3,r=m(i,n);if(e===r)return[i,e];var o=m(i-=60*(r-e)*1e3,n);return r===o?[i,r]:[t-60*Math.min(r,o)*1e3,Math.max(r,o)]}(u.utc(t,i).valueOf(),o,r),s=a[0],c=a[1],l=u(s).utcOffset(c);return l.$x.$timezone=r,l},u.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},u.tz.setDefault=function(t){f=t}}}));
|
@ -0,0 +1,15 @@
|
|||||||
|
diff --git a/index.cjs b/index.cjs
|
||||||
|
index c83f700ae9998cd87b4c2d66ecbb2ad3d7b4603c..76a2200b57f0b9243e2c61464d578b67746ad5a4 100644
|
||||||
|
--- a/index.cjs
|
||||||
|
+++ b/index.cjs
|
||||||
|
@@ -13,8 +13,8 @@ function withMetadataArgument(func, _arguments) {
|
||||||
|
// https://github.com/babel/babel/issues/2212#issuecomment-131827986
|
||||||
|
// An alternative approach:
|
||||||
|
// https://www.npmjs.com/package/babel-plugin-add-module-exports
|
||||||
|
-exports = module.exports = min.parsePhoneNumberFromString
|
||||||
|
-exports['default'] = min.parsePhoneNumberFromString
|
||||||
|
+// exports = module.exports = min.parsePhoneNumberFromString
|
||||||
|
+// exports['default'] = min.parsePhoneNumberFromString
|
||||||
|
|
||||||
|
// `parsePhoneNumberFromString()` named export is now considered legacy:
|
||||||
|
// it has been promoted to a default export due to being too verbose.
|
@ -0,0 +1,26 @@
|
|||||||
|
diff --git a/dist/commonjs/serverSideTranslations.js b/dist/commonjs/serverSideTranslations.js
|
||||||
|
index bcad3d02fbdfab8dacb1d85efd79e98623a0c257..fff668f598154a13c4030d1b4a90d5d9c18214ad 100644
|
||||||
|
--- a/dist/commonjs/serverSideTranslations.js
|
||||||
|
+++ b/dist/commonjs/serverSideTranslations.js
|
||||||
|
@@ -36,7 +36,6 @@ var _fs = _interopRequireDefault(require("fs"));
|
||||||
|
var _path = _interopRequireDefault(require("path"));
|
||||||
|
var _createConfig = require("./config/createConfig");
|
||||||
|
var _node = _interopRequireDefault(require("./createClient/node"));
|
||||||
|
-var _appWithTranslation = require("./appWithTranslation");
|
||||||
|
var _utils = require("./utils");
|
||||||
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
||||||
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
||||||
|
@@ -110,12 +109,8 @@ var serverSideTranslations = /*#__PURE__*/function () {
|
||||||
|
lng: initialLocale
|
||||||
|
}));
|
||||||
|
localeExtension = config.localeExtension, localePath = config.localePath, fallbackLng = config.fallbackLng, reloadOnPrerender = config.reloadOnPrerender;
|
||||||
|
- if (!reloadOnPrerender) {
|
||||||
|
- _context.next = 18;
|
||||||
|
- break;
|
||||||
|
- }
|
||||||
|
_context.next = 18;
|
||||||
|
- return _appWithTranslation.globalI18n === null || _appWithTranslation.globalI18n === void 0 ? void 0 : _appWithTranslation.globalI18n.reloadResources();
|
||||||
|
+ return void 0;
|
||||||
|
case 18:
|
||||||
|
_createClient = (0, _node["default"])(_objectSpread(_objectSpread({}, config), {}, {
|
||||||
|
lng: initialLocale
|
541
calcom/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
vendored
Normal file
541
calcom/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
vendored
Normal file
File diff suppressed because one or more lines are too long
28
calcom/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
vendored
Normal file
28
calcom/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
vendored
Normal file
File diff suppressed because one or more lines are too long
873
calcom/.yarn/releases/yarn-3.4.1.cjs
vendored
Executable file
873
calcom/.yarn/releases/yarn-3.4.1.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
9
calcom/.yarnrc.yml
Normal file
9
calcom/.yarnrc.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
nodeLinker: node-modules
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
|
||||||
|
spec: "@yarnpkg/plugin-interactive-tools"
|
||||||
|
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
|
||||||
|
spec: "@yarnpkg/plugin-workspace-tools"
|
||||||
|
|
||||||
|
yarnPath: .yarn/releases/yarn-3.4.1.cjs
|
128
calcom/CODE_OF_CONDUCT.md
Normal file
128
calcom/CODE_OF_CONDUCT.md
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
We as members, contributors, and leaders pledge to make participation in our
|
||||||
|
community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||||
|
identity and expression, level of experience, education, socio-economic status,
|
||||||
|
nationality, personal appearance, race, religion, or sexual identity
|
||||||
|
and orientation.
|
||||||
|
|
||||||
|
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||||
|
diverse, inclusive, and healthy community.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to a positive environment for our
|
||||||
|
community include:
|
||||||
|
|
||||||
|
- Demonstrating empathy and kindness toward other people
|
||||||
|
- Being respectful of differing opinions, viewpoints, and experiences
|
||||||
|
- Giving and gracefully accepting constructive feedback
|
||||||
|
- Accepting responsibility and apologizing to those affected by our mistakes,
|
||||||
|
and learning from the experience
|
||||||
|
- Focusing on what is best not just for us as individuals, but for the
|
||||||
|
overall community
|
||||||
|
|
||||||
|
Examples of unacceptable behavior include:
|
||||||
|
|
||||||
|
- The use of sexualized language or imagery, and sexual attention or
|
||||||
|
advances of any kind
|
||||||
|
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||||
|
- Public or private harassment
|
||||||
|
- Publishing others' private information, such as a physical or email
|
||||||
|
address, without their explicit permission
|
||||||
|
- Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Enforcement Responsibilities
|
||||||
|
|
||||||
|
Community leaders are responsible for clarifying and enforcing our standards of
|
||||||
|
acceptable behavior and will take appropriate and fair corrective action in
|
||||||
|
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||||
|
or harmful.
|
||||||
|
|
||||||
|
Community leaders have the right and responsibility to remove, edit, or reject
|
||||||
|
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||||
|
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||||
|
decisions when appropriate.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies within all community spaces, and also applies when
|
||||||
|
an individual is officially representing the community in public spaces.
|
||||||
|
Examples of representing our community include using an official e-mail address,
|
||||||
|
posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported to the community leaders responsible for enforcement at
|
||||||
|
bailey@cal.com.
|
||||||
|
All complaints will be reviewed and investigated promptly and fairly.
|
||||||
|
|
||||||
|
All community leaders are obligated to respect the privacy and security of the
|
||||||
|
reporter of any incident.
|
||||||
|
|
||||||
|
## Enforcement Guidelines
|
||||||
|
|
||||||
|
Community leaders will follow these Community Impact Guidelines in determining
|
||||||
|
the consequences for any action they deem in violation of this Code of Conduct:
|
||||||
|
|
||||||
|
### 1. Correction
|
||||||
|
|
||||||
|
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||||
|
unprofessional or unwelcome in the community.
|
||||||
|
|
||||||
|
**Consequence**: A private, written warning from community leaders, providing
|
||||||
|
clarity around the nature of the violation and an explanation of why the
|
||||||
|
behavior was inappropriate. A public apology may be requested.
|
||||||
|
|
||||||
|
### 2. Warning
|
||||||
|
|
||||||
|
**Community Impact**: A violation through a single incident or series
|
||||||
|
of actions.
|
||||||
|
|
||||||
|
**Consequence**: A warning with consequences for continued behavior. No
|
||||||
|
interaction with the people involved, including unsolicited interaction with
|
||||||
|
those enforcing the Code of Conduct, for a specified period of time. This
|
||||||
|
includes avoiding interactions in community spaces as well as external channels
|
||||||
|
like social media. Violating these terms may lead to a temporary or
|
||||||
|
permanent ban.
|
||||||
|
|
||||||
|
### 3. Temporary Ban
|
||||||
|
|
||||||
|
**Community Impact**: A serious violation of community standards, including
|
||||||
|
sustained inappropriate behavior.
|
||||||
|
|
||||||
|
**Consequence**: A temporary ban from any sort of interaction or public
|
||||||
|
communication with the community for a specified period of time. No public or
|
||||||
|
private interaction with the people involved, including unsolicited interaction
|
||||||
|
with those enforcing the Code of Conduct, is allowed during this period.
|
||||||
|
Violating these terms may lead to a permanent ban.
|
||||||
|
|
||||||
|
### 4. Permanent Ban
|
||||||
|
|
||||||
|
**Community Impact**: Demonstrating a pattern of violation of community
|
||||||
|
standards, including sustained inappropriate behavior, harassment of an
|
||||||
|
individual, or aggression toward or disparagement of classes of individuals.
|
||||||
|
|
||||||
|
**Consequence**: A permanent ban from any sort of public interaction within
|
||||||
|
the community.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||||
|
version 2.0, available at
|
||||||
|
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||||
|
|
||||||
|
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||||
|
enforcement ladder](https://github.com/mozilla/diversity).
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see the FAQ at
|
||||||
|
https://www.contributor-covenant.org/faq. Translations are available at
|
||||||
|
https://www.contributor-covenant.org/translations.
|
230
calcom/CONTRIBUTING.md
Normal file
230
calcom/CONTRIBUTING.md
Normal file
@ -0,0 +1,230 @@
|
|||||||
|
# Contributing to Cal.com
|
||||||
|
|
||||||
|
Contributions are what makes the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
|
||||||
|
|
||||||
|
## House rules
|
||||||
|
|
||||||
|
- Before submitting a new issue or PR, check if it already exists in [issues](https://github.com/calcom/cal.com/issues) or [PRs](https://github.com/calcom/cal.com/pulls).
|
||||||
|
- GitHub issues: take note of the `🚨 needs approval` label.
|
||||||
|
- **For Contributors**:
|
||||||
|
- Feature Requests: Wait for a core member to approve and remove the `🚨 needs approval` label before you start coding or submit a PR.
|
||||||
|
- Bugs, Security, Performance, Documentation, etc.: You can start coding immediately, even if the `🚨 needs approval` label is present. This label mainly concerns feature requests.
|
||||||
|
- **Our Process**:
|
||||||
|
- Issues from non-core members automatically receive the `🚨 needs approval` label.
|
||||||
|
- We greatly value new feature ideas. To ensure consistency in the product's direction, they undergo review and approval.
|
||||||
|
|
||||||
|
## Priorities
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Type of Issue
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
Priority
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Minor improvements, non-core feature requests
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/calcom/cal.com/issues?q=is:issue+is:open+sort:updated-desc+label:%22Low+priority%22">
|
||||||
|
<img src="https://img.shields.io/badge/-Low%20Priority-green">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Confusing UX (... but working)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/calcom/cal.com/issues?q=is:issue+is:open+sort:updated-desc+label:%22Medium+priority%22">
|
||||||
|
<img src="https://img.shields.io/badge/-Medium%20Priority-yellow">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Core Features (Booking page, availability, timezone calculation)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/calcom/cal.com/issues?q=is:issue+is:open+sort:updated-desc+label:%22High+priority%22">
|
||||||
|
<img src="https://img.shields.io/badge/-High%20Priority-orange">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Core Bugs (Login, Booking page, Emails are not working)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/calcom/cal.com/issues?q=is:issue+is:open+sort:updated-desc+label:Urgent">
|
||||||
|
<img src="https://img.shields.io/badge/-Urgent-red">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
## Developing
|
||||||
|
|
||||||
|
The development branch is `main`. This is the branch that all pull
|
||||||
|
requests should be made against. The changes on the `main`
|
||||||
|
branch are tagged into a release monthly.
|
||||||
|
|
||||||
|
To develop locally:
|
||||||
|
|
||||||
|
1. [Fork](https://github.com/calcom/cal.com/fork/) this repository to your
|
||||||
|
own GitHub account and then
|
||||||
|
[clone](https://help.github.com/articles/cloning-a-repository/) it to your local device.
|
||||||
|
2. Create a new branch:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git checkout -b MY_BRANCH_NAME
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Install yarn:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install -g yarn
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Install the dependencies with:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Set up your `.env` file:
|
||||||
|
|
||||||
|
- Duplicate `.env.example` to `.env`.
|
||||||
|
- Use `openssl rand -base64 32` to generate a key and add it under `NEXTAUTH_SECRET` in the `.env` file.
|
||||||
|
- Use `openssl rand -base64 32` to generate a key and add it under `CALENDSO_ENCRYPTION_KEY` in the `.env` file.
|
||||||
|
|
||||||
|
6. Setup Node
|
||||||
|
If your Node version does not meet the project's requirements as instructed by the docs, "nvm" (Node Version Manager) allows using Node at the version required by the project:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
nvm use
|
||||||
|
```
|
||||||
|
|
||||||
|
You first might need to install the specific version and then use it:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
nvm install && nvm use
|
||||||
|
```
|
||||||
|
|
||||||
|
You can install nvm from [here](https://github.com/nvm-sh/nvm).
|
||||||
|
|
||||||
|
7. Start developing and watch for code changes:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn dev
|
||||||
|
```
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
You can build the project with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
yarn build
|
||||||
|
```
|
||||||
|
|
||||||
|
Please be sure that you can make a full production build before pushing code.
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
More info on how to add new tests coming soon.
|
||||||
|
|
||||||
|
### Running tests
|
||||||
|
|
||||||
|
This will run and test all flows in multiple Chromium windows to verify that no critical flow breaks:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn test-e2e
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Resolving issues
|
||||||
|
|
||||||
|
##### E2E test browsers not installed
|
||||||
|
|
||||||
|
Run `npx playwright install` to download test browsers and resolve the error below when running `yarn test-e2e`:
|
||||||
|
|
||||||
|
```
|
||||||
|
Executable doesn't exist at /Users/alice/Library/Caches/ms-playwright/chromium-1048/chrome-mac/Chromium.app/Contents/MacOS/Chromium
|
||||||
|
```
|
||||||
|
|
||||||
|
## Linting
|
||||||
|
|
||||||
|
To check the formatting of your code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn lint
|
||||||
|
```
|
||||||
|
|
||||||
|
If you get errors, be sure to fix them before committing.
|
||||||
|
|
||||||
|
## Making a Pull Request
|
||||||
|
|
||||||
|
- Be sure to [check the "Allow edits from maintainers" option](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) while creating your PR.
|
||||||
|
- If your PR refers to or fixes an issue, be sure to add `refs #XXX` or `fixes #XXX` to the PR description. Replacing `XXX` with the respective issue number. See more about [Linking a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).
|
||||||
|
- Be sure to fill the PR Template accordingly.
|
||||||
|
- Review [App Contribution Guidelines](./packages/app-store/CONTRIBUTING.md) when building integrations
|
||||||
|
|
||||||
|
## Guidelines for committing yarn lockfile
|
||||||
|
|
||||||
|
Do not commit your `yarn.lock` unless you've made changes to the `package.json`. If you've already committed `yarn.lock` unintentionally, follow these steps to undo:
|
||||||
|
|
||||||
|
If your last commit has the `yarn.lock` file alongside other files and you only wish to uncommit the `yarn.lock`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git checkout HEAD~1 yarn.lock
|
||||||
|
git commit -m "Revert yarn.lock changes"
|
||||||
|
```
|
||||||
|
|
||||||
|
_NB_: You may have to bypass the pre-commit hook with by appending `--no-verify` to the git commit
|
||||||
|
If you've pushed the commit with the `yarn.lock`:
|
||||||
|
|
||||||
|
1. Correct the commit locally using the above method.
|
||||||
|
2. Carefully force push:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git push origin <your-branch-name> --force
|
||||||
|
```
|
||||||
|
|
||||||
|
If `yarn.lock` was committed a while ago and there have been several commits since, you can use the following steps to revert just the `yarn.lock` changes without impacting the subsequent changes:
|
||||||
|
|
||||||
|
1. **Checkout a Previous Version**:
|
||||||
|
- Find the commit hash before the `yarn.lock` was unintentionally committed. You can do this by viewing the Git log:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git log yarn.lock
|
||||||
|
```
|
||||||
|
|
||||||
|
- Once you have identified the commit hash, use it to checkout the previous version of `yarn.lock`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git checkout <commit_hash> yarn.lock
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Commit the Reverted Version**:
|
||||||
|
- After checking out the previous version of the `yarn.lock`, commit this change:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git commit -m "Revert yarn.lock to its state before unintended changes"
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Proceed with Caution**:
|
||||||
|
- If you need to push this change, first pull the latest changes from your remote branch to ensure you're not overwriting other recent changes:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git pull origin <your-branch-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
- Then push the updated branch:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git push origin <your-branch-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
Lastly, make sure to keep the branches updated (e.g. click the `Update branch` button on GitHub PR).
|
670
calcom/LICENSE
Normal file
670
calcom/LICENSE
Normal file
@ -0,0 +1,670 @@
|
|||||||
|
Copyright (c) 2020-present Cal.com, Inc.
|
||||||
|
|
||||||
|
Portions of this software are licensed as follows:
|
||||||
|
|
||||||
|
* All content that resides under https://github.com/calcom/cal.com/tree/main/packages/features/ee and
|
||||||
|
https://github.com/calcom/cal.com/tree/main/apps/api/v2/src/ee directory of this repository (Commercial License) is licensed under the license defined in "ee/LICENSE".
|
||||||
|
* All third party components incorporated into the Cal.com Software are licensed under the original license provided by the owner of the applicable component.
|
||||||
|
* Content outside of the above mentioned directories or restrictions above is available under the "AGPLv3" license as defined below.
|
||||||
|
|
||||||
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU Affero General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works, specifically designed to ensure
|
||||||
|
cooperation with the community in the case of network server software.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
our General Public Licenses are intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
Developers that use our General Public Licenses protect your rights
|
||||||
|
with two steps: (1) assert copyright on the software, and (2) offer
|
||||||
|
you this License which gives you legal permission to copy, distribute
|
||||||
|
and/or modify the software.
|
||||||
|
|
||||||
|
A secondary benefit of defending all users' freedom is that
|
||||||
|
improvements made in alternate versions of the program, if they
|
||||||
|
receive widespread use, become available for other developers to
|
||||||
|
incorporate. Many developers of free software are heartened and
|
||||||
|
encouraged by the resulting cooperation. However, in the case of
|
||||||
|
software used on network servers, this result may fail to come about.
|
||||||
|
The GNU General Public License permits making a modified version and
|
||||||
|
letting the public access it on a server without ever releasing its
|
||||||
|
source code to the public.
|
||||||
|
|
||||||
|
The GNU Affero General Public License is designed specifically to
|
||||||
|
ensure that, in such cases, the modified source code becomes available
|
||||||
|
to the community. It requires the operator of a network server to
|
||||||
|
provide the source code of the modified version running there to the
|
||||||
|
users of that server. Therefore, public use of a modified version, on
|
||||||
|
a publicly accessible server, gives the public access to the source
|
||||||
|
code of the modified version.
|
||||||
|
|
||||||
|
An older license, called the Affero General Public License and
|
||||||
|
published by Affero, was designed to accomplish similar goals. This is
|
||||||
|
a different license, not a version of the Affero GPL, but Affero has
|
||||||
|
released a new version of the Affero GPL which permits relicensing under
|
||||||
|
this license.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, if you modify the
|
||||||
|
Program, your modified version must prominently offer all users
|
||||||
|
interacting with it remotely through a computer network (if your version
|
||||||
|
supports such interaction) an opportunity to receive the Corresponding
|
||||||
|
Source of your version by providing access to the Corresponding Source
|
||||||
|
from a network server at no charge, through some standard or customary
|
||||||
|
means of facilitating copying of software. This Corresponding Source
|
||||||
|
shall include the Corresponding Source for any work covered by version 3
|
||||||
|
of the GNU General Public License that is incorporated pursuant to the
|
||||||
|
following paragraph.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the work with which it is combined will remain governed by version
|
||||||
|
3 of the GNU General Public License.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU Affero General Public License from time to time. Such new versions
|
||||||
|
will be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU Affero General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU Affero General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU Affero General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published
|
||||||
|
by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If your software can interact with users remotely through a computer
|
||||||
|
network, you should also make sure that it provides a way for users to
|
||||||
|
get its source. For example, if your program is a web application, its
|
||||||
|
interface could display a "Source" link that leads users to an archive
|
||||||
|
of the code. There are many ways you could offer source, and different
|
||||||
|
solutions will be better for different programs; see section 13 for the
|
||||||
|
specific requirements.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
1
calcom/Procfile
Normal file
1
calcom/Procfile
Normal file
@ -0,0 +1 @@
|
|||||||
|
web: npx turbo run @calcom/web#start
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user