CodeVetter · Repo Unpack · Extension points
cypress-io/cypress
Public customization is concentrated in Cypress command registration, setupNodeEvents, component adapters, and CLI APIs. Internal extension seams include injected network ports, ordered policies, generated frontend routes, and Nexus schema plugins. New code should enter through the owning seam because transport, generated-artifact, and process boundaries constrain implementation placement.
- Cypress.Commands supports add/addAll, overwrite, and addQuery; registration protects built-in/reserved names and derives parent/child/dual command behavior from prevSubject.
- setupNodeEvents receives registerChildEvent and initialConfig; event registrations are validated, repeated task registrations merge, and a default file preprocessor is installed only when the user supplies none.
- Plugin execution dispatch has specific wrappers for dev-server:start, file:preprocessor, browser launch, tasks, and run/spec/screenshot lifecycle events.
- NetworkInterceptionCore accepts injected policy, request/response, document preparation, capture, cookie, command-log, and browser-automation ports; effects are delegated rather than embedded in matching logic.
- NetworkPolicyRegistry.add appends policies; runPolicies filters by phase and when(exchange), applies policies sequentially with shared state, and stops after end().
- Frontend pages plug into virtual:generated-pages and generated layouts; createRouter adds default-page redirection and installs the Studio unsaved-changes navigation guard.
- GraphQL extension uses schemaTypes, remote-schema merging, and structural/runtime Nexus plugins; mutations and filesystem writes are intended to run through DataContext.actions.
- Component integration offers defineComponentFramework and a devServer contract returning port/close; tap has an ordered CLI command registry that precedes commands advertised by the running session's schema.