Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/middleware-ssec

Package Overview
Dependencies
Maintainers
5
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/middleware-ssec - npm Package Compare versions

Comparing version 3.489.0 to 3.495.0

123

dist-cjs/index.js

@@ -1,53 +0,78 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSsecPlugin = exports.ssecMiddlewareOptions = exports.ssecMiddleware = void 0;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
getSsecPlugin: () => getSsecPlugin,
ssecMiddleware: () => ssecMiddleware,
ssecMiddlewareOptions: () => ssecMiddlewareOptions
});
module.exports = __toCommonJS(src_exports);
function ssecMiddleware(options) {
return (next) => async (args) => {
let input = { ...args.input };
const properties = [
{
target: "SSECustomerKey",
hash: "SSECustomerKeyMD5",
},
{
target: "CopySourceSSECustomerKey",
hash: "CopySourceSSECustomerKeyMD5",
},
];
for (const prop of properties) {
const value = input[prop.target];
if (value) {
const valueView = ArrayBuffer.isView(value)
? new Uint8Array(value.buffer, value.byteOffset, value.byteLength)
: typeof value === "string"
? options.utf8Decoder(value)
: new Uint8Array(value);
const encoded = options.base64Encoder(valueView);
const hash = new options.md5();
hash.update(valueView);
input = {
...input,
[prop.target]: encoded,
[prop.hash]: options.base64Encoder(await hash.digest()),
};
}
}
return next({
...args,
input,
});
};
return (next) => async (args) => {
let input = { ...args.input };
const properties = [
{
target: "SSECustomerKey",
hash: "SSECustomerKeyMD5"
},
{
target: "CopySourceSSECustomerKey",
hash: "CopySourceSSECustomerKeyMD5"
}
];
for (const prop of properties) {
const value = input[prop.target];
if (value) {
const valueView = ArrayBuffer.isView(value) ? new Uint8Array(value.buffer, value.byteOffset, value.byteLength) : typeof value === "string" ? options.utf8Decoder(value) : new Uint8Array(value);
const encoded = options.base64Encoder(valueView);
const hash = new options.md5();
hash.update(valueView);
input = {
...input,
[prop.target]: encoded,
[prop.hash]: options.base64Encoder(await hash.digest())
};
}
}
return next({
...args,
input
});
};
}
exports.ssecMiddleware = ssecMiddleware;
exports.ssecMiddlewareOptions = {
name: "ssecMiddleware",
step: "initialize",
tags: ["SSE"],
override: true,
__name(ssecMiddleware, "ssecMiddleware");
var ssecMiddlewareOptions = {
name: "ssecMiddleware",
step: "initialize",
tags: ["SSE"],
override: true
};
const getSsecPlugin = (config) => ({
applyToStack: (clientStack) => {
clientStack.add(ssecMiddleware(config), exports.ssecMiddlewareOptions);
},
var getSsecPlugin = /* @__PURE__ */ __name((config) => ({
applyToStack: (clientStack) => {
clientStack.add(ssecMiddleware(config), ssecMiddlewareOptions);
}
}), "getSsecPlugin");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
getSsecPlugin,
ssecMiddleware,
ssecMiddlewareOptions
});
exports.getSsecPlugin = getSsecPlugin;
{
"name": "@aws-sdk/middleware-ssec",
"version": "3.489.0",
"version": "3.495.0",
"scripts": {
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:cjs": "node ../../scripts/compilation/inline middleware-ssec",
"build:es": "tsc -p tsconfig.es.json",

@@ -24,4 +24,4 @@ "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",

"dependencies": {
"@aws-sdk/types": "3.489.0",
"@smithy/types": "^2.8.0",
"@aws-sdk/types": "3.495.0",
"@smithy/types": "^2.9.0",
"tslib": "^2.5.0"

@@ -28,0 +28,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc