Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cy2

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cy2 - npm Package Compare versions

Comparing version 4.0.0-beta.0 to 4.0.0-beta.1

dist/cert/ca.crt

82

dist/patch.js

@@ -10,10 +10,10 @@ "use strict";

}(exports, {
patchServerInit: ()=>f,
patch: ()=>y,
patchServerInit: ()=>d,
patch: ()=>h,
run: ()=>v
});
const e = p(require("child_process")), t = p(require("fs")), r = p(require("js-yaml")), n = require("./bin-path"), i = require("./debug"), u = require("./discovery"), o = require("./fs"), s = require("./js");
function a(e, t, r, n, i, u, o) {
const e = f(require("child_process")), t = f(require("fs")), r = f(require("js-yaml")), n = f(require("path")), i = require("./bin-path"), u = require("./debug"), s = require("./discovery"), o = require("./fs"), a = require("./js");
function c(e, t, r, n, i, u, s) {
try {
var s = e[u](o), a = s.value;
var o = e[u](s), a = o.value;
} catch (c) {

@@ -23,5 +23,5 @@ r(c);

}
s.done ? t(a) : Promise.resolve(a).then(n, i);
o.done ? t(a) : Promise.resolve(a).then(n, i);
}
function c(e) {
function l(e) {
return function() {

@@ -31,14 +31,14 @@ var t = this, r = arguments;

var u = e.apply(t, r);
function s(e) {
c(u, n, i, s, o, "next", e);
}
function o(e) {
a(u, n, i, o, s, "next", e);
c(u, n, i, s, o, "throw", e);
}
function s(e) {
a(u, n, i, o, s, "throw", e);
}
o(void 0);
s(void 0);
});
};
}
function l() {
return (l = Object.assign || function(e) {
function p() {
return (p = Object.assign || function(e) {
for(var t = 1; t < arguments.length; t++){

@@ -51,3 +51,3 @@ var r = arguments[t];

}
function p(e) {
function f(e) {
return e && e.__esModule ? e : {

@@ -57,30 +57,30 @@ default: e

}
function f(e) {
return d.apply(this, arguments);
function d(e) {
return y.apply(this, arguments);
}
function d() {
return (d = c(function*(e) {
let e = yield (0, u.getServerInitPath)();
(0, i.debug)('Patching cypress entry point file: %s', e);
function y() {
return (y = l(function*(e) {
let e = yield (0, s.getServerInitPath)();
(0, u.debug)('Patching cypress entry point file: %s', e);
let r = e + '.bak';
(0, o.pathExists)(r) || t.default.copyFileSync(e, r);
let n = t.default.readFileSync(e, 'utf8'), a = (0, s.instrumentCypressInit)(n, e, e, r);
t.default.writeFileSync(e, a);
let n = t.default.readFileSync(e, 'utf8'), i = (0, a.instrumentCypressInit)(n, e, e, r);
t.default.writeFileSync(e, i);
})).apply(this, arguments);
}
function y(e, t) {
return h.apply(this, arguments);
function h(e, t) {
return _.apply(this, arguments);
}
function h() {
return (h = c(function*(e, t) {
function _() {
return (_ = l(function*(e, t) {
if (!e) throw Error('Missing apiURL');
let { configFilePath: e , backupConfigFilePath: n } = yield (0, u.getConfigFilesPaths)(t);
(0, i.debug)('Patching cypress config file: %s', e);
let { configFilePath: e , backupConfigFilePath: n } = yield (0, s.getConfigFilesPaths)(t);
(0, u.debug)('Patching cypress config file: %s', e);
try {
t.default.statSync(n);
} catch (o) {
} catch (i) {
t.default.copyFileSync(e, n);
}
let s = r.default.load(t.default.readFileSync(e, 'utf8'));
s.production.api_url = e, t.default.writeFileSync(e, r.default.dump(s));
let o = r.default.load(t.default.readFileSync(e, 'utf8'));
o.production.api_url = e, t.default.writeFileSync(e, r.default.dump(o));
})).apply(this, arguments);

@@ -92,11 +92,15 @@ }

function P() {
return (P = c(function*({ port: t }) {
let [r, u, ...o] = process.argv, s = yield (0, n.getCypressCLIBinPath)();
if ((0, i.debug)('Running cypress from %s', s, ...o), process.env.HTTP_PROXY || process.env.HTTPS_PROXY) throw Error('HTTP_PROXY and HTTPS_PROXY are not supported. Please contact support');
return e.default.spawn(s, [
...o
return (P = l(function*({ port: r }) {
let [s, o, ...a] = process.argv, c = yield (0, i.getCypressCLIBinPath)();
if ((0, u.debug)('Running cypress from %s', c, ...a), process.env.HTTP_PROXY || process.env.HTTPS_PROXY) throw Error('HTTP_PROXY and HTTPS_PROXY are not supported. Please report this issue.');
if (process.env.NODE_EXTRA_CA_CERTS) throw Error('NODE_EXTRA_CA_CERTS is not supported. Please report this issue.');
let l = n.default.resolve(__dirname, './cert/ca.crt');
if (!t.default.existsSync(l)) throw Error('Certificate not found. Please report this issue.');
return e.default.spawn(c, [
...a
], {
stdio: 'inherit',
env: l({}, process.env, {
HTTP_PROXY: `http://127.0.0.1:${t}`
env: p({}, process.env, {
HTTP_PROXY: `http://127.0.0.1:${r}`,
NODE_EXTRA_CA_CERTS: n.default.resolve(__dirname, './cert/ca.crt')
})

@@ -103,0 +107,0 @@ });

{
"name": "cy2",
"version": "4.0.0-beta.0",
"version": "4.0.0-beta.1",
"author": "Andrew Goldis",

@@ -13,3 +13,3 @@ "main": "./dist",

"scripts": {
"build": "run-s tsc swc",
"build": "run-s tsc swc && cp -a ./cert ./dist",
"dev": "run-p watch:*",

@@ -16,0 +16,0 @@ "test": "jest",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc