1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge branch 'dev' into diagnostics

This commit is contained in:
Stephen McLaughlin 2022-04-27 12:08:32 +01:00 committed by GitHub
commit e714ff35c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
210 changed files with 26309 additions and 21234 deletions

View File

@ -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);

View File

@ -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;
}); });
Tokens.create(username,client.id,scope).then(function(tokens) { // Check if the user contains a user defined token and use it
log.audit({event: "auth.login",user,username:username,client:client.id,scope:scope}); // instead of generating a new token
done(null,tokens.accessToken,null,{expires_in:tokens.expires_in}); if(user.token){
}); done(null,user.token,null,null);
} else {
Tokens.create(username,client.id,scope).then(function(tokens) {
log.audit({event: "auth.login",user,username:username,client:client.id,scope:scope});
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);

View File

@ -502,7 +502,7 @@
"searchBox": "Open search box", "searchBox": "Open search box",
"managePalette": "Manage palette", "managePalette": "Manage palette",
"actionList": "Action list", "actionList": "Action list",
"splitWiresWithLinks": "Split selection with Link nodes" "splitWireWithLinks": "Split selection with Link nodes"
}, },
"library": { "library": {
"library": "Library", "library": "Library",
@ -1165,5 +1165,21 @@
"ru": "Russian", "ru": "Russian",
"zh-CN": "Chinese(Simplified)", "zh-CN": "Chinese(Simplified)",
"zh-TW": "Chinese(Traditional)" "zh-TW": "Chinese(Traditional)"
},
"validator": {
"errors": {
"invalid-json": "Invalid JSON data: __error__",
"invalid-json-prop": "__prop__: invalid JSON data: __error__",
"invalid-prop": "Invalid property expression",
"invalid-prop-prop": "__prop__: invalid property expression",
"invalid-num": "Invalid number",
"invalid-num-prop": "__prop__: invalid number",
"invalid-regexp": "Invalid input pattern",
"invalid-regex-prop": "__prop__: invalid input pattern",
"missing-required-prop": "__prop__: property value missing",
"invalid-config": "__prop__: invalid configuration node",
"missing-config": "__prop__: missing configuration node",
"validation-error": "__prop__: validation error: __node__, __id__: __error__"
}
} }
} }

View File

@ -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": "ライブラリ",
@ -898,7 +903,8 @@
"invalidNodes": "不正なノード", "invalidNodes": "不正なノード",
"uknownNodes": "未知のノード", "uknownNodes": "未知のノード",
"unusedSubflows": "未使用のサブフロー", "unusedSubflows": "未使用のサブフロー",
"hiddenFlows": "非表示のフロー" "hiddenFlows": "非表示のフロー",
"modifiedNodes": "修正したノードやフロー"
} }
}, },
"expressionEditor": { "expressionEditor": {
@ -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": "フロー内の全デバッグノードを有効化",
@ -1289,5 +1300,21 @@
"zoom-reset": "ズームリセット", "zoom-reset": "ズームリセット",
"toggle-navigator": "ナビゲータ表示切替", "toggle-navigator": "ナビゲータ表示切替",
"show-system-info": "システムインフォメーション" "show-system-info": "システムインフォメーション"
},
"validator": {
"errors": {
"invalid-json": "JSONデータが不正: __error__",
"invalid-json-prop": "__prop__: JSONデータが不正: __error__",
"invalid-prop": "プロパティ式が不正",
"invalid-prop-prop": "__prop__: プロパティ式が不正",
"invalid-num": "数値が不正",
"invalid-num-prop": "__prop__: 数値が不正",
"invalid-regexp": "入力パターンが不正",
"invalid-regex-prop": "__prop__: 入力パターンが不正",
"missing-required-prop": "__prop__: プロパティが未設定",
"invalid-config": "__prop__: 設定ノードが不正",
"missing-config": "__prop__: 設定ノードが存在しません",
"validation-error": "__prop__: チェックエラー: __node__, __id__: __error__"
}
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

View File

@ -0,0 +1 @@
<svg width="50" height="5" viewBox="0, 0, 50, 5" xmlns="http://www.w3.org/2000/svg"><path d="M0 1H50V4H0Z" fill="#CCC"/></svg>

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

View File

@ -0,0 +1 @@
<svg width="5" height="50" viewBox="0, 0, 5, 50" xmlns="http://www.w3.org/2000/svg"><path d="M1 0H4V50H1Z" fill="#CCC"/></svg>

After

Width:  |  Height:  |  Size: 127 B

View File

@ -474,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;

View File

@ -9,12 +9,14 @@
* *
* options: * options:
* *
* search : function(value, [done]) * search: function(value, [done])
* A function that is passed the current contents of the input whenever * A function that is passed the current contents of the input whenever
* it changes. * it changes.
* 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);

View File

@ -359,6 +359,7 @@ RED.popover = (function() {
setTimeout(closePopup,delay.hide); setTimeout(closePopup,delay.hide);
} }
}); });
if (trigger === 'hover') { if (trigger === 'hover') {
target.on('mouseenter',function(e) { target.on('mouseenter',function(e) {
clearTimeout(timer); clearTimeout(timer);
@ -470,6 +471,10 @@ RED.popover = (function() {
popover.setAction = function(newAction) { popover.setAction = function(newAction) {
action = newAction; action = newAction;
} }
popover.delete = function() {
target.off("mouseenter");
target.off("mouseleave");
};
return popover; return popover;
}, },

View File

@ -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();
} }
}); });

View File

