feat: 添加多项功能和修复
功能新增: - OSS 存储使用情况显示(文件页面) - OSS 当日流量统计(阿里云云监控API) - 分享页面路由修复(/s/xxx 格式支持) Bug修复: - 修复分享页面资源路径(相对路径改绝对路径) - 修复分享码获取逻辑(支持路径格式) - 修复OSS配额undefined显示问题 - 修复登录流程OSS配置检查 - 修复文件数为null时的显示问题 依赖更新: - 添加 @alicloud/cms20190101 云监控SDK - 添加 @alicloud/openapi-client Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
84
backend/node_modules/moment/src/lib/parse/regex.js
generated
vendored
Normal file
84
backend/node_modules/moment/src/lib/parse/regex.js
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
var match1 = /\d/, // 0 - 9
|
||||
match2 = /\d\d/, // 00 - 99
|
||||
match3 = /\d{3}/, // 000 - 999
|
||||
match4 = /\d{4}/, // 0000 - 9999
|
||||
match6 = /[+-]?\d{6}/, // -999999 - 999999
|
||||
match1to2 = /\d\d?/, // 0 - 99
|
||||
match3to4 = /\d\d\d\d?/, // 999 - 9999
|
||||
match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
|
||||
match1to3 = /\d{1,3}/, // 0 - 999
|
||||
match1to4 = /\d{1,4}/, // 0 - 9999
|
||||
match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
|
||||
matchUnsigned = /\d+/, // 0 - inf
|
||||
matchSigned = /[+-]?\d+/, // -inf - inf
|
||||
matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
|
||||
matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
|
||||
matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
|
||||
// any word (or two) characters or numbers including two/three word month in arabic.
|
||||
// includes scottish gaelic two word and hyphenated months
|
||||
matchWord =
|
||||
/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
|
||||
match1to2NoLeadingZero = /^[1-9]\d?/, // 1-99
|
||||
match1to2HasZero = /^([1-9]\d|\d)/, // 0-99
|
||||
regexes;
|
||||
|
||||
export {
|
||||
match1,
|
||||
match2,
|
||||
match3,
|
||||
match4,
|
||||
match6,
|
||||
match1to2,
|
||||
match3to4,
|
||||
match5to6,
|
||||
match1to3,
|
||||
match1to4,
|
||||
match1to6,
|
||||
matchUnsigned,
|
||||
matchSigned,
|
||||
matchOffset,
|
||||
matchShortOffset,
|
||||
matchTimestamp,
|
||||
matchWord,
|
||||
match1to2NoLeadingZero,
|
||||
match1to2HasZero,
|
||||
};
|
||||
|
||||
import hasOwnProp from '../utils/has-own-prop';
|
||||
import isFunction from '../utils/is-function';
|
||||
|
||||
regexes = {};
|
||||
|
||||
export function addRegexToken(token, regex, strictRegex) {
|
||||
regexes[token] = isFunction(regex)
|
||||
? regex
|
||||
: function (isStrict, localeData) {
|
||||
return isStrict && strictRegex ? strictRegex : regex;
|
||||
};
|
||||
}
|
||||
|
||||
export function getParseRegexForToken(token, config) {
|
||||
if (!hasOwnProp(regexes, token)) {
|
||||
return new RegExp(unescapeFormat(token));
|
||||
}
|
||||
|
||||
return regexes[token](config._strict, config._locale);
|
||||
}
|
||||
|
||||
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
|
||||
function unescapeFormat(s) {
|
||||
return regexEscape(
|
||||
s
|
||||
.replace('\\', '')
|
||||
.replace(
|
||||
/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
|
||||
function (matched, p1, p2, p3, p4) {
|
||||
return p1 || p2 || p3 || p4;
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export function regexEscape(s) {
|
||||
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
||||
}
|
||||
36
backend/node_modules/moment/src/lib/parse/token.js
generated
vendored
Normal file
36
backend/node_modules/moment/src/lib/parse/token.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import hasOwnProp from '../utils/has-own-prop';
|
||||
import isNumber from '../utils/is-number';
|
||||
import toInt from '../utils/to-int';
|
||||
|
||||
var tokens = {};
|
||||
|
||||
export function addParseToken(token, callback) {
|
||||
var i,
|
||||
func = callback,
|
||||
tokenLen;
|
||||
if (typeof token === 'string') {
|
||||
token = [token];
|
||||
}
|
||||
if (isNumber(callback)) {
|
||||
func = function (input, array) {
|
||||
array[callback] = toInt(input);
|
||||
};
|
||||
}
|
||||
tokenLen = token.length;
|
||||
for (i = 0; i < tokenLen; i++) {
|
||||
tokens[token[i]] = func;
|
||||
}
|
||||
}
|
||||
|
||||
export function addWeekParseToken(token, callback) {
|
||||
addParseToken(token, function (input, array, config, token) {
|
||||
config._w = config._w || {};
|
||||
callback(input, config._w, config, token);
|
||||
});
|
||||
}
|
||||
|
||||
export function addTimeToArrayFromToken(token, input, config) {
|
||||
if (input != null && hasOwnProp(tokens, token)) {
|
||||
tokens[token](input, config._a, config, token);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user