diff --git a/CHANGELOG.md b/CHANGELOG.md index cbe5530..747ef19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [3.1.8-beta.0](https://github.com/sorry-cypress/cy2/compare/v3.1.7...v3.1.8-beta.0) (2022-11-11) + + +### Features + +* monkey patch snapshot config ([d5a3fb9](https://github.com/sorry-cypress/cy2/commit/d5a3fb904dd95ea7f03e124cdbed713be0ac75b1)) + ## [3.1.7](https://github.com/sorry-cypress/cy2/compare/v3.1.6...v3.1.7) (2022-10-27) diff --git a/package.json b/package.json index 8987f4a..dc606b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cy2", - "version": "3.1.7", + "version": "3.1.8-beta.0", "author": "Andrew Goldis", "main": "./dist", "typings": "./dist", @@ -41,8 +41,10 @@ }, "keywords": [ "cypress", - "wrapper", "sorry-cypress", + "cypress dashboard", + "cypress ci", + "cypress parallel", "currents" ], "devDependencies": { diff --git a/src/injected.ts b/src/injected.ts index 5aa31a2..516a3ff 100644 --- a/src/injected.ts +++ b/src/injected.ts @@ -1,6 +1,21 @@ const Mod = require('module'); const req = Mod.prototype.require; +// @ts-ignore +if (global.snapshotResult?.customRequire?.exports) { + // @ts-ignore + global.snapshotResult.customRequire.exports[ + './packages/server/config/app.json' + ].exports = { + development: { api_url: 'http://localhost:1234/' }, + test: { api_url: 'http://localhost:1234/' }, + staging: { api_url: 'https://api-staging.cypress.io/' }, + production: { + api_url: process.env.CYPRESS_API_URL || 'https://api.cypress.io', + }, + }; +} + Mod.prototype.require = function (...args) { if (args[0] === 'konfig') { return () => ({