From b52ac98a6944bc831221ccb730f89c6cc92a4573 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Mar 2021 15:24:00 +0000 Subject: [PATCH] =?UTF-8?q?feat(deps):=20update=20dependency=20electron=20?= =?UTF-8?q?to=20version=2012.x=20=F0=9F=8C=9F=20(#15292)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Renovate Bot Co-authored-by: Zach Bloomquist --- .gitignore | 2 +- .node-version | 2 +- appveyor.yml | 2 +- circle.yml | 6 +- cli/__snapshots__/spawn_spec.js | 6 +- cli/lib/util.js | 26 ----- cli/package.json | 4 +- cli/test/lib/util_spec.js | 44 -------- npm/design-system/package.json | 6 +- .../component/basic/error-boundary-spec.js | 23 ++-- npm/react/package.json | 4 +- package.json | 4 +- packages/driver/src/cypress/cy.js | 15 ++- packages/electron/lib/electron.js | 4 - packages/electron/package.json | 2 +- packages/https-proxy/lib/ca.js | 2 +- packages/https-proxy/lib/server.js | 7 +- packages/network/lib/agent.ts | 5 +- packages/network/lib/http-utils.ts | 15 +++ packages/server-ct/package.json | 8 +- .../server/__snapshots__/4_request_spec.ts.js | 6 +- packages/server/__snapshots__/4_xhr_spec.js | 22 ++-- packages/server/index.js | 15 +-- .../server/lib/browsers/cdp_automation.ts | 3 + packages/server/lib/file_server.js | 3 +- packages/server/lib/server-base.ts | 4 +- packages/server/lib/util/node_options.ts | 94 ---------------- packages/server/package.json | 2 +- .../test/e2e/4_form_submissions_spec.js | 37 +++--- .../server/test/integration/cypress_spec.js | 2 + .../e2e/cypress/integration/xhr_spec.js | 4 - .../projects/e2e/cypress/plugins/index.js | 8 -- .../server/test/unit/node_options_spec.ts | 63 ----------- packages/ts/index.d.ts | 3 +- scripts/run-docker-local.sh | 2 +- yarn.lock | 106 +++++++++++------- 36 files changed, 181 insertions(+), 380 deletions(-) delete mode 100644 packages/server/lib/util/node_options.ts delete mode 100644 packages/server/test/unit/node_options_spec.ts diff --git a/.gitignore b/.gitignore index 1db40116c41a..51c77004f7eb 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,7 @@ npm/**/cypress/screenshots # from example packages/example/app packages/example/build -packages/example/cypress +packages/example/cypress/integration # from server packages/server/.cy diff --git a/.node-version b/.node-version index 9cd25a1fec8e..2a0dc9a810cf 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -12.18.3 +14.16.0 diff --git a/appveyor.yml b/appveyor.yml index 554f87d06936..6582f7385ef5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,7 @@ branches: # https://www.appveyor.com/docs/lang/nodejs-iojs/ environment: # use matching version of Node.js - nodejs_version: "12.18.3" + nodejs_version: "14.16.0" # encode secure variables which will NOT be used # in pull requests # https://www.appveyor.com/docs/build-configuration/#secure-variables diff --git a/circle.yml b/circle.yml index 6f92e1e8b152..ab2d948eaa78 100644 --- a/circle.yml +++ b/circle.yml @@ -44,14 +44,14 @@ executors: # the Docker image with Cypress dependencies and Chrome browser cy-doc: docker: - - image: cypress/browsers:node12.18.3-chrome83-ff77 + - image: cypress/browsers:node14.16.0-chrome89-ff77 environment: PLATFORM: linux # Docker image with non-root "node" user non-root-docker-user: docker: - - image: cypress/browsers:node12.18.3-chrome83-ff77 + - image: cypress/browsers:node14.16.0-chrome89-ff77 user: node environment: PLATFORM: linux @@ -62,7 +62,7 @@ executors: mac: macos: # Executor should have Node >= required version - xcode: "11.3.1" + xcode: "12.2.0" environment: PLATFORM: mac diff --git a/cli/__snapshots__/spawn_spec.js b/cli/__snapshots__/spawn_spec.js index 6d6052a0449e..8b1b60f16621 100644 --- a/cli/__snapshots__/spawn_spec.js +++ b/cli/__snapshots__/spawn_spec.js @@ -4,8 +4,7 @@ exports['lib/exec/spawn .start forces colors and streams when supported 1'] = { "MOCHA_COLORS": "1", "FORCE_STDIN_TTY": "1", "FORCE_STDOUT_TTY": "1", - "FORCE_STDERR_TTY": "1", - "NODE_OPTIONS": "--max-http-header-size=1048576" + "FORCE_STDERR_TTY": "1" } exports['lib/exec/spawn .start does not force colors and streams when not supported 1'] = { @@ -13,8 +12,7 @@ exports['lib/exec/spawn .start does not force colors and streams when not suppor "DEBUG_COLORS": "0", "FORCE_STDIN_TTY": "0", "FORCE_STDOUT_TTY": "0", - "FORCE_STDERR_TTY": "0", - "NODE_OPTIONS": "--max-http-header-size=1048576" + "FORCE_STDERR_TTY": "0" } exports['lib/exec/spawn .start detects kill signal exits with error on SIGKILL 1'] = ` diff --git a/cli/lib/util.js b/cli/lib/util.js index a16ebabc6db4..17b1e665bb15 100644 --- a/cli/lib/util.js +++ b/cli/lib/util.js @@ -281,35 +281,9 @@ const util = { .mapValues((value) => { // stringify to 1 or 0 return value ? '1' : '0' }) - .extend(util.getNodeOptions(options)) .value() }, - getNodeOptions (options, nodeVersion) { - if (!nodeVersion) { - nodeVersion = Number(process.versions.node.split('.')[0]) - } - - if (options.dev && nodeVersion < 12) { - // `node` is used instead of Electron when --dev is passed, so this won't work if Node is too old - debug('NODE_OPTIONS=--max-http-header-size could not be set because we\'re in dev mode and Node is < 12.0.0') - - return - } - - // https://github.com/cypress-io/cypress/issues/5431 - const NODE_OPTIONS = `--max-http-header-size=${1024 ** 2}` - - if (_.isString(process.env.NODE_OPTIONS)) { - return { - NODE_OPTIONS: `${NODE_OPTIONS} ${process.env.NODE_OPTIONS}`, - ORIGINAL_NODE_OPTIONS: process.env.NODE_OPTIONS || '', - } - } - - return { NODE_OPTIONS } - }, - getForceTty () { return { FORCE_STDIN_TTY: util.isTty(process.stdin.fd), diff --git a/cli/package.json b/cli/package.json index 633283471821..5c04bdd9a9f5 100644 --- a/cli/package.json +++ b/cli/package.json @@ -23,7 +23,7 @@ "@cypress/listr-verbose-renderer": "^0.4.1", "@cypress/request": "^2.88.5", "@cypress/xvfb": "^1.2.4", - "@types/node": "^12.12.50", + "@types/node": "^14.14.31", "@types/sinonjs__fake-timers": "^6.0.2", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", @@ -38,7 +38,7 @@ "dayjs": "^1.10.4", "debug": "4.3.2", "eventemitter2": "^6.4.3", - "execa": "^5.0.0", + "execa": "4.1.0", "executable": "^4.1.1", "extract-zip": "^1.7.0", "fs-extra": "^9.1.0", diff --git a/cli/test/lib/util_spec.js b/cli/test/lib/util_spec.js index 580e206fef22..52b83ef96141 100644 --- a/cli/test/lib/util_spec.js +++ b/cli/test/lib/util_spec.js @@ -3,7 +3,6 @@ require('../spec_helper') const os = require('os') const tty = require('tty') const snapshot = require('../support/snapshot') -const mockedEnv = require('mocked-env') const supportsColor = require('supports-color') const proxyquire = require('proxyquire') const hasha = require('hasha') @@ -12,9 +11,6 @@ const la = require('lazy-ass') const util = require(`${lib}/util`) const logger = require(`${lib}/logger`) -// https://github.com/cypress-io/cypress/issues/5431 -const expectedNodeOptions = `--max-http-header-size=${1024 * 1024}` - describe('util', () => { beforeEach(() => { sinon.stub(process, 'exit') @@ -217,7 +213,6 @@ describe('util', () => { FORCE_COLOR: '1', DEBUG_COLORS: '1', MOCHA_COLORS: '1', - NODE_OPTIONS: expectedNodeOptions, }) util.supportsColor.returns(false) @@ -229,46 +224,7 @@ describe('util', () => { FORCE_STDERR_TTY: '0', FORCE_COLOR: '0', DEBUG_COLORS: '0', - NODE_OPTIONS: expectedNodeOptions, - }) - }) - }) - - context('.getNodeOptions', () => { - let restoreEnv - - afterEach(() => { - if (restoreEnv) { - restoreEnv() - restoreEnv = null - } - }) - - it('adds required NODE_OPTIONS', () => { - restoreEnv = mockedEnv({ - NODE_OPTIONS: undefined, }) - - expect(util.getNodeOptions({})).to.deep.eq({ - NODE_OPTIONS: expectedNodeOptions, - }) - }) - - it('includes existing NODE_OPTIONS', () => { - restoreEnv = mockedEnv({ - NODE_OPTIONS: '--foo --bar', - }) - - expect(util.getNodeOptions({})).to.deep.eq({ - NODE_OPTIONS: `${expectedNodeOptions} --foo --bar`, - ORIGINAL_NODE_OPTIONS: '--foo --bar', - }) - }) - - it('does not return if dev is set and version < 12', () => { - expect(util.getNodeOptions({ - dev: true, - }, 11)).to.be.undefined }) }) diff --git a/npm/design-system/package.json b/npm/design-system/package.json index 734493e011d8..0522c7cb8243 100644 --- a/npm/design-system/package.json +++ b/npm/design-system/package.json @@ -7,9 +7,9 @@ "build": "rimraf dist && yarn rollup -c rollup.config.js", "build-prod": "yarn build", "cy:open": "node ../../scripts/cypress.js open-ct --project ${PWD}", - "cy:open:debug": "NODE_OPTIONS=--max-http-header-size=1048576 node --inspect-brk ../../scripts/start.js --component-testing --project ${PWD}", + "cy:open:debug": "node --inspect-brk ../../scripts/start.js --component-testing --project ${PWD}", "cy:run": "node ../../scripts/cypress.js run-ct --project ${PWD}", - "cy:run:debug": "NODE_OPTIONS=--max-http-header-size=1048576 node --inspect-brk ../../scripts/start.js --component-testing --run-project ${PWD}", + "cy:run:debug": "node --inspect-brk ../../scripts/start.js --component-testing --run-project ${PWD}", "pretest": "yarn transpile", "test": "yarn cy:run", "transpile": "tsc", @@ -29,7 +29,7 @@ "@rollup/plugin-commonjs": "^17.1.0", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^11.1.1", - "@types/node": "12.12.50", + "@types/node": "14.14.31", "@types/semver": "7.3.4", "babel-loader": "8.0.6", "css-loader": "2.1.1", diff --git a/npm/react/cypress/component/basic/error-boundary-spec.js b/npm/react/cypress/component/basic/error-boundary-spec.js index 48eaa81ab202..b5a4cf03630d 100644 --- a/npm/react/cypress/component/basic/error-boundary-spec.js +++ b/npm/react/cypress/component/basic/error-boundary-spec.js @@ -29,15 +29,20 @@ describe('Error Boundary', () => { }) it('on error, display fallback UI', () => { - try { - mount( - - - , - ) - } catch (e) { - // do nothing - } + // Error boundaries do not stop an uncaught error from propagating. + // Cypress will fail on uncaught exceptions by default, so we need to suppress that behavior. + cy.on('uncaught:exception', (err) => { + // Assert that we are only suppressing the default behavior for the error we expect. + expect(err.message.includes('I crashed!')).to.be.true + + return false + }) + + mount( + + + , + ) cy.get('header h1').should('contain', 'Something went wrong.') cy.get('header h3').should('contain', 'ChildWithError failed to load') diff --git a/npm/react/package.json b/npm/react/package.json index 0292ec9d4714..f8f260c942c4 100644 --- a/npm/react/package.json +++ b/npm/react/package.json @@ -7,9 +7,9 @@ "build": "rimraf dist && yarn rollup -c rollup.config.js", "build-prod": "yarn build", "cy:open": "node ../../scripts/cypress.js open-ct --project ${PWD}", - "cy:open:debug": "NODE_OPTIONS=--max-http-header-size=1048576 node --inspect-brk ../../scripts/start.js --component-testing --project ${PWD}", + "cy:open:debug": "node --inspect-brk ../../scripts/start.js --component-testing --project ${PWD}", "cy:run": "node ../../scripts/cypress.js run-ct --project ${PWD}", - "cy:run:debug": "NODE_OPTIONS=--max-http-header-size=1048576 node --inspect-brk ../../scripts/start.js --component-testing --run-project ${PWD}", + "cy:run:debug": "node --inspect-brk ../../scripts/start.js --component-testing --run-project ${PWD}", "pretest": "yarn transpile", "test": "yarn cy:run", "test-ci": "node run-tests.js", diff --git a/package.json b/package.json index 6dbfb7520abb..8f0b5d226ef9 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "@types/markdown-it": "0.0.9", "@types/mini-css-extract-plugin": "0.8.0", "@types/mocha": "8.0.3", - "@types/node": "12.12.50", + "@types/node": "14.14.31", "@types/prismjs": "1.16.0", "@types/ramda": "0.25.47", "@types/react": "16.9.50", @@ -192,7 +192,7 @@ "typescript": "3.7.4" }, "engines": { - "node": ">=12.18.3", + "node": ">=14.16.0", "yarn": ">=1.17.3" }, "productName": "Cypress", diff --git a/packages/driver/src/cypress/cy.js b/packages/driver/src/cypress/cy.js index 60ee095faf57..6804d44b7e17 100644 --- a/packages/driver/src/cypress/cy.js +++ b/packages/driver/src/cypress/cy.js @@ -93,7 +93,7 @@ const setTopOnError = function (Cypress, cy, errors) { const isSpecError = $errUtils.isSpecError(Cypress.config('spec'), err) if (isSpecError) { - return curCy.onSpecWindowUncaughtException(handlerType, err) + return curCy.onSpecWindowUncaughtException(handlerType, err, promise) } return curCy.onUncaughtException(handlerType, err, promise) @@ -1222,13 +1222,24 @@ const create = function (specWindow, Cypress, Cookies, state, config, log) { snapshots.onBeforeWindowLoad() }, - onSpecWindowUncaughtException (handlerType, err) { + onSpecWindowUncaughtException (handlerType, err, promise) { err = errors.createUncaughtException('spec', handlerType, err) const runnable = state('runnable') if (!runnable) return err + if (config('componentTesting')) { + // in component testing, uncaught exceptions should be catchable, as there is no AUT + const results = Cypress.action('app:uncaught:exception', err, runnable, promise) + + // dont do anything if any of our uncaught:exception + // listeners returned false + if (_.some(results, returnedFalse)) { + return + } + } + try { fail(err) } catch (failErr) { diff --git a/packages/electron/lib/electron.js b/packages/electron/lib/electron.js index a8dec77a485a..25e5a166076c 100644 --- a/packages/electron/lib/electron.js +++ b/packages/electron/lib/electron.js @@ -128,10 +128,6 @@ module.exports = { } } - // max HTTP header size 8kb -> 1mb - // https://github.com/cypress-io/cypress/issues/76 - argv.unshift(`--max-http-header-size=${1024 * 1024}`) - debug('spawning %s with args', execPath, argv) if (debug.enabled) { diff --git a/packages/electron/package.json b/packages/electron/package.json index d039ea5a5447..c298a5cda98e 100644 --- a/packages/electron/package.json +++ b/packages/electron/package.json @@ -24,7 +24,7 @@ "minimist": "1.2.5" }, "devDependencies": { - "electron": "11.3.0", + "electron": "12.0.0", "execa": "4.1.0", "mocha": "3.5.3" }, diff --git a/packages/https-proxy/lib/ca.js b/packages/https-proxy/lib/ca.js index e3b1a002835d..47d008ed385a 100644 --- a/packages/https-proxy/lib/ca.js +++ b/packages/https-proxy/lib/ca.js @@ -269,7 +269,7 @@ class CA { } writeCAVersion () { - return fs.outputFileAsync(this.getCAVersionPath(), CA_VERSION) + return fs.outputFileAsync(this.getCAVersionPath(), String(CA_VERSION)) } assertMinimumCAVersion () { diff --git a/packages/https-proxy/lib/server.js b/packages/https-proxy/lib/server.js index 2a88364c64df..8b22c33171ac 100644 --- a/packages/https-proxy/lib/server.js +++ b/packages/https-proxy/lib/server.js @@ -1,5 +1,5 @@ const _ = require('lodash') -const { allowDestroy, connect } = require('@packages/network') +const { allowDestroy, connect, httpUtils } = require('@packages/network') const debug = require('debug')('cypress:https-proxy') const https = require('https') const net = require('net') @@ -227,7 +227,10 @@ class Server { _listenHttpsServer (data) { return new Promise((resolve, reject) => { - const server = https.createServer(data) + const server = https.createServer({ + ...data, + ...httpUtils.lenientOptions, + }) allowDestroy(server) diff --git a/packages/network/lib/agent.ts b/packages/network/lib/agent.ts index d32921d1775a..861ce7c6af71 100644 --- a/packages/network/lib/agent.ts +++ b/packages/network/lib/agent.ts @@ -6,6 +6,7 @@ import net from 'net' import { getProxyForUrl } from 'proxy-from-env' import url from 'url' import { createRetryingSocket, getAddress } from './connect' +import { lenientOptions } from './http-utils' const debug = debugModule('cypress:network:agent') const CRLF = '\r\n' @@ -151,9 +152,7 @@ export class CombinedAgent { // called by Node.js whenever a new request is made internally addRequest (req: http.ClientRequest, options: http.RequestOptions, port?: number, localAddress?: string) { - // allow requests which contain invalid/malformed headers - // https://github.com/cypress-io/cypress/issues/5602 - req.insecureHTTPParser = true + _.merge(req, lenientOptions) // Legacy API: addRequest(req, host, port, localAddress) // https://github.com/nodejs/node/blob/cb68c04ce1bc4534b2d92bc7319c6ff6dda0180d/lib/_http_agent.js#L148-L155 diff --git a/packages/network/lib/http-utils.ts b/packages/network/lib/http-utils.ts index 6e8ef36bfaeb..bf4e18b0450a 100644 --- a/packages/network/lib/http-utils.ts +++ b/packages/network/lib/http-utils.ts @@ -9,3 +9,18 @@ const NO_BODY_STATUS_CODES = [204, 304] export function responseMustHaveEmptyBody (req: IncomingMessage, res: IncomingMessage) { return _.includes(NO_BODY_STATUS_CODES, res.statusCode) || (req.method && req.method.toLowerCase() === 'head') } + +/** + * HTTP options to make Node.js's HTTP libraries behave as leniently as possible. + * + * These should be used whenever Cypress is processing "real-world" HTTP requests - like when setting up a proxy + * server or sending outgoing requests. + */ +export const lenientOptions = { + // increase header buffer for incoming response (ClientRequest) request (Server) headers, from 16KB to 1MB + // @see https://github.com/cypress-io/cypress/issues/76 + maxHeaderSize: 1024 ** 2, + // allow requests which contain invalid/malformed headers + // https://github.com/cypress-io/cypress/issues/5602 + insecureHTTPParser: true, +} diff --git a/packages/server-ct/package.json b/packages/server-ct/package.json index c71ab0a33e6c..a7a8ab208e17 100644 --- a/packages/server-ct/package.json +++ b/packages/server-ct/package.json @@ -5,10 +5,10 @@ "main": "index.js", "scripts": { "build-prod": "tsc", - "cypress:open": "node ./scripts/check-example.js && NODE_OPTIONS=--max-http-header-size=1048576 node ../../scripts/start.js --component-testing --project ${PWD}/crossword-example", - "cypress:open:debug": "node ./scripts/check-example.js && NODE_OPTIONS=--max-http-header-size=1048576 node --inspect-brk ../../scripts/start.js --component-testing --project ${PWD}/crossword-example", - "cypress:run": "node ./scripts/check-example.js && NODE_OPTIONS=--max-http-header-size=1048576 node ../../scripts/start.js --component-testing --run-project ${PWD}/crossword-example", - "cypress:run:debug": "node ./scripts/check-example.js && NODE_OPTIONS=--max-http-header-size=1048576 node --inspect-brk ../../scripts/start.js --component-testing --run-project ${PWD}/crossword-example", + "cypress:open": "node ./scripts/check-example.js && node ../../scripts/start.js --component-testing --project ${PWD}/crossword-example", + "cypress:open:debug": "node ./scripts/check-example.js && node --inspect-brk ../../scripts/start.js --component-testing --project ${PWD}/crossword-example", + "cypress:run": "node ./scripts/check-example.js && node ../../scripts/start.js --component-testing --run-project ${PWD}/crossword-example", + "cypress:run:debug": "node ./scripts/check-example.js && node --inspect-brk ../../scripts/start.js --component-testing --run-project ${PWD}/crossword-example", "test-unit": "mocha -r @packages/ts/register test/**/*.spec.ts --config ./test/.mocharc.js --exit" }, "dependencies": { diff --git a/packages/server/__snapshots__/4_request_spec.ts.js b/packages/server/__snapshots__/4_request_spec.ts.js index ae6d4025ded2..03b599be763b 100644 --- a/packages/server/__snapshots__/4_request_spec.ts.js +++ b/packages/server/__snapshots__/4_request_spec.ts.js @@ -243,7 +243,8 @@ Headers: { "content-length": "19", "etag": "W/13-52060a5f", "date": "Fri, 18 Aug 2017 XX:XX GMT", - "connection": "keep-alive" + "connection": "keep-alive", + "keep-alive": "timeout=5" } Body: Service Unavailable @@ -361,7 +362,8 @@ Headers: { "content-type": "text/html; charset=utf-8", "content-length": "301", "date": "Fri, 18 Aug 2017 XX:XX GMT", - "connection": "keep-alive" + "connection": "keep-alive", + "keep-alive": "timeout=5" } Body: diff --git a/packages/server/__snapshots__/4_xhr_spec.js b/packages/server/__snapshots__/4_xhr_spec.js index 2bf89a4439b1..41d85aeaa0d8 100644 --- a/packages/server/__snapshots__/4_xhr_spec.js +++ b/packages/server/__snapshots__/4_xhr_spec.js @@ -24,21 +24,20 @@ exports['e2e xhr / passes in global mode'] = ` ✓ does not inject into json's contents from file server even requesting text/html ✓ works prior to visit ✓ can stub a 100kb response - ✓ spawns tasks with original NODE_OPTIONS server with 1 visit ✓ response body ✓ request body ✓ aborts - 10 passing + 9 passing (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 10 │ - │ Passing: 10 │ + │ Tests: 9 │ + │ Passing: 9 │ │ Failing: 0 │ │ Pending: 0 │ │ Skipped: 0 │ @@ -62,9 +61,9 @@ exports['e2e xhr / passes in global mode'] = ` Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ ✔ xhr_spec.js XX:XX 10 10 - - - │ + │ ✔ xhr_spec.js XX:XX 9 9 - - - │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ - ✔ All specs passed! XX:XX 10 10 - - - + ✔ All specs passed! XX:XX 9 9 - - - ` @@ -95,21 +94,20 @@ exports['e2e xhr / passes through CLI'] = ` ✓ does not inject into json's contents from file server even requesting text/html ✓ works prior to visit ✓ can stub a 100kb response - ✓ spawns tasks with original NODE_OPTIONS server with 1 visit ✓ response body ✓ request body ✓ aborts - 10 passing + 9 passing (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Tests: 10 │ - │ Passing: 10 │ + │ Tests: 9 │ + │ Passing: 9 │ │ Failing: 0 │ │ Pending: 0 │ │ Skipped: 0 │ @@ -133,9 +131,9 @@ exports['e2e xhr / passes through CLI'] = ` Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ ✔ xhr_spec.js XX:XX 10 10 - - - │ + │ ✔ xhr_spec.js XX:XX 9 9 - - - │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ - ✔ All specs passed! XX:XX 10 10 - - - + ✔ All specs passed! XX:XX 9 9 - - - ` diff --git a/packages/server/index.js b/packages/server/index.js index 96f51f467a39..a360b861234c 100644 --- a/packages/server/index.js +++ b/packages/server/index.js @@ -36,17 +36,4 @@ process.traceDeprecation = true require('./lib/util/suppress_unauthorized_warning').suppress() -function launchOrFork () { - const nodeOptions = require('./lib/util/node_options') - - if (nodeOptions.needsOptions()) { - // https://github.com/cypress-io/cypress/pull/5492 - return nodeOptions.forkWithCorrectOptions() - } - - nodeOptions.restoreOriginalOptions() - - module.exports = require('./lib/cypress').start(process.argv) -} - -launchOrFork() +module.exports = require('./lib/cypress').start(process.argv) diff --git a/packages/server/lib/browsers/cdp_automation.ts b/packages/server/lib/browsers/cdp_automation.ts index ee482ca70997..5b5fe73f512e 100644 --- a/packages/server/lib/browsers/cdp_automation.ts +++ b/packages/server/lib/browsers/cdp_automation.ts @@ -144,6 +144,9 @@ export const CdpAutomation = (sendDebuggerCommandFn: SendDebuggerCommand) => { }) .then((result: cdp.Network.GetCookiesResponse) => { return normalizeGetCookies(result.cookies) + .filter((cookie) => { + return !(url.startsWith('http:') && cookie.secure) + }) }) } diff --git a/packages/server/lib/file_server.js b/packages/server/lib/file_server.js index 8b143bd2d528..da04be9c4ee4 100644 --- a/packages/server/lib/file_server.js +++ b/packages/server/lib/file_server.js @@ -6,6 +6,7 @@ const url = require('url') const http = require('http') const path = require('path') const send = require('send') +const { httpUtils } = require('@packages/network') const { allowDestroy } = require('./util/server_destroy') const random = require('./util/random') const networkFailures = require('./util/network_failures') @@ -52,7 +53,7 @@ module.exports = { return new Promise(((resolve) => { const token = random.id(64) - const srv = http.createServer((req, res) => { + const srv = http.createServer(httpUtils.lenientOptions, (req, res) => { return onRequest(req, res, token, fileServerFolder) }) diff --git a/packages/server/lib/server-base.ts b/packages/server/lib/server-base.ts index e60a172afbb9..48b35125cf48 100644 --- a/packages/server/lib/server-base.ts +++ b/packages/server/lib/server-base.ts @@ -11,7 +11,7 @@ import { AddressInfo } from 'net' import url from 'url' import httpsProxy from '@packages/https-proxy' import { netStubbingState, NetStubbingState } from '@packages/net-stubbing' -import { agent, cors, uri } from '@packages/network' +import { agent, cors, httpUtils, uri } from '@packages/network' import { NetworkProxy } from '@packages/proxy' import { SocketCt } from '@packages/server-ct' import errors from './errors' @@ -237,7 +237,7 @@ export class ServerBase { } _createHttpServer (app): DestroyableHttpServer { - const svr = http.createServer(app) + const svr = http.createServer(httpUtils.lenientOptions, app) allowDestroy(svr) diff --git a/packages/server/lib/util/node_options.ts b/packages/server/lib/util/node_options.ts deleted file mode 100644 index 5f41b1ff20e2..000000000000 --- a/packages/server/lib/util/node_options.ts +++ /dev/null @@ -1,94 +0,0 @@ -import cp from 'child_process' -import debugModule from 'debug' - -const debug = debugModule('cypress:server:util:node_options') - -export const NODE_OPTIONS = `--max-http-header-size=${1024 ** 2}` - -/** - * If Cypress was not launched via CLI, it may be missing certain startup - * options. This checks that those startup options were applied. - * - * @returns {boolean} does Cypress have the expected NODE_OPTIONS? - */ -export function needsOptions (): boolean { - if ((process.env.NODE_OPTIONS || '').includes(NODE_OPTIONS)) { - debug('NODE_OPTIONS check passed, not forking %o', { NODE_OPTIONS: process.env.NODE_OPTIONS }) - - return false - } - - if (typeof require.main === 'undefined') { - debug('require.main is undefined, this should not happen normally, not forking') - - return false - } - - return true -} - -/** - * Retrieve the current inspect flag, if the process was launched with one. - */ -function getCurrentInspectFlag (): string | undefined { - const flag = process.execArgv.find((v) => v.startsWith('--inspect')) - - return flag ? flag.split('=')[0] : undefined -} - -/** - * Fork the current process using the good NODE_OPTIONS and pipe stdio - * through the current process. On exit, copy the error code too. - */ -export function forkWithCorrectOptions (): void { - // this should only happen when running from global mode, when the CLI couldn't set the NODE_OPTIONS - process.env.ORIGINAL_NODE_OPTIONS = process.env.NODE_OPTIONS || '' - process.env.NODE_OPTIONS = `${NODE_OPTIONS} ${process.env.ORIGINAL_NODE_OPTIONS}` - - debug('NODE_OPTIONS check failed, forking %o', { - NODE_OPTIONS: process.env.NODE_OPTIONS, - ORIGINAL_NODE_OPTIONS: process.env.ORIGINAL_NODE_OPTIONS, - }) - - const launchArgs = process.argv.slice(1) - const inspectFlag = getCurrentInspectFlag() - - if (inspectFlag) { - launchArgs.unshift(`${inspectFlag}=${process.debugPort + 1}`) - } - - cp.spawn( - process.execPath, - launchArgs, - { stdio: 'inherit' }, - ) - .on('error', () => {}) - .on('exit', (code, signal) => { - debug('child exited %o', { code, signal }) - process.exit(code === null ? 1 : code) - }) -} - -/** - * Once the Electron process is launched, restore the user's original NODE_OPTIONS - * environment variables from before the CLI added extra NODE_OPTIONS. - * - * This way, any `node` processes launched by Cypress will retain the user's - * `NODE_OPTIONS` without unexpected modificiations that could cause issues with - * user code. - */ -export function restoreOriginalOptions (): void { - // @ts-ignore - if (!process.versions || !process.versions.electron) { - debug('not restoring NODE_OPTIONS since not yet in Electron') - - return - } - - debug('restoring NODE_OPTIONS %o', { - NODE_OPTIONS: process.env.NODE_OPTIONS, - ORIGINAL_NODE_OPTIONS: process.env.ORIGINAL_NODE_OPTIONS, - }) - - process.env.NODE_OPTIONS = process.env.ORIGINAL_NODE_OPTIONS || '' -} diff --git a/packages/server/package.json b/packages/server/package.json index 28ca4b704730..aa6c18ee499e 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -172,7 +172,7 @@ "mock-fs": "4.12.0", "mocked-env": "1.2.4", "mockery": "2.1.0", - "multiparty": "4.2.1", + "multer": "1.4.2", "nock": "12.0.2", "proxyquire": "2.1.3", "react": "16.8.6", diff --git a/packages/server/test/e2e/4_form_submissions_spec.js b/packages/server/test/e2e/4_form_submissions_spec.js index b822b75cfaf5..6e7d9d316d48 100644 --- a/packages/server/test/e2e/4_form_submissions_spec.js +++ b/packages/server/test/e2e/4_form_submissions_spec.js @@ -1,8 +1,7 @@ const rp = require('@cypress/request-promise') const path = require('path') -const Promise = require('bluebird') const bodyParser = require('body-parser') -const multiparty = require('multiparty') +const multer = require('multer') const { fs } = require('../../lib/util/fs') const e2e = require('../support/helpers/e2e').default const Fixtures = require('../support/helpers/fixtures') @@ -32,34 +31,28 @@ const getFormHtml = (formAttrs, textValue = '') => { } const onServer = function (app) { - app.post('/verify-attachment', (req, res) => { - const form = new multiparty.Form() + app.post('/verify-attachment', multer().any(), async (req, res) => { + const file = req.files[0] - return form.parse(req, (err, fields, files) => { - const fixturePath = path.resolve(e2ePath, 'cypress', 'fixtures', fields['foo'][0]) - const filePath = files['bar'][0].path + const fixturePath = path.resolve(e2ePath, 'cypress', 'fixtures', req.body.foo) - return Promise.props({ - fixture: fs.readFileAsync(fixturePath), - upload: fs.readFileAsync(filePath), - }) - .then(({ fixture, upload }) => { - const ret = fixture.compare(upload) + const fixtureBuf = await fs.readFileAsync(fixturePath) + const uploadBuf = file.buffer + + const ret = fixtureBuf.compare(uploadBuf) - if (ret === 0) { - return res.send('files match') - } + if (ret === 0) { + return res.send('files match') + } - return res.send( - `\ -file did not match. file at ${fixturePath} did not match ${filePath}. + return res.send( + `\ +file did not match. file at ${fixturePath} did not match uploaded buf.

buffer compare yielded: ${ret}\ `, - ) - }) - }) + ) }) // all routes below this point will have bodies parsed diff --git a/packages/server/test/integration/cypress_spec.js b/packages/server/test/integration/cypress_spec.js index 70d92e50acb3..32ab362b70c5 100644 --- a/packages/server/test/integration/cypress_spec.js +++ b/packages/server/test/integration/cypress_spec.js @@ -1163,6 +1163,8 @@ describe('lib/cypress', () => { send: sinon.stub(), } + sinon.stub(chromeBrowser, '_writeExtension').resolves() + sinon.stub(chromeBrowser, '_connectToChromeRemoteInterface').resolves(criClient) // the "returns(resolves)" stub is due to curried method // it accepts URL to visit and then waits for actual CRI client reference diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/xhr_spec.js b/packages/server/test/support/fixtures/projects/e2e/cypress/integration/xhr_spec.js index 9ad7b90494e0..99bd99695f65 100644 --- a/packages/server/test/support/fixtures/projects/e2e/cypress/integration/xhr_spec.js +++ b/packages/server/test/support/fixtures/projects/e2e/cypress/integration/xhr_spec.js @@ -128,10 +128,6 @@ describe('xhrs', () => { }) }) - it('spawns tasks with original NODE_OPTIONS', () => { - cy.task('assert:http:max:header:size', 8192) - }) - describe('server with 1 visit', () => { before(() => { cy.visit('/xhr.html') diff --git a/packages/server/test/support/fixtures/projects/e2e/cypress/plugins/index.js b/packages/server/test/support/fixtures/projects/e2e/cypress/plugins/index.js index c758734b1157..95545061b82a 100644 --- a/packages/server/test/support/fixtures/projects/e2e/cypress/plugins/index.js +++ b/packages/server/test/support/fixtures/projects/e2e/cypress/plugins/index.js @@ -1,8 +1,6 @@ require('@packages/ts/register') const _ = require('lodash') -const { expect } = require('chai') -const http = require('http') const Jimp = require('jimp') const path = require('path') const Promise = require('bluebird') @@ -180,11 +178,5 @@ module.exports = (on, config) => { 'get:config:value' (key) { return config[key] }, - - 'assert:http:max:header:size' (expectedBytes) { - expect(http.maxHeaderSize).to.eq(expectedBytes) - - return null - }, }) } diff --git a/packages/server/test/unit/node_options_spec.ts b/packages/server/test/unit/node_options_spec.ts deleted file mode 100644 index 130f372d035c..000000000000 --- a/packages/server/test/unit/node_options_spec.ts +++ /dev/null @@ -1,63 +0,0 @@ -import '../spec_helper' -import sinon from 'sinon' -import { expect } from 'chai' -import cp, { ChildProcess } from 'child_process' -import { EventEmitter } from 'events' -import * as nodeOptions from '../../lib/util/node_options' -import mockedEnv from 'mocked-env' - -describe('NODE_OPTIONS lib', function () { - context('.forkWithCorrectOptions', function () { - let fakeProc: EventEmitter - let restoreEnv - - beforeEach(() => { - restoreEnv = mockedEnv({ - NODE_OPTIONS: '', - ORIGINAL_NODE_OPTIONS: '', - }) - }) - - afterEach(() => { - restoreEnv() - }) - - it('modifies NODE_OPTIONS', function () { - process.env.NODE_OPTIONS = 'foo' - expect(process.env.NODE_OPTIONS).to.eq('foo') - sinon.stub(cp, 'spawn').callsFake(() => { - expect(process.env).to.include({ - NODE_OPTIONS: `${nodeOptions.NODE_OPTIONS} foo`, - ORIGINAL_NODE_OPTIONS: 'foo', - }) - - return null as ChildProcess // types - }) - }) - - context('when exiting', function () { - beforeEach(() => { - fakeProc = new EventEmitter() - - sinon.stub(cp, 'spawn') - .withArgs(process.execPath, sinon.match.any, { stdio: 'inherit' }) - .returns(fakeProc as ChildProcess) - - sinon.stub(process, 'exit') - }) - - it('propagates exit codes correctly', function () { - nodeOptions.forkWithCorrectOptions() - fakeProc.emit('exit', 123) - expect(process.exit).to.be.calledWith(123) - }) - - // @see https://github.com/cypress-io/cypress/issues/7722 - it('propagates signals via a non-zero exit code', function () { - nodeOptions.forkWithCorrectOptions() - fakeProc.emit('exit', null, 'SIGKILL') - expect(process.exit).to.be.calledWith(1) - }) - }) - }) -}) diff --git a/packages/ts/index.d.ts b/packages/ts/index.d.ts index fafbfb28fe45..615efa018841 100644 --- a/packages/ts/index.d.ts +++ b/packages/ts/index.d.ts @@ -24,11 +24,12 @@ import { Url } from 'url' } interface ClientRequest { - _header: { [key: string]: string } + _header?: { [key: string]: string } _implicitHeader: () => void output: string[] agent: Agent insecureHTTPParser: boolean + maxHeaderSize?: number } interface RequestOptions extends ClientRequestArgs { diff --git a/scripts/run-docker-local.sh b/scripts/run-docker-local.sh index f34e9455470c..cee67c0d1d83 100755 --- a/scripts/run-docker-local.sh +++ b/scripts/run-docker-local.sh @@ -3,7 +3,7 @@ set e+x echo "This script should be run from cypress's root" -name=cypress/browsers:node12.18.3-chrome83-ff77 +name=cypress/browsers:node14.16.0-chrome89-ff77 echo "Pulling CI container $name" docker pull $name diff --git a/yarn.lock b/yarn.lock index 3befe3ee0b39..7c21bdcc796e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2915,7 +2915,7 @@ "@jest/types@^26.3.0", "@jest/types@^26.6.2": version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" + resolved "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== dependencies: "@types/istanbul-lib-coverage" "^2.0.0" @@ -5411,7 +5411,7 @@ "@types/cheerio@*", "@types/cheerio@0.22.21": version "0.22.21" - resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.21.tgz#5e37887de309ba11b2e19a6e14cad7874b31a8a3" + resolved "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.21.tgz#5e37887de309ba11b2e19a6e14cad7874b31a8a3" integrity sha512-aGI3DfswwqgKPiEOTaiHV2ZPC9KEhprpgEbJnv0fZl3SGX0cGgEva1126dGrMC6AJM6v/aihlUgJn9M5DbDZ/Q== dependencies: "@types/node" "*" @@ -5506,7 +5506,7 @@ "@types/enzyme@*", "@types/enzyme@3.10.5": version "3.10.5" - resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.10.5.tgz#fe7eeba3550369eed20e7fb565bfb74eec44f1f0" + resolved "https://registry.npmjs.org/@types/enzyme/-/enzyme-3.10.5.tgz#fe7eeba3550369eed20e7fb565bfb74eec44f1f0" integrity sha512-R+phe509UuUYy9Tk0YlSbipRpfVtIzb/9BHn5pTEtjJTF5LXvUjrIQcZvNyANNEyFrd2YGs196PniNT1fgvOQA== dependencies: "@types/cheerio" "*" @@ -5829,16 +5829,11 @@ resolved "https://registry.yarnpkg.com/@types/mustache/-/mustache-4.1.1.tgz#fcfa2db0cee6261e66f2437dc2fe71e26c7856b4" integrity sha512-Sm0NWeLhS2QL7NNGsXvO+Fgp7e3JLHCO6RS3RCnfjAnkw6Y1bsji/AGfISdQZDIR/AeOyzkrxRk9jBkl55zdJw== -"@types/node@*", "@types/node@>= 8", "@types/node@^14.14.7": +"@types/node@*", "@types/node@14.14.31", "@types/node@>= 8", "@types/node@^14.14.31", "@types/node@^14.14.7", "@types/node@^14.6.2": version "14.14.31" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.31.tgz#72286bd33d137aa0d152d47ec7c1762563d34055" integrity sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g== -"@types/node@12.12.50": - version "12.12.50" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.50.tgz#e9b2e85fafc15f2a8aa8fdd41091b983da5fd6ee" - integrity sha512-5ImO01Fb8YsEOYpV+aeyGYztcYcjGsBvN4D7G5r1ef2cuQOpymjWNQi5V0rKHE6PC2ru3HkoUr/Br2/8GUA84w== - "@types/node@14.6.2": version "14.6.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.2.tgz#264b44c5a28dfa80198fc2f7b6d3c8a054b9491f" @@ -5849,7 +5844,7 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.49.tgz#ab4df6e505db088882c8ce5417ae0bc8cbb7a8a6" integrity sha512-YY0Okyn4QXC4ugJI+Kng5iWjK8A6eIHiQVaGIhJkyn0YL6Iqo0E0tBC8BuhvYcBK87vykBijM5FtMnCqaa5anA== -"@types/node@^12.0.12", "@types/node@^12.12.29", "@types/node@^12.12.50": +"@types/node@^12.12.29": version "12.20.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.4.tgz#73687043dd00fcb6962c60fbf499553a24d6bdf2" integrity sha512-xRCgeE0Q4pT5UZ189TJ3SpYuX/QGl6QIAOAIeDSbAVAd2gX1NxSZup4jNVK7cxIeP8KDSbJgcckun495isP1jQ== @@ -7506,6 +7501,11 @@ append-buffer@^1.0.2: dependencies: buffer-equal "^1.0.0" +append-field@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz#1e3440e915f0b1203d23748e78edd7b9b5b43e56" + integrity sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY= + append-transform@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-2.0.0.tgz#99d9d29c7b38391e6f428d28ce136551f0b77e12" @@ -10152,6 +10152,14 @@ builtins@^1.0.0, builtins@^1.0.3: resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og= +busboy@^0.2.11: + version "0.2.14" + resolved "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz#6c2a622efcf47c57bbbe1e2a9c37ad36c7925453" + integrity sha1-bCpiLvz0fFe7vh4qnDetNseSVFM= + dependencies: + dicer "0.2.5" + readable-stream "1.1.x" + byline@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" @@ -13801,6 +13809,14 @@ dezalgo@^1.0.0, dezalgo@~1.0.3: asap "^2.0.0" wrappy "1" +dicer@0.2.5: + version "0.2.5" + resolved "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz#5996c086bb33218c812c090bddc09cd12facb70f" + integrity sha1-WZbAhrszIYyBLAkL3cCc0S+stw8= + dependencies: + readable-stream "1.1.x" + streamsearch "0.1.2" + diff-match-patch@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.5.tgz#abb584d5f10cd1196dfc55aa03701592ae3f7b37" @@ -14410,13 +14426,13 @@ electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.378, electron-to-chromi resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.682.tgz#f4b5c8d4479df96b61e508a721d6c32c1262ef23" integrity sha512-zok2y37qR00U14uM6qBz/3iIjWHom2eRfC2S1StA0RslP7x34jX+j4mxv80t8OEOHLJPVG54ZPeaFxEI7gPrwg== -electron@11.3.0: - version "11.3.0" - resolved "https://registry.yarnpkg.com/electron/-/electron-11.3.0.tgz#87e8528fd23ae53b0eeb3a738f1fe0a3ad27c2db" - integrity sha512-MhdS0gok3wZBTscLBbYrOhLaQybCSAfkupazbK1dMP5c+84eVMxJE/QGohiWQkzs0tVFIJsAHyN19YKPbelNrQ== +electron@12.0.0: + version "12.0.0" + resolved "https://registry.yarnpkg.com/electron/-/electron-12.0.0.tgz#b3b1d88cc64622e59c637521da5a6b6ab4df4eb5" + integrity sha512-p6oxZ4LG82hopPGAsIMOjyoL49fr6cexyFNH0kADA9Yf+mJ72DN7bjvBG+6V7r6QKhwYgsSsW8RpxBeVOUbxVQ== dependencies: "@electron/get" "^1.0.1" - "@types/node" "^12.0.12" + "@types/node" "^14.6.2" extract-zip "^1.0.3" elegant-spinner@^1.0.1: @@ -16202,7 +16218,7 @@ fbjs@^0.8.1, fbjs@^0.8.16, fbjs@^0.8.9: setimmediate "^1.0.5" ua-parser-js "^0.7.18" -fd-slicer@1.1.0, fd-slicer@~1.1.0: +fd-slicer@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= @@ -18868,7 +18884,7 @@ http-errors@1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" -http-errors@1.7.3, http-errors@~1.7.0, http-errors@~1.7.2: +http-errors@1.7.3, http-errors@~1.7.2: version "1.7.3" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== @@ -24439,6 +24455,20 @@ ms@2.1.3, ms@^2.0.0, ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +multer@1.4.2: + version "1.4.2" + resolved "https://registry.npmjs.org/multer/-/multer-1.4.2.tgz#2f1f4d12dbaeeba74cb37e623f234bf4d3d2057a" + integrity sha512-xY8pX7V+ybyUpbYMxtjM9KAiD9ixtg5/JkeKUTD6xilfDv0vzzOFcCp4Ljb1UU3tSOM3VTZtKo63OmzOrGi3Cg== + dependencies: + append-field "^1.0.0" + busboy "^0.2.11" + concat-stream "^1.5.2" + mkdirp "^0.5.1" + object-assign "^4.1.1" + on-finished "^2.3.0" + type-is "^1.6.4" + xtend "^4.0.0" + multicast-dns-service-types@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" @@ -24462,16 +24492,6 @@ multimatch@^3.0.0: arrify "^1.0.1" minimatch "^3.0.4" -multiparty@4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/multiparty/-/multiparty-4.2.1.tgz#d9b6c46d8b8deab1ee70c734b0af771dd46e0b13" - integrity sha512-AvESCnNoQlZiOfP9R4mxN8M9csy2L16EIbWIkt3l4FuGti9kXBS8QVzlfyg4HEnarJhrzZilgNFlZtqmoiAIIA== - dependencies: - fd-slicer "1.1.0" - http-errors "~1.7.0" - safe-buffer "5.1.2" - uid-safe "2.1.5" - mustache@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.1.0.tgz#8c1b042238a982d2eb2d30efc6c14296ae3f699d" @@ -29341,6 +29361,16 @@ read@1, read@~1.0.1, read@~1.0.7: string_decoder "~1.1.1" util-deprecate "~1.0.1" +readable-stream@1.1.x, readable-stream@~1.1.10: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + "readable-stream@2 || 3", readable-stream@3, "readable-stream@>= 0.3.0", readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" @@ -29360,16 +29390,6 @@ readable-stream@~1.0.2: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@~1.1.10: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - readdir-glob@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/readdir-glob/-/readdir-glob-1.1.1.tgz#f0e10bb7bf7bfa7e0add8baffdc54c3f7dbee6c4" @@ -31610,7 +31630,7 @@ socket.io-client@3.0.4: socket.io-parser@4.0.2, socket.io-parser@~3.3.0, socket.io-parser@~3.4.0, socket.io-parser@~4.0.1: version "4.0.2" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.0.2.tgz#3d021a9c86671bb079e7c6c806db6a1d9b1bc780" + resolved "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.2.tgz#3d021a9c86671bb079e7c6c806db6a1d9b1bc780" integrity sha512-Bs3IYHDivwf+bAAuW/8xwJgIiBNtlvnjYRc4PbXgniLmcP1BrakBoq/QhO24rgtgW7VZ7uAaswRGxutUnlAK7g== dependencies: "@types/component-emitter" "^1.2.10" @@ -31770,6 +31790,7 @@ source-list-map@^2.0.0: integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== "source-map-fast@npm:source-map@0.7.3", source-map@0.7.3, source-map@^0.7.3: + name source-map-fast version "0.7.3" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== @@ -32330,6 +32351,11 @@ stream-splicer@^2.0.0: inherits "^2.0.1" readable-stream "^2.0.2" +streamsearch@0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a" + integrity sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo= + strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" @@ -33991,7 +34017,7 @@ type-fest@^0.8.0, type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== -type-is@^1.6.16, type-is@~1.6.17, type-is@~1.6.18: +type-is@^1.6.16, type-is@^1.6.4, type-is@~1.6.17, type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== @@ -34102,7 +34128,7 @@ uid-number@0.0.6: resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" integrity sha1-DqEOgDXo61uOREnwbaHHMGY7qoE= -uid-safe@2.1.5, uid-safe@~2.1.5: +uid-safe@~2.1.5: version "2.1.5" resolved "https://registry.yarnpkg.com/uid-safe/-/uid-safe-2.1.5.tgz#2b3d5c7240e8fc2e58f8aa269e5ee49c0857bd3a" integrity sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==