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:
53
backend/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js
generated
vendored
Normal file
53
backend/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ChecksumStream = void 0;
|
||||
const util_base64_1 = require("@smithy/util-base64");
|
||||
const stream_1 = require("stream");
|
||||
class ChecksumStream extends stream_1.Duplex {
|
||||
expectedChecksum;
|
||||
checksumSourceLocation;
|
||||
checksum;
|
||||
source;
|
||||
base64Encoder;
|
||||
constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) {
|
||||
super();
|
||||
if (typeof source.pipe === "function") {
|
||||
this.source = source;
|
||||
}
|
||||
else {
|
||||
throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
|
||||
}
|
||||
this.base64Encoder = base64Encoder ?? util_base64_1.toBase64;
|
||||
this.expectedChecksum = expectedChecksum;
|
||||
this.checksum = checksum;
|
||||
this.checksumSourceLocation = checksumSourceLocation;
|
||||
this.source.pipe(this);
|
||||
}
|
||||
_read(size) { }
|
||||
_write(chunk, encoding, callback) {
|
||||
try {
|
||||
this.checksum.update(chunk);
|
||||
this.push(chunk);
|
||||
}
|
||||
catch (e) {
|
||||
return callback(e);
|
||||
}
|
||||
return callback();
|
||||
}
|
||||
async _final(callback) {
|
||||
try {
|
||||
const digest = await this.checksum.digest();
|
||||
const received = this.base64Encoder(digest);
|
||||
if (this.expectedChecksum !== received) {
|
||||
return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` +
|
||||
` in response header "${this.checksumSourceLocation}".`));
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
return callback(e);
|
||||
}
|
||||
this.push(null);
|
||||
return callback();
|
||||
}
|
||||
}
|
||||
exports.ChecksumStream = ChecksumStream;
|
||||
Reference in New Issue
Block a user