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/data-context/src/util/testCounts.ts
packages/data-context/src/util/testCounts.ts
import fs from 'fs' import readline from 'readline' import Debug from 'debug' import type { SpecWithRelativeRoot } from '@packages/types' import { getExampleSpecPaths } from '../codegen' import templates from '../codegen/templates' const debug = Debug('cypress:data-context:util:testCounts') export async function getT...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/util/config-file-updater.ts
packages/data-context/src/util/config-file-updater.ts
import { parse } from '@babel/parser' import type { File } from '@babel/types' import type { NodePath } from 'ast-types/lib/node-path' import { visit } from 'recast' import type { namedTypes } from 'ast-types' import Debug from 'debug' import fs from 'fs-extra' import stringify from 'stringify-object' const debug = De...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/util/index.ts
packages/data-context/src/util/index.ts
/* eslint-disable padding-line-between-statements */ // created by autobarrel, do not modify directly export * from './DocumentNodeBuilder' export * from './autoBindDebug' export * from './config-file-updater' export * from './file' export * from './files' export * from './hasTypescript' export * from './pluginHandler...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/util/hasTypescript.ts
packages/data-context/src/util/hasTypescript.ts
export function hasTypeScriptInstalled (projectRoot: string) { try { // mocking this module is fairly difficult under unit test. We need to mock this for the ProjectConfigIpc unit tests // as the scaffolded projects in the data-context package do not install dependencies related to the project. if (proces...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/codegen/spec-options.ts
packages/data-context/src/codegen/spec-options.ts
import type { ParsedPath } from 'path' import type { CodeGenType } from '../gen/nxs.gen' import fs from 'fs-extra' import { uniq, upperFirst } from 'lodash' import path from 'path' import { FileExtension, getDefaultSpecFileName } from '../util/files' import { toPosix } from '../util' import type { FoundSpec } from '@pa...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/codegen/templates.ts
packages/data-context/src/codegen/templates.ts
import * as path from 'path' import cypressEx from '@packages/example' const getPath = (dir: string) => path.join(__dirname, dir) export default { reactComponent: getPath('./templates/react-component'), vueComponent: getPath('./templates/vue-component'), componentEmpty: getPath('./templates/empty-component'), ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/codegen/code-generator.ts
packages/data-context/src/codegen/code-generator.ts
import * as fs from 'fs-extra' import { isBinaryFile } from 'isbinaryfile' import * as path from 'path' import * as ejs from 'ejs' import fm from 'front-matter' import _ from 'lodash' import Debug from 'debug' const debug = Debug('cypress:data-context:codegen:code-generator') export interface Action { templateDir: ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/codegen/index.ts
packages/data-context/src/codegen/index.ts
/* eslint-disable padding-line-between-statements */ // created by autobarrel, do not modify directly export * from './code-generator' export * from './spec-options' export * from './templates'
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/RemoteRequestDataSource.ts
packages/data-context/src/sources/RemoteRequestDataSource.ts
import { CombinedError, stringifyVariables } from '@urql/core' import type { NexusGenAbstractTypeMembers, NexusGenInterfaces, RemoteFetchableStatus } from '../gen/nxs.gen' import { DocumentNode, FieldNode, GraphQLResolveInfo, SelectionNode, visit, print, ArgumentNode, VariableDefinitionNode, TypeNode, ValueNode, parseT...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/FileDataSource.ts
packages/data-context/src/sources/FileDataSource.ts
import assert from 'assert' import type { DataContext } from '..' import * as path from 'path' import os from 'os' import globby, { GlobbyOptions } from 'globby' import Debug from 'debug' import { toPosix } from '../util/file' const debug = Debug('cypress:data-context:sources:FileDataSource') export const matchGlobs...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/EnvDataSource.ts
packages/data-context/src/sources/EnvDataSource.ts
import type { DataContext } from '../DataContext' /** * Centralizes all of the "env" * TODO: see if/how we might want to use this? */ export class EnvDataSource { constructor (private ctx: DataContext) {} get isProduction () { return process.env.CYPRESS_INTERNAL_ENV === 'production' } get HTTP_PROXY (...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/EventCollectorSource.ts
packages/data-context/src/sources/EventCollectorSource.ts
import Debug from 'debug' import dayjs from 'dayjs' import type { DataContext } from '..' import type { CloudTestingTypeEnum, LocalTestCountsInput } from '../gen/nxs.gen' import { getTestCounts } from '../util/testCounts' import { debounce } from 'lodash' const debug = Debug('cypress:data-context:sources:EventCollecto...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/GraphQLDataSource.ts
packages/data-context/src/sources/GraphQLDataSource.ts
import type { NexusGenAbstractTypeMembers } from '../gen/nxs.gen' import debugLib from 'debug' import { execute, FieldNode, GraphQLResolveInfo, print, visit } from 'graphql' import type { core } from 'nexus' import _ from 'lodash' import type { DataContext } from '..' import { DocumentNodeBuilder } from '../util/Docume...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/HtmlDataSource.ts
packages/data-context/src/sources/HtmlDataSource.ts
/** * Forms the HTML pages rendered to the client for Component / E2E testing, * including the pre-hydration we use to bootstrap the script data for fast * initial loading */ import type { DataContext } from '../DataContext' import { getPathToDist, resolveFromPackages } from '@packages/resolve-dist' import _ from '...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/RelevantRunsDataSource.ts
packages/data-context/src/sources/RelevantRunsDataSource.ts
import { gql } from '@urql/core' import debugLib from 'debug' import { isEqual, take, takeWhile } from 'lodash' import type { DataContext } from '../DataContext' import type { Query, RelevantRun, RelevantRunInfo, RelevantRunLocationEnum } from '../gen/graphcache-config.gen' import { Poller } from '../polling' import t...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/CloudDataSource.ts
packages/data-context/src/sources/CloudDataSource.ts
// @ts-ignore import pkg from '@packages/root' import debugLib from 'debug' import DataLoader from 'dataloader' import { createBatchingExecutor } from '@graphql-tools/batch-execute' import { cacheExchange, Cache } from '@urql/exchange-graphcache' import fetch, { Response } from 'cross-fetch' import crypto from 'crypto'...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/ErrorDataSource.ts
packages/data-context/src/sources/ErrorDataSource.ts
import { ErrorWrapperSource, stackUtils } from '@packages/errors' import path from 'path' import _ from 'lodash' import { codeFrameColumns } from '@babel/code-frame' import os from 'os' import type { DataContext } from '..' const tsxCodeFrameFilter = '/node_modules/tsx/dist/register' const windowsTsxCodeFrameFilter = ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/WizardDataSource.ts
packages/data-context/src/sources/WizardDataSource.ts
import { WIZARD_DEPENDENCY_TYPESCRIPT, isDependencyInstalled, } from '@packages/scaffold-config' import type { DataContext } from '..' export class WizardDataSource { constructor (private ctx: DataContext) {} async packagesToInstall (): Promise<Cypress.DependencyToInstall[]> { if (!this.ctx.coreData.wizar...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/UtilDataSource.ts
packages/data-context/src/sources/UtilDataSource.ts
import fetch from 'cross-fetch' import type { DataContext } from '../DataContext' import { isDependencyInstalled, isDependencyInstalledByName } from '@packages/scaffold-config' // Require rather than import since data-context is stricter than network and there are a fair amount of errors in agent. const { strictAgent ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/VersionsDataSource.ts
packages/data-context/src/sources/VersionsDataSource.ts
import os from 'os' import type { DataContext } from '..' import type { TestingType } from '@packages/types' import { CYPRESS_REMOTE_MANIFEST_URL, NPM_CYPRESS_REGISTRY_URL } from '@packages/types' import Debug from 'debug' import { dependencyNamesToDetect } from '@packages/scaffold-config' const debug = Debug('cypress...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/BrowserDataSource.ts
packages/data-context/src/sources/BrowserDataSource.ts
import execa from 'execa' import _ from 'lodash' import os from 'os' import type { FoundBrowser } from '@packages/types' import type { DataContext } from '..' let isPowerShellAvailable: undefined | boolean let powerShellPromise: Promise<void> | undefined // Only need to worry about checking for PowerShell in windows...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/GitDataSource.ts
packages/data-context/src/sources/GitDataSource.ts
import execa from 'execa' import simpleGit, { StatusResult, DefaultLogFields } from 'simple-git' import dayjs from 'dayjs' import relativeTime from 'dayjs/plugin/relativeTime' import path from 'path' import fs from 'fs' import os from 'os' import Debug from 'debug' import type { gitStatusType } from '@packages/types' i...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/ProjectDataSource.ts
packages/data-context/src/sources/ProjectDataSource.ts
import os from 'os' import chokidar from 'chokidar' import type { ResolvedFromConfig, RESOLVED_FROM, TestingType, SpecWithRelativeRoot } from '@packages/types' import minimatch from 'minimatch' import _ from 'lodash' import path from 'path' import Debug from 'debug' import commonPathPrefix from 'common-path-prefix' imp...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/index.ts
packages/data-context/src/sources/index.ts
/* eslint-disable padding-line-between-statements */ // created by autobarrel, do not modify directly export * from './BrowserDataSource' export * from './CloudDataSource' export * from './EnvDataSource' export * from './ErrorDataSource' export * from './EventCollectorSource' export * from './FileDataSource' export * ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/sources/RelevantRunSpecsDataSource.ts
packages/data-context/src/sources/RelevantRunSpecsDataSource.ts
import { gql, TypedDocumentNode } from '@urql/core' import { GraphQLOutputType, GraphQLResolveInfo, print, visit } from 'graphql' import debugLib from 'debug' import type { DataContext } from '../DataContext' import type { Query, CloudRun } from '../gen/graphcache-config.gen' import { Poller } from '../polling' import...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/DevActions.ts
packages/data-context/src/actions/DevActions.ts
import path from 'path' import chokidar, { FSWatcher } from 'chokidar' import type { DataContext } from '..' export class DevActions { private _chokidar?: FSWatcher static get CY_STATE_PATH () { return path.join(__dirname, '../..', 'node_modules', '.cystate') } static get CY_TRIGGER_UPDATE () { retu...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/EventCollectorActions.ts
packages/data-context/src/actions/EventCollectorActions.ts
import { gql } from '@urql/core' import type { DataContext } from '..' import Debug from 'debug' import type { LocalTestCountsInput } from '../gen/nxs.gen' const pkg = require('@packages/root') const debug = Debug('cypress:data-context:actions:EventCollectorActions') interface CollectibleEvent { campaign: string ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/CurrentRecordingActions.ts
packages/data-context/src/actions/CurrentRecordingActions.ts
import type { DataContext } from '..' export class CurrentRecordingActions { constructor (private ctx: DataContext) {} startRun (runId: string) { this.ctx.update((d) => { d.currentRecordingInfo.runId = runId }) } startInstance (instanceId: string) { this.ctx.update((d) => { d.currentR...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/AppActions.ts
packages/data-context/src/actions/AppActions.ts
import type { BrowserStatus } from '@packages/types' import type { DataContext } from '..' export interface AppApiShape { appData: ApplicationDataApiShape } export interface ApplicationDataApiShape { path(): string toHashName(projectRoot: string): string ensure(): PromiseLike<unknown> remove(): PromiseLike<...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/CloudProjectActions.ts
packages/data-context/src/actions/CloudProjectActions.ts
import type { DataContext } from '..' import type { CoreDataShape } from '../data' import type { Query } from '../gen/graphcache-config.gen' import { gql } from '@urql/core' import debugLib from 'debug' const debug = debugLib('cypress:data-context:CloudProjectActions') const CLOUD_PROJECT_INFO_OPERATION_DOC = gql` ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/CohortsActions.ts
packages/data-context/src/actions/CohortsActions.ts
import type { Cohort } from '@packages/types' import type { DataContext } from '..' import { WEIGHTED, WEIGHTED_EVEN } from '../util/weightedChoice' const debug = require('debug')('cypress:data-context:actions:CohortActions') export interface CohortsApiShape { getCohorts(): Promise<Record<string, Cohort> | undefined...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/LocalSettingsActions.ts
packages/data-context/src/actions/LocalSettingsActions.ts
import { AllowedState, defaultPreferences, Editor, NotifyCompletionStatuses } from '@packages/types' import pDefer from 'p-defer' import _ from 'lodash' import Debug from 'debug' import type { DataContext } from '..' const debug = Debug('cypress:data-context:actions:LocalSettingsActions') export interface LocalSetti...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/CodegenActions.ts
packages/data-context/src/actions/CodegenActions.ts
import type { NexusGenObjects, NexusGenUnions } from '../gen/nxs.gen' import assert from 'assert' import path from 'path' import type { DataContext } from '..' import { SpecOptions, codeGenerator } from '../codegen' import templates from '../codegen/templates' import type { CodeGenType } from '../gen/graphcache-config....
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/WizardActions.ts
packages/data-context/src/actions/WizardActions.ts
import type { NexusGenObjects } from '../gen/nxs.gen' import { detectFramework, commandsFileBody, supportFileComponent, supportFileE2E, getBundler, CT_FRAMEWORKS, resolveComponentFrameworkDefinition, detectThirdPartyCTFrameworks, componentIndexHtmlGenerator } from '@packages/scaffold-config' import assert from 'assert'...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/ErrorActions.ts
packages/data-context/src/actions/ErrorActions.ts
import type { DataContext } from '../DataContext' export class ErrorActions { constructor (private ctx: DataContext) {} /** * Finds the error from the different possible locations where an can be stored, * and nulls it out */ clearError (id: string) { this.ctx.update((d) => { if (d.diagnostic...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/ServersActions.ts
packages/data-context/src/actions/ServersActions.ts
import util from 'util' import type { AddressInfo } from 'net' import type { Server } from 'http' import type { SocketIONamespace, SocketIOServer, CDPSocketServer } from '@packages/socket' import type { DataContext } from '..' export class ServersActions { constructor (private ctx: DataContext) {} setAppServerPo...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/FileActions.ts
packages/data-context/src/actions/FileActions.ts
import path from 'path' // @ts-ignore - no types available import launchEditor from 'launch-editor' import type { DataContext } from '..' import assert from 'assert' export class FileActions { constructor (private ctx: DataContext) {} async readFileInProject (relativePath: string): Promise<string> { if (!thi...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/ProjectActions.ts
packages/data-context/src/actions/ProjectActions.ts
import type { MutationSetProjectPreferencesInGlobalCacheArgs } from '../gen/nxs.gen' import { InitializeProjectOptions, FoundBrowser, OpenProjectLaunchOptions, Preferences, TestingType, ReceivedCypressOptions, AddProject, FullConfig, AllowedState, SpecWithRelativeRoot, OpenProjectLaunchOpts, RUN_ALL_SPECS, RUN_ALL_SPEC...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/index.ts
packages/data-context/src/actions/index.ts
/* eslint-disable padding-line-between-statements */ // created by autobarrel, do not modify directly export * from './AppActions' export * from './AuthActions' export * from './BrowserActions' export * from './CloudProjectActions' export * from './CodegenActions' export * from './CohortsActions' export * from './Curr...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/DataEmitterActions.ts
packages/data-context/src/actions/DataEmitterActions.ts
import pDefer from 'p-defer' import { EventEmitter } from 'stream' import { DataContext } from '../DataContext' import type { CloudRun, RelevantRun } from '../gen/graphcache-config.gen' export interface PushFragmentData { data: any errors: any target: string fragment: string variables?: any invalidateCache...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/ElectronActions.ts
packages/data-context/src/actions/ElectronActions.ts
// tslint:disable-next-line no-implicit-dependencies - electron dep needs to be defined import type { App, BrowserWindow, OpenDialogOptions, OpenDialogReturnValue, SaveDialogOptions, SaveDialogReturnValue, Notification } from 'electron' import os from 'os' import type { DataContext } from '..' import _ from 'lodash' im...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/BrowserActions.ts
packages/data-context/src/actions/BrowserActions.ts
import type { FoundBrowser } from '@packages/types' import type { DataContext } from '..' export class BrowserActions { constructor (private ctx: DataContext) {} get browserApi () { return this.ctx._apis.browserApi } closeBrowser () { return this.browserApi.close() } setActiveBrowserById (id: st...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/VersionsActions.ts
packages/data-context/src/actions/VersionsActions.ts
import type { DataContext } from '..' export class VersionsActions { constructor (private ctx: DataContext) {} /** * Resets the latest version call so that it will be queried again with additional telemetry about the user */ resetLatestVersionTelemetry () { this.ctx.versions.resetLatestVersionTelemetr...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/NotificationActions.ts
packages/data-context/src/actions/NotificationActions.ts
import type { NotifyWhenRunCompletes } from '@packages/types/src/preferences' import type { DataContext } from '..' import debugLib from 'debug' import assert from 'assert' import type { RelevantRunInfo } from '../gen/graphcache-config.gen' const debug = debugLib('cypress:data-context:NotificationActions') export cla...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/actions/AuthActions.ts
packages/data-context/src/actions/AuthActions.ts
import type { DataContext } from '..' import type { AuthenticatedUserShape, AuthStateShape } from '../data' import { gql } from '@urql/core' export interface AuthApiShape { getUser(): Promise<Partial<AuthenticatedUserShape>> logIn(onMessage: (message: AuthStateShape) => void, utmSource: string, utmMedium: string, ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/polling/poller.ts
packages/data-context/src/polling/poller.ts
import type { EventType } from '../actions' import type { DataContext } from '../DataContext' import debugLib from 'debug' const debug = debugLib('cypress:data-context:polling:Poller') export class Poller<E extends EventType, T = never, M = never> { constructor (private ctx: DataContext, private event: E, p...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/polling/index.ts
packages/data-context/src/polling/index.ts
/* eslint-disable padding-line-between-statements */ // created by autobarrel, do not modify directly export * from './poller'
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/data/EventRegistrar.ts
packages/data-context/src/data/EventRegistrar.ts
import debugLib from 'debug' import _ from 'lodash' const debug = debugLib(`cypress:lifecycle:EventRegistrar`) export class EventRegistrar { private _registeredEvents: Record<string, Function> = {} hasNodeEvent (eventName: string) { const isRegistered = typeof this._registeredEvents[eventName] === 'function'...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/data/ProjectLifecycleManager.ts
packages/data-context/src/data/ProjectLifecycleManager.ts
/** * The "Project Lifecycle" is the centralized manager for the project, * config, browser, and the number of possible states that can occur based * on inputs that change these behaviors. * * See `guides/app-lifecycle.md` for documentation on the project & possible * states that exist, and how they are managed. ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/data/ProjectConfigIpc.ts
packages/data-context/src/data/ProjectConfigIpc.ts
/* eslint-disable no-dupe-class-members */ import { CypressError, getError } from '@packages/errors' import type { FullConfig, TestingType } from '@packages/types' import { ChildProcess, fork, ForkOptions, spawn } from 'child_process' import EventEmitter from 'events' import path from 'path' import inspector from 'insp...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/data/coreDataShape.ts
packages/data-context/src/data/coreDataShape.ts
import type { FoundBrowser, Editor, AllowedState, AllModeOptions, TestingType, BrowserStatus, PACKAGE_MANAGERS, AuthStateName, StudioLifecycleManagerShape, CyPromptLifecycleManagerShape } from '@packages/types' import { WizardBundler, CT_FRAMEWORKS, resolveComponentFrameworkDefinition, ErroredFramework } from '@package...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/data/CypressEnv.ts
packages/data-context/src/data/CypressEnv.ts
import fs from 'fs-extra' import { getError } from '@packages/errors' type CypressEnvOptions = { envFilePath: string validateConfigFile: (file: string | false, config: Cypress.ConfigOptions) => void } export class CypressEnv { constructor (private options: CypressEnvOptions) {} async loadCypressEnvFile (): P...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/data/ProjectConfigManager.ts
packages/data-context/src/data/ProjectConfigManager.ts
import { CypressError, getError } from '@packages/errors' import { DebugData, PluginIpcHandler, LoadConfigReply, ProjectConfigIpc, SetupNodeEventsReply } from './ProjectConfigIpc' import assert from 'assert' import type { AllModeOptions, FullConfig, TestingType } from '@packages/types' import debugLib from 'debug' impo...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/src/data/index.ts
packages/data-context/src/data/index.ts
/* eslint-disable padding-line-between-statements */ // created by autobarrel, do not modify directly export * from './CypressEnv' export * from './EventRegistrar' export * from './ProjectConfigIpc' export * from './ProjectConfigManager' export * from './ProjectLifecycleManager' export * from './coreDataShape'
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/fixtures/browsers.ts
packages/data-context/test/fixtures/browsers.ts
import { FoundBrowser } from "@packages/types"; export const foundBrowserChrome: FoundBrowser = { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', path: '/usr/bin/chrome', version: '100.0.0' } as const export const userBrowser: Cypress.Browser = { ...foundBrowserChrome, na...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/graphql/stubCloudTypes.ts
packages/data-context/test/graphql/stubCloudTypes.ts
/* eslint-disable no-console */ /** * Takes all of the "Cloud" types and creates realistic mocks, * indexing the types in a way that we can access them */ import _ from 'lodash' import fakeUuid from 'fake-uuid' import { connectionFromArray } from 'graphql-relay' import type { Node, CloudUser, CloudRun, Clou...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/config-file-updater.spec.ts
packages/data-context/test/unit/config-file-updater.spec.ts
import { describe, expect, it } from '@jest/globals' import { stripIndent } from 'common-tags' import { insertValueInJSString } from '../../src/util/config-file-updater' const errors = { get (type: string) { const err = new Error(type) as any err.type = type return err }, } describe('lib/util/config...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/helper.ts
packages/data-context/test/unit/helper.ts
// necessary to have mocha types working correctly import { jest } from '@jest/globals' import path from 'path' import fs from 'fs-extra' import { Response } from 'cross-fetch' import Fixtures, { fixtureDirs, scaffoldProject, removeProject } from '@tooling/system-tests' import { DataContext, DataContextConfig } from '....
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/helper-graphql.ts
packages/data-context/test/unit/helper-graphql.ts
import { GraphQLObjectTypeConfig, GraphQLFieldResolver, GraphQLObjectType, GraphQLSchema, graphql } from 'graphql' export const createGraphQL = <TSource = any, TArgs = any, TContext = any>( query: string, fields: GraphQLObjectTypeConfig<TSource, TContext>['fields'], cb: GraphQLFieldResolver<TSource, TArgs, TCont...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/util/testCounts.spec.ts
packages/data-context/test/unit/util/testCounts.spec.ts
import { describe, expect, it } from '@jest/globals' import { SpecWithRelativeRoot } from '@packages/types' import fs from 'fs-extra' import { scaffoldMigrationProject } from '../helper' import { getTestCounts } from '../../../src/util/testCounts' import path from 'path' describe('getTestCounts', () => { it('should ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/util/DocumentNodeBuilder.spec.ts
packages/data-context/test/unit/util/DocumentNodeBuilder.spec.ts
import { describe, expect, it } from '@jest/globals' import { graphqlSchema } from '../../../graphql/schema' import dedent from 'dedent' import { FieldNode, GraphQLObjectType, OperationDefinitionNode, parse, print } from 'graphql' import { DocumentNodeBuilder } from '../../../src' const CLOUD_VIEWER_QUERY = parse(` qu...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/util/weightedChoice.spec.ts
packages/data-context/test/unit/util/weightedChoice.spec.ts
import { describe, expect, it } from '@jest/globals' import { WEIGHTED, WEIGHTED_EVEN } from '../../../src/util/weightedChoice' describe('weightedChoice', () => { describe('WeightedAlgorithm', () => { it('should error if invalid arguments', () => { const weights = [25, 75, 45] const options = ['A', ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/util/hasTypescript.spec.ts
packages/data-context/test/unit/util/hasTypescript.spec.ts
import { describe, expect, it } from '@jest/globals' import path from 'path' import { hasTypeScriptInstalled } from '../../../src/util' import { scaffoldMigrationProject } from '../helper' describe('hasTypeScript', () => { it('returns true when installed', async () => { const monorepoRoot = path.join(__dirname, ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/codegen/code-generator.spec.ts
packages/data-context/test/unit/codegen/code-generator.spec.ts
import { describe, expect, it, beforeEach } from '@jest/globals' import { parse } from '@babel/parser' import dedent from 'dedent' import fs from 'fs-extra' import path from 'path' import { DataContext } from '../../../src' import { Action, codeGenerator, CodeGenResult, CodeGenResults, hasNonExampleSpec, ge...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/codegen/spec-options.spec.ts
packages/data-context/test/unit/codegen/spec-options.spec.ts
import { describe, expect, it, beforeEach, jest } from '@jest/globals' import { defaultSpecPattern } from '@packages/config' import { CT_FRAMEWORKS } from '@packages/scaffold-config' import fs from 'fs-extra' import path from 'path' import { DataContext } from '../../../src' import { SpecOptions, expectedSpecExtensions...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/sources/RelevantRunsDataSource.spec.ts
packages/data-context/test/unit/sources/RelevantRunsDataSource.spec.ts
import { describe, expect, it, beforeEach, jest } from '@jest/globals' import debugLib from 'debug' import { DataContext } from '../../../src' import { createTestDataContext } from '../helper' import { RelevantRunsDataSource } from '../../../src/sources' import { FAKE_PROJECT_WITH_ERROR, FAKE_PROJECT_MULTIPLE_COMPLETE...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/sources/GitDataSource_unit.spec.ts
packages/data-context/test/unit/sources/GitDataSource_unit.spec.ts
import { describe, expect, it, jest } from '@jest/globals' import pDefer, { DeferredPromise } from 'p-defer' import EventEmitter from 'events' import type { SimpleGit } from 'simple-git' import { GitDataSource } from '../../../src/sources/GitDataSource' import Chokidar from 'chokidar' const stubbedSimpleGit: { // P...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/sources/GitDataSource.spec.ts
packages/data-context/test/unit/sources/GitDataSource.spec.ts
import { describe, expect, it, beforeEach, afterEach, jest } from '@jest/globals' import path from 'path' import os from 'os' import simpleGit from 'simple-git' import fs from 'fs-extra' import pDefer from 'p-defer' import chokidar from 'chokidar' import { scaffoldMigrationProject } from '../helper' import { GitDataSo...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/sources/ProjectDataSource.spec.ts
packages/data-context/test/unit/sources/ProjectDataSource.spec.ts
import { describe, expect, it, beforeEach, afterEach, jest } from '@jest/globals' import os from 'os' import fs from 'fs-extra' import { matchedSpecs, transformSpec, SpecWithRelativeRoot, getLongestCommonPrefixFromPaths, getPathFromSpecPattern } from '../../../src/sources' import path from 'path' import chokidar from ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/sources/WizardDataSource.spec.ts
packages/data-context/test/unit/sources/WizardDataSource.spec.ts
import { describe, expect, it, beforeAll } from '@jest/globals' import { WizardBundler, WIZARD_BUNDLERS, CT_FRAMEWORKS, resolveComponentFrameworkDefinition } from '@packages/scaffold-config' import { createTestDataContext, scaffoldMigrationProject, removeCommonNodeModules } from '../helper' function findFramework (typ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/sources/FileDataSource.spec.ts
packages/data-context/test/unit/sources/FileDataSource.spec.ts
import { describe, expect, it, jest } from '@jest/globals' import fs from 'fs-extra' import path from 'path' import os from 'os' import { scaffoldProject, removeProject, createTestDataContext } from '../helper' import * as FileDataSourceModule from '../../../src/sources/FileDataSource' import { DataContext } from '../...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/sources/RemoteRequestDataSource.spec.ts
packages/data-context/test/unit/sources/RemoteRequestDataSource.spec.ts
import { describe, expect, it, beforeEach, afterEach } from '@jest/globals' import crypto from 'crypto' import { DataContext } from '../../../src' import { RemoteRequestDataSource } from '../../../src/sources' import { createTestDataContext } from '../helper' describe('RemoteRequestDataSource', () => { let ctx: Dat...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/sources/CloudDataSource.spec.ts
packages/data-context/test/unit/sources/CloudDataSource.spec.ts
import { describe, expect, it, jest } from '@jest/globals' import { execute } from 'graphql' import { Response } from 'cross-fetch' import { DataContext } from '../../../src/DataContext' import { CloudDataResponse, CloudDataSource } from '../../../src/sources' import { createTestDataContext, scaffoldProject } from '.....
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/sources/GraphQLDataSource.spec.ts
packages/data-context/test/unit/sources/GraphQLDataSource.spec.ts
import { describe, expect, it, beforeEach, afterEach } from '@jest/globals' import dedent from 'dedent' import path from 'path' import { execute, ExecutionResult, parse, subscribe } from 'graphql' import { DataContext } from '../../../src' import { createTestDataContext, scaffoldProject } from '../helper' describe('Gr...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/sources/RelevantRunSpecsDataSource.spec.ts
packages/data-context/test/unit/sources/RelevantRunSpecsDataSource.spec.ts
import { describe, expect, it, beforeEach, afterEach, jest } from '@jest/globals' import debugLib from 'debug' import { GraphQLInt, GraphQLString, print } from 'graphql' import { DataContext } from '../../../src' import { createTestDataContext } from '../helper' import { RelevantRunSpecsDataSource } from '../../../src...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/sources/VersionsDataSource.spec.ts
packages/data-context/test/unit/sources/VersionsDataSource.spec.ts
import { describe, expect, it, beforeEach, afterEach, jest } from '@jest/globals' import os from 'os' import { Response } from 'cross-fetch' import { DataContext } from '../../../src' import { VersionsDataSource } from '../../../src/sources' import { createTestDataContext } from '../helper' import { AllowedState, CYPR...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/sources/UtilDataSource.spec.ts
packages/data-context/test/unit/sources/UtilDataSource.spec.ts
// Jest globals are available without import in this environment import fetch from 'cross-fetch' import { createTestDataContext } from '../helper' import { UtilDataSource } from '../../../src/sources/UtilDataSource' import { DataContext } from '../../../src' import { strictAgent } from '@packages/network' // Mock cros...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/sources/BrowserDataSource.spec.ts
packages/data-context/test/unit/sources/BrowserDataSource.spec.ts
import { describe, expect, it, jest } from '@jest/globals' import { FullConfig } from '@packages/types' import { createTestDataContext } from '../helper' import { userBrowser, foundBrowserChrome } from '../../fixtures/browsers' describe('BrowserDataSource', () => { describe('#allBrowsers', () => { it('returns ma...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/sources/fixtures/graphqlFixtures.ts
packages/data-context/test/unit/sources/fixtures/graphqlFixtures.ts
import { parse } from 'graphql' export const FAKE_USER_QUERY = parse( `{ cloudViewer { __typename id fullName email } }`, ) export const FAKE_USER_RESPONSE = { data: { cloudViewer: { __typename: 'CloudUser', id: '1', fullName: 'test', email: 'test@example.com', }, }, } export co...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/actions/CurrentRecordingActions.spec.ts
packages/data-context/test/unit/actions/CurrentRecordingActions.spec.ts
import { createTestDataContext } from '../helper' import type { DataContext } from '../../../src' import { expect } from 'chai' describe('CurrentRecordingActions', () => { let ctx: DataContext beforeEach(() => { ctx = createTestDataContext('open') }) describe('startRun', () => { it('updates the curre...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/actions/CohortsActions.spec.ts
packages/data-context/test/unit/actions/CohortsActions.spec.ts
import { describe, expect, it, beforeEach, jest } from '@jest/globals' import type { DataContext } from '../../../src' import { CohortsActions } from '../../../src/actions/CohortsActions' import { createTestDataContext } from '../helper' describe('CohortsActions', () => { let ctx: DataContext let actions: CohortsA...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/actions/NotificationActions.spec.ts
packages/data-context/test/unit/actions/NotificationActions.spec.ts
import { describe, expect, it, beforeEach, jest } from '@jest/globals' import type { DataContext } from '../../../src' import { NotificationActions } from '../../../src/actions/NotificationActions' import { CloudRunStatus, RelevantRunInfo } from '../../../src/gen/graphcache-config.gen' import { createTestDataContext, c...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/actions/CodegenActions.spec.ts
packages/data-context/test/unit/actions/CodegenActions.spec.ts
import { describe, expect, it, beforeEach } from '@jest/globals' import type { DataContext } from '../../../src' import { CodegenActions } from '../../../src/actions/CodegenActions' import { createTestDataContext } from '../helper' import path from 'path' describe('CodegenActions', () => { let ctx: DataContext let...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/actions/ProjectActions.spec.ts
packages/data-context/test/unit/actions/ProjectActions.spec.ts
import { describe, expect, it, beforeEach, jest } from '@jest/globals' import type { DataContext } from '../../../src' import { ProjectActions } from '../../../src/actions/ProjectActions' import { createTestDataContext } from '../helper' import { SpecWithRelativeRoot, TestingType } from '@packages/types' describe('Pro...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/actions/EventCollectorActions.spec.ts
packages/data-context/test/unit/actions/EventCollectorActions.spec.ts
import { describe, expect, it, beforeEach, jest } from '@jest/globals' import type { DataContext } from '../../../src' import { EventCollectorActions } from '../../../src/actions/EventCollectorActions' import { createTestDataContext } from '../helper' import pkg from '@packages/root' describe('EventCollectorActions',...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/actions/LocalSettingsActions.spec.ts
packages/data-context/test/unit/actions/LocalSettingsActions.spec.ts
import { describe, expect, it, jest } from '@jest/globals' import { LocalSettingsActions } from '../../../src/actions/LocalSettingsActions' import { createTestDataContext } from '../helper' import type { DataContext } from '../../../src' import { NotifyCompletionStatuses } from '@packages/types' describe('LocalSetting...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/actions/AuthActions.spec.ts
packages/data-context/test/unit/actions/AuthActions.spec.ts
import { describe, expect, jest, it } from '@jest/globals' import type { DataContext } from '../../../src' import { AuthActions } from '../../../src/actions/AuthActions' import { createTestDataContext } from '../helper' import { FoundBrowser } from '@packages/types' describe('AuthActions', () => { describe('.login',...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/actions/DataEmitterActions.spec.ts
packages/data-context/test/unit/actions/DataEmitterActions.spec.ts
import { describe, expect, it, beforeAll, jest } from '@jest/globals' import type { DataContext } from '../../../src' import { DataEmitterActions } from '../../../src/actions/DataEmitterActions' import { createTestDataContext } from '../helper' describe('DataEmitterActions', () => { describe('.subscribeTo', () => { ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/actions/project/LoginForm.tsx
packages/data-context/test/unit/actions/project/LoginForm.tsx
import React from 'react' interface LoginFormProps { onLogin: ({ username, password, }: { username: string password: string }) => void title?: string errorMessage?: string } const LoginForm: React.FC<LoginFormProps> = (props) => { return ( <div /> ) } export default LoginForm
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/actions/project/counter-default.tsx
packages/data-context/test/unit/actions/project/counter-default.tsx
import React from 'react' export type Count = number function CounterDefault () { const [count, setCount] = React.useState<Count>(0) return <p onClick={() => setCount(count + 1)}>count: {count}</p> } export default CounterDefault
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/actions/project/counter-mixed-multiple-components.tsx
packages/data-context/test/unit/actions/project/counter-mixed-multiple-components.tsx
import React from 'react' export default function CounterContainer () { const [count, setCount] = React.useState(0) return <CounterView count={count} setCount={setCount} /> } export function CounterView ({ count, setCount }) { return <p onClick={() => setCount(count + 1)}>count: {count}</p> }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/actions/project/counter.tsx
packages/data-context/test/unit/actions/project/counter.tsx
import React from 'react' export type Count = number export function Counter () { const [count, setCount] = React.useState<Count>(0) return <p onClick={() => setCount(count + 1)}>count: {count}</p> }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/polling/poller.spec.ts
packages/data-context/test/unit/polling/poller.spec.ts
import { describe, expect, it, beforeEach, afterEach, jest } from '@jest/globals' import { DataContext } from '../../../src' import { Poller } from '../../../src/polling' import { createTestDataContext } from '../helper' describe('Poller', () => { let ctx: DataContext beforeEach(() => { jest.useFakeTimers() ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/data/ProjectConfigManager.spec.ts
packages/data-context/test/unit/data/ProjectConfigManager.spec.ts
import { describe, expect, it, beforeEach } from '@jest/globals' import { createTestDataContext } from '../helper' import { ProjectConfigManager } from '../../../src/data/ProjectConfigManager' import { EventRegistrar } from '../../../src/data/EventRegistrar' let configManager: ProjectConfigManager describe('ProjectCo...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/data/ProjectConfigIpc.spec.ts
packages/data-context/test/unit/data/ProjectConfigIpc.spec.ts
import { describe, expect, it, beforeEach, afterEach, jest } from '@jest/globals' import childProcess from 'child_process' import semver from 'semver' import { scaffoldMigrationProject as scaffoldProject } from '../helper' import { ProjectConfigIpc } from '../../../src/data/ProjectConfigIpc' jest.mock('child_process')...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/data/ProjectConfigIpc-real-child-process.spec.ts
packages/data-context/test/unit/data/ProjectConfigIpc-real-child-process.spec.ts
import { describe, expect, it, beforeEach, afterEach, jest } from '@jest/globals' import { scaffoldMigrationProject as scaffoldProject } from '../helper' import { ProjectConfigIpc } from '../../../src/data/ProjectConfigIpc' jest.mock('debug', () => { globalThis.debugMessages = [] const originalDebugModule = jest.r...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/data-context/test/unit/data/ProjectLifecycleManager.spec.ts
packages/data-context/test/unit/data/ProjectLifecycleManager.spec.ts
import { describe, expect, it, beforeEach, jest } from '@jest/globals' import type { DataContext } from '../../../src' import path from 'path' import { createTestDataContext } from '../helper' import { FoundBrowser, FullConfig } from '@packages/types' const browsers = [ { name: 'electron', family: 'chromium', channe...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/eslint.config.ts
packages/server/eslint.config.ts
import { baseConfig } from '@packages/eslint-config' import globals from 'globals' export default [ ...baseConfig, { languageOptions: { parserOptions: { tsconfigRootDir: __dirname, }, globals: { ...globals.node, globalThis: 'readonly', window: 'readonly', ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/server/index.d.ts
packages/server/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/lodash/index.d.ts" /> /// <reference path="../../cli/types/sinon/index.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/server/test/mockery_helper.ts
packages/server/test/mockery_helper.ts
import mockery from 'mockery' import path from 'path' export const mockElectron = (mockeryInstance: typeof mockery) => { // stub out the entire electron object for our stub // we must use an absolute path here because of the way mockery internally loads this // module - meaning the first time electron is require...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false