remove node_modules and .gitignore them

This commit is contained in:
2023-11-24 14:40:32 -05:00
parent 5f6e638903
commit a74d7b91b8
8963 changed files with 1 additions and 874175 deletions
@@ -1,20 +0,0 @@
export const deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => {
const { response } = await next(args);
try {
const parsed = await deserializer(response, options);
return {
response,
output: parsed,
};
}
catch (error) {
Object.defineProperty(error, "$response", {
value: response,
});
if (!("$metadata" in error)) {
const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
error.message += "\n " + hint;
}
throw error;
}
};
-3
View File
@@ -1,3 +0,0 @@
export * from "./deserializerMiddleware";
export * from "./serdePlugin";
export * from "./serializerMiddleware";
-22
View File
@@ -1,22 +0,0 @@
import { deserializerMiddleware } from "./deserializerMiddleware";
import { serializerMiddleware } from "./serializerMiddleware";
export const deserializerMiddlewareOption = {
name: "deserializerMiddleware",
step: "deserialize",
tags: ["DESERIALIZER"],
override: true,
};
export const serializerMiddlewareOption = {
name: "serializerMiddleware",
step: "serialize",
tags: ["SERIALIZER"],
override: true,
};
export function getSerdePlugin(config, serializer, deserializer) {
return {
applyToStack: (commandStack) => {
commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);
commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);
},
};
}
-13
View File
@@ -1,13 +0,0 @@
export const serializerMiddleware = (options, serializer) => (next, context) => async (args) => {
const endpoint = context.endpointV2?.url && options.urlParser
? async () => options.urlParser(context.endpointV2.url)
: options.endpoint;
if (!endpoint) {
throw new Error("No valid endpoint provider available.");
}
const request = await serializer(args.input, { ...options, endpoint });
return next({
...args,
request,
});
};