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:
26
backend/node_modules/@alicloud/darabonba-string/README.md
generated
vendored
Normal file
26
backend/node_modules/@alicloud/darabonba-string/README.md
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
English | [简体中文](README-CN.md)
|
||||

|
||||
|
||||
## Alibaba Cloud Darabonba String Util SDK for TypeScript/Node.js
|
||||
|
||||
## Prerequisite
|
||||
|
||||
Node.js >= 8.x
|
||||
|
||||
## Installation
|
||||
If you use `npm` to manage your dependence, you can use the following command to install it and write into package.json dependences:
|
||||
|
||||
```sh
|
||||
$ npm install @alicloud/darabonba-string -S
|
||||
```
|
||||
|
||||
## Issues
|
||||
[Opening an Issue](https://github.com/aliyun/darabonba-string/issues/new), Issues not conforming to the guidelines may be closed immediately.
|
||||
|
||||
## References
|
||||
* [Latest Release](https://github.com/aliyun/darabonba-string/tree/master/ts)
|
||||
|
||||
## License
|
||||
[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
||||
Copyright (c) 2009-present, Alibaba Cloud All rights reserved.
|
||||
19
backend/node_modules/@alicloud/darabonba-string/dist/client.d.ts
generated
vendored
Normal file
19
backend/node_modules/@alicloud/darabonba-string/dist/client.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* This is a string module
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
export default class Client {
|
||||
static split(raw: string, sep: string, limit: number): string[];
|
||||
static replace(raw: string, oldStr: string, newStr: string, count?: number): string;
|
||||
static contains(s: string, substr: string): boolean;
|
||||
static count(s: string, substr: string): number;
|
||||
static hasPrefix(s: string, prefix: string): boolean;
|
||||
static hasSuffix(s: string, substr: string): boolean;
|
||||
static index(s: string, substr: string): number;
|
||||
static toLower(s: string): string;
|
||||
static toUpper(s: string): string;
|
||||
static subString(s: string, strat: number, end: number): string;
|
||||
static equals(expect: string, actual: string): boolean;
|
||||
static trim(str: string): string;
|
||||
static toBytes(str: string, encoding: BufferEncoding): Buffer;
|
||||
}
|
||||
65
backend/node_modules/@alicloud/darabonba-string/dist/client.js
generated
vendored
Normal file
65
backend/node_modules/@alicloud/darabonba-string/dist/client.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
"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
|
||||
1
backend/node_modules/@alicloud/darabonba-string/dist/client.js.map
generated
vendored
Normal file
1
backend/node_modules/@alicloud/darabonba-string/dist/client.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";AAAA,6CAA6C;AAC7C;;GAEG;;AAGH,MAAqB,MAAM;IAEzB,MAAM,CAAC,KAAK,CAAC,GAAW,EAAE,GAAW,EAAE,KAAa;QAClD,IAAI,IAAI,KAAK,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,WAAW,IAAI,KAAK,GAAG,CAAC,EAAE;YACjE,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;QAClC,IAAI,MAAM,CAAC,MAAM,IAAI,KAAK,EAAE;YAC1B,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;SACnF;QACD,OAAO,M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,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,CAAS,EAAE,MAAc;QACpC,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,CAAS;QACtB,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;IACzB,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,CAAS;QACtB,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;IACzB,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,CAAS,EAAE,KAAa,EAAE,GAAW;QACpD,OAAO,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,MAAc,EAAE,MAAc;QAC1C,OAAO,MAAM,KAAK,MAAM,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,GAAW;QACrB,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,GAAW,EAAE,QAAwB;QAClD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IACpC,CAAC;CAGF;AAvED,yBAuEC"}
|
||||
37
backend/node_modules/@alicloud/darabonba-string/package.json
generated
vendored
Normal file
37
backend/node_modules/@alicloud/darabonba-string/package.json
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "@alicloud/darabonba-string",
|
||||
"version": "1.0.3",
|
||||
"description": "",
|
||||
"main": "dist/client.js",
|
||||
"scripts": {
|
||||
"test": "mocha -r ts-node/register ./tests/*test.ts",
|
||||
"test-cov": "nyc -e .ts -r=html -r=text -r=lcov npm run test",
|
||||
"build": "tsc",
|
||||
"prepublishOnly": "tsc"
|
||||
},
|
||||
"author": "Jackson Tian",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@types/node": "^12.12.26",
|
||||
"@types/mocha": "^9.0.0",
|
||||
"@types/should": "^13.0.0",
|
||||
"@types/sinon": "^10.0.6",
|
||||
"chai": "^4.3.4",
|
||||
"cross-env": "^7.0.3",
|
||||
"mocha": "^9.1.3",
|
||||
"nyc": "^15.1.0",
|
||||
"should": "^13.2.3",
|
||||
"sinon": "^12.0.1",
|
||||
"source-map-support": "^0.5.16",
|
||||
"ts-node": "^8.10.2",
|
||||
"tsconfig-paths": "^3.12.0",
|
||||
"typescript": "^3.7.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@alicloud/tea-typescript": "^1.5.1"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"src"
|
||||
]
|
||||
}
|
||||
78
backend/node_modules/@alicloud/darabonba-string/src/client.ts
generated
vendored
Normal file
78
backend/node_modules/@alicloud/darabonba-string/src/client.ts
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
// This file is auto-generated, don't edit it
|
||||
/**
|
||||
* This is a string module
|
||||
*/
|
||||
|
||||
|
||||
export default class Client {
|
||||
|
||||
static split(raw: string, sep: string, limit: number): string[] {
|
||||
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: string, oldStr: string, newStr: string, count: number = null): string {
|
||||
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: string, substr: string): boolean {
|
||||
return s.indexOf(substr) !== -1;
|
||||
}
|
||||
|
||||
static count(s: string, substr: string): number {
|
||||
return s.split(substr).length;
|
||||
}
|
||||
|
||||
static hasPrefix(s: string, prefix: string): boolean {
|
||||
return s.startsWith(prefix);
|
||||
}
|
||||
|
||||
static hasSuffix(s: string, substr: string): boolean {
|
||||
return s.endsWith(substr);
|
||||
}
|
||||
|
||||
static index(s: string, substr: string): number {
|
||||
return s.indexOf(substr);
|
||||
}
|
||||
|
||||
static toLower(s: string): string {
|
||||
return s.toLowerCase();
|
||||
}
|
||||
|
||||
static toUpper(s: string): string {
|
||||
return s.toUpperCase();
|
||||
}
|
||||
|
||||
static subString(s: string, strat: number, end: number): string {
|
||||
return s.slice(strat, end);
|
||||
}
|
||||
|
||||
static equals(expect: string, actual: string): boolean {
|
||||
return expect === actual;
|
||||
}
|
||||
|
||||
static trim(str: string): string {
|
||||
return str.trim();
|
||||
}
|
||||
|
||||
static toBytes(str: string, encoding: BufferEncoding): Buffer {
|
||||
return Buffer.from(str, encoding);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user