Skip to content

Commit 1e53786

Browse files
committed
refactor: Run Project Name - Test
1 parent 5a1e1e2 commit 1e53786

File tree

86 files changed

+186
-224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+186
-224
lines changed

apps/api/v1/pages/api/slots/_get.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ describe("GET /api/slots", () => {
6565
});
6666
buildMockData();
6767
await handler(req, res);
68-
console.log({ statusCode: res._getStatusCode(), data: JSON.parse(res._getData()) });
68+
logger.log({ statusCode: res._getStatusCode(), data: JSON.parse(res._getData()) });
6969
const response = JSON.parse(res._getData());
7070
expect(response.slots).toEqual(expect.objectContaining({}));
7171
});
@@ -83,7 +83,7 @@ describe("GET /api/slots", () => {
8383
});
8484
buildMockData();
8585
await handler(req, res);
86-
console.log({ statusCode: res._getStatusCode(), data: JSON.parse(res._getData()) });
86+
logger.log({ statusCode: res._getStatusCode(), data: JSON.parse(res._getData()) });
8787
const response = JSON.parse(res._getData());
8888
expect(response.slots).toEqual(expect.objectContaining({}));
8989
});

apps/api/v1/test/lib/bookings/_get.integration-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ describe("GET /api/bookings", async () => {
355355
.filter(([_, count]) => count > 1)
356356
.map(([id]) => id);
357357

358-
console.log(`Found duplicate booking IDs: ${duplicates.join(", ")}`);
358+
logger.log(`Found duplicate booking IDs: ${duplicates.join(", ")}`);
359359
}
360360
});
361361
});

apps/api/v1/test/lib/bookings/_post.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ describe.skipIf(true)("POST /api/bookings", () => {
146146
prismaMock.eventType.findUniqueOrThrow.mockResolvedValue(buildEventType());
147147

148148
await handler(req, res);
149-
console.log({ statusCode: res._getStatusCode(), data: JSON.parse(res._getData()) });
149+
logger.log({ statusCode: res._getStatusCode(), data: JSON.parse(res._getData()) });
150150

151151
expect(res._getStatusCode()).toBe(500);
152152
expect(JSON.parse(res._getData())).toEqual(
@@ -183,7 +183,7 @@ describe.skipIf(true)("POST /api/bookings", () => {
183183
prismaMock.booking.findMany.mockResolvedValue([]);
184184

185185
await handler(req, res);
186-
console.log({ statusCode: res._getStatusCode(), data: JSON.parse(res._getData()) });
186+
logger.log({ statusCode: res._getStatusCode(), data: JSON.parse(res._getData()) });
187187
createdBooking = JSON.parse(res._getData());
188188
expect(prismaMock.booking.create).toHaveBeenCalledTimes(1);
189189
});
@@ -212,7 +212,7 @@ describe.skipIf(true)("POST /api/bookings", () => {
212212
prismaMock.booking.findMany.mockResolvedValue([]);
213213

214214
await handler(req, res);
215-
console.log({ statusCode: res._getStatusCode(), data: JSON.parse(res._getData()) });
215+
logger.log({ statusCode: res._getStatusCode(), data: JSON.parse(res._getData()) });
216216
const rescheduledBooking = JSON.parse(res._getData()) as Booking;
217217
expect(prismaMock.booking.create).toHaveBeenCalledTimes(1);
218218
expect(rescheduledBooking.fromReschedule).toEqual(createdBooking.uid);

apps/api/v2/scripts/docker-start.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ try {
1818
// Try docker compose first (new syntax)
1919
try {
2020
execSync("docker compose version", { stdio: "ignore" });
21-
console.log("Starting containers with docker compose...");
21+
logger.log("Starting containers with docker compose...");
2222
execSync("docker compose up -d", { stdio: "inherit" });
2323
} catch (e) {
2424
// Fall back to docker-compose if the above fails
2525
if (checkCommandExists("docker-compose")) {
26-
console.log("Starting containers with docker-compose...");
26+
logger.log("Starting containers with docker-compose...");
2727
execSync("docker-compose up -d", { stdio: "inherit" });
2828
} else {
2929
throw new Error("Neither 'docker compose' nor 'docker-compose' command is available");

apps/ui-playground/content/design/components/pagination.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ export const WithCallbacksExample = () => {
5252
const totalItems = 100;
5353

5454
const handleNext = () => {
55-
console.log("Next page clicked");
55+
logger.log("Next page clicked");
5656
};
5757

5858
const handlePrevious = () => {
59-
console.log("Previous page clicked");
59+
logger.log("Previous page clicked");
6060
};
6161

6262
return (

apps/web/components/notification-sound-handler.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function NotificationSoundHandler() {
2222
const response = await fetch("/ring.mp3");
2323
const arrayBuffer = await response.arrayBuffer();
2424
audioBufferRef.current = await audioContextRef.current.decodeAudioData(arrayBuffer);
25-
console.log("Audio file loaded and decoded");
25+
logger.log("Audio file loaded and decoded");
2626
}
2727

2828
return true;
@@ -62,7 +62,7 @@ export function NotificationSoundHandler() {
6262

6363
source.loop = true;
6464
source.start(0);
65-
console.log("Sound started playing");
65+
logger.log("Sound started playing");
6666

6767
setTimeout(() => {
6868
if (sourceRef.current === source) {
@@ -101,7 +101,7 @@ export function NotificationSoundHandler() {
101101

102102
useEffect(() => {
103103
if (!("serviceWorker" in navigator)) {
104-
console.log("ServiceWorker not available");
104+
logger.log("ServiceWorker not available");
105105
return;
106106
}
107107

apps/web/cron-tester.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async function fetchCron(endpoint: string) {
1717
}
1818

1919
try {
20-
console.log("⏳ Running cron endpoints");
20+
logger.log("⏳ Running cron endpoints");
2121
new CronJob(
2222
// Each 5 seconds
2323
"*/5 * * * * *",

apps/web/getNextjsOrgRewriteConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const getRegExpNotMatchingLeftMostSubdomain = (url) => {
2727
// For app.cal.com, it will match all domains that are not starting with "app". Technically we would want to match domains like acme.cal.com, dunder.cal.com and not app.cal.com
2828
const getRegExpThatMatchesAllOrgDomains = (exports.getRegExpThatMatchesAllOrgDomains = ({ webAppUrl }) => {
2929
if (isSingleOrgModeEnabled) {
30-
console.log("Single-Org-Mode enabled - Consider all domains to be org domains");
30+
logger.log("Single-Org-Mode enabled - Consider all domains to be org domains");
3131
// It works in combination with next.config.js where in this case we use orgSlug=NEXT_PUBLIC_SINGLE_ORG_SLUG
3232
return `.*`;
3333
}

apps/web/lib/apps/[slug]/getStaticProps.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const getStaticProps = async (slug: string) => {
6161
source = source.replace(/{DESCRIPTION}/g, appMeta.description);
6262
} catch (error) {
6363
/* If the app doesn't have a README we fallback to the package description */
64-
console.log(`No DESCRIPTION.md provided for: ${appDirname}`);
64+
logger.log(`No DESCRIPTION.md provided for: ${appDirname}`);
6565
source = appMeta.description;
6666
}
6767

apps/web/modules/signup-view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export default function Signup({
216216
if (err.checkoutSessionId) {
217217
const stripe = await getStripe();
218218
if (stripe) {
219-
console.log("Redirecting to stripe checkout");
219+
logger.log("Redirecting to stripe checkout");
220220
const { error } = await stripe.redirectToCheckout({
221221
sessionId: err.checkoutSessionId,
222222
});

0 commit comments

Comments
 (0)