Files
237899745 b135987fe8 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>
2026-01-22 21:04:22 +08:00

65 lines
1.9 KiB
JavaScript

"use strict";
// This file is auto-generated, don't edit it
/**
* This is a string module
*/
Object.defineProperty(exports, "__esModule", { value: true });
class Client {
static split(raw, sep, limit) {
if (null === limit || typeof (limit) === 'undefined' || limit < 1) {
return raw.split(sep);
}
let result = raw.split(sep, limit);
if (result.length >= limit) {
result[limit - 1] = [result[limit - 1], ...raw.split(sep).splice(limit)].join(sep);
}
return result;
}
static replace(raw, oldStr, newStr, count = null) {
if (null === count || typeof (count) === 'undefined' || count < 0) {
return raw.split(oldStr).join(newStr);
}
let tmp = raw.split(oldStr);
if (count >= tmp.length - 1) {
return raw.split(oldStr).join(newStr);
}
let left = tmp.slice(0, count + 1).join(newStr);
let right = tmp.slice(count + 1).join(oldStr);
return left + oldStr + right;
}
static contains(s, substr) {
return s.indexOf(substr) !== -1;
}
static count(s, substr) {
return s.split(substr).length;
}
static hasPrefix(s, prefix) {
return s.startsWith(prefix);
}
static hasSuffix(s, substr) {
return s.endsWith(substr);
}
static index(s, substr) {
return s.indexOf(substr);
}
static toLower(s) {
return s.toLowerCase();
}
static toUpper(s) {
return s.toUpperCase();
}
static subString(s, strat, end) {
return s.slice(strat, end);
}
static equals(expect, actual) {
return expect === actual;
}
static trim(str) {
return str.trim();
}
static toBytes(str, encoding) {
return Buffer.from(str, encoding);
}
}
exports.default = Client;
//# sourceMappingURL=client.js.map