@ -670,7 +670,7 @@ RED.tabs = (function() {
} }
var link = $("<a/>",{href:"#"+tab.id, class:"red-ui-tab-label"}).appendTo(li); var link = $("<a/>",{href:"#"+tab.id, class:"red-ui-tab-label"}).appendTo(li);
if (tab.icon) { if (tab.icon) {
$('<img src="'+tab.icon+'" class="red-ui-tab-icon"/>').appendTo(link); $('<i>',{class:"red-ui-tab-icon", style:"mask-image: url("+tab.icon+"); -webkit-mask-image: url("+tab.icon+");"}).appendTo(link);
} else if (tab.iconClass) { } else if (tab.iconClass) {
$('<i>',{class:"red-ui-tab-icon "+tab.iconClass}).appendTo(link); $('<i>',{class:"red-ui-tab-icon "+tab.iconClass}).appendTo(link);
} }

View File

@ -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)},
@ -637,7 +669,7 @@
if (opt.icon.indexOf("<") === 0) { if (opt.icon.indexOf("<") === 0) {
$(opt.icon).prependTo(op); $(opt.icon).prependTo(op);
} else if (opt.icon.indexOf("/") !== -1) { } else if (opt.icon.indexOf("/") !== -1) {
$('<img>',{src:mapDeprecatedIcon(opt.icon),style:"margin-right: 4px; height: 18px;"}).prependTo(op); $('<i>',{class:"red-ui-typedInput-icon", style:"mask-image: url("+opt.icon+"); -webkit-mask-image: url("+opt.icon+");"}).prependTo(op);
} else { } else {
$('<i>',{class:"red-ui-typedInput-icon "+opt.icon}).prependTo(op); $('<i>',{class:"red-ui-typedInput-icon "+opt.icon}).prependTo(op);
} }
@ -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
}) })
} }
} }

View File

@ -319,205 +319,208 @@ RED.deploy = (function() {
},delta); },delta);
}); });
} }
function save(skipValidation,force) { function save(skipValidation, force) {
if (!$("#red-ui-header-button-deploy").hasClass("disabled")) { if ($("#red-ui-header-button-deploy").hasClass("disabled")) {
if (!RED.user.hasPermission("flows.write")) { return; //deploy is disabled
RED.notify(RED._("user.errors.deploy"),"error"); }
if ($("#red-ui-header-shade").is(":visible")) {
return; //deploy is shaded
}
if (!RED.user.hasPermission("flows.write")) {
RED.notify(RED._("user.errors.deploy"), "error");
return;
}
let hasUnusedConfig = false;
if (!skipValidation) {
let hasUnknown = false;
let hasInvalid = false;
const unknownNodes = [];
const invalidNodes = [];
RED.nodes.eachConfig(function (node) {
if (node.valid === undefined) {
RED.editor.validateNode(node);
}
if (!node.valid && !node.d) {
invalidNodes.push(getNodeInfo(node));
}
if (node.type === "unknown") {
if (unknownNodes.indexOf(node.name) == -1) {
unknownNodes.push(node.name);
}
}
});
RED.nodes.eachNode(function (node) {
if (!node.valid && !node.d) {
invalidNodes.push(getNodeInfo(node));
}
if (node.type === "unknown") {
if (unknownNodes.indexOf(node.name) == -1) {
unknownNodes.push(node.name);
}
}
});
hasUnknown = unknownNodes.length > 0;
hasInvalid = invalidNodes.length > 0;
const unusedConfigNodes = [];
RED.nodes.eachConfig(function (node) {
if ((node._def.hasUsers !== false) && (node.users.length === 0)) {
unusedConfigNodes.push(getNodeInfo(node));
hasUnusedConfig = true;
}
});
let showWarning = false;
let notificationMessage;
let notificationButtons = [];
let notification;
if (hasUnknown && !ignoreDeployWarnings.unknown) {
showWarning = true;
notificationMessage = "<p>" + RED._('deploy.confirm.unknown') + "</p>" +
'<ul class="red-ui-deploy-dialog-confirm-list"><li>' + cropList(unknownNodes).map(function (n) { return sanitize(n) }).join("</li><li>") + "</li></ul><p>" +
RED._('deploy.confirm.confirm') +
"</p>";
notificationButtons = [
{
id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"),
class: "primary",
click: function () {
save(true);
notification.close();
}
}
];
} else if (hasInvalid && !ignoreDeployWarnings.invalid) {
showWarning = true;
invalidNodes.sort(sortNodeInfo);
notificationMessage = "<p>" + RED._('deploy.confirm.improperlyConfigured') + "</p>" +
'<ul class="red-ui-deploy-dialog-confirm-list"><li>' + cropList(invalidNodes.map(function (A) { return sanitize((A.tab ? "[" + A.tab + "] " : "") + A.label + " (" + A.type + ")") })).join("</li><li>") + "</li></ul><p>" +
RED._('deploy.confirm.confirm') +
"</p>";
notificationButtons = [
{
id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"),
class: "primary",
click: function () {
save(true);
notification.close();
}
}
];
}
if (showWarning) {
notificationButtons.unshift(
{
text: RED._("common.label.cancel"),
click: function () {
notification.close();
}
}
);
notification = RED.notify(notificationMessage, {
modal: true,
fixed: true,
buttons: notificationButtons
});
return; return;
} }
if (!skipValidation) {
var hasUnknown = false;
var hasInvalid = false;
var hasUnusedConfig = false;
var unknownNodes = [];
var invalidNodes = [];
RED.nodes.eachConfig(function(node) {
if (node.valid === undefined) {
RED.editor.validateNode(node);
}
if (!node.valid && !node.d) {
invalidNodes.push(getNodeInfo(node));
}
if (node.type === "unknown") {
if (unknownNodes.indexOf(node.name) == -1) {
unknownNodes.push(node.name);
}
}
});
RED.nodes.eachNode(function(node) {
if (!node.valid && !node.d) {
invalidNodes.push(getNodeInfo(node));
}
if (node.type === "unknown") {
if (unknownNodes.indexOf(node.name) == -1) {
unknownNodes.push(node.name);
}
}
});
hasUnknown = unknownNodes.length > 0;
hasInvalid = invalidNodes.length > 0;
var unusedConfigNodes = [];
RED.nodes.eachConfig(function(node) {
if ((node._def.hasUsers !== false) && (node.users.length === 0)) {
unusedConfigNodes.push(getNodeInfo(node));
hasUnusedConfig = true;
}
});
var showWarning = false;
var notificationMessage;
var notificationButtons = [];
var notification;
if (hasUnknown && !ignoreDeployWarnings.unknown) {
showWarning = true;
notificationMessage = "<p>"+RED._('deploy.confirm.unknown')+"</p>"+
'<ul class="red-ui-deploy-dialog-confirm-list"><li>'+cropList(unknownNodes).map(function(n) { return sanitize(n) }).join("</li><li>")+"</li></ul><p>"+
RED._('deploy.confirm.confirm')+
"</p>";
notificationButtons= [
{
id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"),
class: "primary",
click: function() {
save(true);
notification.close();
}
}
];
} else if (hasInvalid && !ignoreDeployWarnings.invalid) {
showWarning = true;
invalidNodes.sort(sortNodeInfo);
notificationMessage = "<p>"+RED._('deploy.confirm.improperlyConfigured')+"</p>"+
'<ul class="red-ui-deploy-dialog-confirm-list"><li>'+cropList(invalidNodes.map(function(A) { return sanitize( (A.tab?"["+A.tab+"] ":"")+A.label+" ("+A.type+")")})).join("</li><li>")+"</li></ul><p>"+
RED._('deploy.confirm.confirm')+
"</p>";
notificationButtons= [
{
id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"),
class: "primary",
click: function() {
save(true);
notification.close();
}
}
];
}
if (showWarning) {
notificationButtons.unshift(
{
text: RED._("common.label.cancel"),
click: function() {
notification.close();
}
}
);
notification = RED.notify(notificationMessage,{
modal: true,
fixed: true,
buttons:notificationButtons
});
return;
}
}
var nns = RED.nodes.createCompleteNodeSet();
var startTime = Date.now();
$(".red-ui-deploy-button-content").css('opacity',0);
$(".red-ui-deploy-button-spinner").show();
$("#red-ui-header-button-deploy").addClass("disabled");
var data = {flows:nns};
if (!force) {
data.rev = RED.nodes.version();
}
deployInflight = true;
$("#red-ui-header-shade").show();
$("#red-ui-editor-shade").show();
$("#red-ui-palette-shade").show();
$("#red-ui-sidebar-shade").show();
$.ajax({
url:"flows",
type: "POST",
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
headers: {
"Node-RED-Deployment-Type":deploymentType
}
}).done(function(data,textStatus,xhr) {
RED.nodes.dirty(false);
RED.nodes.version(data.rev);
RED.nodes.originalFlow(nns);
if (hasUnusedConfig) {
RED.notify(
'<p>'+RED._("deploy.successfulDeploy")+'</p>'+
'<p>'+RED._("deploy.unusedConfigNodes")+' <a href="#" onclick="RED.sidebar.config.show(true); return false;">'+RED._("deploy.unusedConfigNodesLink")+'</a></p>',"success",false,6000);
} else {
RED.notify('<p>'+RED._("deploy.successfulDeploy")+'</p>',"success");
}
RED.nodes.eachNode(function(node) {
if (node.changed) {
node.dirty = true;
node.changed = false;
}
if (node.moved) {
node.dirty = true;
node.moved = false;
}
if(node.credentials) {
delete node.credentials;
}
});
RED.nodes.eachConfig(function (confNode) {
confNode.changed = false;
if (confNode.credentials) {
delete confNode.credentials;
}
});
RED.nodes.eachSubflow(function(subflow) {
subflow.changed = false;
});
RED.nodes.eachWorkspace(function(ws) {
ws.changed = false;
});
// Once deployed, cannot undo back to a clean state
RED.history.markAllDirty();
RED.view.redraw();
RED.events.emit("deploy");
}).fail(function(xhr,textStatus,err) {
RED.nodes.dirty(true);
$("#red-ui-header-button-deploy").removeClass("disabled");
if (xhr.status === 401) {
RED.notify(RED._("deploy.deployFailed",{message:RED._("user.notAuthorized")}),"error");
} else if (xhr.status === 409) {
resolveConflict(nns, true);
} else if (xhr.responseText) {
RED.notify(RED._("deploy.deployFailed",{message:xhr.responseText}),"error");
} else {
RED.notify(RED._("deploy.deployFailed",{message:RED._("deploy.errors.noResponse")}),"error");
}
}).always(function() {
deployInflight = false;
var delta = Math.max(0,300-(Date.now()-startTime));
setTimeout(function() {
$(".red-ui-deploy-button-content").css('opacity',1);
$(".red-ui-deploy-button-spinner").hide();
$("#red-ui-header-shade").hide();
$("#red-ui-editor-shade").hide();
$("#red-ui-palette-shade").hide();
$("#red-ui-sidebar-shade").hide();
},delta);
});
} }
const nns = RED.nodes.createCompleteNodeSet();
const startTime = Date.now();
$(".red-ui-deploy-button-content").css('opacity', 0);
$(".red-ui-deploy-button-spinner").show();
$("#red-ui-header-button-deploy").addClass("disabled");
const data = { flows: nns };
if (!force) {
data.rev = RED.nodes.version();
}
deployInflight = true;
$("#red-ui-header-shade").show();
$("#red-ui-editor-shade").show();
$("#red-ui-palette-shade").show();
$("#red-ui-sidebar-shade").show();
$.ajax({
url: "flows",
type: "POST",
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
headers: {
"Node-RED-Deployment-Type": deploymentType
}
}).done(function (data, textStatus, xhr) {
RED.nodes.dirty(false);
RED.nodes.version(data.rev);
RED.nodes.originalFlow(nns);
if (hasUnusedConfig) {
RED.notify(
'<p>' + RED._("deploy.successfulDeploy") + '</p>' +
'<p>' + RED._("deploy.unusedConfigNodes") + ' <a href="#" onclick="RED.sidebar.config.show(true); return false;">' + RED._("deploy.unusedConfigNodesLink") + '</a></p>', "success", false, 6000);
} else {
RED.notify('<p>' + RED._("deploy.successfulDeploy") + '</p>', "success");
}
RED.nodes.eachNode(function (node) {
if (node.changed) {
node.dirty = true;
node.changed = false;
}
if (node.moved) {
node.dirty = true;
node.moved = false;
}
if (node.credentials) {
delete node.credentials;
}
});
RED.nodes.eachConfig(function (confNode) {
confNode.changed = false;
if (confNode.credentials) {
delete confNode.credentials;
}
});
RED.nodes.eachSubflow(function (subflow) {
subflow.changed = false;
});
RED.nodes.eachWorkspace(function (ws) {
ws.changed = false;
});
// Once deployed, cannot undo back to a clean state
RED.history.markAllDirty();
RED.view.redraw();
RED.events.emit("deploy");
}).fail(function (xhr, textStatus, err) {
RED.nodes.dirty(true);
$("#red-ui-header-button-deploy").removeClass("disabled");
if (xhr.status === 401) {
RED.notify(RED._("deploy.deployFailed", { message: RED._("user.notAuthorized") }), "error");
} else if (xhr.status === 409) {
resolveConflict(nns, true);
} else if (xhr.responseText) {
RED.notify(RED._("deploy.deployFailed", { message: xhr.responseText }), "error");
} else {
RED.notify(RED._("deploy.deployFailed", { message: RED._("deploy.errors.noResponse") }), "error");
}
}).always(function () {
deployInflight = false;
const delta = Math.max(0, 300 - (Date.now() - startTime));
setTimeout(function () {
$(".red-ui-deploy-button-content").css('opacity', 1);
$(".red-ui-deploy-button-spinner").hide();
$("#red-ui-header-shade").hide();
$("#red-ui-editor-shade").hide();
$("#red-ui-palette-shade").hide();
$("#red-ui-sidebar-shade").hide();
}, delta);
});
} }
return { return {
init: init, init: init,

View File

@ -110,7 +110,11 @@ RED.editor = (function() {
var result = []; var result = [];
for (var prop in definition) { for (var prop in definition) {
if (definition.hasOwnProperty(prop)) { if (definition.hasOwnProperty(prop)) {
if (!validateNodeProperty(node, definition, prop, properties[prop])) { var valid = validateNodeProperty(node, definition, prop, properties[prop]);
if ((typeof valid) === "string") {
result.push(valid);
}
else if(!valid) {
result.push(prop); result.push(prop);
} }
} }
@ -124,7 +128,7 @@ RED.editor = (function() {
* @param definition - the node property definitions (either def.defaults or def.creds) * @param definition - the node property definitions (either def.defaults or def.creds)
* @param property - the property name being validated * @param property - the property name being validated
* @param value - the property value being validated * @param value - the property value being validated
* @returns {boolean} whether the node proprty is valid * @returns {boolean|string} whether the node proprty is valid. `true`: valid `false|String`: invalid
*/ */
function validateNodeProperty(node,definition,property,value) { function validateNodeProperty(node,definition,property,value) {
var valid = true; var valid = true;
@ -136,22 +140,74 @@ RED.editor = (function() {
if (/^\$\{[a-zA-Z_][a-zA-Z0-9_]*\}$/.test(value)) { if (/^\$\{[a-zA-Z_][a-zA-Z0-9_]*\}$/.test(value)) {
return true; return true;
} }
var label = null;
if (("label" in definition[property]) &&
((typeof definition[property].label) == "string")) {
label = definition[property].label;
}
if ("required" in definition[property] && definition[property].required) { if ("required" in definition[property] && definition[property].required) {
valid = value !== ""; valid = value !== "";
if (!valid && label) {
return RED._("validator.errors.missing-required-prop", {
prop: label
});
}
} }
if (valid && "validate" in definition[property]) { if (valid && "validate" in definition[property]) {
try { try {
valid = definition[property].validate.call(node,value); var opt = {};
if (label) {
opt.label = label;
}
valid = definition[property].validate.call(node,value, opt);
// If the validator takes two arguments, it is a 3.x validator that
// can return a String to mean 'invalid' and provide a reason
if ((definition[property].validate.length === 2) &&
((typeof valid) === "string")) {
return valid;
} else {
// Otherwise, a 2.x returns a truth-like/false-like value that
// we should cooerce to a boolean.
valid = !!valid
}
} catch(err) { } catch(err) {
console.log("Validation error:",node.type,node.id,"property: "+property,"value:",value,err); console.log("Validation error:",node.type,node.id,"property: "+property,"value:",value,err);
return RED._("validator.errors.validation-error", {
prop: property,
node: node.type,
id: node.id,
error: err.message
});
} }
} }
if (valid && definition[property].type && RED.nodes.getType(definition[property].type) && !("validate" in definition[property])) { if (valid && definition[property].type && RED.nodes.getType(definition[property].type) && !("validate" in definition[property])) {
if (!value || value == "_ADD_") { if (!value || value == "_ADD_") {
valid = definition[property].hasOwnProperty("required") && !definition[property].required; valid = definition[property].hasOwnProperty("required") && !definition[property].required;
if (!valid && label) {
return RED._("validator.errors.missing-required-prop", {
prop: label
});
}
} else { } else {
var configNode = RED.nodes.node(value); var configNode = RED.nodes.node(value);
valid = (configNode && (configNode.valid == null || configNode.valid)); if (configNode) {
if ((configNode.valid == null) || configNode.valid) {
return true;
}
if (label) {
return RED._("validator.errors.invalid-config", {
prop: label
});
}
}
else {
if (label) {
return RED._("validator.errors.missing-config", {
prop: label
});
}
}
return false;
} }
} }
return valid; return valid;
@ -179,10 +235,26 @@ RED.editor = (function() {
if (defaults[property].hasOwnProperty("format") && defaults[property].format !== "" && input[0].nodeName === "DIV") { if (defaults[property].hasOwnProperty("format") && defaults[property].format !== "" && input[0].nodeName === "DIV") {
value = input.text(); value = input.text();
} }
if (!validateNodeProperty(node, defaults, property,value)) { var valid = validateNodeProperty(node, defaults, property,value);
if (((typeof valid) === "string") || !valid) {
input.addClass("input-error"); input.addClass("input-error");
if ((typeof valid) === "string") {
var tooltip = input.data("tooltip");
if (tooltip) {
tooltip.setContent(valid);
}
else {
tooltip = RED.popover.tooltip(input, valid);
input.data("tooltip", tooltip);
}
}
} else { } else {
input.removeClass("input-error"); input.removeClass("input-error");
var tooltip = input.data("tooltip");
if (tooltip) {
input.data("tooltip", null);
tooltip.delete();
}
} }
} }
} }

View File

@ -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

View File

@ -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")},

View File

@ -977,18 +977,31 @@ RED.view.tools = (function() {
* doesn't clash with any existing nodes of that type * 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 * @param {Object} node The node to set the name of - if not provided, uses current selection
*/ */
function generateNodeNames(node) { function generateNodeNames(node, options) {
const nodes = node?[node]:RED.view.selection().nodes; 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) { if (nodes && nodes.length > 0) {
// Generate history event if using the workspace selection, // Generate history event if using the workspace selection,
// or if the provided node already exists // or if the provided node already exists
const generateHistory = !node || !!RED.nodes.node(node.id) const generateHistory = options.generateHistory && (!node || !!RED.nodes.node(node.id))
const historyEvents = [] const historyEvents = []
const typeIndex = {} const typeIndex = {}
let changed = false; let changed = false;
nodes.forEach(n => { nodes.forEach(n => {
if (n._def && n._def.defaults && n._def.defaults.name) { const nodeDef = n._def || RED.nodes.getType(n.type)
const paletteLabel = RED.utils.getPaletteLabel(n.type, n._def) if (nodeDef && nodeDef.defaults && nodeDef.defaults.name) {
const paletteLabel = RED.utils.getPaletteLabel(n.type, nodeDef)
const defaultNodeNameRE = new RegExp('^'+paletteLabel+' (\\d+)$') const defaultNodeNameRE = new RegExp('^'+paletteLabel+' (\\d+)$')
if (!typeIndex.hasOwnProperty(n.type)) { if (!typeIndex.hasOwnProperty(n.type)) {
const existingNodes = RED.nodes.filterNodes({type: n.type}) const existingNodes = RED.nodes.filterNodes({type: n.type})
@ -1004,7 +1017,7 @@ RED.view.tools = (function() {
}) })
typeIndex[n.type] = maxNameNumber + 1 typeIndex[n.type] = maxNameNumber + 1
} }
if (n.name === '') { if ((options.renameBlank && n.name === '') || (options.renameClash && defaultNodeNameRE.test(n.name))) {
if (generateHistory) { if (generateHistory) {
historyEvents.push({ historyEvents.push({
t:'edit', t:'edit',

View File

@ -604,7 +604,7 @@ RED.view = (function() {
RED.actions.add("core:copy-selection-to-internal-clipboard",copySelection); RED.actions.add("core:copy-selection-to-internal-clipboard",copySelection);
RED.actions.add("core:cut-selection-to-internal-clipboard",function(){copySelection();deleteSelection();}); RED.actions.add("core:cut-selection-to-internal-clipboard",function(){copySelection();deleteSelection();});
RED.actions.add("core:paste-from-internal-clipboard",function(){importNodes(clipboard,{generateIds: true});}); RED.actions.add("core:paste-from-internal-clipboard",function(){importNodes(clipboard,{generateIds: true, generateDefaultNames: true});});
RED.actions.add("core:detach-selected-nodes", function() { detachSelectedNodes() }) RED.actions.add("core:detach-selected-nodes", function() { detachSelectedNodes() })
@ -2463,7 +2463,7 @@ RED.view = (function() {
var removedEntities = RED.nodes.remove(node.id); var removedEntities = RED.nodes.remove(node.id);
removedNodes.push(node); removedNodes.push(node);
removedNodes = removedNodes.concat(removedEntities.nodes); removedNodes = removedNodes.concat(removedEntities.nodes);
addToRemovedLinks(removedNodes.removedLinks); addToRemovedLinks(removedEntities.links);
if (node.g) { if (node.g) {
var group = RED.nodes.group(node.g); var group = RED.nodes.group(node.g);
if (selectedGroups.indexOf(group) === -1) { if (selectedGroups.indexOf(group) === -1) {
@ -3480,7 +3480,6 @@ RED.view = (function() {
enterActiveGroup(ag); enterActiveGroup(ag);
activeGroup.selected = true; activeGroup.selected = true;
} }
console.log(d3.event);
var cnodes = RED.nodes.getAllFlowNodes(mousedown_node); var cnodes = RED.nodes.getAllFlowNodes(mousedown_node);
for (var n=0;n<cnodes.length;n++) { for (var n=0;n<cnodes.length;n++) {
if (!cnodes[n].selected) { if (!cnodes[n].selected) {
@ -5403,12 +5402,16 @@ RED.view = (function() {
* - addFlow - whether to import nodes to a new tab * - addFlow - whether to import nodes to a new tab
* - touchImport - whether this is a touch import. If not, imported nodes are * - touchImport - whether this is a touch import. If not, imported nodes are
* attachedto mouse for placing - "IMPORT_DRAGGING" state * attachedto mouse for placing - "IMPORT_DRAGGING" state
* - generateIds - whether to automatically generate new ids for all imported nodes
* - generateDefaultNames - whether to automatically update any nodes with clashing
* default names
*/ */
function importNodes(newNodesObj,options) { function importNodes(newNodesObj,options) {
options = options || { options = options || {
addFlow: false, addFlow: false,
touchImport: false, touchImport: false,
generateIds: false generateIds: false,
generateDefaultNames: false
} }
var addNewFlow = options.addFlow var addNewFlow = options.addFlow
var touchImport = options.touchImport; var touchImport = options.touchImport;
@ -5436,7 +5439,13 @@ RED.view = (function() {
if (!$.isArray(nodesToImport)) { if (!$.isArray(nodesToImport)) {
nodesToImport = [nodesToImport]; nodesToImport = [nodesToImport];
} }
if (options.generateDefaultNames) {
RED.actions.invoke("core:generate-node-names", nodesToImport, {
renameBlank: false,
renameClash: true,
generateHistory: false
})
}
try { try {
var activeSubflowChanged; var activeSubflowChanged;

View File

@ -118,20 +118,26 @@ RED.user = (function() {
}); });
} else if (data.type == "strategy") { } else if (data.type == "strategy") {
var sessionMessage = /[?&]session_message=(.*?)(?:$|&)/.exec(window.location.search);
RED.sessionMessages = RED.sessionMessages || [];
if (sessionMessage) {
RED.sessionMessages.push(decodeURIComponent(sessionMessage[1]));
if (history.pushState) {
var newurl = window.location.protocol+"//"+window.location.host+window.location.pathname
window.history.replaceState({ path: newurl }, "", newurl);
} else {
window.location.search = "";
}
}
if (RED.sessionMessages.length === 0 && data.autoLogin) {
document.location = data.loginRedirect
return
}
i = 0; i = 0;
for (;i<data.prompts.length;i++) { for (;i<data.prompts.length;i++) {
var field = data.prompts[i]; var field = data.prompts[i];
var sessionMessage = /[?&]session_message=(.*?)(?:$|&)/.exec(window.location.search);
if (sessionMessage) {
RED.sessionMessages = RED.sessionMessages || [];
RED.sessionMessages.push(sessionMessage[1]);
if (history.pushState) {
var newurl = window.location.protocol+"//"+window.location.host+window.location.pathname
window.history.replaceState({ path: newurl }, "", newurl);
} else {
window.location.search = "";
}
}
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) {

View File

@ -14,22 +14,72 @@
* limitations under the License. * limitations under the License.
**/ **/
RED.validators = { RED.validators = {
number: function(blankAllowed){return function(v) { return (blankAllowed&&(v===''||v===undefined)) || (v!=='' && !isNaN(v));}}, number: function(blankAllowed,mopt){
regex: function(re){return function(v) { return re.test(v);}}, return function(v, opt) {
typedInput: function(ptypeName,isConfig) { return function(v) { if ((blankAllowed&&(v===''||v===undefined)) || (v!=='' && !isNaN(v))) {
var ptype = $("#node-"+(isConfig?"config-":"")+"input-"+ptypeName).val() || this[ptypeName];
if (ptype === 'json') {
try {
JSON.parse(v);
return true; return true;
} catch(err) {
return false;
} }
} else if (ptype === 'msg' || ptype === 'flow' || ptype === 'global' ) { if (opt && opt.label) {
return RED.utils.validatePropertyExpression(v); return RED._("validator.errors.invalid-num-prop", {
} else if (ptype === 'num') { prop: opt.label
return /^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/.test(v); });
} }
return true; return opt ? RED._("validator.errors.invalid-num") : false;
}} };
},
regex: function(re, mopt) {
return function(v, opt) {
if (re.test(v)) {
return true;
}
if (opt && opt.label) {
return RED._("validator.errors.invalid-regex-prop", {
prop: opt.label
});
}
return opt ? RED._("validator.errors.invalid-regexp") : false;
};
},
typedInput: function(ptypeName,isConfig,mopt) {
return function(v, opt) {
var ptype = $("#node-"+(isConfig?"config-":"")+"input-"+ptypeName).val() || this[ptypeName];
if (ptype === 'json') {
try {
JSON.parse(v);
return true;
} catch(err) {
if (opt && opt.label) {
return RED._("validator.errors.invalid-json-prop", {
error: err.message,
prop: opt.label,
});
}
return opt ? RED._("validator.errors.invalid-json", {
error: err.message
}) : false;
}
} else if (ptype === 'msg' || ptype === 'flow' || ptype === 'global' ) {
if (RED.utils.validatePropertyExpression(v)) {
return true;
}
if (opt && opt.label) {
return RED._("validator.errors.invalid-prop-prop", {
prop: opt.label
});
}
return opt ? RED._("validator.errors.invalid-prop") : false;
} else if (ptype === 'num') {
if (/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/.test(v)) {
return true;
}
if (opt && opt.label) {
return RED._("validator.errors.invalid-num-prop", {
prop: opt.label
});
}
return opt ? RED._("validator.errors.invalid-num") : false;
}
return true;
};
}
}; };

View File

@ -142,9 +142,16 @@ body {
line-height: 14px; line-height: 14px;
vertical-align: text-top; vertical-align: text-top;
margin-top: 0px; margin-top: 0px;
background: url(images/spin.svg) no-repeat 50% 50%; -webkit-mask-image: url(images/spin.svg);
background-size: contain mask-image: url(images/spin.svg);
} -webkit-mask-size: contain;
mask-size: contain;
-webkit-mask-position: 50% 50%;
mask-position: 50% 50%;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
background-color: $spinner-color;
}
.red-ui-font-code { .red-ui-font-code {
font-family: $monospace-font; font-family: $monospace-font;

View File

@ -150,7 +150,6 @@ $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-color: $primary-text-color;
$diff-state-prefix-color: $secondary-text-color; $diff-state-prefix-color: $secondary-text-color;
$diff-state-added: #009900; $diff-state-added: #009900;
@ -195,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;
@ -301,6 +299,14 @@ $group-default-label-color: #a4a4a4;
$tourGuide-border: #c56c6c; $tourGuide-border: #c56c6c;
$tourGuide-heading-color: #c56c6c; $tourGuide-heading-color: #c56c6c;
$grip-color: #ccc;
$icons-flow-color: #808080;
$spinner-color: #999;
$tab-icon-color: #dedede;
// Deprecated // Deprecated
$text-color-green: $text-color-success; $text-color-green: $text-color-success;
$info-text-code-color: $text-color-code; $info-text-code-color: $text-color-code;

View File

@ -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;

View File

@ -149,11 +149,27 @@
bottom: 0px; bottom: 0px;
width: 7px; width: 7px;
left: -9px; left: -9px;
background: $primary-background url(images/grip.png) no-repeat 50% 50%; background-color: $primary-background;
cursor: col-resize; cursor: col-resize;
border-left: 1px solid $primary-border-color; border-left: 1px solid $primary-border-color;
box-shadow: -1px 0 6px $shadow; box-shadow: -1px 0 6px $shadow;
&:before {
content: '';
display: block;
width: 100%;
height: 100%;
-webkit-mask-image: url(images/grip.svg);
mask-image: url(images/grip.svg);
-webkit-mask-size: auto;
mask-size: auto;
-webkit-mask-position: 50% 50%;
mask-position: 50% 50%;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
background-color: $grip-color;
}
&.red-ui-tray-resize-maximised { &.red-ui-tray-resize-maximised {
background: $primary-background; background: $primary-background;
cursor: default; cursor: default;

View File

@ -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;
} }

View File

@ -254,7 +254,7 @@ button.red-ui-palette-editor-upload-button {
padding: 2px 8px; padding: 2px 8px;
} }
form { form {
width: 0; width: 0;
} }
} }
.red-ui-palette-editor-upload { .red-ui-palette-editor-upload {

View File

@ -40,7 +40,23 @@
height: 7px; height: 7px;
box-sizing: border-box; box-sizing: border-box;
cursor: ns-resize; cursor: ns-resize;
background: $primary-background url(images/grip-horizontal.png) no-repeat 50% 50%; background-color: $primary-background;
&:before {
content: '';
display: block;
width: 100%;
height: 100%;
-webkit-mask-image: url(images/grip-horizontal.svg);
mask-image: url(images/grip-horizontal.svg);
-webkit-mask-size: contain;
mask-size: contain;
-webkit-mask-position: center;
mask-position: center;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
background-color: $grip-color;
}
} }
@ -70,6 +86,22 @@
width: 7px; width: 7px;
display: inline-block; display: inline-block;
cursor: ew-resize; cursor: ew-resize;
background: $primary-background url(images/grip.png) no-repeat 50% 50%; background-color: $primary-background;
} }
&:before {
content: '';
display: block;
width: 100%;
height: 100%;
-webkit-mask-image: url(images/grip.svg);
mask-image: url(images/grip.svg);
-webkit-mask-size: contain;
mask-size: contain;
-webkit-mask-position: 50% 50%;
mask-position: 50% 50%;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
background-color: $grip-color;
}
} }

View File

@ -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) {

View File

@ -47,8 +47,24 @@
bottom:10px; bottom:10px;
width: 7px; width: 7px;
// z-index: 11; // z-index: 11;
background: $primary-background url(images/grip.png) no-repeat 50% 50%; background-color: $primary-background;
cursor: col-resize; cursor: col-resize;
&:before {
content: '';
display: block;
width: 100%;
height: 100%;
-webkit-mask-image: url(images/grip.svg);
mask-image: url(images/grip.svg);
-webkit-mask-size: auto;
mask-size: auto;
-webkit-mask-position: 50% 50%;
mask-position: 50% 50%;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
background-color: $grip-color;
}
} }
.red-ui-sidebar-closed > #red-ui-sidebar { display: none; } .red-ui-sidebar-closed > #red-ui-sidebar { display: none; }

View File

@ -530,10 +530,16 @@ div.red-ui-info-table {
} }
.red-ui-icons-flow { .red-ui-icons-flow {
background-image: url('images/subflow_tab.svg'); mask-image: url(images/subflow_tab.svg);
background-repeat: no-repeat; -webkit-mask-image: url(images/subflow_tab.svg);
background-size: contain; mask-position: center;
filter: brightness(2.5); -webkit-mask-position: center;
mask-size: contain;
-webkit-mask-size: contain;
mask-repeat: no-repeat;
-webkit-mask-repeat: no-repeat;
background-color: $icons-flow-color;
// filter: brightness(2.5);
} }
.red-ui-info-toolbar { .red-ui-info-toolbar {

View File

@ -346,21 +346,28 @@
} }
img.red-ui-tab-icon {
margin-left: -8px;
margin-right: 3px;
margin-top: -2px;
opacity: 0.1;
width: 20px;
height: 20px;
vertical-align: middle;
}
i.red-ui-tab-icon { i.red-ui-tab-icon {
opacity: 0.7; opacity: 0.7;
width: 18px; width: 18px;
height: 20px; height: 20px;
&:not(.fa) {
display: inline-block;
margin-left: -8px;
margin-right: 3px;
margin-top: -2px;
opacity: 1;
width: 20px;
height: 20px;
vertical-align: middle;
-webkit-mask-size: contain;
mask-size: contain;
-webkit-mask-position: center;
mask-position: center;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
background-color: $tab-icon-color;
}
} }
.red-ui-tabs-badges { .red-ui-tabs-badges {
position: absolute; position: absolute;
top:0px; top:0px;

View File

@ -135,6 +135,13 @@
} }
.red-ui-treeList-spinner { .red-ui-treeList-spinner {
height: 32px; height: 32px;
background: url(images/spin.svg) 50% 50% no-repeat; -webkit-mask-image: url(images/spin.svg);
background-size: auto 20px; mask-image: url(images/spin.svg);
-webkit-mask-size: auto 20px;
mask-size: auto 20px;
-webkit-mask-position: 50% 50%;
mask-position: 50% 50%;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
background-color: $spinner-color;
} }

View File

@ -104,6 +104,17 @@
} }
.red-ui-typedInput-icon { .red-ui-typedInput-icon {
margin-right: 6px; margin-right: 6px;
&:not(.fa) {
-webkit-mask-size: cover;
mask-size: cover;
-webkit-mask-position: center;
mask-position: center;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
background-color: $primary-text-color;
height: 14px;
width: 12px;
}
} }
} }
button.red-ui-typedInput-type-select, button.red-ui-typedInput-type-select,

View File

@ -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;

View File

@ -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;
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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 {

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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;
}

View File

@ -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';
}

View File

@ -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';
} }

View File

@ -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 { }

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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;
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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;
}

View File

@ -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';
}

View File

@ -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;
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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;
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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';
} }

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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';
}

View File

@ -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

File diff suppressed because one or more lines are too long

View File

@ -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

View 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

View File

@ -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

View File

@ -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
*-----------------------------------------------------------------------------*/

View File

@ -0,0 +1,197 @@
{
"base": "vs",
"inherit": true,
"rules": [
{
"token": "",
"foreground": "5c6773"
},
{
"token": "invalid",
"foreground": "ff3333"
},
{
"token": "emphasis",
"fontStyle": "italic"
},
{
"token": "strong",
"fontStyle": "bold"
},
{
"token": "variable",
"foreground": "5c6773"
},
{
"token": "variable.predefined",
"foreground": "5c6773"
},
{
"token": "constant",
"foreground": "f08c36"
},
{
"token": "comment",
"foreground": "abb0b6",
"fontStyle": "italic"
},
{
"token": "number",
"foreground": "f08c36"
},
{
"token": "number.hex",
"foreground": "f08c36"
},
{
"token": "regexp",
"foreground": "4dbf99"
},
{
"token": "annotation",
"foreground": "41a6d9"
},
{
"token": "type",
"foreground": "41a6d9"
},
{
"token": "delimiter",
"foreground": "5c6773"
},
{
"token": "delimiter.html",
"foreground": "5c6773"
},
{
"token": "delimiter.xml",
"foreground": "5c6773"
},
{
"token": "tag",
"foreground": "e7c547"
},
{
"token": "tag.id.jade",
"foreground": "e7c547"
},
{
"token": "tag.class.jade",
"foreground": "e7c547"
},
{
"token": "meta.scss",
"foreground": "e7c547"
},
{
"token": "metatag",
"foreground": "e7c547"
},
{
"token": "metatag.content.html",
"foreground": "86b300"
},
{
"token": "metatag.html",
"foreground": "e7c547"
},
{
"token": "metatag.xml",
"foreground": "e7c547"
},
{
"token": "metatag.php",
"fontStyle": "bold"
},
{
"token": "key",
"foreground": "41a6d9"
},
{
"token": "string.key.json",
"foreground": "41a6d9"
},
{
"token": "string.value.json",
"foreground": "86b300"
},
{
"token": "attribute.name",
"foreground": "f08c36"
},
{
"token": "attribute.value",
"foreground": "0451A5"
},
{
"token": "attribute.value.number",
"foreground": "abb0b6"
},
{
"token": "attribute.value.unit",
"foreground": "86b300"
},
{
"token": "attribute.value.html",
"foreground": "86b300"
},
{
"token": "attribute.value.xml",
"foreground": "86b300"
},
{
"token": "string",
"foreground": "86b300"
},
{
"token": "string.html",
"foreground": "86b300"
},
{
"token": "string.sql",
"foreground": "86b300"
},
{
"token": "string.yaml",
"foreground": "86b300"
},
{
"token": "keyword",
"foreground": "f2590c"
},
{
"token": "keyword.json",
"foreground": "f2590c"
},
{
"token": "keyword.flow",
"foreground": "f2590c"
},
{
"token": "keyword.flow.scss",
"foreground": "f2590c"
},
{
"token": "operator.scss",
"foreground": "666666"
},
{
"token": "operator.sql",
"foreground": "778899"
},
{
"token": "operator.swift",
"foreground": "666666"
},
{
"token": "predefined.sql",
"foreground": "FF00FF"
}
],
"colors": {
"editor.background": "#fafafa",
"editor.foreground": "#5c6773",
"editorIndentGuide.background": "#ecebec",
"editorIndentGuide.activeBackground": "#e0e0e0"
}
}

Some files were not shown because too many files have changed in this diff Show More