diff --git a/packages/server/lib/controllers/runner.ts b/packages/server/lib/controllers/runner.ts index 64b759ea1482..ef8e09ccbbd0 100644 --- a/packages/server/lib/controllers/runner.ts +++ b/packages/server/lib/controllers/runner.ts @@ -1,101 +1,11 @@ -import _ from 'lodash' import type { Request, Response } from 'express' import send from 'send' -import os from 'os' -import { fs } from '../util/fs' -import path from 'path' -import Debug from 'debug' -import pkg from '@packages/root' -import { getPathToDist, getPathToIndex, RunnerPkg } from '@packages/resolve-dist' -import type { InitializeRoutes } from '../routes' -import type { PlatformName } from '@packages/types' -import type { Cfg } from '../project-base' - -const debug = Debug('cypress:server:runner') - -const PATH_TO_NON_PROXIED_ERROR = path.join(__dirname, '..', 'html', 'non_proxied_error.html') - -const _serveNonProxiedError = (res: Response) => { - return fs.readFile(PATH_TO_NON_PROXIED_ERROR) - .then((html) => { - return res.type('html').end(html) - }) -} - -export interface ServeOptions extends Pick { - testingType: Cypress.TestingType -} - -export const serveRunner = (runnerPkg: RunnerPkg, config: Cfg, res: Response) => { - // base64 before embedding so user-supplied contents can't break out of