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/npm/vite-plugin-cypress-esm/cypress/component/fixtures/mod_1.ts
npm/vite-plugin-cypress-esm/cypress/component/fixtures/mod_1.ts
export const Mod = { async fetcher () { import('./mod_2').then((mod) => { document.querySelector(`[data-cy-root]`)!.innerHTML = `<h1>${mod.greeting}</h1>` }) }, run () { window.setTimeout(() => { this.fetcher() }, 2000) }, }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/fixtures/ImmutableModuleA.ts
npm/vite-plugin-cypress-esm/cypress/component/fixtures/ImmutableModuleA.ts
export function unstubbable () { return 'Hello from immutable' } export default function nospy () { return 'You cannot spy on this' }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/fixtures/import-like.ts
npm/vite-plugin-cypress-esm/cypress/component/fixtures/import-like.ts
// Ensure import replacement is not too aggressive // Should not replace this function name despite invocation looking like `import()` export const custom_import = (value: string) => { return `123${value}` }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/fixtures/class.ts
npm/vite-plugin-cypress-esm/cypress/component/fixtures/class.ts
export class Foo { private name: string constructor (name: string) { this.name = name } public get hollaAt () { return this.name } } export function Bar () {} class Baz extends Foo { public override get hollaAt () { return 'BAZ!' } } export default Baz
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/fixtures/reactQuery.tsx
npm/vite-plugin-cypress-esm/cypress/component/fixtures/reactQuery.tsx
import { useMutation, useQueryClient, QueryClient, QueryClientProvider, } from '@tanstack/react-query' import React from 'react' // Create a client const queryClient = new QueryClient() export function App () { return ( // Provide the client to your App <QueryClientProvider client={queryClient}> ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/fixtures/exportDefaultConst.tsx
npm/vite-plugin-cypress-esm/cypress/component/fixtures/exportDefaultConst.tsx
import React from 'react' const About = () => <h1>About</h1> export default About
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/fixtures/namedExportArray.ts
npm/vite-plugin-cypress-esm/cypress/component/fixtures/namedExportArray.ts
export const letters = ['a', 'b', 'c']
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/fixtures/defaultExportArray.ts
npm/vite-plugin-cypress-esm/cypress/component/fixtures/defaultExportArray.ts
export default [1, 2, 3]
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/fixtures/mod_2.ts
npm/vite-plugin-cypress-esm/cypress/component/fixtures/mod_2.ts
export const greeting = { name: 'lachlan', }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/fixtures/add.ts
npm/vite-plugin-cypress-esm/cypress/component/fixtures/add.ts
export function add (a: number, b: number) { return a + b }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/fixtures/Foo.tsx
npm/vite-plugin-cypress-esm/cypress/component/fixtures/Foo.tsx
import React from 'react' export const Foo: React.FC<{ msg: string }> = (props) => { return ( <h1>{props.msg}</h1> ) } class Animal { voice: string = 'Hello' greet () { return this.voice } } export class Dog extends Animal { constructor (voice: string) { super() this.voice = voice } } ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/fixtures/MyAsyncMod.ts
npm/vite-plugin-cypress-esm/cypress/component/fixtures/MyAsyncMod.ts
export default function foo () { console.log('foo') }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/vite-plugin-cypress-esm/cypress/component/fixtures/kitchenSink.ts
npm/vite-plugin-cypress-esm/cypress/component/fixtures/kitchenSink.ts
export const export1 = 'export1' export const export2 = 'export2' export const export3 = 'export3' export const export4 = 'export4' export const export5 = 'export5' // @ts-expect-error window.sideEffect = 'Side Effect' export default { export1, export2, }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/angular-zoneless/src/mount.ts
npm/angular-zoneless/src/mount.ts
import { CommonModule } from '@angular/common' import { Component, ErrorHandler, EventEmitter, Injectable, SimpleChange, SimpleChanges, Type, OnChanges, Injector, InputSignal, WritableSignal, provideZonelessChangeDetection } from '@angular/core' import { toObservable } from '@angular/core/rxjs-interop' import { Compo...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/angular-zoneless/src/index.ts
npm/angular-zoneless/src/index.ts
export * from './mount'
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/react/vite.config.ts
npm/react/vite.config.ts
import { defineConfig } from 'vite' import reactPlugin from '@vitejs/plugin-react' export default defineConfig({ plugins: [ reactPlugin({ jsxRuntime: 'classic', }), ], })
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/react/src/mount.ts
npm/react/src/mount.ts
import React from 'react' import ReactDOM from 'react-dom/client' import { getContainerEl } from '@cypress/mount-utils' import { makeMountFn, makeUnmountFn, } from './index' import type { MountOptions, InternalMountOptions, } from './index' let root: ReactDOM.Root | null const cleanup = () => { if (root) { ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/react/src/getDisplayName.ts
npm/react/src/getDisplayName.ts
import type { ReactNode } from 'react' type JSX = Function & { displayName: string } /** * Gets the display name of the component when possible. * @param type {JSX} The type object returned from creating the react element. * @param fallbackName {string} The alias, or fallback name to use when the name cannot be de...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/react/src/createMount.ts
npm/react/src/createMount.ts
import * as React from 'react' import getDisplayName from './getDisplayName' import { getContainerEl, ROOT_SELECTOR, setupHooks, } from '@cypress/mount-utils' import type { InternalMountOptions, MountOptions, MountReturn, UnmountArgs } from './types' let mountCleanup: InternalMountOptions['cleanup'] /** * Crea...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/react/src/types.ts
npm/react/src/types.ts
import type React from 'react' export interface UnmountArgs { log: boolean boundComponentMessage?: string } export type MountOptions = Partial<MountReactComponentOptions> export interface MountReactComponentOptions { ReactDom: typeof import('react-dom/client') /** * Log the mounting command into Cypress C...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/react/src/index.ts
npm/react/src/index.ts
export * from './createMount' export * from './mount' export * from './types'
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/react/cypress/component/advanced/lazy-loaded-suspense/Dog.tsx
npm/react/cypress/component/advanced/lazy-loaded-suspense/Dog.tsx
import * as React from 'react' // @ts-ignore import SamoyedImage from './samoyed.jpg' interface DogProps {} export const Dog: React.FC<DogProps> = () => { return ( <div> <h1> Your dog is Samoyed: </h1> <img src={SamoyedImage} /> </div> ) } export default Dog
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/react/cypress/component/advanced/lazy-loaded-suspense/lazy-loaded-suspense.cy.tsx
npm/react/cypress/component/advanced/lazy-loaded-suspense/lazy-loaded-suspense.cy.tsx
import * as React from 'react' import { LazyComponent } from './LazyComponent' import { mount } from '@cypress/react' describe('React.lazy component with <Suspense />', () => { it('renders and retries till component is loaded', () => { cy.viewport(1000, 1000) mount(<LazyComponent />) cy.contains('loading...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/react/cypress/component/advanced/lazy-loaded-suspense/LazyComponent.tsx
npm/react/cypress/component/advanced/lazy-loaded-suspense/LazyComponent.tsx
import * as React from 'react' const LazyDog = React.lazy(() => { return import(/* webpackChunkName: "Dog" */ './Dog') .then((comp) => new Promise((resolve) => setTimeout(() => resolve(comp), 10))) }) interface LazyComponentProps {} export const LazyComponent: React.FC<LazyComponentProps> = () => { return ( ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/npm/react/cypress/component/basic/typescript/ts-spec.cy.tsx
npm/react/cypress/component/basic/typescript/ts-spec.cy.tsx
import React from 'react' import { mount } from '@cypress/react' const Button = ({ children, ...rest }) => { return <button {...rest}>{children}</button> } describe('Component spec in typescript', () => { it('works', () => { mount(<Button>Button Label</Button>) cy.contains('button', 'Button Label').should...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/network-tools/vitest.config.ts
packages/network-tools/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/network-tools/test/unit/document_domain_injection.spec.ts
packages/network-tools/test/unit/document_domain_injection.spec.ts
import { describe, it, expect, beforeEach } from 'vitest' import { DocumentDomainInjection, OriginBehavior, DocumentDomainBehavior } from '../../lib/document-domain-injection' import { URL } from 'url' describe('DocumentDomainInjection', () => { describe('InjectionBehavior', () => { let injectDocumentDomain: boo...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/network-tools/test/unit/cors.spec.ts
packages/network-tools/test/unit/cors.spec.ts
import { describe, it, expect, beforeEach } from 'vitest' import { parseUrlIntoHostProtocolDomainTldPort, urlOriginsMatch, urlSameSiteMatch, urlMatchesPolicyProps, urlMatchesOriginProtectionSpace, getSuperDomainOrigin, policyFromConfig } from '../../lib' import { Policy } from '../../lib/cors' import type { ParsedHostW...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/network-tools/test/unit/uri.spec.ts
packages/network-tools/test/unit/uri.spec.ts
import { describe, it, expect } from 'vitest' import { URL } from 'url' import { getPath, isLocalhost, origin } from '../../lib' describe('lib/uri', () => { describe('.getPath', () => { it('returns the pathname and search', () => { expect(getPath('http://localhost:9999/foo/bar?baz=quux#/index.html')).toEq...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/network-tools/lib/document-domain-injection.ts
packages/network-tools/lib/document-domain-injection.ts
/* utility to help determine if document.domain should be injected, or related logic invoked this class isn't necessarily network related, but it is used from a wide ranging number of packages. It should probably be its own ./package. for now, it's sort of a facade for all of this logic, which should help inform a subs...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/network-tools/lib/types.ts
packages/network-tools/lib/types.ts
export type ParsedHost = { port?: string tld?: string domain?: string } export type ParsedHostWithProtocolAndHost = { subdomain: string | null protocol: string | null } & ParsedHost
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/network-tools/lib/index.ts
packages/network-tools/lib/index.ts
export * from './cors' export * from './uri' export * from './types' export * from './document-domain-injection'
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/network-tools/lib/cors.ts
packages/network-tools/lib/cors.ts
import _ from 'lodash' import { addDefaultPort, parse as parseUrl } from './uri' import debugModule from 'debug' import _parseDomain from '@cypress/parse-domain' import type { ParsedHost, ParsedHostWithProtocolAndHost } from './types' export type Policy = 'same-origin' | 'same-super-domain-origin' | 'schemeful-same-si...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/network-tools/lib/uri.ts
packages/network-tools/lib/uri.ts
// useful links for describing the parts that make up a URL: // - https://nodejs.org/api/url.html#url_url_strings_and_url_objects // - https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Examples // // node's url formatting algorithm (which acts pretty unexpectedly) // - https://nodejs.org/api/url.html#url_url_fo...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/vitest.config.ts
packages/rewriter/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/rewriter/test/fixtures.ts
packages/rewriter/test/fixtures.ts
import fs from 'fs' import * as sourceMaps from '../lib/util/source-maps' export const testSourceMap = fs.readFileSync(`${__dirname}/fixtures/test.js.map`).toString() export const testSourceWithExternalSourceMap = fs.readFileSync(`${__dirname}/fixtures/test.js`).toString() export const testSourceWithNoSourceMap = so...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/test/unit/deferred-source-map-cache.spec.ts
packages/rewriter/test/unit/deferred-source-map-cache.spec.ts
import { describe, expect, it, vi } from 'vitest' import { DeferredSourceMapCache } from '../../lib/deferred-source-map-cache' import { testSourceWithExternalSourceMap, testSourceWithInlineSourceMap, testSourceMap, testSourceWithNoSourceMap, } from '../fixtures' describe('DeferredSourceMapCache', function () {...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/test/unit/html.spec.ts
packages/rewriter/test/unit/html.spec.ts
import { describe, expect, it } from 'vitest' import { rewriteHtmlJs } from '../../lib/html' import { testHtml } from '../fixtures' const URL = 'http://example.com/foo.html' const rewriteNoSourceMap = (html) => rewriteHtmlJs(URL, html) describe('html rewriter', function () { describe('.rewriteHtmlJs', function () ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/test/unit/js.spec.ts
packages/rewriter/test/unit/js.spec.ts
import { describe, expect, it, vi, beforeEach } from 'vitest' import _ from 'lodash' import { _rewriteJsUnsafe } from '../../lib/js' import fse from 'fs-extra' import Bluebird from 'bluebird' import rp from '@cypress/request-promise' import * as astTypes from 'ast-types' import { testSourceWithExternalSourceMap, te...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/lib/deferred-source-map-cache.ts
packages/rewriter/lib/deferred-source-map-cache.ts
import _ from 'lodash' import Debug from 'debug' import { rewriteJsSourceMapAsync } from './async-rewriters' import * as sourceMaps from './util/source-maps' import url from 'url' const debug = Debug('cypress:rewriter:deferred-source-map-cache') export type DeferredSourceMapRequest = { uniqueId: string url: strin...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/lib/async-rewriters.ts
packages/rewriter/lib/async-rewriters.ts
import { queueRewriting } from './threads' import type { DeferSourceMapRewriteFn } from './js' // these functions are not included in `./js` or `./html` because doing so // would mean that `./threads/worker` would unnecessarily end up loading in the // `./threads` module for each worker export function rewriteHtmlJsA...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/lib/html.ts
packages/rewriter/lib/html.ts
import RewritingStream from 'parse5-html-rewriting-stream' import * as htmlRules from './html-rules' import type stream from 'stream' import type { DeferSourceMapRewriteFn } from './js' // the HTML rewriter passes inline JS to the JS rewriter, hence // the lack of basic `rewriteHtml` or `HtmlRewriter` exports here ex...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/lib/js.ts
packages/rewriter/lib/js.ts
import * as astTypes from 'ast-types' import Debug from 'debug' import { jsRules } from './js-rules' import * as recast from 'recast' import * as sourceMaps from './util/source-maps' const debug = Debug('cypress:rewriter:js') const defaultPrintOpts: recast.Options = { // will only affect reprinted quotes quote: '...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/lib/html-rules.ts
packages/rewriter/lib/html-rules.ts
import find from 'lodash/find' import type RewritingStream from 'parse5-html-rewriting-stream' import { STRIPPED_INTEGRITY_TAG } from './constants.json' import * as js from './js' export function install (url: string, rewriter: RewritingStream, deferSourceMapRewrite?: js.DeferSourceMapRewriteFn) { let currentlyInsid...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/lib/js-rules.ts
packages/rewriter/lib/js-rules.ts
import { Visitor, namedTypes as n, builders as b, } from 'ast-types' import type { ExpressionKind } from 'ast-types/lib/gen/kinds' // use `globalThis` instead of `window`, `self`... to lower chances of scope conflict // users can technically override even this, but it would be very rude // "[globalThis] provides...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/lib/index.ts
packages/rewriter/lib/index.ts
export { HtmlJsRewriter } from './html' export { rewriteJsAsync, rewriteHtmlJsAsync } from './async-rewriters' export { DeferredSourceMapCache } from './deferred-source-map-cache' export { createInitialWorkers, terminateAllWorkers } from './threads' export { STRIPPED_INTEGRITY_TAG } from './constants.json'
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/lib/util/source-maps.ts
packages/rewriter/lib/util/source-maps.ts
import path from 'path' import url from 'url' const sourceMapRe = /\n\/\/[ \t]*(?:#|@) sourceMappingURL=([^\s]+)\s*$/ const dataUrlRe = /^data:application\/json;(?:charset=utf-8;)base64,([^\s]+)\s*$/ export const getMappingUrl = (js: string) => { const matches = sourceMapRe.exec(js) if (matches) { return mat...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/lib/threads/types.ts
packages/rewriter/lib/threads/types.ts
import type { MessagePort } from 'worker_threads' export type RewriteRequest = { /** * used for resolving references in sourcemaps */ url: string port: MessagePort isHtml?: boolean source: string /** * If true, terminate the worker. */ shutdown?: true /** * If true, return the sourcemap ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/lib/threads/index.ts
packages/rewriter/lib/threads/index.ts
import _ from 'lodash' import Bluebird from 'bluebird' import Debug from 'debug' import * as path from 'path' import os from 'os' import { MessageChannel, Worker } from 'worker_threads' import type { RewriteRequest, RewriteResponse } from './types' import type { DeferSourceMapRewriteFn } from '../js' const debug = Deb...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/rewriter/lib/threads/worker.ts
packages/rewriter/lib/threads/worker.ts
// this is designed to run as its own thread, managed by `threads.ts` // WARNING: take care to not over-import modules here - the upfront // mem/CPU cost is paid up to threads.MAX_WORKER_THREADS times import { parentPort, isMainThread, threadId } from 'worker_threads' if (isMainThread) { throw new Error(`${__filena...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/extension/vitest.config.ts
packages/extension/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/extension/gulpfile.ts
packages/extension/gulpfile.ts
import { promisify } from 'util' import { exec } from 'child_process' import gulp from 'gulp' import { rimraf } from 'rimraf' import { getPathToIcon, getPathToLogo } from '@packages/icons' const execAsync = promisify(exec) export async function clean (): Promise<boolean> { const removedAppDist = await rimraf('app-d...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/extension/app/v2/client.ts
packages/extension/app/v2/client.ts
import { client } from '@packages/socket/browser/client' export const connect = (host: string, path: string, extraOpts: any = {}) => { return client(host, { path, transports: ['websocket'], ...extraOpts, }) }
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/extension/app/v2/init.ts
packages/extension/app/v2/init.ts
import { automation } from './background' const HOST = 'CHANGE_ME_HOST' const PATH = 'CHANGE_ME_PATH' // immediately connect automation.connect(HOST, PATH)
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/extension/app/v2/background.ts
packages/extension/app/v2/background.ts
import get from 'lodash/get' import once from 'lodash/once' import Bluebird from 'bluebird' import browser from 'webextension-polyfill' import { connect as clientConnect } from './client' const checkIfFirefox = async () => { if (!browser || !get(browser, 'runtime.getBrowserInfo')) { return false } const { ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/extension/app/v3/service-worker.ts
packages/extension/app/v3/service-worker.ts
declare let chrome: any // this background script runs in a service worker. it has access to the // extension API, but not direct access the web page or anything else // running in the browser // to debug this script, go to `chrome://inspect` in a new Chrome tab, // select Service Workers on the left and click `inspe...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/extension/app/v3/content.ts
packages/extension/app/v3/content.ts
/* global chrome, window */ // this content script has access to the DOM, but is otherwise isolated from // the page running Cypress, so we have to use postMessage to communicate. it // also doesn't have direct access to the extension API, so we use the // messaging API it can access to communicate with the background...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/extension/test/integration/v2/background.spec.ts
packages/extension/test/integration/v2/background.spec.ts
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest' import _ from 'lodash' import http from 'http' import { SocketIOServer } from '@packages/socket' import { connect } from '../../../app/v2/client' import EventEmitter from 'events' import type { SocketShape } from '@packages/socket/browser/client' ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/extension/test/integration/v3/content.spec.ts
packages/extension/test/integration/v3/content.spec.ts
import { describe, expect, beforeAll, beforeEach, it, vi } from 'vitest' describe('app/v3/content', () => { let port: { onMessage: { addListener: () => void }, postMessage: () => void } let chrome: { runtime: { connect: () => { onMessage: { addListener: () => void } } } } let window: { addEventListener: () => vo...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/extension/test/integration/v3/service-worker.spec.ts
packages/extension/test/integration/v3/service-worker.spec.ts
import { describe, it, expect, beforeAll, beforeEach, vi } from 'vitest' describe('app/v3/service-worker', () => { let chrome: { runtime: { onConnect: { addListener: () => void } }, tabs: { query: () => void, update: () => void }, storage: { local: { set: () => void, get: () => void } } } let port: { onMessage: { ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/extension/test/unit/extension.spec.ts
packages/extension/test/unit/extension.spec.ts
import { describe, it, expect, beforeEach, vi } from 'vitest' import { exec } from 'child_process' import fs from 'fs-extra' import path from 'path' import * as extension from '../../lib/index' vi.mock('../../lib/index', async (importActual) => { const actual = await importActual() return { // @ts-expect-erro...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/extension/lib/index.ts
packages/extension/lib/index.ts
import path from 'path' import { readFile } from 'fs/promises' export const getPathToExtension = (...args: string[]) => { args = [__dirname, '..', 'app-dist', 'v2'].concat(args) return path.join.apply(path, args) } export const getPathToV3Extension = (...args: string[]) => { return 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/launcher/vitest.config.ts
packages/launcher/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/launcher/index.ts
packages/launcher/index.ts
import { detect, detectByPath } from './lib/detect' import { launch } from './lib/browsers' export { detect, detectByPath, launch, } export * from './lib/types'
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/test/fixtures.ts
packages/launcher/test/fixtures.ts
export const goalBrowsers = [ { displayName: 'Test Browser', name: 'test-browser-name', versionRegex: /test-browser v(\S+)$/m, binary: 'test-browser', }, { displayName: 'Foo Browser', name: 'foo-browser', versionRegex: /foo-browser v(\S+)$/m, binary: ['foo-browser', 'foo-bar-browse...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/test/log.ts
packages/launcher/test/log.ts
export const log = require('debug')('cypress:launcher:test')
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/test/unit/windows.spec.ts
packages/launcher/test/unit/windows.spec.ts
import { describe, it, expect, beforeEach, vi } from 'vitest' import winVersionInfo from 'win-version-info' import _ from 'lodash' import * as windowsHelper from '../../lib/windows' import { knownBrowsers } from '../../lib/known-browsers' import fs from 'fs-extra' import os from 'os' import type { Browser } from '@pack...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/test/unit/linux.spec.ts
packages/launcher/test/unit/linux.spec.ts
import { describe, it, expect, beforeEach, vi } from 'vitest' import _ from 'lodash' import cp from 'child_process' import { EventEmitter } from 'events' import * as linuxHelper from '../../lib/linux' import { log } from '../log' import { detect } from '../../lib/detect' import { goalBrowsers } from '../fixtures' impor...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/test/unit/browsers.spec.ts
packages/launcher/test/unit/browsers.spec.ts
import { describe, it, expect } from 'vitest' import _ from 'lodash' import { knownBrowsers } from '../../lib/known-browsers' describe('browsers', () => { it('returns the expected list of browsers', () => { expect(knownBrowsers).toMatchSnapshot() }) // https://github.com/cypress-io/cypress/issues/6669 it(...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/test/unit/detect.spec.ts
packages/launcher/test/unit/detect.spec.ts
import { describe, it, expect, beforeEach, vi } from 'vitest' import _ from 'lodash' import cp from 'child_process' import { EventEmitter } from 'stream' import { detect, detectByPath, getMajorVersion } from '../../lib/detect' import { goalBrowsers } from '../fixtures' import os from 'os' import { log } from '../log' i...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/test/unit/darwin.spec.ts
packages/launcher/test/unit/darwin.spec.ts
import { describe, it, expect, beforeEach, vi } from 'vitest' import os from 'os' import cp from 'child_process' import fs from 'fs-extra' import { PassThrough } from 'stream' import { FoundBrowser } from '@packages/types' import * as darwinHelper from '../../lib/darwin' import * as linuxHelper from '../../lib/linux' i...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/lib/errors.ts
packages/launcher/lib/errors.ts
import type { NotInstalledError, NotDetectedAtPathError } from './types' export const notInstalledErr = (name: string, message?: string) => { const err = new Error( message || `Browser not installed: ${name}`, ) as NotInstalledError err.notInstalled = true return err } export const notDetectedAtPathErr ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/lib/utils.ts
packages/launcher/lib/utils.ts
import execa from 'execa' import cp from 'child_process' import os from 'os' import Bluebird from 'bluebird' // export an object for easy method stubbing export const utils = { execa, spawnWithArch: <T extends cp.SpawnOptionsWithStdioTuple<cp.StdioNull, cp.StdioPipe, cp.StdioPipe>>(cmd: string, args: string[], opt...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/lib/detect.ts
packages/launcher/lib/detect.ts
import Bluebird from 'bluebird' import _, { compact, extend, find } from 'lodash' import os from 'os' import { removeDuplicateBrowsers } from '@packages/data-context/src/sources/BrowserDataSource' import { knownBrowsers } from './known-browsers' import * as darwinHelper from './darwin' import { notDetectedAtPathErr } f...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/lib/browsers.ts
packages/launcher/lib/browsers.ts
import Debug from 'debug' import type * as cp from 'child_process' import { utils } from './utils' import type { FoundBrowser } from '@packages/types' import type { Readable } from 'stream' export const debug = Debug('cypress:launcher:browsers') /** starts a found browser and opens URL if given one */ export type Lau...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/lib/types.ts
packages/launcher/lib/types.ts
import type { ChildProcess } from 'child_process' import type Bluebird from 'bluebird' import type { Browser, FoundBrowser } from '@packages/types' export type NotInstalledError = Error & { notInstalled: boolean } export type NotDetectedAtPathError = Error & { notDetectedAtPath: boolean } export type LauncherApi = {...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/lib/known-browsers.ts
packages/launcher/lib/known-browsers.ts
import type { Browser, BrowserValidatorResult, FoundBrowser } from '@packages/types' const firefoxValidatorFn = (browser: FoundBrowser, platform: NodeJS.Platform): BrowserValidatorResult => { try { if (browser.majorVersion) { const majorVersion = Number(browser.majorVersion) if (majorVersion < 135) ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/lib/darwin/util.ts
packages/launcher/lib/darwin/util.ts
import Debug from 'debug' import { notInstalledErr } from '../errors' import { utils } from '../utils' import fs from 'fs-extra' import path from 'path' import plist from 'plist' const debugVerbose = Debug('cypress-verbose:launcher:darwin:util') /** parses Info.plist file from given application and returns a property...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/lib/darwin/index.ts
packages/launcher/lib/darwin/index.ts
import { findApp, FindAppParams } from './util' import type { Browser, DetectedBrowser } from '@packages/types' import * as linuxHelper from '../linux' import Debug from 'debug' import { get } from 'lodash' const debugVerbose = Debug('cypress-verbose:launcher:darwin') type Detectors = { [name: string]: { [chann...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/lib/linux/index.ts
packages/launcher/lib/linux/index.ts
import Debug from 'debug' import type { FoundBrowser, Browser } from '@packages/types' import type { PathData } from '../types' import { notInstalledErr } from '../errors' import { utils } from '../utils' import os from 'os' import { promises as fs } from 'fs' import path from 'path' import Bluebird from 'bluebird' imp...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/launcher/lib/windows/index.ts
packages/launcher/lib/windows/index.ts
import fs from 'fs-extra' import winVersionInfo from 'win-version-info' import os from 'os' import { join, normalize, win32 } from 'path' import { get } from 'lodash' import { notInstalledErr } from '../errors' import Debug from 'debug' import type { PathData } from '../types' import type { Browser, FoundBrowser } from...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/cypress.config.ts
packages/app/cypress.config.ts
import { defineConfig } from 'cypress' import { initGitRepoForTestProject, resetGitRepoForTestProject } from './cypress/tasks/git' import { writeMochaEventSnapshot, readMochaEventSnapshot } from './cypress/tasks/mochaEvents' export default defineConfig({ projectId: 'ypt4pf', retries: { runMode: 2, openMode...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/index.d.ts
packages/app/index.d.ts
/// <reference path="../driver/types/internal-types-lite.d.ts" /> import type { SocketShape } from '@packages/socket/browser/client' import type MobX from 'mobx' import type { EventManager } from './src/runner/event-manager' export {} /** * The eventManager and driver are bundled separately * by webpack. We cannot...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/vue-shims.d.ts
packages/app/vue-shims.d.ts
declare module 'virtual:*' { import type { Component } from 'vue' const src: Component export default src } declare module 'virtual:icons/*' { import type { FunctionalComponent, SVGAttributes } from 'vue' const component: FunctionalComponent<SVGAttributes> export default component } declare module '~icons/...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/vite-env.d.ts
packages/app/vite-env.d.ts
/// <reference types="vite/client" /> /// <reference types="vite-plugin-pages/client" /> /// <reference types="vite-plugin-vue-layouts/client" /> /// <reference types="vite-svg-loader" />
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/paths.ts
packages/app/src/paths.ts
/* eslint-disable no-redeclare */ import { decodeBase64Unicode } from '@packages/frontend-shared/src/utils/base64' export function getPathForPlatform(): null export function getPathForPlatform(posixPath: string): string export function getPathForPlatform (posixPath?: string) { if (!posixPath) { return null }...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/main.ts
packages/app/src/main.ts
import { createApp } from 'vue' import './main.scss' import 'tailwindcss/tailwind.css' import urql from '@urql/vue' import App from './App.vue' import { makeUrqlClient } from '@packages/frontend-shared/src/graphql/urqlClient' // tslint:disable-next-line: no-implicit-dependencies - unsure how to handle these import { cr...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/graphql.ts
packages/app/src/graphql.ts
import Debug from 'debug' import { useSubscription as urqlUseSubscription } from '@urql/vue' const debugSubscription = Debug('cypress:app:graphql-subscription') export const useSubscription: typeof urqlUseSubscription = (...args) => { const name = (args[0].query as any)?.definitions?.[0]?.name?.value debugSubscr...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/studio/StudioButton.cy.tsx
packages/app/src/studio/StudioButton.cy.tsx
import { createEventManager } from '../../cypress/component/support/ctSupport' import { useStudioStore } from '../store/studio-store' import StudioButton from './StudioButton.vue' const mountStudioButton = (eventManager = createEventManager()) => { return cy.mount(<StudioButton eventManager={eventManager}/>) } desc...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/studio/LoadingStudioPanel.cy.tsx
packages/app/src/studio/LoadingStudioPanel.cy.tsx
import { createEventManager } from '../../cypress/component/support/ctSupport' import LoadingStudioPanel from './LoadingStudioPanel.vue' describe('LoadingStudioPanel', () => { it('renders loading studio panel', () => { const eventManager = createEventManager() cy.mount(<LoadingStudioPanel eventManager={even...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/studio/StudioErrorPanel.cy.tsx
packages/app/src/studio/StudioErrorPanel.cy.tsx
import StudioErrorPanel from './StudioErrorPanel.vue' import type { EventManager } from '../runner/event-manager' import { IconCypressStudio } from '@cypress-design/vue-icon' import { h } from 'vue' describe('<StudioErrorPanel />', () => { it('renders error state with correct content', () => { const mockEventMan...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/studio/studio-app-types.ts
packages/app/src/studio/studio-app-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. import type { CloudStatus } from '@cy/store/user-project-status-store' export type RecordingState = 'recording' | 'paused' | 'disabled' export interface Use...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/studio/StudioPanel.cy.tsx
packages/app/src/studio/StudioPanel.cy.tsx
import type { UserProjectStatusStore } from '@cy/store/user-project-status-store' import type { EventManager } from '../runner/event-manager' import type { UseMutationResponse } from '@urql/vue' import StudioPanel from './StudioPanel.vue' import type { SpecDirtyDataStore } from '../store/spec-dirty-data-store' describ...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/store/prompt-store.ts
packages/app/src/store/prompt-store.ts
import { defineStore } from 'pinia' interface GetCodeModalInfo { testId: string logId: string } interface MoreInfoNeededModalInfo { testId: string logId: string onSave: () => void onCancel: () => void } interface PromptState { getCodeModalIsOpen: boolean moreInfoNeededModalIsOpen: boolean currentGe...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/store/studio-store.ts
packages/app/src/store/studio-store.ts
import type { FileDetails, Instrument, TestState } from '@packages/types/src' import { defineStore } from 'pinia' import { getEventManager } from '../runner' import type { StudioSavePayload } from '../runner/event-manager-types' import { closeStudioAssertionsMenu, openStudioAssertionsMenu } from '../runner/studio/moun...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/store/screenshot-store.ts
packages/app/src/store/screenshot-store.ts
import { defineStore } from 'pinia' export interface ScreenshotStore { isScreenshotting: boolean } export const useScreenshotStore = defineStore({ id: 'screenshot', state: (): ScreenshotStore => { return { isScreenshotting: false, } }, actions: { setScreenshotting (isScreenshotting: bool...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/store/runner-ui-store.ts
packages/app/src/store/runner-ui-store.ts
import { defineStore } from 'pinia' import { runnerConstants } from '../runner/runner-constants' export const automation = { CONNECTING: 'CONNECTING', MISSING: 'MISSING', CONNECTED: 'CONNECTED', DISCONNECTED: 'DISCONNECTED', } as const export type AutomationStatus = keyof typeof automation /** * Store for r...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/store/mobx-runner-store.ts
packages/app/src/store/mobx-runner-store.ts
import { nanoid } from 'nanoid' import { action, observable, makeObservable } from 'mobx' import type { AutomationStatus } from '../store' const defaults = { url: '', component: { height: 500, width: 500, }, e2e: { height: 660, width: 1000, }, } as const export class MobxRunnerStore { spec...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/store/spec-dirty-data-store.ts
packages/app/src/store/spec-dirty-data-store.ts
import { defineStore } from 'pinia' const SPEC_DIRTY_DATA_MODULES = Object.freeze({ STUDIO: { name: 'Studio', }, }) export type SpecDirtyDataModule = (typeof SPEC_DIRTY_DATA_MODULES)[keyof typeof SPEC_DIRTY_DATA_MODULES] export type SpecDirtyDataModuleKey = keyof typeof SPEC_DIRTY_DATA_MODULES export interf...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false
cypress-io/cypress
https://github.com/cypress-io/cypress/blob/409444f8ea51d8f14dec8d10510f78c4a5f42271/packages/app/src/store/run-all-specs-store.ts
packages/app/src/store/run-all-specs-store.ts
import { RUN_ALL_SPECS_KEY } from '@packages/types/src' import { gql, useMutation, useQuery } from '@urql/vue' import { defineStore } from 'pinia' import { computed, ref } from 'vue' import { useRouter } from 'vue-router' import { RunAllSpecsDataDocument, RunAllSpecsDocument } from '../generated/graphql' import { getSe...
typescript
MIT
409444f8ea51d8f14dec8d10510f78c4a5f42271
2026-01-04T15:36:58.228650Z
false