Prefix node protocol (#26391)
This commit is contained in:
1 parent
fed6899c36
commit
a1e5384859
129 files changed
+182
-177
No files matched your search
@@ -1,9 +1,9 @@
|
||||
import chokidar from "chokidar";
|
||||
import fs from "fs";
|
||||
import fs from "node:fs"
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import { debounce } from "lodash";
|
||||
import { spawnSync } from "child_process";
|
||||
import path from "path";
|
||||
import { spawnSync } from "node:child_process";
|
||||
import path from "node:path"
|
||||
import type { AppMeta } from "@calcom/types/App";
|
||||
import { AppMetaSchema } from "@calcom/types/AppMetaSchema";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import fs from "fs";
|
||||
import fs from "node:fs"
|
||||
import { Box, Newline, Text, useApp } from "ink";
|
||||
import SelectInput from "ink-select-input";
|
||||
import TextInput from "ink-text-input";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import os from "os";
|
||||
import path from "path";
|
||||
import os from "node:os";
|
||||
import path from "node:path"
|
||||
|
||||
export const APP_STORE_PATH = path.join(__dirname, "..", "..", "app-store");
|
||||
export const TEMPLATES_PATH = path.join(APP_STORE_PATH, "templates");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
|
||||
import { APP_STORE_PATH, TEMPLATES_PATH, IS_WINDOWS_PLATFORM } from "./constants";
|
||||
import execSync from "./utils/execSync";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import child_process from "child_process";
|
||||
import child_process from "node:child_process";
|
||||
|
||||
const execSync = async (cmd: string) => {
|
||||
const silent = process.env.DEBUG === "1" ? false : true;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
|
||||
import { APP_STORE_PATH, TEMPLATES_PATH } from "../constants";
|
||||
import { getAppName } from "./getAppName";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import path from "path";
|
||||
import path from "node:path"
|
||||
|
||||
import { APP_STORE_PATH } from "../constants";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
|
||||
import { TEMPLATES_PATH } from "../constants";
|
||||
import { getAppName } from "./getAppName";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { defaultHandler } from "@calcom/lib/server/defaultHandler";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import crypto from "crypto";
|
||||
import crypto from "node:crypto";
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import getRawBody from "raw-body";
|
||||
import { z } from "zod";
|
||||
|
||||
@@ -170,8 +170,8 @@ async function getAllRecordingsOlderThan6Months(): Promise<Recording[]> {
|
||||
}
|
||||
|
||||
async function saveRecordingsToJson(recordings: Recording[]): Promise<void> {
|
||||
const fs = await import("fs/promises");
|
||||
const path = await import("path");
|
||||
const fs = await import("node:fs/promises");
|
||||
const path = await import("node:path");
|
||||
|
||||
const simplifiedRecordings = recordings.map((recording) => ({
|
||||
id: recording.id,
|
||||
@@ -316,8 +316,8 @@ async function deleteRecordingsFromJson(dryRun = false): Promise<void> {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const fs = await import("fs/promises");
|
||||
const path = await import("path");
|
||||
const fs = await import("node:fs/promises");
|
||||
const path = await import("node:path");
|
||||
|
||||
const filePath = path.join(process.cwd(), "recordings_older_than_6_months.json");
|
||||
|
||||
@@ -415,7 +415,7 @@ async function deleteRecordingsFromJson(dryRun = false): Promise<void> {
|
||||
}
|
||||
|
||||
async function mainDelete(): Promise<void> {
|
||||
const readline = (await import("readline")).createInterface({
|
||||
const readline = (await import("node:readline")).createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout,
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
import { z } from "zod";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createHmac } from "crypto";
|
||||
import { createHmac } from "node:crypto";
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import type z from "zod";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { defaultHandler } from "@calcom/lib/server/defaultHandler";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import { WEBAPP_URL_FOR_OAUTH } from "@calcom/lib/constants";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
import { z } from "zod";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
import { z } from "zod";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { defaultHandler } from "@calcom/lib/server/defaultHandler";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import { z } from "zod";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import { WEBAPP_URL_FOR_OAUTH } from "@calcom/lib/constants";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import { WEBAPP_URL_FOR_OAUTH } from "@calcom/lib/constants";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import type { Prisma } from "@calcom/prisma/client";
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { stringify } from "querystring";
|
||||
|
||||
import { WEBSITE_URL } from "@calcom/lib/constants";
|
||||
|
||||
// biome-ignore lint/style/useNodejsImportProtocol: No node env
|
||||
import { stringify } from "querystring";
|
||||
|
||||
export type Maybe<T> = T | undefined | null;
|
||||
|
||||
export function createPaymentLink(opts: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import prisma from "@calcom/prisma";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import { WEBAPP_URL_FOR_OAUTH } from "@calcom/lib/constants";
|
||||
import { defaultHandler } from "@calcom/lib/server/defaultHandler";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { defaultHandler } from "@calcom/lib/server/defaultHandler";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import { renewSelectedCalendarCredentialId } from "@calcom/lib/connectedCalendar";
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { getLocation } from "@calcom/lib/CalEventParser";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NextApiRequest } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import { WEBAPP_URL_FOR_OAUTH } from "@calcom/lib/constants";
|
||||
import { defaultHandler } from "@calcom/lib/server/defaultHandler";
|
||||
|
||||
@@ -3,7 +3,7 @@ import EnvironmentPlugin from "vite-plugin-environment";
|
||||
|
||||
import viteBaseConfig, { embedCoreEnvVars } from "../vite.config";
|
||||
|
||||
const path = require("path");
|
||||
const path = require("node:path");
|
||||
const { defineConfig } = require("vite");
|
||||
module.exports = defineConfig((configEnv) => {
|
||||
/** @type {import('vite').UserConfig} */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import react from "@vitejs/plugin-react";
|
||||
import path from "path";
|
||||
import path from "node:path"
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
import viteBaseConfig from "../vite.config";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import viteBaseConfig from "../vite.config";
|
||||
|
||||
const path = require("path");
|
||||
const path = require("node:path");
|
||||
const { defineConfig } = require("vite");
|
||||
|
||||
module.exports = defineConfig({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const path = require("path");
|
||||
const path = require("node:path");
|
||||
require("dotenv").config({ path: path.join(__dirname, "..", "..", ".env") });
|
||||
process.env.EMBED_PUBLIC_VERCEL_URL = process.env.VERCEL_URL;
|
||||
process.env.EMBED_PUBLIC_WEBAPP_URL = process.env.NEXT_PUBLIC_WEBAPP_URL;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { readFileSync } from "fs";
|
||||
import { readFileSync } from "node:fs";
|
||||
import Handlebars from "handlebars";
|
||||
import type { SendVerificationRequestParams } from "next-auth/providers/email";
|
||||
import type { TransportOptions } from "nodemailer";
|
||||
import nodemailer from "nodemailer";
|
||||
import path from "path";
|
||||
import path from "node:path"
|
||||
|
||||
import { APP_NAME, WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { serverConfig } from "@calcom/lib/serverConfig";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createHash } from "crypto";
|
||||
import { createHash } from "node:crypto";
|
||||
|
||||
import { checkRateLimitAndThrowError } from "@calcom/lib/checkRateLimitAndThrowError";
|
||||
import { hashEmail } from "@calcom/lib/server/PiiHasher";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { randomBytes, createHash } from "crypto";
|
||||
import { randomBytes, createHash } from "node:crypto";
|
||||
import { totp } from "otplib";
|
||||
|
||||
import {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { URLSearchParams } from "url";
|
||||
import { URLSearchParams } from "node:url";
|
||||
|
||||
import { getFullName } from "@calcom/features/form-builder/utils";
|
||||
import { ENV_PAST_BOOKING_RESCHEDULE_CHANGE_TEAM_IDS } from "@calcom/lib/constants";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { randomBytes } from "crypto";
|
||||
import { randomBytes } from "node:crypto";
|
||||
import short from "short-uuid";
|
||||
import { v5 as uuidv5 } from "uuid";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IncomingHttpHeaders } from "http";
|
||||
import type { IncomingHttpHeaders } from "node:http";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
import type { EventTypeRepository } from "@calcom/features/eventtypes/repositories/eventTypeRepository";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { checkBotId } from "botid/server";
|
||||
import type { IncomingHttpHeaders } from "http";
|
||||
import type { IncomingHttpHeaders } from "node:http";
|
||||
|
||||
import type { EventTypeRepository } from "@calcom/features/eventtypes/repositories/eventTypeRepository";
|
||||
import type { FeaturesRepository } from "@calcom/features/flags/features.repository";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { randomBytes, createHash } from "crypto";
|
||||
import { randomBytes, createHash } from "node:crypto";
|
||||
|
||||
// Hash the API key to check against when veriying it. so we don't have to store the key in plain text.
|
||||
export const hashAPIKey = (apiKey: string): string => createHash("sha256").update(apiKey).digest("hex");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import crypto from "crypto";
|
||||
import crypto from "node:crypto";
|
||||
|
||||
export const generateNonce = (): string => {
|
||||
return crypto.randomBytes(16).toString("hex");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IncomingMessage } from "http";
|
||||
import type { IncomingMessage } from "node:http";
|
||||
|
||||
import { IS_PRODUCTION, WEBSITE_URL, SINGLE_ORG_SLUG } from "@calcom/lib/constants";
|
||||
import { ALLOWED_HOSTNAMES, RESERVED_SUBDOMAINS, WEBAPP_URL } from "@calcom/lib/constants";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { lookup } from "dns";
|
||||
import { lookup } from "node:dns";
|
||||
import { type TFunction } from "i18next";
|
||||
|
||||
import { sendAdminOrganizationNotification } from "@calcom/emails/organization-email-service";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ParsedUrlQuery } from "querystring";
|
||||
import type { ParsedUrlQuery } from "node:querystring";
|
||||
|
||||
/* eslint-disable */
|
||||
import { getCRMContactOwnerForRRLeadSkip } from "@calcom/app-store/_utils/CRMRoundRobinSkip";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { randomBytes } from "crypto";
|
||||
import { randomBytes } from "node:crypto";
|
||||
|
||||
import { getTeamBillingServiceFactory } from "@calcom/ee/billing/di/containers/Billing";
|
||||
import { deleteWorkfowRemindersOfRemovedMember } from "@calcom/features/ee/teams/lib/deleteWorkflowRemindersOfRemovedMember";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ParsedUrlQuery } from "querystring";
|
||||
import type { ParsedUrlQuery } from "node:querystring";
|
||||
import { z } from "zod";
|
||||
|
||||
// Take array as a string and return zod array
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { randomUUID } from "crypto";
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { v4 as uuid } from "uuid";
|
||||
import { describe, expect, it, vi, beforeAll, afterAll } from "vitest";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import "@calcom/lib/__mocks__/logger";
|
||||
|
||||
import { createHash } from "crypto";
|
||||
import { createHash } from "node:crypto";
|
||||
import type { GetServerSidePropsContext } from "next";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// !IMPORTANT! changes to this file requires publishing new version of platform libraries in order for the changes to be applied to APIV2
|
||||
import { createHash } from "crypto";
|
||||
import { createHash } from "node:crypto";
|
||||
import type { GetServerSidePropsContext } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import z from "zod";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createHmac } from "crypto";
|
||||
import { createHmac } from "node:crypto";
|
||||
import { compile } from "handlebars";
|
||||
|
||||
import type { TGetTranscriptAccessLink } from "@calcom/app-store/dailyvideo/zod";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createHmac } from "crypto";
|
||||
import { createHmac } from "node:crypto";
|
||||
|
||||
import { WebhookTriggerEvents } from "@calcom/prisma/enums";
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { stringify } from "querystring";
|
||||
import type { AppOnboardingSteps } from "@calcom/lib/apps/appOnboardingSteps"
|
||||
|
||||
import type { AppOnboardingSteps } from "@calcom/lib/apps/appOnboardingSteps";
|
||||
// biome-ignore lint/style/useNodejsImportProtocol: Vite env
|
||||
import { stringify } from "querystring";
|
||||
|
||||
export const getAppOnboardingUrl = ({
|
||||
slug,
|
||||
@@ -10,9 +11,9 @@ export const getAppOnboardingUrl = ({
|
||||
slug: string;
|
||||
step: AppOnboardingSteps;
|
||||
teamId?: number;
|
||||
}) => {
|
||||
}): string => {
|
||||
const params: { [key: string]: string | number | number[] } = { slug };
|
||||
if (!!teamId) {
|
||||
if (teamId) {
|
||||
params.teamId = teamId;
|
||||
}
|
||||
const query = stringify(params);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import crypto from "crypto";
|
||||
import crypto from "node:crypto";
|
||||
|
||||
const ALGORITHM = "aes256";
|
||||
const INPUT_ENCODING = "utf8";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useRouter as useCompatRouter } from "next/compat/router";
|
||||
import { useParams } from "next/navigation";
|
||||
import type { ParsedUrlQuery } from "querystring";
|
||||
import type { ParsedUrlQuery } from "node:querystring";
|
||||
|
||||
interface Params {
|
||||
[key: string]: string | string[];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import fs from "fs";
|
||||
import fs from "node:fs"
|
||||
|
||||
import logger from "./logger";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createHash } from "crypto";
|
||||
import { createHash } from "node:crypto";
|
||||
|
||||
export function verifyCodeChallenge(
|
||||
codeVerifier: string,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { PerformanceObserver } from "perf_hooks";
|
||||
import { PerformanceObserver } from "node:perf_hooks";
|
||||
|
||||
import logger from "../logger";
|
||||
|
||||
@@ -23,4 +23,4 @@ if (process.env.NODE_ENV !== "production") {
|
||||
|
||||
export default perfObserver;
|
||||
|
||||
export { performance } from "perf_hooks";
|
||||
export { performance } from "node:perf_hooks";
|
||||
@@ -1,4 +1,4 @@
|
||||
import { randomBytes, createHash } from "crypto";
|
||||
import { randomBytes, createHash } from "node:crypto";
|
||||
|
||||
import { VerificationTokenRepository } from "../repository/verificationToken";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const packageJsonPath = path.join(__dirname, "../package.json");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import react from "@vitejs/plugin-react-swc";
|
||||
import path from "path";
|
||||
import { resolve } from "path";
|
||||
import path from "node:path"
|
||||
import { resolve } from "node:path";
|
||||
import { defineConfig, loadEnv } from "vite";
|
||||
import dts from "vite-plugin-dts";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineConfig, devices } from "@playwright/test";
|
||||
import dotenv from "dotenv";
|
||||
import path from "path";
|
||||
import path from "node:path"
|
||||
|
||||
const envPath = process.env.CI ? path.resolve(__dirname, ".env") : path.resolve(__dirname, ".env.local");
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import logger from "@calcom/lib/logger";
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
const { i18n } = require("@calcom/config/next-i18next.config");
|
||||
const path = require("path");
|
||||
const path = require("node:path");
|
||||
const translationsPath = path.resolve(__dirname, "../../../../apps/web/public/static/locales/en/common.json");
|
||||
const englishTranslations: Record<string, string> = require(translationsPath);
|
||||
/* eslint-enable @typescript-eslint/no-require-imports */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { spawn } from "child_process";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { spawn } from "node:child_process";
|
||||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { getCurrentVersion } from "./prepublish.js";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fs from "fs";
|
||||
import https from "https";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import fs from "node:fs"
|
||||
import https from "node:https";
|
||||
import path from "node:path"
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// vite.config.ts
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { resolve } from "path";
|
||||
import path from "path";
|
||||
import { dirname } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { resolve } from "node:path";
|
||||
import path from "node:path"
|
||||
import { dirname } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { defineConfig } from "vite";
|
||||
import dts from "vite-plugin-dts";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as crypto from "crypto";
|
||||
import * as crypto from "node:crypto";
|
||||
import { z } from "zod";
|
||||
|
||||
import { CALCOM_PRIVATE_API_ROUTE } from "@calcom/lib/constants";
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ServerResponse } from "http";
|
||||
import type { ServerResponse } from "node:http";
|
||||
import type { NextApiResponse } from "next";
|
||||
|
||||
import { findTeamMembersMatchingAttributeLogic } from "@calcom/features/routing-forms/lib/findTeamMembersMatchingAttributeLogic";
|
||||
|
||||
@@ -19,7 +19,7 @@ type MeOptions = {
|
||||
};
|
||||
|
||||
export const getHandler = async ({ ctx, input }: MeOptions) => {
|
||||
const crypto = await import("crypto");
|
||||
const crypto = await import("node:crypto");
|
||||
|
||||
const { user: sessionUser, session } = ctx;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { randomBytes, createHash } from "crypto";
|
||||
import { randomBytes, createHash } from "node:crypto";
|
||||
|
||||
import { prisma } from "@calcom/prisma";
|
||||
import { Prisma } from "@calcom/prisma/client";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { randomBytes } from "crypto";
|
||||
import { randomBytes } from "node:crypto";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { lookup } from "dns";
|
||||
import { lookup } from "node:dns";
|
||||
|
||||
import { getOrgFullOrigin } from "@calcom/ee/organizations/lib/orgDomains";
|
||||
import { isNotACompanyEmail } from "@calcom/ee/organizations/lib/server/orgCreationUtils";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createHash } from "crypto";
|
||||
import { createHash } from "node:crypto";
|
||||
|
||||
import { verifyPassword } from "@calcom/features/auth/lib/verifyPassword";
|
||||
import { hashPassword } from "@calcom/lib/auth/hashPassword";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createHash } from "crypto";
|
||||
import { createHash } from "node:crypto";
|
||||
|
||||
import { checkRateLimitAndThrowError } from "@calcom/lib/checkRateLimitAndThrowError";
|
||||
import { IS_PRODUCTION } from "@calcom/lib/constants";
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* Also, it is applicable only for sub-teams. Regular teams and user Routing Forms don't hit this endpoint.
|
||||
* Live mode uses findTeamMembersMatchingAttributeLogicOfRoute fn directly
|
||||
*/
|
||||
import type { ServerResponse } from "http";
|
||||
import type { ServerResponse } from "node:http";
|
||||
import type { NextApiResponse } from "next";
|
||||
|
||||
import { enrichHostsWithDelegationCredentials } from "@calcom/app-store/delegationCredential";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IncomingMessage } from "http";
|
||||
import type { IncomingMessage } from "node:http";
|
||||
import { z } from "zod";
|
||||
|
||||
import { timeZoneSchema } from "@calcom/lib/dayjs/timeZone.schema";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { randomBytes } from "crypto";
|
||||
import { randomBytes } from "node:crypto";
|
||||
import type { TFunction } from "i18next";
|
||||
|
||||
import { getOrgFullOrigin } from "@calcom/ee/organizations/lib/orgDomains";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createHash } from "crypto";
|
||||
import { createHash } from "node:crypto";
|
||||
|
||||
import { totpRawCheck } from "@calcom/lib/totp";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { IncomingMessage } from "http";
|
||||
import type { IncomingMessage } from "node:http";
|
||||
import type { Session } from "next-auth";
|
||||
|
||||
import "./next-auth";
|
||||
|
||||
Reference in new issue
Block a user