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

okoze

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

okoze - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

2

dist/package.json
{
"name": "okoze",
"description": "Okoze is stub server that returns a response using a snapshot of the real server's response.",
"version": "0.1.3",
"version": "0.1.4",
"repository": "https://github.com/mya-ake/okoze.git",

@@ -6,0 +6,0 @@ "bugs": {

@@ -16,3 +16,3 @@ "use strict";

app.use(bodyParser.json());
if (process.env.DEBUG === 'true') {
if (process.env.OKOZE_DEBUG === 'true') {
app.use(loggerMiddleWare_1.buildLoggerMiddleware({ baseURL }));

@@ -19,0 +19,0 @@ }

@@ -9,2 +9,3 @@ "use strict";

const object_hash_1 = __importDefault(require("object-hash"));
const consola_1 = __importDefault(require("consola"));
const file_1 = require("./../lib/file");

@@ -30,3 +31,15 @@ const createSnapshotPathname = ({ method, url, }) => {

};
const { status, data, headers: responseHeaders } = await request(axiosConfig).catch(err => err.response || {});
const { status, data, headers: responseHeaders } = await request(axiosConfig)
.then(response => {
if (process.env.OKOZE_DEBUG === 'true') {
consola_1.default.debug(response);
}
return response;
})
.catch(err => {
if (process.env.OKOZE_DEBUG === 'true') {
consola_1.default.debug(err);
}
return err.response || {};
});
await file_1.wrightFile(snapshotPathname, {

@@ -45,3 +58,3 @@ status,

exports.buildProcessor = (options) => {
const { update, origin: baseURL, snapshotDir } = options;
const { origin: baseURL, snapshotDir } = options;
const request = axios_1.default.create({

@@ -48,0 +61,0 @@ baseURL,

{
"name": "okoze",
"description": "Okoze is stub server that returns a response using a snapshot of the real server's response.",
"version": "0.1.4",
"version": "0.1.5",
"repository": "https://github.com/mya-ake/okoze.git",

@@ -6,0 +6,0 @@ "bugs": {

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