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:
7
backend/node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js
generated
vendored
Normal file
7
backend/node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export class NoOpLogger {
|
||||
trace() { }
|
||||
debug() { }
|
||||
info() { }
|
||||
warn() { }
|
||||
error() { }
|
||||
}
|
||||
51
backend/node_modules/@smithy/smithy-client/dist-es/client.js
generated
vendored
Normal file
51
backend/node_modules/@smithy/smithy-client/dist-es/client.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
import { constructStack } from "@smithy/middleware-stack";
|
||||
export class Client {
|
||||
config;
|
||||
middlewareStack = constructStack();
|
||||
initConfig;
|
||||
handlers;
|
||||
constructor(config) {
|
||||
this.config = config;
|
||||
const { protocol, protocolSettings } = config;
|
||||
if (protocolSettings) {
|
||||
if (typeof protocol === "function") {
|
||||
config.protocol = new protocol(protocolSettings);
|
||||
}
|
||||
}
|
||||
}
|
||||
send(command, optionsOrCb, cb) {
|
||||
const options = typeof optionsOrCb !== "function" ? optionsOrCb : undefined;
|
||||
const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb;
|
||||
const useHandlerCache = options === undefined && this.config.cacheMiddleware === true;
|
||||
let handler;
|
||||
if (useHandlerCache) {
|
||||
if (!this.handlers) {
|
||||
this.handlers = new WeakMap();
|
||||
}
|
||||
const handlers = this.handlers;
|
||||
if (handlers.has(command.constructor)) {
|
||||
handler = handlers.get(command.constructor);
|
||||
}
|
||||
else {
|
||||
handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
|
||||
handlers.set(command.constructor, handler);
|
||||
}
|
||||
}
|
||||
else {
|
||||
delete this.handlers;
|
||||
handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
|
||||
}
|
||||
if (callback) {
|
||||
handler(command)
|
||||
.then((result) => callback(null, result.output), (err) => callback(err))
|
||||
.catch(() => { });
|
||||
}
|
||||
else {
|
||||
return handler(command).then((result) => result.output);
|
||||
}
|
||||
}
|
||||
destroy() {
|
||||
this.config?.requestHandler?.destroy?.();
|
||||
delete this.handlers;
|
||||
}
|
||||
}
|
||||
1
backend/node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js
generated
vendored
Normal file
1
backend/node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { collectBody } from "@smithy/core/protocols";
|
||||
124
backend/node_modules/@smithy/smithy-client/dist-es/command.js
generated
vendored
Normal file
124
backend/node_modules/@smithy/smithy-client/dist-es/command.js
generated
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
import { constructStack } from "@smithy/middleware-stack";
|
||||
import { SMITHY_CONTEXT_KEY } from "@smithy/types";
|
||||
import { schemaLogFilter } from "./schemaLogFilter";
|
||||
export class Command {
|
||||
middlewareStack = constructStack();
|
||||
schema;
|
||||
static classBuilder() {
|
||||
return new ClassBuilder();
|
||||
}
|
||||
resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor, }) {
|
||||
for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {
|
||||
this.middlewareStack.use(mw);
|
||||
}
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog,
|
||||
outputFilterSensitiveLog,
|
||||
[SMITHY_CONTEXT_KEY]: {
|
||||
commandInstance: this,
|
||||
...smithyContext,
|
||||
},
|
||||
...additionalContext,
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
}
|
||||
class ClassBuilder {
|
||||
_init = () => { };
|
||||
_ep = {};
|
||||
_middlewareFn = () => [];
|
||||
_commandName = "";
|
||||
_clientName = "";
|
||||
_additionalContext = {};
|
||||
_smithyContext = {};
|
||||
_inputFilterSensitiveLog = undefined;
|
||||
_outputFilterSensitiveLog = undefined;
|
||||
_serializer = null;
|
||||
_deserializer = null;
|
||||
_operationSchema;
|
||||
init(cb) {
|
||||
this._init = cb;
|
||||
}
|
||||
ep(endpointParameterInstructions) {
|
||||
this._ep = endpointParameterInstructions;
|
||||
return this;
|
||||
}
|
||||
m(middlewareSupplier) {
|
||||
this._middlewareFn = middlewareSupplier;
|
||||
return this;
|
||||
}
|
||||
s(service, operation, smithyContext = {}) {
|
||||
this._smithyContext = {
|
||||
service,
|
||||
operation,
|
||||
...smithyContext,
|
||||
};
|
||||
return this;
|
||||
}
|
||||
c(additionalContext = {}) {
|
||||
this._additionalContext = additionalContext;
|
||||
return this;
|
||||
}
|
||||
n(clientName, commandName) {
|
||||
this._clientName = clientName;
|
||||
this._commandName = commandName;
|
||||
return this;
|
||||
}
|
||||
f(inputFilter = (_) => _, outputFilter = (_) => _) {
|
||||
this._inputFilterSensitiveLog = inputFilter;
|
||||
this._outputFilterSensitiveLog = outputFilter;
|
||||
return this;
|
||||
}
|
||||
ser(serializer) {
|
||||
this._serializer = serializer;
|
||||
return this;
|
||||
}
|
||||
de(deserializer) {
|
||||
this._deserializer = deserializer;
|
||||
return this;
|
||||
}
|
||||
sc(operation) {
|
||||
this._operationSchema = operation;
|
||||
this._smithyContext.operationSchema = operation;
|
||||
return this;
|
||||
}
|
||||
build() {
|
||||
const closure = this;
|
||||
let CommandRef;
|
||||
return (CommandRef = class extends Command {
|
||||
input;
|
||||
static getEndpointParameterInstructions() {
|
||||
return closure._ep;
|
||||
}
|
||||
constructor(...[input]) {
|
||||
super();
|
||||
this.input = input ?? {};
|
||||
closure._init(this);
|
||||
this.schema = closure._operationSchema;
|
||||
}
|
||||
resolveMiddleware(stack, configuration, options) {
|
||||
const op = closure._operationSchema;
|
||||
const input = op?.[4] ?? op?.input;
|
||||
const output = op?.[5] ?? op?.output;
|
||||
return this.resolveMiddlewareWithContext(stack, configuration, options, {
|
||||
CommandCtor: CommandRef,
|
||||
middlewareFn: closure._middlewareFn,
|
||||
clientName: closure._clientName,
|
||||
commandName: closure._commandName,
|
||||
inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _),
|
||||
outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _),
|
||||
smithyContext: closure._smithyContext,
|
||||
additionalContext: closure._additionalContext,
|
||||
});
|
||||
}
|
||||
serialize = closure._serializer;
|
||||
deserialize = closure._deserializer;
|
||||
});
|
||||
}
|
||||
}
|
||||
1
backend/node_modules/@smithy/smithy-client/dist-es/constants.js
generated
vendored
Normal file
1
backend/node_modules/@smithy/smithy-client/dist-es/constants.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export const SENSITIVE_STRING = "***SensitiveInformation***";
|
||||
21
backend/node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js
generated
vendored
Normal file
21
backend/node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
export const createAggregatedClient = (commands, Client) => {
|
||||
for (const command of Object.keys(commands)) {
|
||||
const CommandCtor = commands[command];
|
||||
const methodImpl = async function (args, optionsOrCb, cb) {
|
||||
const command = new CommandCtor(args);
|
||||
if (typeof optionsOrCb === "function") {
|
||||
this.send(command, optionsOrCb);
|
||||
}
|
||||
else if (typeof cb === "function") {
|
||||
if (typeof optionsOrCb !== "object")
|
||||
throw new Error(`Expected http options but got ${typeof optionsOrCb}`);
|
||||
this.send(command, optionsOrCb || {}, cb);
|
||||
}
|
||||
else {
|
||||
return this.send(command, optionsOrCb);
|
||||
}
|
||||
};
|
||||
const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, "");
|
||||
Client.prototype[methodName] = methodImpl;
|
||||
}
|
||||
};
|
||||
22
backend/node_modules/@smithy/smithy-client/dist-es/default-error-handler.js
generated
vendored
Normal file
22
backend/node_modules/@smithy/smithy-client/dist-es/default-error-handler.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import { decorateServiceException } from "./exceptions";
|
||||
export const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => {
|
||||
const $metadata = deserializeMetadata(output);
|
||||
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
||||
const response = new exceptionCtor({
|
||||
name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError",
|
||||
$fault: "client",
|
||||
$metadata,
|
||||
});
|
||||
throw decorateServiceException(response, parsedBody);
|
||||
};
|
||||
export const withBaseException = (ExceptionCtor) => {
|
||||
return ({ output, parsedBody, errorCode }) => {
|
||||
throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });
|
||||
};
|
||||
};
|
||||
const deserializeMetadata = (output) => ({
|
||||
httpStatusCode: output.statusCode,
|
||||
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
||||
extendedRequestId: output.headers["x-amz-id-2"],
|
||||
cfId: output.headers["x-amz-cf-id"],
|
||||
});
|
||||
26
backend/node_modules/@smithy/smithy-client/dist-es/defaults-mode.js
generated
vendored
Normal file
26
backend/node_modules/@smithy/smithy-client/dist-es/defaults-mode.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
export const loadConfigsForDefaultMode = (mode) => {
|
||||
switch (mode) {
|
||||
case "standard":
|
||||
return {
|
||||
retryMode: "standard",
|
||||
connectionTimeout: 3100,
|
||||
};
|
||||
case "in-region":
|
||||
return {
|
||||
retryMode: "standard",
|
||||
connectionTimeout: 1100,
|
||||
};
|
||||
case "cross-region":
|
||||
return {
|
||||
retryMode: "standard",
|
||||
connectionTimeout: 3100,
|
||||
};
|
||||
case "mobile":
|
||||
return {
|
||||
retryMode: "standard",
|
||||
connectionTimeout: 30000,
|
||||
};
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
};
|
||||
6
backend/node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js
generated
vendored
Normal file
6
backend/node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
let warningEmitted = false;
|
||||
export const emitWarningIfUnsupportedVersion = (version) => {
|
||||
if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) {
|
||||
warningEmitted = true;
|
||||
}
|
||||
};
|
||||
50
backend/node_modules/@smithy/smithy-client/dist-es/exceptions.js
generated
vendored
Normal file
50
backend/node_modules/@smithy/smithy-client/dist-es/exceptions.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
export class ServiceException extends Error {
|
||||
$fault;
|
||||
$response;
|
||||
$retryable;
|
||||
$metadata;
|
||||
constructor(options) {
|
||||
super(options.message);
|
||||
Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);
|
||||
this.name = options.name;
|
||||
this.$fault = options.$fault;
|
||||
this.$metadata = options.$metadata;
|
||||
}
|
||||
static isInstance(value) {
|
||||
if (!value)
|
||||
return false;
|
||||
const candidate = value;
|
||||
return (ServiceException.prototype.isPrototypeOf(candidate) ||
|
||||
(Boolean(candidate.$fault) &&
|
||||
Boolean(candidate.$metadata) &&
|
||||
(candidate.$fault === "client" || candidate.$fault === "server")));
|
||||
}
|
||||
static [Symbol.hasInstance](instance) {
|
||||
if (!instance)
|
||||
return false;
|
||||
const candidate = instance;
|
||||
if (this === ServiceException) {
|
||||
return ServiceException.isInstance(instance);
|
||||
}
|
||||
if (ServiceException.isInstance(instance)) {
|
||||
if (candidate.name && this.name) {
|
||||
return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;
|
||||
}
|
||||
return this.prototype.isPrototypeOf(instance);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
export const decorateServiceException = (exception, additions = {}) => {
|
||||
Object.entries(additions)
|
||||
.filter(([, v]) => v !== undefined)
|
||||
.forEach(([k, v]) => {
|
||||
if (exception[k] == undefined || exception[k] === "") {
|
||||
exception[k] = v;
|
||||
}
|
||||
});
|
||||
const message = exception.message || exception.Message || "UnknownError";
|
||||
exception.message = message;
|
||||
delete exception.Message;
|
||||
return exception;
|
||||
};
|
||||
1
backend/node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js
generated
vendored
Normal file
1
backend/node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { extendedEncodeURIComponent } from "@smithy/core/protocols";
|
||||
30
backend/node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js
generated
vendored
Normal file
30
backend/node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { AlgorithmId } from "@smithy/types";
|
||||
export { AlgorithmId };
|
||||
export const getChecksumConfiguration = (runtimeConfig) => {
|
||||
const checksumAlgorithms = [];
|
||||
for (const id in AlgorithmId) {
|
||||
const algorithmId = AlgorithmId[id];
|
||||
if (runtimeConfig[algorithmId] === undefined) {
|
||||
continue;
|
||||
}
|
||||
checksumAlgorithms.push({
|
||||
algorithmId: () => algorithmId,
|
||||
checksumConstructor: () => runtimeConfig[algorithmId],
|
||||
});
|
||||
}
|
||||
return {
|
||||
addChecksumAlgorithm(algo) {
|
||||
checksumAlgorithms.push(algo);
|
||||
},
|
||||
checksumAlgorithms() {
|
||||
return checksumAlgorithms;
|
||||
},
|
||||
};
|
||||
};
|
||||
export const resolveChecksumRuntimeConfig = (clientConfig) => {
|
||||
const runtimeConfig = {};
|
||||
clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
|
||||
runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();
|
||||
});
|
||||
return runtimeConfig;
|
||||
};
|
||||
9
backend/node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js
generated
vendored
Normal file
9
backend/node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { getChecksumConfiguration, resolveChecksumRuntimeConfig } from "./checksum";
|
||||
import { getRetryConfiguration, resolveRetryRuntimeConfig } from "./retry";
|
||||
export const getDefaultExtensionConfiguration = (runtimeConfig) => {
|
||||
return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig));
|
||||
};
|
||||
export const getDefaultClientConfiguration = getDefaultExtensionConfiguration;
|
||||
export const resolveDefaultRuntimeConfig = (config) => {
|
||||
return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config));
|
||||
};
|
||||
1
backend/node_modules/@smithy/smithy-client/dist-es/extensions/index.js
generated
vendored
Normal file
1
backend/node_modules/@smithy/smithy-client/dist-es/extensions/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./defaultExtensionConfiguration";
|
||||
15
backend/node_modules/@smithy/smithy-client/dist-es/extensions/retry.js
generated
vendored
Normal file
15
backend/node_modules/@smithy/smithy-client/dist-es/extensions/retry.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
export const getRetryConfiguration = (runtimeConfig) => {
|
||||
return {
|
||||
setRetryStrategy(retryStrategy) {
|
||||
runtimeConfig.retryStrategy = retryStrategy;
|
||||
},
|
||||
retryStrategy() {
|
||||
return runtimeConfig.retryStrategy;
|
||||
},
|
||||
};
|
||||
};
|
||||
export const resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {
|
||||
const runtimeConfig = {};
|
||||
runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();
|
||||
return runtimeConfig;
|
||||
};
|
||||
1
backend/node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js
generated
vendored
Normal file
1
backend/node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export const getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray];
|
||||
12
backend/node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js
generated
vendored
Normal file
12
backend/node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
export const getValueFromTextNode = (obj) => {
|
||||
const textNodeName = "#text";
|
||||
for (const key in obj) {
|
||||
if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) {
|
||||
obj[key] = obj[key][textNodeName];
|
||||
}
|
||||
else if (typeof obj[key] === "object" && obj[key] !== null) {
|
||||
obj[key] = getValueFromTextNode(obj[key]);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
20
backend/node_modules/@smithy/smithy-client/dist-es/index.js
generated
vendored
Normal file
20
backend/node_modules/@smithy/smithy-client/dist-es/index.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
export * from "./client";
|
||||
export * from "./collect-stream-body";
|
||||
export * from "./command";
|
||||
export * from "./constants";
|
||||
export * from "./create-aggregated-client";
|
||||
export * from "./default-error-handler";
|
||||
export * from "./defaults-mode";
|
||||
export * from "./emitWarningIfUnsupportedVersion";
|
||||
export * from "./exceptions";
|
||||
export * from "./extended-encode-uri-component";
|
||||
export * from "./extensions";
|
||||
export * from "./get-array-if-single-item";
|
||||
export * from "./get-value-from-text-node";
|
||||
export * from "./is-serializable-header-value";
|
||||
export * from "./NoOpLogger";
|
||||
export * from "./object-mapping";
|
||||
export * from "./resolve-path";
|
||||
export * from "./ser-utils";
|
||||
export * from "./serde-json";
|
||||
export * from "@smithy/core/serde";
|
||||
3
backend/node_modules/@smithy/smithy-client/dist-es/is-serializable-header-value.js
generated
vendored
Normal file
3
backend/node_modules/@smithy/smithy-client/dist-es/is-serializable-header-value.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export const isSerializableHeaderValue = (value) => {
|
||||
return value != null;
|
||||
};
|
||||
92
backend/node_modules/@smithy/smithy-client/dist-es/object-mapping.js
generated
vendored
Normal file
92
backend/node_modules/@smithy/smithy-client/dist-es/object-mapping.js
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
export function map(arg0, arg1, arg2) {
|
||||
let target;
|
||||
let filter;
|
||||
let instructions;
|
||||
if (typeof arg1 === "undefined" && typeof arg2 === "undefined") {
|
||||
target = {};
|
||||
instructions = arg0;
|
||||
}
|
||||
else {
|
||||
target = arg0;
|
||||
if (typeof arg1 === "function") {
|
||||
filter = arg1;
|
||||
instructions = arg2;
|
||||
return mapWithFilter(target, filter, instructions);
|
||||
}
|
||||
else {
|
||||
instructions = arg1;
|
||||
}
|
||||
}
|
||||
for (const key of Object.keys(instructions)) {
|
||||
if (!Array.isArray(instructions[key])) {
|
||||
target[key] = instructions[key];
|
||||
continue;
|
||||
}
|
||||
applyInstruction(target, null, instructions, key);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
export const convertMap = (target) => {
|
||||
const output = {};
|
||||
for (const [k, v] of Object.entries(target || {})) {
|
||||
output[k] = [, v];
|
||||
}
|
||||
return output;
|
||||
};
|
||||
export const take = (source, instructions) => {
|
||||
const out = {};
|
||||
for (const key in instructions) {
|
||||
applyInstruction(out, source, instructions, key);
|
||||
}
|
||||
return out;
|
||||
};
|
||||
const mapWithFilter = (target, filter, instructions) => {
|
||||
return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => {
|
||||
if (Array.isArray(value)) {
|
||||
_instructions[key] = value;
|
||||
}
|
||||
else {
|
||||
if (typeof value === "function") {
|
||||
_instructions[key] = [filter, value()];
|
||||
}
|
||||
else {
|
||||
_instructions[key] = [filter, value];
|
||||
}
|
||||
}
|
||||
return _instructions;
|
||||
}, {}));
|
||||
};
|
||||
const applyInstruction = (target, source, instructions, targetKey) => {
|
||||
if (source !== null) {
|
||||
let instruction = instructions[targetKey];
|
||||
if (typeof instruction === "function") {
|
||||
instruction = [, instruction];
|
||||
}
|
||||
const [filter = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;
|
||||
if ((typeof filter === "function" && filter(source[sourceKey])) || (typeof filter !== "function" && !!filter)) {
|
||||
target[targetKey] = valueFn(source[sourceKey]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
let [filter, value] = instructions[targetKey];
|
||||
if (typeof value === "function") {
|
||||
let _value;
|
||||
const defaultFilterPassed = filter === undefined && (_value = value()) != null;
|
||||
const customFilterPassed = (typeof filter === "function" && !!filter(void 0)) || (typeof filter !== "function" && !!filter);
|
||||
if (defaultFilterPassed) {
|
||||
target[targetKey] = _value;
|
||||
}
|
||||
else if (customFilterPassed) {
|
||||
target[targetKey] = value();
|
||||
}
|
||||
}
|
||||
else {
|
||||
const defaultFilterPassed = filter === undefined && value != null;
|
||||
const customFilterPassed = (typeof filter === "function" && !!filter(value)) || (typeof filter !== "function" && !!filter);
|
||||
if (defaultFilterPassed || customFilterPassed) {
|
||||
target[targetKey] = value;
|
||||
}
|
||||
}
|
||||
};
|
||||
const nonNullish = (_) => _ != null;
|
||||
const pass = (_) => _;
|
||||
1
backend/node_modules/@smithy/smithy-client/dist-es/resolve-path.js
generated
vendored
Normal file
1
backend/node_modules/@smithy/smithy-client/dist-es/resolve-path.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { resolvedPath } from "@smithy/core/protocols";
|
||||
34
backend/node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js
generated
vendored
Normal file
34
backend/node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import { NormalizedSchema } from "@smithy/core/schema";
|
||||
const SENSITIVE_STRING = "***SensitiveInformation***";
|
||||
export function schemaLogFilter(schema, data) {
|
||||
if (data == null) {
|
||||
return data;
|
||||
}
|
||||
const ns = NormalizedSchema.of(schema);
|
||||
if (ns.getMergedTraits().sensitive) {
|
||||
return SENSITIVE_STRING;
|
||||
}
|
||||
if (ns.isListSchema()) {
|
||||
const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive;
|
||||
if (isSensitive) {
|
||||
return SENSITIVE_STRING;
|
||||
}
|
||||
}
|
||||
else if (ns.isMapSchema()) {
|
||||
const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive;
|
||||
if (isSensitive) {
|
||||
return SENSITIVE_STRING;
|
||||
}
|
||||
}
|
||||
else if (ns.isStructSchema() && typeof data === "object") {
|
||||
const object = data;
|
||||
const newObject = {};
|
||||
for (const [member, memberNs] of ns.structIterator()) {
|
||||
if (object[member] != null) {
|
||||
newObject[member] = schemaLogFilter(memberNs, object[member]);
|
||||
}
|
||||
}
|
||||
return newObject;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
14
backend/node_modules/@smithy/smithy-client/dist-es/ser-utils.js
generated
vendored
Normal file
14
backend/node_modules/@smithy/smithy-client/dist-es/ser-utils.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
export const serializeFloat = (value) => {
|
||||
if (value !== value) {
|
||||
return "NaN";
|
||||
}
|
||||
switch (value) {
|
||||
case Infinity:
|
||||
return "Infinity";
|
||||
case -Infinity:
|
||||
return "-Infinity";
|
||||
default:
|
||||
return value;
|
||||
}
|
||||
};
|
||||
export const serializeDateTime = (date) => date.toISOString().replace(".000Z", "Z");
|
||||
19
backend/node_modules/@smithy/smithy-client/dist-es/serde-json.js
generated
vendored
Normal file
19
backend/node_modules/@smithy/smithy-client/dist-es/serde-json.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
export const _json = (obj) => {
|
||||
if (obj == null) {
|
||||
return {};
|
||||
}
|
||||
if (Array.isArray(obj)) {
|
||||
return obj.filter((_) => _ != null).map(_json);
|
||||
}
|
||||
if (typeof obj === "object") {
|
||||
const target = {};
|
||||
for (const key of Object.keys(obj)) {
|
||||
if (obj[key] == null) {
|
||||
continue;
|
||||
}
|
||||
target[key] = _json(obj[key]);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
Reference in New Issue
Block a user