mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	
							
								
								
									
										2
									
								
								.github/ISSUE_TEMPLATE/--bug_report.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/ISSUE_TEMPLATE/--bug_report.md
									
									
									
									
										vendored
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| --- | ||||
| name: Bug report | ||||
| about: Reproducable software issues in the core of Node-RED | ||||
| about: Reproducible software issues in the core of Node-RED | ||||
| title: '' | ||||
| labels: '' | ||||
| assignees: '' | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/PULL_REQUEST_TEMPLATE.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/PULL_REQUEST_TEMPLATE.md
									
									
									
									
										vendored
									
									
								
							| @@ -29,6 +29,6 @@ the [forum](https://discourse.nodered.org) or | ||||
| <!-- Put an `x` in the boxes that apply --> | ||||
|  | ||||
| - [ ] I have read the [contribution guidelines](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md) | ||||
| - [ ] For non-bugfix PRs, I have discussed this change on the mailing list/slack team. | ||||
| - [ ] For non-bugfix PRs, I have discussed this change on the forum/slack team. | ||||
| - [ ] I have run `grunt` to verify the unit tests pass | ||||
| - [ ] I have added suitable unit tests to cover the new/changed functionality | ||||
|   | ||||
							
								
								
									
										546
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										546
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										56
									
								
								Gruntfile.js
									
									
									
									
									
								
							
							
						
						
									
										56
									
								
								Gruntfile.js
									
									
									
									
									
								
							| @@ -16,6 +16,7 @@ | ||||
|  | ||||
| var path = require("path"); | ||||
| var fs = require("fs-extra"); | ||||
| var sass = require("node-sass"); | ||||
|  | ||||
| module.exports = function(grunt) { | ||||
|  | ||||
| @@ -25,9 +26,13 @@ module.exports = function(grunt) { | ||||
|         nodemonArgs.push(flowFile); | ||||
|     } | ||||
|  | ||||
|     var browserstack = grunt.option('browserstack'); | ||||
|     if (browserstack) { | ||||
|         process.env.BROWSERSTACK = true; | ||||
|     } | ||||
|     var nonHeadless = grunt.option('non-headless'); | ||||
|     if (nonHeadless) { | ||||
|         process.env.NODE_RED_NON_HEADLESS = 'true'; | ||||
|         process.env.NODE_RED_NON_HEADLESS = true; | ||||
|     } | ||||
|     grunt.initConfig({ | ||||
|         pkg: grunt.file.readJSON('package.json'), | ||||
| @@ -79,20 +84,20 @@ module.exports = function(grunt) { | ||||
|                 //"loopfunc": true, // allow functions to be defined in loops | ||||
|                 //"sub": true       // don't warn that foo['bar'] should be written as foo.bar | ||||
|             }, | ||||
|             all: [ | ||||
|                 'Gruntfile.js', | ||||
|                 'red.js', | ||||
|                 'packages/**/*.js' | ||||
|             ], | ||||
|             core: { | ||||
|                 files: { | ||||
|                     src: [ | ||||
|                         'Gruntfile.js', | ||||
|                         'red.js', | ||||
|                         'packages/**/*.js', | ||||
|                     ] | ||||
|                 } | ||||
|             }, | ||||
|             // all: [ | ||||
|             //     'Gruntfile.js', | ||||
|             //     'red.js', | ||||
|             //     'packages/**/*.js' | ||||
|             // ], | ||||
|             // core: { | ||||
|             //     files: { | ||||
|             //         src: [ | ||||
|             //             'Gruntfile.js', | ||||
|             //             'red.js', | ||||
|             //             'packages/**/*.js', | ||||
|             //         ] | ||||
|             //     } | ||||
|             // }, | ||||
|             nodes: { | ||||
|                 files: { | ||||
|                     src: [ 'nodes/core/*/*.js' ] | ||||
| @@ -100,7 +105,7 @@ module.exports = function(grunt) { | ||||
|             }, | ||||
|             editor: { | ||||
|                 files: { | ||||
|                     src: [ 'editor/js/**/*.js' ] | ||||
|                     src: [ 'packages/node_modules/@node-red/editor-client/src/js/**/*.js' ] | ||||
|                 } | ||||
|             }, | ||||
|             tests: { | ||||
| @@ -188,7 +193,8 @@ module.exports = function(grunt) { | ||||
|                         "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-migrate-3.0.1.min.js", | ||||
|                         "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-ui.min.js", | ||||
|                         "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery.ui.touch-punch.min.js", | ||||
|                         "packages/node_modules/@node-red/editor-client/src/vendor/marked/marked.min.js", | ||||
|                         "node_modules/marked/marked.min.js", | ||||
|                         "node_modules/dompurify/dist/purify.min.js", | ||||
|                         "packages/node_modules/@node-red/editor-client/src/vendor/d3/d3.v3.min.js", | ||||
|                         "packages/node_modules/@node-red/editor-client/src/vendor/i18next/i18next.min.js", | ||||
|                         "node_modules/jsonata/jsonata-es5.min.js", | ||||
| @@ -220,6 +226,7 @@ module.exports = function(grunt) { | ||||
|         sass: { | ||||
|             build: { | ||||
|                 options: { | ||||
|                     implementation: sass, | ||||
|                     outputStyle: 'compressed' | ||||
|                 }, | ||||
|                 files: [{ | ||||
| @@ -562,7 +569,20 @@ module.exports = function(grunt) { | ||||
|             return false; | ||||
|         } | ||||
|     }); | ||||
|     grunt.registerTask('generatePublishScript', | ||||
|         'Generates a script to publish build output to npm', | ||||
|             function () { | ||||
|                 const done = this.async(); | ||||
|                 const generatePublishScript = require("./scripts/generate-publish-script.js"); | ||||
|                 generatePublishScript().then(function(output) { | ||||
|                     grunt.log.writeln(output); | ||||
|  | ||||
|                     const filePath = path.join(grunt.config.get('paths.dist'),"modules","publish.sh"); | ||||
|                     grunt.file.write(filePath,output); | ||||
|  | ||||
|                     done(); | ||||
|                 }); | ||||
|             }); | ||||
|     grunt.registerTask('setDevEnv', | ||||
|         'Sets NODE_ENV=development so non-minified assets are used', | ||||
|             function () { | ||||
| @@ -605,7 +625,7 @@ module.exports = function(grunt) { | ||||
|  | ||||
|     grunt.registerTask('release', | ||||
|         'Create distribution zip file', | ||||
|         ['build','verifyPackageDependencies','clean:release','mkdir:release','chmod:release','compress:release','pack-modules']); | ||||
|         ['build','verifyPackageDependencies','clean:release','mkdir:release','chmod:release','compress:release','pack-modules','generatePublishScript']); | ||||
|  | ||||
|     grunt.registerTask('pack-modules', | ||||
|         'Create module pack files for release', | ||||
|   | ||||
							
								
								
									
										43
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										43
									
								
								package.json
									
									
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|     "name": "node-red", | ||||
|     "version": "1.0.1", | ||||
|     "version": "1.0.4", | ||||
|     "description": "Low-code programming for event-driven applications", | ||||
|     "homepage": "http://nodered.org", | ||||
|     "license": "Apache-2.0", | ||||
| @@ -24,7 +24,7 @@ | ||||
|         } | ||||
|     ], | ||||
|     "dependencies": { | ||||
|         "ajv": "6.10.2", | ||||
|         "ajv": "6.12.0", | ||||
|         "basic-auth": "2.0.1", | ||||
|         "bcryptjs": "2.4.3", | ||||
|         "body-parser": "1.19.0", | ||||
| @@ -34,47 +34,49 @@ | ||||
|         "cookie": "0.4.0", | ||||
|         "cookie-parser": "1.4.4", | ||||
|         "cors": "2.8.5", | ||||
|         "cron": "1.7.1", | ||||
|         "cron": "1.8.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": "5.0.0", | ||||
|         "i18next": "15.1.2", | ||||
|         "iconv-lite": "0.5.0", | ||||
|         "iconv-lite": "0.5.1", | ||||
|         "is-utf8": "0.2.1", | ||||
|         "js-yaml": "3.13.1", | ||||
|         "json-stringify-safe": "5.0.1", | ||||
|         "jsonata": "1.6.5", | ||||
|         "jsonata": "1.8.1", | ||||
|         "media-typer": "1.1.0", | ||||
|         "memorystore": "1.6.1", | ||||
|         "memorystore": "1.6.2", | ||||
|         "mime": "2.4.4", | ||||
|         "mqtt": "2.18.8", | ||||
|         "multer": "1.4.2", | ||||
|         "mustache": "3.0.2", | ||||
|         "node-red-node-rbe": "^0.2.5", | ||||
|         "node-red-node-sentiment": "^0.1.4", | ||||
|         "node-red-node-tail": "^0.0.3", | ||||
|         "mustache": "4.0.0", | ||||
|         "node-red-node-rbe": "^0.2.6", | ||||
|         "node-red-node-sentiment": "^0.1.6", | ||||
|         "node-red-node-tail": "^0.1.0", | ||||
|         "nopt": "4.0.1", | ||||
|         "oauth2orize": "1.11.0", | ||||
|         "on-headers": "1.0.2", | ||||
|         "passport": "0.4.0", | ||||
|         "passport": "0.4.1", | ||||
|         "passport-http-bearer": "1.0.1", | ||||
|         "passport-oauth2-client-password": "0.1.2", | ||||
|         "raw-body": "2.4.1", | ||||
|         "request": "2.88.0", | ||||
|         "semver": "6.3.0", | ||||
|         "uglify-js": "3.6.0", | ||||
|         "uglify-js": "3.8.0", | ||||
|         "when": "3.7.8", | ||||
|         "ws": "6.2.1", | ||||
|         "xml2js": "0.4.19" | ||||
|         "xml2js": "0.4.23" | ||||
|     }, | ||||
|     "optionalDependencies": { | ||||
|         "bcrypt": "3.0.6" | ||||
|     }, | ||||
|     "devDependencies": { | ||||
|         "marked": "0.8.0", | ||||
|         "dompurify": "2.0.8", | ||||
|         "grunt": "~1.0.4", | ||||
|         "grunt-chmod": "~1.1.1", | ||||
|         "grunt-cli": "~1.3.2", | ||||
| @@ -93,19 +95,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.1", | ||||
|         "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" | ||||
|   | ||||
| @@ -100,7 +100,10 @@ function login(req,res) { | ||||
|             } | ||||
|         } else if (mergedAdminAuth.type === "strategy") { | ||||
|  | ||||
|             var urlPrefix = (settings.httpAdminRoot==='/')?"":settings.httpAdminRoot; | ||||
|             var urlPrefix = (settings.httpAdminRoot||"").replace(/\/$/,""); | ||||
|             if (urlPrefix.length > 0) { | ||||
|                 urlPrefix += "/"; | ||||
|             } | ||||
|             response = { | ||||
|                 "type":"strategy", | ||||
|                 "prompts":[{type:"button",label:mergedAdminAuth.strategy.label, url: urlPrefix + "auth/strategy"}] | ||||
|   | ||||
| @@ -88,13 +88,13 @@ module.exports = { | ||||
|             // Locales | ||||
|             var locales = require("./locales"); | ||||
|             locales.init(runtimeAPI); | ||||
|             editorApp.get(/locales\/(.+)\/?$/,locales.get,apiUtil.errorHandler); | ||||
|             editorApp.get(/^\/locales\/(.+)\/?$/,locales.get,apiUtil.errorHandler); | ||||
|  | ||||
|             // Library | ||||
|             var library = require("./library"); | ||||
|             library.init(runtimeAPI); | ||||
|             editorApp.get(/library\/([^\/]+)\/([^\/]+)(?:$|\/(.*))/,needsPermission("library.read"),library.getEntry); | ||||
|             editorApp.post(/library\/([^\/]+)\/([^\/]+)\/(.*)/,needsPermission("library.write"),library.saveEntry); | ||||
|             editorApp.get(/^\/library\/([^\/]+)\/([^\/]+)(?:$|\/(.*))/,needsPermission("library.read"),library.getEntry); | ||||
|             editorApp.post(/^\/library\/([^\/]+)\/([^\/]+)\/(.*)/,needsPermission("library.write"),library.saveEntry); | ||||
|  | ||||
|  | ||||
|             // Credentials | ||||
|   | ||||
| @@ -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(){ | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|     "name": "@node-red/editor-api", | ||||
|     "version": "1.0.1", | ||||
|     "version": "1.0.4", | ||||
|     "license": "Apache-2.0", | ||||
|     "main": "./lib/index.js", | ||||
|     "repository": { | ||||
| @@ -16,21 +16,21 @@ | ||||
|         } | ||||
|     ], | ||||
|     "dependencies": { | ||||
|         "@node-red/util": "1.0.1", | ||||
|         "@node-red/editor-client": "1.0.1", | ||||
|         "@node-red/util": "1.0.4", | ||||
|         "@node-red/editor-client": "1.0.4", | ||||
|         "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", | ||||
|         "memorystore": "1.6.2", | ||||
|         "mime": "2.4.4", | ||||
|         "mustache": "3.0.2", | ||||
|         "mustache": "4.0.0", | ||||
|         "oauth2orize": "1.11.0", | ||||
|         "passport-http-bearer": "1.0.1", | ||||
|         "passport-oauth2-client-password": "0.1.2", | ||||
|         "passport": "0.4.0", | ||||
|         "passport": "0.4.1", | ||||
|         "when": "3.7.8", | ||||
|         "ws": "6.2.1" | ||||
|     }, | ||||
|   | ||||
| @@ -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", | ||||
| @@ -993,6 +1008,7 @@ | ||||
|         "en-US": "English", | ||||
|         "ja": "Japanese", | ||||
|         "ko": "Korean", | ||||
|         "zh-CN": "Chinese(Simplified)" | ||||
|         "zh-CN": "Chinese(Simplified)", | ||||
|         "zh-TW": "Chinese(Traditional)" | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -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,41 @@ | ||||
|     "$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`" | ||||
|     }, | ||||
|     "$type": { | ||||
|         "args": "value", | ||||
|         "desc": "Returns the type of `value` as a string. If `value` is undefined, this will return `undefined`" | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -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", | ||||
| @@ -955,7 +970,7 @@ | ||||
|             "confirm": "<p>デプロイされていない変更は失われます。</p><p>続けますか?</p>" | ||||
|         }, | ||||
|         "send-req": { | ||||
|             "auth-req": "リポジトリ対する認証が必要です", | ||||
|             "auth-req": "リポジトリに対する認証が必要です", | ||||
|             "username": "ユーザ名", | ||||
|             "password": "パスワード", | ||||
|             "passphrase": "パスフレーズ", | ||||
| @@ -992,6 +1007,7 @@ | ||||
|         "en-US": "英語", | ||||
|         "ja": "日本語", | ||||
|         "ko": "韓国語", | ||||
|         "zh-CN": "中国語(簡体)" | ||||
|         "zh-CN": "中国語(簡体)", | ||||
|         "zh-TW": "中国語(繁体)" | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -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,41 @@ | ||||
|     "$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`から重複要素を削除した配列を返します。" | ||||
|     }, | ||||
|     "$type": { | ||||
|         "args": "value", | ||||
|         "desc": "`value` の型を文字列として返します。もし `value` が未定義の場合、 `undefined` が返されます。" | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -10,7 +10,22 @@ | ||||
|             "load": "读取", | ||||
|             "save": "保存", | ||||
|             "import": "导入", | ||||
|             "export": "导出" | ||||
|             "export": "导出", | ||||
|             "back": "后退", | ||||
|             "next": "下一个", | ||||
|             "clone": "克隆项目", | ||||
|             "cont": "继续" | ||||
|         }, | ||||
|         "type": { | ||||
|             "string": "字符串", | ||||
|             "number": "数字", | ||||
|             "boolean": "布尔值", | ||||
|             "array": "数组", | ||||
|             "buffer": "buffer", | ||||
|             "object": "对象", | ||||
|             "jsonString": "JSON字符串", | ||||
|             "undefined": "未定义", | ||||
|             "null": "空" | ||||
|         } | ||||
|     }, | ||||
|     "workspace": { | ||||
| @@ -19,10 +34,13 @@ | ||||
|         "confirmDelete": "确认删除", | ||||
|         "delete": "你确定想删除 '__label__'?", | ||||
|         "dropFlowHere": "把流程放到这里", | ||||
|         "addFlow": "添加流程", | ||||
|         "listFlows": "流程一览", | ||||
|         "status": "状态", | ||||
|         "enabled": "有效", | ||||
|         "disabled": "无效", | ||||
|         "info": "详细描述" | ||||
|         "info": "详细描述", | ||||
|         "selectNodes": "点击节点来选择" | ||||
|     }, | ||||
|     "menu": { | ||||
|         "label": { | ||||
| @@ -36,11 +54,16 @@ | ||||
|                 "defaultDir": "默认方向", | ||||
|                 "ltr": "从左到右", | ||||
|                 "rtl": "从右到左", | ||||
|                 "auto": "上下文" | ||||
|                 "auto": "上下文", | ||||
|                 "language": "语言", | ||||
|                 "browserDefault": "浏览器默认" | ||||
|             }, | ||||
|             "sidebar": { | ||||
|                 "show": "显示侧边栏" | ||||
|             }, | ||||
|             "palette": { | ||||
|                 "show": "显示控制板" | ||||
|             }, | ||||
|             "settings": "设置", | ||||
|             "userSettings": "用户设置", | ||||
|             "nodes": "节点", | ||||
| @@ -60,11 +83,23 @@ | ||||
|             "keyboardShortcuts": "键盘快捷方式", | ||||
|             "login": "登陆", | ||||
|             "logout": "退出", | ||||
|             "editPalette":"节点管理", | ||||
|             "editPalette": "节点管理", | ||||
|             "other": "其他", | ||||
|             "showTips": "显示小提示" | ||||
|             "showTips": "显示小提示", | ||||
|             "help": "Node-RED网页", | ||||
|             "projects": "项目", | ||||
|             "projects-new": "新建", | ||||
|             "projects-open": "打开", | ||||
|             "projects-settings": "项目设定", | ||||
|             "showNodeLabelDefault": "显示新添加的节点的标签" | ||||
|         } | ||||
|     }, | ||||
|     "actions": { | ||||
|         "toggle-navigator": "切换导航器", | ||||
|         "zoom-out": "缩小", | ||||
|         "zoom-reset": "重设缩放", | ||||
|         "zoom-in": "放大" | ||||
|     }, | ||||
|     "user": { | ||||
|         "loggedInAs": "作为__name__登陆", | ||||
|         "username": "账号", | ||||
| @@ -82,29 +117,73 @@ | ||||
|         "warning": "<strong>警告</strong>: __message__", | ||||
|         "warnings": { | ||||
|             "undeployedChanges": "节点中存在未部署的更改", | ||||
|             "nodeActionDisabled": "节点操作已禁用", | ||||
|             "nodeActionDisabledSubflow": "节点动作在子流程中被禁用", | ||||
|             "missing-types": "流程由于缺少节点类型而停止。请检查日志的详细信息", | ||||
|             "restartRequired": "Node-RED必须重新启动,以启用升级的模块" | ||||
|             "safe-mode": "<p>流程以安全模式停止。</p><p>您可以修改流程并部署更改以重新启动。</p>", | ||||
|             "restartRequired": "Node-RED必须重新启动,以启用升级的模块", | ||||
|             "credentials_load_failed": "<p>由于无法解密凭据,因此流程停止。</p><p>流程凭据文件已加密,但是项目的加密密钥丢失或无效。</p>", | ||||
|             "credentials_load_failed_reset": "<p>凭据无法解密</p><p>流凭据文件已加密,但是项目的加密密钥丢失或无效。</p><p>流凭据文件将在下一次部署时重置。任何现有的流凭证将被清除。</p>", | ||||
|             "missing_flow_file": "<p>找不到项目流程文件。</p><p>该项目未配置流程文件。</p>", | ||||
|             "missing_package_file": "<p>找不到项目包文件。</p><p>项目缺少package.json文件。</p>", | ||||
|             "project_empty": "<p>该项目为空。</p><p>是否要创建一组默认的项目文件?<br/>否则,您将必须在编辑器外部手动将文件添加到项目中。</p>", | ||||
|             "project_not_found": "<p>未找到项目'__project__'。</p>", | ||||
|             "git_merge_conflict": "<p>自动合并更改失败。</p><p>修复未合并的冲突,然后提交结果。</p>" | ||||
|         }, | ||||
|         "error": "<strong>Error</strong>: __message__", | ||||
|         "error": "<strong>错误</strong>: __message__", | ||||
|         "errors": { | ||||
|             "lostConnection": "丢失与服务器的连接,重新连接...", | ||||
|             "lostConnectionReconnect": "丢失与服务器的连接,__time__秒后重新连接", | ||||
|             "lostConnectionTry": "现在尝试", | ||||
|             "cannotAddSubflowToItself": "无法向其自身添加子流程", | ||||
|             "cannotAddCircularReference": "无法添加子流程 - 循环引用", | ||||
|             "unsupportedVersion": "您正在使用不受支持的Node.js版本<br/>请升级到最新版本的Node.js LTS" | ||||
|             "unsupportedVersion": "您正在使用不受支持的Node.js版本<br/>请升级到最新版本的Node.js LTS", | ||||
|             "failedToAppendNode": "<p>'__module__'加载失败</p><p>__error__</p>" | ||||
|         }, | ||||
|         "project": { | ||||
|             "change-branch": "转到本地分支'__project__'", | ||||
|             "merge-abort": "Git合并中止", | ||||
|             "loaded": "项目'__project__'已加载", | ||||
|             "updated": "项目'__project__'已更新", | ||||
|             "pull": "项目'__project__'已重新加载", | ||||
|             "revert": "项目 '__project__'已还原", | ||||
|             "merge-complete": "Git合并完成", | ||||
|             "setupCredentials": "设定证书", | ||||
|             "setupProjectFiles": "设置项目文件", | ||||
|             "no": "不了,谢谢", | ||||
|             "createDefault": "创建默认项目文件", | ||||
|             "mergeConflict": "显示合并冲突" | ||||
|         }, | ||||
|         "label": { | ||||
|             "manage-project-dep": "管理项目依赖性", | ||||
|             "setup-cred": "设定证书", | ||||
|             "setup-project": "设置项目文件", | ||||
|             "create-default-package": "创建默认的包文件", | ||||
|             "no-thanks": "不了,谢谢", | ||||
|             "create-default-project": "创建默认项目文件", | ||||
|             "show-merge-conflicts": "显示合并冲突" | ||||
|         } | ||||
|     }, | ||||
|     "clipboard": { | ||||
|         "clipboard": "剪贴板", | ||||
|         "nodes": "节点", | ||||
|         "node": "__count__节点", | ||||
|         "node_plural": "__count__节点", | ||||
|         "configNode": "__count__配置节点", | ||||
|         "configNode_plural": "__count__配置节点", | ||||
|         "flow": "__count__流程", | ||||
|         "flow_plural": "__count__流程", | ||||
|         "subflow": "__count__子流程", | ||||
|         "subflow_plural": "__count__子流程", | ||||
|         "pasteNodes": "在这里粘贴节点", | ||||
|         "selectFile": "选择要导入的文件", | ||||
|         "importNodes": "导入节点", | ||||
|         "exportNodes": "导出节点至剪贴板", | ||||
|         "download": "下载", | ||||
|         "importUnrecognised": "导入了无法识别的类型:", | ||||
|         "importUnrecognised_plural": "导入了无法识别的类型:", | ||||
|         "nodesExported": "节点导出到了剪贴板", | ||||
|         "nodesImported": "导入:", | ||||
|         "nodeCopied": "已复制__count__个节点", | ||||
|         "nodeCopied_plural": "已复制__count__个节点", | ||||
|         "invalidFlow": "无效的流程: __message__", | ||||
| @@ -114,11 +193,21 @@ | ||||
|             "all": "所有流程", | ||||
|             "compact": "紧凑", | ||||
|             "formatted": "已格式化", | ||||
|             "copy": "导出到剪贴板" | ||||
|             "copy": "导出到剪贴板", | ||||
|             "export": "到处到库", | ||||
|             "exportAs": "导出为", | ||||
|             "overwrite": "替换", | ||||
|             "exists": "<p><b>\"__file__\"</b>已存在</p><p>是否要替换它?</p>" | ||||
|         }, | ||||
|         "import": { | ||||
|             "import": "导入到", | ||||
|             "newFlow": "新流程" | ||||
|             "newFlow": "新流程", | ||||
|             "errors": { | ||||
|                 "notArray": "输入的不是JSON数组", | ||||
|                 "itemNotObject": "输入的流无效 - 项目__index__不是节点对象", | ||||
|                 "missingId": "输入的流无效-项 __index__ 缺少'id'属性", | ||||
|                 "missingType": "输入的流程无效-项__index__缺少'类型'属性" | ||||
|             } | ||||
|         }, | ||||
|         "copyMessagePath": "已复制路径", | ||||
|         "copyMessageValue": "已复制数值", | ||||
| @@ -132,7 +221,10 @@ | ||||
|         "modifiedFlowsDesc": "只部署包含已更改节点的流", | ||||
|         "modifiedNodes": "已更改的节点", | ||||
|         "modifiedNodesDesc": "只部署已经更改的节点", | ||||
|         "restartFlows": "重启流程", | ||||
|         "restartFlowsDesc": "重新启动当前部署的流程", | ||||
|         "successfulDeploy": "部署成功", | ||||
|         "successfulRestart": "成功重启流程", | ||||
|         "deployFailed": "部署失败: __message__", | ||||
|         "unusedConfigNodes": "您有一些未使用的配置节点", | ||||
|         "unusedConfigNodesLink": "点击此处查看它们", | ||||
| @@ -152,16 +244,24 @@ | ||||
|             "improperlyConfigured": "工作区包含一些未正确配置的节点:", | ||||
|             "unknown": "工作区包含一些未知的节点类型:", | ||||
|             "confirm": "你确定要部署吗?", | ||||
|             "doNotWarn": "不要再对此发出警告", | ||||
|             "conflict": "服务器正在运行较新的一组流程。", | ||||
|             "backgroundUpdate": "服务器上的流程已更新。", | ||||
|             "conflictChecking": "检查是否可以自动合并更改", | ||||
|             "conflictAutoMerge": "此更改不包括冲突,可以自动合并", | ||||
|             "conflictManualMerge": "这些更改包括了在部署之前必须解决的冲突。" | ||||
|             "conflictManualMerge": "这些更改包括了在部署之前必须解决的冲突。", | ||||
|             "plusNMore": "+ __count__更多" | ||||
|         } | ||||
|     }, | ||||
|     "eventLog": { | ||||
|         "title": "事件记录日志", | ||||
|         "view": "查看日志" | ||||
|     }, | ||||
|     "diff": { | ||||
|         "unresolvedCount": "__count__个未解决的冲突", | ||||
|         "unresolvedCount_plural": "__count__个未解决的冲突", | ||||
|         "globalNodes": "全局节点", | ||||
|         "flowProperties": "流程属性", | ||||
|         "type": { | ||||
|             "added": "已添加", | ||||
|             "changed": "已更改", | ||||
| @@ -175,9 +275,19 @@ | ||||
|         "nodeCount": "__count__个节点", | ||||
|         "nodeCount_plural": "__count__个节点", | ||||
|         "local": "本地", | ||||
|         "remote": "远程" | ||||
|         "remote": "远程", | ||||
|         "reviewChanges": "查看变更", | ||||
|         "noBinaryFileShowed": "无法显示二进制文件内容", | ||||
|         "viewCommitDiff": "查看提交更改", | ||||
|         "compareChanges": "比较变更", | ||||
|         "saveConflict": "保存冲突解决", | ||||
|         "conflictHeader": "已解决<span>__unresolved__</span>中的<span>__resolved__</span>个冲突", | ||||
|         "commonVersionError": "通用版本不包含有效的JSON:", | ||||
|         "oldVersionError": "旧版本不包含有效的JSON:", | ||||
|         "newVersionError": "新版本不包含有效的JSON:" | ||||
|     }, | ||||
|     "subflow": { | ||||
|         "editSubflowInstance": "编辑子流实例:__name__", | ||||
|         "editSubflow": "编辑流程模板: __name__", | ||||
|         "edit": "编辑流程模板", | ||||
|         "subflowInstances": "这个子流程模板有__count__个实例", | ||||
| @@ -185,8 +295,14 @@ | ||||
|         "editSubflowProperties": "编辑属性", | ||||
|         "input": "输入:", | ||||
|         "output": "输出:", | ||||
|         "status": "状态节点", | ||||
|         "deleteSubflow": "删除子流程", | ||||
|         "info": "详细描述", | ||||
|         "category": "类别", | ||||
|         "env": { | ||||
|             "restore": "恢复为默认子流", | ||||
|             "remove": "删除环境变量" | ||||
|         }, | ||||
|         "errors": { | ||||
|             "noNodesSelected": "<strong>无法创建子流程</strong>: 未选择节点", | ||||
|             "multipleInputsToSelection": "<strong>无法创建子流程</strong>: 多个输入到了选择" | ||||
| @@ -204,18 +320,68 @@ | ||||
|         "editConfig": "编辑__type__配置", | ||||
|         "addNewType": "添加新的__type__节点", | ||||
|         "nodeProperties": "节点属性", | ||||
|         "label": "标签", | ||||
|         "color": "颜色", | ||||
|         "portLabels": "端口标签", | ||||
|         "labelInputs": "输入", | ||||
|         "labelOutputs": "输出", | ||||
|         "settingIcon": "图标", | ||||
|         "default": "默认", | ||||
|         "noDefaultLabel": "无", | ||||
|         "defaultLabel": "使用默认标签", | ||||
|         "searchIcons": "搜索图标", | ||||
|         "useDefault": "使用默认", | ||||
|         "description": "描述", | ||||
|         "show": "显示", | ||||
|         "hide": "隐藏", | ||||
|         "locale": "选择界面语言", | ||||
|         "icon": "图标", | ||||
|         "inputType": "输入类型", | ||||
|         "inputs": { | ||||
|             "input": "输入", | ||||
|             "select": "选择", | ||||
|             "checkbox": "复选框", | ||||
|             "spinner": "微调器", | ||||
|             "none": "空", | ||||
|             "hidden": "隐藏属性" | ||||
|         }, | ||||
|         "types": { | ||||
|             "str": "字符串", | ||||
|             "num": "数字", | ||||
|             "bool": "布尔", | ||||
|             "json": "JSON", | ||||
|             "bin": "buffer", | ||||
|             "env": "环境变量" | ||||
|         }, | ||||
|         "menu": { | ||||
|             "input": "输入", | ||||
|             "select": "选择", | ||||
|             "checkbox": "复选框", | ||||
|             "spinner": "微调器", | ||||
|             "hidden": "仅标签" | ||||
|         }, | ||||
|         "select": { | ||||
|             "label": "标签", | ||||
|             "value": "值" | ||||
|         }, | ||||
|         "spinner": { | ||||
|             "min": "最小值", | ||||
|             "max": "最大值" | ||||
|         }, | ||||
|         "errors": { | ||||
|             "scopeChange": "更改范围将使其他流中的节点无法使用" | ||||
|             "scopeChange": "更改范围将使其他流中的节点无法使用", | ||||
|             "invalidProperties": "无效的属性:" | ||||
|         } | ||||
|     }, | ||||
|     "keyboard": { | ||||
|         "title": "键盘快捷键", | ||||
|         "keyboard": "键盘", | ||||
|         "filterActions": "筛选动作", | ||||
|         "shortcut": "快捷键", | ||||
|         "scope": "范围", | ||||
|         "unassigned": "未分配", | ||||
|         "global": "全局", | ||||
|         "workspace": "工作组", | ||||
|         "selectAll": "选择所有节点", | ||||
|         "selectAllConnected": "选择所有连接的节点", | ||||
|         "addRemoveNode": "从选择中添加/删除节点", | ||||
| @@ -226,12 +392,14 @@ | ||||
|         "nudgeNode": "移动所选节点(1px)", | ||||
|         "moveNode": "移动所选节点(20px)", | ||||
|         "toggleSidebar": "切换侧边栏", | ||||
|         "togglePalette": "切换控制板", | ||||
|         "copyNode": "复制所选节点", | ||||
|         "cutNode": "剪切所选节点", | ||||
|         "pasteNode": "粘贴节点", | ||||
|         "undoChange": "撤消上次执行的更改", | ||||
|         "searchBox": "打开搜索框", | ||||
|         "managePalette": "管理面板" | ||||
|         "managePalette": "管理面板", | ||||
|         "actionList": "动作列表" | ||||
|     }, | ||||
|     "library": { | ||||
|         "library": "库", | ||||
| @@ -239,30 +407,42 @@ | ||||
|         "saveToLibrary": "保存到库...", | ||||
|         "typeLibrary": "__type__类型库", | ||||
|         "unnamedType": "无名__type__", | ||||
|         "exportToLibrary": "将节点导出到库", | ||||
|         "exportedToLibrary": "节点导出到库", | ||||
|         "dialogSaveOverwrite": "一个叫做__libraryName__的__libraryType__已经存在,您需要覆盖么?", | ||||
|         "invalidFilename": "无效的文件名", | ||||
|         "savedNodes": "保存的节点", | ||||
|         "savedType": "已保存__type__", | ||||
|         "saveFailed": "保存失败: __message__", | ||||
|         "newFolder": "新文件夹", | ||||
|         "types": { | ||||
|             "local": "本地的", | ||||
|             "examples": "例子" | ||||
|         } | ||||
|         }, | ||||
|         "exportToLibrary": "将节点导出到库" | ||||
|     }, | ||||
|     "palette": { | ||||
|         "noInfo": "无可用信息", | ||||
|         "filter": "过滤节点", | ||||
|         "search": "搜索模块", | ||||
|         "addCategory": "添加新的...", | ||||
|         "label": { | ||||
|             "subflows": "子流程", | ||||
|             "network": "网络", | ||||
|             "common": "共通", | ||||
|             "input": "输入", | ||||
|             "output": "输出", | ||||
|             "function": "功能", | ||||
|             "sequence": "序列", | ||||
|             "parser": "解析", | ||||
|             "social": "社交", | ||||
|             "storage": "存储", | ||||
|             "analysis": "分析", | ||||
|             "advanced": "高级" | ||||
|         }, | ||||
|         "actions": { | ||||
|             "collapse-all": "收起所有类别", | ||||
|             "expand-all": "展开所有类别" | ||||
|         }, | ||||
|         "event": { | ||||
|             "nodeAdded": "添加到面板中的节点:", | ||||
|             "nodeAdded_plural": "添加到面板中的多个节点", | ||||
| @@ -276,6 +456,7 @@ | ||||
|         }, | ||||
|         "editor": { | ||||
|             "title": "面板管理", | ||||
|             "palette": "控制板", | ||||
|             "times": { | ||||
|                 "seconds": "秒前", | ||||
|                 "minutes": "分前", | ||||
| @@ -309,6 +490,8 @@ | ||||
|             "updated": "已更新", | ||||
|             "install": "安装", | ||||
|             "installed": "已安装", | ||||
|             "conflict": "冲突", | ||||
|             "conflictTip": "<p>无法安装此模块,因为它包含已安装的<br/>节点类型</p><p>与<code>__module__</code>冲突</p>", | ||||
|             "loading": "加载目录...", | ||||
|             "tab-nodes": "节点", | ||||
|             "tab-install": "安装", | ||||
| @@ -356,6 +539,7 @@ | ||||
|             "label": "信息", | ||||
|             "node": "节点", | ||||
|             "type": "类型", | ||||
|             "module": "模组", | ||||
|             "id": "ID", | ||||
|             "status": "状态", | ||||
|             "enabled": "启用", | ||||
| @@ -364,17 +548,18 @@ | ||||
|             "instances": "实例", | ||||
|             "properties": "属性", | ||||
|             "info": "信息", | ||||
|             "desc": "描述", | ||||
|             "blank": "空白", | ||||
|             "null": "空", | ||||
|             "showMore": "展开", | ||||
|             "showLess": "收起", | ||||
|             "flow": "流程", | ||||
|             "selection":"选择", | ||||
|             "nodes":"__count__ 个节点", | ||||
|             "selection": "选择", | ||||
|             "nodes": "__count__ 个节点", | ||||
|             "flowDesc": "流程描述", | ||||
|             "subflowDesc": "子流程描述", | ||||
|             "nodeHelp": "节点帮助", | ||||
|             "none":"无", | ||||
|             "none": "无", | ||||
|             "arrayItems": "__count__个项目", | ||||
|             "showTips": "您可以从设置面板启用提示信息" | ||||
|         }, | ||||
| @@ -386,9 +571,25 @@ | ||||
|             "subflows": "子流程", | ||||
|             "flows": "流程", | ||||
|             "filterAll": "所有", | ||||
|             "showAllConfigNodes": "显示所有配置节点", | ||||
|             "filterUnused": "未使用", | ||||
|             "showAllUnusedConfigNodes": "显示所有未使用的配置节点", | ||||
|             "filtered": "__count__ 个隐藏" | ||||
|         }, | ||||
|         "context": { | ||||
|             "name": "上下文数据", | ||||
|             "label": "上下午", | ||||
|             "none": "未选择", | ||||
|             "refresh": "刷新以加载", | ||||
|             "empty": "空", | ||||
|             "node": "节点", | ||||
|             "flow": "流程", | ||||
|             "global": "全局", | ||||
|             "deleteConfirm": "你确定要删除这个项目吗?", | ||||
|             "autoRefresh": "刷新选择更改", | ||||
|             "refrsh": "刷新", | ||||
|             "delete": "删除" | ||||
|         }, | ||||
|         "palette": { | ||||
|             "name": "节点管理", | ||||
|             "label": "节点" | ||||
| @@ -399,8 +600,151 @@ | ||||
|             "description": "描述", | ||||
|             "dependencies": "依赖", | ||||
|             "settings": "设置", | ||||
|             "noSummaryAvailable": "无可用摘要", | ||||
|             "editDescription": "编辑项目描述", | ||||
|             "editDependencies": "编辑项目依赖" | ||||
|             "editDependencies": "编辑项目依赖", | ||||
|             "noDescriptionAvailable": "没有可用的描述", | ||||
|             "editReadme": "编辑README.md", | ||||
|             "showProjectSettings": "显示项目设置", | ||||
|             "projectSettings": { | ||||
|                 "title": "项目设置", | ||||
|                 "edit": "编辑", | ||||
|                 "none": "空", | ||||
|                 "install": "安装", | ||||
|                 "removeFromProject": "从项目中删除", | ||||
|                 "addToProject": "添加到项目", | ||||
|                 "files": "文件", | ||||
|                 "package": "包", | ||||
|                 "flow": "流程", | ||||
|                 "credentials": "证书", | ||||
|                 "packageCreate": "保存更改后将创建文件", | ||||
|                 "fileNotExist": "文件不存在", | ||||
|                 "selectFile": "选择文件", | ||||
|                 "invalidEncryptionKey": "无效的加密密钥", | ||||
|                 "encryptionEnabled": "启用加密", | ||||
|                 "encryptionDisabled": "加密已禁用", | ||||
|                 "setTheEncryptionKey": "设置加密密钥", | ||||
|                 "resetTheEncryptionKey": "重置加密密钥", | ||||
|                 "changeTheEncryptionKey": "更改加密密钥", | ||||
|                 "currentKey": "当前密钥", | ||||
|                 "newKey": "新密钥", | ||||
|                 "credentialsAlert": "这将删除所有现有凭证", | ||||
|                 "versionControl": "版本控制", | ||||
|                 "branches": "分支", | ||||
|                 "noBranches": "没有分支", | ||||
|                 "deleteConfirm": "您确定要删除本地分支'__name__'吗? 这不能被撤消。", | ||||
|                 "unmergedConfirm": "本地分支'__name__'具有未合并的更改,这些更改将丢失。你确定要删除吗?", | ||||
|                 "deleteUnmergedBranch": "删除未合并的分支", | ||||
|                 "gitRemotes": "Git远程仓库", | ||||
|                 "addRemote": "添加远程仓库", | ||||
|                 "addRemote2": "添加远程仓库", | ||||
|                 "remoteName": "远程仓库名", | ||||
|                 "nameRule": "只能包含A-Z 0-9 _ -", | ||||
|                 "url": "URL", | ||||
|                 "urlRule": "https://, ssh:// or file://", | ||||
|                 "urlRule2": "网址中不能包含用户名/密码", | ||||
|                 "noRemotes": "没有远程仓库", | ||||
|                 "deleteRemoteConfrim": "您确定要删除远程仓库'__name__'吗?", | ||||
|                 "deleteRemote": "删除远程仓库" | ||||
|             }, | ||||
|             "userSettings": { | ||||
|                 "committerDetail": "提交者详细信息", | ||||
|                 "committerTip": "保留空白以使用系统默认值", | ||||
|                 "userName": "用户名", | ||||
|                 "email": "电子邮件", | ||||
|                 "sshKeys": "SSH密钥", | ||||
|                 "sshKeysTip": "允许您创建到远程git存储库的安全连接。", | ||||
|                 "add": "添加密钥", | ||||
|                 "addSshKey": "添加SSH密钥", | ||||
|                 "addSshKeyTip": "生成新的公钥/私钥对", | ||||
|                 "name": "名字", | ||||
|                 "nameRule": "只能包含A-Z 0-9 _ -", | ||||
|                 "passphrase": "密码短语", | ||||
|                 "passphraseShort": "密码短语过短", | ||||
|                 "optional": "可选的", | ||||
|                 "cancel": "取消", | ||||
|                 "generate": "生成密钥", | ||||
|                 "noSshKeys": "没有SSH密钥", | ||||
|                 "copyPublicKey": "将公钥复制到剪贴板", | ||||
|                 "delete": "删除密钥", | ||||
|                 "gitConfig": "Git配置", | ||||
|                 "deleteConfirm": "您确定要删除SSH密钥__name__吗?这不能被撤消。" | ||||
|             }, | ||||
|             "versionControl": { | ||||
|                 "unstagedChanges": "未暂存的变更", | ||||
|                 "stagedChanges": "暂存的变更", | ||||
|                 "unstageChange": "取消变更的暂存", | ||||
|                 "stageChange": "暂存变更", | ||||
|                 "unstageAllChange": "取消所有变更的暂存", | ||||
|                 "stageAllChange": "暂存所有变更", | ||||
|                 "commitChanges": "提交变更", | ||||
|                 "resolveConflicts": "解决冲突", | ||||
|                 "head": "HEAD", | ||||
|                 "staged": "暂存的", | ||||
|                 "unstaged": "未暂存的", | ||||
|                 "local": "本地的", | ||||
|                 "remote": "远程的", | ||||
|                 "revert": "您确定要将更改恢复为'__file__'吗?这不能被撤消。", | ||||
|                 "revertChanges": "还原变更", | ||||
|                 "localChanges": "本地变更", | ||||
|                 "none": "None", | ||||
|                 "conflictResolve": "解决所有冲突。提交更改以完成合并。", | ||||
|                 "localFiles": "本地文件", | ||||
|                 "all": "所有的", | ||||
|                 "unmergedChanges": "未合并的更改", | ||||
|                 "abortMerge": "中止合并", | ||||
|                 "commit": "提交", | ||||
|                 "changeToCommit": "提交变更", | ||||
|                 "commitPlaceholder": "输入您的提交信息", | ||||
|                 "cancelCapital": "取消", | ||||
|                 "commitCapital": "提交", | ||||
|                 "commitHistory": "提交历史", | ||||
|                 "branch": "分支:", | ||||
|                 "moreCommits": "更多提交", | ||||
|                 "changeLocalBranch": "变更本地分支", | ||||
|                 "createBranchPlaceholder": "查找或创建分支", | ||||
|                 "upstream": "上游", | ||||
|                 "localOverwrite": "切换分支会覆盖您现有的本地更改。您必须先提交或撤消那些更改。", | ||||
|                 "manageRemoteBranch": "管理远程分支", | ||||
|                 "unableToAccess": "无法访问远程存储库", | ||||
|                 "retry": "重试", | ||||
|                 "setUpstreamBranch": "设置为上游分支", | ||||
|                 "createRemoteBranchPlaceholder": "查找或创建远程分支", | ||||
|                 "trackedUpstreamBranch": "创建的分支将被设置为跟踪的上游分支。", | ||||
|                 "selectUpstreamBranch": "分支将被创建。 在下面选择以将其设置为被跟踪的上游分支。", | ||||
|                 "pushFailed": "推送失败,因为远程具有更多的最新提交。请先拉取并合并,然后再尝试推送。", | ||||
|                 "push": "推送", | ||||
|                 "pull": "拉取", | ||||
|                 "unablePull": "<p>无法提取远程更改;您未暂存的本地更改将被覆盖。</p><p>请先提交更改,然后重试。</p>", | ||||
|                 "showUnstagedChanges": "显示未暂存的更改", | ||||
|                 "connectionFailed": "无法连接到远程存储库:", | ||||
|                 "pullUnrelatedHistory": "<p>远程有无关的提交历史</p><p>您确定要将这些更改拉入本地仓库吗?</p>", | ||||
|                 "pullChanges": "拉取更改", | ||||
|                 "history": "历史", | ||||
|                 "projectHistory": "项目历史", | ||||
|                 "daysAgo": "__count__天前", | ||||
|                 "daysAgo_plural": "__count__天前", | ||||
|                 "hoursAgo": "__count__小时前", | ||||
|                 "hoursAgo_plural": "__count__小时前", | ||||
|                 "minsAgo": "__count__分钟前", | ||||
|                 "minsAgo_plural": "__count__分钟前", | ||||
|                 "secondsAgo": "秒前", | ||||
|                 "notTracking": "您的本地分支当前未跟踪一个远程分支。", | ||||
|                 "statusUnmergedChanged": "您的仓库中有未合并的更改。您需要解决冲突并提交结果。", | ||||
|                 "repositoryUpToDate": "您的仓库是最新的。", | ||||
|                 "commitsAhead": "您的存储库领先远程仓库__count__次提交。您现在可以推送这些提交。", | ||||
|                 "commitsAhead_plural": "您的存储库领先远程仓库__count__次提交。您现在可以推送这些提交。", | ||||
|                 "commitsBehind": "您的存储库落后远程仓库__count__次提交。您现在可以拉取这些提交。", | ||||
|                 "commitsBehind_plural": "您的存储库落后远程仓库__count__次提交。您现在可以拉取这些提交。", | ||||
|                 "commitsAheadAndBehind1": "您的存储库落后远程仓库__count__次提交", | ||||
|                 "commitsAheadAndBehind1_plural": "您的存储库落后远程仓库__count__次提交", | ||||
|                 "commitsAheadAndBehind2": "领先远程仓库__count__次提交。", | ||||
|                 "commitsAheadAndBehind2_plural": "领先远程仓库__count__次提交。", | ||||
|                 "commitsAheadAndBehind3": "您必须先拉取远程提交,然后才能进行推送。", | ||||
|                 "commitsAheadAndBehind3_plural": "您必须先拉取远程提交,然后才能进行推送。", | ||||
|                 "refreshCommitHistory": "刷新提交历史", | ||||
|                 "refreshChanges": "刷新更改" | ||||
|             } | ||||
|         } | ||||
|     }, | ||||
|     "typedInput": { | ||||
| @@ -408,10 +752,12 @@ | ||||
|             "str": "文字列", | ||||
|             "num": "数字", | ||||
|             "re": "正则表达式", | ||||
|             "bool": "布尔", | ||||
|             "bool": "布尔值", | ||||
|             "json": "JSON", | ||||
|             "bin": "二进制流", | ||||
|             "date": "时间戳" | ||||
|             "date": "时间戳", | ||||
|             "jsonata": "表达式", | ||||
|             "env": "环境变量" | ||||
|         } | ||||
|     }, | ||||
|     "editableList": { | ||||
| @@ -423,8 +769,10 @@ | ||||
|     }, | ||||
|     "expressionEditor": { | ||||
|         "functions": "功能", | ||||
|         "functionReference": "功能reference", | ||||
|         "insert": "插入", | ||||
|         "title": "JSONata表达式编辑器", | ||||
|         "test": "测试", | ||||
|         "data": "示例消息", | ||||
|         "result": "结果", | ||||
|         "format": "格式表达方法", | ||||
| @@ -438,14 +786,229 @@ | ||||
|             "eval": "评估表达式错误:\n  __message__" | ||||
|         } | ||||
|     }, | ||||
|     "jsEditor": { | ||||
|         "title": "JavaScript编辑器" | ||||
|     }, | ||||
|     "textEditor": { | ||||
|         "title": "文本编辑器" | ||||
|     }, | ||||
|     "jsonEditor": { | ||||
|         "title": "JSON编辑器", | ||||
|         "format": "格式化JSON" | ||||
|         "format": "格式化JSON", | ||||
|         "rawMode": "编辑 JSON", | ||||
|         "uiMode": "Visual编辑器", | ||||
|         "insertAbove": "在上方插入", | ||||
|         "insertBelow": "在下方插入", | ||||
|         "addItem": "添加项目", | ||||
|         "copyPath": "复制路径到项目", | ||||
|         "expandItems": "展开项目", | ||||
|         "collapseItems": "收合项目", | ||||
|         "duplicate": "重复", | ||||
|         "error": { | ||||
|             "invalidJSON": "无效的JSON: " | ||||
|         } | ||||
|     }, | ||||
|     "markdownEditor": { | ||||
|         "title": "Markdown编辑器", | ||||
|         "expand": "展开", | ||||
|         "format": "格式化为markdown", | ||||
|         "heading1": "标题 1", | ||||
|         "heading2": "标题 2", | ||||
|         "heading3": "标题 3", | ||||
|         "bold": "粗体", | ||||
|         "italic": "斜体", | ||||
|         "code": "代码", | ||||
|         "ordered-list": "排序的列表", | ||||
|         "unordered-list": "非排序的列表", | ||||
|         "quote": "引用", | ||||
|         "link": "链接", | ||||
|         "horizontal-rule": "水平线", | ||||
|         "toggle-preview": "切换预览" | ||||
|     }, | ||||
|     "bufferEditor": { | ||||
|         "title": "缓冲区编辑器", | ||||
|         "modeString": "作为UTF-8字符串处理", | ||||
|         "modeArray": "作为JSON数组处理", | ||||
|         "modeDesc": "<h3>缓冲区编辑器</h3><p>缓冲区类型被存储为字节值的JSON数组。编辑器将尝试将输入的数值解析为JSON数组。如果它不是有效的JSON,它将被视为UTF-8字符串,并被转换为单个字符代码点的数组。</p><p>例如,<code>Hello World</code>的值会被转换为JSON数组:<pre>[72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]</pre></p>" | ||||
|     }, | ||||
|     "projects": { | ||||
|         "config-git": "配置Git客户端", | ||||
|         "welcome": { | ||||
|             "hello": "你好! 我们已经将“项目”引入了Node-RED。", | ||||
|             "desc0": "这是一种用于管理流程文件的新方法,并且包括对流程的版本控制。", | ||||
|             "desc1": "首先,您可以创建您的第一个项目或从git存储库克隆现有项目。", | ||||
|             "desc2": "如果不确定,可以暂时跳过此步骤。您仍然可以随时通过“项目”菜单创建第一个项目。", | ||||
|             "create": "建立专案", | ||||
|             "clone": "克隆仓库", | ||||
|             "openExistingProject": "打开现有项目", | ||||
|             "not-right-now": "不是现在" | ||||
|         }, | ||||
|         "git-config": { | ||||
|             "setup": "设置您的版本控制客户端", | ||||
|             "desc0": "Node-RED使用开源工具Git进行版本控制。它跟踪对项目文件的更改,并允许您将其推送到远程存储库。", | ||||
|             "desc1": "提交一组更改时,Git会使用用户名和电子邮件地址记录谁进行了更改。用户名可以是您想要的任何名称-不必是您的真实姓名。", | ||||
|             "desc2": "您的Git客户端已经配置了以下详细信息。", | ||||
|             "desc3": "您可以稍后在设置对话框的'Git config'标签下更改这些设置。", | ||||
|             "username": "用户名", | ||||
|             "email": "电子邮件" | ||||
|         }, | ||||
|         "project-details": { | ||||
|             "create": "创建你的项目", | ||||
|             "desc0": "项目被维护为Git仓库。与他人一起共享您的流程", | ||||
|             "desc1": "您可以创建多个项目,并通过编辑器在它们之间快速切换。", | ||||
|             "desc2": "首先,您的项目需要一个名称和一个可选的描述。", | ||||
|             "already-exists": "项目已存在", | ||||
|             "must-contain": "只能包含A-Z 0-9 _ -", | ||||
|             "project-name": "项目名", | ||||
|             "desc": "描述", | ||||
|             "opt": "可选的" | ||||
|         }, | ||||
|         "clone-project": { | ||||
|             "clone": "克隆一个项目", | ||||
|             "desc0": "如果您已经有一个包含项目的git仓库,则可以对其进行克隆以开始使用。", | ||||
|             "already-exists": "项目已存在", | ||||
|             "must-contain": "只能包含A-Z 0-9 _ -", | ||||
|             "project-name": "项目名", | ||||
|             "no-info-in-url": "网址中不要包含用户名/密码", | ||||
|             "git-url": "Git仓库的url", | ||||
|             "protocols": "https://, ssh:// or file://", | ||||
|             "auth-failed": "认证失败", | ||||
|             "username": "用户名", | ||||
|             "passwd": "秘密啊", | ||||
|             "ssh-key": "SSH密钥", | ||||
|             "passphrase": "密码短语", | ||||
|             "ssh-key-desc": "在通过ssh克隆仓库之前,必须添加SSH密钥才能访问它。", | ||||
|             "ssh-key-add": "添加一个ssh密钥", | ||||
|             "credential-key": "证书加密密钥", | ||||
|             "cant-get-ssh-key": "错误! 无法获取所选的SSH密钥路径。", | ||||
|             "already-exists2": "已存在", | ||||
|             "git-error": "git错误", | ||||
|             "connection-failed": "连接失败", | ||||
|             "not-git-repo": "不是一个git仓库", | ||||
|             "repo-not-found": "未发现仓库" | ||||
|         }, | ||||
|         "default-files": { | ||||
|             "create": "创建您的项目文件", | ||||
|             "desc0": "一个包含您的流程文件,Readme文件和package.json文件的项目。", | ||||
|             "desc1": "它可以包含您要在Git仓库中维护的任何其他文件。", | ||||
|             "desc2": "您现有的流程和凭证文件将被复制到项目中。", | ||||
|             "flow-file": "流程文件", | ||||
|             "credentials-file": "证书文件" | ||||
|         }, | ||||
|         "encryption-config": { | ||||
|             "setup": "设置证书文件的加密", | ||||
|             "desc0": "您的流程证书文件可以被加密以确保其内容安全。", | ||||
|             "desc1": "如果要将这些证书存储在公共Git存储库中,则必须通过提供密钥短语来对它们进行加密。", | ||||
|             "desc2": "您的流程证书文件当前未加密。", | ||||
|             "desc3": "这意味着任何有权访问该文件的人都可以读取其内容,例如密码和访问令牌。", | ||||
|             "desc4": "如果要将这些证书存储在公共Git仓库中,则必须通过提供密钥短语来对它们进行加密。", | ||||
|             "desc5": "当前,使用设置文件中的credentialSecret属性作为密钥来加密流程证书文件。", | ||||
|             "desc6": "您的流程证书文件当前使用系统生成的密钥加密。您应该为此项目提供一个新的密钥。", | ||||
|             "desc7": "密钥将与项目文件分开存储。您将需要提供在另一个Node-RED实例中使用该项目的密钥。", | ||||
|             "credentials": "证书", | ||||
|             "enable": "启用加密", | ||||
|             "disable": "禁用加密", | ||||
|             "disabled": "禁用的", | ||||
|             "copy": "复制现有密钥", | ||||
|             "use-custom": "使用自定义密钥", | ||||
|             "desc8": "证书文件不会被加密,其内容很容易阅读", | ||||
|             "create-project-files": "创建项目文件", | ||||
|             "create-project": "创建项目", | ||||
|             "already-exists": "已存在", | ||||
|             "git-error": "git错误", | ||||
|             "git-auth-error": "git认证错误" | ||||
|         }, | ||||
|         "create-success": { | ||||
|             "success": "您已经成功创建了第一个项目!", | ||||
|             "desc0": "现在,您可以像往常一样继续使用Node-RED。", | ||||
|             "desc1": "侧栏中的“信息”标签显示了您当前的活动项目。名称旁边的按钮可用于访问项目设置视图。", | ||||
|             "desc2": "侧栏中的“历史记录”标签可用于查看项目中已更改的文件并提交。它向您显示了提交的完整历史记录,并允许您将更改推送到远程存储库。" | ||||
|         }, | ||||
|         "create": { | ||||
|             "projects": "项目", | ||||
|             "already-exists": "项目已存在", | ||||
|             "must-contain": "只能包含A-Z 0-9 _ -", | ||||
|             "no-info-in-url": "网址中不要包含用户名/密码", | ||||
|             "open": "打开项目", | ||||
|             "create": "创建项目", | ||||
|             "clone": "克隆仓库", | ||||
|             "project-name": "项目名", | ||||
|             "desc": "描述", | ||||
|             "opt": "可选的", | ||||
|             "flow-file": "流程文件", | ||||
|             "credentials": "证书", | ||||
|             "enable-encryption": "启用加密", | ||||
|             "disable-encryption": "禁用加密", | ||||
|             "encryption-key": "加密密钥", | ||||
|             "desc0": "用来保护您的凭证的短语", | ||||
|             "desc1": "凭证文件不会被加密,其内容很容易阅读", | ||||
|             "git-url": "Git存储库URL", | ||||
|             "protocols": "https://, ssh:// or file://", | ||||
|             "auth-failed": "验证失败", | ||||
|             "username": "用户名", | ||||
|             "password": "密码", | ||||
|             "ssh-key": "SSH密钥", | ||||
|             "passphrase": "密码短语", | ||||
|             "desc2": "在通过ssh克隆存储库之前,必须添加SSH密钥才能访问它。", | ||||
|             "add-ssh-key": "添加一个ssh密钥", | ||||
|             "credentials-encryption-key": "证书加密密钥", | ||||
|             "already-exists-2": "已存在", | ||||
|             "git-error": "git错误", | ||||
|             "con-failed": "连接失败", | ||||
|             "not-git": "不是git仓库", | ||||
|             "no-resource": "找不到存储库", | ||||
|             "cant-get-ssh-key-path": "错误!无法获取所选的SSH密钥路径。", | ||||
|             "unexpected_error": "意外的错误" | ||||
|         }, | ||||
|         "delete": { | ||||
|             "confirm": "您确定要删除此项目吗?" | ||||
|         }, | ||||
|         "create-project-list": { | ||||
|             "search": "搜索您的项目", | ||||
|             "current": "当前的" | ||||
|         }, | ||||
|         "require-clean": { | ||||
|             "confirm": "<p>您有未部署的更改,这些更改将丢失。</p><p>您要继续吗?</p>" | ||||
|         }, | ||||
|         "send-req": { | ||||
|             "auth-req": "存储库需要认证", | ||||
|             "username": "用户名", | ||||
|             "password": "秘密", | ||||
|             "passphrase": "密码短语", | ||||
|             "retry": "重试", | ||||
|             "update-failed": "无法更新身份验证", | ||||
|             "unhandled": "未处理的错误响应" | ||||
|         }, | ||||
|         "create-branch-list": { | ||||
|             "invalid": "无效的分支", | ||||
|             "create": "创建分支", | ||||
|             "current": "当前的" | ||||
|         }, | ||||
|         "create-default-file-set": { | ||||
|             "no-active": "没有活动项目就无法创建默认文件集", | ||||
|             "no-empty": "无法在非空项目上创建默认文件集", | ||||
|             "git-error": "git错误" | ||||
|         }, | ||||
|         "errors": { | ||||
|             "no-username-email": "您的Git客户端未配置用户名/电子邮件。", | ||||
|             "unexpected": "发生了一个意料之外的问题", | ||||
|             "code": "代码" | ||||
|         } | ||||
|     }, | ||||
|     "editor-tab": { | ||||
|         "properties": "属性", | ||||
|         "envProperties": "环境变量", | ||||
|         "description": "描述", | ||||
|         "appearance": "外观", | ||||
|         "preview": "UI预览", | ||||
|         "defaultValue": "默认值" | ||||
|     }, | ||||
|     "languages": { | ||||
|         "de": "德语", | ||||
|         "en-US": "英文", | ||||
|         "ja": "日语", | ||||
|         "ko": "韩文", | ||||
|         "zh-CN": "简体中文", | ||||
|         "zh-TW": "繁体中文" | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -214,5 +214,57 @@ | ||||
|     "$toMillis": { | ||||
|         "args": "timestamp", | ||||
|         "desc": "将ISO 8601格式的字符串`timestamp`转换为从UNIX时间 (1970年1月1日 UTC/GMT的午夜)开始到现在的毫秒数。如果该字符串的格式不正确,则抛出错误。" | ||||
|     }, | ||||
|     "$env": { | ||||
|         "args": "arg", | ||||
|         "desc": "返回环境变量的值。\n\n这是Node-RED定义的函数。" | ||||
|     }, | ||||
|     "$eval": { | ||||
|         "args": "expr [, context]", | ||||
|         "desc": "使用当前上下文来作为评估依据,分析并评估字符串`expr`,其中包含文字JSON或JSONata表达式。" | ||||
|     }, | ||||
|     "$formatInteger": { | ||||
|         "args": "number, picture", | ||||
|         "desc": "将“数字”转换为字符串,并将其格式化为“图片”字符串指定的整数表示形式。图片字符串参数定义了数字的格式,并具有与XPath F&O 3.1 规范中的fn:format-integer相同的语法。" | ||||
|     }, | ||||
|     "$parseInteger": { | ||||
|         "args": "string, picture", | ||||
|         "desc": "使用“图片”字符串指定的格式将“字符串”参数的内容解析为整数(作为JSON数字)。图片字符串参数与$formatInteger格式相同。." | ||||
|     }, | ||||
|     "$error": { | ||||
|         "args": "[str]", | ||||
|         "desc": "引发错误并显示一条消息。 可选的`str`将替代$error()函数评估的默认消息。" | ||||
|     }, | ||||
|     "$assert": { | ||||
|         "args": "arg, str", | ||||
|         "desc": "如果`arg`为真,则该函数返回。 如果arg为假,则抛出带有str的异常作为异常消息。" | ||||
|     }, | ||||
|     "$single": { | ||||
|         "args": "array, function", | ||||
|         "desc": "返回满足参数function谓语的array参数中的唯一值 (比如:传递值时,函数返回布尔值“true”)。如果匹配值的数量不唯一时,则抛出异常。\n\n应在以下签名中提供函数:`function(value [,index [,array []]])`其中value是数组的每个输入,index是该值的位置,整个数组作为第三个参数传递。" | ||||
|     }, | ||||
|     "$encodeUrl": { | ||||
|         "args": "str", | ||||
|         "desc": "通过用表示字符的UTF-8编码的一个,两个,三个或四个转义序列替换某些字符的每个实例,对统一资源定位符(URL)组件进行编码。\n\n示例:`$encodeUrlComponent(\"?x=test\")` => `\"%3Fx%3Dtest\"`" | ||||
|     }, | ||||
|     "$encodeUrlComponent": { | ||||
|         "args": "str", | ||||
|         "desc": "通过用表示字符的UTF-8编码的一个,两个,三个或四个转义序列替换某些字符的每个实例,对统一资源定位符(URL)进行编码。\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创建的统一资源定位器(URL)组件。 \n\n示例: `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`" | ||||
|     }, | ||||
|     "$decodeUrlComponent": { | ||||
|         "args": "str", | ||||
|         "desc": "解码先前由encodeUrl创建的统一资源定位符(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": "返回一个数组,其中重复的值已从`数组`中删除" | ||||
|     }, | ||||
|     "$type": { | ||||
|         "args": "value", | ||||
|         "desc": "以字符串形式返回`值`的类型。 如果该`值`未定义,则将返回`未定义`" | ||||
|     } | ||||
| } | ||||
|   | ||||
							
								
								
									
										1015
									
								
								packages/node_modules/@node-red/editor-client/locales/zh-TW/editor.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1015
									
								
								packages/node_modules/@node-red/editor-client/locales/zh-TW/editor.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										23
									
								
								packages/node_modules/@node-red/editor-client/locales/zh-TW/infotips.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								packages/node_modules/@node-red/editor-client/locales/zh-TW/infotips.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| { | ||||
|     "info": { | ||||
|         "tip0" : "您可以用 {{core:delete-selection}} 刪除選擇的節點或連結。", | ||||
|         "tip1" : "{{core:search}} 可以在流程內搜索節點。", | ||||
|         "tip2": "{{core:toggle-sidebar}} 可以顯示或隱藏邊側欄。", | ||||
|         "tip3": "您可以在 {{core:manage-palette}} 中管理節點的控制台。", | ||||
|         "tip4": "側邊欄中會列出流程中所有的配置節點。您可以通過功能表或者 {{core:show-config-tab}} 來訪問這些節點。", | ||||
|         "tip5": "您可以在設定中選擇顯示或隱藏這些提示。", | ||||
|         "tip6": "您可以用[left] [up] [down] [right]鍵來移動被選中的節點。按住[shift]可以更快地移動節點。", | ||||
|         "tip7": "把節點拖到連接上可以向連接中插入節點。", | ||||
|         "tip8": "您可以用 {{core:show-export-dialog}} 來匯出被選中的節點或標籤頁中的流程。", | ||||
|         "tip9": "您可以將流程的json文字檔拖入編輯方塊或 {{core:show-import-dialog}} 來導入流程。", | ||||
|         "tip10": "按住[shift]後按一下並拖動節點可以將該節點的多個連接一併移動到其他節點的埠。", | ||||
|         "tip11": "{{core:show-info-tab}} 可以顯示「資訊」標籤頁。 {{core:show-debug-tab}} 可以顯示「調試」標籤頁。", | ||||
|         "tip12": "按住[ctrl]的同時點擊工作介面可以在節點的對話欄中快速添加節點。", | ||||
|         "tip13": "按住[ctrl]的同時點擊節點的埠或後續節點可以快速連接多個節點。", | ||||
|         "tip14": "按住[shift]的同時點擊節點會選中所有被連接的節點。", | ||||
|         "tip15": "按住[ctrl]的同時點擊節點可以在選中或取消選中節點。", | ||||
|         "tip16": "{{core:show-previous-tab}} 和 {{core:show-next-tab}} 可以切換標籤頁。", | ||||
|         "tip17": "您可以在節點的屬性配置畫面中通過 {{core:confirm-edit-tray}} 來更改設置,或者用 {{core:cancel-edit-tray}} 來取消更改。", | ||||
|         "tip18": "您可以通過點擊 {{core:edit-selected-node}} 來顯示被選中節點的屬性設置畫面。" | ||||
|     } | ||||
| } | ||||
							
								
								
									
										270
									
								
								packages/node_modules/@node-red/editor-client/locales/zh-TW/jsonata.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										270
									
								
								packages/node_modules/@node-red/editor-client/locales/zh-TW/jsonata.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,270 @@ | ||||
| { | ||||
|     "$string": { | ||||
|         "args": "arg", | ||||
|         "desc": "通過以下的類型轉換規則將參數*arg*轉換成字串:\n\n - 字串不轉換。\n -函數轉換成空的字串。\n - JSON的值無法用數字表示所以用無限大或者NaN(非數)表示。\n - 用’JSON.stringify’函數將其他值轉換成JSON字串。" | ||||
|     }, | ||||
|     "$length": { | ||||
|         "args": "str", | ||||
|         "desc": "輸出字串’str’的字數。如果’str’不是字串,拋出錯誤。" | ||||
|     }, | ||||
|     "$substring": { | ||||
|         "args": "str, start[, length]", | ||||
|         "desc": "輸出`start`位置後的的首次出現的包括`str`的子字串。 如果`length`被指定,那麼的字串中將只包括前`length`個文字。如果`start`是負數則輸出從`str`末尾開始的`length`個文字" | ||||
|     }, | ||||
|     "$substringBefore": { | ||||
|         "args": "str, chars", | ||||
|         "desc": "輸出’str’中首次出現的’chars’之前的子字串,如果’str’中不包括’chars’則輸出’str’。" | ||||
|     }, | ||||
|     "$substringAfter": { | ||||
|         "args": "str, chars", | ||||
|         "desc": "輸出’str’中首次出現的’chars’之後的子字串,如果’str’中不包括’chars’則輸出’str’。" | ||||
|     }, | ||||
|     "$uppercase": { | ||||
|         "args": "str", | ||||
|         "desc": "`將’str’中的所有字母變為大寫後輸出。" | ||||
|     }, | ||||
|     "$lowercase": { | ||||
|         "args": "str", | ||||
|         "desc": "將’str’中的所有字母變為小寫後輸出。" | ||||
|     }, | ||||
|     "$trim": { | ||||
|         "args": "str", | ||||
|         "desc": "將以下步驟應用於`str`來去除所有空白文字並實現標準化。\n\n – 將全部tab定位字元、Enter鍵、換行字元用空白代替。\n- 將連續的空白文字變成一個空白文字。\n- 消除開頭和末尾的空白文字。\n\n如果`str`沒有被指定(即在無輸入參數的情況下調用本函數),將上下文的值作為`str`來使用。 如果`str` 不是字串則拋出錯誤。" | ||||
|     }, | ||||
|     "$contains": { | ||||
|         "args": "str, pattern", | ||||
|         "desc": "字串`str` 和 `pattern`匹配的話輸出`true`,不匹配的情況下輸出 `false`。 不指定`str`的情況下(比如用一個參數調用本函數時)、將上下文的值作為`str`來使用。參數 `pattern`可以為字串或正則表達。" | ||||
|     }, | ||||
|     "$split": { | ||||
|         "args": "str[, separator][, limit]", | ||||
|         "desc": "將參數`str`分解成由子字串組成的陣列。 如果`str`不是字串拋出錯誤。可以省略的參數 `separator`中指定字串`str`的分隔符號。分隔符號可以是文字或規則運算式。在不指定`separator`的情況下、將分隔符號看作空的字串並把`str`拆分成由單個字母組成的陣列。如果`separator`不是字串則拋出錯誤。在可省略的參數`limit`中指定分割後的子字串的最大個數。超出個數的子字串將被捨棄。如果`limit`沒有被指定,`str` 將不考慮子字串的個數而將字串完全分隔。如果`limit`是負數則拋出錯誤。" | ||||
|     }, | ||||
|     "$join": { | ||||
|         "args": "array[, separator]", | ||||
|         "desc": "用可以省略的參數 `separator`來把多個字元串連接。如果`array`不是字串則拋出錯誤。 如果沒有指定`separator`,則用空字串來連接字元(即字串之間沒有`separator`)。 如果`separator`不是字元則拋出錯誤。" | ||||
|     }, | ||||
|     "$match": { | ||||
|         "args": "str, pattern [, limit]", | ||||
|         "desc": "對字串`str`使用規則運算式`pattern`並輸出與`str`相匹配的部分資訊。" | ||||
|     }, | ||||
|     "$replace": { | ||||
|         "args": "str, pattern, replacement [, limit]", | ||||
|         "desc": "在字串`str`中搜索`pattern`並用`replacement`來替換。\n\n可選參數`limit`用來指定替換次數的上限。" | ||||
|     }, | ||||
|     "$now": { | ||||
|         "args": "", | ||||
|         "desc": "生成ISO 8601互換格式的時刻,並作為字串輸出。" | ||||
|     }, | ||||
|     "$base64encode": { | ||||
|         "args": "string", | ||||
|         "desc": "將ASCII格式的字串轉換為Base 64格式。將字串中的文字視作二進位形式的資料處理。包含URI編碼在內的字串文字必須在0x00到0xFF的範圍內,否則不會被支持。" | ||||
|     }, | ||||
|     "$base64decode": { | ||||
|         "args": "string", | ||||
|         "desc": "用UTF-8內碼表將Base 64形式二進位值轉換為字串。" | ||||
|     }, | ||||
|     "$number": { | ||||
|         "args": "arg", | ||||
|         "desc": "用下述的規則將參數 `arg`轉換為數值。:\n\n – 數值不做轉換。\n – 將字串中合法的JSON數値表示轉換成數値。\n – 其他形式的值則拋出錯誤。" | ||||
|     }, | ||||
|     "$abs": { | ||||
|         "args": "number", | ||||
|         "desc": "輸出參數`number`的絕對值。" | ||||
|     }, | ||||
|     "$floor": { | ||||
|         "args": "number", | ||||
|         "desc": "輸出比`number`的值小的最大整數。" | ||||
|     }, | ||||
|     "$ceil": { | ||||
|         "args": "number", | ||||
|         "desc": "輸出比`number`的值大的最小整數。" | ||||
|     }, | ||||
|     "$round": { | ||||
|         "args": "number [, precision]", | ||||
|         "desc": "輸出四捨五入後的參數`number`。可省略的參數 `precision`指定四捨五入後小數點下的位數。" | ||||
|     }, | ||||
|     "$power": { | ||||
|         "args": "base, exponent", | ||||
|         "desc": "輸出底數`base`的`exponent`次冪。" | ||||
|     }, | ||||
|     "$sqrt": { | ||||
|         "args": "number", | ||||
|         "desc": "輸出參數 `number`的平方根。" | ||||
|     }, | ||||
|     "$random": { | ||||
|         "args": "", | ||||
|         "desc": "輸出比0大,比1小的偽亂數。" | ||||
|     }, | ||||
|     "$millis": { | ||||
|         "args": "", | ||||
|         "desc": "返回從UNIX時間 (1970年1月1日 UTC/GMT的午夜)開始到現在的毫秒數。在同一個運算式的測試中所有對`$millis()`的調用將會返回相同的值。" | ||||
|     }, | ||||
|     "$sum": { | ||||
|         "args": "array", | ||||
|         "desc": "輸出陣列`array`的總和。如果`array`不是數值則拋出錯誤。" | ||||
|     }, | ||||
|     "$max": { | ||||
|         "args": "array", | ||||
|         "desc": "輸出陣列`array`的最大值。如果`array`不是數值則拋出錯誤。" | ||||
|     }, | ||||
|     "$min": { | ||||
|         "args": "array", | ||||
|         "desc": "輸出陣列`array`的最小值。如果`array`不是數值則拋出錯誤。。" | ||||
|     }, | ||||
|     "$average": { | ||||
|         "args": "array", | ||||
|         "desc": "輸出陣列`array`的平均數。如果`array`不是數值則拋出錯誤。。" | ||||
|     }, | ||||
|     "$boolean": { | ||||
|         "args": "arg", | ||||
|         "desc": "用下述規則將資料轉換成布林值。:\n\n - 不轉換布林值`Boolean`。\n – 將空的字串`string`轉換為`false`\n – 將不為空的字串`string`轉換為`true`\n – 將為0的數位`number`轉換成`false`\n –將不為0的數位`number`轉換成`true`\n –將`null`轉換成`false`\n –將空的陣列`array`轉換成`false`\n –如果陣列`array`中含有可以轉換成`true`的要素則轉換成`true`\n –如果`array`中沒有可轉換成`true`的要素則轉換成`false`\n – 空的物件`object`轉換成`false`\n – 非空的物件`object`轉換成`true`\n –將函數`function`轉換成`false`" | ||||
|     }, | ||||
|     "$not": { | ||||
|         "args": "arg", | ||||
|         "desc": "輸出做反轉運算後的布林值。首先將`arg`轉換為布林值。" | ||||
|     }, | ||||
|     "$exists": { | ||||
|         "args": "arg", | ||||
|         "desc": "如果算式`arg`的值存在則輸出`true`。如果算式的值不存在(比如指向不存在區域的引用)則輸出`false`。" | ||||
|     }, | ||||
|     "$count": { | ||||
|         "args": "array", | ||||
|         "desc": "輸出陣列中的元素數。" | ||||
|     }, | ||||
|     "$append": { | ||||
|         "args": "array, array", | ||||
|         "desc": "將兩個陣列連接。" | ||||
|     }, | ||||
|     "$sort": { | ||||
|         "args": "array [, function]", | ||||
|         "desc": "輸出排序後的陣列`array`。\n\n如果使用了比較函數`function`,則下述兩個參數需要被指定。\n\n`function(left, right)`\n\n該比較函數是為了比較left和right兩個值而被排序演算法調用的。如果使用者希望left的值被置於right的值之後,那麼該函數必須輸出布林值`true`來表示位置交換。而在不需要位置交換時函數必須輸出`false`。" | ||||
|     }, | ||||
|     "$reverse": { | ||||
|         "args": "array", | ||||
|         "desc": "輸出倒序後的陣列`array`。" | ||||
|     }, | ||||
|     "$shuffle": { | ||||
|         "args": "array", | ||||
|         "desc": "輸出隨機排序後的陣列 `array`。" | ||||
|     }, | ||||
|     "$zip": { | ||||
|         "args": "array, ...", | ||||
|         "desc": "將陣列中的值按索引順序打包後輸出。" | ||||
|     }, | ||||
|     "$keys": { | ||||
|         "args": "object", | ||||
|         "desc": "輸出由物件內的鍵組成的陣列。如果參數是物件的陣列則輸出由所有物件中的鍵去重後組成的佇列。" | ||||
|     }, | ||||
|     "$lookup": { | ||||
|         "args": "object, key", | ||||
|         "desc": "輸出對象中與參數`key`對應的值。如果第一個參數`object`是陣列,那麼陣列中所有的物件都將被搜索並輸出這些物件中與參數`key`對應的值。" | ||||
|     }, | ||||
|     "$spread": { | ||||
|         "args": "object", | ||||
|         "desc": "將物件中的鍵值對分隔成每個要素中只含有一個鍵值對的陣列。如果參數`object`是陣列,那麼返回值的陣列中包含所有物件中的鍵值對。" | ||||
|     }, | ||||
|     "$merge": { | ||||
|         "args": "array<object>", | ||||
|         "desc": "將輸入陣列`objects`中所有的鍵值對合併到一個`object`中並返回。如果輸入陣列的要素中含有重複的鍵,則返回的`object`中將只包含陣列中最後出現要素的值。如果輸入陣列中包括物件以外的元素,則拋出錯誤。" | ||||
|     }, | ||||
|     "$sift": { | ||||
|         "args": "object, function", | ||||
|         "desc": "輸出參數`object`中符合`function`的鍵值對。\n\n`function`必須含有下述參數。\n\n`function(value [, key [, object]])`" | ||||
|     }, | ||||
|     "$each": { | ||||
|         "args": "object, function", | ||||
|         "desc": "將函數`function`應用於`object`中的所有鍵值對並輸出由所有返回值組成的陣列。" | ||||
|     }, | ||||
|     "$map": { | ||||
|         "args": "array, function", | ||||
|         "desc": "將函數`function`應用於陣列`array`中所有的值並輸出由返回值組成的陣列。\n\n`function`中必須含有下述參數。\n\n`function(value [, index [, array]])`" | ||||
|     }, | ||||
|     "$filter": { | ||||
|         "args": "array, function", | ||||
|         "desc": "輸出陣列`array`中符合函數`function`條件的值組成的陣列。\n\n`function`必須包括下述參數。\n\n`function(value [, index [, array]])`" | ||||
|     }, | ||||
|     "$reduce": { | ||||
|         "args": "array, function [, init]", | ||||
|         "desc": "將`function`依次應用於陣列中的各要素值。 其中,前一個要素值的計算結果將參與到下一次的函數運算中。。\n\n函數`function`接受兩個參數並作為中綴標記法中的操作符。\n\n可省略的參數`init`將作為運算的初始值。" | ||||
|     }, | ||||
|     "$flowContext": { | ||||
|         "args": "string", | ||||
|         "desc": "獲取流上下文(流等級的上下文,可以讓所有節點共用)的屬性。" | ||||
|     }, | ||||
|     "$globalContext": { | ||||
|         "args": "string", | ||||
|         "desc": "獲取全域上下文的屬性。" | ||||
|     }, | ||||
|     "$pad": { | ||||
|         "args": "string, width [, char]", | ||||
|         "desc": "根據需要,向字串`string`的副本中填充文字使該字串的字數達到`width`的絕對值並返回填充文字後的字串。\n\n如果`width`的值為正,則向字串`string`的右側填充文字,如果`width`為負,則向字串`string`的左側填充文字。\n\n可選參數`char`用來指定填充的文字。如果未指定該參數,則填充空白文字。" | ||||
|     }, | ||||
|     "$fromMillis": { | ||||
|         "args": "number", | ||||
|         "desc": "將表示從UNIX時間 (1970年1月1日 UTC/GMT的午夜)開始到現在的毫秒數的數值轉換成ISO 8601形式時間戳記的字串。" | ||||
|     }, | ||||
|     "$formatNumber": { | ||||
|         "args": "number, picture [, options]", | ||||
|         "desc": "將`number`轉換成具有`picture`所指定的數值格式的字串。\n\n此函數的功能與XPath F&O 3.1規格中定義的XPath/XQuery函數的fn:format-number功能相一致。參數`picture`用於指定數值的轉換格式,其語法與fn:format-number中的定義一致。\n\n可選的第三參數`options`用來覆蓋預設的局部環境格式,如小數點分隔符號。如果指定該參數,那麼該參數必須是包含name/value對的物件,並且name/value對必須符合XPath F&O 3.1規格中記述的數值格式。" | ||||
|     }, | ||||
|     "$formatBase": { | ||||
|         "args": "number [, radix]", | ||||
|         "desc": "將`number`變換為以參數`radix`的值為基數形式的字串。如果不指定`radix`的值,則默認基數為10。指定的`radix`值必須在2~36之間,否則拋出錯誤。" | ||||
|     }, | ||||
|     "$toMillis": { | ||||
|         "args": "timestamp", | ||||
|         "desc": "將ISO 8601格式的字串`timestamp`轉換為從UNIX時間 (1970年1月1日 UTC/GMT的午夜)開始到現在的毫秒數。如果該字串的格式不正確,則拋出錯誤。" | ||||
|     }, | ||||
|     "$env": { | ||||
|         "args": "arg", | ||||
|         "desc": "返回環境變量的值。\n\n這是Node-RED定義的函數。" | ||||
|     }, | ||||
|     "$eval": { | ||||
|         "args": "expr [, context]", | ||||
|         "desc": "使用當前上下文來作為評估依據,分析並評估字符串`expr`,其中包含文字JSON或JSONata表達式。" | ||||
|     }, | ||||
|     "$formatInteger": { | ||||
|         "args": "number, picture", | ||||
|         "desc": "將“數字”轉換為字符串,並將其格式化為“圖片”字符串指定的整數表示形式。圖片字符串參數定義了數字的格式,並具有與XPath F&O 3.1 規範中的fn:format-integer相同的語法。" | ||||
|     }, | ||||
|     "$parseInteger": { | ||||
|         "args": "string, picture", | ||||
|         "desc": "使用“圖片”字符串指定的格式將“字符串”參數的內容解析為整數(作為JSON數字)。圖片字符串參數與$formatInteger格式相同。." | ||||
|     }, | ||||
|     "$error": { | ||||
|         "args": "[str]", | ||||
|         "desc": "引發錯誤並顯示一條消息。 可選的`str`將替代$error()函數評估的默認消息。" | ||||
|     }, | ||||
|     "$assert": { | ||||
|         "args": "arg, str", | ||||
|         "desc": "如果`arg`為真,則該函數返回。 如果arg為假,則拋出帶有str的異常作為異常消息。" | ||||
|     }, | ||||
|     "$single": { | ||||
|         "args": "array, function", | ||||
|         "desc": "返回滿足參數function謂語的array參數中的唯一值 (比如:傳遞值時,函數返回布林值“true”)。如果匹配值的數量不唯一時,則拋出異常。\n\n應在以下簽名中提供函數:`function(value [,index [,array []]])`其中value是數組的每個輸入,index是該值的位置,整個數組作為第三個參數傳遞。" | ||||
|     }, | ||||
|     "$encodeUrl": { | ||||
|         "args": "str", | ||||
|         "desc": "通過用表示字符的UTF-8編碼的一個,兩個,三個或四個轉義序列替換某些字符的每個實例,對統一資源定位符(URL)組件進行編碼。\n\n示例:`$encodeUrlComponent(\"?x=test\")` => `\"%3Fx%3Dtest\"`" | ||||
|     }, | ||||
|     "$encodeUrlComponent": { | ||||
|         "args": "str", | ||||
|         "desc": "通過用表示字符的UTF-8編碼的一個,兩個,三個或四個轉義序列替換某些字符的每個實例,對統一資源定位符(URL)進行編碼。\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創建的統一資源定位器(URL)組件。 \n\n示例: `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`" | ||||
|     }, | ||||
|     "$decodeUrlComponent": { | ||||
|         "args": "str", | ||||
|         "desc": "解碼先前由encodeUrl創建的統一資源定位符(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": "返回一個數組,其中重復的值已從`數組`中刪除" | ||||
|     }, | ||||
|     "$type": { | ||||
|         "args": "value", | ||||
|         "desc": "以字符串形式返回`值`的類型。 如果該`值`未定義,則將返回`未定義`" | ||||
|     } | ||||
| } | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|     "name": "@node-red/editor-client", | ||||
|     "version": "1.0.1", | ||||
|     "version": "1.0.4", | ||||
|     "license": "Apache-2.0", | ||||
|     "repository": { | ||||
|         "type": "git", | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| ace.define("ace/snippets/nrjavascript",[],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="nrjavascript"}); | ||||
| ace.define("ace/snippets/nrjavascript",[],function(e,t,n){"use strict";t.snippetText='# Prototype\nsnippet proto\n	${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {\n		${4:// body...}\n	};\n# Function\nsnippet fun\n	function ${1?:function_name}(${2:argument}) {\n		${3:// body...}\n	}\n# Anonymous Function\nregex /((=)\\s*|(:)\\s*|(\\()|\\b)/f/(\\))?/\nsnippet f\n	function${M1?: ${1:functionName}}($2) {\n		${0:$TM_SELECTED_TEXT}\n	}${M2?;}${M3?,}${M4?)}\n# Immediate function\ntrigger \\(?f\\(\nendTrigger \\)?\nsnippet f(\n	(function(${1}) {\n		${0:${TM_SELECTED_TEXT:/* code */}}\n	}(${1}));\n# if\nsnippet if\n	if (${1:true}) {\n		${0}\n	}\n# if ... else\nsnippet ife\n	if (${1:true}) {\n		${2}\n	} else {\n		${0}\n	}\n# tertiary conditional\nsnippet ter\n	${1:/* condition */} ? ${2:a} : ${3:b}\n# switch\nsnippet switch\n	switch (${1:expression}) {\n		case \'${3:case}\':\n			${4:// code}\n			break;\n		${5}\n		default:\n			${2:// code}\n	}\n# case\nsnippet case\n	case \'${1:case}\':\n		${2:// code}\n		break;\n	${3}\n\n# while (...) {...}\nsnippet wh\n	while (${1:/* condition */}) {\n		${0:/* code */}\n	}\n# try\nsnippet try\n	try {\n		${0:/* code */}\n	} catch (e) {}\n# do...while\nsnippet do\n	do {\n		${2:/* code */}\n	} while (${1:/* condition */});\n# Object Method\nsnippet :f\nregex /([,{[])|^\\s*/:f/\n	${1:method_name}: function(${2:attribute}) {\n		${0}\n	}${3:,}\n# setTimeout function\nsnippet setTimeout\nregex /\\b/st|timeout|setTimeo?u?t?/\n	setTimeout(function() {${3:$TM_SELECTED_TEXT}}, ${1:10});\n# console.log (Firebug)\nsnippet cl\n	console.log(${1});\n# return\nsnippet ret\n	return ${1:result}\n# for (property in object ) { ... }\nsnippet fori\n	for (var ${1:prop} in ${2:Things}) {\n		${0:$2[$1]}\n	}\n# hasOwnProperty\nsnippet has\n	hasOwnProperty(${1})\n# docstring\nsnippet /**\n	/**\n	 * ${1:description}\n	 *\n	 */\nsnippet @par\nregex /^\\s*\\*\\s*/@(para?m?)?/\n	@param {${1:type}} ${2:name} ${3:description}\nsnippet @ret\n	@return {${1:type}} ${2:description}\n# JSON.parse\nsnippet jsonp\n	JSON.parse(${1:jstr});\n# JSON.stringify\nsnippet jsons\n	JSON.stringify(${1:object});\n# self-defining function\nsnippet sdf\n	var ${1:function_name} = function(${2:argument}) {\n		${3:// initial code ...}\n\n		$1 = function($2) {\n			${4:// main code}\n		};\n	}\n# \nsnippet for-\n	for (var ${1:i} = ${2:Things}.length; ${1:i}--; ) {\n		${0:${2:Things}[${1:i}];}\n	}\n# for (...) {...}\nsnippet for\n	for (var ${1:i} = 0; $1 < ${2:Things}.length; $1++) {\n		${3:$2[$1]}$0\n	}\n# for (...) {...} (Improved Native For-Loop)\nsnippet forr\n	for (var ${1:i} = ${2:Things}.length - 1; $1 >= 0; $1--) {\n		${3:$2[$1]}$0\n	}\n# Node-RED Specific Funcs\nsnippet nodes\n	node.send(${1:msg})\nsnippet clone\n	RED.util.cloneMessage(${1:msg})\nsnippet nodel\n	node.log($1)\nsnippet nodew\n	node.warn($1)\nsnippet nodee\n	node.error($1)\nsnippet noded\n	node.debug($1)\nsnippet done\n	node.done($1)\nsnippet flowg\n	flow.get($1)\nsnippet flows\n	flow.set($1, $2)\nsnippet globalg\n	global.get($1)\nsnippet globals\n	global.set($1, $2)\n',t.scope="nrjavascript"}); | ||||
|                 (function() { | ||||
|                     ace.require(["ace/snippets/nrjavascript"], function(m) { | ||||
|                         if (typeof module == "object" && typeof exports == "object" && module) { | ||||
| @@ -6,4 +6,3 @@ ace.define("ace/snippets/nrjavascript",[],function(e,t,n){"use strict";t.snippet | ||||
|                         } | ||||
|                     }); | ||||
|                 })(); | ||||
|              | ||||
| @@ -39,7 +39,7 @@ RED.history = (function() { | ||||
|                 inverseEv = { | ||||
|                     t: 'replace', | ||||
|                     config: RED.nodes.createCompleteNodeSet(), | ||||
|                     changed: [], | ||||
|                     changed: {}, | ||||
|                     rev: RED.nodes.version() | ||||
|                 }; | ||||
|                 RED.nodes.clear(); | ||||
|   | ||||
| @@ -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) { | ||||
|   | ||||
| @@ -418,8 +418,6 @@ var RED = (function() { | ||||
|                 RED.notify(RED._("palette.event.nodeUpgraded", {module:msg.module,version:msg.version}),"success"); | ||||
|                 RED.nodes.registry.setModulePendingUpdated(msg.module,msg.version); | ||||
|             } | ||||
|             // Refresh flow library to ensure any examples are updated | ||||
|             RED.library.loadFlowLibrary(); | ||||
|         }); | ||||
|         RED.comms.subscribe("event-log/#", function(topic,payload) { | ||||
|             var id = topic.substring(9); | ||||
| @@ -433,7 +431,7 @@ var RED = (function() { | ||||
|             '<img width="50px" src="red/images/node-red-icon.svg" />'+ | ||||
|             '</div>'; | ||||
|  | ||||
|             RED.sidebar.info.set(aboutHeader+marked(data)); | ||||
|             RED.sidebar.info.set(aboutHeader+RED.utils.renderMarkdown(data)); | ||||
|             RED.sidebar.info.show(); | ||||
|         }); | ||||
|     } | ||||
|   | ||||
| @@ -56,8 +56,9 @@ RED.settings = (function () { | ||||
|         if (key === "auth-tokens") { | ||||
|             return JSON.parse(localStorage.getItem(key)); | ||||
|         } else { | ||||
|             var v; | ||||
|             try { | ||||
|                 var v = RED.utils.getMessageProperty(userSettings,key); | ||||
|                 v = RED.utils.getMessageProperty(userSettings,key); | ||||
|                 if (v === undefined) { | ||||
|                     v = defaultIfUndefined; | ||||
|                 } | ||||
|   | ||||
| @@ -244,7 +244,7 @@ RED.menu = (function() { | ||||
|  | ||||
|     function addItem(id,opt) { | ||||
|         var item = createMenuItem(opt); | ||||
|         if (opt.group) { | ||||
|         if (opt !== null && opt.group) { | ||||
|             var groupItems = $("#"+id+"-submenu").children(".red-ui-menu-group-"+opt.group); | ||||
|             if (groupItems.length === 0) { | ||||
|                 item.appendTo("#"+id+"-submenu"); | ||||
|   | ||||
| @@ -38,7 +38,10 @@ | ||||
|             this.element.addClass("red-ui-searchBox-input"); | ||||
|             this.uiContainer = this.element.wrap("<div>").parent(); | ||||
|             this.uiContainer.addClass("red-ui-searchBox-container"); | ||||
|  | ||||
|             if (this.element.parents("form").length === 0) { | ||||
|                 var form = this.element.wrap("<form>").parent(); | ||||
|                 form.addClass("red-ui-searchBox-form"); | ||||
|             } | ||||
|             $('<i class="fa fa-search"></i>').prependTo(this.uiContainer); | ||||
|             this.clearButton = $('<a href="#"><i class="fa fa-times"></i></a>').appendTo(this.uiContainer); | ||||
|             this.clearButton.on("click",function(e) { | ||||
|   | ||||
| @@ -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]) { | ||||
|   | ||||
| @@ -410,7 +410,7 @@ | ||||
|                     return; | ||||
|                 } | ||||
|                 if (container.hasClass("expanded")) { | ||||
|                     done && done(); | ||||
|                     if (done) { done() } | ||||
|                     return; | ||||
|                 } | ||||
|                 if (!container.hasClass("built") && (item.deferBuild || typeof item.children === 'function')) { | ||||
| @@ -435,7 +435,7 @@ | ||||
|                                 spinner.remove(); | ||||
|                             } | ||||
|                         } | ||||
|                         done && done(); | ||||
|                         if (done) { done() } | ||||
|                         that._trigger("childrenloaded",null,item) | ||||
|                     } | ||||
|                     if (typeof item.children === 'function') { | ||||
| @@ -457,7 +457,7 @@ | ||||
|                     } else { | ||||
|                         item.treeList.childList.slideDown('fast'); | ||||
|                     } | ||||
|                     done && done(); | ||||
|                     if (done) { done() } | ||||
|                 } | ||||
|                 container.addClass("expanded"); | ||||
|             } | ||||
|   | ||||
| @@ -334,8 +334,7 @@ RED.deploy = (function() { | ||||
|                 var invalidNodes = []; | ||||
|  | ||||
|                 RED.nodes.eachNode(function(node) { | ||||
|                     hasInvalid = hasInvalid || !node.valid; | ||||
|                     if (!node.valid) { | ||||
|                     if (!node.valid && !node.d) { | ||||
|                         invalidNodes.push(getNodeInfo(node)); | ||||
|                     } | ||||
|                     if (node.type === "unknown") { | ||||
| @@ -345,6 +344,7 @@ RED.deploy = (function() { | ||||
|                     } | ||||
|                 }); | ||||
|                 hasUnknown = unknownNodes.length > 0; | ||||
|                 hasInvalid = invalidNodes.length > 0; | ||||
|  | ||||
|                 var unusedConfigNodes = []; | ||||
|                 RED.nodes.eachConfig(function(node) { | ||||
|   | ||||
| @@ -1029,9 +1029,9 @@ RED.diff = (function() { | ||||
|         } | ||||
|  | ||||
|         var localSelectDiv = $('<label>',{class:"red-ui-diff-selectbox",for:safeNodeId+"-local"}).on("click", function(e) { e.stopPropagation();}).appendTo(localDiv); | ||||
|         var localRadio = $('<input>',{class:"red-ui-diff-selectbox-input",id:safeNodeId+"-local",type:'radio',value:"local",name:safeNodeId,class:className+"-local"}).data('node-id',node.id).on("change", changeHandler).appendTo(localSelectDiv); | ||||
|         var localRadio = $('<input>',{class:"red-ui-diff-selectbox-input "+className+"-local",id:safeNodeId+"-local",type:'radio',value:"local",name:safeNodeId}).data('node-id',node.id).on("change", changeHandler).appendTo(localSelectDiv); | ||||
|         var remoteSelectDiv = $('<label>',{class:"red-ui-diff-selectbox",for:safeNodeId+"-remote"}).on("click", function(e) { e.stopPropagation();}).appendTo(remoteDiv); | ||||
|         var remoteRadio = $('<input>',{class:"red-ui-diff-selectbox-input",id:safeNodeId+"-remote",type:'radio',value:"remote",name:safeNodeId,class:className+"-remote"}).data('node-id',node.id).on("change", changeHandler).appendTo(remoteSelectDiv); | ||||
|         var remoteRadio = $('<input>',{class:"red-ui-diff-selectbox-input "+className+"-remote",id:safeNodeId+"-remote",type:'radio',value:"remote",name:safeNodeId}).data('node-id',node.id).on("change", changeHandler).appendTo(remoteSelectDiv); | ||||
|         if (state === 'local') { | ||||
|             localRadio.prop('checked',true); | ||||
|         } else if (state === 'remote') { | ||||
|   | ||||
| @@ -202,6 +202,7 @@ RED.editor = (function() { | ||||
|     function updateNodeProperties(node, outputMap) { | ||||
|         node.resize = true; | ||||
|         node.dirty = true; | ||||
|         node.dirtyStatus = true; | ||||
|         var removedLinks = []; | ||||
|         if (node.ports) { | ||||
|             if (outputMap) { | ||||
| @@ -581,11 +582,12 @@ RED.editor = (function() { | ||||
|  | ||||
|         // Add dummy fields to prevent 'Enter' submitting the form in some | ||||
|         // cases, and also prevent browser auto-fill of password | ||||
|         // Add in reverse order as they are prepended... | ||||
|         $('<input type="password" style="display: none;" />').prependTo(dialogForm); | ||||
|         $('<input type="text" style="display: none;" />').prependTo(dialogForm); | ||||
|         //  - the elements cannot be hidden otherwise Chrome will ignore them. | ||||
|         //  - the elements need to have id's that imply password/username | ||||
|         $('<span style="position: absolute; top: -2000px;"><input id="red-ui-trap-password" type="password"/></span>').prependTo(dialogForm); | ||||
|         $('<span style="position: absolute; top: -2000px;"><input id="red-ui-trap-username"  type="text"/></span>').prependTo(dialogForm); | ||||
|         dialogForm.on("submit", function(e) { e.preventDefault();}); | ||||
|         dialogForm.find('input').attr("autocomplete","disable"); | ||||
|         dialogForm.find('input').attr("autocomplete","off"); | ||||
|         return dialogForm; | ||||
|     } | ||||
|  | ||||
| @@ -1319,11 +1321,13 @@ RED.editor = (function() { | ||||
|                                                 newValue = parseInt(newValue); | ||||
|                                             } | ||||
|                                         } | ||||
|                                         if (editing_node._def.defaults[d].type) { | ||||
|                                             if (newValue == "_ADD_") { | ||||
|                                                 newValue = ""; | ||||
|                                             } | ||||
|                                         } | ||||
|                                         if (editing_node[d] != newValue) { | ||||
|                                             if (editing_node._def.defaults[d].type) { | ||||
|                                                 if (newValue == "_ADD_") { | ||||
|                                                     newValue = ""; | ||||
|                                                 } | ||||
|                                                 // Change to a related config node | ||||
|                                                 var configNode = RED.nodes.node(editing_node[d]); | ||||
|                                                 if (configNode) { | ||||
| @@ -2483,7 +2487,7 @@ RED.editor = (function() { | ||||
|             editor.toolbar = customEditTypes['_markdown'].buildToolbar(toolbarRow,editor); | ||||
|             if (options.expandable !== false) { | ||||
|                 var expandButton = $('<button type="button" class="red-ui-button" style="float: right;"><i class="fa fa-expand"></i></button>').appendTo(editor.toolbar); | ||||
|  | ||||
|                 RED.popover.tooltip(expandButton, RED._("markdownEditor.expand")); | ||||
|                 expandButton.on("click", function(e) { | ||||
|                     e.preventDefault(); | ||||
|                     var value = editor.getValue(); | ||||
| @@ -2557,7 +2561,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 | ||||
|          */ | ||||
|   | ||||
| @@ -102,7 +102,7 @@ | ||||
|                         var f = $(this).val(); | ||||
|                         var args = RED._('jsonata:'+f+".args",{defaultValue:''}); | ||||
|                         var title = "<h5>"+f+"("+args+")</h5>"; | ||||
|                         var body = marked(RED._('jsonata:'+f+'.desc',{defaultValue:''})); | ||||
|                         var body = RED.utils.renderMarkdown(RED._('jsonata:'+f+'.desc',{defaultValue:''})); | ||||
|                         $("#red-ui-editor-type-expression-help").html(title+"<p>"+body+"</p>"); | ||||
|  | ||||
|                     }) | ||||
| @@ -207,6 +207,7 @@ | ||||
|                         } | ||||
|                         expressionEditor.getSession().setValue(v||"",-1); | ||||
|                     }); | ||||
|                     funcSelect.change(); | ||||
|  | ||||
|                     var tabs = RED.tabs.create({ | ||||
|                         element: $("#red-ui-editor-type-expression-tabs"), | ||||
|   | ||||
| @@ -106,7 +106,7 @@ | ||||
|             options.push({id:"red-ui-editor-type-json-menu-duplicate", icon:"fa fa-copy", label:RED._("jsonEditor.duplicate"),onselect:function(){ | ||||
|                 var newKey = item.key; | ||||
|                 if (item.parent.type === 'array') { | ||||
|                     newKey = parent.children.length; | ||||
|                     newKey = item.parent.children.length; | ||||
|                 } else { | ||||
|                     var m = /^(.*?)(-(\d+))?$/.exec(newKey); | ||||
|                     var usedKeys = {}; | ||||
| @@ -141,6 +141,7 @@ | ||||
|                 }) | ||||
|             }}); | ||||
|             options.push({id:"red-ui-editor-type-json-menu-collapse-children",icon:"fa fa-angle-double-up", label:RED._('jsonEditor.collapseItems'),onselect:function(){ | ||||
|                 item.treeList.collapse(); | ||||
|                 item.children.forEach(function(child) { | ||||
|                     child.treeList.collapse(); | ||||
|                 }) | ||||
| @@ -300,9 +301,9 @@ | ||||
|             var val = $('<input type="text" class="red-ui-editor-type-json-editor-value">').css({width:w+"px"}).val(""+valValue).insertAfter(valueLabel).typedInput({ | ||||
|                 types:[ | ||||
|                     'str','num','bool', | ||||
|                     {value:"null",label:"null",hasValue:false}, | ||||
|                     {value:"array",label:"array",hasValue:false}, | ||||
|                     {value:"object",label:"object",hasValue:false} | ||||
|                     {value:"null",label:RED._("common.type.null"),hasValue:false}, | ||||
|                     {value:"array",label:RED._("common.type.array"),hasValue:false,icon:"red/images/typedInput/json.png"}, | ||||
|                     {value:"object",label:RED._("common.type.object"),hasValue:false,icon:"red/images/typedInput/json.png"} | ||||
|                 ], | ||||
|                 default: valType | ||||
|             }); | ||||
| @@ -326,10 +327,10 @@ | ||||
|                     item.value = valValue; | ||||
|                     var valClass; | ||||
|                     switch(valType) { | ||||
|                         case 'str':    item.children && (orphanedChildren = item.children); item.treeList.makeLeaf(true); item.type = "string";  valClass = "red-ui-debug-msg-type-string"; valValue = '"'+valValue+'"'; break; | ||||
|                         case 'num':    item.children && (orphanedChildren = item.children); item.treeList.makeLeaf(true); item.type = "number";  valClass = "red-ui-debug-msg-type-number"; break; | ||||
|                         case 'bool':   item.children && (orphanedChildren = item.children); item.treeList.makeLeaf(true); item.type = "boolean"; valClass = "red-ui-debug-msg-type-other";  item.value = (valValue === "true"); break; | ||||
|                         case 'null':   item.children && (orphanedChildren = item.children); item.treeList.makeLeaf(true); item.type = "null";    valClass = "red-ui-debug-msg-type-null"; item.value = valValue = "null"; break; | ||||
|                         case 'str':    if (item.children) { orphanedChildren = item.children } item.treeList.makeLeaf(true); item.type = "string";  valClass = "red-ui-debug-msg-type-string"; valValue = '"'+valValue+'"'; break; | ||||
|                         case 'num':    if (item.children) { orphanedChildren = item.children } item.treeList.makeLeaf(true); item.type = "number";  valClass = "red-ui-debug-msg-type-number"; break; | ||||
|                         case 'bool':   if (item.children) { orphanedChildren = item.children } item.treeList.makeLeaf(true); item.type = "boolean"; valClass = "red-ui-debug-msg-type-other";  item.value = (valValue === "true"); break; | ||||
|                         case 'null':   if (item.children) { orphanedChildren = item.children } item.treeList.makeLeaf(true); item.type = "null";    valClass = "red-ui-debug-msg-type-null"; item.value = valValue = "null"; break; | ||||
|                         case 'object': | ||||
|                             item.treeList.makeParent(orphanedChildren); | ||||
|                             item.type = "object"; | ||||
| @@ -484,7 +485,7 @@ | ||||
|                             } else if (activeTab === "json-raw") { | ||||
|                                 result = expressionEditor.getValue(); | ||||
|                             } | ||||
|                             onComplete && onComplete(result); | ||||
|                             if (onComplete) { onComplete(result) } | ||||
|                             RED.tray.close(); | ||||
|                         } | ||||
|                     } | ||||
| @@ -576,7 +577,7 @@ | ||||
|                                     } catch(err) { | ||||
|                                         rootNode = null; | ||||
|                                         list.treeList('data',[{ | ||||
|                                             label: "Invalid JSON: "+err.toString() | ||||
|                                             label: RED._("jsonEditor.error.invalidJSON")+err.toString() | ||||
|                                         }]); | ||||
|                                     } | ||||
|                                 } | ||||
|   | ||||
| @@ -32,7 +32,7 @@ | ||||
|             '<button type="button" class="red-ui-button" data-style="bq"><i class="fa fa-quote-left"></i></button>'+ | ||||
|             '<button type="button" class="red-ui-button" data-style="hr"><i class="fa fa-minus"></i></button>'+ | ||||
|             '<button type="button" class="red-ui-button" data-style="link"><i class="fa fa-link"></i></button>'+ | ||||
|         '</span>' | ||||
|         '</span>'+ | ||||
|     '</div>'; | ||||
|  | ||||
|     var template = '<script type="text/x-red" data-template-name="_markdown">'+ | ||||
| @@ -107,7 +107,7 @@ | ||||
|                         clearTimeout(changeTimer); | ||||
|                         changeTimer = setTimeout(function() { | ||||
|                             var currentScrollTop = $(".red-ui-editor-type-markdown-panel-preview").scrollTop(); | ||||
|                             $(".red-ui-editor-type-markdown-panel-preview").html(marked(expressionEditor.getValue())); | ||||
|                             $(".red-ui-editor-type-markdown-panel-preview").html(RED.utils.renderMarkdown(expressionEditor.getValue())); | ||||
|                             $(".red-ui-editor-type-markdown-panel-preview").scrollTop(currentScrollTop); | ||||
|                         },200); | ||||
|                     }) | ||||
| @@ -116,7 +116,7 @@ | ||||
|                     } | ||||
|  | ||||
|                     if (value) { | ||||
|                         $(".red-ui-editor-type-markdown-panel-preview").html(marked(expressionEditor.getValue())); | ||||
|                         $(".red-ui-editor-type-markdown-panel-preview").html(RED.utils.renderMarkdown(expressionEditor.getValue())); | ||||
|                     } | ||||
|                     panels = RED.panels.create({ | ||||
|                         id:"red-ui-editor-type-markdown-panels", | ||||
|   | ||||
| @@ -524,12 +524,12 @@ RED.keyboard = (function() { | ||||
|         var pane = $('<div id="red-ui-settings-tab-keyboard"></div>'); | ||||
|  | ||||
|         $('<div class="keyboard-shortcut-entry keyboard-shortcut-list-header">'+ | ||||
|         '<div class="keyboard-shortcut-entry-key keyboard-shortcut-entry-text"><input id="red-ui-settings-tab-keyboard-filter" type="text" data-i18n="[placeholder]keyboard.filterActions"></div>'+ | ||||
|         '<div class="keyboard-shortcut-entry-key keyboard-shortcut-entry-text"><input autocomplete="off" name="keyboard-filter" id="red-ui-settings-tab-keyboard-filter" type="text" data-i18n="[placeholder]keyboard.filterActions"></div>'+ | ||||
|         '<div class="keyboard-shortcut-entry-key" data-i18n="keyboard.shortcut"></div>'+ | ||||
|         '<div class="keyboard-shortcut-entry-scope" data-i18n="keyboard.scope"></div>'+ | ||||
|         '</div>').appendTo(pane); | ||||
|  | ||||
|         pane.find("input").searchBox({ | ||||
|         pane.find("#red-ui-settings-tab-keyboard-filter").searchBox({ | ||||
|             delay: 100, | ||||
|             change: function() { | ||||
|                 var filterValue = $(this).val().trim(); | ||||
|   | ||||
| @@ -381,6 +381,7 @@ RED.palette.editor = (function() { | ||||
|                     handleCatalogResponse(null,catalog,index,v); | ||||
|                     refreshNodeModuleList(); | ||||
|                 }).fail(function(jqxhr, textStatus, error) { | ||||
|                     console.warn("Error loading catalog",catalog,":",error); | ||||
|                     handleCatalogResponse(jqxhr,catalog,index); | ||||
|                 }).always(function() { | ||||
|                     handled++; | ||||
| @@ -788,7 +789,7 @@ RED.palette.editor = (function() { | ||||
|             initInstallTab(); | ||||
|         }) | ||||
|  | ||||
|         packageList = $('<ol>',{style:"position: absolute;top: 78px;bottom: 0;left: 0;right: 0px;"}).appendTo(installTab).editableList({ | ||||
|         packageList = $('<ol>',{style:"position: absolute;top: 79px;bottom: 0;left: 0;right: 0px;"}).appendTo(installTab).editableList({ | ||||
|             addButton: false, | ||||
|             scrollOnAdd: false, | ||||
|             addItem: function(container,i,object) { | ||||
|   | ||||
| @@ -92,8 +92,11 @@ RED.palette = (function() { | ||||
|         var lineHeight = 20; | ||||
|         var portHeight = 10; | ||||
|  | ||||
|         el.attr("data-palette-label",label); | ||||
|  | ||||
|         label = RED.utils.sanitize(label); | ||||
|  | ||||
|  | ||||
|         var words = label.split(/[ -]/); | ||||
|  | ||||
|         var displayLines = []; | ||||
| @@ -212,16 +215,14 @@ RED.palette = (function() { | ||||
|             } | ||||
|  | ||||
|             $('<div/>', { | ||||
|                 class: "red-ui-palette-label" | ||||
|                      + (((!def.align && def.inputs !== 0 && def.outputs === 0) || "right" === def.align) ? " red-ui-palette-label-right" : "") | ||||
|                 class: "red-ui-palette-label"+(((!def.align && def.inputs !== 0 && def.outputs === 0) || "right" === def.align) ? " red-ui-palette-label-right" : "") | ||||
|             }).appendTo(d); | ||||
|  | ||||
|  | ||||
|             if (def.icon) { | ||||
|                 var icon_url = RED.utils.getNodeIcon(def); | ||||
|                 var iconContainer = $('<div/>', { | ||||
|                     class: "red-ui-palette-icon-container" | ||||
|                          + (((!def.align && def.inputs !== 0 && def.outputs === 0) || "right" === def.align) ? " red-ui-palette-icon-container-right" : "") | ||||
|                     class: "red-ui-palette-icon-container"+(((!def.align && def.inputs !== 0 && def.outputs === 0) || "right" === def.align) ? " red-ui-palette-icon-container-right" : "") | ||||
|                 }).appendTo(d); | ||||
|                 RED.utils.createIconElement(icon_url, iconContainer, true); | ||||
|             } | ||||
| @@ -268,7 +269,7 @@ RED.palette = (function() { | ||||
|                 RED.view.focus(); | ||||
|                 var helpText; | ||||
|                 if (nt.indexOf("subflow:") === 0) { | ||||
|                     helpText = marked(RED.nodes.subflow(nt.substring(8)).info||"")||('<span class="red-ui-help-info-none">'+RED._("sidebar.info.none")+'</span>'); | ||||
|                     helpText = RED.utils.renderMarkdown(RED.nodes.subflow(nt.substring(8)).info||"")||('<span class="red-ui-help-info-none">'+RED._("sidebar.info.none")+'</span>'); | ||||
|                 } else { | ||||
|                     helpText = $("script[data-help-name='"+d.attr("data-palette-type")+"']").html()||('<span class="red-ui-help-info-none">'+RED._("sidebar.info.none")+'</span>'); | ||||
|                 } | ||||
| @@ -369,7 +370,7 @@ RED.palette = (function() { | ||||
|                     RED.workspaces.show(nt.substring(8)); | ||||
|                     e.preventDefault(); | ||||
|                 }); | ||||
|                 nodeInfo = marked(def.info||""); | ||||
|                 nodeInfo = RED.utils.renderMarkdown(def.info||""); | ||||
|             } | ||||
|             setLabel(nt,d,label,nodeInfo); | ||||
|  | ||||
| @@ -419,14 +420,10 @@ RED.palette = (function() { | ||||
|             var portOutput = paletteNode.find(".red-ui-palette-port-output"); | ||||
|  | ||||
|             var paletteLabel = paletteNode.find(".red-ui-palette-label"); | ||||
|             paletteLabel.attr("class","red-ui-palette-label" | ||||
|                  + (((!sf._def.align && sf.in.length !== 0 && sf.out.length === 0) || "right" === sf._def.align) ? " red-ui-palette-label-right" : "") | ||||
|              ); | ||||
|             paletteLabel.attr("class","red-ui-palette-label" + (((!sf._def.align && sf.in.length !== 0 && sf.out.length === 0) || "right" === sf._def.align) ? " red-ui-palette-label-right" : "")); | ||||
|  | ||||
|             var paletteIconContainer = paletteNode.find(".red-ui-palette-icon-container"); | ||||
|             paletteIconContainer.attr("class","red-ui-palette-icon-container" | ||||
|                   + (((!sf._def.align && sf.in.length !== 0 && sf.out.length === 0) || "right" === sf._def.align) ? " red-ui-palette-icon-container-right" : "") | ||||
|               ); | ||||
|             paletteIconContainer.attr("class","red-ui-palette-icon-container" + (((!sf._def.align && sf.in.length !== 0 && sf.out.length === 0) || "right" === sf._def.align) ? " red-ui-palette-icon-container-right" : "")); | ||||
|  | ||||
|             if (portInput.length === 0 && sf.in.length > 0) { | ||||
|                 var portIn = document.createElement("div"); | ||||
| @@ -443,7 +440,7 @@ RED.palette = (function() { | ||||
|             } else if (portOutput.length !== 0 && sf.out.length === 0) { | ||||
|                 portOutput.remove(); | ||||
|             } | ||||
|             setLabel(sf.type+":"+sf.id,paletteNode,sf.name,marked(sf.info||"")); | ||||
|             setLabel(sf.type+":"+sf.id,paletteNode,sf.name,RED.utils.renderMarkdown(sf.info||"")); | ||||
|             setIcon(paletteNode,sf); | ||||
|  | ||||
|             var currentCategory = paletteNode.data('category'); | ||||
| @@ -475,7 +472,7 @@ RED.palette = (function() { | ||||
|     function filterChange(val) { | ||||
|         var re = new RegExp(val.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'),'i'); | ||||
|         $("#red-ui-palette-container .red-ui-palette-node").each(function(i,el) { | ||||
|             var currentLabel = $(el).find(".red-ui-palette-label").text(); | ||||
|             var currentLabel = $(el).attr("data-palette-label"); | ||||
|             var type = $(el).attr("data-palette-type"); | ||||
|             if (val === "" || re.test(type) || re.test(currentLabel)) { | ||||
|                 $(this).show(); | ||||
|   | ||||
| @@ -158,7 +158,7 @@ RED.projects.settings = (function() { | ||||
|         container.empty(); | ||||
|         var desc; | ||||
|         if (activeProject.description) { | ||||
|             desc = marked(activeProject.description); | ||||
|             desc = RED.utils.renderMarkdown(activeProject.description); | ||||
|         } else { | ||||
|             desc = '<span class="red-ui-help-info-none">' + RED._("sidebar.project.noDescriptionAvailable") + '</span>'; | ||||
|         } | ||||
|   | ||||
| @@ -30,13 +30,13 @@ RED.projects.userSettings = (function() { | ||||
|         $('<div class="red-ui-settings-section-description"></div>').appendTo(gitconfigContainer).text(RED._("editor:sidebar.project.userSettings.committerTip")); | ||||
|  | ||||
|         var row = $('<div class="red-ui-settings-row"></div>').appendTo(gitconfigContainer); | ||||
|         $('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.userName")).appendTo(row); | ||||
|         gitUsernameInput = $('<input type="text">').appendTo(row); | ||||
|         $('<label for="user-settings-gitconfig-username"></label>').text(RED._("editor:sidebar.project.userSettings.userName")).appendTo(row); | ||||
|         gitUsernameInput = $('<input type="text" id="user-settings-gitconfig-username">').appendTo(row); | ||||
|         gitUsernameInput.val(currentGitSettings.user.name||""); | ||||
|  | ||||
|         row = $('<div class="red-ui-settings-row"></div>').appendTo(gitconfigContainer); | ||||
|         $('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.email")).appendTo(row); | ||||
|         gitEmailInput = $('<input type="text">').appendTo(row); | ||||
|         $('<label for="user-settings-gitconfig-email"></label>').text(RED._("editor:sidebar.project.userSettings.email")).appendTo(row); | ||||
|         gitEmailInput = $('<input type="text" id="user-settings-gitconfig-email">').appendTo(row); | ||||
|         gitEmailInput.val(currentGitSettings.user.email||""); | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -1938,8 +1938,9 @@ RED.projects = (function() { | ||||
|                 resultCallbackArgs = data; | ||||
|             } | ||||
|         }).fail(function(xhr,textStatus,err) { | ||||
|             var responses; | ||||
|             if (options.responses && options.responses[xhr.status]) { | ||||
|                 var responses = options.responses[xhr.status]; | ||||
|                 responses = options.responses[xhr.status]; | ||||
|                 if (typeof responses === 'function') { | ||||
|                     resultCallback = responses; | ||||
|                     resultCallbackArgs = {error:responses.statusText}; | ||||
|   | ||||
| @@ -336,7 +336,7 @@ RED.sidebar.versionControl = (function() { | ||||
|  | ||||
|         var unstagedContent = $('<div class="red-ui-sidebar-vc-change-container"></div>').appendTo(localChanges.content); | ||||
|         var header = $('<div class="red-ui-sidebar-vc-change-header">'+RED._("sidebar.project.versionControl.localFiles")+'</div>').appendTo(unstagedContent); | ||||
|         stageAllButton = $('<button class="red-ui-button red-ui-button-small" style="float: right"><i class="fa fa-plus"></i> '+RED._("sidebar.project.versionControl.all")+'</button>') | ||||
|         stageAllButton = $('<button class="red-ui-button red-ui-button-small" style="position: absolute; right: 5px; top: 5px;"><i class="fa fa-plus"></i> '+RED._("sidebar.project.versionControl.all")+'</button>') | ||||
|             .appendTo(header) | ||||
|             .on("click", function(evt) { | ||||
|                 evt.preventDefault(); | ||||
| @@ -368,7 +368,7 @@ RED.sidebar.versionControl = (function() { | ||||
|         unmergedContent = $('<div class="red-ui-sidebar-vc-change-container"></div>').appendTo(localChanges.content); | ||||
|  | ||||
|         header = $('<div class="red-ui-sidebar-vc-change-header">'+RED._("sidebar.project.versionControl.unmergedChanges")+'</div>').appendTo(unmergedContent); | ||||
|         bg = $('<div style="float: right"></div>').appendTo(header); | ||||
|         bg = $('<div style="position: absolute; right: 5px; top: 5px;"></div>').appendTo(header); | ||||
|         var abortMergeButton = $('<button class="red-ui-button red-ui-button-small" style="margin-right: 5px;">'+RED._("sidebar.project.versionControl.abortMerge")+'</button>') | ||||
|             .appendTo(bg) | ||||
|             .on("click", function(evt) { | ||||
| @@ -433,7 +433,7 @@ RED.sidebar.versionControl = (function() { | ||||
|  | ||||
|         header = $('<div class="red-ui-sidebar-vc-change-header">'+RED._("sidebar.project.versionControl.changeToCommit")+'</div>').appendTo(stagedContent); | ||||
|  | ||||
|         bg = $('<div style="float: right"></div>').appendTo(header); | ||||
|         bg = $('<div style="position: absolute; right: 5px; top: 5px;"></div>').appendTo(header); | ||||
|         var showCommitBox = function() { | ||||
|             commitMessage.val(""); | ||||
|             submitCommitButton.prop("disabled",true); | ||||
|   | ||||
| @@ -19,12 +19,18 @@ RED.subflow = (function() { | ||||
|     var currentLocale = "en-US"; | ||||
|  | ||||
|     var _subflowEditTemplate = '<script type="text/x-red" data-template-name="subflow">'+ | ||||
|         '<div class="form-row"><label for="node-input-name" data-i18n="[append]editor:common.label.name"><i class="fa fa-tag"></i> </label><input type="text" id="node-input-name"></div>'+ | ||||
|         '<div class="form-row">'+ | ||||
|             '<label for="node-input-name" data-i18n="[append]editor:common.label.name"><i class="fa fa-tag"></i> </label>'+ | ||||
|             '<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">'+ | ||||
|         '</div>'+ | ||||
|         '<div id="subflow-input-ui"></div>'+ | ||||
|         '</script>'; | ||||
|  | ||||
|     var _subflowTemplateEditTemplate = '<script type="text/x-red" data-template-name="subflow-template">'+ | ||||
|         '<div class="form-row"><label for="subflow-input-name" data-i18n="[append]common.label.name"><i class="fa fa-tag"></i>  </label><input type="text" id="subflow-input-name"></div>'+ | ||||
|         '<div class="form-row">'+ | ||||
|             '<label for="subflow-input-name" data-i18n="[append]common.label.name"><i class="fa fa-tag"></i>  </label>'+ | ||||
|             '<input type="text" id="subflow-input-name" data-i18n="[placeholder]common.label.name">'+ | ||||
|         '</div>'+ | ||||
|         '<div class="form-row">'+ | ||||
|             '<ul style="margin-bottom: 20px;" id="subflow-env-tabs"></ul>'+ | ||||
|         '</div>'+ | ||||
| @@ -802,8 +808,8 @@ RED.subflow = (function() { | ||||
|             } | ||||
|             $("<option/>", opt).text(item.text).appendTo(locales); | ||||
|         }); | ||||
|         currentLocale = RED.i18n.lang(); | ||||
|         locales.val(currentLocale); | ||||
|         var locale = RED.i18n.lang(); | ||||
|         locales.val(locale); | ||||
|  | ||||
|         locales.on("change", function() { | ||||
|             currentLocale = $(this).val(); | ||||
| @@ -1048,7 +1054,7 @@ RED.subflow = (function() { | ||||
|              } | ||||
|              langs.forEach(function(l) { | ||||
|                  var row = $('<div>').appendTo(content); | ||||
|                  $('<span>').css({display:"inline-block",width:"50px"}).text(l+(l===currentLocale?"*":"")).appendTo(row); | ||||
|                  $('<span>').css({display:"inline-block",width:"120px"}).text(RED._("languages."+l)+(l===currentLocale?"*":"")).appendTo(row);  | ||||
|                  $('<span>').text(ui.label[l]||"").appendTo(row); | ||||
|              }); | ||||
|              return content; | ||||
| @@ -1371,7 +1377,8 @@ RED.subflow = (function() { | ||||
|         } | ||||
|  | ||||
|         var labels = ui.label || {}; | ||||
|         var labelText = lookupLabel(labels, labels["en-US"]||tenv.name, currentLocale); | ||||
|         var locale = RED.i18n.lang(); | ||||
|         var labelText = lookupLabel(labels, labels["en-US"]||tenv.name, locale); | ||||
|         var label = $('<label>').appendTo(row); | ||||
|         var labelContainer = $('<span></span>').appendTo(label); | ||||
|         if (ui.icon) { | ||||
| @@ -1423,7 +1430,7 @@ RED.subflow = (function() { | ||||
|                 input = $('<select>').css('width','70%').appendTo(row); | ||||
|                 if (ui.opts.opts) { | ||||
|                     ui.opts.opts.forEach(function(o) { | ||||
|                         $('<option>').val(o.v).text(lookupLabel(o.l, o.l['en-US']||o.v, currentLocale)).appendTo(input); | ||||
|                         $('<option>').val(o.v).text(lookupLabel(o.l, o.l['en-US']||o.v, locale)).appendTo(input); | ||||
|                     }) | ||||
|                 } | ||||
|                 input.val(val.value); | ||||
|   | ||||
| @@ -231,7 +231,8 @@ RED.sidebar.context = (function() { | ||||
|                                 RED.utils.createObjectElement(RED.utils.decodeObject(payload,format), { | ||||
|                                     typeHint: data.format, | ||||
|                                     sourceId: id+"."+k, | ||||
|                                     tools: tools | ||||
|                                     tools: tools, | ||||
|                                     path: "" | ||||
|                                 }).appendTo(propRow.children()[1]); | ||||
|                             } | ||||
|                         }) | ||||
| @@ -275,7 +276,8 @@ RED.sidebar.context = (function() { | ||||
|                                                 RED.utils.createObjectElement(RED.utils.decodeObject(payload,format), { | ||||
|                                                     typeHint: data.format, | ||||
|                                                     sourceId: id+"."+k, | ||||
|                                                     tools: tools | ||||
|                                                     tools: tools, | ||||
|                                                     path: "" | ||||
|                                                 }).appendTo(propRow.children()[1]); | ||||
|                                             } | ||||
|                                         }); | ||||
| @@ -295,7 +297,8 @@ RED.sidebar.context = (function() { | ||||
|                     RED.utils.createObjectElement(RED.utils.decodeObject(payload,format), { | ||||
|                         typeHint: v.format, | ||||
|                         sourceId: id+"."+k, | ||||
|                         tools: tools | ||||
|                         tools: tools, | ||||
|                         path: "" | ||||
|                     }).appendTo(propRow.children()[1]); | ||||
|                     if (contextStores.length > 1) { | ||||
|                         $("<span>",{class:"red-ui-sidebar-context-property-storename"}).text(v.store).appendTo($(propRow.children()[0])) | ||||
|   | ||||
| @@ -15,17 +15,6 @@ | ||||
|  **/ | ||||
| RED.sidebar.info = (function() { | ||||
|  | ||||
|     marked.setOptions({ | ||||
|         renderer: new marked.Renderer(), | ||||
|         gfm: true, | ||||
|         tables: true, | ||||
|         breaks: false, | ||||
|         pedantic: false, | ||||
|         sanitize: true, | ||||
|         smartLists: true, | ||||
|         smartypants: false | ||||
|     }); | ||||
|  | ||||
|     var content; | ||||
|     var sections; | ||||
|     var propertiesSection; | ||||
| @@ -314,7 +303,7 @@ RED.sidebar.info = (function() { | ||||
|                 if (subflowNode && node.type !== "subflow") { | ||||
|                     // Selected a subflow instance node. | ||||
|                     // - The subflow template info goes into help | ||||
|                     helpText = (marked(subflowNode.info||"")||('<span class="red-ui-help-info-none">'+RED._("sidebar.info.none")+'</span>')); | ||||
|                     helpText = (RED.utils.renderMarkdown(subflowNode.info||"")||('<span class="red-ui-help-info-none">'+RED._("sidebar.info.none")+'</span>')); | ||||
|                 } else { | ||||
|                     helpText = $("script[data-help-name='"+node.type+"']").html()||('<span class="red-ui-help-info-none">'+RED._("sidebar.info.none")+'</span>'); | ||||
|                 } | ||||
| @@ -326,10 +315,10 @@ RED.sidebar.info = (function() { | ||||
|             if (node._def && node._def.info) { | ||||
|                 var info = node._def.info; | ||||
|                 var textInfo = (typeof info === "function" ? info.call(node) : info); | ||||
|                 infoText = infoText + marked(textInfo); | ||||
|                 infoText = infoText + RED.utils.renderMarkdown(textInfo); | ||||
|             } | ||||
|             if (node.info) { | ||||
|                 infoText = infoText + marked(node.info || "") | ||||
|                 infoText = infoText + RED.utils.renderMarkdown(node.info || "") | ||||
|             } | ||||
|             setInfoText(infoText, infoSection.content); | ||||
|  | ||||
|   | ||||
| @@ -16,6 +16,28 @@ | ||||
|  | ||||
| RED.utils = (function() { | ||||
|  | ||||
|     window._marked = window.marked; | ||||
|     window.marked = function(txt) { | ||||
|         console.warn("Use of 'marked()' is deprecated. Use RED.utils.renderMarkdown() instead"); | ||||
|         return renderMarkdown(txt); | ||||
|     } | ||||
|  | ||||
|     _marked.setOptions({ | ||||
|         renderer: new _marked.Renderer(), | ||||
|         gfm: true, | ||||
|         tables: true, | ||||
|         breaks: false, | ||||
|         pedantic: false, | ||||
|         smartLists: true, | ||||
|         smartypants: false | ||||
|     }); | ||||
|  | ||||
|     function renderMarkdown(txt) { | ||||
|         var rendered = _marked(txt); | ||||
|         var cleaned = DOMPurify.sanitize(rendered, {SAFE_FOR_JQUERY: true}) | ||||
|         return cleaned; | ||||
|     } | ||||
|  | ||||
|     function formatString(str) { | ||||
|         return str.replace(/\r?\n/g,"↵").replace(/\t/g,"→"); | ||||
|     } | ||||
| @@ -1053,6 +1075,7 @@ RED.utils = (function() { | ||||
|         decodeObject: decodeObject, | ||||
|         parseContextKey: parseContextKey, | ||||
|         createIconElement: createIconElement, | ||||
|         sanitize: sanitize | ||||
|         sanitize: sanitize, | ||||
|         renderMarkdown: renderMarkdown | ||||
|     } | ||||
| })(); | ||||
|   | ||||
| @@ -753,7 +753,7 @@ RED.view = (function() { | ||||
|         //     .attr("d","M 0 "+(node_height/2)+" H "+(gridSize * -2)) | ||||
|         //     .attr("opacity",0); | ||||
|  | ||||
|         var filter = undefined; | ||||
|         var filter; | ||||
|         if (drag_lines.length > 0) { | ||||
|             if (drag_lines[0].virtualLink) { | ||||
|                 filter = {type:drag_lines[0].node.type === 'link in'?'link out':'link in'} | ||||
| @@ -1495,6 +1495,7 @@ RED.view = (function() { | ||||
|     var lastSelection = null; | ||||
|     function updateSelection() { | ||||
|         var selection = {}; | ||||
|         var activeWorkspace = RED.workspaces.active(); | ||||
|  | ||||
|         var workspaceSelection = RED.workspaces.selection(); | ||||
|         if (workspaceSelection.length === 0) { | ||||
| @@ -1504,7 +1505,6 @@ RED.view = (function() { | ||||
|             if (selected_link != null) { | ||||
|                 selection.link = selected_link; | ||||
|             } | ||||
|             var activeWorkspace = RED.workspaces.active(); | ||||
|             activeLinks = RED.nodes.filterLinks({ | ||||
|                 source:{z:activeWorkspace}, | ||||
|                 target:{z:activeWorkspace} | ||||
| @@ -1622,7 +1622,7 @@ RED.view = (function() { | ||||
|         var workspaceSelection = RED.workspaces.selection(); | ||||
|         if (workspaceSelection.length > 0) { | ||||
|             var workspaceCount = 0; | ||||
|             workspaceSelection.forEach(function(ws) { if (ws.type === 'tab') workspaceCount++ }); | ||||
|             workspaceSelection.forEach(function(ws) { if (ws.type === 'tab') { workspaceCount++ } }); | ||||
|             if (workspaceCount === RED.workspaces.count()) { | ||||
|                 // Cannot delete all workspaces | ||||
|                 return; | ||||
| @@ -1663,7 +1663,7 @@ RED.view = (function() { | ||||
|             var removedLinks = []; | ||||
|             var removedSubflowOutputs = []; | ||||
|             var removedSubflowInputs = []; | ||||
|             var removedSubflowStatus = undefined; | ||||
|             var removedSubflowStatus; | ||||
|             var subflowInstances = []; | ||||
|  | ||||
|             var startDirty = RED.nodes.dirty(); | ||||
|   | ||||
| @@ -164,7 +164,7 @@ RED.workspaces = (function() { | ||||
|                 var dialogForm = $('<form id="dialog-form" class="form-horizontal"></form>').appendTo(trayBody); | ||||
|                 $('<div class="form-row">'+ | ||||
|                     '<label for="node-input-name" data-i18n="[append]editor:common.label.name"><i class="fa fa-tag"></i> </label>'+ | ||||
|                     '<input type="text" id="node-input-name">'+ | ||||
|                     '<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">'+ | ||||
|                 '</div>').appendTo(dialogForm); | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -52,6 +52,10 @@ | ||||
|         @include component-shadow; | ||||
|         border-color: $popover-background; | ||||
|     } | ||||
|     textarea.ace_text-input { | ||||
|         overflow: hidden; | ||||
|         padding: 0px 1px !important; | ||||
|     } | ||||
|  | ||||
|     #red-ui-event-log-editor { | ||||
|         .ace_scroller { | ||||
|   | ||||
| @@ -160,6 +160,7 @@ | ||||
| .red-ui-debug-msg-element { | ||||
|     color: $debug-message-text-color; | ||||
|     line-height: 1.3em; | ||||
|     overflow-wrap: break-word; | ||||
| } | ||||
| .red-ui-debug-msg-object-key { | ||||
|     color: $debug-message-text-color-object-key; | ||||
|   | ||||
| @@ -145,8 +145,8 @@ g.red-ui-flow-node-selected { | ||||
|     border-color: $node-selected-color !important; | ||||
|     border-style: dashed !important; | ||||
|     stroke: $node-selected-color; | ||||
|     stroke-width: 2; | ||||
|     stroke-dasharray: 8, 3; | ||||
|     stroke-width: 3; | ||||
|     stroke-dasharray: 8, 4; | ||||
| } | ||||
|  | ||||
| .red-ui-flow-subflow .red-ui-flow-node { | ||||
|   | ||||
| @@ -27,9 +27,22 @@ | ||||
|             display: none; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     .red-ui-info-table { | ||||
|         table-layout: fixed; | ||||
|     } | ||||
|  | ||||
|     table.red-ui-info-table tr:not(.blank) td:first-child { | ||||
|         width: 30%; | ||||
|     } | ||||
|     table.red-ui-info-table tr:not(.blank) td:last-child { | ||||
|         vertical-align: top; | ||||
|     } | ||||
|  | ||||
| } | ||||
|  | ||||
| .red-ui-sidebar-context-property { | ||||
|     overflow-wrap: break-word; | ||||
|     position: relative; | ||||
|     .red-ui-debug-msg-tools { | ||||
|         right: 0px; | ||||
|   | ||||
| @@ -32,6 +32,9 @@ | ||||
|         right: 5px; | ||||
|         top: 9px; | ||||
|     } | ||||
|     form.red-ui-searchBox-form { | ||||
|         margin: 0; | ||||
|     } | ||||
|     input.red-ui-searchBox-input { | ||||
|         border-radius: 0; | ||||
|         border: none; | ||||
|   | ||||
| @@ -70,6 +70,7 @@ | ||||
|     border: 1px solid $primary-border-color; | ||||
|     box-sizing: border-box; | ||||
|     background: $secondary-background; | ||||
|     white-space: nowrap; | ||||
|     z-index: 2000; | ||||
|     a { | ||||
|         padding: 6px 18px 6px 6px; | ||||
|   | ||||
| @@ -11,6 +11,7 @@ | ||||
|         var length = str.length; | ||||
|         var start = 0; | ||||
|         var inString = false; | ||||
|         var inRegex = false; | ||||
|         var inBox = false; | ||||
|         var quoteChar; | ||||
|         var list = []; | ||||
| @@ -24,8 +25,13 @@ | ||||
|         } | ||||
|         for (var i=0;i<length;i++) { | ||||
|             var c = str[i]; | ||||
|             if (!inString) { | ||||
|                 if (c === "'" || c === '"') { | ||||
|             if (!inString && !inRegex) { | ||||
|                 if (c === "/") { | ||||
|                     inRegex = true; | ||||
|                     frame = {type:"regex",pos:i}; | ||||
|                     list.push(frame); | ||||
|                     stack.push(frame); | ||||
|                 } else if (c === "'" || c === '"') { | ||||
|                     inString = true; | ||||
|                     quoteChar = c; | ||||
|                     frame = {type:"string",pos:i}; | ||||
| @@ -37,6 +43,9 @@ | ||||
|                 } else if (c === ",") { | ||||
|                     frame = {type:",",pos:i}; | ||||
|                     list.push(frame); | ||||
|                 } else if (c === "&") { | ||||
|                     frame = {type:"&",pos:i}; | ||||
|                     list.push(frame); | ||||
|                 } else if (/[\(\[\{]/.test(c)) { | ||||
|                     frame = {type:"open-block",char:c,pos:i}; | ||||
|                     list.push(frame); | ||||
| @@ -44,7 +53,8 @@ | ||||
|                 } else if (/[\}\)\]]/.test(c)) { | ||||
|                     var oldFrame = stack.pop(); | ||||
|                     if (matchingBrackets[oldFrame.char] !== c) { | ||||
|                         //console.log("Stack frame mismatch",c,"at",i,"expected",matchingBrackets[oldFrame.char],"from",oldFrame.pos); | ||||
|                         // console.log("Stack frame mismatch",c,"at",i,"expected",matchingBrackets[oldFrame.char],"from",oldFrame.pos); | ||||
|                         // console.log(list); | ||||
|                         return str; | ||||
|                     } | ||||
|                     //console.log("Closing",c,"at",i,"compare",oldFrame.type,oldFrame.pos); | ||||
| @@ -53,19 +63,32 @@ | ||||
|                     list.push(frame); | ||||
|                 } | ||||
|             } else { | ||||
|                 if (c === quoteChar) { | ||||
|                     // Next char must be a ] | ||||
|                     inString = false; | ||||
|                     stack.pop(); | ||||
|                 if (c === "\\") { | ||||
|                     // an escaped char - stay in current mode and skip the next char | ||||
|                     i++; | ||||
|                 } | ||||
|                 if (inString) { | ||||
|                     if (c === quoteChar) { | ||||
|                         // Next char must be a ] | ||||
|                         inString = false; | ||||
|                         var f = stack.pop(); | ||||
|                         f.end = i; | ||||
|                     } | ||||
|                 } else if (inRegex) { | ||||
|                     if (c === "/") { | ||||
|                         inRegex = false; | ||||
|                         var f = stack.pop(); | ||||
|                         f.end = i; | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|         } | ||||
|         // console.log(stack); | ||||
|         // console.log("list",list); | ||||
|  | ||||
|         var result = str; | ||||
|         var indent = 0; | ||||
|         var offset = 0; | ||||
|         var pre,post,indented; | ||||
|         var pre,post,indented,hasNewline; | ||||
|         var longStack = []; | ||||
|         list.forEach(function(f) { | ||||
|             if (f.type === ";" || f.type === ",") { | ||||
| @@ -73,29 +96,51 @@ | ||||
|                     pre = result.substring(0,offset+f.pos+1); | ||||
|                     post = result.substring(offset+f.pos+1); | ||||
|                     indented = indentLine(post,indent); | ||||
|                     result = pre+"\n"+indented; | ||||
|                     offset += indented.length-post.length+1; | ||||
|                     hasNewline = /\n$/.test(pre); | ||||
|                     // console.log("A§"+pre+"§\n§"+indented+"§",hasNewline); | ||||
|                     result = pre+(hasNewline?"":"\n")+indented; | ||||
|                     offset += indented.length-post.length+(hasNewline?0:1); | ||||
|                 } | ||||
|             } else if (f.type === "&") { | ||||
|                 pre = result.substring(0,offset+f.pos+1); | ||||
|                 var lastLineBreak = pre.lastIndexOf("\n"); | ||||
|                 var lineLength = pre.length - lastLineBreak; | ||||
|                 if (lineLength > 70) { | ||||
|                     post = result.substring(offset+f.pos+1); | ||||
|                     if (!/^\n/.test(post)) { | ||||
|                         indented = indentLine(post,indent); | ||||
|                         hasNewline = /\n$/.test(pre); | ||||
|                         result = pre+(hasNewline?"":"\n")+indented; | ||||
|                         offset += indented.length-post.length+(hasNewline?0:1); | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|             } else if (f.type === "open-block") { | ||||
|                 if (f.width > 30) { | ||||
|                 if (f.width > 40) { | ||||
|                     longStack.push(true); | ||||
|                     indent += 4; | ||||
|                     pre = result.substring(0,offset+f.pos+1); | ||||
|                     post = result.substring(offset+f.pos+1); | ||||
|                     hasNewline = /\n$/.test(pre); | ||||
|                     indented = indentLine(post,indent); | ||||
|                     result = pre+"\n"+indented; | ||||
|                     offset += indented.length-post.length+1; | ||||
|                     result = pre+(hasNewline?"":"\n")+indented; | ||||
|                     offset += indented.length-post.length+(hasNewline?0:1); | ||||
|                 } else { | ||||
|                     longStack.push(false); | ||||
|                 } | ||||
|             } else if (f.type === "close-block") { | ||||
|                 if (f.width > 30) { | ||||
|                 if (f.width > 40) { | ||||
|                     indent -= 4; | ||||
|                     pre = result.substring(0,offset+f.pos); | ||||
|                     post = result.substring(offset+f.pos); | ||||
|                     indented = indentLine(post,indent); | ||||
|                     result = pre+"\n"+indented; | ||||
|                     offset += indented.length-post.length+1; | ||||
|                     hasNewline = /\n *$/.test(pre); | ||||
|                     if (hasNewline) { | ||||
|                         result = pre + post; | ||||
|                     } else { | ||||
|                         result = pre+"\n"+indented; | ||||
|                         offset += indented.length-post.length+1; | ||||
|                     } | ||||
|                 } | ||||
|                 longStack.pop(); | ||||
|             } | ||||
| @@ -109,6 +154,7 @@ | ||||
|     { | ||||
|         '$abs':{ args:[ 'number' ]}, | ||||
|         '$append':{ args:[ 'array1', 'array2' ]}, | ||||
|         '$assert':{ args: [ 'arg', 'str' ]}, | ||||
|         '$average':{ args:[ 'array' ]}, | ||||
|         '$base64decode':{ args:[  ]}, | ||||
|         '$base64encode':{ args:[  ]}, | ||||
| @@ -116,8 +162,14 @@ | ||||
|         '$ceil':{ args:[ 'number' ]}, | ||||
|         '$contains':{ args:[ 'str', 'pattern' ]}, | ||||
|         '$count':{ args:[ 'array' ]}, | ||||
|         '$decodeUrl':{ args:[ 'str' ]}, | ||||
|         '$decodeUrlComponent':{ args:[ 'str' ]}, | ||||
|         '$distinct':{ args:[ 'array' ]}, | ||||
|         '$each':{ args:[ 'object', 'function' ]}, | ||||
|         '$encodeUrl':{ args: ['str'] }, | ||||
|         '$encodeUrlComponent':{ args:[ 'str' ]}, | ||||
|         '$env': { args:[ 'arg' ]}, | ||||
|         '$error':{ args:[ 'str' ]}, | ||||
|         '$eval': { args: ['expr', 'context']}, | ||||
|         '$exists':{ args:[ 'arg' ]}, | ||||
|         '$filter':{ args:[ 'array', 'function' ]}, | ||||
| @@ -151,18 +203,20 @@ | ||||
|         '$reverse':{ args:[ 'array' ]}, | ||||
|         '$round':{ args:[ 'number', 'precision' ]}, | ||||
|         '$shuffle':{ args:[ 'array' ]}, | ||||
|         '$sift':{ args:[ 'object', 'function' ]}, | ||||
|         '$sift':{ args: ['object', 'function'] }, | ||||
|         '$single':{ args: ['array', 'function'] }, | ||||
|         '$sort':{ args:[ 'array', 'function' ]}, | ||||
|         '$split':{ args:[ 'str', 'separator', 'limit' ]}, | ||||
|         '$spread':{ args:[ 'object' ]}, | ||||
|         '$sqrt':{ args:[ 'number' ]}, | ||||
|         '$string':{ args:[ 'arg' ]}, | ||||
|         '$string':{ args:[ 'arg', 'prettify' ]}, | ||||
|         '$substring':{ args:[ 'str', 'start', 'length' ]}, | ||||
|         '$substringAfter':{ args:[ 'str', 'chars' ]}, | ||||
|         '$substringBefore':{ args:[ 'str', 'chars' ]}, | ||||
|         '$sum':{ args:[ 'array' ]}, | ||||
|         '$toMillis':{args:['timestamp']}, // <------------- | ||||
|         '$trim':{ args:[ 'str' ]}, | ||||
|         '$type':{ args:['value']}, | ||||
|         '$uppercase':{ args:[ 'str' ]}, | ||||
|         '$zip':{ args:[ 'array1' ]} | ||||
|     } | ||||
|   | ||||
| @@ -28,6 +28,11 @@ ace.define("ace/mode/jsonata",["require","exports","module","ace/lib/oop","ace/m | ||||
|         }, "identifier"); | ||||
|         this.$rules = { | ||||
|             "start" : [ | ||||
|                 { | ||||
|                     token: "string.regexp", | ||||
|                     regex: "\\/", | ||||
|                     next: "regex" | ||||
|                 }, | ||||
|                 { | ||||
|                     token : "string", | ||||
|                     regex : "'(?=.)", | ||||
| @@ -46,34 +51,35 @@ ace.define("ace/mode/jsonata",["require","exports","module","ace/lib/oop","ace/m | ||||
|                     token : "constant.numeric", // float | ||||
|                     regex : /[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ | ||||
|                 }, | ||||
|                 {   token: "keyword", | ||||
|                 regex: /λ/ | ||||
|             }, | ||||
|             { | ||||
|                 token: "keyword", | ||||
|                 regex: jsonataFunctions | ||||
|             }, | ||||
|             { | ||||
|                 token : keywordMapper, | ||||
|                 regex : "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*" | ||||
|             }, | ||||
|             { | ||||
|                 token : "punctuation.operator", | ||||
|                 regex : /[.](?![.])/ | ||||
|             }, | ||||
|             { | ||||
|                 token : "keyword.operator", | ||||
|                 regex : /\|\||<=|>=|\.\.|\*\*|!=|:=|[=<>`!$%&*+\-~\/^]/, | ||||
|                 next  : "start" | ||||
|             }, | ||||
|             { | ||||
|                 token : "punctuation.operator", | ||||
|                 regex : /[?:,;.]/, | ||||
|                 next  : "start" | ||||
|             }, | ||||
|             { | ||||
|                 token : "paren.lparen", | ||||
|                 regex : /[\[({]/, | ||||
|                 { | ||||
|                     token: "keyword", | ||||
|                     regex: /λ/ | ||||
|                 }, | ||||
|                 { | ||||
|                     token: "keyword", | ||||
|                     regex: jsonataFunctions | ||||
|                 }, | ||||
|                 { | ||||
|                     token : keywordMapper, | ||||
|                     regex : "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*" | ||||
|                 }, | ||||
|                 { | ||||
|                     token : "punctuation.operator", | ||||
|                     regex : /[.](?![.])/ | ||||
|                 }, | ||||
|                 { | ||||
|                     token : "keyword.operator", | ||||
|                     regex : /\|\||<=|>=|\.\.|\*\*|!=|:=|[=<>`!$%&*+\-~\/^]/, | ||||
|                     next  : "start" | ||||
|                 }, | ||||
|                 { | ||||
|                     token : "punctuation.operator", | ||||
|                     regex : /[?:,;.]/, | ||||
|                     next  : "start" | ||||
|                 }, | ||||
|                 { | ||||
|                     token : "paren.lparen", | ||||
|                     regex : /[\[({]/, | ||||
|                     next  : "start" | ||||
|                 }, | ||||
|                 { | ||||
| @@ -86,7 +92,8 @@ ace.define("ace/mode/jsonata",["require","exports","module","ace/lib/oop","ace/m | ||||
|                     token : "string", | ||||
|                     regex : '"|$', | ||||
|                     next  : "start" | ||||
|                 }, { | ||||
|                 }, | ||||
|                 { | ||||
|                     defaultToken: "string" | ||||
|                 } | ||||
|             ], | ||||
| @@ -95,9 +102,24 @@ ace.define("ace/mode/jsonata",["require","exports","module","ace/lib/oop","ace/m | ||||
|                     token : "string", | ||||
|                     regex : "'|$", | ||||
|                     next  : "start" | ||||
|                 }, { | ||||
|                 }, | ||||
|                 { | ||||
|                     defaultToken: "string" | ||||
|                 } | ||||
|             ], | ||||
|             "regex" : [ | ||||
|                 { | ||||
|                     token: "string.regexp", | ||||
|                     regex: "\\\\/" | ||||
|                 }, | ||||
|                 { | ||||
|                     token: "string.regexp", | ||||
|                     regex: "/[sxngimy]*", | ||||
|                     next: "start" | ||||
|                 }, | ||||
|                 { | ||||
|                     defaultToken: "string.regexp" | ||||
|                 } | ||||
|             ] | ||||
|         }; | ||||
|     }; | ||||
|   | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -30,16 +30,16 @@ | ||||
|    <!-- (with the 'node-input-' prefix).                                     --> | ||||
|    <!-- The available icon classes are defined Font Awesome Icons (FA Icons) --> | ||||
|     <div class="form-row"> | ||||
|         <label for="node-input-topic"><i class="fa fa-tasks"></i> Topic</label> | ||||
|         <input type="text" id="node-input-topic" placeholder="Topic"> | ||||
|         <label for="node-input-topic"><i class="fa fa-tasks"></i> <span data-i18n="common.label.topic"></span></label> | ||||
|         <input type="text" id="node-input-topic" data-i18n="[placeholder]common.label.topic"> | ||||
|     </div> | ||||
|  | ||||
|     <br/> | ||||
|     <!-- By convention, most nodes have a 'name' property. The following div --> | ||||
|     <!-- provides the necessary field. Should always be the last option      --> | ||||
|     <div class="form-row"> | ||||
|         <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> | ||||
|         <input type="text" id="node-input-name" placeholder="Name"> | ||||
|         <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label> | ||||
|         <input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name"> | ||||
|     </div> | ||||
| </script> | ||||
|  | ||||
|   | ||||
| @@ -131,8 +131,32 @@ | ||||
|                         RED.view.redraw(); | ||||
|                     } | ||||
|                 }, | ||||
|                 messageSourceClick: function(sourceId) { | ||||
|                     RED.view.reveal(sourceId); | ||||
|                 messageSourceClick: function(sourceId, aliasId, path) { | ||||
|                     // Get all of the nodes that could have logged this message | ||||
|                     var candidateNodes = [RED.nodes.node(sourceId)] | ||||
|                     if (path) { | ||||
|                         for (var i=2;i<path.length;i++) { | ||||
|                             candidateNodes.push(RED.nodes.node(path[i])) | ||||
|                         } | ||||
|                     } | ||||
|                     if (aliasId) { | ||||
|                         candidateNodes.push(RED.nodes.node(aliasId)); | ||||
|                     } | ||||
|                     if (candidateNodes.length > 1) { | ||||
|                         // The node is in a subflow. Check to see if the active | ||||
|                         // workspace is a subflow in the node's parentage. If | ||||
|                         // so, reveal the relevant subflow instance node. | ||||
|                         var ws = RED.workspaces.active(); | ||||
|                         for (var i=0;i<candidateNodes.length;i++) { | ||||
|                             if (candidateNodes[i].z === ws) { | ||||
|                                 RED.view.reveal(candidateNodes[i].id); | ||||
|                                 return | ||||
|                             } | ||||
|                         } | ||||
|                         // The active workspace is unrelated to the node. So | ||||
|                         // fall back to revealing the top most node | ||||
|                     } | ||||
|                     RED.view.reveal(candidateNodes[0].id); | ||||
|                 }, | ||||
|                 clear: function() { | ||||
|                     RED.nodes.eachNode(function(node) { | ||||
| @@ -179,9 +203,44 @@ | ||||
|             RED.events.on("workspace:change", this.refreshMessageList); | ||||
|  | ||||
|             this.handleDebugMessage = function(t,o) { | ||||
|                 var sourceNode = RED.nodes.node(o.id) || RED.nodes.node(o.z); | ||||
|                 // console.log("->",o.id,o.z,o._alias); | ||||
|                 // | ||||
|                 // sourceNode should be the top-level node - one that is on a flow. | ||||
|                 var sourceNode; | ||||
|                 var pathParts; | ||||
|                 if (o.path) { | ||||
|                     // Path is a `/`-separated list of ids that identifies the | ||||
|                     // complete parentage of the node that generated this message. | ||||
|                     //    flow-id/subflow-A-instance/subflow-A-type/subflow-B-instance/subflow-B-type/node-id | ||||
|  | ||||
|                     // If it has one id, that is a top level flow | ||||
|                     // each subsequent id is the instance id of a subflow node | ||||
|                     // | ||||
|                     pathParts = o.path.split("/"); | ||||
|                     if (pathParts.length === 1) { | ||||
|                         // The source node is on a flow - so can use its id to find | ||||
|                         sourceNode = RED.nodes.node(o.id); | ||||
|                     } else if (pathParts.length > 1) { | ||||
|                         // Highlight the subflow instance node. | ||||
|                         sourceNode = RED.nodes.node(pathParts[1]); | ||||
|                     } | ||||
|                 } else { | ||||
|                     // This is probably redundant... | ||||
|                     sourceNode = RED.nodes.node(o.id) || RED.nodes.node(o.z); | ||||
|                 } | ||||
|                 if (sourceNode) { | ||||
|                     o._source = {id:sourceNode.id,z:sourceNode.z,name:sourceNode.name,type:sourceNode.type,_alias:o._alias}; | ||||
|                     o._source = { | ||||
|                         id:sourceNode.id, | ||||
|                         z:sourceNode.z, | ||||
|                         name:sourceNode.name, | ||||
|                         type:sourceNode.type, | ||||
|                         // _alias identifies the actual logging node. This is | ||||
|                         // not necessarily the same as sourceNode, which will be | ||||
|                         // the top-level subflow instance node. | ||||
|                         // This means the node's name is displayed in the sidebar. | ||||
|                         _alias:o._alias, | ||||
|                         path: pathParts | ||||
|                     }; | ||||
|                 } | ||||
|                 RED.debug.handleDebugMessage(o); | ||||
|                 if (subWindow) { | ||||
| @@ -235,7 +294,7 @@ | ||||
|                 } else if (msg.event === "mouseLeave") { | ||||
|                     options.messageMouseLeave(msg.id); | ||||
|                 } else if (msg.event === "mouseClick") { | ||||
|                     options.messageSourceClick(msg.id); | ||||
|                     options.messageSourceClick(msg.id,msg._alias,msg.path); | ||||
|                 } else if (msg.event === "clear") { | ||||
|                     options.clear(); | ||||
|                 } | ||||
|   | ||||
| @@ -62,7 +62,7 @@ module.exports = function(RED) { | ||||
|                     if (err) { | ||||
|                         done(RED._("debug.invalid-exp", {error: editExpression})); | ||||
|                     } else { | ||||
|                         done(null,{id:node.id, name:node.name, topic:msg.topic, msg:value, _path:msg._path}); | ||||
|                         done(null,{id:node.id, z:node.z, _alias: node._alias, path:node._flow.path, name:node.name, topic:msg.topic, msg:value}); | ||||
|                     } | ||||
|                 }); | ||||
|             } else { | ||||
| @@ -77,7 +77,7 @@ module.exports = function(RED) { | ||||
|                         output = undefined; | ||||
|                     } | ||||
|                 } | ||||
|                 done(null,{id:node.id, z:node.z, name:node.name, topic:msg.topic, property:property, msg:output, _path:msg._path}); | ||||
|                 done(null,{id:node.id, z:node.z, _alias: node._alias,  path:node._flow.path, name:node.name, topic:msg.topic, property:property, msg:output}); | ||||
|             } | ||||
|         } | ||||
|  | ||||
| @@ -88,7 +88,7 @@ module.exports = function(RED) { | ||||
|                     node.log("\n"+util.inspect(msg, {colors:useColors, depth:10})); | ||||
|                 } | ||||
|                 if (this.active && this.tosidebar) { | ||||
|                     sendDebug({id:node.id, name:node.name, topic:msg.topic, msg:msg, _path:msg._path}); | ||||
|                     sendDebug({id:node.id, z:node.z, _alias: node._alias,  path:node._flow.path, name:node.name, topic:msg.topic, msg:msg}); | ||||
|                 } | ||||
|                 done(); | ||||
|             } else { | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
| <script type="text/x-red" data-template-name="comment"> | ||||
|     <div class="form-row"> | ||||
|         <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label> | ||||
|         <input type="text" id="node-input-name"> | ||||
|         <input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name"> | ||||
|     </div> | ||||
|     <div class="form-row node-text-editor-row"> | ||||
|         <input type="hidden" id="node-input-info" autofocus="autofocus"> | ||||
|   | ||||
| @@ -406,10 +406,16 @@ RED.debug = (function() { | ||||
|         msg.on("mouseenter", function() { | ||||
|             msg.addClass('red-ui-debug-msg-hover'); | ||||
|             if (o._source) { | ||||
|                 // highlight the top-level node (could be subflow instance) | ||||
|                 config.messageMouseEnter(o._source.id); | ||||
|                 if (o._source._alias) { | ||||
|                     // this is inside a subflow - highlight the node itself | ||||
|                     config.messageMouseEnter(o._source._alias); | ||||
|                 } | ||||
|                 // if path.length > 2, we are nested - highlight subflow instances | ||||
|                 for (var i=2;i<o._source.path.length;i++) { | ||||
|                     config.messageMouseEnter(o._source.path[i]); | ||||
|                 } | ||||
|             } | ||||
|         }); | ||||
|         msg.on("mouseleave", function() { | ||||
| @@ -419,6 +425,9 @@ RED.debug = (function() { | ||||
|                 if (o._source._alias) { | ||||
|                     config.messageMouseLeave(o._source._alias); | ||||
|                 } | ||||
|                 for (var i=2;i<o._source.path.length;i++) { | ||||
|                     config.messageMouseLeave(o._source.path[i]); | ||||
|                 } | ||||
|             } | ||||
|         }); | ||||
|         var name = sanitize(((o.name?o.name:o.id)||"").toString()); | ||||
| @@ -448,11 +457,11 @@ RED.debug = (function() { | ||||
|         var metaRow = $('<div class="red-ui-debug-msg-meta"></div>').appendTo(msg); | ||||
|         $('<span class="red-ui-debug-msg-date">'+ getTimestamp()+'</span>').appendTo(metaRow); | ||||
|         if (sourceNode) { | ||||
|             $('<a>',{href:"#",class:"red-ui-debug-msg-name"}).text('node: '+(sourceNode.name||sourceNode.id)) | ||||
|             $('<a>',{href:"#",class:"red-ui-debug-msg-name"}).text('node: '+sanitize(o.name||sourceNode.name||sourceNode.id)) | ||||
|             .appendTo(metaRow) | ||||
|             .on("click", function(evt) { | ||||
|                 evt.preventDefault(); | ||||
|                 config.messageSourceClick(sourceNode.id); | ||||
|                 config.messageSourceClick(sourceNode.id, sourceNode._alias, sourceNode.path); | ||||
|             }); | ||||
|         } else if (name) { | ||||
|             $('<span class="red-ui-debug-msg-name">'+name+'</span>').appendTo(metaRow); | ||||
|   | ||||
| @@ -7,8 +7,8 @@ $(function() { | ||||
|             messageMouseLeave: function(sourceId) { | ||||
|                 window.opener.postMessage({event:"mouseLeave",id:sourceId},'*'); | ||||
|             }, | ||||
|             messageSourceClick: function(sourceId) { | ||||
|                 window.opener.postMessage({event:"mouseClick",id:sourceId},'*'); | ||||
|             messageSourceClick: function(sourceId, aliasId, path) { | ||||
|                 window.opener.postMessage({event:"mouseClick",id:sourceId, _alias: aliasId, path: path},'*'); | ||||
|             }, | ||||
|             clear: function() { | ||||
|                 window.opener.postMessage({event:"clear"},'*'); | ||||
|   | ||||
| @@ -14,7 +14,7 @@ | ||||
|   limitations under the License. | ||||
| --> | ||||
|  | ||||
| <script type="text/x-red" data-template-name="switch"> | ||||
| <script type="text/html" data-template-name="switch"> | ||||
|     <div class="form-row"> | ||||
|         <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label> | ||||
|         <input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name"> | ||||
| @@ -127,7 +127,7 @@ | ||||
|         }, | ||||
|         oneditprepare: function() { | ||||
|             var node = this; | ||||
|             var previousValueType = {value:"prev",label:this._("inject.previous"),hasValue:false}; | ||||
|             var previousValueType = {value:"prev",label:this._("switch.previous"),hasValue:false}; | ||||
|  | ||||
|             $("#node-input-property").typedInput({default:this.propertyType||'msg',types:['msg','flow','global','jsonata','env']}); | ||||
|             var outputCount = $("#node-input-outputs").val("{}"); | ||||
| @@ -173,7 +173,7 @@ | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             $("#node-input-rule-container").css('min-height','250px').css('min-width','450px').editableList({ | ||||
|             $("#node-input-rule-container").css('min-height','150px').css('min-width','450px').editableList({ | ||||
|                 addItem: function(container,i,opt) { | ||||
|                     if (!opt.hasOwnProperty('r')) { | ||||
|                         opt.r = {}; | ||||
| @@ -237,15 +237,15 @@ | ||||
|  | ||||
|                     function createTypeValueField(){ | ||||
|                         return $('<input/>',{class:"node-input-rule-type-value",type:"text",style:"margin-left: 5px;"}).appendTo(row).typedInput({default:'string',types:[ | ||||
|                             {value:"string",label:"string",hasValue:false}, | ||||
|                             {value:"number",label:"number",hasValue:false}, | ||||
|                             {value:"boolean",label:"boolean",hasValue:false}, | ||||
|                             {value:"array",label:"array",hasValue:false}, | ||||
|                             {value:"buffer",label:"buffer",hasValue:false}, | ||||
|                             {value:"object",label:"object",hasValue:false}, | ||||
|                             {value:"json",label:"JSON string",hasValue:false}, | ||||
|                             {value:"undefined",label:"undefined",hasValue:false}, | ||||
|                             {value:"null",label:"null",hasValue:false} | ||||
|                             {value:"string",label:RED._("common.type.string"),hasValue:false,icon:"red/images/typedInput/az.png"}, | ||||
|                             {value:"number",label:RED._("common.type.number"),hasValue:false,icon:"red/images/typedInput/09.png"}, | ||||
|                             {value:"boolean",label:RED._("common.type.boolean"),hasValue:false,icon:"red/images/typedInput/bool.png"}, | ||||
|                             {value:"array",label:RED._("common.type.array"),hasValue:false,icon:"red/images/typedInput/json.png"}, | ||||
|                             {value:"buffer",label:RED._("common.type.buffer"),hasValue:false,icon:"red/images/typedInput/bin.png"}, | ||||
|                             {value:"object",label:RED._("common.type.object"),hasValue:false,icon:"red/images/typedInput/json.png"}, | ||||
|                             {value:"json",label:RED._("common.type.jsonString"),hasValue:false,icon:"red/images/typedInput/json.png"}, | ||||
|                             {value:"undefined",label:RED._("common.type.undefined"),hasValue:false}, | ||||
|                             {value:"null",label:RED._("common.type.null"),hasValue:false} | ||||
|                         ]}); | ||||
|                     } | ||||
|  | ||||
| @@ -453,6 +453,7 @@ | ||||
|             } | ||||
|             var editorRow = $("#dialog-form>div.node-input-rule-container-row"); | ||||
|             height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom"))); | ||||
|             height += 16; | ||||
|             $("#node-input-rule-container").editableList('height',height); | ||||
|         } | ||||
|     }); | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
|  | ||||
| <script type="text/x-red" data-template-name="change"> | ||||
| <script type="text/html" data-template-name="change"> | ||||
|     <div class="form-row"> | ||||
|         <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label> | ||||
|         <input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name"> | ||||
| @@ -81,7 +81,7 @@ | ||||
|                 rule.find('.red-ui-typedInput').typedInput("width",newWidth-130); | ||||
|  | ||||
|             } | ||||
|             $('#node-input-rule-container').css('min-height','300px').css('min-width','450px').editableList({ | ||||
|             $('#node-input-rule-container').css('min-height','150px').css('min-width','450px').editableList({ | ||||
|                 addItem: function(container,i,opt) { | ||||
|                     var rule = opt; | ||||
|                     if (!rule.hasOwnProperty('t')) { | ||||
| @@ -259,7 +259,7 @@ | ||||
|             } | ||||
|             var editorRow = $("#dialog-form>div.node-input-rule-container-row"); | ||||
|             height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom"))); | ||||
|  | ||||
|             height += 16; | ||||
|             $("#node-input-rule-container").editableList('height',height); | ||||
|         } | ||||
|     }); | ||||
|   | ||||
| @@ -331,11 +331,11 @@ module.exports = function(RED) { | ||||
|             this.on('input', function(msg, send, done) { | ||||
|                 applyRules(msg, 0, (err,msg) => { | ||||
|                     if (err) { | ||||
|                         node.error(err,msg); | ||||
|                         done(err); | ||||
|                     } else if (msg) { | ||||
|                         send(msg); | ||||
|                         done(); | ||||
|                     } | ||||
|                     done(); | ||||
|                 }) | ||||
|             }); | ||||
|         } | ||||
|   | ||||
| @@ -153,15 +153,24 @@ module.exports = function(RED) { | ||||
|         } | ||||
|         else if (node.pauseType === "rate") { | ||||
|             node.on("input", function(msg) { | ||||
|                 if (msg.hasOwnProperty("reset")) { | ||||
|                     if (node.intervalID !== -1 ) { | ||||
|                         clearInterval(node.intervalID); | ||||
|                         node.intervalID = -1; | ||||
|                     } | ||||
|                     node.buffer = []; | ||||
|                     node.status({text:"reset"}); | ||||
|                     return; | ||||
|                 } | ||||
|                 if (!node.drop) { | ||||
|                     var m = RED.util.cloneMessage(msg); | ||||
|                     delete m.flush; | ||||
|                     if (node.intervalID !== -1) { | ||||
|                         if (!msg.hasOwnProperty("flush")) { | ||||
|                             node.buffer.push(msg); | ||||
|                             node.reportDepth(); | ||||
|                         } | ||||
|                         node.buffer.push(m); | ||||
|                         node.reportDepth(); | ||||
|                     } | ||||
|                     else { | ||||
|                         node.send(msg); | ||||
|                         node.send(m); | ||||
|                         node.reportDepth(); | ||||
|                         node.intervalID = setInterval(function() { | ||||
|                             if (node.buffer.length === 0) { | ||||
| @@ -174,6 +183,12 @@ module.exports = function(RED) { | ||||
|                             node.reportDepth(); | ||||
|                         }, node.rate); | ||||
|                     } | ||||
|                     if (msg.hasOwnProperty("flush")) { | ||||
|                         while (node.buffer.length > 0) { | ||||
|                             node.send(node.buffer.shift()); | ||||
|                         } | ||||
|                         node.status({}); | ||||
|                     } | ||||
|                 } | ||||
|                 else { | ||||
|                     var timeSinceLast; | ||||
| @@ -189,18 +204,6 @@ module.exports = function(RED) { | ||||
|                         node.send(msg); | ||||
|                     } | ||||
|                 } | ||||
|                 if (msg.hasOwnProperty("reset")) { | ||||
|                     clearInterval(node.intervalID); | ||||
|                     node.intervalID = -1; | ||||
|                     node.buffer = []; | ||||
|                     node.status({text:"reset"}); | ||||
|                 } | ||||
|                 if (msg.hasOwnProperty("flush")) { | ||||
|                     while (node.buffer.length > 0) { | ||||
|                         node.send(node.buffer.shift()); | ||||
|                     } | ||||
|                     node.status({}); | ||||
|                 } | ||||
|             }); | ||||
|             node.on("close", function() { | ||||
|                 clearInterval(node.intervalID); | ||||
|   | ||||
| @@ -76,6 +76,7 @@ module.exports = function(RED) { | ||||
|         var node = this; | ||||
|         node.topics = {}; | ||||
|  | ||||
|         var npay = {}; | ||||
|         var pendingMessages = []; | ||||
|         var activeMessagePromise = null; | ||||
|         var processMessageQueue = function(msg) { | ||||
| @@ -122,9 +123,10 @@ module.exports = function(RED) { | ||||
|                 node.status({}); | ||||
|             } | ||||
|             else { | ||||
|                 if (node.op2type === "payl") { npay[topic] = RED.util.cloneMessage(msg); } | ||||
|                 if (((!node.topics[topic].tout) && (node.topics[topic].tout !== 0)) || (node.loop === true)) { | ||||
|                     promise = Promise.resolve(); | ||||
|                     if (node.op2type === "pay" || node.op2type === "payl") { node.topics[topic].m2 = RED.util.cloneMessage(msg.payload); } | ||||
|                     if (node.op2type === "pay") { node.topics[topic].m2 = RED.util.cloneMessage(msg.payload); } | ||||
|                     else if (node.op2Templated) { node.topics[topic].m2 = mustache.render(node.op2,msg); } | ||||
|                     else if (node.op2type !== "nul") { | ||||
|                         promise = new Promise((resolve,reject) => { | ||||
| @@ -186,9 +188,15 @@ module.exports = function(RED) { | ||||
|                                                 }); | ||||
|                                             } | ||||
|                                             promise.then(() => { | ||||
|                                                 msg2.payload = node.topics[topic].m2; | ||||
|                                                 if (node.op2type === "payl") { | ||||
|                                                     node.send(npay[topic]);  | ||||
|                                                     delete npay[topic]; | ||||
|                                                 } | ||||
|                                                 else {  | ||||
|                                                     msg2.payload = node.topics[topic].m2; | ||||
|                                                     node.send(msg2);  | ||||
|                                                 } | ||||
|                                                 delete node.topics[topic]; | ||||
|                                                 node.send(msg2); | ||||
|                                                 node.status({}); | ||||
|                                             }).catch(err => { | ||||
|                                                 node.error(err); | ||||
| @@ -244,9 +252,6 @@ module.exports = function(RED) { | ||||
|                         }); | ||||
|                     }, node.duration); | ||||
|                 } | ||||
|                 else { | ||||
|                     if (node.op2type === "payl") { node.topics[topic].m2 = RED.util.cloneMessage(msg.payload); } | ||||
|                 } | ||||
|             } | ||||
|             return Promise.resolve(); | ||||
|         } | ||||
|   | ||||
| @@ -129,7 +129,7 @@ | ||||
|     }); | ||||
| </script> | ||||
|  | ||||
| <script type="text/x-red" data-template-name="mqtt-broker"> | ||||
| <script type="text/html" data-template-name="mqtt-broker"> | ||||
|     <div class="form-row"> | ||||
|         <label for="node-config-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label> | ||||
|         <input type="text" id="node-config-input-name" data-i18n="[placeholder]common.label.name"> | ||||
| @@ -137,7 +137,7 @@ | ||||
|     <div class="form-row"> | ||||
|         <ul style="min-width: 600px; margin-bottom: 20px;" id="node-config-mqtt-broker-tabs"></ul> | ||||
|     </div> | ||||
|     <div id="node-config-mqtt-broker-tabs-content" style="min-height: 170px;"> | ||||
|     <div id="node-config-mqtt-broker-tabs-content" style="min-height:150px;"> | ||||
|         <div id="mqtt-broker-tab-connection" style="display:none"> | ||||
|             <div class="form-row node-input-broker"> | ||||
|                 <label for="node-config-input-broker"><i class="fa fa-globe"></i> <span data-i18n="mqtt.label.broker"></span></label> | ||||
|   | ||||
| @@ -111,9 +111,13 @@ module.exports = function(RED) { | ||||
|         if (typeof this.cleansession === 'undefined') { | ||||
|             this.cleansession = true; | ||||
|         } | ||||
|         var prox; | ||||
|         if (process.env.http_proxy != null) { prox = process.env.http_proxy; } | ||||
|         if (process.env.HTTP_PROXY != null) { prox = process.env.HTTP_PROXY; } | ||||
|  | ||||
|         var prox, noprox; | ||||
|         if (process.env.http_proxy) { prox = process.env.http_proxy; } | ||||
|         if (process.env.HTTP_PROXY) { prox = process.env.HTTP_PROXY; } | ||||
|         if (process.env.no_proxy) { noprox = process.env.no_proxy.split(","); } | ||||
|         if (process.env.NO_PROXY) { noprox = process.env.NO_PROXY.split(","); } | ||||
|  | ||||
|  | ||||
|         // Create the URL to pass in to the MQTT.js library | ||||
|         if (this.brokerurl === "") { | ||||
| @@ -121,9 +125,15 @@ module.exports = function(RED) { | ||||
|             if (this.broker.indexOf("://") > -1) { | ||||
|                 this.brokerurl = this.broker; | ||||
|                 // Only for ws or wss, check if proxy env var for additional configuration | ||||
|                 if (this.brokerurl.indexOf("wss://") > -1 || this.brokerurl.indexOf("ws://") > -1 ) | ||||
|                 // check if proxy is set in env | ||||
|                     if (prox) { | ||||
|                 if (this.brokerurl.indexOf("wss://") > -1 || this.brokerurl.indexOf("ws://") > -1 ) { | ||||
|                     // check if proxy is set in env | ||||
|                     var noproxy; | ||||
|                     if (noprox) { | ||||
|                         for (var i = 0; i < noprox.length; i += 1) { | ||||
|                             if (this.brokerurl.indexOf(noprox[i].trim()) !== -1) { noproxy=true; } | ||||
|                         } | ||||
|                     } | ||||
|                     if (prox && !noproxy) { | ||||
|                         var parsedUrl = url.parse(this.brokerurl); | ||||
|                         var proxyOpts = url.parse(prox); | ||||
|                         // true for wss | ||||
| @@ -134,6 +144,7 @@ module.exports = function(RED) { | ||||
|                             agent: agent | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|             } else { | ||||
|                 // construct the std mqtt:// url | ||||
|                 if (this.usetls) { | ||||
| @@ -142,7 +153,12 @@ module.exports = function(RED) { | ||||
|                     this.brokerurl="mqtt://"; | ||||
|                 } | ||||
|                 if (this.broker !== "") { | ||||
|                     this.brokerurl = this.brokerurl+this.broker+":"; | ||||
|                     //Check for an IPv6 address | ||||
|                     if (/(?:^|(?<=\s))(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(?=\s|$)/.test(this.broker)) { | ||||
|                         this.brokerurl = this.brokerurl+"["+this.broker+"]:"; | ||||
|                     } else { | ||||
|                         this.brokerurl = this.brokerurl+this.broker+":"; | ||||
|                     } | ||||
|                     // port now defaults to 1883 if unset. | ||||
|                     if (!this.port){ | ||||
|                         this.brokerurl = this.brokerurl+"1883"; | ||||
|   | ||||
| @@ -22,6 +22,7 @@ | ||||
|         <option value="POST">POST</option> | ||||
|         <option value="PUT">PUT</option> | ||||
|         <option value="DELETE">DELETE</option> | ||||
|         <option value="HEAD">HEAD</option> | ||||
|         <option value="use" data-i18n="httpin.setby"></option> | ||||
|         </select> | ||||
|     </div> | ||||
| @@ -170,6 +171,7 @@ | ||||
|             if (this.authType) { | ||||
|                 $('#node-input-useAuth').prop('checked', true); | ||||
|                 $("#node-input-authType-select").val(this.authType); | ||||
|                 $("#node-input-authType-select").change(); | ||||
|             } else { | ||||
|                 $('#node-input-useAuth').prop('checked', false); | ||||
|             } | ||||
|   | ||||
| @@ -39,10 +39,10 @@ module.exports = function(RED) { | ||||
|         else { this.reqTimeout = 120000; } | ||||
|  | ||||
|         var prox, noprox; | ||||
|         if (process.env.http_proxy != null) { prox = process.env.http_proxy; } | ||||
|         if (process.env.HTTP_PROXY != null) { prox = process.env.HTTP_PROXY; } | ||||
|         if (process.env.no_proxy != null) { noprox = process.env.no_proxy.split(","); } | ||||
|         if (process.env.NO_PROXY != null) { noprox = process.env.NO_PROXY.split(","); } | ||||
|         if (process.env.http_proxy) { prox = process.env.http_proxy; } | ||||
|         if (process.env.HTTP_PROXY) { prox = process.env.HTTP_PROXY; } | ||||
|         if (process.env.no_proxy) { noprox = process.env.no_proxy.split(","); } | ||||
|         if (process.env.NO_PROXY) { noprox = process.env.NO_PROXY.split(","); } | ||||
|  | ||||
|         var proxyConfig = null; | ||||
|         if (n.proxy) { | ||||
| @@ -88,8 +88,13 @@ module.exports = function(RED) { | ||||
|             if (msg.method && n.method && (n.method === "use")) { | ||||
|                 method = msg.method.toUpperCase();          // use the msg parameter | ||||
|             } | ||||
|  | ||||
|             var isHttps = (/^https/i.test(url)); | ||||
|  | ||||
|             var opts = {}; | ||||
|             opts.url = url; | ||||
|             // set defaultport, else when using HttpsProxyAgent, it's defaultPort of 443 will be used :(. | ||||
|             opts.defaultPort = isHttps?443:80; | ||||
|             opts.timeout = node.reqTimeout; | ||||
|             opts.method = method; | ||||
|             opts.headers = {}; | ||||
| @@ -284,9 +289,10 @@ module.exports = function(RED) { | ||||
|                 opts.headers[clSet] = opts.headers['content-length']; | ||||
|                 delete opts.headers['content-length']; | ||||
|             } | ||||
|              | ||||
|             var noproxy; | ||||
|             if (noprox) { | ||||
|                 for (var i in noprox) { | ||||
|                 for (var i = 0; i < noprox.length; i += 1) { | ||||
|                     if (url.indexOf(noprox[i]) !== -1) { noproxy=true; } | ||||
|                 } | ||||
|             } | ||||
|   | ||||
| @@ -19,6 +19,8 @@ module.exports = function(RED) { | ||||
|     var ws = require("ws"); | ||||
|     var inspect = require("util").inspect; | ||||
|     var url = require("url"); | ||||
|     var HttpsProxyAgent = require('https-proxy-agent'); | ||||
|  | ||||
|  | ||||
|     var serverUpgradeAdded = false; | ||||
|     function handleServerUpgrade(request, socket, head) { | ||||
| @@ -55,7 +57,28 @@ module.exports = function(RED) { | ||||
|  | ||||
|         function startconn() {    // Connect to remote endpoint | ||||
|             node.tout = null; | ||||
|             var prox, noprox; | ||||
|             if (process.env.http_proxy) { prox = process.env.http_proxy; } | ||||
|             if (process.env.HTTP_PROXY) { prox = process.env.HTTP_PROXY; } | ||||
|             if (process.env.no_proxy) { noprox = process.env.no_proxy.split(","); } | ||||
|             if (process.env.NO_PROXY) { noprox = process.env.NO_PROXY.split(","); } | ||||
|              | ||||
|             var noproxy = false; | ||||
|             if (noprox) { | ||||
|                 for (var i in noprox) { | ||||
|                     if (node.path.indexOf(noprox[i].trim()) !== -1) { noproxy=true; } | ||||
|                 } | ||||
|             } | ||||
|              | ||||
|             var agent = undefined; | ||||
|             if (prox && !noproxy) { | ||||
|                 agent = new HttpsProxyAgent(prox); | ||||
|             } | ||||
|  | ||||
|             var options = {}; | ||||
|             if (agent) { | ||||
|                 options.agent = agent; | ||||
|             } | ||||
|             if (node.tls) { | ||||
|                 var tlsNode = RED.nodes.getNode(node.tls); | ||||
|                 if (tlsNode) { | ||||
|   | ||||
| @@ -371,7 +371,6 @@ module.exports = function(RED) { | ||||
|             var server = net.createServer(function (socket) { | ||||
|                 socket.setKeepAlive(true,120000); | ||||
|                 if (socketTimeout !== null) { socket.setTimeout(socketTimeout); } | ||||
|                 var remoteDetails = socket.remoteAddress+":"+socket.remotePort; | ||||
|                 node.log(RED._("tcpin.status.connection-from",{host:socket.remoteAddress, port:socket.remotePort})); | ||||
|                 connectedSockets.push(socket); | ||||
|                 node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.length})}); | ||||
|   | ||||
| @@ -230,17 +230,17 @@ module.exports = function(RED) { | ||||
|                                 node.send(msg); // finally send the array | ||||
|                             } | ||||
|                         } | ||||
|             			else { | ||||
|             			    var len = a.length; | ||||
|             			    for (var i = 0; i < len; i++) { | ||||
|                         else { | ||||
|                             var len = a.length; | ||||
|                             for (var i = 0; i < len; i++) { | ||||
|                                 var newMessage = RED.util.cloneMessage(msg); | ||||
|                                 newMessage.payload = a[i]; | ||||
|                                 if (!has_parts) { | ||||
|                 				    newMessage.parts = { | ||||
|                     				    id: msg._msgid, | ||||
|                     				    index: i, | ||||
|                     				    count: len | ||||
|                     				}; | ||||
|                                     newMessage.parts = { | ||||
|                                         id: msg._msgid, | ||||
|                                         index: i, | ||||
|                                         count: len | ||||
|                                     }; | ||||
|                                 } | ||||
|                                 else { | ||||
|                                     newMessage.parts.index -= node.skip; | ||||
| @@ -251,8 +251,8 @@ module.exports = function(RED) { | ||||
|                                     } | ||||
|                                 } | ||||
|                                 node.send(newMessage); | ||||
|             			    } | ||||
|             			} | ||||
|                             } | ||||
|                         } | ||||
|                         node.linecount = 0; | ||||
|                     } | ||||
|                     catch(e) { node.error(e,msg); } | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
|  | ||||
| <script type="text/x-red" data-template-name="html"> | ||||
|     <div class="form-row"> | ||||
|         <label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="node-red:common.label.property"></span></label> | ||||
|         <label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="common.label.property"></span></label> | ||||
|         <input type="text" id="node-input-property" style="width:70%"> | ||||
|     </div> | ||||
|     <div class="form-row"> | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
|  | ||||
| <script type="text/x-red" data-template-name="xml"> | ||||
|     <div class="form-row"> | ||||
|         <label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="node-red:common.label.property"></span></label> | ||||
|         <label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="common.label.property"></span></label> | ||||
|         <input type="text" id="node-input-property" style="width:70%;"/> | ||||
|     </div> | ||||
|     <div class="form-row"> | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
|  | ||||
| <script type="text/x-red" data-template-name="yaml"> | ||||
|     <div class="form-row"> | ||||
|         <label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="node-red:common.label.property"></span></label> | ||||
|         <label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="common.label.property"></span></label> | ||||
|         <input type="text" id="node-input-property" style="width:70%;"/> | ||||
|     </div> | ||||
|     <div class="form-row"> | ||||
|   | ||||
| @@ -14,7 +14,7 @@ | ||||
|   limitations under the License. | ||||
| --> | ||||
|  | ||||
| <script type="text/x-red" data-template-name="split"> | ||||
| <script type="text/html" data-template-name="split"> | ||||
|     <div class="form-row"><span data-i18n="[html]split.intro"></span></div> | ||||
|     <div class="form-row"><span data-i18n="[html]split.strBuff"></span></div> | ||||
|     <div class="form-row"> | ||||
| @@ -113,7 +113,7 @@ | ||||
| </script> | ||||
|  | ||||
|  | ||||
| <script type="text/x-red" data-template-name="join"> | ||||
| <script type="text/html" data-template-name="join"> | ||||
|     <div class="form-row"> | ||||
|         <label data-i18n="join.mode.mode"></label> | ||||
|         <select id="node-input-mode" style="width:200px;"> | ||||
| @@ -285,7 +285,11 @@ | ||||
|                     $("#node-input-property").typedInput('types',['msg']); | ||||
|                     $("#node-input-joiner").typedInput("show"); | ||||
|                 } else { | ||||
|                     $("#node-input-property").typedInput('types',['msg', {value:"full",label:"complete message",hasValue:false}]); | ||||
|                     $("#node-input-property").typedInput('types', ['msg', { | ||||
|                         value: "full", | ||||
|                         label: RED._("node-red:join.completeMessage"), | ||||
|                         hasValue: false | ||||
|                     }]); | ||||
|                 } | ||||
|             }); | ||||
|  | ||||
| @@ -297,7 +301,11 @@ | ||||
|  | ||||
|             $("#node-input-property").typedInput({ | ||||
|                 typeField: $("#node-input-propertyType"), | ||||
|                 types:['msg', {value:"full", label:"complete message", hasValue:false}] | ||||
|                 types: ['msg', { | ||||
|                     value: "full", | ||||
|                     label: RED._("node-red:join.completeMessage"), | ||||
|                     hasValue: false | ||||
|                 }] | ||||
|             }); | ||||
|  | ||||
|             $("#node-input-key").typedInput({ | ||||
|   | ||||
| @@ -292,7 +292,6 @@ module.exports = function(RED) { | ||||
|                 reduceMessageGroup(node,msgs,exp,fixup,count,result,done); | ||||
|             } | ||||
|         }); | ||||
|  | ||||
|     } | ||||
|     function reduceAndSendGroup(node, group, done) { | ||||
|         var is_right = node.reduce_right; | ||||
| @@ -331,7 +330,7 @@ module.exports = function(RED) { | ||||
|             var pending_count = node.pending_count; | ||||
|             var gid = msg.parts.id; | ||||
|             var count; | ||||
|             if(!pending.hasOwnProperty(gid)) { | ||||
|             if (!pending.hasOwnProperty(gid)) { | ||||
|                 if(parts.hasOwnProperty('count')) { | ||||
|                     count = msg.parts.count; | ||||
|                 } | ||||
| @@ -361,7 +360,6 @@ module.exports = function(RED) { | ||||
|                 } | ||||
|                 return done(); | ||||
|             } | ||||
|  | ||||
|             if (msgs.length === group.count) { | ||||
|                 delete pending[gid]; | ||||
|                 pending_count -= msgs.length; | ||||
| @@ -408,7 +406,7 @@ module.exports = function(RED) { | ||||
|         if (this.joinerType === "str") { | ||||
|             this.joiner = this.joiner.replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\e/g,"\e").replace(/\\f/g,"\f").replace(/\\0/g,"\0"); | ||||
|         } else if (this.joinerType === "bin") { | ||||
|             var joinArray = JSON.parse(n.joiner) | ||||
|             var joinArray = JSON.parse(n.joiner || "[]"); | ||||
|             if (Array.isArray(joinArray)) { | ||||
|                 this.joiner = Buffer.from(joinArray); | ||||
|             } else { | ||||
| @@ -429,7 +427,7 @@ module.exports = function(RED) { | ||||
|  | ||||
|         var completeSend = function(partId) { | ||||
|             var group = inflight[partId]; | ||||
|             clearTimeout(group.timeout); | ||||
|             if (group.timeout) { clearTimeout(group.timeout); } | ||||
|             if ((node.accumulate !== true) || group.msg.hasOwnProperty("complete")) { delete inflight[partId]; } | ||||
|             if (group.type === 'array' && group.arrayLen > 1) { | ||||
|                 var newArray = []; | ||||
| @@ -448,6 +446,9 @@ module.exports = function(RED) { | ||||
|                             buffers.push(joinBuffer); | ||||
|                             bufferLen += joinBuffer.length; | ||||
|                         } | ||||
|                         if (!Buffer.isBuffer(group.payload[i])) {  | ||||
|                             group.payload[i] = Buffer.from(group.payload[i]); | ||||
|                         } | ||||
|                         buffers.push(group.payload[i]); | ||||
|                         bufferLen += group.payload[i].length; | ||||
|                     } | ||||
|   | ||||
| @@ -53,8 +53,8 @@ | ||||
|     </div> | ||||
|  | ||||
|     <div class="form-row"> | ||||
|         <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label> | ||||
|         <input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name"> | ||||
|         <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label> | ||||
|         <input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name"> | ||||
|     </div> | ||||
| </script> | ||||
|  | ||||
|   | ||||
| @@ -14,7 +14,7 @@ | ||||
|   limitations under the License. | ||||
| --> | ||||
|  | ||||
| <script type="text/x-red" data-template-name="batch"> | ||||
| <script type="text/html" data-template-name="batch"> | ||||
|     <div class="form-row"> | ||||
|         <label for="node-input-mode"><span data-i18n="batch.mode.label"></span></label> | ||||
|         <select type="text" id="node-input-mode" style="width: 300px;"> | ||||
| @@ -60,8 +60,8 @@ | ||||
|     </div> | ||||
|  | ||||
|     <div class="form-row"> | ||||
|         <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label> | ||||
|         <input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name"> | ||||
|         <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label> | ||||
|         <input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name"> | ||||
|     </div> | ||||
|  | ||||
| </script> | ||||
| @@ -99,7 +99,7 @@ | ||||
|             } | ||||
|  | ||||
|             $("#node-input-topics-container") | ||||
|                 .css('min-height','200px').css('min-width','430px') | ||||
|                 .css('min-height','150px').css('min-width','430px') | ||||
|                 .editableList({ | ||||
|                     addItem: function(container, i, opt) { | ||||
|                         if (!opt.hasOwnProperty('topic')) { | ||||
|   | ||||
| @@ -341,6 +341,7 @@ module.exports = function(RED) { | ||||
|                         } | ||||
|                         else if (node.format === "lines") { | ||||
|                             var m = { payload: spare, | ||||
|                                       topic:msg.topic, | ||||
|                                       parts: { | ||||
|                                           index: count, | ||||
|                                           count: count+1, | ||||
|   | ||||
| @@ -35,10 +35,12 @@ | ||||
|   <p> Beispiel: Wenn eine Vorlage von: | ||||
|   <pre> Hallo {{payload.name}}. Heute ist {{date}} </pre> | ||||
|   <p> eine Nachricht empfangt, die folgendes enthält: | ||||
|   <pre> { | ||||
| Datum: "Montag" | ||||
| Payload: { Name: "Fred"} | ||||
| } </pre> | ||||
|   <pre>{ | ||||
|   date: "Montag", | ||||
|   payload: { | ||||
|     name: "Fred" | ||||
|   } | ||||
| }</pre> | ||||
|   <p> wird die resultierende Nachrich wie folgt sein: | ||||
|   <pre> Hallo Fred. Heute ist Montag </pre> | ||||
|   <p> Es ist möglich, eine Eigenschaft aus dem Flowkontext oder dem globalen Kontext zu verwenden.  | ||||
|   | ||||
| @@ -36,9 +36,9 @@ | ||||
|     <pre>Hello {{payload.name}}. Today is {{date}}</pre> | ||||
|     <p>receives a message containing: | ||||
|     <pre>{ | ||||
|   date: "Monday" | ||||
|   date: "Monday", | ||||
|   payload: { | ||||
|     name: "Fred", | ||||
|     name: "Fred" | ||||
|   } | ||||
| }</pre> | ||||
|     <p>The resulting property will be: | ||||
|   | ||||
| @@ -79,7 +79,7 @@ | ||||
|         "on": "on", | ||||
|         "onstart": "Inject once after", | ||||
|         "onceDelay": "seconds, then", | ||||
|         "tip": "<b>Note:</b> \"interval between times\" and \"at a specific time\" will use cron.<br/>\"interval\" should be less than 596 hours.<br/>See info box for details.", | ||||
|         "tip": "<b>Note:</b> \"interval between times\" and \"at a specific time\" will use cron.<br/>\"interval\" should be 596 hours or less.<br/>See info box for details.", | ||||
|         "success": "Successfully injected: __label__", | ||||
|         "errors": { | ||||
|             "failed": "inject failed, see log for details", | ||||
| @@ -604,33 +604,34 @@ | ||||
|         "label": { | ||||
|             "property": "Property", | ||||
|             "rule": "rule", | ||||
|             "repair" :  "recreate message sequences" | ||||
|             "repair": "recreate message sequences" | ||||
|         }, | ||||
|         "previous": "previous value", | ||||
|         "and": "and", | ||||
|         "checkall": "checking all rules", | ||||
|         "stopfirst": "stopping after first match", | ||||
|         "ignorecase": "ignore case", | ||||
|         "rules": { | ||||
|             "btwn":"is between", | ||||
|             "cont":"contains", | ||||
|             "regex":"matches regex", | ||||
|             "true":"is true", | ||||
|             "false":"is false", | ||||
|             "null":"is null", | ||||
|             "nnull":"is not null", | ||||
|             "istype":"is of type", | ||||
|             "empty":"is empty", | ||||
|             "nempty":"is not empty", | ||||
|             "head":"head", | ||||
|             "tail":"tail", | ||||
|             "index":"index between", | ||||
|             "exp":"JSONata exp", | ||||
|             "else":"otherwise", | ||||
|             "hask":"has key" | ||||
|             "btwn": "is between", | ||||
|             "cont": "contains", | ||||
|             "regex": "matches regex", | ||||
|             "true": "is true", | ||||
|             "false": "is false", | ||||
|             "null": "is null", | ||||
|             "nnull": "is not null", | ||||
|             "istype": "is of type", | ||||
|             "empty": "is empty", | ||||
|             "nempty": "is not empty", | ||||
|             "head": "head", | ||||
|             "tail": "tail", | ||||
|             "index": "index between", | ||||
|             "exp": "JSONata exp", | ||||
|             "else": "otherwise", | ||||
|             "hask": "has key" | ||||
|         }, | ||||
|         "errors": { | ||||
|             "invalid-expr": "Invalid JSONata expression: __error__", | ||||
|             "too-many" : "too many pending messages in switch node" | ||||
|             "too-many": "too many pending messages in switch node" | ||||
|         } | ||||
|     }, | ||||
|     "change": { | ||||
| @@ -848,41 +849,42 @@ | ||||
|         "stream":"Handle as a stream of messages", | ||||
|         "addname":" Copy key to " | ||||
|     }, | ||||
|     "join":{ | ||||
|     "join": { | ||||
|         "join": "join", | ||||
|         "mode":{ | ||||
|             "mode":"Mode", | ||||
|             "auto":"automatic", | ||||
|             "merge":"merge sequences", | ||||
|             "reduce":"reduce sequence", | ||||
|             "custom":"manual" | ||||
|         "mode": { | ||||
|             "mode": "Mode", | ||||
|             "auto": "automatic", | ||||
|             "merge": "merge sequences", | ||||
|             "reduce": "reduce sequence", | ||||
|             "custom": "manual" | ||||
|         }, | ||||
|         "combine":"Combine each", | ||||
|         "create":"to create", | ||||
|         "type":{ | ||||
|             "string":"a String", | ||||
|             "array":"an Array", | ||||
|             "buffer":"a Buffer", | ||||
|             "object":"a key/value Object", | ||||
|             "merged":"a merged Object" | ||||
|         "combine": "Combine each", | ||||
|         "completeMessage": "complete message", | ||||
|         "create": "to create", | ||||
|         "type": { | ||||
|             "string": "a String", | ||||
|             "array": "an Array", | ||||
|             "buffer": "a Buffer", | ||||
|             "object": "a key/value Object", | ||||
|             "merged": "a merged Object" | ||||
|         }, | ||||
|         "using":"using the value of", | ||||
|         "key":"as the key", | ||||
|         "joinedUsing":"joined using", | ||||
|         "send":"Send the message:", | ||||
|         "afterCount":"After a number of message parts", | ||||
|         "count":"count", | ||||
|         "subsequent":"and every subsequent message.", | ||||
|         "afterTimeout":"After a timeout following the first message", | ||||
|         "seconds":"seconds", | ||||
|         "complete":"After a message with the <code>msg.complete</code> property set", | ||||
|         "tip":"This mode assumes this node is either paired with a <i>split</i> node or the received messages will have a properly configured <code>msg.parts</code> property.", | ||||
|         "too-many" : "too many pending messages in join node", | ||||
|         "using": "using the value of", | ||||
|         "key": "as the key", | ||||
|         "joinedUsing": "joined using", | ||||
|         "send": "Send the message:", | ||||
|         "afterCount": "After a number of message parts", | ||||
|         "count": "count", | ||||
|         "subsequent": "and every subsequent message.", | ||||
|         "afterTimeout": "After a timeout following the first message", | ||||
|         "seconds": "seconds", | ||||
|         "complete": "After a message with the <code>msg.complete</code> property set", | ||||
|         "tip": "This mode assumes this node is either paired with a <i>split</i> node or the received messages will have a properly configured <code>msg.parts</code> property.", | ||||
|         "too-many": "too many pending messages in join node", | ||||
|         "merge": { | ||||
|             "topics-label":"Merged Topics", | ||||
|             "topics":"topics", | ||||
|             "topic" : "topic", | ||||
|             "on-change":"Send merged message on arrival of a new topic" | ||||
|             "topics-label": "Merged Topics", | ||||
|             "topics": "topics", | ||||
|             "topic": "topic", | ||||
|             "on-change": "Send merged message on arrival of a new topic" | ||||
|         }, | ||||
|         "reduce": { | ||||
|             "exp": "Reduce exp", | ||||
|   | ||||
| @@ -36,7 +36,7 @@ | ||||
|     <h3>Inputs</h3> | ||||
|     <dl class="message-properties"> | ||||
|        <dt>payload <span class="property-type">string | buffer</span></dt> | ||||
|        <dd> most users prefer simple text payloads, but binary buffers can also be published.</dd> | ||||
|        <dd> the payload to publish. If this property is not set, no message will be sent. To send a blank message, set this property to an empty String.</dd> | ||||
|  | ||||
|        <dt class="optional">topic <span class="property-type">string</span></dt> | ||||
|        <dd> the MQTT topic to publish to.</dd> | ||||
|   | ||||
| @@ -36,7 +36,7 @@ | ||||
|         <dt class="optional">followRedirects</dt> | ||||
|         <dd>If set to <code>false</code> prevent following Redirect (HTTP 301).<code>true</code> by default</dd> | ||||
|         <dt class="optional">requestTimeout</dt> | ||||
|         <dd>If set to a positive number, will override the globally set <code>httpRequestTimeout</code> parameter.</dd> | ||||
|         <dd>If set to a positive number of milliseconds, will override the globally set <code>httpRequestTimeout</code> parameter.</dd> | ||||
|     </dl> | ||||
|     <h3>Outputs</h3> | ||||
|     <dl class="message-properties"> | ||||
|   | ||||
| @@ -14,14 +14,14 @@ | ||||
|   limitations under the License. | ||||
| --> | ||||
|  | ||||
| <script type="text/x-red" data-help-name="tcp in"> | ||||
| <script type="text/html" data-help-name="tcp in"> | ||||
|     <p>Provides a choice of TCP inputs. Can either connect to a remote TCP port, | ||||
|        or accept incoming connections.</p> | ||||
|     <p><b>Note: </b>On some systems you may need root or administrator access | ||||
|     to access ports below 1024.</p> | ||||
| </script> | ||||
|  | ||||
| <script type="text/x-red" data-help-name="tcp out"> | ||||
| <script type="text/html" data-help-name="tcp out"> | ||||
|     <p>Provides a choice of TCP outputs. Can either connect to a remote TCP port, | ||||
|     accept incoming connections, or reply to messages received from a TCP In node.</p> | ||||
|     <p>Only the <code>msg.payload</code> is sent.</p> | ||||
| @@ -34,12 +34,12 @@ | ||||
|     to access ports below 1024.</p> | ||||
| </script> | ||||
|  | ||||
| <script type="text/x-red" data-help-name="tcp request"> | ||||
| <script type="text/html" data-help-name="tcp request"> | ||||
|     <p>A simple TCP request node - sends the <code>msg.payload</code> to a server tcp port and expects a response.</p> | ||||
|     <p>Connects, sends the "request", and reads the "response". It can either count a number of | ||||
|     returned characters into a fixed buffer, match a specified character before returning, | ||||
|     wait a fixed timeout from first reply and then return, sit and wait for data, or send then close the connection | ||||
|     immediately, without waiting for a reply.</p> | ||||
|     <p>The response will be output in <code>msg.payload</code> as a buffer, so you may want to .toString() it.</p> | ||||
|     <p>If you leave tcp host or port blank they must be set by using the <code>msg.host</code> and <code>msg.port</code> properties.</p> | ||||
|     <p>If you leave tcp host or port blank they must be set by using the <code>msg.host</code> and <code>msg.port</code> properties in every message sent to the node.</p> | ||||
| </script> | ||||
|   | ||||
| @@ -25,7 +25,7 @@ | ||||
| </dl> | ||||
| <h3>詳細</h3> | ||||
| <p>injectノードを用いることで、指定したペイロード値を用いてフローを開始できます。デフォルトのペイロード値は現在時刻のタイムスタンプを1970年1月1日からの経過ミリ秒で表現した値です。</p> | ||||
| <p>文字列、数値、論理値、JavaScriptオブジェクト、フロー/グローバルコンテキストの値などの送出も可能です。</p> | ||||
| <p>文字列、数値、真偽値、JavaScriptオブジェクト、フロー/グローバルコンテキストの値などの送出も可能です。</p> | ||||
| <p> デフォルト設定では、エディタ内に表示されるボタンをクリックすることで、ノードを手動で起動できます。指定間隔もしくはスケジュールに従ってメッセージを送出するように設定することも可能です。</p> | ||||
| <p>また、フロー開始の際に一度だけメッセージを送出させることもできます。</p> | ||||
| <p>「<i>時間間隔</i>」に指定可能な値の最大値は、約596時間(もしくは24日)です。一日より長い間隔を扱いたい場合は、電源停止や再起動にも対応可能なスケジューラノードの利用を検討すると良いでしょう。</p> | ||||
|   | ||||
| @@ -34,9 +34,9 @@ | ||||
|     <pre>こんにちは{{payload.name}}さん。今日は{{date}}です。</pre> | ||||
|     <p>というテンプレートに対して、 | ||||
|     <pre>{ | ||||
|   date: "月曜日" | ||||
|   date: "月曜日", | ||||
|   payload: { | ||||
|     name: "山田", | ||||
|     name: "山田" | ||||
|   } | ||||
| }</pre> | ||||
|     <p>というメッセージを受信した場合、</p> | ||||
|   | ||||
| @@ -604,6 +604,7 @@ | ||||
|             "rule": "条件", | ||||
|             "repair": "メッセージ列の補正" | ||||
|         }, | ||||
|         "previous": "前回の値", | ||||
|         "and": "~", | ||||
|         "checkall": "全ての条件を適用", | ||||
|         "stopfirst": "最初に合致した条件で終了", | ||||
| @@ -856,6 +857,7 @@ | ||||
|             "custom": "手動" | ||||
|         }, | ||||
|         "combine": "結合", | ||||
|         "completeMessage": "メッセージ全体", | ||||
|         "create": "出力", | ||||
|         "type": { | ||||
|             "string": "文字列", | ||||
|   | ||||
| @@ -38,13 +38,13 @@ | ||||
|     <h3>入力</h3> | ||||
|     <dl class="message-properties"> | ||||
|        <dt>payload <span class="property-type">文字列 | バッファ</span></dt> | ||||
|        <dd>多くの場合単純なテキスト形式のペイロードが使われますが、バイナリバッファを発行することも可能です。</dd> | ||||
|        <dd>発行するペイロード。プロパティが設定されていない場合には、メッセージは送信されません。空のメッセージを送信するには、プロパティに空文字列を設定します。</dd> | ||||
|  | ||||
|        <dt class="optional">topic <span class="property-type">文字列</span></dt> | ||||
|        <dd>発行対象のMQTTトピック</dd> | ||||
|  | ||||
|        <dt class="optional">qos <span class="property-type">数値</span></dt> | ||||
|        <dd>0: 最大1度到着, 1: 一度以上到着, 2: 1度のみ到着。デフォルトは0です。</dd> | ||||
|        <dd>0: 最大一度到着, 1: 一度以上到着, 2: 一度のみ到着。デフォルトは0です。</dd> | ||||
|  | ||||
|        <dt class="optional">retain <span class="property-type">真偽値</span></dt> | ||||
|        <dd>真の場合、メッセージをブローカに保持します。デフォルトは偽です。</dd> | ||||
|   | ||||
| @@ -33,6 +33,8 @@ | ||||
|         <dd><code>false</code>をセットすると、自己署名証明書を使用するhttpsサイトへのリクエストを許可します。</dd> | ||||
|         <dt class="optional">followRedirects</dt> | ||||
|         <dd><code>false</code>をセットすると、リダイレクトを行いません。デフォルトは<code>true</code>です。</dd> | ||||
|         <dt class="optional">requestTimeout</dt> | ||||
|         <dd>正のミリ秒数をセットすると、 グローバルに設定された<code>httpRequestTimeout</code>パラメータを上書きします。</dd> | ||||
|     </dl> | ||||
|     <h3>出力</h3> | ||||
|     <dl class="message-properties"> | ||||
|   | ||||
| @@ -98,7 +98,7 @@ | ||||
|     <p>「<i>合計値</i>」には出力メッセージを送信する前に受信すべきメッセージ数を指定します。オブジェクト出力の場合、この合計値に達すると後続メッセージの到着毎にメッセージを出力するように設定することもできます。</p> | ||||
|     <p>「<i>秒</i>」には新規メッセージを送信するまでの経過時間を設定します。</p> | ||||
|     <p><code>msg.complete</code>プロパティを設定したメッセージを受信すると、出力メッセージを送信します。この時、メッセージ列の数をリセットします。</p> | ||||
|     <p><code>msg.reset</code>プロパティを設定したメッセージを受診すると、部分的に受信済みのメッセージを破棄します。これらのメッセージは送信されません。この時、メッセージ列の数をリセットします。</p> | ||||
|     <p><code>msg.reset</code>プロパティを設定したメッセージを受信すると、部分的に受信済みのメッセージを破棄します。これらのメッセージは送信されません。この時、メッセージ列の数をリセットします。</p> | ||||
|  | ||||
|     <h4>列の集約モード</h4> | ||||
|     <p>列の集約モードを選択すると、メッセージ列を構成する各々のメッセージに対して式を適用し、集約した値を用いて一つのメッセージを構成します。</p> | ||||
|   | ||||
| @@ -52,7 +52,7 @@ | ||||
|     <p>Windowsではパスの区切り文字を(例えば、<code>\\ユーザー\\名前</code>のように)エスケープする必要があります。</p> | ||||
|     <p>テキストファイルの場合、行毎に分割して各々メッセージを送信することができます。また、バイナリファイルの場合、小さな塊のバッファに分割して送信できます。バッファの分割単位はオペレーティングシステム依存ですが、一般に64k(Linux/Mac)もしくは41k(Windows)です。</p> | ||||
|     <p>複数のメッセージに分割する場合、各メッセージには<code>parts</code>プロパティが設定され、メッセージ列を構成します。</p> | ||||
|     <p>主力形式が文字列の場合、入力データのエンコーディングをエンコーディングリストから選択できます。</p> | ||||
|     <p>出力形式が文字列の場合、入力データのエンコーディングをエンコーディングリストから選択できます。</p> | ||||
|     <h4>旧式のエラー処理</h4> | ||||
|     <p>Node-RED 0.17より前の版では、ファイルの読み込み時にエラーが発生すると<code>payload</code>を持たず<code>error</code>プロパティにエラーの詳細情報を設定したメッセージを送信します。この動作モードは非推奨であり、新しいノード実装ではデフォルトでは無効としています。ノードの設定により、必要に応じてこのモードを有効にできます。</p> | ||||
|     <p>エラーはcatchノードで補足して処理することを推奨します。</p> | ||||
|   | ||||
| @@ -34,9 +34,9 @@ | ||||
|     <pre>안녕하세요, {{payload.name}}씨. 오늘은 {{date}}입니다.</pre> | ||||
|     <p>라는 템플릿에 대해, | ||||
|     <pre>{ | ||||
|   date: "월요일" | ||||
|   date: "월요일", | ||||
|   payload: { | ||||
|     name: "홍길동", | ||||
|     name: "홍길동" | ||||
|   } | ||||
| }</pre> | ||||
|     <p>이라는 메세지를 수신한 경우,</p> | ||||
|   | ||||
							
								
								
									
										34
									
								
								packages/node_modules/@node-red/nodes/locales/zh-CN/common/20-inject.html
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								packages/node_modules/@node-red/nodes/locales/zh-CN/common/20-inject.html
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,34 @@ | ||||
| <!-- | ||||
|   Copyright JS Foundation and other contributors, http://js.foundation | ||||
|  | ||||
|   Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|   you may not use this file except in compliance with the License. | ||||
|   You may obtain a copy of the License at | ||||
|  | ||||
|   http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  | ||||
|   Unless required by applicable law or agreed to in writing, software | ||||
|   distributed under the License is distributed on an "AS IS" BASIS, | ||||
|   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|   See the License for the specific language governing permissions and | ||||
|   limitations under the License. | ||||
| --> | ||||
|  | ||||
| <script type="text/x-red" data-help-name="inject"> | ||||
| <p>手动或定期得将消息注入流中。消息的有效荷载可以为多种类型,包括字符串,JavaScript对象或当前时间。</p> | ||||
| <h3>输出</h3> | ||||
| <dl class="message-properties"> | ||||
|     <dt>payload<span class="property-type">various</span></dt> | ||||
|     <dd>指定的消息的有效荷载。</dd> | ||||
|     <dt class="optional">topic <span class="property-type">字符串</span></dt> | ||||
|     <dd>可以在节点中配置的可选属性。</dd> | ||||
| </dl> | ||||
| <h3>详细</h3> | ||||
| <p>通过使用特定的有效荷载,注入节点可以启动流。默认有效荷载是当前时间的时间戳(以毫秒为单位,自1970年1月1日起)。</p> | ||||
| <p>该节点还支持注入字符串,数字,布尔值,JavaScript对象或流/全局上下文值。</p> | ||||
| <p>默认情况下,节点可以通过在编辑器中单击节点按钮来手动触发。同时也可以被设置为定期或按计划注入。</p> | ||||
| <p>另一个可选的设置是在每次启动流时注入一次。</p> | ||||
| <p>可以指定的最大<i>间隔</i>约为596小时/24天。 但是,如果对于间隔超过一天的那些间隔,建议您使用scheduler节点来应对断电或重启。</p> | ||||
| <p><b>注意</b>:选项<i>“时间间隔” </i>和<i>“特定时间” </i>使用了标准cron系统。这意味着因此“20分钟”并不表示在此之后20分钟,而是每小时的20分钟,40分钟。如果您希望设定为从现在开始的每20分钟,那么请使用<i>“间隔” </i>选项。</p> | ||||
| <p><b>注意</b>: 如果您想在字符串中包含换行符,必须使用“功能”节点创建有效荷载。</p> | ||||
| </script> | ||||
							
								
								
									
										25
									
								
								packages/node_modules/@node-red/nodes/locales/zh-CN/common/21-debug.html
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								packages/node_modules/@node-red/nodes/locales/zh-CN/common/21-debug.html
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| <!-- | ||||
|   Copyright JS Foundation and other contributors, http://js.foundation | ||||
|  | ||||
|   Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|   you may not use this file except in compliance with the License. | ||||
|   You may obtain a copy of the License at | ||||
|  | ||||
|   http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  | ||||
|   Unless required by applicable law or agreed to in writing, software | ||||
|   distributed under the License is distributed on an "AS IS" BASIS, | ||||
|   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|   See the License for the specific language governing permissions and | ||||
|   limitations under the License. | ||||
| --> | ||||
|  | ||||
| <script type="text/x-red" data-help-name="debug"> | ||||
|     <p>在“调试”侧边栏选项卡和运行时日志中显示选定的消息属性。 默认情况下,它会显示<code>msg.payload</code>的值,但您也可以将其设置成显示任意属性,完整消息或JSONata表达式的结果。</p> | ||||
|     <h3>详细</h3> | ||||
|     <p>调试侧边栏会提供已发消息的结构化视图,方便您查询消息的结构。</p> | ||||
|     <p>JavaScript对象和数组可以根据需要来折叠或扩展。缓冲区对象可以显示为原始数据,也可以显示为字符串。</p> | ||||
|     <p>对任意条消息,调试侧边栏还会显示接收消息的时间,发送消息的节点以及消息类型等信息。单击源节点ID将在工作区中显示该节点。</p> | ||||
|     <p>节点上的按钮可用于启用或禁用其输出。建议禁用或删除所有未使用的调试节点。</p> | ||||
|     <p>还可以通过配置节点,将所有消息发送到运行时的日志,或将简短的数据(32个字符内)在调试节点下的状态文本上显示。</p> | ||||
| </script> | ||||
							
								
								
									
										24
									
								
								packages/node_modules/@node-red/nodes/locales/zh-CN/common/24-complete.html
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								packages/node_modules/@node-red/nodes/locales/zh-CN/common/24-complete.html
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| <!-- | ||||
|   Copyright JS Foundation and other contributors, http://js.foundation | ||||
|  | ||||
|   Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|   you may not use this file except in compliance with the License. | ||||
|   You may obtain a copy of the License at | ||||
|  | ||||
|   http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  | ||||
|   Unless required by applicable law or agreed to in writing, software | ||||
|   distributed under the License is distributed on an "AS IS" BASIS, | ||||
|   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
|   See the License for the specific language governing permissions and | ||||
|   limitations under the License. | ||||
| --> | ||||
|  | ||||
| <script type="text/x-red" data-help-name="complete"> | ||||
|     <p>当另一个节点完成对消息的处理时触发流。</p> | ||||
|     <h3>详细</h3> | ||||
|     <p>如果一个节点通知运行时它已完成消息的处理,该节点可用于触发第二个流。</p> | ||||
|     <p>这个节点可以与没有输出端口的节点一起使用,例如在使用电子邮件发送节点来发送邮件后触发一个流。</p> | ||||
|     <p>此节点只能被设置为处理流中某个所选节点的事件。与Catch节点不同,您不能指定“所有节点”模式并以流中的所有节点为目标。</p> | ||||
|     <p>并非所有节点都会触发此事件。这取决于它们是否支持于Node-RED 1.0中引入的此功能。</p> | ||||
| </script> | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user