repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/encryption.ts | packages/server/lib/cloud/encryption.ts | import crypto, { BinaryLike } from 'crypto'
import { TextEncoder, promisify } from 'util'
import { generalDecrypt, GeneralJWE } from 'jose'
import base64Url from 'base64url'
import type { CypressRequestOptions } from './api'
import { deflateRaw as deflateRawCb } from 'zlib'
import fs from 'fs'
const deflateRaw = promi... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/environment.ts | packages/server/lib/cloud/environment.ts | import { exec } from 'child_process'
import { promisify } from 'util'
import base64Url from 'base64url'
import fs from 'fs-extra'
import resolvePackagePath from 'resolve-package-path'
const execAsync = promisify(exec)
// See https://whimsical.com/encryption-logic-BtJJkN7TxacK8kaHDgH1zM for more information on what th... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/constants.ts | packages/server/lib/cloud/constants.ts | export const PUBLIC_KEY_VERSION = '1'
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/user.ts | packages/server/lib/cloud/user.ts | import api from './api'
import { cache } from '../cache'
import type { CachedUser } from '@packages/types'
import type Bluebird from 'bluebird'
export = {
get (): Bluebird<CachedUser> {
return cache.getUser()
},
set (user: CachedUser): Bluebird<void> {
return cache.setUser(user)
},
getBaseLoginUrl... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/exception.ts | packages/server/lib/cloud/exception.ts | import _ from 'lodash'
import Bluebird from 'bluebird'
import pkg from '@packages/root'
import api from './api'
import user from './user'
import * as system from '../util/system'
import { stripPath } from './strip_path'
const { serializeError } = require('serialize-error')
export = {
/**
* Safely serializes an e... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/machine_id.ts | packages/server/lib/cloud/machine_id.ts | import { machineId as nodeMachineId } from 'node-machine-id'
export async function machineId () {
try {
const machineId = await nodeMachineId()
return machineId
} catch (error) {
return null
}
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/protocol.ts | packages/server/lib/cloud/protocol.ts | import base64url from 'base64url'
import Database from 'better-sqlite3'
import fetch from 'cross-fetch'
import crypto from 'crypto'
import Debug from 'debug'
import fs from 'fs-extra'
import os from 'os'
import path from 'path'
import { strictAgent } from '@packages/network'
import pkg from '@packages/root'
import * as... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/strip_path.ts | packages/server/lib/cloud/strip_path.ts | import { last } from 'lodash'
// strip everything but the file name to remove any sensitive
// data in the path
const pathRe = /'?((\/|\\+|[a-z]:\\)[^\s']+)+'?/ig
const pathSepRe = /[\/\\]+/
export const stripPath = (text: string) => {
return (text || '').replace(pathRe, (path) => {
const fileName = last(path.s... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/studio/ensure_studio_bundle.ts | packages/server/lib/cloud/studio/ensure_studio_bundle.ts | import { remove, ensureDir, readFile, pathExists } from 'fs-extra'
import { getStudioBundle } from '../api/studio/get_studio_bundle'
import path from 'path'
import { verifySignature } from '../encryption'
import { extractAtomic } from '../extract_atomic'
interface EnsureStudioBundleOptions {
studioUrl: string
proj... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/studio/StudioLifecycleManager.ts | packages/server/lib/cloud/studio/StudioLifecycleManager.ts | import { StudioManager } from './studio'
import { ProtocolManager } from '../protocol'
import Debug from 'debug'
import type { CloudDataSource } from '@packages/data-context/src/sources'
import type { Cfg } from '../../project-base'
import _ from 'lodash'
import type { DataContext } from '@packages/data-context'
import... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/studio/studio.ts | packages/server/lib/cloud/studio/studio.ts | import type { StudioManagerShape, StudioStatus, StudioServerDefaultShape, StudioServerShape, ProtocolManagerShape, StudioCloudApi, StudioAIInitializeOptions, StudioEvent, StudioAddSocketListenersOptions, StudioServerOptions, StudioCDPClient } from '@packages/types'
import type { Router } from 'express'
import Debug fro... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/studio/StudioElectron.ts | packages/server/lib/cloud/studio/StudioElectron.ts | // tslint:disable-next-line no-implicit-dependencies - electron dep needs to be defined
import { BrowserWindow } from 'electron'
import Debug from 'debug'
const debug = Debug('cypress:server:studio:electron')
/**
* This interface exposes a selection of Electrons APIs
* to the dynamic studio bundle.
*/
export class... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/studio/telemetry/TelemetryReporter.ts | packages/server/lib/cloud/studio/telemetry/TelemetryReporter.ts | import Debug from 'debug'
import {
TELEMETRY_GROUPS,
TelemetryGroupName,
telemetryManager,
} from './TelemetryManager'
import type { CloudDataSource } from '@packages/data-context/src/sources/CloudDataSource'
import { CloudRequest } from '../../api/cloud_request'
import { getCloudMetadata } from '../../get_cloud_... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/studio/telemetry/TelemetryManager.ts | packages/server/lib/cloud/studio/telemetry/TelemetryManager.ts | import { performance } from 'perf_hooks'
import { BUNDLE_LIFECYCLE_MARK_NAMES, BUNDLE_LIFECYCLE_MEASURE_NAMES, BUNDLE_LIFECYCLE_MEASURES, BUNDLE_LIFECYCLE_TELEMETRY_GROUP_NAMES, BUNDLE_LIFECYCLE_TELEMETRY_GROUPS } from './constants/bundle-lifecycle'
import { INITIALIZATION_MARK_NAMES, INITIALIZATION_MEASURE_NAMES, INIT... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/studio/telemetry/constants/bundle-lifecycle.ts | packages/server/lib/cloud/studio/telemetry/constants/bundle-lifecycle.ts | export const BUNDLE_LIFECYCLE_MARK_NAMES = {
BUNDLE_LIFECYCLE_START: 'bundle_lifecycle_start',
POST_STUDIO_SESSION_START: 'post_studio_session_start',
POST_STUDIO_SESSION_END: 'post_studio_session_end',
ENSURE_STUDIO_BUNDLE_START: 'ensure_studio_bundle_start',
ENSURE_STUDIO_BUNDLE_END: 'ensure_studio_bundle_e... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/studio/telemetry/constants/initialization.ts | packages/server/lib/cloud/studio/telemetry/constants/initialization.ts | export const INITIALIZATION_MARK_NAMES = Object.freeze({
INITIALIZATION_START: 'initialization-start',
INITIALIZATION_END: 'initialization-end',
CAN_ACCESS_STUDIO_AI_START: 'can-access-studio-ai-start',
CAN_ACCESS_STUDIO_AI_END: 'can-access-studio-ai-end',
CONNECT_PROTOCOL_TO_BROWSER_START: 'connect-protocol-... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/artifacts/video_artifact.ts | packages/server/lib/cloud/artifacts/video_artifact.ts | import fs from 'fs/promises'
import { Artifact, IArtifact, ArtifactKinds } from './artifact'
import { fileUploadStrategy } from './file_upload_strategy'
export const createVideoArtifact = async (filePath: string, uploadUrl: string): Promise<IArtifact> => {
const { size } = await fs.stat(filePath)
return new Artif... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/artifacts/protocol_artifact.ts | packages/server/lib/cloud/artifacts/protocol_artifact.ts | import fs from 'fs/promises'
import { existsSync } from 'fs'
import type { ProtocolManager } from '../protocol'
import { IArtifact, ArtifactUploadStrategy, ArtifactUploadResult, Artifact, ArtifactKinds } from './artifact'
import Debug from 'debug'
const debug = Debug('cypress:server:cloud:artifacts:protocol')
interfac... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/artifacts/file_upload_strategy.ts | packages/server/lib/cloud/artifacts/file_upload_strategy.ts | import { sendFile } from '../upload/send_file'
import type { ArtifactUploadStrategy } from './artifact'
export const fileUploadStrategy: ArtifactUploadStrategy<Promise<any>> = (filePath, uploadUrl) => {
return sendFile(filePath, uploadUrl)
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/artifacts/upload_artifacts.ts | packages/server/lib/cloud/artifacts/upload_artifacts.ts | import _ from 'lodash'
import Debug from 'debug'
import type ProtocolManager from '../protocol'
import { isProtocolInitializationError } from '@packages/types'
import api from '../api'
import { logUploadManifest, logUploadResults, beginUploadActivityOutput } from '../../util/print-run'
import type { UpdateInstanceArtif... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/artifacts/artifact.ts | packages/server/lib/cloud/artifacts/artifact.ts | import Debug from 'debug'
import { performance } from 'perf_hooks'
import type { AfterSpecDurations } from '@packages/types'
const debug = Debug('cypress:server:cloud:artifact')
const isAggregateError = (err: any): err is AggregateError => {
return !!err.errors
}
export const ArtifactKinds = Object.freeze({
VIDEO... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/artifacts/screenshot_artifact.ts | packages/server/lib/cloud/artifacts/screenshot_artifact.ts | import fs from 'fs/promises'
import Debug from 'debug'
import { Artifact, IArtifact, ArtifactKinds } from './artifact'
import { fileUploadStrategy } from './file_upload_strategy'
const debug = Debug('cypress:server:cloud:artifacts:screenshot')
const createScreenshotArtifact = async (filePath: string, uploadUrl: strin... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/artifacts/print_protocol_upload_error.ts | packages/server/lib/cloud/artifacts/print_protocol_upload_error.ts | import { HttpError } from '../network/http_error'
import { SystemError } from '../network/system_error'
import { StreamStalledError } from '../upload/stream_stalled_error'
import Debug from 'debug'
import * as errors from '../../errors'
const debug = Debug('cypress:server:cloud:artifacts')
export const printProtocolU... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/create_instance.ts | packages/server/lib/cloud/api/create_instance.ts | import { CloudRequest, isRetryableCloudError } from './cloud_request'
import { asyncRetry, exponentialBackoff } from '../../util/async_retry'
import * as errors from '../../errors'
import { isAxiosError } from 'axios'
const MAX_RETRIES = 3
export interface CreateInstanceResponse {
spec: string | null
instanceId: ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/cloud_request.ts | packages/server/lib/cloud/api/cloud_request.ts | /**
* The axios Cloud instance should not be used.
*/
import os from 'os'
import followRedirects from 'follow-redirects'
import axios, { AxiosInstance } from 'axios'
import pkg from '@packages/root'
import { strictAgent } from '@packages/network'
import app_config from '../../../config/app.json'
import { installErro... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/cloud_request_errors.ts | packages/server/lib/cloud/api/cloud_request_errors.ts | export class DecryptionError extends Error {
isDecryptionError = true
constructor (message: string) {
super(message)
this.name = 'DecryptionError'
}
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/put_protocol_artifact.ts | packages/server/lib/cloud/api/put_protocol_artifact.ts | import fsAsync from 'fs/promises'
import fs from 'fs'
import Debug from 'debug'
import { StreamActivityMonitor } from '../upload/stream_activity_monitor'
import { asyncRetry, linearDelay } from '../../util/async_retry'
import { putFetch, ParseKinds } from '../network/fetch'
import { isRetryableError } from '../network/... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/index.ts | packages/server/lib/cloud/api/index.ts | import _ from 'lodash'
import os from 'os'
import debugModule from 'debug'
import request from '@cypress/request-promise'
import humanInterval from 'human-interval'
import * as RequestErrors from '@cypress/request-promise/errors'
import pkg from '@packages/root'
import { machineId } from '../machine_id'
import * as ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/scrub_url.ts | packages/server/lib/cloud/api/scrub_url.ts | const SENSITIVE_KEYS = Object.freeze(['x-amz-credential', 'x-amz-signature', 'Signature', 'AWSAccessKeyId'])
export const scrubUrl = (url: string): string => {
const parsedUrl = new URL(url)
for (const [key, value] of parsedUrl.searchParams) {
if (SENSITIVE_KEYS.includes(key)) {
parsedUrl.searchParams.s... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/studio/post_studio_session.ts | packages/server/lib/cloud/api/studio/post_studio_session.ts | import { asyncRetry, linearDelay } from '../../../util/async_retry'
import { isRetryableError } from '../../network/is_retryable_error'
import os from 'os'
import { ParseKinds, postFetch } from '../../network/fetch'
const pkg = require('@packages/root')
const routes = require('../../routes') as typeof import('../../ro... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/studio/report_studio_error.ts | packages/server/lib/cloud/api/studio/report_studio_error.ts | import type { StudioCloudApi } from '@packages/types/src/studio/studio-server-types'
import Debug from 'debug'
import { stripPath } from '../../strip_path'
const debug = Debug('cypress:server:cloud:api:studio:report_studio_errors')
import { logError } from '@packages/stderr-filtering'
import exception from '../../excep... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/studio/get_studio_bundle.ts | packages/server/lib/cloud/api/studio/get_studio_bundle.ts | import { asyncRetry, linearDelay } from '../../../util/async_retry'
import { isRetryableError } from '../../network/is_retryable_error'
import fetch from 'cross-fetch'
import os from 'os'
import { strictAgent } from '@packages/network'
import { PUBLIC_KEY_VERSION } from '../../constants'
import { createWriteStream } fr... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/axios_middleware/logging.ts | packages/server/lib/cloud/api/axios_middleware/logging.ts | import type { InternalAxiosRequestConfig, AxiosResponse, AxiosError, AxiosInstance } from 'axios'
import Debug from 'debug'
const debug = Debug('cypress:server:cloud:api')
const logRequest = (req: InternalAxiosRequestConfig): InternalAxiosRequestConfig => {
debug(`${req.method} ${req.url}`)
return req
}
const l... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/axios_middleware/encryption.ts | packages/server/lib/cloud/api/axios_middleware/encryption.ts | import type { AxiosError, AxiosInstance, AxiosResponse, InternalAxiosRequestConfig } from 'axios'
import * as enc from '../../encryption'
import { PUBLIC_KEY_VERSION } from '../../constants'
import crypto, { KeyObject } from 'crypto'
import { DecryptionError } from '../cloud_request_errors'
import axios from 'axios'
l... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/axios_middleware/transform_error.ts | packages/server/lib/cloud/api/axios_middleware/transform_error.ts | import { isObject } from 'lodash'
import axios, { AxiosError, AxiosInstance } from 'axios'
declare module 'axios' {
export interface AxiosError {
isApiError?: boolean
}
}
export const transformError = (err: AxiosError | Error & { error?: any, statusCode: number, isApiError?: boolean }): never => {
const { d... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/cy-prompt/report_cy_prompt_error.ts | packages/server/lib/cloud/api/cy-prompt/report_cy_prompt_error.ts | import type { CyPromptCloudApi } from '@packages/types/src/cy-prompt/cy-prompt-server-types'
import Debug from 'debug'
import { stripPath } from '../../strip_path'
const debug = Debug('cypress:server:cloud:api:cy-prompt:report_cy_prompt_error')
export interface ReportCyPromptErrorOptions {
cloudApi: CyPromptCloudApi... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/cy-prompt/get_cy_prompt_bundle.ts | packages/server/lib/cloud/api/cy-prompt/get_cy_prompt_bundle.ts | import { asyncRetry, linearDelay } from '../../../util/async_retry'
import { isRetryableError } from '../../network/is_retryable_error'
import fetch from 'cross-fetch'
import os from 'os'
import { strictAgent } from '@packages/network'
import { PUBLIC_KEY_VERSION } from '../../constants'
import { createWriteStream } fr... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/api/cy-prompt/post_cy_prompt_session.ts | packages/server/lib/cloud/api/cy-prompt/post_cy_prompt_session.ts | import { asyncRetry, linearDelay } from '../../../util/async_retry'
import { isRetryableError } from '../../network/is_retryable_error'
import os from 'os'
import { ParseKinds, postFetch } from '../../network/fetch'
const pkg = require('@packages/root')
const routes = require('../../routes') as typeof import('../../ro... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/upload/stream_stalled_error.ts | packages/server/lib/cloud/upload/stream_stalled_error.ts | export const StreamStalledErrorKind = 'StreamStalled'
export class StreamStalledError extends Error {
public readonly kind = StreamStalledErrorKind
constructor (
public readonly maxActivityDwellTime: number,
public readonly chunkSizeBytes: number,
) {
super(`Stream stalled: failed to transfer ${chun... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/upload/send_file.ts | packages/server/lib/cloud/upload/send_file.ts | const rp = require('@cypress/request-promise')
const { fs } = require('../../util/fs')
export const sendFile = (filePath: string, uploadUrl: string) => {
return fs
.readFileAsync(filePath)
.then((buf) => {
return rp({
url: uploadUrl,
method: 'PUT',
body: buf,
})
})
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/upload/stream_activity_monitor.ts | packages/server/lib/cloud/upload/stream_activity_monitor.ts | import Debug from 'debug'
import { Transform, Readable } from 'stream'
import { StreamStalledError } from './stream_stalled_error'
const debug = Debug('cypress:server:cloud:stream-activity-monitor')
const debugVerbose = Debug('cypress-verbose:server:cloud:stream-activity-monitor')
/**
* `StreamActivityMonitor` encaps... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/cy-prompt/ensure_cy_prompt_bundle.ts | packages/server/lib/cloud/cy-prompt/ensure_cy_prompt_bundle.ts | import { ensureDir, readFile, pathExists, remove } from 'fs-extra'
import { getCyPromptBundle } from '../api/cy-prompt/get_cy_prompt_bundle'
import path from 'path'
import { verifySignature } from '../encryption'
import { extractAtomic } from '../extract_atomic'
interface EnsureCyPromptBundleOptions {
cyPromptPath: ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/cy-prompt/CyPromptManager.ts | packages/server/lib/cloud/cy-prompt/CyPromptManager.ts | import type { CyPromptManagerShape, CyPromptStatus, CyPromptServerDefaultShape, CyPromptServerShape, CyPromptCloudApi, CyPromptCDPClient, CyPromptAddSocketListenerOptions, CyPromptServerOptions } from '@packages/types'
import type { Router } from 'express'
import Debug from 'debug'
import { requireScript } from '../req... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/cy-prompt/CyPromptLifecycleManager.ts | packages/server/lib/cloud/cy-prompt/CyPromptLifecycleManager.ts | import { CyPromptManager } from './CyPromptManager'
import Debug from 'debug'
import type { CloudDataSource } from '@packages/data-context/src/sources'
import type { DataContext } from '@packages/data-context'
import { CloudRequest, createCloudRequest } from '../api/cloud_request'
import { isRetryableError } from '../n... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/network/parse_error.ts | packages/server/lib/cloud/network/parse_error.ts | const ParseErrorKind = 'ParseErrorKind'
export class ParseError extends Error {
public readonly kind = ParseErrorKind
constructor (public readonly originalError: Error, message?: string) {
super(message)
}
static isParseError (err: Error & { kind: string }): err is ParseError {
return err.kind === Par... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/network/non_retriable_cert_error_codes.ts | packages/server/lib/cloud/network/non_retriable_cert_error_codes.ts | export const NON_RETRIABLE_CERT_ERROR_CODES = Object.freeze({
// The leaf certificate signature can’t be verified
UNABLE_TO_VERIFY_LEAF_SIGNATURE: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
// The certificate is a self-signed certificate and not in trusted root store
DEPTH_ZERO_SELF_SIGNED_CERT: 'DEPTH_ZERO_SELF_SIGNED... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/network/fetch.ts | packages/server/lib/cloud/network/fetch.ts | import crossFetch from 'cross-fetch'
import { SystemError } from './system_error'
import { HttpError } from './http_error'
import { ParseError } from './parse_error'
import { strictAgent } from '@packages/network'
import Debug from 'debug'
const debug = Debug('cypress-verbose:server:cloud:api:put')
type FetchInit = O... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/network/nonretriable_cert_error_codes.ts | packages/server/lib/cloud/network/nonretriable_cert_error_codes.ts | export const NON_RETRIABLE_CERT_ERROR_CODES = Object.freeze({
// The leaf certificate signature can’t be verified
UNABLE_TO_VERIFY_LEAF_SIGNATURE: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
// The certificate is a self-signed certificate and not in trusted root store
DEPTH_ZERO_SELF_SIGNED_CERT: 'DEPTH_ZERO_SELF_SIGNED... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/network/system_error.ts | packages/server/lib/cloud/network/system_error.ts | /* Node doesn't expose its own internal system error, so we have to kind of ducktype it */
const SystemErrorKind = 'SystemError'
export class SystemError extends Error {
public readonly kind = SystemErrorKind
constructor (
public readonly originalError: Error,
public readonly url: string,
public reado... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/network/is_retryable_error.ts | packages/server/lib/cloud/network/is_retryable_error.ts | import { SystemError } from './system_error'
import { HttpError } from './http_error'
import Debug from 'debug'
import { isNonRetriableCertErrorCode } from './non_retriable_cert_error_codes'
const debug = Debug('cypress-verbose:server:is-retryable-error')
export const isRetryableError = (error: any) => {
debug('is ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/cloud/network/http_error.ts | packages/server/lib/cloud/network/http_error.ts | import { scrubUrl } from '../api/scrub_url'
export const HttpErrorKind = 'HttpError'
export class HttpError extends Error {
public readonly kind = HttpErrorKind
constructor (
message: string,
public readonly url: string,
public readonly status: number,
public readonly statusText: string,
publi... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/privileged-commands/privileged-commands-manager.ts | packages/server/lib/privileged-commands/privileged-commands-manager.ts | import _ from 'lodash'
import os from 'os'
import path from 'path'
import { v4 as uuidv4 } from 'uuid'
import * as exec from '../exec'
import * as files from '../files'
import { fs } from '../util/fs'
import task from '../task'
export interface SpecChannelOptions {
isSpecBridge: boolean
url: string
key: string
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/automation/automation_not_implemented.ts | packages/server/lib/automation/automation_not_implemented.ts | const AutomationNotImplementedKind = 'AutomationNotImplemented'
export class AutomationNotImplemented extends Error {
readonly kind = AutomationNotImplementedKind
constructor (message: string, automationType: string, ...args) {
super(`Automation command '${message}' not implemented by ${automationType}`)
}
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/automation/cookies.ts | packages/server/lib/automation/cookies.ts | import _ from 'lodash'
import Debug from 'debug'
import { isHostOnlyCookie } from '../browsers/cdp_automation'
import type { SerializableAutomationCookie } from '../util/cookies'
type AutomationFn<V, T> = (data: V) => Promise<T>
type AutomationMessageFn<V, T> = (message: string, data: V) => Promise<T>
export interfa... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/automation/util.ts | packages/server/lib/automation/util.ts | import type playwright from 'playwright-webkit'
import { domainMatch, pathMatch } from 'tough-cookie'
// @ts-ignore
export type CyCookie = Pick<chrome.cookies.Cookie, 'name' | 'value' | 'expirationDate' | 'hostOnly' | 'domain' | 'path' | 'secure' | 'httpOnly'> & {
// use `undefined` instead of `unspecified`
sameSi... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/automation/screenshot.ts | packages/server/lib/automation/screenshot.ts | import screenshots from '../screenshots'
export function Screenshot (screenshotsFolder?: string | false) {
return {
capture (data, automate) {
return screenshots.capture(data, automate)
.then((details) => {
// if there are no details, this is part of a multipart screenshot
// and shou... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/automation/automation.ts | packages/server/lib/automation/automation.ts | import Bluebird from 'bluebird'
import { v4 as uuidv4 } from 'uuid'
import { Cookies } from './cookies'
import { Screenshot } from './screenshot'
import type { BrowserPreRequest } from '@packages/proxy'
import type { AutomationCommands, AutomationMiddleware, OnRequestEvent, OnServiceWorkerClientSideRegistrationUpdated,... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/automation/index.ts | packages/server/lib/automation/index.ts | export * from './automation'
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/automation/helpers/aut_identifier.ts | packages/server/lib/automation/helpers/aut_identifier.ts | export const AUT_FRAME_NAME_IDENTIFIER = 'Your project:'
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/automation/helpers/evaluate_in_frame_context.ts | packages/server/lib/automation/helpers/evaluate_in_frame_context.ts | import type { Protocol } from 'devtools-protocol'
import type { SendDebuggerCommand } from '../../browsers/cdp_automation'
import Debug from 'debug'
import { isError } from 'lodash'
import type ProtocolMapping from 'devtools-protocol/types/protocol-mapping'
const debug = Debug('cypress:server:automation:helpers:evalua... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/automation/commands/key_press.ts | packages/server/lib/automation/commands/key_press.ts | import type { Protocol } from 'devtools-protocol'
import { NamedKeys, SupportedKey, SupportedNamedKey, toSupportedKey, isSupportedKey, SpaceKey } from '@packages/types'
import type { SendDebuggerCommand } from '../../browsers/cdp_automation'
import type { Client } from 'webdriver'
import Debug from 'debug'
import { isE... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/automation/commands/get_url.ts | packages/server/lib/automation/commands/get_url.ts | import { evaluateInFrameContext } from '../helpers/evaluate_in_frame_context'
import type { Protocol } from 'devtools-protocol'
import type { Client as WebDriverClient } from 'webdriver'
import type { SendDebuggerCommand } from '../../browsers/cdp_automation'
export async function cdpGetUrl (send: SendDebuggerCommand,... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/automation/commands/navigate_history.ts | packages/server/lib/automation/commands/navigate_history.ts | import { evaluateInFrameContext } from '../helpers/evaluate_in_frame_context'
import type { Protocol } from 'devtools-protocol'
import type { SendDebuggerCommand } from '../../browsers/cdp_automation'
import type { Client as WebDriverClient } from 'webdriver'
const expressionToEvaluate = (historyNumber: number) => `wi... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/automation/commands/get_frame_title.ts | packages/server/lib/automation/commands/get_frame_title.ts | import { evaluateInFrameContext } from '../helpers/evaluate_in_frame_context'
import type { Protocol } from 'devtools-protocol'
import type { SendDebuggerCommand } from '../../browsers/cdp_automation'
import type { Client as WebDriverClient } from 'webdriver'
const expressionToEvaluate = `window.document.title`
expor... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/automation/commands/reload_frame.ts | packages/server/lib/automation/commands/reload_frame.ts | import { evaluateInFrameContext } from '../helpers/evaluate_in_frame_context'
import type { Protocol } from 'devtools-protocol'
import type { SendDebuggerCommand } from '../../browsers/cdp_automation'
import type { Client as WebDriverClient } from 'webdriver'
const expressionToEvaluate = (forceReload = false) => `wind... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/gui/menu.ts | packages/server/lib/gui/menu.ts | import _ from 'lodash'
import os from 'os'
// tslint:disable-next-line no-implicit-dependencies - electron dep needs to be defined
import { Menu, shell } from 'electron'
import appData from '../util/app_data'
// hoist up options and allow calling menu.set({})
// to override existing options or be called multiple
// ti... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/gui/windows.ts | packages/server/lib/gui/windows.ts | import _ from 'lodash'
import Bluebird from 'bluebird'
// tslint:disable-next-line no-implicit-dependencies - electron dep needs to be defined
import { BrowserWindow } from 'electron'
import Debug from 'debug'
import * as savedState from '../saved_state'
const debug = Debug('cypress:server:windows')
export type Windo... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/lib/gui/links.ts | packages/server/lib/gui/links.ts | // tslint:disable-next-line no-implicit-dependencies - electron dep needs to be defined
import { shell } from 'electron'
// NOTE: in order for query params to be passed through on links
// forwardQueryParams: true must be set for that slug in the on package
export const openExternal = (url: string) => {
return shel... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/vitest.config.ts | packages/config/vitest.config.ts | import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
include: ['test/**/*.spec.ts'],
globals: true,
environment: 'node',
},
})
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/src/browser.ts | packages/config/src/browser.ts | import _ from 'lodash'
import Debug from 'debug'
import {
defaultSpecPattern,
defaultExcludeSpecPattern,
options,
breakingOptions,
breakingRootOptions,
testingTypeBreakingOptions,
} from './options'
import type { BreakingErrResult, TestingType } from '@packages/types'
import type { BreakingOption, Breaking... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/src/utils.ts | packages/config/src/utils.ts | import _ from 'lodash'
import { toBoolean } from 'underscore.string'
import { origin } from '@packages/network-tools'
export const hideKeys = (token?: string | number | boolean) => {
if (!token) {
return
}
if (typeof token !== 'string') {
// maybe somehow we passes key=true?
// https://github.com/cy... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/src/validation.ts | packages/config/src/validation.ts | import path from 'path'
import * as _ from 'lodash'
import { commaListsOr } from 'common-tags'
import Debug from 'debug'
import { BROWSER_FAMILY } from '@packages/types'
const debug = Debug('cypress:server:validation')
// validation functions take a key and a value and should:
// - return true if it passes validatio... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/src/options.ts | packages/config/src/options.ts | import os from 'os'
import path from 'path'
import pkg from '@packages/root'
import type { AllCypressErrorNames } from '@packages/errors'
import type { TestingType } from '@packages/types'
import * as validate from './validation'
/**
* When adding a new config option, ensure the following steps are taken:
* - Add t... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/src/index.ts | packages/config/src/index.ts | // Separating this, so we don't pull all of the server side
// babel transforms, etc. into client-side usage of the config code
export * from './browser'
export * from './project'
export { addProjectIdToCypressConfig, addToCypressConfig, addTestingTypeToCypressConfig, AddTestingTypeToCypressConfigOptions, defineConfi... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/src/ast-utils/addToCypressConfig.ts | packages/config/src/ast-utils/addToCypressConfig.ts | import * as t from '@babel/types'
import traverse from '@babel/traverse'
import fs from 'fs-extra'
import dedent from 'dedent'
import path from 'path'
import debugLib from 'debug'
import { parse, print } from 'recast'
import { addToCypressConfigPlugin } from './addToCypressConfigPlugin'
import { addComponentDefinition... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/src/ast-utils/addToCypressConfigPlugin.ts | packages/config/src/ast-utils/addToCypressConfigPlugin.ts | import type { NodePath, ParserOptions, PluginObj, Visitor } from '@babel/core'
import * as t from '@babel/types'
import debugLib from 'debug'
import { print } from 'recast'
const debug = debugLib('cypress:config:addToCypressConfigPlugin')
interface AddToCypressConfigPluginOptions {
shouldThrow?: boolean
}
/**
* S... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/src/ast-utils/astConfigHelpers.ts | packages/config/src/ast-utils/astConfigHelpers.ts | import * as t from '@babel/types'
import { parse, visit } from 'recast'
import dedent from 'dedent'
import assert from 'assert'
/**
* AST definition Node for:
*
* e2e: {
* setupNodeEvents(on, config) {
* // implement node event listeners here
* }
* }
*/
export function addE2EDefinition (): t.ObjectProp... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/src/project/utils.ts | packages/config/src/project/utils.ts | import Debug from 'debug'
import fs from 'fs-extra'
import _ from 'lodash'
import path from 'path'
import type {
ResolvedFromConfig,
ResolvedConfigurationOptionSource,
} from '@packages/types'
import errors, { ConfigValidationFailureInfo, CypressError } from '@packages/errors'
import type { Config } from './types... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/src/project/types.ts | packages/config/src/project/types.ts | export type Config = Record<string, any>
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/src/project/index.ts | packages/config/src/project/index.ts | import _ from 'lodash'
import Debug from 'debug'
// @ts-ignore
import deepDiff from 'return-deep-diff'
import errors, { ConfigValidationFailureInfo, CypressError } from '@packages/errors'
import type {
ResolvedFromConfig, TestingType, FullConfig,
} from '@packages/types'
import {
validate,
validateNoBreakingCon... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/validation.spec.ts | packages/config/test/validation.spec.ts | import { describe, it, expect } from 'vitest'
import * as validation from '../src/validation'
describe('config/src/validation', () => {
const mockKey = 'mockConfigKey'
describe('.validateAny', () => {
it('returns new validation function that accepts 2 arguments', () => {
const validate = validation.vali... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/index.spec.ts | packages/config/test/index.spec.ts | import { vi, describe, it, expect } from 'vitest'
import path from 'path'
import * as configUtil from '../src/index'
describe('config/src/index', () => {
describe('.allowed', () => {
it('returns filter config only containing allowed keys', () => {
const keys = configUtil.allowed({
'baseUrl': 'https... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/utils.spec.ts | packages/config/test/utils.spec.ts | import { vi, describe, it, expect } from 'vitest'
import {
hideKeys,
setUrls,
coerce,
isResolvedConfigPropDefault,
} from '../src/utils'
import {
getProcessEnvVars,
} from '../src/project/utils'
describe('config/src/utils', () => {
beforeEach(function () {
vi.unstubAllEnvs()
vi.stubEnv('CYPRESS_CO... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/ast-utils/addToCypressConfigPlugin-e2e.spec.ts | packages/config/test/ast-utils/addToCypressConfigPlugin-e2e.spec.ts | import path from 'path'
import pluginTester from 'babel-plugin-tester'
import { addToCypressConfigPlugin } from '../../src/ast-utils/addToCypressConfigPlugin'
import { addE2EDefinition } from '../../src/ast-utils/astConfigHelpers'
pluginTester({
pluginName: 'addToCypressConfigPlugin: e2e',
plugin: () => {
ret... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/ast-utils/addPluginId.spec.ts | packages/config/test/ast-utils/addPluginId.spec.ts | import pluginTester from 'babel-plugin-tester'
import * as t from '@babel/types'
import dedent from 'dedent'
import { addToCypressConfigPlugin } from '../../src/ast-utils/addToCypressConfigPlugin'
pluginTester({
pluginName: 'addPluginId',
plugin: addToCypressConfigPlugin(
t.objectProperty(
t.identifier(... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/ast-utils/addToCypressConfig.spec.ts | packages/config/test/ast-utils/addToCypressConfig.spec.ts | import { vi, describe, it, expect } from 'vitest'
import fs from 'fs-extra'
import path from 'path'
import dedent from 'dedent'
import { addTestingTypeToCypressConfig } from '../../src/ast-utils/addToCypressConfig'
vi.mock('fs-extra', async (importActual) => {
const actual = await importActual()
return {
defa... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/ast-utils/addToCypressConfigPlugin.spec.ts | packages/config/test/ast-utils/addToCypressConfigPlugin.spec.ts | import pluginTester from 'babel-plugin-tester'
import path from 'path'
import { addToCypressConfigPlugin } from '../../src/ast-utils/addToCypressConfigPlugin'
import { addComponentDefinition } from '../../src/ast-utils/astConfigHelpers'
pluginTester({
pluginName: 'addToCypressConfigPlugin: component',
plugin: () ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/__babel_fixtures__/adding-e2e/fixture/code.ts | packages/config/test/__babel_fixtures__/adding-e2e/fixture/code.ts | import { defineConfig } from 'cypress'
export default defineConfig({
component: {
devServer: {
framework: 'react',
bundler: 'webpack',
},
},
})
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/__babel_fixtures__/adding-e2e/fixture/output.ts | packages/config/test/__babel_fixtures__/adding-e2e/fixture/output.ts | import { defineConfig } from "cypress";
export default defineConfig({
component: {
devServer: {
framework: "react",
bundler: "webpack",
},
},
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/__babel_fixtures__/adding-e2e/existing/code.ts | packages/config/test/__babel_fixtures__/adding-e2e/existing/code.ts | import { defineConfig } from 'cypress'
export default defineConfig({
e2e: {},
})
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/__babel_fixtures__/adding-e2e/existing/output.ts | packages/config/test/__babel_fixtures__/adding-e2e/existing/output.ts | import { defineConfig } from "cypress";
export default defineConfig({
e2e: {},
});
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/__babel_fixtures__/adding-component/destructure-require-ts/code.ts | packages/config/test/__babel_fixtures__/adding-component/destructure-require-ts/code.ts | const { defineConfig: cypressDefineConfig } = require('cypress')
export default cypressDefineConfig({
})
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/__babel_fixtures__/adding-component/destructure-require-ts/output.ts | packages/config/test/__babel_fixtures__/adding-component/destructure-require-ts/output.ts | const { defineConfig: cypressDefineConfig } = require("cypress");
export default cypressDefineConfig({
component: {
devServer: {
framework: "react",
bundler: "webpack",
},
},
});
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/__babel_fixtures__/adding-component/import-alias-ts/code.ts | packages/config/test/__babel_fixtures__/adding-component/import-alias-ts/code.ts | import { defineConfig as myDefineConfig } from 'cypress'
export default myDefineConfig({
e2e: {},
})
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/__babel_fixtures__/adding-component/import-alias-ts/output.ts | packages/config/test/__babel_fixtures__/adding-component/import-alias-ts/output.ts | import { defineConfig as myDefineConfig } from "cypress";
export default myDefineConfig({
e2e: {},
component: {
devServer: {
framework: "react",
bundler: "webpack",
},
},
});
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/__babel_fixtures__/adding-component/export-default-ts/code.ts | packages/config/test/__babel_fixtures__/adding-component/export-default-ts/code.ts | export default {
e2e: {},
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/__babel_fixtures__/adding-component/export-default-ts/output.ts | packages/config/test/__babel_fixtures__/adding-component/export-default-ts/output.ts | export default {
e2e: {},
component: {
devServer: {
framework: "react",
bundler: "webpack",
},
},
};
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/__babel_fixtures__/adding-component/module-exports-ts/code.ts | packages/config/test/__babel_fixtures__/adding-component/module-exports-ts/code.ts | module.exports = {
e2e: {},
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/__babel_fixtures__/adding-component/module-exports-ts/output.ts | packages/config/test/__babel_fixtures__/adding-component/module-exports-ts/output.ts | module.exports = {
e2e: {},
component: {
devServer: {
framework: "react",
bundler: "webpack",
},
},
};
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/config/test/__babel_fixtures__/adding-component/import-default-ts/code.ts | packages/config/test/__babel_fixtures__/adding-component/import-default-ts/code.ts | import cy from 'cypress'
export default cy.defineConfig({
e2e: {},
})
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.