diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 92a0abb8a..d673df676 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -30,5 +30,5 @@ the [forum](https://discourse.nodered.org) or
- [ ] 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 forum/slack team.
-- [ ] I have run `grunt` to verify the unit tests pass
+- [ ] I have run `npm run test` to verify the unit tests pass
- [ ] I have added suitable unit tests to cover the new/changed functionality
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 000000000..ad3a4ca7a
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,15 @@
+# To get started with Dependabot version updates, you'll need to specify which
+# package ecosystems to update and where the package manifests are located.
+# Please see the documentation for all configuration options:
+# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
+
+version: 2
+updates:
+ - package-ecosystem: "github-actions" # See documentation for possible values
+ directory: "/" # Location of package manifests
+ schedule:
+ interval: "monthly"
+ groups:
+ github-actions:
+ patterns:
+ - "*"
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 85fc1f92a..84140e311 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -14,25 +14,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out node-red repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
path: 'node-red'
- name: Check out node-red-docker repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
repository: 'node-red/node-red-docker'
path: 'node-red-docker'
- name: Check out node-red.github.io repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
repository: 'node-red/node-red.github.io'
path: 'node-red.github.io'
- - uses: actions/setup-node@v1
+ - uses: actions/setup-node@v4
with:
node-version: '16'
- run: node ./node-red/.github/scripts/update-node-red-docker.js
- name: Create Docker Pull Request
- uses: peter-evans/create-pull-request@v2
+ uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.NR_REPO_TOKEN }}
committer: GitHub
@@ -48,7 +48,7 @@ jobs:
This PR was auto-generated by a GitHub Action. Any questions, speak to @knolleary
- run: node ./node-red/.github/scripts/update-node-red-website.js
- name: Create Website Pull Request
- uses: peter-evans/create-pull-request@v2
+ uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.NR_REPO_TOKEN }}
committer: GitHub
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index cdba11d2a..8e010c63e 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -12,16 +12,15 @@ permissions:
jobs:
build:
permissions:
- checks: write # for coverallsapp/github-action to create new checks
contents: read # for actions/checkout to fetch code
runs-on: ubuntu-latest
strategy:
matrix:
- node-version: [16, 18, 20]
+ node-version: [18, 20]
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
@@ -29,8 +28,3 @@ jobs:
- name: Run tests
run: |
npm run test
- # - name: Publish to coveralls.io
- # if: ${{ matrix.node-version == 16 }}
- # uses: coverallsapp/github-action@v1.1.2
- # with:
- # github-token: ${{ github.token }}
diff --git a/.gitignore b/.gitignore
index d4c991688..6a2ebfaa1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,4 @@ docs
.vscode
.nyc_output
sync.ffs_db
+package-lock.json
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 26ec431bc..78663e0a6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,177 @@
+#### 4.0.0-beta.1: Beta Release
+
+Editor
+
+ - Click on id in debug panel highlights node or flow (#4439) @ralphwetzel
+ - Support config selection in a subflow env var (#4587) @Steve-Mcl
+ - Add timestamp formatting options to TypedInput (#4468) @knolleary
+ - Allow RED.view.select to select links (#4553) @lgrkvst
+ - Add auto-complete to flow/global/env typedInput types (#4480) @knolleary
+ - Improve the appearance of the Node-RED primary header (#4598) @joepavitt
+
+Runtime
+
+ - let settings.httpNodeAuth accept single middleware or array of middlewares (#4572) @kevinGodell
+ - Upgrade to JSONata 2.x (#4590) @knolleary
+ - Bump minimum version to node 18 (#4571) @knolleary
+ - npm: Remove production flag on npm invocation (#4347) @ZJvandeWeg
+ - Timer testing fix (#4367) @hlovdal
+ - Bump to 4.0.0-dev (#4322) @knolleary
+
+Nodes
+
+ - TCP node - when resetting, if no payload, stay disconnected @dceejay
+ - HTML node: add option for collecting attributes and content (#4513) @gorenje
+ - let split node specify property to split on, and join auto join correctly (#4386) @dceejay
+ - Add RFC4180 compliant mode to CSV node (#4540) @Steve-Mcl
+ - Fix change node to return boolean if asked (#4525) @dceejay
+ - Let msg.reset reset Tcp request node connection when in stay connected mode (#4406) @dceejay
+ - Let debug node status msg length be settable via settings (#4402) @dceejay
+ - Feat: Add ability to set headers for WebSocket client (#4436) @marcus-j-davies
+
+#### 3.1.7: Maintenance Release
+
+ - Add Japanese translation for v3.1.6 (#4603) @kazuhitoyokoi
+ - Update jsonata version (#4593) @hardillb
+
+#### 3.1.6: Maintenance Release
+
+Editor
+
+ - Do not flag env var in num typedInput as error (#4582) @knolleary
+ - Fix example flow name in import dialog (#4578) @kazuhitoyokoi
+ - Fix missing node icons in workspace (#4570) @knolleary
+
+Runtime
+
+ - Handle undefined env vars (#4581) @knolleary
+ - fix: Removed offending MD5 crypto hash and replaced with SHA1 and SHA256 … (#4568) @JaysonHurst
+ - chore: remove never use import code (#4580) @giscafer
+
+Nodes
+
+ - fix: template node zh-CN translation (#4575) @giscafer
+
+#### 3.1.5: Maintenance Release
+
+Runtime
+
+ - Fix require of dns module (#4562) @knolleary
+ - Ensure global creds object is initialised when adding first cred (#4561) @knolleary
+
+#### 3.1.4: Maintenance Release
+
+Editor
+
+ - Highlight errors in config node sidebar (#4529) @knolleary
+ - Improve feedback in import dialog to show conflicted nodes (#4550) @knolleary
+ - Modify node users info in config editor footer (#4528) @knolleary
+ - Handle modified-nodes deploy after replacing unknown config node (#4556) @knolleary
+ - Handle undefined default export when importing module (#4539) @knolleary
+ - Fix icon scaling for non .svg icons (#4491) @ralphwetzel
+ - (convertNode) Do not create the credentials object if there is nothing to export (#4544) @GogoVega
+ - Ensure subflow instance node has g property set (#4538) @knolleary
+ - Handle importing flow with existing subflow and instance node (#4546) @knolleary
+ - Update index.mst (#4483) @gorenje
+ - Include top level property name when copying path from context (#4527) @knolleary
+ - Add handling to disable items on context menu (#4500) @kazuhitoyokoi
+ - Focus Quick Add dialog from context menu (#4516) @kazuhitoyokoi
+ - Fix subflow ports in Quick Add dialog (#4518) @kazuhitoyokoi
+ - Fix location of subflow ports in palette (#4502) @kazuhitoyokoi
+ - Client/Editor Events: fix off-in-on pattern emulating once (#4484) @gorenje
+ - Restore caching busting functionality without using explict version number (#4512) @knolleary
+ - Do not translate the list of available languages (#4531) @GogoVega
+ - Add French translation of v3.1.3 changes (#4477) @GogoVega
+ - i18n(es-ES) Spanish Spain translation (#4495) @joebordes
+ - Add missing validation messages (#4487) @GogoVega
+ - Add Japanese translations for v3.1.3 (#4498) @kazuhitoyokoi
+ - Replace `rename` by `edit` for the menu flow label (#4506) @GogoVega
+ - Update editor.json fix typo in German translation (#4552) @guidoffm
+
+Runtime
+
+ - Bump the github-actions group with 1 update (#4554) @app/dependabot
+ - Clone objects types when getting env values (#4519) @knolleary
+ - Ensure global-config credential env vars are merged on deploy (#4526) @knolleary
+
+Nodes
+
+ - 21-httprequest.js remove unused code, because of broken use of toLowercase (#4522) @gorenje
+
+#### 3.1.3: Maintenance Release
+
+Editor
+
+ - Add missing en-us messages (#4475) @knolleary
+
+#### 3.1.2: Maintenance Release
+
+Editor
+
+ - Relax some node validators to allow undefined value (#4471) @knolleary
+ - Fix switch validation of typeof field (#4465) @knolleary
+ - Use move cursor when hovering on group border (#4467) @knolleary
+ - Added action list Chinese (Simplified and Traditional) translation + v3.1.1 changes (#4470) @wangyiyi2056
+ - Add French translation of `action-list` + v3.1.1 changes (#4466) @GogoVega
+
+ Runtime
+
+ - Ensure nested groups inside subflows have their g props remapped (#4472) @knolleary
+
+#### 3.1.1: Maintenance Release
+
+Editor
+
+ - Fix debug filter (#4461) @knolleary
+ - Fix various issues with debug pop-out window (#4459) @knolleary
+ - Ensure subflow instances keep track of their groups (#4457) @knolleary
+ - Fix `validateNodeProperty` without validator provided (#4455) @GogoVega
+ - Debounce node-removed notifications (#4453) @knolleary
+ - Don't try to load the parents of the first commit (#4448) @bonanitech
+ - Allow a theme to specifiy which theme mermaid should use (#4441) @knolleary
+ - Update browser title with flow name if set (#4427) @knolleary
+ - Ensure typeSearch handles undefined node definitions (#4423) @knolleary
+ - Ensure group w/h are imported if present (#4426) @knolleary
+ - Hide node status background when there is no status to show (#4425) @knolleary
+ - Add a close button to the restart-required notification (#4407) @knolleary
+ - Extend typedInput "num" type validity check to NaN, binary, octal & hex (#4371) @ralphwetzel
+ - Fix unintended new line in node name (#4399) @kazuhitoyokoi
+ - Ctrl-Enter does not close tray (Monaco) #4377 (#4382) @hazymat
+ - fix buffer viewer to handle 0b style binary (#4393) @dceejay
+ - Rework mermaid integration to support off-DOM rendering (#4364) @knolleary
+ - Add missing nls labels to context menu (#4365) @knolleary
+
+Runtime
+
+ - Bump the github-actions group with 2 updates (#4404) @app/dependabot
+ - Handle unknown node reference inside subflow module (#4460) @knolleary
+ - Add modules.install audit event when external module installed (#4452) @knolleary
+ - Allow import of modules with subpath in specifier (#4451) @knolleary
+ - Update node-red-admin version (#4438) @knolleary
+ - Handle false-like env vars properly (#4411) @knolleary
+ - Only save settings once during node load process (#4409) @knolleary
+ - Ensure global-config nodes lookup cred values properly (#4405) @knolleary
+ - Handle credential env var evaluation when no value set (#4362) @knolleary
+ - Don't commit package-lock.json (#4354) @bonanitech
+ - Fix env evaluation when one env references another in the same object (#4361) @knolleary
+ - Add dependabot for Github Actions (#4312) @Rotzbua
+ - Update outdated Github Actions (#4311) @Rotzbua
+ - github: Request `npm run test` in PR template (#4348) @ZJvandeWeg
+ - Add French translation of v3.1.0-beta.4 changes + slight improvements (#4329) @GogoVega
+ - Handle nodes with multiple input handlers properly (#4332) @knolleary
+ - Soften the language around unrequited PRs (#4351) @knolleary
+
+Nodes
+
+ - CSV: make CSV export way faster by not re-allocating and handling huge string (#4349) @Fadoli
+ - Delay: Fix regression in delay node to not pass on msg.reset (#4350) @dceejay
+ - Link Call: Handle undefined linkType value for existing link-call nodes (#4331) @knolleary
+ - MQTT: Guard against node.broker being undefined (#4454) @knolleary
+ - MQTT: check topic length > 0 before publish (#4416) @dceejay
+ - Switch/Change: Improve validation of switch/change node rules (#4368) @knolleary
+ - Template: Fix height of description editor in template node (#4346) @kazuhitoyokoi
+ - Various: Add validators to any fields using msg-typed Input (#4440) @knolleary
+
#### 3.1.0: Milestone Release
Editor
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 95287d81f..f8fb04304 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -16,6 +16,9 @@ behavior to the project's core team at team@nodered.org.
Please raise any bug reports on the relevant project's issue tracker. Be sure to
search the list to see if your issue has already been raised.
+If your issue is more of a question on how to do something with Node-RED, please
+consider using the [community forum](https://discourse.nodered.org/).
+
A good bug report is one that make it easy for us to understand what you were
trying to do and what went wrong.
@@ -35,14 +38,18 @@ For feature requests, please raise them on the [forum](https://discourse.nodered
## Pull-Requests
If you want to raise a pull-request with a new feature, or a refactoring
-of existing code, it may well get rejected if you haven't discussed it on
-the [forum](https://discourse.nodered.org) first.
+of existing code, please come and discuss it with us first. We prefer to
+do it that way to make sure your time and effort is well spent on something
+that fits with our goals.
+
+If you've got a bug-fix or similar for us, then you are most welcome to
+get it raised - just make sure you link back to the issue it's fixing and
+try to include some tests!
All contributors need to sign the OpenJS Foundation's Contributor License Agreement.
It is an online process and quick to do. If you raise a pull-request without
having signed the CLA, you will be prompted to do so automatically.
-
### Code Branches
When raising a PR for a fix or a new feature, it is important to target the right branch.
diff --git a/Gruntfile.js b/Gruntfile.js
index 44f4c97f6..09b057837 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -151,7 +151,6 @@ module.exports = function(grunt) {
"packages/node_modules/@node-red/editor-client/src/js/font-awesome.js",
"packages/node_modules/@node-red/editor-client/src/js/history.js",
"packages/node_modules/@node-red/editor-client/src/js/validators.js",
- "packages/node_modules/@node-red/editor-client/src/js/ui/mermaid.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/utils.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js",
"packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js",
diff --git a/package.json b/package.json
index 2af24212d..561609dcf 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "node-red",
- "version": "4.0.0-dev",
+ "version": "4.0.0-beta.1",
"description": "Low-code programming for event-driven applications",
"homepage": "https://nodered.org",
"license": "Apache-2.0",
@@ -54,7 +54,7 @@
"is-utf8": "0.2.1",
"js-yaml": "4.1.0",
"json-stringify-safe": "5.0.1",
- "jsonata": "1.8.6",
+ "jsonata": "2.0.4",
"lodash.clonedeep": "^4.5.0",
"media-typer": "1.1.0",
"memorystore": "1.6.7",
@@ -64,7 +64,7 @@
"mqtt": "4.3.7",
"multer": "1.4.5-lts.1",
"mustache": "4.2.0",
- "node-red-admin": "^3.1.0",
+ "node-red-admin": "^3.1.2",
"node-watch": "0.7.4",
"nopt": "5.0.0",
"oauth2orize": "1.11.1",
@@ -109,7 +109,7 @@
"jquery-i18next": "1.2.1",
"jsdoc-nr-template": "github:node-red/jsdoc-nr-template",
"marked": "4.3.0",
- "mermaid": "^9.4.3",
+ "mermaid": "^10.4.0",
"minami": "1.2.3",
"mocha": "9.2.2",
"node-red-node-test-helper": "^0.3.2",
@@ -122,6 +122,6 @@
"supertest": "6.3.3"
},
"engines": {
- "node": ">=14"
+ "node": ">=18"
}
}
diff --git a/packages/node_modules/@node-red/editor-api/lib/admin/context.js b/packages/node_modules/@node-red/editor-api/lib/admin/context.js
index 54bfd9f85..4124b812d 100644
--- a/packages/node_modules/@node-red/editor-api/lib/admin/context.js
+++ b/packages/node_modules/@node-red/editor-api/lib/admin/context.js
@@ -33,6 +33,9 @@ module.exports = {
store: req.query['store'],
req: apiUtils.getRequestLogObject(req)
}
+ if (req.query['keysOnly'] !== undefined) {
+ opts.keysOnly = true
+ }
runtimeAPI.context.getValue(opts).then(function(result) {
res.json(result);
}).catch(function(err) {
diff --git a/packages/node_modules/@node-red/editor-api/lib/admin/settings.js b/packages/node_modules/@node-red/editor-api/lib/admin/settings.js
index d72f9e094..425d42415 100644
--- a/packages/node_modules/@node-red/editor-api/lib/admin/settings.js
+++ b/packages/node_modules/@node-red/editor-api/lib/admin/settings.js
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
-var apiUtils = require("../util");
var runtimeAPI;
var settings;
var theme = require("../editor/theme");
diff --git a/packages/node_modules/@node-red/editor-api/lib/auth/strategies.js b/packages/node_modules/@node-red/editor-api/lib/auth/strategies.js
index e18925c19..b071a9caf 100644
--- a/packages/node_modules/@node-red/editor-api/lib/auth/strategies.js
+++ b/packages/node_modules/@node-red/editor-api/lib/auth/strategies.js
@@ -18,7 +18,6 @@ var BearerStrategy = require('passport-http-bearer').Strategy;
var ClientPasswordStrategy = require('passport-oauth2-client-password').Strategy;
var passport = require("passport");
-var crypto = require("crypto");
var util = require("util");
var Tokens = require("./tokens");
diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/index.js b/packages/node_modules/@node-red/editor-api/lib/editor/index.js
index 42be1f270..54cf17f12 100644
--- a/packages/node_modules/@node-red/editor-api/lib/editor/index.js
+++ b/packages/node_modules/@node-red/editor-api/lib/editor/index.js
@@ -14,11 +14,9 @@
* limitations under the License.
**/
-var express = require("express");
var path = require('path');
var comms = require("./comms");
-var library = require("./library");
var info = require("./settings");
var auth = require("../auth");
@@ -51,7 +49,7 @@ module.exports = {
var ui = require("./ui");
- ui.init(runtimeAPI);
+ ui.init(settings, runtimeAPI);
const editorApp = apiUtil.createExpressApp(settings)
diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/library.js b/packages/node_modules/@node-red/editor-api/lib/editor/library.js
index cd564b3f8..7853227ea 100644
--- a/packages/node_modules/@node-red/editor-api/lib/editor/library.js
+++ b/packages/node_modules/@node-red/editor-api/lib/editor/library.js
@@ -15,8 +15,6 @@
**/
var apiUtils = require("../util");
-var fs = require('fs');
-var fspath = require('path');
var runtimeAPI;
diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/locales.js b/packages/node_modules/@node-red/editor-api/lib/editor/locales.js
index 568f5837b..6109d8741 100644
--- a/packages/node_modules/@node-red/editor-api/lib/editor/locales.js
+++ b/packages/node_modules/@node-red/editor-api/lib/editor/locales.js
@@ -13,9 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
-var fs = require('fs');
-var path = require('path');
-// var apiUtil = require('../util');
var i18n = require("@node-red/util").i18n; // TODO: separate module
diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/sshkeys.js b/packages/node_modules/@node-red/editor-api/lib/editor/sshkeys.js
index 08097571f..885967b91 100644
--- a/packages/node_modules/@node-red/editor-api/lib/editor/sshkeys.js
+++ b/packages/node_modules/@node-red/editor-api/lib/editor/sshkeys.js
@@ -15,7 +15,6 @@
**/
var apiUtils = require("../util");
-var express = require("express");
var runtimeAPI;
var settings;
diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/theme.js b/packages/node_modules/@node-red/editor-api/lib/editor/theme.js
index c3e8f975e..c3808a751 100644
--- a/packages/node_modules/@node-red/editor-api/lib/editor/theme.js
+++ b/packages/node_modules/@node-red/editor-api/lib/editor/theme.js
@@ -14,7 +14,6 @@
* limitations under the License.
**/
-var express = require("express");
var util = require("util");
var path = require("path");
var fs = require("fs");
@@ -339,6 +338,8 @@ module.exports = {
}
theme.codeEditor = theme.codeEditor || {}
theme.codeEditor.options = Object.assign({}, themePlugin.monacoOptions, theme.codeEditor.options);
+
+ theme.mermaid = Object.assign({}, themePlugin.mermaid, theme.mermaid)
}
activeThemeInitialised = true;
}
diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/ui.js b/packages/node_modules/@node-red/editor-api/lib/editor/ui.js
index 998816f5e..37c79d415 100644
--- a/packages/node_modules/@node-red/editor-api/lib/editor/ui.js
+++ b/packages/node_modules/@node-red/editor-api/lib/editor/ui.js
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
+const crypto = require('crypto')
var express = require('express');
var fs = require("fs");
var path = require("path");
@@ -24,13 +25,16 @@ var apiUtils = require("../util");
var theme = require("./theme");
var runtimeAPI;
+let settings;
var editorClientDir = path.dirname(require.resolve("@node-red/editor-client"));
var defaultNodeIcon = path.join(editorClientDir,"public","red","images","icons","arrow-in.svg");
var editorTemplatePath = path.join(editorClientDir,"templates","index.mst");
var editorTemplate;
+let cacheBuster
module.exports = {
- init: function(_runtimeAPI) {
+ init: function(_settings, _runtimeAPI) {
+ settings = _settings;
runtimeAPI = _runtimeAPI;
editorTemplate = fs.readFileSync(editorTemplatePath,"utf8");
Mustache.parse(editorTemplate);
@@ -91,6 +95,12 @@ module.exports = {
},
editor: async function(req,res) {
+ if (!cacheBuster) {
+ // settings.instanceId is set asynchronously to the editor-api
+ // being initiaised. So we defer calculating the cacheBuster hash
+ // until the first load of the editor
+ cacheBuster = crypto.createHash('sha1').update(`${settings.version || 'version'}-${settings.instanceId || 'instanceId'}`).digest("hex").substring(0,12)
+ }
let sessionMessages;
if (req.session && req.session.messages) {
@@ -99,6 +109,7 @@ module.exports = {
}
res.send(Mustache.render(editorTemplate,{
sessionMessages,
+ cacheBuster,
...await theme.context()
}));
},
diff --git a/packages/node_modules/@node-red/editor-api/lib/index.js b/packages/node_modules/@node-red/editor-api/lib/index.js
index d9f34eafd..9264550b3 100644
--- a/packages/node_modules/@node-red/editor-api/lib/index.js
+++ b/packages/node_modules/@node-red/editor-api/lib/index.js
@@ -24,11 +24,8 @@
* @namespace @node-red/editor-api
*/
-var express = require("express");
var bodyParser = require("body-parser");
-var util = require('util');
var passport = require('passport');
-var cors = require('cors');
var auth = require("./auth");
var apiUtil = require("./util");
diff --git a/packages/node_modules/@node-red/editor-api/package.json b/packages/node_modules/@node-red/editor-api/package.json
index f98443171..fdb00cab9 100644
--- a/packages/node_modules/@node-red/editor-api/package.json
+++ b/packages/node_modules/@node-red/editor-api/package.json
@@ -1,6 +1,6 @@
{
"name": "@node-red/editor-api",
- "version": "4.0.0-dev",
+ "version": "4.0.0-beta.1",
"license": "Apache-2.0",
"main": "./lib/index.js",
"repository": {
@@ -16,8 +16,8 @@
}
],
"dependencies": {
- "@node-red/util": "4.0.0-dev",
- "@node-red/editor-client": "4.0.0-dev",
+ "@node-red/util": "4.0.0-beta.1",
+ "@node-red/editor-client": "4.0.0-beta.1",
"bcryptjs": "2.4.3",
"body-parser": "1.20.2",
"clone": "2.1.2",
diff --git a/packages/node_modules/@node-red/editor-client/locales/de/editor.json b/packages/node_modules/@node-red/editor-client/locales/de/editor.json
index b3e891d03..4a111798c 100644
--- a/packages/node_modules/@node-red/editor-client/locales/de/editor.json
+++ b/packages/node_modules/@node-red/editor-client/locales/de/editor.json
@@ -109,7 +109,6 @@
"selectionToSubflow": "Auswahl in Subflow umwandeln",
"flows": "Flow",
"add": "Hinzufügen",
- "rename": "Umbenennen",
"delete": "Löschen",
"keyboardShortcuts": "Tastenkürzel",
"login": "Anmelden",
@@ -1078,7 +1077,7 @@
"git-auth-error": "Git-Authentifizierungsfehler"
},
"create-success": {
- "success": "Sie haben Ihr erstes Projekt erfolgreich erstduellt!",
+ "success": "Sie haben Ihr erstes Projekt erfolgreich erstellt!",
"desc0": "Sie können jetzt Node-RED wie bisher verwenden.",
"desc1": "Im Tab 'Info' in der Seitenleiste wird angezeigt, welches das aktuelle Projekt ist. Über die Schaltfläche rechts neben dem Projektnamen gelangt man zu 'Projekteinstellungen'.",
"desc2": "Im Tab 'Commit-Historie' in der Seitenleiste werden alle Dateien angezeigt, die sich in Ihrem Projekt geändert haben, und um sie ins lokale Repository zu übertragen (commit). Es zeigt Ihnen eine vollständige Historie Ihrer Commits an und ermöglicht es Ihnen, Ihre Commits in ein (remote) Server-Repository zu schieben (push)."
@@ -1174,17 +1173,6 @@
"diagnostics": {
"title": "System-Informationen"
},
- "languages": {
- "de": "Deutsch",
- "en-US": "Englisch",
- "fr": "Französisch",
- "ja": "Japanisch",
- "ko": "Koreanisch",
- "pt-BR":"Portugiesisch",
- "ru": "Russisch",
- "zh-CN": "Chinesisch (Vereinfacht)",
- "zh-TW": "Chinesisch (Traditionell)"
- },
"validator": {
"errors": {
"invalid-json": "Ungültige JSON-Daten: __error__",
diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json
index a0d61c6d7..fb1064a0a 100644
--- a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json
+++ b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json
@@ -113,7 +113,7 @@
"displayStatus": "Show node status",
"displayConfig": "Configuration nodes",
"import": "Import",
- "importExample": "Import Example Flow",
+ "importExample": "Import example flow",
"export": "Export",
"search": "Search flows",
"searchInput": "search your flows",
@@ -122,7 +122,6 @@
"selectionToSubflow": "Selection to Subflow",
"flows": "Flows",
"add": "Add",
- "rename": "Rename",
"delete": "Delete",
"keyboardShortcuts": "Keyboard shortcuts",
"login": "Login",
@@ -130,6 +129,11 @@
"editPalette": "Manage palette",
"other": "Other",
"showTips": "Show tips",
+ "showNodeHelp": "Show node help",
+ "enableSelectedNodes": "Enable selected nodes",
+ "disableSelectedNodes": "Disable selected nodes",
+ "showSelectedNodeLabels": "Show selected node labels",
+ "hideSelectedNodeLabels": "Hide selected node labels",
"showWelcomeTours": "Show guided tours for new versions",
"help": "Node-RED website",
"projects": "Projects",
@@ -299,7 +303,8 @@
"missingType": "Input not a valid flow - item __index__ missing 'type' property"
},
"conflictNotification1": "Some of the nodes you are importing already exist in your workspace.",
- "conflictNotification2": "Select which nodes to import and whether to replace the existing nodes, or to import a copy of them."
+ "conflictNotification2": "Select which nodes to import and whether to replace the existing nodes, or to import a copy of them.",
+ "alreadyExists": "This node already exists"
},
"copyMessagePath": "Path copied",
"copyMessageValue": "Value copied",
@@ -511,8 +516,8 @@
"selectAllConnected": "Select connected",
"addRemoveNode": "Add/remove node from selection",
"editSelected": "Edit selected node",
- "deleteSelected": "Delete selected nodes or link",
- "deleteReconnect": "Delete and Reconnect",
+ "deleteSelected": "Delete selection",
+ "deleteReconnect": "Delete and reconnect",
"importNode": "Import nodes",
"exportNode": "Export nodes",
"nudgeNode": "Move selected nodes (1px)",
@@ -705,7 +710,7 @@
"triggerAction": "Trigger action",
"find": "Find in workspace",
"copyItemUrl": "Copy item url",
- "copyURL2Clipboard": "Copied url to clipboard",
+ "copyURL2Clipboard": "Copied url to clipboard",
"showFlow": "Show",
"hideFlow": "Hide"
},
@@ -921,7 +926,14 @@
"date": "timestamp",
"jsonata": "expression",
"env": "env variable",
- "cred": "credential"
+ "cred": "credential",
+ "conf-types": "config node"
+ },
+ "date": {
+ "format": {
+ "timestamp": "milliseconds since epoch",
+ "object": "JavaScript Date Object"
+ }
}
},
"editableList": {
@@ -1204,22 +1216,22 @@
"title": "System Info"
},
"languages": {
- "de": "German",
+ "de": "Deutsch",
"en-US": "English",
- "fr": "French",
- "ja": "Japanese",
+ "es-ES": "Español (España)",
+ "fr": "Français",
+ "ja": "日本語",
"ko": "Korean",
- "pt-BR":"Portuguese",
- "ru": "Russian",
- "zh-CN": "Chinese(Simplified)",
- "zh-TW": "Chinese(Traditional)"
+ "pt-BR": "Português (Brasil)",
+ "ru": "Русский",
+ "zh-CN": "简体中文",
+ "zh-TW": "繁體中文"
},
"validator": {
"errors": {
"invalid-json": "Invalid JSON data: __error__",
- "invalid-json-prop": "__prop__: invalid JSON data: __error__",
+ "invalid-expr": "Invalid JSONata expression: __error__",
"invalid-prop": "Invalid property expression",
- "invalid-prop-prop": "__prop__: invalid property expression",
"invalid-num": "Invalid number",
"invalid-num-prop": "__prop__: invalid number",
"invalid-regexp": "Invalid input pattern",
@@ -1231,6 +1243,7 @@
}
},
"contextMenu": {
+ "showActionList": "Show action list",
"insert": "Insert",
"node": "Node",
"junction": "Junction",
diff --git a/packages/node_modules/@node-red/editor-client/locales/es-ES/editor.json b/packages/node_modules/@node-red/editor-client/locales/es-ES/editor.json
new file mode 100644
index 000000000..2655dfe27
--- /dev/null
+++ b/packages/node_modules/@node-red/editor-client/locales/es-ES/editor.json
@@ -0,0 +1,1235 @@
+{
+ "common": {
+ "label": {
+ "name": "Nombre",
+ "ok": "Vale",
+ "done": "Hecho",
+ "cancel": "Cancelar",
+ "delete": "Eliminar",
+ "close": "Cerrar",
+ "load": "Cargar",
+ "save": "Guardar",
+ "import": "Importar",
+ "export": "Exportar",
+ "back": "Atrás",
+ "next": "Siguiente",
+ "clone": "Clonar proyecto",
+ "cont": "Continuar",
+ "style": "Estilo",
+ "line": "Contorno",
+ "fill": "Rellenar",
+ "label": "Etiqueta",
+ "color": "Color",
+ "position": "Posición",
+ "enable": "Habilitar",
+ "disable": "Deshabilitar",
+ "upload": "Subir",
+ "lock": "Bloquear",
+ "unlock": "Desbloquear",
+ "locked": "Bloqueado",
+ "unlocked": "Desbloqueado"
+ },
+ "type": {
+ "string": "texto",
+ "number": "número",
+ "boolean": "booleano",
+ "array": "array",
+ "buffer": "buffer",
+ "object": "objeto",
+ "jsonString": "texto JSON",
+ "undefined": "indefinido",
+ "null": "nulo"
+ }
+ },
+ "event": {
+ "loadPlugins": "Cargando Extensiones",
+ "loadPalette": "Cargando Paleta",
+ "loadNodeCatalogs": "Cargando catálogos de Nodos",
+ "loadNodes": "Cargando Nodos __count__",
+ "loadFlows": "Cargando Flujos",
+ "importFlows": "Añadiendo Flujos al espacio de trabajo",
+ "importError": "Error añadiendo flujos
__message__
",
+ "loadingProject": "Cargando proyecto"
+ },
+ "workspace": {
+ "defaultName": "Flujo __number__",
+ "editFlow": "Editar flujo: __name__",
+ "confirmDelete": "Confirmar eliminación",
+ "delete": "¿Estás seguro de que quieres eliminar '__label__'?",
+ "dropFlowHere": "Suelta el flujo aquí",
+ "dropImageHere": "Suelta la imagen aquí",
+ "addFlow": "Añadir flujo",
+ "addFlowToRight": "Añadir flujo a la derecha",
+ "closeFlow": "Cerrar flujo",
+ "hideFlow": "Esconder flujo",
+ "hideOtherFlows": "Esconder otros flujos",
+ "showAllFlows": "Mostrar todos los flujos (__count__ escondidos)",
+ "hideAllFlows": "Esconder todos los flujos",
+ "hiddenFlows": "Listar __count__ flujo escondido",
+ "hiddenFlows_plural": "Listar __count__ flujos escondidos",
+ "showLastHiddenFlow": "Abrir flujo escondido",
+ "listFlows": "Listar flujos",
+ "listSubflows": "Listar subflujos",
+ "status": "Estado",
+ "enabled": "Habilitado",
+ "disabled": "Deshabilitado",
+ "info": "Descripción",
+ "selectNodes": "Haz clic en los nodos para seleccionar",
+ "enableFlow": "Habilitar flujo",
+ "disableFlow": "Deshabilitar flujo",
+ "lockFlow": "Bloquear flujo",
+ "unlockFlow": "desbloquear flujo",
+ "moveToStart": "Mover flujo al inicio",
+ "moveToEnd": "Mover flujo al final"
+ },
+ "menu": {
+ "label": {
+ "view": {
+ "view": "Vista",
+ "grid": "Rejilla",
+ "storeZoom": "Restaurar nivel de zoom al iniciar",
+ "storePosition": "Restaurar la posición de desplazamiento al iniciar",
+ "showGrid": "Mostrar rejilla",
+ "snapGrid": "Ajustar a rejilla",
+ "gridSize": "Tamaño rejilla",
+ "textDir": "Dirección Texto",
+ "defaultDir": "Predeterminado",
+ "ltr": "Izquierda-a-derecha",
+ "rtl": "Derecha-a-izquierda",
+ "auto": "Contextual",
+ "language": "Idioma",
+ "browserDefault": "El del Navegador"
+ },
+ "sidebar": {
+ "show": "Mostrar barra lateral"
+ },
+ "palette": {
+ "show": "Mostrar paleta"
+ },
+ "edit": "Editar",
+ "settings": "Ajustes",
+ "userSettings": "Ajustes de usuario",
+ "nodes": "Nodos",
+ "displayStatus": "Mostrar estado del nodo",
+ "displayConfig": "Nodos de configuración",
+ "import": "Importar",
+ "importExample": "Importar flujo de ejemplo",
+ "export": "Exportar",
+ "search": "Buscar flujos",
+ "searchInput": "busca tus flujos",
+ "subflows": "Subflujos",
+ "createSubflow": "Crear subflujo",
+ "selectionToSubflow": "Convertir selección a Subflujo",
+ "flows": "Flujos",
+ "add": "Añadir",
+ "delete": "Eliminar",
+ "keyboardShortcuts": "Atajos de teclado",
+ "login": "Acceso",
+ "logout": "Salir",
+ "editPalette": "Administrar paleta",
+ "other": "Otro",
+ "showTips": "Mostrar ayudas",
+ "showNodeHelp": "Mostrar ayuda nodo",
+ "enableSelectedNodes": "Habilitar nodos seleccionados",
+ "disableSelectedNodes": "Deshabilitar nodos seleccionados",
+ "showSelectedNodeLabels": "Mostrar etiquetas de nodos seleccionados",
+ "hideSelectedNodeLabels": "Esconder etiquetas de nodos seleccionados",
+ "showWelcomeTours": "Mostrar visitas guiadas para nuevas versiones",
+ "help": "Sitio web de Node-RED",
+ "projects": "Proyectos",
+ "projects-new": "Nuevo",
+ "projects-open": "Abrir",
+ "projects-settings": "Ajustes del proyecto",
+ "showNodeLabelDefault": "Mostrar etiqueta de nodos añadidos recientemente",
+ "codeEditor": "Editor de código",
+ "groups": "Grupos",
+ "groupSelection": "Agrupar selección",
+ "ungroupSelection": "Desagrupar selección",
+ "groupMergeSelection": "Fusionar selección",
+ "groupRemoveSelection": "Sacar del grupo",
+ "arrange": "Organizar",
+ "alignLeft": "Alinear a la izquierda",
+ "alignCenter": "Alinear al centro",
+ "alignRight": "Alinear a la derecha",
+ "alignTop": "Alinear arriba",
+ "alignMiddle": "Alinear en medio",
+ "alignBottom": "Alinear abajo",
+ "distributeHorizontally": "Distribuir horizontalmente",
+ "distributeVertically": "Distribuir verticalmente",
+ "moveToBack": "Mover al fondo",
+ "moveToFront": "Mover al frente",
+ "moveBackwards": "Mover atrás",
+ "moveForwards": "Mover adelante"
+ }
+ },
+ "actions": {
+ "toggle-navigator": "Alternar navegador",
+ "zoom-out": "Alejar",
+ "zoom-reset": "Restablecer zoom",
+ "zoom-in": "Acercar",
+ "search-flows": "Buscar flujos",
+ "search-prev": "Anterior",
+ "search-next": "Siguiente",
+ "search-counter": "\"__term__\" __result__ de __count__"
+ },
+ "user": {
+ "loggedInAs": "Conectado como __name__",
+ "username": "Usuario",
+ "password": "Contraseña",
+ "login": "Acceso",
+ "loginFailed": "Acceso fallido",
+ "notAuthorized": "No autorizado",
+ "errors": {
+ "settings": "Debes iniciar sesión para acceder a los ajustes",
+ "deploy": "Debes iniciar sesión para instanciar cambios",
+ "notAuthorized": "Debes iniciar sesión para realizar esta acción"
+ }
+ },
+ "notification": {
+ "state": {
+ "flowsStopped": "Flujos detenidos",
+ "flowsStarted": "Flujos iniciados"
+ },
+ "warning": "Aviso : __message__",
+ "warnings": {
+ "undeployedChanges": "nodo tiene cambios no instanciados",
+ "nodeActionDisabled": "acciones del nodo deshabilitados",
+ "nodeActionDisabledSubflow": "acciones del nodo deshabilitados dentro del subflujo",
+ "missing-types": "Flujos detenidos por falta de tipo de nodo.
",
+ "missing-modules": "Flujos detenidos por módulos no encontrados.
",
+ "safe-mode": "Flujos detenidos en modo seguro.
Puedes modificar los flujos e instanciar los cambios para reiniciar.
",
+ "restartRequired": "Node-RED debe reiniciarse para habilitar los módulos actualizados",
+ "credentials_load_failed": "Los flujos se detuvieron porque las credenciales no se pudieron descifrar.
El archivo de credenciales de flujo está cifrado, pero la clave de cifrado del proyecto falta o no es válida.
",
+ "credentials_load_failed_reset": "No se pudieron descifrar las credenciales
El archivo de credenciales de flujo está cifrado, y falta la clave de cifrado del proyecto o no es válida.
El archivo de credenciales de flujo se restablecerá en la siguiente instanciación. Se borrarán todas las credenciales de flujo existentes.
",
+ "missing_flow_file": "No se encontró el archivo de flujo del proyecto.
El proyecto no está configurado con un archivo de flujo.
",
+ "missing_package_file": "No se encontró el archivo del paquete del proyecto.
Al proyecto le falta un archivo package.json.
",
+ "project_empty": "El proyecto está vacío.
¿Quieres crear un conjunto predeterminado de archivos de proyecto? De lo contrario, tendrás que agregar archivos manualmente al proyecto fuera del editor.
",
+ "project_not_found": "Proyecto '__project__' no encontrado.
",
+ "git_merge_conflict": "Falló la fusión automática de cambios.
Soluciona los conflictos no combinados y luego confirma los resultados.
"
+ },
+ "error": "Error : __message__",
+ "errors": {
+ "lostConnection": "Se perdió la conexión al servidor, reconectándo...",
+ "lostConnectionReconnect": "Se perdió la conexión al servidor, reconectándo en __time__s.",
+ "lostConnectionTry": "Intentar ahora",
+ "cannotAddSubflowToItself": "No se puede añadir subflujo a si mismo",
+ "cannotAddCircularReference": "No se puede añadir subflujo: se detectó una referencia circular",
+ "unsupportedVersion": "Usando una versión no compatible de Node.js
Debes actualizar a la última versión LTS de Node.js
",
+ "failedToAppendNode": "Fallo al cargar '__module__'
__error__
"
+ },
+ "project": {
+ "change-branch": "Cambiar a rama local '__project__'",
+ "merge-abort": "Fusión Git abortado",
+ "loaded": "Proyecto '__project__' cargado",
+ "updated": "Proyecto '__project__' actualizado",
+ "pull": "Proyecto '__project__' actualizado",
+ "revert": "Proyecto '__project__' revertido",
+ "merge-complete": "Fusión Git completado",
+ "setupCredentials": "Configurar credenciales",
+ "setupProjectFiles": "Configurar archivos de proyecto",
+ "no": "No, gracias",
+ "createDefault": "Crear archivos de proyecto predeterminados",
+ "mergeConflict": "Mostrar conflictos fusión"
+ },
+ "label": {
+ "manage-project-dep": "Gestionar las dependencias del proyecto",
+ "setup-cred": "Configurar credenciales",
+ "setup-project": "Configurar ficheros proyecto",
+ "create-default-package": "Crear archivo de paquete predeterminado",
+ "no-thanks": "No gracias",
+ "create-default-project": "Crear archivos de proyecto predeterminados",
+ "show-merge-conflicts": "Mostrar conflictos fusión",
+ "unknownNodesButton": "Buscar nodos desconocidos"
+ }
+ },
+ "clipboard": {
+ "clipboard": "Portapapeles",
+ "nodes": "Nodos",
+ "node": "__count__ nodo",
+ "node_plural": "__count__ nodos",
+ "configNode": "__count__ nodo de configuración",
+ "configNode_plural": "__count__ nodos de configuración",
+ "group": "__count__ grupo",
+ "group_plural": "__count__ grupos",
+ "flow": "__count__ flujo",
+ "flow_plural": "__count__ flujos",
+ "subflow": "__count__ subflujo",
+ "subflow_plural": "__count__ subflujos",
+ "replacedNodes": "__count__ nodo reemplazado",
+ "replacedNodes_plural": "__count__ nodos reemplazados",
+ "pasteNodes": "Pegar flujo JSON o",
+ "selectFile": "seleccionar un archivo para importar",
+ "importNodes": "Importar nodos",
+ "exportNodes": "Exportar nodos",
+ "download": "Descargar",
+ "importUnrecognised": "Tipo importado no reconocido:",
+ "importUnrecognised_plural": "Tipos importados no reconocidos:",
+ "importDuplicate": "Nodo duplicado importado:",
+ "importDuplicate_plural": "Nodos duplicados importados:",
+ "nodesExported": "Nodos exportados al portapapeles",
+ "nodesImported": "Importado:",
+ "nodeCopied": "__count__ nodo copiado",
+ "nodeCopied_plural": "__count__ nodos copiados",
+ "groupCopied": "__count__ grupo copiado",
+ "groupCopied_plural": "__count__ grupos copiados",
+ "groupStyleCopied": "Estilo de grupo copiado",
+ "invalidFlow": "Flujo inválido: __message__",
+ "recoveredNodes": "Nodos recuperados",
+ "recoveredNodesInfo": "A los nodos de este flujo les faltaba una identificación de flujo válida cuando se importaron. Se han agregado a este flujo para que puedas restaurarlos o eliminarlos.",
+ "recoveredNodesNotification": "Nodos importados sin una identificación de flujo válida
Se han agregado a un nuevo flujo llamado '__flowName__'.
",
+ "export": {
+ "selected": "nodos seleccionados",
+ "current": "flujo actual",
+ "all": "todos los flujos",
+ "compact": "compacto",
+ "formatted": "formateado",
+ "copy": "Copiar al portapapeles",
+ "export": "Exportar a librería",
+ "exportAs": "Exportar como",
+ "overwrite": "Reemplazar",
+ "exists": "\"__file__\" ya existe.
¿Quieres reemplazarlo?
"
+ },
+ "import": {
+ "import": "Importar a",
+ "importSelected": "Importar seleccionado",
+ "importCopy": "Importar copia",
+ "viewNodes": "Ver nodos...",
+ "newFlow": "nuevo flujo",
+ "replace": "reemplazar",
+ "errors": {
+ "notArray": "Entrada no es un Array JSON",
+ "itemNotObject": "La entrada no es un flujo válido - elemento __index__ no es un objeto de nodo",
+ "missingId": "La entrada no es un flujo válido - elemento __index__ falta la propiedad 'id'",
+ "missingType": "La entrada no es un flujo válido - elemento __index__ falta la propiedad 'type'"
+ },
+ "conflictNotification1": "Algunos de los nodos que estás importando ya existen en tu espacio de trabajo.",
+ "conflictNotification2": "Selecciona qué nodos importar y si reemplazar los nodos existentes o importar una copia de los mismos."
+ },
+ "copyMessagePath": "Ruta copiada",
+ "copyMessageValue": "Valor copiado",
+ "copyMessageValue_truncated": "Valor truncado copiado"
+ },
+ "deploy": {
+ "deploy": "Instanciar",
+ "full": "Completo",
+ "fullDesc": "Instanciación todo en el espacio de trabajo.",
+ "modifiedFlows": "Flujos Modificados",
+ "modifiedFlowsDesc": "Solo instancia flujos que han cambiado",
+ "modifiedNodes": "Nodos Modificados",
+ "modifiedNodesDesc": "Solo instancia nodos que han cambiado",
+ "startFlows": "Iniciar",
+ "startFlowsDesc": "Iniciar Flujos",
+ "stopFlows": "Detener",
+ "stopFlowsDesc": "Detener Flujos",
+ "restartFlows": "Reiniciar Flujos",
+ "restartFlowsDesc": "Reinicia los flujos instanciados.",
+ "successfulDeploy": "Instanciación con éxito",
+ "successfulRestart": "Flujos reiniciados exitosamente",
+ "deployFailed": "Instanciación fallida: __message__",
+ "unusedConfigNodes": "Tienes algunos nodos de configuración no utilizados.",
+ "unusedConfigNodesButton": "Buscar nodos de configuración no utilizados",
+ "unknownNodesButton": "Buscar nodos desconocidos",
+ "invalidNodesButton": "Buscar nodos inválidos",
+ "errors": {
+ "noResponse": "no hay respuesta del servidor"
+ },
+ "confirm": {
+ "button": {
+ "ignore": "Ignorar",
+ "confirm": "Confirmar instanciación",
+ "review": "Revisar cambios",
+ "cancel": "Cancelar",
+ "merge": "Fusionar",
+ "overwrite": "Ignorar e instanciar"
+ },
+ "undeployedChanges": "Tienes cambios no instanciados.\n\nAl salir de esta página, se perderán estos cambios.",
+ "improperlyConfigured": "El espacio de trabajo contiene algunos nodos que no están configurados correctamente:",
+ "unknown": "El espacio de trabajo contiene algunos tipos de nodos desconocidos:",
+ "confirm": "¿Estás seguro de que quieres instanciar?",
+ "doNotWarn": "no advertir sobre esto",
+ "conflict": "El servidor está ejecutando un conjunto de flujos más reciente.",
+ "backgroundUpdate": "Los flujos en el servidor han sido actualizados..",
+ "conflictChecking": "Comprobando si los cambios se pueden fusionar automáticamente",
+ "conflictAutoMerge": "Los cambios no incluyen conflictos y se pueden fusionar automáticamente.",
+ "conflictManualMerge": "Los cambios incluyen conflictos que deben resolverse antes de poder instanciarse.",
+ "plusNMore": "+ __count__ más"
+ }
+ },
+ "eventLog": {
+ "title": "Registro de eventos",
+ "view": "Ver registro"
+ },
+ "diff": {
+ "unresolvedCount": "__count__ conflicto no resuelto",
+ "unresolvedCount_plural": "__count__ conflictos no resueltos",
+ "globalNodes": "Nodos globales",
+ "flowProperties": "Propiedades flujo",
+ "type": {
+ "added": "añadido",
+ "changed": "modificado",
+ "unchanged": "sin modificar",
+ "deleted": "eliminado",
+ "flowDeleted": "flujo eliminado",
+ "flowAdded": "flujo añadido",
+ "movedTo": "movido a __id__",
+ "movedFrom": "movido desde __id__"
+ },
+ "nodeCount": "__count__ nodo",
+ "nodeCount_plural": "__count__ nodos",
+ "local": "Cambios locales",
+ "remote": "Cambios remotos",
+ "reviewChanges": "Revisar Cambios",
+ "noBinaryFileShowed": "No se puede mostrar el contenido del archivo binario",
+ "viewCommitDiff": "Ver cambios de commit",
+ "compareChanges": "Comparar Cambios",
+ "saveConflict": "Guardar resolución de conflictos",
+ "conflictHeader": "__resolved__ de __unresolved__ conflictos resueltos",
+ "commonVersionError": "La versión común no contiene JSON válido:",
+ "oldVersionError": "La versión anterior no contiene JSON válido:",
+ "newVersionError": "La versión nueva no contiene JSON válido:"
+ },
+ "subflow": {
+ "editSubflowInstance": "Editar subflujo: __name__",
+ "editSubflow": "Editar plantilla subflujo: __name__",
+ "edit": "Editar plantilla subflujo",
+ "subflowInstances": "Hay __count__ instancia de esta plantilla de subflujo",
+ "subflowInstances_plural": "Hay __count__ instancias de esta plantilla de subflujo",
+ "editSubflowProperties": "editar propiedades",
+ "input": "entradas:",
+ "output": "salidas:",
+ "status": "nodo de estado",
+ "deleteSubflow": "eliminar subflujo",
+ "confirmDelete": "¿Estás seguro de que quieres eliminar este subflujo?",
+ "info": "Descripción",
+ "category": "Categoría",
+ "module": "Módulo",
+ "license": "Licencia",
+ "licenseNone": "ninguna",
+ "licenseOther": "Otra",
+ "type": "Tipo de nodo",
+ "version": "Versión",
+ "versionPlaceholder": "x.y.z",
+ "keys": "Palabras clave",
+ "keysPlaceholder": "Palabras clave separadas por comas",
+ "author": "Autor",
+ "authorPlaceholder": "Tu Nombre ",
+ "desc": "Descripción",
+ "env": {
+ "restore": "Restaurar al valor predeterminado del subflujo",
+ "remove": "Eliminar variable de entorno"
+ },
+ "errors": {
+ "noNodesSelected": "Cannot create subflow : no nodes selected",
+ "acrossMultipleGroups": "Cannot create subflow across multiple groups",
+ "multipleInputsToSelection": "Cannot create subflow : multiple inputs to selection"
+ }
+ },
+ "group": {
+ "editGroup": "Editar grupo: __name__",
+ "errors": {
+ "cannotCreateDiffGroups": "Cannot create group using nodes from different groups",
+ "cannotAddSubflowPorts": "Cannot add subflow ports to a group"
+ }
+ },
+ "editor": {
+ "configEdit": "Editar",
+ "configAdd": "Añadir",
+ "configUpdate": "Actualizar",
+ "configDelete": "Eliminar",
+ "nodesUse": "__count__ nodo utiliza esta configuración",
+ "nodesUse_plural": "__count__ nodos utilizan esta configuración",
+ "addNewConfig": "Añadir nuevo nodo de configuración __type__",
+ "editNode": "Editar nodo __type__",
+ "editConfig": "Editar nodo de configuración __type__",
+ "addNewType": "Añadir nuevo __type__...",
+ "nodeProperties": "propiedades del nodo",
+ "label": "Etiqueta",
+ "color": "Color",
+ "portLabels": "Etiquetas de puerto",
+ "labelInputs": "Entradas",
+ "labelOutputs": "Salidas",
+ "settingIcon": "Icono",
+ "default": "predeterminado",
+ "noDefaultLabel": "ninguno",
+ "defaultLabel": "usar etiqueta predeterminada",
+ "searchIcons": "Buscar iconos",
+ "useDefault": "usar predeterminado",
+ "description": "Descripción",
+ "show": "Mostrar",
+ "hide": "Ocultar",
+ "locale": "Seleccionar idioma de la interfaz de usuario",
+ "icon": "Icono",
+ "inputType": "Tipo de entrada",
+ "selectType": "seleccionar tipos...",
+ "loadCredentials": "Cargando credenciales de nodo",
+ "inputs": {
+ "input": "entrada",
+ "select": "seleccionar",
+ "checkbox": "checkbox",
+ "spinner": "spinner",
+ "none": "ninguno",
+ "hidden": "ocultar propiedad"
+ },
+ "types": {
+ "str": "texto",
+ "num": "número",
+ "bool": "booleano",
+ "json": "JSON",
+ "bin": "buffer",
+ "env": "variable entorno",
+ "cred": "credencial"
+ },
+ "menu": {
+ "input": "entrada",
+ "select": "selección",
+ "checkbox": "checkbox",
+ "spinner": "spinner",
+ "hidden": "solo etiqueta"
+ },
+ "select": {
+ "label": "Etiqueta",
+ "value": "Valor"
+ },
+ "spinner": {
+ "min": "Mínimo",
+ "max": "Máximo"
+ },
+ "errors": {
+ "scopeChange": "Cambiar el alcance hará que no esté disponible para nodos en otros flujos que lo utilicen",
+ "invalidProperties": "Propiedades inválidas:",
+ "credentialLoadFailed": "Falló al cargar credenciales del nodo"
+ }
+ },
+ "keyboard": {
+ "title": "Atajos de teclado",
+ "keyboard": "Teclado",
+ "filterActions": "filtrar acciones",
+ "shortcut": "atajo",
+ "scope": "alcance",
+ "unassigned": "Sin asignar",
+ "global": "global",
+ "workspace": "espacio trabajo",
+ "editor": "diálogo edición",
+ "selectAll": "Seleccionar todos",
+ "selectNone": "Seleccionar ninguno",
+ "selectAllConnected": "Seleccionar conectados",
+ "addRemoveNode": "Añadir/eliminar nodo de la selección",
+ "editSelected": "Editar nodo seleccionado",
+ "deleteSelected": "Eliminar los nodos o el enlace seleccionados",
+ "deleteReconnect": "Eliminar y reconectar",
+ "importNode": "Importar nodos",
+ "exportNode": "Exportar nodos",
+ "nudgeNode": "Mover nodos seleccionados (1px)",
+ "moveNode": "Mover nodos seleccionados (20px)",
+ "toggleSidebar": "Alternar barra lateral",
+ "togglePalette": "Alternar paleta",
+ "copyNode": "Copiar nodos seleccionados",
+ "cutNode": "Cortar nodos seleccionados",
+ "pasteNode": "Pegar nodos",
+ "copyGroupStyle": "Copiar estilo de grupo",
+ "pasteGroupStyle": "Pegar estilo de grupo",
+ "undoChange": "Deshacer",
+ "redoChange": "Rehacer",
+ "searchBox": "Abrir cuadro de búsqueda",
+ "managePalette": "Gestionar paleta",
+ "actionList": "Lista de acciones",
+ "splitWireWithLinks": "Divide la selección con nodos de enlace"
+ },
+ "library": {
+ "library": "Librería",
+ "openLibrary": "Abrir Librería...",
+ "saveToLibrary": "Guardar en Librería...",
+ "typeLibrary": "Librería __type__",
+ "unnamedType": "__type__ sin nombre",
+ "exportedToLibrary": "Nodos exportados a la librería",
+ "dialogSaveOverwrite": "Una __libraryType__ llamada __libraryName__ ya existe. ¿Sobrescribir?",
+ "invalidFilename": "Nombre de archivo inválido",
+ "savedNodes": "Nodos guardados",
+ "savedType": "__type__ guardado",
+ "saveFailed": "Falló al guardar: __message__",
+ "newFolder": "Nueva carpeta",
+ "types": {
+ "local": "Local",
+ "examples": "Ejemplos"
+ }
+ },
+ "palette": {
+ "noInfo": "no hay información disponible",
+ "filter": "filtrar nodos",
+ "search": "buscar módulos",
+ "addCategory": "Añadir nueva...",
+ "label": {
+ "subflows": "subflujos",
+ "network": "red",
+ "common": "común",
+ "input": "entrada",
+ "output": "salida",
+ "function": "función",
+ "sequence": "secuencia",
+ "parser": "analizador",
+ "social": "social",
+ "storage": "almacenamiento",
+ "analysis": "análisis",
+ "advanced": "avanzado"
+ },
+ "actions": {
+ "collapse-all": "Colapsar todas las categorías",
+ "expand-all": "Expandir todas las categorías"
+ },
+ "event": {
+ "nodeAdded": "Nodo añadido a la paleta:",
+ "nodeAdded_plural": "Nodos añadidos a la paleta:",
+ "nodeRemoved": "Nodo eliminado de la paleta:",
+ "nodeRemoved_plural": "Nodos eliminados de la paleta:",
+ "nodeEnabled": "Nodo activado:",
+ "nodeEnabled_plural": "Nodos activados:",
+ "nodeDisabled": "Nodo desactivado:",
+ "nodeDisabled_plural": "Nodos desactivados:",
+ "nodeUpgraded": "Módulo de nodo __module__ actualizado a la versión __version__",
+ "unknownNodeRegistered": "Error cargando el nodo: "
+ },
+ "editor": {
+ "title": "Gestionar paleta",
+ "palette": "Paleta",
+ "allCatalogs": "Todos los Catálogos",
+ "times": {
+ "seconds": "segundos hace",
+ "minutes": "minutos hace",
+ "minutesV": "hace __count__ minutos",
+ "hoursV": "hace __count__ hora",
+ "hoursV_plural": "hace __count__ horas",
+ "daysV": "hace __count__ día",
+ "daysV_plural": "hace __count__ días",
+ "weeksV": "hace __count__ semana",
+ "weeksV_plural": "hace __count__ semanas",
+ "monthsV": "hace __count__ mes",
+ "monthsV_plural": "hace __count__ meses",
+ "yearsV": "hace __count__ año",
+ "yearsV_plural": "hace __count__ años",
+ "yearMonthsV": "hace __y__ año y __count__ mes",
+ "yearMonthsV_plural": "hace __y__ año y __count__ meses",
+ "yearsMonthsV": "hace __y__ años y __count__ mes",
+ "yearsMonthsV_plural": "hace __y__ años y __count__ meses"
+ },
+ "nodeCount": "__label__ nodo",
+ "nodeCount_plural": "__label__ nodos",
+ "moduleCount": "__count__ módulo disponible",
+ "moduleCount_plural": "__count__ módulos disponibles",
+ "inuse": "en uso",
+ "enableall": "habilitar todo",
+ "disableall": "deshabilitar todo",
+ "enable": "habilitar",
+ "disable": "deshabilitar",
+ "remove": "eliminar",
+ "update": "actualizar a __version__",
+ "updated": "actualizado",
+ "install": "instalar",
+ "installed": "instalado",
+ "conflict": "conflicto",
+ "conflictTip": "Este módulo no puede ser instalado debido a que incluye un tipo de nodo que ya ha sido instalado
Conflictos con __module__
",
+ "loading": "Cargando catálogos...",
+ "tab-nodes": "Nodos",
+ "tab-install": "Instalar",
+ "sort": "ordenar:",
+ "sortRelevance": "relevancia",
+ "sortAZ": "a-z",
+ "sortRecent": "reciente",
+ "more": "+ __count__ más",
+ "upload": "Cargar módulo en archivo tgz",
+ "refresh": "Actualizar lista de módulos",
+ "errors": {
+ "catalogLoadFailed": "La carga del catálogo de nodos ha fallado
Revise la consola del navegador para mas información
",
+ "installFailed": "Fallo al instalar: __module__
__message__
Revise el log para mas información
",
+ "removeFailed": "Fallo al eliminar: __module__
__message__
Revise el log para mas información
",
+ "updateFailed": "Fallo al actualizar: __module__
__message__
Revise el log para mas información
",
+ "enableFailed": "Fallo al activar: __module__
__message__
Revise el log para mas información
",
+ "disableFailed": "Fallo al desactivar: __module__
__message__
Revise el log para mas información
"
+ },
+ "confirm": {
+ "install": {
+ "body":"Instalando '__module__'
Lea la documentación del nodo antes de instalarlo. Algunos nodos poseen dependencias que no pueden ser resueltas automáticamente y pueden requerir que Node-RED sea reiniciado.
",
+ "title": "Instalar nodos"
+ },
+ "remove": {
+ "body":"Eliminando '__module__'
La eliminación del nodo lo desinstalará de Node-RED. Es posible que el nodo siga utilizando recursos hasta que Node-RED sea reiniciado.
",
+ "title": "Eliminar nodos"
+ },
+ "update": {
+ "body":"Actualizando '__module__'
La actualización del nodo requerirá un reinicio manual de Node-RED para completarse. Debe ser reiniciado manualmente.
",
+ "title": "Actualizar nodos"
+ },
+ "cannotUpdate": {
+ "body":"Se encuentra disponible una actualización para este nodo, pero el mismo no se encuentra instalado en una ubicación accesible por el gestor de nodos. Por favor revise la documentación para obtener mas información sobre como actualizar este nodo."
+ },
+ "button": {
+ "review": "Abrir información del nodo",
+ "install": "Instalar",
+ "remove": "Eliminar",
+ "update": "Actualizar"
+ }
+ }
+ }
+ },
+ "sidebar": {
+ "info": {
+ "name": "Información",
+ "tabName": "Nombre",
+ "label": "info",
+ "node": "Nodo",
+ "type": "Tipo",
+ "group": "Grupo",
+ "module": "Módulo",
+ "id": "ID",
+ "status": "Estado",
+ "enabled": "Habilitado",
+ "disabled": "Deshabilitado",
+ "subflow": "Subflujo",
+ "instances": "Instancias",
+ "properties": "Propiedades",
+ "info": "Información",
+ "desc": "Descripción",
+ "blank": "vacío",
+ "null": "nulo",
+ "showMore": "mostrar más",
+ "showLess": "mostrar menos",
+ "flow": "Flujo",
+ "selection": "Selección",
+ "nodes": "__count__ nodos",
+ "flowDesc": "Descripción del flujo",
+ "subflowDesc": "Descripción del subflujo",
+ "nodeHelp": "Ayuda del nodo",
+ "none": "Ninguno",
+ "arrayItems": "__count__ elementos",
+ "showTips": "Puedes abrir las sugerencias desde el panel de ajustes",
+ "outline": "Contorno",
+ "empty": "vacío",
+ "globalConfig": "Nodos de configuración global",
+ "triggerAction": "Acción de inicio",
+ "find": "Encontrar en espacio de trabajo",
+ "copyItemUrl": "Copiar URL elemento",
+ "copyURL2Clipboard": "URL copiada al portapapeles",
+ "showFlow": "Mostrar",
+ "hideFlow": "Esconder"
+ },
+ "help": {
+ "name": "Ayuda",
+ "label": "ayuda",
+ "search": "Buscar en la ayuda",
+ "nodeHelp": "Ayuda de nodo",
+ "showHelp": "Mostrar ayuda",
+ "showInOutline": "Mostrar en controno",
+ "showTopics": "Mostrar temas",
+ "noHelp": "No hay ningun tema de ayuda seleccionado",
+ "changeLog": "Registro de Cambios"
+ },
+ "config": {
+ "name": "Nodos de configuración",
+ "label": "config",
+ "global": "En todos los flujos",
+ "none": "ninguno",
+ "subflows": "subflujos",
+ "flows": "flujos",
+ "filterAll": "todos",
+ "showAllConfigNodes": "Mostrar todos los nodos de configuración",
+ "filterUnused": "no utilizado",
+ "showAllUnusedConfigNodes": "Mostrar todos los nodos de configuración no utilizados",
+ "filtered": "__count__ escondidos"
+ },
+ "context": {
+ "name":"Información de contexto",
+ "label":"contexto",
+ "none": "ninguno seleccionado",
+ "refresh": "actualice para cargar",
+ "empty": "vacío",
+ "node": "Nodo",
+ "flow": "Flujo",
+ "global": "Global",
+ "deleteConfirm": "¿Estás seguro de que quieres eliminar este elemento?",
+ "autoRefresh": "Actualizar automáticamente al seleccionar",
+ "refrsh": "Actualizar",
+ "delete": "Eliminar"
+ },
+ "palette": {
+ "name": "Gestión de Paleta",
+ "label": "paleta"
+ },
+ "project": {
+ "label": "proyecto",
+ "name": "Proyecto",
+ "description": "Descripción",
+ "dependencies": "Dependencias",
+ "settings": "Ajustes",
+ "noSummaryAvailable": "No hay resumen disponible",
+ "editDescription": "Editar descripción proyecto",
+ "editDependencies": "Editar dependencias proyecto",
+ "noDescriptionAvailable": "Ninguna descripción disponible",
+ "editReadme": "Editar README.md",
+ "showProjectSettings": "Mostrar ajustes del proyecto",
+ "projectSettings": {
+ "title": "Ajustes del proyecto",
+ "edit": "editar",
+ "none": "Ninguno",
+ "install": "instalar",
+ "removeFromProject": "eliminar del proyecto",
+ "addToProject": "agregar al proyecto",
+ "files": "Archivos",
+ "flow": "Flujo",
+ "credentials": "Credenciales",
+ "package": "Paquete",
+ "packageCreate": "El archivo será creado cuando se guarden los cambios",
+ "fileNotExist": "El archivo no existe",
+ "selectFile": "Seleccionar archivo",
+ "invalidEncryptionKey": "Clave de encriptación inválida",
+ "encryptionEnabled": "Encriptación habilitada",
+ "encryptionDisabled": "Encryption disabled",
+ "setTheEncryptionKey": "Establecer la clave de encriptación",
+ "resetTheEncryptionKey": "Reestablecer la clave de encriptación",
+ "changeTheEncryptionKey": "Cambiar la clave de encriptación",
+ "currentKey": "Clave actual",
+ "newKey": "Nueva clave",
+ "credentialsAlert": "Esto eliminará todas las credenciales existentes",
+ "versionControl": "Control de versiones",
+ "branches": "Ramas",
+ "noBranches": "Sin ramas",
+ "deleteConfirm": "¿Estás seguro de que quieres eliminar la rama local '__name__'? Esta acción no puede deshacerse.",
+ "unmergedConfirm": "La rama local '__name__' tiene cambios no fusionados que se perderán. ¿Estás seguro de que quieres eliminarla?",
+ "deleteUnmergedBranch": "Eliminar rama no fusionada",
+ "gitRemotes": "Git remotes",
+ "addRemote": "añadir remoto",
+ "addRemote2": "Añadir remoto",
+ "remoteName": "Nombre del repositorio remoto",
+ "nameRule": "Solo se permiten los caracteres A-Z 0-9 _ -",
+ "url": "URL",
+ "urlRule": "https://, ssh:// ó file://",
+ "urlRule2": "No incluyas el usuario ni la contraseña en la URL",
+ "noRemotes": "No hay remotos",
+ "deleteRemoteConfrim": "¿Estás seguro de que quieres eliminar el repositorio remoto '__name__'?",
+ "deleteRemote": "Eliminar repositorio remoto"
+ },
+ "userSettings": {
+ "committerDetail": "Detalles del commiter",
+ "committerTip": "Dejar este campo vacío para usar el valor por defecto del sistema",
+ "userName": "Usuario",
+ "email": "Email",
+ "workflow": "Flujo de Trabajo",
+ "workfowTip": "Elige tu flujo de trabajo GIT preferido",
+ "workflowManual": "Manual",
+ "workflowManualTip": "Todos los cambios deben confirmarse manualmente en la sección 'historia' de la barra lateral",
+ "workflowAuto": "Automático",
+ "workflowAutoTip": "Los cambios serán confirmadoos a git automáticamente con cada instanciación",
+ "sshKeys": "Claves SSH",
+ "sshKeysTip": "Permiten crear conexiones seguras a repositorios de git remotos.",
+ "add": "añadir clave",
+ "addSshKey": "Añadir Clave SSH",
+ "addSshKeyTip": "Generar un nuevo par de claves publica/privada",
+ "name": "Nombre",
+ "nameRule": "Debe contener exclusivamente los siguientes caracteres: A-Z 0-9 _ -",
+ "passphrase": "Contraseña",
+ "passphraseShort": "La contraseña es demasiado corta",
+ "optional": "Opcional",
+ "cancel": "Cancelar",
+ "generate": "Generar clave",
+ "noSshKeys": "No hay claves SSH",
+ "copyPublicKey": "Copiar la clave pública al portapapeles",
+ "delete": "Eliminar clave",
+ "gitConfig": "configuración Git",
+ "deleteConfirm": "¿Estás seguro de que quieres eliminar la clave SSH '__name__'? Esto no puede deshacerse."
+ },
+ "versionControl": {
+ "unstagedChanges": "Cambios no preparados",
+ "stagedChanges": "Cambios preparados",
+ "unstageChange": "Des-preparar cambio",
+ "stageChange": "Preparar cambio",
+ "unstageAllChange": "Despreparar todos los cambios",
+ "stageAllChange": "Preparar todos los cambios",
+ "commitChanges": "Confirmar cambios",
+ "resolveConflicts": "Resolver conflictos",
+ "head": "HEAD",
+ "staged": "Preparado",
+ "unstaged": "No preparado",
+ "local": "Local",
+ "remote": "Remoto",
+ "revert": "¿Estás seguro de que quieres revertir los cambios en '__file__'? Esto no puede deshacerse.",
+ "revertChanges": "Revertir cambios",
+ "localChanges": "Cambios locales",
+ "none": "Ninguno",
+ "conflictResolve": "Todos los conflictos resueltos. Confirma los cambios para completar la fusión.",
+ "localFiles": "Archivos locales",
+ "all": "todo",
+ "unmergedChanges": "Cambios sin mergear",
+ "abortMerge": "cancelar merge",
+ "commit": "commit",
+ "changeToCommit": "Cambios al commit",
+ "commitPlaceholder": "Escriba su mensaje de commit",
+ "cancelCapital": "Cancelar",
+ "commitCapital": "Commit",
+ "commitHistory": "Historial de commits",
+ "branch": "Branch:",
+ "moreCommits": " commit(s) más",
+ "changeLocalBranch": "Cambiar rama local",
+ "createBranchPlaceholder": "Buscar o crear una rama",
+ "upstream": "fuente",
+ "localOverwrite": "Tienes cambios locales que podrían ser sobreescritos si cambias de rama. Debes confirmar o deshacer esos cambios primero.",
+ "manageRemoteBranch": "Gestionar rama remota",
+ "unableToAccess": "No es posible acceder al repositorio remoto",
+ "retry": "Reintentar",
+ "setUpstreamBranch": "Establecer rama como rama fuente",
+ "createRemoteBranchPlaceholder": "Encontrar o crear una rama remota",
+ "trackedUpstreamBranch": "La rama creada será establecida como la rama fuente.",
+ "selectUpstreamBranch": "La rama será creada. Elígela debajo para establecerla como la rama fuente.",
+ "pushFailed": "El envío falló ya que el remoto tiene commits mas recientes. Trae esos cambios primero y luego vuelve a subir.",
+ "push": "enviar",
+ "pull": "traer",
+ "unablePull": "No es posible traer los cambios remotos; tus cambios locales no preparados serían sobreescritos.
Confirma tus cambios primero e intente nuevamente.
",
+ "showUnstagedChanges": "Mostrar cambios no preparados",
+ "connectionFailed": "No fue posible conectarse al repositorio remoto: ",
+ "pullUnrelatedHistory": "El servidor remoto tiene una historia de commits no relacionada.
¿Estás seguro de que quieres traer los cambios a tu repositorio local?
",
+ "pullChanges": "Traer cambios",
+ "history": "historial",
+ "projectHistory": "Historial del proyecto",
+ "daysAgo": "hace __count__ día",
+ "daysAgo_plural": "hace __count__ días",
+ "hoursAgo": "hace __count__ hora",
+ "hoursAgo_plural": "hace __count__ horas",
+ "minsAgo": "hace __count__ minuto",
+ "minsAgo_plural": "hace __count__ minutos",
+ "secondsAgo": "Segundos desde que ocurrió",
+ "notTracking": "Tu rama local no esta siguiendo ninguna rama remota.",
+ "statusUnmergedChanged": "Tu repositorio tiene cambios sin unificar. Debes solucionar los conflictos y hacer commit del resultado.",
+ "repositoryUpToDate": "Tu repositorio esta al día.",
+ "commitsAhead": "Tu repositorio está __count__ commit por delante del repositorio remoto. Puedes enviar este commit ahora.",
+ "commitsAhead_plural": "Tu repositorio está __count__ commits por delante del repositorio remoto. Puedes enviar estos commits ahora.",
+ "commitsBehind": "Tu repositorio está __count__ commit atrasado contra el repositorio remoto. Puedes traer este commit ahora.",
+ "commitsBehind_plural": "Tu repositorio está __count__ commits atrasado contra el repositorio remoto. Puedes traer estos commits ahora.",
+ "commitsAheadAndBehind1": "Tu repositorio está __count__ commit atrasado y ",
+ "commitsAheadAndBehind1_plural": "Tu repositorio está __count__ commits atrasado y ",
+ "commitsAheadAndBehind2": "__count__ commit adelantado del servidor remoto. ",
+ "commitsAheadAndBehind2_plural": "__count__ commits adelantado del servidor remoto. ",
+ "commitsAheadAndBehind3": "Debes traer el commit remoto antes de enviar tus commits.",
+ "commitsAheadAndBehind3_plural": "Debes traer los commits remotos antes de enviar tus commits.",
+ "refreshCommitHistory": "Actualizar historial de commits",
+ "refreshChanges": "Actualizar cambios"
+ }
+ }
+ },
+ "typedInput": {
+ "type": {
+ "str": "texto",
+ "num": "número",
+ "re": "expresión regular",
+ "bool": "booleano",
+ "json": "JSON",
+ "bin": "buffer",
+ "date": "marca tiempo",
+ "jsonata": "expresión",
+ "env": "variable de entorno",
+ "cred": "credencial"
+ }
+ },
+ "editableList": {
+ "add": "añadir",
+ "addTitle": "añadir un elemento"
+ },
+ "search": {
+ "history": "Buscar en el historial",
+ "clear": "limpiar todo",
+ "empty": "No hay coincidencias",
+ "addNode": "añadir un nodo...",
+ "options": {
+ "configNodes": "Nodos de Configuración",
+ "unusedConfigNodes": "Nodos de Configuración sin uso",
+ "invalidNodes": "Nodos inválidos",
+ "uknownNodes": "Nodos desconocidos",
+ "unusedSubflows": "Subflujos sin uso",
+ "hiddenFlows": "Flujos escondidos",
+ "modifiedNodes": "Nodos y flujos modificados",
+ "thisFlow": "Flujo actual"
+ }
+ },
+ "expressionEditor": {
+ "functions": "Funciones",
+ "functionReference": "Referencia a función",
+ "insert": "Insertar",
+ "title": "Editor de expresiones JSONata",
+ "test": "Prueba",
+ "data": "Mensaje ejemplo",
+ "result": "Resultado",
+ "format": "expresión de formato",
+ "compatMode": "Modo de compatibilidad activado",
+ "compatModeDesc": "Modo de compatibilidad JSONata La expresión actual todavía hace referencia a msg
por lo que será evaluada en modo de compatibilidad. Por favor actualice la expresión evitando utilizar msg
debido a que este modo será eliminado en el futuro.
Cuando el soporte para JSONata fue añadido a Node-RED, se requería que la expresión haga referencia al objeto msg
. Por ejemplo msg.payload
era usado para acceder a la carga útil del mensaje.
Eso ya no es necesario ya que la expresión será evaluada contra el mensaje directamente. Para acceder a la carga util, la expresión debe ser simplemente payload
.
",
+ "noMatch": "No hay coincidencias",
+ "errors": {
+ "invalid-expr": "Expresión JSONata inválida:\n __message__",
+ "invalid-msg": "Mensaje JSON de ejemplo inválido:\n __message__",
+ "context-unsupported": "No se puede probar las funciones de contexto\n $flowContext o $globalContext",
+ "env-unsupported": "No se puede probar la función $env",
+ "moment-unsupported": "No se puede probar la función $moment",
+ "clone-unsupported": "No se puede probar la función $clone",
+ "eval": "Error al evaluar la expresión:\n __message__"
+ }
+ },
+ "monaco": {
+ "setTheme": "Establecer tema"
+ },
+ "jsEditor": {
+ "title": "Editor de JavaScript"
+ },
+ "textEditor": {
+ "title": "Editor de texto"
+ },
+ "jsonEditor": {
+ "title": "Editor de JSON",
+ "format": "formatear JSON",
+ "rawMode": "Editar JSON",
+ "uiMode": "Editor Visual",
+ "rawMode-readonly": "JSON",
+ "uiMode-readonly": "Visual",
+ "insertAbove": "Insertar encima",
+ "insertBelow": "Insertar debajo",
+ "addItem": "Añadir elemento",
+ "copyPath": "Copiar ruta al elemento",
+ "expandItems": "Expandir elementos",
+ "collapseItems": "Colapsar elementos",
+ "duplicate": "Duplicar",
+ "error": {
+ "invalidJSON": "JSON inválido: "
+ }
+ },
+ "markdownEditor": {
+ "title": "Editor Markdown",
+ "expand": "Expandir",
+ "format": "Formateado con markdown",
+ "heading1": "Encabezado 1",
+ "heading2": "Encabezado 2",
+ "heading3": "Encabezado 3",
+ "bold": "Negrita",
+ "italic": "Itálica",
+ "code": "Código",
+ "ordered-list": "Lista ordenada",
+ "unordered-list": "Lista desordenada",
+ "quote": "Cita",
+ "link": "Enlace",
+ "horizontal-rule": "Regla horizontal",
+ "toggle-preview": "Activar/Desactivar vista previa",
+ "mermaid": {
+ "summary": "Diagrama Mermaid"
+ }
+ },
+ "bufferEditor": {
+ "title": "Editor de buffer",
+ "modeString": "Tratar como cadena UTF-8",
+ "modeArray": "Tratar como vector JSON",
+ "modeDesc": "Editor de buffer El tipo buffer es almacenado como un arreglo JSON de valores de tipo byte. El editor intentará procesar el valor ingresado como un arreglo JSON. Si no es JSON válido, será tratado como un string UTF-8 y convertido a un arreglo de los códigos de sus caracteres individuales.
Por ejemplo, el valor Hello World
será convertido al arreglo JSON:
[72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]
"
+ },
+ "projects": {
+ "config-git": "Configurar cliente Git",
+ "welcome": {
+ "hello": "Hola! Hemos añadido 'proyectos' a Node-RED.",
+ "desc0": "Esta es una nueva manera de gestionar tus archivos de flujo e incluir control de versiones en los mismos.",
+ "desc1": "Para comenzar puedes crear tu primer proyecto o clonar un proyecto existente de un repositorio de Git.",
+ "desc2": "Si no estás seguro, puedes saltear esto por ahora. De cualquier modo podrás crear tu primero proyecto desde el menu de 'Proyectos' en cualquier momento.",
+ "create": "Crear proyecto",
+ "clone": "Clonar repositorio",
+ "openExistingProject": "Abrir proyecto existente",
+ "not-right-now": "No ahora mismo"
+ },
+ "git-config": {
+ "setup": "Configurar tu cliente de control de versiones",
+ "desc0": "Node-RED utiliza la herramienta de codigo abierto Git para el control de versiones. La misma hace un seguimiento de los cambios en los archivos del proyecto y permite enviarlos a repositorios remotos.",
+ "desc1": "Cuando confirmas un conjunto de cambios, Git almacena quien hizo los cambios con un nombre y una dirección de email. El usuario puede ser lo que quieres - no es necesario que sea tu nombre real.",
+ "desc2": "Tu cliente de Git ya se encuentra configurado con los detalles mostrados debajo.",
+ "desc3": "Puedes cambiar estos ajustes más tarde en la pestaña 'Git config' del menú de ajustes.",
+ "username": "Usuario",
+ "email": "Email"
+ },
+ "project-details": {
+ "create": "Crear proyecto",
+ "desc0": "Un proyecto es mantenido como un repositorio Git. De esta manera es mas fácil compartir tus flujos con otros y colaborar en ellos.",
+ "desc1": "Puedes crear múltiples proyectos y cambiar entre ellos usando el editor.",
+ "desc2": "Para comenzar, tu proyecto necesita un nombre y una descripción opcional.",
+ "already-exists": "El proyecto ya existe",
+ "must-contain": "Solo se permiten los caracteres A-Z 0-9 _ -",
+ "project-name": "Nombre del proyecto",
+ "desc": "Descripción",
+ "opt": "Opcional"
+ },
+ "clone-project": {
+ "clone": "Clonar un proyecto",
+ "desc0": "Si ya cuentas con un repositorio git que contenga un proyecto, puedes clonarlo para comenzar.",
+ "already-exists": "El proyecto ya existe",
+ "must-contain": "Solo se permiten los caracteres A-Z 0-9 _ -",
+ "project-name": "Nombre del proyecto",
+ "no-info-in-url": "No incluyas tu usuario ni contraseña en la URL",
+ "git-url": "URL del repositorio de Git",
+ "protocols": "https://, ssh:// o file://",
+ "auth-failed": "Autenticación fallida",
+ "username": "Usuario",
+ "passwd": "Contraseña",
+ "ssh-key": "Clave SSH",
+ "passphrase": "Frase secreta",
+ "ssh-key-desc": "Antes de poder clonar un repositorio por SSH debes añadir una clave SSH.",
+ "ssh-key-add": "Añadir una clave SSH",
+ "credential-key": "Clave para encriptación de credenciales",
+ "cant-get-ssh-key": "Error! No se puede obtener la ruta hasta la clave SSH seleccionada.",
+ "already-exists2": "ya existe",
+ "git-error": "error de Git",
+ "connection-failed": "Conexion fallida",
+ "not-git-repo": "No es un repositorio Git",
+ "repo-not-found": "Repositorio no encontrado"
+ },
+ "default-files": {
+ "create": "Crear tus archivos de proyecto",
+ "desc0": "Un proyecto contiene tus archivos de flujo, un archivo README y un package.json.",
+ "desc1": "Puede contener cualquier otro archivo que quiera mantener en el repositorio Git.",
+ "desc2": "Tu flujo existente y tus archivos de credencial serán copiados al proyecto.",
+ "flow-file": "Archivo de flujo",
+ "credentials-file": "Archivo de credenciales"
+ },
+ "encryption-config": {
+ "setup": "Configura la encriptación de tu archivo de credenciales",
+ "desc0": "Tu archivo de credenciales de flujo puede ser encriptado para mantener seguro tu contenido.",
+ "desc1": "Si quieres almacenar estas credenciales en un repositorio de Git público, debes encriptarlos mediante una frase secreta.",
+ "desc2": "Actualmente, tus credenciales de flujo no estan encriptadas.",
+ "desc3": "Esto significa que tu contenido, tal como contraseñas y tokens de acceso, pueden ser leidos por cualquier con acceso al archivo.",
+ "desc4": "Si quieres almacenar estas credenciales en un repositorio de Git público, debes encriptarlas mediante una frase secreta.",
+ "desc5": "Tu archivo de credenciales de flujo esta actualmente encriptado usando la propiedad credentialSecret de tu archivo de ajustes como clave.",
+ "desc6": "Tu archivo de credenciales de flujo esta actualmente encriptado usando una clave generada por el sistema. Debes proveer una nueva clave secreta para este proyecto.",
+ "desc7": "La clave será almacenada separada de tus archivos de proyecto. Deberás proveer la clave para usar este proyecto en otra instancia de Node-RED.",
+ "credentials": "Credenciales",
+ "enable": "Activar encriptación",
+ "disable": "Desactivar encriptación",
+ "disabled": "desactivado",
+ "copy": "Copiar encima de la clave existente",
+ "use-custom": "Usar clave personalizada",
+ "desc8": "El archivo de credenciales no será encriptado y tus contenidos serán legibles fácilmente",
+ "create-project-files": "Crear archivos de proyecto",
+ "create-project": "Crear proyecto",
+ "already-exists": "ya existe",
+ "git-error": "error de Git",
+ "git-auth-error": "error de autenticación de Git"
+ },
+ "create-success": {
+ "success": "Has creado exitosamente tu primer proyecto!",
+ "desc0": "Ahora puedes seguir utilizando Node-RED como siempre lo has hecho.",
+ "desc1": "La pestaña 'info' en la barra lateral muestra tu proyecto activo actual. El botón contiguo al nombre puede utilizarse para acceder a los ajustes del proyecto.",
+ "desc2": "La pestaña 'historia' en la barra lateral muestra los archivos que cambiaron en tu proyecto y permite confirmar los cambios. Muestra una historia completa de tus commits y permite enviar tus cambios a un repositorio remoto."
+ },
+ "create": {
+ "projects": "Proyectos",
+ "already-exists": "El proyecto ya existe",
+ "must-contain": "Solo se permiten los caracteres A-Z 0-9 _ -",
+ "no-info-in-url": "No incluyas tu usuario ni tu contraseña en la URL",
+ "open": "Abrir Proyecto",
+ "create": "Crear Proyecto",
+ "clone": "Clonar Repositorio",
+ "project-name": "Nombre del proyecto",
+ "desc": "Descripción",
+ "opt": "Opcional",
+ "flow-file": "Archivo de flujo",
+ "credentials": "Credenciales",
+ "enable-encryption": "Activar encriptación",
+ "disable-encryption": "Desactivar encriptación",
+ "encryption-key": "Clave de encriptación",
+ "desc0": "Una frase secreta con la cual asegurar tus credenciales",
+ "desc1": "El archivo de credenciales no será encriptado y tu contenido será fácilmente legible",
+ "git-url": "URL del repositorio de Git",
+ "protocols": "https://, ssh:// o file://",
+ "auth-failed": "Autenticación fallida",
+ "username": "Usuario",
+ "password": "Contraseña",
+ "ssh-key": "Clave SSH",
+ "passphrase": "Frase secreta",
+ "desc2": "Antes de clonar un repositorio mediante SSH debes añadir una clave SSH para acceder.",
+ "add-ssh-key": "Agregar una clave SSH",
+ "credentials-encryption-key": "Clave de encriptación de credenciales",
+ "already-exists-2": "ya existe",
+ "git-error": "error de Git",
+ "con-failed": "Conexión fallida",
+ "not-git": "No es un repositorio de Git",
+ "no-resource": "Repositorio no encontrado",
+ "cant-get-ssh-key-path": "Erorr! No se puede obtener la ruta a la clave SSH seleccionada.",
+ "unexpected_error": "error_inesperado",
+ "clearContext": "Iniciar contexto al cambiar de proyecto"
+ },
+ "delete": {
+ "confirm": "¿Estás seguro que quieres eliminar este proyecto?"
+ },
+ "create-project-list": {
+ "search": "buscar tus proyectos",
+ "current": "actual"
+ },
+ "require-clean": {
+ "confirm": "Tienes cambios no instanciados que se perderán.
¿Quieres continuar?
"
+ },
+ "send-req": {
+ "auth-req": "Se requiere autenticación para el repositorio",
+ "username": "Usuario",
+ "password": "Contraseña",
+ "passphrase": "Frase de contraseña",
+ "retry": "Reintentar",
+ "update-failed": "No se pudo actualizar la autenticación",
+ "unhandled": "Respuesta de error no controlada",
+ "host-key-verify-failed": "Error en la verificación de la clave del servidor.
No se pudo verificar la clave del servidor del repositorio. Actualiza tu archivo known_hosts
e inténtelo de nuevo.
"
+ },
+ "create-branch-list": {
+ "invalid": "Rama inválida",
+ "create": "Crear rama",
+ "current": "actual"
+ },
+ "create-default-file-set": {
+ "no-active": "No se pudo crear el conjunto de archivos predeterminado porque no hay un proyecto activo",
+ "no-empty": "No se puede crear un conjunto de archivos predeterminado en un proyecto que no esté vacío",
+ "git-error": "Error de Git"
+ },
+ "errors": {
+ "no-username-email": "Tu cliente Git no está configurado con un nombre de usuario/correo electrónico.",
+ "unexpected": "Ocurrió un error inesperado",
+ "code": "código"
+ }
+ },
+ "editor-tab": {
+ "properties": "Propiedades",
+ "envProperties": "Variables de Entorno",
+ "module": "Propiedades del módulo",
+ "description": "Descripción",
+ "appearance": "Apariencia",
+ "preview": "Vista previa interfaz de usuario",
+ "defaultValue": "Valor por defecto"
+ },
+ "tourGuide": {
+ "takeATour": "Hacer un recorrido",
+ "start": "Iniciar",
+ "next": "Siguiente",
+ "welcomeTours": "Recorridos de Bienvenida"
+ },
+ "diagnostics": {
+ "title": "Información Sistema"
+ },
+ "validator": {
+ "errors": {
+ "invalid-json": "Datos JSON inválidos: __error__",
+ "invalid-expr": "Expresión JSONata inválida: __error__",
+ "invalid-prop": "Expresión de propiedad inválida",
+ "invalid-num": "Número inválido",
+ "invalid-num-prop": "__prop__: número inválido",
+ "invalid-regexp": "Entrada inválida",
+ "invalid-regex-prop": "__prop__: entrada inválida",
+ "missing-required-prop": "__prop__: falta valor de propiedad",
+ "invalid-config": "__prop__: nodo de configuración inválido",
+ "missing-config": "__prop__: nodo de configuración no encontrado",
+ "validation-error": "__prop__: error de validación: __node__, __id__: __error__"
+ }
+ },
+ "contextMenu": {
+ "showActionList": "Mostrar lista de acciones",
+ "insert": "Insertar",
+ "node": "Nodo",
+ "junction": "Unión",
+ "linkNodes": "Enlazar Nodos"
+ },
+ "env-var": {
+ "environment": "Entorno",
+ "header": "Variables Globales de Entorno",
+ "revert": "Revertir"
+ }
+}
diff --git a/packages/node_modules/@node-red/editor-client/locales/es-ES/infotips.json b/packages/node_modules/@node-red/editor-client/locales/es-ES/infotips.json
new file mode 100644
index 000000000..bdd17c667
--- /dev/null
+++ b/packages/node_modules/@node-red/editor-client/locales/es-ES/infotips.json
@@ -0,0 +1,26 @@
+{
+ "info": {
+ "tip0": "Puedes eliminar los nodos o enlaces seleccionados con {{core:delete-selection}}",
+ "tip1": "Busca nodos con {{core:search}}",
+ "tip2": "{{core:toggle-sidebar}} alternará la vista de esta barra lateral",
+ "tip3": "Puedes gestionar tu paleta de nodos con {{core:manage-palette}}",
+ "tip4": "Tus nodos de configuración de flujo aparecen en el panel de la barra lateral. Se puede acceder desde el menú o con {{core:show-config-tab}}",
+ "tip5": "Activa o desactiva estos consejos desde la opción en la configuración",
+ "tip6": "Mueve los nodos seleccionados usando las teclas [izquierda] [arriba] [abajo] y [derecha]. Mantén pulsada [Mayús] para desplazarlos más",
+ "tip7": "Arrastrar un nodo a un cable lo insertará en el enlace",
+ "tip8": "Exporta los nodos seleccionados, o la pestaña actual con {{core:show-export-dialog}}",
+ "tip9": "Importa un flujo arrastrando su JSON al editor, o con {{core:show-import-dialog}}",
+ "tip10": "[shift][clic] y arrastrar en un puerto de nodo para mover todos los cables conectados o sólo el seleccionado",
+ "tip11": "Mostrar la pestaña Información con {{core:show-info-tab}} o la pestaña Depuración con {{core:show-debug-tab}}",
+ "tip12": "[ctrl] [clic] en el área de trabajo para abrir el diálogo de adición rápida",
+ "tip13": "Mantén pulsada [ctrl] cuando [haces clic] en un puerto de nodo para habilitar el enlazado rápido",
+ "tip14": "Mantén pulsada [shift] cuando [haces clic] en un nodo para seleccionar también todos sus nodos conectados",
+ "tip15": "Mantén pulsada [ctrl] cuando [haces clic] en un nodo para añadirlo o eliminarlo de la selección actual",
+ "tip16": "Cambia de pestaña de flujo con {{core:show-previous-tab}} y {{core:show-next-tab}}",
+ "tip17": "Puedes confirmar tus cambios en la bandeja de edición de nodos con {{core:confirm-edit-tray}} o cancelarlos con {{core:cancel-edit-tray}}",
+ "tip18": "Al pulsar {{core:edit-selected-node}} se editará el primer nodo de la selección actual"
+ }
+}
+
+
+
diff --git a/packages/node_modules/@node-red/editor-client/locales/es-ES/jsonata.json b/packages/node_modules/@node-red/editor-client/locales/es-ES/jsonata.json
new file mode 100644
index 000000000..eaf720bfb
--- /dev/null
+++ b/packages/node_modules/@node-red/editor-client/locales/es-ES/jsonata.json
@@ -0,0 +1,278 @@
+{
+ "$string": {
+ "args": "arg[, prettify]",
+ "desc": "Convierte el parámetro `arg` a una cadena usando las siguientes reglas de conversión:\n\n - Las cadenas no cambian\n - Las funciones se convierten en una cadena vacía\n - El infinito numérico y NaN arrojan un error porque no se pueden representar como un número JSON\n: todos los demás valores se convierten a una cadena JSON usando la función `JSON.stringify`. Si `prettify` es verdadero, entonces se produce JSON \"prettified\". es decir, una línea por campo y las líneas se indentarán según la profundidad del campo."
+ },
+ "$length": {
+ "args": "str",
+ "desc": "Devuelve el número de caracteres de la cadena `str`. Se genera un error si `str` no es una cadena."
+ },
+ "$substring": {
+ "args": "str, start[, length]",
+ "desc": "Devuelve una cadena que contiene los caracteres del primer parámetro `str` comenzando en la posición `start` (desplazamiento cero). Si se especifica 'longitud', la subcadena contendrá el máximo de caracteres de 'longitud'. Si 'inicio' es negativo, indica el número de caracteres desde el final de 'cadena'."
+ },
+ "$substringBefore": {
+ "args": "str, chars",
+ "desc": "Devuelve la subcadena antes de la primera aparición de la secuencia de caracteres `chars` en `str`. Si `str` no contiene `caracteres`, entonces devuelve `str`."
+ },
+ "$substringAfter": {
+ "args": "str, chars",
+ "desc": "Devuelve la subcadena después de la primera aparición de la secuencia de caracteres `chars` en `str`. Si `str` no contiene `caracteres`, entonces devuelve `str`."
+ },
+ "$uppercase": {
+ "args": "str",
+ "desc": "Devuelve una cadena con todos los caracteres de `str` convertidos a mayúsculas."
+ },
+ "$lowercase": {
+ "args": "str",
+ "desc": "Devuelve una cadena con todos los caracteres de `str` convertidos a minúsculas."
+ },
+ "$trim": {
+ "args": "str",
+ "desc": "Normaliza y recorta todos los caracteres de espacio en blanco en `str` aplicando los siguientes pasos:\n\n - Todas las tabulaciones, retornos de carro y avances de línea se reemplazan con espacios.\n- Las secuencias contiguas de espacios se reducen a un solo espacio.\n- Se eliminan los espacios iniciales y finales.\n\n Si no se especifica `str` (es decir, esta función se invoca sin argumentos), entonces el valor de contexto se utiliza como el valor de `str`. Se genera un error si `str` no es una cadena."
+ },
+ "$contains": {
+ "args": "str, pattern",
+ "desc": "Devuelve 'verdadero' si 'cadena' coincide con 'patrón', de lo contrario, devuelve 'falso'. Si no se especifica `str` (es decir, esta función se invoca con un argumento), entonces el valor del contexto se utiliza como valor de `str`. El parámetro `patrón` puede ser una cadena o una expresión regular."
+ },
+ "$split": {
+ "args": "str[, separator][, limit]",
+ "desc": "Divide el parámetro `str` en una matriz de subcadenas. Es un error si `str` no es una cadena. El parámetro opcional `separador` especifica los caracteres dentro de la `cadena` sobre los cuales se debe dividir como una cadena o una expresión regular. Si no se especifica 'separador', se supone que la cadena está vacía y 'cadena' se dividirá en una matriz de caracteres individuales. Es un error si el 'separador' no es una cadena. El parámetro opcional 'límite' es un número que especifica el número máximo de subcadenas que se incluirán en la matriz resultante. Cualquier subcadena adicional se descarta. Si no se especifica `límite`, entonces `str` se divide completamente sin límite para el tamaño de la matriz resultante. Es un error si 'límite' no es un número positivo."
+ },
+ "$join": {
+ "args": "array[, separator]",
+ "desc": "Une una matriz de cadenas de componentes en una única cadena concatenada con cada cadena de componentes separada por el parámetro 'separador' opcional. Es un error si la 'matriz' de entrada contiene un elemento que no es una cadena. Si no se especifica 'separador', se supone que es una cadena vacía, es decir, que no hay 'separador' entre las cadenas componentes. Es un error si el 'separador' no es una cadena."
+ },
+ "$match": {
+ "args": "str, pattern [, limit]",
+ "desc": "Aplica la cadena `str` a la expresión regular `pattern` y devuelve una matriz de objetos, cada objeto contiene información sobre cada aparición de una coincidencia dentro de `str`."
+ },
+ "$replace": {
+ "args": "str, pattern, replacement [, limit]",
+ "desc": "Encuentra apariciones de `patrón` dentro de `str` y las reemplaza con `reemplazo`.\n\nEl parámetro opcional `límite` es el número máximo de reemplazos."
+ },
+ "$now": {
+ "args": "$[picture [, timezone]]",
+ "desc": "Genera una marca de tiempo en formato compatible con ISO 8601 y la devuelve como una cadena. Si se proporcionan los parámetros opcionales `picture` y `zona horaria`, entonces la marca de tiempo actual se formatea como se describe en la función `$fromMillis()`"
+ },
+ "$base64encode": {
+ "args": "string",
+ "desc": "Convierte una cadena ASCII a una representación base 64. Cada carácter de la cadena se trata como un byte de datos binarios. Esto requiere que todos los caracteres de la cadena estén en el rango de 0x00 a 0xFF, que incluye todos los caracteres de las cadenas codificadas con URI. No se admiten caracteres Unicode fuera de ese rango."
+ },
+ "$base64decode": {
+ "args": "string",
+ "desc": "Convierte bytes codificados en base 64 en una cadena, utilizando una página de códigos Unicode UTF-8."
+ },
+ "$number": {
+ "args": "arg",
+ "desc": "Convierte el parámetro `arg` a un número usando las siguientes reglas de conversión:\n\n - Los números no cambian\n - Las cadenas que contienen una secuencia de caracteres que representan un número JSON legal se convierten a ese número\n - Todos los demás valores provocar que se arroje un error."
+ },
+ "$abs": {
+ "args": "number",
+ "desc": "Devuelve el valor absoluto del parámetro 'número'."
+ },
+ "$floor": {
+ "args": "number",
+ "desc": "Devuelve el valor de 'número' redondeado hacia abajo al entero más cercano que sea menor o igual a 'número'."
+ },
+ "$ceil": {
+ "args": "number",
+ "desc": "Devuelve el valor de 'número' redondeado al número entero más cercano que sea mayor o igual a 'número'."
+ },
+ "$round": {
+ "args": "number [, precision]",
+ "desc": "Devuelve el valor del parámetro 'número' redondeado al número de decimales especificado por el parámetro opcional 'precisión'."
+ },
+ "$power": {
+ "args": "base, exponent",
+ "desc": "Devuelve el valor de 'base' elevado a la potencia de 'exponente'."
+ },
+ "$sqrt": {
+ "args": "number",
+ "desc": "Devuelve la raíz cuadrada del valor del parámetro 'número'."
+ },
+ "$random": {
+ "args": "",
+ "desc": "Devuelve un número pseudoaleatorio mayor o igual a cero y menor que uno."
+ },
+ "$millis": {
+ "args": "",
+ "desc": "Devuelve el número de milisegundos desde la época Unix (1 de enero de 1970 UTC) como un número. Todas las invocaciones de `$millis()` dentro de una evaluación de una expresión devolverán el mismo valor."
+ },
+ "$sum": {
+ "args": "array",
+ "desc": "Devuelve la suma aritmética de una 'matriz' de números. Es un error si la 'matriz' de entrada contiene un elemento que no es un número."
+ },
+ "$max": {
+ "args": "array",
+ "desc": "Devuelve el número máximo en una 'matriz' de números. Es un error si la 'matriz' de entrada contiene un elemento que no es un número."
+ },
+ "$min": {
+ "args": "array",
+ "desc": "Devuelve el número mínimo en una 'matriz' de números. Es un error si la 'matriz' de entrada contiene un elemento que no es un número."
+ },
+ "$average": {
+ "args": "array",
+ "desc": "Devuelve el valor medio de una 'matriz' de números. Es un error si la 'matriz' de entrada contiene un elemento que no es un número."
+ },
+ "$boolean": {
+ "args": "arg",
+ "desc": "Convierte el argumento a un booleano usando las siguientes reglas:\n\n - `Booleano`: sin cambios\n - `cadena`: vacía: `falso`\n - `cadena`: no vacía: `verdadero`\n - `número`: `0`: `falso`\n - `número`: distinto de cero: `verdadero`\n - `nulo`: `falso`\n - `matriz`: vacía: `falso`\n - `array`: contiene un miembro que se convierte en `true`: `true`\n - `array`: todos los miembros se convierten en `false`: `false`\n - `object`: vacío: `false`\n - `objeto`: no vacío: `verdadero`\n - `función`: `falso`"
+ },
+ "$not": {
+ "args": "arg",
+ "desc": "Devuelve booleano NEGADO del argumento. `arg` se convierte antes en un booleano"
+ },
+ "$exists": {
+ "args": "arg",
+ "desc": "Devuelve booleano 'verdadero' si la expresión 'arg' se evalúa como un valor, o 'falso' si la expresión no coincide con nada (por ejemplo, una ruta a una referencia de campo inexistente)."
+ },
+ "$count": {
+ "args": "array",
+ "desc": "Devuelve el número de elementos de la matriz."
+ },
+ "$append": {
+ "args": "array, array",
+ "desc": "Agrega dos matrices"
+ },
+ "$sort": {
+ "args": "array [, function]",
+ "desc": "Devuelve una matriz que contiene todos los valores en el parámetro `array`, pero ordenados.\n\nSi se proporciona una `función` de comparador, entonces debe ser una función que toma dos parámetros:\n\n`function(left , derecha)`\n\nEsta función es invocada por el algoritmo de clasificación para comparar dos valores `izquierda` y `derecha`. Si el valor de `izquierda` debe colocarse después del valor de `derecha` en el orden de clasificación deseado, entonces la función debe devolver un valor booleano 'verdadero' para indicar un intercambio. De lo contrario debe devolver 'falso'."
+ },
+ "$reverse": {
+ "args": "array",
+ "desc": "Devuelve una matriz que contiene todos los valores del parámetro `matriz`, pero en orden inverso."
+ },
+ "$shuffle": {
+ "args": "array",
+ "desc": "Devuelve una matriz que contiene todos los valores del parámetro `array`, pero mezclados en orden aleatorio."
+ },
+ "$zip": {
+ "args": "array, ...",
+ "desc": "Devuelve una matriz convolucionada (comprimida) que contiene matrices agrupadas de valores de los argumentos `matriz1`... `matrizN` del índice 0, 1, 2...."
+ },
+ "$keys": {
+ "args": "object",
+ "desc": "Devuelve una matriz que contiene las claves del objeto. Si el argumento es una matriz de objetos, entonces la matriz devuelta contiene una lista deduplicada de todas las claves de todos los objetos."
+ },
+ "$lookup": {
+ "args": "object, key",
+ "desc": "Devuelve el valor asociado con la clave en el objeto. Si el primer argumento es una matriz de objetos, entonces se buscan todos los objetos de la matriz y se devuelven los valores asociados con todas las apariciones de la clave."
+ },
+ "$spread": {
+ "args": "object",
+ "desc": "Divide un objeto que contiene pares clave/valor en una matriz de objetos, cada uno de los cuales tiene un único par clave/valor del objeto de entrada. Si el parámetro es una matriz de objetos, entonces la matriz resultante contiene un objeto para cada par clave/valor en cada objeto de la matriz proporcionada."
+ },
+ "$merge": {
+ "args": "array<object>",
+ "desc": "Fusiona una matriz de objetos en un único objeto que contiene todos los pares clave/valor de cada uno de los objetos en la matriz de entrada. Si alguno de los objetos de entrada contiene la misma clave, entonces el objeto devuelto contendrá el valor del último en la matriz. Es un error si la matriz de entrada contiene un elemento que no es un objeto."
+ },
+ "$sift": {
+ "args": "object, function",
+ "desc": "Devuelve un objeto que contiene solo los pares clave/valor del parámetro `objeto` que satisfacen el predicado `función` pasado como segundo parámetro.\n\nLa `función` que se proporciona como segundo parámetro debe tener la siguiente firma:\n\n`función(valor [, clave [, objeto]])`"
+ },
+ "$each": {
+ "args": "object, function",
+ "desc": "Devuelve una matriz que contiene los valores devueltos por la función cuando se aplica a cada par clave/valor en el objeto."
+ },
+ "$map": {
+ "args": "array, function",
+ "desc": "Devuelve una matriz que contiene los resultados de aplicar el parámetro `función` a cada valor en el parámetro `matriz`.\n\nLa `función` que se proporciona como segundo parámetro debe tener la siguiente firma:\n\n`función( valor [, índice [, matriz]])`"
+ },
+ "$filter": {
+ "args": "array, function",
+ "desc": "Devuelve una matriz que contiene solo los valores en el parámetro `matriz` que satisfacen el predicado `función`.\n\nLa `función` que se proporciona como segundo parámetro debe tener la siguiente firma:\n\n`función(valor [ , índice [, matriz]])`"
+ },
+ "$reduce": {
+ "args": "array, function [, init]",
+ "desc": "Devuelve un valor agregado derivado de aplicar el parámetro `función` sucesivamente a cada valor en `matriz` en combinación con el resultado de la aplicación anterior de la función.\n\nLa función debe aceptar dos argumentos y se comporta como un operador infijo entre cada valor dentro de la matriz. La firma de la `función` debe tener la forma: `myfunc($accumulator, $value[, $index[, $array]])`\n\nEl parámetro opcional `init` se utiliza como valor inicial en la agregación."
+ },
+ "$flowContext": {
+ "args": "string[, string]",
+ "desc": "Recupera una propiedad de contexto de flujo.\n\nEsta es una función definida por Node-RED."
+ },
+ "$globalContext": {
+ "args": "string[, string]",
+ "desc": "Recupera una propiedad de contexto global.\n\nEsta es una función definida por Node-RED."
+ },
+ "$pad": {
+ "args": "string, width [, char]",
+ "desc": "Devuelve una copia de la `cadena` con relleno adicional, si es necesario, de modo que su número total de caracteres sea al menos el valor absoluto del parámetro `ancho`.\n\nSi `ancho` es un número positivo, entonces la cadena está acolchado hacia la derecha; si es negativo, se rellena hacia la izquierda.\n\nEl argumento opcional `char` especifica los caracteres de relleno que se utilizarán. Si no se especifica, el valor predeterminado es el carácter de espacio."
+ },
+ "$fromMillis": {
+ "args": "number, [, picture [, timezone]]",
+ "desc": "Convierte el `número` que representa milisegundos desde la época Unix (1 de enero de 1970 UTC) en una representación de cadena formateada según la plantilla en picture.\n\nSi se omite el parámetro opcional `picture`, entonces la marca de tiempo es formateado en el formato ISO 8601.\n\nSi se proporciona la cadena opcional `picture`, entonces la marca de tiempo se formatea de acuerdo con la representación especificada en esa cadena. El comportamiento de esta función es consistente con la versión de dos argumentos de la función XPath/XQuery `format-dateTime` tal como se define en la especificación XPath F&O 3.1. El parámetro de plantilla define cómo se formatea la marca de tiempo y tiene la misma sintaxis que `format-dateTime`.\n\nSi se proporciona la cadena opcional `timezone`, entonces la marca de tiempo formateada estará en esa zona horaria. La cadena `timezone` debe tener el formato '±HHMM', donde ± es el signo más o menos y HHMM es el desplazamiento en horas y minutos desde UTC. Desplazamiento positivo para zonas horarias al este de UTC, desplazamiento negativo para zonas horarias al oeste de UTC."
+ },
+ "$formatNumber": {
+ "args": "number, picture [, options]",
+ "desc": "Convierte el `número` en una cadena y lo formatea en una representación decimal según lo especificado en la cadena `picture`.\n\n El comportamiento de esta función es coherente con la función XPath/XQuery `fn:format-number` tal como se define en la especificación XPath F&O 3.1. El parámetro de cadena `picture` define cómo se formatea el número y tiene la misma sintaxis que `fn:formato-número`.\n\nEl tercer argumento opcional `opciones` se utiliza para anular los caracteres de formato específicos de la configuración regional predeterminada, como el decimal. separador. Si se proporciona, este argumento debe ser un objeto que contenga pares de nombre/valor especificados en la sección de formato decimal de la especificación XPath F&O 3.1."
+ },
+ "$formatBase": {
+ "args": "number [, radix]",
+ "desc": "Convierte el número en una cadena y lo formatea como un número entero representado en la base numérica especificada por el argumento `radix`. Si no se especifica `radix`, el valor predeterminado es la base 10. `radix` puede estar entre 2 y 36; de lo contrario, se genera un error."
+ },
+ "$toMillis": {
+ "args": "timestamp",
+ "desc": "Convierte una cadena de `marca de tiempo` en el formato ISO 8601 al número de milisegundos desde la época Unix (1 de enero de 1970 UTC) como un número. Se genera un error si la cadena no tiene el formato correcto."
+ },
+ "$env": {
+ "args": "arg",
+ "desc": "Devuelve el valor de una variable de entorno.\n\nEsta es una función definida por Node-RED."
+ },
+ "$eval": {
+ "args": "expr [, context]",
+ "desc": "Analiza y evalúa la cadena `expr` que contiene JSON literal o una expresión JSONata utilizando el contexto actual como contexto para la evaluación."
+ },
+ "$formatInteger": {
+ "args": "number, picture",
+ "desc": "Convierte el número en una cadena y lo formatea en una representación entera como lo especifica la cadena `picture`. El parámetro de define cómo se formatea el número y tiene la misma sintaxis que `fn:format-integer` de la especificación XPath F&O 3.1."
+ },
+ "$parseInteger": {
+ "args": "string, picture",
+ "desc": "Analiza el contenido del parámetro cadena en un número entero (como un número JSON) utilizando el formato especificado por la cadena `picture`. El parámetro tiene el mismo formato que `$formatInteger`."
+ },
+ "$error": {
+ "args": "[str]",
+ "desc": "Lanza un error con un mensaje. El parámetro `str` opcional reemplazará el mensaje predeterminado de `$error() función evaluada`"
+ },
+ "$assert": {
+ "args": "arg, str",
+ "desc": "Si `arg` es `verdadero`, la función devuelve indefinido. Si `arg` es `falso`, se lanza una excepción con `str` como mensaje de excepción."
+ },
+ "$single": {
+ "args": "array, function",
+ "desc": "Devuelve el único valor en el parámetro `array` que satisface el predicado de `función` (es decir, la `función` devuelve booleano `verdadero` cuando se pasa el valor). Lanza una excepción si el número de valores coincidentes no es exactamente uno.\n\nLa función debe proporcionarse con la siguiente firma: `función(valor [, índice [, matriz]])` donde el valor es cada entrada de la matriz. El índice es la posición de ese valor y toda la matriz se pasa como tercer argumento."
+ },
+ "$encodeUrlComponent": {
+ "args": "str",
+ "desc": "Codifica un componente de URL reemplazando cada instancia de ciertos caracteres por una, dos, tres o cuatro secuencias de escape que representan la codificación UTF-8 del carácter.\n\nEjemplo: `$encodeUrlComponent(\"?x=prueba\")` => `\"%3Fx%3Dprueba\"`"
+ },
+ "$encodeUrl": {
+ "args": "str",
+ "desc": "Codifica una URL reemplazando cada instancia de ciertos caracteres por una, dos, tres o cuatro secuencias de escape que representan la codificación UTF-8 del carácter.\n\nEjemplo: `$encodeUrl(\"https://mozilla.org/?x=шеллы\")` => `\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\"`"
+ },
+ "$decodeUrlComponent": {
+ "args": "str",
+ "desc": "Decodifica un componente de URL creado previamente por encodeUrlComponent.\n\nEjemplo: `$decodeUrlComponent(\"%3Fx%3Dtest\")` => `\"?x=test\"`"
+ },
+ "$decodeUrl": {
+ "args": "str",
+ "desc": "Decodifica una URL creado previamente por encodeUrl.\n\nEjemplo: `$decodeUrl(\"https://mozilla.org/?x=%D1%88%D0%B5%D0%BB%D0%BB%D1%8B\")` => `\"https://mozilla.org/?x=шеллы\"`"
+ },
+ "$distinct": {
+ "args": "array",
+ "desc": "Devuelve una matriz con valores duplicados eliminados de `matriz`"
+ },
+ "$type": {
+ "args": "value",
+ "desc": "Devuelve el tipo de `valor` como una cadena. Si `valor` no está definido, esto devolverá indefinido."
+ },
+ "$moment": {
+ "args": "[str]",
+ "desc": "Obtiene un objeto de fecha usando la biblioteca Moment."
+ },
+ "$clone": {
+ "args": "value",
+ "desc": "Clona un objeto de forma segura."
+ }
+}
diff --git a/packages/node_modules/@node-red/editor-client/locales/fr/editor.json b/packages/node_modules/@node-red/editor-client/locales/fr/editor.json
index 46d85daa5..6faa1ed24 100644
--- a/packages/node_modules/@node-red/editor-client/locales/fr/editor.json
+++ b/packages/node_modules/@node-red/editor-client/locales/fr/editor.json
@@ -119,10 +119,9 @@
"searchInput": "Rechercher vos flux",
"subflows": "Sous-flux",
"createSubflow": "Créer un sous-flux",
- "selectionToSubflow": "Selection d'un sous-flux",
+ "selectionToSubflow": "Convertir en sous-flux",
"flows": "Flux",
"add": "Ajouter",
- "rename": "Renommer",
"delete": "Supprimer",
"keyboardShortcuts": "Raccourcis clavier",
"login": "Se connecter",
@@ -130,6 +129,11 @@
"editPalette": "Gérer la palette",
"other": "Autre",
"showTips": "Afficher les astuces",
+ "showNodeHelp": "Afficher l'aide du noeud",
+ "enableSelectedNodes": "Activer les noeuds sélectionnés",
+ "disableSelectedNodes": "Désactiver les noeuds sélectionnés",
+ "showSelectedNodeLabels": "Afficher les étiquettes des noeuds sélectionnés",
+ "hideSelectedNodeLabels": "Masquer les étiquettes des noeuds sélectionnés",
"showWelcomeTours": "Afficher les visites guidées pour les nouvelles versions",
"help": "Site web de Node-RED",
"projects": "Projets",
@@ -274,23 +278,23 @@
"recoveredNodesInfo": "Les noeuds importés sur ce flux contiennent un mauvais identifiant de flux. Ces noeuds ont été ajoutés à ce flux afin que vous puissiez les restaurer ou les supprimer.",
"recoveredNodesNotification": "Noeuds importés sans identifiant de flux valide
Ils ont été ajoutés à un nouveau flux appelé '__flowName__'.
",
"export": {
- "selected": "noeuds sélectionnés",
- "current": "flux actuel",
+ "selected": "les noeuds sélectionnés",
+ "current": "le flux actuel",
"all": "tous les flux",
- "compact": "condensé",
- "formatted": "formaté",
+ "compact": "Condensé",
+ "formatted": "Formaté",
"copy": "Copier dans le presse-papier",
"export": "Exporter vers la bibliothèque",
- "exportAs": "Exporter en tant que",
+ "exportAs": "Exporter comme",
"overwrite": "Remplacer",
"exists": "\"__file__\" existe déjà.
Voulez-vous le remplacer ?
"
},
"import": {
"import": "Importer vers",
- "importSelected": "Importation sélectionnée",
+ "importSelected": "Importer la sélection",
"importCopy": "Importer une copie",
- "viewNodes": "Afficher les noeuds...",
- "newFlow": "Nouveau flux",
+ "viewNodes": "Vérifier ces noeuds",
+ "newFlow": "un nouveau flux",
"replace": "Remplacer",
"errors": {
"notArray": "L'entrée n'est pas un tableau JSON",
@@ -299,7 +303,8 @@
"missingType": "L'entrée n'est pas un flux valide - l'élément '__index__' n'a pas de propriété 'type'"
},
"conflictNotification1": "Certains des noeuds que vous avez importés existent déjà dans votre espace de travail.",
- "conflictNotification2": "Sélectionner les noeuds à importer et choisir s'il faut remplacer les noeuds existants ou en importer une copie."
+ "conflictNotification2": "Sélectionnez les noeuds à importer et choisissez s'il faut remplacer les noeuds existants ou en importer une copie.",
+ "alreadyExists": "Ce noeud existe déjà"
},
"copyMessagePath": "Chemin copié",
"copyMessageValue": "Valeur copiée",
@@ -391,10 +396,10 @@
"subflowInstances": "Il existe __count__ instance de ce modèle de sous-flux",
"subflowInstances_plural": "Il existe __count__ instances de ce modèle de sous-flux",
"editSubflowProperties": "modifier les propriétés",
- "input": "entrées:",
- "output": "sorties:",
- "status": "statut du noeud",
- "deleteSubflow": "supprimer le sous-flux",
+ "input": "Entrées:",
+ "output": "Sorties:",
+ "status": "Statut du noeud",
+ "deleteSubflow": "Supprimer le sous-flux",
"confirmDelete": "Voulez-vous vraiment supprimer ce sous-flux ?",
"info": "Description",
"category": "Catégorie",
@@ -416,6 +421,7 @@
},
"errors": {
"noNodesSelected": "Impossible de créer un sous-flux : aucun noeud sélectionné",
+ "acrossMultipleGroups": "Impossible de créer un sous-flux sur plusieurs groupes",
"multipleInputsToSelection": "Impossible de créer un sous-flux : plusieurs entrées pour la sélection"
}
},
@@ -447,8 +453,8 @@
"default": "Par défaut",
"noDefaultLabel": "Aucune",
"defaultLabel": "Utiliser l'étiquette par défaut",
- "searchIcons": "Icônes de recherche",
- "useDefault": "Utilisation par défaut",
+ "searchIcons": "Rechercher une icône",
+ "useDefault": "Icône par défaut",
"description": "Description",
"show": "Afficher",
"hide": "Masquer",
@@ -498,19 +504,19 @@
"keyboard": {
"title": "Raccourcis clavier",
"keyboard": "Clavier",
- "filterActions": "Actions de filtrage",
- "shortcut": "raccourci",
- "scope": "portée",
+ "filterActions": "Rechercher l'action",
+ "shortcut": "Raccourci",
+ "scope": "Portée",
"unassigned": "Non attribué",
- "global": "global",
- "workspace": "espace de travail",
- "editor": "boîte de dialogue d'édition",
+ "global": "Global",
+ "workspace": "Espace de travail",
+ "editor": "Boîte de dialogue d'édition",
"selectAll": "Tout sélectionner",
"selectNone": "Ne rien sélectionner",
"selectAllConnected": "Sélectionner tous les éléments connectés",
"addRemoveNode": "Ajouter/supprimer un noeud de la sélection",
"editSelected": "Modifier le noeud sélectionné",
- "deleteSelected": "Supprimer les noeuds ou le lien sélectionné(s)",
+ "deleteSelected": "Supprimer la sélection",
"deleteReconnect": "Supprimer et reconnecter",
"importNode": "Importer les noeuds",
"exportNode": "Exporter les noeuds",
@@ -550,22 +556,22 @@
},
"palette": {
"noInfo": "Pas d'information disponible",
- "filter": "Filtrer les noeuds",
+ "filter": "Rechercher le noeud",
"search": "Rechercher les modules",
"addCategory": "Ajouter un nouveau...",
"label": {
- "subflows": "sous-flux",
- "network": "réseau",
- "common": "commun",
- "input": "entrée",
- "output": "sortie",
- "function": "fonction",
- "sequence": "séquence",
- "parser": "analyseur",
- "social": "social",
- "storage": "stockage",
- "analysis": "analyse",
- "advanced": "avancé"
+ "subflows": "Sous-flux",
+ "network": "Réseau",
+ "common": "Commun",
+ "input": "Entrée",
+ "output": "Sortie",
+ "function": "Fonction",
+ "sequence": "Séquence",
+ "parser": "Analyseur",
+ "social": "Social",
+ "storage": "Stockage",
+ "analysis": "Analyse",
+ "advanced": "Avancé"
},
"actions": {
"collapse-all": "Réduire toutes les catégories",
@@ -586,6 +592,7 @@
"editor": {
"title": "Gérer la palette",
"palette": "Palette",
+ "allCatalogs": "Tous les catalogues",
"times": {
"seconds": "il y a quelques secondes",
"minutes": "il y a quelques minutes",
@@ -609,24 +616,25 @@
"nodeCount_plural": "__label__ noeuds",
"moduleCount": "__count__ module disponible",
"moduleCount_plural": "__count__ modules disponibles",
- "inuse": "en cours d'utilisation",
- "enableall": "activer tout",
- "disableall": "désactiver tout",
- "enable": "activer",
- "disable": "désactiver",
- "remove": "supprimer",
- "update": "mettre à jour vers __version__",
- "updated": "mis à jour",
- "install": "installer",
- "installed": "installé",
- "conflict": "conflit",
+ "inuse": "En cours d'utilisation",
+ "enableall": "Activer tout",
+ "disableall": "Désactiver tout",
+ "enable": "Activer",
+ "disable": "Désactiver",
+ "remove": "Supprimer",
+ "update": "Mettre à jour vers __version__",
+ "updated": "Mis à jour",
+ "install": "Installer",
+ "installed": "Installé",
+ "conflict": "Conflit",
"conflictTip": "Ce module ne peut pas être installé car il inclut un type de noeud qui a déjà été installé
Conflits avec __module__
",
"loading": "Chargement des catalogues...",
"tab-nodes": "Noeuds",
"tab-install": "Installer",
- "sort": "trier:",
- "sortAZ": "a-z",
- "sortRecent": "récent",
+ "sort": "Trier:",
+ "sortRelevance": "Pertinence",
+ "sortAZ": "A-Z",
+ "sortRecent": "Récent",
"more": "+ __count__ en plus",
"upload": "Charger le fichier tgz du module",
"refresh": "Actualiser la liste des modules",
@@ -667,7 +675,7 @@
"info": {
"name": "Information",
"tabName": "Nom",
- "label": "info",
+ "label": "Info",
"node": "Noeud",
"type": "Type",
"group": "Groupe",
@@ -681,10 +689,10 @@
"properties": "Propriétés",
"info": "Information",
"desc": "Description",
- "blank": "vide",
- "null": "nul",
- "showMore": "afficher en plus",
- "showLess": "afficher en moins",
+ "blank": "Vide",
+ "null": "Nul",
+ "showMore": "Afficher en plus",
+ "showLess": "Afficher en moins",
"flow": "Flux",
"selection": "Sélection",
"nodes": "__count__ noeuds",
@@ -695,7 +703,7 @@
"arrayItems": "__count__ éléments",
"showTips": "Vous pouvez ouvrir les astuces à partir du panneau des paramètres",
"outline": "Plan",
- "empty": "vide",
+ "empty": "Vide",
"globalConfig": "Noeuds de configuration globale",
"triggerAction": "Déclencher une action",
"find": "Rechercher dans l'espace de travail",
@@ -706,7 +714,7 @@
},
"help": {
"name": "Aide",
- "label": "aide",
+ "label": "Aide",
"search": "Aide à la recherche",
"nodeHelp": "Aide sur les noeuds",
"showHelp": "Afficher l'aide",
@@ -717,23 +725,23 @@
},
"config": {
"name": "Noeuds de configuration",
- "label": "configuration",
+ "label": "Configuration",
"global": "Tous les flux",
- "none": "aucun",
- "subflows": "sous-flux",
- "flows": "flux",
- "filterAll": "tout",
+ "none": "Aucun",
+ "subflows": "Sous-flux",
+ "flows": "Flux",
+ "filterAll": "Tout",
"showAllConfigNodes": "Afficher tous les noeuds de configuration",
- "filterUnused": "inutilisé",
+ "filterUnused": "Inutilisé",
"showAllUnusedConfigNodes": "Afficher tous les noeuds de configuration inutilisés",
"filtered": "__count__ caché(s)"
},
"context": {
"name": "Données contextuelles",
- "label": "contexte",
- "none": "aucune sélection",
- "refresh": "actualiser pour charger",
- "empty": "vide",
+ "label": "Contexte",
+ "none": "Aucune sélection",
+ "refresh": "Actualiser pour charger",
+ "empty": "Vide",
"node": "Noeud",
"flow": "Flux",
"global": "Global",
@@ -744,10 +752,10 @@
},
"palette": {
"name": "Gestion des palettes",
- "label": "palette"
+ "label": "Palette"
},
"project": {
- "label": "projet",
+ "label": "Projet",
"name": "Projet",
"description": "Description",
"dependencies": "Dépendances",
@@ -760,11 +768,11 @@
"showProjectSettings": "Afficher les paramètres du projet",
"projectSettings": {
"title": "Paramètres du projet",
- "edit": "modifier",
+ "edit": "Modifier",
"none": "Vide",
- "install": "installer",
- "removeFromProject": "supprimer du projet",
- "addToProject": "ajouter au projet",
+ "install": "Installer",
+ "removeFromProject": "Supprimer du projet",
+ "addToProject": "Ajouter au projet",
"files": "Fichiers",
"flow": "Flux",
"credentials": "Identifiants",
@@ -812,7 +820,7 @@
"workflowAutoTip": "Les modifications sont validées automatiquement à chaque déploiement",
"sshKeys": "Clés SSH",
"sshKeysTip": "Vous permet de créer des connexions sécurisées aux référentiels Git distants.",
- "add": "ajouter une clé",
+ "add": "Ajouter une clé",
"addSshKey": "Ajouter une clé SSH",
"addSshKeyTip": "Générer une nouvelle paire de clés publique/privée",
"name": "Nom",
@@ -826,7 +834,7 @@
"copyPublicKey": "Copier la clé publique dans le presse-papiers",
"delete": "Supprimer une clé",
"gitConfig": "Configuration Git",
- "deleteConfirm": "Êtes-vous sûr de vouloir supprimer la clé SSH __nom__ ? Ça ne peut pas être annulé."
+ "deleteConfirm": "Êtes-vous sûr de vouloir supprimer la clé SSH __name__ ? Ça ne peut pas être annulé."
},
"versionControl": {
"unstagedChanges": "Abandon des changements",
@@ -848,7 +856,7 @@
"none": "Vide",
"conflictResolve": "Tous les conflits ont été résolus. Valider les modifications pour terminer la fusion.",
"localFiles": "Fichiers locaux",
- "all": "tout",
+ "all": "Tout",
"unmergedChanges": "Modifications non fusionnées",
"abortMerge": "Abandonner la fusion",
"commit": "Valider",
@@ -1097,9 +1105,9 @@
"desc8": "Le fichier contenant les identifiants ne sera pas crypté et son contenu sera facilement lisible",
"create-project-files": "Créer des fichiers de projet",
"create-project": "Créer un projet",
- "already-exists": "existe déjà",
+ "already-exists": "Existe déjà",
"git-error": "Erreur Git",
- "git-auth-error": "erreur d'authentification Git"
+ "git-auth-error": "Erreur d'authentification Git"
},
"create-success": {
"success": "Vous avez créé avec succès votre premier projet !",
@@ -1135,8 +1143,8 @@
"desc2": "Avant de pouvoir cloner un référentiel sur ssh, vous devez ajouter une clé SSH pour y accéder.",
"add-ssh-key": "Ajouter une clé ssh",
"credentials-encryption-key": "Clé de chiffrement des identifiants",
- "already-exists-2": "existe déjà",
- "git-error": "erreur git",
+ "already-exists-2": "Existe déjà",
+ "git-error": "Erreur git",
"con-failed": "La connexion a échoué",
"not-git": "Ce n'est pas un dépôt git",
"no-resource": "Référentiel introuvable",
@@ -1148,8 +1156,8 @@
"confirm": "Voulez-vous vraiment supprimer ce projet ?"
},
"create-project-list": {
- "search": "rechercher vos projets",
- "current": "actuel"
+ "search": "Rechercher vos projets",
+ "current": "Actuel"
},
"require-clean": {
"confirm": "Vous avez des modifications non déployées qui seront perdues.
Voulez-vous continuer ?
"
@@ -1198,23 +1206,11 @@
"diagnostics": {
"title": "Information système"
},
- "languages": {
- "de": "Allemand",
- "en-US": "Anglais",
- "fr": "Français",
- "ja": "Japonais",
- "ko": "Coréen",
- "pt-BR": "Portugais brésilien",
- "ru": "Russe",
- "zh-CN": "Chinois (Simplifié)",
- "zh-TW": "Chinois (Traditionnel)"
- },
"validator": {
"errors": {
"invalid-json": "Données JSON invalides : __error__",
- "invalid-json-prop": "__prop__: données JSON invalides : __error__",
- "invalid-prop": "Expression de propriété non valide",
- "invalid-prop-prop": "__prop__: expression de propriété invalide",
+ "invalid-expr": "Expression JSONata invalide : __error__",
+ "invalid-prop": "Expression de propriété invalide",
"invalid-num": "Numéro invalide",
"invalid-num-prop": "__prop__: numéro invalide",
"invalid-regexp": "Modèle d'entrée non valide",
@@ -1226,6 +1222,7 @@
}
},
"contextMenu": {
+ "showActionList": "Afficher la liste des actions",
"insert": "Insérer",
"node": "Noeud",
"junction": "Jonction",
@@ -1235,5 +1232,159 @@
"environment": "Environment",
"header": "Variables d'environnement globales",
"revert": "Rétablir"
+ },
+ "action-list": {
+ "toggle-show-tips": "Basculer l'affichage des astuces",
+ "show-about": "Afficher la description de Node-RED",
+ "show-welcome-tour": "Afficher la visite de bienvenue",
+ "show-next-tab": "Afficher l'onglet suivant",
+ "show-previous-tab": "Afficher l'onglet précédent",
+ "add-flow": "Ajouter un flux",
+ "add-flow-to-right": "Ajouter un flux à droite",
+ "edit-flow": "Modifier le flux",
+ "remove-flow": "Supprimer le flux",
+ "enable-flow": "Activer le flux",
+ "disable-flow": "Désactiver le flux",
+ "hide-flow": "Masquer le flux",
+ "hide-other-flows": "Masquer les autres flux",
+ "hide-all-flows": "Masquer tous les flux",
+ "show-all-flows": "Afficher tous les flux",
+ "show-last-hidden-flow": "Afficher le dernier flux masqué",
+ "list-modified-nodes": "Afficher les flux modifiés",
+ "list-hidden-flows": "Afficher les flux cachés",
+ "list-flows": "Lister les flux",
+ "list-subflows": "Liste les sous-flux",
+ "go-to-previous-location": "Aller à l'emplacement précédent",
+ "go-to-next-location": "Aller à l'emplacement suivant",
+ "copy-selection-to-internal-clipboard": "Copier la sélection dans le presse-papiers",
+ "cut-selection-to-internal-clipboard": "Couper la sélection dans le presse-papiers",
+ "paste-from-internal-clipboard": "Coller depuis le presse-papiers",
+ "detach-selected-nodes": "Détacher les noeuds sélectionnés",
+ "delete-selection": "Supprimer la sélection",
+ "delete-selection-and-reconnect": "Supprimer la sélection et reconnecter",
+ "edit-selected-node": "Modifier le noeud sélectionné",
+ "go-to-selection": "Aller à la sélection",
+ "undo": "Annuler les modifications",
+ "redo": "Rétablir les modifications",
+ "select-all-nodes": "Sélectionner tous les noeuds",
+ "select-none": "Sélectionner un noeud",
+ "enable-selected-nodes": "Activer les noeuds sélectionnés",
+ "disable-selected-nodes": "Désactiver les noeuds sélectionnés",
+ "toggle-show-grid": "Basculer l'affichage de la grille",
+ "toggle-snap-grid": "Basculer l'aide au placement des noeuds",
+ "toggle-status": "Commuter l'état",
+ "show-selected-node-labels": "Afficher les étiquettes des noeuds sélectionnés",
+ "hide-selected-node-labels": "Masquer les étiquettes des noeuds sélectionnés",
+ "scroll-view-up": "Faire défiler vers le haut",
+ "scroll-view-right": "Faire défiler vers la droite",
+ "scroll-view-down": "Faire défiler vers le bas",
+ "scroll-view-left": "Faire défiler vers la gauche",
+ "step-view-up": "Faire défiler d'une unité vers le haut",
+ "step-view-right": "Faire défiler d'une unité vers la droite",
+ "step-view-down": "Faire défiler d'une unité vers le bas",
+ "step-view-left": "Faire défiler d'une unité vers la gauche",
+ "move-selection-up": "Déplacer la sélection vers le haut",
+ "move-selection-right": "Déplacer la sélection vers la droite",
+ "move-selection-down": "Déplacer la sélection vers le bas",
+ "move-selection-left": "Déplacer la sélection vers la gauche",
+ "move-selection-forwards": "Avancer la sélection",
+ "move-selection-backwards": "Reculer la sélection",
+ "move-selection-to-front": "Déplacer la sélection vers l'avant",
+ "move-selection-to-back": "Déplacer la sélection vers l'arrière",
+ "step-selection-up": "Déplacer la sélection d'une unité vers le haut",
+ "step-selection-right": "Déplacer la sélection d'une unité vers la droite",
+ "step-selection-down": "Déplacer la sélection d'une unité vers le bas",
+ "step-selection-left": "Déplacer la sélection d'une unité vers la gauche",
+ "select-connected-nodes": "Sélectionner les noeuds connectés",
+ "select-downstream-nodes": "Sélectionner les noeuds connectés en aval",
+ "select-upstream-nodes": "Sélectionner les noeuds connectés en amont",
+ "go-to-next-node": "Aller au noeud suivant",
+ "go-to-previous-node": "Aller au noeud précédent",
+ "go-to-next-sibling": "Aller au noeud frère suivant",
+ "go-to-previous-sibling": "Aller au noeud frère précédent",
+ "go-to-nearest-node-on-left": "Aller au noeud gauche le plus proche",
+ "go-to-nearest-node-on-right": "Aller au noeud droit le plus proche",
+ "go-to-nearest-node-above": "Aller au noeud supérieur le plus proche",
+ "go-to-nearest-node-below": "Aller au noeud le plus proche ci-dessous",
+ "align-selection-to-grid": "Aligner la sélection",
+ "align-selection-to-left": "Aligner la sélection à gauche",
+ "align-selection-to-right": "Aligner la sélection à droite",
+ "align-selection-to-top": "Aligner la sélection en haut",
+ "align-selection-to-bottom": "Aligner la sélection vers le bas",
+ "align-selection-to-middle": "Aligner la sélection au centre verticalement",
+ "align-selection-to-center": "Aligner la sélection au centre horizontalement",
+ "distribute-selection-horizontally": "Distribuer la sélection horizontalement",
+ "distribute-selection-vertical": "Distribuer la sélection verticalement",
+ "wire-series-of-nodes": "Connecter les noeuds en série",
+ "wire-node-to-multiple": "Connecter les noeuds à plusieurs",
+ "wire-multiple-to-node": "Connecter plusieurs au noeud",
+ "split-wire-with-link-nodes": "Diviser le fil avec des noeuds de liaison",
+ "generate-node-names": "Générer les noms de noeuds",
+ "show-user-settings": "Afficher les paramètres utilisateur",
+ "show-help": "Afficher l'aide",
+ "toggle-palette": "Basculer l'affichage de la palette",
+ "show-event-log": "Afficher le journal des événements",
+ "manage-palette": "Gérer la palette",
+ "toggle-sidebar": "Basculer l'affichage de la barre latérale",
+ "show-info-tab": "Afficher l'onglet d'informations sur le noeud",
+ "show-help-tab": "Afficher l'onglet d'aide du noeud",
+ "show-config-tab": "Afficher l'onglet du noeud de configuration",
+ "select-all-config-nodes": "Sélectionner tous les noeuds de configuration",
+ "delete-config-selection": "Supprimer le noeud de configuration sélectionné",
+ "show-context-tab": "Afficher l'onglet des données contextuelles",
+ "create-subflow": "Créer un sous-flux",
+ "convert-to-subflow": "Convertir la sélection en sous-flux",
+ "group-selection": "Grouper la sélection",
+ "ungroup-selection": "Dissocier la sélection",
+ "merge-selection-to-group": "Fusionner la sélection dans le groupe",
+ "remove-selection-from-group": "Supprimer la sélection du groupe",
+ "copy-group-style": "Copier le style du groupe",
+ "paste-group-style": "Coller le style du groupe",
+ "show-export-dialog": "Afficher la boîte de dialogue d'exportation",
+ "show-import-dialog": "Afficher la boîte de dialogue d'importation",
+ "show-library-export-dialog": "Afficher la boîte de dialogue d'exportation de la bibliothèque",
+ "show-library-import-dialog": "Afficher la boîte de dialogue d'importation de bibliothèque",
+ "show-examples-import-dialog": "Afficher la boîte de dialogue d'importation d'exemples",
+ "search": "Rechercher",
+ "search-previous": "Recherche précédente",
+ "search-next": "Recherche suivante",
+ "show-action-list": "Afficher la liste d'actions",
+ "confirm-edit-tray": "Confirmer la modification",
+ "cancel-edit-tray": "Annuler la modification",
+ "show-remote-diff": "Afficher les différences avec les modifications distantes",
+ "deploy-flows": "Déployer des flux",
+ "restart-flows": "Redémarrer les flux",
+ "set-deploy-type-to-full": "Définir le déploiement sur 'tout'",
+ "set-deploy-type-to-modified-flows": "Définir le déploiement sur 'flux modifiés'",
+ "set-deploy-type-to-modified-nodes": "Définir le déploiement sur 'noeuds modifiés'",
+ "show-debug-tab": "Afficher l'onglet de débogage",
+ "clear-debug-messages": "Supprimer les messages de débogage",
+ "clear-filtered-debug-messages": "Supprimer les messages de débogage filtrés",
+ "activate-selected-debug-nodes": "Activer les noeuds de débogage sélectionnés",
+ "activate-all-debug-nodes": "Activer tous les noeuds de débogage",
+ "activate-all-flow-debug-nodes": "Activer tous les noeuds de débogage dans un flux",
+ "deactivate-selected-debug-nodes": "Désactiver les noeuds de débogage sélectionnés",
+ "deactivate-all-debug-nodes": "Désactiver tous les noeuds de débogage",
+ "deactivate-all-flow-debug-nodes": "Désactiver tous les noeuds de débogage dans un flux",
+ "zoom-in": "Zoomer",
+ "zoom-out": "Dézoomer",
+ "zoom-reset": "Réinitialiser le zoom",
+ "toggle-navigator": "Basculer l'affichage du navigateur",
+ "show-system-info": "Afficher les informations système",
+ "split-wires-with-junctions": "Diviser les fils avec des jonctions",
+ "new-project": "Nouveau projet",
+ "open-project": "Ouvrir le projet",
+ "show-project-settings": "Afficher les paramètres du projet",
+ "show-version-control-tab": "Afficher l'onglet de contrôle de version",
+ "start-flows": "Démarrer les flux",
+ "stop-flows": "Arrêter les flux",
+ "copy-item-url": "Copier l'URL de l'élément",
+ "copy-item-edit-url": "Copier l'URL de modification de l'élément",
+ "move-flow-to-start": "Déplacer le flux jusqu'au début",
+ "move-flow-to-end": "Déplacer le flux jusqu'à la fin",
+ "show-global-env": "Afficher les variables d'environnement globales",
+ "lock-flow": "Verrouiller le flux",
+ "unlock-flow": "Déverrouiller le flux",
+ "show-node-help": "Afficher l'aide du noeud"
}
}
diff --git a/packages/node_modules/@node-red/editor-client/locales/fr/jsonata.json b/packages/node_modules/@node-red/editor-client/locales/fr/jsonata.json
index ea7aff815..fca57953a 100644
--- a/packages/node_modules/@node-red/editor-client/locales/fr/jsonata.json
+++ b/packages/node_modules/@node-red/editor-client/locales/fr/jsonata.json
@@ -270,5 +270,9 @@
"$moment": {
"args": "[str]",
"desc": "Obtient un objet de date à l'aide de la bibliothèque Moment."
+ },
+ "$clone": {
+ "args": "valeur",
+ "desc": "Cloner un objet en toute sécurité."
}
}
diff --git a/packages/node_modules/@node-red/editor-client/locales/ja/editor.json b/packages/node_modules/@node-red/editor-client/locales/ja/editor.json
index 42257f6b0..ad0ddb4ce 100644
--- a/packages/node_modules/@node-red/editor-client/locales/ja/editor.json
+++ b/packages/node_modules/@node-red/editor-client/locales/ja/editor.json
@@ -122,7 +122,6 @@
"selectionToSubflow": "選択部分をサブフロー化",
"flows": "フロー",
"add": "フローを新規追加",
- "rename": "フロー名を変更",
"delete": "フローを削除",
"keyboardShortcuts": "ショートカットキーの説明",
"login": "ログイン",
@@ -130,6 +129,11 @@
"editPalette": "パレットの管理",
"other": "その他",
"showTips": "ヒントを表示",
+ "showNodeHelp": "ノードのヘルプを表示",
+ "enableSelectedNodes": "選択したノードを有効化",
+ "disableSelectedNodes": "選択したノードを無効化",
+ "showSelectedNodeLabels": "選択したノードのラベル表示",
+ "hideSelectedNodeLabels": "選択したノードのラベル非表示",
"showWelcomeTours": "新バージョンのガイドツアーを表示",
"help": "Node-REDウェブサイト",
"projects": "プロジェクト",
@@ -299,7 +303,8 @@
"missingType": "不正なフロー - __index__ 番目の要素に'type'プロパティがありません"
},
"conflictNotification1": "読み込もうとしているノードのいくつかは、既にワークスペース内に存在しています。",
- "conflictNotification2": "読み込むノードを選択し、また既存のノードを置き換えるか、もしくはそれらのコピーを読み込むかも選択してください。"
+ "conflictNotification2": "読み込むノードを選択し、また既存のノードを置き換えるか、もしくはそれらのコピーを読み込むかも選択してください。",
+ "alreadyExists": "本ノードは既に存在"
},
"copyMessagePath": "パスをコピーしました",
"copyMessageValue": "値をコピーしました",
@@ -511,7 +516,7 @@
"selectAllConnected": "接続されたノードを選択",
"addRemoveNode": "ノードの選択、選択解除",
"editSelected": "選択したノードを編集",
- "deleteSelected": "選択したノードや接続を削除",
+ "deleteSelected": "選択部分を削除",
"deleteReconnect": "削除と再接続",
"importNode": "フローの読み込み",
"exportNode": "フローの書き出し",
@@ -919,7 +924,14 @@
"date": "日時",
"jsonata": "JSONata式",
"env": "環境変数",
- "cred": "認証情報"
+ "cred": "認証情報",
+ "conf-types": "設定ノード"
+ },
+ "date": {
+ "format": {
+ "timestamp": "エポックからの経過ミリ秒",
+ "object": "JavaScript日付オブジェクト"
+ }
}
},
"editableList": {
@@ -1201,23 +1213,11 @@
"diagnostics": {
"title": "システム情報"
},
- "languages": {
- "de": "ドイツ語",
- "en-US": "英語",
- "fr": "フランス語",
- "ja": "日本語",
- "ko": "韓国語",
- "pt-BR": "ポルトガル語",
- "ru": "ロシア語",
- "zh-CN": "中国語(簡体)",
- "zh-TW": "中国語(繁体)"
- },
"validator": {
"errors": {
"invalid-json": "JSONデータが不正: __error__",
- "invalid-json-prop": "__prop__: JSONデータが不正: __error__",
+ "invalid-expr": "不正なJSONata式: __error__",
"invalid-prop": "プロパティ式が不正",
- "invalid-prop-prop": "__prop__: プロパティ式が不正",
"invalid-num": "数値が不正",
"invalid-num-prop": "__prop__: 数値が不正",
"invalid-regexp": "入力パターンが不正",
@@ -1229,6 +1229,7 @@
}
},
"contextMenu": {
+ "showActionList": "動作一覧を表示",
"insert": "挿入",
"node": "ノード",
"junction": "分岐点",
@@ -1236,7 +1237,7 @@
},
"env-var": {
"environment": "環境変数",
- "header": "大域環境変数",
+ "header": "グローバル環境変数",
"revert": "破棄"
},
"action-list": {
@@ -1388,7 +1389,7 @@
"copy-item-edit-url": "要素の編集URLをコピー",
"move-flow-to-start": "フローを先頭に移動",
"move-flow-to-end": "フローを末尾に移動",
- "show-global-env": "大域環境変数を表示",
+ "show-global-env": "グローバル環境変数を表示",
"lock-flow": "フローを固定",
"unlock-flow": "フローの固定を解除",
"show-node-help": "ノードのヘルプを表示"
diff --git a/packages/node_modules/@node-red/editor-client/locales/ko/editor.json b/packages/node_modules/@node-red/editor-client/locales/ko/editor.json
index ad4f4354f..4de2cb5d2 100644
--- a/packages/node_modules/@node-red/editor-client/locales/ko/editor.json
+++ b/packages/node_modules/@node-red/editor-client/locales/ko/editor.json
@@ -79,7 +79,6 @@
"selectionToSubflow": "서브 플로우 선택",
"flows": "플로우",
"add": "추가",
- "rename": "이름변경",
"delete": "삭제",
"keyboardShortcuts": "단축키",
"login": "로그인",
diff --git a/packages/node_modules/@node-red/editor-client/locales/pt-BR/editor.json b/packages/node_modules/@node-red/editor-client/locales/pt-BR/editor.json
index 6e20bc32d..fe7ca27ba 100644
--- a/packages/node_modules/@node-red/editor-client/locales/pt-BR/editor.json
+++ b/packages/node_modules/@node-red/editor-client/locales/pt-BR/editor.json
@@ -109,7 +109,6 @@
"selectionToSubflow": "Seleção para subfluxo",
"flows": "Fluxos",
"add": "Adicionar",
- "rename": "Renomear",
"delete": "Apagar",
"keyboardShortcuts": "Atalhos do teclado",
"login": "Ingressar",
@@ -1173,22 +1172,10 @@
"diagnostics": {
"title": "informações do Sistema"
},
- "languages": {
- "de": "Alemão",
- "en-US": "Inglês",
- "ja": "Japonês",
- "ko": "Coreano",
- "pt-BR": "Português(Brasil)",
- "ru": "Russo",
- "zh-CN": "Chinês(Simplificado)",
- "zh-TW": "Chinês(Tradicional)"
- },
"validator": {
"errors": {
"invalid-json": "Dados JSON inválidos: __error__",
- "invalid-json-prop": "__prop__: dados JSON inválidos: __error__",
"invalid-prop": "Expressão de propriedade inválida",
- "invalid-prop-prop": "__prop__: expressão de propriedade inválida",
"invalid-num": "Número inválido",
"invalid-num-prop": "__prop__: número inválido",
"invalid-regexp": "Padrão de entrada inválido",
diff --git a/packages/node_modules/@node-red/editor-client/locales/ru/editor.json b/packages/node_modules/@node-red/editor-client/locales/ru/editor.json
index 8cfea1bde..326fbe55f 100644
--- a/packages/node_modules/@node-red/editor-client/locales/ru/editor.json
+++ b/packages/node_modules/@node-red/editor-client/locales/ru/editor.json
@@ -95,7 +95,6 @@
"selectionToSubflow": "Выделение в подпоток",
"flows": "Потоки",
"add": "Добавить",
- "rename": "Переименовать",
"delete": "Удалить",
"keyboardShortcuts": "Сочетания клавиш",
"login": "Войти",
@@ -1129,16 +1128,5 @@
"appearance": "Внешний вид",
"preview": "Предпросмотр редактора",
"defaultValue": "Значение по умолчанию"
- },
- "languages" : {
- "de": "Немецкий",
- "en-US": "Английский",
- "fr": "Французский",
- "ja": "Японский",
- "ko": "Корейский",
- "pt-BR":"португальский",
- "ru": "Русский",
- "zh-CN": "Китайский (упрощенный)",
- "zh-TW": "Китайский (традиционный)"
}
}
diff --git a/packages/node_modules/@node-red/editor-client/locales/zh-CN/editor.json b/packages/node_modules/@node-red/editor-client/locales/zh-CN/editor.json
index e55240cc5..15d126e75 100644
--- a/packages/node_modules/@node-red/editor-client/locales/zh-CN/editor.json
+++ b/packages/node_modules/@node-red/editor-client/locales/zh-CN/editor.json
@@ -23,7 +23,11 @@
"position": "位置",
"enable": "启用",
"disable": "禁用",
- "upload": "上传"
+ "upload": "上传",
+ "lock": "锁定",
+ "unlock": "解锁",
+ "locked": "锁定",
+ "unlocked": "解锁"
},
"type": {
"string": "字符串",
@@ -68,7 +72,13 @@
"enabled": "有效",
"disabled": "无效",
"info": "详细描述",
- "selectNodes": "点击节点来选择"
+ "selectNodes": "点击节点来选择",
+ "enableFlow": "启用流程",
+ "disableFlow": "禁用流程",
+ "lockFlow": "锁定流程",
+ "unlockFlow": "解除锁定",
+ "moveToStart": "移动到起始",
+ "moveToEnd": "移动到末尾"
},
"menu": {
"label": {
@@ -101,6 +111,7 @@
"displayStatus": "显示节点状态",
"displayConfig": "修改节点配置",
"import": "导入",
+ "importExample": "导入示例流程",
"export": "导出",
"search": "查找流程",
"searchInput": "查找流程",
@@ -109,7 +120,6 @@
"selectionToSubflow": "将选择部分更改为子流程",
"flows": "流程",
"add": "增加",
- "rename": "重命名",
"delete": "删除",
"keyboardShortcuts": "键盘快捷方式",
"login": "登录",
@@ -142,7 +152,12 @@
"moveToBack": "置于底层",
"moveToFront": "置于顶层",
"moveBackwards": "向后移动",
- "moveForwards": "向前移动"
+ "moveForwards": "向前移动",
+ "showNodeHelp":"显示节点帮助",
+ "enableSelectedNodes":"启用当前选中节点",
+ "disableSelectedNodes":"禁用当前选中节点",
+ "showSelectedNodeLabels":"显示选中的节点标签",
+ "hideSelectedNodeLabels":"隐藏选中的节点标签"
}
},
"actions": {
@@ -403,6 +418,7 @@
},
"errors": {
"noNodesSelected": "无法创建子流程 : 未选择节点",
+ "acrossMultipleGroups": "无法跨多个组创建子流",
"multipleInputsToSelection": "无法创建子流程 : 多个输入到了选择"
}
},
@@ -491,12 +507,14 @@
"unassigned": "未分配",
"global": "全局",
"workspace": "工作区",
+ "editor": "编辑对话框",
"selectAll": "选择所有节点",
"selectNone": "取消所有选择",
"selectAllConnected": "选择所有连接的节点",
"addRemoveNode": "从选择中添加/删除节点",
"editSelected": "编辑选定节点",
"deleteSelected": "删除选定节点或链接",
+ "deleteReconnect": "删除并重新连接",
"importNode": "导入节点",
"exportNode": "导出节点",
"nudgeNode": "移动所选节点(1px)",
@@ -571,6 +589,7 @@
"editor": {
"title": "面板管理",
"palette": "控制板",
+ "allCatalogs": "所有目录",
"times": {
"seconds": "秒前",
"minutes": "分前",
@@ -610,6 +629,7 @@
"tab-nodes": "节点",
"tab-install": "安装",
"sort": "排序:",
+ "sortRelevance": "关联",
"sortAZ": "a-z顺序",
"sortRecent": "日期顺序",
"more": "增加 __count__ 个",
@@ -683,7 +703,11 @@
"empty": "空的",
"globalConfig": "全局配置节点",
"triggerAction": "触发动作",
- "find": "在工作区中查找"
+ "find": "在工作区中查找",
+ "copyItemUrl": "复制地址",
+ "copyURL2Clipboard": "复制地址到剪贴板",
+ "showFlow": "显示流程",
+ "hideFlow": "隐藏流程"
},
"help": {
"name": "帮助",
@@ -984,7 +1008,10 @@
"quote": "引用",
"link": "链接",
"horizontal-rule": "水平线",
- "toggle-preview": "切换预览"
+ "toggle-preview": "切换预览",
+ "mermaid": {
+ "summary": "美人鱼图"
+ }
},
"bufferEditor": {
"title": "Buffer 编辑器",
@@ -1147,17 +1174,6 @@
"create": "创建分支",
"current": "当前的"
},
- "languages": {
- "de": "德语",
- "en-US": "英文",
- "fr": "法语",
- "ja": "日语",
- "ko": "韩文",
- "pt-BR":"葡萄牙语",
- "ru":"俄語",
- "zh-CN": "简体中文",
- "zh-TW": "繁体中文"
- },
"create-default-file-set": {
"no-active": "没有活动项目就无法创建默认文件集",
"no-empty": "无法在非空项目上创建默认文件集",
@@ -1187,21 +1203,11 @@
"diagnostics": {
"title": "系统信息"
},
- "languages": {
- "de": "德语-Deutsch",
- "en-US": "英文-English",
- "ja": "日语-日本",
- "ko": "韩文-한국인",
- "ru": "俄语-Русский",
- "zh-CN": "简体中文",
- "zh-TW": "繁體中文"
- },
"validator": {
"errors": {
"invalid-json": "无效的 JSON 数据: __error__",
- "invalid-json-prop": "__prop__: 无效的 JSON 数据: __error__",
+ "invalid-expr": "无效的 JSONata 表达式: __error__",
"invalid-prop": "无效的属性表达式",
- "invalid-prop-prop": "__prop__: 无效的属性表达式",
"invalid-num": "无效的数字",
"invalid-num-prop": "__prop__: 无效的数字",
"invalid-regexp": "输入格式无效",
@@ -1213,9 +1219,15 @@
}
},
"contextMenu": {
+ "showActionList":"显示动作列表",
"insert": "插入",
"node": "节点",
"junction": "连接点",
"linkNodes": "链接节点"
+ },
+ "env-var": {
+ "environment": "环境配置",
+ "header": "全局环境变量",
+ "revert": "重置"
}
}
diff --git a/packages/node_modules/@node-red/editor-client/locales/zh-CN/jsonata.json b/packages/node_modules/@node-red/editor-client/locales/zh-CN/jsonata.json
index db4be6d10..cf71ebc77 100644
--- a/packages/node_modules/@node-red/editor-client/locales/zh-CN/jsonata.json
+++ b/packages/node_modules/@node-red/editor-client/locales/zh-CN/jsonata.json
@@ -270,5 +270,9 @@
"$moment": {
"args": "[str]",
"desc": "使用Moment库获取日期对象。"
+ },
+ "$clone": {
+ "args": "value",
+ "desc": "安全克隆对象."
}
}
diff --git a/packages/node_modules/@node-red/editor-client/locales/zh-TW/editor.json b/packages/node_modules/@node-red/editor-client/locales/zh-TW/editor.json
index 3646f0c9e..808f83c19 100644
--- a/packages/node_modules/@node-red/editor-client/locales/zh-TW/editor.json
+++ b/packages/node_modules/@node-red/editor-client/locales/zh-TW/editor.json
@@ -23,7 +23,11 @@
"position": "位置",
"enable": "啟用",
"disable": "禁用",
- "upload": "上傳"
+ "upload": "上傳",
+ "lock": "鎖定",
+ "unlock": "解鎖",
+ "locked": "鎖定",
+ "unlocked": "解鎖"
},
"type": {
"string": "字符串",
@@ -38,11 +42,14 @@
}
},
"event": {
+ "loadPlugins": "加載插件",
"loadPalette": "加載控制板",
"loadNodeCatalogs": "加載節點目錄",
"loadNodes": "加載 __count__ 個節點",
"loadFlows": "加載流程",
- "importFlows": "往工作區中加載流程"
+ "importFlows": "往工作區中加載流程",
+ "importError": "加載流程錯誤
__message__
",
+ "loadingProject": "加載項目"
},
"workspace": {
"defaultName": "流程__number__",
@@ -51,18 +58,35 @@
"delete": "確定想要刪除 '__label__'?",
"dropFlowHere": "把流程放到這裡",
"addFlow": "新增流程",
- "listFlows": "流程列表",
+ "addFlowToRight": "在右側新增流程",
+ "hideFlow": "隱藏流程",
+ "hideOtherFlows": "隱藏其它流程",
+ "showAllFlows": "顯示所有流程",
+ "hideAllFlows": "隱藏所有流程",
+ "hiddenFlows": "列出 __count__ 個隱藏流程",
+ "hiddenFlows_plural": "列出 __count__ 個隱藏流程",
+ "showLastHiddenFlow": "顯示最後一個隱藏流程",
+ " ": "流程列表",
+ "listSubflows": "列出子流程",
"status": "狀態",
"enabled": "有效",
"disabled": "無效",
"info": "詳細描述",
- "selectNodes": "點擊節點用於選擇"
+ "selectNodes": "點擊節點用於選擇",
+ "enableFlow": "啟用流程",
+ "disableFlow": "禁用流程",
+ "lockFlow": "鎖定流程",
+ "unlockFlow": "解除鎖定",
+ "moveToStart": "移動到起始",
+ "moveToEnd": "移動到末尾"
},
"menu": {
"label": {
"view": {
"view": "顯示",
"grid": "格線",
+ "storeZoom": "加載時還原縮放尺寸",
+ "storePosition": "加載時還原滾動位置",
"showGrid": "顯示格線",
"snapGrid": "對齊格線",
"gridSize": "格線尺寸",
@@ -80,12 +104,14 @@
"palette": {
"show": "顯示控制板"
},
+ "edit": "編輯",
"settings": "設置",
"userSettings": "使用者設置",
"nodes": "節點",
"displayStatus": "顯示節點狀態",
"displayConfig": "修改節點配置",
"import": "匯入",
+ "importExample": "導入示例流程",
"export": "匯出",
"search": "搜尋流程",
"searchInput": "搜尋流程",
@@ -94,7 +120,6 @@
"selectionToSubflow": "將選擇部分更改為子流程",
"flows": "流程",
"add": "增加",
- "rename": "重新命名",
"delete": "刪除",
"keyboardShortcuts": "鍵盤快速鍵",
"login": "登入",
@@ -102,24 +127,48 @@
"editPalette": "節點管理",
"other": "其他",
"showTips": "顯示小提示",
- "help": "Node-RED website",
+ "showWelcomeTours": "顯示新版本向導",
+ "help": "Node-RED 文檔主頁",
"projects": "專案",
"projects-new": "新專案",
"projects-open": "開啟專案",
"projects-settings": "專案設定",
"showNodeLabelDefault": "顯示新添加節點的標籤",
+ "codeEditor": "代碼編輯器",
"groups": "組",
"groupSelection": "選擇組",
"ungroupSelection": "取消選擇組",
"groupMergeSelection": "合并選擇",
- "groupRemoveSelection": "從組中移除"
+ "groupRemoveSelection": "從組中移除",
+ "arrange": "布局",
+ "alignLeft": "左對齊",
+ "alignCenter": "居中對齊",
+ "alignRight": "右對齊",
+ "alignTop": "頂部對齊",
+ "alignMiddle": "垂直居中對齊",
+ "alignBottom": "底部對齊",
+ "distributeHorizontally": "横向分布",
+ "distributeVertically": "垂直分布",
+ "moveToBack": "置於底層",
+ "moveToFront": "置於頂層",
+ "moveBackwards": "向後移動",
+ "moveForwards": "向前移動",
+ "showNodeHelp":"顯示節點幫助",
+ "enableSelectedNodes":"啟用當前選中節點",
+ "disableSelectedNodes":"禁用當前選中節點",
+ "showSelectedNodeLabels":"顯示選中的節點標簽",
+ "hideSelectedNodeLabels":"隱藏選中的節點標簽"
}
},
"actions": {
"toggle-navigator": "切換導航器",
"zoom-out": "縮小",
"zoom-reset": "重置縮放",
- "zoom-in": "放大"
+ "zoom-in": "放大",
+ "search-flows": "搜索流程",
+ "search-prev": "上一個",
+ "search-next": "下一個",
+ "search-counter": "\"__term__\" __result__ of __count__"
},
"user": {
"loggedInAs": "作為 __name__ 登入",
@@ -135,12 +184,17 @@
}
},
"notification": {
+ "state": {
+ "flowsStopped": "流程已停止",
+ "flowsStarted": "流程已啟動"
+ },
"warning": "警告 : __message__",
"warnings": {
"undeployedChanges": "節點中存在未部署的更改",
"nodeActionDisabled": "節點動作在子流程中被禁用",
"nodeActionDisabledSubflow": "子流程中禁用了節點操作",
"missing-types": "流程由於缺少節點類型而停止。請檢查日誌的詳細資訊",
+ "missing-modules": "流程因缺少模塊而停止。
",
"safe-mode": "流程在安全模式下停止。
您可以修改流程並部署更改以重新啟動。
",
"restartRequired": "Node-RED必須重新啟動,以啟用升級的模組",
"credentials_load_failed": "流程由於無法解密證書而停止。
流程證書文件已加密,但是項目的加密密鑰丟失或無效。
",
@@ -151,7 +205,7 @@
"project_not_found": "找不到項目的'__project__'
",
"git_merge_conflict": "自動合併更改失敗。
修復未合併的衝突,然後提交結果。
"
},
- "error": "Error : __message__",
+ "error": "錯誤 : __message__",
"errors": {
"lostConnection": "丟失與伺服器的連接,重新連接...",
"lostConnectionReconnect": "丟失與伺服器的連接,__time__ 秒後重新連接",
@@ -208,6 +262,8 @@
"download": "下載",
"importUnrecognised": "匯入了無法識別的類型:",
"importUnrecognised_plural": "匯入了無法識別的類型:",
+ "importDuplicate": "導入了重復節點:",
+ "importDuplicate_plural": "導入了重復節點:",
"nodesExported": "節點匯出到了剪貼簿",
"nodesImported": "已匯入:",
"nodeCopied": "已複製 __count__ 個節點",
@@ -259,6 +315,10 @@
"modifiedFlowsDesc": "只部署包含已更改節點的流程",
"modifiedNodes": "已更改的節點",
"modifiedNodesDesc": "只部署已經更改的節點",
+ "startFlows": "啟動",
+ "startFlowsDesc": "啟動流程",
+ "stopFlows": "停止",
+ "stopFlowsDesc": "停止流程",
"restartFlows": "重新啟動流程",
"restartFlowsDesc": "重新啟動當前部署的流程",
"successfulDeploy": "部署成功",
@@ -337,14 +397,28 @@
"output": "輸出:",
"status": "狀態節點",
"deleteSubflow": "刪除子流程",
+ "confirmDelete": "您確定要刪除此子流程?",
"info": "詳細描述",
"category": "類別",
+ "module": "模塊",
+ "license": "許可",
+ "licenseNone": "無",
+ "licenseOther": "其它",
+ "type": "節點類型",
+ "version": "版本",
+ "versionPlaceholder": "x.y.z",
+ "keys": "關鍵字",
+ "keysPlaceholder": "使用英文逗號分隔關鍵字",
+ "author": "作者",
+ "authorPlaceholder": "名字 ",
+ "desc": "描述",
"env": {
"restore": "恢復為默認子流程",
"remove": "類別刪除環境變量"
},
"errors": {
"noNodesSelected": "無法創建子流程 : 未選擇節點",
+ "acrossMultipleGroups": "無法跨多個組創建子流",
"multipleInputsToSelection": "無法創建子流程 : 多個輸入到了選擇"
}
},
@@ -367,12 +441,12 @@
"editConfig": "編輯 __type__ 配置",
"addNewType": "添加新的 __type__ 節點",
"nodeProperties": "節點屬性",
- "label": "Label",
+ "label": "標簽",
"color": "顏色",
"portLabels": "埠標籤",
"labelInputs": "輸入",
"labelOutputs": "輸出",
- "settingIcon": "Icon",
+ "settingIcon": "圖標",
"default": "默認",
"noDefaultLabel": "無",
"defaultLabel": "使用默認標籤",
@@ -385,6 +459,7 @@
"icon": "圖標",
"inputType": "輸入類型",
"selectType": "選擇類型...",
+ "loadCredentials": "加載節點憑證",
"inputs": {
"input": "輸入",
"select": "選擇",
@@ -419,7 +494,8 @@
},
"errors": {
"scopeChange": "更改範圍將使其他流程中的節點無法使用",
- "invalidProperties": "無效的屬性:"
+ "invalidProperties": "無效的屬性:",
+ "credentialLoadFailed": "無法加載節點憑據"
}
},
"keyboard": {
@@ -431,11 +507,14 @@
"unassigned": "未分配",
"global": "全局",
"workspace": "工作區",
+ "editor": "編輯對話框",
"selectAll": "選擇所有節點",
+ "selectNone": "取消所有選擇",
"selectAllConnected": "選擇所有連接的節點",
"addRemoveNode": "從選擇中添加/刪除節點",
"editSelected": "編輯選定節點",
"deleteSelected": "刪除選定節點或連結",
+ "deleteReconnect": "刪除並重新連接",
"importNode": "匯入節點",
"exportNode": "匯出節點",
"nudgeNode": "移動所選節點(1px)",
@@ -445,10 +524,14 @@
"copyNode": "複製所選節點",
"cutNode": "剪切所選節點",
"pasteNode": "粘貼節點",
+ "copyGroupStyle": "復製組樣式",
+ "pasteGroupStyle": "粘貼組樣式",
"undoChange": "撤銷上次執行的更改",
+ "redoChange": "重做",
"searchBox": "打開搜尋框",
"managePalette": "管理面板",
- "actionList": "動作列表"
+ "actionList": "動作列表",
+ "splitWireWithLinks": "使用Link節點拆分已選項"
},
"library": {
"library": "庫",
@@ -466,12 +549,11 @@
"types": {
"local": "本地",
"examples": "例子"
- },
- "exportToLibrary": "將節點匯出到庫"
+ }
},
"palette": {
"noInfo": "無可用資訊",
- "filter": "過濾節點",
+ "filter": "過濾已安裝模組",
"search": "搜尋模組",
"addCategory": "添加新的...",
"label": {
@@ -501,11 +583,13 @@
"nodeEnabled_plural": "啟用多個節點:",
"nodeDisabled": "禁用節點:",
"nodeDisabled_plural": "禁用多個節點:",
- "nodeUpgraded": "節點模組__module__升級到__version__版本"
+ "nodeUpgraded": "節點模組__module__升級到__version__版本",
+ "unknownNodeRegistered": "加載節點錯誤: "
},
"editor": {
"title": "面板管理",
- "palette": "Palette",
+ "palette": "控製板",
+ "allCatalogs": "所有目錄",
"times": {
"seconds": "秒前",
"minutes": "分前",
@@ -545,10 +629,12 @@
"tab-nodes": "節點",
"tab-install": "安裝",
"sort": "排序:",
+ "sortRelevance": "關聯",
"sortAZ": "a-z順序",
"sortRecent": "日期順序",
"more": "增加 __count__ 個",
"upload": "上傳模塊tgz文件",
+ "refresh": "更新模塊列表",
"errors": {
"catalogLoadFailed": "無法載入節點目錄。 查看瀏覽器控制臺瞭解更多資訊",
"installFailed": "無法安裝: __module__ __message__ 查看日誌瞭解更多資訊",
@@ -617,7 +703,11 @@
"empty": "空的",
"globalConfig": "全局配置節點",
"triggerAction": "觸發動作",
- "find": "在工作區中查找"
+ "find": "在工作區中查找",
+ "copyItemUrl": "復製地址",
+ "copyURL2Clipboard": "復製地址到剪貼板",
+ "showFlow": "顯示流程",
+ "hideFlow": "隱藏流程"
},
"help": {
"name": "幫助",
@@ -627,7 +717,8 @@
"showHelp": "顯示幫助",
"showInOutline": "在大綱中顯示",
"showTopics": "顯示主題",
- "noHelp": "未選擇幫助主題"
+ "noHelp": "未選擇幫助主題",
+ "changeLog": "更新日誌"
},
"config": {
"name": "配置節點",
@@ -828,31 +919,37 @@
"json": "JSON",
"bin": "二進位流",
"date": "時間戳記",
- "jsonata": "expression",
- "env": "env variable",
+ "jsonata": "表達式",
+ "env": "環境變量",
"cred": "證書"
}
},
"editableList": {
- "add": "添加"
+ "add": "添加",
+ "addTitle": "添加項"
},
"search": {
- "empty": "找不到匹配",
+ "history": "搜索歷史",
+ "clear": "清除所有",
+ "empty": "找不到匹配項",
"addNode": "添加一個節點...",
"options": {
"configNodes": "配置節點",
"unusedConfigNodes": "未使用的配置節點",
"invalidNodes": "無效的節點",
"uknownNodes": "未知的節點",
- "unusedSubflows": "未使用的子流程"
+ "unusedSubflows": "未使用的子流程",
+ "hiddenFlows": "隱藏的流程",
+ "modifiedNodes": "已修改的節點或流程",
+ "thisFlow": "當前流程"
}
},
"expressionEditor": {
"functions": "功能",
- "functionReference": "Function reference",
+ "functionReference": "功能參考",
"insert": "插入",
"title": "JSONata運算式編輯器",
- "test": "Test",
+ "test": "測試",
"data": "示例消息",
"result": "結果",
"format": "格式表達方法",
@@ -863,20 +960,28 @@
"invalid-expr": "無效的JSONata運算式:\n __message__",
"invalid-msg": "無效的示例JSON消息:\n __message__",
"context-unsupported": "無法測試上下文函數\n $flowContext 或 $globalContext",
+ "env-unsupported": "無法測試 $env 函數",
+ "moment-unsupported": "無法測試 $moment 函數",
+ "clone-unsupported": "無法測試 $clone 函數",
"eval": "評估運算式錯誤:\n __message__"
}
},
+ "monaco": {
+ "setTheme": "設置主題"
+ },
"jsEditor": {
"title": "JavaScript 編輯器"
},
"textEditor": {
- "title": "Text 編輯器"
+ "title": "文本編輯器"
},
"jsonEditor": {
"title": "JSON編輯器",
"format": "格式化JSON",
"rawMode": "編輯 JSON",
- "uiMode": "Visual編輯器",
+ "uiMode": "可視化編輯器",
+ "rawMode-readonly": "原始JSON",
+ "uiMode-readonly": "可視化",
"insertAbove": "在上方插入",
"insertBelow": "在下方插入",
"addItem": "添加項目",
@@ -892,9 +997,9 @@
"title": "Markdown 編輯器",
"expand": "展開",
"format": "F使用markdown格式化",
- "heading1": "Heading 1",
- "heading2": "Heading 2",
- "heading3": "Heading 3",
+ "heading1": "標題 1",
+ "heading2": "標題 2",
+ "heading3": "標題 3",
"bold": "粗體",
"italic": "斜體",
"code": "程式碼",
@@ -903,7 +1008,10 @@
"quote": "引用",
"link": "連結",
"horizontal-rule": "分隔線",
- "toggle-preview": "預覽"
+ "toggle-preview": "切換預覽",
+ "mermaid": {
+ "summary": "美人魚圖"
+ }
},
"bufferEditor": {
"title": "緩衝區編輯器",
@@ -1038,7 +1146,8 @@
"not-git": "不是git倉庫",
"no-resource": "找不到存儲庫",
"cant-get-ssh-key-path": "錯誤! 無法獲取所選的SSH密鑰路徑。",
- "unexpected_error": "意外的錯誤"
+ "unexpected_error": "意外的錯誤",
+ "clearContext": "更改項目時清除上下文"
},
"delete": {
"confirm": "您確定要刪除此項目嗎?"
@@ -1068,7 +1177,7 @@
"create-default-file-set": {
"no-active": "沒有活動項目就無法創建默認文件集",
"no-empty": "無法在非空項目上創建默認文件集",
- "git-error": "git error"
+ "git-error": "git錯誤"
},
"errors": {
"no-username-email": "您的Git客戶端未配置用戶名/電子郵件。",
@@ -1079,21 +1188,45 @@
"editor-tab": {
"properties": "屬性",
"envProperties": "環境變量",
+ "module": "模塊屬性",
"description": "描述",
"appearance": "外觀",
"preview": "UI預覽",
- "defaultValue": "默認值",
- "env": "環境變量"
+ "defaultValue": "默認值"
},
- "languages": {
- "de": "德語",
- "en-US": "英語",
- "fr": "法語",
- "ja": "日語",
- "ko": "韓語",
- "pt-BR":"葡萄牙语",
- "ru":"俄語",
- "zh-CN": "簡體中文",
- "zh-TW": "繁體中文"
+ "tourGuide": {
+ "takeATour": "查看更新內容",
+ "start": "開始",
+ "next": "下一個",
+ "welcomeTours": "歡迎使用 Node-RED"
+ },
+ "diagnostics": {
+ "title": "系统信息"
+ },
+ "validator": {
+ "errors": {
+ "invalid-json": "無效的 JSON 數據: __error__",
+ "invalid-expr": "無效的 JSONata 表達式: __error__",
+ "invalid-prop": "無效的屬性表達式",
+ "invalid-num": "無效的數字",
+ "invalid-regexp": "輸入格式無效",
+ "invalid-regex-prop": "__prop__: 輸入格式無效",
+ "missing-required-prop": "__prop__: 缺少屬性值",
+ "invalid-config": "__prop__: 無效的配置節點",
+ "missing-config": "__prop__: 缺少配置節點",
+ "validation-error": "__prop__: 驗證錯誤: __node__, __id__: __error__"
+ }
+ },
+ "contextMenu": {
+ "showActionList":"顯示動作列表",
+ "insert": "插入",
+ "node": "節點",
+ "junction": "連接點",
+ "linkNodes": "鏈接節點"
+ },
+ "env-var": {
+ "environment": "環境配置",
+ "header": "全局環境變量",
+ "revert": "重置"
}
}
diff --git a/packages/node_modules/@node-red/editor-client/locales/zh-TW/jsonata.json b/packages/node_modules/@node-red/editor-client/locales/zh-TW/jsonata.json
index 29d3b7ed1..2fc36bd27 100644
--- a/packages/node_modules/@node-red/editor-client/locales/zh-TW/jsonata.json
+++ b/packages/node_modules/@node-red/editor-client/locales/zh-TW/jsonata.json
@@ -270,5 +270,9 @@
"$moment": {
"args": "[str]",
"desc": "使用Moment庫獲取日期對象。"
+ },
+ "$clone": {
+ "args": "value",
+ "desc": "安全克隆對象."
}
}
diff --git a/packages/node_modules/@node-red/editor-client/package.json b/packages/node_modules/@node-red/editor-client/package.json
index 937c7d745..c6d49fced 100644
--- a/packages/node_modules/@node-red/editor-client/package.json
+++ b/packages/node_modules/@node-red/editor-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@node-red/editor-client",
- "version": "4.0.0-dev",
+ "version": "4.0.0-beta.1",
"license": "Apache-2.0",
"repository": {
"type": "git",
diff --git a/packages/node_modules/@node-red/editor-client/src/js/events.js b/packages/node_modules/@node-red/editor-client/src/js/events.js
index bd2abd8d0..943854393 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/events.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/events.js
@@ -39,15 +39,16 @@
console.warn(evt,args);
}
if (handlers[evt]) {
- for (var i=0;i")+" ";
- RED.notify(RED._("palette.event.nodeRemoved", {count:m.types.length})+typeList,"success");
+ pendingNodeRemovedNotifications = pendingNodeRemovedNotifications.concat(m.types.map(RED.utils.sanitize))
+ if (pendingNodeRemovedTimeout) {
+ clearTimeout(pendingNodeRemovedTimeout)
+ }
+ pendingNodeRemovedTimeout = setTimeout(function () {
+ typeList = ""+pendingNodeRemovedNotifications.join(" ")+" ";
+ RED.notify(RED._("palette.event.nodeRemoved", {count:pendingNodeRemovedNotifications.length})+typeList,"success");
+ pendingNodeRemovedNotifications = []
+ }, 200)
}
}
loadIconList();
@@ -738,7 +758,7 @@ var RED = (function() {
menuOptions.push({id:"menu-item-config-nodes",label:RED._("menu.label.displayConfig"),onselect:"core:show-config-tab"});
menuOptions.push({id:"menu-item-workspace",label:RED._("menu.label.flows"),options:[
{id:"menu-item-workspace-add",label:RED._("menu.label.add"),onselect:"core:add-flow"},
- {id:"menu-item-workspace-edit",label:RED._("menu.label.rename"),onselect:"core:edit-flow"},
+ {id:"menu-item-workspace-edit",label:RED._("menu.label.edit"),onselect:"core:edit-flow"},
{id:"menu-item-workspace-delete",label:RED._("menu.label.delete"),onselect:"core:remove-flow"}
]});
menuOptions.push({id:"menu-item-subflow",label:RED._("menu.label.subflows"), options: [
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js b/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js
index 01a993a75..690968338 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js
@@ -819,7 +819,7 @@ RED.clipboard = (function() {
flow.forEach(function(node) {
if (node.type === "tab") {
flows[node.id] = {
- element: getFlowLabel(node,false),
+ element: getFlowLabel(node),
deferBuild: type !== "flow",
expanded: type === "flow",
children: []
@@ -1000,7 +1000,6 @@ RED.clipboard = (function() {
try {
RED.view.importNodes(newNodes, importOptions);
} catch(error) {
- console.log(error.importConfig)
// Thrown for import_conflict
confirmImport(error.importConfig, newNodes, importOptions);
}
@@ -1170,9 +1169,9 @@ RED.clipboard = (function() {
function getNodeElement(n, isConflicted, isSelected, parent) {
var element;
if (n.type === "tab") {
- element = getFlowLabel(n, isSelected);
+ element = getFlowLabel(n, isConflicted);
} else {
- element = getNodeLabel(n, isConflicted, isSelected);
+ element = getNodeLabel(n, isConflicted, isSelected, parent);
}
var controls = $('',{class:"red-ui-clipboard-dialog-import-conflicts-controls"}).appendTo(element);
controls.on("click", function(evt) { evt.stopPropagation(); });
@@ -1222,14 +1221,14 @@ RED.clipboard = (function() {
}
}
- function getFlowLabel(n) {
+ function getFlowLabel(n, isConflicted) {
n = JSON.parse(JSON.stringify(n));
n._def = RED.nodes.getType(n.type) || {};
if (n._def) {
n._ = n._def._;
}
- var div = $('
',{class:"red-ui-info-outline-item red-ui-info-outline-item-flow"});
+ var div = $('
',{class:"red-ui-info-outline-item red-ui-info-outline-item-flow red-ui-node-list-item"});
var contentDiv = $('
',{class:"red-ui-search-result-description red-ui-info-outline-item-label"}).appendTo(div);
var label = (typeof n === "string")? n : n.label;
var newlineIndex = label.indexOf("\\n");
@@ -1237,11 +1236,17 @@ RED.clipboard = (function() {
label = label.substring(0,newlineIndex)+"...";
}
contentDiv.text(label);
+
+ if (!!isConflicted) {
+ const conflictIcon = $('
').appendTo(div)
+ RED.popover.tooltip(conflictIcon, RED._('clipboard.import.alreadyExists'))
+ }
+
// A conflicted flow should not be imported by default.
return div;
}
- function getNodeLabel(n, isConflicted) {
+ function getNodeLabel(n, isConflicted, isSelected, parent) {
n = JSON.parse(JSON.stringify(n));
n._def = RED.nodes.getType(n.type) || {};
if (n._def) {
@@ -1249,6 +1254,11 @@ RED.clipboard = (function() {
}
var div = $('
',{class:"red-ui-node-list-item"});
RED.utils.createNodeIcon(n,true).appendTo(div);
+
+ if (!parent && !!isConflicted) {
+ const conflictIcon = $('
').appendTo(div)
+ RED.popover.tooltip(conflictIcon, RED._('clipboard.import.alreadyExists'))
+ }
return div;
}
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js
index 8ee1f0e29..ab9c8a837 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js
@@ -174,12 +174,24 @@
this.uiContainer.width(m[1]);
}
if (this.options.sortable) {
+ var isCanceled = false; // Flag to track if an item has been canceled from being dropped into a different list
+ var noDrop = false; // Flag to track if an item is being dragged into a different list
var handle = (typeof this.options.sortable === 'string')?
this.options.sortable :
".red-ui-editableList-item-handle";
var sortOptions = {
axis: "y",
update: function( event, ui ) {
+ // dont trigger update if the item is being canceled
+ const targetList = $(event.target);
+ const draggedItem = ui.item;
+ const draggedItemParent = draggedItem.parent();
+ if (!targetList.is(draggedItemParent) && draggedItem.hasClass("red-ui-editableList-item-constrained")) {
+ noDrop = true;
+ }
+ if (isCanceled || noDrop) {
+ return;
+ }
if (that.options.sortItems) {
that.options.sortItems(that.items());
}
@@ -189,8 +201,32 @@
tolerance: "pointer",
forcePlaceholderSize:true,
placeholder: "red-ui-editabelList-item-placeholder",
- start: function(e, ui){
- ui.placeholder.height(ui.item.height()-4);
+ start: function (event, ui) {
+ isCanceled = false;
+ ui.placeholder.height(ui.item.height() - 4);
+ ui.item.css('cursor', 'grabbing'); // TODO: this doesn't seem to work, use a class instead?
+ },
+ stop: function (event, ui) {
+ ui.item.css('cursor', 'auto');
+ },
+ receive: function (event, ui) {
+ if (ui.item.hasClass("red-ui-editableList-item-constrained")) {
+ isCanceled = true;
+ $(ui.sender).sortable('cancel');
+ }
+ },
+ over: function (event, ui) {
+ // if the dragged item is constrained, prevent it from being dropped into a different list
+ const targetList = $(event.target);
+ const draggedItem = ui.item;
+ const draggedItemParent = draggedItem.parent();
+ if (!targetList.is(draggedItemParent) && draggedItem.hasClass("red-ui-editableList-item-constrained")) {
+ noDrop = true;
+ draggedItem.css('cursor', 'no-drop'); // TODO: this doesn't seem to work, use a class instead?
+ } else {
+ noDrop = false;
+ draggedItem.css('cursor', 'grabbing'); // TODO: this doesn't seem to work, use a class instead?
+ }
}
};
if (this.options.connectWith) {
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js
index 7440b464e..177c88356 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js
@@ -54,25 +54,26 @@
return icon;
}
- var autoComplete = function(options) {
- function getMatch(value, searchValue) {
- const idx = value.toLowerCase().indexOf(searchValue.toLowerCase());
- const len = idx > -1 ? searchValue.length : 0;
- return {
- index: idx,
- found: idx > -1,
- pre: value.substring(0,idx),
- match: value.substring(idx,idx+len),
- post: value.substring(idx+len),
- }
- }
- function generateSpans(match) {
- const els = [];
- if(match.pre) { els.push($('
').text(match.pre)); }
- if(match.match) { els.push($('
',{style:"font-weight: bold; color: var(--red-ui-text-color-link);"}).text(match.match)); }
- if(match.post) { els.push($('
').text(match.post)); }
- return els;
+ function getMatch(value, searchValue) {
+ const idx = value.toLowerCase().indexOf(searchValue.toLowerCase());
+ const len = idx > -1 ? searchValue.length : 0;
+ return {
+ index: idx,
+ found: idx > -1,
+ pre: value.substring(0,idx),
+ match: value.substring(idx,idx+len),
+ post: value.substring(idx+len),
}
+ }
+ function generateSpans(match) {
+ const els = [];
+ if(match.pre) { els.push($('
').text(match.pre)); }
+ if(match.match) { els.push($('
',{style:"font-weight: bold; color: var(--red-ui-text-color-link);"}).text(match.match)); }
+ if(match.post) { els.push($('
').text(match.post)); }
+ return els;
+ }
+
+ const msgAutoComplete = function(options) {
return function(val) {
var matches = [];
options.forEach(opt => {
@@ -102,6 +103,197 @@
}
}
+ function getEnvVars (obj, envVars = {}) {
+ contextKnownKeys.env = contextKnownKeys.env || {}
+ if (contextKnownKeys.env[obj.id]) {
+ return contextKnownKeys.env[obj.id]
+ }
+ let parent
+ if (obj.type === 'tab' || obj.type === 'subflow') {
+ RED.nodes.eachConfig(function (conf) {
+ if (conf.type === "global-config") {
+ parent = conf;
+ }
+ })
+ } else if (obj.g) {
+ parent = RED.nodes.group(obj.g)
+ } else if (obj.z) {
+ parent = RED.nodes.workspace(obj.z) || RED.nodes.subflow(obj.z)
+ }
+ if (parent) {
+ getEnvVars(parent, envVars)
+ }
+ if (obj.env) {
+ obj.env.forEach(env => {
+ envVars[env.name] = obj
+ })
+ }
+ contextKnownKeys.env[obj.id] = envVars
+ return envVars
+ }
+
+ const envAutoComplete = function (val) {
+ const editStack = RED.editor.getEditStack()
+ if (editStack.length === 0) {
+ done([])
+ return
+ }
+ const editingNode = editStack.pop()
+ if (!editingNode) {
+ return []
+ }
+ const envVarsMap = getEnvVars(editingNode)
+ const envVars = Object.keys(envVarsMap)
+ const matches = []
+ const i = val.lastIndexOf('${')
+ let searchKey = val
+ let isSubkey = false
+ if (i > -1) {
+ if (val.lastIndexOf('}') < i) {
+ searchKey = val.substring(i+2)
+ isSubkey = true
+ }
+ }
+ envVars.forEach(v => {
+ let valMatch = getMatch(v, searchKey);
+ if (valMatch.found) {
+ const optSrc = envVarsMap[v]
+ const element = $('
',{style: "display: flex"});
+ const valEl = $('
',{style:"font-family: var(--red-ui-monospace-font); white-space:nowrap; overflow: hidden; flex-grow:1"});
+ valEl.append(generateSpans(valMatch))
+ valEl.appendTo(element)
+
+ if (optSrc) {
+ const optEl = $('
').css({ "font-size": "0.8em" });
+ let label
+ if (optSrc.type === 'global-config') {
+ label = RED._('sidebar.context.global')
+ } else if (optSrc.type === 'group') {
+ label = RED.utils.getNodeLabel(optSrc) || (RED._('sidebar.info.group') + ': '+optSrc.id)
+ } else {
+ label = RED.utils.getNodeLabel(optSrc) || optSrc.id
+ }
+
+ optEl.append(generateSpans({ match: label }));
+ optEl.appendTo(element);
+ }
+ matches.push({
+ value: isSubkey ? val + v + '}' : v,
+ label: element,
+ i: valMatch.index
+ });
+ }
+ })
+ matches.sort(function(A,B){return A.i-B.i})
+ return matches
+ }
+
+ let contextKnownKeys = {}
+ let contextCache = {}
+ if (RED.events) {
+ RED.events.on("editor:close", function () {
+ contextCache = {}
+ contextKnownKeys = {}
+ });
+ }
+
+ const contextAutoComplete = function() {
+ const that = this
+ const getContextKeysFromRuntime = function(scope, store, searchKey, done) {
+ contextKnownKeys[scope] = contextKnownKeys[scope] || {}
+ contextKnownKeys[scope][store] = contextKnownKeys[scope][store] || new Set()
+ if (searchKey.length > 0) {
+ try {
+ RED.utils.normalisePropertyExpression(searchKey)
+ } catch (err) {
+ // Not a valid context key, so don't try looking up
+ done()
+ return
+ }
+ }
+ const url = `context/${scope}/${encodeURIComponent(searchKey)}?store=${store}&keysOnly`
+ if (contextCache[url]) {
+ // console.log('CACHED', url)
+ done()
+ } else {
+ // console.log('GET', url)
+ $.getJSON(url, function(data) {
+ // console.log(data)
+ contextCache[url] = true
+ const result = data[store] || {}
+ const keys = result.keys || []
+ const keyPrefix = searchKey + (searchKey.length > 0 ? '.' : '')
+ keys.forEach(key => {
+ if (/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(key)) {
+ contextKnownKeys[scope][store].add(keyPrefix + key)
+ } else {
+ contextKnownKeys[scope][store].add(searchKey + "[\""+key.replace(/"/,"\\\"")+"\"]")
+ }
+ })
+ done()
+ })
+ }
+ }
+ const getContextKeys = function(key, done) {
+ const keyParts = key.split('.')
+ const partialKey = keyParts.pop()
+ let scope = that.propertyType
+ if (scope === 'flow') {
+ // Get the flow id of the node we're editing
+ const editStack = RED.editor.getEditStack()
+ if (editStack.length === 0) {
+ done([])
+ return
+ }
+ const editingNode = editStack.pop()
+ if (editingNode.z) {
+ scope = `${scope}/${editingNode.z}`
+ } else {
+ done([])
+ return
+ }
+ }
+ const store = (contextStoreOptions.length === 1) ? contextStoreOptions[0].value : that.optionValue
+ const searchKey = keyParts.join('.')
+
+ getContextKeysFromRuntime(scope, store, searchKey, function() {
+ if (contextKnownKeys[scope][store].has(key) || key.endsWith(']')) {
+ getContextKeysFromRuntime(scope, store, key, function() {
+ done(contextKnownKeys[scope][store])
+ })
+ }
+ done(contextKnownKeys[scope][store])
+ })
+ }
+
+ return function(val, done) {
+ getContextKeys(val, function (keys) {
+ const matches = []
+ keys.forEach(v => {
+ let optVal = v
+ let valMatch = getMatch(optVal, val);
+ if (!valMatch.found && val.length > 0 && val.endsWith('.')) {
+ // Search key ends in '.' - but doesn't match. Check again
+ // with [" at the end instead so we match bracket notation
+ valMatch = getMatch(optVal, val.substring(0, val.length - 1) + '["')
+ }
+ if (valMatch.found) {
+ const element = $('
',{style: "display: flex"});
+ const valEl = $('
',{style:"font-family: var(--red-ui-monospace-font); white-space:nowrap; overflow: hidden; flex-grow:1"});
+ valEl.append(generateSpans(valMatch))
+ valEl.appendTo(element)
+ matches.push({
+ value: optVal,
+ label: element,
+ });
+ }
+ })
+ matches.sort(function(a, b) { return a.value.localeCompare(b.value) });
+ done(matches);
+ })
+ }
+ }
+
// This is a hand-generated list of completions for the core nodes (based on the node help html).
var msgCompletions = [
{ value: "payload" },
@@ -166,23 +358,27 @@
{ value: "_session", source: ["websocket out","tcp out"] },
]
var allOptions = {
- msg: {value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression, autoComplete: autoComplete(msgCompletions)},
+ msg: {value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression, autoComplete: msgAutoComplete(msgCompletions)},
flow: {value:"flow",label:"flow.",hasValue:true,
options:[],
validate:RED.utils.validatePropertyExpression,
parse: contextParse,
export: contextExport,
- valueLabel: contextLabel
+ valueLabel: contextLabel,
+ autoComplete: contextAutoComplete
},
global: {value:"global",label:"global.",hasValue:true,
options:[],
validate:RED.utils.validatePropertyExpression,
parse: contextParse,
export: contextExport,
- valueLabel: contextLabel
+ valueLabel: contextLabel,
+ autoComplete: contextAutoComplete
},
str: {value:"str",label:"string",icon:"red/images/typedInput/az.svg"},
- num: {value:"num",label:"number",icon:"red/images/typedInput/09.svg",validate:/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/},
+ num: {value:"num",label:"number",icon:"red/images/typedInput/09.svg",validate: function(v) {
+ return (true === RED.utils.validateTypedProperty(v, "num"));
+ } },
bool: {value:"bool",label:"boolean",icon:"red/images/typedInput/bool.svg",options:["true","false"]},
json: {
value:"json",
@@ -212,7 +408,25 @@
}
},
re: {value:"re",label:"regular expression",icon:"red/images/typedInput/re.svg"},
- date: {value:"date",label:"timestamp",icon:"fa fa-clock-o",hasValue:false},
+ date: {
+ value:"date",
+ label:"timestamp",
+ icon:"fa fa-clock-o",
+ options:[
+ {
+ label: 'milliseconds since epoch',
+ value: ''
+ },
+ {
+ label: 'YYYY-MM-DDTHH:mm:ss.sssZ',
+ value: 'iso'
+ },
+ {
+ label: 'JavaScript Date Object',
+ value: 'object'
+ }
+ ]
+ },
jsonata: {
value: "jsonata",
label: "expression",
@@ -249,7 +463,8 @@
env: {
value: "env",
label: "env variable",
- icon: "red/images/typedInput/env.svg"
+ icon: "red/images/typedInput/env.svg",
+ autoComplete: envAutoComplete
},
node: {
value: "node",
@@ -381,18 +596,75 @@
eyeButton.show();
}
}
+ },
+ 'conf-types': {
+ value: "conf-types",
+ label: "config",
+ icon: "fa fa-cog",
+ // hasValue: false,
+ valueLabel: function (container, value) {
+ // get the selected option (for access to the "name" and "module" properties)
+ const _options = this._optionsCache || this.typeList.find(opt => opt.value === value)?.options || []
+ const selectedOption = _options.find(opt => opt.value === value) || {
+ title: '',
+ name: '',
+ module: ''
+ }
+ container.attr("title", selectedOption.title) // set tooltip to the full path/id of the module/node
+ container.text(selectedOption.name) // apply the "name" of the selected option
+ // set "line-height" such as to make the "name" appear further up, giving room for the "module" to be displayed below the value
+ container.css("line-height", "1.4em")
+ // add the module name in smaller, lighter font below the value
+ $('
').text(selectedOption.module).css({
+ // "font-family": "var(--red-ui-monospace-font)",
+ color: "var(--red-ui-tertiary-text-color)",
+ "font-size": "0.8em",
+ "line-height": "1em",
+ opacity: 0.8
+ }).appendTo(container);
+ },
+ // hasValue: false,
+ options: function () {
+ if (this._optionsCache) {
+ return this._optionsCache
+ }
+ const configNodes = RED.nodes.registry.getNodeDefinitions({configOnly: true, filter: (def) => def.type !== "global-config"}).map((def) => {
+ // create a container with with 2 rows (row 1 for the name, row 2 for the module name in smaller, lighter font)
+ const container = $('
')
+ const row1Name = $('
').text(def.type)
+ const row2Module = $('
').text(def.set.module)
+ container.append(row1Name, row2Module)
+
+ return {
+ value: def.type,
+ name: def.type,
+ enabled: def.set.enabled ?? true,
+ local: def.set.local,
+ title: def.set.id, // tooltip e.g. "node-red-contrib-foo/bar"
+ module: def.set.module,
+ icon: container[0].outerHTML.trim(), // the typeInput will interpret this as html text and render it in the anchor
+ }
+ })
+ this._optionsCache = configNodes
+ return configNodes
+ }
}
};
+
// For a type with options, check value is a valid selection
// If !opt.multiple, returns the valid option object
// if opt.multiple, returns an array of valid option objects
// If not valid, returns null;
function isOptionValueValid(opt, currentVal) {
+ let _options = opt.options
+ if (typeof _options === "function") {
+ _options = _options.call(this)
+ }
if (!opt.multiple) {
- for (var i=0;i
'}
}).sort(function(A,B) {
if (A.value === RED.settings.context.default) {
@@ -447,13 +720,17 @@
return A.value.localeCompare(B.value);
}
})
- if (contextOptions.length < 2) {
+ if (contextStoreOptions.length < 2) {
allOptions.flow.options = [];
allOptions.global.options = [];
} else {
- allOptions.flow.options = contextOptions;
- allOptions.global.options = contextOptions;
+ allOptions.flow.options = contextStoreOptions;
+ allOptions.global.options = contextStoreOptions;
}
+ // Translate timestamp options
+ allOptions.date.options.forEach(opt => {
+ opt.label = RED._("typedInput.date.format." + (opt.value || 'timestamp'), {defaultValue: opt.label})
+ })
}
nlsd = true;
var that = this;
@@ -542,7 +819,7 @@
that.element.trigger('paste',evt);
});
this.input.on('keydown', function(evt) {
- if (that.typeMap[that.propertyType].autoComplete) {
+ if (that.typeMap[that.propertyType].autoComplete || that.input.hasClass('red-ui-autoComplete')) {
return
}
if (evt.keyCode >= 37 && evt.keyCode <= 40) {
@@ -836,7 +1113,9 @@
if (this.optionMenu) {
this.optionMenu.remove();
}
- this.menu.remove();
+ if (this.menu) {
+ this.menu.remove();
+ }
this.uiSelect.remove();
},
types: function(types) {
@@ -869,7 +1148,7 @@
this.menu = this._createMenu(this.typeList,{},function(v) { that.type(v) });
if (currentType && !this.typeMap.hasOwnProperty(currentType)) {
if (!firstCall) {
- this.type(this.typeList[0].value);
+ this.type(this.typeList[0]?.value || ""); // permit empty typeList
}
} else {
this.propertyType = null;
@@ -906,6 +1185,11 @@
var selectedOption = [];
var valueToCheck = value;
if (opt.options) {
+ let _options = opt.options
+ if (typeof opt.options === "function") {
+ _options = opt.options.call(this)
+ }
+
if (opt.hasValue && opt.parse) {
var parts = opt.parse(value);
if (this.options.debug) { console.log(this.identifier,"new parse",parts) }
@@ -919,8 +1203,8 @@
checkValues = valueToCheck.split(",");
}
checkValues.forEach(function(valueToCheck) {
- for (var i=0;i n.type !== 'group').length === 0
- const hasGroup = hasSelection && selection.nodes.filter(n => n.type === 'group' ).length > 0
+ let hasGroup, isAllGroups = true, hasDisabledNode, hasEnabledNode, hasLabeledNode, hasUnlabeledNode;
+ if (hasSelection) {
+ selection.nodes.forEach(n => {
+ if (n.type === 'group') {
+ hasGroup = true;
+ } else {
+ isAllGroups = false;
+ }
+ if (n.d) {
+ hasDisabledNode = true;
+ } else {
+ hasEnabledNode = true;
+ }
+ if (n.l === undefined || n.l) {
+ hasLabeledNode = true;
+ } else {
+ hasUnlabeledNode = true;
+ }
+ });
+ }
const offset = $("#red-ui-workspace-chart").offset()
let addX = options.x - offset.left + $("#red-ui-workspace-chart").scrollLeft()
@@ -44,7 +62,7 @@ RED.contextMenu = (function () {
}
menuItems.push(
- { onselect: 'core:show-action-list', onpostselect: function () { } }
+ { onselect: 'core:show-action-list', label: RED._("contextMenu.showActionList"), onpostselect: function () { } }
)
const insertOptions = []
@@ -55,7 +73,7 @@ RED.contextMenu = (function () {
onselect: function () {
RED.view.showQuickAddDialog({
position: [addX, addY],
- touchTrigger: true,
+ touchTrigger: 'ontouchstart' in window,
splice: isSingleLink ? selection.links[0] : undefined,
// spliceMultiple: isMultipleLinks
})
@@ -108,16 +126,16 @@ RED.contextMenu = (function () {
const nodeOptions = []
if (!hasMultipleSelection && !isGroup) {
nodeOptions.push(
- { onselect: 'core:show-node-help' },
+ { onselect: 'core:show-node-help', label: RED._('menu.label.showNodeHelp') },
null
)
}
nodeOptions.push(
- { onselect: 'core:enable-selected-nodes' },
- { onselect: 'core:disable-selected-nodes' },
+ { onselect: 'core:enable-selected-nodes', label: RED._('menu.label.enableSelectedNodes'), disabled: !hasDisabledNode },
+ { onselect: 'core:disable-selected-nodes', label: RED._('menu.label.disableSelectedNodes'), disabled: !hasEnabledNode },
null,
- { onselect: 'core:show-selected-node-labels' },
- { onselect: 'core:hide-selected-node-labels' }
+ { onselect: 'core:show-selected-node-labels', label: RED._('menu.label.showSelectedNodeLabels'), disabled: !hasUnlabeledNode },
+ { onselect: 'core:hide-selected-node-labels', label: RED._('menu.label.hideSelectedNodeLabels'), disabled: !hasLabeledNode }
)
menuItems.push({
label: RED._('sidebar.info.node'),
@@ -126,8 +144,8 @@ RED.contextMenu = (function () {
menuItems.push({
label: RED._('sidebar.info.group'),
options: [
- { onselect: 'core:group-selection' },
- { onselect: 'core:ungroup-selection', disabled: !hasGroup },
+ { onselect: 'core:group-selection', label: RED._("menu.label.groupSelection") },
+ { onselect: 'core:ungroup-selection', label: RED._("menu.label.ungroupSelection"), disabled: !hasGroup },
]
})
if (hasGroup) {
@@ -143,8 +161,8 @@ RED.contextMenu = (function () {
}
menuItems[menuItems.length - 1].options.push(
null,
- { onselect: 'core:copy-group-style', disabled: !hasGroup },
- { onselect: 'core:paste-group-style', disabled: !hasGroup}
+ { onselect: 'core:copy-group-style', label: RED._("keyboard.copyGroupStyle"), disabled: !hasGroup },
+ { onselect: 'core:paste-group-style', label: RED._("keyboard.pasteGroupStyle"), disabled: !hasGroup}
)
}
if (canEdit && hasMultipleSelection) {
@@ -168,16 +186,16 @@ RED.contextMenu = (function () {
menuItems.push(
null,
- { onselect: 'core:undo', disabled: RED.history.list().length === 0 },
- { onselect: 'core:redo', disabled: RED.history.listRedo().length === 0 },
+ { onselect: 'core:undo', label: RED._("keyboard.undoChange"), disabled: RED.history.list().length === 0 },
+ { onselect: 'core:redo', label: RED._("keyboard.redoChange"), disabled: RED.history.listRedo().length === 0 },
null,
{ onselect: 'core:cut-selection-to-internal-clipboard', label: RED._("keyboard.cutNode"), disabled: !canEdit || !hasSelection },
{ onselect: 'core:copy-selection-to-internal-clipboard', label: RED._("keyboard.copyNode"), disabled: !hasSelection },
{ onselect: 'core:paste-from-internal-clipboard', label: RED._("keyboard.pasteNode"), disabled: !canEdit || !RED.view.clipboard() },
- { onselect: 'core:delete-selection', disabled: !canEdit || !canDelete },
+ { onselect: 'core:delete-selection', label: RED._('keyboard.deleteSelected'), disabled: !canEdit || !canDelete },
{ onselect: 'core:delete-selection-and-reconnect', label: RED._('keyboard.deleteReconnect'), disabled: !canEdit || !canDelete },
{ onselect: 'core:show-export-dialog', label: RED._("menu.label.export") },
- { onselect: 'core:select-all-nodes' },
+ { onselect: 'core:select-all-nodes', label: RED._("keyboard.selectAll") },
)
}
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js b/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js
index b6a069ab5..3f73e29aa 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js
@@ -989,9 +989,10 @@ RED.diff = (function() {
}
if (localNode && remoteNode && typeof localNode[d] === "string") {
if (/\n/.test(localNode[d]) || /\n/.test(remoteNode[d])) {
- $(' ').on("click", function() {
+ var textDiff = $(' ').on("click", function() {
showTextDiff(localNode[d],remoteNode[d]);
}).appendTo(propertyNameCell);
+ RED.popover.tooltip(textDiff, RED._("diff.compareChanges"));
}
}
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js
index 0ef3892e7..1b73430dc 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js
@@ -115,8 +115,9 @@ RED.editor = (function() {
var valid = validateNodeProperty(node, definition, prop, properties[prop]);
if ((typeof valid) === "string") {
result.push(valid);
- }
- else if(!valid) {
+ } else if (Array.isArray(valid)) {
+ result = result.concat(valid)
+ } else if(!valid) {
result.push(prop);
}
}
@@ -165,7 +166,7 @@ RED.editor = (function() {
// If the validator takes two arguments, it is a 3.x validator that
// can return a String to mean 'invalid' and provide a reason
if ((definition[property].validate.length === 2) &&
- ((typeof valid) === "string")) {
+ ((typeof valid) === "string") || Array.isArray(valid)) {
return valid;
} else {
// Otherwise, a 2.x returns a truth-like/false-like value that
@@ -181,6 +182,17 @@ RED.editor = (function() {
error: err.message
});
}
+ } else if (valid) {
+ // If the validator is not provided in node property => Check if the input has a validator
+ if ("category" in node._def) {
+ const isConfig = node._def.category === "config";
+ const prefix = isConfig ? "node-config-input" : "node-input";
+ const input = $("#"+prefix+"-"+property);
+ const isTypedInput = input.length > 0 && input.next(".red-ui-typedInput-container").length > 0;
+ if (isTypedInput) {
+ valid = input.typedInput("validate");
+ }
+ }
}
if (valid && definition[property].type && RED.nodes.getType(definition[property].type) && !("validate" in definition[property])) {
if (!value || value == "_ADD_") {
@@ -314,47 +326,78 @@ RED.editor = (function() {
/**
* Create a config-node select box for this property
- * @param node - the node being edited
- * @param property - the name of the field
- * @param type - the type of the config-node
+ * @param {Object} node - the node being edited
+ * @param {String} property - the name of the node property
+ * @param {String} type - the type of the config-node
+ * @param {"node-config-input"|"node-input"|"node-input-subflow-env"} prefix - the prefix to use in the input element ids
+ * @param {Function} [filter] - a function to filter the list of config nodes
+ * @param {Object} [env] - the environment variable object (only used for subflow env vars)
*/
- function prepareConfigNodeSelect(node,property,type,prefix,filter) {
- var input = $("#"+prefix+"-"+property);
- if (input.length === 0 ) {
+ function prepareConfigNodeSelect(node, property, type, prefix, filter, env) {
+ let nodeValue
+ if (prefix === 'node-input-subflow-env') {
+ nodeValue = env?.value
+ } else {
+ nodeValue = node[property]
+ }
+
+ const buttonId = `${prefix}-lookup-${property}`
+ const selectId = prefix + '-' + property
+ const input = $(`#${selectId}`);
+ if (input.length === 0) {
return;
}
- var newWidth = input.width();
- var attrStyle = input.attr('style');
- var m;
+ const attrStyle = input.attr('style');
+ let newWidth;
+ let m;
if ((m = /(^|\s|;)width\s*:\s*([^;]+)/i.exec(attrStyle)) !== null) {
newWidth = m[2].trim();
} else {
newWidth = "70%";
}
- var outerWrap = $("
").css({
+ const outerWrap = $("
").css({
width: newWidth,
- display:'inline-flex'
+ display: 'inline-flex'
});
- var select = $(' ').appendTo(outerWrap);
+ const select = $(' ').appendTo(outerWrap);
input.replaceWith(outerWrap);
// set the style attr directly - using width() on FF causes a value of 114%...
select.css({
'flex-grow': 1
});
- updateConfigNodeSelect(property,type,node[property],prefix,filter);
- $(' ')
- .css({"margin-left":"10px"})
+ updateConfigNodeSelect(property, type, nodeValue, prefix, filter);
+ const disableButton = function(disabled) {
+ btn.prop( "disabled", !!disabled)
+ btn.toggleClass("disabled", !!disabled)
+ }
+ // create the edit button
+ const btn = $(' ')
+ .css({ "margin-left": "10px" })
.appendTo(outerWrap);
- $('#'+prefix+'-lookup-'+property).on("click", function(e) {
- showEditConfigNodeDialog(property,type,select.find(":selected").val(),prefix,node);
+
+ // add the click handler
+ btn.on("click", function (e) {
+ const selectedOpt = select.find(":selected")
+ if (selectedOpt.data('env')) { return } // don't show the dialog for env vars items (MVP. Future enhancement: lookup the env, if present, show the associated edit dialog)
+ if (btn.prop("disabled")) { return }
+ showEditConfigNodeDialog(property, type, selectedOpt.val(), prefix, node);
e.preventDefault();
});
+
+ // dont permit the user to click the button if the selected option is an env var
+ select.on("change", function () {
+ const selectedOpt = select.find(":selected")
+ if (selectedOpt?.data('env')) {
+ disableButton(true)
+ } else {
+ disableButton(false)
+ }
+ });
var label = "";
- var configNode = RED.nodes.node(node[property]);
- var node_def = RED.nodes.getType(type);
+ var configNode = RED.nodes.node(nodeValue);
if (configNode) {
- label = RED.utils.getNodeLabel(configNode,configNode.id);
+ label = RED.utils.getNodeLabel(configNode, configNode.id);
}
input.val(label);
}
@@ -756,12 +799,9 @@ RED.editor = (function() {
}
function defaultConfigNodeSort(A,B) {
- if (A.__label__ < B.__label__) {
- return -1;
- } else if (A.__label__ > B.__label__) {
- return 1;
- }
- return 0;
+ // sort case insensitive so that `[env] node-name` items are at the top and
+ // not mixed inbetween the the lower and upper case items
+ return (A.__label__ || '').localeCompare((B.__label__ || ''), undefined, {sensitivity: 'base'})
}
function updateConfigNodeSelect(name,type,value,prefix,filter) {
@@ -776,7 +816,7 @@ RED.editor = (function() {
}
$("#"+prefix+"-"+name).val(value);
} else {
-
+ let inclSubflowEnvvars = false
var select = $("#"+prefix+"-"+name);
var node_def = RED.nodes.getType(type);
select.children().remove();
@@ -784,6 +824,7 @@ RED.editor = (function() {
var activeWorkspace = RED.nodes.workspace(RED.workspaces.active());
if (!activeWorkspace) {
activeWorkspace = RED.nodes.subflow(RED.workspaces.active());
+ inclSubflowEnvvars = true
}
var configNodes = [];
@@ -799,6 +840,31 @@ RED.editor = (function() {
}
}
});
+
+ // as includeSubflowEnvvars is true, this is a subflow.
+ // include any 'conf-types' env vars as a list of avaiable configs
+ // in the config dropdown as `[env] node-name`
+ if (inclSubflowEnvvars && activeWorkspace.env) {
+ const parentEnv = activeWorkspace.env.filter(env => env.ui?.type === 'conf-types' && env.type === type)
+ if (parentEnv && parentEnv.length > 0) {
+ const locale = RED.i18n.lang()
+ for (let i = 0; i < parentEnv.length; i++) {
+ const tenv = parentEnv[i]
+ const ui = tenv.ui || {}
+ const labels = ui.label || {}
+ const labelText = RED.editor.envVarList.lookupLabel(labels, labels["en-US"] || tenv.name, locale)
+ const config = {
+ env: tenv,
+ id: '${' + parentEnv[0].name + '}',
+ type: type,
+ label: labelText,
+ __label__: `[env] ${labelText}`
+ }
+ configNodes.push(config)
+ }
+ }
+ }
+
var configSortFn = defaultConfigNodeSort;
if (typeof node_def.sort == "function") {
configSortFn = node_def.sort;
@@ -810,7 +876,10 @@ RED.editor = (function() {
}
configNodes.forEach(function(cn) {
- $(' ').text(RED.text.bidi.enforceTextDirectionWithUCC(cn.__label__)).appendTo(select);
+ const option = $(' ').text(RED.text.bidi.enforceTextDirectionWithUCC(cn.__label__)).appendTo(select);
+ if (cn.env) {
+ option.data('env', cn.env) // set a data attribute to indicate this is an env var (to inhibit the edit button)
+ }
delete cn.__label__;
});
@@ -1219,7 +1288,11 @@ RED.editor = (function() {
})
if (node_def.hasUsers !== false) {
- $(' ').css("margin-left", "10px").appendTo(trayFooterLeft);
+ // $(' ').css("margin-left", "10px").appendTo(trayFooterLeft);
+ $(' ').on('click', function() {
+ RED.sidebar.info.outliner.search('uses:'+editing_config_node.id)
+ RED.sidebar.info.show()
+ }).appendTo(trayFooterLeft);
}
trayFooter.append('');
@@ -1277,7 +1350,8 @@ RED.editor = (function() {
});
}
if (node_def.hasUsers !== false) {
- $("#red-ui-editor-config-user-count").text(RED._("editor.nodesUse", {count:editing_config_node.users.length})).parent().show();
+ $("#red-ui-editor-config-user-count").text(editing_config_node.users.length).parent().show();
+ RED.popover.tooltip($("#red-ui-editor-config-user-count").parent(), function() { return RED._('editor.nodesUse',{count:editing_config_node.users.length})});
}
trayBody.i18n();
trayFooter.i18n();
@@ -1466,9 +1540,16 @@ RED.editor = (function() {
}
RED.tray.close(function() {
var filter = null;
- if (editContext && typeof editContext._def.defaults[configProperty].filter === 'function') {
- filter = function(n) {
- return editContext._def.defaults[configProperty].filter.call(editContext,n);
+ // when editing a config via subflow edit panel, the `configProperty` will not
+ // necessarily be a property of the editContext._def.defaults object
+ // Also, when editing via dashboard sidebar, editContext can be null
+ // so we need to guard both scenarios
+ if (editContext?._def) {
+ const isSubflow = (editContext._def.type === 'subflow' || /subflow:.*/.test(editContext._def.type))
+ if (editContext && !isSubflow && typeof editContext._def.defaults?.[configProperty]?.filter === 'function') {
+ filter = function(n) {
+ return editContext._def.defaults[configProperty].filter.call(editContext,n);
+ }
}
}
updateConfigNodeSelect(configProperty,configType,editing_config_node.id,prefix,filter);
@@ -1529,7 +1610,7 @@ RED.editor = (function() {
RED.history.push(historyEvent);
RED.tray.close(function() {
var filter = null;
- if (editContext && typeof editContext._def.defaults[configProperty].filter === 'function') {
+ if (editContext && typeof editContext._def.defaults[configProperty]?.filter === 'function') {
filter = function(n) {
return editContext._def.defaults[configProperty].filter.call(editContext,n);
}
@@ -2070,6 +2151,7 @@ RED.editor = (function() {
}
},
editBuffer: function(options) { showTypeEditor("_buffer", options) },
+ getEditStack: function () { return [...editStack] },
buildEditForm: buildEditForm,
validateNode: validateNode,
updateNodeProperties: updateNodeProperties,
@@ -2114,6 +2196,7 @@ RED.editor = (function() {
filteredEditPanes[type] = filter
}
editPanes[type] = definition;
- }
+ },
+ prepareConfigNodeSelect: prepareConfigNodeSelect,
}
})();
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/buffer.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/buffer.js
index f47ec508b..03a50e60b 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/buffer.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/buffer.js
@@ -121,7 +121,7 @@
var i=0,l=bufferBinValue.length;
var c = 0;
for(i=0;i 255)) {
valid = false;
break;
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js
index b18e01fbb..d034af3d7 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js
@@ -585,7 +585,7 @@ RED.editor.codeEditor.monaco = (function() {
createMonacoCompletionItem("set (flow context)", 'flow.set("${1:name}", ${1:value});','Set a value in flow context',range),
createMonacoCompletionItem("get (global context)", 'global.get("${1:name}");','Get a value from global context',range),
createMonacoCompletionItem("set (global context)", 'global.set("${1:name}", ${1:value});','Set a value in global context',range),
- createMonacoCompletionItem("get (env)", 'env.get("${1|NR_NODE_ID,NR_NODE_NAME,NR_NODE_PATH,NR_GROUP_ID,NR_GROUP_NAME,NR_FLOW_ID,NR_FLOW_NAME|}");','Get env variable value',range),
+ createMonacoCompletionItem("get (env)", 'env.get("${1|NR_NODE_ID,NR_NODE_NAME,NR_NODE_PATH,NR_GROUP_ID,NR_GROUP_NAME,NR_FLOW_ID,NR_FLOW_NAME,NR_SUBFLOW_NAME,NR_SUBFLOW_ID,NR_SUBFLOW_PATH|}");','Get env variable value',range),
createMonacoCompletionItem("cloneMessage (RED.util)", 'RED.util.cloneMessage(${1:msg});',
["```typescript",
"RED.util.cloneMessage(msg: T): T",
@@ -966,12 +966,10 @@ RED.editor.codeEditor.monaco = (function() {
//Unbind ctrl-Enter (default action is to insert a newline in editor) This permits the shortcut to close the tray.
try {
- ed._standaloneKeybindingService.addDynamicKeybinding(
- '-editor.action.insertLineAfter', // command ID prefixed by '-'
- null, // keybinding
- () => {} // need to pass an empty handler
- );
- } catch (error) { }
+ monaco.editor.addKeybindingRule({keybinding: 0, command: "-editor.action.insertLineAfter"});
+ } catch (error) {
+ console.warn(error)
+ }
ed.nodered = {
refreshModuleLibs: refreshModuleLibs //expose this for function node externalModules refresh
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/envVarList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/envVarList.js
index ba71e651f..dda5d1660 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/envVarList.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/envVarList.js
@@ -1,8 +1,9 @@
RED.editor.envVarList = (function() {
var currentLocale = 'en-US';
- var DEFAULT_ENV_TYPE_LIST = ['str','num','bool','json','bin','env'];
- var DEFAULT_ENV_TYPE_LIST_INC_CRED = ['str','num','bool','json','bin','env','cred','jsonata'];
+ const DEFAULT_ENV_TYPE_LIST = ['str','num','bool','json','bin','env'];
+ const DEFAULT_ENV_TYPE_LIST_INC_CONFTYPES = ['str','num','bool','json','bin','env','conf-types'];
+ const DEFAULT_ENV_TYPE_LIST_INC_CRED = ['str','num','bool','json','bin','env','cred','jsonata'];
/**
* Create env var edit interface
@@ -10,8 +11,8 @@ RED.editor.envVarList = (function() {
* @param node - subflow node
*/
function buildPropertiesList(envContainer, node) {
-
- var isTemplateNode = (node.type === "subflow");
+ if(RED.editor.envVarList.debug) { console.log('envVarList: buildPropertiesList', envContainer, node) }
+ const isTemplateNode = (node.type === "subflow");
envContainer
.css({
@@ -83,7 +84,14 @@ RED.editor.envVarList = (function() {
// if `opt.ui` does not exist, then apply defaults. If these
// defaults do not change then they will get stripped off
// before saving.
- if (opt.type === 'cred') {
+ if (opt.type === 'conf-types') {
+ opt.ui = opt.ui || {
+ icon: "fa fa-cog",
+ type: "conf-types",
+ opts: {opts:[]}
+ }
+ opt.ui.type = "conf-types";
+ } else if (opt.type === 'cred') {
opt.ui = opt.ui || {
icon: "",
type: "cred"
@@ -119,7 +127,7 @@ RED.editor.envVarList = (function() {
}
});
- buildEnvEditRow(uiRow, opt.ui, nameField, valueField);
+ buildEnvEditRow(uiRow, opt, nameField, valueField);
nameField.trigger('change');
}
},
@@ -181,21 +189,23 @@ RED.editor.envVarList = (function() {
* @param nameField - name field of env var
* @param valueField - value field of env var
*/
- function buildEnvEditRow(container, ui, nameField, valueField) {
+ function buildEnvEditRow(container, opt, nameField, valueField) {
+ const ui = opt.ui
+ if(RED.editor.envVarList.debug) { console.log('envVarList: buildEnvEditRow', container, ui, nameField, valueField) }
container.addClass("red-ui-editor-subflow-env-ui-row")
var topRow = $('
').appendTo(container);
$('
').appendTo(topRow);
$('').text(RED._("editor.icon")).appendTo(topRow);
$('
').text(RED._("editor.label")).appendTo(topRow);
- $('
').text(RED._("editor.inputType")).appendTo(topRow);
+ $('
').text(RED._("editor.inputType")).appendTo(topRow);
var row = $('
').appendTo(container);
$('
').appendTo(row);
var typeOptions = {
- 'input': {types:DEFAULT_ENV_TYPE_LIST},
- 'select': {opts:[]},
- 'spinner': {},
- 'cred': {}
+ 'input': {types:DEFAULT_ENV_TYPE_LIST_INC_CONFTYPES},
+ 'select': {opts:[]},
+ 'spinner': {},
+ 'cred': {}
};
if (ui.opts) {
typeOptions[ui.type] = ui.opts;
@@ -260,15 +270,16 @@ RED.editor.envVarList = (function() {
labelInput.attr("placeholder",$(this).val())
});
- var inputCell = $('
').appendTo(row);
- var inputCellInput = $('
').css("width","100%").appendTo(inputCell);
+ var inputCell = $('
').appendTo(row);
+ var uiInputTypeInput = $('
').css("width","100%").appendTo(inputCell);
if (ui.type === "input") {
- inputCellInput.val(ui.opts.types.join(","));
+ uiInputTypeInput.val(ui.opts.types.join(","));
}
var checkbox;
var selectBox;
- inputCellInput.typedInput({
+ // the options presented in the UI section for an "input" type selection
+ uiInputTypeInput.typedInput({
types: [
{
value:"input",
@@ -429,7 +440,7 @@ RED.editor.envVarList = (function() {
}
});
ui.opts.opts = vals;
- inputCellInput.typedInput('value',Date.now())
+ uiInputTypeInput.typedInput('value',Date.now())
}
}
}
@@ -496,12 +507,13 @@ RED.editor.envVarList = (function() {
} else {
delete ui.opts.max;
}
- inputCellInput.typedInput('value',Date.now())
+ uiInputTypeInput.typedInput('value',Date.now())
}
}
}
}
},
+ 'conf-types',
{
value:"none",
label:RED._("editor.inputs.none"), icon:"fa fa-times",hasValue:false
@@ -519,14 +531,20 @@ RED.editor.envVarList = (function() {
// In the case of 'input' type, the typedInput uses the multiple-option
// mode. Its value needs to be set to a comma-separately list of the
// selected options.
- inputCellInput.typedInput('value',ui.opts.types.join(","))
+ uiInputTypeInput.typedInput('value',ui.opts.types.join(","))
+ } else if (ui.type === 'conf-types') {
+ // In the case of 'conf-types' type, the typedInput will be populated
+ // with a list of all config nodes types installed.
+ // Restore the value to the last selected type
+ uiInputTypeInput.typedInput('value', opt.type)
} else {
// No other type cares about `value`, but doing this will
// force a refresh of the label now that `ui.opts` has
// been updated.
- inputCellInput.typedInput('value',Date.now())
+ uiInputTypeInput.typedInput('value',Date.now())
}
+ if(RED.editor.envVarList.debug) { console.log('envVarList: inputCellInput on:typedinputtypechange. ui.type = ' + ui.type) }
switch (ui.type) {
case 'input':
valueField.typedInput('types',ui.opts.types);
@@ -544,7 +562,7 @@ RED.editor.envVarList = (function() {
valueField.typedInput('types',['cred']);
break;
default:
- valueField.typedInput('types',DEFAULT_ENV_TYPE_LIST)
+ valueField.typedInput('types', DEFAULT_ENV_TYPE_LIST);
}
if (ui.type === 'checkbox') {
valueField.typedInput('type','bool');
@@ -556,8 +574,46 @@ RED.editor.envVarList = (function() {
}
}).on("change", function(evt,type) {
- if (ui.type === 'input') {
- var types = inputCellInput.typedInput('value');
+ const selectedType = $(this).typedInput('type') // the UI typedInput type
+ if(RED.editor.envVarList.debug) { console.log('envVarList: inputCellInput on:change. selectedType = ' + selectedType) }
+ if (selectedType === 'conf-types') {
+ const selectedConfigType = $(this).typedInput('value') || opt.type
+ let activeWorkspace = RED.nodes.workspace(RED.workspaces.active());
+ if (!activeWorkspace) {
+ activeWorkspace = RED.nodes.subflow(RED.workspaces.active());
+ }
+
+ // get a list of all config nodes matching the selectedValue
+ const configNodes = [];
+ RED.nodes.eachConfig(function(config) {
+ if (config.type == selectedConfigType && (!config.z || config.z === activeWorkspace.id)) {
+ const modulePath = config._def?.set?.id || ''
+ let label = RED.utils.getNodeLabel(config, config.id) || config.id;
+ label += config.d ? ' ['+RED._('workspace.disabled')+']' : '';
+ const _config = {
+ _type: selectedConfigType,
+ value: config.id,
+ label: label,
+ title: modulePath ? modulePath + ' - ' + label : label,
+ enabled: config.d !== true,
+ disabled: config.d === true,
+ }
+ configNodes.push(_config);
+ }
+ });
+ const tiTypes = {
+ value: selectedConfigType,
+ label: "config",
+ icon: "fa fa-cog",
+ options: configNodes,
+ }
+ valueField.typedInput('types', [tiTypes]);
+ valueField.typedInput('type', selectedConfigType);
+ valueField.typedInput('value', opt.value);
+
+
+ } else if (ui.type === 'input') {
+ var types = uiInputTypeInput.typedInput('value');
ui.opts.types = (types === "") ? ["str"] : types.split(",");
valueField.typedInput('types',ui.opts.types);
}
@@ -569,7 +625,7 @@ RED.editor.envVarList = (function() {
})
// Set the input to the right type. This will trigger the 'typedinputtypechange'
// event handler (just above ^^) to update the value if needed
- inputCellInput.typedInput('type',ui.type)
+ uiInputTypeInput.typedInput('type',ui.type)
}
function setLocale(l, list) {
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/markdown.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/markdown.js
index bd7a11b3f..c4d7bf26d 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/markdown.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/markdown.js
@@ -169,7 +169,7 @@
var currentScrollTop = $(".red-ui-editor-type-markdown-panel-preview").scrollTop();
$(".red-ui-editor-type-markdown-panel-preview").html(RED.utils.renderMarkdown(expressionEditor.getValue()));
$(".red-ui-editor-type-markdown-panel-preview").scrollTop(currentScrollTop);
- mermaid.init();
+ RED.editor.mermaid.render()
},200);
})
if (options.header) {
@@ -178,7 +178,7 @@
if (value) {
$(".red-ui-editor-type-markdown-panel-preview").html(RED.utils.renderMarkdown(expressionEditor.getValue()));
- mermaid.init();
+ RED.editor.mermaid.render()
}
panels = RED.panels.create({
id:"red-ui-editor-type-markdown-panels",
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/mermaid.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/mermaid.js
new file mode 100644
index 000000000..0c1597919
--- /dev/null
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/mermaid.js
@@ -0,0 +1,54 @@
+RED.editor.mermaid = (function () {
+ let initializing = false
+ let loaded = false
+ let pendingEvals = []
+ let diagramIds = 0
+
+ function render(selector = '.mermaid') {
+ // $(selector).hide()
+ if (!loaded) {
+ pendingEvals.push(selector)
+
+ if (!initializing) {
+ initializing = true
+ $.getScript(
+ 'vendor/mermaid/mermaid.min.js',
+ function (data, stat, jqxhr) {
+ mermaid.initialize({
+ startOnLoad: false,
+ theme: RED.settings.get('mermaid', {}).theme
+ })
+ loaded = true
+ while(pendingEvals.length > 0) {
+ const pending = pendingEvals.shift()
+ render(pending)
+ }
+ }
+ )
+ }
+ } else {
+ const nodes = document.querySelectorAll(selector)
+
+ nodes.forEach(async node => {
+ if (!node.getAttribute('mermaid-processed')) {
+ const mermaidContent = node.innerText
+ node.setAttribute('mermaid-processed', true)
+ try {
+ const { svg } = await mermaid.render('mermaid-render-'+Date.now()+'-'+(diagramIds++), mermaidContent);
+ node.innerHTML = svg
+ } catch (err) {
+ $('
').css({
+ fontSize: '0.8em',
+ border: '1px solid var(--red-ui-border-color-error)',
+ padding: '5px',
+ marginBottom: '10px',
+ }).text(err.toString()).prependTo(node)
+ }
+ }
+ })
+ }
+ }
+ return {
+ render: render,
+ };
+})();
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/panes/appearance.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/panes/appearance.js
index e1e6b2ba3..d6dd5112d 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/panes/appearance.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/panes/appearance.js
@@ -196,7 +196,7 @@
}
$('
'+
- ' '+
+ ' '+
' '+
' '+
'
').appendTo(dialogForm);
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/env-var.js b/packages/node_modules/@node-red/editor-client/src/js/ui/env-var.js
index 998484858..79c626af4 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/env-var.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/env-var.js
@@ -71,7 +71,7 @@ RED.envVar = (function() {
};
if (item.name.trim() !== "") {
new_env.push(item);
- if ((item.type === "cred") && (item.value !== "__PWRD__")) {
+ if (item.type === "cred") {
credentials.map[item.name] = item.value;
credentials.map["has_"+item.name] = (item.value !== "");
item.value = "__PWRD__";
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/mermaid.js b/packages/node_modules/@node-red/editor-client/src/js/ui/mermaid.js
deleted file mode 100644
index d126cf188..000000000
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/mermaid.js
+++ /dev/null
@@ -1,46 +0,0 @@
-// Mermaid diagram stub library for on-demand dynamic loading
-// Will be overwritten after script loading by $.getScript
-var mermaid = (function () {
- var enabled /* = undefined */;
-
- var initializing = false;
- var initCalled = false;
-
- function initialize(opt) {
- if (enabled === undefined) {
- if (RED.settings.markdownEditor &&
- RED.settings.markdownEditor.mermaid) {
- enabled = RED.settings.markdownEditor.mermaid.enabled;
- }
- else {
- enabled = true;
- }
- }
- if (enabled) {
- initializing = true;
- $.getScript("vendor/mermaid/mermaid.min.js",
- function (data, stat, jqxhr) {
- $(".mermaid").show();
- // invoke loaded mermaid API
- initializing = false;
- mermaid.initialize(opt);
- if (initCalled) {
- mermaid.init();
- initCalled = false;
- }
- });
- }
- }
-
- function init() {
- if (initializing) {
- $(".mermaid").hide();
- initCalled = true;
- }
- }
-
- return {
- initialize: initialize,
- init: init,
- };
-})();
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js b/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js
index db915fd8b..23f30fc61 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js
@@ -484,7 +484,7 @@ RED.palette = (function() {
var currentLabel = paletteNode.attr("data-palette-label");
var currentInfo = paletteNode.attr("data-palette-info");
- if (currentLabel !== sf.name || currentInfo !== sf.info) {
+ if (currentLabel !== sf.name || currentInfo !== sf.info || sf.in.length > 0 || sf.out.length > 0) {
paletteNode.attr("data-palette-info",sf.info);
setLabel(sf.type+":"+sf.id,paletteNode,sf.name,RED.utils.renderMarkdown(sf.info||""));
}
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/projects/projectSettings.js b/packages/node_modules/@node-red/editor-client/src/js/ui/projects/projectSettings.js
index b8f1558a6..37a5ef1a8 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/projects/projectSettings.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/projects/projectSettings.js
@@ -166,7 +166,7 @@ RED.projects.settings = (function() {
var description = addTargetToExternalLinks($('
'+desc+' ')).appendTo(container);
description.find(".red-ui-text-bidi-aware").contents().filter(function() { return this.nodeType === 3 && this.textContent.trim() !== "" }).wrap( "
" );
setTimeout(function () {
- mermaid.init();
+ RED.editor.mermaid.render()
}, 200);
}
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/projects/tab-versionControl.js b/packages/node_modules/@node-red/editor-client/src/js/ui/projects/tab-versionControl.js
index 5512926be..afdec2273 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/projects/tab-versionControl.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/projects/tab-versionControl.js
@@ -647,9 +647,9 @@ RED.sidebar.versionControl = (function() {
$.getJSON("projects/"+activeProject.name+"/commits/"+entry.sha,function(result) {
result.project = activeProject;
result.parents = entry.parents;
- result.oldRev = entry.sha+"~1";
+ result.oldRev = entry.parents[0].length !== 0 ? entry.sha+"~1" : entry.sha;
result.newRev = entry.sha;
- result.oldRevTitle = RED._("sidebar.project.versionControl.commitCapital")+" "+entry.sha.substring(0,7)+"~1";
+ result.oldRevTitle = entry.parents[0].length !== 0 ? RED._("sidebar.project.versionControl.commitCapital")+" "+entry.sha.substring(0,7)+"~1" : " ";
result.newRevTitle = RED._("sidebar.project.versionControl.commitCapital")+" "+entry.sha.substring(0,7);
result.date = humanizeSinceDate(parseInt(entry.date));
RED.diff.showCommitDiff(result);
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js
index a06f8bca4..67369b80b 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js
@@ -909,17 +909,19 @@ RED.subflow = (function() {
/**
- * Create interface for controlling env var UI definition
+ * Build the edit dialog for a subflow template (creating/modifying a subflow template)
+ * @param {Object} uiContainer - the jQuery container for the environment variable list
+ * @param {Object} node - the subflow template node
*/
- function buildEnvControl(envList,node) {
+ function buildEnvControl(uiContainer,node) {
var tabs = RED.tabs.create({
id: "subflow-env-tabs",
onchange: function(tab) {
if (tab.id === "subflow-env-tab-preview") {
var inputContainer = $("#subflow-input-ui");
- var list = envList.editableList("items");
+ var list = uiContainer.editableList("items");
var exportedEnv = exportEnvList(list, true);
- buildEnvUI(inputContainer, exportedEnv,node);
+ buildEnvUI(inputContainer, exportedEnv, node);
}
$("#subflow-env-tabs-content").children().hide();
$("#" + tab.id).show();
@@ -957,12 +959,33 @@ RED.subflow = (function() {
RED.editor.envVarList.setLocale(locale);
}
-
- function buildEnvUIRow(row, tenv, ui, node) {
+ /**
+ * Build a UI row for a subflow instance environment variable
+ * Also used to build the UI row for subflow template preview
+ * @param {JQuery} row - A form row element
+ * @param {Object} tenv - A template environment variable
+ * @param {String} tenv.name - The name of the environment variable
+ * @param {String} tenv.type - The type of the environment variable
+ * @param {String} tenv.value - The value set for this environment variable
+ * @param {Object} tenv.parent - The parent environment variable
+ * @param {String} tenv.parent.value - The value set for the parent environment variable
+ * @param {String} tenv.parent.type - The type of the parent environment variable
+ * @param {Object} tenv.ui - The UI configuration for the environment variable
+ * @param {String} tenv.ui.icon - The icon for the environment variable
+ * @param {Object} tenv.ui.label - The label for the environment variable
+ * @param {String} tenv.ui.type - The type of the UI control for the environment variable
+ * @param {Object} node - The subflow instance node
+ */
+ function buildEnvUIRow(row, tenv, node) {
+ if(RED.subflow.debug) { console.log("buildEnvUIRow", tenv) }
+ const ui = tenv.ui || {}
ui.label = ui.label||{};
if ((tenv.type === "cred" || (tenv.parent && tenv.parent.type === "cred")) && !ui.type) {
ui.type = "cred";
ui.opts = {};
+ } else if (tenv.type === "conf-types") {
+ ui.type = "conf-types"
+ ui.opts = { types: ['conf-types'] }
} else if (!ui.type) {
ui.type = "input";
ui.opts = { types: RED.editor.envVarList.DEFAULT_ENV_TYPE_LIST }
@@ -1006,9 +1029,10 @@ RED.subflow = (function() {
if (tenv.hasOwnProperty('type')) {
val.type = tenv.type;
}
+ const elId = getSubflowEnvPropertyName(tenv.name)
switch(ui.type) {
case "input":
- input = $('
').css('width','70%').appendTo(row);
+ input = $('
').css('width','70%').attr('id', elId).appendTo(row);
if (ui.opts.types && ui.opts.types.length > 0) {
var inputType = val.type;
if (ui.opts.types.indexOf(inputType) === -1) {
@@ -1035,7 +1059,7 @@ RED.subflow = (function() {
}
break;
case "select":
- input = $('
').css('width','70%').appendTo(row);
+ input = $('').css('width','70%').attr('id', elId).appendTo(row);
if (ui.opts.opts) {
ui.opts.opts.forEach(function(o) {
$('').val(o.v).text(RED.editor.envVarList.lookupLabel(o.l, o.l['en-US']||o.v, locale)).appendTo(input);
@@ -1046,7 +1070,7 @@ RED.subflow = (function() {
case "checkbox":
label.css("cursor","default");
var cblabel = $('').css('width','70%').appendTo(row);
- input = $(' ').css({
+ input = $(' ').attr('id', elId).css({
marginTop: 0,
width: 'auto',
height: '34px'
@@ -1064,7 +1088,7 @@ RED.subflow = (function() {
input.prop("checked",boolVal);
break;
case "spinner":
- input = $(' ').css('width','70%').appendTo(row);
+ input = $(' ').css('width','70%').attr('id', elId).appendTo(row);
var spinnerOpts = {};
if (ui.opts.hasOwnProperty('min')) {
spinnerOpts.min = ui.opts.min;
@@ -1093,18 +1117,25 @@ RED.subflow = (function() {
default: 'cred'
})
break;
- }
- if (input) {
- input.attr('id',getSubflowEnvPropertyName(tenv.name))
+ case "conf-types":
+ // let clsId = 'config-node-input-' + val.type + '-' + val.value + '-' + Math.floor(Math.random() * 100000);
+ // clsId = clsId.replace(/\W/g, '-');
+ // input = $(' ').css('width','70%').addClass(clsId).attr('id', elId).appendTo(row);
+ input = $(' ').css('width','70%').attr('id', elId).appendTo(row);
+ const _type = tenv.parent?.type || tenv.type;
+ RED.editor.prepareConfigNodeSelect(node, tenv.name, _type, 'node-input-subflow-env', null, tenv);
+ break;
}
}
/**
- * Create environment variable input UI
+ * Build the edit form for a subflow instance
+ * Also used to build the preview form in the subflow template edit dialog
* @param uiContainer - container for UI
* @param envList - env var definitions of template
*/
function buildEnvUI(uiContainer, envList, node) {
+ if(RED.subflow.debug) { console.log("buildEnvUI",envList) }
uiContainer.empty();
for (var i = 0; i < envList.length; i++) {
var tenv = envList[i];
@@ -1112,7 +1143,7 @@ RED.subflow = (function() {
continue;
}
var row = $("
", { class: "form-row" }).appendTo(uiContainer);
- buildEnvUIRow(row,tenv, tenv.ui || {}, node);
+ buildEnvUIRow(row, tenv, node);
}
}
// buildEnvUI
@@ -1185,6 +1216,9 @@ RED.subflow = (function() {
delete ui.opts
}
break;
+ case "conf-types":
+ delete ui.opts;
+ break;
default:
delete ui.opts;
}
@@ -1207,8 +1241,9 @@ RED.subflow = (function() {
if (/^subflow:/.test(node.type)) {
var subflowDef = RED.nodes.subflow(node.type.substring(8));
if (subflowDef.env) {
- subflowDef.env.forEach(function(env) {
+ subflowDef.env.forEach(function(env, i) {
var item = {
+ index: i,
name:env.name,
parent: {
type: env.type,
@@ -1273,6 +1308,7 @@ RED.subflow = (function() {
}
function exportSubflowInstanceEnv(node) {
+ if(RED.subflow.debug) { console.log("exportSubflowInstanceEnv",node) }
var env = [];
// First, get the values for the SubflowTemplate defined properties
// - these are the ones with custom UI elements
@@ -1319,6 +1355,9 @@ RED.subflow = (function() {
item.type = 'bool';
item.value = ""+input.prop("checked");
break;
+ case "conf-types":
+ item.value = input.val()
+ item.type = data.parent.value;
}
if (ui.type === "cred" || item.type !== data.parent.type || item.value !== data.parent.value) {
env.push(item);
@@ -1332,8 +1371,15 @@ RED.subflow = (function() {
return 'node-input-subflow-env-'+name.replace(/[^a-z0-9-_]/ig,"_");
}
- // Called by subflow.oneditprepare for both instances and templates
+
+ /**
+ * Build the subflow edit form
+ * Called by subflow.oneditprepare for both instances and templates
+ * @param {"subflow"|"subflow-template"} type - the type of subflow being edited
+ * @param {Object} node - the node being edited
+ */
function buildEditForm(type,node) {
+ if(RED.subflow.debug) { console.log("buildEditForm",type,node) }
if (type === "subflow-template") {
// This is the tabbed UI that offers the env list - with UI options
// plus the preview tab
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-config.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-config.js
index 90ecf6093..e2c8185cb 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-config.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-config.js
@@ -158,6 +158,7 @@ RED.sidebar.config = (function() {
entry.data('node',node.id);
nodeDiv.data('node',node.id);
var label = $('
').text(labelText).appendTo(nodeDiv);
+
if (node.d) {
nodeDiv.addClass("red-ui-palette-node-config-disabled");
$(' ').prependTo(label);
@@ -179,6 +180,20 @@ RED.sidebar.config = (function() {
nodeDiv.addClass("red-ui-palette-node-config-unused");
}
}
+
+ if (!node.valid) {
+ nodeDiv.addClass("red-ui-palette-node-config-invalid")
+ const nodeDivAnnotations = $(' ').appendTo(nodeDiv)
+ const errorBadge = document.createElementNS("http://www.w3.org/2000/svg","path");
+ errorBadge.setAttribute("d","M 0,9 l 10,0 -5,-8 z");
+ nodeDivAnnotations.append($(errorBadge))
+ RED.popover.tooltip(nodeDivAnnotations, function () {
+ if (node.validationErrors && node.validationErrors.length > 0) {
+ return RED._("editor.errors.invalidProperties")+" - "+node.validationErrors.join(" - ")
+ }
+ })
+ }
+
nodeDiv.on('click',function(e) {
e.stopPropagation();
RED.view.select(false);
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-context.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-context.js
index 0d8ba103f..6cb034ccc 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-context.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-context.js
@@ -232,7 +232,7 @@ RED.sidebar.context = (function() {
typeHint: data.format,
sourceId: id+"."+k,
tools: tools,
- path: ""
+ path: k
}).appendTo(propRow.children()[1]);
}
})
@@ -278,7 +278,7 @@ RED.sidebar.context = (function() {
typeHint: data.format,
sourceId: id+"."+k,
tools: tools,
- path: ""
+ path: k
}).appendTo(propRow.children()[1]);
}
});
@@ -299,7 +299,7 @@ RED.sidebar.context = (function() {
typeHint: v.format,
sourceId: id+"."+k,
tools: tools,
- path: ""
+ path: k
}).appendTo(propRow.children()[1]);
if (contextStores.length > 1) {
$("",{class:"red-ui-sidebar-context-property-storename"}).text(v.store).appendTo($(propRow.children()[0]))
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-help.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-help.js
index ee4bad2d8..bf66611b1 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-help.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-help.js
@@ -383,6 +383,7 @@ RED.sidebar.help = (function() {
$(this).toggleClass('expanded',!isExpanded);
})
helpSection.parent().scrollTop(0);
+ RED.editor.mermaid.render()
}
function set(html,title) {
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info.js
index e38b0b67e..f72a7b3f2 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info.js
@@ -464,7 +464,7 @@ RED.sidebar.info = (function() {
}
$(this).toggleClass('expanded',!isExpanded);
});
- mermaid.init();
+ RED.editor.mermaid.render()
}
var tips = (function() {
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tour/tourGuide.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tour/tourGuide.js
index 7d16e640b..5ae66720c 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/tour/tourGuide.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tour/tourGuide.js
@@ -435,10 +435,15 @@ RED.tourGuide = (function() {
function listTour() {
return [
+ {
+ id: "4_0",
+ label: "4.0",
+ path: "./tours/welcome.js"
+ },
{
id: "3_1",
label: "3.1",
- path: "./tours/welcome.js"
+ path: "./tours/3.1/welcome.js"
},
{
id: "3_0",
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js b/packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js
index 4f47d4674..3d05fd1c8 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js
@@ -186,8 +186,15 @@ RED.typeSearch = (function() {
var iconContainer = $('
',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv);
RED.utils.createIconElement(icon_url, iconContainer, false);
-
- if (!/^_action_:/.test(object.type) && object.type !== "junction") {
+ if (/^subflow:/.test(object.type)) {
+ var sf = RED.nodes.subflow(object.type.substring(8));
+ if (sf.in.length > 0) {
+ $('
',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv);
+ }
+ if (sf.out.length > 0) {
+ $('
',{class:"red-ui-search-result-node-port red-ui-search-result-node-output"}).appendTo(nodeDiv);
+ }
+ } else if (!/^_action_:/.test(object.type) && object.type !== "junction") {
if (def.inputs > 0) {
$('
',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv);
}
@@ -323,7 +330,7 @@ RED.typeSearch = (function() {
}
}
function applyFilter(filter,type,def) {
- return !filter ||
+ return !def || !filter ||
(
(!filter.spliceMultiple) &&
(!filter.type || type === filter.type) &&
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js b/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js
index 4d8ccdd9d..94bf19718 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js
@@ -101,28 +101,8 @@ RED.utils = (function() {
renderer.code = function (code, lang) {
if(lang === "mermaid") {
- // mermaid diagram rendering
- if (mermaidIsEnabled === undefined) {
- if (RED.settings.markdownEditor &&
- RED.settings.markdownEditor.mermaid) {
- mermaidIsEnabled = RED.settings.markdownEditor.mermaid.enabled;
- }
- else {
- mermaidIsEnabled = true;
- }
- }
- if (mermaidIsEnabled) {
- if (!mermaidIsInitialized) {
- mermaidIsInitialized = true;
- mermaid.initialize({startOnLoad:false});
- }
- return `${code} `;
- }
- else {
- return `${RED._("markdownEditor.mermaid.summary")} ${code}
`;
- }
- }
- else {
+ return `${code} `;
+ } else {
return "" +code +"
";
}
};
@@ -503,6 +483,16 @@ RED.utils = (function() {
$(' ').css('backgroundColor',obj).appendTo(e);
}
+ let n = RED.nodes.node(obj) ?? RED.nodes.workspace(obj);
+ if (n) {
+ if (options.nodeSelector && "function" == typeof options.nodeSelector) {
+ e.css('cursor', 'pointer').on("click", function(evt) {
+ evt.preventDefault();
+ options.nodeSelector(n.id);
+ })
+ }
+ }
+
} else if (typeof obj === 'number') {
e = $(' ').appendTo(entryObj);
@@ -609,6 +599,7 @@ RED.utils = (function() {
exposeApi: exposeApi,
// tools: tools // Do not pass tools down as we
// keep them attached to the top-level header
+ nodeSelector: options.nodeSelector,
}
).appendTo(row);
}
@@ -639,6 +630,7 @@ RED.utils = (function() {
exposeApi: exposeApi,
// tools: tools // Do not pass tools down as we
// keep them attached to the top-level header
+ nodeSelector: options.nodeSelector,
}
).appendTo(row);
}
@@ -695,6 +687,7 @@ RED.utils = (function() {
exposeApi: exposeApi,
// tools: tools // Do not pass tools down as we
// keep them attached to the top-level header
+ nodeSelector: options.nodeSelector,
}
).appendTo(row);
}
@@ -917,6 +910,54 @@ RED.utils = (function() {
}
}
+ /**
+ * Checks a typed property is valid according to the type.
+ * Returns true if valid.
+ * Return String error message if invalid
+ * @param {*} propertyType
+ * @param {*} propertyValue
+ * @returns true if valid, String if invalid
+ */
+ function validateTypedProperty(propertyValue, propertyType, opt) {
+ if (propertyValue && /^\${[^}]+}$/.test(propertyValue)) {
+ // Allow ${ENV_VAR} value
+ return true
+ }
+ let error
+ if (propertyType === 'json') {
+ try {
+ JSON.parse(propertyValue);
+ } catch(err) {
+ error = RED._("validator.errors.invalid-json", {
+ error: err.message
+ })
+ }
+ } else if (propertyType === 'msg' || propertyType === 'flow' || propertyType === 'global' ) {
+ if (!RED.utils.validatePropertyExpression(propertyValue)) {
+ error = RED._("validator.errors.invalid-prop")
+ }
+ } else if (propertyType === 'num') {
+ if (!/^NaN$|^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$|^[+-]?(0b|0B)[01]+$|^[+-]?(0o|0O)[0-7]+$|^[+-]?(0x|0X)[0-9a-fA-F]+$/.test(propertyValue)) {
+ error = RED._("validator.errors.invalid-num")
+ }
+ } else if (propertyType === 'jsonata') {
+ try {
+ jsonata(propertyValue)
+ } catch(err) {
+ error = RED._("validator.errors.invalid-expr", {
+ error: err.message
+ })
+ }
+ }
+ if (error) {
+ if (opt && opt.label) {
+ return opt.label+': '+error
+ }
+ return error
+ }
+ return true
+ }
+
function getMessageProperty(msg,expr) {
var result = null;
var msgPropParts;
@@ -1451,6 +1492,7 @@ RED.utils = (function() {
getDarkerColor: getDarkerColor,
parseModuleList: parseModuleList,
checkModuleAllowed: checkModuleAllowed,
- getBrowserInfo: getBrowserInfo
+ getBrowserInfo: getBrowserInfo,
+ validateTypedProperty: validateTypedProperty
}
})();
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js
index 66c87b1a9..b3ed6a6cc 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js
@@ -4155,10 +4155,15 @@ RED.view = (function() {
scaleFactor = 30/largestEdge;
}
var width = img.width * scaleFactor;
+ if (width > 20) {
+ scaleFactor *= 20/width;
+ width = 20;
+ }
var height = img.height * scaleFactor;
icon.attr("width",width);
icon.attr("height",height);
icon.attr("x",15-width/2);
+ icon.attr("y",(30-height)/2);
}
icon.attr("xlink:href",iconUrl);
icon.style("display",null);
@@ -4187,7 +4192,7 @@ RED.view = (function() {
nodeEl.__statusGroup__.style.display = "none";
} else {
nodeEl.__statusGroup__.style.display = "inline";
- let backgroundWidth = 12
+ let backgroundWidth = 15
var fill = status_colours[d.status.fill]; // Only allow our colours for now
if (d.status.shape == null && fill == null) {
backgroundWidth = 0
@@ -4207,7 +4212,11 @@ RED.view = (function() {
nodeEl.__statusLabel__.textContent = "";
}
const textSize = nodeEl.__statusLabel__.getBBox()
- nodeEl.__statusBackground__.setAttribute('width', backgroundWidth + textSize.width + 6)
+ backgroundWidth += textSize.width
+ if (backgroundWidth > 0 && textSize.width > 0) {
+ backgroundWidth += 6
+ }
+ nodeEl.__statusBackground__.setAttribute('width', backgroundWidth)
}
delete d.dirtyStatus;
}
@@ -4619,8 +4628,8 @@ RED.view = (function() {
statusBackground.setAttribute("y",-1);
statusBackground.setAttribute("width",200);
statusBackground.setAttribute("height",13);
- statusBackground.setAttribute("rx",1);
- statusBackground.setAttribute("ry",1);
+ statusBackground.setAttribute("rx",2);
+ statusBackground.setAttribute("ry",2);
statusEl.appendChild(statusBackground);
node[0][0].__statusBackground__ = statusBackground;
@@ -6243,6 +6252,10 @@ RED.view = (function() {
}
})
}
+ if (selection.links) {
+ selectedLinks.clear();
+ selection.links.forEach(selectedLinks.add);
+ }
}
}
updateSelection();
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js b/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js
index 1a71577ce..2fa78f679 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js
@@ -17,6 +17,8 @@
RED.workspaces = (function() {
+ const documentTitle = document.title;
+
var activeWorkspace = 0;
var workspaceIndex = 0;
@@ -339,12 +341,18 @@ RED.workspaces = (function() {
$("#red-ui-workspace-chart").show();
activeWorkspace = tab.id;
window.location.hash = 'flow/'+tab.id;
+ if (tab.label) {
+ document.title = `${documentTitle} : ${tab.label}`
+ } else {
+ document.title = documentTitle
+ }
$("#red-ui-workspace").toggleClass("red-ui-workspace-disabled", !!tab.disabled);
$("#red-ui-workspace").toggleClass("red-ui-workspace-locked", !!tab.locked);
} else {
$("#red-ui-workspace-chart").hide();
activeWorkspace = 0;
window.location.hash = '';
+ document.title = documentTitle
}
event.workspace = activeWorkspace;
RED.events.emit("workspace:change",event);
diff --git a/packages/node_modules/@node-red/editor-client/src/js/validators.js b/packages/node_modules/@node-red/editor-client/src/js/validators.js
index 4fb384cbf..c17955ce1 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/validators.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/validators.js
@@ -16,8 +16,20 @@
RED.validators = {
number: function(blankAllowed,mopt){
return function(v, opt) {
- if ((blankAllowed&&(v===''||v===undefined)) || (v!=='' && !isNaN(v))) {
- return true;
+ if (blankAllowed && (v === '' || v === undefined)) {
+ return true
+ }
+ if (v !== '') {
+ if (/^NaN$|^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$|^[+-]?(0b|0B)[01]+$|^[+-]?(0o|0O)[0-7]+$|^[+-]?(0x|0X)[0-9a-fA-F]+$/.test(v)) {
+ return true
+ }
+ if (/^\${[^}]+}$/.test(v)) {
+ // Allow ${ENV_VAR} value
+ return true
+ }
+ }
+ if (!isNaN(v)) {
+ return true
}
if (opt && opt.label) {
return RED._("validator.errors.invalid-num-prop", {
@@ -40,46 +52,32 @@ RED.validators = {
return opt ? RED._("validator.errors.invalid-regexp") : false;
};
},
- typedInput: function(ptypeName,isConfig,mopt) {
+ typedInput: function(ptypeName, isConfig, mopt) {
+ let options = ptypeName
+ if (typeof ptypeName === 'string' ) {
+ options = {}
+ options.typeField = ptypeName
+ options.isConfig = isConfig
+ options.allowBlank = false
+ }
return function(v, opt) {
- var ptype = $("#node-"+(isConfig?"config-":"")+"input-"+ptypeName).val() || this[ptypeName];
- if (ptype === 'json') {
- try {
- JSON.parse(v);
- return true;
- } catch(err) {
- if (opt && opt.label) {
- return RED._("validator.errors.invalid-json-prop", {
- error: err.message,
- prop: opt.label,
- });
- }
- return opt ? RED._("validator.errors.invalid-json", {
- error: err.message
- }) : false;
- }
- } else if (ptype === 'msg' || ptype === 'flow' || ptype === 'global' ) {
- if (RED.utils.validatePropertyExpression(v)) {
- return true;
- }
- if (opt && opt.label) {
- return RED._("validator.errors.invalid-prop-prop", {
- prop: opt.label
- });
- }
- return opt ? RED._("validator.errors.invalid-prop") : false;
- } else if (ptype === 'num') {
- if (/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/.test(v)) {
- return true;
- }
- if (opt && opt.label) {
- return RED._("validator.errors.invalid-num-prop", {
- prop: opt.label
- });
- }
- return opt ? RED._("validator.errors.invalid-num") : false;
+ let ptype = options.type
+ if (!ptype && options.typeField) {
+ ptype = $("#node-"+(options.isConfig?"config-":"")+"input-"+options.typeField).val() || this[options.typeField];
}
- return true;
- };
+ if (options.allowBlank && v === '') {
+ return true
+ }
+ if (options.allowUndefined && v === undefined) {
+ return true
+ }
+ const result = RED.utils.validateTypedProperty(v, ptype, opt)
+ if (result === true || opt) {
+ // Valid, or opt provided - return result as-is
+ return result
+ }
+ // No opt - need to return false for backwards compatibilty
+ return false
+ }
}
-};
+};
\ No newline at end of file
diff --git a/packages/node_modules/@node-red/editor-client/src/sass/base.scss b/packages/node_modules/@node-red/editor-client/src/sass/base.scss
index 92a98913f..58e77863d 100644
--- a/packages/node_modules/@node-red/editor-client/src/sass/base.scss
+++ b/packages/node_modules/@node-red/editor-client/src/sass/base.scss
@@ -38,7 +38,7 @@ body {
}
#red-ui-main-container {
position: absolute;
- top:40px; left:0; bottom: 0; right:0;
+ top: var(--red-ui-header-height); left:0; bottom: 0; right:0;
overflow:hidden;
}
diff --git a/packages/node_modules/@node-red/editor-client/src/sass/colors.scss b/packages/node_modules/@node-red/editor-client/src/sass/colors.scss
index ce71bcdba..b561fde16 100644
--- a/packages/node_modules/@node-red/editor-client/src/sass/colors.scss
+++ b/packages/node_modules/@node-red/editor-client/src/sass/colors.scss
@@ -259,7 +259,8 @@ $deploy-button-background-disabled-hover: #555;
$header-background: #000;
$header-button-background-active: #121212;
-$header-menu-color: #C7C7C7;
+$header-accent: #d41313;
+$header-menu-color: #eee;
$header-menu-color-disabled: #666;
$header-menu-heading-color: #fff;
$header-menu-sublabel-color: #aeaeae;
diff --git a/packages/node_modules/@node-red/editor-client/src/sass/flow.scss b/packages/node_modules/@node-red/editor-client/src/sass/flow.scss
index bd83e3eff..723e8ac79 100644
--- a/packages/node_modules/@node-red/editor-client/src/sass/flow.scss
+++ b/packages/node_modules/@node-red/editor-client/src/sass/flow.scss
@@ -114,6 +114,7 @@
pointer-events: stroke;
}
.red-ui-flow-group-outline-select {
+ cursor: move;
fill: none;
stroke: var(--red-ui-node-selected-color);
pointer-events: none;
diff --git a/packages/node_modules/@node-red/editor-client/src/sass/header.scss b/packages/node_modules/@node-red/editor-client/src/sass/header.scss
index 723c1e9bd..a80ad3a17 100644
--- a/packages/node_modules/@node-red/editor-client/src/sass/header.scss
+++ b/packages/node_modules/@node-red/editor-client/src/sass/header.scss
@@ -23,16 +23,20 @@
top: 0;
left: 0;
width: 100%;
- height: 40px;
+ height: var(--red-ui-header-height);
background: var(--red-ui-header-background);
box-sizing: border-box;
padding: 0px 0px 0px 20px;
color: var(--red-ui-header-menu-color);
font-size: 14px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ border-bottom: 2px solid var(--red-ui-header-accent);
+ padding-top: 2px;
span.red-ui-header-logo {
float: left;
- margin-top: 5px;
font-size: 30px;
line-height: 30px;
text-decoration: none;
@@ -42,7 +46,7 @@
vertical-align: middle;
font-size: 16px !important;
&:not(:first-child) {
- margin-left: 5px;
+ margin-left: 8px;
}
}
img {
diff --git a/packages/node_modules/@node-red/editor-client/src/sass/library.scss b/packages/node_modules/@node-red/editor-client/src/sass/library.scss
index bb651e4ea..0b6ca55ed 100644
--- a/packages/node_modules/@node-red/editor-client/src/sass/library.scss
+++ b/packages/node_modules/@node-red/editor-client/src/sass/library.scss
@@ -194,10 +194,6 @@
}
}
.red-ui-clipboard-dialog-import-conflicts-controls {
- position: absolute;
- top:0;
- bottom: 0;
- right: 0px;
text-align: center;
color: var(--red-ui-form-text-color);
.form-row & label {
@@ -218,9 +214,21 @@
margin: 0;
}
}
-#red-ui-clipboard-dialog-import-conflicts-list .disabled .red-ui-info-outline-item {
- opacity: 0.4;
+#red-ui-clipboard-dialog-import-conflicts-list .disabled {
+ .red-ui-info-outline-item,
+ .red-ui-node-list-item {
+ opacity: 0.4;
+ }
}
+#red-ui-clipboard-dialog-import-conflicts-list .red-ui-node-list-item {
+ display: flex;
+ align-items: center;
+
+ & > :first-child {
+ flex-grow: 1
+ }
+}
+
.form-row label.red-ui-clipboard-dialog-import-conflicts-gutter {
box-sizing: border-box;
width: 22px;
diff --git a/packages/node_modules/@node-red/editor-client/src/sass/projects.scss b/packages/node_modules/@node-red/editor-client/src/sass/projects.scss
index a32fd53b4..f6bd57375 100644
--- a/packages/node_modules/@node-red/editor-client/src/sass/projects.scss
+++ b/packages/node_modules/@node-red/editor-client/src/sass/projects.scss
@@ -825,6 +825,7 @@ div.red-ui-projects-dialog-ssh-public-key {
margin-top: 0 !important;
padding: 5px 10px;
margin-bottom: 10px;
+ border-radius: 3px 3px 0px 0px;
}
}
diff --git a/packages/node_modules/@node-red/editor-client/src/sass/sizes.scss b/packages/node_modules/@node-red/editor-client/src/sass/sizes.scss
new file mode 100644
index 000000000..a3d48e76d
--- /dev/null
+++ b/packages/node_modules/@node-red/editor-client/src/sass/sizes.scss
@@ -0,0 +1,17 @@
+/**
+ * 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.
+ **/
+
+ $header-height: 48px;
\ No newline at end of file
diff --git a/packages/node_modules/@node-red/editor-client/src/sass/style-custom-theme.scss b/packages/node_modules/@node-red/editor-client/src/sass/style-custom-theme.scss
index 1202d9fb7..312081503 100644
--- a/packages/node_modules/@node-red/editor-client/src/sass/style-custom-theme.scss
+++ b/packages/node_modules/@node-red/editor-client/src/sass/style-custom-theme.scss
@@ -15,4 +15,5 @@
**/
@import "colors";
+@import "sizes";
@import "variables";
\ No newline at end of file
diff --git a/packages/node_modules/@node-red/editor-client/src/sass/style.scss b/packages/node_modules/@node-red/editor-client/src/sass/style.scss
index 7910832ad..412290f78 100644
--- a/packages/node_modules/@node-red/editor-client/src/sass/style.scss
+++ b/packages/node_modules/@node-red/editor-client/src/sass/style.scss
@@ -15,6 +15,7 @@
**/
@import "colors";
+@import "sizes";
@import "variables";
@import "mixins";
diff --git a/packages/node_modules/@node-red/editor-client/src/sass/tab-config.scss b/packages/node_modules/@node-red/editor-client/src/sass/tab-config.scss
index c1f151ca6..9d678daa1 100644
--- a/packages/node_modules/@node-red/editor-client/src/sass/tab-config.scss
+++ b/packages/node_modules/@node-red/editor-client/src/sass/tab-config.scss
@@ -36,7 +36,7 @@ ul.red-ui-sidebar-node-config-list {
text-align: center;
}
.red-ui-palette-node {
- overflow: hidden;
+ // overflow: hidden;
cursor: default;
&.selected {
border-color: transparent;
@@ -113,6 +113,15 @@ ul.red-ui-sidebar-node-config-list li.red-ui-palette-node-config-type {
margin-right: 5px;
}
}
+.red-ui-palette-node-config-invalid {
+ border-color: var(--red-ui-form-input-border-error-color)
+}
+.red-ui-palette-node-annotations {
+ position: absolute;
+ left: calc(100% - 15px);
+ top: -8px;
+ display: block;
+}
.red-ui-sidebar-node-config-filter-info {
position: absolute;
top: 0;
diff --git a/packages/node_modules/@node-red/editor-client/src/sass/variables.scss b/packages/node_modules/@node-red/editor-client/src/sass/variables.scss
index 50e1c9310..c04c26ff9 100644
--- a/packages/node_modules/@node-red/editor-client/src/sass/variables.scss
+++ b/packages/node_modules/@node-red/editor-client/src/sass/variables.scss
@@ -16,6 +16,9 @@
--red-ui-shadow: #{$shadow};
+ // Header Height
+ --red-ui-header-height: #{$header-height};
+
// Main body text
--red-ui-primary-text-color: #{$primary-text-color};
// UI control label text
@@ -240,6 +243,7 @@
--red-ui-header-background: #{$header-background};
+ --red-ui-header-accent: #{$header-accent};
--red-ui-header-button-background-active: #{$header-button-background-active};
--red-ui-header-menu-color: #{$header-menu-color};
--red-ui-header-menu-color-disabled: #{$header-menu-color-disabled};
diff --git a/packages/node_modules/@node-red/editor-client/src/tours/images/context-menu.png b/packages/node_modules/@node-red/editor-client/src/tours/3.1/images/context-menu.png
similarity index 100%
rename from packages/node_modules/@node-red/editor-client/src/tours/images/context-menu.png
rename to packages/node_modules/@node-red/editor-client/src/tours/3.1/images/context-menu.png
diff --git a/packages/node_modules/@node-red/editor-client/src/tours/images/global-env-vars.png b/packages/node_modules/@node-red/editor-client/src/tours/3.1/images/global-env-vars.png
similarity index 100%
rename from packages/node_modules/@node-red/editor-client/src/tours/images/global-env-vars.png
rename to packages/node_modules/@node-red/editor-client/src/tours/3.1/images/global-env-vars.png
diff --git a/packages/node_modules/@node-red/editor-client/src/tours/images/hiding-flows.png b/packages/node_modules/@node-red/editor-client/src/tours/3.1/images/hiding-flows.png
similarity index 100%
rename from packages/node_modules/@node-red/editor-client/src/tours/images/hiding-flows.png
rename to packages/node_modules/@node-red/editor-client/src/tours/3.1/images/hiding-flows.png
diff --git a/packages/node_modules/@node-red/editor-client/src/tours/images/locking-flows.png b/packages/node_modules/@node-red/editor-client/src/tours/3.1/images/locking-flows.png
similarity index 100%
rename from packages/node_modules/@node-red/editor-client/src/tours/images/locking-flows.png
rename to packages/node_modules/@node-red/editor-client/src/tours/3.1/images/locking-flows.png
diff --git a/packages/node_modules/@node-red/editor-client/src/tours/images/mermaid.png b/packages/node_modules/@node-red/editor-client/src/tours/3.1/images/mermaid.png
similarity index 100%
rename from packages/node_modules/@node-red/editor-client/src/tours/images/mermaid.png
rename to packages/node_modules/@node-red/editor-client/src/tours/3.1/images/mermaid.png
diff --git a/packages/node_modules/@node-red/editor-client/src/tours/images/node-help.png b/packages/node_modules/@node-red/editor-client/src/tours/3.1/images/node-help.png
similarity index 100%
rename from packages/node_modules/@node-red/editor-client/src/tours/images/node-help.png
rename to packages/node_modules/@node-red/editor-client/src/tours/3.1/images/node-help.png
diff --git a/packages/node_modules/@node-red/editor-client/src/tours/images/tab-changes.png b/packages/node_modules/@node-red/editor-client/src/tours/3.1/images/tab-changes.png
similarity index 100%
rename from packages/node_modules/@node-red/editor-client/src/tours/images/tab-changes.png
rename to packages/node_modules/@node-red/editor-client/src/tours/3.1/images/tab-changes.png
diff --git a/packages/node_modules/@node-red/editor-client/src/tours/3.1/welcome.js b/packages/node_modules/@node-red/editor-client/src/tours/3.1/welcome.js
new file mode 100644
index 000000000..ce48fb45f
--- /dev/null
+++ b/packages/node_modules/@node-red/editor-client/src/tours/3.1/welcome.js
@@ -0,0 +1,231 @@
+export default {
+ version: "3.1.0",
+ steps: [
+ {
+ titleIcon: "fa fa-map-o",
+ title: {
+ "en-US": "Welcome to Node-RED 3.1!",
+ "ja": "Node-RED 3.1へようこそ!",
+ "fr": "Bienvenue dans Node-RED 3.1!"
+ },
+ description: {
+ "en-US": "Let's take a moment to discover the new features in this release.
",
+ "ja": "本リリースの新機能を見つけてみましょう。
",
+ "fr": "Prenons un moment pour découvrir les nouvelles fonctionnalités de cette version.
"
+ }
+ },
+ {
+ title: {
+ "en-US": "New ways to work with groups",
+ "ja": "グループの新たな操作方法",
+ "fr": "De nouvelles façons de travailler avec les groupes"
+ },
+ description: {
+ "en-US": `We have changed how you interact with groups in the editor.
+
+ They don't get in the way when clicking on a node
+ They can be reordered using the Moving Forwards and Move Backwards actions
+ Multiple nodes can be dragged into a group in one go
+ Holding Alt
when dragging a node will *remove* it from its group
+ `,
+ "ja": `エディタ上のグループの操作が変更されました。
+
+ グループ内のノードをクリックする時に、グループが邪魔をすることが無くなりました。
+ 「前面へ移動」と「背面へ移動」の動作を用いて、複数のグループの表示順序を変えることができます。
+ グループ内へ一度に複数のノードをドラッグできるようになりました。
+ Alt
を押したまま、グループ内のノードをドラッグすると、そのグループから *除く* ことができます。
+ `,
+ "fr": `Nous avons modifié la façon dont vous interagissez avec les groupes dans l'éditeur.
+
+ Ils ne gênent plus lorsque vous cliquez sur un noeud
+ Ils peuvent être réorganisés à l'aide des actions Avancer et Reculer
+ Plusieurs noeuds peuvent être glissés dans un groupe en une seule fois
+ Maintenir Alt
lors du déplacement d'un noeud le *supprimera* de son groupe
+ `
+ }
+ },
+ {
+ title: {
+ "en-US": "Change notification on tabs",
+ "ja": "タブ上の変更通知",
+ "fr": "Notification de changement sur les onglets"
+ },
+ image: '3.1/images/tab-changes.png',
+ description: {
+ "en-US": `When a tab contains undeployed changes it now shows the
+ same style of change icon used by nodes.
+ This will make it much easier to track down changes when you're
+ working across multiple flows.
`,
+ "ja": `タブ内にデプロイされていない変更が存在する時は、ノードと同じスタイルで変更の印が表示されるようになりました。
+ これによって複数のフローを編集している時に、変更を見つけるのが簡単になりました。
`,
+ "fr": `Lorsqu'un onglet contient des modifications non déployées, il affiche désormais le
+ même style d'icône de changement utilisé par les noeuds.
+ Cela facilitera grandement le suivi des modifications lorsque vous
+ travaillez sur plusieurs flux.
`
+ }
+ },
+ {
+ title: {
+ "en-US": "A bigger canvas to work with",
+ "ja": "より広くなった作業キャンバス",
+ "fr": "Un canevas plus grand pour travailler"
+ },
+ description: {
+ "en-US": `The default canvas size has been increased so you can fit more
+ into one flow.
+ We still recommend using tools such as subflows and Link Nodes to help
+ keep things organised, but now you have more room to work in.
`,
+ "ja": `標準のキャンバスが広くなったため、1つのフローに沢山のものを含めることができるようになりました。
+ 引き続き、サブフローやリンクノードなどの方法を用いて整理することをお勧めしますが、作業できる場所が増えました。
`,
+ "fr": `La taille par défaut du canevas a été augmentée pour que vous puissiez en mettre plus
+ sur un seul flux.
+ Nous recommandons toujours d'utiliser des outils tels que les sous-flux et les noeuds de lien pour vous aider
+ à garder les choses organisées, mais vous avez maintenant plus d'espace pour travailler.
`
+ }
+ },
+ {
+ title: {
+ "en-US": "Finding help",
+ "ja": "ヘルプを見つける",
+ "fr": "Trouver de l'aide"
+ },
+ image: '3.1/images/node-help.png',
+ description: {
+ "en-US": `All node edit dialogs now include a link to that node's help
+ in the footer.
+ Clicking it will open up the Help sidebar showing the help for that node.
`,
+ "ja": `全てのノードの編集ダイアログの下に、ノードのヘルプへのリンクが追加されました。
+ これをクリックすると、ノードのヘルプサイドバーが表示されます。
`,
+ "fr": `Toutes les boîtes de dialogue d'édition de noeud incluent désormais un lien vers l'aide de ce noeud
+ dans le pied de page.
+ Cliquer dessus ouvrira la barre latérale d'aide affichant l'aide pour ce noeud.
`
+ }
+ },
+ {
+ title: {
+ "en-US": "Improved Context Menu",
+ "ja": "コンテキストメニューの改善",
+ "fr": "Menu contextuel amélioré"
+ },
+ image: '3.1/images/context-menu.png',
+ description: {
+ "en-US": `The editor's context menu has been expanded to make lots more of
+ the built-in actions available.
+ Adding nodes, working with groups and plenty
+ of other useful tools are now just a click away.
+ The flow tab bar also has its own context menu to make working
+ with your flows much easier.
`,
+ "ja": `より多くの組み込み動作を利用できるように、エディタのコンテキストメニューが拡張されました。
+ ノードの追加、グループの操作、その他の便利なツールをクリックするだけで実行できるようになりました。
+ フローのタブバーには、フローの操作をより簡単にする独自のコンテキストメニューもあります。
`,
+ "fr": `Le menu contextuel de l'éditeur a été étendu pour faire beaucoup plus d'actions intégrées disponibles.
+ Ajouter des noeuds, travailler avec des groupes et beaucoup d'autres outils utiles sont désormais à portée de clic.
+ La barre d'onglets de flux possède également son propre menu contextuel pour faciliter l'utilisation de vos flux.
`
+ }
+ },
+ {
+ title: {
+ "en-US": "Hiding Flows",
+ "ja": "フローを非表示",
+ "fr": "Masquage de flux"
+ },
+ image: '3.1/images/hiding-flows.png',
+ description: {
+ "en-US": `Hiding flows is now done through the flow context menu.
+ The 'hide' button in previous releases has been removed from the tabs
+ as they were being clicked accidentally too often.
`,
+ "ja": `フローを非表示にする機能は、フローのコンテキストメニューから実行するようになりました。
+ これまでのリリースでタブに存在していた「非表示」ボタンは、よく誤ってクリックされていたため、削除されました。
`,
+ "fr": `Le masquage des flux s'effectue désormais via le menu contextuel du flux.
+ Le bouton "Masquer" des versions précédentes a été supprimé des onglets
+ car il était cliqué accidentellement trop souvent.
`
+ },
+ },
+ {
+ title: {
+ "en-US": "Locking Flows",
+ "ja": "フローを固定",
+ "fr": "Verrouillage de flux"
+ },
+ image: '3.1/images/locking-flows.png',
+ description: {
+ "en-US": `Flows can now be locked to prevent accidental changes being made.
+ When locked you cannot modify the nodes in any way.
+ The flow context menu provides the options to lock and unlock flows,
+ as well as in the Info sidebar explorer.
`,
+ "ja": `誤ってフローに変更が加えられてしまうのを防ぐために、フローを固定できるようになりました。
+ 固定されている時は、ノードを修正することはできません。
+ フローのコンテキストメニューと、情報サイドバーのエクスプローラには、フローの固定や解除をするためのオプションが用意されています。
`,
+ "fr": `Les flux peuvent désormais être verrouillés pour éviter toute modification accidentelle.
+ Lorsqu'il est verrouillé, vous ne pouvez en aucun cas modifier les noeuds.
+ Le menu contextuel du flux fournit les options pour verrouiller et déverrouiller les flux,
+ ainsi que dans l'explorateur de la barre latérale d'informations.
`
+ },
+ },
+ {
+ title: {
+ "en-US": "Adding Images to node/flow descriptions",
+ "ja": "ノードやフローの説明へ画像を追加",
+ "fr": "Ajout d'images aux descriptions de noeud/flux"
+ },
+ // image: 'images/debug-path-tooltip.png',
+ description: {
+ "en-US": `You can now add images to a node's or flows's description.
+ Simply drag the image into the text editor and it will get added inline.
+ When the description is shown in the Info sidebar, the image will be displayed.
`,
+ "ja": `ノードまたはフローの説明に、画像を追加できるようになりました。
+ 画像をテキストエディタにドラッグするだけで、行内に埋め込まれます。
+ 情報サイドバーの説明を開くと、その画像が表示されます。
`,
+ "fr": `Vous pouvez désormais ajouter des images à la description d'un noeud ou d'un flux.
+ Faites simplement glisser l'image dans l'éditeur de texte et elle sera ajoutée en ligne.
+ Lorsque la description s'affiche dans la barre latérale d'informations, l'image s'affiche.
`
+ },
+ },
+ {
+ title: {
+ "en-US": "Adding Mermaid Diagrams",
+ "ja": "Mermaid図を追加",
+ "fr": "Ajout de diagrammes Mermaid"
+ },
+ image: '3.1/images/mermaid.png',
+ description: {
+ "en-US": `You can also add Mermaid diagrams directly into your node or flow descriptions.
+ This gives you much richer options for documenting your flows.
`,
+ "ja": `ノードやフローの説明に、Mermaid 図を直接追加することもできます。
+ これによって、フローを説明する文書作成の選択肢がより多くなります。
`,
+ "fr": `Vous pouvez également ajouter des diagrammes Mermaid directement dans vos descriptions de noeud ou de flux.
+ Cela vous offre des options beaucoup plus riches pour documenter vos flux.
`
+ },
+ },
+ {
+ title: {
+ "en-US": "Managing Global Environment Variables",
+ "ja": "グローバル環境変数の管理",
+ "fr": "Gestion des variables d'environnement globales"
+ },
+ image: '3.1/images/global-env-vars.png',
+ description: {
+ "en-US": `You can set environment variables that apply to all nodes and flows in the new
+ 'Global Environment Variables' section of User Settings.
`,
+ "ja": `ユーザ設定に新しく追加された「グローバル環境変数」のセクションで、全てのノードとフローに適用される環境変数を登録できます。
`,
+ "fr": `Vous pouvez définir des variables d'environnement qui s'appliquent à tous les noeuds et flux dans la nouvelle
+ section "Global Environment Variables" des paramètres utilisateur.
`
+ },
+ },
+ {
+ title: {
+ "en-US": "Node Updates",
+ "ja": "ノードの更新",
+ "fr": "Mises à jour des noeuds"
+ },
+ // image: "images/",
+ description: {
+ "en-US": `The core nodes have received lots of minor fixes, documentation updates and
+ small enhancements. Check the full changelog in the Help sidebar for a full list.
`,
+ "ja": `コアノードにマイナーな修正、ドキュメント更新、小規模な拡張が数多く追加されています。全ての一覧は、ヘルプサイドバーの全ての更新履歴を確認してください。
`,
+ "fr": `Les noeuds principaux ont reçu de nombreux correctifs mineurs, mises à jour de la documentation et
+ petites améliorations. Consulter le journal des modifications complet dans la barre latérale d'aide.
`
+ }
+ }
+ ]
+}
diff --git a/packages/node_modules/@node-red/editor-client/src/tours/images/nr4-auto-complete.png b/packages/node_modules/@node-red/editor-client/src/tours/images/nr4-auto-complete.png
new file mode 100644
index 000000000..f4522bcc3
Binary files /dev/null and b/packages/node_modules/@node-red/editor-client/src/tours/images/nr4-auto-complete.png differ
diff --git a/packages/node_modules/@node-red/editor-client/src/tours/images/nr4-sf-config.png b/packages/node_modules/@node-red/editor-client/src/tours/images/nr4-sf-config.png
new file mode 100644
index 000000000..dd5f28199
Binary files /dev/null and b/packages/node_modules/@node-red/editor-client/src/tours/images/nr4-sf-config.png differ
diff --git a/packages/node_modules/@node-red/editor-client/src/tours/images/nr4-timestamp-formatting.png b/packages/node_modules/@node-red/editor-client/src/tours/images/nr4-timestamp-formatting.png
new file mode 100644
index 000000000..8f832c273
Binary files /dev/null and b/packages/node_modules/@node-red/editor-client/src/tours/images/nr4-timestamp-formatting.png differ
diff --git a/packages/node_modules/@node-red/editor-client/src/tours/welcome.js b/packages/node_modules/@node-red/editor-client/src/tours/welcome.js
index 371a1b31c..9cb278567 100644
--- a/packages/node_modules/@node-red/editor-client/src/tours/welcome.js
+++ b/packages/node_modules/@node-red/editor-client/src/tours/welcome.js
@@ -1,12 +1,12 @@
export default {
- version: "3.1.0",
+ version: "4.0.0-beta.1",
steps: [
{
titleIcon: "fa fa-map-o",
title: {
- "en-US": "Welcome to Node-RED 3.1!",
- "ja": "Node-RED 3.1へようこそ!",
- "fr": "Bienvenue dans Node-RED 3.1!"
+ "en-US": "Welcome to Node-RED 4.0 Beta 1!",
+ "ja": "Node-RED 4.0 Beta 1へようこそ!",
+ "fr": "Bienvenue dans Node-RED 4.0 Beta 1!"
},
description: {
"en-US": "Let's take a moment to discover the new features in this release.
",
@@ -16,202 +16,58 @@ export default {
},
{
title: {
- "en-US": "New ways to work with groups",
- "ja": "グループの新たな操作方法",
- "fr": "De nouvelles façons de travailler avec les groupes"
+ "en-US": "Timestamp formatting options",
+ "ja": "タイムスタンプの形式の項目"
},
+ image: 'images/nr4-timestamp-formatting.png',
description: {
- "en-US": `We have changed how you interact with groups in the editor.
+ "en-US": `Nodes that let you set a timestamp now have options on what format that timestamp should be in.
+ We're keeping it simple to begin with by providing three options:
- They don't get in the way when clicking on a node
- They can be reordered using the Moving Forwards and Move Backwards actions
- Multiple nodes can be dragged into a group in one go
- Holding Alt
when dragging a node will *remove* it from its group
+ Milliseconds since epoch - this is existing behaviour of the timestamp option
+ ISO 8601 - a common format used by many systems
+ JavaScript Date Object
`,
- "ja": `エディタ上のグループの操作が変更されました。
+ "ja": `タイムスタンプを設定するノードに、タイムスタンプの形式を指定できる項目が追加されました。
+ 次の3つの項目を追加したことで、簡単に選択できるようになりました:
- グループ内のノードをクリックする時に、グループが邪魔をすることが無くなりました。
- 「前面へ移動」と「背面へ移動」の動作を用いて、複数のグループの表示順序を変えることができます。
- グループ内へ一度に複数のノードをドラッグできるようになりました。
- Alt
を押したまま、グループ内のノードをドラッグすると、そのグループから *除く* ことができます。
- `,
- "fr": `Nous avons modifié la façon dont vous interagissez avec les groupes dans l'éditeur.
-
- Ils ne gênent plus lorsque vous cliquez sur un noeud
- Ils peuvent être réorganisés à l'aide des actions Avancer et Reculer
- Plusieurs noeuds peuvent être glissés dans un groupe en une seule fois
- Maintenir Alt
lors du déplacement d'un noeud le *supprimera* de son groupe
+ エポックからのミリ秒 - 従来動作と同じになるタイムスタンプの項目
+ ISO 8601 - 多くのシステムで使用されている共通の形式
+ JavaScript日付オブジェクト
`
}
},
{
title: {
- "en-US": "Change notification on tabs",
- "ja": "タブ上の変更通知",
- "fr": "Notification de changement sur les onglets"
+ "en-US": "Auto-complete of flow/global and env types",
+ "ja": "フロー/グローバル、環境変数の型の自動補完"
},
- image: 'images/tab-changes.png',
+ image: 'images/nr4-auto-complete.png',
description: {
- "en-US": `When a tab contains undeployed changes it now shows the
- same style of change icon used by nodes.
- This will make it much easier to track down changes when you're
- working across multiple flows.
`,
- "ja": `タブ内にデプロイされていない変更が存在する時は、ノードと同じスタイルで変更の印が表示されるようになりました。
- これによって複数のフローを編集している時に、変更を見つけるのが簡単になりました。
`,
- "fr": `Lorsqu'un onglet contient des modifications non déployées, il affiche désormais le
- même style d'icône de changement utilisé par les noeuds.
- Cela facilitera grandement le suivi des modifications lorsque vous
- travaillez sur plusieurs flux.
`
+ "en-US": `The flow
/global
context inputs and the env
input
+ now all include auto-complete suggestions based on the live state of your flows.
+ `,
+ "ja": `flow
/global
コンテキストやenv
の入力を、現在のフローの状態をもとに自動補完で提案するようになりました。
+ `
}
},
{
title: {
- "en-US": "A bigger canvas to work with",
- "ja": "より広くなった作業キャンバス",
- "fr": "Un canevas plus grand pour travailler"
+ "en-US": "Config node customisation in Subflows",
+ "ja": "サブフローでの設定ノードのカスタマイズ"
},
+ image: 'images/nr4-sf-config.png',
description: {
- "en-US": `The default canvas size has been increased so you can fit more
- into one flow.
- We still recommend using tools such as subflows and Link Nodes to help
- keep things organised, but now you have more room to work in.
`,
- "ja": `標準のキャンバスが広くなったため、1つのフローに沢山のものを含めることができるようになりました。
- 引き続き、サブフローやリンクノードなどの方法を用いて整理することをお勧めしますが、作業できる場所が増えました。
`,
- "fr": `La taille par défaut du canevas a été augmentée pour que vous puissiez en mettre plus
- sur un seul flux.
- Nous recommandons toujours d'utiliser des outils tels que les sous-flux et les noeuds de lien pour vous aider
- à garder les choses organisées, mais vous avez maintenant plus d'espace pour travailler.
`
+ "en-US": `Subflows can now be customised to allow each instance to use a different
+ config node of a selected type.
+ For example, each instance of a subflow that connects to an MQTT Broker and does some post-processing
+ of the messages received can be pointed at a different broker.
+ `,
+ "ja": `サブフローをカスタマイズして、選択した型の異なる設定ノードを各インスタンスが使用できるようになりました。
+ 例えば、MQTTブローカへ接続し、メッセージ受信と後処理を行うサブフローの各インスタンスに異なるブローカを指定することも可能です。
+ `
}
},
- {
- title: {
- "en-US": "Finding help",
- "ja": "ヘルプを見つける",
- "fr": "Trouver de l'aide"
- },
- image: 'images/node-help.png',
- description: {
- "en-US": `All node edit dialogs now include a link to that node's help
- in the footer.
- Clicking it will open up the Help sidebar showing the help for that node.
`,
- "ja": `全てのノードの編集ダイアログの下に、ノードのヘルプへのリンクが追加されました。
- これをクリックすると、ノードのヘルプサイドバーが表示されます。
`,
- "fr": `Toutes les boîtes de dialogue d'édition de noeud incluent désormais un lien vers l'aide de ce noeud
- dans le pied de page.
- Cliquer dessus ouvrira la barre latérale d'aide affichant l'aide pour ce noeud.
`
- }
- },
- {
- title: {
- "en-US": "Improved Context Menu",
- "ja": "コンテキストメニューの改善",
- "fr": "Menu contextuel amélioré"
- },
- image: 'images/context-menu.png',
- description: {
- "en-US": `The editor's context menu has been expanded to make lots more of
- the built-in actions available.
- Adding nodes, working with groups and plenty
- of other useful tools are now just a click away.
- The flow tab bar also has its own context menu to make working
- with your flows much easier.
`,
- "ja": `より多くの組み込み動作を利用できるように、エディタのコンテキストメニューが拡張されました。
- ノードの追加、グループの操作、その他の便利なツールをクリックするだけで実行できるようになりました。
- フローのタブバーには、フローの操作をより簡単にする独自のコンテキストメニューもあります。
`,
- "fr": `Le menu contextuel de l'éditeur a été étendu pour faire beaucoup plus d'actions intégrées disponibles.
- Ajouter des noeuds, travailler avec des groupes et beaucoup d'autres outils utiles sont désormais à portée de clic.
- La barre d'onglets de flux possède également son propre menu contextuel pour faciliter l'utilisation de vos flux.
`
- }
- },
- {
- title: {
- "en-US": "Hiding Flows",
- "ja": "フローを非表示",
- "fr": "Masquage de flux"
- },
- image: 'images/hiding-flows.png',
- description: {
- "en-US": `Hiding flows is now done through the flow context menu.
- The 'hide' button in previous releases has been removed from the tabs
- as they were being clicked accidentally too often.
`,
- "ja": `フローを非表示にする機能は、フローのコンテキストメニューから実行するようになりました。
- これまでのリリースでタブに存在していた「非表示」ボタンは、よく誤ってクリックされていたため、削除されました。
`,
- "fr": `Le masquage des flux s'effectue désormais via le menu contextuel du flux.
- Le bouton "Masquer" des versions précédentes a été supprimé des onglets
- car il était cliqué accidentellement trop souvent.
`
- },
- },
- {
- title: {
- "en-US": "Locking Flows",
- "ja": "フローを固定",
- "fr": "Verrouillage de flux"
- },
- image: 'images/locking-flows.png',
- description: {
- "en-US": `Flows can now be locked to prevent accidental changes being made.
- When locked you cannot modify the nodes in any way.
- The flow context menu provides the options to lock and unlock flows,
- as well as in the Info sidebar explorer.
`,
- "ja": `誤ってフローに変更が加えられてしまうのを防ぐために、フローを固定できるようになりました。
- 固定されている時は、ノードを修正することはできません。
- フローのコンテキストメニューと、情報サイドバーのエクスプローラには、フローの固定や解除をするためのオプションが用意されています。
`,
- "fr": `Les flux peuvent désormais être verrouillés pour éviter toute modification accidentelle.
- Lorsqu'il est verrouillé, vous ne pouvez en aucun cas modifier les noeuds.
- Le menu contextuel du flux fournit les options pour verrouiller et déverrouiller les flux,
- ainsi que dans l'explorateur de la barre latérale d'informations.
`
- },
- },
- {
- title: {
- "en-US": "Adding Images to node/flow descriptions",
- "ja": "ノードやフローの説明へ画像を追加",
- "fr": "Ajout d'images aux descriptions de noeud/flux"
- },
- // image: 'images/debug-path-tooltip.png',
- description: {
- "en-US": `You can now add images to a node's or flows's description.
- Simply drag the image into the text editor and it will get added inline.
- When the description is shown in the Info sidebar, the image will be displayed.
`,
- "ja": `ノードまたはフローの説明に、画像を追加できるようになりました。
- 画像をテキストエディタにドラッグするだけで、行内に埋め込まれます。
- 情報サイドバーの説明を開くと、その画像が表示されます。
`,
- "fr": `Vous pouvez désormais ajouter des images à la description d'un noeud ou d'un flux.
- Faites simplement glisser l'image dans l'éditeur de texte et elle sera ajoutée en ligne.
- Lorsque la description s'affiche dans la barre latérale d'informations, l'image s'affiche.
`
- },
- },
- {
- title: {
- "en-US": "Adding Mermaid Diagrams",
- "ja": "Mermaid図を追加",
- "fr": "Ajout de diagrammes Mermaid"
- },
- image: 'images/mermaid.png',
- description: {
- "en-US": `You can also add Mermaid diagrams directly into your node or flow descriptions.
- This gives you much richer options for documenting your flows.
`,
- "ja": `ノードやフローの説明に、Mermaid 図を直接追加することもできます。
- これによって、フローを説明する文書作成の選択肢がより多くなります。
`,
- "fr": `Vous pouvez également ajouter des diagrammes Mermaid directement dans vos descriptions de noeud ou de flux.
- Cela vous offre des options beaucoup plus riches pour documenter vos flux.
`
- },
- },
- {
- title: {
- "en-US": "Managing Global Environment Variables",
- "ja": "グローバル環境変数の管理",
- "fr": "Gestion des variables d'environnement globales"
- },
- image: 'images/global-env-vars.png',
- description: {
- "en-US": `You can set environment variables that apply to all nodes and flows in the new
- 'Global Environment Variables' section of User Settings.
`,
- "ja": `ユーザ設定に新しく追加された「大域環境変数」のセクションで、全てのノードとフローに適用される環境変数を登録できます。
`,
- "fr": `Vous pouvez définir des variables d'environnement qui s'appliquent à tous les noeuds et flux dans la nouvelle
- section "Global Environment Variables" des paramètres utilisateur.
`
- },
- },
{
title: {
"en-US": "Node Updates",
@@ -221,10 +77,20 @@ export default {
// image: "images/",
description: {
"en-US": `The core nodes have received lots of minor fixes, documentation updates and
- small enhancements. Check the full changelog in the Help sidebar for a full list.
`,
- "ja": `コアノードにマイナーな修正、ドキュメント更新、小規模な拡張が数多く追加されています。全ての一覧は、ヘルプサイドバーの全ての更新履歴を確認してください。
`,
- "fr": `Les noeuds principaux ont reçu de nombreux correctifs mineurs, mises à jour de la documentation et
- petites améliorations. Consulter le journal des modifications complet dans la barre latérale d'aide.
`
+ small enhancements. Check the full changelog in the Help sidebar for a full list.
+
+ A fully RFC4180 compliant CSV mode
+ Customisable headers on the WebSocket node
+ Split node now can operate on any message property
+ and lots more...
+ `,
+ "ja": `コアノードには沢山の軽微な修正、ドキュメント更新、小さな機能拡張が入っています。全リストはヘルプサイドバーにある変更履歴を参照してください。
+
+ RFC4180に完全に準拠したCSVモード
+ WebSocketノードのカスタマイズ可能なヘッダ
+ Splitノードは、メッセージプロパティで操作できるようになりました
+ 他にも沢山あります...
+ `
}
}
]
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node-red/func.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node-red/func.d.ts
index 59f8a8bd7..50880a385 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node-red/func.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node-red/func.d.ts
@@ -1,10 +1,10 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
interface NodeMessage {
topic?: string;
payload?: any;
- _msgid?: string;
+ /** `_msgid` is generated internally. It not something you typically need to set or modify. */ _msgid?: string;
[other: string]: any; //permit other properties
}
@@ -19,15 +19,15 @@ declare const promisify:typeof import('util').promisify
/**
* @typedef NodeStatus
* @type {object}
- * @property {string} [fill] The fill property can be: red, green, yellow, blue or grey.
- * @property {string} [shape] The shape property can be: ring or dot.
- * @property {string} [text] The text to display
+ * @property {'red'|'green'|'yellow'|'blue'|'grey'|string} [fill] - The fill property can be: red, green, yellow, blue or grey.
+ * @property {'ring'|'dot'|string} [shape] The shape property can be: ring or dot.
+ * @property {string|boolean|number} [text] The text to display
*/
interface NodeStatus {
/** The fill property can be: red, green, yellow, blue or grey */
- fill?: string,
+ fill?: 'red'|'green'|'yellow'|'blue'|'grey'|string,
/** The shape property can be: ring or dot */
- shape?: string,
+ shape?: 'ring'|'dot'|string,
/** The text to display */
text?: string|boolean|number
}
@@ -37,25 +37,24 @@ declare class node {
* Send 1 or more messages asynchronously
* @param {object | object[]} msg The msg object
* @param {Boolean} [clone=true] Flag to indicate the `msg` should be cloned. Default = `true`
- * @see node-red documentation [writing-functions: sending messages asynchronously](https://nodered.org/docs/user-guide/writing-functions#sending-messages-asynchronously)
+ * @see Node-RED documentation [writing-functions: sending messages asynchronously](https://nodered.org/docs/user-guide/writing-functions#sending-messages-asynchronously)
*/
- static send(msg:object|object[], clone?:Boolean): void;
+ static send(msg:NodeMessage|NodeMessage[], clone?:Boolean): void;
/** Inform runtime this instance has completed its operation */
static done();
/** Send an error to the console and debug side bar. Include `msg` in the 2nd parameter to trigger the catch node. */
- static error(err:string|Error, msg?:object);
+ static error(err:string|Error, msg?:NodeMessage);
/** Log a warn message to the console and debug sidebar */
static warn(warning:string|object);
/** Log an info message to the console (not sent to sidebar)' */
static log(info:string|object);
/** Sets the status icon and text underneath the node.
* @param {NodeStatus} status - The status object `{fill, shape, text}`
- * @see node-red documentation [writing-functions: adding-status](https://nodered.org/docs/user-guide/writing-functions#adding-status)
+ * @see Node-RED documentation [writing-functions: adding-status](https://nodered.org/docs/user-guide/writing-functions#adding-status)
*/
static status(status:NodeStatus);
/** Sets the status text underneath the node.
- * @param {string} status - The status to display
- * @see node-red documentation [writing-functions: adding-status](https://nodered.org/docs/user-guide/writing-functions#adding-status)
+ * @see Node-RED documentation [writing-functions: adding-status](https://nodered.org/docs/user-guide/writing-functions#adding-status)
*/
static status(status:string|boolean|number);
/** the id of this node */
@@ -264,9 +263,12 @@ declare class global {
/** Get an array of the keys in the context store */
static keys(store: string, callback: Function);
}
+
+// (string & {}) is a workaround for offering string type completion without enforcing it. See https://github.com/microsoft/TypeScript/issues/29729#issuecomment-567871939
+type NR_ENV_NAME_STRING = 'NR_NODE_ID'|'NR_NODE_NAME'|'NR_NODE_PATH'|'NR_GROUP_ID'|'NR_GROUP_NAME'|'NR_FLOW_ID'|'NR_FLOW_NAME'|'NR_SUBFLOW_ID'|'NR_SUBFLOW_NAME'|'NR_SUBFLOW_PATH' | (string & {})
declare class env {
/**
- * Get an environment variable value
+ * Get an environment variable value defined in the OS, or in the global/flow/subflow/group environment variables.
*
* Predefined node-red variables...
* * `NR_NODE_ID` - the ID of the node
@@ -276,9 +278,16 @@ declare class env {
* * `NR_GROUP_NAME` - the Name of the containing group
* * `NR_FLOW_ID` - the ID of the flow the node is on
* * `NR_FLOW_NAME` - the Name of the flow the node is on
- * @param name Name of the environment variable to get
+ * * `NR_SUBFLOW_ID` - the ID of the subflow the node is in
+ * * `NR_SUBFLOW_NAME` - the Name of the subflow the node is in
+ * * `NR_SUBFLOW_PATH` - the Path of the subflow the node is in
+ * @param name - The name of the environment variable
* @example
- * ```const flowName = env.get("NR_FLOW_NAME");```
+ * ```const flowName = env.get("NR_FLOW_NAME") // get the name of the flow```
+ * @example
+ * ```const systemHomeDir = env.get("HOME") // get the user's home directory```
+ * @example
+ * ```const systemHomeDir = env.get("LABEL1") // get the value of a global/flow/subflow/group defined variable named "LABEL1"```
*/
- static get(name:string) :any;
+ static get(name:NR_ENV_NAME_STRING) :any;
}
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/assert.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/assert.d.ts
index 4cfbb7321..59ef31163 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/assert.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/assert.d.ts
@@ -1,10 +1,10 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `assert` module provides a set of assertion functions for verifying
* invariants.
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/assert.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/assert.js)
*/
declare module 'assert' {
/**
@@ -290,8 +290,8 @@ declare module 'assert' {
* > Stability: 3 - Legacy: Use {@link strictEqual} instead.
*
* Tests shallow, coercive equality between the `actual` and `expected` parameters
- * using the [Abstract Equality Comparison](https://tc39.github.io/ecma262/#sec-abstract-equality-comparison) ( `==` ). `NaN` is special handled
- * and treated as being identical in case both sides are `NaN`.
+ * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
+ * and treated as being identical if both sides are `NaN`.
*
* ```js
* import assert from 'assert';
@@ -323,9 +323,8 @@ declare module 'assert' {
*
* > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
*
- * Tests shallow, coercive inequality with the [Abstract Equality Comparison](https://tc39.github.io/ecma262/#sec-abstract-equality-comparison)(`!=` ). `NaN` is special handled and treated as
- * being identical in case both
- * sides are `NaN`.
+ * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
+ * specially handled and treated as being identical if both sides are `NaN`.
*
* ```js
* import assert from 'assert';
@@ -415,7 +414,7 @@ declare module 'assert' {
function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
/**
* Tests strict equality between the `actual` and `expected` parameters as
- * determined by the [SameValue Comparison](https://tc39.github.io/ecma262/#sec-samevalue).
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
*
* ```js
* import assert from 'assert/strict';
@@ -453,7 +452,7 @@ declare module 'assert' {
function strictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
/**
* Tests strict inequality between the `actual` and `expected` parameters as
- * determined by the [SameValue Comparison](https://tc39.github.io/ecma262/#sec-samevalue).
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
*
* ```js
* import assert from 'assert/strict';
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/assert/strict.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/assert/strict.d.ts
index ada209ced..3987c8267 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/assert/strict.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/assert/strict.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
declare module 'assert/strict' {
import { strict } from 'node:assert';
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/async_hooks.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/async_hooks.d.ts
index 206104c55..e35f09beb 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/async_hooks.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/async_hooks.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `async_hooks` module provides an API to track asynchronous resources. It
@@ -9,7 +9,7 @@
* import async_hooks from 'async_hooks';
* ```
* @experimental
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/async_hooks.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/async_hooks.js)
*/
declare module 'async_hooks' {
/**
@@ -367,7 +367,7 @@ declare module 'async_hooks' {
*
* Each instance of `AsyncLocalStorage` maintains an independent storage context.
* Multiple instances can safely exist simultaneously without risk of interfering
- * with each other data.
+ * with each other's data.
* @since v13.10.0, v12.17.0
*/
class AsyncLocalStorage {
@@ -398,8 +398,9 @@ declare module 'async_hooks' {
getStore(): T | undefined;
/**
* Runs a function synchronously within a context and returns its
- * return value. The store is not accessible outside of the callback function or
- * the asynchronous operations created within the callback.
+ * return value. The store is not accessible outside of the callback function.
+ * The store is accessible to any asynchronous operations created within the
+ * callback.
*
* The optional `args` are passed to the callback function.
*
@@ -413,6 +414,9 @@ declare module 'async_hooks' {
* try {
* asyncLocalStorage.run(store, () => {
* asyncLocalStorage.getStore(); // Returns the store object
+ * setTimeout(() => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * }, 200);
* throw new Error();
* });
* } catch (e) {
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/buffer.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/buffer.d.ts
index e04af96e7..f8cee2e9d 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/buffer.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/buffer.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* `Buffer` objects are used to represent a fixed-length sequence of bytes. Many
@@ -44,7 +44,7 @@
* // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
* const buf7 = Buffer.from('tést', 'latin1');
* ```
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/buffer.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/buffer.js)
*/
declare module 'buffer' {
import { BinaryLike } from 'node:crypto';
@@ -117,18 +117,17 @@ declare module 'buffer' {
/**
* A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
* multiple worker threads.
- * @since v15.7.0
- * @experimental
+ * @since v15.7.0, v14.18.0
*/
export class Blob {
/**
* The total size of the `Blob` in bytes.
- * @since v15.7.0
+ * @since v15.7.0, v14.18.0
*/
readonly size: number;
/**
* The content-type of the `Blob`.
- * @since v15.7.0
+ * @since v15.7.0, v14.18.0
*/
readonly type: string;
/**
@@ -143,13 +142,13 @@ declare module 'buffer' {
/**
* Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
* the `Blob` data.
- * @since v15.7.0
+ * @since v15.7.0, v14.18.0
*/
arrayBuffer(): Promise;
/**
* Creates and returns a new `Blob` containing a subset of this `Blob` objects
* data. The original `Blob` is not altered.
- * @since v15.7.0
+ * @since v15.7.0, v14.18.0
* @param start The starting index.
* @param end The ending index.
* @param type The content-type for the new `Blob`
@@ -158,7 +157,7 @@ declare module 'buffer' {
/**
* Returns a promise that fulfills with the contents of the `Blob` decoded as a
* UTF-8 string.
- * @since v15.7.0
+ * @since v15.7.0, v14.18.0
*/
text(): Promise;
/**
@@ -169,6 +168,12 @@ declare module 'buffer' {
}
export import atob = globalThis.atob;
export import btoa = globalThis.btoa;
+
+ import { Blob as NodeBlob } from 'buffer';
+ // This conditional type will be the existing global Blob in a browser, or
+ // the copy below in a Node environment.
+ type __Blob = typeof globalThis extends { onmessage: any, Blob: infer T }
+ ? T : NodeBlob;
global {
// Buffer class
type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
@@ -394,7 +399,7 @@ declare module 'buffer' {
* @since v0.11.13
* @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
*/
- compare(buf1: Uint8Array, buf2: Uint8Array): number;
+ compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
/**
* Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
*
@@ -447,7 +452,7 @@ declare module 'buffer' {
* Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown.
*
* The underlying memory for `Buffer` instances created in this way is _not_
- * _initialized_. The contents of the newly created `Buffer` are unknown and_may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
*
* ```js
* import { Buffer } from 'buffer';
@@ -485,7 +490,7 @@ declare module 'buffer' {
* if `size` is 0.
*
* The underlying memory for `Buffer` instances created in this way is _not_
- * _initialized_. The contents of the newly created `Buffer` are unknown and_may contain sensitive data_. Use `buf.fill(0)` to initialize
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
* such `Buffer` instances with zeroes.
*
* When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
@@ -708,7 +713,7 @@ declare module 'buffer' {
* @param [sourceStart=0] The offset within `buf` at which to begin comparison.
* @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
*/
- compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
+ compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): -1 | 0 | 1;
/**
* Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
*
@@ -767,8 +772,6 @@ declare module 'buffer' {
* Returns a new `Buffer` that references the same memory as the original, but
* offset and cropped by the `start` and `end` indices.
*
- * This is the same behavior as `buf.subarray()`.
- *
* This method is not compatible with the `Uint8Array.prototype.slice()`,
* which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`.
*
@@ -784,8 +787,17 @@ declare module 'buffer' {
*
* console.log(buf.toString());
* // Prints: buffer
+ *
+ * // With buf.slice(), the original buffer is modified.
+ * const notReallyCopiedBuf = buf.slice();
+ * notReallyCopiedBuf[0]++;
+ * console.log(notReallyCopiedBuf.toString());
+ * // Prints: cuffer
+ * console.log(buf.toString());
+ * // Also prints: cuffer (!)
* ```
* @since v0.3.0
+ * @deprecated Use `subarray` instead.
* @param [start=0] Where the new `Buffer` will start.
* @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
*/
@@ -1952,7 +1964,7 @@ declare module 'buffer' {
*
* * a string, `value` is interpreted according to the character encoding in`encoding`.
* * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety.
- * To compare a partial `Buffer`, use `buf.slice()`.
+ * To compare a partial `Buffer`, use `buf.subarray`.
* * a number, `value` will be interpreted as an unsigned 8-bit integer
* value between `0` and `255`.
*
@@ -2208,7 +2220,7 @@ declare module 'buffer' {
* **binary data and predate the introduction of typed arrays in JavaScript.**
* **For code running using Node.js APIs, converting between base64-encoded strings**
* **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
- * @since v15.13.0
+ * @since v15.13.0, v14.17.0
* @deprecated Use `Buffer.from(data, 'base64')` instead.
* @param data The Base64-encoded input string.
*/
@@ -2224,11 +2236,24 @@ declare module 'buffer' {
* **binary data and predate the introduction of typed arrays in JavaScript.**
* **For code running using Node.js APIs, converting between base64-encoded strings**
* **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
- * @since v15.13.0
+ * @since v15.13.0, v14.17.0
* @deprecated Use `buf.toString('base64')` instead.
* @param data An ASCII (Latin1) string.
*/
function btoa(data: string): string;
+
+ interface Blob extends __Blob {}
+ /**
+ * `Blob` class is a global reference for `require('node:buffer').Blob`
+ * https://nodejs.org/api/buffer.html#class-blob
+ * @since v18.0.0
+ */
+ var Blob: typeof globalThis extends {
+ onmessage: any;
+ Blob: infer T;
+ }
+ ? T
+ : typeof NodeBlob;
}
}
declare module 'node:buffer' {
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/child_process.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/child_process.d.ts
index d79c74a3b..540dc9bab 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/child_process.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/child_process.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `child_process` module provides the ability to spawn subprocesses in
@@ -31,8 +31,11 @@
* identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }`option if the output will not be consumed.
*
* The command lookup is performed using the `options.env.PATH` environment
- * variable if it is in the `options` object. Otherwise, `process.env.PATH` is
- * used.
+ * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is
+ * used. If `options.env` is set without `PATH`, lookup on Unix is performed
+ * on a default search path search of `/usr/bin:/bin` (see your operating system's
+ * manual for execvpe/execvp), on Windows the current processes environment
+ * variable `PATH` is used.
*
* On Windows, environment variables are case-insensitive. Node.js
* lexicographically sorts the `env` keys and uses the first one that
@@ -63,7 +66,7 @@
* For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
* the synchronous methods can have significant impact on performance due to
* stalling the event loop while spawned processes complete.
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/child_process.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/child_process.js)
*/
declare module 'child_process' {
import { ObjectEncodingOptions } from 'node:fs';
@@ -624,7 +627,7 @@ declare module 'child_process' {
}
interface CommonOptions extends ProcessEnvOptions {
/**
- * @default false
+ * @default true
*/
windowsHide?: boolean | undefined;
/**
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/cluster.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/cluster.d.ts
index 335275948..ca0a7469b 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/cluster.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/cluster.d.ts
@@ -1,10 +1,11 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
- * A single instance of Node.js runs in a single thread. To take advantage of
- * multi-core systems, the user will sometimes want to launch a cluster of Node.js
- * processes to handle the load.
+ * Clusters of Node.js processes can be used to run multiple instances of Node.js
+ * that can distribute workloads among their application threads. When process
+ * isolation is not needed, use the `worker_threads` module instead, which
+ * allows running multiple application threads within a single Node.js instance.
*
* The cluster module allows easy creation of child processes that all share
* server ports.
@@ -52,7 +53,7 @@
* ```
*
* On Windows, it is not yet possible to set up a named pipe server in a worker.
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/cluster.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/cluster.js)
*/
declare module 'cluster' {
import * as child from 'node:child_process';
@@ -102,9 +103,9 @@ declare module 'cluster' {
/**
* Send a message to a worker or primary, optionally with a handle.
*
- * In the primary this sends a message to a specific worker. It is identical to `ChildProcess.send()`.
+ * In the primary, this sends a message to a specific worker. It is identical to `ChildProcess.send()`.
*
- * In a worker this sends a message to the primary. It is identical to`process.send()`.
+ * In a worker, this sends a message to the primary. It is identical to`process.send()`.
*
* This example will echo back all messages from the primary:
*
@@ -126,19 +127,13 @@ declare module 'cluster' {
send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean;
send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean;
/**
- * This function will kill the worker. In the primary, it does this
- * by disconnecting the `worker.process`, and once disconnected, killing
- * with `signal`. In the worker, it does it by disconnecting the channel,
- * and then exiting with code `0`.
+ * This function will kill the worker. In the primary worker, it does this by
+ * disconnecting the `worker.process`, and once disconnected, killing with`signal`. In the worker, it does it by killing the process with `signal`.
*
- * Because `kill()` attempts to gracefully disconnect the worker process, it is
- * susceptible to waiting indefinitely for the disconnect to complete. For example,
- * if the worker enters an infinite loop, a graceful disconnect will never occur.
- * If the graceful disconnect behavior is not needed, use `worker.process.kill()`.
+ * The `kill()` function kills the worker process without waiting for a graceful
+ * disconnect, it has the same behavior as `worker.process.kill()`.
*
- * Causes `.exitedAfterDisconnect` to be set.
- *
- * This method is aliased as `worker.destroy()` for backward compatibility.
+ * This method is aliased as `worker.destroy()` for backwards compatibility.
*
* In a worker, `process.kill()` exists, but it is not this function;
* it is `kill()`.
@@ -256,7 +251,8 @@ declare module 'cluster' {
*/
isDead(): boolean;
/**
- * This property is `true` if the worker exited due to `.kill()` or`.disconnect()`. If the worker exited any other way, it is `false`. If the
+ * This property is `true` if the worker exited due to `.disconnect()`.
+ * If the worker exited any other way, it is `false`. If the
* worker has not exited, it is `undefined`.
*
* The boolean `worker.exitedAfterDisconnect` allows distinguishing between
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/console.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/console.d.ts
index 7dae84bd4..fcdbdb1fa 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/console.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/console.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `console` module provides a simple debugging console that is similar to the
@@ -56,7 +56,7 @@
* myConsole.warn(`Danger ${name}! Danger!`);
* // Prints: Danger Will Robinson! Danger!, to err
* ```
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/console.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/console.js)
*/
declare module 'console' {
import console = require('node:console');
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/crypto.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/crypto.d.ts
index 7983fc0c0..58bd66c7d 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/crypto.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/crypto.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `crypto` module provides cryptographic functionality that includes a set of
@@ -16,12 +16,64 @@
* // Prints:
* // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
* ```
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/crypto.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/crypto.js)
*/
declare module 'crypto' {
import * as stream from 'node:stream';
import { PeerCertificate } from 'node:tls';
- interface Certificate {
+ /**
+ * SPKAC is a Certificate Signing Request mechanism originally implemented by
+ * Netscape and was specified formally as part of [HTML5's `keygen` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/keygen).
+ *
+ * `` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects
+ * should not use this element anymore.
+ *
+ * The `crypto` module provides the `Certificate` class for working with SPKAC
+ * data. The most common usage is handling output generated by the HTML5`` element. Node.js uses [OpenSSL's SPKAC
+ * implementation](https://www.openssl.org/docs/man1.1.0/apps/openssl-spkac.html) internally.
+ * @since v0.11.8
+ */
+ class Certificate {
+ /**
+ * ```js
+ * const { Certificate } = await import('crypto');
+ * const spkac = getSpkacSomehow();
+ * const challenge = Certificate.exportChallenge(spkac);
+ * console.log(challenge.toString('utf8'));
+ * // Prints: the challenge as a UTF8 string
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge.
+ */
+ static exportChallenge(spkac: BinaryLike): Buffer;
+ /**
+ * ```js
+ * const { Certificate } = await import('crypto');
+ * const spkac = getSpkacSomehow();
+ * const publicKey = Certificate.exportPublicKey(spkac);
+ * console.log(publicKey);
+ * // Prints: the public key as
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return The public key component of the `spkac` data structure, which includes a public key and a challenge.
+ */
+ static exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
+ /**
+ * ```js
+ * import { Buffer } from 'buffer';
+ * const { Certificate } = await import('crypto');
+ *
+ * const spkac = getSpkacSomehow();
+ * console.log(Certificate.verifySpkac(Buffer.from(spkac)));
+ * // Prints: true or false
+ * ```
+ * @since v9.0.0
+ * @param encoding The `encoding` of the `spkac` string.
+ * @return `true` if the given `spkac` data structure is valid, `false` otherwise.
+ */
+ static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
/**
* @deprecated
* @param spkac
@@ -45,31 +97,6 @@ declare module 'crypto' {
*/
verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
}
- const Certificate: Certificate & {
- /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
- new (): Certificate;
- /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
- (): Certificate;
- /**
- * @param spkac
- * @returns The challenge component of the `spkac` data structure,
- * which includes a public key and a challenge.
- */
- exportChallenge(spkac: BinaryLike): Buffer;
- /**
- * @param spkac
- * @param encoding The encoding of the spkac string.
- * @returns The public key component of the `spkac` data structure,
- * which includes a public key and a challenge.
- */
- exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
- /**
- * @param spkac
- * @returns `true` if the given `spkac` data structure is valid,
- * `false` otherwise.
- */
- verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
- };
namespace constants {
// https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
const OPENSSL_VERSION_NUMBER: number;
@@ -175,7 +202,7 @@ declare module 'crypto' {
*
* The `algorithm` is dependent on the available algorithms supported by the
* version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
- * On recent releases of OpenSSL, `openssl list -digest-algorithms`(`openssl list-message-digest-algorithms` for older versions of OpenSSL) will
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
* display the available digest algorithms.
*
* Example: generating the sha256 sum of a file
@@ -215,7 +242,7 @@ declare module 'crypto' {
*
* The `algorithm` is dependent on the available algorithms supported by the
* version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
- * On recent releases of OpenSSL, `openssl list -digest-algorithms`(`openssl list-message-digest-algorithms` for older versions of OpenSSL) will
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
* display the available digest algorithms.
*
* The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is
@@ -253,7 +280,7 @@ declare module 'crypto' {
*/
function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
// https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
- type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex';
+ type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex' | 'binary';
type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
@@ -662,12 +689,13 @@ declare module 'crypto' {
* Creates and returns a `Cipher` object that uses the given `algorithm` and`password`.
*
* The `options` argument controls stream behavior and is optional except when a
- * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
* authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
* tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
*
* The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
- * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
* display the available cipher algorithms.
*
* The `password` is used to derive the cipher key and initialization vector (IV).
@@ -700,12 +728,13 @@ declare module 'crypto' {
* initialization vector (`iv`).
*
* The `options` argument controls stream behavior and is optional except when a
- * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
* authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
* tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
*
* The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
- * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
* display the available cipher algorithms.
*
* The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
@@ -925,8 +954,9 @@ declare module 'crypto' {
* Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key).
*
* The `options` argument controls stream behavior and is optional except when a
- * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
* authentication tag in bytes, see `CCM mode`.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
*
* The implementation of `crypto.createDecipher()` derives keys using the OpenSSL
* function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
@@ -951,12 +981,13 @@ declare module 'crypto' {
* Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`).
*
* The `options` argument controls stream behavior and is optional except when a
- * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
* authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to restrict accepted authentication tags
* to those with the specified length.
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
*
* The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
- * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
* display the available cipher algorithms.
*
* The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
@@ -1162,13 +1193,11 @@ declare module 'crypto' {
format?: KeyFormat | undefined;
type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
passphrase?: string | Buffer | undefined;
- encoding?: string | undefined;
}
interface PublicKeyInput {
key: string | Buffer;
format?: KeyFormat | undefined;
type?: 'pkcs1' | 'spki' | undefined;
- encoding?: string | undefined;
}
/**
* Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
@@ -1279,7 +1308,6 @@ declare module 'crypto' {
interface VerifyKeyObjectInput extends SigningOptions {
key: KeyObject;
}
- interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
type KeyLike = string | Buffer | KeyObject;
/**
* The `Sign` class is a utility for generating signatures. It can be used in one
@@ -1434,8 +1462,8 @@ declare module 'crypto' {
* be passed instead of a public key.
* @since v0.1.92
*/
- verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, signature: NodeJS.ArrayBufferView): boolean;
- verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
+ verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
+ verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
}
/**
* Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
@@ -1453,10 +1481,10 @@ declare module 'crypto' {
* @param [generator=2]
* @param generatorEncoding The `encoding` of the `generator` string.
*/
- function createDiffieHellman(primeLength: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman;
- function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman;
- function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding): DiffieHellman;
- function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: number | NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman;
+ function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
+ function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman;
function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
/**
* The `DiffieHellman` class is a utility for creating Diffie-Hellman key
@@ -1805,7 +1833,7 @@ declare module 'crypto' {
* Return a random integer `n` such that `min <= n < max`. This
* implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
*
- * The range (`max - min`) must be less than `2**48`. `min` and `max` must
+ * The range (`max - min`) must be less than 2^48. `min` and `max` must
* be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
*
* If the `callback` function is not provided, the random integer is
@@ -2281,11 +2309,11 @@ declare module 'crypto' {
* If `encoding` is specified, a string is returned; otherwise a `Buffer` is
* returned.
* @since v0.11.14
- * @param encoding The `encoding` of the return value.
+ * @param [encoding] The `encoding` of the return value.
* @param [format='uncompressed']
* @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
*/
- getPublicKey(): Buffer;
+ getPublicKey(encoding?: null, format?: ECDHKeyFormat): Buffer;
getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
/**
* Sets the EC Diffie-Hellman private key.
@@ -2316,7 +2344,8 @@ declare module 'crypto' {
* comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/).
*
* `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
- * must have the same byte length.
+ * must have the same byte length. An error is thrown if `a` and `b` have
+ * different byte lengths.
*
* If at least one of `a` and `b` is a `TypedArray` with more than one byte per
* entry, such as `Uint16Array`, the result will be computed using the platform
@@ -2331,7 +2360,7 @@ declare module 'crypto' {
/** @deprecated since v10.0.0 */
const DEFAULT_ENCODING: BufferEncoding;
type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
- type KeyFormat = 'pem' | 'der' | 'jwk';
+ type KeyFormat = 'pem' | 'der';
interface BasePrivateKeyEncodingOptions {
format: T;
cipher?: string | undefined;
@@ -2942,16 +2971,11 @@ declare module 'crypto' {
* If the `callback` function is provided this function uses libuv's threadpool.
* @since v12.0.0
*/
+ function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
function verify(
algorithm: string | null | undefined,
data: NodeJS.ArrayBufferView,
- key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
- signature: NodeJS.ArrayBufferView
- ): boolean;
- function verify(
- algorithm: string | null | undefined,
- data: NodeJS.ArrayBufferView,
- key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
+ key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
signature: NodeJS.ArrayBufferView,
callback: (error: Error | null, result: boolean) => void
): void;
@@ -3100,34 +3124,33 @@ declare module 'crypto' {
*/
disableEntropyCache?: boolean | undefined;
}
- type UUID = `${string}-${string}-${string}-${string}-${string}`;
/**
* Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a
* cryptographic pseudorandom number generator.
- * @since v15.6.0
+ * @since v15.6.0, v14.17.0
*/
- function randomUUID(options?: RandomUUIDOptions): UUID;
+ function randomUUID(options?: RandomUUIDOptions): string;
interface X509CheckOptions {
/**
* @default 'always'
*/
- subject?: 'always' | 'default' | 'never';
+ subject: 'always' | 'never';
/**
* @default true
*/
- wildcards?: boolean;
+ wildcards: boolean;
/**
* @default true
*/
- partialWildcards?: boolean;
+ partialWildcards: boolean;
/**
* @default false
*/
- multiLabelWildcards?: boolean;
+ multiLabelWildcards: boolean;
/**
* @default false
*/
- singleLabelSubdomains?: boolean;
+ singleLabelSubdomains: boolean;
}
/**
* Encapsulates an X509 certificate and provides read-only access to
@@ -3144,12 +3167,16 @@ declare module 'crypto' {
*/
class X509Certificate {
/**
- * Will be \`true\` if this is a Certificate Authority (ca) certificate.
+ * Will be \`true\` if this is a Certificate Authority (CA) certificate.
* @since v15.6.0
*/
readonly ca: boolean;
/**
* The SHA-1 fingerprint of this certificate.
+ *
+ * Because SHA-1 is cryptographically broken and because the security of SHA-1 is
+ * significantly worse than that of algorithms that are commonly used to sign
+ * certificates, consider using `x509.fingerprint256` instead.
* @since v15.6.0
*/
readonly fingerprint: string;
@@ -3208,6 +3235,10 @@ declare module 'crypto' {
readonly raw: Buffer;
/**
* The serial number of this certificate.
+ *
+ * Serial numbers are assigned by certificate authorities and do not uniquely
+ * identify certificates. Consider using `x509.fingerprint256` as a unique
+ * identifier instead.
* @since v15.6.0
*/
readonly serialNumber: string;
@@ -3224,18 +3255,50 @@ declare module 'crypto' {
constructor(buffer: BinaryLike);
/**
* Checks whether the certificate matches the given email address.
+ *
+ * If the `'subject'` option is undefined or set to `'default'`, the certificate
+ * subject is only considered if the subject alternative name extension either does
+ * not exist or does not contain any email addresses.
+ *
+ * If the `'subject'` option is set to `'always'` and if the subject alternative
+ * name extension either does not exist or does not contain a matching email
+ * address, the certificate subject is considered.
+ *
+ * If the `'subject'` option is set to `'never'`, the certificate subject is never
+ * considered, even if the certificate contains no subject alternative names.
* @since v15.6.0
* @return Returns `email` if the certificate matches, `undefined` if it does not.
*/
checkEmail(email: string, options?: Pick): string | undefined;
/**
* Checks whether the certificate matches the given host name.
+ *
+ * If the certificate matches the given host name, the matching subject name is
+ * returned. The returned name might be an exact match (e.g., `foo.example.com`)
+ * or it might contain wildcards (e.g., `*.example.com`). Because host name
+ * comparisons are case-insensitive, the returned subject name might also differ
+ * from the given `name` in capitalization.
+ *
+ * If the `'subject'` option is undefined or set to `'default'`, the certificate
+ * subject is only considered if the subject alternative name extension either does
+ * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS").
+ *
+ * If the `'subject'` option is set to `'always'` and if the subject alternative
+ * name extension either does not exist or does not contain a matching DNS name,
+ * the certificate subject is considered.
+ *
+ * If the `'subject'` option is set to `'never'`, the certificate subject is never
+ * considered, even if the certificate contains no subject alternative names.
* @since v15.6.0
- * @return Returns `name` if the certificate matches, `undefined` if it does not.
+ * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`.
*/
checkHost(name: string, options?: X509CheckOptions): string | undefined;
/**
* Checks whether the certificate matches the given IP address (IPv4 or IPv6).
+ *
+ * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they
+ * must match the given `ip` address exactly. Other subject alternative names as
+ * well as the subject field of the certificate are ignored.
* @since v15.6.0
* @return Returns `ip` if the certificate matches, `undefined` if it does not.
*/
@@ -3408,6 +3471,19 @@ declare module 'crypto' {
* @param [flags=crypto.constants.ENGINE_METHOD_ALL]
*/
function setEngine(engine: string, flags?: number): void;
+ /**
+ * A convenient alias for `crypto.webcrypto.getRandomValues()`.
+ * This implementation is not compliant with the Web Crypto spec,
+ * to write web-compatible code use `crypto.webcrypto.getRandomValues()` instead.
+ * @since v17.4.0
+ * @returns Returns `typedArray`.
+ */
+ function getRandomValues(typedArray: T): T;
+ /**
+ * A convenient alias for `crypto.webcrypto.subtle`.
+ * @since v17.4.0
+ */
+ const subtle: webcrypto.SubtleCrypto;
/**
* An implementation of the Web Crypto API standard.
*
@@ -3565,7 +3641,7 @@ declare module 'crypto' {
* The UUID is generated using a cryptographic pseudorandom number generator.
* @since v16.7.0
*/
- randomUUID(): UUID;
+ randomUUID(): string;
CryptoKey: CryptoKeyConstructor;
}
// This constructor throws ILLEGAL_CONSTRUCTOR so it should not be newable.
@@ -3650,17 +3726,22 @@ declare module 'crypto' {
/**
* Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`,
* `subtle.deriveBits()` attempts to generate `length` bits.
- * The Node.js implementation requires that `length` is a multiple of `8`.
+ * The Node.js implementation requires that when `length` is a number it must be multiple of `8`.
+ * When `length` is `null` the maximum number of bits for a given algorithm is generated. This is allowed
+ * for the `'ECDH'`, `'X25519'`, and `'X448'` algorithms.
* If successful, the returned promise will be resolved with an `` containing the generated data.
*
* The algorithms currently supported include:
*
* - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
* - `'HKDF'`
* - `'PBKDF2'`
* @since v15.0.0
*/
- deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise;
+ deriveBits(algorithm: EcdhKeyDeriveParams, baseKey: CryptoKey, length: number | null): Promise;
+ deriveBits(algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise;
/**
* Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`,
* `subtle.deriveKey()` attempts to generate a new ` based on the method and parameters in `derivedKeyAlgorithm`.
@@ -3671,6 +3752,8 @@ declare module 'crypto' {
* The algorithms currently supported include:
*
* - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
* - `'HKDF'`
* - `'PBKDF2'`
* @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
@@ -3739,7 +3822,11 @@ declare module 'crypto' {
* - `'RSA-PSS'`
* - `'RSA-OAEP'`
* - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
* - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
* The `` (secret key) generating algorithms supported include:
*
* - `'HMAC'`
@@ -3787,6 +3874,8 @@ declare module 'crypto' {
* - `'RSASSA-PKCS1-v1_5'`
* - `'RSA-PSS'`
* - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
* - `'HMAC'`
* @since v15.0.0
*/
@@ -3812,7 +3901,11 @@ declare module 'crypto' {
* - `'RSA-PSS'`
* - `'RSA-OAEP'`
* - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
* - `'ECDH'`
+ * - `'X25519'`
+ * - `'X448'`
* - `'HMAC'`
* - `'AES-CTR'`
* - `'AES-CBC'`
@@ -3841,6 +3934,8 @@ declare module 'crypto' {
* - `'RSASSA-PKCS1-v1_5'`
* - `'RSA-PSS'`
* - `'ECDSA'`
+ * - `'Ed25519'`
+ * - `'Ed448'`
* - `'HMAC'`
* @since v15.0.0
*/
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/dgram.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/dgram.d.ts
index 6f9b0ec5e..dbb0df24a 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/dgram.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/dgram.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `dgram` module provides an implementation of UDP datagram sockets.
@@ -26,7 +26,7 @@
* server.bind(41234);
* // Prints: server listening 0.0.0.0:41234
* ```
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/dgram.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dgram.js)
*/
declare module 'dgram' {
import { AddressInfo } from 'node:net';
@@ -263,7 +263,7 @@ declare module 'dgram' {
*
* The `address` argument is a string. If the value of `address` is a host name,
* DNS will be used to resolve the address of the host. If `address` is not
- * provided or otherwise falsy, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default.
+ * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default.
*
* If the socket has not been previously bound with a call to `bind`, the socket
* is assigned a random port number and is bound to the "all interfaces" address
@@ -454,7 +454,7 @@ declare module 'dgram' {
* TTL. If the TTL is decremented to 0 by a router, it will not be forwarded.
* Changing TTL values is typically done for network probes or when multicasting.
*
- * The `ttl` argument may be between between 1 and 255\. The default on most systems
+ * The `ttl` argument may be between 1 and 255\. The default on most systems
* is 64.
*
* This method throws `EBADF` if called on an unbound socket.
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/diagnostics_channel.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/diagnostics_channel.d.ts
index d67a7b2e5..151fa2294 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/diagnostics_channel.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/diagnostics_channel.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `diagnostics_channel` module provides an API to create named channels
@@ -23,7 +23,7 @@
* should generally include the module name to avoid collisions with data from
* other modules.
* @experimental
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/diagnostics_channel.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/diagnostics_channel.js)
*/
declare module 'diagnostics_channel' {
/**
@@ -44,7 +44,7 @@ declare module 'diagnostics_channel' {
* @param name The channel name
* @return If there are active subscribers
*/
- function hasSubscribers(name: string | symbol): boolean;
+ function hasSubscribers(name: string): boolean;
/**
* This is the primary entry-point for anyone wanting to interact with a named
* channel. It produces a channel object which is optimized to reduce overhead at
@@ -59,8 +59,8 @@ declare module 'diagnostics_channel' {
* @param name The channel name
* @return The named channel object
*/
- function channel(name: string | symbol): Channel;
- type ChannelListener = (message: unknown, name: string | symbol) => void;
+ function channel(name: string): Channel;
+ type ChannelListener = (message: unknown, name: string) => void;
/**
* The class `Channel` represents an individual named channel within the data
* pipeline. It is use to track subscribers and to publish messages when there
@@ -71,7 +71,7 @@ declare module 'diagnostics_channel' {
* @since v15.1.0, v14.17.0
*/
class Channel {
- readonly name: string | symbol;
+ readonly name: string;
/**
* Check if there are active subscribers to this channel. This is helpful if
* the message you want to send might be expensive to prepare.
@@ -91,7 +91,7 @@ declare module 'diagnostics_channel' {
* @since v15.1.0, v14.17.0
*/
readonly hasSubscribers: boolean;
- private constructor(name: string | symbol);
+ private constructor(name: string);
/**
* Publish a message to any subscribers to the channel. This will
* trigger message handlers synchronously so they will execute within
@@ -146,6 +146,7 @@ declare module 'diagnostics_channel' {
* ```
* @since v15.1.0, v14.17.0
* @param onMessage The previous subscribed handler to remove
+ * @return `true` if the handler was found, `false` otherwise.
*/
unsubscribe(onMessage: ChannelListener): void;
}
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/dns.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/dns.d.ts
index b45b0ec6e..03c32b557 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/dns.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/dns.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `dns` module enables name resolution. For example, use it to look up IP
@@ -45,7 +45,7 @@
* ```
*
* See the `Implementation considerations section` for more information.
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/dns.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dns.js)
*/
declare module 'dns' {
import * as dnsPromises from 'node:dns/promises';
@@ -61,6 +61,9 @@ declare module 'dns' {
family?: number | undefined;
hints?: number | undefined;
all?: boolean | undefined;
+ /**
+ * @default true
+ */
verbatim?: boolean | undefined;
}
export interface LookupOneOptions extends LookupOptions {
@@ -174,7 +177,7 @@ declare module 'dns' {
type: 'AAAA';
}
export interface CaaRecord {
- critical: number;
+ critial: number;
issue?: string | undefined;
issuewild?: string | undefined;
iodef?: string | undefined;
@@ -317,7 +320,7 @@ declare module 'dns' {
* Uses the DNS protocol to resolve `CAA` records for the `hostname`. The`addresses` argument passed to the `callback` function
* will contain an array of certification authority authorization records
* available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
- * @since v15.0.0
+ * @since v15.0.0, v14.17.0
*/
export function resolveCaa(hostname: string, callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void): void;
export namespace resolveCaa {
@@ -530,14 +533,16 @@ declare module 'dns' {
*/
export function getServers(): string[];
/**
- * Set the default value of `verbatim` in {@link lookup}. The value could be:
- * - `ipv4first`: sets default `verbatim` `false`.
- * - `verbatim`: sets default `verbatim` `true`.
+ * Set the default value of `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
*
- * The default is `ipv4first` and {@link setDefaultResultOrder} have higher priority than `--dns-result-order`.
- * When using worker threads, {@link setDefaultResultOrder} from the main thread won't affect the default dns orders in workers.
- * @since v14.18.0
- * @param order must be 'ipv4first' or 'verbatim'.
+ * * `ipv4first`: sets default `verbatim` `false`.
+ * * `verbatim`: sets default `verbatim` `true`.
+ *
+ * The default is `ipv4first` and {@link setDefaultResultOrder} have higher
+ * priority than `--dns-result-order`. When using `worker threads`,{@link setDefaultResultOrder} from the main thread won't affect the default
+ * dns orders in workers.
+ * @since v16.4.0, v14.18.0
+ * @param order must be `'ipv4first'` or `'verbatim'`.
*/
export function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
// Error codes
@@ -643,7 +648,7 @@ declare module 'dns' {
* The resolver will use the v4 local address when making requests to IPv4 DNS
* servers, and the v6 local address when making requests to IPv6 DNS servers.
* The `rrtype` of resolution requests has no impact on the local address used.
- * @since v15.1.0
+ * @since v15.1.0, v14.17.0
* @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
* @param [ipv6='::0'] A string representation of an IPv6 address.
*/
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/dns/promises.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/dns/promises.d.ts
index 0e051428b..3a75478dc 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/dns/promises.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/dns/promises.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `dns.promises` API provides an alternative set of asynchronous DNS methods
@@ -192,7 +192,7 @@ declare module 'dns/promises' {
* Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success,
* the `Promise` is resolved with an array of objects containing available
* certification authority authorization records available for the `hostname`(e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`).
- * @since v15.0.0
+ * @since v15.0.0, v14.17.0
*/
function resolveCaa(hostname: string): Promise;
/**
@@ -335,14 +335,16 @@ declare module 'dns/promises' {
*/
function setServers(servers: ReadonlyArray): void;
/**
- * Set the default value of `verbatim` in {@link lookup}. The value could be:
- * - `ipv4first`: sets default `verbatim` `false`.
- * - `verbatim`: sets default `verbatim` `true`.
+ * Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be:
*
- * The default is `ipv4first` and {@link setDefaultResultOrder} have higher priority than `--dns-result-order`.
- * When using worker threads, {@link setDefaultResultOrder} from the main thread won't affect the default dns orders in workers.
- * @since v14.18.0
- * @param order must be 'ipv4first' or 'verbatim'.
+ * * `ipv4first`: sets default `verbatim` `false`.
+ * * `verbatim`: sets default `verbatim` `true`.
+ *
+ * The default is `ipv4first` and `dnsPromises.setDefaultResultOrder()` have
+ * higher priority than `--dns-result-order`. When using `worker threads`,`dnsPromises.setDefaultResultOrder()` from the main thread won't affect the
+ * default dns orders in workers.
+ * @since v16.4.0, v14.18.0
+ * @param order must be `'ipv4first'` or `'verbatim'`.
*/
function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
class Resolver {
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/dom-events.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/dom-events.d.ts
new file mode 100644
index 000000000..1ad307f5e
--- /dev/null
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/dom-events.d.ts
@@ -0,0 +1,129 @@
+
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
+
+export {}; // Don't export anything!
+
+//// DOM-like Events
+// NB: The Event / EventTarget / EventListener implementations below were copied
+// from lib.dom.d.ts, then edited to reflect Node's documentation at
+// https://nodejs.org/api/events.html#class-eventtarget.
+// Please read that link to understand important implementation differences.
+
+// This conditional type will be the existing global Event in a browser, or
+// the copy below in a Node environment.
+type __Event = typeof globalThis extends { onmessage: any, Event: any }
+? {}
+: {
+ /** This is not used in Node.js and is provided purely for completeness. */
+ readonly bubbles: boolean;
+ /** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */
+ cancelBubble: () => void;
+ /** True if the event was created with the cancelable option */
+ readonly cancelable: boolean;
+ /** This is not used in Node.js and is provided purely for completeness. */
+ readonly composed: boolean;
+ /** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */
+ composedPath(): [EventTarget?]
+ /** Alias for event.target. */
+ readonly currentTarget: EventTarget | null;
+ /** Is true if cancelable is true and event.preventDefault() has been called. */
+ readonly defaultPrevented: boolean;
+ /** This is not used in Node.js and is provided purely for completeness. */
+ readonly eventPhase: 0 | 2;
+ /** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */
+ readonly isTrusted: boolean;
+ /** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */
+ preventDefault(): void;
+ /** This is not used in Node.js and is provided purely for completeness. */
+ returnValue: boolean;
+ /** Alias for event.target. */
+ readonly srcElement: EventTarget | null;
+ /** Stops the invocation of event listeners after the current one completes. */
+ stopImmediatePropagation(): void;
+ /** This is not used in Node.js and is provided purely for completeness. */
+ stopPropagation(): void;
+ /** The `EventTarget` dispatching the event */
+ readonly target: EventTarget | null;
+ /** The millisecond timestamp when the Event object was created. */
+ readonly timeStamp: number;
+ /** Returns the type of event, e.g. "click", "hashchange", or "submit". */
+ readonly type: string;
+};
+
+// See comment above explaining conditional type
+type __EventTarget = typeof globalThis extends { onmessage: any, EventTarget: any }
+? {}
+: {
+ /**
+ * Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value.
+ *
+ * If the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched.
+ *
+ * The `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification.
+ * Specifically, the `capture` option is used as part of the key when registering a `listener`.
+ * Any individual `listener` may be added once with `capture = false`, and once with `capture = true`.
+ */
+ addEventListener(
+ type: string,
+ listener: EventListener | EventListenerObject,
+ options?: AddEventListenerOptions | boolean,
+ ): void;
+ /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
+ dispatchEvent(event: Event): boolean;
+ /** Removes the event listener in target's event listener list with the same type, callback, and options. */
+ removeEventListener(
+ type: string,
+ listener: EventListener | EventListenerObject,
+ options?: EventListenerOptions | boolean,
+ ): void;
+};
+
+interface EventInit {
+ bubbles?: boolean;
+ cancelable?: boolean;
+ composed?: boolean;
+}
+
+interface EventListenerOptions {
+ /** Not directly used by Node.js. Added for API completeness. Default: `false`. */
+ capture?: boolean;
+}
+
+interface AddEventListenerOptions extends EventListenerOptions {
+ /** When `true`, the listener is automatically removed when it is first invoked. Default: `false`. */
+ once?: boolean;
+ /** When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. */
+ passive?: boolean;
+}
+
+interface EventListener {
+ (evt: Event): void;
+}
+
+interface EventListenerObject {
+ handleEvent(object: Event): void;
+}
+
+import {} from 'events'; // Make this an ambient declaration
+declare global {
+ /** An event which takes place in the DOM. */
+ interface Event extends __Event {}
+ var Event: typeof globalThis extends { onmessage: any, Event: infer T }
+ ? T
+ : {
+ prototype: __Event;
+ new (type: string, eventInitDict?: EventInit): __Event;
+ };
+
+ /**
+ * EventTarget is a DOM interface implemented by objects that can
+ * receive events and may have listeners for them.
+ */
+ interface EventTarget extends __EventTarget {}
+ var EventTarget: typeof globalThis extends { onmessage: any, EventTarget: infer T }
+ ? T
+ : {
+ prototype: __EventTarget;
+ new (): __EventTarget;
+ };
+}
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/domain.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/domain.d.ts
index ad9944fca..1edc5fe8a 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/domain.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/domain.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* **This module is pending deprecation.** Once a replacement API has been
@@ -15,7 +15,7 @@
* will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to
* exit immediately with an error code.
* @deprecated Since v1.4.2 - Deprecated
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/domain.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/domain.js)
*/
declare module 'domain' {
import EventEmitter = require('node:events');
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/events.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/events.d.ts
index f08b20424..bd537dd6f 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/events.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/events.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* Much of the Node.js core API is built around an idiomatic asynchronous
@@ -35,19 +35,56 @@
* });
* myEmitter.emit('event');
* ```
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/events.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/events.js)
*/
declare module 'events' {
+ // NOTE: This class is in the docs but is **not actually exported** by Node.
+ // If https://github.com/nodejs/node/issues/39903 gets resolved and Node
+ // actually starts exporting the class, uncomment below.
+
+ // import { EventListener, EventListenerObject } from '__dom-events';
+ // /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */
+ // interface NodeEventTarget extends EventTarget {
+ // /**
+ // * Node.js-specific extension to the `EventTarget` class that emulates the equivalent `EventEmitter` API.
+ // * The only difference between `addListener()` and `addEventListener()` is that addListener() will return a reference to the EventTarget.
+ // */
+ // addListener(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
+ // /** Node.js-specific extension to the `EventTarget` class that returns an array of event `type` names for which event listeners are registered. */
+ // eventNames(): string[];
+ // /** Node.js-specific extension to the `EventTarget` class that returns the number of event listeners registered for the `type`. */
+ // listenerCount(type: string): number;
+ // /** Node.js-specific alias for `eventTarget.removeListener()`. */
+ // off(type: string, listener: EventListener | EventListenerObject): this;
+ // /** Node.js-specific alias for `eventTarget.addListener()`. */
+ // on(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
+ // /** Node.js-specific extension to the `EventTarget` class that adds a `once` listener for the given event `type`. This is equivalent to calling `on` with the `once` option set to `true`. */
+ // once(type: string, listener: EventListener | EventListenerObject): this;
+ // /**
+ // * Node.js-specific extension to the `EventTarget` class.
+ // * If `type` is specified, removes all registered listeners for `type`,
+ // * otherwise removes all registered listeners.
+ // */
+ // removeAllListeners(type: string): this;
+ // /**
+ // * Node.js-specific extension to the `EventTarget` class that removes the listener for the given `type`.
+ // * The only difference between `removeListener()` and `removeEventListener()` is that `removeListener()` will return a reference to the `EventTarget`.
+ // */
+ // removeListener(type: string, listener: EventListener | EventListenerObject): this;
+ // }
+
interface EventEmitterOptions {
/**
* Enables automatic capturing of promise rejection.
*/
captureRejections?: boolean | undefined;
}
- interface NodeEventTarget {
+ // Any EventTarget with a Node-style `once` function
+ interface _NodeEventTarget {
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
}
- interface DOMEventTarget {
+ // Any EventTarget with a DOM-style `addEventListener`
+ interface _DOMEventTarget {
addEventListener(
eventName: string,
listener: (...args: any[]) => void,
@@ -157,8 +194,8 @@ declare module 'events' {
* ```
* @since v11.13.0, v10.16.0
*/
- static once(emitter: NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise;
- static once(emitter: DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise;
+ static once(emitter: _NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise;
+ static once(emitter: _DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise;
/**
* ```js
* const { on, EventEmitter } = require('events');
@@ -260,9 +297,9 @@ declare module 'events' {
* getEventListeners(et, 'foo'); // [listener]
* }
* ```
- * @since v15.2.0
+ * @since v15.2.0, v14.17.0
*/
- static getEventListeners(emitter: DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
+ static getEventListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
/**
* ```js
* const {
@@ -280,7 +317,7 @@ declare module 'events' {
* @param eventsTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter}
* objects.
*/
- static setMaxListeners(n?: number, ...eventTargets: Array): void;
+ static setMaxListeners(n?: number, ...eventTargets: Array<_DOMEventTarget | NodeJS.EventEmitter>): void;
/**
* This symbol shall be used to install a listener for only monitoring `'error'`
* events. Listeners installed using this symbol are called before the regular
@@ -396,8 +433,8 @@ declare module 'events' {
* called multiple times to remove each instance.
*
* Once an event is emitted, all listeners attached to it at the
- * time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and_before_ the last listener finishes execution will
- * not remove them from`emit()` in progress. Subsequent events behave as expected.
+ * time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution
+ * will not remove them from`emit()` in progress. Subsequent events behave as expected.
*
* ```js
* const myEmitter = new MyEmitter();
@@ -599,7 +636,7 @@ declare module 'events' {
*/
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
- * Adds a **one-time**`listener` function for the event named `eventName` to the_beginning_ of the listeners array. The next time `eventName` is triggered, this
+ * Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
* listener is removed, and then invoked.
*
* ```js
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/fs.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/fs.d.ts
index f82cba2a6..e108af75c 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/fs.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/fs.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `fs` module enables interacting with the file system in a
@@ -19,7 +19,7 @@
*
* All file system operations have synchronous, callback, and promise-based
* forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/fs.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/fs.js)
*/
declare module 'fs' {
import * as stream from 'node:stream';
@@ -271,18 +271,22 @@ declare module 'fs' {
*/
export interface StatWatcher extends EventEmitter {
/**
+ * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have
+ * no effect.
+ *
+ * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally
+ * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been
+ * called previously.
* @since v14.3.0, v12.20.0
- * When called, requests that the Node.js event loop not exit so long as the `fs.StatWatcher` is active.
- * Calling `watcher.ref()` multiple times will have no effect.
- * By default, all `fs.StatWatcher`` objects are "ref'ed", making it normally unnecessary to call `watcher.ref()`
- * unless `watcher.unref()` had been called previously.
*/
ref(): this;
/**
+ * When called, the active `fs.StatWatcher` object will not require the Node.js
+ * event loop to remain active. If there is no other activity keeping the
+ * event loop running, the process may exit before the `fs.StatWatcher` object's
+ * callback is invoked. Calling `watcher.unref()` multiple times will have
+ * no effect.
* @since v14.3.0, v12.20.0
- * When called, the active `fs.StatWatcher`` object will not require the Node.js event loop to remain active.
- * If there is no other activity keeping the event loop running, the process may exit before the `fs.StatWatcher`` object's callback is invoked.
- * `Calling watcher.unref()` multiple times will have no effect.
*/
unref(): this;
}
@@ -1017,8 +1021,10 @@ declare module 'fs' {
function __promisify__(fd: number, options?: StatOptions): Promise;
}
/**
- * Synchronous fstat(2) - Get file status.
- * @param fd A file descriptor.
+ * Retrieves the `fs.Stats` for the file descriptor.
+ *
+ * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
+ * @since v0.1.95
*/
export function fstatSync(
fd: number,
@@ -1033,7 +1039,6 @@ declare module 'fs' {
}
): BigIntStats;
export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
-
/**
* Retrieves the `fs.Stats` for the symbolic link referred to by the path.
* The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic
@@ -1121,15 +1126,15 @@ declare module 'fs' {
* ```js
* import { symlink } from 'fs';
*
- * symlink('./mew', './example/mewtwo', callback);
+ * symlink('./mew', './mewtwo', callback);
* ```
*
- * The above example creates a symbolic link `mewtwo` in the `example` which points
- * to `mew` in the same directory:
+ * The above example creates a symbolic link `mewtwo` which points to `mew` in the
+ * same directory:
*
* ```bash
- * $ tree example/
- * example/
+ * $ tree .
+ * .
* ├── mew
* └── mewtwo -> ./mew
* ```
@@ -1393,7 +1398,7 @@ declare module 'fs' {
* Use `fs.rm(path, { recursive: true, force: true })` instead.
*
* If `true`, perform a recursive directory removal. In
- * recursive mode soperations are retried on failure.
+ * recursive mode, operations are retried on failure.
* @default false
*/
recursive?: boolean | undefined;
@@ -1999,8 +2004,8 @@ declare module 'fs' {
export function open(path: PathLike, flags: OpenMode | undefined, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
/**
* Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
- * @param [flags='r'] See `support of file system `flags``.
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param [flags='r'] See `support of file system `flags``.
*/
export function open(path: PathLike, flags: OpenMode | undefined, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
/**
@@ -2008,6 +2013,7 @@ declare module 'fs' {
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
*/
export function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+
export namespace open {
/**
* Asynchronous open(2) - open and possibly create a file.
@@ -2096,8 +2102,7 @@ declare module 'fs' {
*/
export function fsyncSync(fd: number): void;
/**
- * Write `buffer` to the file specified by `fd`. If `buffer` is a normal object, it
- * must have an own `toString` function property.
+ * Write `buffer` to the file specified by `fd`.
*
* `offset` determines the part of the buffer to be written, and `length` is
* an integer specifying the number of bytes to write.
@@ -2220,8 +2225,6 @@ declare module 'fs' {
}>;
}
/**
- * If `buffer` is a plain object, it must have an own (not inherited) `toString`function property.
- *
* For detailed information, see the documentation of the asynchronous version of
* this API: {@link write}.
* @since v0.1.21
@@ -2237,6 +2240,23 @@ declare module 'fs' {
*/
export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number;
export type ReadPosition = number | bigint;
+ export interface ReadSyncOptions {
+ /**
+ * @default 0
+ */
+ offset?: number | undefined;
+ /**
+ * @default `length of buffer`
+ */
+ length?: number | undefined;
+ /**
+ * @default null
+ */
+ position?: ReadPosition | null | undefined;
+ }
+ export interface ReadAsyncOptions extends ReadSyncOptions {
+ buffer?: TBuffer;
+ }
/**
* Read data from the file specified by `fd`.
*
@@ -2262,6 +2282,21 @@ declare module 'fs' {
position: ReadPosition | null,
callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
): void;
+ /**
+ * Similar to the above `fs.read` function, this version takes an optional `options` object.
+ * If not otherwise specified in an `options` object,
+ * `buffer` defaults to `Buffer.alloc(16384)`,
+ * `offset` defaults to `0`,
+ * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0
+ * `position` defaults to `null`
+ * @since v12.17.0, 13.11.0
+ */
+ export function read(
+ fd: number,
+ options: ReadAsyncOptions,
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
+ ): void;
+ export function read(fd: number, callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void): void;
export namespace read {
/**
* @param fd A file descriptor.
@@ -2280,20 +2315,17 @@ declare module 'fs' {
bytesRead: number;
buffer: TBuffer;
}>;
- }
- export interface ReadSyncOptions {
- /**
- * @default 0
- */
- offset?: number | undefined;
- /**
- * @default `length of buffer`
- */
- length?: number | undefined;
- /**
- * @default null
- */
- position?: ReadPosition | null | undefined;
+ function __promisify__(
+ fd: number,
+ options: ReadAsyncOptions
+ ): Promise<{
+ bytesRead: number;
+ buffer: TBuffer;
+ }>;
+ function __promisify__(fd: number): Promise<{
+ bytesRead: number;
+ buffer: NodeJS.ArrayBufferView;
+ }>;
}
/**
* Returns the number of `bytesRead`.
@@ -2558,8 +2590,6 @@ declare module 'fs' {
*
* The `mode` option only affects the newly created file. See {@link open} for more details.
*
- * If `data` is a plain object, it must have an own (not inherited) `toString`function property.
- *
* ```js
* import { writeFile } from 'fs';
* import { Buffer } from 'buffer';
@@ -2636,8 +2666,6 @@ declare module 'fs' {
/**
* Returns `undefined`.
*
- * If `data` is a plain object, it must have an own (not inherited) `toString`function property.
- *
* The `mode` option only affects the newly created file. See {@link open} for more details.
*
* For detailed information, see the documentation of the asynchronous version of
@@ -2821,6 +2849,52 @@ declare module 'fs' {
persistent?: boolean | undefined;
interval?: number | undefined;
}
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each
+ * time the file is accessed.
+ *
+ * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates
+ * whether the process should continue to run as long as files are being watched.
+ * The `options` object may specify an `interval` property indicating how often the
+ * target should be polled in milliseconds.
+ *
+ * The `listener` gets two arguments the current stat object and the previous
+ * stat object:
+ *
+ * ```js
+ * import { watchFile } from 'fs';
+ *
+ * watchFile('message.text', (curr, prev) => {
+ * console.log(`the current mtime is: ${curr.mtime}`);
+ * console.log(`the previous mtime was: ${prev.mtime}`);
+ * });
+ * ```
+ *
+ * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
+ * the numeric values in these objects are specified as `BigInt`s.
+ *
+ * To be notified when the file was modified, not just accessed, it is necessary
+ * to compare `curr.mtimeMs` and `prev.mtimeMs`.
+ *
+ * When an `fs.watchFile` operation results in an `ENOENT` error, it
+ * will invoke the listener once, with all the fields zeroed (or, for dates, the
+ * Unix Epoch). If the file is created later on, the listener will be called
+ * again, with the latest stat objects. This is a change in functionality since
+ * v0.10.
+ *
+ * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible.
+ *
+ * When a file being watched by `fs.watchFile()` disappears and reappears,
+ * then the contents of `previous` in the second callback event (the file's
+ * reappearance) will be the same as the contents of `previous` in the first
+ * callback event (its disappearance).
+ *
+ * This happens when:
+ *
+ * * the file is deleted, followed by a restore
+ * * the file is renamed and then renamed a second time back to its original name
+ * @since v0.1.31
+ */
export function watchFile(
filename: PathLike,
options:
@@ -3189,9 +3263,9 @@ declare module 'fs' {
/**
* Tests a user's permissions for the file or directory specified by `path`.
* The `mode` argument is an optional integer that specifies the accessibility
- * checks to be performed. Check `File access constants` for possible values
- * of `mode`. It is possible to create a mask consisting of the bitwise OR of
- * two or more values (e.g. `fs.constants.W_OK | fs.constants.R_OK`).
+ * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK`
+ * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
*
* The final argument, `callback`, is a callback function that is invoked with
* a possible error argument. If any of the accessibility checks fail, the error
@@ -3217,14 +3291,9 @@ declare module 'fs' {
* console.log(`${file} ${err ? 'is not writable' : 'is writable'}`);
* });
*
- * // Check if the file exists in the current directory, and if it is writable.
- * access(file, constants.F_OK | constants.W_OK, (err) => {
- * if (err) {
- * console.error(
- * `${file} ${err.code === 'ENOENT' ? 'does not exist' : 'is read-only'}`);
- * } else {
- * console.log(`${file} exists, and it is writable`);
- * }
+ * // Check if the file is readable and writable.
+ * access(file, constants.R_OK | constants.W_OK, (err) => {
+ * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`);
* });
* ```
*
@@ -3368,10 +3437,9 @@ declare module 'fs' {
/**
* Synchronously tests a user's permissions for the file or directory specified
* by `path`. The `mode` argument is an optional integer that specifies the
- * accessibility checks to be performed. Check `File access constants` for
- * possible values of `mode`. It is possible to create a mask consisting of
- * the bitwise OR of two or more values
- * (e.g. `fs.constants.W_OK | fs.constants.R_OK`).
+ * accessibility checks to be performed. `mode` should be either the value`fs.constants.F_OK` or a mask consisting of the bitwise OR of any of`fs.constants.R_OK`, `fs.constants.W_OK`, and
+ * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
*
* If any of the accessibility checks fail, an `Error` will be thrown. Otherwise,
* the method will return `undefined`.
@@ -3474,9 +3542,9 @@ declare module 'fs' {
/**
* `options` may also include a `start` option to allow writing data at some
* position past the beginning of the file, allowed values are in the
- * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than replacing
- * it may require the `flags` option to be set to `r+` rather than the default `w`.
- * The `encoding` can be any one of those accepted by `Buffer`.
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
+ * replacing it may require the `flags` option to be set to `r+` rather than the
+ * default `w`. The `encoding` can be any one of those accepted by `Buffer`.
*
* If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
* then the file descriptor won't be closed, even if there's an error.
@@ -3756,6 +3824,11 @@ declare module 'fs' {
* @default false
*/
recursive?: boolean;
+ /**
+ * When true, path resolution for symlinks will be skipped
+ * @default false
+ */
+ verbatimSymlinks?: boolean;
}
export interface CopyOptions extends CopyOptionsBase {
/**
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/fs/promises.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/fs/promises.d.ts
index ca6dde66c..97046f1df 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/fs/promises.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/fs/promises.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `fs/promises` API provides asynchronous file system methods that return
@@ -14,6 +14,7 @@
declare module 'fs/promises' {
import { Abortable } from 'node:events';
import { Stream } from 'node:stream';
+ import { ReadableStream } from 'node:stream/web';
import {
BigIntStats,
BufferEncodingOption,
@@ -33,11 +34,14 @@ declare module 'fs/promises' {
RmOptions,
StatOptions,
Stats,
+ TimeLike,
WatchEventType,
WatchOptions,
WriteStream,
WriteVResult,
} from 'node:fs';
+ import { Interface as ReadlineInterface } from 'node:readline';
+
interface FileChangeInfo {
eventType: WatchEventType;
filename: T;
@@ -46,11 +50,11 @@ declare module 'fs/promises' {
mode?: Mode | undefined;
flag?: OpenMode | undefined;
}
- interface FileReadResult {
+ interface FileReadResult {
bytesRead: number;
buffer: T;
}
- interface FileReadOptions {
+ interface FileReadOptions {
/**
* @default `Buffer.alloc(0xffff)`
*/
@@ -167,9 +171,9 @@ declare module 'fs/promises' {
/**
* `options` may also include a `start` option to allow writing data at some
* position past the beginning of the file, allowed values are in the
- * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than replacing
- * it may require the `flags` `open` option to be set to `r+` rather than the
- * default `r`. The `encoding` can be any one of those accepted by `Buffer`.
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
+ * replacing it may require the `flags` `open` option to be set to `r+` rather than
+ * the default `r`. The `encoding` can be any one of those accepted by `Buffer`.
*
* If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
* then the file descriptor won't be closed, even if there's an error.
@@ -211,8 +215,31 @@ declare module 'fs/promises' {
* integer, the current file position will remain unchanged.
* @return Fulfills upon success with an object with two properties:
*/
- read(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise>;
- read(options?: FileReadOptions): Promise>;
+ read(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise>;
+ read(options?: FileReadOptions): Promise>;
+ /**
+ * Returns a `ReadableStream` that may be used to read the files data.
+ *
+ * An error will be thrown if this method is called more than once or is called after the `FileHandle` is closed
+ * or closing.
+ *
+ * ```js
+ * import { open } from 'node:fs/promises';
+ *
+ * const file = await open('./some/file/to/read');
+ *
+ * for await (const chunk of file.readableWebStream())
+ * console.log(chunk);
+ *
+ * await file.close();
+ * ```
+ *
+ * While the `ReadableStream` will read the file to completion, it will not close the `FileHandle` automatically. User code must still call the `fileHandle.close()` method.
+ *
+ * @since v17.0.0
+ * @experimental
+ */
+ readableWebStream(): ReadableStream;
/**
* Asynchronously reads the entire contents of a file.
*
@@ -261,6 +288,23 @@ declare module 'fs/promises' {
| BufferEncoding
| null
): Promise;
+ /**
+ * Convenience method to create a `readline` interface and stream over the file. For example:
+ *
+ * ```js
+ * import { open } from 'node:fs/promises';
+ *
+ * const file = await open('./some/file/to/read');
+ *
+ * for await (const line of file.readLines()) {
+ * console.log(line);
+ * }
+ * ```
+ *
+ * @since v18.11.0
+ * @param options See `filehandle.createReadStream()` for the options.
+ */
+ readLines(options?: CreateReadStreamOptions): ReadlineInterface;
/**
* @since v10.0.0
* @return Fulfills with an {fs.Stats} for the file.
@@ -309,13 +353,12 @@ declare module 'fs/promises' {
* Change the file system timestamps of the object referenced by the `FileHandle` then resolves the promise with no arguments upon success.
* @since v10.0.0
*/
- utimes(atime: string | number | Date, mtime: string | number | Date): Promise;
+ utimes(atime: TimeLike, mtime: TimeLike): Promise;
/**
* Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
* [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or
- * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object, or an
- * object with an own `toString` function
- * property. The promise is resolved with no arguments upon success.
+ * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
+ * The promise is resolved with no arguments upon success.
*
* If `options` is a string, then it specifies the `encoding`.
*
@@ -333,20 +376,18 @@ declare module 'fs/promises' {
/**
* Write `buffer` to the file.
*
- * If `buffer` is a plain object, it must have an own (not inherited) `toString`function property.
- *
* The promise is resolved with an object containing two properties:
*
* It is unsafe to use `filehandle.write()` multiple times on the same file
* without waiting for the promise to be resolved (or rejected). For this
- * scenario, use `fs.createWriteStream()`.
+ * scenario, use `filehandle.createWriteStream()`.
*
* On Linux, positional writes do not work when the file is opened in append mode.
* The kernel ignores the position argument and always appends the data to
* the end of the file.
* @since v10.0.0
* @param [offset=0] The start position from within `buffer` where the data to write begins.
- * @param [length=buffer.byteLength] The number of bytes from `buffer` to write.
+ * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write.
* @param position The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current position.
* See the POSIX pwrite(2) documentation for more detail.
*/
@@ -411,12 +452,13 @@ declare module 'fs/promises' {
}
const constants: typeof fsConstants;
+
/**
* Tests a user's permissions for the file or directory specified by `path`.
* The `mode` argument is an optional integer that specifies the accessibility
- * checks to be performed. Check `File access constants` for possible values
- * of `mode`. It is possible to create a mask consisting of the bitwise OR of
- * two or more values (e.g. `fs.constants.W_OK | fs.constants.R_OK`).
+ * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK`
+ * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+ * possible values of `mode`.
*
* If the accessibility check is successful, the promise is resolved with no
* value. If any of the accessibility checks fail, the promise is rejected
@@ -747,7 +789,7 @@ declare module 'fs/promises' {
* @since v14.5.0, v12.19.0
* @return Fulfills with `undefined` upon success.
*/
- function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise;
+ function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise;
/**
* Changes the ownership of a file.
* @since v10.0.0
@@ -765,7 +807,7 @@ declare module 'fs/promises' {
* @since v10.0.0
* @return Fulfills with `undefined` upon success.
*/
- function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise;
+ function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise;
/**
* Determines the actual location of `path` using the same semantics as the`fs.realpath.native()` function.
*
@@ -836,7 +878,9 @@ declare module 'fs/promises' {
*/
function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise;
/**
- * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a `Buffer`, or, an object with an own (not inherited)`toString` function property.
+ * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
+ * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or
+ * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
*
* The `encoding` option is ignored if `data` is a buffer.
*
@@ -851,7 +895,7 @@ declare module 'fs/promises' {
*
* Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience
* method that performs multiple `write` calls internally to write the buffer
- * passed to it. For performance sensitive code consider using `fs.createWriteStream()`.
+ * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`.
*
* It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`.
* Cancelation is "best effort", and some amount of data is likely still
@@ -1049,7 +1093,7 @@ declare module 'fs/promises' {
* disappears in the directory.
*
* All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`.
- * @since v15.9.0
+ * @since v15.9.0, v14.18.0
* @return of objects with the properties:
*/
function watch(
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/globals.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/globals.d.ts
index 304f5a976..ba7783dfd 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/globals.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/globals.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
// Declare "static" methods in Error
interface ErrorConstructor {
@@ -56,28 +56,32 @@ interface AbortController {
/**
* Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
*/
- abort(reason?: any): void;
+ abort(): void;
}
/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
-interface AbortSignal {
+interface AbortSignal extends EventTarget {
/**
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
*/
readonly aborted: boolean;
}
-declare var AbortController: {
- prototype: AbortController;
- new(): AbortController;
-};
+declare var AbortController: typeof globalThis extends {onmessage: any; AbortController: infer T}
+ ? T
+ : {
+ prototype: AbortController;
+ new(): AbortController;
+ };
-declare var AbortSignal: {
- prototype: AbortSignal;
- new(): AbortSignal;
- abort(reason?: any): AbortSignal;
- timeout(milliseconds: number): AbortSignal;
-};
+declare var AbortSignal: typeof globalThis extends {onmessage: any; AbortSignal: infer T}
+ ? T
+ : {
+ prototype: AbortSignal;
+ new(): AbortSignal;
+ abort(reason?: any): AbortSignal;
+ timeout(milliseconds: number): AbortSignal;
+ };
//#endregion borrowed
//#region ArrayLike.at()
@@ -105,6 +109,16 @@ interface BigInt64Array extends RelativeIndexable {}
interface BigUint64Array extends RelativeIndexable {}
//#endregion ArrayLike.at() end
+/**
+ * @since v17.0.0
+ *
+ * Creates a deep clone of an object.
+ */
+declare function structuredClone(
+ value: T,
+ transfer?: { transfer: ReadonlyArray },
+): T;
+
/*----------------------------------------------*
* *
* GLOBAL INTERFACES *
@@ -210,9 +224,9 @@ declare namespace NodeJS {
writable: boolean;
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
- end(cb?: () => void): void;
- end(data: string | Uint8Array, cb?: () => void): void;
- end(str: string, encoding?: BufferEncoding, cb?: () => void): void;
+ end(cb?: () => void): this;
+ end(data: string | Uint8Array, cb?: () => void): this;
+ end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
}
interface ReadWriteStream extends ReadableStream, WritableStream { }
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/http.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/http.d.ts
index ed5857081..a32a4640d 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/http.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/http.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* To use the HTTP server and client one must `require('http')`.
@@ -16,7 +16,7 @@
* { 'content-length': '123',
* 'content-type': 'text/plain',
* 'connection': 'keep-alive',
- * 'host': 'mysite.com',
+ * 'host': 'example.com',
* 'accept': '*' }
* ```
*
@@ -37,10 +37,10 @@
* 'content-LENGTH', '123',
* 'content-type', 'text/plain',
* 'CONNECTION', 'keep-alive',
- * 'Host', 'mysite.com',
+ * 'Host', 'example.com',
* 'accepT', '*' ]
* ```
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/http.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/http.js)
*/
declare module 'http' {
import * as stream from 'node:stream';
@@ -244,14 +244,12 @@ declare module 'http' {
* Limit the amount of time the parser will wait to receive the complete HTTP
* headers.
*
- * In case of inactivity, the rules defined in `server.timeout` apply. However,
- * that inactivity based timeout would still allow the connection to be kept open
- * if the headers are being sent very slowly (by default, up to a byte per 2
- * minutes). In order to prevent this, whenever header data arrives an additional
- * check is made that more than `server.headersTimeout` milliseconds has not
- * passed since the connection was established. If the check fails, a `'timeout'`event is emitted on the server object, and (by default) the socket is destroyed.
- * See `server.timeout` for more information on how timeout behavior can be
- * customized.
+ * If the timeout expires, the server responds with status 408 without
+ * forwarding the request to the request listener and then closes the connection.
+ *
+ * It must be set to a non-zero value (e.g. 120 seconds) to protect against
+ * potential Denial-of-Service attacks in case the server is deployed without a
+ * reverse proxy in front.
* @since v11.3.0, v10.14.0
*/
headersTimeout: number;
@@ -284,6 +282,16 @@ declare module 'http' {
* @since v14.11.0
*/
requestTimeout: number;
+ /**
+ * Closes all connections connected to this server.
+ * @since v18.2.0
+ */
+ closeAllConnections(): void;
+ /**
+ * Closes all connections connected to this server which are not sending a request or waiting for a response.
+ * @since v18.2.0
+ */
+ closeIdleConnections(): void;
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: 'close', listener: () => void): this;
addListener(event: 'connection', listener: (socket: Socket) => void): this;
@@ -410,7 +418,7 @@ declare module 'http' {
/**
* Aliases of `outgoingMessage.socket`
* @since v0.3.0
- * @deprecated Since v15.12.0 - Use `socket` instead.
+ * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead.
*/
readonly connection: Socket | null;
/**
@@ -461,13 +469,13 @@ declare module 'http' {
* const headers = outgoingMessage.getHeaders();
* // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] }
* ```
- * @since v8.0.0
+ * @since v7.7.0
*/
getHeaders(): OutgoingHttpHeaders;
/**
* Returns an array of names of headers of the outgoing outgoingMessage. All
* names are lowercase.
- * @since v8.0.0
+ * @since v7.7.0
*/
getHeaderNames(): string[];
/**
@@ -477,7 +485,7 @@ declare module 'http' {
* ```js
* const hasContentType = outgoingMessage.hasHeader('content-type');
* ```
- * @since v8.0.0
+ * @since v7.7.0
*/
hasHeader(name: string): boolean;
/**
@@ -487,6 +495,7 @@ declare module 'http' {
* outgoingMessage.removeHeader('Content-Encoding');
* ```
* @since v0.4.0
+ * @param name Header name
*/
removeHeader(name: string): void;
/**
@@ -564,11 +573,46 @@ declare module 'http' {
assignSocket(socket: Socket): void;
detachSocket(socket: Socket): void;
/**
- * Sends a HTTP/1.1 100 Continue message to the client, indicating that
+ * Sends an HTTP/1.1 100 Continue message to the client, indicating that
* the request body should be sent. See the `'checkContinue'` event on`Server`.
* @since v0.3.0
*/
writeContinue(callback?: () => void): void;
+ /**
+ * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header,
+ * indicating that the user agent can preload/preconnect the linked resources.
+ * The `hints` is an object containing the values of headers to be sent with
+ * early hints message. The optional `callback` argument will be called when
+ * the response message has been written.
+ *
+ * Example:
+ *
+ * ```js
+ * const earlyHintsLink = '; rel=preload; as=style';
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLink,
+ * });
+ *
+ * const earlyHintsLinks = [
+ * '; rel=preload; as=style',
+ * '; rel=preload; as=script',
+ * ];
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLinks,
+ * 'x-trace-id': 'id for diagnostics'
+ * });
+ *
+ * const earlyHintsCallback = () => console.log('early hints message sent');
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLinks
+ * }, earlyHintsCallback);
+ * ```
+ *
+ * @since v18.11.0
+ * @param hints An object containing the values of headers
+ * @param callback Will be called when the response message has been written
+ */
+ writeEarlyHints(hints: Record, callback?: () => void): void;
/**
* Sends a response header to the request. The status code is a 3-digit HTTP
* status code, like `404`. The last argument, `headers`, are the response headers.
@@ -633,7 +677,7 @@ declare module 'http' {
): this;
writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
/**
- * Sends a HTTP/1.1 102 Processing message to the client, indicating that
+ * Sends an HTTP/1.1 102 Processing message to the client, indicating that
* the request body should be sent.
* @since v10.0.0
*/
@@ -681,6 +725,7 @@ declare module 'http' {
* The `request.aborted` property will be `true` if the request has
* been aborted.
* @since v0.11.14
+ * @deprecated Since v17.0.0,v16.12.0 - Check `destroyed` instead.
*/
aborted: boolean;
/**
@@ -694,13 +739,58 @@ declare module 'http' {
*/
protocol: string;
/**
- * Whether the request is send through a reused socket.
+ * When sending request through a keep-alive enabled agent, the underlying socket
+ * might be reused. But if server closes connection at unfortunate time, client
+ * may run into a 'ECONNRESET' error.
+ *
+ * ```js
+ * const http = require('http');
+ *
+ * // Server has a 5 seconds keep-alive timeout by default
+ * http
+ * .createServer((req, res) => {
+ * res.write('hello\n');
+ * res.end();
+ * })
+ * .listen(3000);
+ *
+ * setInterval(() => {
+ * // Adapting a keep-alive agent
+ * http.get('http://localhost:3000', { agent }, (res) => {
+ * res.on('data', (data) => {
+ * // Do nothing
+ * });
+ * });
+ * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout
+ * ```
+ *
+ * By marking a request whether it reused socket or not, we can do
+ * automatic error retry base on it.
+ *
+ * ```js
+ * const http = require('http');
+ * const agent = new http.Agent({ keepAlive: true });
+ *
+ * function retriableRequest() {
+ * const req = http
+ * .get('http://localhost:3000', { agent }, (res) => {
+ * // ...
+ * })
+ * .on('error', (err) => {
+ * // Check if retry is needed
+ * if (req.reusedSocket && err.code === 'ECONNRESET') {
+ * retriableRequest();
+ * }
+ * });
+ * }
+ *
+ * retriableRequest();
+ * ```
* @since v13.0.0, v12.16.0
*/
reusedSocket: boolean;
/**
* Limits maximum response headers count. If set to 0, no limit will be applied.
- * @default 2000
*/
maxHeadersCount: number;
constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
@@ -750,9 +840,12 @@ declare module 'http' {
* const headerNames = request.getRawHeaderNames();
* // headerNames === ['Foo', 'Set-Cookie']
* ```
- * @since v15.13.0
+ * @since v15.13.0, v14.17.0
*/
getRawHeaderNames(): string[];
+ /**
+ * @deprecated
+ */
addListener(event: 'abort', listener: () => void): this;
addListener(
event: 'connect',
@@ -774,6 +867,9 @@ declare module 'http' {
addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
on(event: 'abort', listener: () => void): this;
on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
on(event: 'continue', listener: () => void): this;
@@ -789,6 +885,9 @@ declare module 'http' {
on(event: 'pipe', listener: (src: stream.Readable) => void): this;
on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
once(event: 'abort', listener: () => void): this;
once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
once(event: 'continue', listener: () => void): this;
@@ -804,6 +903,9 @@ declare module 'http' {
once(event: 'pipe', listener: (src: stream.Readable) => void): this;
once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
prependListener(event: 'abort', listener: () => void): this;
prependListener(
event: 'connect',
@@ -825,6 +927,9 @@ declare module 'http' {
prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ /**
+ * @deprecated
+ */
prependOnceListener(event: 'abort', listener: () => void): this;
prependOnceListener(
event: 'connect',
@@ -863,6 +968,7 @@ declare module 'http' {
* The `message.aborted` property will be `true` if the request has
* been aborted.
* @since v10.1.0
+ * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from stream.Readable .
*/
aborted: boolean;
/**
@@ -914,7 +1020,7 @@ declare module 'http' {
*
* This property is guaranteed to be an instance of the `net.Socket` class,
* a subclass of `stream.Duplex`, unless the user specified a socket
- * type other than `net.Socket`.
+ * type other than `net.Socket` or internally nulled.
* @since v0.3.0
*/
socket: Socket;
@@ -929,7 +1035,7 @@ declare module 'http' {
* // { 'user-agent': 'curl/7.22.0',
* // host: '127.0.0.1:8000',
* // accept: '*' }
- * console.log(request.headers);
+ * console.log(request.getHeaders());
* ```
*
* Duplicates in raw headers are handled in the following ways, depending on the
@@ -1005,14 +1111,14 @@ declare module 'http' {
* To parse the URL into its parts:
*
* ```js
- * new URL(request.url, `http://${request.headers.host}`);
+ * new URL(request.url, `http://${request.getHeaders().host}`);
* ```
*
- * When `request.url` is `'/status?name=ryan'` and`request.headers.host` is `'localhost:3000'`:
+ * When `request.url` is `'/status?name=ryan'` and`request.getHeaders().host` is `'localhost:3000'`:
*
* ```console
* $ node
- * > new URL(request.url, `http://${request.headers.host}`)
+ * > new URL(request.url, `http://${request.getHeaders().host}`)
* URL {
* href: 'http://localhost:3000/status?name=ryan',
* origin: 'http://localhost:3000',
@@ -1212,11 +1318,16 @@ declare module 'http' {
function createServer<
Request extends typeof IncomingMessage = typeof IncomingMessage,
Response extends typeof ServerResponse = typeof ServerResponse,
- >(options: ServerOptions, requestListener?: RequestListener): Server;
+ >(
+ options: ServerOptions,
+ requestListener?: RequestListener,
+ ): Server;
// although RequestOptions are passed as ClientRequestArgs to ClientRequest directly,
// create interface RequestOptions would make the naming more clear to developers
interface RequestOptions extends ClientRequestArgs {}
/**
+ * `options` in `socket.connect()` are also supported.
+ *
* Node.js maintains several connections per server to make HTTP requests.
* This function allows one to transparently issue requests.
*
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/http2.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/http2.d.ts
index 27c2cfa31..95f15c286 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/http2.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/http2.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol. It
@@ -9,7 +9,7 @@
* const http2 = require('http2');
* ```
* @since v8.4.0
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/http2.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/http2.js)
*/
declare module 'http2' {
import EventEmitter = require('node:events');
@@ -86,7 +86,7 @@ declare module 'http2' {
*/
readonly destroyed: boolean;
/**
- * Set the `true` if the `END_STREAM` flag was set in the request or response
+ * Set to `true` if the `END_STREAM` flag was set in the request or response
* HEADERS frame received, indicating that no additional data should be received
* and the readable side of the `Http2Stream` will be closed.
* @since v10.11.0
@@ -761,7 +761,7 @@ declare module 'http2' {
* session.setLocalWindowSize(expectedWindowSize);
* });
* ```
- * @since v15.3.0
+ * @since v15.3.0, v14.18.0
*/
setLocalWindowSize(windowSize: number): void;
/**
@@ -849,6 +849,11 @@ declare module 'http2' {
* For HTTP/2 Client `Http2Session` instances only, the `http2session.request()`creates and returns an `Http2Stream` instance that can be used to send an
* HTTP/2 request to the connected server.
*
+ * When a `ClientHttp2Session` is first created, the socket may not yet be
+ * connected. if `clienthttp2session.request()` is called during this time, the
+ * actual request will be deferred until the socket is ready to go.
+ * If the `session` is closed before the actual request be executed, an`ERR_HTTP2_GOAWAY_SESSION` is thrown.
+ *
* This method is only available if `http2session.type` is equal to`http2.constants.NGHTTP2_SESSION_CLIENT`.
*
* ```js
@@ -1640,7 +1645,7 @@ declare module 'http2' {
* be called multiple times to provide successive parts of the body.
*
* In the `http` module, the response body is omitted when the
- * request is a HEAD request. Similarly, the `204` and `304` responses_must not_ include a message body.
+ * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body.
*
* `chunk` can be a string or a buffer. If `chunk` is a string,
* the second parameter specifies how to encode it into a byte stream.
@@ -1668,6 +1673,34 @@ declare module 'http2' {
* @since v8.4.0
*/
writeContinue(): void;
+ /**
+ * Sends a status `103 Early Hints` to the client with a Link header,
+ * indicating that the user agent can preload/preconnect the linked resources.
+ * The `hints` is an object containing the values of headers to be sent with
+ * early hints message.
+ *
+ * Example:
+ *
+ * ```js
+ * const earlyHintsLink = '; rel=preload; as=style';
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLink,
+ * });
+ *
+ * const earlyHintsLinks = [
+ * '; rel=preload; as=style',
+ * '; rel=preload; as=script',
+ * ];
+ * response.writeEarlyHints({
+ * 'link': earlyHintsLinks,
+ * 'x-trace-id': 'id for diagnostics'
+ * });
+ * ```
+ *
+ * @since v18.11.0
+ * @param hints An object containing the values of headers
+ */
+ writeEarlyHints(hints: Record): void;
/**
* Sends a response header to the request. The status code is a 3-digit HTTP
* status code, like `404`. The last argument, `headers`, are the response headers.
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/https.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/https.d.ts
index 0519f2630..c0e5dd666 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/https.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/https.d.ts
@@ -1,10 +1,10 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
* separate module.
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/https.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/https.js)
*/
declare module 'https' {
import { Duplex } from 'node:stream';
@@ -17,7 +17,6 @@ declare module 'https' {
> = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions;
type RequestOptions = http.RequestOptions &
tls.SecureContextOptions & {
- checkServerIdentity?: typeof tls.checkServerIdentity | undefined;
rejectUnauthorized?: boolean | undefined; // Defaults to true
servername?: string | undefined; // SNI TLS Extension
};
@@ -50,6 +49,16 @@ declare module 'https' {
options: ServerOptions,
requestListener?: http.RequestListener,
);
+ /**
+ * Closes all connections connected to this server.
+ * @since v18.2.0
+ */
+ closeAllConnections(): void;
+ /**
+ * Closes all connections connected to this server which are not sending a request or waiting for a response.
+ * @since v18.2.0
+ */
+ closeIdleConnections(): void;
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
addListener(
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/module.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/module.d.ts
index 74dd41a54..672195092 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/module.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/module.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* @since v0.3.7
@@ -88,7 +88,6 @@ declare module 'module' {
static wrap(code: string): string;
static createRequire(path: string | URL): NodeRequire;
static builtinModules: string[];
- static isBuiltin(moduleName: string): boolean;
static Module: typeof Module;
constructor(id: string, parent?: Module);
}
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/net.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/net.d.ts
index 5defb606f..7243599a5 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/net.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/net.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* > Stability: 2 - Stable
@@ -13,7 +13,7 @@
* ```js
* const net = require('net');
* ```
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/net.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/net.js)
*/
declare module 'net' {
import * as stream from 'node:stream';
@@ -134,6 +134,17 @@ declare module 'net' {
* @return The socket itself.
*/
pause(): this;
+ /**
+ * Close the TCP connection by sending an RST packet and destroy the stream.
+ * If this TCP socket is in connecting status, it will send an RST packet
+ * and destroy this TCP socket once it is connected. Otherwise, it will call
+ * `socket.destroy` with an `ERR_SOCKET_CLOSED` Error. If this is not a TCP socket
+ * (for example, a pipe), calling this method will immediately throw
+ * an `ERR_INVALID_HANDLE_TYPE` Error.
+ * @since v18.3.0
+ * @return The socket itself.
+ */
+ resetAndDestroy(): this;
/**
* Resumes reading after a call to `socket.pause()`.
* @return The socket itself.
@@ -211,7 +222,7 @@ declare module 'net' {
*/
unref(): this;
/**
- * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will_not_ let the program exit if it's the only socket left (the default behavior).
+ * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior).
* If the socket is `ref`ed calling `ref` again will have no effect.
* @since v0.9.1
* @return The socket itself.
@@ -271,15 +282,9 @@ declare module 'net' {
readonly localPort?: number;
/**
* The string representation of the local IP family. `'IPv4'` or `'IPv6'`.
- * @since v18.8.0, v16.18.0
+ * @since v18.8.0
*/
readonly localFamily?: string;
- /**
- * This is `true` if the socket is not connected yet, either because `.connect()`
- * has not yet been called or because it is still in the process of connecting (see `socket.connecting`).
- * @since v10.16.0
- */
- readonly pending: boolean;
/**
* This property represents the state of the connection as a string.
* @see {https://nodejs.org/api/net.html#socketreadystate}
@@ -329,7 +334,8 @@ declare module 'net' {
* 5. end
* 6. error
* 7. lookup
- * 8. timeout
+ * 8. ready
+ * 9. timeout
*/
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: 'close', listener: (hadError: boolean) => void): this;
@@ -436,6 +442,14 @@ declare module 'net' {
*/
keepAliveInitialDelay?: number | undefined;
}
+ interface DropArgument {
+ localAddress?: string;
+ localPort?: number;
+ localFamily?: string;
+ remoteAddress?: string;
+ remotePort?: number;
+ remoteFamily?: string;
+ }
/**
* This class is used to create a TCP or `IPC` server.
* @since v0.1.90
@@ -540,7 +554,7 @@ declare module 'net' {
*/
getConnections(cb: (error: Error | null, count: number) => void): void;
/**
- * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will_not_ let the program exit if it's the only server left (the default behavior).
+ * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior).
* If the server is `ref`ed calling `ref()` again will have no effect.
* @since v0.9.1
*/
@@ -572,49 +586,56 @@ declare module 'net' {
* 2. connection
* 3. error
* 4. listening
+ * 5. drop
*/
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: 'close', listener: () => void): this;
addListener(event: 'connection', listener: (socket: Socket) => void): this;
addListener(event: 'error', listener: (err: Error) => void): this;
addListener(event: 'listening', listener: () => void): this;
+ addListener(event: 'drop', listener: (data?: DropArgument) => void): this;
emit(event: string | symbol, ...args: any[]): boolean;
emit(event: 'close'): boolean;
emit(event: 'connection', socket: Socket): boolean;
emit(event: 'error', err: Error): boolean;
emit(event: 'listening'): boolean;
+ emit(event: 'drop', data?: DropArgument): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: 'close', listener: () => void): this;
on(event: 'connection', listener: (socket: Socket) => void): this;
on(event: 'error', listener: (err: Error) => void): this;
on(event: 'listening', listener: () => void): this;
+ on(event: 'drop', listener: (data?: DropArgument) => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: 'close', listener: () => void): this;
once(event: 'connection', listener: (socket: Socket) => void): this;
once(event: 'error', listener: (err: Error) => void): this;
once(event: 'listening', listener: () => void): this;
+ once(event: 'drop', listener: (data?: DropArgument) => void): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: 'close', listener: () => void): this;
prependListener(event: 'connection', listener: (socket: Socket) => void): this;
prependListener(event: 'error', listener: (err: Error) => void): this;
prependListener(event: 'listening', listener: () => void): this;
+ prependListener(event: 'drop', listener: (data?: DropArgument) => void): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'close', listener: () => void): this;
prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
prependOnceListener(event: 'listening', listener: () => void): this;
+ prependOnceListener(event: 'drop', listener: (data?: DropArgument) => void): this;
}
type IPVersion = 'ipv4' | 'ipv6';
/**
* The `BlockList` object can be used with some network APIs to specify rules for
* disabling inbound or outbound access to specific IP addresses, IP ranges, or
* IP subnets.
- * @since v15.0.0
+ * @since v15.0.0, v14.18.0
*/
class BlockList {
/**
* Adds a rule to block the given IP address.
- * @since v15.0.0
+ * @since v15.0.0, v14.18.0
* @param address An IPv4 or IPv6 address.
* @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
*/
@@ -622,7 +643,7 @@ declare module 'net' {
addAddress(address: SocketAddress): void;
/**
* Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive).
- * @since v15.0.0
+ * @since v15.0.0, v14.18.0
* @param start The starting IPv4 or IPv6 address in the range.
* @param end The ending IPv4 or IPv6 address in the range.
* @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
@@ -631,7 +652,7 @@ declare module 'net' {
addRange(start: SocketAddress, end: SocketAddress): void;
/**
* Adds a rule to block a range of IP addresses specified as a subnet mask.
- * @since v15.0.0
+ * @since v15.0.0, v14.18.0
* @param net The network IPv4 or IPv6 address.
* @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`.
* @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
@@ -655,7 +676,7 @@ declare module 'net' {
* console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true
* console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true
* ```
- * @since v15.0.0
+ * @since v15.0.0, v14.18.0
* @param address The IP address to check
* @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
*/
@@ -686,7 +707,7 @@ declare module 'net' {
*
* The server can be a TCP server or an `IPC` server, depending on what it `listen()` to.
*
- * Here is an example of an TCP echo server which listens for connections
+ * Here is an example of a TCP echo server which listens for connections
* on port 8124:
*
* ```js
@@ -765,19 +786,39 @@ declare module 'net' {
function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
function createConnection(path: string, connectionListener?: () => void): Socket;
/**
- * Tests if input is an IP address. Returns `0` for invalid strings,
- * returns `4` for IP version 4 addresses, and returns `6` for IP version 6
- * addresses.
+ * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4
+ * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`.
+ *
+ * ```js
+ * net.isIP('::1'); // returns 6
+ * net.isIP('127.0.0.1'); // returns 4
+ * net.isIP('127.000.000.001'); // returns 0
+ * net.isIP('127.0.0.1/24'); // returns 0
+ * net.isIP('fhqwhgads'); // returns 0
+ * ```
* @since v0.3.0
*/
function isIP(input: string): number;
/**
- * Returns `true` if input is a version 4 IP address, otherwise returns `false`.
+ * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no
+ * leading zeroes. Otherwise, returns `false`.
+ *
+ * ```js
+ * net.isIPv4('127.0.0.1'); // returns true
+ * net.isIPv4('127.000.000.001'); // returns false
+ * net.isIPv4('127.0.0.1/24'); // returns false
+ * net.isIPv4('fhqwhgads'); // returns false
+ * ```
* @since v0.3.0
*/
function isIPv4(input: string): boolean;
/**
- * Returns `true` if input is a version 6 IP address, otherwise returns `false`.
+ * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`.
+ *
+ * ```js
+ * net.isIPv6('::1'); // returns true
+ * net.isIPv6('fhqwhgads'); // returns false
+ * ```
* @since v0.3.0
*/
function isIPv6(input: string): boolean;
@@ -803,25 +844,25 @@ declare module 'net' {
port?: number | undefined;
}
/**
- * @since v15.14.0
+ * @since v15.14.0, v14.18.0
*/
class SocketAddress {
constructor(options: SocketAddressInitOptions);
/**
- * @since v15.14.0
+ * @since v15.14.0, v14.18.0
*/
readonly address: string;
/**
* Either \`'ipv4'\` or \`'ipv6'\`.
- * @since v15.14.0
+ * @since v15.14.0, v14.18.0
*/
readonly family: IPVersion;
/**
- * @since v15.14.0
+ * @since v15.14.0, v14.18.0
*/
readonly port: number;
/**
- * @since v15.14.0
+ * @since v15.14.0, v14.18.0
*/
readonly flowlabel: number;
}
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/os.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/os.d.ts
index 162ed4239..a4117529c 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/os.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/os.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `os` module provides operating system-related utility methods and
@@ -8,7 +8,7 @@
* ```js
* const os = require('os');
* ```
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/os.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/os.js)
*/
declare module 'os' {
interface CpuInfo {
@@ -31,6 +31,7 @@ declare module 'os' {
}
interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
family: 'IPv4';
+ scopeid?: undefined;
}
interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
family: 'IPv6';
@@ -390,7 +391,7 @@ declare module 'os' {
const EOL: string;
/**
* Returns the operating system CPU architecture for which the Node.js binary was
- * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, and `'x64'`.
+ * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`.
*
* The return value is equivalent to `process.arch`.
* @since v0.5.0
@@ -405,8 +406,9 @@ declare module 'os' {
*/
function version(): string;
/**
- * Returns a string identifying the operating system platform. The value is set
- * at compile time. Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`.
+ * Returns a string identifying the operating system platform for which
+ * the Node.js binary was compiled. The value is set at compile time.
+ * Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`,`'openbsd'`, `'sunos'`, and `'win32'`.
*
* The return value is equivalent to `process.platform`.
*
@@ -415,6 +417,15 @@ declare module 'os' {
* @since v0.5.0
*/
function platform(): NodeJS.Platform;
+ /**
+ * Returns the machine type as a string, such as arm, aarch64, mips, mips64, ppc64, ppc64le, s390, s390x, i386, i686, x86_64.
+ *
+ * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname).
+ * On Windows, `RtlGetVersion()` is used, and if it is not available, `GetVersionExW()` will be used.
+ * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+ * @since v18.9.0
+ */
+ function machine(): string;
/**
* Returns the operating system's default directory for temporary files as a
* string.
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/path.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/path.d.ts
index 93e868779..1a646fe48 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/path.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/path.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
declare module 'path/posix' {
import path = require('path');
@@ -16,7 +16,7 @@ declare module 'path/win32' {
* ```js
* const path = require('path');
* ```
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/path.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/path.js)
*/
declare module 'path' {
namespace path {
@@ -93,7 +93,7 @@ declare module 'path' {
* the current working directory is used as well. The resulting path is normalized,
* and trailing slashes are removed unless the path gets resolved to the root directory.
*
- * @param paths string paths to join.
+ * @param paths A sequence of paths or path segments.
* @throws {TypeError} if any of the arguments is not a string.
*/
resolve(...paths: string[]): string;
@@ -125,10 +125,10 @@ declare module 'path' {
* Often used to extract the file name from a fully qualified path.
*
* @param path the path to evaluate.
- * @param ext optionally, an extension to remove from the result.
+ * @param suffix optionally, an extension to remove from the result.
* @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
*/
- basename(path: string, ext?: string): string;
+ basename(path: string, suffix?: string): string;
/**
* Return the extension of the path, from the last '.' to end of string in the last portion of the path.
* If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/perf_hooks.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/perf_hooks.d.ts
index 00a7eb649..52adf4747 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/perf_hooks.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/perf_hooks.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for
@@ -29,7 +29,7 @@
* performance.measure('A to B', 'A', 'B');
* });
* ```
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/perf_hooks.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/perf_hooks.js)
*/
declare module 'perf_hooks' {
import { AsyncResource } from 'node:async_hooks';
@@ -88,6 +88,14 @@ declare module 'perf_hooks' {
* @since v16.0.0
*/
readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type.
+ toJSON(): any;
+ }
+ class PerformanceMark extends PerformanceEntry {
+ readonly duration: 0;
+ readonly entryType: 'mark';
+ }
+ class PerformanceMeasure extends PerformanceEntry {
+ readonly entryType: 'measure';
}
/**
* _This property is an extension by Node.js. It is not available in Web browsers._
@@ -229,8 +237,9 @@ declare module 'perf_hooks' {
* and whose performanceEntry.duration is always 0.
* Performance marks are used to mark specific significant moments in the Performance Timeline.
* @param name
+ * @return The PerformanceMark entry that was created
*/
- mark(name?: string, options?: MarkOptions): void;
+ mark(name?: string, options?: MarkOptions): PerformanceMark;
/**
* Creates a new PerformanceMeasure entry in the Performance Timeline.
* A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
@@ -245,9 +254,10 @@ declare module 'perf_hooks' {
* @param name
* @param startMark
* @param endMark
+ * @return The PerformanceMeasure entry that was created
*/
- measure(name: string, startMark?: string, endMark?: string): void;
- measure(name: string, options: MeasureOptions): void;
+ measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure;
+ measure(name: string, options: MeasureOptions): PerformanceMeasure;
/**
* An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
*/
@@ -302,6 +312,9 @@ declare module 'perf_hooks' {
* * }
* * ]
*
+ *
+ * performance.clearMarks();
+ * performance.clearMeasures();
* observer.disconnect();
* });
* obs.observe({ type: 'mark' });
@@ -349,6 +362,9 @@ declare module 'perf_hooks' {
* * ]
*
* console.log(perfObserverList.getEntriesByName('test', 'measure')); // []
+ *
+ * performance.clearMarks();
+ * performance.clearMeasures();
* observer.disconnect();
* });
* obs.observe({ entryTypes: ['mark', 'measure'] });
@@ -387,6 +403,8 @@ declare module 'perf_hooks' {
* * }
* * ]
*
+ * performance.clearMarks();
+ * performance.clearMeasures();
* observer.disconnect();
* });
* obs.observe({ type: 'mark' });
@@ -416,7 +434,7 @@ declare module 'perf_hooks' {
* } = require('perf_hooks');
*
* const obs = new PerformanceObserver((list, observer) => {
- * // Called three times synchronously. `list` contains one item.
+ * // Called once asynchronously. `list` contains three items.
* });
* obs.observe({ type: 'mark' });
*
@@ -519,7 +537,7 @@ declare module 'perf_hooks' {
}
interface RecordableHistogram extends Histogram {
/**
- * @since v15.9.0
+ * @since v15.9.0, v14.18.0
* @param val The amount to record in the histogram.
*/
record(val: number | bigint): void;
@@ -528,9 +546,15 @@ declare module 'perf_hooks' {
* previous call to `recordDelta()` and records that amount in the histogram.
*
* ## Examples
- * @since v15.9.0
+ * @since v15.9.0, v14.18.0
*/
recordDelta(): void;
+ /**
+ * Adds the values from other to this histogram.
+ * @since v17.4.0, v16.14.0
+ * @param other Recordable Histogram to combine with
+ */
+ add(other: RecordableHistogram): void;
}
/**
* _This property is an extension by Node.js. It is not available in Web browsers._
@@ -580,9 +604,24 @@ declare module 'perf_hooks' {
}
/**
* Returns a `RecordableHistogram`.
- * @since v15.9.0
+ * @since v15.9.0, v14.18.0
*/
function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
+
+ import { performance as _performance } from 'perf_hooks';
+ global {
+ /**
+ * `performance` is a global reference for `require('perf_hooks').performance`
+ * https://nodejs.org/api/globals.html#performance
+ * @since v16.0.0
+ */
+ var performance: typeof globalThis extends {
+ onmessage: any;
+ performance: infer T;
+ }
+ ? T
+ : typeof _performance;
+ }
}
declare module 'node:perf_hooks' {
export * from 'perf_hooks';
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/process.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/process.d.ts
index ecf401022..023edcd76 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/process.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/process.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
declare module 'process' {
import * as tty from 'node:tty';
@@ -52,6 +52,7 @@ declare module 'process' {
openssl: string;
}
type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd';
+ type Architecture = 'arm' | 'arm64' | 'ia32' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' | 's390' | 's390x' | 'x64';
type Signals =
| 'SIGABRT'
| 'SIGALRM'
@@ -99,7 +100,7 @@ declare module 'process' {
type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void;
/**
* Most of the time the unhandledRejection will be an Error, but this should not be relied upon
- * as *anything* can be thrown/rejected, it is therefore unsafe to assume the the value is an Error.
+ * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error.
*/
type UnhandledRejectionListener = (reason: unknown, promise: Promise) => void;
type WarningListener = (warning: Error) => void;
@@ -592,7 +593,7 @@ declare module 'process' {
*
* The reason this is problematic is because writes to `process.stdout` in Node.js
* are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js
- * event loop. Calling `process.exit()`, however, forces the process to exit_before_ those additional writes to `stdout` can be performed.
+ * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed.
*
* Rather than calling `process.exit()` directly, the code _should_ set the`process.exitCode` and allow the process to exit naturally by avoiding
* scheduling any additional work for the event loop:
@@ -644,7 +645,7 @@ declare module 'process' {
* Android).
* @since v0.1.31
*/
- getgid(): number;
+ getgid?: () => number;
/**
* The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a
* numeric ID or a group name
@@ -671,7 +672,7 @@ declare module 'process' {
* @since v0.1.31
* @param id The group name or ID
*/
- setgid(id: number | string): void;
+ setgid?: (id: number | string) => void;
/**
* The `process.getuid()` method returns the numeric user identity of the process.
* (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).)
@@ -688,7 +689,7 @@ declare module 'process' {
* Android).
* @since v0.1.28
*/
- getuid(): number;
+ getuid?: () => number;
/**
* The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a
* numeric ID or a username string.
@@ -714,7 +715,7 @@ declare module 'process' {
* This feature is not available in `Worker` threads.
* @since v0.1.28
*/
- setuid(id: number | string): void;
+ setuid?: (id: number | string) => void;
/**
* The `process.geteuid()` method returns the numerical effective user identity of
* the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).)
@@ -731,7 +732,7 @@ declare module 'process' {
* Android).
* @since v2.0.0
*/
- geteuid(): number;
+ geteuid?: () => number;
/**
* The `process.seteuid()` method sets the effective user identity of the process.
* (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username
@@ -758,7 +759,7 @@ declare module 'process' {
* @since v2.0.0
* @param id A user name or ID
*/
- seteuid(id: number | string): void;
+ seteuid?: (id: number | string) => void;
/**
* The `process.getegid()` method returns the numerical effective group identity
* of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).)
@@ -775,7 +776,7 @@ declare module 'process' {
* Android).
* @since v2.0.0
*/
- getegid(): number;
+ getegid?: () => number;
/**
* The `process.setegid()` method sets the effective group identity of the process.
* (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group
@@ -802,7 +803,7 @@ declare module 'process' {
* @since v2.0.0
* @param id A group name or ID
*/
- setegid(id: number | string): void;
+ setegid?: (id: number | string) => void;
/**
* The `process.getgroups()` method returns an array with the supplementary group
* IDs. POSIX leaves it unspecified if the effective group ID is included but
@@ -820,7 +821,7 @@ declare module 'process' {
* Android).
* @since v0.9.4
*/
- getgroups(): number[];
+ getgroups?: () => number[];
/**
* The `process.setgroups()` method sets the supplementary group IDs for the
* Node.js process. This is a privileged operation that requires the Node.js
@@ -846,7 +847,7 @@ declare module 'process' {
* This feature is not available in `Worker` threads.
* @since v0.9.4
*/
- setgroups(groups: ReadonlyArray): void;
+ setgroups?: (groups: ReadonlyArray) => void;
/**
* The `process.setUncaughtExceptionCaptureCallback()` function sets a function
* that will be invoked when an uncaught exception occurs, which will receive the
@@ -1043,7 +1044,7 @@ declare module 'process' {
title: string;
/**
* The operating system CPU architecture for which the Node.js binary was compiled.
- * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`,`'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, and `'x64'`.
+ * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`,`'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`.
*
* ```js
* import { arch } from 'process';
@@ -1052,10 +1053,10 @@ declare module 'process' {
* ```
* @since v0.5.0
*/
- readonly arch: string;
+ readonly arch: Architecture;
/**
* The `process.platform` property returns a string identifying the operating
- * system platform on which the Node.js process is running.
+ * system platform for which the Node.js binary was compiled.
*
* Currently possible values are:
*
@@ -1408,7 +1409,7 @@ declare module 'process' {
emit(event: 'unhandledRejection', reason: unknown, promise: Promise): boolean;
emit(event: 'warning', warning: Error): boolean;
emit(event: 'message', message: unknown, sendHandle: unknown): this;
- emit(event: Signals, signal: Signals): boolean;
+ emit(event: Signals, signal?: Signals): boolean;
emit(event: 'multipleResolves', type: MultipleResolveType, promise: Promise, value: unknown): this;
emit(event: 'worker', listener: WorkerListener): this;
on(event: 'beforeExit', listener: BeforeExitListener): this;
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/querystring.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/querystring.d.ts
index 38f687d11..34deac14d 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/querystring.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/querystring.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `querystring` module provides utilities for parsing and formatting URL
@@ -12,7 +12,7 @@
* `querystring` is more performant than `URLSearchParams` but is not a
* standardized API. Use `URLSearchParams` when performance is not critical
* or when compatibility with browser code is desirable.
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/querystring.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/querystring.js)
*/
declare module 'querystring' {
interface StringifyOptions {
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/readline.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/readline.d.ts
index e47ac3b29..d04d91bcf 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/readline.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/readline.d.ts
@@ -1,39 +1,46 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
- * The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time. It can be accessed
- * using:
+ * The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
+ *
+ * To use the promise-based APIs:
*
* ```js
- * const readline = require('readline');
+ * import * as readline from 'node:readline/promises';
+ * ```
+ *
+ * To use the callback and sync APIs:
+ *
+ * ```js
+ * import * as readline from 'node:readline';
* ```
*
* The following simple example illustrates the basic use of the `readline` module.
*
* ```js
- * const readline = require('readline');
+ * import * as readline from 'node:readline/promises';
+ * import { stdin as input, stdout as output } from 'node:process';
*
- * const rl = readline.createInterface({
- * input: process.stdin,
- * output: process.stdout
- * });
+ * const rl = readline.createInterface({ input, output });
*
- * rl.question('What do you think of Node.js? ', (answer) => {
- * // TODO: Log the answer in a database
- * console.log(`Thank you for your valuable feedback: ${answer}`);
+ * const answer = await rl.question('What do you think of Node.js? ');
*
- * rl.close();
- * });
+ * console.log(`Thank you for your valuable feedback: ${answer}`);
+ *
+ * rl.close();
* ```
*
* Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be
* received on the `input` stream.
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/readline.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/readline.js)
*/
declare module 'readline' {
import { Abortable, EventEmitter } from 'node:events';
- interface Key {
+ import * as promises from 'node:readline/promises';
+
+ export { promises };
+ export interface Key {
sequence?: string | undefined;
name?: string | undefined;
ctrl?: boolean | undefined;
@@ -47,7 +54,7 @@ declare module 'readline' {
* and is read from, the `input` stream.
* @since v0.1.104
*/
- class Interface extends EventEmitter {
+ export class Interface extends EventEmitter {
readonly terminal: boolean;
/**
* The current input data being processed by node.
@@ -314,11 +321,11 @@ declare module 'readline' {
prependOnceListener(event: 'history', listener: (history: string[]) => void): this;
[Symbol.asyncIterator](): AsyncIterableIterator;
}
- type ReadLine = Interface; // type forwarded for backwards compatibility
- type Completer = (line: string) => CompleterResult;
- type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => void;
- type CompleterResult = [string[], string];
- interface ReadLineOptions {
+ export type ReadLine = Interface; // type forwarded for backwards compatibility
+ export type Completer = (line: string) => CompleterResult;
+ export type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => void;
+ export type CompleterResult = [string[], string];
+ export interface ReadLineOptions {
input: NodeJS.ReadableStream;
output?: NodeJS.WritableStream | undefined;
completer?: Completer | AsyncCompleter | undefined;
@@ -379,8 +386,8 @@ declare module 'readline' {
* ```
* @since v0.1.98
*/
- function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
- function createInterface(options: ReadLineOptions): Interface;
+ export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
+ export function createInterface(options: ReadLineOptions): Interface;
/**
* The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input.
*
@@ -397,11 +404,114 @@ declare module 'readline' {
* if (process.stdin.isTTY)
* process.stdin.setRawMode(true);
* ```
+ *
+ * ## Example: Tiny CLI
+ *
+ * The following example illustrates the use of `readline.Interface` class to
+ * implement a small command-line interface:
+ *
+ * ```js
+ * const readline = require('readline');
+ * const rl = readline.createInterface({
+ * input: process.stdin,
+ * output: process.stdout,
+ * prompt: 'OHAI> '
+ * });
+ *
+ * rl.prompt();
+ *
+ * rl.on('line', (line) => {
+ * switch (line.trim()) {
+ * case 'hello':
+ * console.log('world!');
+ * break;
+ * default:
+ * console.log(`Say what? I might have heard '${line.trim()}'`);
+ * break;
+ * }
+ * rl.prompt();
+ * }).on('close', () => {
+ * console.log('Have a great day!');
+ * process.exit(0);
+ * });
+ * ```
+ *
+ * ## Example: Read file stream line-by-Line
+ *
+ * A common use case for `readline` is to consume an input file one line at a
+ * time. The easiest way to do so is leveraging the `fs.ReadStream` API as
+ * well as a `for await...of` loop:
+ *
+ * ```js
+ * const fs = require('fs');
+ * const readline = require('readline');
+ *
+ * async function processLineByLine() {
+ * const fileStream = fs.createReadStream('input.txt');
+ *
+ * const rl = readline.createInterface({
+ * input: fileStream,
+ * crlfDelay: Infinity
+ * });
+ * // Note: we use the crlfDelay option to recognize all instances of CR LF
+ * // ('\r\n') in input.txt as a single line break.
+ *
+ * for await (const line of rl) {
+ * // Each line in input.txt will be successively available here as `line`.
+ * console.log(`Line from file: ${line}`);
+ * }
+ * }
+ *
+ * processLineByLine();
+ * ```
+ *
+ * Alternatively, one could use the `'line'` event:
+ *
+ * ```js
+ * const fs = require('fs');
+ * const readline = require('readline');
+ *
+ * const rl = readline.createInterface({
+ * input: fs.createReadStream('sample.txt'),
+ * crlfDelay: Infinity
+ * });
+ *
+ * rl.on('line', (line) => {
+ * console.log(`Line from file: ${line}`);
+ * });
+ * ```
+ *
+ * Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied:
+ *
+ * ```js
+ * const { once } = require('events');
+ * const { createReadStream } = require('fs');
+ * const { createInterface } = require('readline');
+ *
+ * (async function processLineByLine() {
+ * try {
+ * const rl = createInterface({
+ * input: createReadStream('big-file.txt'),
+ * crlfDelay: Infinity
+ * });
+ *
+ * rl.on('line', (line) => {
+ * // Process the line.
+ * });
+ *
+ * await once(rl, 'close');
+ *
+ * console.log('File processed.');
+ * } catch (err) {
+ * console.error(err);
+ * }
+ * })();
+ * ```
* @since v0.7.7
*/
- function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
- type Direction = -1 | 0 | 1;
- interface CursorPos {
+ export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
+ export type Direction = -1 | 0 | 1;
+ export interface CursorPos {
rows: number;
cols: number;
}
@@ -412,7 +522,7 @@ declare module 'readline' {
* @param callback Invoked once the operation completes.
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
*/
- function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
+ export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
/**
* The `readline.clearScreenDown()` method clears the given `TTY` stream from
* the current position of the cursor down.
@@ -420,7 +530,7 @@ declare module 'readline' {
* @param callback Invoked once the operation completes.
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
*/
- function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
+ export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
/**
* The `readline.cursorTo()` method moves cursor to the specified position in a
* given `TTY` `stream`.
@@ -428,7 +538,7 @@ declare module 'readline' {
* @param callback Invoked once the operation completes.
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
*/
- function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
+ export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
/**
* The `readline.moveCursor()` method moves the cursor _relative_ to its current
* position in a given `TTY` `stream`.
@@ -539,7 +649,7 @@ declare module 'readline' {
* @param callback Invoked once the operation completes.
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
*/
- function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
+ export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
}
declare module 'node:readline' {
export * from 'readline';
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/readline/promises.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/readline/promises.d.ts
new file mode 100644
index 000000000..9a068f645
--- /dev/null
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/readline/promises.d.ts
@@ -0,0 +1,146 @@
+
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
+
+/**
+ * The `readline/promise` module provides an API for reading lines of input from a Readable stream one line at a time.
+ *
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/readline/promises.js)
+ * @since v17.0.0
+ */
+declare module 'readline/promises' {
+ import { Interface as _Interface, ReadLineOptions, Completer, AsyncCompleter, Direction } from 'node:readline';
+ import { Abortable } from 'node:events';
+
+ class Interface extends _Interface {
+ /**
+ * The rl.question() method displays the query by writing it to the output, waits for user input to be provided on input,
+ * then invokes the callback function passing the provided input as the first argument.
+ *
+ * When called, rl.question() will resume the input stream if it has been paused.
+ *
+ * If the readlinePromises.Interface was created with output set to null or undefined the query is not written.
+ *
+ * If the question is called after rl.close(), it returns a rejected promise.
+ *
+ * Example usage:
+ *
+ * ```js
+ * const answer = await rl.question('What is your favorite food? ');
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * ```
+ *
+ * Using an AbortSignal to cancel a question.
+ *
+ * ```js
+ * const signal = AbortSignal.timeout(10_000);
+ *
+ * signal.addEventListener('abort', () => {
+ * console.log('The food question timed out');
+ * }, { once: true });
+ *
+ * const answer = await rl.question('What is your favorite food? ', { signal });
+ * console.log(`Oh, so your favorite food is ${answer}`);
+ * ```
+ *
+ * @since v17.0.0
+ * @param query A statement or query to write to output, prepended to the prompt.
+ */
+ question(query: string): Promise;
+ question(query: string, options: Abortable): Promise;
+ }
+
+ class Readline {
+ /**
+ * @param stream A TTY stream.
+ */
+ constructor(stream: NodeJS.WritableStream, options?: { autoCommit?: boolean });
+ /**
+ * The `rl.clearLine()` method adds to the internal list of pending action an action that clears current line of the associated `stream` in a specified direction identified by `dir`.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
+ */
+ clearLine(dir: Direction): this;
+ /**
+ * The `rl.clearScreenDown()` method adds to the internal list of pending action an action that clears the associated `stream` from the current position of the cursor down.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
+ */
+ clearScreenDown(): this;
+ /**
+ * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions.
+ */
+ commit(): Promise;
+ /**
+ * The `rl.cursorTo()` method adds to the internal list of pending action an action that moves cursor to the specified position in the associated `stream`.
+ * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
+ */
+ cursorTo(x: number, y?: number): this;
+ /**
+ * The `rl.moveCursor()` method adds to the internal list of pending action an action that moves the cursor relative to its current position in the associated `stream`.
+ * Call `rl.commit()` to see the effect of this method, unless autoCommit: true was passed to the constructor.
+ */
+ moveCursor(dx: number, dy: number): this;
+ /**
+ * The `rl.rollback()` method clears the internal list of pending actions without sending it to the associated `stream`.
+ */
+ rollback(): this;
+ }
+
+ /**
+ * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance.
+ *
+ * ```js
+ * const readlinePromises = require('node:readline/promises');
+ * const rl = readlinePromises.createInterface({
+ * input: process.stdin,
+ * output: process.stdout
+ * });
+ * ```
+ *
+ * Once the `readlinePromises.Interface` instance is created, the most common case is to listen for the `'line'` event:
+ *
+ * ```js
+ * rl.on('line', (line) => {
+ * console.log(`Received: ${line}`);
+ * });
+ * ```
+ *
+ * If `terminal` is `true` for this instance then the `output` stream will get the best compatibility if it defines an `output.columns` property,
+ * and emits a `'resize'` event on the `output`, if or when the columns ever change (`process.stdout` does this automatically when it is a TTY).
+ *
+ * ## Use of the `completer` function
+ *
+ * The `completer` function takes the current line entered by the user as an argument, and returns an `Array` with 2 entries:
+ *
+ * - An Array with matching entries for the completion.
+ * - The substring that was used for the matching.
+ *
+ * For instance: `[[substr1, substr2, ...], originalsubstring]`.
+ *
+ * ```js
+ * function completer(line) {
+ * const completions = '.help .error .exit .quit .q'.split(' ');
+ * const hits = completions.filter((c) => c.startsWith(line));
+ * // Show all completions if none found
+ * return [hits.length ? hits : completions, line];
+ * }
+ * ```
+ *
+ * The `completer` function can also returns a `Promise`, or be asynchronous:
+ *
+ * ```js
+ * async function completer(linePartial) {
+ * await someAsyncWork();
+ * return [['123'], linePartial];
+ * }
+ * ```
+ */
+ function createInterface(
+ input: NodeJS.ReadableStream,
+ output?: NodeJS.WritableStream,
+ completer?: Completer | AsyncCompleter,
+ terminal?: boolean,
+ ): Interface;
+ function createInterface(options: ReadLineOptions): Interface;
+}
+declare module 'node:readline/promises' {
+ export * from 'readline/promises';
+}
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/stream.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/stream.d.ts
index d71f5a733..53c1b8221 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/stream.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/stream.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* A stream is an abstract interface for working with streaming data in Node.js.
@@ -17,13 +17,14 @@
*
* The `stream` module is useful for creating new types of stream instances. It is
* usually not necessary to use the `stream` module to consume streams.
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/stream.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/stream.js)
*/
declare module 'stream' {
import { EventEmitter, Abortable } from 'node:events';
- import { Blob as NodeBlob } from 'node:buffer';
+ import { Blob as NodeBlob } from "node:buffer";
import * as streamPromises from 'node:stream/promises';
import * as streamConsumers from 'node:stream/consumers';
+ import * as streamWeb from 'node:stream/web';
class internal extends EventEmitter {
pipe(
destination: T,
@@ -56,11 +57,23 @@ declare module 'stream' {
* A utility method for creating Readable Streams out of iterators.
*/
static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable;
+ /**
+ * A utility method for creating a `Readable` from a web `ReadableStream`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static fromWeb(readableStream: streamWeb.ReadableStream, options?: Pick): Readable;
/**
* Returns whether the stream has been read from or cancelled.
* @since v16.8.0
*/
static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean;
+ /**
+ * A utility method for creating a web `ReadableStream` from a `Readable`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static toWeb(streamReadable: Readable): streamWeb.ReadableStream;
/**
* Returns whether the stream was destroyed or errored before emitting `'end'`.
* @since v16.8.0
@@ -75,7 +88,7 @@ declare module 'stream' {
readable: boolean;
/**
* Returns whether `'data'` has been emitted.
- * @since v16.7.0
+ * @since v16.7.0, v14.18.0
* @experimental
*/
readonly readableDidRead: boolean;
@@ -117,13 +130,23 @@ declare module 'stream' {
* @since v8.0.0
*/
destroyed: boolean;
+ /**
+ * Is true after 'close' has been emitted.
+ * @since v18.0.0
+ */
+ readonly closed: boolean;
+ /**
+ * Returns error if the stream has been destroyed with an error.
+ * @since v18.0.0
+ */
+ readonly errored: Error | null;
constructor(opts?: ReadableOptions);
_construct?(callback: (error?: Error | null) => void): void;
_read(size: number): void;
/**
- * The `readable.read()` method pulls some data out of the internal buffer and
- * returns it. If no data available to be read, `null` is returned. By default,
- * the data will be returned as a `Buffer` object unless an encoding has been
+ * The `readable.read()` method reads data out of the internal buffer and
+ * returns it. If no data is available to be read, `null` is returned. By default,
+ * the data is returned as a `Buffer` object unless an encoding has been
* specified using the `readable.setEncoding()` method or the stream is operating
* in object mode.
*
@@ -338,7 +361,7 @@ declare module 'stream' {
* let chunk;
* while (null !== (chunk = stream.read())) {
* const str = decoder.write(chunk);
- * if (str.match(/\n\n/)) {
+ * if (str.includes('\n\n')) {
* // Found the header boundary.
* const split = str.split(/\n\n/);
* header += split.shift();
@@ -351,10 +374,10 @@ declare module 'stream' {
* stream.unshift(buf);
* // Now the body of the message can be read from the stream.
* callback(null, header, stream);
- * } else {
- * // Still reading the header.
- * header += str;
+ * return;
* }
+ * // Still reading the header.
+ * header += str;
* }
* }
* }
@@ -500,6 +523,18 @@ declare module 'stream' {
* @since v0.9.4
*/
class Writable extends Stream implements NodeJS.WritableStream {
+ /**
+ * A utility method for creating a `Writable` from a web `WritableStream`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static fromWeb(writableStream: streamWeb.WritableStream, options?: Pick): Writable;
+ /**
+ * A utility method for creating a web `WritableStream` from a `Writable`.
+ * @since v17.0.0
+ * @experimental
+ */
+ static toWeb(streamWritable: Writable): streamWeb.WritableStream;
/**
* Is `true` if it is safe to call `writable.write()`, which means
* the stream has not been destroyed, errored or ended.
@@ -545,6 +580,21 @@ declare module 'stream' {
* @since v8.0.0
*/
destroyed: boolean;
+ /**
+ * Is true after 'close' has been emitted.
+ * @since v18.0.0
+ */
+ readonly closed: boolean;
+ /**
+ * Returns error if the stream has been destroyed with an error.
+ * @since v18.0.0
+ */
+ readonly errored: Error | null;
+ /**
+ * Is `true` if the stream's buffer has been full and stream will emit 'drain'.
+ * @since v15.2.0, v14.17.0
+ */
+ readonly writableNeedDrain: boolean;
constructor(opts?: WritableOptions);
_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
_writev?(
@@ -571,7 +621,7 @@ declare module 'stream' {
* While a stream is not draining, calls to `write()` will buffer `chunk`, and
* return false. Once all currently buffered chunks are drained (accepted for
* delivery by the operating system), the `'drain'` event will be emitted.
- * It is recommended that once `write()` returns false, no more chunks be written
+ * Once `write()` returns false, do not write more chunks
* until the `'drain'` event is emitted. While calling `write()` on a stream that
* is not draining is allowed, Node.js will buffer all written chunks until
* maximum memory usage occurs, at which point it will abort unconditionally.
@@ -665,8 +715,8 @@ declare module 'stream' {
* The `writable.uncork()` method flushes all data buffered since {@link cork} was called.
*
* When using `writable.cork()` and `writable.uncork()` to manage the buffering
- * of writes to a stream, it is recommended that calls to `writable.uncork()` be
- * deferred using `process.nextTick()`. Doing so allows batching of all`writable.write()` calls that occur within a given Node.js event loop phase.
+ * of writes to a stream, defer calls to `writable.uncork()` using`process.nextTick()`. Doing so allows batching of all`writable.write()` calls that occur within a given Node.js event
+ * loop phase.
*
* ```js
* stream.cork();
@@ -811,6 +861,9 @@ declare module 'stream' {
readonly writableLength: number;
readonly writableObjectMode: boolean;
readonly writableCorked: number;
+ readonly writableNeedDrain: boolean;
+ readonly closed: boolean;
+ readonly errored: Error | null;
/**
* If `false` then the stream will automatically end the writable side when the
* readable side ends. Set initially by the `allowHalfOpen` constructor option,
@@ -862,105 +915,6 @@ declare module 'stream' {
end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this;
cork(): void;
uncork(): void;
- /**
- * Event emitter
- * The defined events on documents including:
- * 1. close
- * 2. data
- * 3. drain
- * 4. end
- * 5. error
- * 6. finish
- * 7. pause
- * 8. pipe
- * 9. readable
- * 10. resume
- * 11. unpipe
- */
- addListener(event: 'close', listener: () => void): this;
- addListener(event: 'data', listener: (chunk: any) => void): this;
- addListener(event: 'drain', listener: () => void): this;
- addListener(event: 'end', listener: () => void): this;
- addListener(event: 'error', listener: (err: Error) => void): this;
- addListener(event: 'finish', listener: () => void): this;
- addListener(event: 'pause', listener: () => void): this;
- addListener(event: 'pipe', listener: (src: Readable) => void): this;
- addListener(event: 'readable', listener: () => void): this;
- addListener(event: 'resume', listener: () => void): this;
- addListener(event: 'unpipe', listener: (src: Readable) => void): this;
- addListener(event: string | symbol, listener: (...args: any[]) => void): this;
- emit(event: 'close'): boolean;
- emit(event: 'data', chunk: any): boolean;
- emit(event: 'drain'): boolean;
- emit(event: 'end'): boolean;
- emit(event: 'error', err: Error): boolean;
- emit(event: 'finish'): boolean;
- emit(event: 'pause'): boolean;
- emit(event: 'pipe', src: Readable): boolean;
- emit(event: 'readable'): boolean;
- emit(event: 'resume'): boolean;
- emit(event: 'unpipe', src: Readable): boolean;
- emit(event: string | symbol, ...args: any[]): boolean;
- on(event: 'close', listener: () => void): this;
- on(event: 'data', listener: (chunk: any) => void): this;
- on(event: 'drain', listener: () => void): this;
- on(event: 'end', listener: () => void): this;
- on(event: 'error', listener: (err: Error) => void): this;
- on(event: 'finish', listener: () => void): this;
- on(event: 'pause', listener: () => void): this;
- on(event: 'pipe', listener: (src: Readable) => void): this;
- on(event: 'readable', listener: () => void): this;
- on(event: 'resume', listener: () => void): this;
- on(event: 'unpipe', listener: (src: Readable) => void): this;
- on(event: string | symbol, listener: (...args: any[]) => void): this;
- once(event: 'close', listener: () => void): this;
- once(event: 'data', listener: (chunk: any) => void): this;
- once(event: 'drain', listener: () => void): this;
- once(event: 'end', listener: () => void): this;
- once(event: 'error', listener: (err: Error) => void): this;
- once(event: 'finish', listener: () => void): this;
- once(event: 'pause', listener: () => void): this;
- once(event: 'pipe', listener: (src: Readable) => void): this;
- once(event: 'readable', listener: () => void): this;
- once(event: 'resume', listener: () => void): this;
- once(event: 'unpipe', listener: (src: Readable) => void): this;
- once(event: string | symbol, listener: (...args: any[]) => void): this;
- prependListener(event: 'close', listener: () => void): this;
- prependListener(event: 'data', listener: (chunk: any) => void): this;
- prependListener(event: 'drain', listener: () => void): this;
- prependListener(event: 'end', listener: () => void): this;
- prependListener(event: 'error', listener: (err: Error) => void): this;
- prependListener(event: 'finish', listener: () => void): this;
- prependListener(event: 'pause', listener: () => void): this;
- prependListener(event: 'pipe', listener: (src: Readable) => void): this;
- prependListener(event: 'readable', listener: () => void): this;
- prependListener(event: 'resume', listener: () => void): this;
- prependListener(event: 'unpipe', listener: (src: Readable) => void): this;
- prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
- prependOnceListener(event: 'close', listener: () => void): this;
- prependOnceListener(event: 'data', listener: (chunk: any) => void): this;
- prependOnceListener(event: 'drain', listener: () => void): this;
- prependOnceListener(event: 'end', listener: () => void): this;
- prependOnceListener(event: 'error', listener: (err: Error) => void): this;
- prependOnceListener(event: 'finish', listener: () => void): this;
- prependOnceListener(event: 'pause', listener: () => void): this;
- prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this;
- prependOnceListener(event: 'readable', listener: () => void): this;
- prependOnceListener(event: 'resume', listener: () => void): this;
- prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this;
- prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
- removeListener(event: 'close', listener: () => void): this;
- removeListener(event: 'data', listener: (chunk: any) => void): this;
- removeListener(event: 'drain', listener: () => void): this;
- removeListener(event: 'end', listener: () => void): this;
- removeListener(event: 'error', listener: (err: Error) => void): this;
- removeListener(event: 'finish', listener: () => void): this;
- removeListener(event: 'pause', listener: () => void): this;
- removeListener(event: 'pipe', listener: (src: Readable) => void): this;
- removeListener(event: 'readable', listener: () => void): this;
- removeListener(event: 'resume', listener: () => void): this;
- removeListener(event: 'unpipe', listener: (src: Readable) => void): this;
- removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
}
type TransformCallback = (error?: Error | null, data?: any) => void;
interface TransformOptions extends DuplexOptions {
@@ -1209,7 +1163,7 @@ declare module 'stream' {
* async function run() {
* await pipeline(
* fs.createReadStream('lowercase.txt'),
- * async function* (source, signal) {
+ * async function* (source, { signal }) {
* source.setEncoding('utf8'); // Work with strings rather than `Buffer`s.
* for await (const chunk of source) {
* yield await processChunk(chunk, { signal });
@@ -1233,7 +1187,7 @@ declare module 'stream' {
*
* async function run() {
* await pipeline(
- * async function * (signal) {
+ * async function* ({ signal }) {
* await someLongRunningfn({ signal });
* yield 'asd';
* },
@@ -1252,7 +1206,31 @@ declare module 'stream' {
*
* `stream.pipeline()` leaves dangling event listeners on the streams
* after the `callback` has been invoked. In the case of reuse of streams after
- * failure, this can cause event listener leaks and swallowed errors.
+ * failure, this can cause event listener leaks and swallowed errors. If the last
+ * stream is readable, dangling event listeners will be removed so that the last
+ * stream can be consumed later.
+ *
+ * `stream.pipeline()` closes all the streams when an error is raised.
+ * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior
+ * once it would destroy the socket without sending the expected response.
+ * See the example below:
+ *
+ * ```js
+ * const fs = require('fs');
+ * const http = require('http');
+ * const { pipeline } = require('stream');
+ *
+ * const server = http.createServer((req, res) => {
+ * const fileStream = fs.createReadStream('./fileNotExist.txt');
+ * pipeline(fileStream, res, (err) => {
+ * if (err) {
+ * console.log(err); // No such file
+ * // this message can't be sent once `pipeline` already destroyed the socket
+ * return res.end('error!!!');
+ * }
+ * });
+ * });
+ * ```
* @since v10.0.0
* @param callback Called when the pipeline is fully done.
*/
@@ -1344,13 +1322,13 @@ declare module 'stream' {
/**
* Returns whether the stream has encountered an error.
- * @since v16.14.0
+ * @since v17.3.0
*/
function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean;
/**
* Returns whether the stream is readable.
- * @since v16.14.0
+ * @since v17.4.0
*/
function isReadable(stream: Readable | NodeJS.ReadableStream): boolean;
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/stream/consumers.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/stream/consumers.d.ts
index d00e234db..184a705bd 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/stream/consumers.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/stream/consumers.d.ts
@@ -1,9 +1,9 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
declare module 'stream/consumers' {
- import { Readable } from 'node:stream';
import { Blob as NodeBlob } from "node:buffer";
+ import { Readable } from 'node:stream';
function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise;
function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise;
function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator): Promise;
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/stream/promises.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/stream/promises.d.ts
index 384c4f884..4a510c164 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/stream/promises.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/stream/promises.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
declare module 'stream/promises' {
import { FinishedOptions, PipelineSource, PipelineTransform, PipelineDestination, PipelinePromise, PipelineOptions } from 'node:stream';
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/stream/web.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/stream/web.d.ts
index 3e26845cb..ad99385d6 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/stream/web.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/stream/web.d.ts
@@ -1,10 +1,9 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
declare module 'stream/web' {
// stub module, pending copy&paste from .d.ts or manual impl
// copy from lib.dom.d.ts
-
interface ReadableWritablePair {
readable: ReadableStream;
/**
@@ -18,7 +17,6 @@ declare module 'stream/web' {
*/
writable: WritableStream;
}
-
interface StreamPipeOptions {
preventAbort?: boolean;
preventCancel?: boolean;
@@ -66,70 +64,53 @@ declare module 'stream/web' {
preventClose?: boolean;
signal?: AbortSignal;
}
-
interface ReadableStreamGenericReader {
readonly closed: Promise;
cancel(reason?: any): Promise;
}
-
interface ReadableStreamDefaultReadValueResult {
done: false;
value: T;
}
-
interface ReadableStreamDefaultReadDoneResult {
done: true;
value?: undefined;
}
type ReadableStreamController = ReadableStreamDefaultController;
- type ReadableStreamDefaultReadResult =
- | ReadableStreamDefaultReadValueResult
- | ReadableStreamDefaultReadDoneResult;
-
+ type ReadableStreamDefaultReadResult = ReadableStreamDefaultReadValueResult | ReadableStreamDefaultReadDoneResult;
interface ReadableByteStreamControllerCallback {
(controller: ReadableByteStreamController): void | PromiseLike;
}
-
interface UnderlyingSinkAbortCallback {
(reason?: any): void | PromiseLike;
}
-
interface UnderlyingSinkCloseCallback {
(): void | PromiseLike;
}
-
interface UnderlyingSinkStartCallback {
(controller: WritableStreamDefaultController): any;
}
-
interface UnderlyingSinkWriteCallback {
(chunk: W, controller: WritableStreamDefaultController): void | PromiseLike;
}
-
interface UnderlyingSourceCancelCallback {
(reason?: any): void | PromiseLike;
}
-
interface UnderlyingSourcePullCallback {
(controller: ReadableStreamController): void | PromiseLike;
}
-
interface UnderlyingSourceStartCallback {
(controller: ReadableStreamController): any;
}
-
interface TransformerFlushCallback {
(controller: TransformStreamDefaultController): void | PromiseLike;
}
-
interface TransformerStartCallback {
(controller: TransformStreamDefaultController): any;
}
-
interface TransformerTransformCallback {
(chunk: I, controller: TransformStreamDefaultController): void | PromiseLike;
}
-
interface UnderlyingByteSource {
autoAllocateChunkSize?: number;
cancel?: ReadableStreamErrorCallback;
@@ -137,14 +118,12 @@ declare module 'stream/web' {
start?: ReadableByteStreamControllerCallback;
type: 'bytes';
}
-
interface UnderlyingSource {
cancel?: UnderlyingSourceCancelCallback;
pull?: UnderlyingSourcePullCallback;
start?: UnderlyingSourceStartCallback;
type?: undefined;
}
-
interface UnderlyingSink {
abort?: UnderlyingSinkAbortCallback;
close?: UnderlyingSinkCloseCallback;
@@ -152,11 +131,9 @@ declare module 'stream/web' {
type?: undefined;
write?: UnderlyingSinkWriteCallback;
}
-
interface ReadableStreamErrorCallback {
(reason: any): void | PromiseLike;
}
-
/** This Streams API interface represents a readable stream of byte data. */
interface ReadableStream {
readonly locked: boolean;
@@ -168,29 +145,21 @@ declare module 'stream/web' {
values(options?: { preventCancel?: boolean }): AsyncIterableIterator;
[Symbol.asyncIterator](): AsyncIterableIterator;
}
-
const ReadableStream: {
prototype: ReadableStream;
- new (
- underlyingSource: UnderlyingByteSource,
- strategy?: QueuingStrategy,
- ): ReadableStream;
+ new (underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy): ReadableStream;
new (underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream;
};
-
interface ReadableStreamDefaultReader extends ReadableStreamGenericReader {
read(): Promise>;
releaseLock(): void;
}
-
const ReadableStreamDefaultReader: {
prototype: ReadableStreamDefaultReader;
new (stream: ReadableStream): ReadableStreamDefaultReader;
};
-
const ReadableStreamBYOBReader: any;
const ReadableStreamBYOBRequest: any;
-
interface ReadableByteStreamController {
readonly byobRequest: undefined;
readonly desiredSize: number | null;
@@ -198,24 +167,20 @@ declare module 'stream/web' {
enqueue(chunk: ArrayBufferView): void;
error(error?: any): void;
}
-
const ReadableByteStreamController: {
prototype: ReadableByteStreamController;
new (): ReadableByteStreamController;
};
-
interface ReadableStreamDefaultController {
readonly desiredSize: number | null;
close(): void;
enqueue(chunk?: R): void;
error(e?: any): void;
}
-
const ReadableStreamDefaultController: {
prototype: ReadableStreamDefaultController;
new (): ReadableStreamDefaultController;
};
-
interface Transformer {
flush?: TransformerFlushCallback;
readableType?: undefined;
@@ -223,33 +188,24 @@ declare module 'stream/web' {
transform?: TransformerTransformCallback;
writableType?: undefined;
}
-
interface TransformStream {
readonly readable: ReadableStream;
readonly writable: WritableStream;
}
-
const TransformStream: {
prototype: TransformStream;
- new (
- transformer?: Transformer,
- writableStrategy?: QueuingStrategy,
- readableStrategy?: QueuingStrategy,
- ): TransformStream;
+ new (transformer?: Transformer, writableStrategy?: QueuingStrategy, readableStrategy?: QueuingStrategy): TransformStream;
};
-
interface TransformStreamDefaultController {
readonly desiredSize: number | null;
enqueue(chunk?: O): void;
error(reason?: any): void;
terminate(): void;
}
-
const TransformStreamDefaultController: {
prototype: TransformStreamDefaultController;
new (): TransformStreamDefaultController;
};
-
/**
* This Streams API interface provides a standard abstraction for writing
* streaming data to a destination, known as a sink. This object comes with
@@ -261,12 +217,10 @@ declare module 'stream/web' {
close(): Promise;
getWriter(): WritableStreamDefaultWriter;
}
-
const WritableStream: {
prototype: WritableStream;
new (underlyingSink?: UnderlyingSink, strategy?: QueuingStrategy): WritableStream;
};
-
/**
* This Streams API interface is the object returned by
* WritableStream.getWriter() and once created locks the < writer to the
@@ -282,12 +236,10 @@ declare module 'stream/web' {
releaseLock(): void;
write(chunk?: W): Promise;
}
-
const WritableStreamDefaultWriter: {
prototype: WritableStreamDefaultWriter;
new (stream: WritableStream): WritableStreamDefaultWriter;
};
-
/**
* This Streams API interface represents a controller allowing control of a
* WritableStream's state. When constructing a WritableStream, the
@@ -297,21 +249,17 @@ declare module 'stream/web' {
interface WritableStreamDefaultController {
error(e?: any): void;
}
-
const WritableStreamDefaultController: {
prototype: WritableStreamDefaultController;
new (): WritableStreamDefaultController;
};
-
interface QueuingStrategy {
highWaterMark?: number;
size?: QueuingStrategySize;
}
-
interface QueuingStrategySize {
(chunk?: T): number;
}
-
interface QueuingStrategyInit {
/**
* Creates a new ByteLengthQueuingStrategy with the provided high water
@@ -324,7 +272,6 @@ declare module 'stream/web' {
*/
highWaterMark: number;
}
-
/**
* This Streams API interface provides a built-in byte length queuing
* strategy that can be used when constructing streams.
@@ -333,12 +280,10 @@ declare module 'stream/web' {
readonly highWaterMark: number;
readonly size: QueuingStrategySize;
}
-
const ByteLengthQueuingStrategy: {
prototype: ByteLengthQueuingStrategy;
new (init: QueuingStrategyInit): ByteLengthQueuingStrategy;
};
-
/**
* This Streams API interface provides a built-in byte length queuing
* strategy that can be used when constructing streams.
@@ -347,12 +292,10 @@ declare module 'stream/web' {
readonly highWaterMark: number;
readonly size: QueuingStrategySize;
}
-
const CountQueuingStrategy: {
prototype: CountQueuingStrategy;
new (init: QueuingStrategyInit): CountQueuingStrategy;
};
-
interface TextEncoderStream {
/** Returns "utf-8". */
readonly encoding: 'utf-8';
@@ -360,19 +303,15 @@ declare module 'stream/web' {
readonly writable: WritableStream;
readonly [Symbol.toStringTag]: string;
}
-
const TextEncoderStream: {
prototype: TextEncoderStream;
new (): TextEncoderStream;
};
-
interface TextDecoderOptions {
fatal?: boolean;
ignoreBOM?: boolean;
}
-
type BufferSource = ArrayBufferView | ArrayBuffer;
-
interface TextDecoderStream {
/** Returns encoding's name, lower cased. */
readonly encoding: string;
@@ -384,7 +323,6 @@ declare module 'stream/web' {
readonly writable: WritableStream;
readonly [Symbol.toStringTag]: string;
}
-
const TextDecoderStream: {
prototype: TextDecoderStream;
new (label?: string, options?: TextDecoderOptions): TextDecoderStream;
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/string_decoder.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/string_decoder.d.ts
index 2ab7c8d5b..2a380ca43 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/string_decoder.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/string_decoder.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `string_decoder` module provides an API for decoding `Buffer` objects into
@@ -39,7 +39,7 @@
* decoder.write(Buffer.from([0x82]));
* console.log(decoder.end(Buffer.from([0xAC])));
* ```
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/string_decoder.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/string_decoder.js)
*/
declare module 'string_decoder' {
class StringDecoder {
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/test.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/test.d.ts
index 27e4d1530..d7e93dd71 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/test.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/test.d.ts
@@ -1,11 +1,19 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `node:test` module provides a standalone testing module.
- * @see [source](https://github.com/nodejs/node/blob/v16.17.0/lib/test.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.8.0/lib/test.js)
*/
declare module 'node:test' {
+ /**
+ * Programmatically start the test runner.
+ * @since v18.9.0
+ * @param options Configuration options for running tests.
+ * @returns A {@link TapStream} that emits events about the test execution.
+ */
+ function run(options?: RunOptions): TapStream;
+
/**
* The `test()` function is the value imported from the test module. Each invocation of this
* function results in the creation of a test point in the TAP output.
@@ -31,7 +39,7 @@ declare module 'node:test' {
* });
* });
* ```
- * @since v16.17.0
+ * @since v18.0.0
* @param name The name of the test, which is displayed when reporting test results.
* Default: The `name` property of fn, or `''` if `fn` does not have a name.
* @param options Configuration options for the test
@@ -45,8 +53,8 @@ declare module 'node:test' {
function test(options?: TestOptions, fn?: TestFn): Promise;
function test(fn?: TestFn): Promise;
- /*
- * @since v16.17.0
+ /**
+ * @since v18.6.0
* @param name The name of the suite, which is displayed when reporting suite results.
* Default: The `name` property of fn, or `''` if `fn` does not have a name.
* @param options Configuration options for the suite
@@ -57,8 +65,8 @@ declare module 'node:test' {
function describe(options?: TestOptions, fn?: SuiteFn): void;
function describe(fn?: SuiteFn): void;
- /*
- * @since v16.17.0
+ /**
+ * @since v18.6.0
* @param name The name of the test, which is displayed when reporting test results.
* Default: The `name` property of fn, or `''` if `fn` does not have a name.
* @param options Configuration options for the test
@@ -89,17 +97,133 @@ declare module 'node:test' {
*/
type ItFn = (done: (result?: any) => void) => any;
+ interface RunOptions {
+ /**
+ * @default false
+ */
+ concurrency?: number | boolean;
+
+ /**
+ * An array containing the list of files to run. If unspecified, the test runner execution model will be used.
+ */
+ files?: readonly string[];
+
+ /**
+ * Allows aborting an in-progress test.
+ * @default undefined
+ */
+ signal?: AbortSignal;
+
+ /**
+ * A number of milliseconds the test will fail after. If unspecified, subtests inherit this
+ * value from their parent.
+ * @default Infinity
+ */
+ timeout?: number;
+ }
+
+ /**
+ * A successful call of the run() method will return a new TapStream object, streaming a TAP output.
+ * TapStream will emit events in the order of the tests' definitions.
+ * @since v18.9.0
+ */
+ interface TapStream extends NodeJS.ReadableStream {
+ addListener(event: 'test:diagnostic', listener: (message: string) => void): this;
+ addListener(event: 'test:fail', listener: (data: TestFail) => void): this;
+ addListener(event: 'test:pass', listener: (data: TestPass) => void): this;
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ emit(event: 'test:diagnostic', message: string): boolean;
+ emit(event: 'test:fail', data: TestFail): boolean;
+ emit(event: 'test:pass', data: TestPass): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+ on(event: 'test:diagnostic', listener: (message: string) => void): this;
+ on(event: 'test:fail', listener: (data: TestFail) => void): this;
+ on(event: 'test:pass', listener: (data: TestPass) => void): this;
+ on(event: string, listener: (...args: any[]) => void): this;
+ once(event: 'test:diagnostic', listener: (message: string) => void): this;
+ once(event: 'test:fail', listener: (data: TestFail) => void): this;
+ once(event: 'test:pass', listener: (data: TestPass) => void): this;
+ once(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: 'test:diagnostic', listener: (message: string) => void): this;
+ prependListener(event: 'test:fail', listener: (data: TestFail) => void): this;
+ prependListener(event: 'test:pass', listener: (data: TestPass) => void): this;
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: 'test:diagnostic', listener: (message: string) => void): this;
+ prependOnceListener(event: 'test:fail', listener: (data: TestFail) => void): this;
+ prependOnceListener(event: 'test:pass', listener: (data: TestPass) => void): this;
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ }
+
+ interface TestFail {
+ /**
+ * The test duration.
+ */
+ duration: number;
+
+ /**
+ * The failure casing test to fail.
+ */
+ error: Error;
+
+ /**
+ * The test name.
+ */
+ name: string;
+
+ /**
+ * The ordinal number of the test.
+ */
+ testNumber: number;
+
+ /**
+ * Present if `context.todo` is called.
+ */
+ todo?: string;
+
+ /**
+ * Present if `context.skip` is called.
+ */
+ skip?: string;
+ }
+
+ interface TestPass {
+ /**
+ * The test duration.
+ */
+ duration: number;
+
+ /**
+ * The test name.
+ */
+ name: string;
+
+ /**
+ * The ordinal number of the test.
+ */
+ testNumber: number;
+
+ /**
+ * Present if `context.todo` is called.
+ */
+ todo?: string;
+
+ /**
+ * Present if `context.skip` is called.
+ */
+ skip?: string;
+ }
+
/**
* An instance of `TestContext` is passed to each test function in order to interact with the
* test runner. However, the `TestContext` constructor is not exposed as part of the API.
- * @since v16.17.0
+ * @since v18.0.0
*/
interface TestContext {
/**
* This function is used to write TAP diagnostics to the output. Any diagnostic information is
* included at the end of the test's results. This function does not return a value.
* @param message Message to be displayed as a TAP diagnostic.
- * @since v16.17.0
+ * @since v18.0.0
*/
diagnostic(message: string): void;
@@ -108,7 +232,7 @@ declare module 'node:test' {
* option set. Otherwise, all tests are run. If Node.js was not started with the `--test-only`
* command-line option, this function is a no-op.
* @param shouldRunOnlyTests Whether or not to run `only` tests.
- * @since v16.17.0
+ * @since v18.0.0
*/
runOnly(shouldRunOnlyTests: boolean): void;
@@ -117,7 +241,7 @@ declare module 'node:test' {
* provided, it is included in the TAP output. Calling `skip()` does not terminate execution of
* the test function. This function does not return a value.
* @param message Optional skip message to be displayed in TAP output.
- * @since v16.17.0
+ * @since v18.0.0
*/
skip(message?: string): void;
@@ -126,14 +250,14 @@ declare module 'node:test' {
* included in the TAP output. Calling `todo()` does not terminate execution of the test
* function. This function does not return a value.
* @param message Optional `TODO` message to be displayed in TAP output.
- * @since v16.17.0
+ * @since v18.0.0
*/
todo(message?: string): void;
/**
* This function is used to create subtests under the current test. This function behaves in
* the same fashion as the top level {@link test} function.
- * @since v16.17.0
+ * @since v18.0.0
* @param name The name of the test, which is displayed when reporting test results.
* Default: The `name` property of fn, or `''` if `fn` does not have a name.
* @param options Configuration options for the test
@@ -162,7 +286,7 @@ declare module 'node:test' {
/**
* Allows aborting an in-progress test.
- * @since v16.17.0
+ * @since v18.8.0
*/
signal?: AbortSignal;
@@ -177,7 +301,7 @@ declare module 'node:test' {
* A number of milliseconds the test will fail after. If unspecified, subtests inherit this
* value from their parent.
* @default Infinity
- * @since v16.17.0
+ * @since v18.7.0
*/
timeout?: number;
@@ -189,5 +313,65 @@ declare module 'node:test' {
todo?: boolean | string;
}
- export { test as default, test, describe, it };
+ /**
+ * This function is used to create a hook running before running a suite.
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
+ * the second argument. Default: A no-op function.
+ * @param options Configuration options for the hook.
+ * @since v18.8.0
+ */
+ function before(fn?: HookFn, options?: HookOptions): void;
+
+ /**
+ * This function is used to create a hook running after running a suite.
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
+ * the second argument. Default: A no-op function.
+ * @param options Configuration options for the hook.
+ * @since v18.8.0
+ */
+ function after(fn?: HookFn, options?: HookOptions): void;
+
+ /**
+ * This function is used to create a hook running before each subtest of the current suite.
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
+ * the second argument. Default: A no-op function.
+ * @param options Configuration options for the hook.
+ * @since v18.8.0
+ */
+ function beforeEach(fn?: HookFn, options?: HookOptions): void;
+
+ /**
+ * This function is used to create a hook running after each subtest of the current test.
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
+ * the second argument. Default: A no-op function.
+ * @param options Configuration options for the hook.
+ * @since v18.8.0
+ */
+ function afterEach(fn?: HookFn, options?: HookOptions): void;
+
+ /**
+ * The hook function. If the hook uses callbacks, the callback function is passed as the
+ * second argument.
+ */
+ type HookFn = (done: (result?: any) => void) => any;
+
+ /**
+ * Configuration options for hooks.
+ * @since v18.8.0
+ */
+ interface HookOptions {
+ /**
+ * Allows aborting an in-progress hook.
+ */
+ signal?: AbortSignal;
+
+ /**
+ * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this
+ * value from their parent.
+ * @default Infinity
+ */
+ timeout?: number;
+ }
+
+ export { test as default, run, test, describe, it, before, after, beforeEach, afterEach };
}
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/timers.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/timers.d.ts
index eae3fcd68..e91f130a7 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/timers.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/timers.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `timer` module exposes a global API for scheduling functions to
@@ -9,7 +9,7 @@
* The timer functions within Node.js implement a similar API as the timers API
* provided by Web Browsers but use a different internal implementation that is
* built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/timers.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/timers.js)
*/
declare module 'timers' {
import { Abortable } from 'node:events';
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/timers/promises.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/timers/promises.d.ts
index 74554e527..5718033ae 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/timers/promises.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/timers/promises.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `timers/promises` API provides an alternative set of timer functions
@@ -65,31 +65,6 @@ declare module 'timers/promises' {
* @since v15.9.0
*/
function setInterval(delay?: number, value?: T, options?: TimerOptions): AsyncIterable;
-
- interface Scheduler {
- /**
- * ```js
- * import { scheduler } from 'node:timers/promises';
- *
- * await scheduler.wait(1000); // Wait one second before continuing
- * ```
- * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API.
- * Calling timersPromises.scheduler.wait(delay, options) is roughly equivalent to calling timersPromises.setTimeout(delay, undefined, options) except that the ref option is not supported.
- * @since v16.14.0
- * @experimental
- * @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
- */
- wait: (delay?: number, options?: TimerOptions) => Promise;
- /**
- * An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API.
- * Calling timersPromises.scheduler.yield() is equivalent to calling timersPromises.setImmediate() with no arguments.
- * @since v16.14.0
- * @experimental
- */
- yield: () => Promise;
- }
-
- const scheduler: Scheduler;
}
declare module 'node:timers/promises' {
export * from 'timers/promises';
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/tls.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/tls.d.ts
index 989be9f23..3ddc26052 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/tls.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/tls.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `tls` module provides an implementation of the Transport Layer Security
@@ -9,11 +9,12 @@
* ```js
* const tls = require('tls');
* ```
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/tls.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/tls.js)
*/
declare module 'tls' {
import { X509Certificate } from 'node:crypto';
import * as net from 'node:net';
+ import * as stream from 'stream';
const CLIENT_RENEG_LIMIT: number;
const CLIENT_RENEG_WINDOW: number;
interface Certificate {
@@ -145,8 +146,8 @@ declare module 'tls' {
*/
constructor(socket: net.Socket, options?: TLSSocketOptions);
/**
- * Returns `true` if the peer certificate was signed by one of the CAs specified
- * when creating the `tls.TLSSocket` instance, otherwise `false`.
+ * This property is `true` if the peer certificate was signed by one of the CAs
+ * specified when creating the `tls.TLSSocket` instance, otherwise `false`.
* @since v0.11.4
*/
authorized: boolean;
@@ -345,9 +346,9 @@ declare module 'tls' {
* When enabled, TLS packet trace information is written to `stderr`. This can be
* used to debug TLS connection problems.
*
- * Note: The format of the output is identical to the output of `openssl s_client -trace` or `openssl s_server -trace`. While it is produced by OpenSSL's`SSL_trace()` function, the format is
- * undocumented, can change without notice,
- * and should not be relied on.
+ * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by
+ * OpenSSL's `SSL_trace()` function, the format is undocumented, can change
+ * without notice, and should not be relied on.
* @since v12.2.0
*/
enableTrace(): void;
@@ -376,7 +377,7 @@ declare module 'tls' {
* 128,
* 'client finished');
*
- *
+ * /*
* Example return value of keyingMaterial:
* | undefined;
+ key?: string | Buffer | Array | undefined;
/**
* Name of an OpenSSL engine to get private key from. Should be used
* together with privateKeyIdentifier.
@@ -816,13 +817,19 @@ declare module 'tls' {
* Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on
* failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type).
*
- * This function can be overwritten by providing alternative function as part of
- * the `options.checkServerIdentity` option passed to `tls.connect()`. The
+ * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as
+ * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead.
+ *
+ * This function can be overwritten by providing an alternative function as the`options.checkServerIdentity` option that is passed to `tls.connect()`. The
* overwriting function can call `tls.checkServerIdentity()` of course, to augment
* the checks done with additional verification.
*
* This function is only called if the certificate passed all other checks, such as
* being issued by trusted CA (`options.ca`).
+ *
+ * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name
+ * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use
+ * a custom`options.checkServerIdentity` function that implements the desired behavior.
* @since v0.8.4
* @param hostname The host name or IP address to verify the certificate against.
* @param cert A `certificate object` representing the peer's certificate.
@@ -975,6 +982,8 @@ declare module 'tls' {
* lower-case for historical reasons, but must be uppercased to be used in
* the `ciphers` option of {@link createSecureContext}.
*
+ * Not all supported ciphers are enabled by default. See `Modifying the default TLS cipher suite`.
+ *
* Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for
* TLSv1.2 and below.
*
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/trace_events.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/trace_events.d.ts
index 3bf9d03d4..ea51f2884 100644
--- a/packages/node_modules/@node-red/editor-client/src/types/node/trace_events.d.ts
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/trace_events.d.ts
@@ -1,5 +1,5 @@
-/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
/**
* The `trace_events` module provides a mechanism to centralize tracing information
@@ -69,6 +69,16 @@
* node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js
* ```
*
+ * To guarantee that the log file is properly generated after signal events like`SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers
+ * in your code, such as:
+ *
+ * ```js
+ * process.on('SIGINT', function onSigint() {
+ * console.info('Received SIGINT.');
+ * process.exit(130); // Or applicable exit code depending on OS and signal
+ * });
+ * ```
+ *
* The tracing system uses the same time source
* as the one used by `process.hrtime()`.
* However the trace-event timestamps are expressed in microseconds,
@@ -76,7 +86,7 @@
*
* The features from this module are not available in `Worker` threads.
* @experimental
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/trace_events.js)
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/trace_events.js)
*/
declare module 'trace_events' {
/**
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/ts4.8/assert.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/ts4.8/assert.d.ts
new file mode 100644
index 000000000..59ef31163
--- /dev/null
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/ts4.8/assert.d.ts
@@ -0,0 +1,964 @@
+
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
+
+/**
+ * The `assert` module provides a set of assertion functions for verifying
+ * invariants.
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/assert.js)
+ */
+declare module 'assert' {
+ /**
+ * An alias of {@link ok}.
+ * @since v0.5.9
+ * @param value The input that is checked for being truthy.
+ */
+ function assert(value: unknown, message?: string | Error): asserts value;
+ namespace assert {
+ /**
+ * Indicates the failure of an assertion. All errors thrown by the `assert` module
+ * will be instances of the `AssertionError` class.
+ */
+ class AssertionError extends Error {
+ actual: unknown;
+ expected: unknown;
+ operator: string;
+ generatedMessage: boolean;
+ code: 'ERR_ASSERTION';
+ constructor(options?: {
+ /** If provided, the error message is set to this value. */
+ message?: string | undefined;
+ /** The `actual` property on the error instance. */
+ actual?: unknown | undefined;
+ /** The `expected` property on the error instance. */
+ expected?: unknown | undefined;
+ /** The `operator` property on the error instance. */
+ operator?: string | undefined;
+ /** If provided, the generated stack trace omits frames before this function. */
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function | undefined;
+ });
+ }
+ /**
+ * This feature is currently experimental and behavior might still change.
+ * @since v14.2.0, v12.19.0
+ * @experimental
+ */
+ class CallTracker {
+ /**
+ * The wrapper function is expected to be called exactly `exact` times. If the
+ * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
+ * error.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func);
+ * ```
+ * @since v14.2.0, v12.19.0
+ * @param [fn='A no-op function']
+ * @param [exact=1]
+ * @return that wraps `fn`.
+ */
+ calls(exact?: number): () => void;
+ calls any>(fn?: Func, exact?: number): Func;
+ /**
+ * Example:
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ * const callsfunc = tracker.calls(func);
+ * callsfunc(1, 2, 3);
+ *
+ * assert.deepStrictEqual(tracker.getCalls(callsfunc),
+ * [{ thisArg: this, arguments: [1, 2, 3 ] }]);
+ * ```
+ *
+ * @since v18.8.0, v16.18.0
+ * @params fn
+ * @returns An Array with the calls to a tracked function.
+ */
+ getCalls(fn: Function): CallTrackerCall[];
+ /**
+ * The arrays contains information about the expected and actual number of calls of
+ * the functions that have not been called the expected number of times.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * function foo() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func, 2);
+ *
+ * // Returns an array containing information on callsfunc()
+ * tracker.report();
+ * // [
+ * // {
+ * // message: 'Expected the func function to be executed 2 time(s) but was
+ * // executed 0 time(s).',
+ * // actual: 0,
+ * // expected: 2,
+ * // operator: 'func',
+ * // stack: stack trace
+ * // }
+ * // ]
+ * ```
+ * @since v14.2.0, v12.19.0
+ * @return of objects containing information about the wrapper functions returned by `calls`.
+ */
+ report(): CallTrackerReportInformation[];
+ /**
+ * Reset calls of the call tracker.
+ * If a tracked function is passed as an argument, the calls will be reset for it.
+ * If no arguments are passed, all tracked functions will be reset.
+ *
+ * ```js
+ * import assert from 'node:assert';
+ *
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ * const callsfunc = tracker.calls(func);
+ *
+ * callsfunc();
+ * // Tracker was called once
+ * tracker.getCalls(callsfunc).length === 1;
+ *
+ * tracker.reset(callsfunc);
+ * tracker.getCalls(callsfunc).length === 0;
+ * ```
+ *
+ * @since v18.8.0, v16.18.0
+ * @param fn a tracked function to reset.
+ */
+ reset(fn?: Function): void;
+ /**
+ * Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that
+ * have not been called the expected number of times.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * // Creates call tracker.
+ * const tracker = new assert.CallTracker();
+ *
+ * function func() {}
+ *
+ * // Returns a function that wraps func() that must be called exact times
+ * // before tracker.verify().
+ * const callsfunc = tracker.calls(func, 2);
+ *
+ * callsfunc();
+ *
+ * // Will throw an error since callsfunc() was only called once.
+ * tracker.verify();
+ * ```
+ * @since v14.2.0, v12.19.0
+ */
+ verify(): void;
+ }
+ interface CallTrackerCall {
+ thisArg: object;
+ arguments: unknown[];
+ }
+ interface CallTrackerReportInformation {
+ message: string;
+ /** The actual number of times the function was called. */
+ actual: number;
+ /** The number of times the function was expected to be called. */
+ expected: number;
+ /** The name of the function that is wrapped. */
+ operator: string;
+ /** A stack trace of the function. */
+ stack: object;
+ }
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error;
+ /**
+ * Throws an `AssertionError` with the provided error message or a default
+ * error message. If the `message` parameter is an instance of an `Error` then
+ * it will be thrown instead of the `AssertionError`.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.fail();
+ * // AssertionError [ERR_ASSERTION]: Failed
+ *
+ * assert.fail('boom');
+ * // AssertionError [ERR_ASSERTION]: boom
+ *
+ * assert.fail(new TypeError('need array'));
+ * // TypeError: need array
+ * ```
+ *
+ * Using `assert.fail()` with more than two arguments is possible but deprecated.
+ * See below for further details.
+ * @since v0.1.21
+ * @param [message='Failed']
+ */
+ function fail(message?: string | Error): never;
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
+ function fail(
+ actual: unknown,
+ expected: unknown,
+ message?: string | Error,
+ operator?: string,
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function
+ ): never;
+ /**
+ * Tests if `value` is truthy. It is equivalent to`assert.equal(!!value, true, message)`.
+ *
+ * If `value` is not truthy, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is `undefined`, a default
+ * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
+ *
+ * Be aware that in the `repl` the error message will be different to the one
+ * thrown in a file! See below for further details.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.ok(true);
+ * // OK
+ * assert.ok(1);
+ * // OK
+ *
+ * assert.ok();
+ * // AssertionError: No value argument passed to `assert.ok()`
+ *
+ * assert.ok(false, 'it\'s false');
+ * // AssertionError: it's false
+ *
+ * // In the repl:
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: false == true
+ *
+ * // In a file (e.g. test.js):
+ * assert.ok(typeof 123 === 'string');
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(typeof 123 === 'string')
+ *
+ * assert.ok(false);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(false)
+ *
+ * assert.ok(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert.ok(0)
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * // Using `assert()` works the same:
+ * assert(0);
+ * // AssertionError: The expression evaluated to a falsy value:
+ * //
+ * // assert(0)
+ * ```
+ * @since v0.1.21
+ */
+ function ok(value: unknown, message?: string | Error): asserts value;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link strictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
+ *
+ * Tests shallow, coercive equality between the `actual` and `expected` parameters
+ * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
+ * and treated as being identical if both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * assert.equal(1, 1);
+ * // OK, 1 == 1
+ * assert.equal(1, '1');
+ * // OK, 1 == '1'
+ * assert.equal(NaN, NaN);
+ * // OK
+ *
+ * assert.equal(1, 2);
+ * // AssertionError: 1 == 2
+ * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
+ * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
+ * ```
+ *
+ * If the values are not equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default
+ * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * @since v0.1.21
+ */
+ function equal(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
+ *
+ * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
+ * specially handled and treated as being identical if both sides are `NaN`.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * assert.notEqual(1, 2);
+ * // OK
+ *
+ * assert.notEqual(1, 1);
+ * // AssertionError: 1 != 1
+ *
+ * assert.notEqual(1, '1');
+ * // AssertionError: 1 != '1'
+ * ```
+ *
+ * If the values are equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default error
+ * message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
+ * @since v0.1.21
+ */
+ function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link deepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
+ *
+ * Tests for deep equality between the `actual` and `expected` parameters. Consider
+ * using {@link deepStrictEqual} instead. {@link deepEqual} can have
+ * surprising results.
+ *
+ * _Deep equality_ means that the enumerable "own" properties of child objects
+ * are also recursively evaluated by the following rules.
+ * @since v0.1.21
+ */
+ function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * **Strict assertion mode**
+ *
+ * An alias of {@link notDeepStrictEqual}.
+ *
+ * **Legacy assertion mode**
+ *
+ * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
+ *
+ * Tests for any deep inequality. Opposite of {@link deepEqual}.
+ *
+ * ```js
+ * import assert from 'assert';
+ *
+ * const obj1 = {
+ * a: {
+ * b: 1
+ * }
+ * };
+ * const obj2 = {
+ * a: {
+ * b: 2
+ * }
+ * };
+ * const obj3 = {
+ * a: {
+ * b: 1
+ * }
+ * };
+ * const obj4 = Object.create(obj1);
+ *
+ * assert.notDeepEqual(obj1, obj1);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj2);
+ * // OK
+ *
+ * assert.notDeepEqual(obj1, obj3);
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+ *
+ * assert.notDeepEqual(obj1, obj4);
+ * // OK
+ * ```
+ *
+ * If the values are deeply equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a default
+ * error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests strict equality between the `actual` and `expected` parameters as
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.strictEqual(1, 2);
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * //
+ * // 1 !== 2
+ *
+ * assert.strictEqual(1, 1);
+ * // OK
+ *
+ * assert.strictEqual('Hello foobar', 'Hello World!');
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+ * // + actual - expected
+ * //
+ * // + 'Hello foobar'
+ * // - 'Hello World!'
+ * // ^
+ *
+ * const apples = 1;
+ * const oranges = 2;
+ * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
+ * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
+ *
+ * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
+ * // TypeError: Inputs are not identical
+ * ```
+ *
+ * If the values are not strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
+ * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function strictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests strict inequality between the `actual` and `expected` parameters as
+ * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.notStrictEqual(1, 2);
+ * // OK
+ *
+ * assert.notStrictEqual(1, 1);
+ * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
+ * //
+ * // 1
+ *
+ * assert.notStrictEqual(1, '1');
+ * // OK
+ * ```
+ *
+ * If the values are strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
+ * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v0.1.21
+ */
+ function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Tests for deep equality between the `actual` and `expected` parameters.
+ * "Deep" equality means that the enumerable "own" properties of child objects
+ * are recursively evaluated also by the following rules.
+ * @since v1.2.0
+ */
+ function deepStrictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+ /**
+ * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
+ * // OK
+ * ```
+ *
+ * If the values are deeply and strictly equal, an `AssertionError` is thrown
+ * with a `message` property set equal to the value of the `message` parameter. If
+ * the `message` parameter is undefined, a default error message is assigned. If
+ * the `message` parameter is an instance of an `Error` then it will be thrown
+ * instead of the `AssertionError`.
+ * @since v1.2.0
+ */
+ function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+ /**
+ * Expects the function `fn` to throw an error.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * a validation object where each property will be tested for strict deep equality,
+ * or an instance of error where each property will be tested for strict deep
+ * equality including the non-enumerable `message` and `name` properties. When
+ * using an object, it is also possible to use a regular expression, when
+ * validating against a string property. See below for examples.
+ *
+ * If specified, `message` will be appended to the message provided by the`AssertionError` if the `fn` call fails to throw or in case the error validation
+ * fails.
+ *
+ * Custom validation object/error instance:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * const err = new TypeError('Wrong value');
+ * err.code = 404;
+ * err.foo = 'bar';
+ * err.info = {
+ * nested: true,
+ * baz: 'text'
+ * };
+ * err.reg = /abc/i;
+ *
+ * assert.throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value',
+ * info: {
+ * nested: true,
+ * baz: 'text'
+ * }
+ * // Only properties on the validation object will be tested for.
+ * // Using nested objects requires all properties to be present. Otherwise
+ * // the validation is going to fail.
+ * }
+ * );
+ *
+ * // Using regular expressions to validate error properties:
+ * throws(
+ * () => {
+ * throw err;
+ * },
+ * {
+ * // The `name` and `message` properties are strings and using regular
+ * // expressions on those will match against the string. If they fail, an
+ * // error is thrown.
+ * name: /^TypeError$/,
+ * message: /Wrong/,
+ * foo: 'bar',
+ * info: {
+ * nested: true,
+ * // It is not possible to use regular expressions for nested properties!
+ * baz: 'text'
+ * },
+ * // The `reg` property contains a regular expression and only if the
+ * // validation object contains an identical regular expression, it is going
+ * // to pass.
+ * reg: /abc/i
+ * }
+ * );
+ *
+ * // Fails due to the different `message` and `name` properties:
+ * throws(
+ * () => {
+ * const otherErr = new Error('Not found');
+ * // Copy all enumerable properties from `err` to `otherErr`.
+ * for (const [key, value] of Object.entries(err)) {
+ * otherErr[key] = value;
+ * }
+ * throw otherErr;
+ * },
+ * // The error's `message` and `name` properties will also be checked when using
+ * // an error as validation object.
+ * err
+ * );
+ * ```
+ *
+ * Validate instanceof using constructor:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * Error
+ * );
+ * ```
+ *
+ * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
+ *
+ * Using a regular expression runs `.toString` on the error object, and will
+ * therefore also include the error name.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * /^Error: Wrong value$/
+ * );
+ * ```
+ *
+ * Custom error validation:
+ *
+ * The function must return `true` to indicate all internal validations passed.
+ * It will otherwise fail with an `AssertionError`.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.throws(
+ * () => {
+ * throw new Error('Wrong value');
+ * },
+ * (err) => {
+ * assert(err instanceof Error);
+ * assert(/value/.test(err));
+ * // Avoid returning anything from validation functions besides `true`.
+ * // Otherwise, it's not clear what part of the validation failed. Instead,
+ * // throw an error about the specific validation that failed (as done in this
+ * // example) and add as much helpful debugging information to that error as
+ * // possible.
+ * return true;
+ * },
+ * 'unexpected error'
+ * );
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second
+ * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Using the same
+ * message as the thrown error message is going to result in an`ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
+ * a string as the second argument gets considered:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * function throwingFirst() {
+ * throw new Error('First');
+ * }
+ *
+ * function throwingSecond() {
+ * throw new Error('Second');
+ * }
+ *
+ * function notThrowing() {}
+ *
+ * // The second argument is a string and the input function threw an Error.
+ * // The first case will not throw as it does not match for the error message
+ * // thrown by the input function!
+ * assert.throws(throwingFirst, 'Second');
+ * // In the next example the message has no benefit over the message from the
+ * // error and since it is not clear if the user intended to actually match
+ * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
+ * assert.throws(throwingSecond, 'Second');
+ * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
+ *
+ * // The string is only used (as message) in case the function does not throw:
+ * assert.throws(notThrowing, 'Second');
+ * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
+ *
+ * // If it was intended to match for the error message do this instead:
+ * // It does not throw because the error messages match.
+ * assert.throws(throwingSecond, /Second$/);
+ *
+ * // If the error message does not match, an AssertionError is thrown.
+ * assert.throws(throwingFirst, /Second$/);
+ * // AssertionError [ERR_ASSERTION]
+ * ```
+ *
+ * Due to the confusing error-prone notation, avoid a string as the second
+ * argument.
+ * @since v0.1.21
+ */
+ function throws(block: () => unknown, message?: string | Error): void;
+ function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Asserts that the function `fn` does not throw an error.
+ *
+ * Using `assert.doesNotThrow()` is actually not useful because there
+ * is no benefit in catching an error and then rethrowing it. Instead, consider
+ * adding a comment next to the specific code path that should not throw and keep
+ * error messages as expressive as possible.
+ *
+ * When `assert.doesNotThrow()` is called, it will immediately call the `fn`function.
+ *
+ * If an error is thrown and it is the same type as that specified by the `error`parameter, then an `AssertionError` is thrown. If the error is of a
+ * different type, or if the `error` parameter is undefined, the error is
+ * propagated back to the caller.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
+ * function. See {@link throws} for more details.
+ *
+ * The following, for instance, will throw the `TypeError` because there is no
+ * matching error type in the assertion:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError
+ * );
+ * ```
+ *
+ * However, the following will result in an `AssertionError` with the message
+ * 'Got unwanted exception...':
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * TypeError
+ * );
+ * ```
+ *
+ * If an `AssertionError` is thrown and a value is provided for the `message`parameter, the value of `message` will be appended to the `AssertionError` message:
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotThrow(
+ * () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * /Wrong value/,
+ * 'Whoops'
+ * );
+ * // Throws: AssertionError: Got unwanted exception: Whoops
+ * ```
+ * @since v0.1.21
+ */
+ function doesNotThrow(block: () => unknown, message?: string | Error): void;
+ function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+ /**
+ * Throws `value` if `value` is not `undefined` or `null`. This is useful when
+ * testing the `error` argument in callbacks. The stack trace contains all frames
+ * from the error passed to `ifError()` including the potential new frames for`ifError()` itself.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.ifError(null);
+ * // OK
+ * assert.ifError(0);
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
+ * assert.ifError('error');
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
+ * assert.ifError(new Error());
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
+ *
+ * // Create some random error frames.
+ * let err;
+ * (function errorFrame() {
+ * err = new Error('test error');
+ * })();
+ *
+ * (function ifErrorFrame() {
+ * assert.ifError(err);
+ * })();
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
+ * // at ifErrorFrame
+ * // at errorFrame
+ * ```
+ * @since v0.1.97
+ */
+ function ifError(value: unknown): asserts value is null | undefined;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously,`assert.rejects()` will return a rejected `Promise` with that error. If the
+ * function does not return a promise, `assert.rejects()` will return a rejected`Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error
+ * handler is skipped.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link throws}.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+ * an object where each property will be tested for, or an instance of error where
+ * each property will be tested for including the non-enumerable `message` and`name` properties.
+ *
+ * If specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * {
+ * name: 'TypeError',
+ * message: 'Wrong value'
+ * }
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * await assert.rejects(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * (err) => {
+ * assert.strictEqual(err.name, 'TypeError');
+ * assert.strictEqual(err.message, 'Wrong value');
+ * return true;
+ * }
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.rejects(
+ * Promise.reject(new Error('Wrong value')),
+ * Error
+ * ).then(() => {
+ * // ...
+ * });
+ * ```
+ *
+ * `error` cannot be a string. If a string is provided as the second
+ * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Please read the
+ * example in {@link throws} carefully if using a string as the second
+ * argument gets considered.
+ * @since v10.0.0
+ */
+ function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise;
+ function rejects(block: (() => Promise) | Promise, error: AssertPredicate, message?: string | Error): Promise;
+ /**
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+ * calls the function and awaits the returned promise to complete. It will then
+ * check that the promise is not rejected.
+ *
+ * If `asyncFn` is a function and it throws an error synchronously,`assert.doesNotReject()` will return a rejected `Promise` with that error. If
+ * the function does not return a promise, `assert.doesNotReject()` will return a
+ * rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases
+ * the error handler is skipped.
+ *
+ * Using `assert.doesNotReject()` is actually not useful because there is little
+ * benefit in catching a rejection and then rejecting it again. Instead, consider
+ * adding a comment next to the specific code path that should not reject and keep
+ * error messages as expressive as possible.
+ *
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
+ * function. See {@link throws} for more details.
+ *
+ * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * await assert.doesNotReject(
+ * async () => {
+ * throw new TypeError('Wrong value');
+ * },
+ * SyntaxError
+ * );
+ * ```
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
+ * .then(() => {
+ * // ...
+ * });
+ * ```
+ * @since v10.0.0
+ */
+ function doesNotReject(block: (() => Promise) | Promise, message?: string | Error): Promise;
+ function doesNotReject(block: (() => Promise) | Promise, error: AssertPredicate, message?: string | Error): Promise;
+ /**
+ * Expects the `string` input to match the regular expression.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.match('I will fail', /pass/);
+ * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
+ *
+ * assert.match(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.match('I will pass', /pass/);
+ * // OK
+ * ```
+ *
+ * If the values do not match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v13.6.0, v12.16.0
+ */
+ function match(value: string, regExp: RegExp, message?: string | Error): void;
+ /**
+ * Expects the `string` input not to match the regular expression.
+ *
+ * ```js
+ * import assert from 'assert/strict';
+ *
+ * assert.doesNotMatch('I will fail', /fail/);
+ * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
+ *
+ * assert.doesNotMatch(123, /pass/);
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+ *
+ * assert.doesNotMatch('I will pass', /different/);
+ * // OK
+ * ```
+ *
+ * If the values do match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
+ * to the value of the `message` parameter. If the `message` parameter is
+ * undefined, a default error message is assigned. If the `message` parameter is an
+ * instance of an `Error` then it will be thrown instead of the `AssertionError`.
+ * @since v13.6.0, v12.16.0
+ */
+ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
+ const strict: Omit & {
+ (value: unknown, message?: string | Error): asserts value;
+ equal: typeof strictEqual;
+ notEqual: typeof notStrictEqual;
+ deepEqual: typeof deepStrictEqual;
+ notDeepEqual: typeof notDeepStrictEqual;
+ // Mapped types and assertion functions are incompatible?
+ // TS2775: Assertions require every name in the call target
+ // to be declared with an explicit type annotation.
+ ok: typeof ok;
+ strictEqual: typeof strictEqual;
+ deepStrictEqual: typeof deepStrictEqual;
+ ifError: typeof ifError;
+ strict: typeof strict;
+ };
+ }
+ export = assert;
+}
+declare module 'node:assert' {
+ import assert = require('assert');
+ export = assert;
+}
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/ts4.8/assert/strict.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/ts4.8/assert/strict.d.ts
new file mode 100644
index 000000000..3987c8267
--- /dev/null
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/ts4.8/assert/strict.d.ts
@@ -0,0 +1,11 @@
+
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
+
+declare module 'assert/strict' {
+ import { strict } from 'node:assert';
+ export = strict;
+}
+declare module 'node:assert/strict' {
+ import { strict } from 'node:assert';
+ export = strict;
+}
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/ts4.8/async_hooks.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/ts4.8/async_hooks.d.ts
new file mode 100644
index 000000000..e35f09beb
--- /dev/null
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/ts4.8/async_hooks.d.ts
@@ -0,0 +1,504 @@
+
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
+
+/**
+ * The `async_hooks` module provides an API to track asynchronous resources. It
+ * can be accessed using:
+ *
+ * ```js
+ * import async_hooks from 'async_hooks';
+ * ```
+ * @experimental
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/async_hooks.js)
+ */
+declare module 'async_hooks' {
+ /**
+ * ```js
+ * import { executionAsyncId } from 'async_hooks';
+ *
+ * console.log(executionAsyncId()); // 1 - bootstrap
+ * fs.open(path, 'r', (err, fd) => {
+ * console.log(executionAsyncId()); // 6 - open()
+ * });
+ * ```
+ *
+ * The ID returned from `executionAsyncId()` is related to execution timing, not
+ * causality (which is covered by `triggerAsyncId()`):
+ *
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // Returns the ID of the server, not of the new connection, because the
+ * // callback runs in the execution scope of the server's MakeCallback().
+ * async_hooks.executionAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Returns the ID of a TickObject (process.nextTick()) because all
+ * // callbacks passed to .listen() are wrapped in a nextTick().
+ * async_hooks.executionAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get precise `executionAsyncIds` by default.
+ * See the section on `promise execution tracking`.
+ * @since v8.1.0
+ * @return The `asyncId` of the current execution context. Useful to track when something calls.
+ */
+ function executionAsyncId(): number;
+ /**
+ * Resource objects returned by `executionAsyncResource()` are most often internal
+ * Node.js handle objects with undocumented APIs. Using any functions or properties
+ * on the object is likely to crash your application and should be avoided.
+ *
+ * Using `executionAsyncResource()` in the top-level execution context will
+ * return an empty object as there is no handle or request object to use,
+ * but having an object representing the top-level can be helpful.
+ *
+ * ```js
+ * import { open } from 'fs';
+ * import { executionAsyncId, executionAsyncResource } from 'async_hooks';
+ *
+ * console.log(executionAsyncId(), executionAsyncResource()); // 1 {}
+ * open(new URL(import.meta.url), 'r', (err, fd) => {
+ * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap
+ * });
+ * ```
+ *
+ * This can be used to implement continuation local storage without the
+ * use of a tracking `Map` to store the metadata:
+ *
+ * ```js
+ * import { createServer } from 'http';
+ * import {
+ * executionAsyncId,
+ * executionAsyncResource,
+ * createHook
+ * } from 'async_hooks';
+ * const sym = Symbol('state'); // Private symbol to avoid pollution
+ *
+ * createHook({
+ * init(asyncId, type, triggerAsyncId, resource) {
+ * const cr = executionAsyncResource();
+ * if (cr) {
+ * resource[sym] = cr[sym];
+ * }
+ * }
+ * }).enable();
+ *
+ * const server = createServer((req, res) => {
+ * executionAsyncResource()[sym] = { state: req.url };
+ * setTimeout(function() {
+ * res.end(JSON.stringify(executionAsyncResource()[sym]));
+ * }, 100);
+ * }).listen(3000);
+ * ```
+ * @since v13.9.0, v12.17.0
+ * @return The resource representing the current execution. Useful to store data within the resource.
+ */
+ function executionAsyncResource(): object;
+ /**
+ * ```js
+ * const server = net.createServer((conn) => {
+ * // The resource that caused (or triggered) this callback to be called
+ * // was that of the new connection. Thus the return value of triggerAsyncId()
+ * // is the asyncId of "conn".
+ * async_hooks.triggerAsyncId();
+ *
+ * }).listen(port, () => {
+ * // Even though all callbacks passed to .listen() are wrapped in a nextTick()
+ * // the callback itself exists because the call to the server's .listen()
+ * // was made. So the return value would be the ID of the server.
+ * async_hooks.triggerAsyncId();
+ * });
+ * ```
+ *
+ * Promise contexts may not get valid `triggerAsyncId`s by default. See
+ * the section on `promise execution tracking`.
+ * @return The ID of the resource responsible for calling the callback that is currently being executed.
+ */
+ function triggerAsyncId(): number;
+ interface HookCallbacks {
+ /**
+ * Called when a class is constructed that has the possibility to emit an asynchronous event.
+ * @param asyncId a unique ID for the async resource
+ * @param type the type of the async resource
+ * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
+ * @param resource reference to the resource representing the async operation, needs to be released during destroy
+ */
+ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
+ /**
+ * When an asynchronous operation is initiated or completes a callback is called to notify the user.
+ * The before callback is called just before said callback is executed.
+ * @param asyncId the unique identifier assigned to the resource about to execute the callback.
+ */
+ before?(asyncId: number): void;
+ /**
+ * Called immediately after the callback specified in before is completed.
+ * @param asyncId the unique identifier assigned to the resource which has executed the callback.
+ */
+ after?(asyncId: number): void;
+ /**
+ * Called when a promise has resolve() called. This may not be in the same execution id
+ * as the promise itself.
+ * @param asyncId the unique id for the promise that was resolve()d.
+ */
+ promiseResolve?(asyncId: number): void;
+ /**
+ * Called after the resource corresponding to asyncId is destroyed
+ * @param asyncId a unique ID for the async resource
+ */
+ destroy?(asyncId: number): void;
+ }
+ interface AsyncHook {
+ /**
+ * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
+ */
+ enable(): this;
+ /**
+ * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
+ */
+ disable(): this;
+ }
+ /**
+ * Registers functions to be called for different lifetime events of each async
+ * operation.
+ *
+ * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
+ * respective asynchronous event during a resource's lifetime.
+ *
+ * All callbacks are optional. For example, if only resource cleanup needs to
+ * be tracked, then only the `destroy` callback needs to be passed. The
+ * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section.
+ *
+ * ```js
+ * import { createHook } from 'async_hooks';
+ *
+ * const asyncHook = createHook({
+ * init(asyncId, type, triggerAsyncId, resource) { },
+ * destroy(asyncId) { }
+ * });
+ * ```
+ *
+ * The callbacks will be inherited via the prototype chain:
+ *
+ * ```js
+ * class MyAsyncCallbacks {
+ * init(asyncId, type, triggerAsyncId, resource) { }
+ * destroy(asyncId) {}
+ * }
+ *
+ * class MyAddedCallbacks extends MyAsyncCallbacks {
+ * before(asyncId) { }
+ * after(asyncId) { }
+ * }
+ *
+ * const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
+ * ```
+ *
+ * Because promises are asynchronous resources whose lifecycle is tracked
+ * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises.
+ * @since v8.1.0
+ * @param callbacks The `Hook Callbacks` to register
+ * @return Instance used for disabling and enabling hooks
+ */
+ function createHook(callbacks: HookCallbacks): AsyncHook;
+ interface AsyncResourceOptions {
+ /**
+ * The ID of the execution context that created this async event.
+ * @default executionAsyncId()
+ */
+ triggerAsyncId?: number | undefined;
+ /**
+ * Disables automatic `emitDestroy` when the object is garbage collected.
+ * This usually does not need to be set (even if `emitDestroy` is called
+ * manually), unless the resource's `asyncId` is retrieved and the
+ * sensitive API's `emitDestroy` is called with it.
+ * @default false
+ */
+ requireManualDestroy?: boolean | undefined;
+ }
+ /**
+ * The class `AsyncResource` is designed to be extended by the embedder's async
+ * resources. Using this, users can easily trigger the lifetime events of their
+ * own resources.
+ *
+ * The `init` hook will trigger when an `AsyncResource` is instantiated.
+ *
+ * The following is an overview of the `AsyncResource` API.
+ *
+ * ```js
+ * import { AsyncResource, executionAsyncId } from 'async_hooks';
+ *
+ * // AsyncResource() is meant to be extended. Instantiating a
+ * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * // async_hook.executionAsyncId() is used.
+ * const asyncResource = new AsyncResource(
+ * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }
+ * );
+ *
+ * // Run a function in the execution context of the resource. This will
+ * // * establish the context of the resource
+ * // * trigger the AsyncHooks before callbacks
+ * // * call the provided function `fn` with the supplied arguments
+ * // * trigger the AsyncHooks after callbacks
+ * // * restore the original execution context
+ * asyncResource.runInAsyncScope(fn, thisArg, ...args);
+ *
+ * // Call AsyncHooks destroy callbacks.
+ * asyncResource.emitDestroy();
+ *
+ * // Return the unique ID assigned to the AsyncResource instance.
+ * asyncResource.asyncId();
+ *
+ * // Return the trigger ID for the AsyncResource instance.
+ * asyncResource.triggerAsyncId();
+ * ```
+ */
+ class AsyncResource {
+ /**
+ * AsyncResource() is meant to be extended. Instantiating a
+ * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * async_hook.executionAsyncId() is used.
+ * @param type The type of async event.
+ * @param triggerAsyncId The ID of the execution context that created
+ * this async event (default: `executionAsyncId()`), or an
+ * AsyncResourceOptions object (since v9.3.0)
+ */
+ constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
+ /**
+ * Binds the given function to the current execution context.
+ *
+ * The returned function will have an `asyncResource` property referencing
+ * the `AsyncResource` to which the function is bound.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current execution context.
+ * @param type An optional name to associate with the underlying `AsyncResource`.
+ */
+ static bind any, ThisArg>(
+ fn: Func,
+ type?: string,
+ thisArg?: ThisArg
+ ): Func & {
+ asyncResource: AsyncResource;
+ };
+ /**
+ * Binds the given function to execute to this `AsyncResource`'s scope.
+ *
+ * The returned function will have an `asyncResource` property referencing
+ * the `AsyncResource` to which the function is bound.
+ * @since v14.8.0, v12.19.0
+ * @param fn The function to bind to the current `AsyncResource`.
+ */
+ bind any>(
+ fn: Func
+ ): Func & {
+ asyncResource: AsyncResource;
+ };
+ /**
+ * Call the provided function with the provided arguments in the execution context
+ * of the async resource. This will establish the context, trigger the AsyncHooks
+ * before callbacks, call the function, trigger the AsyncHooks after callbacks, and
+ * then restore the original execution context.
+ * @since v9.6.0
+ * @param fn The function to call in the execution context of this async resource.
+ * @param thisArg The receiver to be used for the function call.
+ * @param args Optional arguments to pass to the function.
+ */
+ runInAsyncScope(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
+ /**
+ * Call all `destroy` hooks. This should only ever be called once. An error will
+ * be thrown if it is called more than once. This **must** be manually called. If
+ * the resource is left to be collected by the GC then the `destroy` hooks will
+ * never be called.
+ * @return A reference to `asyncResource`.
+ */
+ emitDestroy(): this;
+ /**
+ * @return The unique `asyncId` assigned to the resource.
+ */
+ asyncId(): number;
+ /**
+ *
+ * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
+ */
+ triggerAsyncId(): number;
+ }
+ /**
+ * This class creates stores that stay coherent through asynchronous operations.
+ *
+ * While you can create your own implementation on top of the `async_hooks` module,`AsyncLocalStorage` should be preferred as it is a performant and memory safe
+ * implementation that involves significant optimizations that are non-obvious to
+ * implement.
+ *
+ * The following example uses `AsyncLocalStorage` to build a simple logger
+ * that assigns IDs to incoming HTTP requests and includes them in messages
+ * logged within each request.
+ *
+ * ```js
+ * import http from 'http';
+ * import { AsyncLocalStorage } from 'async_hooks';
+ *
+ * const asyncLocalStorage = new AsyncLocalStorage();
+ *
+ * function logWithId(msg) {
+ * const id = asyncLocalStorage.getStore();
+ * console.log(`${id !== undefined ? id : '-'}:`, msg);
+ * }
+ *
+ * let idSeq = 0;
+ * http.createServer((req, res) => {
+ * asyncLocalStorage.run(idSeq++, () => {
+ * logWithId('start');
+ * // Imagine any chain of async operations here
+ * setImmediate(() => {
+ * logWithId('finish');
+ * res.end();
+ * });
+ * });
+ * }).listen(8080);
+ *
+ * http.get('http://localhost:8080');
+ * http.get('http://localhost:8080');
+ * // Prints:
+ * // 0: start
+ * // 1: start
+ * // 0: finish
+ * // 1: finish
+ * ```
+ *
+ * Each instance of `AsyncLocalStorage` maintains an independent storage context.
+ * Multiple instances can safely exist simultaneously without risk of interfering
+ * with each other's data.
+ * @since v13.10.0, v12.17.0
+ */
+ class AsyncLocalStorage {
+ /**
+ * Disables the instance of `AsyncLocalStorage`. All subsequent calls
+ * to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
+ *
+ * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
+ * instance will be exited.
+ *
+ * Calling `asyncLocalStorage.disable()` is required before the`asyncLocalStorage` can be garbage collected. This does not apply to stores
+ * provided by the `asyncLocalStorage`, as those objects are garbage collected
+ * along with the corresponding async resources.
+ *
+ * Use this method when the `asyncLocalStorage` is not in use anymore
+ * in the current process.
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ disable(): void;
+ /**
+ * Returns the current store.
+ * If called outside of an asynchronous context initialized by
+ * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
+ * returns `undefined`.
+ * @since v13.10.0, v12.17.0
+ */
+ getStore(): T | undefined;
+ /**
+ * Runs a function synchronously within a context and returns its
+ * return value. The store is not accessible outside of the callback function.
+ * The store is accessible to any asynchronous operations created within the
+ * callback.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `run()` too.
+ * The stacktrace is not impacted by this call and the context is exited.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 2 };
+ * try {
+ * asyncLocalStorage.run(store, () => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * setTimeout(() => {
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * }, 200);
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ */
+ run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Runs a function synchronously outside of a context and returns its
+ * return value. The store is not accessible within the callback function or
+ * the asynchronous operations created within the callback. Any `getStore()`call done within the callback function will always return `undefined`.
+ *
+ * The optional `args` are passed to the callback function.
+ *
+ * If the callback function throws an error, the error is thrown by `exit()` too.
+ * The stacktrace is not impacted by this call and the context is re-entered.
+ *
+ * Example:
+ *
+ * ```js
+ * // Within a call to run
+ * try {
+ * asyncLocalStorage.getStore(); // Returns the store object or value
+ * asyncLocalStorage.exit(() => {
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * throw new Error();
+ * });
+ * } catch (e) {
+ * asyncLocalStorage.getStore(); // Returns the same object or value
+ * // The error will be caught here
+ * }
+ * ```
+ * @since v13.10.0, v12.17.0
+ * @experimental
+ */
+ exit(callback: (...args: TArgs) => R, ...args: TArgs): R;
+ /**
+ * Transitions into the context for the remainder of the current
+ * synchronous execution and then persists the store through any following
+ * asynchronous calls.
+ *
+ * Example:
+ *
+ * ```js
+ * const store = { id: 1 };
+ * // Replaces previous store with the given store object
+ * asyncLocalStorage.enterWith(store);
+ * asyncLocalStorage.getStore(); // Returns the store object
+ * someAsyncOperation(() => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ * ```
+ *
+ * This transition will continue for the _entire_ synchronous execution.
+ * This means that if, for example, the context is entered within an event
+ * handler subsequent event handlers will also run within that context unless
+ * specifically bound to another context with an `AsyncResource`. That is why`run()` should be preferred over `enterWith()` unless there are strong reasons
+ * to use the latter method.
+ *
+ * ```js
+ * const store = { id: 1 };
+ *
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.enterWith(store);
+ * });
+ * emitter.on('my-event', () => {
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * });
+ *
+ * asyncLocalStorage.getStore(); // Returns undefined
+ * emitter.emit('my-event');
+ * asyncLocalStorage.getStore(); // Returns the same object
+ * ```
+ * @since v13.11.0, v12.17.0
+ * @experimental
+ */
+ enterWith(store: T): void;
+ }
+}
+declare module 'node:async_hooks' {
+ export * from 'async_hooks';
+}
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/ts4.8/buffer.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/ts4.8/buffer.d.ts
new file mode 100644
index 000000000..c603664da
--- /dev/null
+++ b/packages/node_modules/@node-red/editor-client/src/types/node/ts4.8/buffer.d.ts
@@ -0,0 +1,2262 @@
+
+/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
+
+/**
+ * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many
+ * Node.js APIs support `Buffer`s.
+ *
+ * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and
+ * extends it with methods that cover additional use cases. Node.js APIs accept
+ * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well.
+ *
+ * While the `Buffer` class is available within the global scope, it is still
+ * recommended to explicitly reference it via an import or require statement.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Creates a zero-filled Buffer of length 10.
+ * const buf1 = Buffer.alloc(10);
+ *
+ * // Creates a Buffer of length 10,
+ * // filled with bytes which all have the value `1`.
+ * const buf2 = Buffer.alloc(10, 1);
+ *
+ * // Creates an uninitialized buffer of length 10.
+ * // This is faster than calling Buffer.alloc() but the returned
+ * // Buffer instance might contain old data that needs to be
+ * // overwritten using fill(), write(), or other functions that fill the Buffer's
+ * // contents.
+ * const buf3 = Buffer.allocUnsafe(10);
+ *
+ * // Creates a Buffer containing the bytes [1, 2, 3].
+ * const buf4 = Buffer.from([1, 2, 3]);
+ *
+ * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries
+ * // are all truncated using `(value & 255)` to fit into the range 0–255.
+ * const buf5 = Buffer.from([257, 257.5, -255, '1']);
+ *
+ * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést':
+ * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation)
+ * // [116, 195, 169, 115, 116] (in decimal notation)
+ * const buf6 = Buffer.from('tést');
+ *
+ * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
+ * const buf7 = Buffer.from('tést', 'latin1');
+ * ```
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/buffer.js)
+ */
+declare module 'buffer' {
+ import { BinaryLike } from 'node:crypto';
+ import { ReadableStream as WebReadableStream } from 'node:stream/web';
+ export const INSPECT_MAX_BYTES: number;
+ export const kMaxLength: number;
+ export const kStringMaxLength: number;
+ export const constants: {
+ MAX_LENGTH: number;
+ MAX_STRING_LENGTH: number;
+ };
+ export type TranscodeEncoding = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'latin1' | 'binary';
+ /**
+ * Re-encodes the given `Buffer` or `Uint8Array` instance from one character
+ * encoding to another. Returns a new `Buffer` instance.
+ *
+ * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
+ * conversion from `fromEnc` to `toEnc` is not permitted.
+ *
+ * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
+ *
+ * The transcoding process will use substitution characters if a given byte
+ * sequence cannot be adequately represented in the target encoding. For instance:
+ *
+ * ```js
+ * import { Buffer, transcode } from 'buffer';
+ *
+ * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii');
+ * console.log(newBuf.toString('ascii'));
+ * // Prints: '?'
+ * ```
+ *
+ * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced
+ * with `?` in the transcoded `Buffer`.
+ * @since v7.1.0
+ * @param source A `Buffer` or `Uint8Array` instance.
+ * @param fromEnc The current encoding.
+ * @param toEnc To target encoding.
+ */
+ export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
+ export const SlowBuffer: {
+ /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
+ new (size: number): Buffer;
+ prototype: Buffer;
+ };
+ /**
+ * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
+ * a prior call to `URL.createObjectURL()`.
+ * @since v16.7.0
+ * @experimental
+ * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
+ */
+ export function resolveObjectURL(id: string): Blob | undefined;
+ export { Buffer };
+ /**
+ * @experimental
+ */
+ export interface BlobOptions {
+ /**
+ * @default 'utf8'
+ */
+ encoding?: BufferEncoding | undefined;
+ /**
+ * The Blob content-type. The intent is for `type` to convey
+ * the MIME media type of the data, however no validation of the type format
+ * is performed.
+ */
+ type?: string | undefined;
+ }
+ /**
+ * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
+ * multiple worker threads.
+ * @since v15.7.0, v14.18.0
+ */
+ export class Blob {
+ /**
+ * The total size of the `Blob` in bytes.
+ * @since v15.7.0, v14.18.0
+ */
+ readonly size: number;
+ /**
+ * The content-type of the `Blob`.
+ * @since v15.7.0, v14.18.0
+ */
+ readonly type: string;
+ /**
+ * Creates a new `Blob` object containing a concatenation of the given sources.
+ *
+ * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
+ * the 'Blob' and can therefore be safely modified after the 'Blob' is created.
+ *
+ * String sources are also copied into the `Blob`.
+ */
+ constructor(sources: Array, options?: BlobOptions);
+ /**
+ * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
+ * the `Blob` data.
+ * @since v15.7.0, v14.18.0
+ */
+ arrayBuffer(): Promise;
+ /**
+ * Creates and returns a new `Blob` containing a subset of this `Blob` objects
+ * data. The original `Blob` is not altered.
+ * @since v15.7.0, v14.18.0
+ * @param start The starting index.
+ * @param end The ending index.
+ * @param type The content-type for the new `Blob`
+ */
+ slice(start?: number, end?: number, type?: string): Blob;
+ /**
+ * Returns a promise that fulfills with the contents of the `Blob` decoded as a
+ * UTF-8 string.
+ * @since v15.7.0, v14.18.0
+ */
+ text(): Promise;
+ /**
+ * Returns a new (WHATWG) `ReadableStream` that allows the content of the `Blob` to be read.
+ * @since v16.7.0
+ */
+ stream(): WebReadableStream;
+ }
+ export import atob = globalThis.atob;
+ export import btoa = globalThis.btoa;
+
+ import { Blob as NodeBlob } from 'buffer';
+ // This conditional type will be the existing global Blob in a browser, or
+ // the copy below in a Node environment.
+ type __Blob = typeof globalThis extends { onmessage: any, Blob: any }
+ ? {} : NodeBlob;
+
+ global {
+ // Buffer class
+ type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
+ type WithImplicitCoercion =
+ | T
+ | {
+ valueOf(): T;
+ };
+ /**
+ * Raw data is stored in instances of the Buffer class.
+ * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
+ * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
+ */
+ interface BufferConstructor {
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
+ */
+ new (str: string, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
+ */
+ new (size: number): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new (array: Uint8Array): Buffer;
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}/{SharedArrayBuffer}.
+ *
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
+ */
+ new (arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ new (array: ReadonlyArray): Buffer;
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
+ */
+ new (buffer: Buffer): Buffer;
+ /**
+ * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
+ * Array entries outside that range will be truncated to fit into it.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
+ * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
+ * ```
+ *
+ * A `TypeError` will be thrown if `array` is not an `Array` or another type
+ * appropriate for `Buffer.from()` variants.
+ *
+ * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v5.10.0
+ */
+ from(arrayBuffer: WithImplicitCoercion, byteOffset?: number, length?: number): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param data data to create a new Buffer
+ */
+ from(data: Uint8Array | ReadonlyArray): Buffer;
+ from(data: WithImplicitCoercion | string>): Buffer;
+ /**
+ * Creates a new Buffer containing the given JavaScript string {str}.
+ * If provided, the {encoding} parameter identifies the character encoding.
+ * If not provided, {encoding} defaults to 'utf8'.
+ */
+ from(
+ str:
+ | WithImplicitCoercion
+ | {
+ [Symbol.toPrimitive](hint: 'string'): string;
+ },
+ encoding?: BufferEncoding
+ ): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param values to create a new Buffer
+ */
+ of(...items: number[]): Buffer;
+ /**
+ * Returns `true` if `obj` is a `Buffer`, `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * Buffer.isBuffer(Buffer.alloc(10)); // true
+ * Buffer.isBuffer(Buffer.from('foo')); // true
+ * Buffer.isBuffer('a string'); // false
+ * Buffer.isBuffer([]); // false
+ * Buffer.isBuffer(new Uint8Array(1024)); // false
+ * ```
+ * @since v0.1.101
+ */
+ isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns `true` if `encoding` is the name of a supported character encoding,
+ * or `false` otherwise.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * console.log(Buffer.isEncoding('utf8'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('hex'));
+ * // Prints: true
+ *
+ * console.log(Buffer.isEncoding('utf/8'));
+ * // Prints: false
+ *
+ * console.log(Buffer.isEncoding(''));
+ * // Prints: false
+ * ```
+ * @since v0.9.1
+ * @param encoding A character encoding name to check.
+ */
+ isEncoding(encoding: string): encoding is BufferEncoding;
+ /**
+ * Returns the byte length of a string when encoded using `encoding`.
+ * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account
+ * for the encoding that is used to convert the string into bytes.
+ *
+ * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input.
+ * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the
+ * return value might be greater than the length of a `Buffer` created from the
+ * string.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const str = '\u00bd + \u00bc = \u00be';
+ *
+ * console.log(`${str}: ${str.length} characters, ` +
+ * `${Buffer.byteLength(str, 'utf8')} bytes`);
+ * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes
+ * ```
+ *
+ * When `string` is a
+ * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/-
+ * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop-
+ * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned.
+ * @since v0.1.90
+ * @param string A value to calculate the length of.
+ * @param [encoding='utf8'] If `string` is a string, this is its encoding.
+ * @return The number of bytes contained within `string`.
+ */
+ byteLength(string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, encoding?: BufferEncoding): number;
+ /**
+ * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
+ *
+ * If the list has no items, or if the `totalLength` is 0, then a new zero-length`Buffer` is returned.
+ *
+ * If `totalLength` is not provided, it is calculated from the `Buffer` instances
+ * in `list` by adding their lengths.
+ *
+ * If `totalLength` is provided, it is coerced to an unsigned integer. If the
+ * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
+ * truncated to `totalLength`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Create a single `Buffer` from a list of three `Buffer` instances.
+ *
+ * const buf1 = Buffer.alloc(10);
+ * const buf2 = Buffer.alloc(14);
+ * const buf3 = Buffer.alloc(18);
+ * const totalLength = buf1.length + buf2.length + buf3.length;
+ *
+ * console.log(totalLength);
+ * // Prints: 42
+ *
+ * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
+ *
+ * console.log(bufA);
+ * // Prints:
+ * console.log(bufA.length);
+ * // Prints: 42
+ * ```
+ *
+ * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
+ * @since v0.7.11
+ * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate.
+ * @param totalLength Total length of the `Buffer` instances in `list` when concatenated.
+ */
+ concat(list: ReadonlyArray, totalLength?: number): Buffer;
+ /**
+ * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of`Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from('1234');
+ * const buf2 = Buffer.from('0123');
+ * const arr = [buf1, buf2];
+ *
+ * console.log(arr.sort(Buffer.compare));
+ * // Prints: [ , ]
+ * // (This result is equal to: [buf2, buf1].)
+ * ```
+ * @since v0.11.13
+ * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
+ */
+ compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(5);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown.
+ *
+ * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(5, 'a');
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+ * initialized by calling `buf.fill(fill, encoding)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
+ * contents will never contain sensitive data from previous allocations, including
+ * data that might not have been allocated for `Buffer`s.
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ * @param [fill=0] A value to pre-fill the new `Buffer` with.
+ * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
+ */
+ alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.allocUnsafe(10);
+ *
+ * console.log(buf);
+ * // Prints (contents may vary):
+ *
+ * buf.fill(0);
+ *
+ * console.log(buf);
+ * // Prints:
+ * ```
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ *
+ * The `Buffer` module pre-allocates an internal `Buffer` instance of
+ * size `Buffer.poolSize` that is used as a pool for the fast allocation of new`Buffer` instances created using `Buffer.allocUnsafe()`,`Buffer.from(array)`, `Buffer.concat()`, and the
+ * deprecated`new Buffer(size)` constructor only when `size` is less than or equal
+ * to `Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two).
+ *
+ * Use of this pre-allocated internal memory pool is a key difference between
+ * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+ * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less
+ * than or equal to half `Buffer.poolSize`. The
+ * difference is subtle but can be important when an application requires the
+ * additional performance that `Buffer.allocUnsafe()` provides.
+ * @since v5.10.0
+ * @param size The desired length of the new `Buffer`.
+ */
+ allocUnsafe(size: number): Buffer;
+ /**
+ * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_INVALID_ARG_VALUE` is thrown. A zero-length `Buffer` is created
+ * if `size` is 0.
+ *
+ * The underlying memory for `Buffer` instances created in this way is _not_
+ * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
+ * such `Buffer` instances with zeroes.
+ *
+ * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+ * allocations under 4 KB are sliced from a single pre-allocated `Buffer`. This
+ * allows applications to avoid the garbage collection overhead of creating many
+ * individually allocated `Buffer` instances. This approach improves both
+ * performance and memory usage by eliminating the need to track and clean up as
+ * many individual `ArrayBuffer` objects.
+ *
+ * However, in the case where a developer may need to retain a small chunk of
+ * memory from a pool for an indeterminate amount of time, it may be appropriate
+ * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and
+ * then copying out the relevant bits.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * // Need to keep around a few small chunks of memory.
+ * const store = [];
+ *
+ * socket.on('readable', () => {
+ * let data;
+ * while (null !== (data = readable.read())) {
+ * // Allocate for retained data.
+ * const sb = Buffer.allocUnsafeSlow(10);
+ *
+ * // Copy the data into the new allocation.
+ * data.copy(sb, 0, 0, 10);
+ *
+ * store.push(sb);
+ * }
+ * });
+ * ```
+ *
+ * A `TypeError` will be thrown if `size` is not a number.
+ * @since v5.12.0
+ * @param size The desired length of the new `Buffer`.
+ */
+ allocUnsafeSlow(size: number): Buffer;
+ /**
+ * This is the size (in bytes) of pre-allocated internal `Buffer` instances used
+ * for pooling. This value may be modified.
+ * @since v0.11.3
+ */
+ poolSize: number;
+ }
+ interface Buffer extends Uint8Array {
+ /**
+ * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did
+ * not contain enough space to fit the entire string, only part of `string` will be
+ * written. However, partially encoded characters will not be written.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.alloc(256);
+ *
+ * const len = buf.write('\u00bd + \u00bc = \u00be', 0);
+ *
+ * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
+ * // Prints: 12 bytes: ½ + ¼ = ¾
+ *
+ * const buffer = Buffer.alloc(10);
+ *
+ * const length = buffer.write('abcd', 8);
+ *
+ * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`);
+ * // Prints: 2 bytes : ab
+ * ```
+ * @since v0.1.90
+ * @param string String to write to `buf`.
+ * @param [offset=0] Number of bytes to skip before starting to write `string`.
+ * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`).
+ * @param [encoding='utf8'] The character encoding of `string`.
+ * @return Number of bytes written.
+ */
+ write(string: string, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
+ /**
+ * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`.
+ *
+ * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8,
+ * then each invalid byte is replaced with the replacement character `U+FFFD`.
+ *
+ * The maximum length of a string instance (in UTF-16 code units) is available
+ * as {@link constants.MAX_STRING_LENGTH}.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.allocUnsafe(26);
+ *
+ * for (let i = 0; i < 26; i++) {
+ * // 97 is the decimal ASCII value for 'a'.
+ * buf1[i] = i + 97;
+ * }
+ *
+ * console.log(buf1.toString('utf8'));
+ * // Prints: abcdefghijklmnopqrstuvwxyz
+ * console.log(buf1.toString('utf8', 0, 5));
+ * // Prints: abcde
+ *
+ * const buf2 = Buffer.from('tést');
+ *
+ * console.log(buf2.toString('hex'));
+ * // Prints: 74c3a97374
+ * console.log(buf2.toString('utf8', 0, 3));
+ * // Prints: té
+ * console.log(buf2.toString(undefined, 0, 3));
+ * // Prints: té
+ * ```
+ * @since v0.1.90
+ * @param [encoding='utf8'] The character encoding to use.
+ * @param [start=0] The byte offset to start decoding at.
+ * @param [end=buf.length] The byte offset to stop decoding at (not inclusive).
+ */
+ toString(encoding?: BufferEncoding, start?: number, end?: number): string;
+ /**
+ * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls
+ * this function when stringifying a `Buffer` instance.
+ *
+ * `Buffer.from()` accepts objects in the format returned from this method.
+ * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]);
+ * const json = JSON.stringify(buf);
+ *
+ * console.log(json);
+ * // Prints: {"type":"Buffer","data":[1,2,3,4,5]}
+ *
+ * const copy = JSON.parse(json, (key, value) => {
+ * return value && value.type === 'Buffer' ?
+ * Buffer.from(value) :
+ * value;
+ * });
+ *
+ * console.log(copy);
+ * // Prints:
+ * ```
+ * @since v0.9.2
+ */
+ toJSON(): {
+ type: 'Buffer';
+ data: number[];
+ };
+ /**
+ * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from('ABC');
+ * const buf2 = Buffer.from('414243', 'hex');
+ * const buf3 = Buffer.from('ABCD');
+ *
+ * console.log(buf1.equals(buf2));
+ * // Prints: true
+ * console.log(buf1.equals(buf3));
+ * // Prints: false
+ * ```
+ * @since v0.11.13
+ * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+ */
+ equals(otherBuffer: Uint8Array): boolean;
+ /**
+ * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order.
+ * Comparison is based on the actual sequence of bytes in each `Buffer`.
+ *
+ * * `0` is returned if `target` is the same as `buf`
+ * * `1` is returned if `target` should come _before_`buf` when sorted.
+ * * `-1` is returned if `target` should come _after_`buf` when sorted.
+ *
+ * ```js
+ * import { Buffer } from 'buffer';
+ *
+ * const buf1 = Buffer.from('ABC');
+ * const buf2 = Buffer.from('BCD');
+ * const buf3 = Buffer.from('ABCD');
+ *
+ * console.log(buf1.compare(buf1));
+ * // Prints: 0
+ * console.log(buf1.compare(buf2));
+ * // Prints: -1
+ * console.log(buf1.compare(buf3));
+ * // Prints: -1
+ * console.log(buf2.compare(buf1));
+ * // Prints: 1
+ * console.log(buf2.compare(buf3));
+ * // Prints: 1
+ * console.log([buf1, buf2, buf3].sort(Buffer.compare));
+ * // Prints: [