fix: 修复配额说明重复和undefined问题
- 在editStorageForm中初始化oss_storage_quota_value和oss_quota_unit - 删除重复的旧配额说明块,保留新的当前配额设置显示 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
27
backend/node_modules/@aws-sdk/util-arn-parser/dist-cjs/index.js
generated
vendored
Normal file
27
backend/node_modules/@aws-sdk/util-arn-parser/dist-cjs/index.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
'use strict';
|
||||
|
||||
const validate = (str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6;
|
||||
const parse = (arn) => {
|
||||
const segments = arn.split(":");
|
||||
if (segments.length < 6 || segments[0] !== "arn")
|
||||
throw new Error("Malformed ARN");
|
||||
const [, partition, service, region, accountId, ...resource] = segments;
|
||||
return {
|
||||
partition,
|
||||
service,
|
||||
region,
|
||||
accountId,
|
||||
resource: resource.join(":"),
|
||||
};
|
||||
};
|
||||
const build = (arnObject) => {
|
||||
const { partition = "aws", service, region, accountId, resource } = arnObject;
|
||||
if ([service, region, accountId, resource].some((segment) => typeof segment !== "string")) {
|
||||
throw new Error("Input ARN object is invalid");
|
||||
}
|
||||
return `arn:${partition}:${service}:${region}:${accountId}:${resource}`;
|
||||
};
|
||||
|
||||
exports.build = build;
|
||||
exports.parse = parse;
|
||||
exports.validate = validate;
|
||||
Reference in New Issue
Block a user