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

@adastradev/aws-api-gateway-client

Package Overview
Dependencies
Maintainers
35
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adastradev/aws-api-gateway-client - npm Package Compare versions

Comparing version 1.0.8-beta.1701719775282 to 1.0.8-beta.1701722287034

22

dist/apigClient.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -9,9 +8,5 @@ value: true

exports["default"] = void 0;
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
var _urlTemplate = _interopRequireDefault(require("url-template"));
var _apiGatewayClient = _interopRequireDefault(require("./lib/apiGatewayCore/apiGatewayClient"));
/*

@@ -31,4 +26,4 @@ * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
var apigClientFactory = {};
var removeEmpty = function removeEmpty(obj) {

@@ -40,3 +35,2 @@ Object.keys(obj).forEach(function (key) {

};
apigClientFactory.newClient = function () {

@@ -58,4 +52,5 @@ var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

host: undefined
}, removeEmpty(config)); // extract endpoint and path from url
}, removeEmpty(config));
// extract endpoint and path from url
var invokeUrl = config.invokeUrl;

@@ -80,7 +75,5 @@ var endpoint = /(^https?:\/\/[^/]+)/g.exec(invokeUrl)[1];

var authType = 'NONE';
if (sigV4ClientConfig.accessKey !== undefined && sigV4ClientConfig.accessKey !== '' && sigV4ClientConfig.secretKey !== undefined && sigV4ClientConfig.secretKey !== '') {
authType = 'AWS_IAM';
}
var simpleHttpClientConfig = {

@@ -95,5 +88,3 @@ endpoint: endpoint,

};
var apiGatewayClient = _apiGatewayClient["default"].newClient(simpleHttpClientConfig, sigV4ClientConfig);
apigClient.invokeApi = function (params, pathTemplate, method, additionalParams, body) {

@@ -112,8 +103,5 @@ if (additionalParams === undefined) additionalParams = {};

};
return apigClient;
};
var _default = apigClientFactory;
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9hcGlnQ2xpZW50LmpzIl0sIm5hbWVzIjpbImFwaWdDbGllbnRGYWN0b3J5IiwicmVtb3ZlRW1wdHkiLCJvYmoiLCJPYmplY3QiLCJrZXlzIiwiZm9yRWFjaCIsImtleSIsInVuZGVmaW5lZCIsIm5ld0NsaWVudCIsImNvbmZpZyIsImFwaWdDbGllbnQiLCJhc3NpZ24iLCJhY2Nlc3NLZXkiLCJzZWNyZXRLZXkiLCJzZXNzaW9uVG9rZW4iLCJyZWdpb24iLCJhcGlLZXkiLCJpbnZva2VVcmwiLCJzZXJ2aWNlIiwiZGVmYXVsdENvbnRlbnRUeXBlIiwiZGVmYXVsdEFjY2VwdFR5cGUiLCJzeXN0ZW1DbG9ja09mZnNldCIsImhlYWRlcnMiLCJob3N0IiwiZW5kcG9pbnQiLCJleGVjIiwicGF0aENvbXBvbmVudCIsInN1YnN0cmluZyIsImxlbmd0aCIsInNpZ1Y0Q2xpZW50Q29uZmlnIiwic2VydmljZU5hbWUiLCJyZXRyaWVzIiwicmV0cnlDb25kaXRpb24iLCJyZXRyeURlbGF5IiwiYXV0aFR5cGUiLCJzaW1wbGVIdHRwQ2xpZW50Q29uZmlnIiwiYXBpR2F0ZXdheUNsaWVudCIsImFwaUdhdGV3YXlDbGllbnRGYWN0b3J5IiwiaW52b2tlQXBpIiwicGFyYW1zIiwicGF0aFRlbXBsYXRlIiwibWV0aG9kIiwiYWRkaXRpb25hbFBhcmFtcyIsImJvZHkiLCJyZXF1ZXN0IiwidmVyYiIsInRvVXBwZXJDYXNlIiwicGF0aCIsInVyaXRlbXBsYXRlIiwicGFyc2UiLCJleHBhbmQiLCJ0aW1lb3V0IiwicXVlcnlQYXJhbXMiLCJtYWtlUmVxdWVzdCJdLCJtYXBwaW5ncyI6Ijs7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xuICAgICAgICBib2R5OiBib2R5XG4gICAgfTtcblxuICAgIHJldHVybiBhcGlHYXRld2F5Q2xpZW50Lm1ha2VSZXF1ZXN0KHJlcXVlc3QsIGF1dGhUeXBlLCBhZGRpdGlvbmFsUGFyYW1zLCBjb25maWcuYXBpS2V5KTtcbiAgfTtcblxuICByZXR1cm4gYXBpZ0NsaWVudDtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IGFwaWdDbGllbnRGYWN0b3J5O1xuIl19
var _default = exports["default"] = apigClientFactory;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfdXJsVGVtcGxhdGUiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwicmVxdWlyZSIsIl9hcGlHYXRld2F5Q2xpZW50IiwiYXBpZ0NsaWVudEZhY3RvcnkiLCJyZW1vdmVFbXB0eSIsIm9iaiIsIk9iamVjdCIsImtleXMiLCJmb3JFYWNoIiwia2V5IiwiX3R5cGVvZjIiLCJ1bmRlZmluZWQiLCJuZXdDbGllbnQiLCJjb25maWciLCJhcmd1bWVudHMiLCJsZW5ndGgiLCJhcGlnQ2xpZW50IiwiYXNzaWduIiwiYWNjZXNzS2V5Iiwic2VjcmV0S2V5Iiwic2Vzc2lvblRva2VuIiwicmVnaW9uIiwiYXBpS2V5IiwiaW52b2tlVXJsIiwic2VydmljZSIsImRlZmF1bHRDb250ZW50VHlwZSIsImRlZmF1bHRBY2NlcHRUeXBlIiwic3lzdGVtQ2xvY2tPZmZzZXQiLCJoZWFkZXJzIiwiaG9zdCIsImVuZHBvaW50IiwiZXhlYyIsInBhdGhDb21wb25lbnQiLCJzdWJzdHJpbmciLCJzaWdWNENsaWVudENvbmZpZyIsInNlcnZpY2VOYW1lIiwicmV0cmllcyIsInJldHJ5Q29uZGl0aW9uIiwicmV0cnlEZWxheSIsImF1dGhUeXBlIiwic2ltcGxlSHR0cENsaWVudENvbmZpZyIsImFwaUdhdGV3YXlD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CQUFXLENBQUNDLEtBQUssQ0FBQ1QsWUFBWSxDQUFDLENBQUNVLE1BQU0sQ0FBQ1gsTUFBTSxDQUFDO01BQ3BFaEIsT0FBTyxFQUFFbUIsZ0JBQWdCLENBQUNuQixPQUFPLElBQUksQ0FBQyxDQUFDO01BQ3ZDNEIsT0FBTyxFQUFFVCxnQkFBZ0IsQ0FBQ1MsT0FBTyxJQUFJLENBQUM7TUFDdENDLFdBQVcsRUFBRVYsZ0JBQWdCLENBQUNVLFdBQVc7TUFDekNULElBQUksRUFBRUE7SUFDVixDQUFDO0lBRUQsT0FBT1AsZ0JBQWdCLENBQUNpQixXQUFXLENBQUNULE9BQU8sRUFBRVYsUUFBUSxFQUFFUSxnQkFBZ0IsRUFBRWxDLE1BQU0sQ0FBQ1MsTUFBTSxDQUFDO0VBQ3pGLENBQUM7RUFFRCxPQUFPTixVQUFVO0FBQ25CLENBQUM7QUFBQyxJQUFBMkMsUUFBQSxHQUFBQyxPQUFBLGNBRWF6RCxpQkFBaUIifQ==
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -9,9 +8,5 @@ value: true

exports["default"] = void 0;
var _utils = _interopRequireDefault(require("./utils"));
var _sigV4Client = _interopRequireDefault(require("./sigV4Client.js"));
var _simpleHttpClient = _interopRequireDefault(require("./simpleHttpClient.js"));
/*

@@ -31,43 +26,39 @@ * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
var apiGatewayClientFactory = {};
apiGatewayClientFactory.newClient = function (simpleHttpClientConfig, sigV4ClientConfig) {
var apiGatewayClient = {}; // Spin up 2 httpClients, one for simple requests, one for SigV4
var apiGatewayClient = {};
// Spin up 2 httpClients, one for simple requests, one for SigV4
var sigV4Client = _sigV4Client["default"].newClient(sigV4ClientConfig);
var simpleHttpClient = _simpleHttpClient["default"].newClient(simpleHttpClientConfig);
apiGatewayClient.makeRequest = function (request, authType, additionalParams, apiKey) {
// Default the request to use the simple http client
var clientToUse = simpleHttpClient; // Attach the apiKey to the headers request if one was provided
var clientToUse = simpleHttpClient;
// Attach the apiKey to the headers request if one was provided
if (apiKey !== undefined && apiKey !== '' && apiKey !== null) {
request.headers['x-api-key'] = apiKey;
}
if (request.body === undefined || request.body === '' || request.body === null || Object.keys(request.body).length === 0) {
request.body = undefined;
} // If the user specified any additional headers or query params that may not have been modeled
}
// If the user specified any additional headers or query params that may not have been modeled
// merge them into the appropriate request properties
request.headers = _utils["default"].mergeInto(request.headers, additionalParams.headers);
request.queryParams = _utils["default"].mergeInto(request.queryParams, additionalParams.queryParams);
request.timeout = _utils["default"].mergeInto(request.timeout, additionalParams.timeout); // If an auth type was specified inject the appropriate auth client
request.timeout = _utils["default"].mergeInto(request.timeout, additionalParams.timeout);
// If an auth type was specified inject the appropriate auth client
if (authType === 'AWS_IAM') {
clientToUse = sigV4Client;
} // Call the selected http client to make the request,
}
// Call the selected http client to make the request,
// returning a promise once the request is sent
return clientToUse.makeRequest(request);
};
return apiGatewayClient;
};
var _default = apiGatewayClientFactory;
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvYXBpR2F0ZXdheUNvcmUvYXBpR2F0ZXdheUNsaWVudC5qcyJdLCJuYW1lcyI6WyJhcGlHYXRld2F5Q2xpZW50RmFjdG9yeSIsIm5ld0NsaWVudCIsInNpbXBsZUh0dHBDbGllbnRDb25maWciLCJzaWdWNENsaWVudENvbmZpZyIsImFwaUdhdGV3YXlDbGllbnQiLCJzaWdWNENsaWVudCIsInNpZ1Y0Q2xpZW50RmFjdG9yeSIsInNpbXBsZUh0dHBDbGllbnQiLCJzaW1wbGVIdHRwQ2xpZW50RmFjdG9yeSIsIm1ha2VSZXF1ZXN0IiwicmVxdWVzdCIsImF1dGhUeXBlIiwiYWRkaXRpb25hbFBhcmFtcyIsImFwaUtleSIsImNsaW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iAgfTtcbiAgcmV0dXJuIGFwaUdhdGV3YXlDbGllbnQ7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBhcGlHYXRld2F5Q2xpZW50RmFjdG9yeTtcbiJdfQ==
var _default = exports["default"] = apiGatewayClientFactory;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfdXRpbHMiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwicmVxdWlyZSIsIl9zaWdWNENsaWVudCIsIl9zaW1wbGVIdHRwQ2xpZW50IiwiYXBpR2F0ZXdheUNsaWVudEZhY3RvcnkiLCJuZXdDbGllbnQiLCJzaW1wbGVIdHRwQ2xpZW50Q29uZmlnIiwic2lnVjRDbGllbnRDb25maWciLCJhcGlHYXRld2F5Q2xpZW50Iiwic2lnVjRDbGllbnQiLCJzaWdWNENsaWVudEZhY3RvcnkiLCJzaW1wbGVIdHRwQ2xpZW50Iiwic2ltcGxlSHR0cENsaWVudEZhY3RvcnkiLCJtYWtlUmVxdWVzdCIsInJlcXVlc3QiLCJhdXRoVHlwZSIsImFkZGl0aW9uYWxQYXJhbXMiLCJhcGlLZXkiLCJjbGllbnRUb1VzZSIsInVuZGVmaW5lZCIsImhlYWRlcnMiLCJib2R5IiwiT2JqZWN0Iiwia2V5cyIsImxlbmd0aCIsInV0aWxzIiwibWVyZ2VJbnRvIiwicXVlcnlQYXJhbXMiLCJ0aW1lb3V0IiwiX2RlZmF1bHQiLCJleHBvcnRzIl0sInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9hcGlHYXRld2F5Q29yZS9hcGlHYXRld2F5Q2xpZW50LmpzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBDb3B5cmlnaHQgMjAxMC0yMDE2IEFtYXpvbi5jb20sIEluYy4gb3IgaXRzIGFmZmlsaWF0ZXMuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogTGljZW5zZWQgdW5k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UFBSSxLQUFLRixTQUFTLElBQ3ZCTCxPQUFPLENBQUNPLElBQUksS0FBSyxFQUFFLElBQ25CUCxPQUFPLENBQUNPLElBQUksS0FBSyxJQUFJLElBQ3JCQyxNQUFNLENBQUNDLElBQUksQ0FBQ1QsT0FBTyxDQUFDTyxJQUFJLENBQUMsQ0FBQ0csTUFBTSxLQUFLLENBQUMsRUFDekM7TUFDQVYsT0FBTyxDQUFDTyxJQUFJLEdBQUdGLFNBQVM7SUFDMUI7O0lBRUE7SUFDQTtJQUNBTCxPQUFPLENBQUNNLE9BQU8sR0FBR0ssaUJBQUssQ0FBQ0MsU0FBUyxDQUFDWixPQUFPLENBQUNNLE9BQU8sRUFBRUosZ0JBQWdCLENBQUNJLE9BQU8sQ0FBQztJQUM1RU4sT0FBTyxDQUFDYSxXQUFXLEdBQUdGLGlCQUFLLENBQUNDLFNBQVMsQ0FBQ1osT0FBTyxDQUFDYSxXQUFXLEVBQUVYLGdCQUFnQixDQUFDVyxXQUFXLENBQUM7SUFDeEZiLE9BQU8sQ0FBQ2MsT0FBTyxHQUFHSCxpQkFBSyxDQUFDQyxTQUFTLENBQUNaLE9BQU8sQ0FBQ2MsT0FBTyxFQUFFWixnQkFBZ0IsQ0FBQ1ksT0FBTyxDQUFDOztJQUU1RTtJQUNBLElBQUliLFFBQVEsS0FBSyxTQUFTLEVBQUU7TUFDMUJHLFdBQVcsR0FBR1QsV0FBVztJQUMzQjs7SUFFQTtJQUNBO0lBQ0EsT0FBT1MsV0FBVyxDQUFDTCxXQUFXLENBQUNDLE9BQU8sQ0FBQztFQUN6QyxDQUFDO0VBQ0QsT0FBT04sZ0JBQWdCO0FBQ3pCLENBQUM7QUFBQyxJQUFBcUIsUUFBQSxHQUFBQyxPQUFBLGNBRWExQix1QkFBdUIifQ==
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -9,17 +8,9 @@ value: true

exports["default"] = void 0;
var _axios = _interopRequireDefault(require("axios"));
var _axiosRetry = _interopRequireDefault(require("axios-retry"));
var _sha = _interopRequireDefault(require("crypto-js/sha256"));
var _encHex = _interopRequireDefault(require("crypto-js/enc-hex"));
var _hmacSha = _interopRequireDefault(require("crypto-js/hmac-sha256"));
var _url = _interopRequireDefault(require("url"));
var _utils = _interopRequireDefault(require("./utils"));
/*

@@ -39,4 +30,4 @@ * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
var sigV4ClientFactory = {};
sigV4ClientFactory.newClient = function (config) {

@@ -50,11 +41,8 @@ var AWS_SHA_256 = 'AWS4-HMAC-SHA256';

var AUTHORIZATION = 'Authorization';
function hash(value) {
return (0, _sha["default"])(value); // eslint-disable-line
}
function hexEncode(value) {
return value.toString(_encHex["default"]);
}
function hmac(secret, value) {

@@ -65,15 +53,11 @@ return (0, _hmacSha["default"])(value, secret, {

}
function buildCanonicalRequest(method, path, queryParams, headers, payload) {
return method + '\n' + buildCanonicalUri(path) + '\n' + buildCanonicalQueryString(queryParams) + '\n' + buildCanonicalHeaders(headers) + '\n' + buildCanonicalSignedHeaders(headers) + '\n' + hexEncode(hash(payload));
}
function hashCanonicalRequest(request) {
return hexEncode(hash(request));
}
function buildCanonicalUri(uri) {
return encodeURI(uri);
}
function buildCanonicalQueryString(queryParams) {

@@ -83,5 +67,3 @@ if (Object.keys(queryParams).length < 1) {

}
var sortedQueryParams = [];
for (var property in queryParams) {

@@ -92,13 +74,9 @@ if (Object.prototype.hasOwnProperty.call(queryParams, property)) {

}
sortedQueryParams.sort();
var canonicalQueryString = '';
for (var i = 0; i < sortedQueryParams.length; i++) {
canonicalQueryString += sortedQueryParams[i] + '=' + fixedEncodeURIComponent(queryParams[sortedQueryParams[i]]) + '&';
}
return canonicalQueryString.substr(0, canonicalQueryString.length - 1);
}
function fixedEncodeURIComponent(str) {

@@ -109,7 +87,5 @@ return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {

}
function buildCanonicalHeaders(headers) {
var canonicalHeaders = '';
var sortedKeys = [];
for (var property in headers) {

@@ -120,15 +96,10 @@ if (Object.prototype.hasOwnProperty.call(headers, property)) {

}
sortedKeys.sort();
for (var i = 0; i < sortedKeys.length; i++) {
canonicalHeaders += sortedKeys[i].toLowerCase() + ':' + headers[sortedKeys[i]] + '\n';
}
return canonicalHeaders;
}
function buildCanonicalSignedHeaders(headers) {
var sortedKeys = [];
for (var property in headers) {

@@ -139,33 +110,24 @@ if (Object.prototype.hasOwnProperty.call(headers, property)) {

}
sortedKeys.sort();
return sortedKeys.join(';');
}
function buildStringToSign(datetime, credentialScope, hashedCanonicalRequest) {
return AWS_SHA_256 + '\n' + datetime + '\n' + credentialScope + '\n' + hashedCanonicalRequest;
}
function buildCredentialScope(datetime, region, service) {
return datetime.substr(0, 8) + '/' + region + '/' + service + '/' + AWS4_REQUEST;
}
function calculateSigningKey(secretKey, datetime, region, service) {
return hmac(hmac(hmac(hmac(AWS4 + secretKey, datetime.substr(0, 8)), region), service), AWS4_REQUEST);
}
function calculateSignature(key, stringToSign) {
return hexEncode(hmac(key, stringToSign));
}
function buildAuthorizationHeader(accessKey, credentialScope, headers, signature) {
return AWS_SHA_256 + ' Credential=' + accessKey + '/' + credentialScope + ', SignedHeaders=' + buildCanonicalSignedHeaders(headers) + ', Signature=' + signature;
}
var awsSigV4Client = {};
if (config.accessKey === undefined || config.secretKey === undefined) {
return awsSigV4Client;
}
awsSigV4Client.accessKey = _utils["default"].assertDefined(config.accessKey, 'accessKey');

@@ -181,51 +143,40 @@ awsSigV4Client.secretKey = _utils["default"].assertDefined(config.secretKey, 'secretKey');

awsSigV4Client.host = config.host;
awsSigV4Client.makeRequest = function (request) {
var verb = _utils["default"].assertDefined(request.verb, 'verb');
var path = _utils["default"].assertDefined(request.path, 'path');
var queryParams = _utils["default"].copy(request.queryParams);
var timeout = _utils["default"].copy(request.timeout);
if (queryParams === undefined) {
queryParams = {};
}
if (timeout === undefined) {
timeout = 0;
}
var headers = _utils["default"].copy(request.headers);
if (headers === undefined) {
headers = {};
} // If the user has not specified an override for Content type the use default
}
// If the user has not specified an override for Content type the use default
if (headers['Content-Type'] === undefined) {
headers['Content-Type'] = config.defaultContentType;
} // If the user has not specified an override for Accept type the use default
}
// If the user has not specified an override for Accept type the use default
if (headers['Accept'] === undefined) {
headers['Accept'] = config.defaultAcceptType;
}
var body = _utils["default"].copy(request.body);
var body = _utils["default"].copy(request.body); // stringify request body if content type is JSON
// stringify request body if content type is JSON
if (body && headers['Content-Type'] && headers['Content-Type'] === 'application/json') {
body = JSON.stringify(body);
} // If there is no body remove the content-type header so it is not included in SigV4 calculation
}
// If there is no body remove the content-type header so it is not included in SigV4 calculation
if (body === '' || body === undefined || body === null) {
delete headers['Content-Type'];
}
var datetime = new Date(new Date().getTime() + config.systemClockOffset).toISOString().replace(/\.\d{3}Z$/, 'Z').replace(/[:-]|\.\d{3}/g, '');
headers[X_AMZ_DATE] = datetime;
if (awsSigV4Client.host) {

@@ -235,6 +186,4 @@ headers[HOST] = awsSigV4Client.host;

var parser = _url["default"].parse(awsSigV4Client.endpoint);
headers[HOST] = parser.hostname;
}
var canonicalRequest = buildCanonicalRequest(verb, path, queryParams, headers, body);

@@ -247,20 +196,16 @@ var hashedCanonicalRequest = hashCanonicalRequest(canonicalRequest);

headers[AUTHORIZATION] = buildAuthorizationHeader(awsSigV4Client.accessKey, credentialScope, headers, signature);
if (awsSigV4Client.sessionToken !== undefined && awsSigV4Client.sessionToken !== '') {
headers[X_AMZ_SECURITY_TOKEN] = awsSigV4Client.sessionToken;
}
delete headers[HOST];
var url = config.endpoint + path;
var queryString = buildCanonicalQueryString(queryParams);
if (queryString !== '') {
url += '?' + queryString;
} // Need to re-attach Content-Type if it is not specified at this point
}
// Need to re-attach Content-Type if it is not specified at this point
if (headers['Content-Type'] === undefined) {
headers['Content-Type'] = config.defaultContentType;
}
var signedRequest = {

@@ -273,13 +218,10 @@ headers: headers,

};
if (config.retries !== undefined) {
signedRequest.baseURL = url;
var client = _axios["default"].create(signedRequest);
var client = _axios["default"].create(signedRequest); // Allow user configurable delay, or built-in exponential delay
// Allow user configurable delay, or built-in exponential delay
var retryDelay = function retryDelay() {
return 0;
};
if (config.retryDelay === 'exponential') {

@@ -294,3 +236,2 @@ retryDelay = _axiosRetry["default"].exponentialDelay;

}
(0, _axiosRetry["default"])(client, {

@@ -303,11 +244,7 @@ retries: config.retries,

}
return (0, _axios["default"])(signedRequest);
};
return awsSigV4Client;
};
var _default = sigV4ClientFactory;
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvYXBpR2F0ZXdheUNvcmUvc2lnVjRDbGllbnQuanMiXSwibmFtZXMiOlsic2lnVjRDbGllbnRGYWN0b3J5IiwibmV3Q2xpZW50IiwiY29uZmlnIiwiQVdTX1NIQV8yNTYiLCJBV1M0X1JFUVVFU1QiLCJBV1M0IiwiWF9BTVpfREFURSIsIlhfQU1aX1NFQ1VSSVRZX1RPS0VOIiwiSE9TVCIsIkFVVEhPUklaQVRJT04iLCJoYXNoIiwidmFsdWUiLCJoZXhFbmNvZGUiLCJ0b1N0cmluZyIsImVuY0hleCIsImhtYWMiLCJzZWNyZXQiLCJhc0J5dGVzIiwiYnVpbGRDYW5vbmljYWxSZXF1ZXN0IiwibWV0aG9kIiwicGF0aCIsInF1ZXJ5UGFyYW1zIiwiaGVhZGVycyIsInBheWxvYWQiLCJidWlsZENhbm9uaWNhbFVyaSIsImJ1aWxkQ2Fub25pY2FsUXVlcnlTdHJpbmciLCJidWlsZENhbm9uaWNhbEhlYWRlcnMiLCJidWlsZENhbm9uaWNhbFNpZ25lZEhlYWRlcnMiLCJoYXNoQ2Fub25pY2FsUmVxdWVzdCIsInJlcXVlc3QiLCJ1cmkiLCJlbmNvZGVVUkkiLCJPYmplY3QiLCJrZXlzIiwibGVuZ3RoIiwic29ydGVkUXVlcnlQYXJhbXMiLCJw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ZXF1ZXN0LmJhc2VVUkwgPSB1cmw7XG4gICAgICBsZXQgY2xpZW50ID0gYXhpb3MuY3JlYXRlKHNpZ25lZFJlcXVlc3QpO1xuXG4gICAgICAvLyBBbGxvdyB1c2VyIGNvbmZpZ3VyYWJsZSBkZWxheSwgb3IgYnVpbHQtaW4gZXhwb25lbnRpYWwgZGVsYXlcbiAgICAgIGxldCByZXRyeURlbGF5ID0gKCkgPT4gMDtcbiAgICAgIGlmIChjb25maWcucmV0cnlEZWxheSA9PT0gJ2V4cG9uZW50aWFsJykge1xuICAgICAgICByZXRyeURlbGF5ID0gYXhpb3NSZXRyeS5leHBvbmVudGlhbERlbGF5O1xuICAgICAgfSBlbHNlIGlmICh0eXBlb2YgY29uZmlnLnJldHJ5RGVsYXkgPT09ICdudW1iZXInKSB7XG4gICAgICAgIHJldHJ5RGVsYXkgPSAoKSA9PiBwYXJzZUludChjb25maWcucmV0cnlEZWxheSk7XG4gICAgICB9IGVsc2UgaWYgKHR5cGVvZiBjb25maWcucmV0cnlEZWxheSA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICByZXRyeURlbGF5ID0gY29uZmlnLnJldHJ5RGVsYXk7XG4gICAgICB9XG5cbiAgICAgIGF4aW9zUmV0cnkoY2xpZW50LCB7XG4gICAgICAgIHJldHJpZXM6IGNvbmZpZy5yZXRyaWVzLFxuICAgICAgICByZXRyeUNvbmRpdGlvbjogY29uZmlnLnJldHJ5Q29uZGl0aW9uLFxuICAgICAgICByZXRyeURlbGF5LFxuICAgICAgfSk7XG4gICAgICByZXR1cm4gY2xpZW50LnJlcXVlc3Qoc2lnbmVkUmVxdWVzdCk7XG4gICAgfVxuICAgIFxuICAgIHJldHVybiBheGlvcyhzaWduZWRSZXF1ZXN0KTtcbiAgfTtcblxuICByZXR1cm4gYXdzU2lnVjRDbGllbnQ7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBzaWdWNENsaWVudEZhY3Rvcnk7XG4iXX0=
var _default = exports["default"] = sigV4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8,22 @@ value: true

exports["default"] = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _axios = _interopRequireDefault(require("axios"));
var _axiosRetry = _interopRequireDefault(require("axios-retry"));
var _utils = _interopRequireDefault(require("./utils"));
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
var simpleHttpClientFactory = {};
simpleHttpClientFactory.newClient = function (config) {

@@ -31,5 +35,3 @@ function buildCanonicalQueryString(queryParams) {

}
var canonicalQueryString = '';
for (var property in queryParams) {

@@ -40,47 +42,34 @@ if (Object.prototype.hasOwnProperty.call(queryParams, property)) {

}
return canonicalQueryString.substr(0, canonicalQueryString.length - 1);
}
var simpleHttpClient = {};
simpleHttpClient.endpoint = _utils["default"].assertDefined(config.endpoint, 'endpoint');
simpleHttpClient.makeRequest = function (request) {
var verb = _utils["default"].assertDefined(request.verb, 'verb');
var path = _utils["default"].assertDefined(request.path, 'path');
var queryParams = _utils["default"].copy(request.queryParams);
var timeout = _utils["default"].copy(request.timeout);
if (queryParams === undefined) {
queryParams = {};
}
if (timeout === undefined) {
timeout = 0;
}
var headers = _objectSpread(_objectSpread({}, _utils["default"].copy(request.headers)), config.headers);
var headers = _objectSpread(_objectSpread({}, _utils["default"].copy(request.headers)), config.headers); // If the user has not specified an override for Content type the use default
// If the user has not specified an override for Content type the use default
if (headers['Content-Type'] === undefined) {
headers['Content-Type'] = config.defaultContentType;
} // If the user has not specified an override for Accept type the use default
}
// If the user has not specified an override for Accept type the use default
if (headers['Accept'] === undefined) {
headers['Accept'] = config.defaultAcceptType;
}
var body = _utils["default"].copy(request.body);
var url = config.endpoint + path;
var queryString = buildCanonicalQueryString(queryParams);
if (queryString !== '') {
url += '?' + queryString;
}
var simpleHttpRequest = {

@@ -93,13 +82,10 @@ headers: headers,

};
if (config.retries !== undefined) {
simpleHttpRequest.baseURL = url;
var client = _axios["default"].create(simpleHttpRequest);
var client = _axios["default"].create(simpleHttpRequest); // Allow user configurable delay, or built-in exponential delay
// Allow user configurable delay, or built-in exponential delay
var retryDelay = function retryDelay() {
return 0;
};
if (config.retryDelay === 'exponential') {

@@ -114,3 +100,2 @@ retryDelay = _axiosRetry["default"].exponentialDelay;

}
(0, _axiosRetry["default"])(client, {

@@ -123,11 +108,7 @@ retries: config.retries,

}
return (0, _axios["default"])(simpleHttpRequest);
};
return simpleHttpClient;
};
var _default = simpleHttpClientFactory;
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvYXBpR2F0ZXdheUNvcmUvc2ltcGxlSHR0cENsaWVudC5qcyJdLCJuYW1lcyI6WyJzaW1wbGVIdHRwQ2xpZW50RmFjdG9yeSIsIm5ld0NsaWVudCIsImNvbmZpZyIsImJ1aWxkQ2Fub25pY2FsUXVlcnlTdHJpbmciLCJxdWVyeVBhcmFtcyIsIk9iamVjdCIsImtleXMiLCJsZW5ndGgiLCJjYW5vbmljYWxRdWVyeVN0cmluZyIsInByb3BlcnR5IiwicHJvdG90eXBlIiwiaGFzT3duUHJvcGVydHkiLCJjYWxsIiwiZW5jb2RlVVJJQ29tcG9uZW50Iiwic3Vic3RyIiwic2ltcGxlSHR0cENsaWVudCIsImVuZHBvaW50IiwidXRpbHMiLCJhc3NlcnREZWZpbmVkIiwibWFrZVJlcXVlc3QiLCJyZXF1ZXN0IiwidmVyYiIsInBhdGgiLCJjb3B5IiwidGltZW91dCIsInVuZGVmaW5lZCIsImhlYWRlcnMiLCJkZWZhdWx0Q29udGVudFR5cGUiLCJkZWZhdWx0QWNjZXB0VHlwZSIsImJvZHkiLCJ1cmwiLCJxdWVyeVN0cmluZyIsInNpbXBsZUh0dHBSZXF1ZXN0IiwiZGF0YSIsIm1ldGhvZCIsInJldHJpZXMiLCJiYXNlVVJMIiwiY2xpZW50IiwiYXhpb3MiLCJjcmVhdGUiLCJyZXRyeURlbGF5IiwiYXhpb3NSZXRyeSIsImV4cG9uZW50aWFsRGVsYXkiLCJwYXJzZUludCIsInJldHJ5Q29uZGl0aW9uIiwiaXNOZXR3b3JrT3JJZGVtcG90ZW50UmVxdWVzdEVycm9yIl0sIm1hcHBpbmdz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xdWVzdEVycm9yLFxuICAgICAgICByZXRyeURlbGF5LFxuICAgICAgfSk7XG4gICAgICByZXR1cm4gY2xpZW50LnJlcXVlc3Qoc2ltcGxlSHR0cFJlcXVlc3QpO1xuICAgIH1cbiAgICByZXR1cm4gYXhpb3Moc2ltcGxlSHR0cFJlcXVlc3QpO1xuICB9O1xuXG4gIHJldHVybiBzaW1wbGVIdHRwQ2xpZW50O1xufTtcblxuZXhwb3J0IGRlZmF1bHQgc2ltcGxlSHR0cENsaWVudEZhY3Rvcnk7XG4iXX0=
var _default = exports["default"] = simpleHttpClientFactory;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYXhpb3MiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwicmVxdWlyZSIsIl9heGlvc1JldHJ5IiwiX3V0aWxzIiwib3duS2V5cyIsImUiLCJyIiwidCIsIk9iamVjdCIsImtleXMiLCJnZXRPd25Qcm9wZXJ0eVN5bWJvbHMiLCJvIiwiZmlsdGVyIiwiZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yIiwiZW51bWVyYWJsZSIsInB1c2giLCJhcHBseSIsIl9vYmplY3RTcHJlYWQiLCJhcmd1bWVudHMiLCJsZW5ndGgiLCJmb3JFYWNoIiwiX2RlZmluZVByb3BlcnR5MiIsImdldE93blByb3BlcnR5RGVzY3JpcHRvcnMiLCJkZWZpbmVQcm9wZXJ0aWVzIiwiZGVmaW5lUHJvcGVydHkiLCJzaW1wbGVIdHRwQ2xpZW50RmFjdG9yeSIsIm5ld0NsaWVudCIsImNvbmZpZyIsImJ1aWxkQ2Fub25pY2FsUXVlcnlTdHJpbmciLCJxdWVyeVBhcmFtcyIsImNhbm9uaWNhbFF1ZXJ5U3RyaW5nIiwicHJvcGVydHkiLCJwcm90b3R5cGUiLCJoYXNPd25Qcm9wZXJ0eSIsImNhbGwiLCJlbmNvZGVVUklDb21wb25lbnQiLCJzdWJzdHIiLCJ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BQUMsSUFBQStCLFFBQUEsR0FBQUMsT0FBQSxjQUVhNUMsdUJBQXVCIn0=
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -9,5 +8,3 @@ value: true

exports["default"] = void 0;
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
/*

@@ -27,2 +24,3 @@ * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.

*/
var utils = {

@@ -40,7 +38,5 @@ assertDefined: function assertDefined(object, name) {

}
if (keys.length > 0 && params === undefined) {
params = {};
}
for (var i = 0; i < keys.length; i++) {

@@ -56,9 +52,6 @@ if (!utils.contains(ignore, keys[i])) {

}
var object = {};
for (var i = 0; i < keys.length; i++) {
object[keys[i]] = params[keys[i]];
}
return object;

@@ -70,5 +63,3 @@ },

}
var i = a.length;
while (i--) {

@@ -79,3 +70,2 @@ if (a[i] === obj) {

}
return false;

@@ -85,13 +75,9 @@ },

