Fully remove when.js dependency

This commit is contained in:
Nick O'Leary
2020-11-30 14:38:48 +00:00
parent beccdac717
commit 5992ed1fab
49 changed files with 299 additions and 357 deletions

View File

@@ -17,7 +17,6 @@
var apiUtils = require("../util");
var fs = require('fs');
var fspath = require('path');
var when = require('when');
var runtimeAPI;

View File

@@ -28,7 +28,6 @@ var express = require("express");
var bodyParser = require("body-parser");
var util = require('util');
var passport = require('passport');
var when = require('when');
var cors = require('cors');
var auth = require("./auth");
@@ -111,11 +110,9 @@ function init(settings,_server,storage,runtimeAPI) {
* @return {Promise} resolves when the application is ready to handle requests
* @memberof @node-red/editor-api
*/
function start() {
async function start() {
if (editor) {
return editor.start();
} else {
return when.resolve();
}
}
@@ -124,11 +121,10 @@ function start() {
* @return {Promise} resolves when the application is stopped
* @memberof @node-red/editor-api
*/
function stop() {
async function stop() {
if (editor) {
editor.stop();
}
return when.resolve();
}
module.exports = {
init: init,

View File

@@ -32,7 +32,6 @@
"passport-http-bearer": "1.0.1",
"passport-oauth2-client-password": "0.1.2",
"passport": "0.4.1",
"when": "3.7.8",
"ws": "6.2.1"
},
"optionalDependencies": {