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:
10
backend/node_modules/@aws-sdk/util-endpoints/dist-es/aws.js
generated
vendored
Normal file
10
backend/node_modules/@aws-sdk/util-endpoints/dist-es/aws.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { customEndpointFunctions } from "@smithy/util-endpoints";
|
||||
import { isVirtualHostableS3Bucket } from "./lib/aws/isVirtualHostableS3Bucket";
|
||||
import { parseArn } from "./lib/aws/parseArn";
|
||||
import { partition } from "./lib/aws/partition";
|
||||
export const awsEndpointFunctions = {
|
||||
isVirtualHostableS3Bucket: isVirtualHostableS3Bucket,
|
||||
parseArn: parseArn,
|
||||
partition: partition,
|
||||
};
|
||||
customEndpointFunctions.aws = awsEndpointFunctions;
|
||||
6
backend/node_modules/@aws-sdk/util-endpoints/dist-es/index.js
generated
vendored
Normal file
6
backend/node_modules/@aws-sdk/util-endpoints/dist-es/index.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export * from "./aws";
|
||||
export * from "./lib/aws/partition";
|
||||
export * from "./lib/isIpAddress";
|
||||
export * from "./resolveDefaultAwsRegionalEndpointsConfig";
|
||||
export * from "./resolveEndpoint";
|
||||
export * from "./types";
|
||||
3
backend/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/index.js
generated
vendored
Normal file
3
backend/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from "./isVirtualHostableS3Bucket";
|
||||
export * from "./parseArn";
|
||||
export * from "./partition";
|
||||
25
backend/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js
generated
vendored
Normal file
25
backend/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import { isValidHostLabel } from "@smithy/util-endpoints";
|
||||
import { isIpAddress } from "../isIpAddress";
|
||||
export const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
|
||||
if (allowSubDomains) {
|
||||
for (const label of value.split(".")) {
|
||||
if (!isVirtualHostableS3Bucket(label)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (!isValidHostLabel(value)) {
|
||||
return false;
|
||||
}
|
||||
if (value.length < 3 || value.length > 63) {
|
||||
return false;
|
||||
}
|
||||
if (value !== value.toLowerCase()) {
|
||||
return false;
|
||||
}
|
||||
if (isIpAddress(value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
18
backend/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js
generated
vendored
Normal file
18
backend/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
const ARN_DELIMITER = ":";
|
||||
const RESOURCE_DELIMITER = "/";
|
||||
export const parseArn = (value) => {
|
||||
const segments = value.split(ARN_DELIMITER);
|
||||
if (segments.length < 6)
|
||||
return null;
|
||||
const [arn, partition, service, region, accountId, ...resourcePath] = segments;
|
||||
if (arn !== "arn" || partition === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "")
|
||||
return null;
|
||||
const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();
|
||||
return {
|
||||
partition,
|
||||
service,
|
||||
region,
|
||||
accountId,
|
||||
resourceId,
|
||||
};
|
||||
};
|
||||
41
backend/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js
generated
vendored
Normal file
41
backend/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
import partitionsInfo from "./partitions.json";
|
||||
let selectedPartitionsInfo = partitionsInfo;
|
||||
let selectedUserAgentPrefix = "";
|
||||
export const partition = (value) => {
|
||||
const { partitions } = selectedPartitionsInfo;
|
||||
for (const partition of partitions) {
|
||||
const { regions, outputs } = partition;
|
||||
for (const [region, regionData] of Object.entries(regions)) {
|
||||
if (region === value) {
|
||||
return {
|
||||
...outputs,
|
||||
...regionData,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const partition of partitions) {
|
||||
const { regionRegex, outputs } = partition;
|
||||
if (new RegExp(regionRegex).test(value)) {
|
||||
return {
|
||||
...outputs,
|
||||
};
|
||||
}
|
||||
}
|
||||
const DEFAULT_PARTITION = partitions.find((partition) => partition.id === "aws");
|
||||
if (!DEFAULT_PARTITION) {
|
||||
throw new Error("Provided region was not found in the partition array or regex," +
|
||||
" and default partition with id 'aws' doesn't exist.");
|
||||
}
|
||||
return {
|
||||
...DEFAULT_PARTITION.outputs,
|
||||
};
|
||||
};
|
||||
export const setPartitionInfo = (partitionsInfo, userAgentPrefix = "") => {
|
||||
selectedPartitionsInfo = partitionsInfo;
|
||||
selectedUserAgentPrefix = userAgentPrefix;
|
||||
};
|
||||
export const useDefaultPartitionInfo = () => {
|
||||
setPartitionInfo(partitionsInfo, "");
|
||||
};
|
||||
export const getUserAgentPrefix = () => selectedUserAgentPrefix;
|
||||
267
backend/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json
generated
vendored
Normal file
267
backend/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json
generated
vendored
Normal file
@@ -0,0 +1,267 @@
|
||||
{
|
||||
"partitions": [{
|
||||
"id": "aws",
|
||||
"outputs": {
|
||||
"dnsSuffix": "amazonaws.com",
|
||||
"dualStackDnsSuffix": "api.aws",
|
||||
"implicitGlobalRegion": "us-east-1",
|
||||
"name": "aws",
|
||||
"supportsDualStack": true,
|
||||
"supportsFIPS": true
|
||||
},
|
||||
"regionRegex": "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",
|
||||
"regions": {
|
||||
"af-south-1": {
|
||||
"description": "Africa (Cape Town)"
|
||||
},
|
||||
"ap-east-1": {
|
||||
"description": "Asia Pacific (Hong Kong)"
|
||||
},
|
||||
"ap-east-2": {
|
||||
"description": "Asia Pacific (Taipei)"
|
||||
},
|
||||
"ap-northeast-1": {
|
||||
"description": "Asia Pacific (Tokyo)"
|
||||
},
|
||||
"ap-northeast-2": {
|
||||
"description": "Asia Pacific (Seoul)"
|
||||
},
|
||||
"ap-northeast-3": {
|
||||
"description": "Asia Pacific (Osaka)"
|
||||
},
|
||||
"ap-south-1": {
|
||||
"description": "Asia Pacific (Mumbai)"
|
||||
},
|
||||
"ap-south-2": {
|
||||
"description": "Asia Pacific (Hyderabad)"
|
||||
},
|
||||
"ap-southeast-1": {
|
||||
"description": "Asia Pacific (Singapore)"
|
||||
},
|
||||
"ap-southeast-2": {
|
||||
"description": "Asia Pacific (Sydney)"
|
||||
},
|
||||
"ap-southeast-3": {
|
||||
"description": "Asia Pacific (Jakarta)"
|
||||
},
|
||||
"ap-southeast-4": {
|
||||
"description": "Asia Pacific (Melbourne)"
|
||||
},
|
||||
"ap-southeast-5": {
|
||||
"description": "Asia Pacific (Malaysia)"
|
||||
},
|
||||
"ap-southeast-6": {
|
||||
"description": "Asia Pacific (New Zealand)"
|
||||
},
|
||||
"ap-southeast-7": {
|
||||
"description": "Asia Pacific (Thailand)"
|
||||
},
|
||||
"aws-global": {
|
||||
"description": "aws global region"
|
||||
},
|
||||
"ca-central-1": {
|
||||
"description": "Canada (Central)"
|
||||
},
|
||||
"ca-west-1": {
|
||||
"description": "Canada West (Calgary)"
|
||||
},
|
||||
"eu-central-1": {
|
||||
"description": "Europe (Frankfurt)"
|
||||
},
|
||||
"eu-central-2": {
|
||||
"description": "Europe (Zurich)"
|
||||
},
|
||||
"eu-north-1": {
|
||||
"description": "Europe (Stockholm)"
|
||||
},
|
||||
"eu-south-1": {
|
||||
"description": "Europe (Milan)"
|
||||
},
|
||||
"eu-south-2": {
|
||||
"description": "Europe (Spain)"
|
||||
},
|
||||
"eu-west-1": {
|
||||
"description": "Europe (Ireland)"
|
||||
},
|
||||
"eu-west-2": {
|
||||
"description": "Europe (London)"
|
||||
},
|
||||
"eu-west-3": {
|
||||
"description": "Europe (Paris)"
|
||||
},
|
||||
"il-central-1": {
|
||||
"description": "Israel (Tel Aviv)"
|
||||
},
|
||||
"me-central-1": {
|
||||
"description": "Middle East (UAE)"
|
||||
},
|
||||
"me-south-1": {
|
||||
"description": "Middle East (Bahrain)"
|
||||
},
|
||||
"mx-central-1": {
|
||||
"description": "Mexico (Central)"
|
||||
},
|
||||
"sa-east-1": {
|
||||
"description": "South America (Sao Paulo)"
|
||||
},
|
||||
"us-east-1": {
|
||||
"description": "US East (N. Virginia)"
|
||||
},
|
||||
"us-east-2": {
|
||||
"description": "US East (Ohio)"
|
||||
},
|
||||
"us-west-1": {
|
||||
"description": "US West (N. California)"
|
||||
},
|
||||
"us-west-2": {
|
||||
"description": "US West (Oregon)"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id": "aws-cn",
|
||||
"outputs": {
|
||||
"dnsSuffix": "amazonaws.com.cn",
|
||||
"dualStackDnsSuffix": "api.amazonwebservices.com.cn",
|
||||
"implicitGlobalRegion": "cn-northwest-1",
|
||||
"name": "aws-cn",
|
||||
"supportsDualStack": true,
|
||||
"supportsFIPS": true
|
||||
},
|
||||
"regionRegex": "^cn\\-\\w+\\-\\d+$",
|
||||
"regions": {
|
||||
"aws-cn-global": {
|
||||
"description": "aws-cn global region"
|
||||
},
|
||||
"cn-north-1": {
|
||||
"description": "China (Beijing)"
|
||||
},
|
||||
"cn-northwest-1": {
|
||||
"description": "China (Ningxia)"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id": "aws-eusc",
|
||||
"outputs": {
|
||||
"dnsSuffix": "amazonaws.eu",
|
||||
"dualStackDnsSuffix": "api.amazonwebservices.eu",
|
||||
"implicitGlobalRegion": "eusc-de-east-1",
|
||||
"name": "aws-eusc",
|
||||
"supportsDualStack": true,
|
||||
"supportsFIPS": true
|
||||
},
|
||||
"regionRegex": "^eusc\\-(de)\\-\\w+\\-\\d+$",
|
||||
"regions": {
|
||||
"eusc-de-east-1": {
|
||||
"description": "AWS European Sovereign Cloud (Germany)"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id": "aws-iso",
|
||||
"outputs": {
|
||||
"dnsSuffix": "c2s.ic.gov",
|
||||
"dualStackDnsSuffix": "api.aws.ic.gov",
|
||||
"implicitGlobalRegion": "us-iso-east-1",
|
||||
"name": "aws-iso",
|
||||
"supportsDualStack": true,
|
||||
"supportsFIPS": true
|
||||
},
|
||||
"regionRegex": "^us\\-iso\\-\\w+\\-\\d+$",
|
||||
"regions": {
|
||||
"aws-iso-global": {
|
||||
"description": "aws-iso global region"
|
||||
},
|
||||
"us-iso-east-1": {
|
||||
"description": "US ISO East"
|
||||
},
|
||||
"us-iso-west-1": {
|
||||
"description": "US ISO WEST"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id": "aws-iso-b",
|
||||
"outputs": {
|
||||
"dnsSuffix": "sc2s.sgov.gov",
|
||||
"dualStackDnsSuffix": "api.aws.scloud",
|
||||
"implicitGlobalRegion": "us-isob-east-1",
|
||||
"name": "aws-iso-b",
|
||||
"supportsDualStack": true,
|
||||
"supportsFIPS": true
|
||||
},
|
||||
"regionRegex": "^us\\-isob\\-\\w+\\-\\d+$",
|
||||
"regions": {
|
||||
"aws-iso-b-global": {
|
||||
"description": "aws-iso-b global region"
|
||||
},
|
||||
"us-isob-east-1": {
|
||||
"description": "US ISOB East (Ohio)"
|
||||
},
|
||||
"us-isob-west-1": {
|
||||
"description": "US ISOB West"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id": "aws-iso-e",
|
||||
"outputs": {
|
||||
"dnsSuffix": "cloud.adc-e.uk",
|
||||
"dualStackDnsSuffix": "api.cloud-aws.adc-e.uk",
|
||||
"implicitGlobalRegion": "eu-isoe-west-1",
|
||||
"name": "aws-iso-e",
|
||||
"supportsDualStack": true,
|
||||
"supportsFIPS": true
|
||||
},
|
||||
"regionRegex": "^eu\\-isoe\\-\\w+\\-\\d+$",
|
||||
"regions": {
|
||||
"aws-iso-e-global": {
|
||||
"description": "aws-iso-e global region"
|
||||
},
|
||||
"eu-isoe-west-1": {
|
||||
"description": "EU ISOE West"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id": "aws-iso-f",
|
||||
"outputs": {
|
||||
"dnsSuffix": "csp.hci.ic.gov",
|
||||
"dualStackDnsSuffix": "api.aws.hci.ic.gov",
|
||||
"implicitGlobalRegion": "us-isof-south-1",
|
||||
"name": "aws-iso-f",
|
||||
"supportsDualStack": true,
|
||||
"supportsFIPS": true
|
||||
},
|
||||
"regionRegex": "^us\\-isof\\-\\w+\\-\\d+$",
|
||||
"regions": {
|
||||
"aws-iso-f-global": {
|
||||
"description": "aws-iso-f global region"
|
||||
},
|
||||
"us-isof-east-1": {
|
||||
"description": "US ISOF EAST"
|
||||
},
|
||||
"us-isof-south-1": {
|
||||
"description": "US ISOF SOUTH"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"id": "aws-us-gov",
|
||||
"outputs": {
|
||||
"dnsSuffix": "amazonaws.com",
|
||||
"dualStackDnsSuffix": "api.aws",
|
||||
"implicitGlobalRegion": "us-gov-west-1",
|
||||
"name": "aws-us-gov",
|
||||
"supportsDualStack": true,
|
||||
"supportsFIPS": true
|
||||
},
|
||||
"regionRegex": "^us\\-gov\\-\\w+\\-\\d+$",
|
||||
"regions": {
|
||||
"aws-us-gov-global": {
|
||||
"description": "aws-us-gov global region"
|
||||
},
|
||||
"us-gov-east-1": {
|
||||
"description": "AWS GovCloud (US-East)"
|
||||
},
|
||||
"us-gov-west-1": {
|
||||
"description": "AWS GovCloud (US-West)"
|
||||
}
|
||||
}
|
||||
}],
|
||||
"version": "1.1"
|
||||
}
|
||||
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js
generated
vendored
Normal file
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { isIpAddress } from "@smithy/util-endpoints";
|
||||
21
backend/node_modules/@aws-sdk/util-endpoints/dist-es/resolveDefaultAwsRegionalEndpointsConfig.js
generated
vendored
Normal file
21
backend/node_modules/@aws-sdk/util-endpoints/dist-es/resolveDefaultAwsRegionalEndpointsConfig.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { parseUrl } from "@smithy/url-parser";
|
||||
export const resolveDefaultAwsRegionalEndpointsConfig = (input) => {
|
||||
if (typeof input.endpointProvider !== "function") {
|
||||
throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.");
|
||||
}
|
||||
const { endpoint } = input;
|
||||
if (endpoint === undefined) {
|
||||
input.endpoint = async () => {
|
||||
return toEndpointV1(input.endpointProvider({
|
||||
Region: typeof input.region === "function" ? await input.region() : input.region,
|
||||
UseDualStack: typeof input.useDualstackEndpoint === "function"
|
||||
? await input.useDualstackEndpoint()
|
||||
: input.useDualstackEndpoint,
|
||||
UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint,
|
||||
Endpoint: undefined,
|
||||
}, { logger: input.logger }));
|
||||
};
|
||||
}
|
||||
return input;
|
||||
};
|
||||
export const toEndpointV1 = (endpoint) => parseUrl(endpoint.url);
|
||||
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js
generated
vendored
Normal file
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { resolveEndpoint } from "@smithy/util-endpoints";
|
||||
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js
generated
vendored
Normal file
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { EndpointError } from "@smithy/util-endpoints";
|
||||
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js
generated
vendored
Normal file
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js
generated
vendored
Normal file
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js
generated
vendored
Normal file
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js
generated
vendored
Normal file
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
6
backend/node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js
generated
vendored
Normal file
6
backend/node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export * from "./EndpointError";
|
||||
export * from "./EndpointRuleObject";
|
||||
export * from "./ErrorRuleObject";
|
||||
export * from "./RuleSetObject";
|
||||
export * from "./TreeRuleObject";
|
||||
export * from "./shared";
|
||||
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js
generated
vendored
Normal file
1
backend/node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
Reference in New Issue
Block a user