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:
18
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js
generated
vendored
Normal file
18
backend/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { setCredentialFeature } from "@aws-sdk/core/client";
|
||||
export const isStaticCredsProfile = (arg) => Boolean(arg) &&
|
||||
typeof arg === "object" &&
|
||||
typeof arg.aws_access_key_id === "string" &&
|
||||
typeof arg.aws_secret_access_key === "string" &&
|
||||
["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 &&
|
||||
["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1;
|
||||
export const resolveStaticCredentials = async (profile, options) => {
|
||||
options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
|
||||
const credentials = {
|
||||
accessKeyId: profile.aws_access_key_id,
|
||||
secretAccessKey: profile.aws_secret_access_key,
|
||||
sessionToken: profile.aws_session_token,
|
||||
...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),
|
||||
...(profile.aws_account_id && { accountId: profile.aws_account_id }),
|
||||
};
|
||||
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
|
||||
};
|
||||
Reference in New Issue
Block a user