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:
34
backend/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js
generated
vendored
Normal file
34
backend/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.fromTokenFile = void 0;
|
||||
const client_1 = require("@aws-sdk/core/client");
|
||||
const property_provider_1 = require("@smithy/property-provider");
|
||||
const shared_ini_file_loader_1 = require("@smithy/shared-ini-file-loader");
|
||||
const fs_1 = require("fs");
|
||||
const fromWebToken_1 = require("./fromWebToken");
|
||||
const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
|
||||
const ENV_ROLE_ARN = "AWS_ROLE_ARN";
|
||||
const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
|
||||
const fromTokenFile = (init = {}) => async (awsIdentityProperties) => {
|
||||
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");
|
||||
const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];
|
||||
const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];
|
||||
const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];
|
||||
if (!webIdentityTokenFile || !roleArn) {
|
||||
throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified", {
|
||||
logger: init.logger,
|
||||
});
|
||||
}
|
||||
const credentials = await (0, fromWebToken_1.fromWebToken)({
|
||||
...init,
|
||||
webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??
|
||||
(0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
|
||||
roleArn,
|
||||
roleSessionName,
|
||||
})(awsIdentityProperties);
|
||||
if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
|
||||
(0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
|
||||
}
|
||||
return credentials;
|
||||
};
|
||||
exports.fromTokenFile = fromTokenFile;
|
||||
Reference in New Issue
Block a user