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:
92
backend/node_modules/@alicloud/darabonba-array/src/client.ts
generated
vendored
Normal file
92
backend/node_modules/@alicloud/darabonba-array/src/client.ts
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
// This file is auto-generated, don't edit it
|
||||
|
||||
import { stringify } from "querystring";
|
||||
|
||||
/**
|
||||
* This is a array module
|
||||
*/
|
||||
export default class Client {
|
||||
|
||||
// 按照起止坐标截取数组
|
||||
static split(raw: string[], index: number, limit: number): string[] {
|
||||
|
||||
return raw.slice(index, index + limit);
|
||||
}
|
||||
|
||||
// 判断数组是否包含指定字符串
|
||||
static contains(raw: string[], str: string): boolean {
|
||||
if (null === raw || typeof (raw) === 'undefined') {
|
||||
throw new Error('not a valid value for parameter')
|
||||
}
|
||||
return raw.includes(str);
|
||||
}
|
||||
|
||||
// 返回指定字符串在数组中的下标,如果不存在返回 -1
|
||||
static index(raw: string[], str: string): number {
|
||||
if (null === raw || typeof (raw) === 'undefined') {
|
||||
throw new Error('not a valid value for parameter')
|
||||
}
|
||||
return raw.indexOf(str);
|
||||
}
|
||||
|
||||
// 返回数组长度
|
||||
static size(raw: string[]): number {
|
||||
if (null === raw || typeof (raw) === 'undefined') {
|
||||
throw new Error('not a valid value for parameter')
|
||||
}
|
||||
return raw.length;
|
||||
}
|
||||
|
||||
// 根据下标获取数组中的字符串元素
|
||||
static get(raw: string[], index: number): string {
|
||||
if (null === raw || typeof (raw) === 'undefined') {
|
||||
throw new Error('not a valid value for parameter')
|
||||
}
|
||||
return raw[index];
|
||||
throw new Error('Un-implemented!');
|
||||
}
|
||||
|
||||
// 数组合并成字符串,并添加指定的间隔字符串
|
||||
static join(raw: string[], sep: string): string {
|
||||
if (null === raw || typeof (raw) === 'undefined') {
|
||||
throw new Error('not a valid value for parameter')
|
||||
}
|
||||
return raw.join(sep)
|
||||
throw new Error('Un-implemented!');
|
||||
}
|
||||
|
||||
// 合并两个字符串数组,并返回
|
||||
static concat(raw: string[], sep: string[]): string[] {
|
||||
if (null === raw || typeof (raw) === 'undefined' || null === sep || typeof (sep) === 'undefined') {
|
||||
throw new Error('not a valid value for parameter')
|
||||
}
|
||||
return raw.concat(sep);
|
||||
}
|
||||
|
||||
// 数组排序,升序
|
||||
static ascSort(raw: string[]): string[] {
|
||||
if (null === raw || typeof (raw) === 'undefined') {
|
||||
throw new Error('not a valid value for parameter')
|
||||
}
|
||||
return raw.sort();
|
||||
}
|
||||
|
||||
// 数组排序,降序
|
||||
static descSort(raw: string[]): string[] {
|
||||
if (null === raw || typeof (raw) === 'undefined') {
|
||||
throw new Error('not a valid value for parameter')
|
||||
}
|
||||
raw.sort(function (a, b) { return b.localeCompare(a) })
|
||||
return raw;
|
||||
}
|
||||
|
||||
/**
|
||||
* append any array item
|
||||
*/
|
||||
static append(array: any, item: any): void {
|
||||
if (null !== array && Array.isArray(array)) {
|
||||
array.push(item);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user