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:
51
backend/node_modules/@smithy/middleware-retry/dist-es/configurations.js
generated
vendored
Normal file
51
backend/node_modules/@smithy/middleware-retry/dist-es/configurations.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
import { normalizeProvider } from "@smithy/util-middleware";
|
||||
import { AdaptiveRetryStrategy, DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, RETRY_MODES, StandardRetryStrategy, } from "@smithy/util-retry";
|
||||
export const ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
|
||||
export const CONFIG_MAX_ATTEMPTS = "max_attempts";
|
||||
export const NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
|
||||
environmentVariableSelector: (env) => {
|
||||
const value = env[ENV_MAX_ATTEMPTS];
|
||||
if (!value)
|
||||
return undefined;
|
||||
const maxAttempt = parseInt(value);
|
||||
if (Number.isNaN(maxAttempt)) {
|
||||
throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`);
|
||||
}
|
||||
return maxAttempt;
|
||||
},
|
||||
configFileSelector: (profile) => {
|
||||
const value = profile[CONFIG_MAX_ATTEMPTS];
|
||||
if (!value)
|
||||
return undefined;
|
||||
const maxAttempt = parseInt(value);
|
||||
if (Number.isNaN(maxAttempt)) {
|
||||
throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`);
|
||||
}
|
||||
return maxAttempt;
|
||||
},
|
||||
default: DEFAULT_MAX_ATTEMPTS,
|
||||
};
|
||||
export const resolveRetryConfig = (input) => {
|
||||
const { retryStrategy, retryMode: _retryMode, maxAttempts: _maxAttempts } = input;
|
||||
const maxAttempts = normalizeProvider(_maxAttempts ?? DEFAULT_MAX_ATTEMPTS);
|
||||
return Object.assign(input, {
|
||||
maxAttempts,
|
||||
retryStrategy: async () => {
|
||||
if (retryStrategy) {
|
||||
return retryStrategy;
|
||||
}
|
||||
const retryMode = await normalizeProvider(_retryMode)();
|
||||
if (retryMode === RETRY_MODES.ADAPTIVE) {
|
||||
return new AdaptiveRetryStrategy(maxAttempts);
|
||||
}
|
||||
return new StandardRetryStrategy(maxAttempts);
|
||||
},
|
||||
});
|
||||
};
|
||||
export const ENV_RETRY_MODE = "AWS_RETRY_MODE";
|
||||
export const CONFIG_RETRY_MODE = "retry_mode";
|
||||
export const NODE_RETRY_MODE_CONFIG_OPTIONS = {
|
||||
environmentVariableSelector: (env) => env[ENV_RETRY_MODE],
|
||||
configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],
|
||||
default: DEFAULT_RETRY_MODE,
|
||||
};
|
||||
Reference in New Issue
Block a user