diff --git a/CHANGELOG.md b/CHANGELOG.md index 28f11c2db..b7b75d30f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,39 @@ +#### 1.0.3: Maintenance Release + +Runtime + - Increase timeouts in Subflow tests to minimise false positives + - Update grunt-sass and add node-sass for node12 support + - Fix timings of Delay node tests + - #2340 Update JSONata to 1.7.0 + - Bump https-proxy-agent version + - #2332 Fix error handling of nodes with multiple input handlers + - Add script to generate npm publish script + - #2371 Ensure folder is present before write (e.g. flows file not in user folder) + - #2371 Handle windows UNC '\\' paths + - #2366 Handle logging of non-JSON encodable objects + +Editor + - #2328 Fix language handling in subflow node + - Use default language if lng param not set in i18n req + - #2326 Fix palette editor search visualization + - #2375 Subflow status not showing i18n version of contained core nodes status + - Fix inverse of 'replace' editor event + - #2376 Fallback to base language files if present + - #2373 Support UI testing on the latest Google Chrome + - #2364 Add tooltip to expand button in markdown editor + - #2363 Support ctrl key to select tabs for Windows + - #2356 Make JSONata help initially shown in expression editor + - #2355 Prohibit line break in type menu of typedInput + +Nodes + - Delay: Fix delay to not pass through .reset and .flush props consistently + - #2352 File: Using the ‘a msg per line’ the last line does not get msg.topic passed + - #2339 HTTP Request: Check auth type on opening + - HTTP Request: add units info + - #2372 MQTT/WS: Improved proxy support for MQTT and WebSocket nodes + - #2370 MQTT: Add clarification that MQTT Out requires payload to send msg + + #### 1.0.2: Maintenance Release Runtime diff --git a/Gruntfile.js b/Gruntfile.js index 28f510e50..a6e896b9e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -16,6 +16,7 @@ var path = require("path"); var fs = require("fs-extra"); +var sass = require("node-sass"); module.exports = function(grunt) { @@ -220,6 +221,7 @@ module.exports = function(grunt) { sass: { build: { options: { + implementation: sass, outputStyle: 'compressed' }, files: [{ diff --git a/package.json b/package.json index 8d2ac8a4c..b0b30df07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red", - "version": "1.0.2", + "version": "1.0.3", "description": "Low-code programming for event-driven applications", "homepage": "http://nodered.org", "license": "Apache-2.0", @@ -34,20 +34,20 @@ "cookie": "0.4.0", "cookie-parser": "1.4.4", "cors": "2.8.5", - "cron": "1.7.1", + "cron": "1.7.2", "denque": "1.4.1", "express": "4.17.1", - "express-session": "1.16.2", + "express-session": "1.17.0", "fs-extra": "8.1.0", "fs.notify": "0.0.4", "hash-sum": "2.0.0", - "https-proxy-agent": "2.2.2", + "https-proxy-agent": "2.2.4", "i18next": "15.1.2", "iconv-lite": "0.5.0", "is-utf8": "0.2.1", "js-yaml": "3.13.1", "json-stringify-safe": "5.0.1", - "jsonata": "1.6.5", + "jsonata": "1.7.0", "media-typer": "1.1.0", "memorystore": "1.6.1", "mime": "2.4.4", @@ -66,10 +66,10 @@ "raw-body": "2.4.1", "request": "2.88.0", "semver": "6.3.0", - "uglify-js": "3.6.0", + "uglify-js": "3.6.9", "when": "3.7.8", "ws": "6.2.1", - "xml2js": "0.4.19" + "xml2js": "0.4.22" }, "optionalDependencies": { "bcrypt": "3.0.6" @@ -93,19 +93,20 @@ "grunt-mocha-istanbul": "5.0.2", "grunt-nodemon": "~0.4.2", "grunt-npm-command": "~0.1.2", - "grunt-sass": "~2.0.0", + "grunt-sass": "~3.1.0", "grunt-simple-mocha": "~0.4.1", - "http-proxy": "^1.16.2", + "http-proxy": "1.18.0", "istanbul": "0.4.5", + "jsdoc-nr-template": "github:node-red/jsdoc-nr-template", "minami": "1.2.3", "mocha": "^5.2.0", "mosca": "^2.8.3", + "node-red-node-test-helper": "^0.2.3", + "node-sass": "^4.13.0", "should": "^8.4.0", "sinon": "1.17.7", "stoppable": "^1.1.0", - "supertest": "3.4.2", - "node-red-node-test-helper": "^0.2.3", - "jsdoc-nr-template": "node-red/jsdoc-nr-template" + "supertest": "3.4.2" }, "engines": { "node": ">=8" diff --git a/packages/node_modules/@node-red/editor-api/lib/admin/nodes.js b/packages/node_modules/@node-red/editor-api/lib/admin/nodes.js index 2787a5c36..b78de9d75 100644 --- a/packages/node_modules/@node-red/editor-api/lib/admin/nodes.js +++ b/packages/node_modules/@node-red/editor-api/lib/admin/nodes.js @@ -44,6 +44,7 @@ module.exports = { user: req.user, module: req.body.module, version: req.body.version, + url: req.body.url, req: apiUtils.getRequestLogObject(req) } runtimeAPI.nodes.addModule(opts).then(function(info) { diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/locales.js b/packages/node_modules/@node-red/editor-api/lib/editor/locales.js index 5e10647e7..a7f300cd3 100644 --- a/packages/node_modules/@node-red/editor-api/lib/editor/locales.js +++ b/packages/node_modules/@node-red/editor-api/lib/editor/locales.js @@ -15,7 +15,7 @@ **/ var fs = require('fs'); var path = require('path'); -//var apiUtil = require('../util'); +// var apiUtil = require('../util'); var i18n = require("@node-red/util").i18n; // TODO: separate module @@ -41,7 +41,7 @@ module.exports = { var namespace = req.params[0]; var lngs = req.query.lng; namespace = namespace.replace(/\.json$/,""); - var lang = req.query.lng; //apiUtil.determineLangFromHeaders(req.acceptsLanguages() || []); + var lang = req.query.lng || i18n.defaultLang; //apiUtil.determineLangFromHeaders(req.acceptsLanguages() || []); var prevLang = i18n.i.language; // Trigger a load from disk of the language if it is not the default i18n.i.changeLanguage(lang, function(){ diff --git a/packages/node_modules/@node-red/editor-api/lib/index.js b/packages/node_modules/@node-red/editor-api/lib/index.js index 10c9912ed..0dc06ab71 100644 --- a/packages/node_modules/@node-red/editor-api/lib/index.js +++ b/packages/node_modules/@node-red/editor-api/lib/index.js @@ -42,7 +42,7 @@ var editor; /** * Initialise the module. * @param {Object} settings The runtime settings - * @param {HTTPServer} server An instance of HTTP Server + * @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 diff --git a/packages/node_modules/@node-red/editor-api/package.json b/packages/node_modules/@node-red/editor-api/package.json index ac86c1f9b..824f4df5b 100644 --- a/packages/node_modules/@node-red/editor-api/package.json +++ b/packages/node_modules/@node-red/editor-api/package.json @@ -1,6 +1,6 @@ { "name": "@node-red/editor-api", - "version": "1.0.2", + "version": "1.0.3", "license": "Apache-2.0", "main": "./lib/index.js", "repository": { @@ -16,13 +16,13 @@ } ], "dependencies": { - "@node-red/util": "1.0.2", - "@node-red/editor-client": "1.0.2", + "@node-red/util": "1.0.3", + "@node-red/editor-client": "1.0.3", "bcryptjs": "2.4.3", "body-parser": "1.19.0", "clone": "2.1.2", "cors": "2.8.5", - "express-session": "1.16.2", + "express-session": "1.17.0", "express": "4.17.1", "memorystore": "1.6.1", "mime": "2.4.4", diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json index fa347e6ea..72af1d38b 100755 --- a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json @@ -15,6 +15,17 @@ "next": "Next", "clone": "Clone project", "cont": "Continue" + }, + "type": { + "string": "string", + "number": "number", + "boolean": "boolean", + "array": "array", + "buffer": "buffer", + "object": "object", + "jsonString": "JSON string", + "undefined": "undefined", + "null": "null" } }, "workspace": { @@ -792,10 +803,14 @@ "copyPath": "Copy path to item", "expandItems": "Expand items", "collapseItems": "Collapse items", - "duplicate": "Duplicate" + "duplicate": "Duplicate", + "error": { + "invalidJSON": "Invalid JSON: " + } }, "markdownEditor": { "title": "Markdown editor", + "expand": "Expand", "format": "Formatted with markdown", "heading1": "Heading 1", "heading2": "Heading 2", diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/jsonata.json b/packages/node_modules/@node-red/editor-client/locales/en-US/jsonata.json index 9c33e8d6d..8f516a289 100755 --- a/packages/node_modules/@node-red/editor-client/locales/en-US/jsonata.json +++ b/packages/node_modules/@node-red/editor-client/locales/en-US/jsonata.json @@ -1,7 +1,7 @@ { "$string": { - "args": "arg", - "desc": "Casts the *arg* parameter to a string using the following casting rules:\n\n - Strings are unchanged\n - Functions are converted to an empty string\n - Numeric infinity and NaN throw an error because they cannot be represented as a JSON number\n - All other values are converted to a JSON string using the `JSON.stringify` function" + "args": "arg[, prettify]", + "desc": "Casts the `arg` parameter to a string using the following casting rules:\n\n - Strings are unchanged\n - Functions are converted to an empty string\n - Numeric infinity and NaN throw an error because they cannot be represented as a JSON number\n - All other values are converted to a JSON string using the `JSON.stringify` function. If `prettify` is true, then \"prettified\" JSON is produced. i.e One line per field and lines will be indented based on the field depth." }, "$length": { "args": "str", @@ -185,7 +185,7 @@ }, "$reduce": { "args":"array, function [, init]", - "desc":"Returns an aggregated value derived from applying the `function` parameter successively to each value in `array` in combination with the result of the previous application of the function.\n\nThe function must accept two arguments, and behaves like an infix operator between each value within the `array`.\n\nThe optional `init` parameter is used as the initial value in the aggregation." + "desc":"Returns an aggregated value derived from applying the `function` parameter successively to each value in `array` in combination with the result of the previous application of the function.\n\nThe function must accept two arguments, and behaves like an infix operator between each value within the `array`. The signature of `function` must be of the form: `myfunc($accumulator, $value[, $index[, $array]])`\n\nThe optional `init` parameter is used as the initial value in the aggregation." }, "$flowContext": { "args": "string[, string]", @@ -230,6 +230,37 @@ "$parseInteger": { "args": "string, picture", "desc": "Parses the contents of the `string` parameter to an integer (as a JSON number) using the format specified by the `picture` string. The `picture` string parameter has the same format as `$formatInteger`." - + }, + "$error": { + "args": "[str]", + "desc": "Throws an error with a message. The optional `str` will replace the default message of `$error() function evaluated`" + }, + "$assert": { + "args": "arg, str", + "desc": "If `arg` is true the function returns undefined. If `arg` is false an exception is thrown with `str` as the message of the exception." + }, + "$single": { + "args": "array, function", + "desc": "Returns the one and only value in the `array` parameter that satisfies the `function` predicate (i.e. the `function` returns Boolean `true` when passed the value). Throws an exception if the number of matching values is not exactly one.\n\nThe function should be supplied in the following signature: `function(value [, index [, array]])` where value is each input of the array, index is the position of that value and the whole array is passed as the third argument" + }, + "$encodeUrl": { + "args": "str", + "desc": "Encodes a Uniform Resource Locator (URL) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.\n\nExample: `$encodeUrlComponent(\"?x=test\")` => `\"%3Fx%3Dtest\"`" + }, + "$encodeUrlComponent": { + "args": "str", + "desc": "Encodes a Uniform Resource Locator (URL) by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character. \n\nExample: `$encodeUrl(\"https://mozilla.org/?x=шеллы\")` => `\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\"`" + }, + "$decodeUrl": { + "args": "str", + "desc": "Decodes a Uniform Resource Locator (URL) component previously created by encodeUrlComponent. \n\nExample: `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`" + }, + "$decodeUrlComponent": { + "args": "str", + "desc": "Decodes a Uniform Resource Locator (URL) previously created by encodeUrl. \n\nExample: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`" + }, + "$distinct": { + "args": "array", + "desc": "Returns an array with duplicate values removed from `array`" } } diff --git a/packages/node_modules/@node-red/editor-client/locales/ja/editor.json b/packages/node_modules/@node-red/editor-client/locales/ja/editor.json index a6aab331d..8290ca1c1 100755 --- a/packages/node_modules/@node-red/editor-client/locales/ja/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/ja/editor.json @@ -15,6 +15,17 @@ "next": "進む", "clone": "プロジェクトをクローン", "cont": "続ける" + }, + "type": { + "string": "文字列", + "number": "数値", + "boolean": "真偽値", + "array": "配列", + "buffer": "バッファ", + "object": "オブジェクト", + "jsonString": "JSON文字列", + "undefined": "undefined", + "null": "null" } }, "workspace": { @@ -791,10 +802,14 @@ "copyPath": "要素のパスをコピー", "expandItems": "要素を展開", "collapseItems": "要素を折り畳む", - "duplicate": "複製" + "duplicate": "複製", + "error": { + "invalidJSON": "不正なJSON: " + } }, "markdownEditor": { "title": "マークダウンエディタ", + "expand": "拡大", "format": "マークダウン形式で記述", "heading1": "見出しレベル1", "heading2": "見出しレベル2", diff --git a/packages/node_modules/@node-red/editor-client/locales/ja/jsonata.json b/packages/node_modules/@node-red/editor-client/locales/ja/jsonata.json index 14cadfecf..ba873c448 100755 --- a/packages/node_modules/@node-red/editor-client/locales/ja/jsonata.json +++ b/packages/node_modules/@node-red/editor-client/locales/ja/jsonata.json @@ -1,7 +1,7 @@ { "$string": { - "args": "arg", - "desc": "以下の型変換ルールを用いて、引数 *arg* を文字列へ型変換します。:\n\n - 文字列は変換しません。\n - 関数は空の文字列に変換します。\n - JSONの数値として表現できないため、無限大やNaNはエラーになります。\n - 他の値は `JSON.stringify` 関数を用いて、JSONの文字列へ変換します。" + "args": "arg[, prettify]", + "desc": "以下の型変換ルールを用いて、引数 *arg* を文字列へ型変換します。:\n\n - 文字列は変換しません。\n - 関数は空の文字列に変換します。\n - JSONの数値として表現できないため、無限大やNaNはエラーになります。\n - 他の値は `JSON.stringify` 関数を用いて、JSONの文字列へ変換します。`prettify`が真の場合、JSONを整形出力します。フィールドを1行毎に出力。フィールドのネスト深さによってインデントを行います。" }, "$length": { "args": "str", @@ -185,7 +185,7 @@ }, "$reduce": { "args": "array, function [, init]", - "desc": "配列の各要素値に関数 `function` を連続的に適用して得られる集約値を返します。 `function` の適用の際には、直前の `function` の適用結果と要素値が引数として与えられます。\n\n関数 `function` は引数を2つ取り、配列の各要素の間に配置する中置演算子のように作用しなくてはなりません。\n\n任意の引数 `init` には、集約時の初期値を設定します。" + "desc": "配列の各要素値に関数 `function` を連続的に適用して得られる集約値を返します。 `function` の適用の際には、直前の `function` の適用結果と要素値が引数として与えられます。\n\n関数 `function` は引数を2つ取り、配列の各要素の間に配置する中置演算子のように作用しなくてはなりません。関数`function`のシグネチャは`myfunc($accumulator, $value[, $index[, $array]])`という形式でなければなりません。\n\n任意の引数 `init` には、集約時の初期値を設定します。" }, "$flowContext": { "args": "string", @@ -230,5 +230,37 @@ "$parseInteger": { "args": "string, picture", "desc": "`picture`文字列の指定に従って、`string`パラメータを整数(JSON数値)に変換します。`picture`文字列は`$formatInteger`と同じ形式です。" + }, + "$error": { + "args": "[str]", + "desc": "メッセージを指定して例外を送出します。メッセージ`str`を省略した場合は`$error() function evaluated`をメッセージとします。" + }, + "$assert": { + "args": "arg, str", + "desc": "`arg`が真の場合、undefinedを返します。偽の場合、`str`をメッセージとする例外を送出します。" + }, + "$single": { + "args": "array, function", + "desc": "`array`の要素のうち、条件判定関数`function`を満たす(`function`に与えた場合に真偽値`true`を返す)要素が1つのみである場合、それを返します。マッチする要素が1つのみでない場合、例外を送出します。\n\n指定する関数は`function(value [, index [, array]])`というシグネチャでなければなりません。ここで、`value`は`array`の要素値、`index`は要素の添字、第三引数には配列全体を渡します。" + }, + "$encodeUrl": { + "args": "str", + "desc": "Uniform Resource Locator (URL)を構成する文字を1、2、3、もしくは、4文字エスケープシーケンスのUTF-8文字エンコーディングで置換します。\n\n例: `$encodeUrlComponent(\"?x=test\")` => `\"%3Fx%3Dtest\"`" + }, + "$encodeUrlComponent": { + "args": "str", + "desc": "Uniform Resource Locator (URL)要素を構成する文字を1、2、3、もしくは、4文字エスケープシーケンスのUTF-8文字エンコーディングで置換します。\n\n例: `$encodeUrl(\"https://mozilla.org/?x=шеллы\")` => `\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\"`" + }, + "$decodeUrl": { + "args": "str", + "desc": "encodeUrlComponentで置換したUniform Resource Locator (URL)をデコードします。\n\n例: `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`" + }, + "$decodeUrlComponent": { + "args": "str", + "desc": "encodeUrlで置換したUniform Resource Locator (URL)要素をデコードします。 \n\n例: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`" + }, + "$distinct": { + "args": "array", + "desc": "配列`array`から重複要素を削除した配列を返します。" } } diff --git a/packages/node_modules/@node-red/editor-client/package.json b/packages/node_modules/@node-red/editor-client/package.json index 441a19629..7f8061c6d 100644 --- a/packages/node_modules/@node-red/editor-client/package.json +++ b/packages/node_modules/@node-red/editor-client/package.json @@ -1,6 +1,6 @@ { "name": "@node-red/editor-client", - "version": "1.0.2", + "version": "1.0.3", "license": "Apache-2.0", "repository": { "type": "git", diff --git a/packages/node_modules/@node-red/editor-client/src/js/history.js b/packages/node_modules/@node-red/editor-client/src/js/history.js index db54701bb..51d0e00a0 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/history.js +++ b/packages/node_modules/@node-red/editor-client/src/js/history.js @@ -39,7 +39,7 @@ RED.history = (function() { inverseEv = { t: 'replace', config: RED.nodes.createCompleteNodeSet(), - changed: [], + changed: {}, rev: RED.nodes.version() }; RED.nodes.clear(); diff --git a/packages/node_modules/@node-red/editor-client/src/js/nodes.js b/packages/node_modules/@node-red/editor-client/src/js/nodes.js index d956684ce..5c0778fba 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/nodes.js +++ b/packages/node_modules/@node-red/editor-client/src/js/nodes.js @@ -845,7 +845,7 @@ RED.nodes = (function() { var m = /^subflow:(.+)$/.exec(newNodes[i].type); if (m) { var subflowId = m[1]; - var parent = getSubflow(newNodes[i].z || activeWorkspace); + var parent = getSubflow(activeWorkspace); if (parent) { var err; if (subflowId === parent.id) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js index 0d371e56f..249d7daa7 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js @@ -218,7 +218,7 @@ RED.tabs = (function() { var thisTab = $(this).parent(); var fireSelectionChanged = false; if (options.onselect) { - if (evt.metaKey) { + if (evt.metaKey || evt.ctrlKey) { if (thisTab.hasClass("selected")) { thisTab.removeClass("selected"); if (thisTab[0] !== currentTab[0]) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js index c3d8b1a4f..867dca967 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js @@ -2484,7 +2484,7 @@ RED.editor = (function() { editor.toolbar = customEditTypes['_markdown'].buildToolbar(toolbarRow,editor); if (options.expandable !== false) { var expandButton = $('').appendTo(editor.toolbar); - + RED.popover.tooltip(expandButton, RED._("markdownEditor.expand")); expandButton.on("click", function(e) { e.preventDefault(); var value = editor.getValue(); @@ -2558,7 +2558,7 @@ RED.editor = (function() { /** * Register a type editor. * @param {string} type - the type name - * @param {object} options - the editor definition + * @param {object} definition - the editor definition * @function * @memberof RED.editor */ diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/expression.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/expression.js index 8213d93d7..c8a93964d 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/expression.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/expression.js @@ -207,6 +207,7 @@ } expressionEditor.getSession().setValue(v||"",-1); }); + funcSelect.change(); var tabs = RED.tabs.create({ element: $("#red-ui-editor-type-expression-tabs"), diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/json.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/json.js index cce079581..7cf1c6ec7 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/json.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/json.js @@ -302,8 +302,8 @@ types:[ 'str','num','bool', {value:"null",label:"null",hasValue:false}, - {value:"array",label:"array",hasValue:false}, - {value:"object",label:"object",hasValue:false} + {value:"array",label:RED._("common.type.array"),hasValue:false}, + {value:"object",label:RED._("common.type.object"),hasValue:false} ], default: valType }); @@ -577,7 +577,7 @@ } catch(err) { rootNode = null; list.treeList('data',[{ - label: "Invalid JSON: "+err.toString() + label: RED._("jsonEditor.error.invalidJSON")+err.toString() }]); } } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js index 074a54469..8491b5b07 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js @@ -75,13 +75,16 @@ RED.palette.editor = (function() { }); }) } - function installNodeModule(id,version,callback) { + function installNodeModule(id,version,url,callback) { var requestBody = { module: id }; if (version) { requestBody.version = version; } + if (url) { + requestBody.url = url; + } $.ajax({ url:"nodes", type: "POST", @@ -622,7 +625,7 @@ RED.palette.editor = (function() { if ($(this).hasClass('disabled')) { return; } - update(entry,loadedIndex[entry.name].version,container,function(err){}); + update(entry,loadedIndex[entry.name].version,loadedIndex[entry.name].pkg_url,container,function(err){}); }) @@ -788,7 +791,7 @@ RED.palette.editor = (function() { initInstallTab(); }) - packageList = $('