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:
10
backend/node_modules/@aws-crypto/sha256-browser/build/main/constants.d.ts
generated
vendored
Normal file
10
backend/node_modules/@aws-crypto/sha256-browser/build/main/constants.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export declare const SHA_256_HASH: {
|
||||
name: "SHA-256";
|
||||
};
|
||||
export declare const SHA_256_HMAC_ALGO: {
|
||||
name: "HMAC";
|
||||
hash: {
|
||||
name: "SHA-256";
|
||||
};
|
||||
};
|
||||
export declare const EMPTY_DATA_SHA_256: Uint8Array;
|
||||
43
backend/node_modules/@aws-crypto/sha256-browser/build/main/constants.js
generated
vendored
Normal file
43
backend/node_modules/@aws-crypto/sha256-browser/build/main/constants.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.EMPTY_DATA_SHA_256 = exports.SHA_256_HMAC_ALGO = exports.SHA_256_HASH = void 0;
|
||||
exports.SHA_256_HASH = { name: "SHA-256" };
|
||||
exports.SHA_256_HMAC_ALGO = {
|
||||
name: "HMAC",
|
||||
hash: exports.SHA_256_HASH
|
||||
};
|
||||
exports.EMPTY_DATA_SHA_256 = new Uint8Array([
|
||||
227,
|
||||
176,
|
||||
196,
|
||||
66,
|
||||
152,
|
||||
252,
|
||||
28,
|
||||
20,
|
||||
154,
|
||||
251,
|
||||
244,
|
||||
200,
|
||||
153,
|
||||
111,
|
||||
185,
|
||||
36,
|
||||
39,
|
||||
174,
|
||||
65,
|
||||
228,
|
||||
100,
|
||||
155,
|
||||
147,
|
||||
76,
|
||||
164,
|
||||
149,
|
||||
153,
|
||||
27,
|
||||
120,
|
||||
82,
|
||||
184,
|
||||
85
|
||||
]);
|
||||
//# sourceMappingURL=constants.js.map
|
||||
1
backend/node_modules/@aws-crypto/sha256-browser/build/main/constants.js.map
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/sha256-browser/build/main/constants.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAwB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAExD,QAAA,iBAAiB,GAAgD;IAC5E,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,oBAAY;CACnB,CAAC;AAEW,QAAA,kBAAkB,GAAG,IAAI,UAAU,CAAC;IAC/C,GAAG;IACH,GAAG;IACH,GAAG;IACH,EAAE;IACF,GAAG;IACH,GAAG;IACH,EAAE;IACF,EAAE;IACF,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,EAAE;IACF,EAAE;IACF,GAAG;IACH,EAAE;IACF,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,EAAE;IACF,GAAG;IACH,GAAG;IACH,GAAG;IACH,EAAE;IACF,GAAG;IACH,EAAE;IACF,GAAG;IACH,EAAE;CACH,CAAC,CAAC"}
|
||||
8
backend/node_modules/@aws-crypto/sha256-browser/build/main/crossPlatformSha256.d.ts
generated
vendored
Normal file
8
backend/node_modules/@aws-crypto/sha256-browser/build/main/crossPlatformSha256.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Checksum, SourceData } from "@aws-sdk/types";
|
||||
export declare class Sha256 implements Checksum {
|
||||
private hash;
|
||||
constructor(secret?: SourceData);
|
||||
update(data: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void;
|
||||
digest(): Promise<Uint8Array>;
|
||||
reset(): void;
|
||||
}
|
||||
30
backend/node_modules/@aws-crypto/sha256-browser/build/main/crossPlatformSha256.js
generated
vendored
Normal file
30
backend/node_modules/@aws-crypto/sha256-browser/build/main/crossPlatformSha256.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Sha256 = void 0;
|
||||
var webCryptoSha256_1 = require("./webCryptoSha256");
|
||||
var sha256_js_1 = require("@aws-crypto/sha256-js");
|
||||
var supports_web_crypto_1 = require("@aws-crypto/supports-web-crypto");
|
||||
var util_locate_window_1 = require("@aws-sdk/util-locate-window");
|
||||
var util_1 = require("@aws-crypto/util");
|
||||
var Sha256 = /** @class */ (function () {
|
||||
function Sha256(secret) {
|
||||
if ((0, supports_web_crypto_1.supportsWebCrypto)((0, util_locate_window_1.locateWindow)())) {
|
||||
this.hash = new webCryptoSha256_1.Sha256(secret);
|
||||
}
|
||||
else {
|
||||
this.hash = new sha256_js_1.Sha256(secret);
|
||||
}
|
||||
}
|
||||
Sha256.prototype.update = function (data, encoding) {
|
||||
this.hash.update((0, util_1.convertToBuffer)(data));
|
||||
};
|
||||
Sha256.prototype.digest = function () {
|
||||
return this.hash.digest();
|
||||
};
|
||||
Sha256.prototype.reset = function () {
|
||||
this.hash.reset();
|
||||
};
|
||||
return Sha256;
|
||||
}());
|
||||
exports.Sha256 = Sha256;
|
||||
//# sourceMappingURL=crossPlatformSha256.js.map
|
||||
1
backend/node_modules/@aws-crypto/sha256-browser/build/main/crossPlatformSha256.js.map
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/sha256-browser/build/main/crossPlatformSha256.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"crossPlatformSha256.js","sourceRoot":"","sources":["../../src/crossPlatformSha256.ts"],"names":[],"mappings":";;;AAAA,qDAA8D;AAC9D,mDAA2D;AAE3D,uEAAoE;AACpE,kEAA2D;AAC3D,yCAAmD;AAEnD;IAGE,gBAAY,MAAmB;QAC7B,IAAI,IAAA,uCAAiB,EAAC,IAAA,iCAAY,GAAE,CAAC,EAAE;YACrC,IAAI,CAAC,IAAI,GAAG,IAAI,wBAAe,CAAC,MAAM,CAAC,CAAC;SACzC;aAAM;YACL,IAAI,CAAC,IAAI,GAAG,IAAI,kBAAQ,CAAC,MAAM,CAAC,CAAC;SAClC;IACH,CAAC;IAED,uBAAM,GAAN,UAAO,IAAgB,EAAE,QAAsC;QAC7D,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAA,sBAAe,EAAC,IAAI,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,uBAAM,GAAN;QACE,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IAC5B,CAAC;IAED,sBAAK,GAAL;QACE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;IACH,aAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBY,wBAAM"}
|
||||
2
backend/node_modules/@aws-crypto/sha256-browser/build/main/index.d.ts
generated
vendored
Normal file
2
backend/node_modules/@aws-crypto/sha256-browser/build/main/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from "./crossPlatformSha256";
|
||||
export { Sha256 as WebCryptoSha256 } from "./webCryptoSha256";
|
||||
8
backend/node_modules/@aws-crypto/sha256-browser/build/main/index.js
generated
vendored
Normal file
8
backend/node_modules/@aws-crypto/sha256-browser/build/main/index.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.WebCryptoSha256 = void 0;
|
||||
var tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./crossPlatformSha256"), exports);
|
||||
var webCryptoSha256_1 = require("./webCryptoSha256");
|
||||
Object.defineProperty(exports, "WebCryptoSha256", { enumerable: true, get: function () { return webCryptoSha256_1.Sha256; } });
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
backend/node_modules/@aws-crypto/sha256-browser/build/main/index.js.map
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/sha256-browser/build/main/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,gEAAsC;AACtC,qDAA8D;AAArD,kHAAA,MAAM,OAAmB"}
|
||||
2
backend/node_modules/@aws-crypto/sha256-browser/build/main/isEmptyData.d.ts
generated
vendored
Normal file
2
backend/node_modules/@aws-crypto/sha256-browser/build/main/isEmptyData.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { SourceData } from "@aws-sdk/types";
|
||||
export declare function isEmptyData(data: SourceData): boolean;
|
||||
11
backend/node_modules/@aws-crypto/sha256-browser/build/main/isEmptyData.js
generated
vendored
Normal file
11
backend/node_modules/@aws-crypto/sha256-browser/build/main/isEmptyData.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isEmptyData = void 0;
|
||||
function isEmptyData(data) {
|
||||
if (typeof data === "string") {
|
||||
return data.length === 0;
|
||||
}
|
||||
return data.byteLength === 0;
|
||||
}
|
||||
exports.isEmptyData = isEmptyData;
|
||||
//# sourceMappingURL=isEmptyData.js.map
|
||||
1
backend/node_modules/@aws-crypto/sha256-browser/build/main/isEmptyData.js.map
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/sha256-browser/build/main/isEmptyData.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"isEmptyData.js","sourceRoot":"","sources":["../../src/isEmptyData.ts"],"names":[],"mappings":";;;AAEA,SAAgB,WAAW,CAAC,IAAgB;IAC1C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;KAC1B;IAED,OAAO,IAAI,CAAC,UAAU,KAAK,CAAC,CAAC;AAC/B,CAAC;AAND,kCAMC"}
|
||||
10
backend/node_modules/@aws-crypto/sha256-browser/build/main/webCryptoSha256.d.ts
generated
vendored
Normal file
10
backend/node_modules/@aws-crypto/sha256-browser/build/main/webCryptoSha256.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Checksum, SourceData } from "@aws-sdk/types";
|
||||
export declare class Sha256 implements Checksum {
|
||||
private readonly secret?;
|
||||
private key;
|
||||
private toHash;
|
||||
constructor(secret?: SourceData);
|
||||
update(data: SourceData): void;
|
||||
digest(): Promise<Uint8Array>;
|
||||
reset(): void;
|
||||
}
|
||||
56
backend/node_modules/@aws-crypto/sha256-browser/build/main/webCryptoSha256.js
generated
vendored
Normal file
56
backend/node_modules/@aws-crypto/sha256-browser/build/main/webCryptoSha256.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Sha256 = void 0;
|
||||
var util_1 = require("@aws-crypto/util");
|
||||
var constants_1 = require("./constants");
|
||||
var util_locate_window_1 = require("@aws-sdk/util-locate-window");
|
||||
var Sha256 = /** @class */ (function () {
|
||||
function Sha256(secret) {
|
||||
this.toHash = new Uint8Array(0);
|
||||
this.secret = secret;
|
||||
this.reset();
|
||||
}
|
||||
Sha256.prototype.update = function (data) {
|
||||
if ((0, util_1.isEmptyData)(data)) {
|
||||
return;
|
||||
}
|
||||
var update = (0, util_1.convertToBuffer)(data);
|
||||
var typedArray = new Uint8Array(this.toHash.byteLength + update.byteLength);
|
||||
typedArray.set(this.toHash, 0);
|
||||
typedArray.set(update, this.toHash.byteLength);
|
||||
this.toHash = typedArray;
|
||||
};
|
||||
Sha256.prototype.digest = function () {
|
||||
var _this = this;
|
||||
if (this.key) {
|
||||
return this.key.then(function (key) {
|
||||
return (0, util_locate_window_1.locateWindow)()
|
||||
.crypto.subtle.sign(constants_1.SHA_256_HMAC_ALGO, key, _this.toHash)
|
||||
.then(function (data) { return new Uint8Array(data); });
|
||||
});
|
||||
}
|
||||
if ((0, util_1.isEmptyData)(this.toHash)) {
|
||||
return Promise.resolve(constants_1.EMPTY_DATA_SHA_256);
|
||||
}
|
||||
return Promise.resolve()
|
||||
.then(function () {
|
||||
return (0, util_locate_window_1.locateWindow)().crypto.subtle.digest(constants_1.SHA_256_HASH, _this.toHash);
|
||||
})
|
||||
.then(function (data) { return Promise.resolve(new Uint8Array(data)); });
|
||||
};
|
||||
Sha256.prototype.reset = function () {
|
||||
var _this = this;
|
||||
this.toHash = new Uint8Array(0);
|
||||
if (this.secret && this.secret !== void 0) {
|
||||
this.key = new Promise(function (resolve, reject) {
|
||||
(0, util_locate_window_1.locateWindow)()
|
||||
.crypto.subtle.importKey("raw", (0, util_1.convertToBuffer)(_this.secret), constants_1.SHA_256_HMAC_ALGO, false, ["sign"])
|
||||
.then(resolve, reject);
|
||||
});
|
||||
this.key.catch(function () { });
|
||||
}
|
||||
};
|
||||
return Sha256;
|
||||
}());
|
||||
exports.Sha256 = Sha256;
|
||||
//# sourceMappingURL=webCryptoSha256.js.map
|
||||
1
backend/node_modules/@aws-crypto/sha256-browser/build/main/webCryptoSha256.js.map
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/sha256-browser/build/main/webCryptoSha256.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"webCryptoSha256.js","sourceRoot":"","sources":["../../src/webCryptoSha256.ts"],"names":[],"mappings":";;;AACA,yCAAgE;AAChE,yCAIqB;AACrB,kEAA2D;AAE3D;IAKE,gBAAY,MAAmB;QAFvB,WAAM,GAAe,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;QAG7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,uBAAM,GAAN,UAAO,IAAgB;QACrB,IAAI,IAAA,kBAAW,EAAC,IAAI,CAAC,EAAE;YACrB,OAAO;SACR;QAED,IAAM,MAAM,GAAG,IAAA,sBAAe,EAAC,IAAI,CAAC,CAAC;QACrC,IAAM,UAAU,GAAG,IAAI,UAAU,CAC/B,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MAAM,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,EAAE;YACzC,IAAI,CAAC,GAAG,GAAG,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;gBACrC,IAAA,iCAAY,GAAE;qBACT,MAAM,CAAC,MAAM,CAAC,SAAS,CACxB,KAAK,EACL,IAAA,sBAAe,EAAC,KAAI,CAAC,MAAoB,CAAC,EAC1C,6BAAiB,EACjB,KAAK,EACL,CAAC,MAAM,CAAC,CACX;qBACI,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC7B,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,cAAO,CAAC,CAAC,CAAC;SAC1B;IACH,CAAC;IACH,aAAC;AAAD,CAAC,AA7DD,IA6DC;AA7DY,wBAAM"}
|
||||
10
backend/node_modules/@aws-crypto/sha256-browser/build/module/constants.d.ts
generated
vendored
Normal file
10
backend/node_modules/@aws-crypto/sha256-browser/build/module/constants.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export declare const SHA_256_HASH: {
|
||||
name: "SHA-256";
|
||||
};
|
||||
export declare const SHA_256_HMAC_ALGO: {
|
||||
name: "HMAC";
|
||||
hash: {
|
||||
name: "SHA-256";
|
||||
};
|
||||
};
|
||||
export declare const EMPTY_DATA_SHA_256: Uint8Array;
|
||||
40
backend/node_modules/@aws-crypto/sha256-browser/build/module/constants.js
generated
vendored
Normal file
40
backend/node_modules/@aws-crypto/sha256-browser/build/module/constants.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
export var SHA_256_HASH = { name: "SHA-256" };
|
||||
export var SHA_256_HMAC_ALGO = {
|
||||
name: "HMAC",
|
||||
hash: SHA_256_HASH
|
||||
};
|
||||
export var EMPTY_DATA_SHA_256 = new Uint8Array([
|
||||
227,
|
||||
176,
|
||||
196,
|
||||
66,
|
||||
152,
|
||||
252,
|
||||
28,
|
||||
20,
|
||||
154,
|
||||
251,
|
||||
244,
|
||||
200,
|
||||
153,
|
||||
111,
|
||||
185,
|
||||
36,
|
||||
39,
|
||||
174,
|
||||
65,
|
||||
228,
|
||||
100,
|
||||
155,
|
||||
147,
|
||||
76,
|
||||
164,
|
||||
149,
|
||||
153,
|
||||
27,
|
||||
120,
|
||||
82,
|
||||
184,
|
||||
85
|
||||
]);
|
||||
//# sourceMappingURL=constants.js.map
|
||||
1
backend/node_modules/@aws-crypto/sha256-browser/build/module/constants.js.map
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/sha256-browser/build/module/constants.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,YAAY,GAAwB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAErE,MAAM,CAAC,IAAM,iBAAiB,GAAgD;IAC5E,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,YAAY;CACnB,CAAC;AAEF,MAAM,CAAC,IAAM,kBAAkB,GAAG,IAAI,UAAU,CAAC;IAC/C,GAAG;IACH,GAAG;IACH,GAAG;IACH,EAAE;IACF,GAAG;IACH,GAAG;IACH,EAAE;IACF,EAAE;IACF,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,EAAE;IACF,EAAE;IACF,GAAG;IACH,EAAE;IACF,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,EAAE;IACF,GAAG;IACH,GAAG;IACH,GAAG;IACH,EAAE;IACF,GAAG;IACH,EAAE;IACF,GAAG;IACH,EAAE;CACH,CAAC,CAAC"}
|
||||
8
backend/node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.d.ts
generated
vendored
Normal file
8
backend/node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Checksum, SourceData } from "@aws-sdk/types";
|
||||
export declare class Sha256 implements Checksum {
|
||||
private hash;
|
||||
constructor(secret?: SourceData);
|
||||
update(data: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void;
|
||||
digest(): Promise<Uint8Array>;
|
||||
reset(): void;
|
||||
}
|
||||
27
backend/node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.js
generated
vendored
Normal file
27
backend/node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Sha256 as WebCryptoSha256 } from "./webCryptoSha256";
|
||||
import { Sha256 as JsSha256 } from "@aws-crypto/sha256-js";
|
||||
import { supportsWebCrypto } from "@aws-crypto/supports-web-crypto";
|
||||
import { locateWindow } from "@aws-sdk/util-locate-window";
|
||||
import { convertToBuffer } from "@aws-crypto/util";
|
||||
var Sha256 = /** @class */ (function () {
|
||||
function Sha256(secret) {
|
||||
if (supportsWebCrypto(locateWindow())) {
|
||||
this.hash = new WebCryptoSha256(secret);
|
||||
}
|
||||
else {
|
||||
this.hash = new JsSha256(secret);
|
||||
}
|
||||
}
|
||||
Sha256.prototype.update = function (data, encoding) {
|
||||
this.hash.update(convertToBuffer(data));
|
||||
};
|
||||
Sha256.prototype.digest = function () {
|
||||
return this.hash.digest();
|
||||
};
|
||||
Sha256.prototype.reset = function () {
|
||||
this.hash.reset();
|
||||
};
|
||||
return Sha256;
|
||||
}());
|
||||
export { Sha256 };
|
||||
//# sourceMappingURL=crossPlatformSha256.js.map
|
||||
1
backend/node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.js.map
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"crossPlatformSha256.js","sourceRoot":"","sources":["../../src/crossPlatformSha256.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;IAGE,gBAAY,MAAmB;QAC7B,IAAI,iBAAiB,CAAC,YAAY,EAAE,CAAC,EAAE;YACrC,IAAI,CAAC,IAAI,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;SACzC;aAAM;YACL,IAAI,CAAC,IAAI,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;SAClC;IACH,CAAC;IAED,uBAAM,GAAN,UAAO,IAAgB,EAAE,QAAsC;QAC7D,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,uBAAM,GAAN;QACE,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IAC5B,CAAC;IAED,sBAAK,GAAL;QACE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;IACH,aAAC;AAAD,CAAC,AAtBD,IAsBC"}
|
||||
2
backend/node_modules/@aws-crypto/sha256-browser/build/module/index.d.ts
generated
vendored
Normal file
2
backend/node_modules/@aws-crypto/sha256-browser/build/module/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from "./crossPlatformSha256";
|
||||
export { Sha256 as WebCryptoSha256 } from "./webCryptoSha256";
|
||||
3
backend/node_modules/@aws-crypto/sha256-browser/build/module/index.js
generated
vendored
Normal file
3
backend/node_modules/@aws-crypto/sha256-browser/build/module/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from "./crossPlatformSha256";
|
||||
export { Sha256 as WebCryptoSha256 } from "./webCryptoSha256";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
backend/node_modules/@aws-crypto/sha256-browser/build/module/index.js.map
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/sha256-browser/build/module/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
||||
2
backend/node_modules/@aws-crypto/sha256-browser/build/module/isEmptyData.d.ts
generated
vendored
Normal file
2
backend/node_modules/@aws-crypto/sha256-browser/build/module/isEmptyData.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { SourceData } from "@aws-sdk/types";
|
||||
export declare function isEmptyData(data: SourceData): boolean;
|
||||
7
backend/node_modules/@aws-crypto/sha256-browser/build/module/isEmptyData.js
generated
vendored
Normal file
7
backend/node_modules/@aws-crypto/sha256-browser/build/module/isEmptyData.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export function isEmptyData(data) {
|
||||
if (typeof data === "string") {
|
||||
return data.length === 0;
|
||||
}
|
||||
return data.byteLength === 0;
|
||||
}
|
||||
//# sourceMappingURL=isEmptyData.js.map
|
||||
1
backend/node_modules/@aws-crypto/sha256-browser/build/module/isEmptyData.js.map
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/sha256-browser/build/module/isEmptyData.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"isEmptyData.js","sourceRoot":"","sources":["../../src/isEmptyData.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,WAAW,CAAC,IAAgB;IAC1C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;KAC1B;IAED,OAAO,IAAI,CAAC,UAAU,KAAK,CAAC,CAAC;AAC/B,CAAC"}
|
||||
10
backend/node_modules/@aws-crypto/sha256-browser/build/module/webCryptoSha256.d.ts
generated
vendored
Normal file
10
backend/node_modules/@aws-crypto/sha256-browser/build/module/webCryptoSha256.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Checksum, SourceData } from "@aws-sdk/types";
|
||||
export declare class Sha256 implements Checksum {
|
||||
private readonly secret?;
|
||||
private key;
|
||||
private toHash;
|
||||
constructor(secret?: SourceData);
|
||||
update(data: SourceData): void;
|
||||
digest(): Promise<Uint8Array>;
|
||||
reset(): void;
|
||||
}
|
||||
53
backend/node_modules/@aws-crypto/sha256-browser/build/module/webCryptoSha256.js
generated
vendored
Normal file
53
backend/node_modules/@aws-crypto/sha256-browser/build/module/webCryptoSha256.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
import { isEmptyData, convertToBuffer } from "@aws-crypto/util";
|
||||
import { EMPTY_DATA_SHA_256, SHA_256_HASH, SHA_256_HMAC_ALGO, } from "./constants";
|
||||
import { locateWindow } from "@aws-sdk/util-locate-window";
|
||||
var Sha256 = /** @class */ (function () {
|
||||
function Sha256(secret) {
|
||||
this.toHash = new Uint8Array(0);
|
||||
this.secret = secret;
|
||||
this.reset();
|
||||
}
|
||||
Sha256.prototype.update = function (data) {
|
||||
if (isEmptyData(data)) {
|
||||
return;
|
||||
}
|
||||
var update = convertToBuffer(data);
|
||||
var typedArray = new Uint8Array(this.toHash.byteLength + update.byteLength);
|
||||
typedArray.set(this.toHash, 0);
|
||||
typedArray.set(update, this.toHash.byteLength);
|
||||
this.toHash = typedArray;
|
||||
};
|
||||
Sha256.prototype.digest = function () {
|
||||
var _this = this;
|
||||
if (this.key) {
|
||||
return this.key.then(function (key) {
|
||||
return locateWindow()
|
||||
.crypto.subtle.sign(SHA_256_HMAC_ALGO, key, _this.toHash)
|
||||
.then(function (data) { return new Uint8Array(data); });
|
||||
});
|
||||
}
|
||||
if (isEmptyData(this.toHash)) {
|
||||
return Promise.resolve(EMPTY_DATA_SHA_256);
|
||||
}
|
||||
return Promise.resolve()
|
||||
.then(function () {
|
||||
return locateWindow().crypto.subtle.digest(SHA_256_HASH, _this.toHash);
|
||||
})
|
||||
.then(function (data) { return Promise.resolve(new Uint8Array(data)); });
|
||||
};
|
||||
Sha256.prototype.reset = function () {
|
||||
var _this = this;
|
||||
this.toHash = new Uint8Array(0);
|
||||
if (this.secret && this.secret !== void 0) {
|
||||
this.key = new Promise(function (resolve, reject) {
|
||||
locateWindow()
|
||||
.crypto.subtle.importKey("raw", convertToBuffer(_this.secret), SHA_256_HMAC_ALGO, false, ["sign"])
|
||||
.then(resolve, reject);
|
||||
});
|
||||
this.key.catch(function () { });
|
||||
}
|
||||
};
|
||||
return Sha256;
|
||||
}());
|
||||
export { Sha256 };
|
||||
//# sourceMappingURL=webCryptoSha256.js.map
|
||||
1
backend/node_modules/@aws-crypto/sha256-browser/build/module/webCryptoSha256.js.map
generated
vendored
Normal file
1
backend/node_modules/@aws-crypto/sha256-browser/build/module/webCryptoSha256.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"webCryptoSha256.js","sourceRoot":"","sources":["../../src/webCryptoSha256.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D;IAKE,gBAAY,MAAmB;QAFvB,WAAM,GAAe,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;QAG7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,uBAAM,GAAN,UAAO,IAAgB;QACrB,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE;YACrB,OAAO;SACR;QAED,IAAM,MAAM,GAAG,eAAe,CAAC,I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