if (null === obj || 'object' !== (0, _typeof2["default"])(obj)) return obj;
var Buffer = require('buffer').Buffer;
if (Buffer.isBuffer(obj)) return Buffer.from(obj);
var copy = obj.constructor();
var attr = null;
for (attr in obj) {
if (Object.prototype.hasOwnProperty.call(obj, attr)) copy[attr] = obj[attr];
}
return copy;

@@ -103,9 +89,6 @@ },

var attr = null;
for (attr in baseObj) {
if (Object.prototype.hasOwnProperty.call(baseObj, attr)) merged[attr] = baseObj[attr];
}
if (null == additionalProps || 'object' != (0, _typeof2["default"])(additionalProps)) return baseObj;
for (attr in additionalProps) {

@@ -116,8 +99,6 @@ if (Object.prototype.hasOwnProperty.call(additionalProps, attr)) {

}
return merged;
}
};
var _default = utils;
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvYXBpR2F0ZXdheUNvcmUvdXRpbHMuanMiXSwibmFtZXMiOlsidXRp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AgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIG1lcmdlZDtcbiAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgdXRpbHM7XG4iXX0=
var _default = exports["default"] = utils;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJ1dGlscyIsImFzc2VydERlZmluZWQiLCJvYmplY3QiLCJuYW1lIiwidW5kZWZpbmVkIiwiRXJyb3IiLCJjb25jYXQiLCJhc3NlcnRQYXJhbWV0ZXJzRGVmaW5lZCIsInBhcmFtcyIsImtleXMiLCJpZ25vcmUiLCJsZW5ndGgiLCJpIiwiY29udGFpbnMiLCJwYXJzZVBhcmFtZXRlcnNUb09iamVjdCIsImEiLCJvYmoiLCJjb3B5IiwiX3R5cGVvZjIiLCJCdWZmZXIiLCJyZXF1aXJlIiwiaXNCdWZmZXIiLCJmcm9tIiwiY29uc3RydWN0b3IiLCJhdHRyIiwiT2JqZWN0IiwicHJvdG90eXBlIiwiaGFzT3duUHJvcGVydHkiLCJjYWxsIiwibWVyZ2VJbnRvIiwiYmFzZU9iaiIsImFkZGl0aW9uYWxQcm9wcyIsIm1lcmdlZCIsIl9kZWZhdWx0IiwiZXhwb3J0cyJdLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvYXBpR2F0ZXdheUNvcmUvdXRpbHMuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIENvcHlyaWdodCAyMDEwLTIwMTYgQW1hem9uLmNvbSwgSW5jLiBvciBpdHMgYWZmaWxpYXRlcy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgXCJMaWNlbnNlXCIpLlxuICogWW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLl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lLEVBQUU7TUFDNUIsSUFBSU4sTUFBTSxDQUFDQyxTQUFTLENBQUNDLGNBQWMsQ0FBQ0MsSUFBSSxDQUFDRyxlQUFlLEVBQUVQLElBQUksQ0FBQyxFQUFFO1FBQy9EUSxNQUFNLENBQUNSLElBQUksQ0FBQyxHQUFHTyxlQUFlLENBQUNQLElBQUksQ0FBQztNQUN0QztJQUNGO0lBQ0EsT0FBT1EsTUFBTTtFQUNmO0FBQ0YsQ0FBQztBQUFDLElBQUFDLFFBQUEsR0FBQUMsT0FBQSxjQUVhbEMsS0FBSyJ9
{
"name": "@adastradev/aws-api-gateway-client",
"version": "1.0.8-beta.1701719775282",
"version": "1.0.8-beta.1701722287034",
"description": "A module for AWS API Gateway client",

@@ -40,7 +40,7 @@ "repository": {

"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/register": "^7.12.10",
"@babel/runtime": "^7.12.5",
"@babel/core": "^7.23.5",
"@babel/plugin-transform-runtime": "^7.23.4",
"@babel/preset-env": "^7.23.5",
"@babel/register": "^7.22.15",
"@babel/runtime": "^7.23.5",
"ava": "^3.14.0",

@@ -47,0 +47,0 @@ "eslint": "^6.8.0",

@@ -105,3 +105,2 @@ [![dependencies Status](https://david-dm.org/kndt84/aws-api-gateway-client/status.svg)](https://david-dm.org/kndt84/aws-api-gateway-client)

});
```
testing
```
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