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

@node-red/editor-api

Package Overview
Dependencies
Maintainers
2
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@node-red/editor-api - npm Package Compare versions

Comparing version 0.20.0-beta.3 to 0.20.0-beta.4

14

lib/auth/index.js

@@ -17,2 +17,7 @@ /**

/**
* @mixin @node-red/editor-api_auth
*/
var passport = require("passport");

@@ -48,3 +53,10 @@ var oauth2orize = require("oauth2orize");

}
/**
* Returns an Express middleware function that ensures the user making a request
* has the necessary permission.
*
* @param {String} permission - the permission required for the request, such as `flows.write`
* @return {Function} - an Express middleware
* @memberof @node-red/editor-api_auth
*/
function needsPermission(permission) {

@@ -51,0 +63,0 @@ return function(req,res,next) {

@@ -17,2 +17,12 @@ /**

/**
* This module provides an Express application to serve the Node-RED editor.
*
* It implements the Node-RED HTTP Admin API the Editor uses to interact
* with the Node-RED runtime.
*
* @namespace @node-red/editor-api
*/
var express = require("express");

@@ -32,2 +42,11 @@ var bodyParser = require("body-parser");

/**
* Initialise the module.
* @param {Object} settings The runtime settings
* @param {HTTPServer} server An instance of HTTP Server
* @param {Storage} storage An instance of Node-RED Storage
* @param {Runtime} runtimeAPI An instance of Node-RED Runtime
* @memberof @node-red/editor-api
*/
function init(settings,_server,storage,runtimeAPI) {

@@ -85,2 +104,8 @@ server = _server;

}
/**
* Start the module.
* @return {Promise} resolves when the application is ready to handle requests
* @memberof @node-red/editor-api
*/
function start() {

@@ -93,2 +118,8 @@ if (editor) {

}
/**
* Stop the module.
* @return {Promise} resolves when the application is stopped
* @memberof @node-red/editor-api
*/
function stop() {

@@ -104,6 +135,16 @@ if (editor) {

stop: stop,
/**
* @memberof @node-red/editor-api
* @mixes @node-red/editor-api_auth
*/
auth: {
needsPermission: auth.needsPermission
},
/**
* The Express app used to serve the Node-RED Editor
* @type ExpressApplication
* @memberof @node-red/editor-api
*/
get httpAdmin() { return adminApp; }
};

8

package.json
{
"name": "@node-red/editor-api",
"version": "0.20.0-beta.3",
"version": "0.20.0-beta.4",
"license": "Apache-2.0",

@@ -19,4 +19,4 @@ "main": "./lib/index.js",

"dependencies": {
"@node-red/util": "0.20.0-beta.3",
"@node-red/editor-client": "0.20.0-beta.3",
"@node-red/util": "0.20.0-beta.4",
"@node-red/editor-client": "0.20.0-beta.4",
"bcryptjs": "2.4.3",

@@ -36,4 +36,4 @@ "body-parser": "1.18.3",

"when": "3.7.8",
"ws": "6.1.2"
"ws": "6.1.3"
}
}
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