New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

moleculer-web

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moleculer-web - npm Package Compare versions

Comparing version

to
0.6.0-beta6

2

.vscode/launch.json

@@ -18,3 +18,3 @@ {

"args": [
"webpack"
"full"
]

@@ -21,0 +21,0 @@ },

@@ -0,0 +0,0 @@ /* eslint-disable no-console */

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

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

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

@@ -19,2 +19,3 @@ <a name="0.6.0"></a>

- `req.$alias` is pointed to the alias definition.
- `req.$endpoint` is pointed to the resolved action endpoint. It contains `action` and `nodeID`.

@@ -21,0 +22,0 @@ ## Middlewares

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

return new this.Promise(resolve => {
this.logger.info("async onBeforeCall in public");
this.logger.info("async onBeforeCall in public. Action:", req.$endpoint.action.name);
ctx.meta.userAgent = req.headers["user-agent"];

@@ -222,0 +222,0 @@ //ctx.meta.headers = req.headers;

@@ -0,0 +0,0 @@ let _ = require("lodash");

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

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

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

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

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

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

@@ -0,0 +0,0 @@ /*

{
"name": "moleculer-web",
"version": "0.6.0-beta5",
"version": "0.6.0-beta6",
"description": "Official API Gateway service for Moleculer framework",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -638,2 +638,4 @@ /*

.then(() => {
req.$endpoint = endpoint;
this.logger.info(` Call '${actionName}' action`);

@@ -640,0 +642,0 @@ if (this.settings.logRequestParams && this.settings.logRequestParams in this.logger)

@@ -1615,3 +1615,11 @@ "use strict";

const beforeCall = jest.fn((ctx) => {
const beforeCall = jest.fn((ctx, route, req, res) => {
expect(req.$service).toBeDefined();
expect(req.$route).toBeDefined();
expect(req.$params).toBeDefined();
expect(req.$endpoint).toBeDefined();
expect(res.$service).toBeDefined();
expect(res.$route).toBeDefined();
ctx.meta.custom = "John";

@@ -1621,2 +1629,10 @@ return Promise.resolve();

const afterCall = jest.fn((ctx, route, req, res, data) => {
expect(req.$service).toBeDefined();
expect(req.$route).toBeDefined();
expect(req.$params).toBeDefined();
expect(req.$endpoint).toBeDefined();
expect(res.$service).toBeDefined();
expect(res.$route).toBeDefined();
res.setHeader("X-Custom-Header", "working");

@@ -1623,0 +1639,0 @@ });

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet