mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge 21d8e9e20e9f421ad06d31af4619cee171647b35 into ff565bacb4a4d84326c2e27eafd0732c272abfcb
This commit is contained in:
commit
9986a3001c
@ -80,7 +80,8 @@
|
|||||||
"uglify-js": "3.17.4",
|
"uglify-js": "3.17.4",
|
||||||
"uuid": "9.0.1",
|
"uuid": "9.0.1",
|
||||||
"ws": "7.5.10",
|
"ws": "7.5.10",
|
||||||
"xml2js": "0.6.2"
|
"xml2js": "0.6.2",
|
||||||
|
"dayjs": "1.11.13"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@node-rs/bcrypt": "1.10.4"
|
"@node-rs/bcrypt": "1.10.4"
|
||||||
|
@ -270,5 +270,9 @@
|
|||||||
"$moment": {
|
"$moment": {
|
||||||
"args": "[str]",
|
"args": "[str]",
|
||||||
"desc": "Liefert ein `date` Objekt unter Benutzung der Moment Library."
|
"desc": "Liefert ein `date` Objekt unter Benutzung der Moment Library."
|
||||||
|
},
|
||||||
|
"$dayjs": {
|
||||||
|
"args": "",
|
||||||
|
"desc": "Erhält ein Datumsobjekt mithilfe der dayjs-Bibliothek."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -274,5 +274,9 @@
|
|||||||
"$clone": {
|
"$clone": {
|
||||||
"args": "value",
|
"args": "value",
|
||||||
"desc": "Safely clone an object."
|
"desc": "Safely clone an object."
|
||||||
|
},
|
||||||
|
"$dayjs": {
|
||||||
|
"args": "",
|
||||||
|
"desc": "Gets a date object using the dayjs library."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -274,5 +274,9 @@
|
|||||||
"$clone": {
|
"$clone": {
|
||||||
"args": "value",
|
"args": "value",
|
||||||
"desc": "Clona un objeto de forma segura."
|
"desc": "Clona un objeto de forma segura."
|
||||||
|
},
|
||||||
|
"$dayjs": {
|
||||||
|
"args": "",
|
||||||
|
"desc": "Obtiene un objeto de fecha utilizando la biblioteca dayjs."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -274,5 +274,9 @@
|
|||||||
"$clone": {
|
"$clone": {
|
||||||
"args": "valeur",
|
"args": "valeur",
|
||||||
"desc": "Cloner un objet en toute sécurité."
|
"desc": "Cloner un objet en toute sécurité."
|
||||||
|
},
|
||||||
|
"$dayjs": {
|
||||||
|
"args": "",
|
||||||
|
"desc": "Obtient un objet date en utilisant la bibliothèque dayjs."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -274,5 +274,9 @@
|
|||||||
"$clone": {
|
"$clone": {
|
||||||
"args": "value",
|
"args": "value",
|
||||||
"desc": "オブジェクトを安全に複製します。"
|
"desc": "オブジェクトを安全に複製します。"
|
||||||
|
},
|
||||||
|
"$dayjs": {
|
||||||
|
"args": "",
|
||||||
|
"desc": "dayjsライブラリを使用して日付オブジェクトを取得します。"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,5 +218,9 @@
|
|||||||
"$env": {
|
"$env": {
|
||||||
"args": "arg",
|
"args": "arg",
|
||||||
"desc": "환경변수를 값으로 반환합니다.\n\n 이 함수는 Node-RED 정의 함수입니다."
|
"desc": "환경변수를 값으로 반환합니다.\n\n 이 함수는 Node-RED 정의 함수입니다."
|
||||||
|
},
|
||||||
|
"$dayjs": {
|
||||||
|
"args": "",
|
||||||
|
"desc": "dayjs 라이브러리를 사용하여 날짜 객체를 가져옵니다."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -270,5 +270,9 @@
|
|||||||
"$moment": {
|
"$moment": {
|
||||||
"args": "[str]",
|
"args": "[str]",
|
||||||
"desc": "Obtém um objeto de dados usando a biblioteca 'Moment'."
|
"desc": "Obtém um objeto de dados usando a biblioteca 'Moment'."
|
||||||
|
},
|
||||||
|
"$dayjs": {
|
||||||
|
"args": "",
|
||||||
|
"desc": "Obtém um objeto de data usando a biblioteca dayjs."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -270,5 +270,9 @@
|
|||||||
"$moment": {
|
"$moment": {
|
||||||
"args": "[str]",
|
"args": "[str]",
|
||||||
"desc": "Получает date объект, используя библиотеку Moment."
|
"desc": "Получает date объект, используя библиотеку Moment."
|
||||||
|
},
|
||||||
|
"$dayjs": {
|
||||||
|
"args": "",
|
||||||
|
"desc": "Получает объект даты, используя библиотеку dayjs."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -274,5 +274,9 @@
|
|||||||
"$clone": {
|
"$clone": {
|
||||||
"args": "value",
|
"args": "value",
|
||||||
"desc": "安全克隆对象."
|
"desc": "安全克隆对象."
|
||||||
|
},
|
||||||
|
"$dayjs": {
|
||||||
|
"args": "",
|
||||||
|
"desc": "使用 dayjs 库获取日期对象。"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -274,5 +274,9 @@
|
|||||||
"$clone": {
|
"$clone": {
|
||||||
"args": "value",
|
"args": "value",
|
||||||
"desc": "安全克隆對象."
|
"desc": "安全克隆對象."
|
||||||
|
},
|
||||||
|
"$dayjs": {
|
||||||
|
"args": "",
|
||||||
|
"desc": "使用 dayjs 函式庫獲取日期對象。"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,6 +163,7 @@
|
|||||||
'$clone': { args:[ 'arg' ]},
|
'$clone': { args:[ 'arg' ]},
|
||||||
'$contains':{ args:[ 'str', 'pattern' ]},
|
'$contains':{ args:[ 'str', 'pattern' ]},
|
||||||
'$count':{ args:[ 'array' ]},
|
'$count':{ args:[ 'array' ]},
|
||||||
|
'$dayjs':{ args:[ ]},
|
||||||
'$decodeUrl':{ args:[ 'str' ]},
|
'$decodeUrl':{ args:[ 'str' ]},
|
||||||
'$decodeUrlComponent':{ args:[ 'str' ]},
|
'$decodeUrlComponent':{ args:[ 'str' ]},
|
||||||
'$distinct':{ args:[ 'array' ]},
|
'$distinct':{ args:[ 'array' ]},
|
||||||
|
11
packages/node_modules/@node-red/util/lib/util.js
vendored
11
packages/node_modules/@node-red/util/lib/util.js
vendored
@ -26,6 +26,14 @@ const safeJSONStringify = require("json-stringify-safe");
|
|||||||
const util = require("util");
|
const util = require("util");
|
||||||
const { hasOwnProperty } = Object.prototype;
|
const { hasOwnProperty } = Object.prototype;
|
||||||
const log = require("./log")
|
const log = require("./log")
|
||||||
|
|
||||||
|
/* dayjs */
|
||||||
|
const dayjs = require("dayjs");
|
||||||
|
const utc = require("dayjs/plugin/utc");
|
||||||
|
const timezone = require("dayjs/plugin/timezone");
|
||||||
|
dayjs.extend(utc);
|
||||||
|
dayjs.extend(timezone);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Safely returns the object constructor name.
|
* Safely returns the object constructor name.
|
||||||
* @return {String} the name of the object constructor if it exists, empty string otherwise.
|
* @return {String} the name of the object constructor if it exists, empty string otherwise.
|
||||||
@ -727,6 +735,9 @@ function prepareJSONataExpression(value,node) {
|
|||||||
expr.assign('moment', function(arg1, arg2, arg3, arg4) {
|
expr.assign('moment', function(arg1, arg2, arg3, arg4) {
|
||||||
return moment(arg1, arg2, arg3, arg4);
|
return moment(arg1, arg2, arg3, arg4);
|
||||||
});
|
});
|
||||||
|
expr.assign('dayjs', function(arg1, arg2, arg3, arg4) {
|
||||||
|
return dayjs(arg1, arg2, arg3, arg4)
|
||||||
|
});
|
||||||
expr.registerFunction('clone', cloneMessage, '<(oa)-:o>');
|
expr.registerFunction('clone', cloneMessage, '<(oa)-:o>');
|
||||||
expr._legacyMode = /(^|[^a-zA-Z0-9_'".])msg([^a-zA-Z0-9_'"]|$)/.test(value);
|
expr._legacyMode = /(^|[^a-zA-Z0-9_'".])msg([^a-zA-Z0-9_'"]|$)/.test(value);
|
||||||
expr._node = node;
|
expr._node = node;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user