diff --git a/.github/workflows/all-checks.yml b/.github/workflows/all-checks.yml index 5c7e98be81..8d033f754c 100644 --- a/.github/workflows/all-checks.yml +++ b/.github/workflows/all-checks.yml @@ -34,6 +34,11 @@ jobs: uses: ./.github/workflows/api-v2-production-build.yml secrets: inherit + build-atoms: + name: Production builds + uses: ./.github/workflows/atoms-production-build.yml + secrets: inherit + build: name: Production builds uses: ./.github/workflows/production-build-without-database.yml diff --git a/.github/workflows/atoms-production-build.yml b/.github/workflows/atoms-production-build.yml new file mode 100644 index 0000000000..bf56083ad9 --- /dev/null +++ b/.github/workflows/atoms-production-build.yml @@ -0,0 +1,40 @@ +name: Atoms production Build + +on: + workflow_call: + +jobs: + build: + name: Build atoms + permissions: + contents: read + 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 + - name: Cache atoms production build + uses: buildjet/cache@v4 + id: cache-atoms-build + env: + cache-name: atoms-build + key-1: ${{ hashFiles('yarn.lock') }} + key-2: ${{ hashFiles('packages/platform/atoms/**.[jt]s', 'packages/platform/atoms/**.[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-atoms-build.outputs.cache-hit }} == 'true' ]; then + echo "Cache hit for atoms build. Skipping build." + else + rm -rf packages/platform/atoms/node_modules + yarn install + yarn workspace @calcom/atoms run build + fi + shell: bash diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index eb2998c2fa..0dff38fd34 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -131,6 +131,13 @@ jobs: 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-atoms: + name: Production builds + needs: [changes, check-label, deps] + if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }} + uses: ./.github/workflows/atoms-production-build.yml + secrets: inherit build: name: Production builds diff --git a/apps/api/v2/package.json b/apps/api/v2/package.json index 95d521e2fd..ab4ab77b9d 100644 --- a/apps/api/v2/package.json +++ b/apps/api/v2/package.json @@ -10,7 +10,7 @@ "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "start": "nest start", "dev:build:watch": "yarn workspace @calcom/platform-constants build:watch & yarn workspace @calcom/platform-utils build:watch & yarn workspace @calcom/platform-types build:watch", - "dev:build": "yarn workspace @calcom/platform-constants build && yarn workspace @calcom/platform-utils build && yarn workspace @calcom/platform-types build", + "dev:build": "yarn workspace @calcom/platform-constants build && yarn workspace @calcom/platform-utils build && yarn workspace @calcom/platform-types build && yarn workspace @calcom/platform-enums build", "dev": "yarn dev:build && docker-compose up -d && yarn copy-swagger-module && yarn start --watch", "start:debug": "nest start --debug --watch", "start:prod": "node ./dist/apps/api/v2/src/main.js", @@ -25,6 +25,7 @@ }, "dependencies": { "@calcom/platform-constants": "*", + "@calcom/platform-enums": "*", "@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.28", "@calcom/platform-libraries-0.0.2": "npm:@calcom/platform-libraries@0.0.2", "@calcom/platform-types": "*", diff --git a/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts b/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts index e84c339c69..af4377bf6c 100644 --- a/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts +++ b/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts @@ -20,13 +20,13 @@ import { UserRepositoryFixture } from "test/fixtures/repository/users.repository import { withApiAuth } from "test/utils/withApiAuth"; import { CAL_API_VERSION_HEADER, SUCCESS_STATUS, VERSION_2024_06_14 } from "@calcom/platform-constants"; +import { BookingWindowPeriodInputTypeEnum_2024_06_14 } from "@calcom/platform-enums"; import { ApiSuccessResponse, CreateEventTypeInput_2024_06_14, EventTypeOutput_2024_06_14, UpdateEventTypeInput_2024_06_14, } from "@calcom/platform-types"; -import { BookingWindowPeriodInputTypeEnum_2024_06_14 } from "@calcom/platform-types/dist/event-types/event-types_2024_06_14/inputs/enums/booking-window.enum"; import { SchedulingType } from "@calcom/prisma/enums"; describe("Event types Endpoints", () => { diff --git a/apps/api/v2/src/modules/organizations/controllers/event-types/organizations-event-types.e2e-spec.ts b/apps/api/v2/src/modules/organizations/controllers/event-types/organizations-event-types.e2e-spec.ts index 7e24699cde..a95e32cc20 100644 --- a/apps/api/v2/src/modules/organizations/controllers/event-types/organizations-event-types.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/controllers/event-types/organizations-event-types.e2e-spec.ts @@ -17,6 +17,7 @@ import { UserRepositoryFixture } from "test/fixtures/repository/users.repository import { withApiAuth } from "test/utils/withApiAuth"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; +import { BookingWindowPeriodInputTypeEnum_2024_06_14 } from "@calcom/platform-enums"; import { ApiSuccessResponse, CreateTeamEventTypeInput_2024_06_14, @@ -24,7 +25,6 @@ import { TeamEventTypeOutput_2024_06_14, UpdateTeamEventTypeInput_2024_06_14, } from "@calcom/platform-types"; -import { BookingWindowPeriodInputTypeEnum_2024_06_14 } from "@calcom/platform-types/event-types/event-types_2024_06_14/inputs/enums/booking-window.enum"; import { Team } from "@calcom/prisma/client"; describe("Organizations Event Types Endpoints", () => { diff --git a/apps/api/v2/src/modules/organizations/services/event-types/input.service.ts b/apps/api/v2/src/modules/organizations/services/event-types/input.service.ts index f421a9dd6d..0e8c084fef 100644 --- a/apps/api/v2/src/modules/organizations/services/event-types/input.service.ts +++ b/apps/api/v2/src/modules/organizations/services/event-types/input.service.ts @@ -8,8 +8,8 @@ import { CreateTeamEventTypeInput_2024_06_14, UpdateTeamEventTypeInput_2024_06_14, HostPriority, - SchedulingType, } from "@calcom/platform-types"; +import { SchedulingType } from "@calcom/prisma/client"; @Injectable() export class InputOrganizationsEventTypesService { diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json index fb0e003961..54a00de6db 100644 --- a/apps/api/v2/swagger/documentation.json +++ b/apps/api/v2/swagger/documentation.json @@ -4955,6 +4955,9 @@ "items": { "$ref": "#/components/schemas/Source" } + }, + "disableOnPrefill": { + "type": "boolean" } }, "required": [ @@ -5529,6 +5532,9 @@ "items": { "$ref": "#/components/schemas/Source" } + }, + "disableOnPrefill": { + "type": "boolean" } }, "required": [ diff --git a/apps/web/package.json b/apps/web/package.json index 80dd202e13..f2b371cea6 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -36,6 +36,7 @@ "@calcom/embed-snippet": "workspace:*", "@calcom/features": "*", "@calcom/lib": "*", + "@calcom/platform-enums": "*", "@calcom/platform-types": "*", "@calcom/prisma": "*", "@calcom/trpc": "*", diff --git a/apps/web/public/icons/sprite.svg b/apps/web/public/icons/sprite.svg index e50f98860f..5d0c578415 100644 --- a/apps/web/public/icons/sprite.svg +++ b/apps/web/public/icons/sprite.svg @@ -92,6 +92,18 @@ + + + + + + + + + + + + diff --git a/packages/lib/event-types/transformers/api-request.ts b/packages/lib/event-types/transformers/api-request.ts index da5a3cdf97..2e29c976f7 100644 --- a/packages/lib/event-types/transformers/api-request.ts +++ b/packages/lib/event-types/transformers/api-request.ts @@ -1,21 +1,19 @@ import { z } from "zod"; -import type { - BookingLimitsKeyOutputType_2024_06_14, - TransformBookingLimitsSchema_2024_06_14, -} from "@calcom/platform-types"; +import { + BookingWindowPeriodInputTypeEnum_2024_06_14, + BookingWindowPeriodOutputTypeEnum_2024_06_14, + BookingLimitsEnum_2024_06_14, +} from "@calcom/platform-enums/monorepo"; import { type CreateEventTypeInput_2024_06_14, type Integration_2024_06_14, type BusinessDaysWindow_2024_06_14, type RangeWindow_2024_06_14, type TransformFutureBookingsLimitSchema_2024_06_14, + type BookingLimitsKeyOutputType_2024_06_14, + type TransformBookingLimitsSchema_2024_06_14, } from "@calcom/platform-types"; -import { - BookingWindowPeriodInputTypeEnum_2024_06_14, - BookingWindowPeriodOutputTypeEnum_2024_06_14, -} from "@calcom/platform-types/event-types/event-types_2024_06_14/inputs/enums/booking-window.enum"; -import { BookingLimitsEnum_2024_06_14 } from "@calcom/platform-types/event-types/event-types_2024_06_14/inputs/enums/interval-limits.enum"; const integrationsMapping: Record = { "cal-video": "integrations:daily", diff --git a/packages/lib/event-types/transformers/api-response.ts b/packages/lib/event-types/transformers/api-response.ts index 69d6e10d5e..46d402cb19 100644 --- a/packages/lib/event-types/transformers/api-response.ts +++ b/packages/lib/event-types/transformers/api-response.ts @@ -1,3 +1,8 @@ +import { + BookingWindowPeriodInputTypeEnum_2024_06_14, + BookingWindowPeriodOutputTypeEnum_2024_06_14, + BookingLimitsEnum_2024_06_14, +} from "@calcom/platform-enums/monorepo"; import type { AddressLocation_2024_06_14, IntegrationLocation_2024_06_14, @@ -13,11 +18,6 @@ import type { BusinessDaysWindow_2024_06_14, BookingField_2024_06_14, } from "@calcom/platform-types"; -import { - BookingWindowPeriodInputTypeEnum_2024_06_14, - BookingWindowPeriodOutputTypeEnum_2024_06_14, -} from "@calcom/platform-types/event-types/event-types_2024_06_14/inputs/enums/booking-window.enum"; -import { BookingLimitsEnum_2024_06_14 } from "@calcom/platform-types/event-types/event-types_2024_06_14/inputs/enums/interval-limits.enum"; import type { transformApiEventTypeBookingFields, transformApiEventTypeLocations } from "./api-request"; diff --git a/packages/platform/atoms/connect/apple/AppleConnect.tsx b/packages/platform/atoms/connect/apple/AppleConnect.tsx index 83e655f58a..128cd97099 100644 --- a/packages/platform/atoms/connect/apple/AppleConnect.tsx +++ b/packages/platform/atoms/connect/apple/AppleConnect.tsx @@ -76,7 +76,7 @@ export const AppleConnect: FC>> = ({