Prefix node protocol (#26391)
This commit is contained in:
+2
-2
@@ -2,8 +2,8 @@ diff --git a/dist/commonjs/serverSideTranslations.js b/dist/commonjs/serverSideT
|
||||
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"));
|
||||
@@ -36,7 +36,6 @@ var _fs = _interopRequireDefault(require("node:fs"));
|
||||
var _path = _interopRequireDefault(require("node:path"));
|
||||
var _createConfig = require("./config/createConfig");
|
||||
var _node = _interopRequireDefault(require("./createClient/node"));
|
||||
-var _appWithTranslation = require("./appWithTranslation");
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
const http = require("http");
|
||||
const http = require("node:http");
|
||||
const connect = require("connect");
|
||||
const { createProxyMiddleware } = require("http-proxy-middleware");
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const path = require("path");
|
||||
const path = require("node:path");
|
||||
const i18nConfig = require("@calcom/config/next-i18next.config");
|
||||
|
||||
/** @type {import("next-i18next").UserConfig} */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// This is a workaround for https://github.com/jsdom/jsdom/issues/2524#issuecomment-902027138
|
||||
|
||||
// See https://github.com/microsoft/accessibility-insights-web/blob/40416a4ae6b91baf43102f58e069eff787de4de2/src/tests/unit/jest-setup.ts
|
||||
const { TextEncoder, TextDecoder } = require("util");
|
||||
const { TextEncoder, TextDecoder } = require("node:util");
|
||||
global.TextEncoder = TextEncoder;
|
||||
global.TextDecoder = TextDecoder;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const path = require("path");
|
||||
const path = require("node:path");
|
||||
const i18nConfig = require("@calcom/config/next-i18next.config");
|
||||
|
||||
/** @type {import("next-i18next").UserConfig} */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { execSync } from "child_process";
|
||||
import { execSync } from "node:child_process";
|
||||
|
||||
function checkCommandExists(command: string): boolean {
|
||||
try {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createHash } from "crypto";
|
||||
import { createHash } from "node:crypto";
|
||||
|
||||
export const sha256Hash = (token: string): string => createHash("sha256").update(token).digest("hex");
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IncomingHttpHeaders } from "http";
|
||||
import { IncomingHttpHeaders } from "node:http";
|
||||
|
||||
export function filterReqHeaders(headers: IncomingHttpHeaders): Partial<IncomingHttpHeaders> {
|
||||
return {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable, Logger, OnModuleDestroy } from "@nestjs/common";
|
||||
import { ConfigService } from "@nestjs/config";
|
||||
import * as path from "path";
|
||||
import { Worker } from "worker_threads";
|
||||
import * as path from "node:path";
|
||||
import { Worker } from "node:worker_threads";
|
||||
|
||||
// Import WorkerOptions type
|
||||
import type { GetScheduleOptions } from "@calcom/trpc/server/routers/viewer/slots/types";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { AvailableSlotsService } from "@/lib/services/available-slots.service";
|
||||
import { Logger } from "@nestjs/common";
|
||||
import { NestFactory } from "@nestjs/core";
|
||||
import { IncomingMessage } from "http";
|
||||
import { parentPort, isMainThread } from "worker_threads";
|
||||
import { IncomingMessage } from "node:http";
|
||||
import { parentPort, isMainThread } from "node:worker_threads";
|
||||
|
||||
import { SlotsWorkerModule } from "./slots.worker.module";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as fs from "fs-extra";
|
||||
import * as path from "path";
|
||||
import * as path from "node:path";
|
||||
|
||||
// First, copyNestSwagger is required to enable "@nestjs/swagger" in the "nest-cli.json",
|
||||
// because nest-cli.json is resolving "@nestjs/swagger" plugin from
|
||||
|
||||
@@ -8,8 +8,8 @@ import type {
|
||||
OperationObject,
|
||||
} from "@nestjs/swagger/dist/interfaces/open-api-spec.interface";
|
||||
import "dotenv/config";
|
||||
import * as fs from "fs";
|
||||
import type { Server } from "http";
|
||||
import * as fs from "node:fs";
|
||||
import type { Server } from "node:http";
|
||||
import { spawnSync } from "node:child_process";
|
||||
import { createRequire } from "node:module";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { PrismaReadService } from "@/modules/prisma/prisma-read.service";
|
||||
import { PrismaWriteService } from "@/modules/prisma/prisma-write.service";
|
||||
import { TestingModule } from "@nestjs/testing";
|
||||
import { randomBytes, createHash } from "crypto";
|
||||
import { randomBytes, createHash } from "node:crypto";
|
||||
|
||||
export class ApiKeysRepositoryFixture {
|
||||
private prismaReadClient: PrismaReadService["prisma"];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { PrismaReadService } from "@/modules/prisma/prisma-read.service";
|
||||
import { PrismaWriteService } from "@/modules/prisma/prisma-write.service";
|
||||
import { TestingModule } from "@nestjs/testing";
|
||||
import * as crypto from "crypto";
|
||||
import * as crypto from "node:crypto";
|
||||
import { DateTime } from "luxon";
|
||||
|
||||
export class TokensRepositoryFixture {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defaultResponderForAppDir } from "app/api/defaultResponderForAppDir";
|
||||
import { parseRequestData } from "app/api/parseRequestData";
|
||||
import crypto from "crypto";
|
||||
import crypto from "node:crypto";
|
||||
import { cookies, headers } from "next/headers";
|
||||
import { NextResponse } from "next/server";
|
||||
import type { NextRequest } from "next/server";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { randomBytes } from "crypto";
|
||||
import { randomBytes } from "node:crypto";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defaultResponderForAppDir } from "app/api/defaultResponderForAppDir";
|
||||
import { createHmac } from "crypto";
|
||||
import { createHmac } from "node:crypto";
|
||||
import { headers } from "next/headers";
|
||||
import type { NextRequest } from "next/server";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defaultResponderForAppDir } from "app/api/defaultResponderForAppDir";
|
||||
import { createHmac } from "crypto";
|
||||
import { createHmac } from "node:crypto";
|
||||
import { headers } from "next/headers";
|
||||
import { cookies } from "next/headers";
|
||||
import type { NextRequest } from "next/server";
|
||||
|
||||
@@ -15,7 +15,7 @@ import type { SSRConfig } from "next-i18next/dist/types/types";
|
||||
import { ThemeProvider } from "next-themes";
|
||||
import type { AppProps as NextAppProps, AppProps as NextJsAppProps } from "next/app";
|
||||
import { NuqsAdapter } from "nuqs/adapters/next/pages";
|
||||
import type { ParsedUrlQuery } from "querystring";
|
||||
import type { ParsedUrlQuery } from "node:querystring";
|
||||
import type { PropsWithChildren, ReactNode } from "react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import fs from "fs";
|
||||
import fs from "node:fs"
|
||||
import matter from "gray-matter";
|
||||
import path from "path";
|
||||
import path from "node:path"
|
||||
import { z } from "zod";
|
||||
|
||||
import { getAppWithMetadata } from "@calcom/app-store/_appRegistry";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { GetServerSidePropsContext } from "next";
|
||||
import type { ParsedUrlQuery } from "querystring";
|
||||
import type { ParsedUrlQuery } from "node:querystring";
|
||||
import { vi, describe, it, expect, beforeEach, afterEach } from "vitest";
|
||||
|
||||
import * as constants from "@calcom/lib/constants";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { ParsedUrlQuery } from "querystring";
|
||||
import { stringify } from "querystring";
|
||||
import type { ParsedUrlQuery } from "node:querystring";
|
||||
import { stringify } from "node:querystring";
|
||||
|
||||
import { SINGLE_ORG_SLUG } from "@calcom/lib/constants";
|
||||
import logger from "@calcom/lib/logger";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// page can be a server component
|
||||
import type { GetServerSidePropsContext } from "next";
|
||||
import { URLSearchParams } from "url";
|
||||
import { URLSearchParams } from "node:url";
|
||||
import { z } from "zod";
|
||||
|
||||
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { signOut, useSession } from "next-auth/react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import type { ParsedUrlQuery } from "querystring";
|
||||
import type { ParsedUrlQuery } from "node:querystring";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { WEBSITE_URL } from "@calcom/lib/constants";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import path from "path";
|
||||
import path from "node:path"
|
||||
|
||||
import i18nConfig from "@calcom/config/next-i18next.config";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IncomingMessage } from "http";
|
||||
import type { IncomingMessage } from "node:http";
|
||||
import type { NextPageContext } from "next";
|
||||
import { SessionProvider } from "next-auth/react";
|
||||
import React from "react";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { platform } from "@todesktop/client-core";
|
||||
import type { IncomingMessage } from "http";
|
||||
import type { IncomingMessage } from "node:http";
|
||||
import { dir } from "i18next";
|
||||
import type { DocumentContext, DocumentProps } from "next/document";
|
||||
import Document, { Head, Html, Main, NextScript } from "next/document";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Server } from "http";
|
||||
import type { Server } from "node:http";
|
||||
|
||||
import { nextServer } from "../lib/next-server";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import fs from "node:fs"
|
||||
import path from "node:path"
|
||||
|
||||
/**
|
||||
* Simple utility to load JSON files from the file system. Needed to avoid certain errors with:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import detect from "detect-port";
|
||||
import type { Server } from "http";
|
||||
import { createServer } from "http";
|
||||
import type { Server } from "node:http";
|
||||
import { createServer } from "node:http";
|
||||
import next from "next";
|
||||
import { parse } from "url";
|
||||
import { parse } from "node:url";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
declare let process: {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { Frame, Page, Request as PlaywrightRequest } from "@playwright/test";
|
||||
import { expect } from "@playwright/test";
|
||||
import { createHash } from "crypto";
|
||||
import EventEmitter from "events";
|
||||
import type { IncomingMessage, ServerResponse } from "http";
|
||||
import { createServer } from "http";
|
||||
import { createHash } from "node:crypto";
|
||||
import EventEmitter from "node:events";
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { createServer } from "node:http";
|
||||
import type { Messages } from "mailhog";
|
||||
import { totp } from "otplib";
|
||||
import { v4 as uuid } from "uuid";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { expect } from "@playwright/test";
|
||||
import { createHash, randomBytes } from "crypto";
|
||||
import { createHash, randomBytes } from "node:crypto";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { expect } from "@playwright/test";
|
||||
import path from "path";
|
||||
import path from "node:path"
|
||||
|
||||
import { CAL_URL } from "@calcom/lib/constants";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Page } from "@playwright/test";
|
||||
import { expect } from "@playwright/test";
|
||||
import { randomBytes } from "crypto";
|
||||
import { randomBytes } from "node:crypto";
|
||||
|
||||
import { APP_NAME, IS_PREMIUM_USERNAME_ENABLED, IS_MAILHOG_ENABLED } from "@calcom/lib/constants";
|
||||
import prisma from "@calcom/prisma";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { readFileSync, readdirSync, writeFileSync } from "fs";
|
||||
import { join } from "path";
|
||||
import { readFileSync, readdirSync, writeFileSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
|
||||
const TEMPLATE_LANGUAGE = "en";
|
||||
const SPECIFIC_LOCALES = process.argv.slice(2) || [];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const fs = require("node:fs");
|
||||
const path = require("node:path");
|
||||
const glob = require("glob");
|
||||
const crypto = require("crypto");
|
||||
const crypto = require("node:crypto");
|
||||
|
||||
const copyAppStoreStatic = () => {
|
||||
// Get all static files from app-store packages
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { execSync } = require("child_process");
|
||||
const { execSync } = require("node:child_process");
|
||||
|
||||
const CLIENT_FILES_PATH = ".next/static/chunks";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { execSync } from "child_process";
|
||||
import { execSync } from "node:child_process";
|
||||
|
||||
type Err = {
|
||||
stdout: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { EmbedProps } from "app/WithEmbedSSR";
|
||||
import type { GetServerSideProps } from "next";
|
||||
import { encode } from "querystring";
|
||||
import { encode } from "node:querystring";
|
||||
import type { z } from "zod";
|
||||
|
||||
import { orgDomainConfig } from "@calcom/features/ee/organizations/lib/orgDomains";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// This is a workaround for https://github.com/jsdom/jsdom/issues/2524#issuecomment-902027138
|
||||
|
||||
// See https://github.com/microsoft/accessibility-insights-web/blob/40416a4ae6b91baf43102f58e069eff787de4de2/src/tests/unit/jest-setup.ts
|
||||
const { TextEncoder, TextDecoder } = require("util");
|
||||
const { TextEncoder, TextDecoder } = require("node:util");
|
||||
global.TextEncoder = TextEncoder;
|
||||
global.TextDecoder = TextDecoder;
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
type ScenarioData,
|
||||
} from "../../utils/bookingScenario/bookingScenario";
|
||||
|
||||
import type { IncomingMessage } from "http";
|
||||
import type { IncomingMessage } from "node:http";
|
||||
import { describe, test, beforeEach, vi } from "vitest";
|
||||
import type { z } from "zod";
|
||||
|
||||
|
||||
+4
-2
@@ -27,6 +27,7 @@
|
||||
"!!**/dist",
|
||||
"!!**/build",
|
||||
"!!**/public",
|
||||
"!!**/*.d.ts",
|
||||
"!!public",
|
||||
"!!apps/web/public/embed",
|
||||
"!!packages/prisma/zod",
|
||||
@@ -90,7 +91,7 @@
|
||||
"linter": {
|
||||
"rules": {
|
||||
"nursery": {
|
||||
"useQwikValidLexicalScope": "warn",
|
||||
"useQwikValidLexicalScope": "off",
|
||||
"useExplicitType": "warn",
|
||||
"noReactForwardRef": "warn",
|
||||
"noTernary": "warn",
|
||||
@@ -110,7 +111,8 @@
|
||||
},
|
||||
"style": {
|
||||
"useExportsLast": "warn",
|
||||
"noProcessEnv": "warn"
|
||||
"noProcessEnv": "warn",
|
||||
"useNodejsImportProtocol": "error"
|
||||
},
|
||||
"complexity": {
|
||||
"noExcessiveLinesPerFunction": "warn"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const path = require("path");
|
||||
const path = require("node:path");
|
||||
|
||||
/**
|
||||
* # Regex for translation keys
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user