mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge branch 'dev' into pr_3438
This commit is contained in:
commit
f4bb62adbc
32
CHANGELOG.md
32
CHANGELOG.md
@ -1,3 +1,35 @@
|
|||||||
|
#### 2.2.2: Maintenance Release
|
||||||
|
|
||||||
|
Nodes
|
||||||
|
|
||||||
|
- Fix "close timed out" error when performing full deploy or modifying broker node. (#3451) @Steve-Mcl
|
||||||
|
|
||||||
|
|
||||||
|
#### 2.2.1: Maintenance Release
|
||||||
|
|
||||||
|
Editor
|
||||||
|
|
||||||
|
- Handle mixed-cased filter terms in keyboard shortcut dialog (#3444) @knolleary
|
||||||
|
- Prevent duplicate links being added between nodes (#3442) @knolleary
|
||||||
|
- Fix to hide tooltip after removing subflow tab (#3391) @HiroyasuNishiyama
|
||||||
|
- Fix node validation to be applied to config node (#3397) @HiroyasuNishiyama
|
||||||
|
- Fix: Dont add wires to undo buffer twice (#3437) @Steve-Mcl
|
||||||
|
|
||||||
|
Runtime
|
||||||
|
|
||||||
|
- Improve module location parsing (of stack info) when adding hook (#3447) @Steve-Mcl
|
||||||
|
- Fix substitution of NR_NODE_PATH (#3445) @HiroyasuNishiyama
|
||||||
|
- Remove console.log when ignoring disabled module (#3439) @knolleary
|
||||||
|
- Improve "Unexpected Node Error" logging (#3446) @Steve-Mcl
|
||||||
|
|
||||||
|
Nodes
|
||||||
|
|
||||||
|
- Debug: Fix no-prototype-builtins bug in debug node and utils (#3394) @Alkarex
|
||||||
|
- Delay: Fix Japanese message of delay node (#3434)
|
||||||
|
- Allow nbRateUnits to be undefined when validating (#3443) @knolleary
|
||||||
|
- Coding help for recently added node-red Predefined Environment Variables (#3440) @Steve-Mcl
|
||||||
|
|
||||||
|
|
||||||
#### 2.2.0: Milestone Release
|
#### 2.2.0: Milestone Release
|
||||||
|
|
||||||
Editor
|
Editor
|
||||||
|
26
package.json
26
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red",
|
"name": "node-red",
|
||||||
"version": "2.2.0",
|
"version": "2.2.2",
|
||||||
"description": "Low-code programming for event-driven applications",
|
"description": "Low-code programming for event-driven applications",
|
||||||
"homepage": "http://nodered.org",
|
"homepage": "http://nodered.org",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@ -28,7 +28,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"acorn": "8.7.0",
|
"acorn": "8.7.0",
|
||||||
"acorn-walk": "8.2.0",
|
"acorn-walk": "8.2.0",
|
||||||
"ajv": "8.9.0",
|
"ajv": "8.10.0",
|
||||||
"async-mutex": "0.3.2",
|
"async-mutex": "0.3.2",
|
||||||
"basic-auth": "2.0.1",
|
"basic-auth": "2.0.1",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
@ -36,7 +36,7 @@
|
|||||||
"cheerio": "1.0.0-rc.10",
|
"cheerio": "1.0.0-rc.10",
|
||||||
"clone": "2.1.2",
|
"clone": "2.1.2",
|
||||||
"content-type": "1.0.4",
|
"content-type": "1.0.4",
|
||||||
"cookie": "0.4.1",
|
"cookie": "0.4.2",
|
||||||
"cookie-parser": "1.4.6",
|
"cookie-parser": "1.4.6",
|
||||||
"cors": "2.8.5",
|
"cors": "2.8.5",
|
||||||
"cronosjs": "1.7.1",
|
"cronosjs": "1.7.1",
|
||||||
@ -50,32 +50,32 @@
|
|||||||
"hash-sum": "2.0.0",
|
"hash-sum": "2.0.0",
|
||||||
"hpagent": "0.1.2",
|
"hpagent": "0.1.2",
|
||||||
"https-proxy-agent": "5.0.0",
|
"https-proxy-agent": "5.0.0",
|
||||||
"i18next": "21.6.10",
|
"i18next": "21.6.11",
|
||||||
"iconv-lite": "0.6.3",
|
"iconv-lite": "0.6.3",
|
||||||
"is-utf8": "0.2.1",
|
"is-utf8": "0.2.1",
|
||||||
"js-yaml": "3.14.1",
|
"js-yaml": "3.14.1",
|
||||||
"json-stringify-safe": "5.0.1",
|
"json-stringify-safe": "5.0.1",
|
||||||
"jsonata": "1.8.5",
|
"jsonata": "1.8.6",
|
||||||
"lodash.clonedeep": "^4.5.0",
|
"lodash.clonedeep": "^4.5.0",
|
||||||
"media-typer": "1.1.0",
|
"media-typer": "1.1.0",
|
||||||
"memorystore": "1.6.6",
|
"memorystore": "1.6.7",
|
||||||
"mime": "3.0.0",
|
"mime": "3.0.0",
|
||||||
"moment-timezone": "0.5.34",
|
"moment-timezone": "0.5.34",
|
||||||
"mqtt": "4.3.4",
|
"mqtt": "4.3.5",
|
||||||
"multer": "1.4.4",
|
"multer": "1.4.4",
|
||||||
"mustache": "4.2.0",
|
"mustache": "4.2.0",
|
||||||
"node-red-admin": "^2.2.2",
|
"node-red-admin": "^2.2.3",
|
||||||
"nopt": "5.0.0",
|
"nopt": "5.0.0",
|
||||||
"oauth2orize": "1.11.1",
|
"oauth2orize": "1.11.1",
|
||||||
"on-headers": "1.0.2",
|
"on-headers": "1.0.2",
|
||||||
"passport": "0.5.2",
|
"passport": "0.5.2",
|
||||||
"passport-http-bearer": "1.0.1",
|
"passport-http-bearer": "1.0.1",
|
||||||
"passport-oauth2-client-password": "0.1.2",
|
"passport-oauth2-client-password": "0.1.2",
|
||||||
"raw-body": "2.4.2",
|
"raw-body": "2.4.3",
|
||||||
"semver": "7.3.5",
|
"semver": "7.3.5",
|
||||||
"tar": "6.1.11",
|
"tar": "6.1.11",
|
||||||
"tough-cookie": "4.0.0",
|
"tough-cookie": "4.0.0",
|
||||||
"uglify-js": "3.15.0",
|
"uglify-js": "3.15.1",
|
||||||
"uuid": "8.3.2",
|
"uuid": "8.3.2",
|
||||||
"ws": "7.5.6",
|
"ws": "7.5.6",
|
||||||
"xml2js": "0.4.23"
|
"xml2js": "0.4.23"
|
||||||
@ -84,7 +84,7 @@
|
|||||||
"bcrypt": "5.0.1"
|
"bcrypt": "5.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"dompurify": "2.3.4",
|
"dompurify": "2.3.5",
|
||||||
"grunt": "1.4.1",
|
"grunt": "1.4.1",
|
||||||
"grunt-chmod": "~1.1.1",
|
"grunt-chmod": "~1.1.1",
|
||||||
"grunt-cli": "~1.4.3",
|
"grunt-cli": "~1.4.3",
|
||||||
@ -113,11 +113,11 @@
|
|||||||
"node-red-node-test-helper": "^0.2.7",
|
"node-red-node-test-helper": "^0.2.7",
|
||||||
"nodemon": "2.0.15",
|
"nodemon": "2.0.15",
|
||||||
"proxy": "^1.0.2",
|
"proxy": "^1.0.2",
|
||||||
"sass": "1.49.0",
|
"sass": "1.49.7",
|
||||||
"should": "13.2.3",
|
"should": "13.2.3",
|
||||||
"sinon": "11.1.2",
|
"sinon": "11.1.2",
|
||||||
"stoppable": "^1.1.0",
|
"stoppable": "^1.1.0",
|
||||||
"supertest": "6.2.1"
|
"supertest": "6.2.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
|
@ -106,9 +106,15 @@ async function login(req,res) {
|
|||||||
urlPrefix += "/";
|
urlPrefix += "/";
|
||||||
}
|
}
|
||||||
response = {
|
response = {
|
||||||
"type":"strategy",
|
"type":"strategy"
|
||||||
"prompts":[{type:"button",label:mergedAdminAuth.strategy.label, url: urlPrefix + "auth/strategy"}]
|
|
||||||
}
|
}
|
||||||
|
if (mergedAdminAuth.strategy.autoLogin) {
|
||||||
|
response.autoLogin = true
|
||||||
|
response.loginRedirect = urlPrefix + "auth/strategy"
|
||||||
|
}
|
||||||
|
response.prompts = [
|
||||||
|
{type:"button",label:mergedAdminAuth.strategy.label, url: urlPrefix + "auth/strategy"}
|
||||||
|
]
|
||||||
if (mergedAdminAuth.strategy.icon) {
|
if (mergedAdminAuth.strategy.icon) {
|
||||||
response.prompts[0].icon = mergedAdminAuth.strategy.icon;
|
response.prompts[0].icon = mergedAdminAuth.strategy.icon;
|
||||||
}
|
}
|
||||||
@ -185,7 +191,7 @@ function genericStrategy(adminApp,strategy) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
options.verify.apply(null,args);
|
options.verify.apply(this,args);
|
||||||
} else {
|
} else {
|
||||||
var profile = arguments[arguments.length - 2];
|
var profile = arguments[arguments.length - 2];
|
||||||
return completeVerify(profile,originalDone);
|
return completeVerify(profile,originalDone);
|
||||||
|
@ -92,10 +92,16 @@ var passwordTokenExchange = function(client, username, password, scope, done) {
|
|||||||
loginAttempts = loginAttempts.filter(function(logEntry) {
|
loginAttempts = loginAttempts.filter(function(logEntry) {
|
||||||
return logEntry.user !== username;
|
return logEntry.user !== username;
|
||||||
});
|
});
|
||||||
|
// Check if the user contains a user defined token and use it
|
||||||
|
// instead of generating a new token
|
||||||
|
if(user.token){
|
||||||
|
done(null,user.token,null,null);
|
||||||
|
} else {
|
||||||
Tokens.create(username,client.id,scope).then(function(tokens) {
|
Tokens.create(username,client.id,scope).then(function(tokens) {
|
||||||
log.audit({event: "auth.login",user,username:username,client:client.id,scope:scope});
|
log.audit({event: "auth.login",user,username:username,client:client.id,scope:scope});
|
||||||
done(null,tokens.accessToken,null,{expires_in:tokens.expires_in});
|
done(null,tokens.accessToken,null,{expires_in:tokens.expires_in});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log.audit({event: "auth.login.fail.permissions",username:username,client:client.id,scope:scope});
|
log.audit({event: "auth.login.fail.permissions",username:username,client:client.id,scope:scope});
|
||||||
done(null,false);
|
done(null,false);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@node-red/editor-api",
|
"name": "@node-red/editor-api",
|
||||||
"version": "2.2.0",
|
"version": "2.2.2",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
@ -16,15 +16,15 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@node-red/util": "2.2.0",
|
"@node-red/util": "2.2.2",
|
||||||
"@node-red/editor-client": "2.2.0",
|
"@node-red/editor-client": "2.2.2",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
"body-parser": "1.19.1",
|
"body-parser": "1.19.1",
|
||||||
"clone": "2.1.2",
|
"clone": "2.1.2",
|
||||||
"cors": "2.8.5",
|
"cors": "2.8.5",
|
||||||
"express-session": "1.17.2",
|
"express-session": "1.17.2",
|
||||||
"express": "4.17.2",
|
"express": "4.17.2",
|
||||||
"memorystore": "1.6.6",
|
"memorystore": "1.6.7",
|
||||||
"mime": "3.0.0",
|
"mime": "3.0.0",
|
||||||
"multer": "1.4.4",
|
"multer": "1.4.4",
|
||||||
"mustache": "4.2.0",
|
"mustache": "4.2.0",
|
||||||
|
@ -634,14 +634,7 @@
|
|||||||
"empty": "leer",
|
"empty": "leer",
|
||||||
"globalConfig": "Globale Konfigurations-Nodes",
|
"globalConfig": "Globale Konfigurations-Nodes",
|
||||||
"triggerAction": "Auslösen",
|
"triggerAction": "Auslösen",
|
||||||
"find": "Suche im Arbeitsbereich",
|
"find": "Suche im Arbeitsbereich"
|
||||||
"search": {
|
|
||||||
"configNodes": "Konfigurations-Nodes",
|
|
||||||
"unusedConfigNodes": "Unbenutzte Konfigurations-Nodes",
|
|
||||||
"invalidNodes": "Ungültige Nodes",
|
|
||||||
"uknownNodes": "Unbekannte Nodes",
|
|
||||||
"unusedSubflows": "Unbenutzte Subflows"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"name": "Hilfe",
|
"name": "Hilfe",
|
||||||
@ -863,7 +856,14 @@
|
|||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"empty": "Keine Übereinstimmungen gefunden",
|
"empty": "Keine Übereinstimmungen gefunden",
|
||||||
"addNode": "Node hinzufügen ..."
|
"addNode": "Node hinzufügen ...",
|
||||||
|
"options": {
|
||||||
|
"configNodes": "Konfigurations-Nodes",
|
||||||
|
"unusedConfigNodes": "Unbenutzte Konfigurations-Nodes",
|
||||||
|
"invalidNodes": "Ungültige Nodes",
|
||||||
|
"uknownNodes": "Unbekannte Nodes",
|
||||||
|
"unusedSubflows": "Unbenutzte Subflows"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"expressionEditor": {
|
"expressionEditor": {
|
||||||
"functions": "Funktionen",
|
"functions": "Funktionen",
|
||||||
|
@ -149,7 +149,11 @@
|
|||||||
"toggle-navigator": "Toggle navigator",
|
"toggle-navigator": "Toggle navigator",
|
||||||
"zoom-out": "Zoom out",
|
"zoom-out": "Zoom out",
|
||||||
"zoom-reset": "Reset zoom",
|
"zoom-reset": "Reset zoom",
|
||||||
"zoom-in": "Zoom in"
|
"zoom-in": "Zoom in",
|
||||||
|
"search-flows": "Search flows",
|
||||||
|
"search-prev": "Previous",
|
||||||
|
"search-next": "Next",
|
||||||
|
"search-counter": "\"__term__\" __result__ of __count__"
|
||||||
},
|
},
|
||||||
"user": {
|
"user": {
|
||||||
"loggedInAs": "Logged in as __name__",
|
"loggedInAs": "Logged in as __name__",
|
||||||
@ -497,7 +501,8 @@
|
|||||||
"redoChange": "Redo",
|
"redoChange": "Redo",
|
||||||
"searchBox": "Open search box",
|
"searchBox": "Open search box",
|
||||||
"managePalette": "Manage palette",
|
"managePalette": "Manage palette",
|
||||||
"actionList":"Action list"
|
"actionList": "Action list",
|
||||||
|
"splitWireWithLinks": "Split selection with Link nodes"
|
||||||
},
|
},
|
||||||
"library": {
|
"library": {
|
||||||
"library": "Library",
|
"library": "Library",
|
||||||
@ -667,15 +672,7 @@
|
|||||||
"empty": "empty",
|
"empty": "empty",
|
||||||
"globalConfig": "Global Configuration Nodes",
|
"globalConfig": "Global Configuration Nodes",
|
||||||
"triggerAction": "Trigger action",
|
"triggerAction": "Trigger action",
|
||||||
"find": "Find in workspace",
|
"find": "Find in workspace"
|
||||||
"search": {
|
|
||||||
"configNodes": "Configuration nodes",
|
|
||||||
"unusedConfigNodes": "Unused configuration nodes",
|
|
||||||
"invalidNodes": "Invalid nodes",
|
|
||||||
"uknownNodes": "Unknown nodes",
|
|
||||||
"unusedSubflows": "Unused subflows",
|
|
||||||
"hiddenFlows": "Hidden flows"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"name": "Help",
|
"name": "Help",
|
||||||
@ -899,7 +896,16 @@
|
|||||||
"history": "Search history",
|
"history": "Search history",
|
||||||
"clear": "clear all",
|
"clear": "clear all",
|
||||||
"empty": "No matches found",
|
"empty": "No matches found",
|
||||||
"addNode": "add a node..."
|
"addNode": "add a node...",
|
||||||
|
"options": {
|
||||||
|
"configNodes": "Configuration nodes",
|
||||||
|
"unusedConfigNodes": "Unused configuration nodes",
|
||||||
|
"invalidNodes": "Invalid nodes",
|
||||||
|
"uknownNodes": "Unknown nodes",
|
||||||
|
"unusedSubflows": "Unused subflows",
|
||||||
|
"hiddenFlows": "Hidden flows",
|
||||||
|
"modifiedNodes": "Modified nodes and flows"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"expressionEditor": {
|
"expressionEditor": {
|
||||||
"functions": "Functions",
|
"functions": "Functions",
|
||||||
|
@ -149,7 +149,11 @@
|
|||||||
"toggle-navigator": "ナビゲータの表示/非表示を切替",
|
"toggle-navigator": "ナビゲータの表示/非表示を切替",
|
||||||
"zoom-out": "縮小",
|
"zoom-out": "縮小",
|
||||||
"zoom-reset": "拡大/縮小を初期化",
|
"zoom-reset": "拡大/縮小を初期化",
|
||||||
"zoom-in": "拡大"
|
"zoom-in": "拡大",
|
||||||
|
"search-flows": "フローを検索",
|
||||||
|
"search-prev": "前へ",
|
||||||
|
"search-next": "次へ",
|
||||||
|
"search-counter": "\"__term__\" __count__ 件中の __result__ 件目"
|
||||||
},
|
},
|
||||||
"user": {
|
"user": {
|
||||||
"loggedInAs": "__name__ としてログインしました",
|
"loggedInAs": "__name__ としてログインしました",
|
||||||
@ -497,7 +501,8 @@
|
|||||||
"redoChange": "変更操作をやり直し",
|
"redoChange": "変更操作をやり直し",
|
||||||
"searchBox": "ノードを検索",
|
"searchBox": "ノードを検索",
|
||||||
"managePalette": "パレットの管理",
|
"managePalette": "パレットの管理",
|
||||||
"actionList": "動作一覧"
|
"actionList": "動作一覧",
|
||||||
|
"splitWireWithLinks": "選択したワイヤーをlinkノードで分離"
|
||||||
},
|
},
|
||||||
"library": {
|
"library": {
|
||||||
"library": "ライブラリ",
|
"library": "ライブラリ",
|
||||||
@ -667,15 +672,7 @@
|
|||||||
"empty": "空",
|
"empty": "空",
|
||||||
"globalConfig": "グローバル設定ノード",
|
"globalConfig": "グローバル設定ノード",
|
||||||
"triggerAction": "アクションを実行",
|
"triggerAction": "アクションを実行",
|
||||||
"find": "ワークスペース内を検索",
|
"find": "ワークスペース内を検索"
|
||||||
"search": {
|
|
||||||
"configNodes": "設定ノード",
|
|
||||||
"unusedConfigNodes": "未使用の設定ノード",
|
|
||||||
"invalidNodes": "不正なノード",
|
|
||||||
"uknownNodes": "未知のノード",
|
|
||||||
"unusedSubflows": "未使用のサブフロー",
|
|
||||||
"hiddenFlows": "非表示のフロー"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"name": "ヘルプ",
|
"name": "ヘルプ",
|
||||||
@ -899,7 +896,16 @@
|
|||||||
"history": "検索履歴",
|
"history": "検索履歴",
|
||||||
"clear": "全て削除",
|
"clear": "全て削除",
|
||||||
"empty": "一致したものが見つかりませんでした",
|
"empty": "一致したものが見つかりませんでした",
|
||||||
"addNode": "ノードを追加..."
|
"addNode": "ノードを追加...",
|
||||||
|
"options": {
|
||||||
|
"configNodes": "設定ノード",
|
||||||
|
"unusedConfigNodes": "未使用の設定ノード",
|
||||||
|
"invalidNodes": "不正なノード",
|
||||||
|
"uknownNodes": "未知のノード",
|
||||||
|
"unusedSubflows": "未使用のサブフロー",
|
||||||
|
"hiddenFlows": "非表示のフロー",
|
||||||
|
"modifiedNodes": "修正したノードやフロー"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"expressionEditor": {
|
"expressionEditor": {
|
||||||
"functions": "関数",
|
"functions": "関数",
|
||||||
@ -1174,6 +1180,7 @@
|
|||||||
"hide-all-flows": "全てのフローを非表示",
|
"hide-all-flows": "全てのフローを非表示",
|
||||||
"show-all-flows": "全てのフローを表示",
|
"show-all-flows": "全てのフローを表示",
|
||||||
"show-last-hidden-flow": "最後に非表示にしたフローを表示",
|
"show-last-hidden-flow": "最後に非表示にしたフローを表示",
|
||||||
|
"list-modified-nodes": "修正したフローを表示",
|
||||||
"list-hidden-flows": "非表示フローを表示",
|
"list-hidden-flows": "非表示フローを表示",
|
||||||
"list-flows": "フロー一覧",
|
"list-flows": "フロー一覧",
|
||||||
"list-subflows": "サブフロー一覧",
|
"list-subflows": "サブフロー一覧",
|
||||||
@ -1240,6 +1247,8 @@
|
|||||||
"distribute-selection-vertically": "選択を上下に整列",
|
"distribute-selection-vertically": "選択を上下に整列",
|
||||||
"wire-series-of-nodes": "ノードを一続きに接続",
|
"wire-series-of-nodes": "ノードを一続きに接続",
|
||||||
"wire-node-to-multiple": "ノードを複数に接続",
|
"wire-node-to-multiple": "ノードを複数に接続",
|
||||||
|
"split-wire-with-link-nodes": "ワイヤーをlinkノードで分割",
|
||||||
|
"generate-node-names": "ノード名を生成",
|
||||||
"show-user-settings": "ユーザ設定を表示",
|
"show-user-settings": "ユーザ設定を表示",
|
||||||
"show-help": "ヘルプを表示",
|
"show-help": "ヘルプを表示",
|
||||||
"toggle-palette": "パレットの表示切替",
|
"toggle-palette": "パレットの表示切替",
|
||||||
@ -1266,6 +1275,8 @@
|
|||||||
"show-library-import-dialog": "ライブラリ読み込みダイアログを表示",
|
"show-library-import-dialog": "ライブラリ読み込みダイアログを表示",
|
||||||
"show-examples-import-dialog": "サンプル読み込みダイアログを表示",
|
"show-examples-import-dialog": "サンプル読み込みダイアログを表示",
|
||||||
"search": "検索",
|
"search": "検索",
|
||||||
|
"search-previous": "前を検索",
|
||||||
|
"search-next": "次を検索",
|
||||||
"show-action-list": "アクション一覧を表示",
|
"show-action-list": "アクション一覧を表示",
|
||||||
"confirm-edit-tray": "編集を完了",
|
"confirm-edit-tray": "編集を完了",
|
||||||
"cancel-edit-tray": "編集をキャンセル",
|
"cancel-edit-tray": "編集をキャンセル",
|
||||||
@ -1276,8 +1287,8 @@
|
|||||||
"set-deploy-type-to-modified-flows": "デプロイを「変更したフロー」に設定",
|
"set-deploy-type-to-modified-flows": "デプロイを「変更したフロー」に設定",
|
||||||
"set-deploy-type-to-modified-nodes": "デプロイを「変更したノード」に設定",
|
"set-deploy-type-to-modified-nodes": "デプロイを「変更したノード」に設定",
|
||||||
"show-debug-tab": "デバッグタブを表示",
|
"show-debug-tab": "デバッグタブを表示",
|
||||||
"clear-debug-messages": "デバッグメッセージをクリア",
|
"clear-debug-messages": "デバッグメッセージを削除",
|
||||||
"clear-filtered-debug-messages": "フィルタしたデバッグメッセージをクリア",
|
"clear-filtered-debug-messages": "フィルタしたデバッグメッセージを削除",
|
||||||
"activate-selected-debug-nodes": "選択したデバッグノードを有効化",
|
"activate-selected-debug-nodes": "選択したデバッグノードを有効化",
|
||||||
"activate-all-debug-nodes": "全てのデバッグノードを有効化",
|
"activate-all-debug-nodes": "全てのデバッグノードを有効化",
|
||||||
"activate-all-flow-debug-nodes": "フロー内の全デバッグノードを有効化",
|
"activate-all-flow-debug-nodes": "フロー内の全デバッグノードを有効化",
|
||||||
|
@ -650,14 +650,7 @@
|
|||||||
"empty": "пусто",
|
"empty": "пусто",
|
||||||
"globalConfig": "Глобальные конфиг узлы",
|
"globalConfig": "Глобальные конфиг узлы",
|
||||||
"triggerAction": "Вызвать действие",
|
"triggerAction": "Вызвать действие",
|
||||||
"find": "Найти в рабочей области",
|
"find": "Найти в рабочей области"
|
||||||
"search": {
|
|
||||||
"configNodes": "Узлы конфигурации",
|
|
||||||
"unusedConfigNodes": "Неиспользуемые узлы конфигурации",
|
|
||||||
"invalidNodes": "Недействительные узлы",
|
|
||||||
"uknownNodes": "Неизвестные узлы",
|
|
||||||
"unusedSubflows": "Неиспользуемые подпотоки"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"name": "Справка",
|
"name": "Справка",
|
||||||
@ -888,7 +881,14 @@
|
|||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"empty": "Ничего не найдено",
|
"empty": "Ничего не найдено",
|
||||||
"addNode": "добавить узел..."
|
"addNode": "добавить узел...",
|
||||||
|
"options": {
|
||||||
|
"configNodes": "Узлы конфигурации",
|
||||||
|
"unusedConfigNodes": "Неиспользуемые узлы конфигурации",
|
||||||
|
"invalidNodes": "Недействительные узлы",
|
||||||
|
"uknownNodes": "Неизвестные узлы",
|
||||||
|
"unusedSubflows": "Неиспользуемые подпотоки"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"expressionEditor": {
|
"expressionEditor": {
|
||||||
"functions": "Функции",
|
"functions": "Функции",
|
||||||
|
@ -614,14 +614,7 @@
|
|||||||
"empty": "空的",
|
"empty": "空的",
|
||||||
"globalConfig": "全局配置节点",
|
"globalConfig": "全局配置节点",
|
||||||
"triggerAction": "触发动作",
|
"triggerAction": "触发动作",
|
||||||
"find": "在工作区中查找",
|
"find": "在工作区中查找"
|
||||||
"search": {
|
|
||||||
"configNodes": "配置节点",
|
|
||||||
"unusedConfigNodes": "未使用的配置节点",
|
|
||||||
"invalidNodes": "无效的节点",
|
|
||||||
"uknownNodes": "未知的节点",
|
|
||||||
"unusedSubflows": "未使用的子流程"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"name": "帮助",
|
"name": "帮助",
|
||||||
@ -842,7 +835,14 @@
|
|||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"empty": "找不到匹配",
|
"empty": "找不到匹配",
|
||||||
"addNode": "添加一个节点..."
|
"addNode": "添加一个节点...",
|
||||||
|
"options": {
|
||||||
|
"configNodes": "配置节点",
|
||||||
|
"unusedConfigNodes": "未使用的配置节点",
|
||||||
|
"invalidNodes": "无效的节点",
|
||||||
|
"uknownNodes": "未知的节点",
|
||||||
|
"unusedSubflows": "未使用的子流程"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"expressionEditor": {
|
"expressionEditor": {
|
||||||
"functions": "功能",
|
"functions": "功能",
|
||||||
|
@ -614,14 +614,7 @@
|
|||||||
"empty": "空的",
|
"empty": "空的",
|
||||||
"globalConfig": "全局配置節點",
|
"globalConfig": "全局配置節點",
|
||||||
"triggerAction": "觸發動作",
|
"triggerAction": "觸發動作",
|
||||||
"find": "在工作區中查找",
|
"find": "在工作區中查找"
|
||||||
"search": {
|
|
||||||
"configNodes": "配置節點",
|
|
||||||
"unusedConfigNodes": "未使用的配置節點",
|
|
||||||
"invalidNodes": "無效的節點",
|
|
||||||
"uknownNodes": "未知的節點",
|
|
||||||
"unusedSubflows": "未使用的子流程"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"name": "幫助",
|
"name": "幫助",
|
||||||
@ -842,7 +835,14 @@
|
|||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"empty": "找不到匹配",
|
"empty": "找不到匹配",
|
||||||
"addNode": "添加一個節點..."
|
"addNode": "添加一個節點...",
|
||||||
|
"options": {
|
||||||
|
"configNodes": "配置節點",
|
||||||
|
"unusedConfigNodes": "未使用的配置節點",
|
||||||
|
"invalidNodes": "無效的節點",
|
||||||
|
"uknownNodes": "未知的節點",
|
||||||
|
"unusedSubflows": "未使用的子流程"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"expressionEditor": {
|
"expressionEditor": {
|
||||||
"functions": "功能",
|
"functions": "功能",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@node-red/editor-client",
|
"name": "@node-red/editor-client",
|
||||||
"version": "2.2.0",
|
"version": "2.2.2",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -13,6 +13,11 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An API for undo / redo history buffer
|
||||||
|
* @namespace RED.history
|
||||||
|
*/
|
||||||
RED.history = (function() {
|
RED.history = (function() {
|
||||||
var undoHistory = [];
|
var undoHistory = [];
|
||||||
var redoHistory = [];
|
var redoHistory = [];
|
||||||
@ -101,6 +106,23 @@ RED.history = (function() {
|
|||||||
RED.nodes.removeLink(ev.links[i]);
|
RED.nodes.removeLink(ev.links[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (ev.junctions) {
|
||||||
|
inverseEv.junctions = [];
|
||||||
|
for (i=0;i<ev.junctions.length;i++) {
|
||||||
|
inverseEv.junctions.push(ev.junctions[i]);
|
||||||
|
RED.nodes.removeJunction(ev.junctions[i]);
|
||||||
|
if (ev.junctions[i].g) {
|
||||||
|
var group = RED.nodes.group(ev.junctions[i].g);
|
||||||
|
var index = group.nodes.indexOf(ev.junctions[i]);
|
||||||
|
if (index !== -1) {
|
||||||
|
group.nodes.splice(index,1);
|
||||||
|
RED.group.markDirty(group);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
if (ev.groups) {
|
if (ev.groups) {
|
||||||
inverseEv.groups = [];
|
inverseEv.groups = [];
|
||||||
for (i = ev.groups.length - 1;i>=0;i--) {
|
for (i = ev.groups.length - 1;i>=0;i--) {
|
||||||
@ -267,6 +289,21 @@ RED.history = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (ev.junctions) {
|
||||||
|
inverseEv.junctions = [];
|
||||||
|
for (i=0;i<ev.junctions.length;i++) {
|
||||||
|
inverseEv.junctions.push(ev.junctions[i]);
|
||||||
|
RED.nodes.addJunction(ev.junctions[i]);
|
||||||
|
if (ev.junctions[i].g) {
|
||||||
|
group = RED.nodes.group(ev.junctions[i].g);
|
||||||
|
if (group.nodes.indexOf(ev.junctions[i]) === -1) {
|
||||||
|
group.nodes.push(ev.junctions[i]);
|
||||||
|
}
|
||||||
|
RED.group.markDirty(group)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
if (ev.links) {
|
if (ev.links) {
|
||||||
inverseEv.links = [];
|
inverseEv.links = [];
|
||||||
for (i=0;i<ev.links.length;i++) {
|
for (i=0;i<ev.links.length;i++) {
|
||||||
|
@ -90,6 +90,10 @@
|
|||||||
"alt-a m": "core:align-selection-to-middle",
|
"alt-a m": "core:align-selection-to-middle",
|
||||||
"alt-a c": "core:align-selection-to-center",
|
"alt-a c": "core:align-selection-to-center",
|
||||||
"alt-a h": "core:distribute-selection-horizontally",
|
"alt-a h": "core:distribute-selection-horizontally",
|
||||||
"alt-a v": "core:distribute-selection-vertically"
|
"alt-a v": "core:distribute-selection-vertically",
|
||||||
|
"shift-f": "core:search-previous",
|
||||||
|
"f": "core:search-next",
|
||||||
|
"alt-l l": "core:split-wire-with-link-nodes"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,11 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An Interface to nodes and utility functions for creating/adding/deleting nodes and links
|
||||||
|
* @namespace RED.nodes
|
||||||
|
*/
|
||||||
RED.nodes = (function() {
|
RED.nodes = (function() {
|
||||||
|
|
||||||
var PORT_TYPE_INPUT = 1;
|
var PORT_TYPE_INPUT = 1;
|
||||||
@ -33,6 +38,9 @@ RED.nodes = (function() {
|
|||||||
var groups = {};
|
var groups = {};
|
||||||
var groupsByZ = {};
|
var groupsByZ = {};
|
||||||
|
|
||||||
|
var junctions = {};
|
||||||
|
var junctionsByZ = {};
|
||||||
|
|
||||||
var initialLoad;
|
var initialLoad;
|
||||||
|
|
||||||
var dirty = false;
|
var dirty = false;
|
||||||
@ -600,6 +608,14 @@ RED.nodes = (function() {
|
|||||||
RED.events.emit('nodes:add',n);
|
RED.events.emit('nodes:add',n);
|
||||||
}
|
}
|
||||||
function addLink(l) {
|
function addLink(l) {
|
||||||
|
if (nodeLinks[l.source.id]) {
|
||||||
|
const isUnique = nodeLinks[l.source.id].out.every(function(link) {
|
||||||
|
return link.sourcePort !== l.sourcePort || link.target.id !== l.target.id
|
||||||
|
})
|
||||||
|
if (!isUnique) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
links.push(l);
|
links.push(l);
|
||||||
if (l.source) {
|
if (l.source) {
|
||||||
// Possible the node hasn't been added yet
|
// Possible the node hasn't been added yet
|
||||||
@ -806,6 +822,7 @@ RED.nodes = (function() {
|
|||||||
var removedNodes = [];
|
var removedNodes = [];
|
||||||
var removedLinks = [];
|
var removedLinks = [];
|
||||||
var removedGroups = [];
|
var removedGroups = [];
|
||||||
|
var removedJunctions = [];
|
||||||
if (ws) {
|
if (ws) {
|
||||||
delete workspaces[id];
|
delete workspaces[id];
|
||||||
delete linkTabMap[id];
|
delete linkTabMap[id];
|
||||||
@ -814,7 +831,14 @@ RED.nodes = (function() {
|
|||||||
var node;
|
var node;
|
||||||
|
|
||||||
if (allNodes.hasTab(id)) {
|
if (allNodes.hasTab(id)) {
|
||||||
removedNodes = allNodes.getNodes(id).slice()
|
removedNodes = allNodes.getNodes(id).filter(n => {
|
||||||
|
if (n.type === 'junction') {
|
||||||
|
removedJunctions.push(n)
|
||||||
|
return false
|
||||||
|
} else {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
for (i in configNodes) {
|
for (i in configNodes) {
|
||||||
if (configNodes.hasOwnProperty(i)) {
|
if (configNodes.hasOwnProperty(i)) {
|
||||||
@ -829,6 +853,10 @@ RED.nodes = (function() {
|
|||||||
var result = removeNode(removedNodes[i].id);
|
var result = removeNode(removedNodes[i].id);
|
||||||
removedLinks = removedLinks.concat(result.links);
|
removedLinks = removedLinks.concat(result.links);
|
||||||
}
|
}
|
||||||
|
for (i=0;i<removedJunctions.length;i++) {
|
||||||
|
var result = removeJunction(removedJunctions[i])
|
||||||
|
removedLinks = removedLinks.concat(result.links)
|
||||||
|
}
|
||||||
|
|
||||||
// Must get 'removedGroups' in the right order.
|
// Must get 'removedGroups' in the right order.
|
||||||
// - start with the top-most groups
|
// - start with the top-most groups
|
||||||
@ -848,7 +876,7 @@ RED.nodes = (function() {
|
|||||||
allNodes.removeTab(id);
|
allNodes.removeTab(id);
|
||||||
RED.events.emit('flows:remove',ws);
|
RED.events.emit('flows:remove',ws);
|
||||||
}
|
}
|
||||||
return {nodes:removedNodes,links:removedLinks, groups: removedGroups};
|
return {nodes:removedNodes,links:removedLinks, groups: removedGroups, junctions: removedJunctions};
|
||||||
}
|
}
|
||||||
|
|
||||||
function addSubflow(sf, createNewIds) {
|
function addSubflow(sf, createNewIds) {
|
||||||
@ -1105,7 +1133,7 @@ RED.nodes = (function() {
|
|||||||
delete node.env;
|
delete node.env;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (n._def.category != "config") {
|
if (n._def.category != "config" || n.type === 'junction') {
|
||||||
node.x = n.x;
|
node.x = n.x;
|
||||||
node.y = n.y;
|
node.y = n.y;
|
||||||
if (exportDimensions) {
|
if (exportDimensions) {
|
||||||
@ -1368,6 +1396,11 @@ RED.nodes = (function() {
|
|||||||
nns.push(convertNode(groups[i], opts));
|
nns.push(convertNode(groups[i], opts));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (i in junctions) {
|
||||||
|
if (junctions.hasOwnProperty(i)) {
|
||||||
|
nns.push(convertNode(junctions[i], opts));
|
||||||
|
}
|
||||||
|
}
|
||||||
for (i in configNodes) {
|
for (i in configNodes) {
|
||||||
if (configNodes.hasOwnProperty(i)) {
|
if (configNodes.hasOwnProperty(i)) {
|
||||||
nns.push(convertNode(configNodes[i], opts));
|
nns.push(convertNode(configNodes[i], opts));
|
||||||
@ -1449,6 +1482,7 @@ RED.nodes = (function() {
|
|||||||
tabs: {},
|
tabs: {},
|
||||||
subflows: {},
|
subflows: {},
|
||||||
groups: {},
|
groups: {},
|
||||||
|
junctions: {},
|
||||||
configs: {},
|
configs: {},
|
||||||
nodes: {},
|
nodes: {},
|
||||||
all: [],
|
all: [],
|
||||||
@ -1464,6 +1498,8 @@ RED.nodes = (function() {
|
|||||||
imported.subflows[n.id] = n;
|
imported.subflows[n.id] = n;
|
||||||
} else if (n.type === "group") {
|
} else if (n.type === "group") {
|
||||||
imported.groups[n.id] = n;
|
imported.groups[n.id] = n;
|
||||||
|
} else if (n.type === "junction") {
|
||||||
|
imported.junctions[n.id] = n;
|
||||||
} else if (n.hasOwnProperty("x") && n.hasOwnProperty("y")) {
|
} else if (n.hasOwnProperty("x") && n.hasOwnProperty("y")) {
|
||||||
imported.nodes[n.id] = n;
|
imported.nodes[n.id] = n;
|
||||||
} else {
|
} else {
|
||||||
@ -1472,7 +1508,7 @@ RED.nodes = (function() {
|
|||||||
var nodeZ = n.z || "__global__";
|
var nodeZ = n.z || "__global__";
|
||||||
imported.zMap[nodeZ] = imported.zMap[nodeZ] || [];
|
imported.zMap[nodeZ] = imported.zMap[nodeZ] || [];
|
||||||
imported.zMap[nodeZ].push(n)
|
imported.zMap[nodeZ].push(n)
|
||||||
if (allNodes.hasNode(n.id) || configNodes[n.id] || workspaces[n.id] || subflows[n.id] || groups[n.id]) {
|
if (allNodes.hasNode(n.id) || configNodes[n.id] || workspaces[n.id] || subflows[n.id] || groups[n.id] || junctions[n.id]) {
|
||||||
imported.conflicted[n.id] = n;
|
imported.conflicted[n.id] = n;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -1638,7 +1674,7 @@ RED.nodes = (function() {
|
|||||||
if (!options.generateIds) {
|
if (!options.generateIds) {
|
||||||
if (!options.importMap[id]) {
|
if (!options.importMap[id]) {
|
||||||
// No conflict resolution for this node
|
// No conflict resolution for this node
|
||||||
var existing = allNodes.getNode(id) || configNodes[id] || workspaces[id] || subflows[id] || groups[id];
|
var existing = allNodes.getNode(id) || configNodes[id] || workspaces[id] || subflows[id] || groups[id] || junctions[id];
|
||||||
if (existing) {
|
if (existing) {
|
||||||
existingNodes.push({existing:existing, imported:n});
|
existingNodes.push({existing:existing, imported:n});
|
||||||
}
|
}
|
||||||
@ -1692,6 +1728,7 @@ RED.nodes = (function() {
|
|||||||
n.type != "tab" &&
|
n.type != "tab" &&
|
||||||
n.type != "subflow" &&
|
n.type != "subflow" &&
|
||||||
n.type != "group" &&
|
n.type != "group" &&
|
||||||
|
n.type != 'junction' &&
|
||||||
!registry.getNodeType(n.type) &&
|
!registry.getNodeType(n.type) &&
|
||||||
n.type.substring(0,8) != "subflow:" &&
|
n.type.substring(0,8) != "subflow:" &&
|
||||||
unknownTypes.indexOf(n.type)==-1) {
|
unknownTypes.indexOf(n.type)==-1) {
|
||||||
@ -1764,6 +1801,7 @@ RED.nodes = (function() {
|
|||||||
var new_nodes = [];
|
var new_nodes = [];
|
||||||
var new_links = [];
|
var new_links = [];
|
||||||
var new_groups = [];
|
var new_groups = [];
|
||||||
|
var new_junctions = [];
|
||||||
var new_group_set = new Set();
|
var new_group_set = new Set();
|
||||||
var nid;
|
var nid;
|
||||||
var def;
|
var def;
|
||||||
@ -1955,12 +1993,15 @@ RED.nodes = (function() {
|
|||||||
changed:false,
|
changed:false,
|
||||||
_config:{}
|
_config:{}
|
||||||
}
|
}
|
||||||
if (n.type !== "group") {
|
if (n.type !== "group" && n.type !== 'junction') {
|
||||||
node.wires = n.wires||[];
|
node.wires = n.wires||[];
|
||||||
node.inputLabels = n.inputLabels;
|
node.inputLabels = n.inputLabels;
|
||||||
node.outputLabels = n.outputLabels;
|
node.outputLabels = n.outputLabels;
|
||||||
node.icon = n.icon;
|
node.icon = n.icon;
|
||||||
}
|
}
|
||||||
|
if (n.type === 'junction') {
|
||||||
|
node.wires = n.wires||[];
|
||||||
|
}
|
||||||
if (n.hasOwnProperty('l')) {
|
if (n.hasOwnProperty('l')) {
|
||||||
node.l = n.l;
|
node.l = n.l;
|
||||||
}
|
}
|
||||||
@ -2029,6 +2070,15 @@ RED.nodes = (function() {
|
|||||||
node.outputs = subflow.out.length;
|
node.outputs = subflow.out.length;
|
||||||
node.inputs = subflow.in.length;
|
node.inputs = subflow.in.length;
|
||||||
node.env = n.env;
|
node.env = n.env;
|
||||||
|
} else if (n.type === 'junction') {
|
||||||
|
node._def = {defaults:{}}
|
||||||
|
node._config.x = node.x
|
||||||
|
node._config.y = node.y
|
||||||
|
node.inputs = 1
|
||||||
|
node.outputs = 1
|
||||||
|
node.w = 0;
|
||||||
|
node.h = 0;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (!node._def) {
|
if (!node._def) {
|
||||||
if (node.x && node.y) {
|
if (node.x && node.y) {
|
||||||
@ -2112,7 +2162,9 @@ RED.nodes = (function() {
|
|||||||
node_map[n.id] = node;
|
node_map[n.id] = node;
|
||||||
// If an 'unknown' config node, it will not have been caught by the
|
// If an 'unknown' config node, it will not have been caught by the
|
||||||
// proper config node handling, so needs adding to new_nodes here
|
// proper config node handling, so needs adding to new_nodes here
|
||||||
if (node.type === "unknown" || node._def.category !== "config") {
|
if (node.type === 'junction') {
|
||||||
|
new_junctions.push(node)
|
||||||
|
} else if (node.type === "unknown" || node._def.category !== "config") {
|
||||||
new_nodes.push(node);
|
new_nodes.push(node);
|
||||||
} else if (node.type === "group") {
|
} else if (node.type === "group") {
|
||||||
new_groups.push(node);
|
new_groups.push(node);
|
||||||
@ -2123,11 +2175,15 @@ RED.nodes = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remap all wires and config node references
|
// Remap all wires and config node references
|
||||||
for (i=0;i<new_nodes.length;i++) {
|
for (i=0;i<new_nodes.length+new_junctions.length;i++) {
|
||||||
|
if (i<new_nodes.length) {
|
||||||
n = new_nodes[i];
|
n = new_nodes[i];
|
||||||
|
} else {
|
||||||
|
n = new_junctions[i - new_nodes.length]
|
||||||
|
}
|
||||||
if (n.wires) {
|
if (n.wires) {
|
||||||
for (var w1=0;w1<n.wires.length;w1++) {
|
for (var w1=0;w1<n.wires.length;w1++) {
|
||||||
var wires = (n.wires[w1] instanceof Array)?n.wires[w1]:[n.wires[w1]];
|
var wires = (Array.isArray(n.wires[w1]))?n.wires[w1]:[n.wires[w1]];
|
||||||
for (var w2=0;w2<wires.length;w2++) {
|
for (var w2=0;w2<wires.length;w2++) {
|
||||||
if (node_map.hasOwnProperty(wires[w2])) {
|
if (node_map.hasOwnProperty(wires[w2])) {
|
||||||
if (n.z === node_map[wires[w2]].z) {
|
if (n.z === node_map[wires[w2]].z) {
|
||||||
@ -2263,6 +2319,12 @@ RED.nodes = (function() {
|
|||||||
addGroup(n);
|
addGroup(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i=0;i<new_junctions.length;i++) {
|
||||||
|
var junction = new_junctions[i];
|
||||||
|
addJunction(junction);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Now the nodes have been fully updated, add them.
|
// Now the nodes have been fully updated, add them.
|
||||||
for (i=0;i<new_nodes.length;i++) {
|
for (i=0;i<new_nodes.length;i++) {
|
||||||
var node = new_nodes[i];
|
var node = new_nodes[i];
|
||||||
@ -2293,6 +2355,7 @@ RED.nodes = (function() {
|
|||||||
nodes:new_nodes,
|
nodes:new_nodes,
|
||||||
links:new_links,
|
links:new_links,
|
||||||
groups:new_groups,
|
groups:new_groups,
|
||||||
|
junctions: new_junctions,
|
||||||
workspaces:new_workspaces,
|
workspaces:new_workspaces,
|
||||||
subflows:new_subflows,
|
subflows:new_subflows,
|
||||||
missingWorkspace: missingWorkspace,
|
missingWorkspace: missingWorkspace,
|
||||||
@ -2448,6 +2511,30 @@ RED.nodes = (function() {
|
|||||||
RED.events.emit("groups:remove",group);
|
RED.events.emit("groups:remove",group);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addJunction(junction) {
|
||||||
|
junctionsByZ[junction.z] = junctionsByZ[junction.z] || []
|
||||||
|
junctionsByZ[junction.z].push(junction)
|
||||||
|
junctions[junction.id] = junction;
|
||||||
|
if (!nodeLinks[junction.id]) {
|
||||||
|
nodeLinks[junction.id] = {in:[],out:[]};
|
||||||
|
}
|
||||||
|
RED.events.emit("junctions:add", junction)
|
||||||
|
}
|
||||||
|
function removeJunction(junction) {
|
||||||
|
var i = junctionsByZ[junction.z].indexOf(junction)
|
||||||
|
junctionsByZ[junction.z].splice(i, 1)
|
||||||
|
if (junctionsByZ[junction.z].length === 0) {
|
||||||
|
delete junctionsByZ[junction.z]
|
||||||
|
}
|
||||||
|
delete junctions[junction.id]
|
||||||
|
delete nodeLinks[junction.id];
|
||||||
|
RED.events.emit("junctions:remove", junction)
|
||||||
|
|
||||||
|
var removedLinks = links.filter(function(l) { return (l.source === junction) || (l.target === junction); });
|
||||||
|
removedLinks.forEach(removeLink);
|
||||||
|
return { links: removedLinks }
|
||||||
|
}
|
||||||
|
|
||||||
function getNodeHelp(type) {
|
function getNodeHelp(type) {
|
||||||
var helpContent = "";
|
var helpContent = "";
|
||||||
var helpElement = $("script[data-help-name='"+type+"']");
|
var helpElement = $("script[data-help-name='"+type+"']");
|
||||||
@ -2676,7 +2763,6 @@ RED.nodes = (function() {
|
|||||||
getType: registry.getNodeType,
|
getType: registry.getNodeType,
|
||||||
getNodeHelp: getNodeHelp,
|
getNodeHelp: getNodeHelp,
|
||||||
convertNode: convertNode,
|
convertNode: convertNode,
|
||||||
|
|
||||||
add: addNode,
|
add: addNode,
|
||||||
remove: removeNode,
|
remove: removeNode,
|
||||||
clear: clear,
|
clear: clear,
|
||||||
@ -2722,6 +2808,11 @@ RED.nodes = (function() {
|
|||||||
group: function(id) { return groups[id] },
|
group: function(id) { return groups[id] },
|
||||||
groups: function(z) { return groupsByZ[z]?groupsByZ[z].slice():[] },
|
groups: function(z) { return groupsByZ[z]?groupsByZ[z].slice():[] },
|
||||||
|
|
||||||
|
addJunction: addJunction,
|
||||||
|
removeJunction: removeJunction,
|
||||||
|
junction: function(id) { return junctions[id] },
|
||||||
|
junctions: function(z) { return junctionsByZ[z]?junctionsByZ[z].slice():[] },
|
||||||
|
|
||||||
eachNode: function(cb) {
|
eachNode: function(cb) {
|
||||||
allNodes.eachNode(cb);
|
allNodes.eachNode(cb);
|
||||||
},
|
},
|
||||||
|
@ -252,8 +252,21 @@ var RED = (function() {
|
|||||||
if (/^#flow\/.+$/.test(currentHash)) {
|
if (/^#flow\/.+$/.test(currentHash)) {
|
||||||
RED.workspaces.show(currentHash.substring(6),true);
|
RED.workspaces.show(currentHash.substring(6),true);
|
||||||
}
|
}
|
||||||
if (RED.workspaces.active() === 0 && RED.workspaces.count() > 0) {
|
if (RED.workspaces.count() > 0) {
|
||||||
RED.workspaces.show(RED.nodes.getWorkspaceOrder()[0])
|
const hiddenTabs = JSON.parse(RED.settings.getLocal("hiddenTabs")||"{}");
|
||||||
|
const workspaces = RED.nodes.getWorkspaceOrder();
|
||||||
|
if (RED.workspaces.active() === 0) {
|
||||||
|
for (let index = 0; index < workspaces.length; index++) {
|
||||||
|
const ws = workspaces[index];
|
||||||
|
if (!hiddenTabs[ws]) {
|
||||||
|
RED.workspaces.show(ws);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (RED.workspaces.active() === 0) {
|
||||||
|
RED.workspaces.show(workspaces[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.warn(err);
|
console.warn(err);
|
||||||
@ -461,7 +474,7 @@ var RED = (function() {
|
|||||||
var parts = topic.split("/");
|
var parts = topic.split("/");
|
||||||
var node = RED.nodes.node(parts[1]);
|
var node = RED.nodes.node(parts[1]);
|
||||||
if (node) {
|
if (node) {
|
||||||
if (msg.hasOwnProperty("text") && msg.text !== null && /^[a-zA-Z]/.test(msg.text)) {
|
if (msg.hasOwnProperty("text") && msg.text !== null && /^[@a-zA-Z]/.test(msg.text)) {
|
||||||
msg.text = node._(msg.text.toString(),{defaultValue:msg.text.toString()});
|
msg.text = node._(msg.text.toString(),{defaultValue:msg.text.toString()});
|
||||||
}
|
}
|
||||||
node.status = msg;
|
node.status = msg;
|
||||||
@ -602,7 +615,10 @@ var RED = (function() {
|
|||||||
null,
|
null,
|
||||||
{id: "menu-item-edit-select-all", label:RED._("keyboard.selectAll"), onselect: "core:select-all-nodes"},
|
{id: "menu-item-edit-select-all", label:RED._("keyboard.selectAll"), onselect: "core:select-all-nodes"},
|
||||||
{id: "menu-item-edit-select-connected", label:RED._("keyboard.selectAllConnected"), onselect: "core:select-connected-nodes"},
|
{id: "menu-item-edit-select-connected", label:RED._("keyboard.selectAllConnected"), onselect: "core:select-connected-nodes"},
|
||||||
{id: "menu-item-edit-select-none", label:RED._("keyboard.selectNone"), onselect: "core:select-none"}
|
{id: "menu-item-edit-select-none", label:RED._("keyboard.selectNone"), onselect: "core:select-none"},
|
||||||
|
null,
|
||||||
|
{id: "menu-item-edit-split-wire-with-links", label:RED._("keyboard.splitWireWithLinks"), onselect: "core:split-wire-with-link-nodes"},
|
||||||
|
|
||||||
]});
|
]});
|
||||||
|
|
||||||
menuOptions.push({id:"menu-item-view-menu",label:RED._("menu.label.view.view"),options:[
|
menuOptions.push({id:"menu-item-view-menu",label:RED._("menu.label.view.view"),options:[
|
||||||
|
@ -987,6 +987,7 @@ RED.clipboard = (function() {
|
|||||||
try {
|
try {
|
||||||
RED.view.importNodes(newNodes, importOptions);
|
RED.view.importNodes(newNodes, importOptions);
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
console.log(error.importConfig)
|
||||||
// Thrown for import_conflict
|
// Thrown for import_conflict
|
||||||
confirmImport(error.importConfig, newNodes, importOptions);
|
confirmImport(error.importConfig, newNodes, importOptions);
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
* The function must either return auto-complete options, or pass them
|
* The function must either return auto-complete options, or pass them
|
||||||
* to the optional 'done' parameter.
|
* to the optional 'done' parameter.
|
||||||
* If the function signature includes 'done', it must be used
|
* If the function signature includes 'done', it must be used
|
||||||
|
* minLength: number
|
||||||
|
* If `minLength` is 0, pressing down arrow will show the list
|
||||||
*
|
*
|
||||||
* The auto-complete options should be an array of objects in the form:
|
* The auto-complete options should be an array of objects in the form:
|
||||||
* {
|
* {
|
||||||
@ -26,10 +28,11 @@
|
|||||||
|
|
||||||
$.widget( "nodered.autoComplete", {
|
$.widget( "nodered.autoComplete", {
|
||||||
_create: function() {
|
_create: function() {
|
||||||
var that = this;
|
const that = this;
|
||||||
this.completionMenuShown = false;
|
this.completionMenuShown = false;
|
||||||
this.options.search = this.options.search || function() { return [] }
|
this.options.minLength = parseInteger(this.options.minLength, 1, 0);
|
||||||
this.element.addClass("red-ui-autoComplete")
|
this.options.search = this.options.search || function() { return [] };
|
||||||
|
this.element.addClass("red-ui-autoComplete");
|
||||||
this.element.on("keydown.red-ui-autoComplete", function(evt) {
|
this.element.on("keydown.red-ui-autoComplete", function(evt) {
|
||||||
if ((evt.keyCode === 13 || evt.keyCode === 9) && that.completionMenuShown) {
|
if ((evt.keyCode === 13 || evt.keyCode === 9) && that.completionMenuShown) {
|
||||||
var opts = that.menu.options();
|
var opts = that.menu.options();
|
||||||
@ -71,8 +74,8 @@
|
|||||||
this.completionMenuShown = true;
|
this.completionMenuShown = true;
|
||||||
},
|
},
|
||||||
_updateCompletions: function(val) {
|
_updateCompletions: function(val) {
|
||||||
var that = this;
|
const that = this;
|
||||||
if (val.trim() === "") {
|
if (val.trim().length < this.options.minLength) {
|
||||||
if (this.completionMenuShown) {
|
if (this.completionMenuShown) {
|
||||||
this.menu.hide();
|
this.menu.hide();
|
||||||
}
|
}
|
||||||
@ -96,7 +99,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.options.search.length === 2) {
|
if (this.options.search.length === 2) {
|
||||||
var requestId = 1+Math.floor(Math.random()*10000);
|
const requestId = 1+Math.floor(Math.random()*10000);
|
||||||
this.pendingRequest = requestId;
|
this.pendingRequest = requestId;
|
||||||
this.options.search(val,function(completions) { displayResults(completions,requestId);})
|
this.options.search(val,function(completions) { displayResults(completions,requestId);})
|
||||||
} else {
|
} else {
|
||||||
@ -112,4 +115,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
function parseInteger(input, def, min, max) {
|
||||||
|
if(input == null) { return (def || 0); }
|
||||||
|
min = min == null ? Number.NEGATIVE_INFINITY : min;
|
||||||
|
max = max == null ? Number.POSITIVE_INFINITY : max;
|
||||||
|
let n = parseInt(input);
|
||||||
|
if(isNaN(n) || n < min || n > max) { n = def || 0; }
|
||||||
|
return n;
|
||||||
|
}
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
@ -349,6 +349,17 @@ RED.popover = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
target.on("remove", function (ev) {
|
||||||
|
if (timer) {
|
||||||
|
clearTimeout(timer);
|
||||||
|
}
|
||||||
|
if (active) {
|
||||||
|
active = false;
|
||||||
|
setTimeout(closePopup,delay.hide);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (trigger === 'hover') {
|
if (trigger === 'hover') {
|
||||||
target.on('mouseenter',function(e) {
|
target.on('mouseenter',function(e) {
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
|
@ -105,8 +105,8 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.element.on("keydown",function(e) {
|
this.element.on("keydown",function(e) {
|
||||||
if (!menuShown && e.keyCode === 40) {
|
if (!menuShown && e.keyCode === 40 && $(this).val() === '') {
|
||||||
//DOWN
|
//DOWN (only show menu if search field is emty)
|
||||||
showMenu();
|
showMenu();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -55,34 +55,46 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var autoComplete = function(options) {
|
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($('<span/>').text(match.pre)); }
|
||||||
|
if(match.match) { els.push($('<span/>',{style:"font-weight: bold; color: var(--red-ui-text-color-link);"}).text(match.match)); }
|
||||||
|
if(match.post) { els.push($('<span/>').text(match.post)); }
|
||||||
|
return els;
|
||||||
|
}
|
||||||
return function(val) {
|
return function(val) {
|
||||||
var matches = [];
|
var matches = [];
|
||||||
options.forEach(opt => {
|
options.forEach(opt => {
|
||||||
let v = opt.value;
|
const optVal = opt.value;
|
||||||
var i = v.toLowerCase().indexOf(val.toLowerCase());
|
const optSrc = (opt.source||[]).join(",");
|
||||||
if (i > -1) {
|
const valMatch = getMatch(optVal, val);
|
||||||
var pre = v.substring(0,i);
|
const srcMatch = getMatch(optSrc, val);
|
||||||
var matchedVal = v.substring(i,i+val.length);
|
if (valMatch.found || srcMatch.found) {
|
||||||
var post = v.substring(i+val.length)
|
const element = $('<div>',{style: "display: flex"});
|
||||||
|
const valEl = $('<div/>',{style:"font-family: var(--red-ui-monospace-font); white-space:nowrap; overflow: hidden; flex-grow:1"});
|
||||||
var el = $('<div/>',{style:"white-space:nowrap; overflow: hidden; flex-grow:1"});
|
valEl.append(generateSpans(valMatch));
|
||||||
$('<span/>').text(pre).appendTo(el);
|
valEl.appendTo(element);
|
||||||
$('<span/>',{style:"font-weight: bold"}).text(matchedVal).appendTo(el);
|
if (optSrc) {
|
||||||
$('<span/>').text(post).appendTo(el);
|
const optEl = $('<div>').css({ "font-size": "0.8em" });
|
||||||
|
optEl.append(generateSpans(srcMatch));
|
||||||
var element = $('<div>',{style: "display: flex"});
|
optEl.appendTo(element);
|
||||||
el.appendTo(element);
|
|
||||||
if (opt.source) {
|
|
||||||
$('<div>').css({
|
|
||||||
"font-size": "0.8em"
|
|
||||||
}).text(opt.source.join(",")).appendTo(element);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
matches.push({
|
matches.push({
|
||||||
value: v,
|
value: optVal,
|
||||||
label: element,
|
label: element,
|
||||||
i:i
|
i: (valMatch.found ? valMatch.index : srcMatch.index)
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
matches.sort(function(A,B){return A.i-B.i})
|
matches.sort(function(A,B){return A.i-B.i})
|
||||||
@ -93,6 +105,36 @@
|
|||||||
// This is a hand-generated list of completions for the core nodes (based on the node help html).
|
// This is a hand-generated list of completions for the core nodes (based on the node help html).
|
||||||
var msgCompletions = [
|
var msgCompletions = [
|
||||||
{ value: "payload" },
|
{ value: "payload" },
|
||||||
|
{ value: "topic", source: ["mqtt","inject","rbe"] },
|
||||||
|
{ value: "action", source: ["mqtt"] },
|
||||||
|
{ value: "complete", source: ["join"] },
|
||||||
|
{ value: "contentType", source: ["mqtt"] },
|
||||||
|
{ value: "cookies", source: ["http request","http response"] },
|
||||||
|
{ value: "correlationData", source: ["mqtt"] },
|
||||||
|
{ value: "delay", source: ["delay","trigger"] },
|
||||||
|
{ value: "encoding", source: ["file"] },
|
||||||
|
{ value: "error", source: ["catch"] },
|
||||||
|
{ value: "error.message", source: ["catch"] },
|
||||||
|
{ value: "error.source", source: ["catch"] },
|
||||||
|
{ value: "error.source.id", source: ["catch"] },
|
||||||
|
{ value: "error.source.type", source: ["catch"] },
|
||||||
|
{ value: "error.source.name", source: ["catch"] },
|
||||||
|
{ value: "filename", source: ["file","file in"] },
|
||||||
|
{ value: "flush", source: ["delay"] },
|
||||||
|
{ value: "followRedirects", source: ["http request"] },
|
||||||
|
{ value: "headers", source: ["http response","http request"] },
|
||||||
|
{ value: "host", source: ["tcp request","http request"] },
|
||||||
|
{ value: "ip", source: ["udp out"] },
|
||||||
|
{ value: "kill", source: ["exec"] },
|
||||||
|
{ value: "messageExpiryInterval", source: ["mqtt"] },
|
||||||
|
{ value: "method", source: ["http request"] },
|
||||||
|
{ value: "options", source: ["xml"] },
|
||||||
|
{ value: "parts", source: ["split","join","batch","sort"] },
|
||||||
|
{ value: "pid", source: ["exec"] },
|
||||||
|
{ value: "port", source: ["tcp request"," udp out"] },
|
||||||
|
{ value: "qos", source: ["mqtt"] },
|
||||||
|
{ value: "rate", source: ["delay"] },
|
||||||
|
{ value: "rejectUnauthorized", source: ["http request"] },
|
||||||
{ value: "req", source: ["http in"]},
|
{ value: "req", source: ["http in"]},
|
||||||
{ value: "req.body", source: ["http in"]},
|
{ value: "req.body", source: ["http in"]},
|
||||||
{ value: "req.headers", source: ["http in"]},
|
{ value: "req.headers", source: ["http in"]},
|
||||||
@ -100,38 +142,28 @@
|
|||||||
{ value: "req.params", source: ["http in"]},
|
{ value: "req.params", source: ["http in"]},
|
||||||
{ value: "req.cookies", source: ["http in"]},
|
{ value: "req.cookies", source: ["http in"]},
|
||||||
{ value: "req.files", source: ["http in"]},
|
{ value: "req.files", source: ["http in"]},
|
||||||
{ value: "complete", source: ["join"] },
|
|
||||||
{ value: "contentType", source: ["mqtt"] },
|
|
||||||
{ value: "cookies", source: ["http in","http request"] },
|
|
||||||
{ value: "correlationData", source: ["mqtt"] },
|
|
||||||
{ value: "delay", source: ["delay","trigger"] },
|
|
||||||
{ value: "encoding", source: ["file"] },
|
|
||||||
{ value: "error", source: ["catch"] },
|
|
||||||
{ value: "filename", source: ["file","file in"] },
|
|
||||||
{ value: "flush", source: ["delay"] },
|
|
||||||
{ value: "followRedirects", source: ["http request"] },
|
|
||||||
{ value: "headers", source: ["http in"," http request"] },
|
|
||||||
{ value: "kill", source: ["exec"] },
|
|
||||||
{ value: "messageExpiryInterval", source: ["mqtt"] },
|
|
||||||
{ value: "method", source: ["http-request"] },
|
|
||||||
{ value: "options", source: ["xml"] },
|
|
||||||
{ value: "parts", source: ["split","join"] },
|
|
||||||
{ value: "pid", source: ["exec"] },
|
|
||||||
{ value: "qos", source: ["mqtt"] },
|
|
||||||
{ value: "rate", source: ["delay"] },
|
|
||||||
{ value: "rejectUnauthorized", source: ["http request"] },
|
|
||||||
{ value: "requestTimeout", source: ["http request"] },
|
{ value: "requestTimeout", source: ["http request"] },
|
||||||
{ value: "reset", source: ["delay","trigger","join","rbe"] },
|
{ value: "reset", source: ["delay","trigger","join","rbe"] },
|
||||||
|
{ value: "responseCookies", source: ["http request"] },
|
||||||
{ value: "responseTopic", source: ["mqtt"] },
|
{ value: "responseTopic", source: ["mqtt"] },
|
||||||
|
{ value: "responseURL", source: ["http request"] },
|
||||||
{ value: "restartTimeout", source: ["join"] },
|
{ value: "restartTimeout", source: ["join"] },
|
||||||
{ value: "retain", source: ["mqtt"] },
|
{ value: "retain", source: ["mqtt"] },
|
||||||
|
{ value: "schema", source: ["json"] },
|
||||||
{ value: "select", source: ["html"] },
|
{ value: "select", source: ["html"] },
|
||||||
{ value: "statusCode", source: ["http in"] },
|
{ value: "statusCode", source: ["http response","http request"] },
|
||||||
|
{ value: "status", source: ["status"] },
|
||||||
|
{ value: "status.text", source: ["status"] },
|
||||||
|
{ value: "status.source", source: ["status"] },
|
||||||
|
{ value: "status.source.type", source: ["status"] },
|
||||||
|
{ value: "status.source.id", source: ["status"] },
|
||||||
|
{ value: "status.source.name", source: ["status"] },
|
||||||
|
{ value: "target", source: ["link call"] },
|
||||||
{ value: "template", source: ["template"] },
|
{ value: "template", source: ["template"] },
|
||||||
{ value: "toFront", source: ["delay"] },
|
{ value: "toFront", source: ["delay"] },
|
||||||
{ value: "topic", source: ["inject","mqtt","rbe"] },
|
|
||||||
{ value: "url", source: ["http request"] },
|
{ value: "url", source: ["http request"] },
|
||||||
{ value: "userProperties", source: ["mqtt"] }
|
{ value: "userProperties", source: ["mqtt"] },
|
||||||
|
{ value: "_session", source: ["websocket out","tcp out"] },
|
||||||
]
|
]
|
||||||
var allOptions = {
|
var allOptions = {
|
||||||
msg: {value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression, autoComplete: autoComplete(msgCompletions)},
|
msg: {value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression, autoComplete: autoComplete(msgCompletions)},
|
||||||
@ -1147,7 +1179,8 @@
|
|||||||
this.elementDiv.show();
|
this.elementDiv.show();
|
||||||
if (opt.autoComplete) {
|
if (opt.autoComplete) {
|
||||||
this.input.autoComplete({
|
this.input.autoComplete({
|
||||||
search: opt.autoComplete
|
search: opt.autoComplete,
|
||||||
|
minLength: 0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -320,20 +320,27 @@ RED.deploy = (function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function save(skipValidation, force) {
|
function save(skipValidation, force) {
|
||||||
if (!$("#red-ui-header-button-deploy").hasClass("disabled")) {
|
if ($("#red-ui-header-button-deploy").hasClass("disabled")) {
|
||||||
|
return; //deploy is disabled
|
||||||
|
}
|
||||||
|
if ($("#red-ui-header-shade").is(":visible")) {
|
||||||
|
return; //deploy is shaded
|
||||||
|
}
|
||||||
if (!RED.user.hasPermission("flows.write")) {
|
if (!RED.user.hasPermission("flows.write")) {
|
||||||
RED.notify(RED._("user.errors.deploy"), "error");
|
RED.notify(RED._("user.errors.deploy"), "error");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
let hasUnusedConfig = false;
|
||||||
if (!skipValidation) {
|
if (!skipValidation) {
|
||||||
var hasUnknown = false;
|
let hasUnknown = false;
|
||||||
var hasInvalid = false;
|
let hasInvalid = false;
|
||||||
var hasUnusedConfig = false;
|
const unknownNodes = [];
|
||||||
|
const invalidNodes = [];
|
||||||
var unknownNodes = [];
|
|
||||||
var invalidNodes = [];
|
|
||||||
|
|
||||||
RED.nodes.eachConfig(function (node) {
|
RED.nodes.eachConfig(function (node) {
|
||||||
|
if (node.valid === undefined) {
|
||||||
|
RED.editor.validateNode(node);
|
||||||
|
}
|
||||||
if (!node.valid && !node.d) {
|
if (!node.valid && !node.d) {
|
||||||
invalidNodes.push(getNodeInfo(node));
|
invalidNodes.push(getNodeInfo(node));
|
||||||
}
|
}
|
||||||
@ -356,7 +363,7 @@ RED.deploy = (function() {
|
|||||||
hasUnknown = unknownNodes.length > 0;
|
hasUnknown = unknownNodes.length > 0;
|
||||||
hasInvalid = invalidNodes.length > 0;
|
hasInvalid = invalidNodes.length > 0;
|
||||||
|
|
||||||
var unusedConfigNodes = [];
|
const unusedConfigNodes = [];
|
||||||
RED.nodes.eachConfig(function (node) {
|
RED.nodes.eachConfig(function (node) {
|
||||||
if ((node._def.hasUsers !== false) && (node.users.length === 0)) {
|
if ((node._def.hasUsers !== false) && (node.users.length === 0)) {
|
||||||
unusedConfigNodes.push(getNodeInfo(node));
|
unusedConfigNodes.push(getNodeInfo(node));
|
||||||
@ -364,10 +371,10 @@ RED.deploy = (function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var showWarning = false;
|
let showWarning = false;
|
||||||
var notificationMessage;
|
let notificationMessage;
|
||||||
var notificationButtons = [];
|
let notificationButtons = [];
|
||||||
var notification;
|
let notification;
|
||||||
if (hasUnknown && !ignoreDeployWarnings.unknown) {
|
if (hasUnknown && !ignoreDeployWarnings.unknown) {
|
||||||
showWarning = true;
|
showWarning = true;
|
||||||
notificationMessage = "<p>" + RED._('deploy.confirm.unknown') + "</p>" +
|
notificationMessage = "<p>" + RED._('deploy.confirm.unknown') + "</p>" +
|
||||||
@ -424,14 +431,14 @@ RED.deploy = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var nns = RED.nodes.createCompleteNodeSet();
|
const nns = RED.nodes.createCompleteNodeSet();
|
||||||
|
const startTime = Date.now();
|
||||||
|
|
||||||
var startTime = Date.now();
|
|
||||||
$(".red-ui-deploy-button-content").css('opacity', 0);
|
$(".red-ui-deploy-button-content").css('opacity', 0);
|
||||||
$(".red-ui-deploy-button-spinner").show();
|
$(".red-ui-deploy-button-spinner").show();
|
||||||
$("#red-ui-header-button-deploy").addClass("disabled");
|
$("#red-ui-header-button-deploy").addClass("disabled");
|
||||||
|
|
||||||
var data = {flows:nns};
|
const data = { flows: nns };
|
||||||
|
|
||||||
if (!force) {
|
if (!force) {
|
||||||
data.rev = RED.nodes.version();
|
data.rev = RED.nodes.version();
|
||||||
@ -504,7 +511,7 @@ RED.deploy = (function() {
|
|||||||
}
|
}
|
||||||
}).always(function () {
|
}).always(function () {
|
||||||
deployInflight = false;
|
deployInflight = false;
|
||||||
var delta = Math.max(0,300-(Date.now()-startTime));
|
const delta = Math.max(0, 300 - (Date.now() - startTime));
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
$(".red-ui-deploy-button-content").css('opacity', 1);
|
$(".red-ui-deploy-button-content").css('opacity', 1);
|
||||||
$(".red-ui-deploy-button-spinner").hide();
|
$(".red-ui-deploy-button-spinner").hide();
|
||||||
@ -515,7 +522,6 @@ RED.deploy = (function() {
|
|||||||
}, delta);
|
}, delta);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
init: init,
|
init: init,
|
||||||
setDeployInflight: function(state) {
|
setDeployInflight: function(state) {
|
||||||
|
@ -577,7 +577,7 @@ RED.editor.codeEditor.monaco = (function() {
|
|||||||
createMonacoCompletionItem("set (flow context)", 'flow.set("${1:name}", ${1:value});','Set a value in flow context',range),
|
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("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("set (global context)", 'global.set("${1:name}", ${1:value});','Set a value in global context',range),
|
||||||
createMonacoCompletionItem("get (env)", 'env.get("${1: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|}");','Get env variable value',range),
|
||||||
createMonacoCompletionItem("cloneMessage (RED.util)", 'RED.util.cloneMessage(${1:msg});',
|
createMonacoCompletionItem("cloneMessage (RED.util)", 'RED.util.cloneMessage(${1:msg});',
|
||||||
["```typescript",
|
["```typescript",
|
||||||
"RED.util.cloneMessage<T extends registry.NodeMessage>(msg: T): T",
|
"RED.util.cloneMessage<T extends registry.NodeMessage>(msg: T): T",
|
||||||
@ -1151,7 +1151,7 @@ RED.editor.codeEditor.monaco = (function() {
|
|||||||
try {
|
try {
|
||||||
var _model = ed.getModel();
|
var _model = ed.getModel();
|
||||||
if (_model !== null) {
|
if (_model !== null) {
|
||||||
var id = _model.getModeId(); // e.g. javascript
|
var id = _model._languageId; // e.g. javascript
|
||||||
var ra = _model._associatedResource.authority; //e.g. model
|
var ra = _model._associatedResource.authority; //e.g. model
|
||||||
var rp = _model._associatedResource.path; //e.g. /18
|
var rp = _model._associatedResource.path; //e.g. /18
|
||||||
var rs = _model._associatedResource.scheme; //e.g. inmemory
|
var rs = _model._associatedResource.scheme; //e.g. inmemory
|
||||||
|
@ -168,7 +168,7 @@
|
|||||||
'b': { before:"**", after: "**", tooltip: RED._("markdownEditor.bold")},
|
'b': { before:"**", after: "**", tooltip: RED._("markdownEditor.bold")},
|
||||||
'i': { before:"_", after: "_", tooltip: RED._("markdownEditor.italic")},
|
'i': { before:"_", after: "_", tooltip: RED._("markdownEditor.italic")},
|
||||||
'code': { before:"`", after: "`", tooltip: RED._("markdownEditor.code")},
|
'code': { before:"`", after: "`", tooltip: RED._("markdownEditor.code")},
|
||||||
'ol': { before:" * ", newline: true, tooltip: RED._("markdownEditor.ordered-list")},
|
'ol': { before:" 1. ", newline: true, tooltip: RED._("markdownEditor.ordered-list")},
|
||||||
'ul': { before:" - ", newline: true, tooltip: RED._("markdownEditor.unordered-list")},
|
'ul': { before:" - ", newline: true, tooltip: RED._("markdownEditor.unordered-list")},
|
||||||
'bq': { before:"> ", newline: true, tooltip: RED._("markdownEditor.quote")},
|
'bq': { before:"> ", newline: true, tooltip: RED._("markdownEditor.quote")},
|
||||||
'link': { before:"[", after: "]()", tooltip: RED._("markdownEditor.link")},
|
'link': { before:"[", after: "]()", tooltip: RED._("markdownEditor.link")},
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
newValue = "";
|
newValue = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (node[d] != newValue) {
|
if (!isEqual(node[d], newValue)) {
|
||||||
if (node._def.defaults[d].type) {
|
if (node._def.defaults[d].type) {
|
||||||
// Change to a related config node
|
// Change to a related config node
|
||||||
var configNode = RED.nodes.node(node[d]);
|
var configNode = RED.nodes.node(node[d]);
|
||||||
@ -139,6 +139,23 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares `newValue` with `originalValue` for equality.
|
||||||
|
* @param {*} originalValue Original value
|
||||||
|
* @param {*} newValue New value
|
||||||
|
* @returns {boolean} true if originalValue equals newValue, otherwise false
|
||||||
|
*/
|
||||||
|
function isEqual(originalValue, newValue) {
|
||||||
|
try {
|
||||||
|
if(originalValue == newValue) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return JSON.stringify(originalValue) === JSON.stringify(newValue);
|
||||||
|
} catch (err) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the node credentials from the edit form
|
* Update the node credentials from the edit form
|
||||||
* @param node - the node containing the credentials
|
* @param node - the node containing the credentials
|
||||||
|
@ -352,8 +352,10 @@ RED.group = (function() {
|
|||||||
}
|
}
|
||||||
if (n.type === 'group') {
|
if (n.type === 'group') {
|
||||||
RED.events.emit("groups:change",n)
|
RED.events.emit("groups:change",n)
|
||||||
} else {
|
} else if (n.type !== 'junction') {
|
||||||
RED.events.emit("nodes:change",n)
|
RED.events.emit("nodes:change",n)
|
||||||
|
} else {
|
||||||
|
RED.events.emit("junctions:change",n)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
RED.nodes.removeGroup(g);
|
RED.nodes.removeGroup(g);
|
||||||
@ -547,8 +549,10 @@ RED.group = (function() {
|
|||||||
group.h = Math.max(group.h,n.y+n.h/2+25-group.y);
|
group.h = Math.max(group.h,n.y+n.h/2+25-group.y);
|
||||||
if (n.type === 'group') {
|
if (n.type === 'group') {
|
||||||
RED.events.emit("groups:change",n)
|
RED.events.emit("groups:change",n)
|
||||||
} else {
|
} else if (n.type !== 'junction') {
|
||||||
RED.events.emit("nodes:change",n)
|
RED.events.emit("nodes:change",n)
|
||||||
|
} else {
|
||||||
|
RED.events.emit("junctions:change",n)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -583,8 +587,10 @@ RED.group = (function() {
|
|||||||
}
|
}
|
||||||
if (n.type === 'group') {
|
if (n.type === 'group') {
|
||||||
RED.events.emit("groups:change",n)
|
RED.events.emit("groups:change",n)
|
||||||
} else {
|
} else if (n.type !== 'junction') {
|
||||||
RED.events.emit("nodes:change",n)
|
RED.events.emit("nodes:change",n)
|
||||||
|
} else {
|
||||||
|
RED.events.emit("junctions:change",n)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
markDirty(group);
|
markDirty(group);
|
||||||
|
@ -625,7 +625,7 @@ RED.keyboard = (function() {
|
|||||||
pane.find("#red-ui-settings-tab-keyboard-filter").searchBox({
|
pane.find("#red-ui-settings-tab-keyboard-filter").searchBox({
|
||||||
delay: 100,
|
delay: 100,
|
||||||
change: function() {
|
change: function() {
|
||||||
var filterValue = $(this).val().trim();
|
var filterValue = $(this).val().trim().toLowerCase();
|
||||||
if (filterValue === "") {
|
if (filterValue === "") {
|
||||||
shortcutList.editableList('filter', null);
|
shortcutList.editableList('filter', null);
|
||||||
} else {
|
} else {
|
||||||
|
@ -224,14 +224,7 @@ RED.palette = (function() {
|
|||||||
|
|
||||||
var d = $('<div>',{class:"red-ui-palette-node"}).attr("data-palette-type",nt).data('category',rootCategory);
|
var d = $('<div>',{class:"red-ui-palette-node"}).attr("data-palette-type",nt).data('category',rootCategory);
|
||||||
|
|
||||||
var label = nt;///^(.*?)([ -]in|[ -]out)?$/.exec(nt)[1];
|
var label = RED.utils.getPaletteLabel(nt, def);///^(.*?)([ -]in|[ -]out)?$/.exec(nt)[1];
|
||||||
if (typeof def.paletteLabel !== "undefined") {
|
|
||||||
try {
|
|
||||||
label = (typeof def.paletteLabel === "function" ? def.paletteLabel.call(def) : def.paletteLabel)||"";
|
|
||||||
} catch(err) {
|
|
||||||
console.log("Definition error: "+nt+".paletteLabel",err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$('<div/>', {
|
$('<div/>', {
|
||||||
class: "red-ui-palette-label"+(((!def.align && def.inputs !== 0 && def.outputs === 0) || "right" === def.align) ? " red-ui-palette-label-right" : "")
|
class: "red-ui-palette-label"+(((!def.align && def.inputs !== 0 && def.outputs === 0) || "right" === def.align) ? " red-ui-palette-label-right" : "")
|
||||||
|
@ -25,6 +25,8 @@ RED.search = (function() {
|
|||||||
var searchHistory = [];
|
var searchHistory = [];
|
||||||
var index = {};
|
var index = {};
|
||||||
var currentResults = [];
|
var currentResults = [];
|
||||||
|
var activeResults = [];
|
||||||
|
var currentIndex = 0;
|
||||||
var previousActiveElement;
|
var previousActiveElement;
|
||||||
|
|
||||||
function indexProperty(node,label,property) {
|
function indexProperty(node,label,property) {
|
||||||
@ -119,6 +121,7 @@ RED.search = (function() {
|
|||||||
val = extractFlag(val,"config",flags);
|
val = extractFlag(val,"config",flags);
|
||||||
val = extractFlag(val,"subflow",flags);
|
val = extractFlag(val,"subflow",flags);
|
||||||
val = extractFlag(val,"hidden",flags);
|
val = extractFlag(val,"hidden",flags);
|
||||||
|
val = extractFlag(val,"modified",flags);
|
||||||
// uses:<node-id>
|
// uses:<node-id>
|
||||||
val = extractValue(val,"uses",flags);
|
val = extractValue(val,"uses",flags);
|
||||||
|
|
||||||
@ -164,6 +167,11 @@ RED.search = (function() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (flags.hasOwnProperty("modified")) {
|
||||||
|
if (!node.node.changed && !node.node.moved) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (flags.hasOwnProperty("hidden")) {
|
if (flags.hasOwnProperty("hidden")) {
|
||||||
// Only tabs can be hidden
|
// Only tabs can be hidden
|
||||||
if (node.node.type !== 'tab') {
|
if (node.node.type !== 'tab') {
|
||||||
@ -261,9 +269,8 @@ RED.search = (function() {
|
|||||||
} else {
|
} else {
|
||||||
searchResults.editableList('addItem',{});
|
searchResults.editableList('addItem',{});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
options: getSearchOptions()
|
||||||
}
|
|
||||||
});
|
});
|
||||||
var copySearchContainer = $('<button type="button" class="red-ui-button red-ui-button-small"><i class="fa fa-caret-right"></button>').appendTo(searchDiv).on('click', function(evt) {
|
var copySearchContainer = $('<button type="button" class="red-ui-button red-ui-button-small"><i class="fa fa-caret-right"></button>').appendTo(searchDiv).on('click', function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
@ -324,7 +331,8 @@ RED.search = (function() {
|
|||||||
}
|
}
|
||||||
} else if (!$(children[selected]).hasClass("red-ui-search-historyHeader")) {
|
} else if (!$(children[selected]).hasClass("red-ui-search-historyHeader")) {
|
||||||
if (currentResults.length > 0) {
|
if (currentResults.length > 0) {
|
||||||
reveal(currentResults[Math.max(0,selected)].node);
|
currentIndex = Math.max(0,selected);
|
||||||
|
reveal(currentResults[currentIndex].node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -408,6 +416,7 @@ RED.search = (function() {
|
|||||||
|
|
||||||
div.on("click", function(evt) {
|
div.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
currentIndex = i;
|
||||||
reveal(node);
|
reveal(node);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -423,13 +432,59 @@ RED.search = (function() {
|
|||||||
if (existingIndex > -1) {
|
if (existingIndex > -1) {
|
||||||
searchHistory.splice(existingIndex,1);
|
searchHistory.splice(existingIndex,1);
|
||||||
}
|
}
|
||||||
searchHistory.unshift(searchInput.val());
|
searchHistory.unshift(searchVal);
|
||||||
hide();
|
$("#red-ui-view-searchtools-search").data("term", searchVal);
|
||||||
|
activeResults = Object.assign([], currentResults);
|
||||||
|
hide(null, activeResults.length > 0);
|
||||||
RED.view.reveal(node.id);
|
RED.view.reveal(node.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function revealPrev() {
|
||||||
|
if (disabled) {
|
||||||
|
updateSearchToolbar();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!searchResults || !activeResults.length) {
|
||||||
|
show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (currentIndex > 0) {
|
||||||
|
currentIndex--;
|
||||||
|
} else {
|
||||||
|
currentIndex = activeResults.length - 1;
|
||||||
|
}
|
||||||
|
const n = activeResults[currentIndex];
|
||||||
|
if (n && n.node && n.node.id) {
|
||||||
|
RED.view.reveal(n.node.id);
|
||||||
|
$("#red-ui-view-searchtools-prev").trigger("focus");
|
||||||
|
}
|
||||||
|
updateSearchToolbar();
|
||||||
|
}
|
||||||
|
function revealNext() {
|
||||||
|
if (disabled) {
|
||||||
|
updateSearchToolbar();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!searchResults || !activeResults.length) {
|
||||||
|
show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (currentIndex < activeResults.length - 1) {
|
||||||
|
currentIndex++
|
||||||
|
} else {
|
||||||
|
currentIndex = 0;
|
||||||
|
}
|
||||||
|
const n = activeResults[currentIndex];
|
||||||
|
if (n && n.node && n.node.id) {
|
||||||
|
RED.view.reveal(n.node.id);
|
||||||
|
$("#red-ui-view-searchtools-next").trigger("focus");
|
||||||
|
}
|
||||||
|
updateSearchToolbar();
|
||||||
|
}
|
||||||
|
|
||||||
function show(v) {
|
function show(v) {
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
|
updateSearchToolbar();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!visible) {
|
if (!visible) {
|
||||||
@ -456,7 +511,7 @@ RED.search = (function() {
|
|||||||
searchInput.trigger("focus");
|
searchInput.trigger("focus");
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide() {
|
function hide(el, keepSearchToolbar) {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
visible = false;
|
visible = false;
|
||||||
$("#red-ui-header-shade").hide();
|
$("#red-ui-header-shade").hide();
|
||||||
@ -470,13 +525,37 @@ RED.search = (function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
RED.events.emit("search:close");
|
RED.events.emit("search:close");
|
||||||
if (previousActiveElement) {
|
if (previousActiveElement && (!keepSearchToolbar || !activeResults.length)) {
|
||||||
$(previousActiveElement).trigger("focus");
|
$(previousActiveElement).trigger("focus");
|
||||||
|
}
|
||||||
previousActiveElement = null;
|
previousActiveElement = null;
|
||||||
}
|
}
|
||||||
|
if(!keepSearchToolbar) {
|
||||||
|
clearActiveSearch();
|
||||||
|
}
|
||||||
|
updateSearchToolbar();
|
||||||
|
if(keepSearchToolbar && activeResults.length) {
|
||||||
|
$("#red-ui-view-searchtools-next").trigger("focus");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function updateSearchToolbar() {
|
||||||
|
if (!disabled && currentIndex >= 0 && activeResults && activeResults.length) {
|
||||||
|
let term = $("#red-ui-view-searchtools-search").data("term") || "";
|
||||||
|
if (term.length > 16) {
|
||||||
|
term = term.substring(0, 12) + "..."
|
||||||
|
}
|
||||||
|
const i18nSearchCounterData = {
|
||||||
|
term: term,
|
||||||
|
result: (currentIndex + 1),
|
||||||
|
count: activeResults.length
|
||||||
|
}
|
||||||
|
$("#red-ui-view-searchtools-counter").text(RED._('actions.search-counter', i18nSearchCounterData));
|
||||||
|
$("#view-search-tools > :not(:first-child)").show(); //show other tools
|
||||||
|
} else {
|
||||||
|
clearActiveSearch();
|
||||||
|
$("#view-search-tools > :not(:first-child)").hide(); //hide all but search button
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearIndex() {
|
function clearIndex() {
|
||||||
index = {};
|
index = {};
|
||||||
}
|
}
|
||||||
@ -498,9 +577,29 @@ RED.search = (function() {
|
|||||||
addItemToIndex(item);
|
addItemToIndex(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearActiveSearch() {
|
||||||
|
activeResults = [];
|
||||||
|
currentIndex = 0;
|
||||||
|
$("#red-ui-view-searchtools-search").data("term", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSearchOptions() {
|
||||||
|
return [
|
||||||
|
{label:RED._("search.options.configNodes"), value:"is:config"},
|
||||||
|
{label:RED._("search.options.unusedConfigNodes"), value:"is:config is:unused"},
|
||||||
|
{label:RED._("search.options.modifiedNodes"), value:"is:modified"},
|
||||||
|
{label:RED._("search.options.invalidNodes"), value: "is:invalid"},
|
||||||
|
{label:RED._("search.options.uknownNodes"), value: "type:unknown"},
|
||||||
|
{label:RED._("search.options.unusedSubflows"), value:"is:subflow is:unused"},
|
||||||
|
{label:RED._("search.options.hiddenFlows"), value:"is:hidden"},
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
RED.actions.add("core:search",show);
|
RED.actions.add("core:search",show);
|
||||||
|
RED.actions.add("core:search-previous",revealPrev);
|
||||||
|
RED.actions.add("core:search-next",revealNext);
|
||||||
|
|
||||||
RED.events.on("editor:open",function() { disabled = true; });
|
RED.events.on("editor:open",function() { disabled = true; });
|
||||||
RED.events.on("editor:close",function() { disabled = false; });
|
RED.events.on("editor:close",function() { disabled = false; });
|
||||||
@ -511,11 +610,21 @@ RED.search = (function() {
|
|||||||
|
|
||||||
RED.keyboard.add("red-ui-search","escape",hide);
|
RED.keyboard.add("red-ui-search","escape",hide);
|
||||||
|
|
||||||
|
RED.keyboard.add("view-search-tools","escape",function() {
|
||||||
|
clearActiveSearch();
|
||||||
|
updateSearchToolbar();
|
||||||
|
});
|
||||||
|
|
||||||
$("#red-ui-header-shade").on('mousedown',hide);
|
$("#red-ui-header-shade").on('mousedown',hide);
|
||||||
$("#red-ui-editor-shade").on('mousedown',hide);
|
$("#red-ui-editor-shade").on('mousedown',hide);
|
||||||
$("#red-ui-palette-shade").on('mousedown',hide);
|
$("#red-ui-palette-shade").on('mousedown',hide);
|
||||||
$("#red-ui-sidebar-shade").on('mousedown',hide);
|
$("#red-ui-sidebar-shade").on('mousedown',hide);
|
||||||
|
|
||||||
|
$("#red-ui-view-searchtools-close").on("click", function close() {
|
||||||
|
clearActiveSearch();
|
||||||
|
updateSearchToolbar();
|
||||||
|
});
|
||||||
|
$("#red-ui-view-searchtools-close").trigger("click");
|
||||||
|
|
||||||
RED.events.on("workspace:clear", clearIndex);
|
RED.events.on("workspace:clear", clearIndex);
|
||||||
|
|
||||||
@ -541,7 +650,8 @@ RED.search = (function() {
|
|||||||
init: init,
|
init: init,
|
||||||
show: show,
|
show: show,
|
||||||
hide: hide,
|
hide: hide,
|
||||||
search: search
|
search: search,
|
||||||
|
getSearchOptions: getSearchOptions
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
@ -29,5 +29,6 @@ RED.state = {
|
|||||||
GROUP_DRAGGING: 12,
|
GROUP_DRAGGING: 12,
|
||||||
GROUP_RESIZE: 13,
|
GROUP_RESIZE: 13,
|
||||||
DETACHED_DRAGGING: 14,
|
DETACHED_DRAGGING: 14,
|
||||||
SLICING: 15
|
SLICING: 15,
|
||||||
|
SLICING_JUNCTION: 16
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ RED.statusBar = (function() {
|
|||||||
function addWidget(options) {
|
function addWidget(options) {
|
||||||
widgets[options.id] = options;
|
widgets[options.id] = options;
|
||||||
var el = $('<span class="red-ui-statusbar-widget"></span>');
|
var el = $('<span class="red-ui-statusbar-widget"></span>');
|
||||||
|
el.prop('id', options.id);
|
||||||
options.element.appendTo(el);
|
options.element.appendTo(el);
|
||||||
if (options.align === 'left') {
|
if (options.align === 'left') {
|
||||||
leftBucket.append(el);
|
leftBucket.append(el);
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
**/
|
**/
|
||||||
RED.sidebar.config = (function() {
|
RED.sidebar.config = (function() {
|
||||||
|
|
||||||
|
let flashingConfigNode;
|
||||||
|
let flashingConfigNodeTimer;
|
||||||
|
|
||||||
var content = document.createElement("div");
|
var content = document.createElement("div");
|
||||||
content.className = "red-ui-sidebar-node-config";
|
content.className = "red-ui-sidebar-node-config";
|
||||||
@ -145,6 +147,7 @@ RED.sidebar.config = (function() {
|
|||||||
var entry = $('<li class="red-ui-palette-node_id_'+node.id.replace(/\./g,"-")+'"></li>').appendTo(list);
|
var entry = $('<li class="red-ui-palette-node_id_'+node.id.replace(/\./g,"-")+'"></li>').appendTo(list);
|
||||||
var nodeDiv = $('<div class="red-ui-palette-node-config red-ui-palette-node"></div>').appendTo(entry);
|
var nodeDiv = $('<div class="red-ui-palette-node-config red-ui-palette-node"></div>').appendTo(entry);
|
||||||
entry.data('node',node.id);
|
entry.data('node',node.id);
|
||||||
|
nodeDiv.data('node',node.id);
|
||||||
var label = $('<div class="red-ui-palette-label"></div>').text(label).appendTo(nodeDiv);
|
var label = $('<div class="red-ui-palette-label"></div>').text(label).appendTo(nodeDiv);
|
||||||
if (node.d) {
|
if (node.d) {
|
||||||
nodeDiv.addClass("red-ui-palette-node-config-disabled");
|
nodeDiv.addClass("red-ui-palette-node-config-disabled");
|
||||||
@ -346,10 +349,36 @@ RED.sidebar.config = (function() {
|
|||||||
refreshConfigNodeList();
|
refreshConfigNodeList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
RED.popover.tooltip($('#red-ui-sidebar-config-filter-all'), RED._("sidebar.config.showAllUnusedConfigNodes"));
|
RED.popover.tooltip($('#red-ui-sidebar-config-filter-all'), RED._("sidebar.config.showAllConfigNodes"));
|
||||||
RED.popover.tooltip($('#red-ui-sidebar-config-filter-unused'), RED._("sidebar.config.showAllUnusedConfigNodes"));
|
RED.popover.tooltip($('#red-ui-sidebar-config-filter-unused'), RED._("sidebar.config.showAllUnusedConfigNodes"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function flashConfigNode(el) {
|
||||||
|
if(flashingConfigNode && flashingConfigNode.length) {
|
||||||
|
//cancel current flashing node before flashing new node
|
||||||
|
clearInterval(flashingConfigNodeTimer);
|
||||||
|
flashingConfigNodeTimer = null;
|
||||||
|
flashingConfigNode.children("div").removeClass('highlighted');
|
||||||
|
flashingConfigNode = null;
|
||||||
|
}
|
||||||
|
if(!el || !el.children("div").length) { return; }
|
||||||
|
|
||||||
|
flashingConfigNodeTimer = setInterval(function(flashEndTime) {
|
||||||
|
if (flashEndTime >= Date.now()) {
|
||||||
|
const highlighted = el.children("div").hasClass("highlighted");
|
||||||
|
el.children("div").toggleClass('highlighted', !highlighted)
|
||||||
|
} else {
|
||||||
|
clearInterval(flashingConfigNodeTimer);
|
||||||
|
flashingConfigNodeTimer = null;
|
||||||
|
flashingConfigNode = null;
|
||||||
|
el.children("div").removeClass('highlighted');
|
||||||
|
}
|
||||||
|
}, 100, Date.now() + 2200);
|
||||||
|
flashingConfigNode = el;
|
||||||
|
el.children("div").addClass('highlighted');
|
||||||
|
}
|
||||||
|
|
||||||
function show(id) {
|
function show(id) {
|
||||||
if (typeof id === 'boolean') {
|
if (typeof id === 'boolean') {
|
||||||
if (id) {
|
if (id) {
|
||||||
@ -374,19 +403,7 @@ RED.sidebar.config = (function() {
|
|||||||
} else if (y<0) {
|
} else if (y<0) {
|
||||||
scrollWindow.animate({scrollTop: '+='+(y-10)},150);
|
scrollWindow.animate({scrollTop: '+='+(y-10)},150);
|
||||||
}
|
}
|
||||||
var flash = 21;
|
flashConfigNode(node, id);
|
||||||
var flashFunc = function() {
|
|
||||||
if ((flash%2)===0) {
|
|
||||||
node.removeClass('node_highlighted');
|
|
||||||
} else {
|
|
||||||
node.addClass('node_highlighted');
|
|
||||||
}
|
|
||||||
flash--;
|
|
||||||
if (flash >= 0) {
|
|
||||||
setTimeout(flashFunc,100);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
flashFunc();
|
|
||||||
},100);
|
},100);
|
||||||
}
|
}
|
||||||
RED.sidebar.show("config");
|
RED.sidebar.show("config");
|
||||||
|
@ -370,7 +370,7 @@ RED.sidebar.help = (function() {
|
|||||||
var node = selection.nodes[0];
|
var node = selection.nodes[0];
|
||||||
if (node.type === "subflow" && node.direction) {
|
if (node.type === "subflow" && node.direction) {
|
||||||
// ignore subflow virtual ports
|
// ignore subflow virtual ports
|
||||||
} else if (node.type !== 'group'){
|
} else if (node.type !== 'group' && node.type !== 'junction'){
|
||||||
showNodeTypeHelp(node.type);
|
showNodeTypeHelp(node.type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -268,14 +268,7 @@ RED.sidebar.info.outliner = (function() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
options: [
|
options: RED.search.getSearchOptions()
|
||||||
{label:RED._("sidebar.info.search.configNodes"), value:"is:config"},
|
|
||||||
{label:RED._("sidebar.info.search.unusedConfigNodes"), value:"is:config is:unused"},
|
|
||||||
{label:RED._("sidebar.info.search.invalidNodes"), value: "is:invalid"},
|
|
||||||
{label:RED._("sidebar.info.search.uknownNodes"), value: "type:unknown"},
|
|
||||||
{label:RED._("sidebar.info.search.unusedSubflows"), value:"is:subflow is:unused"},
|
|
||||||
{label:RED._("sidebar.info.search.hiddenFlows"), value:"is:hidden"},
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
projectInfo = $('<div class="red-ui-treeList-label red-ui-info-outline-project"><span class="red-ui-treeList-icon"><i class="fa fa-archive"></i></span></div>').hide().appendTo(container)
|
projectInfo = $('<div class="red-ui-treeList-label red-ui-info-outline-project"><span class="red-ui-treeList-icon"><i class="fa fa-archive"></i></span></div>').hide().appendTo(container)
|
||||||
@ -287,15 +280,18 @@ RED.sidebar.info.outliner = (function() {
|
|||||||
data:getFlowData()
|
data:getFlowData()
|
||||||
})
|
})
|
||||||
treeList.on('treelistselect', function(e,item) {
|
treeList.on('treelistselect', function(e,item) {
|
||||||
var node = RED.nodes.node(item.id) || RED.nodes.group(item.id);
|
var node = RED.nodes.node(item.id) || RED.nodes.group(item.id) || RED.nodes.workspace(item.id) || RED.nodes.subflow(item.id);
|
||||||
if (node) {
|
if (node) {
|
||||||
if (node.type === 'group' || node._def.category !== "config") {
|
|
||||||
// RED.view.select({nodes:[node]})
|
|
||||||
} else if (node._def.category === "config") {
|
|
||||||
RED.sidebar.info.refresh(node);
|
RED.sidebar.info.refresh(node);
|
||||||
|
// if (node.type === 'group' || node._def.category !== "config") {
|
||||||
|
// // RED.view.select({nodes:[node]})
|
||||||
|
// } else if (node._def.category === "config") {
|
||||||
|
// RED.sidebar.info.refresh(node);
|
||||||
|
// } else {
|
||||||
|
// // RED.view.select({nodes:[]})
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
// RED.view.select({nodes:[]})
|
RED.sidebar.info.refresh(null);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
treeList.on('treelistconfirm', function(e,item) {
|
treeList.on('treelistconfirm', function(e,item) {
|
||||||
|
@ -163,6 +163,7 @@ RED.sidebar.info = (function() {
|
|||||||
});
|
});
|
||||||
return el;
|
return el;
|
||||||
}
|
}
|
||||||
|
|
||||||
function refresh(node) {
|
function refresh(node) {
|
||||||
if (node === undefined) {
|
if (node === undefined) {
|
||||||
refreshSelection();
|
refreshSelection();
|
||||||
@ -271,7 +272,7 @@ RED.sidebar.info = (function() {
|
|||||||
objectType = "group";
|
objectType = "group";
|
||||||
}
|
}
|
||||||
$(propRow.children()[0]).text(RED._("sidebar.info."+objectType))
|
$(propRow.children()[0]).text(RED._("sidebar.info."+objectType))
|
||||||
RED.utils.createObjectElement(node.id).appendTo(propRow.children()[1]);
|
RED.utils.createObjectElement(node.id,{sourceId: node.id}).appendTo(propRow.children()[1]);
|
||||||
|
|
||||||
if (node.type === "tab" || node.type === "subflow") {
|
if (node.type === "tab" || node.type === "subflow") {
|
||||||
// If nothing is selected, but we're on a flow or subflow tab.
|
// If nothing is selected, but we're on a flow or subflow tab.
|
||||||
@ -301,8 +302,8 @@ RED.sidebar.info = (function() {
|
|||||||
if (typeCounts.groups > 0) {
|
if (typeCounts.groups > 0) {
|
||||||
$('<div>').text(RED._("clipboard.group",{count:typeCounts.groups})).appendTo(counts);
|
$('<div>').text(RED._("clipboard.group",{count:typeCounts.groups})).appendTo(counts);
|
||||||
}
|
}
|
||||||
|
} else if (node.type === 'junction') {
|
||||||
|
propertiesPanelHeaderHelp.hide();
|
||||||
} else {
|
} else {
|
||||||
propertiesPanelHeaderHelp.show();
|
propertiesPanelHeaderHelp.show();
|
||||||
|
|
||||||
@ -365,7 +366,7 @@ RED.sidebar.info = (function() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
RED.utils.createObjectElement(val).appendTo(propRow.children()[1]);
|
RED.utils.createObjectElement(val,{sourceId: node.id}).appendTo(propRow.children()[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -431,6 +432,7 @@ RED.sidebar.info = (function() {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setInfoText(infoText,target) {
|
function setInfoText(infoText,target) {
|
||||||
var info = addTargetToExternalLinks($('<div class="red-ui-help"><span class="red-ui-text-bidi-aware" dir=\"'+RED.text.bidi.resolveBaseTextDir(infoText)+'">'+infoText+'</span></div>')).appendTo(target);
|
var info = addTargetToExternalLinks($('<div class="red-ui-help"><span class="red-ui-text-bidi-aware" dir=\"'+RED.text.bidi.resolveBaseTextDir(infoText)+'">'+infoText+'</span></div>')).appendTo(target);
|
||||||
info.find(".red-ui-text-bidi-aware").contents().filter(function() { return this.nodeType === 3 && this.textContent.trim() !== "" }).wrap( "<span></span>" );
|
info.find(".red-ui-text-bidi-aware").contents().filter(function() { return this.nodeType === 3 && this.textContent.trim() !== "" }).wrap( "<span></span>" );
|
||||||
@ -447,6 +449,7 @@ RED.sidebar.info = (function() {
|
|||||||
$(this).toggleClass('expanded',!isExpanded);
|
$(this).toggleClass('expanded',!isExpanded);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
var tips = (function() {
|
var tips = (function() {
|
||||||
var enabled = true;
|
var enabled = true;
|
||||||
var startDelay = 1000;
|
var startDelay = 1000;
|
||||||
|
@ -171,17 +171,21 @@ RED.typeSearch = (function() {
|
|||||||
var div = $('<div>',{class:"red-ui-search-result"}).appendTo(container);
|
var div = $('<div>',{class:"red-ui-search-result"}).appendTo(container);
|
||||||
|
|
||||||
var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).appendTo(div);
|
var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).appendTo(div);
|
||||||
|
if (object.type === "junction") {
|
||||||
|
nodeDiv.addClass("red-ui-palette-icon-junction");
|
||||||
|
} else {
|
||||||
var colour = RED.utils.getNodeColor(object.type,def);
|
var colour = RED.utils.getNodeColor(object.type,def);
|
||||||
var icon_url = RED.utils.getNodeIcon(def);
|
|
||||||
nodeDiv.css('backgroundColor',colour);
|
nodeDiv.css('backgroundColor',colour);
|
||||||
|
}
|
||||||
|
var icon_url = RED.utils.getNodeIcon(def);
|
||||||
|
|
||||||
var iconContainer = $('<div/>',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv);
|
var iconContainer = $('<div/>',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv);
|
||||||
RED.utils.createIconElement(icon_url, iconContainer, false);
|
RED.utils.createIconElement(icon_url, iconContainer, false);
|
||||||
|
|
||||||
if (def.inputs > 0) {
|
if (object.type !== "junction" && def.inputs > 0) {
|
||||||
$('<div/>',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv);
|
$('<div/>',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv);
|
||||||
}
|
}
|
||||||
if (def.outputs > 0) {
|
if (object.type !== "junction" && def.outputs > 0) {
|
||||||
$('<div/>',{class:"red-ui-search-result-node-port red-ui-search-result-node-output"}).appendTo(nodeDiv);
|
$('<div/>',{class:"red-ui-search-result-node-port red-ui-search-result-node-output"}).appendTo(nodeDiv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,8 +317,8 @@ RED.typeSearch = (function() {
|
|||||||
return !filter ||
|
return !filter ||
|
||||||
(
|
(
|
||||||
(!filter.type || type === filter.type) &&
|
(!filter.type || type === filter.type) &&
|
||||||
(!filter.input || def.inputs > 0) &&
|
(!filter.input || type === 'junction' || def.inputs > 0) &&
|
||||||
(!filter.output || def.outputs > 0)
|
(!filter.output || type === 'junction' || def.outputs > 0)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
function refreshTypeList(opts) {
|
function refreshTypeList(opts) {
|
||||||
@ -323,7 +327,7 @@ RED.typeSearch = (function() {
|
|||||||
searchInput.searchBox('value','').focus();
|
searchInput.searchBox('value','').focus();
|
||||||
selected = -1;
|
selected = -1;
|
||||||
var common = [
|
var common = [
|
||||||
'inject','debug','function','change','switch'
|
'inject','debug','function','change','switch','junction'
|
||||||
].filter(function(t) { return applyFilter(opts.filter,t,RED.nodes.getType(t)); });
|
].filter(function(t) { return applyFilter(opts.filter,t,RED.nodes.getType(t)); });
|
||||||
|
|
||||||
var recentlyUsed = Object.keys(typesUsed);
|
var recentlyUsed = Object.keys(typesUsed);
|
||||||
@ -348,6 +352,9 @@ RED.typeSearch = (function() {
|
|||||||
var index = 0;
|
var index = 0;
|
||||||
for(i=0;i<common.length;i++) {
|
for(i=0;i<common.length;i++) {
|
||||||
var itemDef = RED.nodes.getType(common[i]);
|
var itemDef = RED.nodes.getType(common[i]);
|
||||||
|
if (common[i] === 'junction') {
|
||||||
|
itemDef = { inputs:1, outputs: 1, label: 'junction', type: 'junction'}
|
||||||
|
}
|
||||||
if (itemDef) {
|
if (itemDef) {
|
||||||
item = {
|
item = {
|
||||||
type: common[i],
|
type: common[i],
|
||||||
|
@ -365,7 +365,16 @@ RED.utils = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildMessageElement(obj,options) {
|
/**
|
||||||
|
* Create a DOM element representation of obj - as used by Debug sidebar etc
|
||||||
|
*
|
||||||
|
* @params obj - the data to display
|
||||||
|
* @params options - a bag of options
|
||||||
|
*
|
||||||
|
* - If you want the Copy Value button, then set `sourceId`
|
||||||
|
* - If you want the Copy Path button, also set `path` to the value to be copied
|
||||||
|
*/
|
||||||
|
function createObjectElement(obj,options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
var key = options.key;
|
var key = options.key;
|
||||||
var typeHint = options.typeHint;
|
var typeHint = options.typeHint;
|
||||||
@ -555,7 +564,7 @@ RED.utils = (function() {
|
|||||||
if (fullLength <= 10) {
|
if (fullLength <= 10) {
|
||||||
for (i=0;i<fullLength;i++) {
|
for (i=0;i<fullLength;i++) {
|
||||||
row = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(arrayRows);
|
row = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(arrayRows);
|
||||||
subElements[path+"["+i+"]"] = buildMessageElement(
|
subElements[path+"["+i+"]"] = createObjectElement(
|
||||||
data[i],
|
data[i],
|
||||||
{
|
{
|
||||||
key: ""+i,
|
key: ""+i,
|
||||||
@ -585,7 +594,7 @@ RED.utils = (function() {
|
|||||||
return function() {
|
return function() {
|
||||||
for (var i=min;i<=max;i++) {
|
for (var i=min;i<=max;i++) {
|
||||||
var row = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(parent);
|
var row = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(parent);
|
||||||
subElements[path+"["+i+"]"] = buildMessageElement(
|
subElements[path+"["+i+"]"] = createObjectElement(
|
||||||
data[i],
|
data[i],
|
||||||
{
|
{
|
||||||
key: ""+i,
|
key: ""+i,
|
||||||
@ -641,7 +650,7 @@ RED.utils = (function() {
|
|||||||
newPath += "[\""+keys[i].replace(/"/,"\\\"")+"\"]"
|
newPath += "[\""+keys[i].replace(/"/,"\\\"")+"\"]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
subElements[newPath] = buildMessageElement(
|
subElements[newPath] = createObjectElement(
|
||||||
data[keys[i]],
|
data[keys[i]],
|
||||||
{
|
{
|
||||||
key: keys[i],
|
key: keys[i],
|
||||||
@ -1019,6 +1028,8 @@ RED.utils = (function() {
|
|||||||
return "font-awesome/fa-object-ungroup";
|
return "font-awesome/fa-object-ungroup";
|
||||||
} else if (node && node.type === 'group') {
|
} else if (node && node.type === 'group') {
|
||||||
return "font-awesome/fa-object-group"
|
return "font-awesome/fa-object-group"
|
||||||
|
} else if ((node && node.type === 'junction') || (def.type === "junction") ) {
|
||||||
|
return "font-awesome/fa-circle-o"
|
||||||
} else if (def.category === 'config') {
|
} else if (def.category === 'config') {
|
||||||
return RED.settings.apiRootUrl+"icons/node-red/cog.svg"
|
return RED.settings.apiRootUrl+"icons/node-red/cog.svg"
|
||||||
} else if (node && node.type === 'tab') {
|
} else if (node && node.type === 'tab') {
|
||||||
@ -1084,6 +1095,8 @@ RED.utils = (function() {
|
|||||||
l = node.label || defaultLabel
|
l = node.label || defaultLabel
|
||||||
} else if (node.type === 'group') {
|
} else if (node.type === 'group') {
|
||||||
l = node.name || defaultLabel
|
l = node.name || defaultLabel
|
||||||
|
} else if (node.type === 'junction') {
|
||||||
|
l = 'junction'
|
||||||
} else {
|
} else {
|
||||||
l = node._def.label;
|
l = node._def.label;
|
||||||
try {
|
try {
|
||||||
@ -1096,6 +1109,18 @@ RED.utils = (function() {
|
|||||||
return RED.text.bidi.enforceTextDirectionWithUCC(l);
|
return RED.text.bidi.enforceTextDirectionWithUCC(l);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getPaletteLabel(nodeType, def) {
|
||||||
|
var label = nodeType;
|
||||||
|
if (typeof def.paletteLabel !== "undefined") {
|
||||||
|
try {
|
||||||
|
label = (typeof def.paletteLabel === "function" ? def.paletteLabel.call(def) : def.paletteLabel)||"";
|
||||||
|
} catch(err) {
|
||||||
|
console.log("Definition error: "+nodeType+".paletteLabel",err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return label
|
||||||
|
}
|
||||||
|
|
||||||
var nodeColorCache = {};
|
var nodeColorCache = {};
|
||||||
function clearNodeColorCache() {
|
function clearNodeColorCache() {
|
||||||
nodeColorCache = {};
|
nodeColorCache = {};
|
||||||
@ -1238,6 +1263,8 @@ RED.utils = (function() {
|
|||||||
nodeDiv.addClass("red-ui-palette-icon-selection");
|
nodeDiv.addClass("red-ui-palette-icon-selection");
|
||||||
} else if (node.type === "group") {
|
} else if (node.type === "group") {
|
||||||
nodeDiv.addClass("red-ui-palette-icon-group");
|
nodeDiv.addClass("red-ui-palette-icon-group");
|
||||||
|
} else if (node.type === "junction") {
|
||||||
|
nodeDiv.addClass("red-ui-palette-icon-junction");
|
||||||
} else if (node.type === 'tab') {
|
} else if (node.type === 'tab') {
|
||||||
nodeDiv.addClass("red-ui-palette-icon-flow");
|
nodeDiv.addClass("red-ui-palette-icon-flow");
|
||||||
} else {
|
} else {
|
||||||
@ -1369,7 +1396,7 @@ RED.utils = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
createObjectElement: buildMessageElement,
|
createObjectElement: createObjectElement,
|
||||||
getMessageProperty: getMessageProperty,
|
getMessageProperty: getMessageProperty,
|
||||||
setMessageProperty: setMessageProperty,
|
setMessageProperty: setMessageProperty,
|
||||||
normalisePropertyExpression: normalisePropertyExpression,
|
normalisePropertyExpression: normalisePropertyExpression,
|
||||||
@ -1379,6 +1406,7 @@ RED.utils = (function() {
|
|||||||
getNodeIcon: getNodeIcon,
|
getNodeIcon: getNodeIcon,
|
||||||
getNodeLabel: getNodeLabel,
|
getNodeLabel: getNodeLabel,
|
||||||
getNodeColor: getNodeColor,
|
getNodeColor: getNodeColor,
|
||||||
|
getPaletteLabel: getPaletteLabel,
|
||||||
clearNodeColorCache: clearNodeColorCache,
|
clearNodeColorCache: clearNodeColorCache,
|
||||||
addSpinnerOverlay: addSpinnerOverlay,
|
addSpinnerOverlay: addSpinnerOverlay,
|
||||||
decodeObject: decodeObject,
|
decodeObject: decodeObject,
|
||||||
|
@ -809,6 +809,244 @@ RED.view.tools = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Splits selected wires and re-joins them with link-out+link-in
|
||||||
|
* @param {Object || Object[]} wires The wire(s) to split and replace with link-out, link-in nodes.
|
||||||
|
*/
|
||||||
|
function splitWiresWithLinkNodes(wires) {
|
||||||
|
let wiresToSplit = wires || RED.view.selection().links;
|
||||||
|
if (!Array.isArray(wiresToSplit)) {
|
||||||
|
wiresToSplit = [wiresToSplit];
|
||||||
|
}
|
||||||
|
if (wiresToSplit.length < 1) {
|
||||||
|
return; //nothing selected
|
||||||
|
}
|
||||||
|
|
||||||
|
const history = {
|
||||||
|
t: 'multi',
|
||||||
|
events: [],
|
||||||
|
dirty: RED.nodes.dirty()
|
||||||
|
}
|
||||||
|
const nodeSrcMap = {};
|
||||||
|
const nodeTrgMap = {};
|
||||||
|
const _gridSize = RED.view.gridSize();
|
||||||
|
|
||||||
|
for (let wireIdx = 0; wireIdx < wiresToSplit.length; wireIdx++) {
|
||||||
|
const wire = wiresToSplit[wireIdx];
|
||||||
|
|
||||||
|
//get source and target nodes of this wire link
|
||||||
|
const nSrc = wire.source;
|
||||||
|
const nTrg = wire.target;
|
||||||
|
|
||||||
|
var updateNewNodePosXY = function (origNode, newNode, alignLeft, snap, yOffset) {
|
||||||
|
const nnSize = RED.view.calculateNodeDimensions(newNode);
|
||||||
|
newNode.w = nnSize[0];
|
||||||
|
newNode.h = nnSize[1];
|
||||||
|
const coords = { x: origNode.x || 0, y: origNode.y || 0, w: origNode.w || RED.view.node_width, h: origNode.h || RED.view.node_height };
|
||||||
|
const x = coords.x - (coords.w/2.0);
|
||||||
|
if (alignLeft) {
|
||||||
|
coords.x = x - _gridSize - (newNode.w/2.0);
|
||||||
|
} else {
|
||||||
|
coords.x = x + coords.w + _gridSize + (newNode.w/2.0);
|
||||||
|
}
|
||||||
|
newNode.x = coords.x;
|
||||||
|
newNode.y = coords.y;
|
||||||
|
if (snap !== false) {
|
||||||
|
const offsets = RED.view.tools.calculateGridSnapOffsets(newNode);
|
||||||
|
newNode.x -= offsets.x;
|
||||||
|
newNode.y -= offsets.y;
|
||||||
|
}
|
||||||
|
newNode.y += (yOffset || 0);
|
||||||
|
}
|
||||||
|
const srcPort = (wire.sourcePort || 0);
|
||||||
|
let linkOutMapId = nSrc.id + ':' + srcPort;
|
||||||
|
let nnLinkOut = nodeSrcMap[linkOutMapId];
|
||||||
|
//Create a Link Out if one is not already present
|
||||||
|
if(!nnLinkOut) {
|
||||||
|
const nLinkOut = RED.view.createNode("link out"); //create link node
|
||||||
|
nnLinkOut = nLinkOut.node;
|
||||||
|
nodeSrcMap[linkOutMapId] = nnLinkOut;
|
||||||
|
let yOffset = 0;
|
||||||
|
if(nSrc.outputs > 1) {
|
||||||
|
|
||||||
|
const CENTER_PORT = (((nSrc.outputs-1) / 2) + 1);
|
||||||
|
const offsetCount = Math.abs(CENTER_PORT - (srcPort + 1));
|
||||||
|
yOffset = (_gridSize * 2 * offsetCount);
|
||||||
|
if((srcPort + 1) < CENTER_PORT) {
|
||||||
|
yOffset = -yOffset;
|
||||||
|
}
|
||||||
|
updateNewNodePosXY(nSrc, nnLinkOut, false, false, yOffset);
|
||||||
|
} else {
|
||||||
|
updateNewNodePosXY(nSrc, nnLinkOut, false, RED.view.snapGrid, yOffset);
|
||||||
|
}
|
||||||
|
//add created node
|
||||||
|
RED.nodes.add(nnLinkOut);
|
||||||
|
RED.editor.validateNode(nnLinkOut);
|
||||||
|
history.events.push(nLinkOut.historyEvent);
|
||||||
|
//connect node to link node
|
||||||
|
const link = {
|
||||||
|
source: nSrc,
|
||||||
|
sourcePort: wire.sourcePort || 0,
|
||||||
|
target: nnLinkOut
|
||||||
|
};
|
||||||
|
RED.nodes.addLink(link);
|
||||||
|
history.events.push({
|
||||||
|
t: 'add',
|
||||||
|
links: [link],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
let nnLinkIn = nodeTrgMap[nTrg.id];
|
||||||
|
//Create a Link In if one is not already present
|
||||||
|
if(!nnLinkIn) {
|
||||||
|
const nLinkIn = RED.view.createNode("link in"); //create link node
|
||||||
|
nnLinkIn = nLinkIn.node;
|
||||||
|
nodeTrgMap[nTrg.id] = nnLinkIn;
|
||||||
|
updateNewNodePosXY(nTrg, nnLinkIn, true, RED.view.snapGrid, 0);
|
||||||
|
//add created node
|
||||||
|
RED.nodes.add(nnLinkIn);
|
||||||
|
RED.editor.validateNode(nnLinkIn);
|
||||||
|
history.events.push(nLinkIn.historyEvent);
|
||||||
|
//connect node to link node
|
||||||
|
const link = {
|
||||||
|
source: nnLinkIn,
|
||||||
|
sourcePort: 0,
|
||||||
|
target: nTrg
|
||||||
|
};
|
||||||
|
RED.nodes.addLink(link);
|
||||||
|
history.events.push({
|
||||||
|
t: 'add',
|
||||||
|
links: [link],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//connect the link out/link in virtual wires
|
||||||
|
if(nnLinkIn.links.indexOf(nnLinkOut.id) == -1) {
|
||||||
|
nnLinkIn.links.push(nnLinkOut.id);
|
||||||
|
}
|
||||||
|
if(nnLinkOut.links.indexOf(nnLinkIn.id) == -1) {
|
||||||
|
nnLinkOut.links.push(nnLinkIn.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
//delete the original wire
|
||||||
|
RED.nodes.removeLink(wire);
|
||||||
|
history.events.push({
|
||||||
|
t: "delete",
|
||||||
|
links: [wire]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//add all history events to stack
|
||||||
|
RED.history.push(history);
|
||||||
|
|
||||||
|
//select all downstream of new link-in nodes so user can drag to new location
|
||||||
|
RED.view.clearSelection();
|
||||||
|
RED.view.select({nodes: Object.values(nodeTrgMap) });
|
||||||
|
selectConnected("down");
|
||||||
|
|
||||||
|
//update the view
|
||||||
|
RED.nodes.dirty(true);
|
||||||
|
RED.view.redraw(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculate the required offsets to snap a node
|
||||||
|
* @param {Object} node The node to calculate grid snap offsets for
|
||||||
|
* @param {Object} [options] Options: `align` can be "nearest", "left" or "right"
|
||||||
|
* @returns `{x:number, y:number}` as the offsets to deduct from `x` and `y`
|
||||||
|
*/
|
||||||
|
function calculateGridSnapOffsets(node, options) {
|
||||||
|
options = options || { align: "nearest" };
|
||||||
|
const gridOffset = { x: 0, y: 0 };
|
||||||
|
const gridSize = RED.view.gridSize();
|
||||||
|
const offsetLeft = node.x - (gridSize * Math.round((node.x - node.w / 2) / gridSize) + node.w / 2);
|
||||||
|
const offsetRight = node.x - (gridSize * Math.round((node.x + node.w / 2) / gridSize) - node.w / 2);
|
||||||
|
gridOffset.x = offsetRight;
|
||||||
|
if (options.align === "right") {
|
||||||
|
//skip - already set to right
|
||||||
|
} else if (options.align === "left" || Math.abs(offsetLeft) < Math.abs(offsetRight)) {
|
||||||
|
gridOffset.x = offsetLeft;
|
||||||
|
}
|
||||||
|
gridOffset.y = node.y - (gridSize * Math.round(node.y / gridSize));
|
||||||
|
return gridOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate names for the select nodes.
|
||||||
|
* - it only sets the name if it is currently blank
|
||||||
|
* - it uses `<paletteLabel> <N>` - where N is the next available integer that
|
||||||
|
* doesn't clash with any existing nodes of that type
|
||||||
|
* @param {Object} node The node to set the name of - if not provided, uses current selection
|
||||||
|
*/
|
||||||
|
function generateNodeNames(node, options) {
|
||||||
|
options = options || {
|
||||||
|
renameBlank: true,
|
||||||
|
renameClash: true,
|
||||||
|
generateHistory: true
|
||||||
|
}
|
||||||
|
let nodes = node;
|
||||||
|
if (node) {
|
||||||
|
if (!Array.isArray(node)) {
|
||||||
|
nodes = [ node ]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
nodes = RED.view.selection().nodes;
|
||||||
|
}
|
||||||
|
if (nodes && nodes.length > 0) {
|
||||||
|
// Generate history event if using the workspace selection,
|
||||||
|
// or if the provided node already exists
|
||||||
|
const generateHistory = options.generateHistory && (!node || !!RED.nodes.node(node.id))
|
||||||
|
const historyEvents = []
|
||||||
|
const typeIndex = {}
|
||||||
|
let changed = false;
|
||||||
|
nodes.forEach(n => {
|
||||||
|
const nodeDef = n._def || RED.nodes.getType(n.type)
|
||||||
|
if (nodeDef && nodeDef.defaults && nodeDef.defaults.name) {
|
||||||
|
const paletteLabel = RED.utils.getPaletteLabel(n.type, nodeDef)
|
||||||
|
const defaultNodeNameRE = new RegExp('^'+paletteLabel+' (\\d+)$')
|
||||||
|
if (!typeIndex.hasOwnProperty(n.type)) {
|
||||||
|
const existingNodes = RED.nodes.filterNodes({type: n.type})
|
||||||
|
let maxNameNumber = 0;
|
||||||
|
existingNodes.forEach(n => {
|
||||||
|
let match = defaultNodeNameRE.exec(n.name)
|
||||||
|
if (match) {
|
||||||
|
let nodeNumber = parseInt(match[1])
|
||||||
|
if (nodeNumber > maxNameNumber) {
|
||||||
|
maxNameNumber = nodeNumber
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
typeIndex[n.type] = maxNameNumber + 1
|
||||||
|
}
|
||||||
|
if ((options.renameBlank && n.name === '') || (options.renameClash && defaultNodeNameRE.test(n.name))) {
|
||||||
|
if (generateHistory) {
|
||||||
|
historyEvents.push({
|
||||||
|
t:'edit',
|
||||||
|
node: n,
|
||||||
|
changes: { name: n.name },
|
||||||
|
dirty: RED.nodes.dirty(),
|
||||||
|
changed: n.changed
|
||||||
|
})
|
||||||
|
}
|
||||||
|
n.name = paletteLabel+" "+typeIndex[n.type]
|
||||||
|
n.dirty = true
|
||||||
|
typeIndex[n.type]++
|
||||||
|
changed = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (changed) {
|
||||||
|
if (historyEvents.length > 0) {
|
||||||
|
RED.history.push({
|
||||||
|
t: 'multi',
|
||||||
|
events: historyEvents
|
||||||
|
})
|
||||||
|
}
|
||||||
|
RED.nodes.dirty(true)
|
||||||
|
RED.view.redraw()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
init: function() {
|
init: function() {
|
||||||
RED.actions.add("core:show-selected-node-labels", function() { setSelectedNodeLabelState(true); })
|
RED.actions.add("core:show-selected-node-labels", function() { setSelectedNodeLabelState(true); })
|
||||||
@ -870,6 +1108,10 @@ RED.view.tools = (function() {
|
|||||||
RED.actions.add("core:wire-series-of-nodes", function() { wireSeriesOfNodes() })
|
RED.actions.add("core:wire-series-of-nodes", function() { wireSeriesOfNodes() })
|
||||||
RED.actions.add("core:wire-node-to-multiple", function() { wireNodeToMultiple() })
|
RED.actions.add("core:wire-node-to-multiple", function() { wireNodeToMultiple() })
|
||||||
|
|
||||||
|
RED.actions.add("core:split-wire-with-link-nodes", function () { splitWiresWithLinkNodes() });
|
||||||
|
|
||||||
|
RED.actions.add("core:generate-node-names", generateNodeNames )
|
||||||
|
|
||||||
// RED.actions.add("core:add-node", function() { addNode() })
|
// RED.actions.add("core:add-node", function() { addNode() })
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -881,7 +1123,8 @@ RED.view.tools = (function() {
|
|||||||
* @param {Number} dx
|
* @param {Number} dx
|
||||||
* @param {Number} dy
|
* @param {Number} dy
|
||||||
*/
|
*/
|
||||||
moveSelection: moveSelection
|
moveSelection: moveSelection,
|
||||||
|
calculateGridSnapOffsets: calculateGridSnapOffsets
|
||||||
}
|
}
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -24,6 +24,9 @@ RED.workspaces = (function() {
|
|||||||
var hideStack = [];
|
var hideStack = [];
|
||||||
var viewStackPos = 0;
|
var viewStackPos = 0;
|
||||||
|
|
||||||
|
let flashingTab;
|
||||||
|
let flashingTabTimer;
|
||||||
|
|
||||||
function addToViewStack(id) {
|
function addToViewStack(id) {
|
||||||
if (viewStackPos !== viewStack.length) {
|
if (viewStackPos !== viewStack.length) {
|
||||||
viewStack.splice(viewStackPos);
|
viewStack.splice(viewStackPos);
|
||||||
@ -428,6 +431,9 @@ RED.workspaces = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
RED.actions.add("core:list-modified-nodes",function() {
|
||||||
|
RED.actions.invoke("core:search","is:modified ");
|
||||||
|
})
|
||||||
RED.actions.add("core:list-hidden-flows",function() {
|
RED.actions.add("core:list-hidden-flows",function() {
|
||||||
RED.actions.invoke("core:search","is:hidden ");
|
RED.actions.invoke("core:search","is:hidden ");
|
||||||
})
|
})
|
||||||
@ -528,6 +534,31 @@ RED.workspaces = (function() {
|
|||||||
workspace_tabs.order(order);
|
workspace_tabs.order(order);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function flashTab(tabId) {
|
||||||
|
if(flashingTab && flashingTab.length) {
|
||||||
|
//cancel current flashing node before flashing new node
|
||||||
|
clearInterval(flashingTabTimer);
|
||||||
|
flashingTabTimer = null;
|
||||||
|
flashingTab.removeClass('highlighted');
|
||||||
|
flashingTab = null;
|
||||||
|
}
|
||||||
|
let tab = $("#red-ui-tab-" + tabId);
|
||||||
|
if(!tab || !tab.length) { return; }
|
||||||
|
|
||||||
|
flashingTabTimer = setInterval(function(flashEndTime) {
|
||||||
|
if (flashEndTime >= Date.now()) {
|
||||||
|
const highlighted = tab.hasClass("highlighted");
|
||||||
|
tab.toggleClass('highlighted', !highlighted)
|
||||||
|
} else {
|
||||||
|
clearInterval(flashingTabTimer);
|
||||||
|
flashingTabTimer = null;
|
||||||
|
flashingTab = null;
|
||||||
|
tab.removeClass('highlighted');
|
||||||
|
}
|
||||||
|
}, 100, Date.now() + 2200);
|
||||||
|
flashingTab = tab;
|
||||||
|
tab.addClass('highlighted');
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
init: init,
|
init: init,
|
||||||
add: addWorkspace,
|
add: addWorkspace,
|
||||||
@ -560,7 +591,7 @@ RED.workspaces = (function() {
|
|||||||
isHidden: function(id) {
|
isHidden: function(id) {
|
||||||
return hideStack.includes(id)
|
return hideStack.includes(id)
|
||||||
},
|
},
|
||||||
show: function(id,skipStack,unhideOnly) {
|
show: function(id,skipStack,unhideOnly,flash) {
|
||||||
if (!workspace_tabs.contains(id)) {
|
if (!workspace_tabs.contains(id)) {
|
||||||
var sf = RED.nodes.subflow(id);
|
var sf = RED.nodes.subflow(id);
|
||||||
if (sf) {
|
if (sf) {
|
||||||
@ -582,6 +613,9 @@ RED.workspaces = (function() {
|
|||||||
}
|
}
|
||||||
workspace_tabs.activateTab(id);
|
workspace_tabs.activateTab(id);
|
||||||
}
|
}
|
||||||
|
if(flash) {
|
||||||
|
flashTab(id.replace(".","-"))
|
||||||
|
}
|
||||||
},
|
},
|
||||||
refresh: function() {
|
refresh: function() {
|
||||||
RED.nodes.eachWorkspace(function(ws) {
|
RED.nodes.eachWorkspace(function(ws) {
|
||||||
|
@ -118,13 +118,10 @@ RED.user = (function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
} else if (data.type == "strategy") {
|
} else if (data.type == "strategy") {
|
||||||
i = 0;
|
|
||||||
for (;i<data.prompts.length;i++) {
|
|
||||||
var field = data.prompts[i];
|
|
||||||
var sessionMessage = /[?&]session_message=(.*?)(?:$|&)/.exec(window.location.search);
|
var sessionMessage = /[?&]session_message=(.*?)(?:$|&)/.exec(window.location.search);
|
||||||
if (sessionMessage) {
|
|
||||||
RED.sessionMessages = RED.sessionMessages || [];
|
RED.sessionMessages = RED.sessionMessages || [];
|
||||||
RED.sessionMessages.push(sessionMessage[1]);
|
if (sessionMessage) {
|
||||||
|
RED.sessionMessages.push(decodeURIComponent(sessionMessage[1]));
|
||||||
if (history.pushState) {
|
if (history.pushState) {
|
||||||
var newurl = window.location.protocol+"//"+window.location.host+window.location.pathname
|
var newurl = window.location.protocol+"//"+window.location.host+window.location.pathname
|
||||||
window.history.replaceState({ path: newurl }, "", newurl);
|
window.history.replaceState({ path: newurl }, "", newurl);
|
||||||
@ -132,6 +129,15 @@ RED.user = (function() {
|
|||||||
window.location.search = "";
|
window.location.search = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (RED.sessionMessages.length === 0 && data.autoLogin) {
|
||||||
|
document.location = data.loginRedirect
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
for (;i<data.prompts.length;i++) {
|
||||||
|
var field = data.prompts[i];
|
||||||
if (RED.sessionMessages) {
|
if (RED.sessionMessages) {
|
||||||
var sessionMessages = $("<div/>",{class:"form-row",style:"text-align: center"}).appendTo("#node-dialog-login-fields");
|
var sessionMessages = $("<div/>",{class:"form-row",style:"text-align: center"}).appendTo("#node-dialog-login-fields");
|
||||||
RED.sessionMessages.forEach(function (msg) {
|
RED.sessionMessages.forEach(function (msg) {
|
||||||
|
@ -150,7 +150,8 @@ $popover-button-border-color-hover: #666;
|
|||||||
|
|
||||||
$diff-text-header-color: $secondary-text-color;
|
$diff-text-header-color: $secondary-text-color;
|
||||||
$diff-text-header-background: #ffd;
|
$diff-text-header-background: #ffd;
|
||||||
$diff-text-header-background-hover: #ffc;
|
$diff-state-color: $primary-text-color;
|
||||||
|
$diff-state-prefix-color: $secondary-text-color;
|
||||||
$diff-state-added: #009900;
|
$diff-state-added: #009900;
|
||||||
$diff-state-deleted: #f80000;
|
$diff-state-deleted: #f80000;
|
||||||
$diff-state-changed: #f89406;
|
$diff-state-changed: #f89406;
|
||||||
@ -193,7 +194,6 @@ $view-lasso-stroke: #ff7f0e;
|
|||||||
$view-lasso-fill: rgba(20,125,255,0.1);
|
$view-lasso-fill: rgba(20,125,255,0.1);
|
||||||
|
|
||||||
$view-background: $secondary-background;
|
$view-background: $secondary-background;
|
||||||
$view-select-mode-background: $secondary-background-selected;
|
|
||||||
$view-grid-color: #eee;
|
$view-grid-color: #eee;
|
||||||
|
|
||||||
$node-label-color: #333;
|
$node-label-color: #333;
|
||||||
|
@ -123,17 +123,20 @@
|
|||||||
background: $debug-message-background;
|
background: $debug-message-background;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: $secondary-text-color-inactive;
|
color: $secondary-text-color-inactive;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
}
|
}
|
||||||
.red-ui-debug-msg-date {
|
.red-ui-debug-msg-date {
|
||||||
padding: 1px 5px 1px 1px;
|
padding: 1px 10px 1px 0px;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.red-ui-debug-msg-topic {
|
.red-ui-debug-msg-topic {
|
||||||
display: block;
|
display: block;
|
||||||
color: $debug-message-text-color-meta;
|
color: $debug-message-text-color-meta;
|
||||||
}
|
}
|
||||||
.red-ui-debug-msg-name {
|
.red-ui-debug-msg-name {
|
||||||
padding: 1px 5px;
|
padding: 1px 0px;
|
||||||
color: $secondary-text-color-inactive;
|
color: $secondary-text-color-inactive;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.red-ui-debug-msg-tools {
|
.red-ui-debug-msg-tools {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -562,7 +562,7 @@ ul.red-ui-deploy-dialog-confirm-list {
|
|||||||
width: 30px;
|
width: 30px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: $secondary-text-color;
|
color: $diff-state-prefix-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.added {
|
&.added {
|
||||||
@ -577,9 +577,11 @@ ul.red-ui-deploy-dialog-confirm-list {
|
|||||||
}
|
}
|
||||||
td.added {
|
td.added {
|
||||||
background: $diff-state-added-background;
|
background: $diff-state-added-background;
|
||||||
|
color: $diff-state-color;
|
||||||
}
|
}
|
||||||
td.removed {
|
td.removed {
|
||||||
background: $diff-state-deleted-background;
|
background: $diff-state-deleted-background;
|
||||||
|
color: $diff-state-color;
|
||||||
}
|
}
|
||||||
tr.mergeHeader td {
|
tr.mergeHeader td {
|
||||||
color: $diff-merge-header-color;
|
color: $diff-merge-header-color;
|
||||||
@ -652,7 +654,7 @@ ul.red-ui-deploy-dialog-confirm-list {
|
|||||||
font-family: $monospace-font;
|
font-family: $monospace-font;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
color: $secondary-text-color;
|
color: $diff-text-header-color;
|
||||||
background: $diff-text-header-background;
|
background: $diff-text-header-background;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
@ -379,3 +379,17 @@ g.red-ui-flow-link-unknown path.red-ui-flow-link-line {
|
|||||||
white-space: pre;
|
white-space: pre;
|
||||||
@include disable-selection;
|
@include disable-selection;
|
||||||
}
|
}
|
||||||
|
.red-ui-flow-junction-background {
|
||||||
|
stroke: $node-border;
|
||||||
|
stroke-width: 1;
|
||||||
|
fill: $node-port-background;
|
||||||
|
cursor: crosshair;
|
||||||
|
}
|
||||||
|
.red-ui-flow-junction-hovered {
|
||||||
|
stroke: $port-selected-color;
|
||||||
|
fill: $port-selected-color;
|
||||||
|
}
|
||||||
|
.red-ui-flow-junction.selected .red-ui-flow-junction-background {
|
||||||
|
stroke: $port-selected-color;
|
||||||
|
// fill: $port-selected-color;
|
||||||
|
}
|
||||||
|
@ -26,6 +26,13 @@
|
|||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui-widget.ui-widget-content {
|
||||||
|
border: 1px solid $tertiary-border-color;
|
||||||
|
}
|
||||||
|
.ui-widget-content {
|
||||||
|
border: 1px solid $secondary-border-color;
|
||||||
|
}
|
||||||
|
|
||||||
.ui-widget-header {
|
.ui-widget-header {
|
||||||
color: $header-text-color;
|
color: $header-text-color;
|
||||||
}
|
}
|
||||||
|
@ -189,6 +189,7 @@
|
|||||||
.red-ui-search-result-node {
|
.red-ui-search-result-node {
|
||||||
&.red-ui-palette-icon-flow,
|
&.red-ui-palette-icon-flow,
|
||||||
&.red-ui-palette-icon-group,
|
&.red-ui-palette-icon-group,
|
||||||
|
&.red-ui-palette-icon-junction,
|
||||||
&.red-ui-palette-icon-selection {
|
&.red-ui-palette-icon-selection {
|
||||||
background: none;
|
background: none;
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
@ -268,6 +269,7 @@
|
|||||||
|
|
||||||
&.red-ui-palette-icon-flow,
|
&.red-ui-palette-icon-flow,
|
||||||
&.red-ui-palette-icon-group,
|
&.red-ui-palette-icon-group,
|
||||||
|
&.red-ui-palette-icon-junction,
|
||||||
&.red-ui-palette-icon-selection {
|
&.red-ui-palette-icon-selection {
|
||||||
background: none;
|
background: none;
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
@ -303,6 +305,7 @@
|
|||||||
&.red-ui-palette-icon-flow {
|
&.red-ui-palette-icon-flow {
|
||||||
margin-top: -2px;
|
margin-top: -2px;
|
||||||
}
|
}
|
||||||
|
&.red-ui-palette-icon-junction .red-ui-palette-icon-fa,
|
||||||
&.red-ui-palette-icon-group .red-ui-palette-icon-fa {
|
&.red-ui-palette-icon-group .red-ui-palette-icon-fa {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,20 @@
|
|||||||
border-radius:3px;
|
border-radius:3px;
|
||||||
padding: 1px 2px;
|
padding: 1px 2px;
|
||||||
}
|
}
|
||||||
|
.red-ui-popover {
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--red-ui-popover-color) !important;
|
||||||
|
}
|
||||||
|
a:hover,
|
||||||
|
a:focus {
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--red-ui-popover-color) !important;
|
||||||
|
}
|
||||||
|
a:focus {
|
||||||
|
outline: 1px solid $form-input-focus-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
.red-ui-popover a.red-ui-button,
|
.red-ui-popover a.red-ui-button,
|
||||||
.red-ui-popover button.red-ui-button {
|
.red-ui-popover button.red-ui-button {
|
||||||
&:not(.primary) {
|
&:not(.primary) {
|
||||||
|
@ -66,8 +66,9 @@
|
|||||||
border-left-width: 3px;
|
border-left-width: 3px;
|
||||||
border-right-width: 3px;
|
border-right-width: 3px;
|
||||||
.red-ui-palette-icon-fa {
|
.red-ui-palette-icon-fa {
|
||||||
|
font-size: 11px;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -2.5px;
|
top: -3px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,10 @@ ul.red-ui-sidebar-node-config-list {
|
|||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
box-shadow: 0 0 0 2px $node-selected-color;
|
box-shadow: 0 0 0 2px $node-selected-color;
|
||||||
}
|
}
|
||||||
|
&.highlighted {
|
||||||
|
border-color: transparent;
|
||||||
|
outline: dashed $node-selected-color 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.red-ui-palette-label {
|
.red-ui-palette-label {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
|
@ -85,6 +85,10 @@
|
|||||||
&:not(.active) a:hover+a.red-ui-tab-close {
|
&:not(.active) a:hover+a.red-ui-tab-close {
|
||||||
background: $tab-background-hover;
|
background: $tab-background-hover;
|
||||||
}
|
}
|
||||||
|
&.highlighted {
|
||||||
|
box-shadow: 0px 0px 4px 2px $node-selected-color;
|
||||||
|
border: dashed 1px $node-selected-color;
|
||||||
|
}
|
||||||
&.active {
|
&.active {
|
||||||
background: $tab-background-active;
|
background: $tab-background-active;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
@ -58,7 +58,6 @@
|
|||||||
.red-ui-workspace-select-mode {
|
.red-ui-workspace-select-mode {
|
||||||
.red-ui-workspace-chart-background {
|
.red-ui-workspace-chart-background {
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
// fill: $view-select-mode-background;
|
|
||||||
}
|
}
|
||||||
.red-ui-workspace-chart-grid line {
|
.red-ui-workspace-chart-grid line {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
@ -135,6 +134,13 @@
|
|||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-counter {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: smaller;
|
||||||
|
font-weight: 600;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a.red-ui-footer-button,
|
a.red-ui-footer-button,
|
||||||
|
@ -263,6 +263,20 @@ declare class global {
|
|||||||
static keys(store: string, callback: Function);
|
static keys(store: string, callback: Function);
|
||||||
}
|
}
|
||||||
declare class env {
|
declare class env {
|
||||||
/** Get an environment variable value */
|
/**
|
||||||
static get(name:string);
|
* Get an environment variable value
|
||||||
|
*
|
||||||
|
* Predefined node-red variables...
|
||||||
|
* * `NR_NODE_ID` - the ID of the node
|
||||||
|
* * `NR_NODE_NAME` - the Name of the node
|
||||||
|
* * `NR_NODE_PATH` - the Path of the node
|
||||||
|
* * `NR_GROUP_ID` - the ID of the containing group
|
||||||
|
* * `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
|
||||||
|
* @example
|
||||||
|
* ```const flowName = env.get("NR_FLOW_NAME");```
|
||||||
|
*/
|
||||||
|
static get(name:string) :string;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'assert' {
|
declare module 'assert' {
|
||||||
/** An alias of `assert.ok()`. */
|
/** An alias of `assert.ok()`. */
|
||||||
@ -125,3 +125,7 @@ declare module 'assert' {
|
|||||||
|
|
||||||
export = assert;
|
export = assert;
|
||||||
}
|
}
|
||||||
|
declare module 'node:assert' {
|
||||||
|
import assert = require('assert');
|
||||||
|
export = assert;
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Async Hooks module: https://nodejs.org/api/async_hooks.html
|
* Async Hooks module: https://nodejs.org/api/async_hooks.html
|
||||||
@ -227,3 +227,6 @@ declare module 'async_hooks' {
|
|||||||
enterWith(store: T): void;
|
enterWith(store: T): void;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
declare module 'node:async_hooks' {
|
||||||
|
export * from 'async_hooks';
|
||||||
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'buffer' {
|
declare module 'buffer' {
|
||||||
|
import { BinaryLike } from 'node:crypto';
|
||||||
export const INSPECT_MAX_BYTES: number;
|
export const INSPECT_MAX_BYTES: number;
|
||||||
export const kMaxLength: number;
|
export const kMaxLength: number;
|
||||||
export const kStringMaxLength: number;
|
export const kStringMaxLength: number;
|
||||||
@ -20,6 +21,72 @@ declare module 'buffer' {
|
|||||||
new(size: number): Buffer;
|
new(size: number): Buffer;
|
||||||
prototype: Buffer;
|
prototype: 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 v14.18.0
|
||||||
|
* @experimental
|
||||||
|
*/
|
||||||
|
export class Blob {
|
||||||
|
/**
|
||||||
|
* The total size of the `Blob` in bytes.
|
||||||
|
* @since v14.18.0
|
||||||
|
*/
|
||||||
|
readonly size: number;
|
||||||
|
/**
|
||||||
|
* The content-type of the `Blob`.
|
||||||
|
* @since 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<BinaryLike | Blob>, 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 v14.18.0
|
||||||
|
*/
|
||||||
|
arrayBuffer(): Promise<ArrayBuffer>;
|
||||||
|
/**
|
||||||
|
* Creates and returns a new `Blob` containing a subset of this `Blob` objects
|
||||||
|
* data. The original `Blob` is not altered.
|
||||||
|
* @since 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 v14.18.0
|
||||||
|
*/
|
||||||
|
text(): Promise<string>;
|
||||||
|
}
|
||||||
|
|
||||||
export { BuffType as Buffer };
|
export { BuffType as Buffer };
|
||||||
}
|
}
|
||||||
|
declare module 'node:buffer' {
|
||||||
|
export * from 'buffer';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'child_process' {
|
declare module 'child_process' {
|
||||||
import { BaseEncodingOptions } from 'fs';
|
import { BaseEncodingOptions } from 'fs';
|
||||||
@ -512,3 +512,6 @@ declare module 'child_process' {
|
|||||||
function execFileSync(command: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
|
function execFileSync(command: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
|
||||||
function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): string | Buffer;
|
function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): string | Buffer;
|
||||||
}
|
}
|
||||||
|
declare module 'node:child_process' {
|
||||||
|
export * from 'child_process';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'cluster' {
|
declare module 'cluster' {
|
||||||
import * as child from 'child_process';
|
import * as child from 'child_process';
|
||||||
@ -263,3 +263,6 @@ declare module 'cluster' {
|
|||||||
|
|
||||||
function eventNames(): string[];
|
function eventNames(): string[];
|
||||||
}
|
}
|
||||||
|
declare module 'node:cluster' {
|
||||||
|
export * from 'cluster';
|
||||||
|
}
|
||||||
|
@ -1,7 +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 */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'console' {
|
declare module 'console' {
|
||||||
|
import console = require('node:console');
|
||||||
|
export = console;
|
||||||
|
}
|
||||||
|
declare module 'node:console' {
|
||||||
import { InspectOptions } from 'util';
|
import { InspectOptions } from 'util';
|
||||||
|
|
||||||
global {
|
global {
|
||||||
@ -118,6 +122,11 @@ declare module 'console' {
|
|||||||
ignoreErrors?: boolean | undefined;
|
ignoreErrors?: boolean | undefined;
|
||||||
colorMode?: boolean | 'auto' | undefined;
|
colorMode?: boolean | 'auto' | undefined;
|
||||||
inspectOptions?: InspectOptions | undefined;
|
inspectOptions?: InspectOptions | undefined;
|
||||||
|
/**
|
||||||
|
* Set group indentation
|
||||||
|
* @default 2
|
||||||
|
*/
|
||||||
|
groupIndentation?: number | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ConsoleConstructor {
|
interface ConsoleConstructor {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'crypto' {
|
declare module 'crypto' {
|
||||||
import * as stream from 'stream';
|
import * as stream from 'stream';
|
||||||
@ -143,7 +143,7 @@ declare module 'crypto' {
|
|||||||
function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
|
function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
|
||||||
|
|
||||||
// https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
|
// https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
|
||||||
type BinaryToTextEncoding = 'base64' | 'hex';
|
type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex';
|
||||||
type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
|
type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
|
||||||
type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
|
type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
|
||||||
|
|
||||||
@ -517,7 +517,7 @@ declare module 'crypto' {
|
|||||||
key: BinaryLike,
|
key: BinaryLike,
|
||||||
curve: string,
|
curve: string,
|
||||||
inputEncoding?: BinaryToTextEncoding,
|
inputEncoding?: BinaryToTextEncoding,
|
||||||
outputEncoding?: 'latin1' | 'hex' | 'base64',
|
outputEncoding?: 'latin1' | 'hex' | 'base64' | 'base64url',
|
||||||
format?: 'uncompressed' | 'compressed' | 'hybrid',
|
format?: 'uncompressed' | 'compressed' | 'hybrid',
|
||||||
): Buffer | string;
|
): Buffer | string;
|
||||||
generateKeys(): Buffer;
|
generateKeys(): Buffer;
|
||||||
@ -1187,3 +1187,6 @@ declare module 'crypto' {
|
|||||||
*/
|
*/
|
||||||
function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
|
function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
|
||||||
}
|
}
|
||||||
|
declare module 'node:crypto' {
|
||||||
|
export * from 'crypto';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'dgram' {
|
declare module 'dgram' {
|
||||||
import { AddressInfo } from 'net';
|
import { AddressInfo } from 'net';
|
||||||
@ -40,11 +40,11 @@ declare module 'dgram' {
|
|||||||
class Socket extends EventEmitter {
|
class Socket extends EventEmitter {
|
||||||
addMembership(multicastAddress: string, multicastInterface?: string): void;
|
addMembership(multicastAddress: string, multicastInterface?: string): void;
|
||||||
address(): AddressInfo;
|
address(): AddressInfo;
|
||||||
bind(port?: number, address?: string, callback?: () => void): void;
|
bind(port?: number, address?: string, callback?: () => void): this;
|
||||||
bind(port?: number, callback?: () => void): void;
|
bind(port?: number, callback?: () => void): this;
|
||||||
bind(callback?: () => void): void;
|
bind(callback?: () => void): this;
|
||||||
bind(options: BindOptions, callback?: () => void): void;
|
bind(options: BindOptions, callback?: () => void): this;
|
||||||
close(callback?: () => void): void;
|
close(callback?: () => void): this;
|
||||||
connect(port: number, address?: string, callback?: () => void): void;
|
connect(port: number, address?: string, callback?: () => void): void;
|
||||||
connect(port: number, callback: () => void): void;
|
connect(port: number, callback: () => void): void;
|
||||||
disconnect(): void;
|
disconnect(): void;
|
||||||
@ -61,11 +61,11 @@ declare module 'dgram' {
|
|||||||
send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
|
send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
|
||||||
setBroadcast(flag: boolean): void;
|
setBroadcast(flag: boolean): void;
|
||||||
setMulticastInterface(multicastInterface: string): void;
|
setMulticastInterface(multicastInterface: string): void;
|
||||||
setMulticastLoopback(flag: boolean): void;
|
setMulticastLoopback(flag: boolean): boolean;
|
||||||
setMulticastTTL(ttl: number): void;
|
setMulticastTTL(ttl: number): number;
|
||||||
setRecvBufferSize(size: number): void;
|
setRecvBufferSize(size: number): void;
|
||||||
setSendBufferSize(size: number): void;
|
setSendBufferSize(size: number): void;
|
||||||
setTTL(ttl: number): void;
|
setTTL(ttl: number): number;
|
||||||
unref(): this;
|
unref(): this;
|
||||||
/**
|
/**
|
||||||
* Tells the kernel to join a source-specific multicast channel at the given
|
* Tells the kernel to join a source-specific multicast channel at the given
|
||||||
@ -142,3 +142,6 @@ declare module 'dgram' {
|
|||||||
prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
|
prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
declare module 'node:dgram' {
|
||||||
|
export * from 'dgram';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'dns' {
|
declare module 'dns' {
|
||||||
// Supported getaddrinfo flags.
|
// Supported getaddrinfo flags.
|
||||||
@ -253,6 +253,8 @@ declare module 'dns' {
|
|||||||
function setServers(servers: ReadonlyArray<string>): void;
|
function setServers(servers: ReadonlyArray<string>): void;
|
||||||
function getServers(): string[];
|
function getServers(): string[];
|
||||||
|
|
||||||
|
function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
|
||||||
|
|
||||||
// Error codes
|
// Error codes
|
||||||
const NODATA: string;
|
const NODATA: string;
|
||||||
const FORMERR: string;
|
const FORMERR: string;
|
||||||
@ -359,6 +361,8 @@ declare module 'dns' {
|
|||||||
|
|
||||||
function setServers(servers: ReadonlyArray<string>): void;
|
function setServers(servers: ReadonlyArray<string>): void;
|
||||||
|
|
||||||
|
function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
|
||||||
|
|
||||||
class Resolver {
|
class Resolver {
|
||||||
constructor(options?: ResolverOptions);
|
constructor(options?: ResolverOptions);
|
||||||
cancel(): void;
|
cancel(): void;
|
||||||
@ -381,3 +385,6 @@ declare module 'dns' {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
declare module 'node:dns' {
|
||||||
|
export * from 'dns';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'domain' {
|
declare module 'domain' {
|
||||||
import EventEmitter = require('events');
|
import EventEmitter = require('events');
|
||||||
@ -25,3 +25,6 @@ declare module 'domain' {
|
|||||||
|
|
||||||
function create(): Domain;
|
function create(): Domain;
|
||||||
}
|
}
|
||||||
|
declare module 'node:domain' {
|
||||||
|
export * from 'domain';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'events' {
|
declare module 'events' {
|
||||||
interface EventEmitterOptions {
|
interface EventEmitterOptions {
|
||||||
@ -79,3 +79,7 @@ declare module 'events' {
|
|||||||
|
|
||||||
export = EventEmitter;
|
export = EventEmitter;
|
||||||
}
|
}
|
||||||
|
declare module 'node:events' {
|
||||||
|
import events = require('events');
|
||||||
|
export = events;
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'fs' {
|
declare module 'fs' {
|
||||||
import * as stream from 'stream';
|
import * as stream from 'stream';
|
||||||
@ -146,7 +146,7 @@ declare module 'fs' {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class ReadStream extends stream.Readable {
|
export class ReadStream extends stream.Readable {
|
||||||
close(): void;
|
close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
|
||||||
bytesRead: number;
|
bytesRead: number;
|
||||||
path: string | Buffer;
|
path: string | Buffer;
|
||||||
pending: boolean;
|
pending: boolean;
|
||||||
@ -214,7 +214,7 @@ declare module 'fs' {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class WriteStream extends stream.Writable {
|
export class WriteStream extends stream.Writable {
|
||||||
close(): void;
|
close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
|
||||||
bytesWritten: number;
|
bytesWritten: number;
|
||||||
path: string | Buffer;
|
path: string | Buffer;
|
||||||
pending: boolean;
|
pending: boolean;
|
||||||
@ -2244,13 +2244,13 @@ declare module 'fs' {
|
|||||||
bufferSize?: number | undefined;
|
bufferSize?: number | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function opendirSync(path: string, options?: OpenDirOptions): Dir;
|
export function opendirSync(path: PathLike, options?: OpenDirOptions): Dir;
|
||||||
|
|
||||||
export function opendir(path: string, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
|
export function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
|
||||||
export function opendir(path: string, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
|
export function opendir(path: PathLike, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
|
||||||
|
|
||||||
export namespace opendir {
|
export namespace opendir {
|
||||||
function __promisify__(path: string, options?: OpenDirOptions): Promise<Dir>;
|
function __promisify__(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BigIntStats extends StatsBase<bigint> {
|
export interface BigIntStats extends StatsBase<bigint> {
|
||||||
@ -2271,3 +2271,6 @@ declare module 'fs' {
|
|||||||
bigint?: boolean | undefined;
|
bigint?: boolean | undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
declare module 'node:fs' {
|
||||||
|
export * from 'fs';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'fs/promises' {
|
declare module 'fs/promises' {
|
||||||
import {
|
import {
|
||||||
@ -564,5 +564,8 @@ declare module 'fs/promises' {
|
|||||||
*/
|
*/
|
||||||
function readFile(path: PathLike | FileHandle, options?: BaseEncodingOptions & { flag?: OpenMode | undefined } | BufferEncoding | null): Promise<string | Buffer>;
|
function readFile(path: PathLike | FileHandle, options?: BaseEncodingOptions & { flag?: OpenMode | undefined } | BufferEncoding | null): Promise<string | Buffer>;
|
||||||
|
|
||||||
function opendir(path: string, options?: OpenDirOptions): Promise<Dir>;
|
function opendir(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
|
||||||
|
}
|
||||||
|
declare module 'node:fs/promises' {
|
||||||
|
export * from 'fs/promises';
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
// Declare "static" methods in Error
|
// Declare "static" methods in Error
|
||||||
interface ErrorConstructor {
|
interface ErrorConstructor {
|
||||||
@ -74,14 +74,57 @@ declare var module: NodeModule;
|
|||||||
declare var exports: any;
|
declare var exports: any;
|
||||||
|
|
||||||
// Buffer class
|
// Buffer class
|
||||||
type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex";
|
type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "base64url" | "latin1" | "binary" | "hex";
|
||||||
|
|
||||||
type WithImplicitCoercion<T> = T | { valueOf(): T };
|
type WithImplicitCoercion<T> = T | { valueOf(): T };
|
||||||
|
|
||||||
|
//#region borrowed
|
||||||
|
// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
|
||||||
|
/**
|
||||||
|
* A controller object that allows you to abort one or more DOM requests as and when desired.
|
||||||
|
* @since v14.7.0
|
||||||
|
*/
|
||||||
|
interface AbortController {
|
||||||
|
/**
|
||||||
|
* Returns the AbortSignal object associated with this object.
|
||||||
|
* @since v14.7.0
|
||||||
|
*/
|
||||||
|
readonly signal: AbortSignal;
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
* @since v14.7.0
|
||||||
|
*/
|
||||||
|
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.
|
||||||
|
* @since v14.7.0
|
||||||
|
*/
|
||||||
|
interface AbortSignal {
|
||||||
|
/**
|
||||||
|
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
||||||
|
* @since v14.7.0
|
||||||
|
*/
|
||||||
|
readonly aborted: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare var AbortController: {
|
||||||
|
prototype: AbortController;
|
||||||
|
new(): AbortController;
|
||||||
|
};
|
||||||
|
|
||||||
|
declare var AbortSignal: {
|
||||||
|
prototype: AbortSignal;
|
||||||
|
new(): AbortSignal;
|
||||||
|
// TODO: Add abort() static
|
||||||
|
};
|
||||||
|
//#endregion borrowed
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Raw data is stored in instances of the Buffer class.
|
* 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.
|
* 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'|'binary'(deprecated)|'hex'
|
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
|
||||||
*/
|
*/
|
||||||
declare class Buffer extends Uint8Array {
|
declare class Buffer extends Uint8Array {
|
||||||
/**
|
/**
|
||||||
@ -163,7 +206,7 @@ declare class Buffer extends Uint8Array {
|
|||||||
static isBuffer(obj: any): obj is Buffer;
|
static isBuffer(obj: any): obj is Buffer;
|
||||||
/**
|
/**
|
||||||
* Returns true if {encoding} is a valid encoding argument.
|
* Returns true if {encoding} is a valid encoding argument.
|
||||||
* Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
|
* Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
|
||||||
*
|
*
|
||||||
* @param encoding string to test.
|
* @param encoding string to test.
|
||||||
*/
|
*/
|
||||||
@ -258,24 +301,89 @@ declare class Buffer extends Uint8Array {
|
|||||||
writeBigInt64BE(value: bigint, offset?: number): number;
|
writeBigInt64BE(value: bigint, offset?: number): number;
|
||||||
writeBigInt64LE(value: bigint, offset?: number): number;
|
writeBigInt64LE(value: bigint, offset?: number): number;
|
||||||
writeBigUInt64BE(value: bigint, offset?: number): number;
|
writeBigUInt64BE(value: bigint, offset?: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.writeBigUInt64BE
|
||||||
|
* @since v14.10.0, v12.19.0
|
||||||
|
*/
|
||||||
|
writeBigUint64BE(value: bigint, offset?: number): number;
|
||||||
writeBigUInt64LE(value: bigint, offset?: number): number;
|
writeBigUInt64LE(value: bigint, offset?: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.writeBigUInt64LE
|
||||||
|
* @since v14.10.0, v12.19.0
|
||||||
|
*/
|
||||||
|
writeBigUint64LE(value: bigint, offset?: number): number;
|
||||||
writeUIntLE(value: number, offset: number, byteLength: number): number;
|
writeUIntLE(value: number, offset: number, byteLength: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.writeUIntLE
|
||||||
|
* @since v14.9.0, v12.19.0
|
||||||
|
*/
|
||||||
|
writeUintLE(value: number, offset: number, byteLength: number): number;
|
||||||
writeUIntBE(value: number, offset: number, byteLength: number): number;
|
writeUIntBE(value: number, offset: number, byteLength: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.writeUIntBE
|
||||||
|
* @since v14.9.0, v12.19.0
|
||||||
|
*/
|
||||||
|
writeUintBE(value: number, offset: number, byteLength: number): number;
|
||||||
writeIntLE(value: number, offset: number, byteLength: number): number;
|
writeIntLE(value: number, offset: number, byteLength: number): number;
|
||||||
writeIntBE(value: number, offset: number, byteLength: number): number;
|
writeIntBE(value: number, offset: number, byteLength: number): number;
|
||||||
readBigUInt64BE(offset?: number): bigint;
|
readBigUInt64BE(offset?: number): bigint;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.readBigUInt64BE
|
||||||
|
* @since v14.10.0, v12.19.0
|
||||||
|
*/
|
||||||
|
readBigUint64BE(offset?: number): bigint;
|
||||||
readBigUInt64LE(offset?: number): bigint;
|
readBigUInt64LE(offset?: number): bigint;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.readBigUInt64LE
|
||||||
|
* @since v14.10.0, v12.19.0
|
||||||
|
*/
|
||||||
|
readBigUint64LE(offset?: number): bigint;
|
||||||
readBigInt64BE(offset?: number): bigint;
|
readBigInt64BE(offset?: number): bigint;
|
||||||
readBigInt64LE(offset?: number): bigint;
|
readBigInt64LE(offset?: number): bigint;
|
||||||
readUIntLE(offset: number, byteLength: number): number;
|
readUIntLE(offset: number, byteLength: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.readUIntLE
|
||||||
|
* @since v14.9.0, v12.19.0
|
||||||
|
*/
|
||||||
|
readUintLE(offset: number, byteLength: number): number;
|
||||||
readUIntBE(offset: number, byteLength: number): number;
|
readUIntBE(offset: number, byteLength: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.readUIntBE
|
||||||
|
* @since v14.9.0, v12.19.0
|
||||||
|
*/
|
||||||
|
readUintBE(offset: number, byteLength: number): number;
|
||||||
readIntLE(offset: number, byteLength: number): number;
|
readIntLE(offset: number, byteLength: number): number;
|
||||||
readIntBE(offset: number, byteLength: number): number;
|
readIntBE(offset: number, byteLength: number): number;
|
||||||
readUInt8(offset?: number): number;
|
readUInt8(offset?: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.readUInt8
|
||||||
|
* @since v14.9.0, v12.19.0
|
||||||
|
*/
|
||||||
|
readUint8(offset?: number): number;
|
||||||
readUInt16LE(offset?: number): number;
|
readUInt16LE(offset?: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.readUInt16LE
|
||||||
|
* @since v14.9.0, v12.19.0
|
||||||
|
*/
|
||||||
|
readUint16LE(offset?: number): number;
|
||||||
readUInt16BE(offset?: number): number;
|
readUInt16BE(offset?: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.readUInt16BE
|
||||||
|
* @since v14.9.0, v12.19.0
|
||||||
|
*/
|
||||||
|
readUint16BE(offset?: number): number;
|
||||||
readUInt32LE(offset?: number): number;
|
readUInt32LE(offset?: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.readUInt32LE
|
||||||
|
* @since v14.9.0, v12.19.0
|
||||||
|
*/
|
||||||
|
readUint32LE(offset?: number): number;
|
||||||
readUInt32BE(offset?: number): number;
|
readUInt32BE(offset?: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.readUInt32BE
|
||||||
|
* @since v14.9.0, v12.19.0
|
||||||
|
*/
|
||||||
|
readUint32BE(offset?: number): number;
|
||||||
readInt8(offset?: number): number;
|
readInt8(offset?: number): number;
|
||||||
readInt16LE(offset?: number): number;
|
readInt16LE(offset?: number): number;
|
||||||
readInt16BE(offset?: number): number;
|
readInt16BE(offset?: number): number;
|
||||||
@ -290,10 +398,35 @@ declare class Buffer extends Uint8Array {
|
|||||||
swap32(): Buffer;
|
swap32(): Buffer;
|
||||||
swap64(): Buffer;
|
swap64(): Buffer;
|
||||||
writeUInt8(value: number, offset?: number): number;
|
writeUInt8(value: number, offset?: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.writeUInt8
|
||||||
|
* @since v14.9.0, v12.19.0
|
||||||
|
*/
|
||||||
|
writeUint8(value: number, offset?: number): number;
|
||||||
writeUInt16LE(value: number, offset?: number): number;
|
writeUInt16LE(value: number, offset?: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.writeUInt16LE
|
||||||
|
* @since v14.9.0, v12.19.0
|
||||||
|
*/
|
||||||
|
writeUint16LE(value: number, offset?: number): number;
|
||||||
writeUInt16BE(value: number, offset?: number): number;
|
writeUInt16BE(value: number, offset?: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.writeUInt16BE
|
||||||
|
* @since v14.9.0, v12.19.0
|
||||||
|
*/
|
||||||
|
writeUint16BE(value: number, offset?: number): number;
|
||||||
writeUInt32LE(value: number, offset?: number): number;
|
writeUInt32LE(value: number, offset?: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.writeUInt32LE
|
||||||
|
* @since v14.9.0, v12.19.0
|
||||||
|
*/
|
||||||
|
writeUint32LE(value: number, offset?: number): number;
|
||||||
writeUInt32BE(value: number, offset?: number): number;
|
writeUInt32BE(value: number, offset?: number): number;
|
||||||
|
/**
|
||||||
|
* @alias Buffer.writeUInt32BE
|
||||||
|
* @since v14.9.0, v12.19.0
|
||||||
|
*/
|
||||||
|
writeUint32BE(value: number, offset?: number): number;
|
||||||
writeInt8(value: number, offset?: number): number;
|
writeInt8(value: number, offset?: number): number;
|
||||||
writeInt16LE(value: number, offset?: number): number;
|
writeInt16LE(value: number, offset?: number): number;
|
||||||
writeInt16BE(value: number, offset?: number): number;
|
writeInt16BE(value: number, offset?: number): number;
|
||||||
@ -460,9 +593,9 @@ declare namespace NodeJS {
|
|||||||
writable: boolean;
|
writable: boolean;
|
||||||
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
|
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
|
||||||
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
|
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
|
||||||
end(cb?: () => void): void;
|
end(cb?: () => void): this;
|
||||||
end(data: string | Uint8Array, cb?: () => void): void;
|
end(data: string | Uint8Array, cb?: () => void): this;
|
||||||
end(str: string, encoding?: BufferEncoding, cb?: () => void): void;
|
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ReadWriteStream extends ReadableStream, WritableStream { }
|
interface ReadWriteStream extends ReadableStream, WritableStream { }
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'http' {
|
declare module 'http' {
|
||||||
import * as stream from 'stream';
|
import * as stream from 'stream';
|
||||||
import { URL } from 'url';
|
import { URL } from 'url';
|
||||||
import { Socket, Server as NetServer } from 'net';
|
import { Socket, Server as NetServer, LookupFunction } from 'net';
|
||||||
|
|
||||||
// incoming headers will never contain number
|
// incoming headers will never contain number
|
||||||
interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
|
interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
|
||||||
@ -102,6 +102,7 @@ declare module 'http' {
|
|||||||
setHost?: boolean | undefined;
|
setHost?: boolean | undefined;
|
||||||
// https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
|
// https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
|
||||||
createConnection?: ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket) | undefined;
|
createConnection?: ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket) | undefined;
|
||||||
|
lookup?: LookupFunction | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ServerOptions {
|
interface ServerOptions {
|
||||||
@ -239,7 +240,7 @@ declare module 'http' {
|
|||||||
constructor();
|
constructor();
|
||||||
|
|
||||||
setTimeout(msecs: number, callback?: () => void): this;
|
setTimeout(msecs: number, callback?: () => void): this;
|
||||||
setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
|
setHeader(name: string, value: number | string | ReadonlyArray<string>): this;
|
||||||
getHeader(name: string): number | string | string[] | undefined;
|
getHeader(name: string): number | string | string[] | undefined;
|
||||||
getHeaders(): OutgoingHttpHeaders;
|
getHeaders(): OutgoingHttpHeaders;
|
||||||
getHeaderNames(): string[];
|
getHeaderNames(): string[];
|
||||||
@ -281,6 +282,8 @@ declare module 'http' {
|
|||||||
aborted: boolean;
|
aborted: boolean;
|
||||||
host: string;
|
host: string;
|
||||||
protocol: string;
|
protocol: string;
|
||||||
|
reusedSocket: boolean;
|
||||||
|
maxHeadersCount: number;
|
||||||
|
|
||||||
constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
|
constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
|
||||||
|
|
||||||
@ -408,7 +411,7 @@ declare module 'http' {
|
|||||||
* Only valid for response obtained from http.ClientRequest.
|
* Only valid for response obtained from http.ClientRequest.
|
||||||
*/
|
*/
|
||||||
statusMessage?: string | undefined;
|
statusMessage?: string | undefined;
|
||||||
destroy(error?: Error): void;
|
destroy(error?: Error): this;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AgentOptions {
|
interface AgentOptions {
|
||||||
@ -487,3 +490,6 @@ declare module 'http' {
|
|||||||
*/
|
*/
|
||||||
const maxHeaderSize: number;
|
const maxHeaderSize: number;
|
||||||
}
|
}
|
||||||
|
declare module 'node:http' {
|
||||||
|
export * from 'http';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'http2' {
|
declare module 'http2' {
|
||||||
import EventEmitter = require('events');
|
import EventEmitter = require('events');
|
||||||
@ -597,7 +597,7 @@ declare module 'http2' {
|
|||||||
readonly socket: net.Socket | tls.TLSSocket;
|
readonly socket: net.Socket | tls.TLSSocket;
|
||||||
readonly stream: ServerHttp2Stream;
|
readonly stream: ServerHttp2Stream;
|
||||||
readonly trailers: IncomingHttpHeaders;
|
readonly trailers: IncomingHttpHeaders;
|
||||||
readonly url: string;
|
url: string;
|
||||||
|
|
||||||
setTimeout(msecs: number, callback?: () => void): void;
|
setTimeout(msecs: number, callback?: () => void): void;
|
||||||
read(size?: number): Buffer | string | null;
|
read(size?: number): Buffer | string | null;
|
||||||
@ -663,9 +663,9 @@ declare module 'http2' {
|
|||||||
statusCode: number;
|
statusCode: number;
|
||||||
statusMessage: '';
|
statusMessage: '';
|
||||||
addTrailers(trailers: OutgoingHttpHeaders): void;
|
addTrailers(trailers: OutgoingHttpHeaders): void;
|
||||||
end(callback?: () => void): void;
|
end(callback?: () => void): this;
|
||||||
end(data: string | Uint8Array, callback?: () => void): void;
|
end(data: string | Uint8Array, callback?: () => void): this;
|
||||||
end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): void;
|
end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this;
|
||||||
getHeader(name: string): string;
|
getHeader(name: string): string;
|
||||||
getHeaderNames(): string[];
|
getHeaderNames(): string[];
|
||||||
getHeaders(): OutgoingHttpHeaders;
|
getHeaders(): OutgoingHttpHeaders;
|
||||||
@ -959,3 +959,6 @@ declare module 'http2' {
|
|||||||
listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void
|
listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void
|
||||||
): ClientHttp2Session;
|
): ClientHttp2Session;
|
||||||
}
|
}
|
||||||
|
declare module 'node:http2' {
|
||||||
|
export * from 'http2';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'https' {
|
declare module 'https' {
|
||||||
import { Duplex } from 'stream';
|
import { Duplex } from 'stream';
|
||||||
@ -140,3 +140,6 @@ declare module 'https' {
|
|||||||
function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
|
function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
|
||||||
let globalAgent: Agent;
|
let globalAgent: Agent;
|
||||||
}
|
}
|
||||||
|
declare module 'node:https' {
|
||||||
|
export * from 'https';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'module' {
|
declare module 'module' {
|
||||||
import { URL } from 'url';
|
import { URL } from 'url';
|
||||||
@ -53,3 +53,7 @@ declare module 'module' {
|
|||||||
}
|
}
|
||||||
export = Module;
|
export = Module;
|
||||||
}
|
}
|
||||||
|
declare module 'node:module' {
|
||||||
|
import module = require('module');
|
||||||
|
export = module;
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'net' {
|
declare module 'net' {
|
||||||
import * as stream from 'stream';
|
import * as stream from 'stream';
|
||||||
@ -95,9 +95,9 @@ declare module 'net' {
|
|||||||
readonly remotePort?: number | undefined;
|
readonly remotePort?: number | undefined;
|
||||||
|
|
||||||
// Extended base methods
|
// Extended base methods
|
||||||
end(cb?: () => void): void;
|
end(cb?: () => void): this;
|
||||||
end(buffer: Uint8Array | string, cb?: () => void): void;
|
end(buffer: Uint8Array | string, cb?: () => void): this;
|
||||||
end(str: Uint8Array | string, encoding?: BufferEncoding, cb?: () => void): void;
|
end(str: Uint8Array | string, encoding?: BufferEncoding, cb?: () => void): this;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* events.EventEmitter
|
* events.EventEmitter
|
||||||
@ -294,3 +294,6 @@ declare module 'net' {
|
|||||||
function isIPv4(input: string): boolean;
|
function isIPv4(input: string): boolean;
|
||||||
function isIPv6(input: string): boolean;
|
function isIPv6(input: string): boolean;
|
||||||
}
|
}
|
||||||
|
declare module 'node:net' {
|
||||||
|
export * from 'net';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'os' {
|
declare module 'os' {
|
||||||
interface CpuInfo {
|
interface CpuInfo {
|
||||||
@ -240,3 +240,6 @@ declare module 'os' {
|
|||||||
*/
|
*/
|
||||||
function setPriority(pid: number, priority: number): void;
|
function setPriority(pid: number, priority: number): void;
|
||||||
}
|
}
|
||||||
|
declare module 'node:os' {
|
||||||
|
export * from 'os';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'path' {
|
declare module 'path' {
|
||||||
namespace path {
|
namespace path {
|
||||||
@ -154,3 +154,7 @@ declare module 'path' {
|
|||||||
const path: path.PlatformPath;
|
const path: path.PlatformPath;
|
||||||
export = path;
|
export = path;
|
||||||
}
|
}
|
||||||
|
declare module 'node:path' {
|
||||||
|
import path = require('path');
|
||||||
|
export = path;
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'perf_hooks' {
|
declare module 'perf_hooks' {
|
||||||
import { AsyncResource } from 'async_hooks';
|
import { AsyncResource } from 'async_hooks';
|
||||||
@ -272,3 +272,6 @@ declare module 'perf_hooks' {
|
|||||||
|
|
||||||
function monitorEventLoopDelay(options?: EventLoopMonitorOptions): EventLoopDelayMonitor;
|
function monitorEventLoopDelay(options?: EventLoopMonitorOptions): EventLoopDelayMonitor;
|
||||||
}
|
}
|
||||||
|
declare module 'node:perf_hooks' {
|
||||||
|
export * from 'perf_hooks';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'process' {
|
declare module 'process' {
|
||||||
import * as tty from 'tty';
|
import * as tty from 'tty';
|
||||||
@ -123,7 +123,7 @@ declare module 'process' {
|
|||||||
/**
|
/**
|
||||||
* If true, a diagnostic report is generated when the process
|
* If true, a diagnostic report is generated when the process
|
||||||
* receives the signal specified by process.report.signal.
|
* receives the signal specified by process.report.signal.
|
||||||
* @defaul false
|
* @default false
|
||||||
*/
|
*/
|
||||||
reportOnSignal: boolean;
|
reportOnSignal: boolean;
|
||||||
|
|
||||||
@ -410,3 +410,7 @@ declare module 'process' {
|
|||||||
|
|
||||||
export = process;
|
export = process;
|
||||||
}
|
}
|
||||||
|
declare module 'node:process' {
|
||||||
|
import process = require('process');
|
||||||
|
export = process;
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'querystring' {
|
declare module 'querystring' {
|
||||||
interface StringifyOptions {
|
interface StringifyOptions {
|
||||||
@ -29,3 +29,6 @@ declare module 'querystring' {
|
|||||||
function escape(str: string): string;
|
function escape(str: string): string;
|
||||||
function unescape(str: string): string;
|
function unescape(str: string): string;
|
||||||
}
|
}
|
||||||
|
declare module 'node:querystring' {
|
||||||
|
export * from 'querystring';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'readline' {
|
declare module 'readline' {
|
||||||
import EventEmitter = require('events');
|
import EventEmitter = require('events');
|
||||||
@ -48,6 +48,7 @@ declare module 'readline' {
|
|||||||
resume(): this;
|
resume(): this;
|
||||||
close(): void;
|
close(): void;
|
||||||
write(data: string | Buffer, key?: Key): void;
|
write(data: string | Buffer, key?: Key): void;
|
||||||
|
write(data: undefined | null | string | Buffer, key: Key): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the real position of the cursor in relation to the input
|
* Returns the real position of the cursor in relation to the input
|
||||||
@ -171,3 +172,6 @@ declare module 'readline' {
|
|||||||
*/
|
*/
|
||||||
function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
|
function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
|
||||||
}
|
}
|
||||||
|
declare module 'node:readline' {
|
||||||
|
export * from 'readline';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'stream' {
|
declare module 'stream' {
|
||||||
import EventEmitter = require('events');
|
import EventEmitter = require('events');
|
||||||
@ -48,7 +48,7 @@ declare module 'stream' {
|
|||||||
wrap(oldStream: NodeJS.ReadableStream): this;
|
wrap(oldStream: NodeJS.ReadableStream): this;
|
||||||
push(chunk: any, encoding?: BufferEncoding): boolean;
|
push(chunk: any, encoding?: BufferEncoding): boolean;
|
||||||
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
||||||
destroy(error?: Error): void;
|
destroy(error?: Error): this;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event emitter
|
* Event emitter
|
||||||
@ -157,12 +157,12 @@ declare module 'stream' {
|
|||||||
write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
|
write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
|
||||||
write(chunk: any, encoding: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
|
write(chunk: any, encoding: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
|
||||||
setDefaultEncoding(encoding: BufferEncoding): this;
|
setDefaultEncoding(encoding: BufferEncoding): this;
|
||||||
end(cb?: () => void): void;
|
end(cb?: () => void): this;
|
||||||
end(chunk: any, cb?: () => void): void;
|
end(chunk: any, cb?: () => void): this;
|
||||||
end(chunk: any, encoding: BufferEncoding, cb?: () => void): void;
|
end(chunk: any, encoding: BufferEncoding, cb?: () => void): this;
|
||||||
cork(): void;
|
cork(): void;
|
||||||
uncork(): void;
|
uncork(): void;
|
||||||
destroy(error?: Error): void;
|
destroy(error?: Error): this;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event emitter
|
* Event emitter
|
||||||
@ -263,9 +263,9 @@ declare module 'stream' {
|
|||||||
write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
|
write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
|
||||||
write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
|
write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
|
||||||
setDefaultEncoding(encoding: BufferEncoding): this;
|
setDefaultEncoding(encoding: BufferEncoding): this;
|
||||||
end(cb?: () => void): void;
|
end(cb?: () => void): this;
|
||||||
end(chunk: any, cb?: () => void): void;
|
end(chunk: any, cb?: () => void): this;
|
||||||
end(chunk: any, encoding?: BufferEncoding, cb?: () => void): void;
|
end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this;
|
||||||
cork(): void;
|
cork(): void;
|
||||||
uncork(): void;
|
uncork(): void;
|
||||||
}
|
}
|
||||||
@ -356,3 +356,7 @@ declare module 'stream' {
|
|||||||
|
|
||||||
export = internal;
|
export = internal;
|
||||||
}
|
}
|
||||||
|
declare module 'node:stream' {
|
||||||
|
import stream = require('stream');
|
||||||
|
export = stream;
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'string_decoder' {
|
declare module 'string_decoder' {
|
||||||
class StringDecoder {
|
class StringDecoder {
|
||||||
@ -8,3 +8,6 @@ declare module 'string_decoder' {
|
|||||||
end(buffer?: Buffer): string;
|
end(buffer?: Buffer): string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
declare module 'node:string_decoder' {
|
||||||
|
export * from 'string_decoder';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'timers' {
|
declare module 'timers' {
|
||||||
function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
|
function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
|
||||||
@ -17,3 +17,6 @@ declare module 'timers' {
|
|||||||
}
|
}
|
||||||
function clearImmediate(immediateId: NodeJS.Immediate): void;
|
function clearImmediate(immediateId: NodeJS.Immediate): void;
|
||||||
}
|
}
|
||||||
|
declare module 'node:timers' {
|
||||||
|
export * from 'timers';
|
||||||
|
}
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'tls' {
|
declare module 'tls' {
|
||||||
import * as net from 'net';
|
import * as net from 'net';
|
||||||
|
import * as stream from 'stream';
|
||||||
|
|
||||||
const CLIENT_RENEG_LIMIT: number;
|
const CLIENT_RENEG_LIMIT: number;
|
||||||
const CLIENT_RENEG_WINDOW: number;
|
const CLIENT_RENEG_WINDOW: number;
|
||||||
@ -444,7 +445,7 @@ declare module 'tls' {
|
|||||||
host?: string | undefined;
|
host?: string | undefined;
|
||||||
port?: number | undefined;
|
port?: number | undefined;
|
||||||
path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
|
path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
|
||||||
socket?: net.Socket | undefined; // Establish secure connection on a given socket rather than creating a new socket
|
socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket
|
||||||
checkServerIdentity?: typeof checkServerIdentity | undefined;
|
checkServerIdentity?: typeof checkServerIdentity | undefined;
|
||||||
servername?: string | undefined; // SNI TLS Extension
|
servername?: string | undefined; // SNI TLS Extension
|
||||||
session?: Buffer | undefined;
|
session?: Buffer | undefined;
|
||||||
@ -781,3 +782,6 @@ declare module 'tls' {
|
|||||||
*/
|
*/
|
||||||
const rootCertificates: ReadonlyArray<string>;
|
const rootCertificates: ReadonlyArray<string>;
|
||||||
}
|
}
|
||||||
|
declare module 'node:tls' {
|
||||||
|
export * from 'tls';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'trace_events' {
|
declare module 'trace_events' {
|
||||||
/**
|
/**
|
||||||
@ -62,3 +62,6 @@ declare module 'trace_events' {
|
|||||||
*/
|
*/
|
||||||
function getEnabledCategories(): string | undefined;
|
function getEnabledCategories(): string | undefined;
|
||||||
}
|
}
|
||||||
|
declare module 'node:trace_events' {
|
||||||
|
export * from 'trace_events';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'tty' {
|
declare module 'tty' {
|
||||||
import * as net from 'net';
|
import * as net from 'net';
|
||||||
@ -67,3 +67,6 @@ declare module 'tty' {
|
|||||||
isTTY: boolean;
|
isTTY: boolean;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
declare module 'node:tty' {
|
||||||
|
export * from 'tty';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'url' {
|
declare module 'url' {
|
||||||
import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';
|
import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';
|
||||||
@ -105,7 +105,7 @@ declare module 'url' {
|
|||||||
append(name: string, value: string): void;
|
append(name: string, value: string): void;
|
||||||
delete(name: string): void;
|
delete(name: string): void;
|
||||||
entries(): IterableIterator<[string, string]>;
|
entries(): IterableIterator<[string, string]>;
|
||||||
forEach(callback: (value: string, name: string, searchParams: this) => void): void;
|
forEach(callback: (value: string, name: string, searchParams: URLSearchParams) => void, thisArg?: any): void;
|
||||||
get(name: string): string | null;
|
get(name: string): string | null;
|
||||||
getAll(name: string): string[];
|
getAll(name: string): string[];
|
||||||
has(name: string): boolean;
|
has(name: string): boolean;
|
||||||
@ -116,4 +116,37 @@ declare module 'url' {
|
|||||||
values(): IterableIterator<string>;
|
values(): IterableIterator<string>;
|
||||||
[Symbol.iterator](): IterableIterator<[string, string]>;
|
[Symbol.iterator](): IterableIterator<[string, string]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
import { URL as _URL, URLSearchParams as _URLSearchParams } from 'url';
|
||||||
|
global {
|
||||||
|
interface URLSearchParams extends _URLSearchParams {}
|
||||||
|
interface URL extends _URL {}
|
||||||
|
interface Global {
|
||||||
|
URL: typeof _URL;
|
||||||
|
URLSearchParams: typeof _URLSearchParams;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* `URL` class is a global reference for `require('url').URL`
|
||||||
|
* https://nodejs.org/api/url.html#the-whatwg-url-api
|
||||||
|
* @since v10.0.0
|
||||||
|
*/
|
||||||
|
var URL:
|
||||||
|
// For compatibility with "dom" and "webworker" URL declarations
|
||||||
|
typeof globalThis extends { onmessage: any, URL: infer URL }
|
||||||
|
? URL
|
||||||
|
: typeof _URL;
|
||||||
|
/**
|
||||||
|
* `URLSearchParams` class is a global reference for `require('url').URLSearchParams`.
|
||||||
|
* https://nodejs.org/api/url.html#class-urlsearchparams
|
||||||
|
* @since v10.0.0
|
||||||
|
*/
|
||||||
|
var URLSearchParams:
|
||||||
|
// For compatibility with "dom" and "webworker" URLSearchParams declarations
|
||||||
|
typeof globalThis extends { onmessage: any, URLSearchParams: infer URLSearchParams }
|
||||||
|
? URLSearchParams
|
||||||
|
: typeof _URLSearchParams;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
declare module 'node:url' {
|
||||||
|
export * from 'url';
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'util' {
|
declare module 'util' {
|
||||||
interface InspectOptions extends NodeJS.InspectOptions { }
|
interface InspectOptions extends NodeJS.InspectOptions { }
|
||||||
@ -10,6 +10,7 @@ declare module 'util' {
|
|||||||
}
|
}
|
||||||
function format(format?: any, ...param: any[]): string;
|
function format(format?: any, ...param: any[]): string;
|
||||||
function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
|
function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
|
||||||
|
function getSystemErrorName(err: number): string;
|
||||||
/** @deprecated since v0.11.3 - use a third party module instead. */
|
/** @deprecated since v0.11.3 - use a third party module instead. */
|
||||||
function log(string: string): void;
|
function log(string: string): void;
|
||||||
function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
|
function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
|
||||||
@ -35,7 +36,12 @@ declare module 'util' {
|
|||||||
/** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */
|
/** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */
|
||||||
function isError(object: any): object is Error;
|
function isError(object: any): object is Error;
|
||||||
function inherits(constructor: any, superConstructor: any): void;
|
function inherits(constructor: any, superConstructor: any): void;
|
||||||
function debuglog(key: string): (msg: string, ...param: any[]) => void;
|
type DebugLoggerFunction = (msg: string, ...param: any[]) => void;
|
||||||
|
interface DebugLogger extends DebugLoggerFunction {
|
||||||
|
enabled: boolean;
|
||||||
|
}
|
||||||
|
function debuglog(key: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger;
|
||||||
|
const debug: typeof debuglog;
|
||||||
/** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */
|
/** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */
|
||||||
function isBoolean(object: any): object is boolean;
|
function isBoolean(object: any): object is boolean;
|
||||||
/** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */
|
/** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */
|
||||||
@ -208,3 +214,6 @@ declare module 'util' {
|
|||||||
encodeInto(input: string, output: Uint8Array): EncodeIntoResult;
|
encodeInto(input: string, output: Uint8Array): EncodeIntoResult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
declare module 'node:util' {
|
||||||
|
export * from 'util';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'v8' {
|
declare module 'v8' {
|
||||||
import { Readable } from 'stream';
|
import { Readable } from 'stream';
|
||||||
@ -188,3 +188,6 @@ declare module 'v8' {
|
|||||||
*/
|
*/
|
||||||
function deserialize(data: NodeJS.TypedArray): any;
|
function deserialize(data: NodeJS.TypedArray): any;
|
||||||
}
|
}
|
||||||
|
declare module 'node:v8' {
|
||||||
|
export * from 'v8';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'vm' {
|
declare module 'vm' {
|
||||||
interface Context extends NodeJS.Dict<any> { }
|
interface Context extends NodeJS.Dict<any> { }
|
||||||
@ -153,3 +153,6 @@ declare module 'vm' {
|
|||||||
*/
|
*/
|
||||||
function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
|
function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
|
||||||
}
|
}
|
||||||
|
declare module 'node:vm' {
|
||||||
|
export * from 'vm';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'wasi' {
|
declare module 'wasi' {
|
||||||
interface WASIOptions {
|
interface WASIOptions {
|
||||||
@ -87,3 +87,6 @@ declare module 'wasi' {
|
|||||||
readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
|
readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
declare module 'node:wasi' {
|
||||||
|
export * from 'wasi';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'worker_threads' {
|
declare module 'worker_threads' {
|
||||||
import { Context } from 'vm';
|
import { Context } from 'vm';
|
||||||
@ -239,3 +239,6 @@ declare module 'worker_threads' {
|
|||||||
*/
|
*/
|
||||||
function receiveMessageOnPort(port: MessagePort): { message: any } | undefined;
|
function receiveMessageOnPort(port: MessagePort): { message: any } | undefined;
|
||||||
}
|
}
|
||||||
|
declare module 'node:worker_threads' {
|
||||||
|
export * from 'worker_threads';
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
|
/* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
|
||||||
|
|
||||||
declare module 'zlib' {
|
declare module 'zlib' {
|
||||||
import * as stream from 'stream';
|
import * as stream from 'stream';
|
||||||
@ -362,3 +362,6 @@ declare module 'zlib' {
|
|||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
const Z_DEFLATED: number;
|
const Z_DEFLATED: number;
|
||||||
}
|
}
|
||||||
|
declare module 'node:zlib' {
|
||||||
|
export * from 'zlib';
|
||||||
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
BIN
packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/ade705761eb7e702770d.ttf
vendored
Normal file
BIN
packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/ade705761eb7e702770d.ttf
vendored
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -0,0 +1,6 @@
|
|||||||
|
/*!-----------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4)
|
||||||
|
* Released under the MIT license
|
||||||
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
||||||
|
*-----------------------------------------------------------------------------*/
|
File diff suppressed because one or more lines are too long
8
packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/editor.js.LICENSE.txt
vendored
Normal file
8
packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/editor.js.LICENSE.txt
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */
|
||||||
|
|
||||||
|
/*!-----------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4)
|
||||||
|
* Released under the MIT license
|
||||||
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
||||||
|
*-----------------------------------------------------------------------------*/
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,6 @@
|
|||||||
|
/*!-----------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Version: 0.33.0(4b1abad427e58dbedc1215d99a0902ffc885fcd4)
|
||||||
|
* Released under the MIT license
|
||||||
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
||||||
|
*-----------------------------------------------------------------------------*/
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user