refactor: Remove circular deps between @calcom/lib and @calcom/features [1] (#24399)
* add eslint config * migrate autoLock to features * migrate teamService to features * migrate userCreationService * migrate insights services to features * migrate ProfileRepository * update imports * migrate filter segmen tests * migrate filter segment repository * migrate getBusyTimes * migrate getLocaleFromRequest * refactor csvUtils * make filename clearer * migrate getLuckyUser integration test * migrate autoLock test to features * wip * refactors * migrate useBookerUrl * migrate more * wip * Migrate eventTypeRepository * membership repository * update imports * update imports * migrate * move organization repository * update imports * update imports * wip * wip * wip * wip * wip * wip * wip * wip * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix tests * fix type checks * fix * fix * migrate * update imports * fix tests * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix
This commit is contained in:
1 parent
1dc20e3aec
commit
ff38d6c7db
339 files changed
+876
-833
No files matched your search
@@ -6,7 +6,7 @@ import type { IntervalLimit } from "@calcom/lib/intervalLimits/intervalLimitSche
|
||||
import { validateIntervalLimitOrder } from "@calcom/lib/intervalLimits/validateIntervalLimitOrder";
|
||||
|
||||
const mockCountBookingsByEventTypeAndDateRange = vi.fn();
|
||||
vi.mock("@calcom/lib/server/repository/booking", () => ({
|
||||
vi.mock("@calcom/features/bookings/repositories/BookingRepository", () => ({
|
||||
BookingRepository: vi.fn().mockImplementation(() => ({
|
||||
countBookingsByEventTypeAndDateRange: mockCountBookingsByEventTypeAndDateRange,
|
||||
})),
|
||||
|
||||
@@ -4,11 +4,11 @@ import dayjs from "@calcom/dayjs";
|
||||
import {
|
||||
checkDurationLimit,
|
||||
checkDurationLimits,
|
||||
} from "@calcom/lib/intervalLimits/server/checkDurationLimits";
|
||||
} from "@calcom/features/bookings/lib/checkDurationLimits";
|
||||
import { validateIntervalLimitOrder } from "@calcom/lib/intervalLimits/validateIntervalLimitOrder";
|
||||
|
||||
const mockGetTotalBookingDuration = vi.fn();
|
||||
vi.mock("@calcom/lib/server/repository/booking", () => ({
|
||||
vi.mock("@calcom/features/bookings/repositories/BookingRepository", () => ({
|
||||
BookingRepository: vi.fn().mockImplementation(() => ({
|
||||
getTotalBookingDuration: mockGetTotalBookingDuration,
|
||||
})),
|
||||
|
||||
@@ -2,7 +2,10 @@ import type { Table } from "@tanstack/react-table";
|
||||
import { describe, it, expect, vi } from "vitest";
|
||||
|
||||
import type { UserTableUser } from "@calcom/features/users/components/UserTable/types";
|
||||
import { generateCsvRawForMembersTable, generateHeaderFromReactTable } from "@calcom/lib/csvUtils";
|
||||
import {
|
||||
generateCsvRawForMembersTable,
|
||||
generateHeaderFromReactTable,
|
||||
} from "@calcom/features/users/lib/UserListTableUtils";
|
||||
import { MembershipRole } from "@calcom/prisma/enums";
|
||||
|
||||
function createMockTable(data: UserTableUser[]): Table<UserTableUser> {
|
||||
|
||||
@@ -14,7 +14,7 @@ import type { HttpError } from "@calcom/lib/http-error";
|
||||
import type { IntervalLimit } from "@calcom/lib/intervalLimits/intervalLimitSchema";
|
||||
import logger from "@calcom/lib/logger";
|
||||
import { safeStringify } from "@calcom/lib/safeStringify";
|
||||
import { ProfileRepository } from "@calcom/lib/server/repository/profile";
|
||||
import { ProfileRepository } from "@calcom/features/profile/repositories/ProfileRepository";
|
||||
import type { BookingReference, Attendee, Booking, Membership } from "@calcom/prisma/client";
|
||||
import type { Prisma } from "@calcom/prisma/client";
|
||||
import type { WebhookTriggerEvents } from "@calcom/prisma/client";
|
||||
|
||||
Reference in new issue
Block a user