Files
cypress/packages/network
Chris Breiding 3e6d6bfe15 chore: Updates based on PR feedback (#21137)
* add generic to cy.origin type

* fix log type, update/add comments

* fix comment indentation

* specific generic

* move RemoteState to internal types

* add on links to experimental flag descriptions

* chore: reduce nesting by flipping condition

* fix test title

* simplify failing log

* rename variable

* delete error property

* fix types

* fix type

* remove unnecessary todo

* update wait test

* jquery -> this

* update comment

* remove vestigial autoRun

* use finally

* re-throw non-security errors

* move back getting index

* add new state types

* remove unnecessary export

* startsWith -> includes

* it -> them

* update system test

* remove use of promise constructor

* Revert "remove use of promise constructor"

This reverts commit 35ccc28b6f.

* log errors from Page.getFrameTree

* test if anything breaks when removing optional chaining operator

* remove vestigial file

* handle queue ending in cross-origin driver

* fix coordinates spec

* improve chrome/firefox check in extension

* improve secure cookie regex

* use production mode for cross-origin driver bundle

* adding remoteStates.getPrimary

* catch and ignore queue errors

* remove optional chaining in postMessage handler

* removed unnecessary async

* update frame tree on cri client reconnect

* fix formatting

* renaming remoteStates variable

* prevent requests from being paused if experimentalSessionAndOrigin flag is off

Co-authored-by: Matt Schile <mschile@cypress.io>
2022-04-22 14:58:02 -05:00
..

network

This package contains networking-related classes and utilities.

Exports

You can see a list of the modules exported from this package in ./lib/index.ts. Here is a brief description of what's available:

  • agent is a HTTP/HTTPS agent with support for HTTP/HTTPS proxies and keepalive whenever possible
  • allowDestroy can be used to wrap a net.Server to add a .destroy() method
  • blocked is a utility for matching blocked globs
  • concatStream is a wrapper around concat-stream@1.6.2 that makes it always yield a Buffer
  • connect contains utilities for making network connections, including createRetryingSocket
  • cors contains utilities for Cross-Origin Resource Sharing
  • uri contains utilities for URL parsing and formatting

See the individual class files in ./lib for more information.

Building

Note: you should not ever need to build the .js files manually. @packages/ts provides require-time transpilation when in development.

yarn workspace @packages/network build-prod

Testing

Tests are located in ./test

To run tests:

yarn workspace @packages/network test
yarn workspace @packages/network test-watch
yarn workspace @packages/network test-debug