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:
39
backend/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js
generated
vendored
Normal file
39
backend/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createChecksumStream = void 0;
|
||||
const util_base64_1 = require("@smithy/util-base64");
|
||||
const stream_type_check_1 = require("../stream-type-check");
|
||||
const ChecksumStream_browser_1 = require("./ChecksumStream.browser");
|
||||
const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => {
|
||||
if (!(0, stream_type_check_1.isReadableStream)(source)) {
|
||||
throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
|
||||
}
|
||||
const encoder = base64Encoder ?? util_base64_1.toBase64;
|
||||
if (typeof TransformStream !== "function") {
|
||||
throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");
|
||||
}
|
||||
const transform = new TransformStream({
|
||||
start() { },
|
||||
async transform(chunk, controller) {
|
||||
checksum.update(chunk);
|
||||
controller.enqueue(chunk);
|
||||
},
|
||||
async flush(controller) {
|
||||
const digest = await checksum.digest();
|
||||
const received = encoder(digest);
|
||||
if (expectedChecksum !== received) {
|
||||
const error = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}"` +
|
||||
` in response header "${checksumSourceLocation}".`);
|
||||
controller.error(error);
|
||||
}
|
||||
else {
|
||||
controller.terminate();
|
||||
}
|
||||
},
|
||||
});
|
||||
source.pipeThrough(transform);
|
||||
const readable = transform.readable;
|
||||
Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype);
|
||||
return readable;
|
||||
};
|
||||
exports.createChecksumStream = createChecksumStream;
|
||||
Reference in New Issue
Block a user