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

mockyeah-cli

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mockyeah-cli - npm Package Compare versions

Comparing version 0.18.4 to 0.19.0

fixtures/foo-use/0.json

22

bin/mockyeah-record.js

@@ -27,4 +27,6 @@ 'use strict';

.option('-o, --only <regex>', 'only record calls to URLs matching given regex pattern')
.option('-h, --use-headers', 'record headers to response options')
.option('-l, --use-latency', 'record latency to response options')
.option(
'-h, --header <line>',
'-H, --header <line>',
'record matches will require these headers ("Name: Value")',

@@ -37,2 +39,7 @@ collect,

const recordStopCallback = err => {
if (err) console.error(err);
process.exit(err ? 1 : 0);
};
const withName = (env, name, options = {}) => {

@@ -68,9 +75,6 @@ const { adminUrl } = env;

if (remote) {
request.get(`${adminUrl}/record-stop`, () => {});
request.get(`${adminUrl}/record-stop`, recordStopCallback);
} else {
// eslint-disable-next-line global-require, import/no-dynamic-require
require(env.modulePath).recordStop(err => {
if (err) console.error(err);
process.exit(err ? 1 : 0);
});
require(env.modulePath).recordStop(recordStopCallback);
}

@@ -87,3 +91,3 @@ }

const [name] = program.args;
const { only, header } = program;
const { only, header, useHeaders, useLatency } = program;

@@ -94,3 +98,5 @@ env.program = program;

only,
headers: header
headers: header,
useHeaders,
useLatency
};

@@ -97,0 +103,0 @@

{
"name": "mockyeah-cli",
"version": "0.18.4",
"version": "0.19.0",
"description": "A powerful service mocking, recording, and playback utility.",

@@ -27,3 +27,3 @@ "main": "index.js",

"devDependencies": {
"mockyeah": "^0.18.4"
"mockyeah": "^0.19.0"
},

@@ -33,3 +33,3 @@ "engines": {

},
"gitHead": "91aebe566a09d77e9a4299957bbe972b43f5f680"
"gitHead": "22fbf7bcd4f2e41d282cd9c324a150caf33ab7c2"
}
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