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/launchpad/cypress/fixtures/test-project/cypress.config.ts | packages/launchpad/cypress/fixtures/test-project/cypress.config.ts | // tslint:disable-next-line: no-implicit-dependencies - cypress
import { defineConfig } from 'cypress'
export default defineConfig({
'projectId': 'test01',
})
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/scaffold-component-testing.cy.ts | packages/launchpad/cypress/e2e/scaffold-component-testing.cy.ts | import type { ProjectFixtureDir } from '@tooling/system-tests'
function startSetupFor (project: ProjectFixtureDir) {
cy.scaffoldProject(project)
cy.openProject(project)
cy.visitLaunchpad()
cy.contains('Component Testing').click()
cy.get(`[data-testid="select-framework"]`)
}
// TODO: assert against all scaf... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/scaffold-project.cy.ts | packages/launchpad/cypress/e2e/scaffold-project.cy.ts | import type { SnapshotScaffoldTestResult } from '../tasks/snapshotsScaffold'
// The tests in this file take an existing project without Cypress Configured
// and add Cypress using the launchpad setup wizard.
//
// See `system-tests/projects/pristine` for an example.
//
// After adding a test for a project for the firs... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/slow-network.cy.ts | packages/launchpad/cypress/e2e/slow-network.cy.ts | import type Sinon from 'sinon'
describe('slow network: launchpad', () => {
beforeEach(() => {
cy.scaffoldProject('todos')
cy.withCtx((ctx, o) => {
const currentStubbedFetch = ctx.util.fetch;
(ctx.util.fetch as Sinon.SinonStub).restore()
o.testState.pendingFetches = []
o.sinon.stub(c... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/config-warning.cy.ts | packages/launchpad/cypress/e2e/config-warning.cy.ts | const THIRTY_SECONDS = 1000 * 30
describe('baseUrl', () => {
it('should show baseUrl warning if Cypress cannot connect to provided baseUrl', () => {
cy.scaffoldProject('config-with-base-url-warning')
cy.openProject('config-with-base-url-warning')
cy.visitLaunchpad()
cy.get('[data-cy-testingtype="e2e... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/error-handling.cy.ts | packages/launchpad/cypress/e2e/error-handling.cy.ts | describe('Error handling', () => {
it('it handles a config error', () => {
cy.scaffoldProject('unify-plugin-errors')
cy.openProject('unify-plugin-errors')
cy.loginUser()
cy.visitLaunchpad()
cy.get('[data-cy-testingType=e2e]').click()
cy.get('body')
.and('contain.text', 'threw an error f... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/navigation.cy.ts | packages/launchpad/cypress/e2e/navigation.cy.ts | import defaultMessages from '@packages/frontend-shared/src/locales/en-US.json'
import type { Interception } from '@packages/net-stubbing/lib/external-types'
describe('Navigation', () => {
it('External links trigger mutation to open in a new browser', () => {
cy.openGlobalMode()
cy.visitLaunchpad()
cy.in... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/open-mode.cy.ts | packages/launchpad/cypress/e2e/open-mode.cy.ts | import type { SinonStub } from 'sinon'
import defaultMessages from '@packages/frontend-shared/src/locales/en-US.json'
import { GET_MAJOR_VERSION_FOR_CONTENT } from '@packages/types'
describe('Launchpad: Open Mode', () => {
describe('global mode', () => {
it('shows a loading spinner before application mounts, and... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/top-nav-launchpad.cy.ts | packages/launchpad/cypress/e2e/top-nav-launchpad.cy.ts | import type { SinonStub } from 'sinon'
import defaultMessages from '@packages/frontend-shared/src/locales/en-US.json'
import type Sinon from 'sinon'
import { CYPRESS_REMOTE_MANIFEST_URL, NPM_CYPRESS_REGISTRY_URL } from '@packages/types'
const pkg = require('@packages/root')
const loginText = defaultMessages.topNav.lo... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/project-setup.cy.ts | packages/launchpad/cypress/e2e/project-setup.cy.ts | import { GET_MAJOR_VERSION_FOR_CONTENT } from '@packages/types'
import { getPathForPlatform } from './support/getPathForPlatform'
function verifyScaffoldedFiles (testingType: string) {
const expectedFileOrder = (testingType === 'e2e') ? [
'cypress.config.',
'support/e2e.',
'support/commands.',
'fixtu... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/config-files-error-handling.cy.ts | packages/launchpad/cypress/e2e/config-files-error-handling.cy.ts | import { getPathForPlatform } from './support/getPathForPlatform'
const expectStackToBe = (mode: 'open' | 'closed') => {
cy.get(`[data-cy="stack-open-${mode === 'open' ? 'true' : 'false'}"]`)
}
describe('Config files error handling', () => {
beforeEach(() => {
cy.scaffoldProject('pristine')
cy.scaffoldPro... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/open-with-preferences.cy.ts | packages/launchpad/cypress/e2e/open-with-preferences.cy.ts | describe('Launchpad: Open With Preferences', () => {
beforeEach(() => {
cy.scaffoldProject('todos')
cy.openProject('todos')
})
it('it should open the app when there are saved preferences', () => {
cy.visitLaunchpad()
})
})
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/choose-a-browser.cy.ts | packages/launchpad/cypress/e2e/choose-a-browser.cy.ts | import type { FoundBrowser } from '@packages/types'
describe('Choose a browser page', () => {
beforeEach(() => {
cy.scaffoldProject('launchpad')
cy.withCtx((ctx, _) => {
ctx.actions.project.launchCount = 0
})
})
describe('System Browsers Detected', () => {
beforeEach(() => {
cy.findB... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/global-mode.cy.ts | packages/launchpad/cypress/e2e/global-mode.cy.ts | import defaultMessages from '@packages/frontend-shared/src/locales/en-US.json'
import path from 'path'
import type { SinonSpy } from 'sinon'
import { getPathForPlatform } from './support/getPathForPlatform'
const sep = Cypress.platform === 'win32' ? '\\' : '/'
describe('Launchpad: Global Mode', () => {
describe('me... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/system-tests/config-spec.cy.ts | packages/launchpad/cypress/e2e/system-tests/config-spec.cy.ts | describe('config-spec', () => {
it('can filter browsers from config', () => {
cy.scaffoldProject('plugin-filter-browsers')
cy.findBrowsers()
cy.openProject('plugin-filter-browsers', ['--e2e'])
cy.withCtx(async (ctx) => {
expect(await ctx.browser.machineBrowsers()).to.have.length(13) // stubbed l... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/support/getPathForPlatform.ts | packages/launchpad/cypress/e2e/support/getPathForPlatform.ts | export function getPathForPlatform (posixPath: string) {
if (Cypress.platform === 'win32') return posixPath.replaceAll('/', '\\')
return posixPath
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/support/dropFileWithPath.ts | packages/launchpad/cypress/e2e/support/dropFileWithPath.ts | declare global {
namespace Cypress {
interface Chainable {
dropFileWithPath(filePath: string): Cypress.Chainable<JQuery<HTMLInputElement>>
}
}
}
// Here we export the function with no intention to import it
// This only tells the typescript type checker that this definitely is a module
// This way, w... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/support/e2eSupport.ts | packages/launchpad/cypress/e2e/support/e2eSupport.ts | /// <reference path="../../../../frontend-shared/cypress/support/e2e.ts" />
require('@packages/frontend-shared/cypress/support/e2e')
require('./dropFileWithPath')
require('./containsPath')
require('cypress-plugin-tab')
require('cypress-real-events/support')
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/e2e/support/containsPath.ts | packages/launchpad/cypress/e2e/support/containsPath.ts | declare global {
namespace Cypress {
interface Chainable {
/**
* adapter for cy.contains that converts paths
* to windows compatible paths on windows
* @param filePath posix formatted path
*/
containsPath(filePath: string)
/**
* adapter for cy.contains that con... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/component/support/commands.ts | packages/launchpad/cypress/component/support/commands.ts | /// <reference path="../../../../frontend-shared/cypress/support/component.ts" />
import '@packages/frontend-shared/cypress/support/component.ts'
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/component/support/attachFileWithPath.ts | packages/launchpad/cypress/component/support/attachFileWithPath.ts | declare global {
namespace Cypress {
interface Chainable {
attachFileWithPath: (path: string) => Chainable<JQuery<HTMLInputElement>>
}
}
}
export function attachFileWithPath (subject, path: string) {
const attachedFile = new File([new Blob()], 'cypress.config.ts')
Object.defineProperty(attachedF... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launchpad/cypress/component/support/index.ts | packages/launchpad/cypress/component/support/index.ts | // ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// au... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/packherd-require/vitest.config.ts | packages/packherd-require/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/packherd-require/src/default-transpile-cache.ts | packages/packherd-require/src/default-transpile-cache.ts | import type { TranspileCache } from './types'
/**
* In memory transpile cache that is used if none was provided to `packherd:require`.
*/
export class DefaultTranspileCache implements TranspileCache {
private readonly _cache: Map<string, string> = new Map()
get (fullPath: string): string | undefined {
// In... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/packherd-require/src/transpile-ts.ts | packages/packherd-require/src/transpile-ts.ts | import type { Debugger } from 'debug'
import { TransformOptions, transformSync } from 'esbuild'
import type { TranspileCache } from './types'
import path from 'path'
import { installSourcemapSupport } from './sourcemap-support'
type EnhancedModule = NodeModule & {
_extensions: Record<string, (mod: EnhancedModule, fi... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/packherd-require/src/sourcemap-support.ts | packages/packherd-require/src/sourcemap-support.ts | import debug from 'debug'
import path from 'path'
import { MappedPosition, RawSourceMap, SourceMapConsumer } from 'source-map-js'
import type {
MapAndSourceContent,
TranspileCache,
UrlAndMap,
} from './types'
import convertSourceMap from 'convert-source-map'
import { DefaultTranspileCache } from './default-transp... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/packherd-require/src/loader.ts | packages/packherd-require/src/loader.ts | import debug from 'debug'
import Module from 'module'
import path from 'path'
import type {
ModuleBuiltin,
ModuleDefinition,
ModuleLoadResult,
ModuleResolveResult,
ModuleNeedsReload,
} from './types'
import { strict as assert } from 'assert'
const logDebug = debug('cypress-verbose:packherd:debug')
const logT... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | true |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/packherd-require/src/types.ts | packages/packherd-require/src/types.ts | import type {
TransformOptions,
} from 'esbuild'
import type { SourceMapConsumer } from 'source-map-js'
// -----------------
// Loading/Require
// -----------------
type NodeRequireFunction = (id: string) => any
/**
* The function that needs to be called in order to instantiate a Node.js module definition.
* Inv... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/packherd-require/src/require.ts | packages/packherd-require/src/require.ts | import debug from 'debug'
import { DefaultTranspileCache } from './default-transpile-cache'
import {
GetModuleKeyOpts,
ModuleLoaderOpts,
PackherdModuleLoader,
} from './loader'
import type {
ModuleNeedsReload,
PackherdTranspileOpts,
} from './types'
import path from 'path'
const logInfo = debug('cypress-verb... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/packherd-require/test/circular-dependency.spec.ts | packages/packherd-require/test/circular-dependency.spec.ts | import { describe, it, expect } from 'vitest'
// NOTE: these relative paths only work from the ./dist folder
require('../test/fixtures/circular-deps/hook-require')
const result = require('../test/fixtures/circular-deps/lib/entry')
describe('Circular Dependency', () => {
it('is properly processed', () => {
expec... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/packherd-require/test/normal-dependency.spec.ts | packages/packherd-require/test/normal-dependency.spec.ts | import { describe, it, expect } from 'vitest'
// NOTE: these relative paths only work from the ./dist folder
require('../test/fixtures/normal-deps/hook-require')
const result = require('../test/fixtures/normal-deps/lib/entry')
describe('Normal Dependency', () => {
it('is properly processed', () => {
expect(resu... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/runner/webpack.config.ts | packages/runner/webpack.config.ts | import _ from 'lodash'
import { waitUntilIconsBuilt } from '../../scripts/ensure-icons'
import { getCommonConfig, getSimpleConfig, getCopyWebpackPlugin } from '@packages/web-config/webpack.config.base'
import path from 'path'
import type webpack from 'webpack'
const commonConfig = getCommonConfig()
const CopyWebpackPl... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/runner/unified-runner.tsx | packages/runner/unified-runner.tsx | import React from 'react'
import { createRoot } from 'react-dom/client'
import $Cypress from '@packages/driver'
import { Reporter } from '@packages/reporter/src/main'
import shortcuts from '@packages/reporter/src/lib/shortcuts'
import * as MobX from 'mobx'
export const UnifiedRunner = {
CypressJQuery: $Cypress.$,
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/runner/index.d.ts | packages/runner/index.d.ts | /// <reference path="../../cli/types/cy-blob-util.d.ts" />
/// <reference path="../../cli/types/cy-bluebird.d.ts" />
/// <reference path="../../cli/types/cy-minimatch.d.ts" />
/// <reference path="../../cli/types/cypress.d.ts" />
/// <reference path="../../cli/types/cypress-global-vars.d.ts" />
/// <reference path="..... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/runner/injection/patches/xmlHttpRequest.ts | packages/runner/injection/patches/xmlHttpRequest.ts | export const patchXmlHttpRequest = (window: Window) => {
const originalXmlHttpRequestOpen = window.XMLHttpRequest.prototype.open
window.XMLHttpRequest.prototype.open = function (...args) {
const result = originalXmlHttpRequestOpen.apply(this, args)
if (args.length > 2 && !args[2]) {
this.setRequestH... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/runner/injection/patches/cross-origin/cookies.ts | packages/runner/injection/patches/cross-origin/cookies.ts | import {
CookieJar,
toughCookieToAutomationCookie,
automationCookieToToughCookie,
SerializableAutomationCookie,
} from '@packages/server/lib/util/cookies'
import type { Cookie as ToughCookie } from '@packages/server/lib/util/cookies'
function isHostOnlyCookie (domain) {
return domain[0] !== '.'
}
const pars... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/runner/injection/patches/cross-origin/fetch.ts | packages/runner/injection/patches/cross-origin/fetch.ts | import { captureFullRequestUrl, requestSentWithCredentials } from './utils'
export const patchFetch = (window) => {
// if fetch is available in the browser, or is polyfilled by whatwg fetch
// intercept method calls and add cypress headers to determine cookie applications in the proxy
// for simulated top. @see ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/runner/injection/patches/cross-origin/setAttribute.ts | packages/runner/injection/patches/cross-origin/setAttribute.ts | import constants from '@packages/rewriter/lib/constants.json'
export const patchElementIntegrity = (window: Window) => {
const originalFormElementSetAttribute = window.HTMLScriptElement.prototype.setAttribute
window.HTMLScriptElement.prototype.setAttribute = function (qualifiedName, value) {
if (qualifiedName... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/runner/injection/patches/cross-origin/xmlHttpRequest.ts | packages/runner/injection/patches/cross-origin/xmlHttpRequest.ts | import { captureFullRequestUrl, requestSentWithCredentials } from './utils'
export const patchXmlHttpRequest = (window: Window) => {
// intercept method calls and add cypress headers to determine cookie applications in the proxy
// for simulated top
const originalXmlHttpRequestOpen = window.XMLHttpRequest.proto... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/runner/injection/patches/cross-origin/utils/index.ts | packages/runner/injection/patches/cross-origin/utils/index.ts | export const captureFullRequestUrl = (relativeOrAbsoluteUrlString: string, window: Window) => {
// need to pass the window here by reference to generate the correct absolute URL if needed. Spec Bridge does NOT contain sub domain
let url
try {
url = new URL(relativeOrAbsoluteUrlString).toString()
} catch (e... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/runner/src/main.scss.d.ts | packages/runner/src/main.scss.d.ts | // This file is automatically generated.
// Please do not change this file!
interface CssExports {
}
export const cssExports: CssExports;
export default cssExports;
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/vitest.config.ts | packages/types/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/types/src/editors.ts | packages/types/src/editors.ts | export interface Editor {
id: string
binary?: string | null | undefined
name: string
}
export interface EditorsResult {
preferredOpener?: Editor
availableEditors: Editor[]
}
export interface FileDetails {
absoluteFile: string
column: number
displayFile?: any // ReactNode
line: number
originalFile:... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/config.ts | packages/types/src/config.ts | /// <reference path="../../../cli/types/cypress.d.ts" />
import type { AllModeOptions, TestingType } from '.'
export const RESOLVED_FROM = ['default', 'config', 'plugin', 'envFile', 'env', 'cli', 'runtime'] as const
export type ResolvedConfigurationOptionSource = typeof RESOLVED_FROM[number]
export type ResolvedFro... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/browser.ts | packages/types/src/browser.ts | export const BROWSER_FAMILY = ['chromium', 'firefox', 'webkit']
type BrowserName = 'electron' | 'chrome' | 'chromium' | 'firefox' | 'webkit' | string
export type BrowserChannel = 'stable' | 'canary' | 'beta' | 'dev' | 'nightly' | string
export type BrowserFamily = typeof BROWSER_FAMILY[number]
export type BrowserVa... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/modeOptions.ts | packages/types/src/modeOptions.ts | export interface CommonModeOptions {
_?: (string | null)[] | null
invokedFromCli: boolean
userNodePath?: string
userNodeVersion?: string
configFile?: string | null
}
export interface RunModeOptions extends CommonModeOptions {
runProject?: string
project?: string
cwd: string
testingType?: TestingType
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/driver.ts | packages/types/src/driver.ts | import type { ReporterRunState } from './reporter'
interface MochaRunnerState {
startTime?: number
currentId?: string | null
currentRetry?: number | null
emissions?: Emissions
tests?: Record<string, Cypress.ObjectLike>
passed?: number
failed?: number
pending?: number
numLogs?: number
}
export type R... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/platform.ts | packages/types/src/platform.ts | /// <reference types="node" />
export const SUPPORTED_PLATFORMS = ['linux', 'darwin', 'win32'] as const
export type PlatformName = typeof SUPPORTED_PLATFORMS[number]
export function assertValidPlatform (platform: NodeJS.Platform): asserts platform is PlatformName {
if (!SUPPORTED_PLATFORMS.includes(platform as any)... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/git.ts | packages/types/src/git.ts | export const gitStatusType = ['modified', 'created', 'unmodified', 'noGitInfo'] as const
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/reporter.ts | packages/types/src/reporter.ts | export interface ReporterRunState {
autoScrollingEnabled?: boolean
scrollTop?: number
}
export interface StatsStoreStartInfo {
startTime: string
numPassed?: number
numFailed?: number
numPending?: number
}
export interface ReporterStartInfo extends StatsStoreStartInfo {
isSpecsListOpen: boolean
autoScr... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/util.ts | packages/types/src/util.ts | export type NonNullable <T> = T extends null | undefined ? never : T
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/cloud.ts | packages/types/src/cloud.ts | export type CloudApi = {
retryWithBackoff (fn: (attemptIndex: number) => Promise<any>): Promise<any>
requestPromise: {
get (options: any): Promise<any>
}
publicKeyVersion: string
enc: {
verifySignature (body: string, signature: string): boolean
}
baseUrl: string
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/server.ts | packages/types/src/server.ts | import type { FoundBrowser } from './browser'
import type { ReceivedCypressOptions } from './config'
import type { PlatformName } from './platform'
import type { RunModeVideoApi } from './video'
import type { ProtocolManagerShape } from './protocol'
import type Protocol from 'devtools-protocol'
import type { SupportedK... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/video.ts | packages/types/src/video.ts | // Progress callback called with percentage `0 <= p <= 1` of compression progress.
type OnProgress = (p: number) => void
export type ProcessOptions = {
videoName: string
compressedVideoName: string
videoCompression: number
chaptersConfig?: string
onProgress?: OnProgress
outputOptions?: string[]
videoFilt... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/auth.ts | packages/types/src/auth.ts | export type AuthStateName = typeof authStateName[number]
export const authStateName = ['AUTH_COULD_NOT_LAUNCH_BROWSER', 'AUTH_ERROR_DURING_LOGIN', 'AUTH_BROWSER_LAUNCHED'] as const
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/cache.ts | packages/types/src/cache.ts | export interface Cache {
PROJECTS: string[]
PROJECT_PREFERENCES: Record<string, Preferences>
USER: CachedUser
COHORTS: Record<string, Cohort>
PROJECTS_CONFIG: Record<string, any>
}
import type { AllowedState } from './preferences'
export type Preferences = AllowedState
export interface CachedUser {
authT... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/proxy.ts | packages/types/src/proxy.ts | export type ProxyTimings = {
cdpRequestWillBeSentTimestamp: number
cdpRequestWillBeSentReceivedTimestamp: number
proxyRequestReceivedTimestamp: number
cdpLagDuration: number
proxyRequestCorrelationDuration: number
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/constants.ts | packages/types/src/constants.ts | import semverMajor from 'semver/functions/major'
import packageInfo from '@packages/root'
import type { SpecFile } from './spec'
export const PLUGINS_STATE = ['uninitialized', 'initializing', 'initialized', 'error'] as const
export type PluginsState = typeof PLUGINS_STATE[number]
export const CODE_LANGUAGES = [
{... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/automation.ts | packages/types/src/automation.ts | /// <reference path="../../../cli/types/cypress-automation.d.ts" />
export type AutomationElementId = `${string}-string`
const invalidKeyErrorKind = 'InvalidKeyError'
export type SupportedNamedKey = Cypress.SupportedNamedKey
export const SpaceKey = 'Space'
/**
* Array of all supported named keys that can be used ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/spec.ts | packages/types/src/spec.ts | // TODO: Do we need this many ways to describe a spec?
export interface BaseSpec {
name: string
relative: string
absolute: string
}
export interface SpecFile extends BaseSpec {
baseName: string
fileName: string
}
export interface FoundSpec extends SpecFile {
specFileExtension: string
fileExtension: stri... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/index.ts | packages/types/src/index.ts | export * from './cache'
export * from './constants'
export * from './preferences'
export * from './automation'
export * from './driver'
export * from './spec'
export * from './editors'
export * from './auth'
export * from './browser'
export type { PlatformName } from './platform'
export {
BROWSER_FAMILY,
} ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/warning.ts | packages/types/src/warning.ts | export interface Warning {
title: string
message: string
details?: string
}
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/protocol.ts | packages/types/src/protocol.ts | import type Database from 'better-sqlite3'
import type ProtocolMapping from 'devtools-protocol/types/protocol-mapping'
import type { IncomingHttpHeaders } from 'http'
import type { Readable } from 'stream'
import type { ProxyTimings } from './proxy'
import type { FoundSpec } from './spec'
type Commands = ProtocolMappi... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/preferences.ts | packages/types/src/preferences.ts | import type { BannersState, Editor, MajorVersionWelcomeDismissed } from '.'
export const NotifyCompletionStatuses = ['passed', 'failed', 'cancelled', 'errored'] as const
export type NotifyWhenRunCompletes = typeof NotifyCompletionStatuses[number]
export const defaultPreferences: AllowedState = {
autoScrollingEnabl... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/studio/studio-server-types.ts | packages/types/src/studio/studio-server-types.ts | // Note: This file is owned by the cloud delivered
// `studio` bundle. It is downloaded and copied to the app.
// It should not be modified directly in the app.
/// <reference types="cypress" />
import type ProtocolMapping from 'devtools-protocol/types/protocol-mapping.d'
import type { Router } from 'express'
import ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/studio/index.ts | packages/types/src/studio/index.ts | import type { ProtocolManagerShape } from '../protocol'
import type { StudioServerShape, StudioEvent } from './studio-server-types'
export * from './studio-server-types'
export const STUDIO_STATUSES = ['NOT_INITIALIZED', 'INITIALIZING', 'ENABLED', 'IN_ERROR'] as const
export type StudioStatus = typeof STUDIO_STATUSE... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/cy-prompt/cy-prompt-server-types.ts | packages/types/src/cy-prompt/cy-prompt-server-types.ts | // Note: This file is owned by the cloud delivered
// `cy-prompt bundle. It is downloaded and copied to the app.
// It should not be modified directly in the app.
/// <reference types="cypress" />
import type ProtocolMapping from 'devtools-protocol/types/protocol-mapping.d'
import type { Router } from 'express'
impor... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/src/cy-prompt/index.ts | packages/types/src/cy-prompt/index.ts | import type { CyPromptServerShape } from './cy-prompt-server-types'
export * from './cy-prompt-server-types'
export const CY_PROMPT_STATUSES = ['NOT_INITIALIZED', 'INITIALIZING', 'INITIALIZED', 'IN_ERROR'] as const
export type CyPromptStatus = typeof CY_PROMPT_STATUSES[number]
export interface CyPromptManagerShape ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/types/test/automation.spec.ts | packages/types/test/automation.spec.ts | import { describe, it, expect } from 'vitest'
import { isSupportedKey, toSupportedKey, NamedKeys } from '../src/automation'
describe('automation', () => {
const supportedKeys = [...NamedKeys, 'a', 'b', 'c', 'd']
const unsupportedKeys = [10, 'some random string', -1, null, undefined, true, false, Symbol('some symbo... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/v8-snapshot-require/vitest.config.ts | packages/v8-snapshot-require/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/v8-snapshot-require/src/utils.ts | packages/v8-snapshot-require/src/utils.ts | import path from 'path'
/**
* Normalizes the given path to have forward slashes at all times.
* This is used to resolve modules from the snapshot as they are always stored
* with forward slashes there.
* @category loader
*/
export const forwardSlash =
path.sep === path.posix.sep
? (p: string) => p
: (p:... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/v8-snapshot-require/src/snapshot-require.ts | packages/v8-snapshot-require/src/snapshot-require.ts | import debug from 'debug'
import path from 'path'
import type {
GetModuleKey,
GetModuleKeyOpts,
ModuleNeedsReload,
PackherdTranspileOpts,
} from '@packages/packherd-require'
import { packherdRequire } from '@packages/packherd-require'
import type { Snapshot, DependencyMapArray } from './types'
import { forwardS... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/v8-snapshot-require/src/constants.ts | packages/v8-snapshot-require/src/constants.ts | /**
* Name under which the snapshotted file will appear in tools like DevTools.
*/
export const EMBEDDED = '<embedded>'
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/v8-snapshot-require/src/types.ts | packages/v8-snapshot-require/src/types.ts | import type { CreateBundleResult } from '@tooling/packherd'
import type { RawSourceMap } from 'source-map-js'
type NodeRequireFunction = typeof require
export type Entries<T> = {
[K in keyof T]: [K, T[K]]
}[keyof T][]
/**
* esbuild metadata {@link https://esbuild.github.io/api/#metafile} with extra
* properties ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/v8-snapshot-require/src/dependency-map.ts | packages/v8-snapshot-require/src/dependency-map.ts | import path from 'path'
import type { DependencyMapArray, DependencyNode } from './types'
import { strict as assert } from 'assert'
const resolvedPathCache = new Map()
const getResolvedPathForKey = (projectBaseDir: string, key: string) => {
let resolvedPath = resolvedPathCache.get(key)
if (!resolvedPath) {
re... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/v8-snapshot-require/test/dependency-map.circular.spec.ts | packages/v8-snapshot-require/test/dependency-map.circular.spec.ts | import { describe, it, expect } from 'vitest'
import { buildDependencyMap } from '@tooling/v8-snapshot'
import { DependencyMap } from '../src/dependency-map'
import type { Metadata } from '../src/types'
const ROOT = 'lib/root.js'
const FOO = 'lib/foo.js'
const BAR = 'lib/bar.js'
const BAZ = 'lib/baz.js'
const FOZ = 'l... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/v8-snapshot-require/test/dependency-map.spec.ts | packages/v8-snapshot-require/test/dependency-map.spec.ts | import { describe, it, expect } from 'vitest'
import { buildDependencyMap } from '@tooling/v8-snapshot'
import { DependencyMap } from '../src/dependency-map'
import type { Metadata } from '../src/types'
const NO_DEPS = 'lib/fixtures/no-deps.js'
const SYNC_DEPS = 'lib/fixtures/sync-deps.js'
const DEEP_SYNC_DEPS = 'lib/... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/vitest.config.ts | packages/net-stubbing/vitest.config.ts | import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
env: {
CYPRESS_INTERNAL_ENV: '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/net-stubbing/test/unit/route-matching.spec.ts | packages/net-stubbing/test/unit/route-matching.spec.ts | import { describe, it, expect } from 'vitest'
import {
_doesRouteMatch,
_getMatchableForRequest,
getRoutesForRequest,
} from '../../lib/server/route-matching'
import { RouteMatcherOptions } from '../../lib/types'
import { CypressIncomingRequest } from '@packages/proxy'
import { BackendRoute } from '../../lib/serv... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/test/unit/util.spec.ts | packages/net-stubbing/test/unit/util.spec.ts | import { describe, it, expect } from 'vitest'
import { getBodyEncoding, parseContentType } from '../../lib/server/util'
import { join } from 'path'
import { readFileSync } from 'fs'
const imageBuffer = readFileSync(join(__dirname, '..', 'fixtures', 'cypress-logo.png'))
describe('net-stubbing util', () => {
describe... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/test/unit/driver-events.spec.ts | packages/net-stubbing/test/unit/driver-events.spec.ts | import { describe, it, expect } from 'vitest'
import {
_restoreMatcherOptionsTypes,
} from '../../lib/server/driver-events'
describe('driver events', function () {
describe('._restoreMatcherOptionsTypes', function () {
it('rehydrates regexes properly', function () {
const { url } = _restoreMatcherOptions... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/test/unit/intercepted-request.spec.ts | packages/net-stubbing/test/unit/intercepted-request.spec.ts | import { describe, it, expect, vi } from 'vitest'
import _ from 'lodash'
import { InterceptedRequest } from '../../lib/server/intercepted-request'
import { state as NetStubbingState } from '../../lib/server/state'
describe('InterceptedRequest', () => {
describe('handleSubscriptions', () => {
it('handles subscrip... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/lib/util.ts | packages/net-stubbing/lib/util.ts | export const caseInsensitiveGet = function (obj, lowercaseProperty) {
for (let key of Object.keys(obj)) {
if (key.toLowerCase() === lowercaseProperty) {
return obj[key]
}
}
}
export const caseInsensitiveHas = function (obj, lowercaseProperty) {
for (let key of Object.keys(obj)) {
if (key.toLowe... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/lib/internal-types.ts | packages/net-stubbing/lib/internal-types.ts | import * as _ from 'lodash'
import type {
RouteMatcherOptionsGeneric,
GenericStaticResponse,
Subscription,
CyHttpMessages,
InterceptOptions,
} from './external-types'
export type FixtureOpts = {
encoding: string | null
filePath: string
}
export type BackendStaticResponse = GenericStaticResponse<FixtureO... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/lib/external-types.ts | packages/net-stubbing/lib/external-types.ts | // Copied from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/methods/index.d.ts
type Method =
| 'ACL'
| 'BIND'
| 'CHECKOUT'
| 'CONNECT'
| 'COPY'
| 'DELETE'
| 'GET'
| 'HEAD'
| 'LINK'
| 'LOCK'
| 'M-SEARCH'
| 'MERGE'
| 'MKACTIVITY'
| 'MKCALENDAR'
| 'MKCOL'
| 'MOVE'
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/lib/types.ts | packages/net-stubbing/lib/types.ts | export * from './external-types'
export * from './internal-types'
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/lib/server/util.ts | packages/net-stubbing/lib/server/util.ts | import _ from 'lodash'
import Debug from 'debug'
import mime from 'mime'
import isHtml from 'is-html'
import { IncomingMessage } from 'http'
import {
RouteMatcherOptionsGeneric,
STRING_MATCHER_FIELDS,
DICT_STRING_MATCHER_FIELDS,
BackendStaticResponse,
} from '../types'
import { Readable, PassThrough } from 'str... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/lib/server/route-matching.ts | packages/net-stubbing/lib/server/route-matching.ts | import _ from 'lodash'
import minimatch from 'minimatch'
import url from 'url'
import type { CypressIncomingRequest } from '@packages/proxy'
import type { BackendRoute } from './types'
import type { RouteMatcherOptions } from '../types'
import { getAllStringMatcherFields } from './util'
/**
* Returns `true` if `req`... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/lib/server/intercepted-request.ts | packages/net-stubbing/lib/server/intercepted-request.ts | import _ from 'lodash'
import type { IncomingMessage } from 'http'
import type { Readable } from 'stream'
import type {
CypressIncomingRequest,
CypressOutgoingResponse,
} from '@packages/proxy'
import type {
NetEvent,
Subscription,
} from '../types'
import type { BackendRoute, NetStubbingState } from './types'
... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/lib/server/driver-events.ts | packages/net-stubbing/lib/server/driver-events.ts | import _ from 'lodash'
import Debug from 'debug'
import type {
NetStubbingState,
GetFixtureFn,
BackendRoute,
} from './types'
import {
PLAIN_FIELDS,
AnnotatedRouteMatcherOptions,
RouteMatcherOptions,
NetEvent,
} from '../types'
import {
getAllStringMatcherFields,
sendStaticResponse as _sendStaticRespo... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/lib/server/types.ts | packages/net-stubbing/lib/server/types.ts | import type {
RouteMatcherOptions,
BackendStaticResponse,
} from '../types'
import type {
InterceptedRequest,
} from './intercepted-request'
export { ResourceType } from '../types'
export type GetFixtureFn = (path: string, opts?: { encoding?: string | null }) => Promise<any>
export interface BackendRoute {
r... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/lib/server/state.ts | packages/net-stubbing/lib/server/state.ts | import { noop } from 'lodash'
import type { NetStubbingState } from './types'
export function state (): NetStubbingState {
return {
requests: {},
routes: [],
pendingEventHandlers: {},
reset () {
// clean up requests that are still pending
for (const requestId in this.requests) {
c... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/lib/server/index.ts | packages/net-stubbing/lib/server/index.ts | export { onNetStubbingEvent } from './driver-events'
export { InterceptError } from './middleware/error'
export { SetMatchingRoutes, InterceptRequest } from './middleware/request'
export { InterceptResponse } from './middleware/response'
export { NetStubbingState, ResourceType } from './types'
export { getRoutesFo... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/lib/server/middleware/error.ts | packages/net-stubbing/lib/server/middleware/error.ts | import Debug from 'debug'
import type { ErrorMiddleware } from '@packages/proxy'
import type { CyHttpMessages } from '../../types'
import _ from 'lodash'
import * as errors from '@packages/server/lib/errors'
const debug = Debug('cypress:net-stubbing:server:intercept-error')
export const InterceptError: ErrorMiddlewa... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/lib/server/middleware/response.ts | packages/net-stubbing/lib/server/middleware/response.ts | import _ from 'lodash'
import { concatStream, httpUtils } from '@packages/network'
import Debug from 'debug'
import type { Readable } from 'stream'
import { getEncoding } from 'istextorbinary'
import type {
ResponseMiddleware,
} from '@packages/proxy'
import {
CyHttpMessages,
SERIALIZABLE_RES_PROPS,
} from '../..... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/net-stubbing/lib/server/middleware/request.ts | packages/net-stubbing/lib/server/middleware/request.ts | import _ from 'lodash'
import { concatStream } from '@packages/network'
import url from 'url'
import type {
RequestMiddleware,
} from '@packages/proxy'
import {
CyHttpMessages,
SERIALIZABLE_REQ_PROPS,
} from '../../types'
import { getRoutesForRequest, matchesRoutePreflight } from '../route-matching'
import {
s... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/electron/eslint.config.ts | packages/electron/eslint.config.ts | import { baseConfig, cliOverrides } from '@packages/eslint-config'
export default [
...baseConfig,
...cliOverrides,
{
},
{
languageOptions: {
parserOptions: {
tsconfigRootDir: __dirname,
},
},
},
]
| typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/electron/vitest.config.ts | packages/electron/vitest.config.ts | import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
environment: 'node',
include: ['test/**/*.spec.ts'],
exclude: ['**/node_modules/**', '**/dist/**'],
coverage: {
provider: 'v8',
include: ['src/**/*.ts'],
exclude: ['**/node_modules/**', '**/dist/**'],... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/electron/src/open.ts | packages/electron/src/open.ts | import path from 'path'
import { access, remove, ensureSymlink } from 'fs-extra'
import { getPathToResources, getSymlinkType, getPathToExec } from './paths'
import { filter, DEBUG_PREFIX } from '@packages/stderr-filtering'
import minimist from 'minimist'
import inspector from 'inspector'
import { ChildProcess, spawn } ... | typescript | MIT | 409444f8ea51d8f14dec8d10510f78c4a5f42271 | 2026-01-04T15:36:58.228650Z | false |
cypress-io/cypress | https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/electron/src/print-node-version.ts | packages/electron/src/print-node-version.ts | console.log(process.version.replace('v', ''))
process.exit(0)
| 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.