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:
25
backend/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js
generated
vendored
Normal file
25
backend/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
'use strict';
|
||||
|
||||
var recursionDetectionMiddleware = require('./recursionDetectionMiddleware');
|
||||
|
||||
const recursionDetectionMiddlewareOptions = {
|
||||
step: "build",
|
||||
tags: ["RECURSION_DETECTION"],
|
||||
name: "recursionDetectionMiddleware",
|
||||
override: true,
|
||||
priority: "low",
|
||||
};
|
||||
|
||||
const getRecursionDetectionPlugin = (options) => ({
|
||||
applyToStack: (clientStack) => {
|
||||
clientStack.add(recursionDetectionMiddleware.recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions);
|
||||
},
|
||||
});
|
||||
|
||||
exports.getRecursionDetectionPlugin = getRecursionDetectionPlugin;
|
||||
Object.keys(recursionDetectionMiddleware).forEach(function (k) {
|
||||
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
||||
enumerable: true,
|
||||
get: function () { return recursionDetectionMiddleware[k]; }
|
||||
});
|
||||
});
|
||||
33
backend/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/recursionDetectionMiddleware.js
generated
vendored
Normal file
33
backend/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/recursionDetectionMiddleware.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.recursionDetectionMiddleware = void 0;
|
||||
const lambda_invoke_store_1 = require("@aws/lambda-invoke-store");
|
||||
const protocol_http_1 = require("@smithy/protocol-http");
|
||||
const TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id";
|
||||
const ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
|
||||
const ENV_TRACE_ID = "_X_AMZN_TRACE_ID";
|
||||
const recursionDetectionMiddleware = () => (next) => async (args) => {
|
||||
const { request } = args;
|
||||
if (!protocol_http_1.HttpRequest.isInstance(request)) {
|
||||
return next(args);
|
||||
}
|
||||
const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ??
|
||||
TRACE_ID_HEADER_NAME;
|
||||
if (request.headers.hasOwnProperty(traceIdHeader)) {
|
||||
return next(args);
|
||||
}
|
||||
const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];
|
||||
const traceIdFromEnv = process.env[ENV_TRACE_ID];
|
||||
const invokeStore = await lambda_invoke_store_1.InvokeStore.getInstanceAsync();
|
||||
const traceIdFromInvokeStore = invokeStore?.getXRayTraceId();
|
||||
const traceId = traceIdFromInvokeStore ?? traceIdFromEnv;
|
||||
const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
|
||||
if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
|
||||
request.headers[TRACE_ID_HEADER_NAME] = traceId;
|
||||
}
|
||||
return next({
|
||||
...args,
|
||||
request,
|
||||
});
|
||||
};
|
||||
exports.recursionDetectionMiddleware = recursionDetectionMiddleware;
|
||||
5
backend/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/recursionDetectionMiddleware.native.js
generated
vendored
Normal file
5
backend/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/recursionDetectionMiddleware.native.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.recursionDetectionMiddleware = void 0;
|
||||
const recursionDetectionMiddleware = () => (next) => async (args) => next(args);
|
||||
exports.recursionDetectionMiddleware = recursionDetectionMiddleware;
|
||||
Reference in New Issue
Block a user