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:
58
backend/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js
generated
vendored
Normal file
58
backend/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
'use strict';
|
||||
|
||||
var os = require('os');
|
||||
var process = require('process');
|
||||
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
||||
|
||||
const crtAvailability = {
|
||||
isCrtAvailable: false,
|
||||
};
|
||||
|
||||
const isCrtAvailable = () => {
|
||||
if (crtAvailability.isCrtAvailable) {
|
||||
return ["md/crt-avail"];
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => {
|
||||
return async (config) => {
|
||||
const sections = [
|
||||
["aws-sdk-js", clientVersion],
|
||||
["ua", "2.1"],
|
||||
[`os/${os.platform()}`, os.release()],
|
||||
["lang/js"],
|
||||
["md/nodejs", `${process.versions.node}`],
|
||||
];
|
||||
const crtAvailable = isCrtAvailable();
|
||||
if (crtAvailable) {
|
||||
sections.push(crtAvailable);
|
||||
}
|
||||
if (serviceId) {
|
||||
sections.push([`api/${serviceId}`, clientVersion]);
|
||||
}
|
||||
if (process.env.AWS_EXECUTION_ENV) {
|
||||
sections.push([`exec-env/${process.env.AWS_EXECUTION_ENV}`]);
|
||||
}
|
||||
const appId = await config?.userAgentAppId?.();
|
||||
const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
|
||||
return resolvedUserAgent;
|
||||
};
|
||||
};
|
||||
const defaultUserAgent = createDefaultUserAgentProvider;
|
||||
|
||||
const UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
|
||||
const UA_APP_ID_INI_NAME = "sdk_ua_app_id";
|
||||
const UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id";
|
||||
const NODE_APP_ID_CONFIG_OPTIONS = {
|
||||
environmentVariableSelector: (env) => env[UA_APP_ID_ENV_NAME],
|
||||
configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED],
|
||||
default: middlewareUserAgent.DEFAULT_UA_APP_ID,
|
||||
};
|
||||
|
||||
exports.NODE_APP_ID_CONFIG_OPTIONS = NODE_APP_ID_CONFIG_OPTIONS;
|
||||
exports.UA_APP_ID_ENV_NAME = UA_APP_ID_ENV_NAME;
|
||||
exports.UA_APP_ID_INI_NAME = UA_APP_ID_INI_NAME;
|
||||
exports.createDefaultUserAgentProvider = createDefaultUserAgentProvider;
|
||||
exports.crtAvailability = crtAvailability;
|
||||
exports.defaultUserAgent = defaultUserAgent;
|
||||
Reference in New Issue
Block a user