From 4cbe995bf38b26645518dd217a029a88123efc72 Mon Sep 17 00:00:00 2001 From: Dave Andrews Date: Mon, 29 Apr 2024 17:55:25 +1000 Subject: [PATCH] introduce a network error class so not all Lambda client errors are treated as AWS errors --- dist/aws.js | 2 +- dist/aws.js.map | 2 +- dist/event-bridge.js | 2 +- dist/event-bridge.js.map | 2 +- dist/index.js | 2 +- dist/index.js.map | 2 +- dist/kinesis.js | 2 +- dist/kinesis.js.map | 2 +- dist/kms.js | 2 +- dist/kms.js.map | 2 +- dist/lambda.js | 2 +- dist/lambda.js.map | 2 +- dist/s3.js | 2 +- dist/s3.js.map | 2 +- dist/secrets-manager.js | 2 +- dist/secrets-manager.js.map | 2 +- dist/signature.js | 2 +- dist/signature.js.map | 2 +- dist/sqs.js | 2 +- dist/sqs.js.map | 2 +- dist/ssm.js | 2 +- dist/ssm.js.map | 2 +- src/index.ts | 1 + src/internal/error.ts | 10 ++++++++++ src/internal/lambda.ts | 6 +++++- src/lambda.ts | 1 + 26 files changed, 39 insertions(+), 23 deletions(-) diff --git a/dist/aws.js b/dist/aws.js index cf8b0c1..5d8757e 100644 --- a/dist/aws.js +++ b/dist/aws.js @@ -1,3 +1,3 @@ /*! For license information please see aws.js.LICENSE.txt */ -(()=>{var t={2:(t,e,r)=>{"use strict";r.d(e,{R:()=>u});var n=r(556);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r{"use strict";r.d(e,{g:()=>d,r:()=>v});var n=r(556);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e,r){return e=s(e),function(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],s(t).constructor):e.apply(t,r))}function a(t){var e="function"==typeof Map?new Map:void 0;return a=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(c())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&u(o,r.prototype),o}(t,arguments,s(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,t)},a(t)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r128)throw new v("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(e.accessKeyId.length));if(!e.secretAccessKey||""===e.secretAccessKey)throw new v("invalid AWS secret access key; reason: expected a non empty string, got `".concat(e.secretAccessKey,"`"));this.region=e.region,this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,void 0!==e.sessionToken&&(this.sessionToken=e.sessionToken),void 0!==e.endpoint&&("string"==typeof e.endpoint?this.endpoint=new n.y(e.endpoint):this.endpoint=e.endpoint)}return h(t,null,[{key:"fromEnvironment",value:function(e){return new t({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==e?void 0:e.endpoint})}}])}(),v=function(t){function e(t){return f(this,e),i(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(e,t),h(e)}(a(Error))},464:(t,e,r)=>{"use strict";r.d(e,{Kq:()=>o,Qt:()=>u,Qz:()=>w,SN:()=>b,Uv:()=>O,V1:()=>p,VQ:()=>g,Zs:()=>i,_e:()=>j,b2:()=>f,fk:()=>y,he:()=>a,iK:()=>s,ot:()=>l,pj:()=>v,sY:()=>h,ud:()=>d,wN:()=>n,z8:()=>S,zG:()=>c,zX:()=>m});var n="X-Amz-Algorithm",o="X-Amz-Credential",i="X-Amz-Date",a="X-Amz-Expires",c="X-Amz-Signature",u="X-Amz-SignedHeaders",s="X-Amz-Security-Token",f="x-amz-content-sha256",l=i.toLowerCase(),h=c.toLowerCase(),p="X-Amz-Target".toLowerCase(),y=s.toLowerCase(),d="authorization",v=[d,l,"date"],m="host",b={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},g="aws4_request",w="AWS4-HMAC-SHA256",O=604800,j="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",S="UNSIGNED-PAYLOAD"},556:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rs});var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,"_protocol",void 0),c(this,"_hostname",void 0),c(this,"_port",void 0);var r=!e.startsWith("http://")&&!e.startsWith("https://")?"".concat(t.DEFAULT_PROTOCOL,"://").concat(e):e,n=r.match(/^https?:/),i=o(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=n?n[0].slice(0,-1):t.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return e=t,(r=[{key:"copy",value:function(){return new t(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(t){var e=o(t.split(":"),2),r=e[0],n=e[1];this._hostname=r,this._port=n?parseInt(n):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(t){this._hostname=t}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(e){var r=e.match(/^https?:/),n=o(e.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):t.DEFAULT_PROTOCOL,this._hostname=n.split(":")[0],this._port=n.split(":")[1]?parseInt(n.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(t){this._port=t}},{key:"protocol",get:function(){return this._protocol},set:function(t){this._protocol=t}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n}();c(s,"DEFAULT_PROTOCOL","https")},539:(t,e,r)=>{"use strict";r.d(e,{c:()=>h});var n=r(95);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r{"use strict";function n(t,e){t=t.toLowerCase();for(var r=0,n=Object.keys(e);rn})},639:(t,e,r)=>{"use strict";r.d(e,{B:()=>S,s:()=>_});var n=r(275),o=r.n(n),i=r(464),a=r(539),c=r(21),u=r(680);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(t,e,r){return e=h(e),function(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,l()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(l=function(){return!!t})()}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function y(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{},r=m(m({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),e),n=E(r.signingDate),o=n.longDate,a=n.shortDate,u=r.signingService||this.service,s=r.signingRegion||this.region,f="".concat(a,"/").concat(s,"/").concat(u,"/").concat(i.VQ);t.headers[i.zX]||(t.headers[i.zX]=t.endpoint.hostname);for(var l=0,h=Object.keys(t.headers);l-1&&delete t.headers[p]}t.headers[i.ot]=o,this.credentials.sessionToken&&(t.headers[i.fk]=this.credentials.sessionToken),ArrayBuffer.isView(t.body)&&(t.body=t.body.buffer),t.body||(t.body="");var y=this.computePayloadHash(t);!(0,c.o)(i.b2,t.headers)&&this.applyChecksum&&(t.headers[i.b2]=y);var d=this.computeCanonicalHeaders(t,r.unsignableHeaders,r.signableHeaders),v=this.calculateSignature(o,f,this.deriveSigningKey(this.credentials,u,s,a),this.createCanonicalRequest(t,d,y));t.headers[i.ud]="".concat(i.Qz," ")+"Credential=".concat(this.credentials.accessKeyId,"/").concat(f,", ")+"SignedHeaders=".concat(Object.keys(d).sort().join(";"),", ")+"Signature=".concat(v);var b=t.endpoint.href;return t.path&&(b+=t.path),t.query&&(b+="?".concat(this.serializeQueryParameters(t.query))),m({url:b},t)}},{key:"presign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.signingDate,n=void 0===r?new Date:r,o=e.expiresIn,a=void 0===o?3600:o,c=e.unsignableHeaders,u=e.unhoistableHeaders,s=e.signableHeaders,f=e.signingRegion,l=e.signingService,h=E(n),p=h.longDate,y=h.shortDate,d=f||this.region,v=l||this.service;if(a>i.Uv)throw new _("Signature version 4 presigned URLs can't be valid for more than 7 days");var b="".concat(y,"/").concat(d,"/").concat(v,"/").concat(i.VQ),g=this.moveHeadersToQuery(t,{unhoistableHeaders:u});g.headers[i.zX]||(g.headers[i.zX]=t.endpoint.hostname),this.credentials.sessionToken&&(g.query[i.iK]=this.credentials.sessionToken),g.query[i.wN]=i.Qz,g.query[i.Kq]="".concat(this.credentials.accessKeyId,"/").concat(b),g.query[i.Zs]=p,g.query[i.he]=a.toString(10);var w=this.computeCanonicalHeaders(g,c,s);g.query[i.Qt]=Object.keys(w).sort().join(";");var O=this.deriveSigningKey(this.credentials,v,d,y),j=this.computePayloadHash(t),S=this.createCanonicalRequest(g,w,j);g.query[i.zG]=this.calculateSignature(p,b,O,S);var x=g.endpoint.href;return g.path&&(x+=g.path),g.query&&(x+="?".concat(this.serializeQueryParameters(g.query))),m({url:x},g)}},{key:"createCanonicalRequest",value:function(t,e,r){var n=Object.keys(e).sort(),o=n.map((function(t){return"".concat(t,":").concat(e[t])})).join("\n"),i=n.join(";");return"".concat(t.method,"\n")+"".concat(this.computeCanonicalURI(t),"\n")+"".concat(this.computeCanonicalQuerystring(t),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(t,e,r){var n=o().sha256(r,"hex");return"".concat(i.Qz,"\n")+"".concat(t,"\n")+"".concat(e,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(t,e,r,n){var i=this.createStringToSign(t,e,n);return o().hmac("sha256",r,i,"hex")}},{key:"deriveSigningKey",value:function(t,e,r,n){var i=t.secretAccessKey,a=o().hmac("sha256","AWS4"+i,n,"binary"),c=o().hmac("sha256",a,r,"binary"),u=o().hmac("sha256",c,e,"binary");return o().hmac("sha256",u,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(t){var e=t.path;if(this.uriEscapePath){var r,n=[],o=y(e.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(t){o.e(t)}finally{o.f()}var a=null!=e&&e.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=e&&e.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return e}},{key:"computeCanonicalQuerystring",value:function(t){var e,r=t.query,n=void 0===r?{}:r,o=[],a={},c=function(t){if(t.toLowerCase()===i.sY)return 1;o.push(t);var e=n[t];"string"==typeof e?a[t]="".concat(x(t),"=").concat(x(e)):Array.isArray(e)&&(a[t]=e.slice(0).sort().reduce((function(e,r){return e.concat(["".concat(x(t),"=").concat(x(r))])}),[]).join("&"))},u=y(Object.keys(n).sort());try{for(u.s();!(e=u.n()).done;){c(e.value)}}catch(t){u.e(t)}finally{u.f()}return o.map((function(t){return a[t]})).filter((function(t){return t})).join("&")}},{key:"computeCanonicalHeaders",value:function(t,e,r){var n,o=t.headers,a={},c=y(Object.keys(o).sort());try{for(c.s();!(n=c.n()).done;){var u=n.value;if(null!=o[u]){var s=u.toLowerCase();(s in i.SN||null!=e&&e.has(s))&&(!r||r&&!r.has(s))||"string"==typeof o[u]&&(a[s]=o[u]=o[u].trim().replace(/\s+/g," "))}}}catch(t){c.e(t)}finally{c.f()}return a}},{key:"computePayloadHash",value:function(t){var e=t.headers,r=t.body;return e[i.b2]?e[i.b2]:null==r?i._e:"string"==typeof r||(0,u.m)(r)?o().sha256(r,"hex").toLowerCase():ArrayBuffer.isView(r)?o().sha256(r.buffer,"hex").toLowerCase():i.z8}},{key:"moveHeadersToQuery",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(t)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a{"use strict";function n(t){return"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t))}function o(t){return Object.keys(t).reduce((function(e,r){var n=t[r];return null!=n&&e.push("".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(n))),e}),[]).join("&")}r.d(e,{R:()=>o,m:()=>n})},340:(t,e,r)=>{"use strict";r.d(e,{LambdaClient:()=>P,LambdaInvocationError:()=>k});r(811);var n=r(639),o=r(570),i=r.n(o);const a=require("k6/encoding");var c=r.n(a),u=r(2),s=r(539),f=r(464);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function h(t){var e="function"==typeof Map?new Map:void 0;return h=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(O())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&_(o,r.prototype),o}(t,arguments,j(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_(r,t)},h(t)}function p(){p=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function O(){}var j={};s(j,a,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(A([])));_&&_!==r&&n.call(_,a)&&(j=_);var x=O.prototype=g.prototype=Object.create(j);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,a,c){var u=h(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e2&&void 0!==m[2]?m[2]:{}).invocationType||"RequestResponse",u=d(d({},this.commonHeaders),{},x(x(x({},f.V1,"AWSLambda.".concat(a)),"X-Amz-Invocation-Type",a),"X-Amz-Log-Type",n.logType||"None")),n.clientContext&&(u["X-Amz-Client-Context"]=n.clientContext),n.qualifier&&(o.Qualifier=n.qualifier),s=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/2015-03-31/functions/".concat(e,"/invocations"),query:o,headers:u,body:r||""},{}),t.next=9,i().asyncRequest(this.method,s.url,s.body,{headers:s.headers});case 9:if(l=t.sent,this._handle_error(l),h=l.headers["X-Amz-Log-Result"],y={executedVersion:l.headers["X-Amz-Executed-Version"],logResult:h?c().b64decode(h,"std","s"):void 0,statusCode:l.status,payload:l.body},!(v=l.headers["X-Amz-Function-Error"])){t.next=18;break}throw new k(v,y);case 18:return t.abrupt("return",y);case 19:case"end":return t.stop()}}),t,this)})),o=function(){var t=this,e=arguments;return new Promise((function(n,o){var i=r.apply(t,e);function a(t){v(i,n,o,a,c,"next",t)}function c(t){v(i,n,o,a,c,"throw",t)}a(void 0)}))},function(t,e){return o.apply(this,arguments)})},{key:"_handle_error",value:function(t){var e=t.error_code;if(""!=t.error||0!==e){var r=s.c.parse(t);switch(r.code){case"AuthorizationHeaderMalformed":case"InvalidSignatureException":throw new n.s(r.message,r.code);default:throw r}}}}]);var r,o}(u.R),k=function(t){function e(t,r){var n;return m(this,e),x(n=w(this,e,["".concat(t,": ").concat(r.payload)]),"response",void 0),n.response=r,n}return S(e,t),g(e)}(h(Error))},535:(t,e,r)=>{"use strict";r.d(e,{SQSClient:()=>k});r(811);var n=r(639),o=r(2),i=r(570),a=r.n(i),c=r(680),u=r(539);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(){f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function O(){}var j={};l(j,a,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(A([])));_&&_!==r&&n.call(_,a)&&(j=_);var x=O.prototype=g.prototype=Object.create(j);function E(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,a,c){var u=p(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==s(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==p[2]?p[2]:{}).messageDeduplicationId&&(o=y(y({},o),{},{MessageDeduplicationId:n.messageDeduplicationId})),void 0!==n.messageGroupId&&(o=y(y({},o),{},{MessageGroupId:n.messageGroupId})),void 0!==n.messageAttributes&&(i=Object.entries(n.messageAttributes).reduce((function(t,e,r){var n=l(e,2),o=n[0],i=n[1],a="Binary"===i.type?"BinaryValue":"StringValue";return Object.assign(t,x(x(x({},"MessageAttribute.".concat(r+1,".Name"),o),"MessageAttribute.".concat(r+1,".Value.").concat(a),i.value),"MessageAttribute.".concat(r+1,".Value.DataType"),i.type))}),{}),o=y(y({},o),i)),void 0!==n.delaySeconds&&(o=y(y({},o),{},{DelaySeconds:n.delaySeconds})),u=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:y({},this.commonHeaders),body:(0,c.R)(o)},{}),t.next=10,a().asyncRequest("POST",u.url,u.body||"",{headers:u.headers});case 10:return s=t.sent,this._handleError("SendMessage",s),h=s.html("SendMessageResponse > SendMessageResult"),t.abrupt("return",new L(h.find("MessageId").text(),h.find("MD5OfMessageBody").text()));case 14:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})},{key:"listQueues",value:(r=v(f().mark((function t(){var e,r,n,o,i,u=arguments;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={Action:"ListQueues",Version:P},void 0!==(null==(e=u.length>0&&void 0!==u[0]?u[0]:{})?void 0:e.maxResults)&&(r=y(y({},r),{},{MaxResults:e.maxResults})),void 0!==(null==e?void 0:e.nextToken)&&(r=y(y({},r),{},{NextToken:e.nextToken})),void 0!==(null==e?void 0:e.queueNamePrefix)&&(r=y(y({},r),{},{QueueNamePrefix:e.queueNamePrefix})),n=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:y(y({},this.commonHeaders),{},{Host:this.endpoint.host}),body:(0,c.R)(r)},{}),t.next=9,a().asyncRequest("POST",n.url,n.body||"",{headers:n.headers});case 9:return o=t.sent,this._handleError("ListQueues",o),i=o.html(),t.abrupt("return",{urls:i.find("QueueUrl").toArray().map((function(t){return t.text()})),nextToken:i.find("NextToken").text()||void 0});case 13:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"_handleError",value:function(t,e){var r=e.error_code;if(""!=e.error||0!==r){var o=u.c.parseXML(e.body);if("AuthorizationHeaderMalformed"===o.code)throw new n.s(o.message,o.code);throw new T(o.message,o.code||"unknown",t)}}}]);var r,o}(o.R),L=g((function t(e,r){m(this,t),x(this,"id",void 0),x(this,"bodyMD5",void 0),this.id=e,this.bodyMD5=r})),T=function(t){function e(t,r,n){var o;return m(this,e),x(o=w(this,e,[t,r]),"operation",void 0),o.name="SQSServiceError",o.operation=n,o}return S(e,t),g(e)}(u.c)},414:(t,e,r)=>{var n=r(33),o=r(550),i=o;i.v1=n,i.v4=o,t.exports=i},471:t=>{for(var e=[],r=0;r<256;++r)e[r]=(r+256).toString(16).substr(1);t.exports=function(t,r){var n=r||0,o=e;return[o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]]].join("")}},814:t=>{var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var r=new Uint8Array(16);t.exports=function(){return e(r),r}}else{var n=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)3&e||(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n}}},33:(t,e,r)=>{var n,o,i=r(814),a=r(471),c=0,u=0;t.exports=function(t,e,r){var s=e&&r||0,f=e||[],l=(t=t||{}).node||n,h=void 0!==t.clockseq?t.clockseq:o;if(null==l||null==h){var p=i();null==l&&(l=n=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==h&&(h=o=16383&(p[6]<<8|p[7]))}var y=void 0!==t.msecs?t.msecs:(new Date).getTime(),d=void 0!==t.nsecs?t.nsecs:u+1,v=y-c+(d-u)/1e4;if(v<0&&void 0===t.clockseq&&(h=h+1&16383),(v<0||y>c)&&void 0===t.nsecs&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=y,u=d,o=h;var m=(1e4*(268435455&(y+=122192928e5))+d)%4294967296;f[s++]=m>>>24&255,f[s++]=m>>>16&255,f[s++]=m>>>8&255,f[s++]=255&m;var b=y/4294967296*1e4&268435455;f[s++]=b>>>8&255,f[s++]=255&b,f[s++]=b>>>24&15|16,f[s++]=b>>>16&255,f[s++]=h>>>8|128,f[s++]=255&h;for(var g=0;g<6;++g)f[s+g]=l[g];return e||a(f)}},550:(t,e,r)=>{var n=r(814),o=r(471);t.exports=function(t,e,r){var i=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var a=(t=t||{}).random||(t.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e)for(var c=0;c<16;++c)e[i+c]=a[c];return e||o(a)}},275:t=>{"use strict";t.exports=require("k6/crypto")},95:t=>{"use strict";t.exports=require("k6/html")},570:t=>{"use strict";t.exports=require("k6/http")}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{AMZ_CONTENT_SHA256_HEADER:()=>o.b2,AWSConfig:()=>e.g,EventBridgeClient:()=>Le,InvalidAWSConfigError:()=>e.r,InvalidSignatureError:()=>t.s,KMSClient:()=>x,KMSDataKey:()=>P,KMSServiceError:()=>k,KinesisClient:()=>ne,LambdaClient:()=>Ce.LambdaClient,LambdaInvocationError:()=>Ce.LambdaInvocationError,S3Bucket:()=>W,S3Client:()=>Q,S3Object:()=>X,S3ServiceError:()=>$,SQSClient:()=>qt.SQSClient,Secret:()=>bt,SecretsManagerClient:()=>mt,SecretsManagerServiceError:()=>gt,SignatureV4:()=>t.B,SystemsManagerClient:()=>Dt,SystemsManagerParameter:()=>Mt,SystemsManagerServiceError:()=>Gt,UNSIGNED_PAYLOAD:()=>o.z8});var t=r(639),e=r(811),o=r(464),i=r(570),a=r.n(i),c=r(2),u=r(539);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(){f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function O(){}var j={};l(j,a,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(A([])));_&&_!==r&&n.call(_,a)&&(j=_);var x=O.prototype=g.prototype=Object.create(j);function E(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,a,c){var u=p(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==s(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e1&&void 0!==c[1]?c[1]:T.Size256,n=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/",headers:h(h({},this.commonHeaders),{},S({},o.V1,"TrentService.GenerateDataKey")),body:JSON.stringify({KeyId:e,NumberOfBytes:r})},{}),t.next=4,a().asyncRequest(this.method,n.url,n.body,{headers:n.headers});case 4:return i=t.sent,this._handle_error(L.GenerateDataKey,i),t.abrupt("return",P.fromJSON(i.json()));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.error_code;if(0!==n){var o=r.json();if(n>=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new k(i,o.__type,e)}if(1500===n)throw new k("An error occured on the server side","InternalServiceError",e)}}}]);var n,i}(c.R),E=function(){function t(e,r){d(this,t),S(this,"keyArn",void 0),S(this,"keyId",void 0),this.keyArn=e,this.keyId=r}return m(t,null,[{key:"fromJSON",value:function(e){return new t(e.KeyArn,e.KeyId)}}])}(),P=function(){function t(e,r,n){d(this,t),S(this,"id",void 0),S(this,"ciphertextBlob",void 0),S(this,"plaintext",void 0),this.ciphertextBlob=e,this.id=r,this.plaintext=n}return m(t,null,[{key:"fromJSON",value:function(e){return new t(e.CiphertextBlob,e.KeyId,e.Plaintext)}}])}(),k=function(t){function e(t,r,n){var o;return d(this,e),S(o=b(this,e,[t,r]),"operation",void 0),o.name="KMSServiceError",o.operation=n,o}return O(e,t),m(e)}(u.c),L=function(t){return t.GenerateDataKey="GenerateDataKey",t.ListKeys="ListKeys",t}(L||{}),T=function(t){return t[t.Size256=32]="Size256",t[t.Size512=64]="Size512",t}(T||{}),N=r(95);function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}function A(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function R(t){for(var e=1;e=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function D(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function M(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){D(i,n,o,a,c,"next",t)}function c(t){D(i,n,o,a,c,"throw",t)}a(void 0)}))}}function G(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function K(t,e){for(var r=0;r".concat(t.partNumber,"").concat(t.eTag,"")})).join(""),""),(u=this.endpoint.copy()).hostname="".concat(e,".").concat(this.endpoint.hostname),s=this.signature.sign({method:i,endpoint:u,path:"/".concat(r),headers:{},body:c,query:{uploadId:"".concat(n)}},{}),t.next=7,a().asyncRequest(i,s.url,s.body||null,{headers:s.headers});case 7:f=t.sent,this._handle_error("CompleteMultipartUpload",f);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return o.apply(this,arguments)})},{key:"abortMultipartUpload",value:(n=M(I().mark((function t(e,r,n){var o,i,c,u;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o="DELETE",(i=this.endpoint.copy()).hostname="".concat(e,".").concat(this.endpoint.hostname),c=this.signature.sign({method:o,endpoint:i,path:"/".concat(r),headers:{},query:{uploadId:"".concat(n)}},{}),t.next=6,a().asyncRequest(o,c.url,c.body||null,{headers:c.headers});case 6:u=t.sent,this._handle_error("AbortMultipartUpload",u);case 8:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return n.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.status,o=r.error_code,i=r.error;if(!(n>=200&&n<300&&""==i&&0===o)){if(301==n||i&&i.startsWith("301"))throw new $("Resource not found","ResourceNotFound",e);var a=u.c.parseXML(r.body);if("AuthorizationHeaderMalformed"===a.code)throw new t.s(a.message,a.code);throw new $(a.message,a.code||"unknown",e)}}}]);var n,o,i,c,s,f,l,h,p,y}(c.R),W=q((function t(e,r){G(this,t),J(this,"name",void 0),J(this,"creationDate",void 0),this.name=e,this.creationDate=r})),X=q((function t(e,r,n,o,i,a){G(this,t),J(this,"key",void 0),J(this,"lastModified",void 0),J(this,"etag",void 0),J(this,"size",void 0),J(this,"storageClass",void 0),J(this,"data",void 0),this.key=e,this.lastModified=r,this.etag=n,this.size=o,this.storageClass=i,this.data=a})),Y=q((function t(e,r){G(this,t),J(this,"key",void 0),J(this,"uploadId",void 0),this.key=e,this.uploadId=r})),Z=q((function t(e,r){G(this,t),J(this,"partNumber",void 0),J(this,"eTag",void 0),this.partNumber=e,this.eTag=r})),$=function(t){function e(t,r,n){var o;return G(this,e),J(o=H(this,e,[t,r]),"operation",void 0),o.name="S3ServiceError",o.operation=n,o}return F(e,t),q(e)}(u.c),tt=r(414);function et(t){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function rt(){rt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==et(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ot(t){for(var e=1;e=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new gt(i,o.__type,e)}if(1500===n)throw new gt("An error occured on the server side","InternalServiceError",e)}}}]);var n,i,c,u,s}(c.R),bt=function(){function t(e,r,n,o,i,a){var c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[];ct(this,t),dt(this,"name",void 0),dt(this,"arn",void 0),dt(this,"secret",void 0),dt(this,"createdDate",void 0),dt(this,"lastAccessedDate",void 0),dt(this,"lastChangedDate",void 0),dt(this,"tags",void 0),this.name=e,this.arn=r,this.secret=n,this.createdDate=o,this.lastAccessedDate=i,this.lastChangedDate=a,this.tags=c}return st(t,null,[{key:"fromJSON",value:function(e){return new t(e.Name,e.ARN,e.SecretString,e.CreatedDate,e.LastAccessedDate,e.LastChangedDate,e.Tags)}}])}(),gt=function(t){function e(t,r,n){var o;return ct(this,e),dt(o=ft(this,e,[t,r]),"operation",void 0),o.name="SecretsManagerServiceError",o.operation=n,o}return pt(e,t),st(e)}(u.c),wt=function(t){return t.ListSecrets="ListSecrets",t.GetSecretValue="GetSecretValue",t.CreateSecret="CreateSecret",t.PutSecretValue="PutSecretValue",t.DeleteSecret="DeleteSecret",t}(wt||{});function Ot(t){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ot(t)}function jt(){jt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Ot(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function St(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _t(t){for(var e=1;e1&&void 0!==c[1]&&c[1],n=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/",headers:_t(_t({},this.commonHeaders),{},Rt({},o.V1,"AmazonSSM.GetParameter")),body:JSON.stringify({Name:e,WithDecryption:r})},{}),t.next=4,a().asyncRequest(this.method,n.url,n.body,{headers:n.headers});case 4:return i=t.sent,this._handle_error(Kt.GetParameter,i),t.abrupt("return",Mt.fromJSON(i.json()));case 7:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){xt(i,r,o,a,c,"next",t)}function c(t){xt(i,r,o,a,c,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.error_code;if(0!==n){var o=r.json();if(n>=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new Gt(i,o.__type,e)}if(1500===n)throw new Gt("An error occured on the server side","InternalServiceError",e)}}}]);var n,i}(c.R),Mt=function(){function t(e,r,n,o,i,a,c,u,s){Et(this,t),Rt(this,"arn",void 0),Rt(this,"dataType",void 0),Rt(this,"lastModifiedDate",void 0),Rt(this,"name",void 0),Rt(this,"selector",void 0),Rt(this,"sourceResult",void 0),Rt(this,"type",void 0),Rt(this,"value",void 0),Rt(this,"version",void 0),this.arn=e,this.dataType=r,this.lastModifiedDate=n,this.name=o,this.selector=i,this.sourceResult=a,this.type=c,this.value=u,this.version=s}return kt(t,null,[{key:"fromJSON",value:function(e){var r=e.Parameter;return new t(r.ARN,r.DataType,r.LastModifiedDate,r.Name,r.Selector,r.SourceResult,r.Type,r.Value,r.Version)}}])}(),Gt=function(t){function e(t,r,n){var o;return Et(this,e),Rt(o=Lt(this,e,[t,r]),"operation",void 0),o.name="SystemsManagerServiceError",o.operation=n,o}return Ct(e,t),kt(e)}(u.c),Kt=function(t){return t.GetParameter="GetParameter",t}(Kt||{}),qt=r(535);function Ht(t){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(t)}function zt(){zt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Ht(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function Bt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ft(t){for(var e=1;e1&&void 0!==o[1]?o[1]:{}).shardCount&&{ShardCount:r.shardCount}),r.streamModeDetails&&{StreamMode:r.streamModeDetails.streamMode}),t.next=4,this._send_request("CreateStream",n);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"deleteStream",value:(l=Jt(zt().mark((function t(e){var r,n,o=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Ft(Ft({StreamName:e},(r=o.length>1&&void 0!==o[1]?o[1]:{}).streamARN&&{StreamARN:r.streamARN}),r.enforceConsumerDeletion&&{EnforceConsumerDeletion:r.enforceConsumerDeletion}),t.next=4,this._send_request("DeleteStream",n);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"listStreams",value:(f=Jt(zt().mark((function t(){var e,r,n,o=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Ft(Ft(Ft({},(e=o.length>0&&void 0!==o[0]?o[0]:{}).exclusiveStartStreamName&&{ExclusiveStartStreamName:e.exclusiveStartStreamName}),e.limit&&{Limit:e.limit}),e.nextToken&&{NextToken:e.nextToken}),t.next=4,this._send_request("ListStreams",r);case 4:return n=t.sent,t.abrupt("return",ie.fromJson(null==n?void 0:n.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"putRecords",value:(s=Jt(zt().mark((function t(e){var r,n,o,i=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=i.length>1&&void 0!==i[1]?i[1]:{}).streamName||r.streamARN){t.next=3;break}throw new Error("Either streamName or streamARN must be provided");case 3:return n=Ft(Ft({Records:e},r.streamName&&{StreamName:r.streamName}),r.streamARN&&{StreamARN:r.streamARN}),t.next=6,this._send_request("PutRecords",n);case 6:return o=t.sent,t.abrupt("return",ce.fromJson(null==o?void 0:o.json()));case 8:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"getRecords",value:(u=Jt(zt().mark((function t(e){var r,n,o,i=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Ft(Ft({ShardIterator:e},(r=i.length>1&&void 0!==i[1]?i[1]:{}).limit&&{Limit:r.limit}),r.streamARN&&{StreamARN:r.streamARN}),t.next=4,this._send_request("GetRecords",n);case 4:return o=t.sent,t.abrupt("return",se.fromJson(null==o?void 0:o.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"listShards",value:(c=Jt(zt().mark((function t(e){var r,n,o,i=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Ft(Ft({StreamName:e},(r=i.length>1&&void 0!==i[1]?i[1]:{}).nextToken&&{NextToken:r.nextToken}),r.maxResults&&{MaxResults:r.maxResults}),t.next=4,this._send_request("ListShards",n);case 4:return o=t.sent,t.abrupt("return",le.fromJson(null==o?void 0:o.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"getShardIterator",value:(i=Jt(zt().mark((function t(e,r,n){var o,i,a,c=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=Ft(Ft({StreamName:e,ShardId:r,ShardIteratorType:n},(o=c.length>3&&void 0!==c[3]?c[3]:{}).startingSequenceNumber&&{StartingSequenceNumber:o.startingSequenceNumber}),o.timestamp&&{Timestamp:o.timestamp}),t.next=4,this._send_request("GetShardIterator",i);case 4:return a=t.sent,t.abrupt("return",pe.fromJson(null==a?void 0:a.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return i.apply(this,arguments)})},{key:"_send_request",value:(n=Jt(zt().mark((function t(e,r){var n,i;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:Ft(Ft({},this.commonHeaders),{},ee({},o.V1,"".concat(this.serviceVersion,".").concat(e))),body:JSON.stringify(r)},{}),t.next=3,a().asyncRequest("POST",n.url,n.body,{headers:n.headers});case 3:return i=t.sent,this._handle_error(e,i),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.error_code;if(0!==n){var o=r.json();if(n>=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new oe(i,o.__type,e)}if(1500===n)throw new oe("An error occured on the server side","InternalServiceError",e)}}}]);var n,i,c,u,s,f,l,h}(c.R),oe=function(t){function e(t,r,n){var o;return Ut(this,e),ee(o=Xt(this,e,[t,r]),"operation",void 0),o.name="KinesisServiceError",o.operation=n,o}return $t(e,t),Wt(e)}(u.c),ie=function(){function t(e,r,n,o){Ut(this,t),ee(this,"hasMoreStreams",void 0),ee(this,"nextToken",void 0),ee(this,"streamNames",void 0),ee(this,"streamSummaries",void 0),this.hasMoreStreams=e,this.nextToken=r,this.streamNames=n,this.streamSummaries=o}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.HasMoreStreams,n=void 0!==r&&r,o=e.NextToken,i=void 0===o?"":o,a=e.StreamNames,c=void 0===a?[]:a,u=e.StreamSummaries,s=void 0===u?[]:u;return new t(n,i,c,null==s?void 0:s.map(ae.fromJson))}}])}(),ae=function(){function t(e,r,n,o,i){Ut(this,t),ee(this,"streamARN",void 0),ee(this,"streamCreationTimestamp",void 0),ee(this,"streamModeDetails",void 0),ee(this,"streamName",void 0),ee(this,"streamStatus",void 0),this.streamARN=e,this.streamCreationTimestamp=r,this.streamModeDetails=n,this.streamName=o,this.streamStatus=i}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.StreamARN,n=void 0===r?"":r,o=e.StreamCreationTimestamp,i=void 0===o?0:o,a=e.StreamModeDetails,c=void 0===a?{}:a,u=e.StreamName,s=void 0===u?"":u,f=e.StreamStatus;return new t(n,i,c,s,void 0===f?"":f)}}])}(),ce=function(){function t(e,r,n){Ut(this,t),ee(this,"encryptionType",void 0),ee(this,"failedRecordCount",void 0),ee(this,"records",void 0),this.encryptionType=e,this.failedRecordCount=r,this.records=n}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.EncryptionType,n=void 0===r?"NONE":r,o=e.FailedRecordCount,i=void 0===o?0:o,a=e.Records;return new t(n,i,(void 0===a?[]:a).map(ue.fromJson))}}])}(),ue=function(){function t(e,r){Ut(this,t),ee(this,"sequenceNumber",void 0),ee(this,"shardId",void 0),this.sequenceNumber=e,this.shardId=r}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.SequenceNumber,e.ShardId)}}])}(),se=function(){function t(e,r,n){Ut(this,t),ee(this,"nextShardIterator",void 0),ee(this,"records",void 0),ee(this,"millisBehindLatest",void 0),this.nextShardIterator=e,this.records=r,this.millisBehindLatest=n}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.NextShardIterator,n=void 0===r?"":r,o=e.Records,i=void 0===o?[]:o,a=e.MillisBehindLatest,c=void 0===a?0:a;return new t(n,i.map(fe.fromJson),c)}}])}(),fe=function(){function t(e,r,n){Ut(this,t),ee(this,"data",void 0),ee(this,"partitionKey",void 0),ee(this,"sequenceNumber",void 0),this.data=e,this.partitionKey=r,this.sequenceNumber=n}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.Data,e.PartitionKey,e.SequenceNumber)}}])}(),le=function(){function t(e,r){Ut(this,t),ee(this,"shards",void 0),ee(this,"nextToken",void 0),this.shards=e,this.nextToken=r}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.Shards,n=void 0===r?[]:r,o=e.NextToken;return new t(n.map(he.fromJson),o)}}])}(),he=function(){function t(e,r,n,o,i){Ut(this,t),ee(this,"id",void 0),ee(this,"parentShardId",void 0),ee(this,"adjacentParentShardId",void 0),ee(this,"hashKeyRange",void 0),ee(this,"sequenceNumberRange",void 0),this.id=e,this.parentShardId=o,this.adjacentParentShardId=i,this.hashKeyRange=r,this.sequenceNumberRange=n}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.ShardId,e.HashKeyRange,e.SequenceNumberRange,e.ParentShardId,e.AdjacentParentShardId)}}])}(),pe=function(){function t(e){Ut(this,t),ee(this,"shardIterator",void 0),this.shardIterator=e}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.ShardIterator)}}])}();function ye(t){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ye(t)}function de(){de=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==ye(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function ve(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function me(t){for(var e=1;e=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new Ne(i,o.__type,e)}if(1500===n)throw new Ne("An error occured on the server side","InternalServiceError",e)}}}]);var n,i}(c.R),Te=function(t){return t.PutEvents="PutEvents",t}(Te||{}),Ne=function(t){function e(t,r,n){var o;return ge(this,e),Pe(o=je(this,e,[t,r]),"operation",void 0),o.name="EventBridgeServiceError",o.operation=n,o}return xe(e,t),Oe(e)}(u.c),Ce=r(340)})();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})(); +(()=>{var t={2:(t,e,r)=>{"use strict";r.d(e,{R:()=>u});var n=r(556);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r{"use strict";r.d(e,{g:()=>d,r:()=>v});var n=r(556);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e,r){return e=s(e),function(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],s(t).constructor):e.apply(t,r))}function a(t){var e="function"==typeof Map?new Map:void 0;return a=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(c())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&u(o,r.prototype),o}(t,arguments,s(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,t)},a(t)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r128)throw new v("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(e.accessKeyId.length));if(!e.secretAccessKey||""===e.secretAccessKey)throw new v("invalid AWS secret access key; reason: expected a non empty string, got `".concat(e.secretAccessKey,"`"));this.region=e.region,this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,void 0!==e.sessionToken&&(this.sessionToken=e.sessionToken),void 0!==e.endpoint&&("string"==typeof e.endpoint?this.endpoint=new n.y(e.endpoint):this.endpoint=e.endpoint)}return h(t,null,[{key:"fromEnvironment",value:function(e){return new t({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==e?void 0:e.endpoint})}}])}(),v=function(t){function e(t){return f(this,e),i(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(e,t),h(e)}(a(Error))},464:(t,e,r)=>{"use strict";r.d(e,{Kq:()=>o,Qt:()=>u,Qz:()=>w,SN:()=>b,Uv:()=>O,V1:()=>p,VQ:()=>g,Zs:()=>i,_e:()=>j,b2:()=>f,fk:()=>y,he:()=>a,iK:()=>s,ot:()=>l,pj:()=>v,sY:()=>h,ud:()=>d,wN:()=>n,z8:()=>S,zG:()=>c,zX:()=>m});var n="X-Amz-Algorithm",o="X-Amz-Credential",i="X-Amz-Date",a="X-Amz-Expires",c="X-Amz-Signature",u="X-Amz-SignedHeaders",s="X-Amz-Security-Token",f="x-amz-content-sha256",l=i.toLowerCase(),h=c.toLowerCase(),p="X-Amz-Target".toLowerCase(),y=s.toLowerCase(),d="authorization",v=[d,l,"date"],m="host",b={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},g="aws4_request",w="AWS4-HMAC-SHA256",O=604800,j="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",S="UNSIGNED-PAYLOAD"},556:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rs});var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,"_protocol",void 0),c(this,"_hostname",void 0),c(this,"_port",void 0);var r=!e.startsWith("http://")&&!e.startsWith("https://")?"".concat(t.DEFAULT_PROTOCOL,"://").concat(e):e,n=r.match(/^https?:/),i=o(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=n?n[0].slice(0,-1):t.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return e=t,(r=[{key:"copy",value:function(){return new t(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(t){var e=o(t.split(":"),2),r=e[0],n=e[1];this._hostname=r,this._port=n?parseInt(n):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(t){this._hostname=t}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(e){var r=e.match(/^https?:/),n=o(e.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):t.DEFAULT_PROTOCOL,this._hostname=n.split(":")[0],this._port=n.split(":")[1]?parseInt(n.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(t){this._port=t}},{key:"protocol",get:function(){return this._protocol},set:function(t){this._protocol=t}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n}();c(s,"DEFAULT_PROTOCOL","https")},539:(t,e,r)=>{"use strict";r.d(e,{D:()=>m,c:()=>v});var n=r(95);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r{"use strict";function n(t,e){t=t.toLowerCase();for(var r=0,n=Object.keys(e);rn})},639:(t,e,r)=>{"use strict";r.d(e,{B:()=>S,s:()=>_});var n=r(275),o=r.n(n),i=r(464),a=r(539),c=r(21),u=r(680);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(t,e,r){return e=h(e),function(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,l()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(l=function(){return!!t})()}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function y(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{},r=m(m({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),e),n=E(r.signingDate),o=n.longDate,a=n.shortDate,u=r.signingService||this.service,s=r.signingRegion||this.region,f="".concat(a,"/").concat(s,"/").concat(u,"/").concat(i.VQ);t.headers[i.zX]||(t.headers[i.zX]=t.endpoint.hostname);for(var l=0,h=Object.keys(t.headers);l-1&&delete t.headers[p]}t.headers[i.ot]=o,this.credentials.sessionToken&&(t.headers[i.fk]=this.credentials.sessionToken),ArrayBuffer.isView(t.body)&&(t.body=t.body.buffer),t.body||(t.body="");var y=this.computePayloadHash(t);!(0,c.o)(i.b2,t.headers)&&this.applyChecksum&&(t.headers[i.b2]=y);var d=this.computeCanonicalHeaders(t,r.unsignableHeaders,r.signableHeaders),v=this.calculateSignature(o,f,this.deriveSigningKey(this.credentials,u,s,a),this.createCanonicalRequest(t,d,y));t.headers[i.ud]="".concat(i.Qz," ")+"Credential=".concat(this.credentials.accessKeyId,"/").concat(f,", ")+"SignedHeaders=".concat(Object.keys(d).sort().join(";"),", ")+"Signature=".concat(v);var b=t.endpoint.href;return t.path&&(b+=t.path),t.query&&(b+="?".concat(this.serializeQueryParameters(t.query))),m({url:b},t)}},{key:"presign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.signingDate,n=void 0===r?new Date:r,o=e.expiresIn,a=void 0===o?3600:o,c=e.unsignableHeaders,u=e.unhoistableHeaders,s=e.signableHeaders,f=e.signingRegion,l=e.signingService,h=E(n),p=h.longDate,y=h.shortDate,d=f||this.region,v=l||this.service;if(a>i.Uv)throw new _("Signature version 4 presigned URLs can't be valid for more than 7 days");var b="".concat(y,"/").concat(d,"/").concat(v,"/").concat(i.VQ),g=this.moveHeadersToQuery(t,{unhoistableHeaders:u});g.headers[i.zX]||(g.headers[i.zX]=t.endpoint.hostname),this.credentials.sessionToken&&(g.query[i.iK]=this.credentials.sessionToken),g.query[i.wN]=i.Qz,g.query[i.Kq]="".concat(this.credentials.accessKeyId,"/").concat(b),g.query[i.Zs]=p,g.query[i.he]=a.toString(10);var w=this.computeCanonicalHeaders(g,c,s);g.query[i.Qt]=Object.keys(w).sort().join(";");var O=this.deriveSigningKey(this.credentials,v,d,y),j=this.computePayloadHash(t),S=this.createCanonicalRequest(g,w,j);g.query[i.zG]=this.calculateSignature(p,b,O,S);var x=g.endpoint.href;return g.path&&(x+=g.path),g.query&&(x+="?".concat(this.serializeQueryParameters(g.query))),m({url:x},g)}},{key:"createCanonicalRequest",value:function(t,e,r){var n=Object.keys(e).sort(),o=n.map((function(t){return"".concat(t,":").concat(e[t])})).join("\n"),i=n.join(";");return"".concat(t.method,"\n")+"".concat(this.computeCanonicalURI(t),"\n")+"".concat(this.computeCanonicalQuerystring(t),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(t,e,r){var n=o().sha256(r,"hex");return"".concat(i.Qz,"\n")+"".concat(t,"\n")+"".concat(e,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(t,e,r,n){var i=this.createStringToSign(t,e,n);return o().hmac("sha256",r,i,"hex")}},{key:"deriveSigningKey",value:function(t,e,r,n){var i=t.secretAccessKey,a=o().hmac("sha256","AWS4"+i,n,"binary"),c=o().hmac("sha256",a,r,"binary"),u=o().hmac("sha256",c,e,"binary");return o().hmac("sha256",u,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(t){var e=t.path;if(this.uriEscapePath){var r,n=[],o=y(e.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(t){o.e(t)}finally{o.f()}var a=null!=e&&e.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=e&&e.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return e}},{key:"computeCanonicalQuerystring",value:function(t){var e,r=t.query,n=void 0===r?{}:r,o=[],a={},c=function(t){if(t.toLowerCase()===i.sY)return 1;o.push(t);var e=n[t];"string"==typeof e?a[t]="".concat(x(t),"=").concat(x(e)):Array.isArray(e)&&(a[t]=e.slice(0).sort().reduce((function(e,r){return e.concat(["".concat(x(t),"=").concat(x(r))])}),[]).join("&"))},u=y(Object.keys(n).sort());try{for(u.s();!(e=u.n()).done;){c(e.value)}}catch(t){u.e(t)}finally{u.f()}return o.map((function(t){return a[t]})).filter((function(t){return t})).join("&")}},{key:"computeCanonicalHeaders",value:function(t,e,r){var n,o=t.headers,a={},c=y(Object.keys(o).sort());try{for(c.s();!(n=c.n()).done;){var u=n.value;if(null!=o[u]){var s=u.toLowerCase();(s in i.SN||null!=e&&e.has(s))&&(!r||r&&!r.has(s))||"string"==typeof o[u]&&(a[s]=o[u]=o[u].trim().replace(/\s+/g," "))}}}catch(t){c.e(t)}finally{c.f()}return a}},{key:"computePayloadHash",value:function(t){var e=t.headers,r=t.body;return e[i.b2]?e[i.b2]:null==r?i._e:"string"==typeof r||(0,u.m)(r)?o().sha256(r,"hex").toLowerCase():ArrayBuffer.isView(r)?o().sha256(r.buffer,"hex").toLowerCase():i.z8}},{key:"moveHeadersToQuery",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(t)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a{"use strict";function n(t){return"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t))}function o(t){return Object.keys(t).reduce((function(e,r){var n=t[r];return null!=n&&e.push("".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(n))),e}),[]).join("&")}r.d(e,{R:()=>o,m:()=>n})},340:(t,e,r)=>{"use strict";r.d(e,{LambdaClient:()=>P,LambdaInvocationError:()=>k});r(811);var n=r(639),o=r(570),i=r.n(o);const a=require("k6/encoding");var c=r.n(a),u=r(2),s=r(539),f=r(464);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function h(t){var e="function"==typeof Map?new Map:void 0;return h=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(O())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&_(o,r.prototype),o}(t,arguments,j(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_(r,t)},h(t)}function p(){p=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function O(){}var j={};s(j,a,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(A([])));_&&_!==r&&n.call(_,a)&&(j=_);var x=O.prototype=g.prototype=Object.create(j);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,a,c){var u=h(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e2&&void 0!==m[2]?m[2]:{}).invocationType||"RequestResponse",u=d(d({},this.commonHeaders),{},x(x(x({},f.V1,"AWSLambda.".concat(a)),"X-Amz-Invocation-Type",a),"X-Amz-Log-Type",n.logType||"None")),n.clientContext&&(u["X-Amz-Client-Context"]=n.clientContext),n.qualifier&&(o.Qualifier=n.qualifier),s=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/2015-03-31/functions/".concat(e,"/invocations"),query:o,headers:u,body:r||""},{}),t.next=9,i().asyncRequest(this.method,s.url,s.body,{headers:s.headers});case 9:if(l=t.sent,this._handle_error(l),h=l.headers["X-Amz-Log-Result"],y={executedVersion:l.headers["X-Amz-Executed-Version"],logResult:h?c().b64decode(h,"std","s"):void 0,statusCode:l.status,payload:l.body},!(v=l.headers["X-Amz-Function-Error"])){t.next=18;break}throw new k(v,y);case 18:return t.abrupt("return",y);case 19:case"end":return t.stop()}}),t,this)})),o=function(){var t=this,e=arguments;return new Promise((function(n,o){var i=r.apply(t,e);function a(t){v(i,n,o,a,c,"next",t)}function c(t){v(i,n,o,a,c,"throw",t)}a(void 0)}))},function(t,e){return o.apply(this,arguments)})},{key:"_handle_error",value:function(t){var e=t.error_code,r=t.error;if(""!=r||0!==e){if(e<1400||e>=1600)throw new s.D(r,e);var o=s.c.parse(t);switch(o.code){case"AuthorizationHeaderMalformed":case"InvalidSignatureException":throw new n.s(o.message,o.code);default:throw o}}}}]);var r,o}(u.R),k=function(t){function e(t,r){var n;return m(this,e),x(n=w(this,e,["".concat(t,": ").concat(r.payload)]),"response",void 0),n.response=r,n}return S(e,t),g(e)}(h(Error))},535:(t,e,r)=>{"use strict";r.d(e,{SQSClient:()=>k});r(811);var n=r(639),o=r(2),i=r(570),a=r.n(i),c=r(680),u=r(539);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(){f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function O(){}var j={};l(j,a,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(A([])));_&&_!==r&&n.call(_,a)&&(j=_);var x=O.prototype=g.prototype=Object.create(j);function E(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,a,c){var u=p(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==s(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==p[2]?p[2]:{}).messageDeduplicationId&&(o=y(y({},o),{},{MessageDeduplicationId:n.messageDeduplicationId})),void 0!==n.messageGroupId&&(o=y(y({},o),{},{MessageGroupId:n.messageGroupId})),void 0!==n.messageAttributes&&(i=Object.entries(n.messageAttributes).reduce((function(t,e,r){var n=l(e,2),o=n[0],i=n[1],a="Binary"===i.type?"BinaryValue":"StringValue";return Object.assign(t,x(x(x({},"MessageAttribute.".concat(r+1,".Name"),o),"MessageAttribute.".concat(r+1,".Value.").concat(a),i.value),"MessageAttribute.".concat(r+1,".Value.DataType"),i.type))}),{}),o=y(y({},o),i)),void 0!==n.delaySeconds&&(o=y(y({},o),{},{DelaySeconds:n.delaySeconds})),u=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:y({},this.commonHeaders),body:(0,c.R)(o)},{}),t.next=10,a().asyncRequest("POST",u.url,u.body||"",{headers:u.headers});case 10:return s=t.sent,this._handleError("SendMessage",s),h=s.html("SendMessageResponse > SendMessageResult"),t.abrupt("return",new L(h.find("MessageId").text(),h.find("MD5OfMessageBody").text()));case 14:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})},{key:"listQueues",value:(r=v(f().mark((function t(){var e,r,n,o,i,u=arguments;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={Action:"ListQueues",Version:P},void 0!==(null==(e=u.length>0&&void 0!==u[0]?u[0]:{})?void 0:e.maxResults)&&(r=y(y({},r),{},{MaxResults:e.maxResults})),void 0!==(null==e?void 0:e.nextToken)&&(r=y(y({},r),{},{NextToken:e.nextToken})),void 0!==(null==e?void 0:e.queueNamePrefix)&&(r=y(y({},r),{},{QueueNamePrefix:e.queueNamePrefix})),n=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:y(y({},this.commonHeaders),{},{Host:this.endpoint.host}),body:(0,c.R)(r)},{}),t.next=9,a().asyncRequest("POST",n.url,n.body||"",{headers:n.headers});case 9:return o=t.sent,this._handleError("ListQueues",o),i=o.html(),t.abrupt("return",{urls:i.find("QueueUrl").toArray().map((function(t){return t.text()})),nextToken:i.find("NextToken").text()||void 0});case 13:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"_handleError",value:function(t,e){var r=e.error_code;if(""!=e.error||0!==r){var o=u.c.parseXML(e.body);if("AuthorizationHeaderMalformed"===o.code)throw new n.s(o.message,o.code);throw new T(o.message,o.code||"unknown",t)}}}]);var r,o}(o.R),L=g((function t(e,r){m(this,t),x(this,"id",void 0),x(this,"bodyMD5",void 0),this.id=e,this.bodyMD5=r})),T=function(t){function e(t,r,n){var o;return m(this,e),x(o=w(this,e,[t,r]),"operation",void 0),o.name="SQSServiceError",o.operation=n,o}return S(e,t),g(e)}(u.c)},414:(t,e,r)=>{var n=r(33),o=r(550),i=o;i.v1=n,i.v4=o,t.exports=i},471:t=>{for(var e=[],r=0;r<256;++r)e[r]=(r+256).toString(16).substr(1);t.exports=function(t,r){var n=r||0,o=e;return[o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]]].join("")}},814:t=>{var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var r=new Uint8Array(16);t.exports=function(){return e(r),r}}else{var n=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)3&e||(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n}}},33:(t,e,r)=>{var n,o,i=r(814),a=r(471),c=0,u=0;t.exports=function(t,e,r){var s=e&&r||0,f=e||[],l=(t=t||{}).node||n,h=void 0!==t.clockseq?t.clockseq:o;if(null==l||null==h){var p=i();null==l&&(l=n=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==h&&(h=o=16383&(p[6]<<8|p[7]))}var y=void 0!==t.msecs?t.msecs:(new Date).getTime(),d=void 0!==t.nsecs?t.nsecs:u+1,v=y-c+(d-u)/1e4;if(v<0&&void 0===t.clockseq&&(h=h+1&16383),(v<0||y>c)&&void 0===t.nsecs&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=y,u=d,o=h;var m=(1e4*(268435455&(y+=122192928e5))+d)%4294967296;f[s++]=m>>>24&255,f[s++]=m>>>16&255,f[s++]=m>>>8&255,f[s++]=255&m;var b=y/4294967296*1e4&268435455;f[s++]=b>>>8&255,f[s++]=255&b,f[s++]=b>>>24&15|16,f[s++]=b>>>16&255,f[s++]=h>>>8|128,f[s++]=255&h;for(var g=0;g<6;++g)f[s+g]=l[g];return e||a(f)}},550:(t,e,r)=>{var n=r(814),o=r(471);t.exports=function(t,e,r){var i=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var a=(t=t||{}).random||(t.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e)for(var c=0;c<16;++c)e[i+c]=a[c];return e||o(a)}},275:t=>{"use strict";t.exports=require("k6/crypto")},95:t=>{"use strict";t.exports=require("k6/html")},570:t=>{"use strict";t.exports=require("k6/http")}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{AMZ_CONTENT_SHA256_HEADER:()=>o.b2,AWSConfig:()=>e.g,AWSError:()=>u.c,EventBridgeClient:()=>Le,InvalidAWSConfigError:()=>e.r,InvalidSignatureError:()=>t.s,KMSClient:()=>x,KMSDataKey:()=>P,KMSServiceError:()=>k,KinesisClient:()=>ne,LambdaClient:()=>Ce.LambdaClient,LambdaInvocationError:()=>Ce.LambdaInvocationError,NetworkError:()=>u.D,S3Bucket:()=>W,S3Client:()=>Q,S3Object:()=>X,S3ServiceError:()=>$,SQSClient:()=>qt.SQSClient,Secret:()=>bt,SecretsManagerClient:()=>mt,SecretsManagerServiceError:()=>gt,SignatureV4:()=>t.B,SystemsManagerClient:()=>It,SystemsManagerParameter:()=>Mt,SystemsManagerServiceError:()=>Gt,UNSIGNED_PAYLOAD:()=>o.z8});var t=r(639),e=r(811),o=r(464),i=r(570),a=r.n(i),c=r(2),u=r(539);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(){f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function O(){}var j={};l(j,a,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(A([])));_&&_!==r&&n.call(_,a)&&(j=_);var x=O.prototype=g.prototype=Object.create(j);function E(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,a,c){var u=p(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==s(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e1&&void 0!==c[1]?c[1]:T.Size256,n=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/",headers:h(h({},this.commonHeaders),{},S({},o.V1,"TrentService.GenerateDataKey")),body:JSON.stringify({KeyId:e,NumberOfBytes:r})},{}),t.next=4,a().asyncRequest(this.method,n.url,n.body,{headers:n.headers});case 4:return i=t.sent,this._handle_error(L.GenerateDataKey,i),t.abrupt("return",P.fromJSON(i.json()));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.error_code;if(0!==n){var o=r.json();if(n>=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new k(i,o.__type,e)}if(1500===n)throw new k("An error occured on the server side","InternalServiceError",e)}}}]);var n,i}(c.R),E=function(){function t(e,r){d(this,t),S(this,"keyArn",void 0),S(this,"keyId",void 0),this.keyArn=e,this.keyId=r}return m(t,null,[{key:"fromJSON",value:function(e){return new t(e.KeyArn,e.KeyId)}}])}(),P=function(){function t(e,r,n){d(this,t),S(this,"id",void 0),S(this,"ciphertextBlob",void 0),S(this,"plaintext",void 0),this.ciphertextBlob=e,this.id=r,this.plaintext=n}return m(t,null,[{key:"fromJSON",value:function(e){return new t(e.CiphertextBlob,e.KeyId,e.Plaintext)}}])}(),k=function(t){function e(t,r,n){var o;return d(this,e),S(o=b(this,e,[t,r]),"operation",void 0),o.name="KMSServiceError",o.operation=n,o}return O(e,t),m(e)}(u.c),L=function(t){return t.GenerateDataKey="GenerateDataKey",t.ListKeys="ListKeys",t}(L||{}),T=function(t){return t[t.Size256=32]="Size256",t[t.Size512=64]="Size512",t}(T||{}),N=r(95);function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}function A(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function R(t){for(var e=1;e=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function I(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function M(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){I(i,n,o,a,c,"next",t)}function c(t){I(i,n,o,a,c,"throw",t)}a(void 0)}))}}function G(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function K(t,e){for(var r=0;r".concat(t.partNumber,"").concat(t.eTag,"")})).join(""),""),(u=this.endpoint.copy()).hostname="".concat(e,".").concat(this.endpoint.hostname),s=this.signature.sign({method:i,endpoint:u,path:"/".concat(r),headers:{},body:c,query:{uploadId:"".concat(n)}},{}),t.next=7,a().asyncRequest(i,s.url,s.body||null,{headers:s.headers});case 7:f=t.sent,this._handle_error("CompleteMultipartUpload",f);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return o.apply(this,arguments)})},{key:"abortMultipartUpload",value:(n=M(D().mark((function t(e,r,n){var o,i,c,u;return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o="DELETE",(i=this.endpoint.copy()).hostname="".concat(e,".").concat(this.endpoint.hostname),c=this.signature.sign({method:o,endpoint:i,path:"/".concat(r),headers:{},query:{uploadId:"".concat(n)}},{}),t.next=6,a().asyncRequest(o,c.url,c.body||null,{headers:c.headers});case 6:u=t.sent,this._handle_error("AbortMultipartUpload",u);case 8:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return n.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.status,o=r.error_code,i=r.error;if(!(n>=200&&n<300&&""==i&&0===o)){if(301==n||i&&i.startsWith("301"))throw new $("Resource not found","ResourceNotFound",e);var a=u.c.parseXML(r.body);if("AuthorizationHeaderMalformed"===a.code)throw new t.s(a.message,a.code);throw new $(a.message,a.code||"unknown",e)}}}]);var n,o,i,c,s,f,l,h,p,y}(c.R),W=q((function t(e,r){G(this,t),J(this,"name",void 0),J(this,"creationDate",void 0),this.name=e,this.creationDate=r})),X=q((function t(e,r,n,o,i,a){G(this,t),J(this,"key",void 0),J(this,"lastModified",void 0),J(this,"etag",void 0),J(this,"size",void 0),J(this,"storageClass",void 0),J(this,"data",void 0),this.key=e,this.lastModified=r,this.etag=n,this.size=o,this.storageClass=i,this.data=a})),Y=q((function t(e,r){G(this,t),J(this,"key",void 0),J(this,"uploadId",void 0),this.key=e,this.uploadId=r})),Z=q((function t(e,r){G(this,t),J(this,"partNumber",void 0),J(this,"eTag",void 0),this.partNumber=e,this.eTag=r})),$=function(t){function e(t,r,n){var o;return G(this,e),J(o=H(this,e,[t,r]),"operation",void 0),o.name="S3ServiceError",o.operation=n,o}return F(e,t),q(e)}(u.c),tt=r(414);function et(t){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function rt(){rt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==et(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ot(t){for(var e=1;e=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new gt(i,o.__type,e)}if(1500===n)throw new gt("An error occured on the server side","InternalServiceError",e)}}}]);var n,i,c,u,s}(c.R),bt=function(){function t(e,r,n,o,i,a){var c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[];ct(this,t),dt(this,"name",void 0),dt(this,"arn",void 0),dt(this,"secret",void 0),dt(this,"createdDate",void 0),dt(this,"lastAccessedDate",void 0),dt(this,"lastChangedDate",void 0),dt(this,"tags",void 0),this.name=e,this.arn=r,this.secret=n,this.createdDate=o,this.lastAccessedDate=i,this.lastChangedDate=a,this.tags=c}return st(t,null,[{key:"fromJSON",value:function(e){return new t(e.Name,e.ARN,e.SecretString,e.CreatedDate,e.LastAccessedDate,e.LastChangedDate,e.Tags)}}])}(),gt=function(t){function e(t,r,n){var o;return ct(this,e),dt(o=ft(this,e,[t,r]),"operation",void 0),o.name="SecretsManagerServiceError",o.operation=n,o}return pt(e,t),st(e)}(u.c),wt=function(t){return t.ListSecrets="ListSecrets",t.GetSecretValue="GetSecretValue",t.CreateSecret="CreateSecret",t.PutSecretValue="PutSecretValue",t.DeleteSecret="DeleteSecret",t}(wt||{});function Ot(t){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ot(t)}function jt(){jt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Ot(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function St(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _t(t){for(var e=1;e1&&void 0!==c[1]&&c[1],n=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/",headers:_t(_t({},this.commonHeaders),{},Rt({},o.V1,"AmazonSSM.GetParameter")),body:JSON.stringify({Name:e,WithDecryption:r})},{}),t.next=4,a().asyncRequest(this.method,n.url,n.body,{headers:n.headers});case 4:return i=t.sent,this._handle_error(Kt.GetParameter,i),t.abrupt("return",Mt.fromJSON(i.json()));case 7:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){xt(i,r,o,a,c,"next",t)}function c(t){xt(i,r,o,a,c,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.error_code;if(0!==n){var o=r.json();if(n>=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new Gt(i,o.__type,e)}if(1500===n)throw new Gt("An error occured on the server side","InternalServiceError",e)}}}]);var n,i}(c.R),Mt=function(){function t(e,r,n,o,i,a,c,u,s){Et(this,t),Rt(this,"arn",void 0),Rt(this,"dataType",void 0),Rt(this,"lastModifiedDate",void 0),Rt(this,"name",void 0),Rt(this,"selector",void 0),Rt(this,"sourceResult",void 0),Rt(this,"type",void 0),Rt(this,"value",void 0),Rt(this,"version",void 0),this.arn=e,this.dataType=r,this.lastModifiedDate=n,this.name=o,this.selector=i,this.sourceResult=a,this.type=c,this.value=u,this.version=s}return kt(t,null,[{key:"fromJSON",value:function(e){var r=e.Parameter;return new t(r.ARN,r.DataType,r.LastModifiedDate,r.Name,r.Selector,r.SourceResult,r.Type,r.Value,r.Version)}}])}(),Gt=function(t){function e(t,r,n){var o;return Et(this,e),Rt(o=Lt(this,e,[t,r]),"operation",void 0),o.name="SystemsManagerServiceError",o.operation=n,o}return Ct(e,t),kt(e)}(u.c),Kt=function(t){return t.GetParameter="GetParameter",t}(Kt||{}),qt=r(535);function Ht(t){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(t)}function zt(){zt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Ht(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function Bt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ft(t){for(var e=1;e1&&void 0!==o[1]?o[1]:{}).shardCount&&{ShardCount:r.shardCount}),r.streamModeDetails&&{StreamMode:r.streamModeDetails.streamMode}),t.next=4,this._send_request("CreateStream",n);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"deleteStream",value:(l=Jt(zt().mark((function t(e){var r,n,o=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Ft(Ft({StreamName:e},(r=o.length>1&&void 0!==o[1]?o[1]:{}).streamARN&&{StreamARN:r.streamARN}),r.enforceConsumerDeletion&&{EnforceConsumerDeletion:r.enforceConsumerDeletion}),t.next=4,this._send_request("DeleteStream",n);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"listStreams",value:(f=Jt(zt().mark((function t(){var e,r,n,o=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Ft(Ft(Ft({},(e=o.length>0&&void 0!==o[0]?o[0]:{}).exclusiveStartStreamName&&{ExclusiveStartStreamName:e.exclusiveStartStreamName}),e.limit&&{Limit:e.limit}),e.nextToken&&{NextToken:e.nextToken}),t.next=4,this._send_request("ListStreams",r);case 4:return n=t.sent,t.abrupt("return",ie.fromJson(null==n?void 0:n.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"putRecords",value:(s=Jt(zt().mark((function t(e){var r,n,o,i=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=i.length>1&&void 0!==i[1]?i[1]:{}).streamName||r.streamARN){t.next=3;break}throw new Error("Either streamName or streamARN must be provided");case 3:return n=Ft(Ft({Records:e},r.streamName&&{StreamName:r.streamName}),r.streamARN&&{StreamARN:r.streamARN}),t.next=6,this._send_request("PutRecords",n);case 6:return o=t.sent,t.abrupt("return",ce.fromJson(null==o?void 0:o.json()));case 8:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"getRecords",value:(u=Jt(zt().mark((function t(e){var r,n,o,i=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Ft(Ft({ShardIterator:e},(r=i.length>1&&void 0!==i[1]?i[1]:{}).limit&&{Limit:r.limit}),r.streamARN&&{StreamARN:r.streamARN}),t.next=4,this._send_request("GetRecords",n);case 4:return o=t.sent,t.abrupt("return",se.fromJson(null==o?void 0:o.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"listShards",value:(c=Jt(zt().mark((function t(e){var r,n,o,i=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Ft(Ft({StreamName:e},(r=i.length>1&&void 0!==i[1]?i[1]:{}).nextToken&&{NextToken:r.nextToken}),r.maxResults&&{MaxResults:r.maxResults}),t.next=4,this._send_request("ListShards",n);case 4:return o=t.sent,t.abrupt("return",le.fromJson(null==o?void 0:o.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"getShardIterator",value:(i=Jt(zt().mark((function t(e,r,n){var o,i,a,c=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=Ft(Ft({StreamName:e,ShardId:r,ShardIteratorType:n},(o=c.length>3&&void 0!==c[3]?c[3]:{}).startingSequenceNumber&&{StartingSequenceNumber:o.startingSequenceNumber}),o.timestamp&&{Timestamp:o.timestamp}),t.next=4,this._send_request("GetShardIterator",i);case 4:return a=t.sent,t.abrupt("return",pe.fromJson(null==a?void 0:a.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return i.apply(this,arguments)})},{key:"_send_request",value:(n=Jt(zt().mark((function t(e,r){var n,i;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:Ft(Ft({},this.commonHeaders),{},ee({},o.V1,"".concat(this.serviceVersion,".").concat(e))),body:JSON.stringify(r)},{}),t.next=3,a().asyncRequest("POST",n.url,n.body,{headers:n.headers});case 3:return i=t.sent,this._handle_error(e,i),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.error_code;if(0!==n){var o=r.json();if(n>=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new oe(i,o.__type,e)}if(1500===n)throw new oe("An error occured on the server side","InternalServiceError",e)}}}]);var n,i,c,u,s,f,l,h}(c.R),oe=function(t){function e(t,r,n){var o;return Ut(this,e),ee(o=Xt(this,e,[t,r]),"operation",void 0),o.name="KinesisServiceError",o.operation=n,o}return $t(e,t),Wt(e)}(u.c),ie=function(){function t(e,r,n,o){Ut(this,t),ee(this,"hasMoreStreams",void 0),ee(this,"nextToken",void 0),ee(this,"streamNames",void 0),ee(this,"streamSummaries",void 0),this.hasMoreStreams=e,this.nextToken=r,this.streamNames=n,this.streamSummaries=o}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.HasMoreStreams,n=void 0!==r&&r,o=e.NextToken,i=void 0===o?"":o,a=e.StreamNames,c=void 0===a?[]:a,u=e.StreamSummaries,s=void 0===u?[]:u;return new t(n,i,c,null==s?void 0:s.map(ae.fromJson))}}])}(),ae=function(){function t(e,r,n,o,i){Ut(this,t),ee(this,"streamARN",void 0),ee(this,"streamCreationTimestamp",void 0),ee(this,"streamModeDetails",void 0),ee(this,"streamName",void 0),ee(this,"streamStatus",void 0),this.streamARN=e,this.streamCreationTimestamp=r,this.streamModeDetails=n,this.streamName=o,this.streamStatus=i}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.StreamARN,n=void 0===r?"":r,o=e.StreamCreationTimestamp,i=void 0===o?0:o,a=e.StreamModeDetails,c=void 0===a?{}:a,u=e.StreamName,s=void 0===u?"":u,f=e.StreamStatus;return new t(n,i,c,s,void 0===f?"":f)}}])}(),ce=function(){function t(e,r,n){Ut(this,t),ee(this,"encryptionType",void 0),ee(this,"failedRecordCount",void 0),ee(this,"records",void 0),this.encryptionType=e,this.failedRecordCount=r,this.records=n}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.EncryptionType,n=void 0===r?"NONE":r,o=e.FailedRecordCount,i=void 0===o?0:o,a=e.Records;return new t(n,i,(void 0===a?[]:a).map(ue.fromJson))}}])}(),ue=function(){function t(e,r){Ut(this,t),ee(this,"sequenceNumber",void 0),ee(this,"shardId",void 0),this.sequenceNumber=e,this.shardId=r}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.SequenceNumber,e.ShardId)}}])}(),se=function(){function t(e,r,n){Ut(this,t),ee(this,"nextShardIterator",void 0),ee(this,"records",void 0),ee(this,"millisBehindLatest",void 0),this.nextShardIterator=e,this.records=r,this.millisBehindLatest=n}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.NextShardIterator,n=void 0===r?"":r,o=e.Records,i=void 0===o?[]:o,a=e.MillisBehindLatest,c=void 0===a?0:a;return new t(n,i.map(fe.fromJson),c)}}])}(),fe=function(){function t(e,r,n){Ut(this,t),ee(this,"data",void 0),ee(this,"partitionKey",void 0),ee(this,"sequenceNumber",void 0),this.data=e,this.partitionKey=r,this.sequenceNumber=n}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.Data,e.PartitionKey,e.SequenceNumber)}}])}(),le=function(){function t(e,r){Ut(this,t),ee(this,"shards",void 0),ee(this,"nextToken",void 0),this.shards=e,this.nextToken=r}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.Shards,n=void 0===r?[]:r,o=e.NextToken;return new t(n.map(he.fromJson),o)}}])}(),he=function(){function t(e,r,n,o,i){Ut(this,t),ee(this,"id",void 0),ee(this,"parentShardId",void 0),ee(this,"adjacentParentShardId",void 0),ee(this,"hashKeyRange",void 0),ee(this,"sequenceNumberRange",void 0),this.id=e,this.parentShardId=o,this.adjacentParentShardId=i,this.hashKeyRange=r,this.sequenceNumberRange=n}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.ShardId,e.HashKeyRange,e.SequenceNumberRange,e.ParentShardId,e.AdjacentParentShardId)}}])}(),pe=function(){function t(e){Ut(this,t),ee(this,"shardIterator",void 0),this.shardIterator=e}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.ShardIterator)}}])}();function ye(t){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ye(t)}function de(){de=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==ye(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function ve(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function me(t){for(var e=1;e=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new Ne(i,o.__type,e)}if(1500===n)throw new Ne("An error occured on the server side","InternalServiceError",e)}}}]);var n,i}(c.R),Te=function(t){return t.PutEvents="PutEvents",t}(Te||{}),Ne=function(t){function e(t,r,n){var o;return ge(this,e),Pe(o=je(this,e,[t,r]),"operation",void 0),o.name="EventBridgeServiceError",o.operation=n,o}return xe(e,t),Oe(e)}(u.c),Ce=r(340)})();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})(); //# sourceMappingURL=aws.js.map \ No newline at end of file diff --git a/dist/aws.js.map b/dist/aws.js.map index a6386ce..ee77dc7 100644 --- a/dist/aws.js.map +++ b/dist/aws.js.map @@ -1 +1 @@ -{"version":3,"file":"aws.js","mappings":";u4BAWO,IAAMA,EAAS,WAsBlB,SAXA,SAAAA,EAAYC,EAAsBC,gGAAqBC,CAAA,KAAAH,GAAAI,EAAA,yBAAAA,EAAA,2BAAAA,EAAA,yBACnDC,KAAKJ,UAAYA,EACjBI,KAAKH,YAAcA,EAIOI,MAAtBL,EAAUM,WACVF,KAAKG,UAAYP,EAAUM,SAEnC,KAEA,EAAAE,IAAA,WAAAC,IASA,WAMI,OALsBJ,MAAlBD,KAAKG,YACLH,KAAKG,UAAY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CqxB,GAAoB,SAApBA,GAAoB,OAApBA,EAAoB,sBAApBA,CAAoB,EAApBA,IAAoB,IAoCZG,GAAuB,SAAAhjB,GAUhC,SAAAgjB,EAAY1vB,EAAiByD,EAAc2W,GAAiC,IAAAlD,EAG9C,OAH8C7Y,GAAA,KAAAqxB,GACpDpxB,GAApB4Y,EAAAjX,GAAA,KAAAyvB,EAAA,CAAM1vB,EAASyD,IAAK,oBACpByT,EAAKvT,KAAO,0BACZuT,EAAKkD,UAAYA,EAASlD,CAC9B,CAAC,OAAAhX,GAAAwvB,EAAAhjB,GAAAlN,GAAAkwB,EAAA,CAd+B,CAASlsB,EAAAA","sources":["webpack://k6-jslib-aws/./src/internal/client.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/encoding\"","webpack://k6-jslib-aws/./src/internal/lambda.ts","webpack://k6-jslib-aws/./src/internal/sqs.ts","webpack://k6-jslib-aws/./node_modules/uuid/index.js","webpack://k6-jslib-aws/./node_modules/uuid/lib/bytesToUuid.js","webpack://k6-jslib-aws/./node_modules/uuid/lib/rng-browser.js","webpack://k6-jslib-aws/./node_modules/uuid/v1.js","webpack://k6-jslib-aws/./node_modules/uuid/v4.js","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/kms.ts","webpack://k6-jslib-aws/./src/internal/s3.ts","webpack://k6-jslib-aws/./src/internal/secrets-manager.ts","webpack://k6-jslib-aws/./src/internal/ssm.ts","webpack://k6-jslib-aws/./src/internal/kinesis.ts","webpack://k6-jslib-aws/./src/internal/event-bridge.ts"],"sourcesContent":["import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/encoding\");","import http, { RefinedResponse, ResponseType } from 'k6/http'\nimport encoding from 'k6/encoding'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { HTTPHeaders, HTTPMethod, QueryParameterBag } from './http'\n\n/**\n * Class allowing to interact with Amazon AWS's Lambda service\n */\nexport class LambdaClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n private readonly method: HTTPMethod\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'lambda')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Invoke an AWS Lambda function\n *\n * @param {string} name - The name of the function\n * @param {string} payload - The payload to send to function\n * @param {InvocationOptions} options - Additional options to customize invocation\n *\n * @throws {LambdaInvocationError}\n */\n async invoke(\n name: string,\n payload: string,\n options: InvocationOptions = {}\n ): Promise {\n const query: QueryParameterBag = {}\n const invocationType = options.invocationType || 'RequestResponse'\n const headers = {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AWSLambda.${invocationType}`,\n 'X-Amz-Invocation-Type': invocationType,\n 'X-Amz-Log-Type': options.logType || 'None',\n }\n if (options.clientContext) {\n headers['X-Amz-Client-Context'] = options.clientContext\n }\n if (options.qualifier) {\n query['Qualifier'] = options.qualifier\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: `/2015-03-31/functions/${name}/invocations`,\n query,\n headers,\n body: payload || '',\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(res)\n\n const logResult = res.headers['X-Amz-Log-Result']\n const response = {\n executedVersion: res.headers['X-Amz-Executed-Version'],\n logResult: logResult ? encoding.b64decode(logResult, 'std', 's') : undefined,\n statusCode: res.status,\n payload: res.body as string,\n }\n\n const functionError = res.headers['X-Amz-Function-Error']\n if (functionError) {\n throw new LambdaInvocationError(functionError, response)\n } else {\n return response\n }\n }\n\n private _handle_error(response: RefinedResponse) {\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n if (errorMessage == '' && errorCode === 0) {\n return\n }\n\n const awsError = AWSError.parse(response)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n case 'InvalidSignatureException':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw awsError\n }\n }\n}\n\nexport class LambdaInvocationError extends Error {\n response: InvocationResponse\n\n constructor(message: string, response: InvocationResponse) {\n super(`${message}: ${response.payload}`)\n this.response = response\n }\n}\n\ninterface InvocationOptions {\n /**\n * Defines whether the function is invoked synchronously or asynchronously.\n * - `RequestResponse` (default): Invoke the function synchronously.\n * - `Event`: Invoke the function asynchronously.\n * - `DryRun`: Validate parameter values and verify that the user or role has permission to invoke the function.\n */\n invocationType?: 'RequestResponse' | 'Event' | 'DryRun'\n /**\n * Set to `Tail` to include the execution log in the response. Applies to synchronously invoked functions only.\n */\n logType?: 'None' | 'Tail'\n /**\n * Up to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object.\n */\n clientContext?: string\n /**\n * Specify a version or alias to invoke a published version of the function.\n */\n qualifier?: string\n}\n\ninterface InvocationResponse {\n statusCode: number\n executedVersion?: string\n logResult?: string\n payload?: string\n}\n","import { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { HTTPHeaders, SignedHTTPRequest } from './http'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\nimport { toFormUrlEncoded } from './utils'\nimport { AWSError } from './error'\n\nconst API_VERSION = '2012-11-05'\n\nexport class SQSClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'sqs')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: true,\n })\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-www-form-urlencoded',\n }\n }\n\n /**\n * Delivers a message to the specified queue.\n *\n * @param {string} queueUrl - The URL of the Amazon SQS queue to which a message is sent. Queue URLs and names are case-sensitive.\n * @param {string} messageBody - The message to send. The minimum size is one character. The maximum size is 256 KB.\n * @param {Object} options - Options for the request\n * @param {string} [options.messageDeduplicationId] - The message deduplication id.\n * @param {string} [options.messageGroupId] - The message group ID for FIFO queues\n * @returns {Message} - The message that was sent.\n */\n async sendMessage(\n queueUrl: string,\n messageBody: string,\n options: SendMessageOptions = {}\n ): Promise {\n const method = 'POST'\n\n let body: object = {\n Action: 'SendMessage',\n Version: API_VERSION,\n QueueUrl: queueUrl,\n MessageBody: messageBody,\n }\n\n if (typeof options.messageDeduplicationId !== 'undefined') {\n body = { ...body, MessageDeduplicationId: options.messageDeduplicationId }\n }\n\n if (typeof options.messageGroupId !== 'undefined') {\n body = { ...body, MessageGroupId: options.messageGroupId }\n }\n\n if (typeof options.messageAttributes !== 'undefined') {\n /*\n * A single message attribute is represented as 3 separate parameters: name, value, and type.\n * The name of the value parameter varies based on the data type.\n * See https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html#SQS-SendMessage-request-MessageAttributes\n * for more information.\n */\n const attributeParameters = Object.entries(options.messageAttributes).reduce(\n (params, [name, attribute], i) => {\n const valueParameterSuffix =\n attribute.type === 'Binary' ? 'BinaryValue' : 'StringValue'\n return Object.assign(params, {\n [`MessageAttribute.${i + 1}.Name`]: name,\n [`MessageAttribute.${i + 1}.Value.${valueParameterSuffix}`]:\n attribute.value,\n [`MessageAttribute.${i + 1}.Value.DataType`]: attribute.type,\n })\n },\n {} as Record\n )\n body = { ...body, ...attributeParameters }\n }\n\n if (typeof options.delaySeconds !== 'undefined') {\n body = { ...body, DelaySeconds: options.delaySeconds }\n }\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n },\n body: toFormUrlEncoded(body),\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {\n headers: signedRequest.headers,\n })\n this._handleError('SendMessage', res)\n\n const parsed = res.html('SendMessageResponse > SendMessageResult')\n return new Message(parsed.find('MessageId').text(), parsed.find('MD5OfMessageBody').text())\n }\n\n /**\n * Returns a list of your queues in the current region.\n *\n * @param {ListQueuesRequestParameters} [parameters={}] request parameters\n * @param {number} [ListQueuesRequestParameters.maxResults] Maximum number of results to include in the response. Value range is 1 to 1000. You must set maxResults to receive a value for nextToken in the response.\n * @param {string} [ListQueuesRequestParameters.nextToken] Pagination token to request the next set of results.\n * @param {string} [ListQueuesRequestParameters.queueNamePrefix] A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned.\n * @returns {Object}\n * @returns {string[]} Object.queueUrls - A list of queue URLs, up to 1000 entries.\n * @returns {string} [Object.nextToken] - In the future, you can use NextToken to request the next set of results.\n */\n async listQueues(parameters: ListQueuesRequestParameters = {}): Promise {\n const method = 'POST'\n\n let body: object = {\n Action: 'ListQueues',\n Version: API_VERSION,\n }\n\n if (typeof parameters?.maxResults !== 'undefined') {\n body = { ...body, MaxResults: parameters.maxResults }\n }\n\n if (typeof parameters?.nextToken !== 'undefined') {\n body = { ...body, NextToken: parameters.nextToken }\n }\n\n if (typeof parameters?.queueNamePrefix !== 'undefined') {\n body = { ...body, QueueNamePrefix: parameters.queueNamePrefix }\n }\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n Host: this.endpoint.host,\n },\n body: toFormUrlEncoded(body),\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {\n headers: signedRequest.headers,\n })\n this._handleError('ListQueues', res)\n\n const parsed = res.html()\n return {\n urls: parsed\n .find('QueueUrl')\n .toArray()\n .map((e) => e.text()),\n nextToken: parsed.find('NextToken').text() || undefined,\n }\n }\n\n private _handleError(\n operation: SQSOperation,\n response: RefinedResponse\n ) {\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n if (errorMessage == '' && errorCode === 0) {\n return\n }\n\n const awsError = AWSError.parseXML(response.body as string)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw new SQSServiceError(awsError.message, awsError.code || 'unknown', operation)\n }\n }\n}\n\n/**\n * An Amazon SQS message.\n */\nexport class Message {\n /**\n * A unique identifier for the message.\n * A MessageIdis considered unique across all AWS accounts for an extended period of time.\n */\n id: string\n\n /**\n * An MD5 digest of the non-URL-encoded message body string.\n */\n bodyMD5: string\n\n /**\n * Instantiates a new Message object.\n *\n * @param id\n * @param md5Ofbody\n */\n constructor(id: string, bodyMD5: string) {\n this.id = id\n this.bodyMD5 = bodyMD5\n }\n}\n\n/**\n * SQSServiceError indicates an error occurred while interacting with the SQS API.\n */\nexport class SQSServiceError extends AWSError {\n operation: SQSOperation\n\n constructor(message: string, code: string, operation: SQSOperation) {\n super(message, code)\n this.name = 'SQSServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SQSOperation describes possible SQS operations.\n */\ntype SQSOperation = 'ListQueues' | 'SendMessage'\n\nexport interface SendMessageOptions {\n /**\n * The message deduplication ID for FIFO queues\n */\n messageDeduplicationId?: string\n\n /**\n * The message group ID for FIFO queues\n */\n messageGroupId?: string\n\n /**\n * The message attributes\n */\n messageAttributes?: {\n [name: string]: { type: 'String' | 'Number' | 'Binary'; value: string }\n }\n\n /**\n * The length of time, in seconds, for which to delay a specific message.\n */\n delaySeconds?: number\n}\n\nexport interface ListQueuesRequestParameters {\n /**\n * Maximum number of results to include in the response. Value range is 1 to 1000.\n */\n maxResults?: number\n /**\n * Pagination token to request the next set of results.\n */\n nextToken?: string\n /**\n * A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned.\n * Queue URLs and names are case-sensitive.\n */\n queueNamePrefix?: string\n}\n\nexport interface ListQueuesResponse {\n /**\n * A list of queue URLs, up to 1,000 entries, or the value of MaxResults you sent in the request.\n */\n urls: string[]\n /**\n * Pagination token to include in the next request.\n */\n nextToken?: string\n}\n","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","module.exports = require(\"k6/crypto\");","module.exports = require(\"k6/html\");","module.exports = require(\"k6/http\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { JSONArray, JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's KMS service\n */\nexport class KMSClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a KMSClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'kms')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: awsConfig.region,\n credentials: {\n accessKeyId: awsConfig.accessKeyId,\n secretAccessKey: awsConfig.secretAccessKey,\n sessionToken: awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n // All interactions with the KMS service\n // are made via the GET or POST method.\n this.method = 'POST'\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Gets a list of all the KMS keys in the caller's AWS\n * account and region.\n *\n * @returns an array of all the available keys\n */\n async listKeys(): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n // For some reason, the base target is not kms...\n [AMZ_TARGET_HEADER]: `TrentService.ListKeys`,\n },\n body: JSON.stringify({}),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(KMSOperation.ListKeys, res)\n\n const json: JSONArray = res.json('Keys') as JSONArray\n return json.map((k) => KMSKey.fromJSON(k as JSONObject))\n }\n\n /**\n * GenerateDataKey returns a unique symmetric data key for use outside of AWS KMS.\n *\n * This operation returns a plaintext copy of the data key and a copy that is encrypted under a symmetric encryption KMS key that you specify.\n * The bytes in the plaintext key are random; they are not related to the caller or the KMS key.\n * You can use the plaintext key to encrypt your data outside of AWS KMS and store the encrypted data key with the encrypted data.\n *\n * To generate a data key, specify the symmetric encryption KMS key that will be used to encrypt the data key.\n * You cannot use an asymmetric KMS key to encrypt data keys.\n *\n * Used to generate data key with the KMS key defined\n * @param {string} id - Specifies the symmetric encryption KMS key that encrypts the data key. Use its key ID, key ARN, alias name, or alias ARN.\n * @param {KMKeySize} size - Specifies the length of the data key in bytes. For example, use the value 64 to generate a 512-bit data key (64 bytes is 512 bits). Default is 32, and generates a 256-bit data key.\n * @throws {KMSServiceError}\n * @throws {InvalidSignatureError}\n * @returns {KMSDataKey} - The generated data key.\n */\n async generateDataKey(\n id: string,\n size: KMSKeySize = KMSKeySize.Size256\n ): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n // For some reason, the base target is not kms...\n [AMZ_TARGET_HEADER]: `TrentService.GenerateDataKey`,\n },\n body: JSON.stringify({ KeyId: id, NumberOfBytes: size }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(KMSOperation.GenerateDataKey, res)\n\n return KMSDataKey.fromJSON(res.json() as JSONObject)\n }\n\n _handle_error(operation: KMSOperation, response: RefinedResponse) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new KMSServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new KMSServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/**\n * Class representing a KMS key\n */\nexport class KMSKey {\n /**\n * ARN of the key\n */\n keyArn: string\n\n /**\n * Unique identifier of the key\n */\n keyId: string\n\n constructor(keyArn: string, KeyId: string) {\n this.keyArn = keyArn\n this.keyId = KeyId\n }\n\n static fromJSON(json: JSONObject) {\n return new KMSKey(json.KeyArn as string, json.KeyId as string)\n }\n}\n\n/**\n * Class representing a data key\n */\nexport class KMSDataKey {\n /**\n * The Amazon Resource Name (key ARN) of the KMS key that encrypted the data key.\n */\n id: string\n\n /**\n * The (base64-encoded) encrypted copy of the data key.\n */\n ciphertextBlob: string\n\n /**\n * The plaintext data key.\n * Use this data key to encrypt your data outside of KMS. Then, remove it from memory as soon as possible.\n */\n plaintext: string\n\n constructor(CiphertextBlob: string, KeyId: string, Plaintext: string) {\n this.ciphertextBlob = CiphertextBlob\n this.id = KeyId\n this.plaintext = Plaintext\n }\n\n static fromJSON(json: JSONObject) {\n return new KMSDataKey(\n json.CiphertextBlob as string,\n json.KeyId as string,\n json.Plaintext as string\n )\n }\n}\n\nexport class KMSServiceError extends AWSError {\n operation: KMSOperation\n\n /**\n * Constructs a KMSServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: KMSOperation) {\n super(message, code)\n this.name = 'KMSServiceError'\n this.operation = operation\n }\n}\n\n/**\n * KMSOperation defines all currently implemented KMS Service operations.\n */\nenum KMSOperation {\n GenerateDataKey = 'GenerateDataKey',\n ListKeys = 'ListKeys',\n}\n\n/**\n * KMSKeyLength describes possible key lenght values for KMS API data key operations.\n */\nenum KMSKeySize {\n Size256 = 32,\n Size512 = 64,\n}\n","import { bytes } from 'k6'\nimport { parseHTML } from 'k6/html'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { SignedHTTPRequest } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/** Class allowing to interact with Amazon AWS's S3 service */\nexport class S3Client extends AWSClient {\n private readonly signature: SignatureV4\n\n /**\n * Create a S3Client\n *\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 's3')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: false,\n applyChecksum: true,\n })\n }\n\n /**\n * Returns a list of all buckets owned by the authenticated sender of the request.\n * To use this operation, you must have the s3:ListAllMyBuckets permission.\n *\n * @return {Array.} buckets - An array of objects describing S3 buckets\n * with the following fields: name, and creationDate.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async listBuckets(): Promise> {\n const method = 'GET'\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'GET',\n endpoint: this.endpoint,\n path: '/',\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('ListBuckets', res)\n\n const buckets: Array = []\n\n const doc = parseHTML(res.body as string)\n\n doc.find('Buckets')\n .children()\n .each((_, bucketDefinition) => {\n const bucket = {}\n\n bucketDefinition.children().forEach((child) => {\n switch (child.nodeName()) {\n case 'name':\n Object.assign(bucket, { name: child.textContent() })\n break\n case 'creationdate':\n Object.assign(bucket, {\n creationDate: Date.parse(child.textContent()),\n })\n }\n })\n\n buckets.push(bucket as S3Bucket)\n })\n\n return buckets\n }\n\n /**\n * Returns some or all (up to 1,000) of the objects in a bucket.\n *\n * @param {string} bucketName - Bucket name to list.\n * @param {string?} prefix='' - Limits the response to keys that begin with the specified prefix.\n * @return {Array.} - returns an array of objects describing S3 objects\n * with the following fields: key, lastModified, etag, size and storageClass.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async listObjects(bucketName: string, prefix?: string): Promise> {\n const method = 'GET'\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/`,\n query: {\n 'list-type': '2',\n prefix: prefix || '',\n },\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('ListObjectsV2', res)\n\n const objects: Array = []\n\n // Extract the objects definition from\n // the XML response\n parseHTML(res.body as string)\n .find('Contents')\n .each((_, objectDefinition) => {\n const obj = {}\n\n objectDefinition.children().forEach((child) => {\n switch (child.nodeName()) {\n case 'key':\n Object.assign(obj, { key: child.textContent() })\n break\n case 'lastmodified':\n Object.assign(obj, { lastModified: Date.parse(child.textContent()) })\n break\n case 'etag':\n Object.assign(obj, { etag: child.textContent() })\n break\n case 'size':\n Object.assign(obj, { size: parseInt(child.textContent()) })\n break\n case 'storageclass':\n Object.assign(obj, { storageClass: child.textContent() })\n }\n })\n\n objects.push(obj as S3Object)\n })\n\n return objects\n }\n /**\n * Retrieves an Object from Amazon S3.\n *\n * To use getObject, you must have `READ` access to the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to get.\n * @return {S3Object} - returns the content of the fetched S3 Object.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async getObject(bucketName: string, objectKey: string): Promise {\n // Prepare request\n const method = 'GET'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('GetObject', res)\n\n return new S3Object(\n objectKey,\n Date.parse(res.headers['Last-Modified']),\n res.headers['ETag'],\n parseInt(res.headers['Content-Length']),\n\n // The X-Amz-Storage-Class header is only set if the storage class is\n // not the default 'STANDARD' one.\n (res.headers['X-Amz-Storage-Class'] ?? 'STANDARD') as StorageClass,\n\n res.body\n )\n }\n /**\n * Adds an object to a bucket.\n *\n * You must have WRITE permissions on a bucket to add an object to it.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to put.\n * @param {string | ArrayBuffer} data - the content of the S3 Object to upload.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async putObject(\n bucketName: string,\n objectKey: string,\n data: string | ArrayBuffer,\n params?: PutObjectParams\n ): Promise {\n // Prepare request\n const method = 'PUT'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {\n Host: this.endpoint.host,\n ...(params?.contentDisposition && {\n 'Content-Disposition': params.contentDisposition,\n }),\n ...(params?.contentEncoding && { 'Content-Encoding': params.contentEncoding }),\n ...(params?.contentLength && { 'Content-Length': params.contentLength }),\n ...(params?.contentMD5 && { 'Content-MD5': params.contentMD5 }),\n ...(params?.contentType && { 'Content-Type': params.contentType }),\n },\n body: data,\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error('PutObject', res)\n }\n\n /**\n * Removes the null version (if there is one) of an object and inserts a delete marker,\n * which becomes the latest version of the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async deleteObject(bucketName: string, objectKey: string): Promise {\n // Prepare request\n const method = 'DELETE'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('DeleteObject', res)\n }\n\n /**\n * Copies an object from one bucket to another\n *\n * @param {string} sourceBucket - The source bucket name containing the object.\n * @param {string} sourceKey - Key of the source object to copy.\n * @param {string} destinationBucket - The destination bucket name containing the object.\n * @param {string} destinationKey - Key of the destination object.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async copyObject(\n sourceBucket: string,\n sourceKey: string,\n destinationBucket: string,\n destinationKey: string\n ): Promise {\n const method = 'PUT'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${destinationBucket}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${destinationKey}`,\n headers: {\n 'x-amz-copy-source': `${sourceBucket}/${sourceKey}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n\n this._handle_error('CopyObject', res)\n }\n\n /**\n * Creates a new multipart upload for a given objectKey.\n * The uploadId returned can be used to upload parts to the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to upload.\n * @return {S3MultipartUpload} - returns the uploadId of the newly created multipart upload.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async createMultipartUpload(bucketName: string, objectKey: string): Promise {\n const method = 'POST'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n query: { uploads: '' },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('CreateMultipartUpload', res)\n\n return new S3MultipartUpload(\n objectKey,\n parseHTML(res.body as string)\n .find('UploadId')\n .text()\n )\n }\n\n /**\n * Uploads a part in a multipart upload.\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to upload.\n * @param {string} uploadId - The uploadId of the multipart upload.\n * @param {number} partNumber - The part number of the part to upload.\n * @param {string | ArrayBuffer} data - The content of the part to upload.\n * @return {S3Part} - returns the ETag of the uploaded part.\n * @throws {S3ServiceError}\n */\n async uploadPart(\n bucketName: string,\n objectKey: string,\n uploadId: string,\n partNumber: number,\n data: string | ArrayBuffer\n ): Promise {\n const method = 'PUT'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n body: data,\n query: {\n partNumber: `${partNumber}`,\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('UploadPart', res)\n\n return new S3Part(partNumber, res.headers['Etag'])\n }\n\n /**\n * Completes a multipart upload by assembling previously uploaded parts.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @param {string} uploadId - The uploadId of the multipart upload to complete.\n * @param {S3Part[]} parts - The parts to assemble.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async completeMultipartUpload(\n bucketName: string,\n objectKey: string,\n uploadId: string,\n parts: S3Part[]\n ) {\n // Prepare request\n const method = 'POST'\n const body = `${parts\n .map(\n (part) =>\n `${part.partNumber}${part.eTag}`\n )\n .join('')}`\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n body: body,\n query: {\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n\n this._handle_error('CompleteMultipartUpload', res)\n }\n\n /**\n * Aborts a multipart upload.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @param {string} uploadId - The uploadId of the multipart upload to abort.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async abortMultipartUpload(bucketName: string, objectKey: string, uploadId: string) {\n const method = 'DELETE'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n query: {\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('AbortMultipartUpload', res)\n }\n\n _handle_error(operation: S3Operation, response: RefinedResponse) {\n const status: number = response.status\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n // We consider codes 200-299 as success\n if (status >= 200 && status < 300 && errorMessage == '' && errorCode === 0) {\n return\n }\n\n // A 301 response is returned when the bucket is not found.\n // Generally meaning that either the bucket name is wrong or the\n // region is wrong.\n //\n // See: https://github.com/grafana/k6/issues/2474\n // See: https://github.com/golang/go/issues/49281\n if (status == 301 || (errorMessage && errorMessage.startsWith('301'))) {\n throw new S3ServiceError('Resource not found', 'ResourceNotFound', operation)\n }\n\n const awsError = AWSError.parseXML(response.body as string)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw new S3ServiceError(awsError.message, awsError.code || 'unknown', operation)\n }\n }\n}\n\n/** Class representing a S3 Bucket */\nexport class S3Bucket {\n name: string\n creationDate: Date\n\n /**\n * Create an S3 Bucket\n *\n * @param {string} name - S3 bucket's name\n * @param {Date} creationDate - S3 bucket's creation date\n */\n constructor(name: string, creationDate: Date) {\n this.name = name\n this.creationDate = creationDate\n }\n}\n\n/** Class representing an S3 Object */\nexport class S3Object {\n key: string\n lastModified: number\n etag: string\n size: number\n storageClass: StorageClass\n data?: string | bytes | null\n\n /**\n * Create an S3 Object\n *\n * @param {string} key - S3 object's key\n * @param {Date} lastModified - S3 object last modification date\n * @param {string} etag - S3 object's etag\n * @param {number} size - S3 object's size\n * @param {StorageClass} storageClass - S3 object's storage class\n * @param {string | bytes | null} data=null - S3 Object's data\n */\n constructor(\n key: string,\n lastModified: number,\n etag: string,\n size: number,\n storageClass: StorageClass,\n data?: string | bytes | null\n ) {\n this.key = key\n this.lastModified = lastModified\n this.etag = etag\n this.size = size\n this.storageClass = storageClass\n this.data = data\n }\n}\n\n/** Class representing a S3 Multipart Upload */\nexport class S3MultipartUpload {\n key: string\n uploadId: string\n\n /**\n * Create an S3 Multipart Upload\n * @param {string} key - S3 object's key\n * @param {string} uploadId - S3 multipart upload id\n */\n\n constructor(key: string, uploadId: string) {\n this.key = key\n this.uploadId = uploadId\n }\n}\n\n/** Class representing a S3 Part */\nexport class S3Part {\n partNumber: number\n eTag: string\n\n /**\n * Create an S3 Part\n * @param {number} partNumber - Part number\n * @param {string} eTag - Part's etag\n */\n\n constructor(partNumber: number, eTag: string) {\n this.partNumber = partNumber\n this.eTag = eTag\n }\n}\n\n/**\n * Error indicating a S3 operation failed\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class S3ServiceError extends AWSError {\n operation: string\n\n /**\n * Constructs a S3ServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: string) {\n super(message, code)\n this.name = 'S3ServiceError'\n this.operation = operation\n }\n}\n\n/**\n * S3Operation describes possible values for S3 API operations,\n * as defined by AWS APIs.\n */\ntype S3Operation =\n | 'ListBuckets'\n | 'ListObjectsV2'\n | 'GetObject'\n | 'PutObject'\n | 'DeleteObject'\n | 'CopyObject'\n | 'CreateMultipartUpload'\n | 'CompleteMultipartUpload'\n | 'UploadPart'\n | 'AbortMultipartUpload'\n\n/**\n * Describes the class of storage used to store a S3 object.\n */\ntype StorageClass =\n | 'STANDARD'\n | 'REDUCED_REDUNDANCY'\n | 'GLACIER'\n | 'STANDARD_IA'\n | 'INTELLIGENT_TIERING'\n | 'DEEP_ARCHIVE'\n | 'OUTPOSTS'\n | 'GLACIER_IR'\n | undefined\n\n/**\n * PutObjectParams describes the parameters that can be passed to the PutObject operation.\n */\nexport interface PutObjectParams {\n /**\n * Specifies presentational information for the object.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.\n */\n contentDisposition?: string\n\n /**\n * Specifies what content encodings have been applied to the object and thus\n * what decoding mechanisms must be applied to obtain the media-type referenced\n * by the ContentType option.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.\n */\n contentEncoding?: string\n\n /**\n * Size of the body in bytes. This parameter is useful when the size of the body cannot be\n * determined automatically.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.\n */\n contentLength?: string\n\n /**\n * The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864.\n * This header can be used as a message integrity check to verify that the data is the same data that\n * was originally sent.\n *\n * Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity\n * check.\n */\n contentMD5?: string\n\n /**\n * A standard MIME type describing the format of the contents.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.\n */\n contentType?: string\n}\n","import { JSONArray, JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { v4 as uuidv4 } from 'uuid'\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's SecretsManager service\n */\nexport class SecretsManagerClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a SecretsManagerClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'secretsmanager')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n // All interactions with the Secrets Manager service\n // are made via the GET or POST method.\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Returns a list of all secrets owned by the authenticated sender of the request.\n * To use this operation, you must have the secretsmanager:ListSecrets permission.\n *\n * @return {Array.} secrets - An array of objects describing Secret Manager's secrets\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async listSecrets(): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.ListSecrets`,\n },\n body: JSON.stringify({}),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.ListSecrets, res)\n const json: JSONArray = res.json('SecretList') as JSONArray\n\n return json.map((s) => Secret.fromJSON(s as JSONObject))\n }\n\n /**\n * Retrieves a secret from Amazon Sercets Manager\n *\n * @param {string} id - The ARN or name of the secret to retrieve.\n * @returns {Secret} - returns the content of the fetched Secret object.\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async getSecret(id: string): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.GetSecretValue`,\n },\n body: JSON.stringify({ SecretId: id }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n\n this._handle_error(SecretsManagerOperation.GetSecretValue, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n\n /**\n * Creates a new secret\n *\n * Note that this method only supports string-based values at the moment.\n *\n * @param {string} name - The name of the new secret.\n * The secret name can contain ASCII letters, numbers, and the following characters: /_+=.@\n * @param {string} secret - The text data to encrypt and store in this new version of the secret.\n * @param {string} description - The description of the secret.\n * @param {string} versionID=null - Version of the secret. This value helps ensure idempotency.\n * As a default, if no versionID is provided, one will be created for you using the UUID v4\n * algorithm.\n * @param {Array.} tags=[] - A list of tags to attach to the secret. Each tag is a key and\n * value pair of strings in a JSON text string. Note that tag key names are case sensitive.\n * @returns {Secret} - returns the created secret\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async createSecret(\n name: string,\n secret: string,\n description: string,\n versionID?: string,\n tags?: Array\n ): Promise {\n versionID = versionID || uuidv4()\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.CreateSecret`,\n },\n body: JSON.stringify({\n Name: name,\n Description: description,\n SecretString: secret,\n ClientRequestToken: versionID,\n Tags: tags,\n }),\n },\n {}\n )\n\n // Ensure to include the desired 'Action' in the X-Amz-Target\n // header field, as documented by the AWS API docs.\n // headers['X-Amz-Target'] = `${this.serviceName}.CreateSecret`\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.CreateSecret, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n /**\n * Update a secret's value.\n *\n * Note that this method only support string-based values at the moment.\n *\n * @param {string} id - The ARN or name of the secret to update.\n * @param {string} secret - The text data to encrypt and store in this new version of the secret.\n * @param {} versionID=null - A unique identifier for the new version of the secret. This value helps ensure idempotency.\n * As a default, if no versionID is provided, one will be created for you using the UUID v4\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async putSecretValue(id: string, secret: string, versionID?: string): Promise {\n versionID = versionID || uuidv4()\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.PutSecretValue`,\n },\n body: JSON.stringify({\n SecretId: id,\n SecretString: secret,\n ClientRequestToken: versionID,\n }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.PutSecretValue, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n\n /**\n * Deletes a secret and all of its versions.\n *\n * You can specify a recovery window during which you can restore the secret.\n * The minimum recovery window is 7 days. The default recovery window is 30 days.\n *\n * @param {string} secretID - The ARN or name of the secret to delete.\n * @param {number} recoveryWindow - The number of days from 7 to 30 that Secrets Manager\n * waits before permanently deleting the secret.\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async deleteSecret(\n id: string,\n { recoveryWindow = 30, noRecovery = false }: { recoveryWindow: number; noRecovery: boolean }\n ): Promise {\n const payload: { [key: string]: string | boolean | number } = {\n SecretId: id,\n }\n\n // noRecovery and recoveryWindow are exclusive parameters\n if (noRecovery === true) {\n payload['ForceDeleteWithoutRecovery'] = true\n } else {\n payload['RecoveryWindowInDays'] = recoveryWindow\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.DeleteSecret`,\n },\n body: JSON.stringify(payload),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.DeleteSecret, res)\n }\n\n _handle_error(\n operation: SecretsManagerOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new SecretsManagerServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new SecretsManagerServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n// TODO: create a Tags type\n\n/**\n * Class representing a Secret Manager's secret\n */\nexport class Secret {\n name: string\n arn: string\n secret: string\n createdDate: number\n lastAccessedDate: number\n lastChangedDate: number\n tags: Array<{ [key: string]: string }>\n\n /**\n * Constructs a Secret Manager's Secret\n *\n * @param {string} name - The friendly name of the secret.\n * @param {string} arn - The ARN of the secret.\n * @param {number} createdDate - The date and time that this version of the secret was created.\n * @param {number} lastAccessedDate - The last date that this secret was accessed. This value is\n * truncated to midnight of the date and therefore shows only the date, not the time.\n * @param {number} lastChangedDate - The last date and time that this secret was modified in any way.\n * @param {Array.} tags - The list of user-defined tags associated with the secret.\n */\n constructor(\n name: string,\n arn: string,\n secretString: string,\n createdDate: number,\n lastAccessedDate: number,\n lastChangedDate: number,\n tags: Array<{ [key: string]: string }> = []\n ) {\n this.name = name\n this.arn = arn\n this.secret = secretString\n this.createdDate = createdDate\n this.lastAccessedDate = lastAccessedDate\n this.lastChangedDate = lastChangedDate\n this.tags = tags\n }\n\n /**\n * Parses and constructs a Secret Manager's Secret from the content\n * of a JSON response returned by the AWS service\n *\n * @param {Object} json - JSON object as returned and parsed from\n * the AWS service's API call.\n * @returns {Secret}\n */\n static fromJSON(json: JSONObject) {\n return new Secret(\n json.Name as string,\n json.ARN as string,\n json.SecretString as string,\n json.CreatedDate as number,\n json.LastAccessedDate as number,\n json.LastChangedDate as number,\n json.Tags as Array<{ [key: string]: string }>\n )\n }\n}\n\nexport class SecretsManagerServiceError extends AWSError {\n operation: SecretsManagerOperation\n\n /**\n * Constructs a SecretsManagerServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: SecretsManagerOperation) {\n super(message, code)\n this.name = 'SecretsManagerServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SecretsManagerOperation defines all currently implemented Secrets Manager Service operations.\n */\nenum SecretsManagerOperation {\n ListSecrets = 'ListSecrets',\n GetSecretValue = 'GetSecretValue',\n CreateSecret = 'CreateSecret',\n PutSecretValue = 'PutSecretValue',\n DeleteSecret = 'DeleteSecret',\n}\n","import { JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's Systems Manager service\n */\nexport class SystemsManagerClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a SystemsManagerClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'ssm')\n\n // All interactions with the Systems Manager service\n // are made via the POST method.\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: awsConfig.region,\n credentials: {\n accessKeyId: awsConfig.accessKeyId,\n secretAccessKey: awsConfig.secretAccessKey,\n sessionToken: awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n }\n\n /**\n * Retrieves a parameter from Amazon Systems Manager\n *\n * @param {string} name - The ARN or name of the parameter to retrieve.\n * @param {boolean} withDecryption - whether returned secure string parameters should be decrypted.\n * @returns {SystemsManagerParameter} - returns the fetched Parameter object.\n * @throws {SystemsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async getParameter(\n name: string,\n withDecryption: boolean = false\n ): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AmazonSSM.GetParameter`,\n },\n body: JSON.stringify({ Name: name, WithDecryption: withDecryption }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SystemsManagerOperation.GetParameter, res)\n\n return SystemsManagerParameter.fromJSON(res.json() as JSONObject)\n }\n\n _handle_error(\n operation: SystemsManagerOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new SystemsManagerServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new SystemsManagerServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/**\n * Class representing a Systems Manager's Parameter\n */\nexport class SystemsManagerParameter {\n /**\n * The Amazon Resource Name (ARN) of the parameter.\n */\n arn: string\n\n /**\n * The data type of the parameter, such as text or aws:ec2:image.\n * The default is text.\n */\n dataType: string\n\n /**\n * Date the parameter was last changed or updated and the parameter version was created.\n */\n lastModifiedDate: number\n\n /**\n * The friendly name of the parameter.\n */\n name: string\n\n /**\n * Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:\n * parameter_name:version\n * parameter_name:label\n */\n selector: string\n\n /**\n * plies to parameters that reference information in other AWS services. SourceResult is the raw result or response from the source.\n */\n sourceResult: string\n\n /**\n * The type of parameter. Valid values include the following: String, StringList, and SecureString.\n */\n type: string\n\n /**\n * The parameter value.\n */\n value: string\n\n /**\n * The parameter version.\n */\n version: number\n\n /**\n * Constructs a Systems Manager's Parameter\n *\n * @param {string} arn - The Amazon Resource Name (ARN) of the parameter.\n * @param {string} dataType - The data type of the parameter, such as text or aws:ec2:image. The default is text.\n * @param {number} lastModifiedDate - Date the parameter was last changed or updated and the parameter version was created.\n * @param {string} name - The friendly name of the parameter.\n * @param {string} selector - Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:\n * parameter_name:version\n * parameter_name:label\n * @param {string} sourceResult - Applies to parameters that reference information in other AWS services. SourceResult is the raw result or response from the source.\n * @param {string} type - The type of parameter. Valid values include the following: String, StringList, and SecureString.\n * @param {string} value - The parameter value.\n * @param {number} version - The parameter version.\n */\n constructor(\n arn: string,\n dataType: string,\n lastModifiedDate: number,\n name: string,\n selector: string,\n sourceResult: string,\n type: string,\n value: string,\n version: number\n ) {\n this.arn = arn\n this.dataType = dataType\n this.lastModifiedDate = lastModifiedDate\n this.name = name\n this.selector = selector\n this.sourceResult = sourceResult\n this.type = type\n this.value = value\n this.version = version\n }\n\n /**\n * Parses and constructs a Systems Manager's Parameter from the content\n * of a JSON response returned by the AWS service\n *\n * @param {Object} json - JSON object as returned and parsed from\n * the AWS service's API call.\n * @returns {SystemsManagerParameter}\n */\n static fromJSON(json: JSONObject): SystemsManagerParameter {\n const parameter = json.Parameter as JSONObject\n\n return new SystemsManagerParameter(\n parameter.ARN as string,\n parameter.DataType as string,\n parameter.LastModifiedDate as number,\n parameter.Name as string,\n parameter.Selector as string,\n parameter.SourceResult as string,\n parameter.Type as string,\n parameter.Value as string,\n parameter.Version as number\n )\n }\n}\n\nexport class SystemsManagerServiceError extends AWSError {\n operation: SystemsManagerOperation\n\n /**\n * Constructs a SystemsManagerServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {SystemsManagerOperation} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: SystemsManagerOperation) {\n super(message, code)\n this.name = 'SystemsManagerServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SystemsManagerOperation defines all currently implemented Systems Manager operations.\n */\nenum SystemsManagerOperation {\n GetParameter = 'GetParameter',\n}\n","import http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\n\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { JSONObject } from './json'\nimport { HTTPHeaders } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\nThis API is based on\nhttps://docs.aws.amazon.com/kinesis/latest/APIReference/API_Operations.html\n*/\n\n/**\n * Allows interacting with the Kinesis API.\n */\nexport class KinesisClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n private readonly serviceVersion: string\n\n /**\n * A constructor function that creates a new instance of the Kinesis class.\n * @param {AWSConfig} awsConfig - AWSConfig - This is the configuration object that is passed to\n * the constructor.\n * @returns A Proxy object.\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'kinesis')\n\n this.serviceVersion = 'Kinesis_20131202'\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: false,\n applyChecksum: true,\n })\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Creates a new Kinesis stream with the specified name and options.\n *\n * @param {string} streamName - The name of the stream to create.\n * @param {{\n * shardCount?: number;\n * streamModeDetails?: {\n * streamMode: StreamMode;\n * };\n * }} [options={}] - An optional object containing configuration options for the stream.\n * @param {number} [options.shardCount] - The number of shards for the stream. If not provided, the default value will be used.\n * @param {{streamMode: StreamMode}} [options.streamModeDetails] - An optional object containing the stream mode details.\n * @param {StreamMode} [options.streamModeDetails.streamMode] - The mode of the stream. If not provided, the default mode will be used.\n *\n * @throws {Error} Throws an error if the stream creation request fails.\n * @returns {void}\n */\n async createStream(\n streamName: string,\n options: { shardCount?: number; streamModeDetails?: { streamMode: StreamMode } } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(options.shardCount && { ShardCount: options.shardCount }),\n ...(options.streamModeDetails && { StreamMode: options.streamModeDetails.streamMode }),\n }\n\n await this._send_request('CreateStream', body)\n }\n\n /**\n * Deletes a Kinesis stream with the specified parameters.\n *\n * @param {string} streamName - The name of the stream to delete.\n * @param {{\n * streamARN?: string;\n * enforceConsumerDeletion?: boolean;\n * }} [parameters={}] - An optional object containing configuration options for the stream deletion.\n * @param {string} [parameters.streamARN] - The Amazon Resource Name (ARN) of the stream. If not provided, the ARN will be derived from the stream name.\n * @param {boolean} [parameters.enforceConsumerDeletion] - Whether to enforce the deletion of all registered consumers before deleting the stream. Defaults to false.\n *\n * @throws {Error} Throws an error if the stream deletion request fails.\n * @returns {void}\n */\n async deleteStream(\n streamName: string,\n parameters: { streamARN?: string; enforceConsumerDeletion?: boolean } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n ...(parameters.enforceConsumerDeletion && {\n EnforceConsumerDeletion: parameters.enforceConsumerDeletion,\n }),\n }\n\n await this._send_request('DeleteStream', body)\n }\n\n /**\n * Returns a list of Kinesis streams with the specified parameters.\n *\n * @param {{\n * exclusiveStartStreamName?: string;\n * limit?: number;\n * nextToken?: string;\n * }} [parameters={}] - An optional object containing configuration options for listing the streams.\n * @param {string} [parameters.exclusiveStartStreamName] - The name of the stream to start listing from. If not provided, the listing starts from the beginning.\n * @param {number} [parameters.limit] - The maximum number of streams to list. If not provided, the default value will be used.\n * @param {string} [parameters.nextToken] - A token to paginate the list of streams. If not provided, the first page will be returned.\n *\n * @throws {Error} Throws an error if the list streams request fails.\n * @returns {Partial} A partial of the ListStreamsResponse class.\n */\n async listStreams(\n parameters: {\n exclusiveStartStreamName?: string\n limit?: number\n nextToken?: string\n } = {}\n ): Promise {\n const body = {\n ...(parameters.exclusiveStartStreamName && {\n ExclusiveStartStreamName: parameters.exclusiveStartStreamName,\n }),\n ...(parameters.limit && { Limit: parameters.limit }),\n ...(parameters.nextToken && { NextToken: parameters.nextToken }),\n }\n\n const res = await this._send_request('ListStreams', body)\n return ListStreamsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Sends multiple records to a Kinesis stream in a single request.\n *\n * @param {string} streamName - The name of the stream to put records into.\n * @param {PutRecordsRequestEntry[]} records - An array of records to put into the stream.\n *\n * @throws {Error} Throws an error if the put records request fails.\n * @returns {Partial} A partial of the PutRecordsResponse class.\n */\n async putRecords(\n records: PutRecordsRequestEntry[],\n parameters: { streamName?: string; streamARN?: string } = {}\n ): Promise {\n if (!parameters.streamName && !parameters.streamARN) {\n throw new Error('Either streamName or streamARN must be provided')\n }\n\n const body = {\n Records: records,\n ...(parameters.streamName && { StreamName: parameters.streamName }),\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n }\n\n const res = await this._send_request('PutRecords', body)\n return PutRecordsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Retrieves records from a Kinesis stream.\n *\n * @param {string} shardIterator - The shard iterator to start retrieving records from.\n * @param {number} [limit] - The maximum number of records to return. If not provided, the default value will be used.\n *\n * @throws {Error} Throws an error if the get records request fails.\n * @returns {Partial} A partial of the GetRecordsResponse class.\n */\n async getRecords(\n shardIterator: string,\n parameters: { limit?: number; streamARN?: string } = {}\n ): Promise {\n const body = {\n ShardIterator: shardIterator,\n ...(parameters.limit && { Limit: parameters.limit }),\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n }\n\n const res = await this._send_request('GetRecords', body)\n return GetRecordsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Lists the shards in a Kinesis stream.\n *\n * @param {string} streamName - The name of the stream to list shards from.\n * @param {{\n * nextToken?: string;\n * maxResults?: number;\n * }} [parameters={}] - An optional object containing configuration options for listing shards.\n * @param {string} [parameters.nextToken] - A token to specify where to start paginating the shard list. If not provided, the first page will be returned.\n * @param {number} [parameters.maxResults] - The maximum number of shards to return. If not provided, the default value will be used.\n *\n * @throws {Error} Throws an error if the list shards request fails.\n * @returns {ListShardsResponse} A ListShardsResponse class instance.\n */\n async listShards(\n streamName: string,\n parameters: { nextToken?: string; maxResults?: number } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(parameters.nextToken && { NextToken: parameters.nextToken }),\n ...(parameters.maxResults && {\n MaxResults: parameters.maxResults,\n }),\n }\n\n const res = await this._send_request('ListShards', body)\n return ListShardsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Retrieves a shard iterator for the specified shard in a Kinesis stream.\n *\n * @param {string} streamName - The name of the stream.\n * @param {string} shardId - The shard ID for which to get the iterator.\n * @param {string} shardIteratorType - The shard iterator type. One of 'AT_SEQUENCE_NUMBER', 'AFTER_SEQUENCE_NUMBER', 'TRIM_HORIZON', 'LATEST', or 'AT_TIMESTAMP'.\n * @param {{\n * startingSequenceNumber?: string;\n * timestamp?: number;\n * }} [parameters={}] - An optional object containing configuration options for the shard iterator.\n * @param {string} [parameters.startingSequenceNumber] - The sequence number to start with when using 'AT_SEQUENCE_NUMBER' or 'AFTER_SEQUENCE_NUMBER' iterator types.\n * @param {number} [parameters.timestamp] - The timestamp to start with when using the 'AT_TIMESTAMP' iterator type.\n *\n * @throws {Error} Throws an error if the get shard iterator request fails.\n * @returns {string} The next position in the shard from which to start sequentially reading data records. If set to null, the shard has been closed and the requested iterator does not return any more data.\n */\n async getShardIterator(\n streamName: string,\n shardId: string,\n shardIteratorType: ShardIteratorKind,\n parameters: { startingSequenceNumber?: string; timestamp?: number } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ShardId: shardId,\n ShardIteratorType: shardIteratorType,\n ...(parameters.startingSequenceNumber && {\n StartingSequenceNumber: parameters.startingSequenceNumber,\n }),\n ...(parameters.timestamp && { Timestamp: parameters.timestamp }),\n }\n\n const res = await this._send_request('GetShardIterator', body)\n return GetShardIteratorResponse.fromJson(res?.json() as JSONObject)\n }\n\n private async _send_request(\n action: string,\n body: unknown\n ): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceVersion}.${action}`,\n },\n body: JSON.stringify(body),\n },\n {}\n )\n\n const res = await http.asyncRequest('POST', signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n\n this._handle_error(action, res)\n return res\n }\n\n /**\n * If the response is an error, throw an error\n *\n * @param {string} operation - The name of the operation that was called.\n * @param response - RefinedResponse\n * @returns The response is being returned.\n */\n _handle_error(operation: string, response: RefinedResponse) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new KinesisServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new KinesisServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/* `KinesisServiceError` is a subclass of `AWSError` that adds an `operation` property */\nexport class KinesisServiceError extends AWSError {\n operation: string\n\n /**\n * Constructs a KinesisServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: string) {\n super(message, code)\n this.name = 'KinesisServiceError'\n this.operation = operation\n }\n}\n\n/**\n * Describes the options for a Kinesis stream.\n */\ntype StreamMode = 'PROVISIONED' | 'ON_DEMAND'\n\n/**\n * Determines how the shard iterator is used to start reading data records from the shard.\n */\nexport type ShardIteratorKind =\n | 'AT_SEQUENCE_NUMBER'\n | 'AFTER_SEQUENCE_NUMBER'\n | 'TRIM_HORIZON'\n | 'LATEST'\n | 'AT_TIMESTAMP'\n\n/**\n * Describes the status of a Kinesis data stream.\n */\nexport type StreamStatus = 'CREATING' | 'DELETING' | 'ACTIVE' | 'UPDATING'\n\nexport type StreamModeDetails = {\n /**\n * Specifies the capacity mode to which you want to set your data stream.\n */\n SteamMode: 'PROVISIONED' | 'ON_DEMAND'\n}\n\nexport class ListStreamsResponse {\n /**\n * Indicates whether there are more streams available to list.\n */\n hasMoreStreams: boolean\n\n /**\n * The token that identifies which batch of results you can retrieve.\n */\n nextToken?: string\n\n /**\n * The names of the streams that are associated with the AWS account making the ListStreams request.\n */\n streamNames: string[]\n\n /**\n * A list of StreamSummary objects.\n */\n streamSummaries: StreamSummary[]\n\n constructor(\n HasMoreStreams: boolean,\n NextToken: string,\n StreamNames: string[],\n StreamSummaries: StreamSummary[]\n ) {\n this.hasMoreStreams = HasMoreStreams\n this.nextToken = NextToken\n this.streamNames = StreamNames\n this.streamSummaries = StreamSummaries\n }\n\n static fromJson(result: JSONObject): ListStreamsResponse {\n const {\n HasMoreStreams = false,\n NextToken = '',\n StreamNames = [],\n StreamSummaries = [],\n } = result\n\n return new ListStreamsResponse(\n HasMoreStreams as boolean,\n NextToken as string,\n StreamNames as string[],\n (StreamSummaries as JSONObject[])?.map(StreamSummary.fromJson) as StreamSummary[]\n )\n }\n}\n\n/**\n * Summarizes a Stream\n */\nexport class StreamSummary {\n /**\n * The Amazon Resource Name (ARN) for the stream.\n */\n streamARN: string\n\n /**\n * The time at which the stream was created.\n */\n streamCreationTimestamp: number\n\n /**\n * Specify the capacity mode to which you want to set your data stream.\n */\n streamModeDetails: StreamModeDetails\n\n /**\n * The name of the stream.\n */\n streamName: string\n\n /**\n * The current status of the stream being described.\n */\n streamStatus: StreamStatus\n\n constructor(\n StreamARN: string,\n StreamCreationTimestamp: number,\n StreamMode: StreamModeDetails,\n StreamName: string,\n StreamStatus: StreamStatus\n ) {\n this.streamARN = StreamARN\n this.streamCreationTimestamp = StreamCreationTimestamp\n this.streamModeDetails = StreamMode\n this.streamName = StreamName\n this.streamStatus = StreamStatus\n }\n\n static fromJson(summary: JSONObject): StreamSummary {\n const {\n StreamARN = '',\n StreamCreationTimestamp = 0,\n StreamModeDetails = {},\n StreamName = '',\n StreamStatus = '',\n } = summary\n\n return new StreamSummary(\n StreamARN as string,\n StreamCreationTimestamp as number,\n StreamModeDetails as StreamModeDetails,\n StreamName as string,\n StreamStatus as StreamStatus\n )\n }\n}\n\n/**\n * Represents the output for PutRecords.\n */\nexport interface PutRecordsRequestEntry {\n /**\n * The data blob to put into the record, which is base64-encoded when the blob is serialized.\n */\n Data: string | ArrayBuffer\n\n /**\n * Determines which share in the stream the data record is assigned to.\n */\n PartitionKey: string\n}\n\n// Response class for PutRecords API\nexport class PutRecordsResponse {\n /**\n * The encryption type used on the records. This parameter can be one of the following values:\n * - NONE: Do not encrypt the records.\n * - KMS: Use server-side encryption on the records using a customer-managed AWS KMS key.\n */\n encryptionType: EncryptionType\n\n /**\n * The number of unsuccessfully processed records in a PutRecords request.\n */\n failedRecordCount: number\n\n /**\n * An array of successfully and unsuccessfully processed record results.\n */\n records: PutRecordsResultEntry[]\n\n constructor(\n encryptionType: 'NONE' | 'KMS',\n failedRecordCount: number,\n records: PutRecordsResultEntry[]\n ) {\n this.encryptionType = encryptionType\n this.failedRecordCount = failedRecordCount\n this.records = records\n }\n\n static fromJson(json: JSONObject): PutRecordsResponse {\n const { EncryptionType = 'NONE', FailedRecordCount = 0, Records = [] } = json\n const records = (Records as JSONObject[]).map(PutRecordsResultEntry.fromJson)\n\n return new PutRecordsResponse(\n EncryptionType as EncryptionType,\n FailedRecordCount as number,\n records\n )\n }\n}\n\ntype EncryptionType = 'NONE' | 'KMS'\n\n/**\n * Represents the result of an individual record from a PutRecords request.\n */\nexport class PutRecordsResultEntry {\n /**\n * The sequence number for an individual record result.\n */\n sequenceNumber: string\n\n /**\n * The shard ID for an individual record result.\n */\n shardId: string\n\n constructor(sequenceNumber: string, shardId: string) {\n this.sequenceNumber = sequenceNumber\n this.shardId = shardId\n }\n\n static fromJson(json: JSONObject): PutRecordsResultEntry {\n return new PutRecordsResultEntry(json.SequenceNumber as string, json.ShardId as string)\n }\n}\n\n/**\n * Represents the response format of the GetRecords operation.\n */\nexport class GetRecordsResponse {\n /**\n * The next position in the shard from which to start sequentially reading data records.\n */\n nextShardIterator: string\n\n /**\n * The data records retrieved from the shard.\n */\n records: Record[]\n\n /**\n * The number of milliseconds the GetRecords response is from the\n * tip of the stream, indicating how far behind current time the\n * consumer is.\n *\n * A value of zero indicates that record processing is caught\n * up, and there are no new records to process at this moment.\n */\n millisBehindLatest: number\n\n constructor(nextShardIterator: string, records: Record[], millisBehindLatest: number) {\n this.nextShardIterator = nextShardIterator\n this.records = records\n this.millisBehindLatest = millisBehindLatest\n }\n\n static fromJson(json: JSONObject): GetRecordsResponse {\n const { NextShardIterator = '', Records = [], MillisBehindLatest = 0 } = json\n const records = (Records as JSONObject[]).map(Record.fromJson)\n\n return new GetRecordsResponse(\n NextShardIterator as string,\n records as Record[],\n MillisBehindLatest as number\n )\n }\n}\n\n/**\n * The unit of data of the Kinesis data stream, which is composed of a sequence\n * number, a partition key, and a data blob.\n */\nclass Record {\n /**\n * The data blob.\n */\n data: string | ArrayBuffer\n\n /**\n * Identifies which shard in the stream the data record is assigned to.\n */\n partitionKey: string\n\n /**\n * The unique identifier of the record in the stream.\n */\n sequenceNumber: string\n\n constructor(data: string | ArrayBuffer, partitionKey: string, sequenceNumber: string) {\n this.data = data\n this.partitionKey = partitionKey\n this.sequenceNumber = sequenceNumber\n }\n\n static fromJson(json: JSONObject): Record {\n return new Record(\n json.Data as string | ArrayBuffer,\n json.PartitionKey as string,\n json.SequenceNumber as string\n )\n }\n}\n\n// Response class for ListShards API\nexport class ListShardsResponse {\n /**\n * An array of JSON objects.\n *\n * Each object represents one shard and specifies the IDs of the shard, the\n * shard's parent, and the shard that's adjacent to the shard's parent.\n */\n shards: Shard[]\n\n /**\n * When the number of shards in the data stream is greater than the\n * default value for the MaxResults parameter, or if you explicitly specify\n * a value for MaxResults that is less than the number of shards in the data\n * stream, the response includes a pagination token named NextToken.\n */\n nextToken?: string\n\n constructor(shards: Shard[], nextToken?: string) {\n this.shards = shards\n this.nextToken = nextToken\n }\n\n static fromJson(json: JSONObject): ListShardsResponse {\n const { Shards = [], NextToken } = json\n const shards = (Shards as JSONObject[]).map(Shard.fromJson)\n\n return new ListShardsResponse(shards, NextToken as string | undefined)\n }\n}\n\n/**\n * A uniquely identified group of data records in a Kinesis data stream.\n */\nexport class Shard {\n /**\n * The unique identifier of the shard within the stream.\n */\n id: string\n\n /**\n * The shard ID of the shard's parent.\n */\n parentShardId?: string\n\n /**\n * The shard ID of the shard adjacent to the shard's parent.\n */\n adjacentParentShardId?: string\n\n /**\n * The range of possible hash key values for the shard, which is a set of ordered contiguous positive integers.\n */\n hashKeyRange: HashKeyRange\n\n sequenceNumberRange: SequenceNumberRange\n\n constructor(\n id: string,\n hashKeyRange: HashKeyRange,\n sequenceNumberRange: SequenceNumberRange,\n parentShardId?: string,\n adjacentParentShardId?: string\n ) {\n this.id = id\n this.parentShardId = parentShardId\n this.adjacentParentShardId = adjacentParentShardId\n this.hashKeyRange = hashKeyRange\n this.sequenceNumberRange = sequenceNumberRange\n }\n\n static fromJson(json: JSONObject): Shard {\n return new Shard(\n json.ShardId as string,\n json.HashKeyRange as unknown as HashKeyRange,\n json.SequenceNumberRange as unknown as SequenceNumberRange,\n json.ParentShardId as string | undefined,\n json.AdjacentParentShardId as string | undefined\n )\n }\n}\n\n/**\n * Describes the range of possible hash key values for the shard, which is\n * a set of ordered contiguous positive integers.\n */\nexport interface HashKeyRange {\n /**\n * The starting hash key of the hash key range.\n */\n startingHashKey: string\n\n /**\n * The ending hash key of the hash key range.\n */\n endingHashKey: string\n}\n\n/**\n * The range of possible sequence numbers for the shard.\n */\nexport interface SequenceNumberRange {\n /**\n * The ending sequence number for the range.\n *\n * Shards that are in the OPEN state have an ending sequence number of null.\n */\n endingSequenceNumber?: string\n\n /**\n * The starting sequence number for the range.\n */\n startingSequenceNumber: string\n}\n\n/**\n * Describes a shard iterator response.\n */\nclass GetShardIteratorResponse {\n /**\n * The position in the shard from which to start reading data records sequentially.\n */\n shardIterator: string\n\n constructor(shardIterator: string) {\n this.shardIterator = shardIterator\n }\n\n static fromJson(json: JSONObject): GetShardIteratorResponse {\n return new GetShardIteratorResponse(json.ShardIterator as string)\n }\n}\n","import http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { JSONObject } from './json'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { HTTPHeaders, HTTPMethod } from './http'\n\n/**\n * Class allowing to interact with Amazon AWS's Event Bridge service\n */\nexport class EventBridgeClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'events')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Sends custom events to Amazon EventBridge so that they can be matched to rules.\n *\n * @param {PutEventsInput} input - The input for the PutEvents operation.\n * @throws {EventBridgeServiceError}\n * @throws {InvalidSignatureError}\n */\n async putEvents(input: PutEventsInput) {\n const parsedEvent = {\n ...input,\n Entries: input.Entries.map((entry) => ({\n ...entry,\n Detail: JSON.stringify(entry.Detail),\n })),\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AWSEvents.PutEvents`,\n },\n body: JSON.stringify(parsedEvent),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(EventBridgeOperation.PutEvents, res)\n }\n\n _handle_error(\n operation: EventBridgeOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new EventBridgeServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new EventBridgeServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\nenum EventBridgeOperation {\n PutEvents = 'PutEvents',\n}\n\n/**\n * Represents an event to be submitted.\n *\n * @typedef {Object} PutEventEntry\n *\n * @property {string} Detail - A valid serialized JSON object. There is no other schema imposed. The JSON object may contain fields and nested sub-objects.\n * @property {string} DetailType - Free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.\n * @property {string} EventBusName - The name or ARN of the event bus to receive the event. Only the rules that are associated with this event bus are used to match the event. If you omit this, the default event bus is used.\n * @property {string[]} Resources - AWS resources, identified by Amazon Resource Name (ARN), which the event primarily concerns. Any number, including zero, may be present.\n * @property {string} Source - The source of the event.\n */\ninterface PutEventEntry {\n Source: string\n Detail: JSONObject\n DetailType: string\n EventBusName?: string\n Resources?: [string]\n}\n\n/**\n * Represents the input for a put events operation.\n *\n * @typedef {Object} PutEventsInput\n *\n * @property {string} [EndpointId] - The optional URL subdomain of the endpoint.\n * @property {PutEventEntry[]} Entries - An array of entries that defines an event in your system.\n */\ninterface PutEventsInput {\n EndpointId?: string\n Entries: PutEventEntry[]\n}\n\nexport class EventBridgeServiceError extends AWSError {\n operation: EventBridgeOperation\n\n /**\n * Constructs a EventBridgeServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: EventBridgeOperation) {\n super(message, code)\n this.name = 'EventBridgeServiceError'\n this.operation = operation\n }\n}\n"],"names":["AWSClient","awsConfig","serviceName","_classCallCheck","_defineProperty","this","undefined","endpoint","_endpoint","key","get","Endpoint","concat","region","set","AWSConfig","options","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","value","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","AMZ_ALGORITHM_QUERY_PARAM","AMZ_CREDENTIAL_QUERY_PARAM","AMZ_DATE_QUERY_PARAM","AMZ_EXPIRES_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_SIGNED_HEADERS_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","MAX_PRESIGNED_TTL","EMPTY_SHA256","UNSIGNED_PAYLOAD","completeUrl","startsWith","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","_protocol","slice","_hostname","_port","parseInt","href","_value$split2","hostname","port","protocol","host","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","hasHeader","soughtHeader","_i","_Object$keys","Object","keys","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","isArrayBuffer","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","prototype","call","toFormUrlEncoded","form","params","require","_regeneratorRuntime","t","r","hasOwnProperty","o","defineProperty","i","Symbol","a","iterator","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","self","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","obj","toPrimitive","String","_toPrimitive","LambdaClient","_AWSClient","commonHeaders","fn","_callee","payload","invocationType","signedRequest","res","logResult","functionError","_args","_context","logType","clientContext","qualifier","sign","http","_handle_error","executedVersion","encoding","statusCode","status","LambdaInvocationError","args","_x","_x2","errorCode","error_code","awsError","_this2","arr","_arrayWithHoles","_iterableToArrayLimit","minLen","_arrayLikeToArray","test","_unsupportedIterableToArray","_nonIterableRest","len","arr2","_asyncToGenerator","API_VERSION","SQSClient","_sendMessage","queueUrl","messageBody","attributeParameters","parsed","Action","Version","QueueUrl","MessageBody","messageDeduplicationId","MessageDeduplicationId","messageGroupId","MessageGroupId","messageAttributes","entries","attribute","valueParameterSuffix","assign","delaySeconds","DelaySeconds","_handleError","html","_listQueues","_callee2","parameters","_args2","_context2","maxResults","MaxResults","nextToken","NextToken","queueNamePrefix","QueueNamePrefix","Host","urls","toArray","operation","SQSServiceError","id","bodyMD5","v1","v4","uuid","module","exports","byteToHex","substr","buf","offset","bth","getRandomValues","window","msCrypto","rnds8","Uint8Array","rnds","Math","random","_nodeId","_clockseq","rng","bytesToUuid","_lastMSecs","_lastNSecs","b","node","clockseq","seedBytes","msecs","getTime","nsecs","dt","tl","tmh","ii","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","definition","prop","KMSClient","_listKeys","KMSOperation","ListKeys","k","KMSKey","fromJSON","_generateDataKey","size","KMSKeySize","Size256","KeyId","NumberOfBytes","GenerateDataKey","KMSDataKey","errorMessage","KMSServiceError","keyArn","keyId","KeyArn","CiphertextBlob","Plaintext","ciphertextBlob","plaintext","S3Client","_listBuckets","buckets","children","each","_","bucketDefinition","bucket","child","nodeName","textContent","creationDate","_listObjects","bucketName","prefix","objects","objectDefinition","lastModified","etag","storageClass","_getObject","_callee3","objectKey","_res$headers$XAmzSt","_context3","S3Object","_x3","_x4","_putObject","_callee4","data","_context4","contentDisposition","contentEncoding","contentLength","contentMD5","contentType","_x5","_x6","_x7","_x8","_deleteObject","_callee5","_context5","_x9","_x10","_copyObject","_callee6","sourceBucket","sourceKey","destinationBucket","destinationKey","bucketEndpoint","_context6","copy","_x11","_x12","_x13","_x14","_createMultipartUpload","_callee7","_context7","uploads","S3MultipartUpload","_x15","_x16","_uploadPart","_callee8","uploadId","partNumber","_context8","S3Part","_x17","_x18","_x19","_x20","_x21","_completeMultipartUpload","_callee9","parts","_context9","part","eTag","_x22","_x23","_x24","_x25","_abortMultipartUpload","_callee10","_context10","_x26","_x27","_x28","S3ServiceError","S3Bucket","SecretsManagerClient","_listSecrets","SecretsManagerOperation","ListSecrets","Secret","_getSecret","SecretId","GetSecretValue","_createSecret","secret","description","versionID","tags","uuidv4","Name","Description","SecretString","ClientRequestToken","Tags","CreateSecret","_putSecretValue","PutSecretValue","_deleteSecret","_ref$recoveryWindow","recoveryWindow","_ref$noRecovery","noRecovery","DeleteSecret","SecretsManagerServiceError","arn","secretString","createdDate","lastAccessedDate","lastChangedDate","ARN","CreatedDate","LastAccessedDate","LastChangedDate","SystemsManagerClient","withDecryption","WithDecryption","SystemsManagerOperation","GetParameter","SystemsManagerParameter","_getParameter","SystemsManagerServiceError","dataType","lastModifiedDate","selector","sourceResult","version","parameter","Parameter","DataType","LastModifiedDate","Selector","SourceResult","Type","Value","KinesisClient","serviceVersion","_createStream","streamName","StreamName","shardCount","ShardCount","streamModeDetails","StreamMode","streamMode","_send_request","_deleteStream","streamARN","StreamARN","enforceConsumerDeletion","EnforceConsumerDeletion","_listStreams","_args3","exclusiveStartStreamName","ExclusiveStartStreamName","limit","Limit","ListStreamsResponse","fromJson","_putRecords","records","_args4","Records","PutRecordsResponse","_getRecords","shardIterator","_args5","ShardIterator","GetRecordsResponse","_listShards","_args6","ListShardsResponse","_getShardIterator","shardId","shardIteratorType","_args7","ShardId","ShardIteratorType","startingSequenceNumber","StartingSequenceNumber","timestamp","Timestamp","GetShardIteratorResponse","_send_request2","action","KinesisServiceError","HasMoreStreams","StreamNames","StreamSummaries","hasMoreStreams","streamNames","streamSummaries","result","_result$HasMoreStream","_result$NextToken","_result$StreamNames","_result$StreamSummari","StreamSummary","StreamCreationTimestamp","StreamStatus","streamCreationTimestamp","streamStatus","summary","_summary$StreamARN","_summary$StreamCreati","_summary$StreamModeDe","StreamModeDetails","_summary$StreamName","_summary$StreamStatus","encryptionType","failedRecordCount","_json$EncryptionType","EncryptionType","_json$FailedRecordCou","FailedRecordCount","_json$Records","PutRecordsResultEntry","sequenceNumber","SequenceNumber","nextShardIterator","millisBehindLatest","_json$NextShardIterat","NextShardIterator","_json$Records2","_json$MillisBehindLat","MillisBehindLatest","Record","partitionKey","Data","PartitionKey","shards","_json$Shards","Shards","Shard","hashKeyRange","sequenceNumberRange","parentShardId","adjacentParentShardId","HashKeyRange","SequenceNumberRange","ParentShardId","AdjacentParentShardId","EventBridgeClient","input","parsedEvent","Entries","entry","Detail","EventBridgeOperation","PutEvents","_putEvents","EventBridgeServiceError"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"aws.js","mappings":";u4BAWO,IAAMA,EAAS,WAsBlB,SAXA,SAAAA,EAAYC,EAAsBC,gGAAqBC,CAAA,KAAAH,GAAAI,EAAA,yBAAAA,EAAA,2BAAAA,EAAA,yBACnDC,KAAKJ,UAAYA,EACjBI,KAAKH,YAAcA,EAIOI,MAAtBL,EAAUM,WACVF,KAAKG,UAAYP,EAAUM,SAEnC,KAEA,EAAAE,IAAA,WAAAC,IASA,WAMI,OALsBJ,MAAlBD,KAAKG,YACLH,KAAKG,UAAY,IAAIG,EAAAA,EAAS,WAADC,OACdP,KAAKH,YAAW,KAAAU,OAAIP,KAAKJ,UAAUY,OAAM,oBAGrDR,KAAKG,SAChB,EAEAM,IAQA,SAAoBP,GAChBF,KAAKG,UAAYD,CACrB,+FAAC,CAlDiB,ojFCPf,IAAMQ,EAAS,WA2ElB,SAAAA,EAAYC,GACR,GADmCb,EAAA,KAAAY,GA1EvCX,EAAA,sBAOAA,EAAA,2BAOAA,EAAA,+BAOAA,EAAA,4BAOAA,EAAA,yBA+CSY,EAAQH,QAA6B,KAAnBG,EAAQH,OAC3B,MAAM,IAAII,EAAsB,yFAADL,OAC+DI,EAAQH,OAAM,MAIhH,IAAKG,EAAQE,aAAuC,KAAxBF,EAAQE,YAChC,MAAM,IAAID,EAAsB,wEAADL,OAC8CI,EAAQE,YAAW,MAIpG,GAAIF,EAAQE,YAAYC,OAAS,IAAMH,EAAQE,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OAH8CtG,GAAA,KAAAuxB,GACpDtxB,GAApBqG,EAAA1E,GAAA,KAAA2vB,EAAA,CAAM5vB,EAASyD,IAAK,oBACpBkB,EAAKhB,KAAO,0BACZgB,EAAK4V,UAAYA,EAAS5V,CAC9B,CAAC,OAAAzE,GAAA0vB,EAAA/iB,GAAArN,GAAAowB,EAAA,CAd+B,CAASpsB,EAAAA","sources":["webpack://k6-jslib-aws/./src/internal/client.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/encoding\"","webpack://k6-jslib-aws/./src/internal/lambda.ts","webpack://k6-jslib-aws/./src/internal/sqs.ts","webpack://k6-jslib-aws/./node_modules/uuid/index.js","webpack://k6-jslib-aws/./node_modules/uuid/lib/bytesToUuid.js","webpack://k6-jslib-aws/./node_modules/uuid/lib/rng-browser.js","webpack://k6-jslib-aws/./node_modules/uuid/v1.js","webpack://k6-jslib-aws/./node_modules/uuid/v4.js","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/kms.ts","webpack://k6-jslib-aws/./src/internal/s3.ts","webpack://k6-jslib-aws/./src/internal/secrets-manager.ts","webpack://k6-jslib-aws/./src/internal/ssm.ts","webpack://k6-jslib-aws/./src/internal/kinesis.ts","webpack://k6-jslib-aws/./src/internal/event-bridge.ts"],"sourcesContent":["import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n\nexport class NetworkError extends Error {\n code: number;\n\n constructor(message: string, code: number) {\n super(message)\n this.name = 'NetworkError'\n this.code = code\n }\n}","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/encoding\");","import http, { RefinedResponse, ResponseType } from 'k6/http'\nimport encoding from 'k6/encoding'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError, NetworkError } from './error'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { HTTPHeaders, HTTPMethod, QueryParameterBag } from './http'\n\n/**\n * Class allowing to interact with Amazon AWS's Lambda service\n */\nexport class LambdaClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n private readonly method: HTTPMethod\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'lambda')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Invoke an AWS Lambda function\n *\n * @param {string} name - The name of the function\n * @param {string} payload - The payload to send to function\n * @param {InvocationOptions} options - Additional options to customize invocation\n *\n * @throws {LambdaInvocationError}\n */\n async invoke(\n name: string,\n payload: string,\n options: InvocationOptions = {}\n ): Promise {\n const query: QueryParameterBag = {}\n const invocationType = options.invocationType || 'RequestResponse'\n const headers = {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AWSLambda.${invocationType}`,\n 'X-Amz-Invocation-Type': invocationType,\n 'X-Amz-Log-Type': options.logType || 'None',\n }\n if (options.clientContext) {\n headers['X-Amz-Client-Context'] = options.clientContext\n }\n if (options.qualifier) {\n query['Qualifier'] = options.qualifier\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: `/2015-03-31/functions/${name}/invocations`,\n query,\n headers,\n body: payload || '',\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(res)\n\n const logResult = res.headers['X-Amz-Log-Result']\n const response = {\n executedVersion: res.headers['X-Amz-Executed-Version'],\n logResult: logResult ? encoding.b64decode(logResult, 'std', 's') : undefined,\n statusCode: res.status,\n payload: res.body as string,\n }\n\n const functionError = res.headers['X-Amz-Function-Error']\n if (functionError) {\n throw new LambdaInvocationError(functionError, response)\n } else {\n return response\n }\n }\n\n private _handle_error(response: RefinedResponse) {\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n if (errorMessage == '' && errorCode === 0) {\n return\n }\n\n if (errorCode < 1400 || errorCode >= 1600 ) {\n throw new NetworkError(errorMessage, errorCode)\n }\n \n const awsError = AWSError.parse(response)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n case 'InvalidSignatureException':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw awsError\n }\n }\n}\n\nexport class LambdaInvocationError extends Error {\n response: InvocationResponse\n\n constructor(message: string, response: InvocationResponse) {\n super(`${message}: ${response.payload}`)\n this.response = response\n }\n}\n\ninterface InvocationOptions {\n /**\n * Defines whether the function is invoked synchronously or asynchronously.\n * - `RequestResponse` (default): Invoke the function synchronously.\n * - `Event`: Invoke the function asynchronously.\n * - `DryRun`: Validate parameter values and verify that the user or role has permission to invoke the function.\n */\n invocationType?: 'RequestResponse' | 'Event' | 'DryRun'\n /**\n * Set to `Tail` to include the execution log in the response. Applies to synchronously invoked functions only.\n */\n logType?: 'None' | 'Tail'\n /**\n * Up to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object.\n */\n clientContext?: string\n /**\n * Specify a version or alias to invoke a published version of the function.\n */\n qualifier?: string\n}\n\ninterface InvocationResponse {\n statusCode: number\n executedVersion?: string\n logResult?: string\n payload?: string\n}\n","import { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { HTTPHeaders, SignedHTTPRequest } from './http'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\nimport { toFormUrlEncoded } from './utils'\nimport { AWSError } from './error'\n\nconst API_VERSION = '2012-11-05'\n\nexport class SQSClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'sqs')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: true,\n })\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-www-form-urlencoded',\n }\n }\n\n /**\n * Delivers a message to the specified queue.\n *\n * @param {string} queueUrl - The URL of the Amazon SQS queue to which a message is sent. Queue URLs and names are case-sensitive.\n * @param {string} messageBody - The message to send. The minimum size is one character. The maximum size is 256 KB.\n * @param {Object} options - Options for the request\n * @param {string} [options.messageDeduplicationId] - The message deduplication id.\n * @param {string} [options.messageGroupId] - The message group ID for FIFO queues\n * @returns {Message} - The message that was sent.\n */\n async sendMessage(\n queueUrl: string,\n messageBody: string,\n options: SendMessageOptions = {}\n ): Promise {\n const method = 'POST'\n\n let body: object = {\n Action: 'SendMessage',\n Version: API_VERSION,\n QueueUrl: queueUrl,\n MessageBody: messageBody,\n }\n\n if (typeof options.messageDeduplicationId !== 'undefined') {\n body = { ...body, MessageDeduplicationId: options.messageDeduplicationId }\n }\n\n if (typeof options.messageGroupId !== 'undefined') {\n body = { ...body, MessageGroupId: options.messageGroupId }\n }\n\n if (typeof options.messageAttributes !== 'undefined') {\n /*\n * A single message attribute is represented as 3 separate parameters: name, value, and type.\n * The name of the value parameter varies based on the data type.\n * See https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html#SQS-SendMessage-request-MessageAttributes\n * for more information.\n */\n const attributeParameters = Object.entries(options.messageAttributes).reduce(\n (params, [name, attribute], i) => {\n const valueParameterSuffix =\n attribute.type === 'Binary' ? 'BinaryValue' : 'StringValue'\n return Object.assign(params, {\n [`MessageAttribute.${i + 1}.Name`]: name,\n [`MessageAttribute.${i + 1}.Value.${valueParameterSuffix}`]:\n attribute.value,\n [`MessageAttribute.${i + 1}.Value.DataType`]: attribute.type,\n })\n },\n {} as Record\n )\n body = { ...body, ...attributeParameters }\n }\n\n if (typeof options.delaySeconds !== 'undefined') {\n body = { ...body, DelaySeconds: options.delaySeconds }\n }\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n },\n body: toFormUrlEncoded(body),\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {\n headers: signedRequest.headers,\n })\n this._handleError('SendMessage', res)\n\n const parsed = res.html('SendMessageResponse > SendMessageResult')\n return new Message(parsed.find('MessageId').text(), parsed.find('MD5OfMessageBody').text())\n }\n\n /**\n * Returns a list of your queues in the current region.\n *\n * @param {ListQueuesRequestParameters} [parameters={}] request parameters\n * @param {number} [ListQueuesRequestParameters.maxResults] Maximum number of results to include in the response. Value range is 1 to 1000. You must set maxResults to receive a value for nextToken in the response.\n * @param {string} [ListQueuesRequestParameters.nextToken] Pagination token to request the next set of results.\n * @param {string} [ListQueuesRequestParameters.queueNamePrefix] A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned.\n * @returns {Object}\n * @returns {string[]} Object.queueUrls - A list of queue URLs, up to 1000 entries.\n * @returns {string} [Object.nextToken] - In the future, you can use NextToken to request the next set of results.\n */\n async listQueues(parameters: ListQueuesRequestParameters = {}): Promise {\n const method = 'POST'\n\n let body: object = {\n Action: 'ListQueues',\n Version: API_VERSION,\n }\n\n if (typeof parameters?.maxResults !== 'undefined') {\n body = { ...body, MaxResults: parameters.maxResults }\n }\n\n if (typeof parameters?.nextToken !== 'undefined') {\n body = { ...body, NextToken: parameters.nextToken }\n }\n\n if (typeof parameters?.queueNamePrefix !== 'undefined') {\n body = { ...body, QueueNamePrefix: parameters.queueNamePrefix }\n }\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n Host: this.endpoint.host,\n },\n body: toFormUrlEncoded(body),\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {\n headers: signedRequest.headers,\n })\n this._handleError('ListQueues', res)\n\n const parsed = res.html()\n return {\n urls: parsed\n .find('QueueUrl')\n .toArray()\n .map((e) => e.text()),\n nextToken: parsed.find('NextToken').text() || undefined,\n }\n }\n\n private _handleError(\n operation: SQSOperation,\n response: RefinedResponse\n ) {\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n if (errorMessage == '' && errorCode === 0) {\n return\n }\n\n const awsError = AWSError.parseXML(response.body as string)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw new SQSServiceError(awsError.message, awsError.code || 'unknown', operation)\n }\n }\n}\n\n/**\n * An Amazon SQS message.\n */\nexport class Message {\n /**\n * A unique identifier for the message.\n * A MessageIdis considered unique across all AWS accounts for an extended period of time.\n */\n id: string\n\n /**\n * An MD5 digest of the non-URL-encoded message body string.\n */\n bodyMD5: string\n\n /**\n * Instantiates a new Message object.\n *\n * @param id\n * @param md5Ofbody\n */\n constructor(id: string, bodyMD5: string) {\n this.id = id\n this.bodyMD5 = bodyMD5\n }\n}\n\n/**\n * SQSServiceError indicates an error occurred while interacting with the SQS API.\n */\nexport class SQSServiceError extends AWSError {\n operation: SQSOperation\n\n constructor(message: string, code: string, operation: SQSOperation) {\n super(message, code)\n this.name = 'SQSServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SQSOperation describes possible SQS operations.\n */\ntype SQSOperation = 'ListQueues' | 'SendMessage'\n\nexport interface SendMessageOptions {\n /**\n * The message deduplication ID for FIFO queues\n */\n messageDeduplicationId?: string\n\n /**\n * The message group ID for FIFO queues\n */\n messageGroupId?: string\n\n /**\n * The message attributes\n */\n messageAttributes?: {\n [name: string]: { type: 'String' | 'Number' | 'Binary'; value: string }\n }\n\n /**\n * The length of time, in seconds, for which to delay a specific message.\n */\n delaySeconds?: number\n}\n\nexport interface ListQueuesRequestParameters {\n /**\n * Maximum number of results to include in the response. Value range is 1 to 1000.\n */\n maxResults?: number\n /**\n * Pagination token to request the next set of results.\n */\n nextToken?: string\n /**\n * A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned.\n * Queue URLs and names are case-sensitive.\n */\n queueNamePrefix?: string\n}\n\nexport interface ListQueuesResponse {\n /**\n * A list of queue URLs, up to 1,000 entries, or the value of MaxResults you sent in the request.\n */\n urls: string[]\n /**\n * Pagination token to include in the next request.\n */\n nextToken?: string\n}\n","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","module.exports = require(\"k6/crypto\");","module.exports = require(\"k6/html\");","module.exports = require(\"k6/http\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { JSONArray, JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's KMS service\n */\nexport class KMSClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a KMSClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'kms')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: awsConfig.region,\n credentials: {\n accessKeyId: awsConfig.accessKeyId,\n secretAccessKey: awsConfig.secretAccessKey,\n sessionToken: awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n // All interactions with the KMS service\n // are made via the GET or POST method.\n this.method = 'POST'\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Gets a list of all the KMS keys in the caller's AWS\n * account and region.\n *\n * @returns an array of all the available keys\n */\n async listKeys(): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n // For some reason, the base target is not kms...\n [AMZ_TARGET_HEADER]: `TrentService.ListKeys`,\n },\n body: JSON.stringify({}),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(KMSOperation.ListKeys, res)\n\n const json: JSONArray = res.json('Keys') as JSONArray\n return json.map((k) => KMSKey.fromJSON(k as JSONObject))\n }\n\n /**\n * GenerateDataKey returns a unique symmetric data key for use outside of AWS KMS.\n *\n * This operation returns a plaintext copy of the data key and a copy that is encrypted under a symmetric encryption KMS key that you specify.\n * The bytes in the plaintext key are random; they are not related to the caller or the KMS key.\n * You can use the plaintext key to encrypt your data outside of AWS KMS and store the encrypted data key with the encrypted data.\n *\n * To generate a data key, specify the symmetric encryption KMS key that will be used to encrypt the data key.\n * You cannot use an asymmetric KMS key to encrypt data keys.\n *\n * Used to generate data key with the KMS key defined\n * @param {string} id - Specifies the symmetric encryption KMS key that encrypts the data key. Use its key ID, key ARN, alias name, or alias ARN.\n * @param {KMKeySize} size - Specifies the length of the data key in bytes. For example, use the value 64 to generate a 512-bit data key (64 bytes is 512 bits). Default is 32, and generates a 256-bit data key.\n * @throws {KMSServiceError}\n * @throws {InvalidSignatureError}\n * @returns {KMSDataKey} - The generated data key.\n */\n async generateDataKey(\n id: string,\n size: KMSKeySize = KMSKeySize.Size256\n ): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n // For some reason, the base target is not kms...\n [AMZ_TARGET_HEADER]: `TrentService.GenerateDataKey`,\n },\n body: JSON.stringify({ KeyId: id, NumberOfBytes: size }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(KMSOperation.GenerateDataKey, res)\n\n return KMSDataKey.fromJSON(res.json() as JSONObject)\n }\n\n _handle_error(operation: KMSOperation, response: RefinedResponse) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new KMSServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new KMSServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/**\n * Class representing a KMS key\n */\nexport class KMSKey {\n /**\n * ARN of the key\n */\n keyArn: string\n\n /**\n * Unique identifier of the key\n */\n keyId: string\n\n constructor(keyArn: string, KeyId: string) {\n this.keyArn = keyArn\n this.keyId = KeyId\n }\n\n static fromJSON(json: JSONObject) {\n return new KMSKey(json.KeyArn as string, json.KeyId as string)\n }\n}\n\n/**\n * Class representing a data key\n */\nexport class KMSDataKey {\n /**\n * The Amazon Resource Name (key ARN) of the KMS key that encrypted the data key.\n */\n id: string\n\n /**\n * The (base64-encoded) encrypted copy of the data key.\n */\n ciphertextBlob: string\n\n /**\n * The plaintext data key.\n * Use this data key to encrypt your data outside of KMS. Then, remove it from memory as soon as possible.\n */\n plaintext: string\n\n constructor(CiphertextBlob: string, KeyId: string, Plaintext: string) {\n this.ciphertextBlob = CiphertextBlob\n this.id = KeyId\n this.plaintext = Plaintext\n }\n\n static fromJSON(json: JSONObject) {\n return new KMSDataKey(\n json.CiphertextBlob as string,\n json.KeyId as string,\n json.Plaintext as string\n )\n }\n}\n\nexport class KMSServiceError extends AWSError {\n operation: KMSOperation\n\n /**\n * Constructs a KMSServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: KMSOperation) {\n super(message, code)\n this.name = 'KMSServiceError'\n this.operation = operation\n }\n}\n\n/**\n * KMSOperation defines all currently implemented KMS Service operations.\n */\nenum KMSOperation {\n GenerateDataKey = 'GenerateDataKey',\n ListKeys = 'ListKeys',\n}\n\n/**\n * KMSKeyLength describes possible key lenght values for KMS API data key operations.\n */\nenum KMSKeySize {\n Size256 = 32,\n Size512 = 64,\n}\n","import { bytes } from 'k6'\nimport { parseHTML } from 'k6/html'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { SignedHTTPRequest } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/** Class allowing to interact with Amazon AWS's S3 service */\nexport class S3Client extends AWSClient {\n private readonly signature: SignatureV4\n\n /**\n * Create a S3Client\n *\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 's3')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: false,\n applyChecksum: true,\n })\n }\n\n /**\n * Returns a list of all buckets owned by the authenticated sender of the request.\n * To use this operation, you must have the s3:ListAllMyBuckets permission.\n *\n * @return {Array.} buckets - An array of objects describing S3 buckets\n * with the following fields: name, and creationDate.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async listBuckets(): Promise> {\n const method = 'GET'\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'GET',\n endpoint: this.endpoint,\n path: '/',\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('ListBuckets', res)\n\n const buckets: Array = []\n\n const doc = parseHTML(res.body as string)\n\n doc.find('Buckets')\n .children()\n .each((_, bucketDefinition) => {\n const bucket = {}\n\n bucketDefinition.children().forEach((child) => {\n switch (child.nodeName()) {\n case 'name':\n Object.assign(bucket, { name: child.textContent() })\n break\n case 'creationdate':\n Object.assign(bucket, {\n creationDate: Date.parse(child.textContent()),\n })\n }\n })\n\n buckets.push(bucket as S3Bucket)\n })\n\n return buckets\n }\n\n /**\n * Returns some or all (up to 1,000) of the objects in a bucket.\n *\n * @param {string} bucketName - Bucket name to list.\n * @param {string?} prefix='' - Limits the response to keys that begin with the specified prefix.\n * @return {Array.} - returns an array of objects describing S3 objects\n * with the following fields: key, lastModified, etag, size and storageClass.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async listObjects(bucketName: string, prefix?: string): Promise> {\n const method = 'GET'\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/`,\n query: {\n 'list-type': '2',\n prefix: prefix || '',\n },\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('ListObjectsV2', res)\n\n const objects: Array = []\n\n // Extract the objects definition from\n // the XML response\n parseHTML(res.body as string)\n .find('Contents')\n .each((_, objectDefinition) => {\n const obj = {}\n\n objectDefinition.children().forEach((child) => {\n switch (child.nodeName()) {\n case 'key':\n Object.assign(obj, { key: child.textContent() })\n break\n case 'lastmodified':\n Object.assign(obj, { lastModified: Date.parse(child.textContent()) })\n break\n case 'etag':\n Object.assign(obj, { etag: child.textContent() })\n break\n case 'size':\n Object.assign(obj, { size: parseInt(child.textContent()) })\n break\n case 'storageclass':\n Object.assign(obj, { storageClass: child.textContent() })\n }\n })\n\n objects.push(obj as S3Object)\n })\n\n return objects\n }\n /**\n * Retrieves an Object from Amazon S3.\n *\n * To use getObject, you must have `READ` access to the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to get.\n * @return {S3Object} - returns the content of the fetched S3 Object.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async getObject(bucketName: string, objectKey: string): Promise {\n // Prepare request\n const method = 'GET'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('GetObject', res)\n\n return new S3Object(\n objectKey,\n Date.parse(res.headers['Last-Modified']),\n res.headers['ETag'],\n parseInt(res.headers['Content-Length']),\n\n // The X-Amz-Storage-Class header is only set if the storage class is\n // not the default 'STANDARD' one.\n (res.headers['X-Amz-Storage-Class'] ?? 'STANDARD') as StorageClass,\n\n res.body\n )\n }\n /**\n * Adds an object to a bucket.\n *\n * You must have WRITE permissions on a bucket to add an object to it.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to put.\n * @param {string | ArrayBuffer} data - the content of the S3 Object to upload.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async putObject(\n bucketName: string,\n objectKey: string,\n data: string | ArrayBuffer,\n params?: PutObjectParams\n ): Promise {\n // Prepare request\n const method = 'PUT'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {\n Host: this.endpoint.host,\n ...(params?.contentDisposition && {\n 'Content-Disposition': params.contentDisposition,\n }),\n ...(params?.contentEncoding && { 'Content-Encoding': params.contentEncoding }),\n ...(params?.contentLength && { 'Content-Length': params.contentLength }),\n ...(params?.contentMD5 && { 'Content-MD5': params.contentMD5 }),\n ...(params?.contentType && { 'Content-Type': params.contentType }),\n },\n body: data,\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error('PutObject', res)\n }\n\n /**\n * Removes the null version (if there is one) of an object and inserts a delete marker,\n * which becomes the latest version of the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async deleteObject(bucketName: string, objectKey: string): Promise {\n // Prepare request\n const method = 'DELETE'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('DeleteObject', res)\n }\n\n /**\n * Copies an object from one bucket to another\n *\n * @param {string} sourceBucket - The source bucket name containing the object.\n * @param {string} sourceKey - Key of the source object to copy.\n * @param {string} destinationBucket - The destination bucket name containing the object.\n * @param {string} destinationKey - Key of the destination object.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async copyObject(\n sourceBucket: string,\n sourceKey: string,\n destinationBucket: string,\n destinationKey: string\n ): Promise {\n const method = 'PUT'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${destinationBucket}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${destinationKey}`,\n headers: {\n 'x-amz-copy-source': `${sourceBucket}/${sourceKey}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n\n this._handle_error('CopyObject', res)\n }\n\n /**\n * Creates a new multipart upload for a given objectKey.\n * The uploadId returned can be used to upload parts to the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to upload.\n * @return {S3MultipartUpload} - returns the uploadId of the newly created multipart upload.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async createMultipartUpload(bucketName: string, objectKey: string): Promise {\n const method = 'POST'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n query: { uploads: '' },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('CreateMultipartUpload', res)\n\n return new S3MultipartUpload(\n objectKey,\n parseHTML(res.body as string)\n .find('UploadId')\n .text()\n )\n }\n\n /**\n * Uploads a part in a multipart upload.\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to upload.\n * @param {string} uploadId - The uploadId of the multipart upload.\n * @param {number} partNumber - The part number of the part to upload.\n * @param {string | ArrayBuffer} data - The content of the part to upload.\n * @return {S3Part} - returns the ETag of the uploaded part.\n * @throws {S3ServiceError}\n */\n async uploadPart(\n bucketName: string,\n objectKey: string,\n uploadId: string,\n partNumber: number,\n data: string | ArrayBuffer\n ): Promise {\n const method = 'PUT'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n body: data,\n query: {\n partNumber: `${partNumber}`,\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('UploadPart', res)\n\n return new S3Part(partNumber, res.headers['Etag'])\n }\n\n /**\n * Completes a multipart upload by assembling previously uploaded parts.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @param {string} uploadId - The uploadId of the multipart upload to complete.\n * @param {S3Part[]} parts - The parts to assemble.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async completeMultipartUpload(\n bucketName: string,\n objectKey: string,\n uploadId: string,\n parts: S3Part[]\n ) {\n // Prepare request\n const method = 'POST'\n const body = `${parts\n .map(\n (part) =>\n `${part.partNumber}${part.eTag}`\n )\n .join('')}`\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n body: body,\n query: {\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n\n this._handle_error('CompleteMultipartUpload', res)\n }\n\n /**\n * Aborts a multipart upload.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @param {string} uploadId - The uploadId of the multipart upload to abort.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async abortMultipartUpload(bucketName: string, objectKey: string, uploadId: string) {\n const method = 'DELETE'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n query: {\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('AbortMultipartUpload', res)\n }\n\n _handle_error(operation: S3Operation, response: RefinedResponse) {\n const status: number = response.status\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n // We consider codes 200-299 as success\n if (status >= 200 && status < 300 && errorMessage == '' && errorCode === 0) {\n return\n }\n\n // A 301 response is returned when the bucket is not found.\n // Generally meaning that either the bucket name is wrong or the\n // region is wrong.\n //\n // See: https://github.com/grafana/k6/issues/2474\n // See: https://github.com/golang/go/issues/49281\n if (status == 301 || (errorMessage && errorMessage.startsWith('301'))) {\n throw new S3ServiceError('Resource not found', 'ResourceNotFound', operation)\n }\n\n const awsError = AWSError.parseXML(response.body as string)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw new S3ServiceError(awsError.message, awsError.code || 'unknown', operation)\n }\n }\n}\n\n/** Class representing a S3 Bucket */\nexport class S3Bucket {\n name: string\n creationDate: Date\n\n /**\n * Create an S3 Bucket\n *\n * @param {string} name - S3 bucket's name\n * @param {Date} creationDate - S3 bucket's creation date\n */\n constructor(name: string, creationDate: Date) {\n this.name = name\n this.creationDate = creationDate\n }\n}\n\n/** Class representing an S3 Object */\nexport class S3Object {\n key: string\n lastModified: number\n etag: string\n size: number\n storageClass: StorageClass\n data?: string | bytes | null\n\n /**\n * Create an S3 Object\n *\n * @param {string} key - S3 object's key\n * @param {Date} lastModified - S3 object last modification date\n * @param {string} etag - S3 object's etag\n * @param {number} size - S3 object's size\n * @param {StorageClass} storageClass - S3 object's storage class\n * @param {string | bytes | null} data=null - S3 Object's data\n */\n constructor(\n key: string,\n lastModified: number,\n etag: string,\n size: number,\n storageClass: StorageClass,\n data?: string | bytes | null\n ) {\n this.key = key\n this.lastModified = lastModified\n this.etag = etag\n this.size = size\n this.storageClass = storageClass\n this.data = data\n }\n}\n\n/** Class representing a S3 Multipart Upload */\nexport class S3MultipartUpload {\n key: string\n uploadId: string\n\n /**\n * Create an S3 Multipart Upload\n * @param {string} key - S3 object's key\n * @param {string} uploadId - S3 multipart upload id\n */\n\n constructor(key: string, uploadId: string) {\n this.key = key\n this.uploadId = uploadId\n }\n}\n\n/** Class representing a S3 Part */\nexport class S3Part {\n partNumber: number\n eTag: string\n\n /**\n * Create an S3 Part\n * @param {number} partNumber - Part number\n * @param {string} eTag - Part's etag\n */\n\n constructor(partNumber: number, eTag: string) {\n this.partNumber = partNumber\n this.eTag = eTag\n }\n}\n\n/**\n * Error indicating a S3 operation failed\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class S3ServiceError extends AWSError {\n operation: string\n\n /**\n * Constructs a S3ServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: string) {\n super(message, code)\n this.name = 'S3ServiceError'\n this.operation = operation\n }\n}\n\n/**\n * S3Operation describes possible values for S3 API operations,\n * as defined by AWS APIs.\n */\ntype S3Operation =\n | 'ListBuckets'\n | 'ListObjectsV2'\n | 'GetObject'\n | 'PutObject'\n | 'DeleteObject'\n | 'CopyObject'\n | 'CreateMultipartUpload'\n | 'CompleteMultipartUpload'\n | 'UploadPart'\n | 'AbortMultipartUpload'\n\n/**\n * Describes the class of storage used to store a S3 object.\n */\ntype StorageClass =\n | 'STANDARD'\n | 'REDUCED_REDUNDANCY'\n | 'GLACIER'\n | 'STANDARD_IA'\n | 'INTELLIGENT_TIERING'\n | 'DEEP_ARCHIVE'\n | 'OUTPOSTS'\n | 'GLACIER_IR'\n | undefined\n\n/**\n * PutObjectParams describes the parameters that can be passed to the PutObject operation.\n */\nexport interface PutObjectParams {\n /**\n * Specifies presentational information for the object.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.\n */\n contentDisposition?: string\n\n /**\n * Specifies what content encodings have been applied to the object and thus\n * what decoding mechanisms must be applied to obtain the media-type referenced\n * by the ContentType option.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.\n */\n contentEncoding?: string\n\n /**\n * Size of the body in bytes. This parameter is useful when the size of the body cannot be\n * determined automatically.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.\n */\n contentLength?: string\n\n /**\n * The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864.\n * This header can be used as a message integrity check to verify that the data is the same data that\n * was originally sent.\n *\n * Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity\n * check.\n */\n contentMD5?: string\n\n /**\n * A standard MIME type describing the format of the contents.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.\n */\n contentType?: string\n}\n","import { JSONArray, JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { v4 as uuidv4 } from 'uuid'\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's SecretsManager service\n */\nexport class SecretsManagerClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a SecretsManagerClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'secretsmanager')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n // All interactions with the Secrets Manager service\n // are made via the GET or POST method.\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Returns a list of all secrets owned by the authenticated sender of the request.\n * To use this operation, you must have the secretsmanager:ListSecrets permission.\n *\n * @return {Array.} secrets - An array of objects describing Secret Manager's secrets\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async listSecrets(): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.ListSecrets`,\n },\n body: JSON.stringify({}),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.ListSecrets, res)\n const json: JSONArray = res.json('SecretList') as JSONArray\n\n return json.map((s) => Secret.fromJSON(s as JSONObject))\n }\n\n /**\n * Retrieves a secret from Amazon Sercets Manager\n *\n * @param {string} id - The ARN or name of the secret to retrieve.\n * @returns {Secret} - returns the content of the fetched Secret object.\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async getSecret(id: string): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.GetSecretValue`,\n },\n body: JSON.stringify({ SecretId: id }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n\n this._handle_error(SecretsManagerOperation.GetSecretValue, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n\n /**\n * Creates a new secret\n *\n * Note that this method only supports string-based values at the moment.\n *\n * @param {string} name - The name of the new secret.\n * The secret name can contain ASCII letters, numbers, and the following characters: /_+=.@\n * @param {string} secret - The text data to encrypt and store in this new version of the secret.\n * @param {string} description - The description of the secret.\n * @param {string} versionID=null - Version of the secret. This value helps ensure idempotency.\n * As a default, if no versionID is provided, one will be created for you using the UUID v4\n * algorithm.\n * @param {Array.} tags=[] - A list of tags to attach to the secret. Each tag is a key and\n * value pair of strings in a JSON text string. Note that tag key names are case sensitive.\n * @returns {Secret} - returns the created secret\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async createSecret(\n name: string,\n secret: string,\n description: string,\n versionID?: string,\n tags?: Array\n ): Promise {\n versionID = versionID || uuidv4()\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.CreateSecret`,\n },\n body: JSON.stringify({\n Name: name,\n Description: description,\n SecretString: secret,\n ClientRequestToken: versionID,\n Tags: tags,\n }),\n },\n {}\n )\n\n // Ensure to include the desired 'Action' in the X-Amz-Target\n // header field, as documented by the AWS API docs.\n // headers['X-Amz-Target'] = `${this.serviceName}.CreateSecret`\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.CreateSecret, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n /**\n * Update a secret's value.\n *\n * Note that this method only support string-based values at the moment.\n *\n * @param {string} id - The ARN or name of the secret to update.\n * @param {string} secret - The text data to encrypt and store in this new version of the secret.\n * @param {} versionID=null - A unique identifier for the new version of the secret. This value helps ensure idempotency.\n * As a default, if no versionID is provided, one will be created for you using the UUID v4\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async putSecretValue(id: string, secret: string, versionID?: string): Promise {\n versionID = versionID || uuidv4()\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.PutSecretValue`,\n },\n body: JSON.stringify({\n SecretId: id,\n SecretString: secret,\n ClientRequestToken: versionID,\n }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.PutSecretValue, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n\n /**\n * Deletes a secret and all of its versions.\n *\n * You can specify a recovery window during which you can restore the secret.\n * The minimum recovery window is 7 days. The default recovery window is 30 days.\n *\n * @param {string} secretID - The ARN or name of the secret to delete.\n * @param {number} recoveryWindow - The number of days from 7 to 30 that Secrets Manager\n * waits before permanently deleting the secret.\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async deleteSecret(\n id: string,\n { recoveryWindow = 30, noRecovery = false }: { recoveryWindow: number; noRecovery: boolean }\n ): Promise {\n const payload: { [key: string]: string | boolean | number } = {\n SecretId: id,\n }\n\n // noRecovery and recoveryWindow are exclusive parameters\n if (noRecovery === true) {\n payload['ForceDeleteWithoutRecovery'] = true\n } else {\n payload['RecoveryWindowInDays'] = recoveryWindow\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.DeleteSecret`,\n },\n body: JSON.stringify(payload),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.DeleteSecret, res)\n }\n\n _handle_error(\n operation: SecretsManagerOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new SecretsManagerServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new SecretsManagerServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n// TODO: create a Tags type\n\n/**\n * Class representing a Secret Manager's secret\n */\nexport class Secret {\n name: string\n arn: string\n secret: string\n createdDate: number\n lastAccessedDate: number\n lastChangedDate: number\n tags: Array<{ [key: string]: string }>\n\n /**\n * Constructs a Secret Manager's Secret\n *\n * @param {string} name - The friendly name of the secret.\n * @param {string} arn - The ARN of the secret.\n * @param {number} createdDate - The date and time that this version of the secret was created.\n * @param {number} lastAccessedDate - The last date that this secret was accessed. This value is\n * truncated to midnight of the date and therefore shows only the date, not the time.\n * @param {number} lastChangedDate - The last date and time that this secret was modified in any way.\n * @param {Array.} tags - The list of user-defined tags associated with the secret.\n */\n constructor(\n name: string,\n arn: string,\n secretString: string,\n createdDate: number,\n lastAccessedDate: number,\n lastChangedDate: number,\n tags: Array<{ [key: string]: string }> = []\n ) {\n this.name = name\n this.arn = arn\n this.secret = secretString\n this.createdDate = createdDate\n this.lastAccessedDate = lastAccessedDate\n this.lastChangedDate = lastChangedDate\n this.tags = tags\n }\n\n /**\n * Parses and constructs a Secret Manager's Secret from the content\n * of a JSON response returned by the AWS service\n *\n * @param {Object} json - JSON object as returned and parsed from\n * the AWS service's API call.\n * @returns {Secret}\n */\n static fromJSON(json: JSONObject) {\n return new Secret(\n json.Name as string,\n json.ARN as string,\n json.SecretString as string,\n json.CreatedDate as number,\n json.LastAccessedDate as number,\n json.LastChangedDate as number,\n json.Tags as Array<{ [key: string]: string }>\n )\n }\n}\n\nexport class SecretsManagerServiceError extends AWSError {\n operation: SecretsManagerOperation\n\n /**\n * Constructs a SecretsManagerServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: SecretsManagerOperation) {\n super(message, code)\n this.name = 'SecretsManagerServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SecretsManagerOperation defines all currently implemented Secrets Manager Service operations.\n */\nenum SecretsManagerOperation {\n ListSecrets = 'ListSecrets',\n GetSecretValue = 'GetSecretValue',\n CreateSecret = 'CreateSecret',\n PutSecretValue = 'PutSecretValue',\n DeleteSecret = 'DeleteSecret',\n}\n","import { JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's Systems Manager service\n */\nexport class SystemsManagerClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a SystemsManagerClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'ssm')\n\n // All interactions with the Systems Manager service\n // are made via the POST method.\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: awsConfig.region,\n credentials: {\n accessKeyId: awsConfig.accessKeyId,\n secretAccessKey: awsConfig.secretAccessKey,\n sessionToken: awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n }\n\n /**\n * Retrieves a parameter from Amazon Systems Manager\n *\n * @param {string} name - The ARN or name of the parameter to retrieve.\n * @param {boolean} withDecryption - whether returned secure string parameters should be decrypted.\n * @returns {SystemsManagerParameter} - returns the fetched Parameter object.\n * @throws {SystemsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async getParameter(\n name: string,\n withDecryption: boolean = false\n ): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AmazonSSM.GetParameter`,\n },\n body: JSON.stringify({ Name: name, WithDecryption: withDecryption }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SystemsManagerOperation.GetParameter, res)\n\n return SystemsManagerParameter.fromJSON(res.json() as JSONObject)\n }\n\n _handle_error(\n operation: SystemsManagerOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new SystemsManagerServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new SystemsManagerServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/**\n * Class representing a Systems Manager's Parameter\n */\nexport class SystemsManagerParameter {\n /**\n * The Amazon Resource Name (ARN) of the parameter.\n */\n arn: string\n\n /**\n * The data type of the parameter, such as text or aws:ec2:image.\n * The default is text.\n */\n dataType: string\n\n /**\n * Date the parameter was last changed or updated and the parameter version was created.\n */\n lastModifiedDate: number\n\n /**\n * The friendly name of the parameter.\n */\n name: string\n\n /**\n * Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:\n * parameter_name:version\n * parameter_name:label\n */\n selector: string\n\n /**\n * plies to parameters that reference information in other AWS services. SourceResult is the raw result or response from the source.\n */\n sourceResult: string\n\n /**\n * The type of parameter. Valid values include the following: String, StringList, and SecureString.\n */\n type: string\n\n /**\n * The parameter value.\n */\n value: string\n\n /**\n * The parameter version.\n */\n version: number\n\n /**\n * Constructs a Systems Manager's Parameter\n *\n * @param {string} arn - The Amazon Resource Name (ARN) of the parameter.\n * @param {string} dataType - The data type of the parameter, such as text or aws:ec2:image. The default is text.\n * @param {number} lastModifiedDate - Date the parameter was last changed or updated and the parameter version was created.\n * @param {string} name - The friendly name of the parameter.\n * @param {string} selector - Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:\n * parameter_name:version\n * parameter_name:label\n * @param {string} sourceResult - Applies to parameters that reference information in other AWS services. SourceResult is the raw result or response from the source.\n * @param {string} type - The type of parameter. Valid values include the following: String, StringList, and SecureString.\n * @param {string} value - The parameter value.\n * @param {number} version - The parameter version.\n */\n constructor(\n arn: string,\n dataType: string,\n lastModifiedDate: number,\n name: string,\n selector: string,\n sourceResult: string,\n type: string,\n value: string,\n version: number\n ) {\n this.arn = arn\n this.dataType = dataType\n this.lastModifiedDate = lastModifiedDate\n this.name = name\n this.selector = selector\n this.sourceResult = sourceResult\n this.type = type\n this.value = value\n this.version = version\n }\n\n /**\n * Parses and constructs a Systems Manager's Parameter from the content\n * of a JSON response returned by the AWS service\n *\n * @param {Object} json - JSON object as returned and parsed from\n * the AWS service's API call.\n * @returns {SystemsManagerParameter}\n */\n static fromJSON(json: JSONObject): SystemsManagerParameter {\n const parameter = json.Parameter as JSONObject\n\n return new SystemsManagerParameter(\n parameter.ARN as string,\n parameter.DataType as string,\n parameter.LastModifiedDate as number,\n parameter.Name as string,\n parameter.Selector as string,\n parameter.SourceResult as string,\n parameter.Type as string,\n parameter.Value as string,\n parameter.Version as number\n )\n }\n}\n\nexport class SystemsManagerServiceError extends AWSError {\n operation: SystemsManagerOperation\n\n /**\n * Constructs a SystemsManagerServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {SystemsManagerOperation} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: SystemsManagerOperation) {\n super(message, code)\n this.name = 'SystemsManagerServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SystemsManagerOperation defines all currently implemented Systems Manager operations.\n */\nenum SystemsManagerOperation {\n GetParameter = 'GetParameter',\n}\n","import http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\n\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { JSONObject } from './json'\nimport { HTTPHeaders } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\nThis API is based on\nhttps://docs.aws.amazon.com/kinesis/latest/APIReference/API_Operations.html\n*/\n\n/**\n * Allows interacting with the Kinesis API.\n */\nexport class KinesisClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n private readonly serviceVersion: string\n\n /**\n * A constructor function that creates a new instance of the Kinesis class.\n * @param {AWSConfig} awsConfig - AWSConfig - This is the configuration object that is passed to\n * the constructor.\n * @returns A Proxy object.\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'kinesis')\n\n this.serviceVersion = 'Kinesis_20131202'\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: false,\n applyChecksum: true,\n })\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Creates a new Kinesis stream with the specified name and options.\n *\n * @param {string} streamName - The name of the stream to create.\n * @param {{\n * shardCount?: number;\n * streamModeDetails?: {\n * streamMode: StreamMode;\n * };\n * }} [options={}] - An optional object containing configuration options for the stream.\n * @param {number} [options.shardCount] - The number of shards for the stream. If not provided, the default value will be used.\n * @param {{streamMode: StreamMode}} [options.streamModeDetails] - An optional object containing the stream mode details.\n * @param {StreamMode} [options.streamModeDetails.streamMode] - The mode of the stream. If not provided, the default mode will be used.\n *\n * @throws {Error} Throws an error if the stream creation request fails.\n * @returns {void}\n */\n async createStream(\n streamName: string,\n options: { shardCount?: number; streamModeDetails?: { streamMode: StreamMode } } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(options.shardCount && { ShardCount: options.shardCount }),\n ...(options.streamModeDetails && { StreamMode: options.streamModeDetails.streamMode }),\n }\n\n await this._send_request('CreateStream', body)\n }\n\n /**\n * Deletes a Kinesis stream with the specified parameters.\n *\n * @param {string} streamName - The name of the stream to delete.\n * @param {{\n * streamARN?: string;\n * enforceConsumerDeletion?: boolean;\n * }} [parameters={}] - An optional object containing configuration options for the stream deletion.\n * @param {string} [parameters.streamARN] - The Amazon Resource Name (ARN) of the stream. If not provided, the ARN will be derived from the stream name.\n * @param {boolean} [parameters.enforceConsumerDeletion] - Whether to enforce the deletion of all registered consumers before deleting the stream. Defaults to false.\n *\n * @throws {Error} Throws an error if the stream deletion request fails.\n * @returns {void}\n */\n async deleteStream(\n streamName: string,\n parameters: { streamARN?: string; enforceConsumerDeletion?: boolean } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n ...(parameters.enforceConsumerDeletion && {\n EnforceConsumerDeletion: parameters.enforceConsumerDeletion,\n }),\n }\n\n await this._send_request('DeleteStream', body)\n }\n\n /**\n * Returns a list of Kinesis streams with the specified parameters.\n *\n * @param {{\n * exclusiveStartStreamName?: string;\n * limit?: number;\n * nextToken?: string;\n * }} [parameters={}] - An optional object containing configuration options for listing the streams.\n * @param {string} [parameters.exclusiveStartStreamName] - The name of the stream to start listing from. If not provided, the listing starts from the beginning.\n * @param {number} [parameters.limit] - The maximum number of streams to list. If not provided, the default value will be used.\n * @param {string} [parameters.nextToken] - A token to paginate the list of streams. If not provided, the first page will be returned.\n *\n * @throws {Error} Throws an error if the list streams request fails.\n * @returns {Partial} A partial of the ListStreamsResponse class.\n */\n async listStreams(\n parameters: {\n exclusiveStartStreamName?: string\n limit?: number\n nextToken?: string\n } = {}\n ): Promise {\n const body = {\n ...(parameters.exclusiveStartStreamName && {\n ExclusiveStartStreamName: parameters.exclusiveStartStreamName,\n }),\n ...(parameters.limit && { Limit: parameters.limit }),\n ...(parameters.nextToken && { NextToken: parameters.nextToken }),\n }\n\n const res = await this._send_request('ListStreams', body)\n return ListStreamsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Sends multiple records to a Kinesis stream in a single request.\n *\n * @param {string} streamName - The name of the stream to put records into.\n * @param {PutRecordsRequestEntry[]} records - An array of records to put into the stream.\n *\n * @throws {Error} Throws an error if the put records request fails.\n * @returns {Partial} A partial of the PutRecordsResponse class.\n */\n async putRecords(\n records: PutRecordsRequestEntry[],\n parameters: { streamName?: string; streamARN?: string } = {}\n ): Promise {\n if (!parameters.streamName && !parameters.streamARN) {\n throw new Error('Either streamName or streamARN must be provided')\n }\n\n const body = {\n Records: records,\n ...(parameters.streamName && { StreamName: parameters.streamName }),\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n }\n\n const res = await this._send_request('PutRecords', body)\n return PutRecordsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Retrieves records from a Kinesis stream.\n *\n * @param {string} shardIterator - The shard iterator to start retrieving records from.\n * @param {number} [limit] - The maximum number of records to return. If not provided, the default value will be used.\n *\n * @throws {Error} Throws an error if the get records request fails.\n * @returns {Partial} A partial of the GetRecordsResponse class.\n */\n async getRecords(\n shardIterator: string,\n parameters: { limit?: number; streamARN?: string } = {}\n ): Promise {\n const body = {\n ShardIterator: shardIterator,\n ...(parameters.limit && { Limit: parameters.limit }),\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n }\n\n const res = await this._send_request('GetRecords', body)\n return GetRecordsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Lists the shards in a Kinesis stream.\n *\n * @param {string} streamName - The name of the stream to list shards from.\n * @param {{\n * nextToken?: string;\n * maxResults?: number;\n * }} [parameters={}] - An optional object containing configuration options for listing shards.\n * @param {string} [parameters.nextToken] - A token to specify where to start paginating the shard list. If not provided, the first page will be returned.\n * @param {number} [parameters.maxResults] - The maximum number of shards to return. If not provided, the default value will be used.\n *\n * @throws {Error} Throws an error if the list shards request fails.\n * @returns {ListShardsResponse} A ListShardsResponse class instance.\n */\n async listShards(\n streamName: string,\n parameters: { nextToken?: string; maxResults?: number } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(parameters.nextToken && { NextToken: parameters.nextToken }),\n ...(parameters.maxResults && {\n MaxResults: parameters.maxResults,\n }),\n }\n\n const res = await this._send_request('ListShards', body)\n return ListShardsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Retrieves a shard iterator for the specified shard in a Kinesis stream.\n *\n * @param {string} streamName - The name of the stream.\n * @param {string} shardId - The shard ID for which to get the iterator.\n * @param {string} shardIteratorType - The shard iterator type. One of 'AT_SEQUENCE_NUMBER', 'AFTER_SEQUENCE_NUMBER', 'TRIM_HORIZON', 'LATEST', or 'AT_TIMESTAMP'.\n * @param {{\n * startingSequenceNumber?: string;\n * timestamp?: number;\n * }} [parameters={}] - An optional object containing configuration options for the shard iterator.\n * @param {string} [parameters.startingSequenceNumber] - The sequence number to start with when using 'AT_SEQUENCE_NUMBER' or 'AFTER_SEQUENCE_NUMBER' iterator types.\n * @param {number} [parameters.timestamp] - The timestamp to start with when using the 'AT_TIMESTAMP' iterator type.\n *\n * @throws {Error} Throws an error if the get shard iterator request fails.\n * @returns {string} The next position in the shard from which to start sequentially reading data records. If set to null, the shard has been closed and the requested iterator does not return any more data.\n */\n async getShardIterator(\n streamName: string,\n shardId: string,\n shardIteratorType: ShardIteratorKind,\n parameters: { startingSequenceNumber?: string; timestamp?: number } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ShardId: shardId,\n ShardIteratorType: shardIteratorType,\n ...(parameters.startingSequenceNumber && {\n StartingSequenceNumber: parameters.startingSequenceNumber,\n }),\n ...(parameters.timestamp && { Timestamp: parameters.timestamp }),\n }\n\n const res = await this._send_request('GetShardIterator', body)\n return GetShardIteratorResponse.fromJson(res?.json() as JSONObject)\n }\n\n private async _send_request(\n action: string,\n body: unknown\n ): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceVersion}.${action}`,\n },\n body: JSON.stringify(body),\n },\n {}\n )\n\n const res = await http.asyncRequest('POST', signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n\n this._handle_error(action, res)\n return res\n }\n\n /**\n * If the response is an error, throw an error\n *\n * @param {string} operation - The name of the operation that was called.\n * @param response - RefinedResponse\n * @returns The response is being returned.\n */\n _handle_error(operation: string, response: RefinedResponse) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new KinesisServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new KinesisServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/* `KinesisServiceError` is a subclass of `AWSError` that adds an `operation` property */\nexport class KinesisServiceError extends AWSError {\n operation: string\n\n /**\n * Constructs a KinesisServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: string) {\n super(message, code)\n this.name = 'KinesisServiceError'\n this.operation = operation\n }\n}\n\n/**\n * Describes the options for a Kinesis stream.\n */\ntype StreamMode = 'PROVISIONED' | 'ON_DEMAND'\n\n/**\n * Determines how the shard iterator is used to start reading data records from the shard.\n */\nexport type ShardIteratorKind =\n | 'AT_SEQUENCE_NUMBER'\n | 'AFTER_SEQUENCE_NUMBER'\n | 'TRIM_HORIZON'\n | 'LATEST'\n | 'AT_TIMESTAMP'\n\n/**\n * Describes the status of a Kinesis data stream.\n */\nexport type StreamStatus = 'CREATING' | 'DELETING' | 'ACTIVE' | 'UPDATING'\n\nexport type StreamModeDetails = {\n /**\n * Specifies the capacity mode to which you want to set your data stream.\n */\n SteamMode: 'PROVISIONED' | 'ON_DEMAND'\n}\n\nexport class ListStreamsResponse {\n /**\n * Indicates whether there are more streams available to list.\n */\n hasMoreStreams: boolean\n\n /**\n * The token that identifies which batch of results you can retrieve.\n */\n nextToken?: string\n\n /**\n * The names of the streams that are associated with the AWS account making the ListStreams request.\n */\n streamNames: string[]\n\n /**\n * A list of StreamSummary objects.\n */\n streamSummaries: StreamSummary[]\n\n constructor(\n HasMoreStreams: boolean,\n NextToken: string,\n StreamNames: string[],\n StreamSummaries: StreamSummary[]\n ) {\n this.hasMoreStreams = HasMoreStreams\n this.nextToken = NextToken\n this.streamNames = StreamNames\n this.streamSummaries = StreamSummaries\n }\n\n static fromJson(result: JSONObject): ListStreamsResponse {\n const {\n HasMoreStreams = false,\n NextToken = '',\n StreamNames = [],\n StreamSummaries = [],\n } = result\n\n return new ListStreamsResponse(\n HasMoreStreams as boolean,\n NextToken as string,\n StreamNames as string[],\n (StreamSummaries as JSONObject[])?.map(StreamSummary.fromJson) as StreamSummary[]\n )\n }\n}\n\n/**\n * Summarizes a Stream\n */\nexport class StreamSummary {\n /**\n * The Amazon Resource Name (ARN) for the stream.\n */\n streamARN: string\n\n /**\n * The time at which the stream was created.\n */\n streamCreationTimestamp: number\n\n /**\n * Specify the capacity mode to which you want to set your data stream.\n */\n streamModeDetails: StreamModeDetails\n\n /**\n * The name of the stream.\n */\n streamName: string\n\n /**\n * The current status of the stream being described.\n */\n streamStatus: StreamStatus\n\n constructor(\n StreamARN: string,\n StreamCreationTimestamp: number,\n StreamMode: StreamModeDetails,\n StreamName: string,\n StreamStatus: StreamStatus\n ) {\n this.streamARN = StreamARN\n this.streamCreationTimestamp = StreamCreationTimestamp\n this.streamModeDetails = StreamMode\n this.streamName = StreamName\n this.streamStatus = StreamStatus\n }\n\n static fromJson(summary: JSONObject): StreamSummary {\n const {\n StreamARN = '',\n StreamCreationTimestamp = 0,\n StreamModeDetails = {},\n StreamName = '',\n StreamStatus = '',\n } = summary\n\n return new StreamSummary(\n StreamARN as string,\n StreamCreationTimestamp as number,\n StreamModeDetails as StreamModeDetails,\n StreamName as string,\n StreamStatus as StreamStatus\n )\n }\n}\n\n/**\n * Represents the output for PutRecords.\n */\nexport interface PutRecordsRequestEntry {\n /**\n * The data blob to put into the record, which is base64-encoded when the blob is serialized.\n */\n Data: string | ArrayBuffer\n\n /**\n * Determines which share in the stream the data record is assigned to.\n */\n PartitionKey: string\n}\n\n// Response class for PutRecords API\nexport class PutRecordsResponse {\n /**\n * The encryption type used on the records. This parameter can be one of the following values:\n * - NONE: Do not encrypt the records.\n * - KMS: Use server-side encryption on the records using a customer-managed AWS KMS key.\n */\n encryptionType: EncryptionType\n\n /**\n * The number of unsuccessfully processed records in a PutRecords request.\n */\n failedRecordCount: number\n\n /**\n * An array of successfully and unsuccessfully processed record results.\n */\n records: PutRecordsResultEntry[]\n\n constructor(\n encryptionType: 'NONE' | 'KMS',\n failedRecordCount: number,\n records: PutRecordsResultEntry[]\n ) {\n this.encryptionType = encryptionType\n this.failedRecordCount = failedRecordCount\n this.records = records\n }\n\n static fromJson(json: JSONObject): PutRecordsResponse {\n const { EncryptionType = 'NONE', FailedRecordCount = 0, Records = [] } = json\n const records = (Records as JSONObject[]).map(PutRecordsResultEntry.fromJson)\n\n return new PutRecordsResponse(\n EncryptionType as EncryptionType,\n FailedRecordCount as number,\n records\n )\n }\n}\n\ntype EncryptionType = 'NONE' | 'KMS'\n\n/**\n * Represents the result of an individual record from a PutRecords request.\n */\nexport class PutRecordsResultEntry {\n /**\n * The sequence number for an individual record result.\n */\n sequenceNumber: string\n\n /**\n * The shard ID for an individual record result.\n */\n shardId: string\n\n constructor(sequenceNumber: string, shardId: string) {\n this.sequenceNumber = sequenceNumber\n this.shardId = shardId\n }\n\n static fromJson(json: JSONObject): PutRecordsResultEntry {\n return new PutRecordsResultEntry(json.SequenceNumber as string, json.ShardId as string)\n }\n}\n\n/**\n * Represents the response format of the GetRecords operation.\n */\nexport class GetRecordsResponse {\n /**\n * The next position in the shard from which to start sequentially reading data records.\n */\n nextShardIterator: string\n\n /**\n * The data records retrieved from the shard.\n */\n records: Record[]\n\n /**\n * The number of milliseconds the GetRecords response is from the\n * tip of the stream, indicating how far behind current time the\n * consumer is.\n *\n * A value of zero indicates that record processing is caught\n * up, and there are no new records to process at this moment.\n */\n millisBehindLatest: number\n\n constructor(nextShardIterator: string, records: Record[], millisBehindLatest: number) {\n this.nextShardIterator = nextShardIterator\n this.records = records\n this.millisBehindLatest = millisBehindLatest\n }\n\n static fromJson(json: JSONObject): GetRecordsResponse {\n const { NextShardIterator = '', Records = [], MillisBehindLatest = 0 } = json\n const records = (Records as JSONObject[]).map(Record.fromJson)\n\n return new GetRecordsResponse(\n NextShardIterator as string,\n records as Record[],\n MillisBehindLatest as number\n )\n }\n}\n\n/**\n * The unit of data of the Kinesis data stream, which is composed of a sequence\n * number, a partition key, and a data blob.\n */\nclass Record {\n /**\n * The data blob.\n */\n data: string | ArrayBuffer\n\n /**\n * Identifies which shard in the stream the data record is assigned to.\n */\n partitionKey: string\n\n /**\n * The unique identifier of the record in the stream.\n */\n sequenceNumber: string\n\n constructor(data: string | ArrayBuffer, partitionKey: string, sequenceNumber: string) {\n this.data = data\n this.partitionKey = partitionKey\n this.sequenceNumber = sequenceNumber\n }\n\n static fromJson(json: JSONObject): Record {\n return new Record(\n json.Data as string | ArrayBuffer,\n json.PartitionKey as string,\n json.SequenceNumber as string\n )\n }\n}\n\n// Response class for ListShards API\nexport class ListShardsResponse {\n /**\n * An array of JSON objects.\n *\n * Each object represents one shard and specifies the IDs of the shard, the\n * shard's parent, and the shard that's adjacent to the shard's parent.\n */\n shards: Shard[]\n\n /**\n * When the number of shards in the data stream is greater than the\n * default value for the MaxResults parameter, or if you explicitly specify\n * a value for MaxResults that is less than the number of shards in the data\n * stream, the response includes a pagination token named NextToken.\n */\n nextToken?: string\n\n constructor(shards: Shard[], nextToken?: string) {\n this.shards = shards\n this.nextToken = nextToken\n }\n\n static fromJson(json: JSONObject): ListShardsResponse {\n const { Shards = [], NextToken } = json\n const shards = (Shards as JSONObject[]).map(Shard.fromJson)\n\n return new ListShardsResponse(shards, NextToken as string | undefined)\n }\n}\n\n/**\n * A uniquely identified group of data records in a Kinesis data stream.\n */\nexport class Shard {\n /**\n * The unique identifier of the shard within the stream.\n */\n id: string\n\n /**\n * The shard ID of the shard's parent.\n */\n parentShardId?: string\n\n /**\n * The shard ID of the shard adjacent to the shard's parent.\n */\n adjacentParentShardId?: string\n\n /**\n * The range of possible hash key values for the shard, which is a set of ordered contiguous positive integers.\n */\n hashKeyRange: HashKeyRange\n\n sequenceNumberRange: SequenceNumberRange\n\n constructor(\n id: string,\n hashKeyRange: HashKeyRange,\n sequenceNumberRange: SequenceNumberRange,\n parentShardId?: string,\n adjacentParentShardId?: string\n ) {\n this.id = id\n this.parentShardId = parentShardId\n this.adjacentParentShardId = adjacentParentShardId\n this.hashKeyRange = hashKeyRange\n this.sequenceNumberRange = sequenceNumberRange\n }\n\n static fromJson(json: JSONObject): Shard {\n return new Shard(\n json.ShardId as string,\n json.HashKeyRange as unknown as HashKeyRange,\n json.SequenceNumberRange as unknown as SequenceNumberRange,\n json.ParentShardId as string | undefined,\n json.AdjacentParentShardId as string | undefined\n )\n }\n}\n\n/**\n * Describes the range of possible hash key values for the shard, which is\n * a set of ordered contiguous positive integers.\n */\nexport interface HashKeyRange {\n /**\n * The starting hash key of the hash key range.\n */\n startingHashKey: string\n\n /**\n * The ending hash key of the hash key range.\n */\n endingHashKey: string\n}\n\n/**\n * The range of possible sequence numbers for the shard.\n */\nexport interface SequenceNumberRange {\n /**\n * The ending sequence number for the range.\n *\n * Shards that are in the OPEN state have an ending sequence number of null.\n */\n endingSequenceNumber?: string\n\n /**\n * The starting sequence number for the range.\n */\n startingSequenceNumber: string\n}\n\n/**\n * Describes a shard iterator response.\n */\nclass GetShardIteratorResponse {\n /**\n * The position in the shard from which to start reading data records sequentially.\n */\n shardIterator: string\n\n constructor(shardIterator: string) {\n this.shardIterator = shardIterator\n }\n\n static fromJson(json: JSONObject): GetShardIteratorResponse {\n return new GetShardIteratorResponse(json.ShardIterator as string)\n }\n}\n","import http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { JSONObject } from './json'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { HTTPHeaders, HTTPMethod } from './http'\n\n/**\n * Class allowing to interact with Amazon AWS's Event Bridge service\n */\nexport class EventBridgeClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'events')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Sends custom events to Amazon EventBridge so that they can be matched to rules.\n *\n * @param {PutEventsInput} input - The input for the PutEvents operation.\n * @throws {EventBridgeServiceError}\n * @throws {InvalidSignatureError}\n */\n async putEvents(input: PutEventsInput) {\n const parsedEvent = {\n ...input,\n Entries: input.Entries.map((entry) => ({\n ...entry,\n Detail: JSON.stringify(entry.Detail),\n })),\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AWSEvents.PutEvents`,\n },\n body: JSON.stringify(parsedEvent),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(EventBridgeOperation.PutEvents, res)\n }\n\n _handle_error(\n operation: EventBridgeOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new EventBridgeServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new EventBridgeServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\nenum EventBridgeOperation {\n PutEvents = 'PutEvents',\n}\n\n/**\n * Represents an event to be submitted.\n *\n * @typedef {Object} PutEventEntry\n *\n * @property {string} Detail - A valid serialized JSON object. There is no other schema imposed. The JSON object may contain fields and nested sub-objects.\n * @property {string} DetailType - Free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.\n * @property {string} EventBusName - The name or ARN of the event bus to receive the event. Only the rules that are associated with this event bus are used to match the event. If you omit this, the default event bus is used.\n * @property {string[]} Resources - AWS resources, identified by Amazon Resource Name (ARN), which the event primarily concerns. Any number, including zero, may be present.\n * @property {string} Source - The source of the event.\n */\ninterface PutEventEntry {\n Source: string\n Detail: JSONObject\n DetailType: string\n EventBusName?: string\n Resources?: [string]\n}\n\n/**\n * Represents the input for a put events operation.\n *\n * @typedef {Object} PutEventsInput\n *\n * @property {string} [EndpointId] - The optional URL subdomain of the endpoint.\n * @property {PutEventEntry[]} Entries - An array of entries that defines an event in your system.\n */\ninterface PutEventsInput {\n EndpointId?: string\n Entries: PutEventEntry[]\n}\n\nexport class EventBridgeServiceError extends AWSError {\n operation: EventBridgeOperation\n\n /**\n * Constructs a EventBridgeServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: EventBridgeOperation) {\n super(message, code)\n this.name = 'EventBridgeServiceError'\n this.operation = operation\n }\n}\n"],"names":["AWSClient","awsConfig","serviceName","_classCallCheck","_defineProperty","this","undefined","endpoint","_endpoint","key","get","Endpoint","concat","region","set","AWSConfig","options","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","value","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","AMZ_ALGORITHM_QUERY_PARAM","AMZ_CREDENTIAL_QUERY_PARAM","AMZ_DATE_QUERY_PARAM","AMZ_EXPIRES_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_SIGNED_HEADERS_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","MAX_PRESIGNED_TTL","EMPTY_SHA256","UNSIGNED_PAYLOAD","completeUrl","startsWith","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","_protocol","slice","_hostname","_port","parseInt","href","_value$split2","hostname","port","protocol","host","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","NetworkError","_Error2","_this2","hasHeader","soughtHeader","_i","_Object$keys","Object","keys","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","isArrayBuffer","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","prototype","call","toFormUrlEncoded","form","params","require","_regeneratorRuntime","t","r","hasOwnProperty","o","defineProperty","i","Symbol","a","iterator","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","self","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","obj","toPrimitive","String","_toPrimitive","LambdaClient","_AWSClient","commonHeaders","fn","_callee","payload","invocationType","signedRequest","res","logResult","functionError","_args","_context","logType","clientContext","qualifier","sign","http","_handle_error","executedVersion","encoding","statusCode","status","LambdaInvocationError","args","_x","_x2","errorCode","error_code","errorMessage","awsError","arr","_arrayWithHoles","_iterableToArrayLimit","minLen","_arrayLikeToArray","test","_unsupportedIterableToArray","_nonIterableRest","len","arr2","_asyncToGenerator","API_VERSION","SQSClient","_sendMessage","queueUrl","messageBody","attributeParameters","parsed","Action","Version","QueueUrl","MessageBody","messageDeduplicationId","MessageDeduplicationId","messageGroupId","MessageGroupId","messageAttributes","entries","attribute","valueParameterSuffix","assign","delaySeconds","DelaySeconds","_handleError","html","_listQueues","_callee2","parameters","_args2","_context2","maxResults","MaxResults","nextToken","NextToken","queueNamePrefix","QueueNamePrefix","Host","urls","toArray","operation","SQSServiceError","id","bodyMD5","v1","v4","uuid","module","exports","byteToHex","substr","buf","offset","bth","getRandomValues","window","msCrypto","rnds8","Uint8Array","rnds","Math","random","_nodeId","_clockseq","rng","bytesToUuid","_lastMSecs","_lastNSecs","b","node","clockseq","seedBytes","msecs","getTime","nsecs","dt","tl","tmh","ii","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","definition","prop","KMSClient","_listKeys","KMSOperation","ListKeys","k","KMSKey","fromJSON","_generateDataKey","size","KMSKeySize","Size256","KeyId","NumberOfBytes","GenerateDataKey","KMSDataKey","KMSServiceError","keyArn","keyId","KeyArn","CiphertextBlob","Plaintext","ciphertextBlob","plaintext","S3Client","_listBuckets","buckets","children","each","_","bucketDefinition","bucket","child","nodeName","textContent","creationDate","_listObjects","bucketName","prefix","objects","objectDefinition","lastModified","etag","storageClass","_getObject","_callee3","objectKey","_res$headers$XAmzSt","_context3","S3Object","_x3","_x4","_putObject","_callee4","data","_context4","contentDisposition","contentEncoding","contentLength","contentMD5","contentType","_x5","_x6","_x7","_x8","_deleteObject","_callee5","_context5","_x9","_x10","_copyObject","_callee6","sourceBucket","sourceKey","destinationBucket","destinationKey","bucketEndpoint","_context6","copy","_x11","_x12","_x13","_x14","_createMultipartUpload","_callee7","_context7","uploads","S3MultipartUpload","_x15","_x16","_uploadPart","_callee8","uploadId","partNumber","_context8","S3Part","_x17","_x18","_x19","_x20","_x21","_completeMultipartUpload","_callee9","parts","_context9","part","eTag","_x22","_x23","_x24","_x25","_abortMultipartUpload","_callee10","_context10","_x26","_x27","_x28","S3ServiceError","S3Bucket","SecretsManagerClient","_listSecrets","SecretsManagerOperation","ListSecrets","Secret","_getSecret","SecretId","GetSecretValue","_createSecret","secret","description","versionID","tags","uuidv4","Name","Description","SecretString","ClientRequestToken","Tags","CreateSecret","_putSecretValue","PutSecretValue","_deleteSecret","_ref$recoveryWindow","recoveryWindow","_ref$noRecovery","noRecovery","DeleteSecret","SecretsManagerServiceError","arn","secretString","createdDate","lastAccessedDate","lastChangedDate","ARN","CreatedDate","LastAccessedDate","LastChangedDate","SystemsManagerClient","withDecryption","WithDecryption","SystemsManagerOperation","GetParameter","SystemsManagerParameter","_getParameter","SystemsManagerServiceError","dataType","lastModifiedDate","selector","sourceResult","version","parameter","Parameter","DataType","LastModifiedDate","Selector","SourceResult","Type","Value","KinesisClient","serviceVersion","_createStream","streamName","StreamName","shardCount","ShardCount","streamModeDetails","StreamMode","streamMode","_send_request","_deleteStream","streamARN","StreamARN","enforceConsumerDeletion","EnforceConsumerDeletion","_listStreams","_args3","exclusiveStartStreamName","ExclusiveStartStreamName","limit","Limit","ListStreamsResponse","fromJson","_putRecords","records","_args4","Records","PutRecordsResponse","_getRecords","shardIterator","_args5","ShardIterator","GetRecordsResponse","_listShards","_args6","ListShardsResponse","_getShardIterator","shardId","shardIteratorType","_args7","ShardId","ShardIteratorType","startingSequenceNumber","StartingSequenceNumber","timestamp","Timestamp","GetShardIteratorResponse","_send_request2","action","KinesisServiceError","HasMoreStreams","StreamNames","StreamSummaries","hasMoreStreams","streamNames","streamSummaries","result","_result$HasMoreStream","_result$NextToken","_result$StreamNames","_result$StreamSummari","StreamSummary","StreamCreationTimestamp","StreamStatus","streamCreationTimestamp","streamStatus","summary","_summary$StreamARN","_summary$StreamCreati","_summary$StreamModeDe","StreamModeDetails","_summary$StreamName","_summary$StreamStatus","encryptionType","failedRecordCount","_json$EncryptionType","EncryptionType","_json$FailedRecordCou","FailedRecordCount","_json$Records","PutRecordsResultEntry","sequenceNumber","SequenceNumber","nextShardIterator","millisBehindLatest","_json$NextShardIterat","NextShardIterator","_json$Records2","_json$MillisBehindLat","MillisBehindLatest","Record","partitionKey","Data","PartitionKey","shards","_json$Shards","Shards","Shard","hashKeyRange","sequenceNumberRange","parentShardId","adjacentParentShardId","HashKeyRange","SequenceNumberRange","ParentShardId","AdjacentParentShardId","EventBridgeClient","input","parsedEvent","Entries","entry","Detail","EventBridgeOperation","PutEvents","_putEvents","EventBridgeServiceError"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/event-bridge.js b/dist/event-bridge.js index 1458424..bb4d819 100644 --- a/dist/event-bridge.js +++ b/dist/event-bridge.js @@ -1,3 +1,3 @@ /*! For license information please see event-bridge.js.LICENSE.txt */ -(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rw,EventBridgeClient:()=>De,EventBridgeServiceError:()=>Re,InvalidAWSConfigError:()=>O,InvalidSignatureError:()=>de});var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"_protocol",void 0),a(this,"_hostname",void 0),a(this,"_port",void 0);var r=!t.startsWith("http://")&&!t.startsWith("https://")?"".concat(e.DEFAULT_PROTOCOL,"://").concat(t):t,o=r.match(/^https?:/),i=n(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=o?o[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return t=e,(r=[{key:"copy",value:function(){return new e(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(e){var t=n(e.split(":"),2),r=t[0],o=t[1];this._hostname=r,this._port=o?parseInt(o):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(e){this._hostname=e}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(t){var r=t.match(/^https?:/),o=n(t.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=o.split(":")[0],this._port=o.split(":")[1]?parseInt(o.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(e){this._port=e}},{key:"protocol",get:function(){return this._protocol},set:function(e){this._protocol=e}}])&&i(t.prototype,r),o&&i(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}();function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t,r){return t=h(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&y(o,r.prototype),o}(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),y(r,e)},l(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r128)throw new O("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new O("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new u(t.endpoint):this.endpoint=t.endpoint)}return b(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),O=function(e){function t(e){return v(this,t),f(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),b(t)}(l(Error));const j=require("k6/http");var S=e.n(j);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function P(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=se(se({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=me(r.signingDate),o=n.longDate,i=n.shortDate,a=r.signingService||this.service,c=r.signingRegion||this.region,u="".concat(i,"/").concat(c,"/").concat(a,"/").concat(Z);e.headers[J]||(e.headers[J]=e.endpoint.hostname);for(var s=0,f=Object.keys(e.headers);s-1&&delete e.headers[l]}e.headers[F]=o,this.credentials.sessionToken&&(e.headers[Q]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var p=this.computePayloadHash(e);!function(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=t.signingDate,n=void 0===r?new Date:r,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,c=t.unhoistableHeaders,u=t.signableHeaders,s=t.signingRegion,f=t.signingService,l=me(n),p=l.longDate,y=l.shortDate,h=s||this.region,v=f||this.service;if(i>604800)throw new de("Signature version 4 presigned URLs can't be valid for more than 7 days");var d="".concat(y,"/").concat(h,"/").concat(v,"/").concat(Z),b=this.moveHeadersToQuery(e,{unhoistableHeaders:c});b.headers[J]||(b.headers[J]=e.endpoint.hostname),this.credentials.sessionToken&&(b.query[B]=this.credentials.sessionToken),b.query["X-Amz-Algorithm"]=ee,b.query["X-Amz-Credential"]="".concat(this.credentials.accessKeyId,"/").concat(d),b.query[W]=p,b.query["X-Amz-Expires"]=i.toString(10);var m=this.computeCanonicalHeaders(b,a,u);b.query["X-Amz-SignedHeaders"]=Object.keys(m).sort().join(";");var g=this.deriveSigningKey(this.credentials,v,h,y),w=this.computePayloadHash(e),O=this.createCanonicalRequest(b,m,w);b.query[M]=this.calculateSignature(p,d,g,O);var j=b.endpoint.href;return b.path&&(j+=b.path),b.query&&(j+="?".concat(this.serializeQueryParameters(b.query))),se({url:j},b)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=z().sha256(r,"hex");return"".concat(ee,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var o=this.createStringToSign(e,t,n);return z().hmac("sha256",r,o,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var o=e.secretAccessKey,i=z().hmac("sha256","AWS4"+o,n,"binary"),a=z().hmac("sha256",i,r,"binary"),c=z().hmac("sha256",a,t,"binary");return z().hmac("sha256",c,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=ae(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],i={},a=function(e){if(e.toLowerCase()===X)return 1;o.push(e);var t=n[e];"string"==typeof t?i[e]="".concat(be(e),"=").concat(be(t)):Array.isArray(t)&&(i[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(be(e),"=").concat(be(r))])}),[]).join("&"))},c=ae(Object.keys(n).sort());try{for(c.s();!(t=c.n()).done;){a(t.value)}}catch(e){c.e(e)}finally{c.f()}return o.map((function(e){return i[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,i={},a=ae(Object.keys(o).sort());try{for(a.s();!(n=a.n()).done;){var c=n.value;if(null!=o[c]){var u=c.toLowerCase();(u in $||null!=t&&t.has(u))&&(!r||r&&!r.has(u))||"string"==typeof o[c]&&(i[u]=o[c]=o[c].trim().replace(/\s+/g," "))}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"computePayloadHash",value:function(e){var t,r=e.headers,n=e.body;return r[U]?r[U]:null==n?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":"string"==typeof n||(t=n,"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)))?z().sha256(n,"hex").toLowerCase():ArrayBuffer.isView(n)?z().sha256(n.buffer,"hex").toLowerCase():"UNSIGNED-PAYLOAD"}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:x(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function je(e){for(var t=1;t=1400&&r<=1499){var o=n.Message||n.message||n.__type;if("InvalidSignatureException"===n.__type)throw new de(o,n.__type);throw new Re(o,n.__type,e)}if(1500===r)throw new Re("An error occured on the server side","InternalServiceError",e)}}}]);var r,n}(A),Ne=function(e){return e.PutEvents="PutEvents",e}(Ne||{}),Re=function(e){function t(e,r,n){var o;return _e(this,t),Le(o=ke(this,t,[e,r]),"operation",void 0),o.name="EventBridgeServiceError",o.operation=n,o}return Te(t,e),Ee(t)}(H),Ke=exports;for(var He in t)Ke[He]=t[He];t.__esModule&&Object.defineProperty(Ke,"__esModule",{value:!0})})(); +(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rw,EventBridgeClient:()=>He,EventBridgeServiceError:()=>ze,InvalidAWSConfigError:()=>O,InvalidSignatureError:()=>we});var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"_protocol",void 0),a(this,"_hostname",void 0),a(this,"_port",void 0);var r=!t.startsWith("http://")&&!t.startsWith("https://")?"".concat(e.DEFAULT_PROTOCOL,"://").concat(t):t,o=r.match(/^https?:/),i=n(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=o?o[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return t=e,(r=[{key:"copy",value:function(){return new e(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(e){var t=n(e.split(":"),2),r=t[0],o=t[1];this._hostname=r,this._port=o?parseInt(o):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(e){this._hostname=e}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(t){var r=t.match(/^https?:/),o=n(t.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=o.split(":")[0],this._port=o.split(":")[1]?parseInt(o.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(e){this._port=e}},{key:"protocol",get:function(){return this._protocol},set:function(e){this._protocol=e}}])&&i(t.prototype,r),o&&i(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}();function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t,r){return t=h(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&y(o,r.prototype),o}(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),y(r,e)},l(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r128)throw new O("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new O("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new u(t.endpoint):this.endpoint=t.endpoint)}return b(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),O=function(e){function t(e){return v(this,t),f(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),b(t)}(l(Error));const j=require("k6/http");var S=e.n(j);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function P(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=ye(ye({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=je(r.signingDate),o=n.longDate,i=n.shortDate,a=r.signingService||this.service,c=r.signingRegion||this.region,u="".concat(i,"/").concat(c,"/").concat(a,"/").concat(ne);e.headers[te]||(e.headers[te]=e.endpoint.hostname);for(var s=0,f=Object.keys(e.headers);s-1&&delete e.headers[l]}e.headers[V]=o,this.credentials.sessionToken&&(e.headers[$]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var p=this.computePayloadHash(e);!function(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=t.signingDate,n=void 0===r?new Date:r,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,c=t.unhoistableHeaders,u=t.signableHeaders,s=t.signingRegion,f=t.signingService,l=je(n),p=l.longDate,y=l.shortDate,h=s||this.region,v=f||this.service;if(i>604800)throw new we("Signature version 4 presigned URLs can't be valid for more than 7 days");var d="".concat(y,"/").concat(h,"/").concat(v,"/").concat(ne),b=this.moveHeadersToQuery(e,{unhoistableHeaders:c});b.headers[te]||(b.headers[te]=e.endpoint.hostname),this.credentials.sessionToken&&(b.query[G]=this.credentials.sessionToken),b.query["X-Amz-Algorithm"]=oe,b.query["X-Amz-Credential"]="".concat(this.credentials.accessKeyId,"/").concat(d),b.query[F]=p,b.query["X-Amz-Expires"]=i.toString(10);var m=this.computeCanonicalHeaders(b,a,u);b.query["X-Amz-SignedHeaders"]=Object.keys(m).sort().join(";");var g=this.deriveSigningKey(this.credentials,v,h,y),w=this.computePayloadHash(e),O=this.createCanonicalRequest(b,m,w);b.query[X]=this.calculateSignature(p,d,g,O);var j=b.endpoint.href;return b.path&&(j+=b.path),b.query&&(j+="?".concat(this.serializeQueryParameters(b.query))),ye({url:j},b)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=U().sha256(r,"hex");return"".concat(oe,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var o=this.createStringToSign(e,t,n);return U().hmac("sha256",r,o,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var o=e.secretAccessKey,i=U().hmac("sha256","AWS4"+o,n,"binary"),a=U().hmac("sha256",i,r,"binary"),c=U().hmac("sha256",a,t,"binary");return U().hmac("sha256",c,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=fe(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],i={},a=function(e){if(e.toLowerCase()===Y)return 1;o.push(e);var t=n[e];"string"==typeof t?i[e]="".concat(Oe(e),"=").concat(Oe(t)):Array.isArray(t)&&(i[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(Oe(e),"=").concat(Oe(r))])}),[]).join("&"))},c=fe(Object.keys(n).sort());try{for(c.s();!(t=c.n()).done;){a(t.value)}}catch(e){c.e(e)}finally{c.f()}return o.map((function(e){return i[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,i={},a=fe(Object.keys(o).sort());try{for(a.s();!(n=a.n()).done;){var c=n.value;if(null!=o[c]){var u=c.toLowerCase();(u in re||null!=t&&t.has(u))&&(!r||r&&!r.has(u))||"string"==typeof o[c]&&(i[u]=o[c]=o[c].trim().replace(/\s+/g," "))}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"computePayloadHash",value:function(e){var t,r=e.headers,n=e.body;return r[Q]?r[Q]:null==n?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":"string"==typeof n||(t=n,"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)))?U().sha256(n,"hex").toLowerCase():ArrayBuffer.isView(n)?U().sha256(n.buffer,"hex").toLowerCase():"UNSIGNED-PAYLOAD"}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:x(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}function Pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ee(e){for(var t=1;t=1400&&r<=1499){var o=n.Message||n.message||n.__type;if("InvalidSignatureException"===n.__type)throw new we(o,n.__type);throw new ze(o,n.__type,e)}if(1500===r)throw new ze("An error occured on the server side","InternalServiceError",e)}}}]);var r,n}(A),qe=function(e){return e.PutEvents="PutEvents",e}(qe||{}),ze=function(e){function t(e,r,n){var o;return Ae(this,t),Re(o=xe(this,t,[e,r]),"operation",void 0),o.name="EventBridgeServiceError",o.operation=n,o}return De(t,e),Te(t)}(M),We=exports;for(var Me in t)We[Me]=t[Me];t.__esModule&&Object.defineProperty(We,"__esModule",{value:!0})})(); //# sourceMappingURL=event-bridge.js.map \ No newline at end of file diff --git a/dist/event-bridge.js.map b/dist/event-bridge.js.map index 84765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AiBW,EAAcuT,GAAiC,IAAAK,EAG9C,OAH8ChX,GAAA,KAAA+W,GACpD9W,GAApB+W,EAAAtU,GAAA,KAAAqU,EAAA,CAAMtU,EAASW,IAAK,oBACpB4T,EAAK1T,KAAO,0BACZ0T,EAAKL,UAAYA,EAASK,CAC9B,CAAC,OAAArU,GAAAoU,EAAApJ,GAAAzL,GAAA6U,EAAA,CAd+B,CAAS5T","sources":["webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/./src/internal/client.ts","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/./src/internal/event-bridge.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/http\");","import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/html\");","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/crypto\");","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","import http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { JSONObject } from './json'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { HTTPHeaders, HTTPMethod } from './http'\n\n/**\n * Class allowing to interact with Amazon AWS's Event Bridge service\n */\nexport class EventBridgeClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'events')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Sends custom events to Amazon EventBridge so that they can be matched to rules.\n *\n * @param {PutEventsInput} input - The input for the PutEvents operation.\n * @throws {EventBridgeServiceError}\n * @throws {InvalidSignatureError}\n */\n async putEvents(input: PutEventsInput) {\n const parsedEvent = {\n ...input,\n Entries: input.Entries.map((entry) => ({\n ...entry,\n Detail: JSON.stringify(entry.Detail),\n })),\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AWSEvents.PutEvents`,\n },\n body: JSON.stringify(parsedEvent),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(EventBridgeOperation.PutEvents, res)\n }\n\n _handle_error(\n operation: EventBridgeOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new EventBridgeServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new EventBridgeServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\nenum EventBridgeOperation {\n PutEvents = 'PutEvents',\n}\n\n/**\n * Represents an event to be submitted.\n *\n * @typedef {Object} PutEventEntry\n *\n * @property {string} Detail - A valid serialized JSON object. There is no other schema imposed. The JSON object may contain fields and nested sub-objects.\n * @property {string} DetailType - Free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.\n * @property {string} EventBusName - The name or ARN of the event bus to receive the event. Only the rules that are associated with this event bus are used to match the event. If you omit this, the default event bus is used.\n * @property {string[]} Resources - AWS resources, identified by Amazon Resource Name (ARN), which the event primarily concerns. Any number, including zero, may be present.\n * @property {string} Source - The source of the event.\n */\ninterface PutEventEntry {\n Source: string\n Detail: JSONObject\n DetailType: string\n EventBusName?: string\n Resources?: [string]\n}\n\n/**\n * Represents the input for a put events operation.\n *\n * @typedef {Object} PutEventsInput\n *\n * @property {string} [EndpointId] - The optional URL subdomain of the endpoint.\n * @property {PutEventEntry[]} Entries - An array of entries that defines an event in your system.\n */\ninterface PutEventsInput {\n EndpointId?: string\n Entries: PutEventEntry[]\n}\n\nexport class EventBridgeServiceError extends AWSError {\n operation: EventBridgeOperation\n\n /**\n * Constructs a EventBridgeServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: EventBridgeOperation) {\n super(message, code)\n this.name = 'EventBridgeServiceError'\n this.operation = operation\n }\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Endpoint","endpoint","_classCallCheck","_defineProperty","completeUrl","startsWith","concat","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","this","_protocol","slice","_hostname","_port","parseInt","undefined","href","set","_value$split2","hostname","port","protocol","host","AWSConfig","options","region","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","require","AWSClient","awsConfig","serviceName","_endpoint","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","AMZ_DATE_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","_i","_Object$keys","keys","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","soughtHeader","hasHeader","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","_regeneratorRuntime","t","r","i","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","self","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","EventBridgeClient","_AWSClient","commonHeaders","fn","_callee","input","parsedEvent","signedRequest","res","_context","Entries","entry","Detail","sign","http","_handle_error","EventBridgeOperation","PutEvents","_putEvents","args","_x","operation","errorCode","error_code","errorMessage","EventBridgeServiceError","_this2"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"event-bridge.js","mappings":";mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,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AAA,CAd+B,CAAS5T","sources":["webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/./src/internal/client.ts","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/./src/internal/event-bridge.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/http\");","import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/html\");","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n\nexport class NetworkError extends Error {\n code: number;\n\n constructor(message: string, code: number) {\n super(message)\n this.name = 'NetworkError'\n this.code = code\n }\n}","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/crypto\");","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","import http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { JSONObject } from './json'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { HTTPHeaders, HTTPMethod } from './http'\n\n/**\n * Class allowing to interact with Amazon AWS's Event Bridge service\n */\nexport class EventBridgeClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'events')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Sends custom events to Amazon EventBridge so that they can be matched to rules.\n *\n * @param {PutEventsInput} input - The input for the PutEvents operation.\n * @throws {EventBridgeServiceError}\n * @throws {InvalidSignatureError}\n */\n async putEvents(input: PutEventsInput) {\n const parsedEvent = {\n ...input,\n Entries: input.Entries.map((entry) => ({\n ...entry,\n Detail: JSON.stringify(entry.Detail),\n })),\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AWSEvents.PutEvents`,\n },\n body: JSON.stringify(parsedEvent),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(EventBridgeOperation.PutEvents, res)\n }\n\n _handle_error(\n operation: EventBridgeOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new EventBridgeServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new EventBridgeServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\nenum EventBridgeOperation {\n PutEvents = 'PutEvents',\n}\n\n/**\n * Represents an event to be submitted.\n *\n * @typedef {Object} PutEventEntry\n *\n * @property {string} Detail - A valid serialized JSON object. There is no other schema imposed. The JSON object may contain fields and nested sub-objects.\n * @property {string} DetailType - Free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.\n * @property {string} EventBusName - The name or ARN of the event bus to receive the event. Only the rules that are associated with this event bus are used to match the event. If you omit this, the default event bus is used.\n * @property {string[]} Resources - AWS resources, identified by Amazon Resource Name (ARN), which the event primarily concerns. Any number, including zero, may be present.\n * @property {string} Source - The source of the event.\n */\ninterface PutEventEntry {\n Source: string\n Detail: JSONObject\n DetailType: string\n EventBusName?: string\n Resources?: [string]\n}\n\n/**\n * Represents the input for a put events operation.\n *\n * @typedef {Object} PutEventsInput\n *\n * @property {string} [EndpointId] - The optional URL subdomain of the endpoint.\n * @property {PutEventEntry[]} Entries - An array of entries that defines an event in your system.\n */\ninterface PutEventsInput {\n EndpointId?: string\n Entries: PutEventEntry[]\n}\n\nexport class EventBridgeServiceError extends AWSError {\n operation: EventBridgeOperation\n\n /**\n * Constructs a EventBridgeServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: EventBridgeOperation) {\n super(message, code)\n this.name = 'EventBridgeServiceError'\n this.operation = operation\n }\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Endpoint","endpoint","_classCallCheck","_defineProperty","completeUrl","startsWith","concat","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","this","_protocol","slice","_hostname","_port","parseInt","undefined","href","set","_value$split2","hostname","port","protocol","host","AWSConfig","options","region","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","require","AWSClient","awsConfig","serviceName","_endpoint","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","AMZ_DATE_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","_i","_Object$keys","keys","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","soughtHeader","hasHeader","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","_regeneratorRuntime","t","r","i","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","self","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","EventBridgeClient","_AWSClient","commonHeaders","fn","_callee","input","parsedEvent","signedRequest","res","_context","Entries","entry","Detail","sign","http","_handle_error","EventBridgeOperation","PutEvents","_putEvents","args","_x","operation","errorCode","error_code","errorMessage","EventBridgeServiceError","_this2"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index d70c517..2b009aa 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,3 +1,3 @@ /*! For license information please see index.js.LICENSE.txt */ -(()=>{var t={2:(t,e,r)=>{"use strict";r.d(e,{R:()=>u});var n=r(556);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r{"use strict";r.d(e,{g:()=>d,r:()=>v});var n=r(556);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e,r){return e=s(e),function(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],s(t).constructor):e.apply(t,r))}function a(t){var e="function"==typeof Map?new Map:void 0;return a=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(c())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&u(o,r.prototype),o}(t,arguments,s(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,t)},a(t)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r128)throw new v("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(e.accessKeyId.length));if(!e.secretAccessKey||""===e.secretAccessKey)throw new v("invalid AWS secret access key; reason: expected a non empty string, got `".concat(e.secretAccessKey,"`"));this.region=e.region,this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,void 0!==e.sessionToken&&(this.sessionToken=e.sessionToken),void 0!==e.endpoint&&("string"==typeof e.endpoint?this.endpoint=new n.y(e.endpoint):this.endpoint=e.endpoint)}return h(t,null,[{key:"fromEnvironment",value:function(e){return new t({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==e?void 0:e.endpoint})}}])}(),v=function(t){function e(t){return f(this,e),i(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(e,t),h(e)}(a(Error))},464:(t,e,r)=>{"use strict";r.d(e,{Kq:()=>o,Qt:()=>u,Qz:()=>w,SN:()=>b,Uv:()=>O,V1:()=>p,VQ:()=>g,Zs:()=>i,_e:()=>j,b2:()=>f,fk:()=>y,he:()=>a,iK:()=>s,ot:()=>l,pj:()=>v,sY:()=>h,ud:()=>d,wN:()=>n,z8:()=>S,zG:()=>c,zX:()=>m});var n="X-Amz-Algorithm",o="X-Amz-Credential",i="X-Amz-Date",a="X-Amz-Expires",c="X-Amz-Signature",u="X-Amz-SignedHeaders",s="X-Amz-Security-Token",f="x-amz-content-sha256",l=i.toLowerCase(),h=c.toLowerCase(),p="X-Amz-Target".toLowerCase(),y=s.toLowerCase(),d="authorization",v=[d,l,"date"],m="host",b={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},g="aws4_request",w="AWS4-HMAC-SHA256",O=604800,j="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",S="UNSIGNED-PAYLOAD"},556:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rs});var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,"_protocol",void 0),c(this,"_hostname",void 0),c(this,"_port",void 0);var r=!e.startsWith("http://")&&!e.startsWith("https://")?"".concat(t.DEFAULT_PROTOCOL,"://").concat(e):e,n=r.match(/^https?:/),i=o(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=n?n[0].slice(0,-1):t.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return e=t,(r=[{key:"copy",value:function(){return new t(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(t){var e=o(t.split(":"),2),r=e[0],n=e[1];this._hostname=r,this._port=n?parseInt(n):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(t){this._hostname=t}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(e){var r=e.match(/^https?:/),n=o(e.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):t.DEFAULT_PROTOCOL,this._hostname=n.split(":")[0],this._port=n.split(":")[1]?parseInt(n.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(t){this._port=t}},{key:"protocol",get:function(){return this._protocol},set:function(t){this._protocol=t}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n}();c(s,"DEFAULT_PROTOCOL","https")},539:(t,e,r)=>{"use strict";r.d(e,{c:()=>h});var n=r(95);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r{"use strict";function n(t,e){t=t.toLowerCase();for(var r=0,n=Object.keys(e);rn})},639:(t,e,r)=>{"use strict";r.d(e,{B:()=>S,s:()=>_});var n=r(275),o=r.n(n),i=r(464),a=r(539),c=r(21),u=r(680);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(t,e,r){return e=h(e),function(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,l()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(l=function(){return!!t})()}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function y(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{},r=m(m({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),e),n=E(r.signingDate),o=n.longDate,a=n.shortDate,u=r.signingService||this.service,s=r.signingRegion||this.region,f="".concat(a,"/").concat(s,"/").concat(u,"/").concat(i.VQ);t.headers[i.zX]||(t.headers[i.zX]=t.endpoint.hostname);for(var l=0,h=Object.keys(t.headers);l-1&&delete t.headers[p]}t.headers[i.ot]=o,this.credentials.sessionToken&&(t.headers[i.fk]=this.credentials.sessionToken),ArrayBuffer.isView(t.body)&&(t.body=t.body.buffer),t.body||(t.body="");var y=this.computePayloadHash(t);!(0,c.o)(i.b2,t.headers)&&this.applyChecksum&&(t.headers[i.b2]=y);var d=this.computeCanonicalHeaders(t,r.unsignableHeaders,r.signableHeaders),v=this.calculateSignature(o,f,this.deriveSigningKey(this.credentials,u,s,a),this.createCanonicalRequest(t,d,y));t.headers[i.ud]="".concat(i.Qz," ")+"Credential=".concat(this.credentials.accessKeyId,"/").concat(f,", ")+"SignedHeaders=".concat(Object.keys(d).sort().join(";"),", ")+"Signature=".concat(v);var b=t.endpoint.href;return t.path&&(b+=t.path),t.query&&(b+="?".concat(this.serializeQueryParameters(t.query))),m({url:b},t)}},{key:"presign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.signingDate,n=void 0===r?new Date:r,o=e.expiresIn,a=void 0===o?3600:o,c=e.unsignableHeaders,u=e.unhoistableHeaders,s=e.signableHeaders,f=e.signingRegion,l=e.signingService,h=E(n),p=h.longDate,y=h.shortDate,d=f||this.region,v=l||this.service;if(a>i.Uv)throw new _("Signature version 4 presigned URLs can't be valid for more than 7 days");var b="".concat(y,"/").concat(d,"/").concat(v,"/").concat(i.VQ),g=this.moveHeadersToQuery(t,{unhoistableHeaders:u});g.headers[i.zX]||(g.headers[i.zX]=t.endpoint.hostname),this.credentials.sessionToken&&(g.query[i.iK]=this.credentials.sessionToken),g.query[i.wN]=i.Qz,g.query[i.Kq]="".concat(this.credentials.accessKeyId,"/").concat(b),g.query[i.Zs]=p,g.query[i.he]=a.toString(10);var w=this.computeCanonicalHeaders(g,c,s);g.query[i.Qt]=Object.keys(w).sort().join(";");var O=this.deriveSigningKey(this.credentials,v,d,y),j=this.computePayloadHash(t),S=this.createCanonicalRequest(g,w,j);g.query[i.zG]=this.calculateSignature(p,b,O,S);var x=g.endpoint.href;return g.path&&(x+=g.path),g.query&&(x+="?".concat(this.serializeQueryParameters(g.query))),m({url:x},g)}},{key:"createCanonicalRequest",value:function(t,e,r){var n=Object.keys(e).sort(),o=n.map((function(t){return"".concat(t,":").concat(e[t])})).join("\n"),i=n.join(";");return"".concat(t.method,"\n")+"".concat(this.computeCanonicalURI(t),"\n")+"".concat(this.computeCanonicalQuerystring(t),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(t,e,r){var n=o().sha256(r,"hex");return"".concat(i.Qz,"\n")+"".concat(t,"\n")+"".concat(e,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(t,e,r,n){var i=this.createStringToSign(t,e,n);return o().hmac("sha256",r,i,"hex")}},{key:"deriveSigningKey",value:function(t,e,r,n){var i=t.secretAccessKey,a=o().hmac("sha256","AWS4"+i,n,"binary"),c=o().hmac("sha256",a,r,"binary"),u=o().hmac("sha256",c,e,"binary");return o().hmac("sha256",u,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(t){var e=t.path;if(this.uriEscapePath){var r,n=[],o=y(e.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(t){o.e(t)}finally{o.f()}var a=null!=e&&e.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=e&&e.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return e}},{key:"computeCanonicalQuerystring",value:function(t){var e,r=t.query,n=void 0===r?{}:r,o=[],a={},c=function(t){if(t.toLowerCase()===i.sY)return 1;o.push(t);var e=n[t];"string"==typeof e?a[t]="".concat(x(t),"=").concat(x(e)):Array.isArray(e)&&(a[t]=e.slice(0).sort().reduce((function(e,r){return e.concat(["".concat(x(t),"=").concat(x(r))])}),[]).join("&"))},u=y(Object.keys(n).sort());try{for(u.s();!(e=u.n()).done;){c(e.value)}}catch(t){u.e(t)}finally{u.f()}return o.map((function(t){return a[t]})).filter((function(t){return t})).join("&")}},{key:"computeCanonicalHeaders",value:function(t,e,r){var n,o=t.headers,a={},c=y(Object.keys(o).sort());try{for(c.s();!(n=c.n()).done;){var u=n.value;if(null!=o[u]){var s=u.toLowerCase();(s in i.SN||null!=e&&e.has(s))&&(!r||r&&!r.has(s))||"string"==typeof o[u]&&(a[s]=o[u]=o[u].trim().replace(/\s+/g," "))}}}catch(t){c.e(t)}finally{c.f()}return a}},{key:"computePayloadHash",value:function(t){var e=t.headers,r=t.body;return e[i.b2]?e[i.b2]:null==r?i._e:"string"==typeof r||(0,u.m)(r)?o().sha256(r,"hex").toLowerCase():ArrayBuffer.isView(r)?o().sha256(r.buffer,"hex").toLowerCase():i.z8}},{key:"moveHeadersToQuery",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(t)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a{"use strict";function n(t){return"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t))}function o(t){return Object.keys(t).reduce((function(e,r){var n=t[r];return null!=n&&e.push("".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(n))),e}),[]).join("&")}r.d(e,{R:()=>o,m:()=>n})},340:(t,e,r)=>{"use strict";r.d(e,{LambdaClient:()=>P,LambdaInvocationError:()=>k});r(811);var n=r(639),o=r(570),i=r.n(o);const a=require("k6/encoding");var c=r.n(a),u=r(2),s=r(539),f=r(464);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function h(t){var e="function"==typeof Map?new Map:void 0;return h=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(O())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&_(o,r.prototype),o}(t,arguments,j(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_(r,t)},h(t)}function p(){p=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function O(){}var j={};s(j,a,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(A([])));_&&_!==r&&n.call(_,a)&&(j=_);var x=O.prototype=g.prototype=Object.create(j);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,a,c){var u=h(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e2&&void 0!==m[2]?m[2]:{}).invocationType||"RequestResponse",u=d(d({},this.commonHeaders),{},x(x(x({},f.V1,"AWSLambda.".concat(a)),"X-Amz-Invocation-Type",a),"X-Amz-Log-Type",n.logType||"None")),n.clientContext&&(u["X-Amz-Client-Context"]=n.clientContext),n.qualifier&&(o.Qualifier=n.qualifier),s=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/2015-03-31/functions/".concat(e,"/invocations"),query:o,headers:u,body:r||""},{}),t.next=9,i().asyncRequest(this.method,s.url,s.body,{headers:s.headers});case 9:if(l=t.sent,this._handle_error(l),h=l.headers["X-Amz-Log-Result"],y={executedVersion:l.headers["X-Amz-Executed-Version"],logResult:h?c().b64decode(h,"std","s"):void 0,statusCode:l.status,payload:l.body},!(v=l.headers["X-Amz-Function-Error"])){t.next=18;break}throw new k(v,y);case 18:return t.abrupt("return",y);case 19:case"end":return t.stop()}}),t,this)})),o=function(){var t=this,e=arguments;return new Promise((function(n,o){var i=r.apply(t,e);function a(t){v(i,n,o,a,c,"next",t)}function c(t){v(i,n,o,a,c,"throw",t)}a(void 0)}))},function(t,e){return o.apply(this,arguments)})},{key:"_handle_error",value:function(t){var e=t.error_code;if(""!=t.error||0!==e){var r=s.c.parse(t);switch(r.code){case"AuthorizationHeaderMalformed":case"InvalidSignatureException":throw new n.s(r.message,r.code);default:throw r}}}}]);var r,o}(u.R),k=function(t){function e(t,r){var n;return m(this,e),x(n=w(this,e,["".concat(t,": ").concat(r.payload)]),"response",void 0),n.response=r,n}return S(e,t),g(e)}(h(Error))},535:(t,e,r)=>{"use strict";r.d(e,{SQSClient:()=>k});r(811);var n=r(639),o=r(2),i=r(570),a=r.n(i),c=r(680),u=r(539);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(){f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function O(){}var j={};l(j,a,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(A([])));_&&_!==r&&n.call(_,a)&&(j=_);var x=O.prototype=g.prototype=Object.create(j);function E(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,a,c){var u=p(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==s(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==p[2]?p[2]:{}).messageDeduplicationId&&(o=y(y({},o),{},{MessageDeduplicationId:n.messageDeduplicationId})),void 0!==n.messageGroupId&&(o=y(y({},o),{},{MessageGroupId:n.messageGroupId})),void 0!==n.messageAttributes&&(i=Object.entries(n.messageAttributes).reduce((function(t,e,r){var n=l(e,2),o=n[0],i=n[1],a="Binary"===i.type?"BinaryValue":"StringValue";return Object.assign(t,x(x(x({},"MessageAttribute.".concat(r+1,".Name"),o),"MessageAttribute.".concat(r+1,".Value.").concat(a),i.value),"MessageAttribute.".concat(r+1,".Value.DataType"),i.type))}),{}),o=y(y({},o),i)),void 0!==n.delaySeconds&&(o=y(y({},o),{},{DelaySeconds:n.delaySeconds})),u=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:y({},this.commonHeaders),body:(0,c.R)(o)},{}),t.next=10,a().asyncRequest("POST",u.url,u.body||"",{headers:u.headers});case 10:return s=t.sent,this._handleError("SendMessage",s),h=s.html("SendMessageResponse > SendMessageResult"),t.abrupt("return",new L(h.find("MessageId").text(),h.find("MD5OfMessageBody").text()));case 14:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})},{key:"listQueues",value:(r=v(f().mark((function t(){var e,r,n,o,i,u=arguments;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={Action:"ListQueues",Version:P},void 0!==(null==(e=u.length>0&&void 0!==u[0]?u[0]:{})?void 0:e.maxResults)&&(r=y(y({},r),{},{MaxResults:e.maxResults})),void 0!==(null==e?void 0:e.nextToken)&&(r=y(y({},r),{},{NextToken:e.nextToken})),void 0!==(null==e?void 0:e.queueNamePrefix)&&(r=y(y({},r),{},{QueueNamePrefix:e.queueNamePrefix})),n=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:y(y({},this.commonHeaders),{},{Host:this.endpoint.host}),body:(0,c.R)(r)},{}),t.next=9,a().asyncRequest("POST",n.url,n.body||"",{headers:n.headers});case 9:return o=t.sent,this._handleError("ListQueues",o),i=o.html(),t.abrupt("return",{urls:i.find("QueueUrl").toArray().map((function(t){return t.text()})),nextToken:i.find("NextToken").text()||void 0});case 13:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"_handleError",value:function(t,e){var r=e.error_code;if(""!=e.error||0!==r){var o=u.c.parseXML(e.body);if("AuthorizationHeaderMalformed"===o.code)throw new n.s(o.message,o.code);throw new T(o.message,o.code||"unknown",t)}}}]);var r,o}(o.R),L=g((function t(e,r){m(this,t),x(this,"id",void 0),x(this,"bodyMD5",void 0),this.id=e,this.bodyMD5=r})),T=function(t){function e(t,r,n){var o;return m(this,e),x(o=w(this,e,[t,r]),"operation",void 0),o.name="SQSServiceError",o.operation=n,o}return S(e,t),g(e)}(u.c)},414:(t,e,r)=>{var n=r(33),o=r(550),i=o;i.v1=n,i.v4=o,t.exports=i},471:t=>{for(var e=[],r=0;r<256;++r)e[r]=(r+256).toString(16).substr(1);t.exports=function(t,r){var n=r||0,o=e;return[o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]]].join("")}},814:t=>{var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var r=new Uint8Array(16);t.exports=function(){return e(r),r}}else{var n=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)3&e||(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n}}},33:(t,e,r)=>{var n,o,i=r(814),a=r(471),c=0,u=0;t.exports=function(t,e,r){var s=e&&r||0,f=e||[],l=(t=t||{}).node||n,h=void 0!==t.clockseq?t.clockseq:o;if(null==l||null==h){var p=i();null==l&&(l=n=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==h&&(h=o=16383&(p[6]<<8|p[7]))}var y=void 0!==t.msecs?t.msecs:(new Date).getTime(),d=void 0!==t.nsecs?t.nsecs:u+1,v=y-c+(d-u)/1e4;if(v<0&&void 0===t.clockseq&&(h=h+1&16383),(v<0||y>c)&&void 0===t.nsecs&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=y,u=d,o=h;var m=(1e4*(268435455&(y+=122192928e5))+d)%4294967296;f[s++]=m>>>24&255,f[s++]=m>>>16&255,f[s++]=m>>>8&255,f[s++]=255&m;var b=y/4294967296*1e4&268435455;f[s++]=b>>>8&255,f[s++]=255&b,f[s++]=b>>>24&15|16,f[s++]=b>>>16&255,f[s++]=h>>>8|128,f[s++]=255&h;for(var g=0;g<6;++g)f[s+g]=l[g];return e||a(f)}},550:(t,e,r)=>{var n=r(814),o=r(471);t.exports=function(t,e,r){var i=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var a=(t=t||{}).random||(t.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e)for(var c=0;c<16;++c)e[i+c]=a[c];return e||o(a)}},275:t=>{"use strict";t.exports=require("k6/crypto")},95:t=>{"use strict";t.exports=require("k6/html")},570:t=>{"use strict";t.exports=require("k6/http")}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{AMZ_CONTENT_SHA256_HEADER:()=>o.b2,AWSConfig:()=>e.g,EventBridgeClient:()=>Le,InvalidAWSConfigError:()=>e.r,InvalidSignatureError:()=>t.s,KMSClient:()=>x,KMSDataKey:()=>P,KMSServiceError:()=>k,KinesisClient:()=>ne,LambdaClient:()=>Ce.LambdaClient,LambdaInvocationError:()=>Ce.LambdaInvocationError,S3Bucket:()=>W,S3Client:()=>Q,S3Object:()=>X,S3ServiceError:()=>$,SQSClient:()=>qt.SQSClient,Secret:()=>bt,SecretsManagerClient:()=>mt,SecretsManagerServiceError:()=>gt,SignatureV4:()=>t.B,SystemsManagerClient:()=>Dt,SystemsManagerParameter:()=>Mt,SystemsManagerServiceError:()=>Gt,UNSIGNED_PAYLOAD:()=>o.z8});var t=r(639),e=r(811),o=r(464),i=r(570),a=r.n(i),c=r(2),u=r(539);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(){f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function O(){}var j={};l(j,a,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(A([])));_&&_!==r&&n.call(_,a)&&(j=_);var x=O.prototype=g.prototype=Object.create(j);function E(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,a,c){var u=p(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==s(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e1&&void 0!==c[1]?c[1]:T.Size256,n=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/",headers:h(h({},this.commonHeaders),{},S({},o.V1,"TrentService.GenerateDataKey")),body:JSON.stringify({KeyId:e,NumberOfBytes:r})},{}),t.next=4,a().asyncRequest(this.method,n.url,n.body,{headers:n.headers});case 4:return i=t.sent,this._handle_error(L.GenerateDataKey,i),t.abrupt("return",P.fromJSON(i.json()));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.error_code;if(0!==n){var o=r.json();if(n>=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new k(i,o.__type,e)}if(1500===n)throw new k("An error occured on the server side","InternalServiceError",e)}}}]);var n,i}(c.R),E=function(){function t(e,r){d(this,t),S(this,"keyArn",void 0),S(this,"keyId",void 0),this.keyArn=e,this.keyId=r}return m(t,null,[{key:"fromJSON",value:function(e){return new t(e.KeyArn,e.KeyId)}}])}(),P=function(){function t(e,r,n){d(this,t),S(this,"id",void 0),S(this,"ciphertextBlob",void 0),S(this,"plaintext",void 0),this.ciphertextBlob=e,this.id=r,this.plaintext=n}return m(t,null,[{key:"fromJSON",value:function(e){return new t(e.CiphertextBlob,e.KeyId,e.Plaintext)}}])}(),k=function(t){function e(t,r,n){var o;return d(this,e),S(o=b(this,e,[t,r]),"operation",void 0),o.name="KMSServiceError",o.operation=n,o}return O(e,t),m(e)}(u.c),L=function(t){return t.GenerateDataKey="GenerateDataKey",t.ListKeys="ListKeys",t}(L||{}),T=function(t){return t[t.Size256=32]="Size256",t[t.Size512=64]="Size512",t}(T||{}),N=r(95);function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}function A(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function R(t){for(var e=1;e=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function D(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function M(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){D(i,n,o,a,c,"next",t)}function c(t){D(i,n,o,a,c,"throw",t)}a(void 0)}))}}function G(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function K(t,e){for(var r=0;r".concat(t.partNumber,"").concat(t.eTag,"")})).join(""),""),(u=this.endpoint.copy()).hostname="".concat(e,".").concat(this.endpoint.hostname),s=this.signature.sign({method:i,endpoint:u,path:"/".concat(r),headers:{},body:c,query:{uploadId:"".concat(n)}},{}),t.next=7,a().asyncRequest(i,s.url,s.body||null,{headers:s.headers});case 7:f=t.sent,this._handle_error("CompleteMultipartUpload",f);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return o.apply(this,arguments)})},{key:"abortMultipartUpload",value:(n=M(I().mark((function t(e,r,n){var o,i,c,u;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o="DELETE",(i=this.endpoint.copy()).hostname="".concat(e,".").concat(this.endpoint.hostname),c=this.signature.sign({method:o,endpoint:i,path:"/".concat(r),headers:{},query:{uploadId:"".concat(n)}},{}),t.next=6,a().asyncRequest(o,c.url,c.body||null,{headers:c.headers});case 6:u=t.sent,this._handle_error("AbortMultipartUpload",u);case 8:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return n.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.status,o=r.error_code,i=r.error;if(!(n>=200&&n<300&&""==i&&0===o)){if(301==n||i&&i.startsWith("301"))throw new $("Resource not found","ResourceNotFound",e);var a=u.c.parseXML(r.body);if("AuthorizationHeaderMalformed"===a.code)throw new t.s(a.message,a.code);throw new $(a.message,a.code||"unknown",e)}}}]);var n,o,i,c,s,f,l,h,p,y}(c.R),W=q((function t(e,r){G(this,t),J(this,"name",void 0),J(this,"creationDate",void 0),this.name=e,this.creationDate=r})),X=q((function t(e,r,n,o,i,a){G(this,t),J(this,"key",void 0),J(this,"lastModified",void 0),J(this,"etag",void 0),J(this,"size",void 0),J(this,"storageClass",void 0),J(this,"data",void 0),this.key=e,this.lastModified=r,this.etag=n,this.size=o,this.storageClass=i,this.data=a})),Y=q((function t(e,r){G(this,t),J(this,"key",void 0),J(this,"uploadId",void 0),this.key=e,this.uploadId=r})),Z=q((function t(e,r){G(this,t),J(this,"partNumber",void 0),J(this,"eTag",void 0),this.partNumber=e,this.eTag=r})),$=function(t){function e(t,r,n){var o;return G(this,e),J(o=H(this,e,[t,r]),"operation",void 0),o.name="S3ServiceError",o.operation=n,o}return F(e,t),q(e)}(u.c),tt=r(414);function et(t){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function rt(){rt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==et(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ot(t){for(var e=1;e=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new gt(i,o.__type,e)}if(1500===n)throw new gt("An error occured on the server side","InternalServiceError",e)}}}]);var n,i,c,u,s}(c.R),bt=function(){function t(e,r,n,o,i,a){var c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[];ct(this,t),dt(this,"name",void 0),dt(this,"arn",void 0),dt(this,"secret",void 0),dt(this,"createdDate",void 0),dt(this,"lastAccessedDate",void 0),dt(this,"lastChangedDate",void 0),dt(this,"tags",void 0),this.name=e,this.arn=r,this.secret=n,this.createdDate=o,this.lastAccessedDate=i,this.lastChangedDate=a,this.tags=c}return st(t,null,[{key:"fromJSON",value:function(e){return new t(e.Name,e.ARN,e.SecretString,e.CreatedDate,e.LastAccessedDate,e.LastChangedDate,e.Tags)}}])}(),gt=function(t){function e(t,r,n){var o;return ct(this,e),dt(o=ft(this,e,[t,r]),"operation",void 0),o.name="SecretsManagerServiceError",o.operation=n,o}return pt(e,t),st(e)}(u.c),wt=function(t){return t.ListSecrets="ListSecrets",t.GetSecretValue="GetSecretValue",t.CreateSecret="CreateSecret",t.PutSecretValue="PutSecretValue",t.DeleteSecret="DeleteSecret",t}(wt||{});function Ot(t){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ot(t)}function jt(){jt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Ot(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function St(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _t(t){for(var e=1;e1&&void 0!==c[1]&&c[1],n=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/",headers:_t(_t({},this.commonHeaders),{},Rt({},o.V1,"AmazonSSM.GetParameter")),body:JSON.stringify({Name:e,WithDecryption:r})},{}),t.next=4,a().asyncRequest(this.method,n.url,n.body,{headers:n.headers});case 4:return i=t.sent,this._handle_error(Kt.GetParameter,i),t.abrupt("return",Mt.fromJSON(i.json()));case 7:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){xt(i,r,o,a,c,"next",t)}function c(t){xt(i,r,o,a,c,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.error_code;if(0!==n){var o=r.json();if(n>=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new Gt(i,o.__type,e)}if(1500===n)throw new Gt("An error occured on the server side","InternalServiceError",e)}}}]);var n,i}(c.R),Mt=function(){function t(e,r,n,o,i,a,c,u,s){Et(this,t),Rt(this,"arn",void 0),Rt(this,"dataType",void 0),Rt(this,"lastModifiedDate",void 0),Rt(this,"name",void 0),Rt(this,"selector",void 0),Rt(this,"sourceResult",void 0),Rt(this,"type",void 0),Rt(this,"value",void 0),Rt(this,"version",void 0),this.arn=e,this.dataType=r,this.lastModifiedDate=n,this.name=o,this.selector=i,this.sourceResult=a,this.type=c,this.value=u,this.version=s}return kt(t,null,[{key:"fromJSON",value:function(e){var r=e.Parameter;return new t(r.ARN,r.DataType,r.LastModifiedDate,r.Name,r.Selector,r.SourceResult,r.Type,r.Value,r.Version)}}])}(),Gt=function(t){function e(t,r,n){var o;return Et(this,e),Rt(o=Lt(this,e,[t,r]),"operation",void 0),o.name="SystemsManagerServiceError",o.operation=n,o}return Ct(e,t),kt(e)}(u.c),Kt=function(t){return t.GetParameter="GetParameter",t}(Kt||{}),qt=r(535);function Ht(t){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(t)}function zt(){zt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Ht(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function Bt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ft(t){for(var e=1;e1&&void 0!==o[1]?o[1]:{}).shardCount&&{ShardCount:r.shardCount}),r.streamModeDetails&&{StreamMode:r.streamModeDetails.streamMode}),t.next=4,this._send_request("CreateStream",n);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"deleteStream",value:(l=Jt(zt().mark((function t(e){var r,n,o=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Ft(Ft({StreamName:e},(r=o.length>1&&void 0!==o[1]?o[1]:{}).streamARN&&{StreamARN:r.streamARN}),r.enforceConsumerDeletion&&{EnforceConsumerDeletion:r.enforceConsumerDeletion}),t.next=4,this._send_request("DeleteStream",n);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"listStreams",value:(f=Jt(zt().mark((function t(){var e,r,n,o=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Ft(Ft(Ft({},(e=o.length>0&&void 0!==o[0]?o[0]:{}).exclusiveStartStreamName&&{ExclusiveStartStreamName:e.exclusiveStartStreamName}),e.limit&&{Limit:e.limit}),e.nextToken&&{NextToken:e.nextToken}),t.next=4,this._send_request("ListStreams",r);case 4:return n=t.sent,t.abrupt("return",ie.fromJson(null==n?void 0:n.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"putRecords",value:(s=Jt(zt().mark((function t(e){var r,n,o,i=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=i.length>1&&void 0!==i[1]?i[1]:{}).streamName||r.streamARN){t.next=3;break}throw new Error("Either streamName or streamARN must be provided");case 3:return n=Ft(Ft({Records:e},r.streamName&&{StreamName:r.streamName}),r.streamARN&&{StreamARN:r.streamARN}),t.next=6,this._send_request("PutRecords",n);case 6:return o=t.sent,t.abrupt("return",ce.fromJson(null==o?void 0:o.json()));case 8:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"getRecords",value:(u=Jt(zt().mark((function t(e){var r,n,o,i=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Ft(Ft({ShardIterator:e},(r=i.length>1&&void 0!==i[1]?i[1]:{}).limit&&{Limit:r.limit}),r.streamARN&&{StreamARN:r.streamARN}),t.next=4,this._send_request("GetRecords",n);case 4:return o=t.sent,t.abrupt("return",se.fromJson(null==o?void 0:o.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"listShards",value:(c=Jt(zt().mark((function t(e){var r,n,o,i=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Ft(Ft({StreamName:e},(r=i.length>1&&void 0!==i[1]?i[1]:{}).nextToken&&{NextToken:r.nextToken}),r.maxResults&&{MaxResults:r.maxResults}),t.next=4,this._send_request("ListShards",n);case 4:return o=t.sent,t.abrupt("return",le.fromJson(null==o?void 0:o.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"getShardIterator",value:(i=Jt(zt().mark((function t(e,r,n){var o,i,a,c=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=Ft(Ft({StreamName:e,ShardId:r,ShardIteratorType:n},(o=c.length>3&&void 0!==c[3]?c[3]:{}).startingSequenceNumber&&{StartingSequenceNumber:o.startingSequenceNumber}),o.timestamp&&{Timestamp:o.timestamp}),t.next=4,this._send_request("GetShardIterator",i);case 4:return a=t.sent,t.abrupt("return",pe.fromJson(null==a?void 0:a.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return i.apply(this,arguments)})},{key:"_send_request",value:(n=Jt(zt().mark((function t(e,r){var n,i;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:Ft(Ft({},this.commonHeaders),{},ee({},o.V1,"".concat(this.serviceVersion,".").concat(e))),body:JSON.stringify(r)},{}),t.next=3,a().asyncRequest("POST",n.url,n.body,{headers:n.headers});case 3:return i=t.sent,this._handle_error(e,i),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.error_code;if(0!==n){var o=r.json();if(n>=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new oe(i,o.__type,e)}if(1500===n)throw new oe("An error occured on the server side","InternalServiceError",e)}}}]);var n,i,c,u,s,f,l,h}(c.R),oe=function(t){function e(t,r,n){var o;return Ut(this,e),ee(o=Xt(this,e,[t,r]),"operation",void 0),o.name="KinesisServiceError",o.operation=n,o}return $t(e,t),Wt(e)}(u.c),ie=function(){function t(e,r,n,o){Ut(this,t),ee(this,"hasMoreStreams",void 0),ee(this,"nextToken",void 0),ee(this,"streamNames",void 0),ee(this,"streamSummaries",void 0),this.hasMoreStreams=e,this.nextToken=r,this.streamNames=n,this.streamSummaries=o}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.HasMoreStreams,n=void 0!==r&&r,o=e.NextToken,i=void 0===o?"":o,a=e.StreamNames,c=void 0===a?[]:a,u=e.StreamSummaries,s=void 0===u?[]:u;return new t(n,i,c,null==s?void 0:s.map(ae.fromJson))}}])}(),ae=function(){function t(e,r,n,o,i){Ut(this,t),ee(this,"streamARN",void 0),ee(this,"streamCreationTimestamp",void 0),ee(this,"streamModeDetails",void 0),ee(this,"streamName",void 0),ee(this,"streamStatus",void 0),this.streamARN=e,this.streamCreationTimestamp=r,this.streamModeDetails=n,this.streamName=o,this.streamStatus=i}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.StreamARN,n=void 0===r?"":r,o=e.StreamCreationTimestamp,i=void 0===o?0:o,a=e.StreamModeDetails,c=void 0===a?{}:a,u=e.StreamName,s=void 0===u?"":u,f=e.StreamStatus;return new t(n,i,c,s,void 0===f?"":f)}}])}(),ce=function(){function t(e,r,n){Ut(this,t),ee(this,"encryptionType",void 0),ee(this,"failedRecordCount",void 0),ee(this,"records",void 0),this.encryptionType=e,this.failedRecordCount=r,this.records=n}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.EncryptionType,n=void 0===r?"NONE":r,o=e.FailedRecordCount,i=void 0===o?0:o,a=e.Records;return new t(n,i,(void 0===a?[]:a).map(ue.fromJson))}}])}(),ue=function(){function t(e,r){Ut(this,t),ee(this,"sequenceNumber",void 0),ee(this,"shardId",void 0),this.sequenceNumber=e,this.shardId=r}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.SequenceNumber,e.ShardId)}}])}(),se=function(){function t(e,r,n){Ut(this,t),ee(this,"nextShardIterator",void 0),ee(this,"records",void 0),ee(this,"millisBehindLatest",void 0),this.nextShardIterator=e,this.records=r,this.millisBehindLatest=n}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.NextShardIterator,n=void 0===r?"":r,o=e.Records,i=void 0===o?[]:o,a=e.MillisBehindLatest,c=void 0===a?0:a;return new t(n,i.map(fe.fromJson),c)}}])}(),fe=function(){function t(e,r,n){Ut(this,t),ee(this,"data",void 0),ee(this,"partitionKey",void 0),ee(this,"sequenceNumber",void 0),this.data=e,this.partitionKey=r,this.sequenceNumber=n}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.Data,e.PartitionKey,e.SequenceNumber)}}])}(),le=function(){function t(e,r){Ut(this,t),ee(this,"shards",void 0),ee(this,"nextToken",void 0),this.shards=e,this.nextToken=r}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.Shards,n=void 0===r?[]:r,o=e.NextToken;return new t(n.map(he.fromJson),o)}}])}(),he=function(){function t(e,r,n,o,i){Ut(this,t),ee(this,"id",void 0),ee(this,"parentShardId",void 0),ee(this,"adjacentParentShardId",void 0),ee(this,"hashKeyRange",void 0),ee(this,"sequenceNumberRange",void 0),this.id=e,this.parentShardId=o,this.adjacentParentShardId=i,this.hashKeyRange=r,this.sequenceNumberRange=n}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.ShardId,e.HashKeyRange,e.SequenceNumberRange,e.ParentShardId,e.AdjacentParentShardId)}}])}(),pe=function(){function t(e){Ut(this,t),ee(this,"shardIterator",void 0),this.shardIterator=e}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.ShardIterator)}}])}();function ye(t){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ye(t)}function de(){de=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==ye(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function ve(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function me(t){for(var e=1;e=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new Ne(i,o.__type,e)}if(1500===n)throw new Ne("An error occured on the server side","InternalServiceError",e)}}}]);var n,i}(c.R),Te=function(t){return t.PutEvents="PutEvents",t}(Te||{}),Ne=function(t){function e(t,r,n){var o;return ge(this,e),Pe(o=je(this,e,[t,r]),"operation",void 0),o.name="EventBridgeServiceError",o.operation=n,o}return xe(e,t),Oe(e)}(u.c),Ce=r(340)})();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})(); +(()=>{var t={2:(t,e,r)=>{"use strict";r.d(e,{R:()=>u});var n=r(556);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r{"use strict";r.d(e,{g:()=>d,r:()=>v});var n=r(556);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e,r){return e=s(e),function(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],s(t).constructor):e.apply(t,r))}function a(t){var e="function"==typeof Map?new Map:void 0;return a=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(c())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&u(o,r.prototype),o}(t,arguments,s(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,t)},a(t)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r128)throw new v("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(e.accessKeyId.length));if(!e.secretAccessKey||""===e.secretAccessKey)throw new v("invalid AWS secret access key; reason: expected a non empty string, got `".concat(e.secretAccessKey,"`"));this.region=e.region,this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,void 0!==e.sessionToken&&(this.sessionToken=e.sessionToken),void 0!==e.endpoint&&("string"==typeof e.endpoint?this.endpoint=new n.y(e.endpoint):this.endpoint=e.endpoint)}return h(t,null,[{key:"fromEnvironment",value:function(e){return new t({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==e?void 0:e.endpoint})}}])}(),v=function(t){function e(t){return f(this,e),i(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(e,t),h(e)}(a(Error))},464:(t,e,r)=>{"use strict";r.d(e,{Kq:()=>o,Qt:()=>u,Qz:()=>w,SN:()=>b,Uv:()=>O,V1:()=>p,VQ:()=>g,Zs:()=>i,_e:()=>j,b2:()=>f,fk:()=>y,he:()=>a,iK:()=>s,ot:()=>l,pj:()=>v,sY:()=>h,ud:()=>d,wN:()=>n,z8:()=>S,zG:()=>c,zX:()=>m});var n="X-Amz-Algorithm",o="X-Amz-Credential",i="X-Amz-Date",a="X-Amz-Expires",c="X-Amz-Signature",u="X-Amz-SignedHeaders",s="X-Amz-Security-Token",f="x-amz-content-sha256",l=i.toLowerCase(),h=c.toLowerCase(),p="X-Amz-Target".toLowerCase(),y=s.toLowerCase(),d="authorization",v=[d,l,"date"],m="host",b={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},g="aws4_request",w="AWS4-HMAC-SHA256",O=604800,j="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",S="UNSIGNED-PAYLOAD"},556:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rs});var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,"_protocol",void 0),c(this,"_hostname",void 0),c(this,"_port",void 0);var r=!e.startsWith("http://")&&!e.startsWith("https://")?"".concat(t.DEFAULT_PROTOCOL,"://").concat(e):e,n=r.match(/^https?:/),i=o(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=n?n[0].slice(0,-1):t.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return e=t,(r=[{key:"copy",value:function(){return new t(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(t){var e=o(t.split(":"),2),r=e[0],n=e[1];this._hostname=r,this._port=n?parseInt(n):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(t){this._hostname=t}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(e){var r=e.match(/^https?:/),n=o(e.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):t.DEFAULT_PROTOCOL,this._hostname=n.split(":")[0],this._port=n.split(":")[1]?parseInt(n.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(t){this._port=t}},{key:"protocol",get:function(){return this._protocol},set:function(t){this._protocol=t}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n}();c(s,"DEFAULT_PROTOCOL","https")},539:(t,e,r)=>{"use strict";r.d(e,{D:()=>m,c:()=>v});var n=r(95);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r{"use strict";function n(t,e){t=t.toLowerCase();for(var r=0,n=Object.keys(e);rn})},639:(t,e,r)=>{"use strict";r.d(e,{B:()=>S,s:()=>_});var n=r(275),o=r.n(n),i=r(464),a=r(539),c=r(21),u=r(680);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(t,e,r){return e=h(e),function(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,l()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(l=function(){return!!t})()}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function y(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{},r=m(m({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),e),n=E(r.signingDate),o=n.longDate,a=n.shortDate,u=r.signingService||this.service,s=r.signingRegion||this.region,f="".concat(a,"/").concat(s,"/").concat(u,"/").concat(i.VQ);t.headers[i.zX]||(t.headers[i.zX]=t.endpoint.hostname);for(var l=0,h=Object.keys(t.headers);l-1&&delete t.headers[p]}t.headers[i.ot]=o,this.credentials.sessionToken&&(t.headers[i.fk]=this.credentials.sessionToken),ArrayBuffer.isView(t.body)&&(t.body=t.body.buffer),t.body||(t.body="");var y=this.computePayloadHash(t);!(0,c.o)(i.b2,t.headers)&&this.applyChecksum&&(t.headers[i.b2]=y);var d=this.computeCanonicalHeaders(t,r.unsignableHeaders,r.signableHeaders),v=this.calculateSignature(o,f,this.deriveSigningKey(this.credentials,u,s,a),this.createCanonicalRequest(t,d,y));t.headers[i.ud]="".concat(i.Qz," ")+"Credential=".concat(this.credentials.accessKeyId,"/").concat(f,", ")+"SignedHeaders=".concat(Object.keys(d).sort().join(";"),", ")+"Signature=".concat(v);var b=t.endpoint.href;return t.path&&(b+=t.path),t.query&&(b+="?".concat(this.serializeQueryParameters(t.query))),m({url:b},t)}},{key:"presign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.signingDate,n=void 0===r?new Date:r,o=e.expiresIn,a=void 0===o?3600:o,c=e.unsignableHeaders,u=e.unhoistableHeaders,s=e.signableHeaders,f=e.signingRegion,l=e.signingService,h=E(n),p=h.longDate,y=h.shortDate,d=f||this.region,v=l||this.service;if(a>i.Uv)throw new _("Signature version 4 presigned URLs can't be valid for more than 7 days");var b="".concat(y,"/").concat(d,"/").concat(v,"/").concat(i.VQ),g=this.moveHeadersToQuery(t,{unhoistableHeaders:u});g.headers[i.zX]||(g.headers[i.zX]=t.endpoint.hostname),this.credentials.sessionToken&&(g.query[i.iK]=this.credentials.sessionToken),g.query[i.wN]=i.Qz,g.query[i.Kq]="".concat(this.credentials.accessKeyId,"/").concat(b),g.query[i.Zs]=p,g.query[i.he]=a.toString(10);var w=this.computeCanonicalHeaders(g,c,s);g.query[i.Qt]=Object.keys(w).sort().join(";");var O=this.deriveSigningKey(this.credentials,v,d,y),j=this.computePayloadHash(t),S=this.createCanonicalRequest(g,w,j);g.query[i.zG]=this.calculateSignature(p,b,O,S);var x=g.endpoint.href;return g.path&&(x+=g.path),g.query&&(x+="?".concat(this.serializeQueryParameters(g.query))),m({url:x},g)}},{key:"createCanonicalRequest",value:function(t,e,r){var n=Object.keys(e).sort(),o=n.map((function(t){return"".concat(t,":").concat(e[t])})).join("\n"),i=n.join(";");return"".concat(t.method,"\n")+"".concat(this.computeCanonicalURI(t),"\n")+"".concat(this.computeCanonicalQuerystring(t),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(t,e,r){var n=o().sha256(r,"hex");return"".concat(i.Qz,"\n")+"".concat(t,"\n")+"".concat(e,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(t,e,r,n){var i=this.createStringToSign(t,e,n);return o().hmac("sha256",r,i,"hex")}},{key:"deriveSigningKey",value:function(t,e,r,n){var i=t.secretAccessKey,a=o().hmac("sha256","AWS4"+i,n,"binary"),c=o().hmac("sha256",a,r,"binary"),u=o().hmac("sha256",c,e,"binary");return o().hmac("sha256",u,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(t){var e=t.path;if(this.uriEscapePath){var r,n=[],o=y(e.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(t){o.e(t)}finally{o.f()}var a=null!=e&&e.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=e&&e.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return e}},{key:"computeCanonicalQuerystring",value:function(t){var e,r=t.query,n=void 0===r?{}:r,o=[],a={},c=function(t){if(t.toLowerCase()===i.sY)return 1;o.push(t);var e=n[t];"string"==typeof e?a[t]="".concat(x(t),"=").concat(x(e)):Array.isArray(e)&&(a[t]=e.slice(0).sort().reduce((function(e,r){return e.concat(["".concat(x(t),"=").concat(x(r))])}),[]).join("&"))},u=y(Object.keys(n).sort());try{for(u.s();!(e=u.n()).done;){c(e.value)}}catch(t){u.e(t)}finally{u.f()}return o.map((function(t){return a[t]})).filter((function(t){return t})).join("&")}},{key:"computeCanonicalHeaders",value:function(t,e,r){var n,o=t.headers,a={},c=y(Object.keys(o).sort());try{for(c.s();!(n=c.n()).done;){var u=n.value;if(null!=o[u]){var s=u.toLowerCase();(s in i.SN||null!=e&&e.has(s))&&(!r||r&&!r.has(s))||"string"==typeof o[u]&&(a[s]=o[u]=o[u].trim().replace(/\s+/g," "))}}}catch(t){c.e(t)}finally{c.f()}return a}},{key:"computePayloadHash",value:function(t){var e=t.headers,r=t.body;return e[i.b2]?e[i.b2]:null==r?i._e:"string"==typeof r||(0,u.m)(r)?o().sha256(r,"hex").toLowerCase():ArrayBuffer.isView(r)?o().sha256(r.buffer,"hex").toLowerCase():i.z8}},{key:"moveHeadersToQuery",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(t)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a{"use strict";function n(t){return"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t))}function o(t){return Object.keys(t).reduce((function(e,r){var n=t[r];return null!=n&&e.push("".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(n))),e}),[]).join("&")}r.d(e,{R:()=>o,m:()=>n})},340:(t,e,r)=>{"use strict";r.d(e,{LambdaClient:()=>P,LambdaInvocationError:()=>k});r(811);var n=r(639),o=r(570),i=r.n(o);const a=require("k6/encoding");var c=r.n(a),u=r(2),s=r(539),f=r(464);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function h(t){var e="function"==typeof Map?new Map:void 0;return h=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(O())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&_(o,r.prototype),o}(t,arguments,j(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_(r,t)},h(t)}function p(){p=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function O(){}var j={};s(j,a,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(A([])));_&&_!==r&&n.call(_,a)&&(j=_);var x=O.prototype=g.prototype=Object.create(j);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,a,c){var u=h(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e2&&void 0!==m[2]?m[2]:{}).invocationType||"RequestResponse",u=d(d({},this.commonHeaders),{},x(x(x({},f.V1,"AWSLambda.".concat(a)),"X-Amz-Invocation-Type",a),"X-Amz-Log-Type",n.logType||"None")),n.clientContext&&(u["X-Amz-Client-Context"]=n.clientContext),n.qualifier&&(o.Qualifier=n.qualifier),s=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/2015-03-31/functions/".concat(e,"/invocations"),query:o,headers:u,body:r||""},{}),t.next=9,i().asyncRequest(this.method,s.url,s.body,{headers:s.headers});case 9:if(l=t.sent,this._handle_error(l),h=l.headers["X-Amz-Log-Result"],y={executedVersion:l.headers["X-Amz-Executed-Version"],logResult:h?c().b64decode(h,"std","s"):void 0,statusCode:l.status,payload:l.body},!(v=l.headers["X-Amz-Function-Error"])){t.next=18;break}throw new k(v,y);case 18:return t.abrupt("return",y);case 19:case"end":return t.stop()}}),t,this)})),o=function(){var t=this,e=arguments;return new Promise((function(n,o){var i=r.apply(t,e);function a(t){v(i,n,o,a,c,"next",t)}function c(t){v(i,n,o,a,c,"throw",t)}a(void 0)}))},function(t,e){return o.apply(this,arguments)})},{key:"_handle_error",value:function(t){var e=t.error_code,r=t.error;if(""!=r||0!==e){if(e<1400||e>=1600)throw new s.D(r,e);var o=s.c.parse(t);switch(o.code){case"AuthorizationHeaderMalformed":case"InvalidSignatureException":throw new n.s(o.message,o.code);default:throw o}}}}]);var r,o}(u.R),k=function(t){function e(t,r){var n;return m(this,e),x(n=w(this,e,["".concat(t,": ").concat(r.payload)]),"response",void 0),n.response=r,n}return S(e,t),g(e)}(h(Error))},535:(t,e,r)=>{"use strict";r.d(e,{SQSClient:()=>k});r(811);var n=r(639),o=r(2),i=r(570),a=r.n(i),c=r(680),u=r(539);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(){f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function O(){}var j={};l(j,a,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(A([])));_&&_!==r&&n.call(_,a)&&(j=_);var x=O.prototype=g.prototype=Object.create(j);function E(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,a,c){var u=p(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==s(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==p[2]?p[2]:{}).messageDeduplicationId&&(o=y(y({},o),{},{MessageDeduplicationId:n.messageDeduplicationId})),void 0!==n.messageGroupId&&(o=y(y({},o),{},{MessageGroupId:n.messageGroupId})),void 0!==n.messageAttributes&&(i=Object.entries(n.messageAttributes).reduce((function(t,e,r){var n=l(e,2),o=n[0],i=n[1],a="Binary"===i.type?"BinaryValue":"StringValue";return Object.assign(t,x(x(x({},"MessageAttribute.".concat(r+1,".Name"),o),"MessageAttribute.".concat(r+1,".Value.").concat(a),i.value),"MessageAttribute.".concat(r+1,".Value.DataType"),i.type))}),{}),o=y(y({},o),i)),void 0!==n.delaySeconds&&(o=y(y({},o),{},{DelaySeconds:n.delaySeconds})),u=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:y({},this.commonHeaders),body:(0,c.R)(o)},{}),t.next=10,a().asyncRequest("POST",u.url,u.body||"",{headers:u.headers});case 10:return s=t.sent,this._handleError("SendMessage",s),h=s.html("SendMessageResponse > SendMessageResult"),t.abrupt("return",new L(h.find("MessageId").text(),h.find("MD5OfMessageBody").text()));case 14:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})},{key:"listQueues",value:(r=v(f().mark((function t(){var e,r,n,o,i,u=arguments;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={Action:"ListQueues",Version:P},void 0!==(null==(e=u.length>0&&void 0!==u[0]?u[0]:{})?void 0:e.maxResults)&&(r=y(y({},r),{},{MaxResults:e.maxResults})),void 0!==(null==e?void 0:e.nextToken)&&(r=y(y({},r),{},{NextToken:e.nextToken})),void 0!==(null==e?void 0:e.queueNamePrefix)&&(r=y(y({},r),{},{QueueNamePrefix:e.queueNamePrefix})),n=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:y(y({},this.commonHeaders),{},{Host:this.endpoint.host}),body:(0,c.R)(r)},{}),t.next=9,a().asyncRequest("POST",n.url,n.body||"",{headers:n.headers});case 9:return o=t.sent,this._handleError("ListQueues",o),i=o.html(),t.abrupt("return",{urls:i.find("QueueUrl").toArray().map((function(t){return t.text()})),nextToken:i.find("NextToken").text()||void 0});case 13:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"_handleError",value:function(t,e){var r=e.error_code;if(""!=e.error||0!==r){var o=u.c.parseXML(e.body);if("AuthorizationHeaderMalformed"===o.code)throw new n.s(o.message,o.code);throw new T(o.message,o.code||"unknown",t)}}}]);var r,o}(o.R),L=g((function t(e,r){m(this,t),x(this,"id",void 0),x(this,"bodyMD5",void 0),this.id=e,this.bodyMD5=r})),T=function(t){function e(t,r,n){var o;return m(this,e),x(o=w(this,e,[t,r]),"operation",void 0),o.name="SQSServiceError",o.operation=n,o}return S(e,t),g(e)}(u.c)},414:(t,e,r)=>{var n=r(33),o=r(550),i=o;i.v1=n,i.v4=o,t.exports=i},471:t=>{for(var e=[],r=0;r<256;++r)e[r]=(r+256).toString(16).substr(1);t.exports=function(t,r){var n=r||0,o=e;return[o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]]].join("")}},814:t=>{var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var r=new Uint8Array(16);t.exports=function(){return e(r),r}}else{var n=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)3&e||(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n}}},33:(t,e,r)=>{var n,o,i=r(814),a=r(471),c=0,u=0;t.exports=function(t,e,r){var s=e&&r||0,f=e||[],l=(t=t||{}).node||n,h=void 0!==t.clockseq?t.clockseq:o;if(null==l||null==h){var p=i();null==l&&(l=n=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==h&&(h=o=16383&(p[6]<<8|p[7]))}var y=void 0!==t.msecs?t.msecs:(new Date).getTime(),d=void 0!==t.nsecs?t.nsecs:u+1,v=y-c+(d-u)/1e4;if(v<0&&void 0===t.clockseq&&(h=h+1&16383),(v<0||y>c)&&void 0===t.nsecs&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=y,u=d,o=h;var m=(1e4*(268435455&(y+=122192928e5))+d)%4294967296;f[s++]=m>>>24&255,f[s++]=m>>>16&255,f[s++]=m>>>8&255,f[s++]=255&m;var b=y/4294967296*1e4&268435455;f[s++]=b>>>8&255,f[s++]=255&b,f[s++]=b>>>24&15|16,f[s++]=b>>>16&255,f[s++]=h>>>8|128,f[s++]=255&h;for(var g=0;g<6;++g)f[s+g]=l[g];return e||a(f)}},550:(t,e,r)=>{var n=r(814),o=r(471);t.exports=function(t,e,r){var i=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var a=(t=t||{}).random||(t.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e)for(var c=0;c<16;++c)e[i+c]=a[c];return e||o(a)}},275:t=>{"use strict";t.exports=require("k6/crypto")},95:t=>{"use strict";t.exports=require("k6/html")},570:t=>{"use strict";t.exports=require("k6/http")}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{AMZ_CONTENT_SHA256_HEADER:()=>o.b2,AWSConfig:()=>e.g,AWSError:()=>u.c,EventBridgeClient:()=>Le,InvalidAWSConfigError:()=>e.r,InvalidSignatureError:()=>t.s,KMSClient:()=>x,KMSDataKey:()=>P,KMSServiceError:()=>k,KinesisClient:()=>ne,LambdaClient:()=>Ce.LambdaClient,LambdaInvocationError:()=>Ce.LambdaInvocationError,NetworkError:()=>u.D,S3Bucket:()=>W,S3Client:()=>Q,S3Object:()=>X,S3ServiceError:()=>$,SQSClient:()=>qt.SQSClient,Secret:()=>bt,SecretsManagerClient:()=>mt,SecretsManagerServiceError:()=>gt,SignatureV4:()=>t.B,SystemsManagerClient:()=>It,SystemsManagerParameter:()=>Mt,SystemsManagerServiceError:()=>Gt,UNSIGNED_PAYLOAD:()=>o.z8});var t=r(639),e=r(811),o=r(464),i=r(570),a=r.n(i),c=r(2),u=r(539);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(){f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function O(){}var j={};l(j,a,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(A([])));_&&_!==r&&n.call(_,a)&&(j=_);var x=O.prototype=g.prototype=Object.create(j);function E(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,i,a,c){var u=p(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==s(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=L(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function L(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e1&&void 0!==c[1]?c[1]:T.Size256,n=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/",headers:h(h({},this.commonHeaders),{},S({},o.V1,"TrentService.GenerateDataKey")),body:JSON.stringify({KeyId:e,NumberOfBytes:r})},{}),t.next=4,a().asyncRequest(this.method,n.url,n.body,{headers:n.headers});case 4:return i=t.sent,this._handle_error(L.GenerateDataKey,i),t.abrupt("return",P.fromJSON(i.json()));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.error_code;if(0!==n){var o=r.json();if(n>=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new k(i,o.__type,e)}if(1500===n)throw new k("An error occured on the server side","InternalServiceError",e)}}}]);var n,i}(c.R),E=function(){function t(e,r){d(this,t),S(this,"keyArn",void 0),S(this,"keyId",void 0),this.keyArn=e,this.keyId=r}return m(t,null,[{key:"fromJSON",value:function(e){return new t(e.KeyArn,e.KeyId)}}])}(),P=function(){function t(e,r,n){d(this,t),S(this,"id",void 0),S(this,"ciphertextBlob",void 0),S(this,"plaintext",void 0),this.ciphertextBlob=e,this.id=r,this.plaintext=n}return m(t,null,[{key:"fromJSON",value:function(e){return new t(e.CiphertextBlob,e.KeyId,e.Plaintext)}}])}(),k=function(t){function e(t,r,n){var o;return d(this,e),S(o=b(this,e,[t,r]),"operation",void 0),o.name="KMSServiceError",o.operation=n,o}return O(e,t),m(e)}(u.c),L=function(t){return t.GenerateDataKey="GenerateDataKey",t.ListKeys="ListKeys",t}(L||{}),T=function(t){return t[t.Size256=32]="Size256",t[t.Size512=64]="Size512",t}(T||{}),N=r(95);function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}function A(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function R(t){for(var e=1;e=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function I(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function M(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){I(i,n,o,a,c,"next",t)}function c(t){I(i,n,o,a,c,"throw",t)}a(void 0)}))}}function G(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function K(t,e){for(var r=0;r".concat(t.partNumber,"").concat(t.eTag,"")})).join(""),""),(u=this.endpoint.copy()).hostname="".concat(e,".").concat(this.endpoint.hostname),s=this.signature.sign({method:i,endpoint:u,path:"/".concat(r),headers:{},body:c,query:{uploadId:"".concat(n)}},{}),t.next=7,a().asyncRequest(i,s.url,s.body||null,{headers:s.headers});case 7:f=t.sent,this._handle_error("CompleteMultipartUpload",f);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return o.apply(this,arguments)})},{key:"abortMultipartUpload",value:(n=M(D().mark((function t(e,r,n){var o,i,c,u;return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o="DELETE",(i=this.endpoint.copy()).hostname="".concat(e,".").concat(this.endpoint.hostname),c=this.signature.sign({method:o,endpoint:i,path:"/".concat(r),headers:{},query:{uploadId:"".concat(n)}},{}),t.next=6,a().asyncRequest(o,c.url,c.body||null,{headers:c.headers});case 6:u=t.sent,this._handle_error("AbortMultipartUpload",u);case 8:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return n.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.status,o=r.error_code,i=r.error;if(!(n>=200&&n<300&&""==i&&0===o)){if(301==n||i&&i.startsWith("301"))throw new $("Resource not found","ResourceNotFound",e);var a=u.c.parseXML(r.body);if("AuthorizationHeaderMalformed"===a.code)throw new t.s(a.message,a.code);throw new $(a.message,a.code||"unknown",e)}}}]);var n,o,i,c,s,f,l,h,p,y}(c.R),W=q((function t(e,r){G(this,t),J(this,"name",void 0),J(this,"creationDate",void 0),this.name=e,this.creationDate=r})),X=q((function t(e,r,n,o,i,a){G(this,t),J(this,"key",void 0),J(this,"lastModified",void 0),J(this,"etag",void 0),J(this,"size",void 0),J(this,"storageClass",void 0),J(this,"data",void 0),this.key=e,this.lastModified=r,this.etag=n,this.size=o,this.storageClass=i,this.data=a})),Y=q((function t(e,r){G(this,t),J(this,"key",void 0),J(this,"uploadId",void 0),this.key=e,this.uploadId=r})),Z=q((function t(e,r){G(this,t),J(this,"partNumber",void 0),J(this,"eTag",void 0),this.partNumber=e,this.eTag=r})),$=function(t){function e(t,r,n){var o;return G(this,e),J(o=H(this,e,[t,r]),"operation",void 0),o.name="S3ServiceError",o.operation=n,o}return F(e,t),q(e)}(u.c),tt=r(414);function et(t){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function rt(){rt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==et(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ot(t){for(var e=1;e=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new gt(i,o.__type,e)}if(1500===n)throw new gt("An error occured on the server side","InternalServiceError",e)}}}]);var n,i,c,u,s}(c.R),bt=function(){function t(e,r,n,o,i,a){var c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[];ct(this,t),dt(this,"name",void 0),dt(this,"arn",void 0),dt(this,"secret",void 0),dt(this,"createdDate",void 0),dt(this,"lastAccessedDate",void 0),dt(this,"lastChangedDate",void 0),dt(this,"tags",void 0),this.name=e,this.arn=r,this.secret=n,this.createdDate=o,this.lastAccessedDate=i,this.lastChangedDate=a,this.tags=c}return st(t,null,[{key:"fromJSON",value:function(e){return new t(e.Name,e.ARN,e.SecretString,e.CreatedDate,e.LastAccessedDate,e.LastChangedDate,e.Tags)}}])}(),gt=function(t){function e(t,r,n){var o;return ct(this,e),dt(o=ft(this,e,[t,r]),"operation",void 0),o.name="SecretsManagerServiceError",o.operation=n,o}return pt(e,t),st(e)}(u.c),wt=function(t){return t.ListSecrets="ListSecrets",t.GetSecretValue="GetSecretValue",t.CreateSecret="CreateSecret",t.PutSecretValue="PutSecretValue",t.DeleteSecret="DeleteSecret",t}(wt||{});function Ot(t){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ot(t)}function jt(){jt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Ot(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function St(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _t(t){for(var e=1;e1&&void 0!==c[1]&&c[1],n=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/",headers:_t(_t({},this.commonHeaders),{},Rt({},o.V1,"AmazonSSM.GetParameter")),body:JSON.stringify({Name:e,WithDecryption:r})},{}),t.next=4,a().asyncRequest(this.method,n.url,n.body,{headers:n.headers});case 4:return i=t.sent,this._handle_error(Kt.GetParameter,i),t.abrupt("return",Mt.fromJSON(i.json()));case 7:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){xt(i,r,o,a,c,"next",t)}function c(t){xt(i,r,o,a,c,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.error_code;if(0!==n){var o=r.json();if(n>=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new Gt(i,o.__type,e)}if(1500===n)throw new Gt("An error occured on the server side","InternalServiceError",e)}}}]);var n,i}(c.R),Mt=function(){function t(e,r,n,o,i,a,c,u,s){Et(this,t),Rt(this,"arn",void 0),Rt(this,"dataType",void 0),Rt(this,"lastModifiedDate",void 0),Rt(this,"name",void 0),Rt(this,"selector",void 0),Rt(this,"sourceResult",void 0),Rt(this,"type",void 0),Rt(this,"value",void 0),Rt(this,"version",void 0),this.arn=e,this.dataType=r,this.lastModifiedDate=n,this.name=o,this.selector=i,this.sourceResult=a,this.type=c,this.value=u,this.version=s}return kt(t,null,[{key:"fromJSON",value:function(e){var r=e.Parameter;return new t(r.ARN,r.DataType,r.LastModifiedDate,r.Name,r.Selector,r.SourceResult,r.Type,r.Value,r.Version)}}])}(),Gt=function(t){function e(t,r,n){var o;return Et(this,e),Rt(o=Lt(this,e,[t,r]),"operation",void 0),o.name="SystemsManagerServiceError",o.operation=n,o}return Ct(e,t),kt(e)}(u.c),Kt=function(t){return t.GetParameter="GetParameter",t}(Kt||{}),qt=r(535);function Ht(t){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(t)}function zt(){zt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==Ht(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function Bt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ft(t){for(var e=1;e1&&void 0!==o[1]?o[1]:{}).shardCount&&{ShardCount:r.shardCount}),r.streamModeDetails&&{StreamMode:r.streamModeDetails.streamMode}),t.next=4,this._send_request("CreateStream",n);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"deleteStream",value:(l=Jt(zt().mark((function t(e){var r,n,o=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Ft(Ft({StreamName:e},(r=o.length>1&&void 0!==o[1]?o[1]:{}).streamARN&&{StreamARN:r.streamARN}),r.enforceConsumerDeletion&&{EnforceConsumerDeletion:r.enforceConsumerDeletion}),t.next=4,this._send_request("DeleteStream",n);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"listStreams",value:(f=Jt(zt().mark((function t(){var e,r,n,o=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Ft(Ft(Ft({},(e=o.length>0&&void 0!==o[0]?o[0]:{}).exclusiveStartStreamName&&{ExclusiveStartStreamName:e.exclusiveStartStreamName}),e.limit&&{Limit:e.limit}),e.nextToken&&{NextToken:e.nextToken}),t.next=4,this._send_request("ListStreams",r);case 4:return n=t.sent,t.abrupt("return",ie.fromJson(null==n?void 0:n.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"putRecords",value:(s=Jt(zt().mark((function t(e){var r,n,o,i=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=i.length>1&&void 0!==i[1]?i[1]:{}).streamName||r.streamARN){t.next=3;break}throw new Error("Either streamName or streamARN must be provided");case 3:return n=Ft(Ft({Records:e},r.streamName&&{StreamName:r.streamName}),r.streamARN&&{StreamARN:r.streamARN}),t.next=6,this._send_request("PutRecords",n);case 6:return o=t.sent,t.abrupt("return",ce.fromJson(null==o?void 0:o.json()));case 8:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"getRecords",value:(u=Jt(zt().mark((function t(e){var r,n,o,i=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Ft(Ft({ShardIterator:e},(r=i.length>1&&void 0!==i[1]?i[1]:{}).limit&&{Limit:r.limit}),r.streamARN&&{StreamARN:r.streamARN}),t.next=4,this._send_request("GetRecords",n);case 4:return o=t.sent,t.abrupt("return",se.fromJson(null==o?void 0:o.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"listShards",value:(c=Jt(zt().mark((function t(e){var r,n,o,i=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Ft(Ft({StreamName:e},(r=i.length>1&&void 0!==i[1]?i[1]:{}).nextToken&&{NextToken:r.nextToken}),r.maxResults&&{MaxResults:r.maxResults}),t.next=4,this._send_request("ListShards",n);case 4:return o=t.sent,t.abrupt("return",le.fromJson(null==o?void 0:o.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"getShardIterator",value:(i=Jt(zt().mark((function t(e,r,n){var o,i,a,c=arguments;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=Ft(Ft({StreamName:e,ShardId:r,ShardIteratorType:n},(o=c.length>3&&void 0!==c[3]?c[3]:{}).startingSequenceNumber&&{StartingSequenceNumber:o.startingSequenceNumber}),o.timestamp&&{Timestamp:o.timestamp}),t.next=4,this._send_request("GetShardIterator",i);case 4:return a=t.sent,t.abrupt("return",pe.fromJson(null==a?void 0:a.json()));case 6:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return i.apply(this,arguments)})},{key:"_send_request",value:(n=Jt(zt().mark((function t(e,r){var n,i;return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:Ft(Ft({},this.commonHeaders),{},ee({},o.V1,"".concat(this.serviceVersion,".").concat(e))),body:JSON.stringify(r)},{}),t.next=3,a().asyncRequest("POST",n.url,n.body,{headers:n.headers});case 3:return i=t.sent,this._handle_error(e,i),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"_handle_error",value:function(e,r){var n=r.error_code;if(0!==n){var o=r.json();if(n>=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new oe(i,o.__type,e)}if(1500===n)throw new oe("An error occured on the server side","InternalServiceError",e)}}}]);var n,i,c,u,s,f,l,h}(c.R),oe=function(t){function e(t,r,n){var o;return Ut(this,e),ee(o=Xt(this,e,[t,r]),"operation",void 0),o.name="KinesisServiceError",o.operation=n,o}return $t(e,t),Wt(e)}(u.c),ie=function(){function t(e,r,n,o){Ut(this,t),ee(this,"hasMoreStreams",void 0),ee(this,"nextToken",void 0),ee(this,"streamNames",void 0),ee(this,"streamSummaries",void 0),this.hasMoreStreams=e,this.nextToken=r,this.streamNames=n,this.streamSummaries=o}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.HasMoreStreams,n=void 0!==r&&r,o=e.NextToken,i=void 0===o?"":o,a=e.StreamNames,c=void 0===a?[]:a,u=e.StreamSummaries,s=void 0===u?[]:u;return new t(n,i,c,null==s?void 0:s.map(ae.fromJson))}}])}(),ae=function(){function t(e,r,n,o,i){Ut(this,t),ee(this,"streamARN",void 0),ee(this,"streamCreationTimestamp",void 0),ee(this,"streamModeDetails",void 0),ee(this,"streamName",void 0),ee(this,"streamStatus",void 0),this.streamARN=e,this.streamCreationTimestamp=r,this.streamModeDetails=n,this.streamName=o,this.streamStatus=i}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.StreamARN,n=void 0===r?"":r,o=e.StreamCreationTimestamp,i=void 0===o?0:o,a=e.StreamModeDetails,c=void 0===a?{}:a,u=e.StreamName,s=void 0===u?"":u,f=e.StreamStatus;return new t(n,i,c,s,void 0===f?"":f)}}])}(),ce=function(){function t(e,r,n){Ut(this,t),ee(this,"encryptionType",void 0),ee(this,"failedRecordCount",void 0),ee(this,"records",void 0),this.encryptionType=e,this.failedRecordCount=r,this.records=n}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.EncryptionType,n=void 0===r?"NONE":r,o=e.FailedRecordCount,i=void 0===o?0:o,a=e.Records;return new t(n,i,(void 0===a?[]:a).map(ue.fromJson))}}])}(),ue=function(){function t(e,r){Ut(this,t),ee(this,"sequenceNumber",void 0),ee(this,"shardId",void 0),this.sequenceNumber=e,this.shardId=r}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.SequenceNumber,e.ShardId)}}])}(),se=function(){function t(e,r,n){Ut(this,t),ee(this,"nextShardIterator",void 0),ee(this,"records",void 0),ee(this,"millisBehindLatest",void 0),this.nextShardIterator=e,this.records=r,this.millisBehindLatest=n}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.NextShardIterator,n=void 0===r?"":r,o=e.Records,i=void 0===o?[]:o,a=e.MillisBehindLatest,c=void 0===a?0:a;return new t(n,i.map(fe.fromJson),c)}}])}(),fe=function(){function t(e,r,n){Ut(this,t),ee(this,"data",void 0),ee(this,"partitionKey",void 0),ee(this,"sequenceNumber",void 0),this.data=e,this.partitionKey=r,this.sequenceNumber=n}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.Data,e.PartitionKey,e.SequenceNumber)}}])}(),le=function(){function t(e,r){Ut(this,t),ee(this,"shards",void 0),ee(this,"nextToken",void 0),this.shards=e,this.nextToken=r}return Wt(t,null,[{key:"fromJson",value:function(e){var r=e.Shards,n=void 0===r?[]:r,o=e.NextToken;return new t(n.map(he.fromJson),o)}}])}(),he=function(){function t(e,r,n,o,i){Ut(this,t),ee(this,"id",void 0),ee(this,"parentShardId",void 0),ee(this,"adjacentParentShardId",void 0),ee(this,"hashKeyRange",void 0),ee(this,"sequenceNumberRange",void 0),this.id=e,this.parentShardId=o,this.adjacentParentShardId=i,this.hashKeyRange=r,this.sequenceNumberRange=n}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.ShardId,e.HashKeyRange,e.SequenceNumberRange,e.ParentShardId,e.AdjacentParentShardId)}}])}(),pe=function(){function t(e){Ut(this,t),ee(this,"shardIterator",void 0),this.shardIterator=e}return Wt(t,null,[{key:"fromJson",value:function(e){return new t(e.ShardIterator)}}])}();function ye(t){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ye(t)}function de(){de=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function b(){}function g(){}var w={};s(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(N([])));j&&j!==r&&n.call(j,a)&&(w=j);var S=g.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==ye(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=l(e,r,n);if("normal"===s.type){if(o=n.done?d:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function ve(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function me(t){for(var e=1;e=1400&&n<=1499){var i=o.Message||o.message||o.__type;if("InvalidSignatureException"===o.__type)throw new t.s(i,o.__type);throw new Ne(i,o.__type,e)}if(1500===n)throw new Ne("An error occured on the server side","InternalServiceError",e)}}}]);var n,i}(c.R),Te=function(t){return t.PutEvents="PutEvents",t}(Te||{}),Ne=function(t){function e(t,r,n){var o;return ge(this,e),Pe(o=je(this,e,[t,r]),"operation",void 0),o.name="EventBridgeServiceError",o.operation=n,o}return xe(e,t),Oe(e)}(u.c),Ce=r(340)})();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})(); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map index 94cb2b5..141009b 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","mappings":";u4BAWO,IAAMA,EAAS,WAsBlB,SAXA,SAAAA,EAAYC,EAAsB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N,MAAM,IAAIyD,EAAAA,EAAsBoW,EAAcha,EAAMG,QAIxD,MAAM,IAAIorB,GAAwBvR,EAAcha,EAAMG,OAAkB8V,EAC5E,CAEA,GAAkB,OAAdrD,EACA,MAAM,IAAI2Y,GACN,sCACA,uBACAtV,EAtBR,CAyBJ,KApEA,IAtCJ7E,EAsCIka,CAoEC,CA9FyB,CAASvxB,EAAAA,GAiGlCqxB,GAAoB,SAApBA,GAAoB,OAApBA,EAAoB,sBAApBA,CAAoB,EAApBA,IAAoB,IAoCZG,GAAuB,SAAAhjB,GAUhC,SAAAgjB,EAAY1vB,EAAiByD,EAAc2W,GAAiC,IAAAlD,EAG9C,OAH8C7Y,GAAA,KAAAqxB,GACpDpxB,GAApB4Y,EAAAjX,GAAA,KAAAyvB,EAAA,CAAM1vB,EAASyD,IAAK,oBACpByT,EAAKvT,KAAO,0BACZuT,EAAKkD,UAAYA,EAASlD,CAC9B,CAAC,OAAAhX,GAAAwvB,EAAAhjB,GAAAlN,GAAAkwB,EAAA,CAd+B,CAASlsB,EAAAA","sources":["webpack://k6-jslib-aws/./src/internal/client.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/encoding\"","webpack://k6-jslib-aws/./src/internal/lambda.ts","webpack://k6-jslib-aws/./src/internal/sqs.ts","webpack://k6-jslib-aws/./node_modules/uuid/index.js","webpack://k6-jslib-aws/./node_modules/uuid/lib/bytesToUuid.js","webpack://k6-jslib-aws/./node_modules/uuid/lib/rng-browser.js","webpack://k6-jslib-aws/./node_modules/uuid/v1.js","webpack://k6-jslib-aws/./node_modules/uuid/v4.js","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/kms.ts","webpack://k6-jslib-aws/./src/internal/s3.ts","webpack://k6-jslib-aws/./src/internal/secrets-manager.ts","webpack://k6-jslib-aws/./src/internal/ssm.ts","webpack://k6-jslib-aws/./src/internal/kinesis.ts","webpack://k6-jslib-aws/./src/internal/event-bridge.ts"],"sourcesContent":["import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/encoding\");","import http, { RefinedResponse, ResponseType } from 'k6/http'\nimport encoding from 'k6/encoding'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { HTTPHeaders, HTTPMethod, QueryParameterBag } from './http'\n\n/**\n * Class allowing to interact with Amazon AWS's Lambda service\n */\nexport class LambdaClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n private readonly method: HTTPMethod\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'lambda')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Invoke an AWS Lambda function\n *\n * @param {string} name - The name of the function\n * @param {string} payload - The payload to send to function\n * @param {InvocationOptions} options - Additional options to customize invocation\n *\n * @throws {LambdaInvocationError}\n */\n async invoke(\n name: string,\n payload: string,\n options: InvocationOptions = {}\n ): Promise {\n const query: QueryParameterBag = {}\n const invocationType = options.invocationType || 'RequestResponse'\n const headers = {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AWSLambda.${invocationType}`,\n 'X-Amz-Invocation-Type': invocationType,\n 'X-Amz-Log-Type': options.logType || 'None',\n }\n if (options.clientContext) {\n headers['X-Amz-Client-Context'] = options.clientContext\n }\n if (options.qualifier) {\n query['Qualifier'] = options.qualifier\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: `/2015-03-31/functions/${name}/invocations`,\n query,\n headers,\n body: payload || '',\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(res)\n\n const logResult = res.headers['X-Amz-Log-Result']\n const response = {\n executedVersion: res.headers['X-Amz-Executed-Version'],\n logResult: logResult ? encoding.b64decode(logResult, 'std', 's') : undefined,\n statusCode: res.status,\n payload: res.body as string,\n }\n\n const functionError = res.headers['X-Amz-Function-Error']\n if (functionError) {\n throw new LambdaInvocationError(functionError, response)\n } else {\n return response\n }\n }\n\n private _handle_error(response: RefinedResponse) {\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n if (errorMessage == '' && errorCode === 0) {\n return\n }\n\n const awsError = AWSError.parse(response)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n case 'InvalidSignatureException':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw awsError\n }\n }\n}\n\nexport class LambdaInvocationError extends Error {\n response: InvocationResponse\n\n constructor(message: string, response: InvocationResponse) {\n super(`${message}: ${response.payload}`)\n this.response = response\n }\n}\n\ninterface InvocationOptions {\n /**\n * Defines whether the function is invoked synchronously or asynchronously.\n * - `RequestResponse` (default): Invoke the function synchronously.\n * - `Event`: Invoke the function asynchronously.\n * - `DryRun`: Validate parameter values and verify that the user or role has permission to invoke the function.\n */\n invocationType?: 'RequestResponse' | 'Event' | 'DryRun'\n /**\n * Set to `Tail` to include the execution log in the response. Applies to synchronously invoked functions only.\n */\n logType?: 'None' | 'Tail'\n /**\n * Up to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object.\n */\n clientContext?: string\n /**\n * Specify a version or alias to invoke a published version of the function.\n */\n qualifier?: string\n}\n\ninterface InvocationResponse {\n statusCode: number\n executedVersion?: string\n logResult?: string\n payload?: string\n}\n","import { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { HTTPHeaders, SignedHTTPRequest } from './http'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\nimport { toFormUrlEncoded } from './utils'\nimport { AWSError } from './error'\n\nconst API_VERSION = '2012-11-05'\n\nexport class SQSClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'sqs')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: true,\n })\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-www-form-urlencoded',\n }\n }\n\n /**\n * Delivers a message to the specified queue.\n *\n * @param {string} queueUrl - The URL of the Amazon SQS queue to which a message is sent. Queue URLs and names are case-sensitive.\n * @param {string} messageBody - The message to send. The minimum size is one character. The maximum size is 256 KB.\n * @param {Object} options - Options for the request\n * @param {string} [options.messageDeduplicationId] - The message deduplication id.\n * @param {string} [options.messageGroupId] - The message group ID for FIFO queues\n * @returns {Message} - The message that was sent.\n */\n async sendMessage(\n queueUrl: string,\n messageBody: string,\n options: SendMessageOptions = {}\n ): Promise {\n const method = 'POST'\n\n let body: object = {\n Action: 'SendMessage',\n Version: API_VERSION,\n QueueUrl: queueUrl,\n MessageBody: messageBody,\n }\n\n if (typeof options.messageDeduplicationId !== 'undefined') {\n body = { ...body, MessageDeduplicationId: options.messageDeduplicationId }\n }\n\n if (typeof options.messageGroupId !== 'undefined') {\n body = { ...body, MessageGroupId: options.messageGroupId }\n }\n\n if (typeof options.messageAttributes !== 'undefined') {\n /*\n * A single message attribute is represented as 3 separate parameters: name, value, and type.\n * The name of the value parameter varies based on the data type.\n * See https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html#SQS-SendMessage-request-MessageAttributes\n * for more information.\n */\n const attributeParameters = Object.entries(options.messageAttributes).reduce(\n (params, [name, attribute], i) => {\n const valueParameterSuffix =\n attribute.type === 'Binary' ? 'BinaryValue' : 'StringValue'\n return Object.assign(params, {\n [`MessageAttribute.${i + 1}.Name`]: name,\n [`MessageAttribute.${i + 1}.Value.${valueParameterSuffix}`]:\n attribute.value,\n [`MessageAttribute.${i + 1}.Value.DataType`]: attribute.type,\n })\n },\n {} as Record\n )\n body = { ...body, ...attributeParameters }\n }\n\n if (typeof options.delaySeconds !== 'undefined') {\n body = { ...body, DelaySeconds: options.delaySeconds }\n }\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n },\n body: toFormUrlEncoded(body),\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {\n headers: signedRequest.headers,\n })\n this._handleError('SendMessage', res)\n\n const parsed = res.html('SendMessageResponse > SendMessageResult')\n return new Message(parsed.find('MessageId').text(), parsed.find('MD5OfMessageBody').text())\n }\n\n /**\n * Returns a list of your queues in the current region.\n *\n * @param {ListQueuesRequestParameters} [parameters={}] request parameters\n * @param {number} [ListQueuesRequestParameters.maxResults] Maximum number of results to include in the response. Value range is 1 to 1000. You must set maxResults to receive a value for nextToken in the response.\n * @param {string} [ListQueuesRequestParameters.nextToken] Pagination token to request the next set of results.\n * @param {string} [ListQueuesRequestParameters.queueNamePrefix] A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned.\n * @returns {Object}\n * @returns {string[]} Object.queueUrls - A list of queue URLs, up to 1000 entries.\n * @returns {string} [Object.nextToken] - In the future, you can use NextToken to request the next set of results.\n */\n async listQueues(parameters: ListQueuesRequestParameters = {}): Promise {\n const method = 'POST'\n\n let body: object = {\n Action: 'ListQueues',\n Version: API_VERSION,\n }\n\n if (typeof parameters?.maxResults !== 'undefined') {\n body = { ...body, MaxResults: parameters.maxResults }\n }\n\n if (typeof parameters?.nextToken !== 'undefined') {\n body = { ...body, NextToken: parameters.nextToken }\n }\n\n if (typeof parameters?.queueNamePrefix !== 'undefined') {\n body = { ...body, QueueNamePrefix: parameters.queueNamePrefix }\n }\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n Host: this.endpoint.host,\n },\n body: toFormUrlEncoded(body),\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {\n headers: signedRequest.headers,\n })\n this._handleError('ListQueues', res)\n\n const parsed = res.html()\n return {\n urls: parsed\n .find('QueueUrl')\n .toArray()\n .map((e) => e.text()),\n nextToken: parsed.find('NextToken').text() || undefined,\n }\n }\n\n private _handleError(\n operation: SQSOperation,\n response: RefinedResponse\n ) {\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n if (errorMessage == '' && errorCode === 0) {\n return\n }\n\n const awsError = AWSError.parseXML(response.body as string)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw new SQSServiceError(awsError.message, awsError.code || 'unknown', operation)\n }\n }\n}\n\n/**\n * An Amazon SQS message.\n */\nexport class Message {\n /**\n * A unique identifier for the message.\n * A MessageIdis considered unique across all AWS accounts for an extended period of time.\n */\n id: string\n\n /**\n * An MD5 digest of the non-URL-encoded message body string.\n */\n bodyMD5: string\n\n /**\n * Instantiates a new Message object.\n *\n * @param id\n * @param md5Ofbody\n */\n constructor(id: string, bodyMD5: string) {\n this.id = id\n this.bodyMD5 = bodyMD5\n }\n}\n\n/**\n * SQSServiceError indicates an error occurred while interacting with the SQS API.\n */\nexport class SQSServiceError extends AWSError {\n operation: SQSOperation\n\n constructor(message: string, code: string, operation: SQSOperation) {\n super(message, code)\n this.name = 'SQSServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SQSOperation describes possible SQS operations.\n */\ntype SQSOperation = 'ListQueues' | 'SendMessage'\n\nexport interface SendMessageOptions {\n /**\n * The message deduplication ID for FIFO queues\n */\n messageDeduplicationId?: string\n\n /**\n * The message group ID for FIFO queues\n */\n messageGroupId?: string\n\n /**\n * The message attributes\n */\n messageAttributes?: {\n [name: string]: { type: 'String' | 'Number' | 'Binary'; value: string }\n }\n\n /**\n * The length of time, in seconds, for which to delay a specific message.\n */\n delaySeconds?: number\n}\n\nexport interface ListQueuesRequestParameters {\n /**\n * Maximum number of results to include in the response. Value range is 1 to 1000.\n */\n maxResults?: number\n /**\n * Pagination token to request the next set of results.\n */\n nextToken?: string\n /**\n * A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned.\n * Queue URLs and names are case-sensitive.\n */\n queueNamePrefix?: string\n}\n\nexport interface ListQueuesResponse {\n /**\n * A list of queue URLs, up to 1,000 entries, or the value of MaxResults you sent in the request.\n */\n urls: string[]\n /**\n * Pagination token to include in the next request.\n */\n nextToken?: string\n}\n","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","module.exports = require(\"k6/crypto\");","module.exports = require(\"k6/html\");","module.exports = require(\"k6/http\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { JSONArray, JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's KMS service\n */\nexport class KMSClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a KMSClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'kms')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: awsConfig.region,\n credentials: {\n accessKeyId: awsConfig.accessKeyId,\n secretAccessKey: awsConfig.secretAccessKey,\n sessionToken: awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n // All interactions with the KMS service\n // are made via the GET or POST method.\n this.method = 'POST'\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Gets a list of all the KMS keys in the caller's AWS\n * account and region.\n *\n * @returns an array of all the available keys\n */\n async listKeys(): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n // For some reason, the base target is not kms...\n [AMZ_TARGET_HEADER]: `TrentService.ListKeys`,\n },\n body: JSON.stringify({}),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(KMSOperation.ListKeys, res)\n\n const json: JSONArray = res.json('Keys') as JSONArray\n return json.map((k) => KMSKey.fromJSON(k as JSONObject))\n }\n\n /**\n * GenerateDataKey returns a unique symmetric data key for use outside of AWS KMS.\n *\n * This operation returns a plaintext copy of the data key and a copy that is encrypted under a symmetric encryption KMS key that you specify.\n * The bytes in the plaintext key are random; they are not related to the caller or the KMS key.\n * You can use the plaintext key to encrypt your data outside of AWS KMS and store the encrypted data key with the encrypted data.\n *\n * To generate a data key, specify the symmetric encryption KMS key that will be used to encrypt the data key.\n * You cannot use an asymmetric KMS key to encrypt data keys.\n *\n * Used to generate data key with the KMS key defined\n * @param {string} id - Specifies the symmetric encryption KMS key that encrypts the data key. Use its key ID, key ARN, alias name, or alias ARN.\n * @param {KMKeySize} size - Specifies the length of the data key in bytes. For example, use the value 64 to generate a 512-bit data key (64 bytes is 512 bits). Default is 32, and generates a 256-bit data key.\n * @throws {KMSServiceError}\n * @throws {InvalidSignatureError}\n * @returns {KMSDataKey} - The generated data key.\n */\n async generateDataKey(\n id: string,\n size: KMSKeySize = KMSKeySize.Size256\n ): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n // For some reason, the base target is not kms...\n [AMZ_TARGET_HEADER]: `TrentService.GenerateDataKey`,\n },\n body: JSON.stringify({ KeyId: id, NumberOfBytes: size }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(KMSOperation.GenerateDataKey, res)\n\n return KMSDataKey.fromJSON(res.json() as JSONObject)\n }\n\n _handle_error(operation: KMSOperation, response: RefinedResponse) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new KMSServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new KMSServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/**\n * Class representing a KMS key\n */\nexport class KMSKey {\n /**\n * ARN of the key\n */\n keyArn: string\n\n /**\n * Unique identifier of the key\n */\n keyId: string\n\n constructor(keyArn: string, KeyId: string) {\n this.keyArn = keyArn\n this.keyId = KeyId\n }\n\n static fromJSON(json: JSONObject) {\n return new KMSKey(json.KeyArn as string, json.KeyId as string)\n }\n}\n\n/**\n * Class representing a data key\n */\nexport class KMSDataKey {\n /**\n * The Amazon Resource Name (key ARN) of the KMS key that encrypted the data key.\n */\n id: string\n\n /**\n * The (base64-encoded) encrypted copy of the data key.\n */\n ciphertextBlob: string\n\n /**\n * The plaintext data key.\n * Use this data key to encrypt your data outside of KMS. Then, remove it from memory as soon as possible.\n */\n plaintext: string\n\n constructor(CiphertextBlob: string, KeyId: string, Plaintext: string) {\n this.ciphertextBlob = CiphertextBlob\n this.id = KeyId\n this.plaintext = Plaintext\n }\n\n static fromJSON(json: JSONObject) {\n return new KMSDataKey(\n json.CiphertextBlob as string,\n json.KeyId as string,\n json.Plaintext as string\n )\n }\n}\n\nexport class KMSServiceError extends AWSError {\n operation: KMSOperation\n\n /**\n * Constructs a KMSServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: KMSOperation) {\n super(message, code)\n this.name = 'KMSServiceError'\n this.operation = operation\n }\n}\n\n/**\n * KMSOperation defines all currently implemented KMS Service operations.\n */\nenum KMSOperation {\n GenerateDataKey = 'GenerateDataKey',\n ListKeys = 'ListKeys',\n}\n\n/**\n * KMSKeyLength describes possible key lenght values for KMS API data key operations.\n */\nenum KMSKeySize {\n Size256 = 32,\n Size512 = 64,\n}\n","import { bytes } from 'k6'\nimport { parseHTML } from 'k6/html'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { SignedHTTPRequest } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/** Class allowing to interact with Amazon AWS's S3 service */\nexport class S3Client extends AWSClient {\n private readonly signature: SignatureV4\n\n /**\n * Create a S3Client\n *\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 's3')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: false,\n applyChecksum: true,\n })\n }\n\n /**\n * Returns a list of all buckets owned by the authenticated sender of the request.\n * To use this operation, you must have the s3:ListAllMyBuckets permission.\n *\n * @return {Array.} buckets - An array of objects describing S3 buckets\n * with the following fields: name, and creationDate.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async listBuckets(): Promise> {\n const method = 'GET'\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'GET',\n endpoint: this.endpoint,\n path: '/',\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('ListBuckets', res)\n\n const buckets: Array = []\n\n const doc = parseHTML(res.body as string)\n\n doc.find('Buckets')\n .children()\n .each((_, bucketDefinition) => {\n const bucket = {}\n\n bucketDefinition.children().forEach((child) => {\n switch (child.nodeName()) {\n case 'name':\n Object.assign(bucket, { name: child.textContent() })\n break\n case 'creationdate':\n Object.assign(bucket, {\n creationDate: Date.parse(child.textContent()),\n })\n }\n })\n\n buckets.push(bucket as S3Bucket)\n })\n\n return buckets\n }\n\n /**\n * Returns some or all (up to 1,000) of the objects in a bucket.\n *\n * @param {string} bucketName - Bucket name to list.\n * @param {string?} prefix='' - Limits the response to keys that begin with the specified prefix.\n * @return {Array.} - returns an array of objects describing S3 objects\n * with the following fields: key, lastModified, etag, size and storageClass.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async listObjects(bucketName: string, prefix?: string): Promise> {\n const method = 'GET'\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/`,\n query: {\n 'list-type': '2',\n prefix: prefix || '',\n },\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('ListObjectsV2', res)\n\n const objects: Array = []\n\n // Extract the objects definition from\n // the XML response\n parseHTML(res.body as string)\n .find('Contents')\n .each((_, objectDefinition) => {\n const obj = {}\n\n objectDefinition.children().forEach((child) => {\n switch (child.nodeName()) {\n case 'key':\n Object.assign(obj, { key: child.textContent() })\n break\n case 'lastmodified':\n Object.assign(obj, { lastModified: Date.parse(child.textContent()) })\n break\n case 'etag':\n Object.assign(obj, { etag: child.textContent() })\n break\n case 'size':\n Object.assign(obj, { size: parseInt(child.textContent()) })\n break\n case 'storageclass':\n Object.assign(obj, { storageClass: child.textContent() })\n }\n })\n\n objects.push(obj as S3Object)\n })\n\n return objects\n }\n /**\n * Retrieves an Object from Amazon S3.\n *\n * To use getObject, you must have `READ` access to the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to get.\n * @return {S3Object} - returns the content of the fetched S3 Object.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async getObject(bucketName: string, objectKey: string): Promise {\n // Prepare request\n const method = 'GET'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('GetObject', res)\n\n return new S3Object(\n objectKey,\n Date.parse(res.headers['Last-Modified']),\n res.headers['ETag'],\n parseInt(res.headers['Content-Length']),\n\n // The X-Amz-Storage-Class header is only set if the storage class is\n // not the default 'STANDARD' one.\n (res.headers['X-Amz-Storage-Class'] ?? 'STANDARD') as StorageClass,\n\n res.body\n )\n }\n /**\n * Adds an object to a bucket.\n *\n * You must have WRITE permissions on a bucket to add an object to it.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to put.\n * @param {string | ArrayBuffer} data - the content of the S3 Object to upload.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async putObject(\n bucketName: string,\n objectKey: string,\n data: string | ArrayBuffer,\n params?: PutObjectParams\n ): Promise {\n // Prepare request\n const method = 'PUT'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {\n Host: this.endpoint.host,\n ...(params?.contentDisposition && {\n 'Content-Disposition': params.contentDisposition,\n }),\n ...(params?.contentEncoding && { 'Content-Encoding': params.contentEncoding }),\n ...(params?.contentLength && { 'Content-Length': params.contentLength }),\n ...(params?.contentMD5 && { 'Content-MD5': params.contentMD5 }),\n ...(params?.contentType && { 'Content-Type': params.contentType }),\n },\n body: data,\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error('PutObject', res)\n }\n\n /**\n * Removes the null version (if there is one) of an object and inserts a delete marker,\n * which becomes the latest version of the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async deleteObject(bucketName: string, objectKey: string): Promise {\n // Prepare request\n const method = 'DELETE'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('DeleteObject', res)\n }\n\n /**\n * Copies an object from one bucket to another\n *\n * @param {string} sourceBucket - The source bucket name containing the object.\n * @param {string} sourceKey - Key of the source object to copy.\n * @param {string} destinationBucket - The destination bucket name containing the object.\n * @param {string} destinationKey - Key of the destination object.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async copyObject(\n sourceBucket: string,\n sourceKey: string,\n destinationBucket: string,\n destinationKey: string\n ): Promise {\n const method = 'PUT'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${destinationBucket}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${destinationKey}`,\n headers: {\n 'x-amz-copy-source': `${sourceBucket}/${sourceKey}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n\n this._handle_error('CopyObject', res)\n }\n\n /**\n * Creates a new multipart upload for a given objectKey.\n * The uploadId returned can be used to upload parts to the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to upload.\n * @return {S3MultipartUpload} - returns the uploadId of the newly created multipart upload.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async createMultipartUpload(bucketName: string, objectKey: string): Promise {\n const method = 'POST'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n query: { uploads: '' },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('CreateMultipartUpload', res)\n\n return new S3MultipartUpload(\n objectKey,\n parseHTML(res.body as string)\n .find('UploadId')\n .text()\n )\n }\n\n /**\n * Uploads a part in a multipart upload.\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to upload.\n * @param {string} uploadId - The uploadId of the multipart upload.\n * @param {number} partNumber - The part number of the part to upload.\n * @param {string | ArrayBuffer} data - The content of the part to upload.\n * @return {S3Part} - returns the ETag of the uploaded part.\n * @throws {S3ServiceError}\n */\n async uploadPart(\n bucketName: string,\n objectKey: string,\n uploadId: string,\n partNumber: number,\n data: string | ArrayBuffer\n ): Promise {\n const method = 'PUT'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n body: data,\n query: {\n partNumber: `${partNumber}`,\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('UploadPart', res)\n\n return new S3Part(partNumber, res.headers['Etag'])\n }\n\n /**\n * Completes a multipart upload by assembling previously uploaded parts.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @param {string} uploadId - The uploadId of the multipart upload to complete.\n * @param {S3Part[]} parts - The parts to assemble.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async completeMultipartUpload(\n bucketName: string,\n objectKey: string,\n uploadId: string,\n parts: S3Part[]\n ) {\n // Prepare request\n const method = 'POST'\n const body = `${parts\n .map(\n (part) =>\n `${part.partNumber}${part.eTag}`\n )\n .join('')}`\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n body: body,\n query: {\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n\n this._handle_error('CompleteMultipartUpload', res)\n }\n\n /**\n * Aborts a multipart upload.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @param {string} uploadId - The uploadId of the multipart upload to abort.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async abortMultipartUpload(bucketName: string, objectKey: string, uploadId: string) {\n const method = 'DELETE'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n query: {\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('AbortMultipartUpload', res)\n }\n\n _handle_error(operation: S3Operation, response: RefinedResponse) {\n const status: number = response.status\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n // We consider codes 200-299 as success\n if (status >= 200 && status < 300 && errorMessage == '' && errorCode === 0) {\n return\n }\n\n // A 301 response is returned when the bucket is not found.\n // Generally meaning that either the bucket name is wrong or the\n // region is wrong.\n //\n // See: https://github.com/grafana/k6/issues/2474\n // See: https://github.com/golang/go/issues/49281\n if (status == 301 || (errorMessage && errorMessage.startsWith('301'))) {\n throw new S3ServiceError('Resource not found', 'ResourceNotFound', operation)\n }\n\n const awsError = AWSError.parseXML(response.body as string)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw new S3ServiceError(awsError.message, awsError.code || 'unknown', operation)\n }\n }\n}\n\n/** Class representing a S3 Bucket */\nexport class S3Bucket {\n name: string\n creationDate: Date\n\n /**\n * Create an S3 Bucket\n *\n * @param {string} name - S3 bucket's name\n * @param {Date} creationDate - S3 bucket's creation date\n */\n constructor(name: string, creationDate: Date) {\n this.name = name\n this.creationDate = creationDate\n }\n}\n\n/** Class representing an S3 Object */\nexport class S3Object {\n key: string\n lastModified: number\n etag: string\n size: number\n storageClass: StorageClass\n data?: string | bytes | null\n\n /**\n * Create an S3 Object\n *\n * @param {string} key - S3 object's key\n * @param {Date} lastModified - S3 object last modification date\n * @param {string} etag - S3 object's etag\n * @param {number} size - S3 object's size\n * @param {StorageClass} storageClass - S3 object's storage class\n * @param {string | bytes | null} data=null - S3 Object's data\n */\n constructor(\n key: string,\n lastModified: number,\n etag: string,\n size: number,\n storageClass: StorageClass,\n data?: string | bytes | null\n ) {\n this.key = key\n this.lastModified = lastModified\n this.etag = etag\n this.size = size\n this.storageClass = storageClass\n this.data = data\n }\n}\n\n/** Class representing a S3 Multipart Upload */\nexport class S3MultipartUpload {\n key: string\n uploadId: string\n\n /**\n * Create an S3 Multipart Upload\n * @param {string} key - S3 object's key\n * @param {string} uploadId - S3 multipart upload id\n */\n\n constructor(key: string, uploadId: string) {\n this.key = key\n this.uploadId = uploadId\n }\n}\n\n/** Class representing a S3 Part */\nexport class S3Part {\n partNumber: number\n eTag: string\n\n /**\n * Create an S3 Part\n * @param {number} partNumber - Part number\n * @param {string} eTag - Part's etag\n */\n\n constructor(partNumber: number, eTag: string) {\n this.partNumber = partNumber\n this.eTag = eTag\n }\n}\n\n/**\n * Error indicating a S3 operation failed\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class S3ServiceError extends AWSError {\n operation: string\n\n /**\n * Constructs a S3ServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: string) {\n super(message, code)\n this.name = 'S3ServiceError'\n this.operation = operation\n }\n}\n\n/**\n * S3Operation describes possible values for S3 API operations,\n * as defined by AWS APIs.\n */\ntype S3Operation =\n | 'ListBuckets'\n | 'ListObjectsV2'\n | 'GetObject'\n | 'PutObject'\n | 'DeleteObject'\n | 'CopyObject'\n | 'CreateMultipartUpload'\n | 'CompleteMultipartUpload'\n | 'UploadPart'\n | 'AbortMultipartUpload'\n\n/**\n * Describes the class of storage used to store a S3 object.\n */\ntype StorageClass =\n | 'STANDARD'\n | 'REDUCED_REDUNDANCY'\n | 'GLACIER'\n | 'STANDARD_IA'\n | 'INTELLIGENT_TIERING'\n | 'DEEP_ARCHIVE'\n | 'OUTPOSTS'\n | 'GLACIER_IR'\n | undefined\n\n/**\n * PutObjectParams describes the parameters that can be passed to the PutObject operation.\n */\nexport interface PutObjectParams {\n /**\n * Specifies presentational information for the object.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.\n */\n contentDisposition?: string\n\n /**\n * Specifies what content encodings have been applied to the object and thus\n * what decoding mechanisms must be applied to obtain the media-type referenced\n * by the ContentType option.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.\n */\n contentEncoding?: string\n\n /**\n * Size of the body in bytes. This parameter is useful when the size of the body cannot be\n * determined automatically.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.\n */\n contentLength?: string\n\n /**\n * The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864.\n * This header can be used as a message integrity check to verify that the data is the same data that\n * was originally sent.\n *\n * Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity\n * check.\n */\n contentMD5?: string\n\n /**\n * A standard MIME type describing the format of the contents.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.\n */\n contentType?: string\n}\n","import { JSONArray, JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { v4 as uuidv4 } from 'uuid'\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's SecretsManager service\n */\nexport class SecretsManagerClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a SecretsManagerClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'secretsmanager')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n // All interactions with the Secrets Manager service\n // are made via the GET or POST method.\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Returns a list of all secrets owned by the authenticated sender of the request.\n * To use this operation, you must have the secretsmanager:ListSecrets permission.\n *\n * @return {Array.} secrets - An array of objects describing Secret Manager's secrets\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async listSecrets(): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.ListSecrets`,\n },\n body: JSON.stringify({}),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.ListSecrets, res)\n const json: JSONArray = res.json('SecretList') as JSONArray\n\n return json.map((s) => Secret.fromJSON(s as JSONObject))\n }\n\n /**\n * Retrieves a secret from Amazon Sercets Manager\n *\n * @param {string} id - The ARN or name of the secret to retrieve.\n * @returns {Secret} - returns the content of the fetched Secret object.\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async getSecret(id: string): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.GetSecretValue`,\n },\n body: JSON.stringify({ SecretId: id }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n\n this._handle_error(SecretsManagerOperation.GetSecretValue, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n\n /**\n * Creates a new secret\n *\n * Note that this method only supports string-based values at the moment.\n *\n * @param {string} name - The name of the new secret.\n * The secret name can contain ASCII letters, numbers, and the following characters: /_+=.@\n * @param {string} secret - The text data to encrypt and store in this new version of the secret.\n * @param {string} description - The description of the secret.\n * @param {string} versionID=null - Version of the secret. This value helps ensure idempotency.\n * As a default, if no versionID is provided, one will be created for you using the UUID v4\n * algorithm.\n * @param {Array.} tags=[] - A list of tags to attach to the secret. Each tag is a key and\n * value pair of strings in a JSON text string. Note that tag key names are case sensitive.\n * @returns {Secret} - returns the created secret\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async createSecret(\n name: string,\n secret: string,\n description: string,\n versionID?: string,\n tags?: Array\n ): Promise {\n versionID = versionID || uuidv4()\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.CreateSecret`,\n },\n body: JSON.stringify({\n Name: name,\n Description: description,\n SecretString: secret,\n ClientRequestToken: versionID,\n Tags: tags,\n }),\n },\n {}\n )\n\n // Ensure to include the desired 'Action' in the X-Amz-Target\n // header field, as documented by the AWS API docs.\n // headers['X-Amz-Target'] = `${this.serviceName}.CreateSecret`\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.CreateSecret, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n /**\n * Update a secret's value.\n *\n * Note that this method only support string-based values at the moment.\n *\n * @param {string} id - The ARN or name of the secret to update.\n * @param {string} secret - The text data to encrypt and store in this new version of the secret.\n * @param {} versionID=null - A unique identifier for the new version of the secret. This value helps ensure idempotency.\n * As a default, if no versionID is provided, one will be created for you using the UUID v4\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async putSecretValue(id: string, secret: string, versionID?: string): Promise {\n versionID = versionID || uuidv4()\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.PutSecretValue`,\n },\n body: JSON.stringify({\n SecretId: id,\n SecretString: secret,\n ClientRequestToken: versionID,\n }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.PutSecretValue, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n\n /**\n * Deletes a secret and all of its versions.\n *\n * You can specify a recovery window during which you can restore the secret.\n * The minimum recovery window is 7 days. The default recovery window is 30 days.\n *\n * @param {string} secretID - The ARN or name of the secret to delete.\n * @param {number} recoveryWindow - The number of days from 7 to 30 that Secrets Manager\n * waits before permanently deleting the secret.\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async deleteSecret(\n id: string,\n { recoveryWindow = 30, noRecovery = false }: { recoveryWindow: number; noRecovery: boolean }\n ): Promise {\n const payload: { [key: string]: string | boolean | number } = {\n SecretId: id,\n }\n\n // noRecovery and recoveryWindow are exclusive parameters\n if (noRecovery === true) {\n payload['ForceDeleteWithoutRecovery'] = true\n } else {\n payload['RecoveryWindowInDays'] = recoveryWindow\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.DeleteSecret`,\n },\n body: JSON.stringify(payload),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.DeleteSecret, res)\n }\n\n _handle_error(\n operation: SecretsManagerOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new SecretsManagerServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new SecretsManagerServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n// TODO: create a Tags type\n\n/**\n * Class representing a Secret Manager's secret\n */\nexport class Secret {\n name: string\n arn: string\n secret: string\n createdDate: number\n lastAccessedDate: number\n lastChangedDate: number\n tags: Array<{ [key: string]: string }>\n\n /**\n * Constructs a Secret Manager's Secret\n *\n * @param {string} name - The friendly name of the secret.\n * @param {string} arn - The ARN of the secret.\n * @param {number} createdDate - The date and time that this version of the secret was created.\n * @param {number} lastAccessedDate - The last date that this secret was accessed. This value is\n * truncated to midnight of the date and therefore shows only the date, not the time.\n * @param {number} lastChangedDate - The last date and time that this secret was modified in any way.\n * @param {Array.} tags - The list of user-defined tags associated with the secret.\n */\n constructor(\n name: string,\n arn: string,\n secretString: string,\n createdDate: number,\n lastAccessedDate: number,\n lastChangedDate: number,\n tags: Array<{ [key: string]: string }> = []\n ) {\n this.name = name\n this.arn = arn\n this.secret = secretString\n this.createdDate = createdDate\n this.lastAccessedDate = lastAccessedDate\n this.lastChangedDate = lastChangedDate\n this.tags = tags\n }\n\n /**\n * Parses and constructs a Secret Manager's Secret from the content\n * of a JSON response returned by the AWS service\n *\n * @param {Object} json - JSON object as returned and parsed from\n * the AWS service's API call.\n * @returns {Secret}\n */\n static fromJSON(json: JSONObject) {\n return new Secret(\n json.Name as string,\n json.ARN as string,\n json.SecretString as string,\n json.CreatedDate as number,\n json.LastAccessedDate as number,\n json.LastChangedDate as number,\n json.Tags as Array<{ [key: string]: string }>\n )\n }\n}\n\nexport class SecretsManagerServiceError extends AWSError {\n operation: SecretsManagerOperation\n\n /**\n * Constructs a SecretsManagerServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: SecretsManagerOperation) {\n super(message, code)\n this.name = 'SecretsManagerServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SecretsManagerOperation defines all currently implemented Secrets Manager Service operations.\n */\nenum SecretsManagerOperation {\n ListSecrets = 'ListSecrets',\n GetSecretValue = 'GetSecretValue',\n CreateSecret = 'CreateSecret',\n PutSecretValue = 'PutSecretValue',\n DeleteSecret = 'DeleteSecret',\n}\n","import { JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's Systems Manager service\n */\nexport class SystemsManagerClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a SystemsManagerClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'ssm')\n\n // All interactions with the Systems Manager service\n // are made via the POST method.\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: awsConfig.region,\n credentials: {\n accessKeyId: awsConfig.accessKeyId,\n secretAccessKey: awsConfig.secretAccessKey,\n sessionToken: awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n }\n\n /**\n * Retrieves a parameter from Amazon Systems Manager\n *\n * @param {string} name - The ARN or name of the parameter to retrieve.\n * @param {boolean} withDecryption - whether returned secure string parameters should be decrypted.\n * @returns {SystemsManagerParameter} - returns the fetched Parameter object.\n * @throws {SystemsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async getParameter(\n name: string,\n withDecryption: boolean = false\n ): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AmazonSSM.GetParameter`,\n },\n body: JSON.stringify({ Name: name, WithDecryption: withDecryption }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SystemsManagerOperation.GetParameter, res)\n\n return SystemsManagerParameter.fromJSON(res.json() as JSONObject)\n }\n\n _handle_error(\n operation: SystemsManagerOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new SystemsManagerServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new SystemsManagerServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/**\n * Class representing a Systems Manager's Parameter\n */\nexport class SystemsManagerParameter {\n /**\n * The Amazon Resource Name (ARN) of the parameter.\n */\n arn: string\n\n /**\n * The data type of the parameter, such as text or aws:ec2:image.\n * The default is text.\n */\n dataType: string\n\n /**\n * Date the parameter was last changed or updated and the parameter version was created.\n */\n lastModifiedDate: number\n\n /**\n * The friendly name of the parameter.\n */\n name: string\n\n /**\n * Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:\n * parameter_name:version\n * parameter_name:label\n */\n selector: string\n\n /**\n * plies to parameters that reference information in other AWS services. SourceResult is the raw result or response from the source.\n */\n sourceResult: string\n\n /**\n * The type of parameter. Valid values include the following: String, StringList, and SecureString.\n */\n type: string\n\n /**\n * The parameter value.\n */\n value: string\n\n /**\n * The parameter version.\n */\n version: number\n\n /**\n * Constructs a Systems Manager's Parameter\n *\n * @param {string} arn - The Amazon Resource Name (ARN) of the parameter.\n * @param {string} dataType - The data type of the parameter, such as text or aws:ec2:image. The default is text.\n * @param {number} lastModifiedDate - Date the parameter was last changed or updated and the parameter version was created.\n * @param {string} name - The friendly name of the parameter.\n * @param {string} selector - Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:\n * parameter_name:version\n * parameter_name:label\n * @param {string} sourceResult - Applies to parameters that reference information in other AWS services. SourceResult is the raw result or response from the source.\n * @param {string} type - The type of parameter. Valid values include the following: String, StringList, and SecureString.\n * @param {string} value - The parameter value.\n * @param {number} version - The parameter version.\n */\n constructor(\n arn: string,\n dataType: string,\n lastModifiedDate: number,\n name: string,\n selector: string,\n sourceResult: string,\n type: string,\n value: string,\n version: number\n ) {\n this.arn = arn\n this.dataType = dataType\n this.lastModifiedDate = lastModifiedDate\n this.name = name\n this.selector = selector\n this.sourceResult = sourceResult\n this.type = type\n this.value = value\n this.version = version\n }\n\n /**\n * Parses and constructs a Systems Manager's Parameter from the content\n * of a JSON response returned by the AWS service\n *\n * @param {Object} json - JSON object as returned and parsed from\n * the AWS service's API call.\n * @returns {SystemsManagerParameter}\n */\n static fromJSON(json: JSONObject): SystemsManagerParameter {\n const parameter = json.Parameter as JSONObject\n\n return new SystemsManagerParameter(\n parameter.ARN as string,\n parameter.DataType as string,\n parameter.LastModifiedDate as number,\n parameter.Name as string,\n parameter.Selector as string,\n parameter.SourceResult as string,\n parameter.Type as string,\n parameter.Value as string,\n parameter.Version as number\n )\n }\n}\n\nexport class SystemsManagerServiceError extends AWSError {\n operation: SystemsManagerOperation\n\n /**\n * Constructs a SystemsManagerServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {SystemsManagerOperation} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: SystemsManagerOperation) {\n super(message, code)\n this.name = 'SystemsManagerServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SystemsManagerOperation defines all currently implemented Systems Manager operations.\n */\nenum SystemsManagerOperation {\n GetParameter = 'GetParameter',\n}\n","import http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\n\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { JSONObject } from './json'\nimport { HTTPHeaders } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\nThis API is based on\nhttps://docs.aws.amazon.com/kinesis/latest/APIReference/API_Operations.html\n*/\n\n/**\n * Allows interacting with the Kinesis API.\n */\nexport class KinesisClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n private readonly serviceVersion: string\n\n /**\n * A constructor function that creates a new instance of the Kinesis class.\n * @param {AWSConfig} awsConfig - AWSConfig - This is the configuration object that is passed to\n * the constructor.\n * @returns A Proxy object.\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'kinesis')\n\n this.serviceVersion = 'Kinesis_20131202'\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: false,\n applyChecksum: true,\n })\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Creates a new Kinesis stream with the specified name and options.\n *\n * @param {string} streamName - The name of the stream to create.\n * @param {{\n * shardCount?: number;\n * streamModeDetails?: {\n * streamMode: StreamMode;\n * };\n * }} [options={}] - An optional object containing configuration options for the stream.\n * @param {number} [options.shardCount] - The number of shards for the stream. If not provided, the default value will be used.\n * @param {{streamMode: StreamMode}} [options.streamModeDetails] - An optional object containing the stream mode details.\n * @param {StreamMode} [options.streamModeDetails.streamMode] - The mode of the stream. If not provided, the default mode will be used.\n *\n * @throws {Error} Throws an error if the stream creation request fails.\n * @returns {void}\n */\n async createStream(\n streamName: string,\n options: { shardCount?: number; streamModeDetails?: { streamMode: StreamMode } } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(options.shardCount && { ShardCount: options.shardCount }),\n ...(options.streamModeDetails && { StreamMode: options.streamModeDetails.streamMode }),\n }\n\n await this._send_request('CreateStream', body)\n }\n\n /**\n * Deletes a Kinesis stream with the specified parameters.\n *\n * @param {string} streamName - The name of the stream to delete.\n * @param {{\n * streamARN?: string;\n * enforceConsumerDeletion?: boolean;\n * }} [parameters={}] - An optional object containing configuration options for the stream deletion.\n * @param {string} [parameters.streamARN] - The Amazon Resource Name (ARN) of the stream. If not provided, the ARN will be derived from the stream name.\n * @param {boolean} [parameters.enforceConsumerDeletion] - Whether to enforce the deletion of all registered consumers before deleting the stream. Defaults to false.\n *\n * @throws {Error} Throws an error if the stream deletion request fails.\n * @returns {void}\n */\n async deleteStream(\n streamName: string,\n parameters: { streamARN?: string; enforceConsumerDeletion?: boolean } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n ...(parameters.enforceConsumerDeletion && {\n EnforceConsumerDeletion: parameters.enforceConsumerDeletion,\n }),\n }\n\n await this._send_request('DeleteStream', body)\n }\n\n /**\n * Returns a list of Kinesis streams with the specified parameters.\n *\n * @param {{\n * exclusiveStartStreamName?: string;\n * limit?: number;\n * nextToken?: string;\n * }} [parameters={}] - An optional object containing configuration options for listing the streams.\n * @param {string} [parameters.exclusiveStartStreamName] - The name of the stream to start listing from. If not provided, the listing starts from the beginning.\n * @param {number} [parameters.limit] - The maximum number of streams to list. If not provided, the default value will be used.\n * @param {string} [parameters.nextToken] - A token to paginate the list of streams. If not provided, the first page will be returned.\n *\n * @throws {Error} Throws an error if the list streams request fails.\n * @returns {Partial} A partial of the ListStreamsResponse class.\n */\n async listStreams(\n parameters: {\n exclusiveStartStreamName?: string\n limit?: number\n nextToken?: string\n } = {}\n ): Promise {\n const body = {\n ...(parameters.exclusiveStartStreamName && {\n ExclusiveStartStreamName: parameters.exclusiveStartStreamName,\n }),\n ...(parameters.limit && { Limit: parameters.limit }),\n ...(parameters.nextToken && { NextToken: parameters.nextToken }),\n }\n\n const res = await this._send_request('ListStreams', body)\n return ListStreamsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Sends multiple records to a Kinesis stream in a single request.\n *\n * @param {string} streamName - The name of the stream to put records into.\n * @param {PutRecordsRequestEntry[]} records - An array of records to put into the stream.\n *\n * @throws {Error} Throws an error if the put records request fails.\n * @returns {Partial} A partial of the PutRecordsResponse class.\n */\n async putRecords(\n records: PutRecordsRequestEntry[],\n parameters: { streamName?: string; streamARN?: string } = {}\n ): Promise {\n if (!parameters.streamName && !parameters.streamARN) {\n throw new Error('Either streamName or streamARN must be provided')\n }\n\n const body = {\n Records: records,\n ...(parameters.streamName && { StreamName: parameters.streamName }),\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n }\n\n const res = await this._send_request('PutRecords', body)\n return PutRecordsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Retrieves records from a Kinesis stream.\n *\n * @param {string} shardIterator - The shard iterator to start retrieving records from.\n * @param {number} [limit] - The maximum number of records to return. If not provided, the default value will be used.\n *\n * @throws {Error} Throws an error if the get records request fails.\n * @returns {Partial} A partial of the GetRecordsResponse class.\n */\n async getRecords(\n shardIterator: string,\n parameters: { limit?: number; streamARN?: string } = {}\n ): Promise {\n const body = {\n ShardIterator: shardIterator,\n ...(parameters.limit && { Limit: parameters.limit }),\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n }\n\n const res = await this._send_request('GetRecords', body)\n return GetRecordsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Lists the shards in a Kinesis stream.\n *\n * @param {string} streamName - The name of the stream to list shards from.\n * @param {{\n * nextToken?: string;\n * maxResults?: number;\n * }} [parameters={}] - An optional object containing configuration options for listing shards.\n * @param {string} [parameters.nextToken] - A token to specify where to start paginating the shard list. If not provided, the first page will be returned.\n * @param {number} [parameters.maxResults] - The maximum number of shards to return. If not provided, the default value will be used.\n *\n * @throws {Error} Throws an error if the list shards request fails.\n * @returns {ListShardsResponse} A ListShardsResponse class instance.\n */\n async listShards(\n streamName: string,\n parameters: { nextToken?: string; maxResults?: number } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(parameters.nextToken && { NextToken: parameters.nextToken }),\n ...(parameters.maxResults && {\n MaxResults: parameters.maxResults,\n }),\n }\n\n const res = await this._send_request('ListShards', body)\n return ListShardsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Retrieves a shard iterator for the specified shard in a Kinesis stream.\n *\n * @param {string} streamName - The name of the stream.\n * @param {string} shardId - The shard ID for which to get the iterator.\n * @param {string} shardIteratorType - The shard iterator type. One of 'AT_SEQUENCE_NUMBER', 'AFTER_SEQUENCE_NUMBER', 'TRIM_HORIZON', 'LATEST', or 'AT_TIMESTAMP'.\n * @param {{\n * startingSequenceNumber?: string;\n * timestamp?: number;\n * }} [parameters={}] - An optional object containing configuration options for the shard iterator.\n * @param {string} [parameters.startingSequenceNumber] - The sequence number to start with when using 'AT_SEQUENCE_NUMBER' or 'AFTER_SEQUENCE_NUMBER' iterator types.\n * @param {number} [parameters.timestamp] - The timestamp to start with when using the 'AT_TIMESTAMP' iterator type.\n *\n * @throws {Error} Throws an error if the get shard iterator request fails.\n * @returns {string} The next position in the shard from which to start sequentially reading data records. If set to null, the shard has been closed and the requested iterator does not return any more data.\n */\n async getShardIterator(\n streamName: string,\n shardId: string,\n shardIteratorType: ShardIteratorKind,\n parameters: { startingSequenceNumber?: string; timestamp?: number } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ShardId: shardId,\n ShardIteratorType: shardIteratorType,\n ...(parameters.startingSequenceNumber && {\n StartingSequenceNumber: parameters.startingSequenceNumber,\n }),\n ...(parameters.timestamp && { Timestamp: parameters.timestamp }),\n }\n\n const res = await this._send_request('GetShardIterator', body)\n return GetShardIteratorResponse.fromJson(res?.json() as JSONObject)\n }\n\n private async _send_request(\n action: string,\n body: unknown\n ): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceVersion}.${action}`,\n },\n body: JSON.stringify(body),\n },\n {}\n )\n\n const res = await http.asyncRequest('POST', signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n\n this._handle_error(action, res)\n return res\n }\n\n /**\n * If the response is an error, throw an error\n *\n * @param {string} operation - The name of the operation that was called.\n * @param response - RefinedResponse\n * @returns The response is being returned.\n */\n _handle_error(operation: string, response: RefinedResponse) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new KinesisServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new KinesisServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/* `KinesisServiceError` is a subclass of `AWSError` that adds an `operation` property */\nexport class KinesisServiceError extends AWSError {\n operation: string\n\n /**\n * Constructs a KinesisServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: string) {\n super(message, code)\n this.name = 'KinesisServiceError'\n this.operation = operation\n }\n}\n\n/**\n * Describes the options for a Kinesis stream.\n */\ntype StreamMode = 'PROVISIONED' | 'ON_DEMAND'\n\n/**\n * Determines how the shard iterator is used to start reading data records from the shard.\n */\nexport type ShardIteratorKind =\n | 'AT_SEQUENCE_NUMBER'\n | 'AFTER_SEQUENCE_NUMBER'\n | 'TRIM_HORIZON'\n | 'LATEST'\n | 'AT_TIMESTAMP'\n\n/**\n * Describes the status of a Kinesis data stream.\n */\nexport type StreamStatus = 'CREATING' | 'DELETING' | 'ACTIVE' | 'UPDATING'\n\nexport type StreamModeDetails = {\n /**\n * Specifies the capacity mode to which you want to set your data stream.\n */\n SteamMode: 'PROVISIONED' | 'ON_DEMAND'\n}\n\nexport class ListStreamsResponse {\n /**\n * Indicates whether there are more streams available to list.\n */\n hasMoreStreams: boolean\n\n /**\n * The token that identifies which batch of results you can retrieve.\n */\n nextToken?: string\n\n /**\n * The names of the streams that are associated with the AWS account making the ListStreams request.\n */\n streamNames: string[]\n\n /**\n * A list of StreamSummary objects.\n */\n streamSummaries: StreamSummary[]\n\n constructor(\n HasMoreStreams: boolean,\n NextToken: string,\n StreamNames: string[],\n StreamSummaries: StreamSummary[]\n ) {\n this.hasMoreStreams = HasMoreStreams\n this.nextToken = NextToken\n this.streamNames = StreamNames\n this.streamSummaries = StreamSummaries\n }\n\n static fromJson(result: JSONObject): ListStreamsResponse {\n const {\n HasMoreStreams = false,\n NextToken = '',\n StreamNames = [],\n StreamSummaries = [],\n } = result\n\n return new ListStreamsResponse(\n HasMoreStreams as boolean,\n NextToken as string,\n StreamNames as string[],\n (StreamSummaries as JSONObject[])?.map(StreamSummary.fromJson) as StreamSummary[]\n )\n }\n}\n\n/**\n * Summarizes a Stream\n */\nexport class StreamSummary {\n /**\n * The Amazon Resource Name (ARN) for the stream.\n */\n streamARN: string\n\n /**\n * The time at which the stream was created.\n */\n streamCreationTimestamp: number\n\n /**\n * Specify the capacity mode to which you want to set your data stream.\n */\n streamModeDetails: StreamModeDetails\n\n /**\n * The name of the stream.\n */\n streamName: string\n\n /**\n * The current status of the stream being described.\n */\n streamStatus: StreamStatus\n\n constructor(\n StreamARN: string,\n StreamCreationTimestamp: number,\n StreamMode: StreamModeDetails,\n StreamName: string,\n StreamStatus: StreamStatus\n ) {\n this.streamARN = StreamARN\n this.streamCreationTimestamp = StreamCreationTimestamp\n this.streamModeDetails = StreamMode\n this.streamName = StreamName\n this.streamStatus = StreamStatus\n }\n\n static fromJson(summary: JSONObject): StreamSummary {\n const {\n StreamARN = '',\n StreamCreationTimestamp = 0,\n StreamModeDetails = {},\n StreamName = '',\n StreamStatus = '',\n } = summary\n\n return new StreamSummary(\n StreamARN as string,\n StreamCreationTimestamp as number,\n StreamModeDetails as StreamModeDetails,\n StreamName as string,\n StreamStatus as StreamStatus\n )\n }\n}\n\n/**\n * Represents the output for PutRecords.\n */\nexport interface PutRecordsRequestEntry {\n /**\n * The data blob to put into the record, which is base64-encoded when the blob is serialized.\n */\n Data: string | ArrayBuffer\n\n /**\n * Determines which share in the stream the data record is assigned to.\n */\n PartitionKey: string\n}\n\n// Response class for PutRecords API\nexport class PutRecordsResponse {\n /**\n * The encryption type used on the records. This parameter can be one of the following values:\n * - NONE: Do not encrypt the records.\n * - KMS: Use server-side encryption on the records using a customer-managed AWS KMS key.\n */\n encryptionType: EncryptionType\n\n /**\n * The number of unsuccessfully processed records in a PutRecords request.\n */\n failedRecordCount: number\n\n /**\n * An array of successfully and unsuccessfully processed record results.\n */\n records: PutRecordsResultEntry[]\n\n constructor(\n encryptionType: 'NONE' | 'KMS',\n failedRecordCount: number,\n records: PutRecordsResultEntry[]\n ) {\n this.encryptionType = encryptionType\n this.failedRecordCount = failedRecordCount\n this.records = records\n }\n\n static fromJson(json: JSONObject): PutRecordsResponse {\n const { EncryptionType = 'NONE', FailedRecordCount = 0, Records = [] } = json\n const records = (Records as JSONObject[]).map(PutRecordsResultEntry.fromJson)\n\n return new PutRecordsResponse(\n EncryptionType as EncryptionType,\n FailedRecordCount as number,\n records\n )\n }\n}\n\ntype EncryptionType = 'NONE' | 'KMS'\n\n/**\n * Represents the result of an individual record from a PutRecords request.\n */\nexport class PutRecordsResultEntry {\n /**\n * The sequence number for an individual record result.\n */\n sequenceNumber: string\n\n /**\n * The shard ID for an individual record result.\n */\n shardId: string\n\n constructor(sequenceNumber: string, shardId: string) {\n this.sequenceNumber = sequenceNumber\n this.shardId = shardId\n }\n\n static fromJson(json: JSONObject): PutRecordsResultEntry {\n return new PutRecordsResultEntry(json.SequenceNumber as string, json.ShardId as string)\n }\n}\n\n/**\n * Represents the response format of the GetRecords operation.\n */\nexport class GetRecordsResponse {\n /**\n * The next position in the shard from which to start sequentially reading data records.\n */\n nextShardIterator: string\n\n /**\n * The data records retrieved from the shard.\n */\n records: Record[]\n\n /**\n * The number of milliseconds the GetRecords response is from the\n * tip of the stream, indicating how far behind current time the\n * consumer is.\n *\n * A value of zero indicates that record processing is caught\n * up, and there are no new records to process at this moment.\n */\n millisBehindLatest: number\n\n constructor(nextShardIterator: string, records: Record[], millisBehindLatest: number) {\n this.nextShardIterator = nextShardIterator\n this.records = records\n this.millisBehindLatest = millisBehindLatest\n }\n\n static fromJson(json: JSONObject): GetRecordsResponse {\n const { NextShardIterator = '', Records = [], MillisBehindLatest = 0 } = json\n const records = (Records as JSONObject[]).map(Record.fromJson)\n\n return new GetRecordsResponse(\n NextShardIterator as string,\n records as Record[],\n MillisBehindLatest as number\n )\n }\n}\n\n/**\n * The unit of data of the Kinesis data stream, which is composed of a sequence\n * number, a partition key, and a data blob.\n */\nclass Record {\n /**\n * The data blob.\n */\n data: string | ArrayBuffer\n\n /**\n * Identifies which shard in the stream the data record is assigned to.\n */\n partitionKey: string\n\n /**\n * The unique identifier of the record in the stream.\n */\n sequenceNumber: string\n\n constructor(data: string | ArrayBuffer, partitionKey: string, sequenceNumber: string) {\n this.data = data\n this.partitionKey = partitionKey\n this.sequenceNumber = sequenceNumber\n }\n\n static fromJson(json: JSONObject): Record {\n return new Record(\n json.Data as string | ArrayBuffer,\n json.PartitionKey as string,\n json.SequenceNumber as string\n )\n }\n}\n\n// Response class for ListShards API\nexport class ListShardsResponse {\n /**\n * An array of JSON objects.\n *\n * Each object represents one shard and specifies the IDs of the shard, the\n * shard's parent, and the shard that's adjacent to the shard's parent.\n */\n shards: Shard[]\n\n /**\n * When the number of shards in the data stream is greater than the\n * default value for the MaxResults parameter, or if you explicitly specify\n * a value for MaxResults that is less than the number of shards in the data\n * stream, the response includes a pagination token named NextToken.\n */\n nextToken?: string\n\n constructor(shards: Shard[], nextToken?: string) {\n this.shards = shards\n this.nextToken = nextToken\n }\n\n static fromJson(json: JSONObject): ListShardsResponse {\n const { Shards = [], NextToken } = json\n const shards = (Shards as JSONObject[]).map(Shard.fromJson)\n\n return new ListShardsResponse(shards, NextToken as string | undefined)\n }\n}\n\n/**\n * A uniquely identified group of data records in a Kinesis data stream.\n */\nexport class Shard {\n /**\n * The unique identifier of the shard within the stream.\n */\n id: string\n\n /**\n * The shard ID of the shard's parent.\n */\n parentShardId?: string\n\n /**\n * The shard ID of the shard adjacent to the shard's parent.\n */\n adjacentParentShardId?: string\n\n /**\n * The range of possible hash key values for the shard, which is a set of ordered contiguous positive integers.\n */\n hashKeyRange: HashKeyRange\n\n sequenceNumberRange: SequenceNumberRange\n\n constructor(\n id: string,\n hashKeyRange: HashKeyRange,\n sequenceNumberRange: SequenceNumberRange,\n parentShardId?: string,\n adjacentParentShardId?: string\n ) {\n this.id = id\n this.parentShardId = parentShardId\n this.adjacentParentShardId = adjacentParentShardId\n this.hashKeyRange = hashKeyRange\n this.sequenceNumberRange = sequenceNumberRange\n }\n\n static fromJson(json: JSONObject): Shard {\n return new Shard(\n json.ShardId as string,\n json.HashKeyRange as unknown as HashKeyRange,\n json.SequenceNumberRange as unknown as SequenceNumberRange,\n json.ParentShardId as string | undefined,\n json.AdjacentParentShardId as string | undefined\n )\n }\n}\n\n/**\n * Describes the range of possible hash key values for the shard, which is\n * a set of ordered contiguous positive integers.\n */\nexport interface HashKeyRange {\n /**\n * The starting hash key of the hash key range.\n */\n startingHashKey: string\n\n /**\n * The ending hash key of the hash key range.\n */\n endingHashKey: string\n}\n\n/**\n * The range of possible sequence numbers for the shard.\n */\nexport interface SequenceNumberRange {\n /**\n * The ending sequence number for the range.\n *\n * Shards that are in the OPEN state have an ending sequence number of null.\n */\n endingSequenceNumber?: string\n\n /**\n * The starting sequence number for the range.\n */\n startingSequenceNumber: string\n}\n\n/**\n * Describes a shard iterator response.\n */\nclass GetShardIteratorResponse {\n /**\n * The position in the shard from which to start reading data records sequentially.\n */\n shardIterator: string\n\n constructor(shardIterator: string) {\n this.shardIterator = shardIterator\n }\n\n static fromJson(json: JSONObject): GetShardIteratorResponse {\n return new GetShardIteratorResponse(json.ShardIterator as string)\n }\n}\n","import http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { JSONObject } from './json'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { HTTPHeaders, HTTPMethod } from './http'\n\n/**\n * Class allowing to interact with Amazon AWS's Event Bridge service\n */\nexport class EventBridgeClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'events')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Sends custom events to Amazon EventBridge so that they can be matched to rules.\n *\n * @param {PutEventsInput} input - The input for the PutEvents operation.\n * @throws {EventBridgeServiceError}\n * @throws {InvalidSignatureError}\n */\n async putEvents(input: PutEventsInput) {\n const parsedEvent = {\n ...input,\n Entries: input.Entries.map((entry) => ({\n ...entry,\n Detail: JSON.stringify(entry.Detail),\n })),\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AWSEvents.PutEvents`,\n },\n body: JSON.stringify(parsedEvent),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(EventBridgeOperation.PutEvents, res)\n }\n\n _handle_error(\n operation: EventBridgeOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new EventBridgeServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new EventBridgeServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\nenum EventBridgeOperation {\n PutEvents = 'PutEvents',\n}\n\n/**\n * Represents an event to be submitted.\n *\n * @typedef {Object} PutEventEntry\n *\n * @property {string} Detail - A valid serialized JSON object. There is no other schema imposed. The JSON object may contain fields and nested sub-objects.\n * @property {string} DetailType - Free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.\n * @property {string} EventBusName - The name or ARN of the event bus to receive the event. Only the rules that are associated with this event bus are used to match the event. If you omit this, the default event bus is used.\n * @property {string[]} Resources - AWS resources, identified by Amazon Resource Name (ARN), which the event primarily concerns. Any number, including zero, may be present.\n * @property {string} Source - The source of the event.\n */\ninterface PutEventEntry {\n Source: string\n Detail: JSONObject\n DetailType: string\n EventBusName?: string\n Resources?: [string]\n}\n\n/**\n * Represents the input for a put events operation.\n *\n * @typedef {Object} PutEventsInput\n *\n * @property {string} [EndpointId] - The optional URL subdomain of the endpoint.\n * @property {PutEventEntry[]} Entries - An array of entries that defines an event in your system.\n */\ninterface PutEventsInput {\n EndpointId?: string\n Entries: PutEventEntry[]\n}\n\nexport class EventBridgeServiceError extends AWSError {\n operation: EventBridgeOperation\n\n /**\n * Constructs a EventBridgeServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: EventBridgeOperation) {\n super(message, code)\n this.name = 'EventBridgeServiceError'\n this.operation = operation\n }\n}\n"],"names":["AWSClient","awsConfig","serviceName","_classCallCheck","_defineProperty","this","undefined","endpoint","_endpoint","key","get","Endpoint","concat","region","set","AWSConfig","options","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","value","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","AMZ_ALGORITHM_QUERY_PARAM","AMZ_CREDENTIAL_QUERY_PARAM","AMZ_DATE_QUERY_PARAM","AMZ_EXPIRES_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_SIGNED_HEADERS_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","MAX_PRESIGNED_TTL","EMPTY_SHA256","UNSIGNED_PAYLOAD","completeUrl","startsWith","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","_protocol","slice","_hostname","_port","parseInt","href","_value$split2","hostname","port","protocol","host","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","hasHeader","soughtHeader","_i","_Object$keys","Object","keys","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","isArrayBuffer","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","prototype","call","toFormUrlEncoded","form","params","require","_regeneratorRuntime","t","r","hasOwnProperty","o","defineProperty","i","Symbol","a","iterator","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","self","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","obj","toPrimitive","String","_toPrimitive","LambdaClient","_AWSClient","commonHeaders","fn","_callee","payload","invocationType","signedRequest","res","logResult","functionError","_args","_context","logType","clientContext","qualifier","sign","http","_handle_error","executedVersion","encoding","statusCode","status","LambdaInvocationError","args","_x","_x2","errorCode","error_code","awsError","_this2","arr","_arrayWithHoles","_iterableToArrayLimit","minLen","_arrayLikeToArray","test","_unsupportedIterableToArray","_nonIterableRest","len","arr2","_asyncToGenerator","API_VERSION","SQSClient","_sendMessage","queueUrl","messageBody","attributeParameters","parsed","Action","Version","QueueUrl","MessageBody","messageDeduplicationId","MessageDeduplicationId","messageGroupId","MessageGroupId","messageAttributes","entries","attribute","valueParameterSuffix","assign","delaySeconds","DelaySeconds","_handleError","html","_listQueues","_callee2","parameters","_args2","_context2","maxResults","MaxResults","nextToken","NextToken","queueNamePrefix","QueueNamePrefix","Host","urls","toArray","operation","SQSServiceError","id","bodyMD5","v1","v4","uuid","module","exports","byteToHex","substr","buf","offset","bth","getRandomValues","window","msCrypto","rnds8","Uint8Array","rnds","Math","random","_nodeId","_clockseq","rng","bytesToUuid","_lastMSecs","_lastNSecs","b","node","clockseq","seedBytes","msecs","getTime","nsecs","dt","tl","tmh","ii","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","definition","prop","KMSClient","_listKeys","KMSOperation","ListKeys","k","KMSKey","fromJSON","_generateDataKey","size","KMSKeySize","Size256","KeyId","NumberOfBytes","GenerateDataKey","KMSDataKey","errorMessage","KMSServiceError","keyArn","keyId","KeyArn","CiphertextBlob","Plaintext","ciphertextBlob","plaintext","S3Client","_listBuckets","buckets","children","each","_","bucketDefinition","bucket","child","nodeName","textContent","creationDate","_listObjects","bucketName","prefix","objects","objectDefinition","lastModified","etag","storageClass","_getObject","_callee3","objectKey","_res$headers$XAmzSt","_context3","S3Object","_x3","_x4","_putObject","_callee4","data","_context4","contentDisposition","contentEncoding","contentLength","contentMD5","contentType","_x5","_x6","_x7","_x8","_deleteObject","_callee5","_context5","_x9","_x10","_copyObject","_callee6","sourceBucket","sourceKey","destinationBucket","destinationKey","bucketEndpoint","_context6","copy","_x11","_x12","_x13","_x14","_createMultipartUpload","_callee7","_context7","uploads","S3MultipartUpload","_x15","_x16","_uploadPart","_callee8","uploadId","partNumber","_context8","S3Part","_x17","_x18","_x19","_x20","_x21","_completeMultipartUpload","_callee9","parts","_context9","part","eTag","_x22","_x23","_x24","_x25","_abortMultipartUpload","_callee10","_context10","_x26","_x27","_x28","S3ServiceError","S3Bucket","SecretsManagerClient","_listSecrets","SecretsManagerOperation","ListSecrets","Secret","_getSecret","SecretId","GetSecretValue","_createSecret","secret","description","versionID","tags","uuidv4","Name","Description","SecretString","ClientRequestToken","Tags","CreateSecret","_putSecretValue","PutSecretValue","_deleteSecret","_ref$recoveryWindow","recoveryWindow","_ref$noRecovery","noRecovery","DeleteSecret","SecretsManagerServiceError","arn","secretString","createdDate","lastAccessedDate","lastChangedDate","ARN","CreatedDate","LastAccessedDate","LastChangedDate","SystemsManagerClient","withDecryption","WithDecryption","SystemsManagerOperation","GetParameter","SystemsManagerParameter","_getParameter","SystemsManagerServiceError","dataType","lastModifiedDate","selector","sourceResult","version","parameter","Parameter","DataType","LastModifiedDate","Selector","SourceResult","Type","Value","KinesisClient","serviceVersion","_createStream","streamName","StreamName","shardCount","ShardCount","streamModeDetails","StreamMode","streamMode","_send_request","_deleteStream","streamARN","StreamARN","enforceConsumerDeletion","EnforceConsumerDeletion","_listStreams","_args3","exclusiveStartStreamName","ExclusiveStartStreamName","limit","Limit","ListStreamsResponse","fromJson","_putRecords","records","_args4","Records","PutRecordsResponse","_getRecords","shardIterator","_args5","ShardIterator","GetRecordsResponse","_listShards","_args6","ListShardsResponse","_getShardIterator","shardId","shardIteratorType","_args7","ShardId","ShardIteratorType","startingSequenceNumber","StartingSequenceNumber","timestamp","Timestamp","GetShardIteratorResponse","_send_request2","action","KinesisServiceError","HasMoreStreams","StreamNames","StreamSummaries","hasMoreStreams","streamNames","streamSummaries","result","_result$HasMoreStream","_result$NextToken","_result$StreamNames","_result$StreamSummari","StreamSummary","StreamCreationTimestamp","StreamStatus","streamCreationTimestamp","streamStatus","summary","_summary$StreamARN","_summary$StreamCreati","_summary$StreamModeDe","StreamModeDetails","_summary$StreamName","_summary$StreamStatus","encryptionType","failedRecordCount","_json$EncryptionType","EncryptionType","_json$FailedRecordCou","FailedRecordCount","_json$Records","PutRecordsResultEntry","sequenceNumber","SequenceNumber","nextShardIterator","millisBehindLatest","_json$NextShardIterat","NextShardIterator","_json$Records2","_json$MillisBehindLat","MillisBehindLatest","Record","partitionKey","Data","PartitionKey","shards","_json$Shards","Shards","Shard","hashKeyRange","sequenceNumberRange","parentShardId","adjacentParentShardId","HashKeyRange","SequenceNumberRange","ParentShardId","AdjacentParentShardId","EventBridgeClient","input","parsedEvent","Entries","entry","Detail","EventBridgeOperation","PutEvents","_putEvents","EventBridgeServiceError"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.js","mappings":";u4BAWO,IAAMA,EAAS,WAsBlB,SAXA,SAAAA,EAAYC,EAAsBC,gGAAqBC,CAAA,KAAAH,GAAAI,EAAA,yBAAAA,EAAA,2BAAAA,EAAA,yBACnDC,KAAKJ,UAAYA,EACjBI,KAAKH,YAAcA,EAIOI,MAAtBL,EAAUM,WACVF,KAAKG,UAAYP,EAAUM,SAEnC,KAEA,EAAAE,IAAA,WAAAC,IASA,WAMI,OALsBJ,MAAlBD,KAAKG,YACLH,KAAKG,UAAY,IAAIG,EAAAA,EAAS,WAADC,OACdP,KAAKH,YAAW,KAAAU,OAAIP,KAAKJ,UAAUY,OAAM,oBAGrDR,KAAKG,SAChB,EAEAM,IAQA,SAAoBP,GAChBF,KAAKG,UAAYD,CACrB,+FAAC,CAlDiB,ojFCPf,IAAMQ,EAAS,WA2ElB,SAAAA,EAAYC,GACR,GADmCb,EAAA,KAAAY,GA1EvCX,EAAA,sBAOAA,EAAA,2BAOAA,EAAA,+BAOAA,EAAA,4BAOAA,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uBACArV,EAtBR,CAyBJ,KApEA,IAtCJ7E,EAsCIia,CAoEC,CA9FyB,CAASzxB,EAAAA,GAiGlCuxB,GAAoB,SAApBA,GAAoB,OAApBA,EAAoB,sBAApBA,CAAoB,EAApBA,IAAoB,IAoCZG,GAAuB,SAAA/iB,GAUhC,SAAA+iB,EAAY5vB,EAAiByD,EAAc8W,GAAiC,IAAA5V,EAG9C,OAH8CtG,GAAA,KAAAuxB,GACpDtxB,GAApBqG,EAAA1E,GAAA,KAAA2vB,EAAA,CAAM5vB,EAASyD,IAAK,oBACpBkB,EAAKhB,KAAO,0BACZgB,EAAK4V,UAAYA,EAAS5V,CAC9B,CAAC,OAAAzE,GAAA0vB,EAAA/iB,GAAArN,GAAAowB,EAAA,CAd+B,CAASpsB,EAAAA","sources":["webpack://k6-jslib-aws/./src/internal/client.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/encoding\"","webpack://k6-jslib-aws/./src/internal/lambda.ts","webpack://k6-jslib-aws/./src/internal/sqs.ts","webpack://k6-jslib-aws/./node_modules/uuid/index.js","webpack://k6-jslib-aws/./node_modules/uuid/lib/bytesToUuid.js","webpack://k6-jslib-aws/./node_modules/uuid/lib/rng-browser.js","webpack://k6-jslib-aws/./node_modules/uuid/v1.js","webpack://k6-jslib-aws/./node_modules/uuid/v4.js","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/kms.ts","webpack://k6-jslib-aws/./src/internal/s3.ts","webpack://k6-jslib-aws/./src/internal/secrets-manager.ts","webpack://k6-jslib-aws/./src/internal/ssm.ts","webpack://k6-jslib-aws/./src/internal/kinesis.ts","webpack://k6-jslib-aws/./src/internal/event-bridge.ts"],"sourcesContent":["import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n\nexport class NetworkError extends Error {\n code: number;\n\n constructor(message: string, code: number) {\n super(message)\n this.name = 'NetworkError'\n this.code = code\n }\n}","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/encoding\");","import http, { RefinedResponse, ResponseType } from 'k6/http'\nimport encoding from 'k6/encoding'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError, NetworkError } from './error'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { HTTPHeaders, HTTPMethod, QueryParameterBag } from './http'\n\n/**\n * Class allowing to interact with Amazon AWS's Lambda service\n */\nexport class LambdaClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n private readonly method: HTTPMethod\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'lambda')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Invoke an AWS Lambda function\n *\n * @param {string} name - The name of the function\n * @param {string} payload - The payload to send to function\n * @param {InvocationOptions} options - Additional options to customize invocation\n *\n * @throws {LambdaInvocationError}\n */\n async invoke(\n name: string,\n payload: string,\n options: InvocationOptions = {}\n ): Promise {\n const query: QueryParameterBag = {}\n const invocationType = options.invocationType || 'RequestResponse'\n const headers = {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AWSLambda.${invocationType}`,\n 'X-Amz-Invocation-Type': invocationType,\n 'X-Amz-Log-Type': options.logType || 'None',\n }\n if (options.clientContext) {\n headers['X-Amz-Client-Context'] = options.clientContext\n }\n if (options.qualifier) {\n query['Qualifier'] = options.qualifier\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: `/2015-03-31/functions/${name}/invocations`,\n query,\n headers,\n body: payload || '',\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(res)\n\n const logResult = res.headers['X-Amz-Log-Result']\n const response = {\n executedVersion: res.headers['X-Amz-Executed-Version'],\n logResult: logResult ? encoding.b64decode(logResult, 'std', 's') : undefined,\n statusCode: res.status,\n payload: res.body as string,\n }\n\n const functionError = res.headers['X-Amz-Function-Error']\n if (functionError) {\n throw new LambdaInvocationError(functionError, response)\n } else {\n return response\n }\n }\n\n private _handle_error(response: RefinedResponse) {\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n if (errorMessage == '' && errorCode === 0) {\n return\n }\n\n if (errorCode < 1400 || errorCode >= 1600 ) {\n throw new NetworkError(errorMessage, errorCode)\n }\n \n const awsError = AWSError.parse(response)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n case 'InvalidSignatureException':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw awsError\n }\n }\n}\n\nexport class LambdaInvocationError extends Error {\n response: InvocationResponse\n\n constructor(message: string, response: InvocationResponse) {\n super(`${message}: ${response.payload}`)\n this.response = response\n }\n}\n\ninterface InvocationOptions {\n /**\n * Defines whether the function is invoked synchronously or asynchronously.\n * - `RequestResponse` (default): Invoke the function synchronously.\n * - `Event`: Invoke the function asynchronously.\n * - `DryRun`: Validate parameter values and verify that the user or role has permission to invoke the function.\n */\n invocationType?: 'RequestResponse' | 'Event' | 'DryRun'\n /**\n * Set to `Tail` to include the execution log in the response. Applies to synchronously invoked functions only.\n */\n logType?: 'None' | 'Tail'\n /**\n * Up to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object.\n */\n clientContext?: string\n /**\n * Specify a version or alias to invoke a published version of the function.\n */\n qualifier?: string\n}\n\ninterface InvocationResponse {\n statusCode: number\n executedVersion?: string\n logResult?: string\n payload?: string\n}\n","import { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { HTTPHeaders, SignedHTTPRequest } from './http'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\nimport { toFormUrlEncoded } from './utils'\nimport { AWSError } from './error'\n\nconst API_VERSION = '2012-11-05'\n\nexport class SQSClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'sqs')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: true,\n })\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-www-form-urlencoded',\n }\n }\n\n /**\n * Delivers a message to the specified queue.\n *\n * @param {string} queueUrl - The URL of the Amazon SQS queue to which a message is sent. Queue URLs and names are case-sensitive.\n * @param {string} messageBody - The message to send. The minimum size is one character. The maximum size is 256 KB.\n * @param {Object} options - Options for the request\n * @param {string} [options.messageDeduplicationId] - The message deduplication id.\n * @param {string} [options.messageGroupId] - The message group ID for FIFO queues\n * @returns {Message} - The message that was sent.\n */\n async sendMessage(\n queueUrl: string,\n messageBody: string,\n options: SendMessageOptions = {}\n ): Promise {\n const method = 'POST'\n\n let body: object = {\n Action: 'SendMessage',\n Version: API_VERSION,\n QueueUrl: queueUrl,\n MessageBody: messageBody,\n }\n\n if (typeof options.messageDeduplicationId !== 'undefined') {\n body = { ...body, MessageDeduplicationId: options.messageDeduplicationId }\n }\n\n if (typeof options.messageGroupId !== 'undefined') {\n body = { ...body, MessageGroupId: options.messageGroupId }\n }\n\n if (typeof options.messageAttributes !== 'undefined') {\n /*\n * A single message attribute is represented as 3 separate parameters: name, value, and type.\n * The name of the value parameter varies based on the data type.\n * See https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html#SQS-SendMessage-request-MessageAttributes\n * for more information.\n */\n const attributeParameters = Object.entries(options.messageAttributes).reduce(\n (params, [name, attribute], i) => {\n const valueParameterSuffix =\n attribute.type === 'Binary' ? 'BinaryValue' : 'StringValue'\n return Object.assign(params, {\n [`MessageAttribute.${i + 1}.Name`]: name,\n [`MessageAttribute.${i + 1}.Value.${valueParameterSuffix}`]:\n attribute.value,\n [`MessageAttribute.${i + 1}.Value.DataType`]: attribute.type,\n })\n },\n {} as Record\n )\n body = { ...body, ...attributeParameters }\n }\n\n if (typeof options.delaySeconds !== 'undefined') {\n body = { ...body, DelaySeconds: options.delaySeconds }\n }\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n },\n body: toFormUrlEncoded(body),\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {\n headers: signedRequest.headers,\n })\n this._handleError('SendMessage', res)\n\n const parsed = res.html('SendMessageResponse > SendMessageResult')\n return new Message(parsed.find('MessageId').text(), parsed.find('MD5OfMessageBody').text())\n }\n\n /**\n * Returns a list of your queues in the current region.\n *\n * @param {ListQueuesRequestParameters} [parameters={}] request parameters\n * @param {number} [ListQueuesRequestParameters.maxResults] Maximum number of results to include in the response. Value range is 1 to 1000. You must set maxResults to receive a value for nextToken in the response.\n * @param {string} [ListQueuesRequestParameters.nextToken] Pagination token to request the next set of results.\n * @param {string} [ListQueuesRequestParameters.queueNamePrefix] A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned.\n * @returns {Object}\n * @returns {string[]} Object.queueUrls - A list of queue URLs, up to 1000 entries.\n * @returns {string} [Object.nextToken] - In the future, you can use NextToken to request the next set of results.\n */\n async listQueues(parameters: ListQueuesRequestParameters = {}): Promise {\n const method = 'POST'\n\n let body: object = {\n Action: 'ListQueues',\n Version: API_VERSION,\n }\n\n if (typeof parameters?.maxResults !== 'undefined') {\n body = { ...body, MaxResults: parameters.maxResults }\n }\n\n if (typeof parameters?.nextToken !== 'undefined') {\n body = { ...body, NextToken: parameters.nextToken }\n }\n\n if (typeof parameters?.queueNamePrefix !== 'undefined') {\n body = { ...body, QueueNamePrefix: parameters.queueNamePrefix }\n }\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n Host: this.endpoint.host,\n },\n body: toFormUrlEncoded(body),\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {\n headers: signedRequest.headers,\n })\n this._handleError('ListQueues', res)\n\n const parsed = res.html()\n return {\n urls: parsed\n .find('QueueUrl')\n .toArray()\n .map((e) => e.text()),\n nextToken: parsed.find('NextToken').text() || undefined,\n }\n }\n\n private _handleError(\n operation: SQSOperation,\n response: RefinedResponse\n ) {\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n if (errorMessage == '' && errorCode === 0) {\n return\n }\n\n const awsError = AWSError.parseXML(response.body as string)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw new SQSServiceError(awsError.message, awsError.code || 'unknown', operation)\n }\n }\n}\n\n/**\n * An Amazon SQS message.\n */\nexport class Message {\n /**\n * A unique identifier for the message.\n * A MessageIdis considered unique across all AWS accounts for an extended period of time.\n */\n id: string\n\n /**\n * An MD5 digest of the non-URL-encoded message body string.\n */\n bodyMD5: string\n\n /**\n * Instantiates a new Message object.\n *\n * @param id\n * @param md5Ofbody\n */\n constructor(id: string, bodyMD5: string) {\n this.id = id\n this.bodyMD5 = bodyMD5\n }\n}\n\n/**\n * SQSServiceError indicates an error occurred while interacting with the SQS API.\n */\nexport class SQSServiceError extends AWSError {\n operation: SQSOperation\n\n constructor(message: string, code: string, operation: SQSOperation) {\n super(message, code)\n this.name = 'SQSServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SQSOperation describes possible SQS operations.\n */\ntype SQSOperation = 'ListQueues' | 'SendMessage'\n\nexport interface SendMessageOptions {\n /**\n * The message deduplication ID for FIFO queues\n */\n messageDeduplicationId?: string\n\n /**\n * The message group ID for FIFO queues\n */\n messageGroupId?: string\n\n /**\n * The message attributes\n */\n messageAttributes?: {\n [name: string]: { type: 'String' | 'Number' | 'Binary'; value: string }\n }\n\n /**\n * The length of time, in seconds, for which to delay a specific message.\n */\n delaySeconds?: number\n}\n\nexport interface ListQueuesRequestParameters {\n /**\n * Maximum number of results to include in the response. Value range is 1 to 1000.\n */\n maxResults?: number\n /**\n * Pagination token to request the next set of results.\n */\n nextToken?: string\n /**\n * A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned.\n * Queue URLs and names are case-sensitive.\n */\n queueNamePrefix?: string\n}\n\nexport interface ListQueuesResponse {\n /**\n * A list of queue URLs, up to 1,000 entries, or the value of MaxResults you sent in the request.\n */\n urls: string[]\n /**\n * Pagination token to include in the next request.\n */\n nextToken?: string\n}\n","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","module.exports = require(\"k6/crypto\");","module.exports = require(\"k6/html\");","module.exports = require(\"k6/http\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { JSONArray, JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's KMS service\n */\nexport class KMSClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a KMSClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'kms')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: awsConfig.region,\n credentials: {\n accessKeyId: awsConfig.accessKeyId,\n secretAccessKey: awsConfig.secretAccessKey,\n sessionToken: awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n // All interactions with the KMS service\n // are made via the GET or POST method.\n this.method = 'POST'\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Gets a list of all the KMS keys in the caller's AWS\n * account and region.\n *\n * @returns an array of all the available keys\n */\n async listKeys(): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n // For some reason, the base target is not kms...\n [AMZ_TARGET_HEADER]: `TrentService.ListKeys`,\n },\n body: JSON.stringify({}),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(KMSOperation.ListKeys, res)\n\n const json: JSONArray = res.json('Keys') as JSONArray\n return json.map((k) => KMSKey.fromJSON(k as JSONObject))\n }\n\n /**\n * GenerateDataKey returns a unique symmetric data key for use outside of AWS KMS.\n *\n * This operation returns a plaintext copy of the data key and a copy that is encrypted under a symmetric encryption KMS key that you specify.\n * The bytes in the plaintext key are random; they are not related to the caller or the KMS key.\n * You can use the plaintext key to encrypt your data outside of AWS KMS and store the encrypted data key with the encrypted data.\n *\n * To generate a data key, specify the symmetric encryption KMS key that will be used to encrypt the data key.\n * You cannot use an asymmetric KMS key to encrypt data keys.\n *\n * Used to generate data key with the KMS key defined\n * @param {string} id - Specifies the symmetric encryption KMS key that encrypts the data key. Use its key ID, key ARN, alias name, or alias ARN.\n * @param {KMKeySize} size - Specifies the length of the data key in bytes. For example, use the value 64 to generate a 512-bit data key (64 bytes is 512 bits). Default is 32, and generates a 256-bit data key.\n * @throws {KMSServiceError}\n * @throws {InvalidSignatureError}\n * @returns {KMSDataKey} - The generated data key.\n */\n async generateDataKey(\n id: string,\n size: KMSKeySize = KMSKeySize.Size256\n ): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n // For some reason, the base target is not kms...\n [AMZ_TARGET_HEADER]: `TrentService.GenerateDataKey`,\n },\n body: JSON.stringify({ KeyId: id, NumberOfBytes: size }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(KMSOperation.GenerateDataKey, res)\n\n return KMSDataKey.fromJSON(res.json() as JSONObject)\n }\n\n _handle_error(operation: KMSOperation, response: RefinedResponse) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new KMSServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new KMSServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/**\n * Class representing a KMS key\n */\nexport class KMSKey {\n /**\n * ARN of the key\n */\n keyArn: string\n\n /**\n * Unique identifier of the key\n */\n keyId: string\n\n constructor(keyArn: string, KeyId: string) {\n this.keyArn = keyArn\n this.keyId = KeyId\n }\n\n static fromJSON(json: JSONObject) {\n return new KMSKey(json.KeyArn as string, json.KeyId as string)\n }\n}\n\n/**\n * Class representing a data key\n */\nexport class KMSDataKey {\n /**\n * The Amazon Resource Name (key ARN) of the KMS key that encrypted the data key.\n */\n id: string\n\n /**\n * The (base64-encoded) encrypted copy of the data key.\n */\n ciphertextBlob: string\n\n /**\n * The plaintext data key.\n * Use this data key to encrypt your data outside of KMS. Then, remove it from memory as soon as possible.\n */\n plaintext: string\n\n constructor(CiphertextBlob: string, KeyId: string, Plaintext: string) {\n this.ciphertextBlob = CiphertextBlob\n this.id = KeyId\n this.plaintext = Plaintext\n }\n\n static fromJSON(json: JSONObject) {\n return new KMSDataKey(\n json.CiphertextBlob as string,\n json.KeyId as string,\n json.Plaintext as string\n )\n }\n}\n\nexport class KMSServiceError extends AWSError {\n operation: KMSOperation\n\n /**\n * Constructs a KMSServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: KMSOperation) {\n super(message, code)\n this.name = 'KMSServiceError'\n this.operation = operation\n }\n}\n\n/**\n * KMSOperation defines all currently implemented KMS Service operations.\n */\nenum KMSOperation {\n GenerateDataKey = 'GenerateDataKey',\n ListKeys = 'ListKeys',\n}\n\n/**\n * KMSKeyLength describes possible key lenght values for KMS API data key operations.\n */\nenum KMSKeySize {\n Size256 = 32,\n Size512 = 64,\n}\n","import { bytes } from 'k6'\nimport { parseHTML } from 'k6/html'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { SignedHTTPRequest } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/** Class allowing to interact with Amazon AWS's S3 service */\nexport class S3Client extends AWSClient {\n private readonly signature: SignatureV4\n\n /**\n * Create a S3Client\n *\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 's3')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: false,\n applyChecksum: true,\n })\n }\n\n /**\n * Returns a list of all buckets owned by the authenticated sender of the request.\n * To use this operation, you must have the s3:ListAllMyBuckets permission.\n *\n * @return {Array.} buckets - An array of objects describing S3 buckets\n * with the following fields: name, and creationDate.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async listBuckets(): Promise> {\n const method = 'GET'\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'GET',\n endpoint: this.endpoint,\n path: '/',\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('ListBuckets', res)\n\n const buckets: Array = []\n\n const doc = parseHTML(res.body as string)\n\n doc.find('Buckets')\n .children()\n .each((_, bucketDefinition) => {\n const bucket = {}\n\n bucketDefinition.children().forEach((child) => {\n switch (child.nodeName()) {\n case 'name':\n Object.assign(bucket, { name: child.textContent() })\n break\n case 'creationdate':\n Object.assign(bucket, {\n creationDate: Date.parse(child.textContent()),\n })\n }\n })\n\n buckets.push(bucket as S3Bucket)\n })\n\n return buckets\n }\n\n /**\n * Returns some or all (up to 1,000) of the objects in a bucket.\n *\n * @param {string} bucketName - Bucket name to list.\n * @param {string?} prefix='' - Limits the response to keys that begin with the specified prefix.\n * @return {Array.} - returns an array of objects describing S3 objects\n * with the following fields: key, lastModified, etag, size and storageClass.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async listObjects(bucketName: string, prefix?: string): Promise> {\n const method = 'GET'\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/`,\n query: {\n 'list-type': '2',\n prefix: prefix || '',\n },\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('ListObjectsV2', res)\n\n const objects: Array = []\n\n // Extract the objects definition from\n // the XML response\n parseHTML(res.body as string)\n .find('Contents')\n .each((_, objectDefinition) => {\n const obj = {}\n\n objectDefinition.children().forEach((child) => {\n switch (child.nodeName()) {\n case 'key':\n Object.assign(obj, { key: child.textContent() })\n break\n case 'lastmodified':\n Object.assign(obj, { lastModified: Date.parse(child.textContent()) })\n break\n case 'etag':\n Object.assign(obj, { etag: child.textContent() })\n break\n case 'size':\n Object.assign(obj, { size: parseInt(child.textContent()) })\n break\n case 'storageclass':\n Object.assign(obj, { storageClass: child.textContent() })\n }\n })\n\n objects.push(obj as S3Object)\n })\n\n return objects\n }\n /**\n * Retrieves an Object from Amazon S3.\n *\n * To use getObject, you must have `READ` access to the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to get.\n * @return {S3Object} - returns the content of the fetched S3 Object.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async getObject(bucketName: string, objectKey: string): Promise {\n // Prepare request\n const method = 'GET'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('GetObject', res)\n\n return new S3Object(\n objectKey,\n Date.parse(res.headers['Last-Modified']),\n res.headers['ETag'],\n parseInt(res.headers['Content-Length']),\n\n // The X-Amz-Storage-Class header is only set if the storage class is\n // not the default 'STANDARD' one.\n (res.headers['X-Amz-Storage-Class'] ?? 'STANDARD') as StorageClass,\n\n res.body\n )\n }\n /**\n * Adds an object to a bucket.\n *\n * You must have WRITE permissions on a bucket to add an object to it.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to put.\n * @param {string | ArrayBuffer} data - the content of the S3 Object to upload.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async putObject(\n bucketName: string,\n objectKey: string,\n data: string | ArrayBuffer,\n params?: PutObjectParams\n ): Promise {\n // Prepare request\n const method = 'PUT'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {\n Host: this.endpoint.host,\n ...(params?.contentDisposition && {\n 'Content-Disposition': params.contentDisposition,\n }),\n ...(params?.contentEncoding && { 'Content-Encoding': params.contentEncoding }),\n ...(params?.contentLength && { 'Content-Length': params.contentLength }),\n ...(params?.contentMD5 && { 'Content-MD5': params.contentMD5 }),\n ...(params?.contentType && { 'Content-Type': params.contentType }),\n },\n body: data,\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error('PutObject', res)\n }\n\n /**\n * Removes the null version (if there is one) of an object and inserts a delete marker,\n * which becomes the latest version of the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async deleteObject(bucketName: string, objectKey: string): Promise {\n // Prepare request\n const method = 'DELETE'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('DeleteObject', res)\n }\n\n /**\n * Copies an object from one bucket to another\n *\n * @param {string} sourceBucket - The source bucket name containing the object.\n * @param {string} sourceKey - Key of the source object to copy.\n * @param {string} destinationBucket - The destination bucket name containing the object.\n * @param {string} destinationKey - Key of the destination object.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async copyObject(\n sourceBucket: string,\n sourceKey: string,\n destinationBucket: string,\n destinationKey: string\n ): Promise {\n const method = 'PUT'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${destinationBucket}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${destinationKey}`,\n headers: {\n 'x-amz-copy-source': `${sourceBucket}/${sourceKey}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n\n this._handle_error('CopyObject', res)\n }\n\n /**\n * Creates a new multipart upload for a given objectKey.\n * The uploadId returned can be used to upload parts to the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to upload.\n * @return {S3MultipartUpload} - returns the uploadId of the newly created multipart upload.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async createMultipartUpload(bucketName: string, objectKey: string): Promise {\n const method = 'POST'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n query: { uploads: '' },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('CreateMultipartUpload', res)\n\n return new S3MultipartUpload(\n objectKey,\n parseHTML(res.body as string)\n .find('UploadId')\n .text()\n )\n }\n\n /**\n * Uploads a part in a multipart upload.\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to upload.\n * @param {string} uploadId - The uploadId of the multipart upload.\n * @param {number} partNumber - The part number of the part to upload.\n * @param {string | ArrayBuffer} data - The content of the part to upload.\n * @return {S3Part} - returns the ETag of the uploaded part.\n * @throws {S3ServiceError}\n */\n async uploadPart(\n bucketName: string,\n objectKey: string,\n uploadId: string,\n partNumber: number,\n data: string | ArrayBuffer\n ): Promise {\n const method = 'PUT'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n body: data,\n query: {\n partNumber: `${partNumber}`,\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('UploadPart', res)\n\n return new S3Part(partNumber, res.headers['Etag'])\n }\n\n /**\n * Completes a multipart upload by assembling previously uploaded parts.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @param {string} uploadId - The uploadId of the multipart upload to complete.\n * @param {S3Part[]} parts - The parts to assemble.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async completeMultipartUpload(\n bucketName: string,\n objectKey: string,\n uploadId: string,\n parts: S3Part[]\n ) {\n // Prepare request\n const method = 'POST'\n const body = `${parts\n .map(\n (part) =>\n `${part.partNumber}${part.eTag}`\n )\n .join('')}`\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n body: body,\n query: {\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n\n this._handle_error('CompleteMultipartUpload', res)\n }\n\n /**\n * Aborts a multipart upload.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @param {string} uploadId - The uploadId of the multipart upload to abort.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async abortMultipartUpload(bucketName: string, objectKey: string, uploadId: string) {\n const method = 'DELETE'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n query: {\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('AbortMultipartUpload', res)\n }\n\n _handle_error(operation: S3Operation, response: RefinedResponse) {\n const status: number = response.status\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n // We consider codes 200-299 as success\n if (status >= 200 && status < 300 && errorMessage == '' && errorCode === 0) {\n return\n }\n\n // A 301 response is returned when the bucket is not found.\n // Generally meaning that either the bucket name is wrong or the\n // region is wrong.\n //\n // See: https://github.com/grafana/k6/issues/2474\n // See: https://github.com/golang/go/issues/49281\n if (status == 301 || (errorMessage && errorMessage.startsWith('301'))) {\n throw new S3ServiceError('Resource not found', 'ResourceNotFound', operation)\n }\n\n const awsError = AWSError.parseXML(response.body as string)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw new S3ServiceError(awsError.message, awsError.code || 'unknown', operation)\n }\n }\n}\n\n/** Class representing a S3 Bucket */\nexport class S3Bucket {\n name: string\n creationDate: Date\n\n /**\n * Create an S3 Bucket\n *\n * @param {string} name - S3 bucket's name\n * @param {Date} creationDate - S3 bucket's creation date\n */\n constructor(name: string, creationDate: Date) {\n this.name = name\n this.creationDate = creationDate\n }\n}\n\n/** Class representing an S3 Object */\nexport class S3Object {\n key: string\n lastModified: number\n etag: string\n size: number\n storageClass: StorageClass\n data?: string | bytes | null\n\n /**\n * Create an S3 Object\n *\n * @param {string} key - S3 object's key\n * @param {Date} lastModified - S3 object last modification date\n * @param {string} etag - S3 object's etag\n * @param {number} size - S3 object's size\n * @param {StorageClass} storageClass - S3 object's storage class\n * @param {string | bytes | null} data=null - S3 Object's data\n */\n constructor(\n key: string,\n lastModified: number,\n etag: string,\n size: number,\n storageClass: StorageClass,\n data?: string | bytes | null\n ) {\n this.key = key\n this.lastModified = lastModified\n this.etag = etag\n this.size = size\n this.storageClass = storageClass\n this.data = data\n }\n}\n\n/** Class representing a S3 Multipart Upload */\nexport class S3MultipartUpload {\n key: string\n uploadId: string\n\n /**\n * Create an S3 Multipart Upload\n * @param {string} key - S3 object's key\n * @param {string} uploadId - S3 multipart upload id\n */\n\n constructor(key: string, uploadId: string) {\n this.key = key\n this.uploadId = uploadId\n }\n}\n\n/** Class representing a S3 Part */\nexport class S3Part {\n partNumber: number\n eTag: string\n\n /**\n * Create an S3 Part\n * @param {number} partNumber - Part number\n * @param {string} eTag - Part's etag\n */\n\n constructor(partNumber: number, eTag: string) {\n this.partNumber = partNumber\n this.eTag = eTag\n }\n}\n\n/**\n * Error indicating a S3 operation failed\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class S3ServiceError extends AWSError {\n operation: string\n\n /**\n * Constructs a S3ServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: string) {\n super(message, code)\n this.name = 'S3ServiceError'\n this.operation = operation\n }\n}\n\n/**\n * S3Operation describes possible values for S3 API operations,\n * as defined by AWS APIs.\n */\ntype S3Operation =\n | 'ListBuckets'\n | 'ListObjectsV2'\n | 'GetObject'\n | 'PutObject'\n | 'DeleteObject'\n | 'CopyObject'\n | 'CreateMultipartUpload'\n | 'CompleteMultipartUpload'\n | 'UploadPart'\n | 'AbortMultipartUpload'\n\n/**\n * Describes the class of storage used to store a S3 object.\n */\ntype StorageClass =\n | 'STANDARD'\n | 'REDUCED_REDUNDANCY'\n | 'GLACIER'\n | 'STANDARD_IA'\n | 'INTELLIGENT_TIERING'\n | 'DEEP_ARCHIVE'\n | 'OUTPOSTS'\n | 'GLACIER_IR'\n | undefined\n\n/**\n * PutObjectParams describes the parameters that can be passed to the PutObject operation.\n */\nexport interface PutObjectParams {\n /**\n * Specifies presentational information for the object.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.\n */\n contentDisposition?: string\n\n /**\n * Specifies what content encodings have been applied to the object and thus\n * what decoding mechanisms must be applied to obtain the media-type referenced\n * by the ContentType option.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.\n */\n contentEncoding?: string\n\n /**\n * Size of the body in bytes. This parameter is useful when the size of the body cannot be\n * determined automatically.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.\n */\n contentLength?: string\n\n /**\n * The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864.\n * This header can be used as a message integrity check to verify that the data is the same data that\n * was originally sent.\n *\n * Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity\n * check.\n */\n contentMD5?: string\n\n /**\n * A standard MIME type describing the format of the contents.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.\n */\n contentType?: string\n}\n","import { JSONArray, JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { v4 as uuidv4 } from 'uuid'\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's SecretsManager service\n */\nexport class SecretsManagerClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a SecretsManagerClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'secretsmanager')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n // All interactions with the Secrets Manager service\n // are made via the GET or POST method.\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Returns a list of all secrets owned by the authenticated sender of the request.\n * To use this operation, you must have the secretsmanager:ListSecrets permission.\n *\n * @return {Array.} secrets - An array of objects describing Secret Manager's secrets\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async listSecrets(): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.ListSecrets`,\n },\n body: JSON.stringify({}),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.ListSecrets, res)\n const json: JSONArray = res.json('SecretList') as JSONArray\n\n return json.map((s) => Secret.fromJSON(s as JSONObject))\n }\n\n /**\n * Retrieves a secret from Amazon Sercets Manager\n *\n * @param {string} id - The ARN or name of the secret to retrieve.\n * @returns {Secret} - returns the content of the fetched Secret object.\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async getSecret(id: string): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.GetSecretValue`,\n },\n body: JSON.stringify({ SecretId: id }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n\n this._handle_error(SecretsManagerOperation.GetSecretValue, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n\n /**\n * Creates a new secret\n *\n * Note that this method only supports string-based values at the moment.\n *\n * @param {string} name - The name of the new secret.\n * The secret name can contain ASCII letters, numbers, and the following characters: /_+=.@\n * @param {string} secret - The text data to encrypt and store in this new version of the secret.\n * @param {string} description - The description of the secret.\n * @param {string} versionID=null - Version of the secret. This value helps ensure idempotency.\n * As a default, if no versionID is provided, one will be created for you using the UUID v4\n * algorithm.\n * @param {Array.} tags=[] - A list of tags to attach to the secret. Each tag is a key and\n * value pair of strings in a JSON text string. Note that tag key names are case sensitive.\n * @returns {Secret} - returns the created secret\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async createSecret(\n name: string,\n secret: string,\n description: string,\n versionID?: string,\n tags?: Array\n ): Promise {\n versionID = versionID || uuidv4()\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.CreateSecret`,\n },\n body: JSON.stringify({\n Name: name,\n Description: description,\n SecretString: secret,\n ClientRequestToken: versionID,\n Tags: tags,\n }),\n },\n {}\n )\n\n // Ensure to include the desired 'Action' in the X-Amz-Target\n // header field, as documented by the AWS API docs.\n // headers['X-Amz-Target'] = `${this.serviceName}.CreateSecret`\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.CreateSecret, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n /**\n * Update a secret's value.\n *\n * Note that this method only support string-based values at the moment.\n *\n * @param {string} id - The ARN or name of the secret to update.\n * @param {string} secret - The text data to encrypt and store in this new version of the secret.\n * @param {} versionID=null - A unique identifier for the new version of the secret. This value helps ensure idempotency.\n * As a default, if no versionID is provided, one will be created for you using the UUID v4\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async putSecretValue(id: string, secret: string, versionID?: string): Promise {\n versionID = versionID || uuidv4()\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.PutSecretValue`,\n },\n body: JSON.stringify({\n SecretId: id,\n SecretString: secret,\n ClientRequestToken: versionID,\n }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.PutSecretValue, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n\n /**\n * Deletes a secret and all of its versions.\n *\n * You can specify a recovery window during which you can restore the secret.\n * The minimum recovery window is 7 days. The default recovery window is 30 days.\n *\n * @param {string} secretID - The ARN or name of the secret to delete.\n * @param {number} recoveryWindow - The number of days from 7 to 30 that Secrets Manager\n * waits before permanently deleting the secret.\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async deleteSecret(\n id: string,\n { recoveryWindow = 30, noRecovery = false }: { recoveryWindow: number; noRecovery: boolean }\n ): Promise {\n const payload: { [key: string]: string | boolean | number } = {\n SecretId: id,\n }\n\n // noRecovery and recoveryWindow are exclusive parameters\n if (noRecovery === true) {\n payload['ForceDeleteWithoutRecovery'] = true\n } else {\n payload['RecoveryWindowInDays'] = recoveryWindow\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.DeleteSecret`,\n },\n body: JSON.stringify(payload),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.DeleteSecret, res)\n }\n\n _handle_error(\n operation: SecretsManagerOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new SecretsManagerServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new SecretsManagerServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n// TODO: create a Tags type\n\n/**\n * Class representing a Secret Manager's secret\n */\nexport class Secret {\n name: string\n arn: string\n secret: string\n createdDate: number\n lastAccessedDate: number\n lastChangedDate: number\n tags: Array<{ [key: string]: string }>\n\n /**\n * Constructs a Secret Manager's Secret\n *\n * @param {string} name - The friendly name of the secret.\n * @param {string} arn - The ARN of the secret.\n * @param {number} createdDate - The date and time that this version of the secret was created.\n * @param {number} lastAccessedDate - The last date that this secret was accessed. This value is\n * truncated to midnight of the date and therefore shows only the date, not the time.\n * @param {number} lastChangedDate - The last date and time that this secret was modified in any way.\n * @param {Array.} tags - The list of user-defined tags associated with the secret.\n */\n constructor(\n name: string,\n arn: string,\n secretString: string,\n createdDate: number,\n lastAccessedDate: number,\n lastChangedDate: number,\n tags: Array<{ [key: string]: string }> = []\n ) {\n this.name = name\n this.arn = arn\n this.secret = secretString\n this.createdDate = createdDate\n this.lastAccessedDate = lastAccessedDate\n this.lastChangedDate = lastChangedDate\n this.tags = tags\n }\n\n /**\n * Parses and constructs a Secret Manager's Secret from the content\n * of a JSON response returned by the AWS service\n *\n * @param {Object} json - JSON object as returned and parsed from\n * the AWS service's API call.\n * @returns {Secret}\n */\n static fromJSON(json: JSONObject) {\n return new Secret(\n json.Name as string,\n json.ARN as string,\n json.SecretString as string,\n json.CreatedDate as number,\n json.LastAccessedDate as number,\n json.LastChangedDate as number,\n json.Tags as Array<{ [key: string]: string }>\n )\n }\n}\n\nexport class SecretsManagerServiceError extends AWSError {\n operation: SecretsManagerOperation\n\n /**\n * Constructs a SecretsManagerServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: SecretsManagerOperation) {\n super(message, code)\n this.name = 'SecretsManagerServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SecretsManagerOperation defines all currently implemented Secrets Manager Service operations.\n */\nenum SecretsManagerOperation {\n ListSecrets = 'ListSecrets',\n GetSecretValue = 'GetSecretValue',\n CreateSecret = 'CreateSecret',\n PutSecretValue = 'PutSecretValue',\n DeleteSecret = 'DeleteSecret',\n}\n","import { JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's Systems Manager service\n */\nexport class SystemsManagerClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a SystemsManagerClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'ssm')\n\n // All interactions with the Systems Manager service\n // are made via the POST method.\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: awsConfig.region,\n credentials: {\n accessKeyId: awsConfig.accessKeyId,\n secretAccessKey: awsConfig.secretAccessKey,\n sessionToken: awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n }\n\n /**\n * Retrieves a parameter from Amazon Systems Manager\n *\n * @param {string} name - The ARN or name of the parameter to retrieve.\n * @param {boolean} withDecryption - whether returned secure string parameters should be decrypted.\n * @returns {SystemsManagerParameter} - returns the fetched Parameter object.\n * @throws {SystemsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async getParameter(\n name: string,\n withDecryption: boolean = false\n ): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AmazonSSM.GetParameter`,\n },\n body: JSON.stringify({ Name: name, WithDecryption: withDecryption }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SystemsManagerOperation.GetParameter, res)\n\n return SystemsManagerParameter.fromJSON(res.json() as JSONObject)\n }\n\n _handle_error(\n operation: SystemsManagerOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new SystemsManagerServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new SystemsManagerServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/**\n * Class representing a Systems Manager's Parameter\n */\nexport class SystemsManagerParameter {\n /**\n * The Amazon Resource Name (ARN) of the parameter.\n */\n arn: string\n\n /**\n * The data type of the parameter, such as text or aws:ec2:image.\n * The default is text.\n */\n dataType: string\n\n /**\n * Date the parameter was last changed or updated and the parameter version was created.\n */\n lastModifiedDate: number\n\n /**\n * The friendly name of the parameter.\n */\n name: string\n\n /**\n * Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:\n * parameter_name:version\n * parameter_name:label\n */\n selector: string\n\n /**\n * plies to parameters that reference information in other AWS services. SourceResult is the raw result or response from the source.\n */\n sourceResult: string\n\n /**\n * The type of parameter. Valid values include the following: String, StringList, and SecureString.\n */\n type: string\n\n /**\n * The parameter value.\n */\n value: string\n\n /**\n * The parameter version.\n */\n version: number\n\n /**\n * Constructs a Systems Manager's Parameter\n *\n * @param {string} arn - The Amazon Resource Name (ARN) of the parameter.\n * @param {string} dataType - The data type of the parameter, such as text or aws:ec2:image. The default is text.\n * @param {number} lastModifiedDate - Date the parameter was last changed or updated and the parameter version was created.\n * @param {string} name - The friendly name of the parameter.\n * @param {string} selector - Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:\n * parameter_name:version\n * parameter_name:label\n * @param {string} sourceResult - Applies to parameters that reference information in other AWS services. SourceResult is the raw result or response from the source.\n * @param {string} type - The type of parameter. Valid values include the following: String, StringList, and SecureString.\n * @param {string} value - The parameter value.\n * @param {number} version - The parameter version.\n */\n constructor(\n arn: string,\n dataType: string,\n lastModifiedDate: number,\n name: string,\n selector: string,\n sourceResult: string,\n type: string,\n value: string,\n version: number\n ) {\n this.arn = arn\n this.dataType = dataType\n this.lastModifiedDate = lastModifiedDate\n this.name = name\n this.selector = selector\n this.sourceResult = sourceResult\n this.type = type\n this.value = value\n this.version = version\n }\n\n /**\n * Parses and constructs a Systems Manager's Parameter from the content\n * of a JSON response returned by the AWS service\n *\n * @param {Object} json - JSON object as returned and parsed from\n * the AWS service's API call.\n * @returns {SystemsManagerParameter}\n */\n static fromJSON(json: JSONObject): SystemsManagerParameter {\n const parameter = json.Parameter as JSONObject\n\n return new SystemsManagerParameter(\n parameter.ARN as string,\n parameter.DataType as string,\n parameter.LastModifiedDate as number,\n parameter.Name as string,\n parameter.Selector as string,\n parameter.SourceResult as string,\n parameter.Type as string,\n parameter.Value as string,\n parameter.Version as number\n )\n }\n}\n\nexport class SystemsManagerServiceError extends AWSError {\n operation: SystemsManagerOperation\n\n /**\n * Constructs a SystemsManagerServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {SystemsManagerOperation} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: SystemsManagerOperation) {\n super(message, code)\n this.name = 'SystemsManagerServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SystemsManagerOperation defines all currently implemented Systems Manager operations.\n */\nenum SystemsManagerOperation {\n GetParameter = 'GetParameter',\n}\n","import http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\n\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { JSONObject } from './json'\nimport { HTTPHeaders } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\nThis API is based on\nhttps://docs.aws.amazon.com/kinesis/latest/APIReference/API_Operations.html\n*/\n\n/**\n * Allows interacting with the Kinesis API.\n */\nexport class KinesisClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n private readonly serviceVersion: string\n\n /**\n * A constructor function that creates a new instance of the Kinesis class.\n * @param {AWSConfig} awsConfig - AWSConfig - This is the configuration object that is passed to\n * the constructor.\n * @returns A Proxy object.\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'kinesis')\n\n this.serviceVersion = 'Kinesis_20131202'\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: false,\n applyChecksum: true,\n })\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Creates a new Kinesis stream with the specified name and options.\n *\n * @param {string} streamName - The name of the stream to create.\n * @param {{\n * shardCount?: number;\n * streamModeDetails?: {\n * streamMode: StreamMode;\n * };\n * }} [options={}] - An optional object containing configuration options for the stream.\n * @param {number} [options.shardCount] - The number of shards for the stream. If not provided, the default value will be used.\n * @param {{streamMode: StreamMode}} [options.streamModeDetails] - An optional object containing the stream mode details.\n * @param {StreamMode} [options.streamModeDetails.streamMode] - The mode of the stream. If not provided, the default mode will be used.\n *\n * @throws {Error} Throws an error if the stream creation request fails.\n * @returns {void}\n */\n async createStream(\n streamName: string,\n options: { shardCount?: number; streamModeDetails?: { streamMode: StreamMode } } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(options.shardCount && { ShardCount: options.shardCount }),\n ...(options.streamModeDetails && { StreamMode: options.streamModeDetails.streamMode }),\n }\n\n await this._send_request('CreateStream', body)\n }\n\n /**\n * Deletes a Kinesis stream with the specified parameters.\n *\n * @param {string} streamName - The name of the stream to delete.\n * @param {{\n * streamARN?: string;\n * enforceConsumerDeletion?: boolean;\n * }} [parameters={}] - An optional object containing configuration options for the stream deletion.\n * @param {string} [parameters.streamARN] - The Amazon Resource Name (ARN) of the stream. If not provided, the ARN will be derived from the stream name.\n * @param {boolean} [parameters.enforceConsumerDeletion] - Whether to enforce the deletion of all registered consumers before deleting the stream. Defaults to false.\n *\n * @throws {Error} Throws an error if the stream deletion request fails.\n * @returns {void}\n */\n async deleteStream(\n streamName: string,\n parameters: { streamARN?: string; enforceConsumerDeletion?: boolean } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n ...(parameters.enforceConsumerDeletion && {\n EnforceConsumerDeletion: parameters.enforceConsumerDeletion,\n }),\n }\n\n await this._send_request('DeleteStream', body)\n }\n\n /**\n * Returns a list of Kinesis streams with the specified parameters.\n *\n * @param {{\n * exclusiveStartStreamName?: string;\n * limit?: number;\n * nextToken?: string;\n * }} [parameters={}] - An optional object containing configuration options for listing the streams.\n * @param {string} [parameters.exclusiveStartStreamName] - The name of the stream to start listing from. If not provided, the listing starts from the beginning.\n * @param {number} [parameters.limit] - The maximum number of streams to list. If not provided, the default value will be used.\n * @param {string} [parameters.nextToken] - A token to paginate the list of streams. If not provided, the first page will be returned.\n *\n * @throws {Error} Throws an error if the list streams request fails.\n * @returns {Partial} A partial of the ListStreamsResponse class.\n */\n async listStreams(\n parameters: {\n exclusiveStartStreamName?: string\n limit?: number\n nextToken?: string\n } = {}\n ): Promise {\n const body = {\n ...(parameters.exclusiveStartStreamName && {\n ExclusiveStartStreamName: parameters.exclusiveStartStreamName,\n }),\n ...(parameters.limit && { Limit: parameters.limit }),\n ...(parameters.nextToken && { NextToken: parameters.nextToken }),\n }\n\n const res = await this._send_request('ListStreams', body)\n return ListStreamsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Sends multiple records to a Kinesis stream in a single request.\n *\n * @param {string} streamName - The name of the stream to put records into.\n * @param {PutRecordsRequestEntry[]} records - An array of records to put into the stream.\n *\n * @throws {Error} Throws an error if the put records request fails.\n * @returns {Partial} A partial of the PutRecordsResponse class.\n */\n async putRecords(\n records: PutRecordsRequestEntry[],\n parameters: { streamName?: string; streamARN?: string } = {}\n ): Promise {\n if (!parameters.streamName && !parameters.streamARN) {\n throw new Error('Either streamName or streamARN must be provided')\n }\n\n const body = {\n Records: records,\n ...(parameters.streamName && { StreamName: parameters.streamName }),\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n }\n\n const res = await this._send_request('PutRecords', body)\n return PutRecordsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Retrieves records from a Kinesis stream.\n *\n * @param {string} shardIterator - The shard iterator to start retrieving records from.\n * @param {number} [limit] - The maximum number of records to return. If not provided, the default value will be used.\n *\n * @throws {Error} Throws an error if the get records request fails.\n * @returns {Partial} A partial of the GetRecordsResponse class.\n */\n async getRecords(\n shardIterator: string,\n parameters: { limit?: number; streamARN?: string } = {}\n ): Promise {\n const body = {\n ShardIterator: shardIterator,\n ...(parameters.limit && { Limit: parameters.limit }),\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n }\n\n const res = await this._send_request('GetRecords', body)\n return GetRecordsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Lists the shards in a Kinesis stream.\n *\n * @param {string} streamName - The name of the stream to list shards from.\n * @param {{\n * nextToken?: string;\n * maxResults?: number;\n * }} [parameters={}] - An optional object containing configuration options for listing shards.\n * @param {string} [parameters.nextToken] - A token to specify where to start paginating the shard list. If not provided, the first page will be returned.\n * @param {number} [parameters.maxResults] - The maximum number of shards to return. If not provided, the default value will be used.\n *\n * @throws {Error} Throws an error if the list shards request fails.\n * @returns {ListShardsResponse} A ListShardsResponse class instance.\n */\n async listShards(\n streamName: string,\n parameters: { nextToken?: string; maxResults?: number } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(parameters.nextToken && { NextToken: parameters.nextToken }),\n ...(parameters.maxResults && {\n MaxResults: parameters.maxResults,\n }),\n }\n\n const res = await this._send_request('ListShards', body)\n return ListShardsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Retrieves a shard iterator for the specified shard in a Kinesis stream.\n *\n * @param {string} streamName - The name of the stream.\n * @param {string} shardId - The shard ID for which to get the iterator.\n * @param {string} shardIteratorType - The shard iterator type. One of 'AT_SEQUENCE_NUMBER', 'AFTER_SEQUENCE_NUMBER', 'TRIM_HORIZON', 'LATEST', or 'AT_TIMESTAMP'.\n * @param {{\n * startingSequenceNumber?: string;\n * timestamp?: number;\n * }} [parameters={}] - An optional object containing configuration options for the shard iterator.\n * @param {string} [parameters.startingSequenceNumber] - The sequence number to start with when using 'AT_SEQUENCE_NUMBER' or 'AFTER_SEQUENCE_NUMBER' iterator types.\n * @param {number} [parameters.timestamp] - The timestamp to start with when using the 'AT_TIMESTAMP' iterator type.\n *\n * @throws {Error} Throws an error if the get shard iterator request fails.\n * @returns {string} The next position in the shard from which to start sequentially reading data records. If set to null, the shard has been closed and the requested iterator does not return any more data.\n */\n async getShardIterator(\n streamName: string,\n shardId: string,\n shardIteratorType: ShardIteratorKind,\n parameters: { startingSequenceNumber?: string; timestamp?: number } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ShardId: shardId,\n ShardIteratorType: shardIteratorType,\n ...(parameters.startingSequenceNumber && {\n StartingSequenceNumber: parameters.startingSequenceNumber,\n }),\n ...(parameters.timestamp && { Timestamp: parameters.timestamp }),\n }\n\n const res = await this._send_request('GetShardIterator', body)\n return GetShardIteratorResponse.fromJson(res?.json() as JSONObject)\n }\n\n private async _send_request(\n action: string,\n body: unknown\n ): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceVersion}.${action}`,\n },\n body: JSON.stringify(body),\n },\n {}\n )\n\n const res = await http.asyncRequest('POST', signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n\n this._handle_error(action, res)\n return res\n }\n\n /**\n * If the response is an error, throw an error\n *\n * @param {string} operation - The name of the operation that was called.\n * @param response - RefinedResponse\n * @returns The response is being returned.\n */\n _handle_error(operation: string, response: RefinedResponse) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new KinesisServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new KinesisServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/* `KinesisServiceError` is a subclass of `AWSError` that adds an `operation` property */\nexport class KinesisServiceError extends AWSError {\n operation: string\n\n /**\n * Constructs a KinesisServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: string) {\n super(message, code)\n this.name = 'KinesisServiceError'\n this.operation = operation\n }\n}\n\n/**\n * Describes the options for a Kinesis stream.\n */\ntype StreamMode = 'PROVISIONED' | 'ON_DEMAND'\n\n/**\n * Determines how the shard iterator is used to start reading data records from the shard.\n */\nexport type ShardIteratorKind =\n | 'AT_SEQUENCE_NUMBER'\n | 'AFTER_SEQUENCE_NUMBER'\n | 'TRIM_HORIZON'\n | 'LATEST'\n | 'AT_TIMESTAMP'\n\n/**\n * Describes the status of a Kinesis data stream.\n */\nexport type StreamStatus = 'CREATING' | 'DELETING' | 'ACTIVE' | 'UPDATING'\n\nexport type StreamModeDetails = {\n /**\n * Specifies the capacity mode to which you want to set your data stream.\n */\n SteamMode: 'PROVISIONED' | 'ON_DEMAND'\n}\n\nexport class ListStreamsResponse {\n /**\n * Indicates whether there are more streams available to list.\n */\n hasMoreStreams: boolean\n\n /**\n * The token that identifies which batch of results you can retrieve.\n */\n nextToken?: string\n\n /**\n * The names of the streams that are associated with the AWS account making the ListStreams request.\n */\n streamNames: string[]\n\n /**\n * A list of StreamSummary objects.\n */\n streamSummaries: StreamSummary[]\n\n constructor(\n HasMoreStreams: boolean,\n NextToken: string,\n StreamNames: string[],\n StreamSummaries: StreamSummary[]\n ) {\n this.hasMoreStreams = HasMoreStreams\n this.nextToken = NextToken\n this.streamNames = StreamNames\n this.streamSummaries = StreamSummaries\n }\n\n static fromJson(result: JSONObject): ListStreamsResponse {\n const {\n HasMoreStreams = false,\n NextToken = '',\n StreamNames = [],\n StreamSummaries = [],\n } = result\n\n return new ListStreamsResponse(\n HasMoreStreams as boolean,\n NextToken as string,\n StreamNames as string[],\n (StreamSummaries as JSONObject[])?.map(StreamSummary.fromJson) as StreamSummary[]\n )\n }\n}\n\n/**\n * Summarizes a Stream\n */\nexport class StreamSummary {\n /**\n * The Amazon Resource Name (ARN) for the stream.\n */\n streamARN: string\n\n /**\n * The time at which the stream was created.\n */\n streamCreationTimestamp: number\n\n /**\n * Specify the capacity mode to which you want to set your data stream.\n */\n streamModeDetails: StreamModeDetails\n\n /**\n * The name of the stream.\n */\n streamName: string\n\n /**\n * The current status of the stream being described.\n */\n streamStatus: StreamStatus\n\n constructor(\n StreamARN: string,\n StreamCreationTimestamp: number,\n StreamMode: StreamModeDetails,\n StreamName: string,\n StreamStatus: StreamStatus\n ) {\n this.streamARN = StreamARN\n this.streamCreationTimestamp = StreamCreationTimestamp\n this.streamModeDetails = StreamMode\n this.streamName = StreamName\n this.streamStatus = StreamStatus\n }\n\n static fromJson(summary: JSONObject): StreamSummary {\n const {\n StreamARN = '',\n StreamCreationTimestamp = 0,\n StreamModeDetails = {},\n StreamName = '',\n StreamStatus = '',\n } = summary\n\n return new StreamSummary(\n StreamARN as string,\n StreamCreationTimestamp as number,\n StreamModeDetails as StreamModeDetails,\n StreamName as string,\n StreamStatus as StreamStatus\n )\n }\n}\n\n/**\n * Represents the output for PutRecords.\n */\nexport interface PutRecordsRequestEntry {\n /**\n * The data blob to put into the record, which is base64-encoded when the blob is serialized.\n */\n Data: string | ArrayBuffer\n\n /**\n * Determines which share in the stream the data record is assigned to.\n */\n PartitionKey: string\n}\n\n// Response class for PutRecords API\nexport class PutRecordsResponse {\n /**\n * The encryption type used on the records. This parameter can be one of the following values:\n * - NONE: Do not encrypt the records.\n * - KMS: Use server-side encryption on the records using a customer-managed AWS KMS key.\n */\n encryptionType: EncryptionType\n\n /**\n * The number of unsuccessfully processed records in a PutRecords request.\n */\n failedRecordCount: number\n\n /**\n * An array of successfully and unsuccessfully processed record results.\n */\n records: PutRecordsResultEntry[]\n\n constructor(\n encryptionType: 'NONE' | 'KMS',\n failedRecordCount: number,\n records: PutRecordsResultEntry[]\n ) {\n this.encryptionType = encryptionType\n this.failedRecordCount = failedRecordCount\n this.records = records\n }\n\n static fromJson(json: JSONObject): PutRecordsResponse {\n const { EncryptionType = 'NONE', FailedRecordCount = 0, Records = [] } = json\n const records = (Records as JSONObject[]).map(PutRecordsResultEntry.fromJson)\n\n return new PutRecordsResponse(\n EncryptionType as EncryptionType,\n FailedRecordCount as number,\n records\n )\n }\n}\n\ntype EncryptionType = 'NONE' | 'KMS'\n\n/**\n * Represents the result of an individual record from a PutRecords request.\n */\nexport class PutRecordsResultEntry {\n /**\n * The sequence number for an individual record result.\n */\n sequenceNumber: string\n\n /**\n * The shard ID for an individual record result.\n */\n shardId: string\n\n constructor(sequenceNumber: string, shardId: string) {\n this.sequenceNumber = sequenceNumber\n this.shardId = shardId\n }\n\n static fromJson(json: JSONObject): PutRecordsResultEntry {\n return new PutRecordsResultEntry(json.SequenceNumber as string, json.ShardId as string)\n }\n}\n\n/**\n * Represents the response format of the GetRecords operation.\n */\nexport class GetRecordsResponse {\n /**\n * The next position in the shard from which to start sequentially reading data records.\n */\n nextShardIterator: string\n\n /**\n * The data records retrieved from the shard.\n */\n records: Record[]\n\n /**\n * The number of milliseconds the GetRecords response is from the\n * tip of the stream, indicating how far behind current time the\n * consumer is.\n *\n * A value of zero indicates that record processing is caught\n * up, and there are no new records to process at this moment.\n */\n millisBehindLatest: number\n\n constructor(nextShardIterator: string, records: Record[], millisBehindLatest: number) {\n this.nextShardIterator = nextShardIterator\n this.records = records\n this.millisBehindLatest = millisBehindLatest\n }\n\n static fromJson(json: JSONObject): GetRecordsResponse {\n const { NextShardIterator = '', Records = [], MillisBehindLatest = 0 } = json\n const records = (Records as JSONObject[]).map(Record.fromJson)\n\n return new GetRecordsResponse(\n NextShardIterator as string,\n records as Record[],\n MillisBehindLatest as number\n )\n }\n}\n\n/**\n * The unit of data of the Kinesis data stream, which is composed of a sequence\n * number, a partition key, and a data blob.\n */\nclass Record {\n /**\n * The data blob.\n */\n data: string | ArrayBuffer\n\n /**\n * Identifies which shard in the stream the data record is assigned to.\n */\n partitionKey: string\n\n /**\n * The unique identifier of the record in the stream.\n */\n sequenceNumber: string\n\n constructor(data: string | ArrayBuffer, partitionKey: string, sequenceNumber: string) {\n this.data = data\n this.partitionKey = partitionKey\n this.sequenceNumber = sequenceNumber\n }\n\n static fromJson(json: JSONObject): Record {\n return new Record(\n json.Data as string | ArrayBuffer,\n json.PartitionKey as string,\n json.SequenceNumber as string\n )\n }\n}\n\n// Response class for ListShards API\nexport class ListShardsResponse {\n /**\n * An array of JSON objects.\n *\n * Each object represents one shard and specifies the IDs of the shard, the\n * shard's parent, and the shard that's adjacent to the shard's parent.\n */\n shards: Shard[]\n\n /**\n * When the number of shards in the data stream is greater than the\n * default value for the MaxResults parameter, or if you explicitly specify\n * a value for MaxResults that is less than the number of shards in the data\n * stream, the response includes a pagination token named NextToken.\n */\n nextToken?: string\n\n constructor(shards: Shard[], nextToken?: string) {\n this.shards = shards\n this.nextToken = nextToken\n }\n\n static fromJson(json: JSONObject): ListShardsResponse {\n const { Shards = [], NextToken } = json\n const shards = (Shards as JSONObject[]).map(Shard.fromJson)\n\n return new ListShardsResponse(shards, NextToken as string | undefined)\n }\n}\n\n/**\n * A uniquely identified group of data records in a Kinesis data stream.\n */\nexport class Shard {\n /**\n * The unique identifier of the shard within the stream.\n */\n id: string\n\n /**\n * The shard ID of the shard's parent.\n */\n parentShardId?: string\n\n /**\n * The shard ID of the shard adjacent to the shard's parent.\n */\n adjacentParentShardId?: string\n\n /**\n * The range of possible hash key values for the shard, which is a set of ordered contiguous positive integers.\n */\n hashKeyRange: HashKeyRange\n\n sequenceNumberRange: SequenceNumberRange\n\n constructor(\n id: string,\n hashKeyRange: HashKeyRange,\n sequenceNumberRange: SequenceNumberRange,\n parentShardId?: string,\n adjacentParentShardId?: string\n ) {\n this.id = id\n this.parentShardId = parentShardId\n this.adjacentParentShardId = adjacentParentShardId\n this.hashKeyRange = hashKeyRange\n this.sequenceNumberRange = sequenceNumberRange\n }\n\n static fromJson(json: JSONObject): Shard {\n return new Shard(\n json.ShardId as string,\n json.HashKeyRange as unknown as HashKeyRange,\n json.SequenceNumberRange as unknown as SequenceNumberRange,\n json.ParentShardId as string | undefined,\n json.AdjacentParentShardId as string | undefined\n )\n }\n}\n\n/**\n * Describes the range of possible hash key values for the shard, which is\n * a set of ordered contiguous positive integers.\n */\nexport interface HashKeyRange {\n /**\n * The starting hash key of the hash key range.\n */\n startingHashKey: string\n\n /**\n * The ending hash key of the hash key range.\n */\n endingHashKey: string\n}\n\n/**\n * The range of possible sequence numbers for the shard.\n */\nexport interface SequenceNumberRange {\n /**\n * The ending sequence number for the range.\n *\n * Shards that are in the OPEN state have an ending sequence number of null.\n */\n endingSequenceNumber?: string\n\n /**\n * The starting sequence number for the range.\n */\n startingSequenceNumber: string\n}\n\n/**\n * Describes a shard iterator response.\n */\nclass GetShardIteratorResponse {\n /**\n * The position in the shard from which to start reading data records sequentially.\n */\n shardIterator: string\n\n constructor(shardIterator: string) {\n this.shardIterator = shardIterator\n }\n\n static fromJson(json: JSONObject): GetShardIteratorResponse {\n return new GetShardIteratorResponse(json.ShardIterator as string)\n }\n}\n","import http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { JSONObject } from './json'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { HTTPHeaders, HTTPMethod } from './http'\n\n/**\n * Class allowing to interact with Amazon AWS's Event Bridge service\n */\nexport class EventBridgeClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'events')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Sends custom events to Amazon EventBridge so that they can be matched to rules.\n *\n * @param {PutEventsInput} input - The input for the PutEvents operation.\n * @throws {EventBridgeServiceError}\n * @throws {InvalidSignatureError}\n */\n async putEvents(input: PutEventsInput) {\n const parsedEvent = {\n ...input,\n Entries: input.Entries.map((entry) => ({\n ...entry,\n Detail: JSON.stringify(entry.Detail),\n })),\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AWSEvents.PutEvents`,\n },\n body: JSON.stringify(parsedEvent),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(EventBridgeOperation.PutEvents, res)\n }\n\n _handle_error(\n operation: EventBridgeOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new EventBridgeServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new EventBridgeServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\nenum EventBridgeOperation {\n PutEvents = 'PutEvents',\n}\n\n/**\n * Represents an event to be submitted.\n *\n * @typedef {Object} PutEventEntry\n *\n * @property {string} Detail - A valid serialized JSON object. There is no other schema imposed. The JSON object may contain fields and nested sub-objects.\n * @property {string} DetailType - Free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.\n * @property {string} EventBusName - The name or ARN of the event bus to receive the event. Only the rules that are associated with this event bus are used to match the event. If you omit this, the default event bus is used.\n * @property {string[]} Resources - AWS resources, identified by Amazon Resource Name (ARN), which the event primarily concerns. Any number, including zero, may be present.\n * @property {string} Source - The source of the event.\n */\ninterface PutEventEntry {\n Source: string\n Detail: JSONObject\n DetailType: string\n EventBusName?: string\n Resources?: [string]\n}\n\n/**\n * Represents the input for a put events operation.\n *\n * @typedef {Object} PutEventsInput\n *\n * @property {string} [EndpointId] - The optional URL subdomain of the endpoint.\n * @property {PutEventEntry[]} Entries - An array of entries that defines an event in your system.\n */\ninterface PutEventsInput {\n EndpointId?: string\n Entries: PutEventEntry[]\n}\n\nexport class EventBridgeServiceError extends AWSError {\n operation: EventBridgeOperation\n\n /**\n * Constructs a EventBridgeServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: EventBridgeOperation) {\n super(message, code)\n this.name = 'EventBridgeServiceError'\n this.operation = operation\n }\n}\n"],"names":["AWSClient","awsConfig","serviceName","_classCallCheck","_defineProperty","this","undefined","endpoint","_endpoint","key","get","Endpoint","concat","region","set","AWSConfig","options","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","value","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","AMZ_ALGORITHM_QUERY_PARAM","AMZ_CREDENTIAL_QUERY_PARAM","AMZ_DATE_QUERY_PARAM","AMZ_EXPIRES_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_SIGNED_HEADERS_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","MAX_PRESIGNED_TTL","EMPTY_SHA256","UNSIGNED_PAYLOAD","completeUrl","startsWith","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","_protocol","slice","_hostname","_port","parseInt","href","_value$split2","hostname","port","protocol","host","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","NetworkError","_Error2","_this2","hasHeader","soughtHeader","_i","_Object$keys","Object","keys","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","isArrayBuffer","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","prototype","call","toFormUrlEncoded","form","params","require","_regeneratorRuntime","t","r","hasOwnProperty","o","defineProperty","i","Symbol","a","iterator","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","self","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","obj","toPrimitive","String","_toPrimitive","LambdaClient","_AWSClient","commonHeaders","fn","_callee","payload","invocationType","signedRequest","res","logResult","functionError","_args","_context","logType","clientContext","qualifier","sign","http","_handle_error","executedVersion","encoding","statusCode","status","LambdaInvocationError","args","_x","_x2","errorCode","error_code","errorMessage","awsError","arr","_arrayWithHoles","_iterableToArrayLimit","minLen","_arrayLikeToArray","test","_unsupportedIterableToArray","_nonIterableRest","len","arr2","_asyncToGenerator","API_VERSION","SQSClient","_sendMessage","queueUrl","messageBody","attributeParameters","parsed","Action","Version","QueueUrl","MessageBody","messageDeduplicationId","MessageDeduplicationId","messageGroupId","MessageGroupId","messageAttributes","entries","attribute","valueParameterSuffix","assign","delaySeconds","DelaySeconds","_handleError","html","_listQueues","_callee2","parameters","_args2","_context2","maxResults","MaxResults","nextToken","NextToken","queueNamePrefix","QueueNamePrefix","Host","urls","toArray","operation","SQSServiceError","id","bodyMD5","v1","v4","uuid","module","exports","byteToHex","substr","buf","offset","bth","getRandomValues","window","msCrypto","rnds8","Uint8Array","rnds","Math","random","_nodeId","_clockseq","rng","bytesToUuid","_lastMSecs","_lastNSecs","b","node","clockseq","seedBytes","msecs","getTime","nsecs","dt","tl","tmh","ii","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","definition","prop","KMSClient","_listKeys","KMSOperation","ListKeys","k","KMSKey","fromJSON","_generateDataKey","size","KMSKeySize","Size256","KeyId","NumberOfBytes","GenerateDataKey","KMSDataKey","KMSServiceError","keyArn","keyId","KeyArn","CiphertextBlob","Plaintext","ciphertextBlob","plaintext","S3Client","_listBuckets","buckets","children","each","_","bucketDefinition","bucket","child","nodeName","textContent","creationDate","_listObjects","bucketName","prefix","objects","objectDefinition","lastModified","etag","storageClass","_getObject","_callee3","objectKey","_res$headers$XAmzSt","_context3","S3Object","_x3","_x4","_putObject","_callee4","data","_context4","contentDisposition","contentEncoding","contentLength","contentMD5","contentType","_x5","_x6","_x7","_x8","_deleteObject","_callee5","_context5","_x9","_x10","_copyObject","_callee6","sourceBucket","sourceKey","destinationBucket","destinationKey","bucketEndpoint","_context6","copy","_x11","_x12","_x13","_x14","_createMultipartUpload","_callee7","_context7","uploads","S3MultipartUpload","_x15","_x16","_uploadPart","_callee8","uploadId","partNumber","_context8","S3Part","_x17","_x18","_x19","_x20","_x21","_completeMultipartUpload","_callee9","parts","_context9","part","eTag","_x22","_x23","_x24","_x25","_abortMultipartUpload","_callee10","_context10","_x26","_x27","_x28","S3ServiceError","S3Bucket","SecretsManagerClient","_listSecrets","SecretsManagerOperation","ListSecrets","Secret","_getSecret","SecretId","GetSecretValue","_createSecret","secret","description","versionID","tags","uuidv4","Name","Description","SecretString","ClientRequestToken","Tags","CreateSecret","_putSecretValue","PutSecretValue","_deleteSecret","_ref$recoveryWindow","recoveryWindow","_ref$noRecovery","noRecovery","DeleteSecret","SecretsManagerServiceError","arn","secretString","createdDate","lastAccessedDate","lastChangedDate","ARN","CreatedDate","LastAccessedDate","LastChangedDate","SystemsManagerClient","withDecryption","WithDecryption","SystemsManagerOperation","GetParameter","SystemsManagerParameter","_getParameter","SystemsManagerServiceError","dataType","lastModifiedDate","selector","sourceResult","version","parameter","Parameter","DataType","LastModifiedDate","Selector","SourceResult","Type","Value","KinesisClient","serviceVersion","_createStream","streamName","StreamName","shardCount","ShardCount","streamModeDetails","StreamMode","streamMode","_send_request","_deleteStream","streamARN","StreamARN","enforceConsumerDeletion","EnforceConsumerDeletion","_listStreams","_args3","exclusiveStartStreamName","ExclusiveStartStreamName","limit","Limit","ListStreamsResponse","fromJson","_putRecords","records","_args4","Records","PutRecordsResponse","_getRecords","shardIterator","_args5","ShardIterator","GetRecordsResponse","_listShards","_args6","ListShardsResponse","_getShardIterator","shardId","shardIteratorType","_args7","ShardId","ShardIteratorType","startingSequenceNumber","StartingSequenceNumber","timestamp","Timestamp","GetShardIteratorResponse","_send_request2","action","KinesisServiceError","HasMoreStreams","StreamNames","StreamSummaries","hasMoreStreams","streamNames","streamSummaries","result","_result$HasMoreStream","_result$NextToken","_result$StreamNames","_result$StreamSummari","StreamSummary","StreamCreationTimestamp","StreamStatus","streamCreationTimestamp","streamStatus","summary","_summary$StreamARN","_summary$StreamCreati","_summary$StreamModeDe","StreamModeDetails","_summary$StreamName","_summary$StreamStatus","encryptionType","failedRecordCount","_json$EncryptionType","EncryptionType","_json$FailedRecordCou","FailedRecordCount","_json$Records","PutRecordsResultEntry","sequenceNumber","SequenceNumber","nextShardIterator","millisBehindLatest","_json$NextShardIterat","NextShardIterator","_json$Records2","_json$MillisBehindLat","MillisBehindLatest","Record","partitionKey","Data","PartitionKey","shards","_json$Shards","Shards","Shard","hashKeyRange","sequenceNumberRange","parentShardId","adjacentParentShardId","HashKeyRange","SequenceNumberRange","ParentShardId","AdjacentParentShardId","EventBridgeClient","input","parsedEvent","Entries","entry","Detail","EventBridgeOperation","PutEvents","_putEvents","EventBridgeServiceError"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/kinesis.js b/dist/kinesis.js index f07653d..c12a211 100644 --- a/dist/kinesis.js +++ b/dist/kinesis.js @@ -1,3 +1,3 @@ /*! For license information please see kinesis.js.LICENSE.txt */ -(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rw,InvalidAWSConfigError:()=>S,InvalidSignatureError:()=>se,KinesisClient:()=>Re,KinesisServiceError:()=>Le});var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"_protocol",void 0),a(this,"_hostname",void 0),a(this,"_port",void 0);var r=!t.startsWith("http://")&&!t.startsWith("https://")?"".concat(e.DEFAULT_PROTOCOL,"://").concat(t):t,o=r.match(/^https?:/),i=n(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=o?o[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return t=e,(r=[{key:"copy",value:function(){return new e(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(e){var t=n(e.split(":"),2),r=t[0],o=t[1];this._hostname=r,this._port=o?parseInt(o):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(e){this._hostname=e}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(t){var r=t.match(/^https?:/),o=n(t.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=o.split(":")[0],this._port=o.split(":")[1]?parseInt(o.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(e){this._port=e}},{key:"protocol",get:function(){return this._protocol},set:function(e){this._protocol=e}}])&&i(t.prototype,r),o&&i(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}();function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t,r){return t=y(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,r||[],y(e).constructor):t.apply(e,r))}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&h(o,r.prototype),o}(e,arguments,y(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,e)},l(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r128)throw new S("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new S("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new u(t.endpoint):this.endpoint=t.endpoint)}return m(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),S=function(e){function t(e){return d(this,t),f(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(t,e),m(t)}(l(Error));const O=require("k6/crypto");var j=e.n(O),_="X-Amz-Date",k="X-Amz-Signature",P="X-Amz-Security-Token",E="x-amz-content-sha256",x=_.toLowerCase(),A=k.toLowerCase(),T="X-Amz-Target".toLowerCase(),N=P.toLowerCase(),C="authorization",I=[C,x,"date"],R="host",L={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},D="aws4_request",q="AWS4-HMAC-SHA256";const K=require("k6/html");function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function H(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=re(re({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=le(r.signingDate),o=n.longDate,i=n.shortDate,a=r.signingService||this.service,c=r.signingRegion||this.region,u="".concat(i,"/").concat(c,"/").concat(a,"/").concat(D);e.headers[R]||(e.headers[R]=e.endpoint.hostname);for(var s=0,f=Object.keys(e.headers);s-1&&delete e.headers[l]}e.headers[x]=o,this.credentials.sessionToken&&(e.headers[N]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var p=this.computePayloadHash(e);!function(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=t.signingDate,n=void 0===r?new Date:r,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,c=t.unhoistableHeaders,u=t.signableHeaders,s=t.signingRegion,f=t.signingService,l=le(n),p=l.longDate,h=l.shortDate,y=s||this.region,d=f||this.service;if(i>604800)throw new se("Signature version 4 presigned URLs can't be valid for more than 7 days");var v="".concat(h,"/").concat(y,"/").concat(d,"/").concat(D),m=this.moveHeadersToQuery(e,{unhoistableHeaders:c});m.headers[R]||(m.headers[R]=e.endpoint.hostname),this.credentials.sessionToken&&(m.query[P]=this.credentials.sessionToken),m.query["X-Amz-Algorithm"]=q,m.query["X-Amz-Credential"]="".concat(this.credentials.accessKeyId,"/").concat(v),m.query[_]=p,m.query["X-Amz-Expires"]=i.toString(10);var b=this.computeCanonicalHeaders(m,a,u);m.query["X-Amz-SignedHeaders"]=Object.keys(b).sort().join(";");var g=this.deriveSigningKey(this.credentials,d,y,h),w=this.computePayloadHash(e),S=this.createCanonicalRequest(m,b,w);m.query[k]=this.calculateSignature(p,v,g,S);var O=m.endpoint.href;return m.path&&(O+=m.path),m.query&&(O+="?".concat(this.serializeQueryParameters(m.query))),re({url:O},m)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=j().sha256(r,"hex");return"".concat(q,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var o=this.createStringToSign(e,t,n);return j().hmac("sha256",r,o,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var o=e.secretAccessKey,i=j().hmac("sha256","AWS4"+o,n,"binary"),a=j().hmac("sha256",i,r,"binary"),c=j().hmac("sha256",a,t,"binary");return j().hmac("sha256",c,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=Z(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],i={},a=function(e){if(e.toLowerCase()===A)return 1;o.push(e);var t=n[e];"string"==typeof t?i[e]="".concat(fe(e),"=").concat(fe(t)):Array.isArray(t)&&(i[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(fe(e),"=").concat(fe(r))])}),[]).join("&"))},c=Z(Object.keys(n).sort());try{for(c.s();!(t=c.n()).done;){a(t.value)}}catch(e){c.e(e)}finally{c.f()}return o.map((function(e){return i[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,i={},a=Z(Object.keys(o).sort());try{for(a.s();!(n=a.n()).done;){var c=n.value;if(null!=o[c]){var u=c.toLowerCase();(u in L||null!=t&&t.has(u))&&(!r||r&&!r.has(u))||"string"==typeof o[c]&&(i[u]=o[c]=o[c].trim().replace(/\s+/g," "))}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"computePayloadHash",value:function(e){var t,r=e.headers,n=e.body;return r[E]?r[E]:null==n?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":"string"==typeof n||(t=n,"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)))?j().sha256(n,"hex").toLowerCase():ArrayBuffer.isView(n)?j().sha256(n.buffer,"hex").toLowerCase():"UNSIGNED-PAYLOAD"}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function we(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Se(e){for(var t=1;t1&&void 0!==o[1]?o[1]:{}).shardCount&&{ShardCount:r.shardCount}),r.streamModeDetails&&{StreamMode:r.streamModeDetails.streamMode}),e.next=4,this._send_request("CreateStream",n);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"deleteStream",value:(u=je(ge().mark((function e(t){var r,n,o=arguments;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Se(Se({StreamName:t},(r=o.length>1&&void 0!==o[1]?o[1]:{}).streamARN&&{StreamARN:r.streamARN}),r.enforceConsumerDeletion&&{EnforceConsumerDeletion:r.enforceConsumerDeletion}),e.next=4,this._send_request("DeleteStream",n);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"listStreams",value:(c=je(ge().mark((function e(){var t,r,n,o=arguments;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Se(Se(Se({},(t=o.length>0&&void 0!==o[0]?o[0]:{}).exclusiveStartStreamName&&{ExclusiveStartStreamName:t.exclusiveStartStreamName}),t.limit&&{Limit:t.limit}),t.nextToken&&{NextToken:t.nextToken}),e.next=4,this._send_request("ListStreams",r);case 4:return n=e.sent,e.abrupt("return",De.fromJson(null==n?void 0:n.json()));case 6:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"putRecords",value:(a=je(ge().mark((function e(t){var r,n,o,i=arguments;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=i.length>1&&void 0!==i[1]?i[1]:{}).streamName||r.streamARN){e.next=3;break}throw new Error("Either streamName or streamARN must be provided");case 3:return n=Se(Se({Records:t},r.streamName&&{StreamName:r.streamName}),r.streamARN&&{StreamARN:r.streamARN}),e.next=6,this._send_request("PutRecords",n);case 6:return o=e.sent,e.abrupt("return",Ke.fromJson(null==o?void 0:o.json()));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getRecords",value:(i=je(ge().mark((function e(t){var r,n,o,i=arguments;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Se(Se({ShardIterator:t},(r=i.length>1&&void 0!==i[1]?i[1]:{}).limit&&{Limit:r.limit}),r.streamARN&&{StreamARN:r.streamARN}),e.next=4,this._send_request("GetRecords",n);case 4:return o=e.sent,e.abrupt("return",He.fromJson(null==o?void 0:o.json()));case 6:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"listShards",value:(o=je(ge().mark((function e(t){var r,n,o,i=arguments;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Se(Se({StreamName:t},(r=i.length>1&&void 0!==i[1]?i[1]:{}).nextToken&&{NextToken:r.nextToken}),r.maxResults&&{MaxResults:r.maxResults}),e.next=4,this._send_request("ListShards",n);case 4:return o=e.sent,e.abrupt("return",ze.fromJson(null==o?void 0:o.json()));case 6:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"getShardIterator",value:(n=je(ge().mark((function e(t,r,n){var o,i,a,c=arguments;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Se(Se({StreamName:t,ShardId:r,ShardIteratorType:n},(o=c.length>3&&void 0!==c[3]?c[3]:{}).startingSequenceNumber&&{StartingSequenceNumber:o.startingSequenceNumber}),o.timestamp&&{Timestamp:o.timestamp}),e.next=4,this._send_request("GetShardIterator",i);case 4:return a=e.sent,e.abrupt("return",Be.fromJson(null==a?void 0:a.json()));case 6:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"_send_request",value:(r=je(ge().mark((function e(t,r){var n,o;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:Se(Se({},this.commonHeaders),{},Ce({},T,"".concat(this.serviceVersion,".").concat(t))),body:JSON.stringify(r)},{}),e.next=3,he().asyncRequest("POST",n.url,n.body,{headers:n.headers});case 3:return o=e.sent,this._handle_error(t,o),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"_handle_error",value:function(e,t){var r=t.error_code;if(0!==r){var n=t.json();if(r>=1400&&r<=1499){var o=n.Message||n.message||n.__type;if("InvalidSignatureException"===n.__type)throw new se(o,n.__type);throw new Le(o,n.__type,e)}if(1500===r)throw new Le("An error occured on the server side","InternalServiceError",e)}}}]);var r,n,o,i,a,c,u,s}(function(){return e=function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ve(this,"awsConfig",void 0),ve(this,"serviceName",void 0),ve(this,"_endpoint",void 0),this.awsConfig=t,this.serviceName=r,null!=t.endpoint&&(this._endpoint=t.endpoint)},(t=[{key:"endpoint",get:function(){return null==this._endpoint&&(this._endpoint=new u("https://".concat(this.serviceName,".").concat(this.awsConfig.region,".amazonaws.com"))),this._endpoint},set:function(e){this._endpoint=e}}])&&de(e.prototype,t),r&&de(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}()),Le=function(e){function t(e,r,n){var o;return _e(this,t),Ce(o=Ee(this,t,[e,r]),"operation",void 0),o.name="KinesisServiceError",o.operation=n,o}return Te(t,e),Pe(t)}(G),De=function(){function e(t,r,n,o){_e(this,e),Ce(this,"hasMoreStreams",void 0),Ce(this,"nextToken",void 0),Ce(this,"streamNames",void 0),Ce(this,"streamSummaries",void 0),this.hasMoreStreams=t,this.nextToken=r,this.streamNames=n,this.streamSummaries=o}return Pe(e,null,[{key:"fromJson",value:function(t){var r=t.HasMoreStreams,n=void 0!==r&&r,o=t.NextToken,i=void 0===o?"":o,a=t.StreamNames,c=void 0===a?[]:a,u=t.StreamSummaries,s=void 0===u?[]:u;return new e(n,i,c,null==s?void 0:s.map(qe.fromJson))}}])}(),qe=function(){function e(t,r,n,o,i){_e(this,e),Ce(this,"streamARN",void 0),Ce(this,"streamCreationTimestamp",void 0),Ce(this,"streamModeDetails",void 0),Ce(this,"streamName",void 0),Ce(this,"streamStatus",void 0),this.streamARN=t,this.streamCreationTimestamp=r,this.streamModeDetails=n,this.streamName=o,this.streamStatus=i}return Pe(e,null,[{key:"fromJson",value:function(t){var r=t.StreamARN,n=void 0===r?"":r,o=t.StreamCreationTimestamp,i=void 0===o?0:o,a=t.StreamModeDetails,c=void 0===a?{}:a,u=t.StreamName,s=void 0===u?"":u,f=t.StreamStatus;return new e(n,i,c,s,void 0===f?"":f)}}])}(),Ke=function(){function e(t,r,n){_e(this,e),Ce(this,"encryptionType",void 0),Ce(this,"failedRecordCount",void 0),Ce(this,"records",void 0),this.encryptionType=t,this.failedRecordCount=r,this.records=n}return Pe(e,null,[{key:"fromJson",value:function(t){var r=t.EncryptionType,n=void 0===r?"NONE":r,o=t.FailedRecordCount,i=void 0===o?0:o,a=t.Records;return new e(n,i,(void 0===a?[]:a).map(Me.fromJson))}}])}(),Me=function(){function e(t,r){_e(this,e),Ce(this,"sequenceNumber",void 0),Ce(this,"shardId",void 0),this.sequenceNumber=t,this.shardId=r}return Pe(e,null,[{key:"fromJson",value:function(t){return new e(t.SequenceNumber,t.ShardId)}}])}(),He=function(){function e(t,r,n){_e(this,e),Ce(this,"nextShardIterator",void 0),Ce(this,"records",void 0),Ce(this,"millisBehindLatest",void 0),this.nextShardIterator=t,this.records=r,this.millisBehindLatest=n}return Pe(e,null,[{key:"fromJson",value:function(t){var r=t.NextShardIterator,n=void 0===r?"":r,o=t.Records,i=void 0===o?[]:o,a=t.MillisBehindLatest,c=void 0===a?0:a;return new e(n,i.map(Je.fromJson),c)}}])}(),Je=function(){function e(t,r,n){_e(this,e),Ce(this,"data",void 0),Ce(this,"partitionKey",void 0),Ce(this,"sequenceNumber",void 0),this.data=t,this.partitionKey=r,this.sequenceNumber=n}return Pe(e,null,[{key:"fromJson",value:function(t){return new e(t.Data,t.PartitionKey,t.SequenceNumber)}}])}(),ze=function(){function e(t,r){_e(this,e),Ce(this,"shards",void 0),Ce(this,"nextToken",void 0),this.shards=t,this.nextToken=r}return Pe(e,null,[{key:"fromJson",value:function(t){var r=t.Shards,n=void 0===r?[]:r,o=t.NextToken;return new e(n.map(We.fromJson),o)}}])}(),We=function(){function e(t,r,n,o,i){_e(this,e),Ce(this,"id",void 0),Ce(this,"parentShardId",void 0),Ce(this,"adjacentParentShardId",void 0),Ce(this,"hashKeyRange",void 0),Ce(this,"sequenceNumberRange",void 0),this.id=t,this.parentShardId=o,this.adjacentParentShardId=i,this.hashKeyRange=r,this.sequenceNumberRange=n}return Pe(e,null,[{key:"fromJson",value:function(t){return new e(t.ShardId,t.HashKeyRange,t.SequenceNumberRange,t.ParentShardId,t.AdjacentParentShardId)}}])}(),Be=function(){function e(t){_e(this,e),Ce(this,"shardIterator",void 0),this.shardIterator=t}return Pe(e,null,[{key:"fromJson",value:function(t){return new e(t.ShardIterator)}}])}(),Fe=exports;for(var Ue in t)Fe[Ue]=t[Ue];t.__esModule&&Object.defineProperty(Fe,"__esModule",{value:!0})})(); +(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rw,InvalidAWSConfigError:()=>S,InvalidSignatureError:()=>he,KinesisClient:()=>Ke,KinesisServiceError:()=>Me});var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"_protocol",void 0),a(this,"_hostname",void 0),a(this,"_port",void 0);var r=!t.startsWith("http://")&&!t.startsWith("https://")?"".concat(e.DEFAULT_PROTOCOL,"://").concat(t):t,o=r.match(/^https?:/),i=n(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=o?o[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return t=e,(r=[{key:"copy",value:function(){return new e(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(e){var t=n(e.split(":"),2),r=t[0],o=t[1];this._hostname=r,this._port=o?parseInt(o):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(e){this._hostname=e}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(t){var r=t.match(/^https?:/),o=n(t.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=o.split(":")[0],this._port=o.split(":")[1]?parseInt(o.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(e){this._port=e}},{key:"protocol",get:function(){return this._protocol},set:function(e){this._protocol=e}}])&&i(t.prototype,r),o&&i(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}();function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t,r){return t=y(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,r||[],y(e).constructor):t.apply(e,r))}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&h(o,r.prototype),o}(e,arguments,y(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,e)},l(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r128)throw new S("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new S("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new u(t.endpoint):this.endpoint=t.endpoint)}return m(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),S=function(e){function t(e){return d(this,t),f(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(t,e),m(t)}(l(Error));const O=require("k6/crypto");var j=e.n(O),_="X-Amz-Date",k="X-Amz-Signature",P="X-Amz-Security-Token",E="x-amz-content-sha256",x=_.toLowerCase(),A=k.toLowerCase(),T="X-Amz-Target".toLowerCase(),N=P.toLowerCase(),C="authorization",I=[C,x,"date"],R="host",L={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},D="aws4_request",q="AWS4-HMAC-SHA256";const K=require("k6/html");function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function H(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=ae(ae({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=de(r.signingDate),o=n.longDate,i=n.shortDate,a=r.signingService||this.service,c=r.signingRegion||this.region,u="".concat(i,"/").concat(c,"/").concat(a,"/").concat(D);e.headers[R]||(e.headers[R]=e.endpoint.hostname);for(var s=0,f=Object.keys(e.headers);s-1&&delete e.headers[l]}e.headers[x]=o,this.credentials.sessionToken&&(e.headers[N]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var p=this.computePayloadHash(e);!function(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=t.signingDate,n=void 0===r?new Date:r,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,c=t.unhoistableHeaders,u=t.signableHeaders,s=t.signingRegion,f=t.signingService,l=de(n),p=l.longDate,h=l.shortDate,y=s||this.region,d=f||this.service;if(i>604800)throw new he("Signature version 4 presigned URLs can't be valid for more than 7 days");var v="".concat(h,"/").concat(y,"/").concat(d,"/").concat(D),m=this.moveHeadersToQuery(e,{unhoistableHeaders:c});m.headers[R]||(m.headers[R]=e.endpoint.hostname),this.credentials.sessionToken&&(m.query[P]=this.credentials.sessionToken),m.query["X-Amz-Algorithm"]=q,m.query["X-Amz-Credential"]="".concat(this.credentials.accessKeyId,"/").concat(v),m.query[_]=p,m.query["X-Amz-Expires"]=i.toString(10);var b=this.computeCanonicalHeaders(m,a,u);m.query["X-Amz-SignedHeaders"]=Object.keys(b).sort().join(";");var g=this.deriveSigningKey(this.credentials,d,y,h),w=this.computePayloadHash(e),S=this.createCanonicalRequest(m,b,w);m.query[k]=this.calculateSignature(p,v,g,S);var O=m.endpoint.href;return m.path&&(O+=m.path),m.query&&(O+="?".concat(this.serializeQueryParameters(m.query))),ae({url:O},m)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=j().sha256(r,"hex");return"".concat(q,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var o=this.createStringToSign(e,t,n);return j().hmac("sha256",r,o,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var o=e.secretAccessKey,i=j().hmac("sha256","AWS4"+o,n,"binary"),a=j().hmac("sha256",i,r,"binary"),c=j().hmac("sha256",a,t,"binary");return j().hmac("sha256",c,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=ne(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],i={},a=function(e){if(e.toLowerCase()===A)return 1;o.push(e);var t=n[e];"string"==typeof t?i[e]="".concat(ye(e),"=").concat(ye(t)):Array.isArray(t)&&(i[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(ye(e),"=").concat(ye(r))])}),[]).join("&"))},c=ne(Object.keys(n).sort());try{for(c.s();!(t=c.n()).done;){a(t.value)}}catch(e){c.e(e)}finally{c.f()}return o.map((function(e){return i[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,i={},a=ne(Object.keys(o).sort());try{for(a.s();!(n=a.n()).done;){var c=n.value;if(null!=o[c]){var u=c.toLowerCase();(u in L||null!=t&&t.has(u))&&(!r||r&&!r.has(u))||"string"==typeof o[c]&&(i[u]=o[c]=o[c].trim().replace(/\s+/g," "))}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"computePayloadHash",value:function(e){var t,r=e.headers,n=e.body;return r[E]?r[E]:null==n?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":"string"==typeof n||(t=n,"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)))?j().sha256(n,"hex").toLowerCase():ArrayBuffer.isView(n)?j().sha256(n.buffer,"hex").toLowerCase():"UNSIGNED-PAYLOAD"}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function _e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ke(e){for(var t=1;t1&&void 0!==o[1]?o[1]:{}).shardCount&&{ShardCount:r.shardCount}),r.streamModeDetails&&{StreamMode:r.streamModeDetails.streamMode}),e.next=4,this._send_request("CreateStream",n);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"deleteStream",value:(u=Ee(je().mark((function e(t){var r,n,o=arguments;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ke(ke({StreamName:t},(r=o.length>1&&void 0!==o[1]?o[1]:{}).streamARN&&{StreamARN:r.streamARN}),r.enforceConsumerDeletion&&{EnforceConsumerDeletion:r.enforceConsumerDeletion}),e.next=4,this._send_request("DeleteStream",n);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"listStreams",value:(c=Ee(je().mark((function e(){var t,r,n,o=arguments;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=ke(ke(ke({},(t=o.length>0&&void 0!==o[0]?o[0]:{}).exclusiveStartStreamName&&{ExclusiveStartStreamName:t.exclusiveStartStreamName}),t.limit&&{Limit:t.limit}),t.nextToken&&{NextToken:t.nextToken}),e.next=4,this._send_request("ListStreams",r);case 4:return n=e.sent,e.abrupt("return",He.fromJson(null==n?void 0:n.json()));case 6:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"putRecords",value:(a=Ee(je().mark((function e(t){var r,n,o,i=arguments;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=i.length>1&&void 0!==i[1]?i[1]:{}).streamName||r.streamARN){e.next=3;break}throw new Error("Either streamName or streamARN must be provided");case 3:return n=ke(ke({Records:t},r.streamName&&{StreamName:r.streamName}),r.streamARN&&{StreamARN:r.streamARN}),e.next=6,this._send_request("PutRecords",n);case 6:return o=e.sent,e.abrupt("return",ze.fromJson(null==o?void 0:o.json()));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getRecords",value:(i=Ee(je().mark((function e(t){var r,n,o,i=arguments;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ke(ke({ShardIterator:t},(r=i.length>1&&void 0!==i[1]?i[1]:{}).limit&&{Limit:r.limit}),r.streamARN&&{StreamARN:r.streamARN}),e.next=4,this._send_request("GetRecords",n);case 4:return o=e.sent,e.abrupt("return",Be.fromJson(null==o?void 0:o.json()));case 6:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"listShards",value:(o=Ee(je().mark((function e(t){var r,n,o,i=arguments;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ke(ke({StreamName:t},(r=i.length>1&&void 0!==i[1]?i[1]:{}).nextToken&&{NextToken:r.nextToken}),r.maxResults&&{MaxResults:r.maxResults}),e.next=4,this._send_request("ListShards",n);case 4:return o=e.sent,e.abrupt("return",Ue.fromJson(null==o?void 0:o.json()));case 6:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"getShardIterator",value:(n=Ee(je().mark((function e(t,r,n){var o,i,a,c=arguments;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=ke(ke({StreamName:t,ShardId:r,ShardIteratorType:n},(o=c.length>3&&void 0!==c[3]?c[3]:{}).startingSequenceNumber&&{StartingSequenceNumber:o.startingSequenceNumber}),o.timestamp&&{Timestamp:o.timestamp}),e.next=4,this._send_request("GetShardIterator",i);case 4:return a=e.sent,e.abrupt("return",Xe.fromJson(null==a?void 0:a.json()));case 6:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"_send_request",value:(r=Ee(je().mark((function e(t,r){var n,o;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:ke(ke({},this.commonHeaders),{},De({},T,"".concat(this.serviceVersion,".").concat(t))),body:JSON.stringify(r)},{}),e.next=3,me().asyncRequest("POST",n.url,n.body,{headers:n.headers});case 3:return o=e.sent,this._handle_error(t,o),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"_handle_error",value:function(e,t){var r=t.error_code;if(0!==r){var n=t.json();if(r>=1400&&r<=1499){var o=n.Message||n.message||n.__type;if("InvalidSignatureException"===n.__type)throw new he(o,n.__type);throw new Me(o,n.__type,e)}if(1500===r)throw new Me("An error occured on the server side","InternalServiceError",e)}}}]);var r,n,o,i,a,c,u,s}(function(){return e=function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),we(this,"awsConfig",void 0),we(this,"serviceName",void 0),we(this,"_endpoint",void 0),this.awsConfig=t,this.serviceName=r,null!=t.endpoint&&(this._endpoint=t.endpoint)},(t=[{key:"endpoint",get:function(){return null==this._endpoint&&(this._endpoint=new u("https://".concat(this.serviceName,".").concat(this.awsConfig.region,".amazonaws.com"))),this._endpoint},set:function(e){this._endpoint=e}}])&&ge(e.prototype,t),r&&ge(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}()),Me=function(e){function t(e,r,n){var o;return xe(this,t),De(o=Ne(this,t,[e,r]),"operation",void 0),o.name="KinesisServiceError",o.operation=n,o}return Re(t,e),Te(t)}(Y),He=function(){function e(t,r,n,o){xe(this,e),De(this,"hasMoreStreams",void 0),De(this,"nextToken",void 0),De(this,"streamNames",void 0),De(this,"streamSummaries",void 0),this.hasMoreStreams=t,this.nextToken=r,this.streamNames=n,this.streamSummaries=o}return Te(e,null,[{key:"fromJson",value:function(t){var r=t.HasMoreStreams,n=void 0!==r&&r,o=t.NextToken,i=void 0===o?"":o,a=t.StreamNames,c=void 0===a?[]:a,u=t.StreamSummaries,s=void 0===u?[]:u;return new e(n,i,c,null==s?void 0:s.map(Je.fromJson))}}])}(),Je=function(){function e(t,r,n,o,i){xe(this,e),De(this,"streamARN",void 0),De(this,"streamCreationTimestamp",void 0),De(this,"streamModeDetails",void 0),De(this,"streamName",void 0),De(this,"streamStatus",void 0),this.streamARN=t,this.streamCreationTimestamp=r,this.streamModeDetails=n,this.streamName=o,this.streamStatus=i}return Te(e,null,[{key:"fromJson",value:function(t){var r=t.StreamARN,n=void 0===r?"":r,o=t.StreamCreationTimestamp,i=void 0===o?0:o,a=t.StreamModeDetails,c=void 0===a?{}:a,u=t.StreamName,s=void 0===u?"":u,f=t.StreamStatus;return new e(n,i,c,s,void 0===f?"":f)}}])}(),ze=function(){function e(t,r,n){xe(this,e),De(this,"encryptionType",void 0),De(this,"failedRecordCount",void 0),De(this,"records",void 0),this.encryptionType=t,this.failedRecordCount=r,this.records=n}return Te(e,null,[{key:"fromJson",value:function(t){var r=t.EncryptionType,n=void 0===r?"NONE":r,o=t.FailedRecordCount,i=void 0===o?0:o,a=t.Records;return new e(n,i,(void 0===a?[]:a).map(We.fromJson))}}])}(),We=function(){function e(t,r){xe(this,e),De(this,"sequenceNumber",void 0),De(this,"shardId",void 0),this.sequenceNumber=t,this.shardId=r}return Te(e,null,[{key:"fromJson",value:function(t){return new e(t.SequenceNumber,t.ShardId)}}])}(),Be=function(){function e(t,r,n){xe(this,e),De(this,"nextShardIterator",void 0),De(this,"records",void 0),De(this,"millisBehindLatest",void 0),this.nextShardIterator=t,this.records=r,this.millisBehindLatest=n}return Te(e,null,[{key:"fromJson",value:function(t){var r=t.NextShardIterator,n=void 0===r?"":r,o=t.Records,i=void 0===o?[]:o,a=t.MillisBehindLatest,c=void 0===a?0:a;return new e(n,i.map(Fe.fromJson),c)}}])}(),Fe=function(){function e(t,r,n){xe(this,e),De(this,"data",void 0),De(this,"partitionKey",void 0),De(this,"sequenceNumber",void 0),this.data=t,this.partitionKey=r,this.sequenceNumber=n}return Te(e,null,[{key:"fromJson",value:function(t){return new e(t.Data,t.PartitionKey,t.SequenceNumber)}}])}(),Ue=function(){function e(t,r){xe(this,e),De(this,"shards",void 0),De(this,"nextToken",void 0),this.shards=t,this.nextToken=r}return Te(e,null,[{key:"fromJson",value:function(t){var r=t.Shards,n=void 0===r?[]:r,o=t.NextToken;return new e(n.map(Ge.fromJson),o)}}])}(),Ge=function(){function e(t,r,n,o,i){xe(this,e),De(this,"id",void 0),De(this,"parentShardId",void 0),De(this,"adjacentParentShardId",void 0),De(this,"hashKeyRange",void 0),De(this,"sequenceNumberRange",void 0),this.id=t,this.parentShardId=o,this.adjacentParentShardId=i,this.hashKeyRange=r,this.sequenceNumberRange=n}return Te(e,null,[{key:"fromJson",value:function(t){return new e(t.ShardId,t.HashKeyRange,t.SequenceNumberRange,t.ParentShardId,t.AdjacentParentShardId)}}])}(),Xe=function(){function e(t){xe(this,e),De(this,"shardIterator",void 0),this.shardIterator=t}return Te(e,null,[{key:"fromJson",value:function(t){return new e(t.ShardIterator)}}])}(),Ve=exports;for(var Qe in t)Ve[Qe]=t[Qe];t.__esModule&&Object.defineProperty(Ve,"__esModule",{value:!0})})(); //# sourceMappingURL=kinesis.js.map \ No newline at end of file diff --git a/dist/kinesis.js.map b/dist/kinesis.js.map index 5125613..6e8950f 100644 --- a/dist/kinesis.js.map +++ b/dist/kinesis.js.map @@ -1 +1 @@ -{"version":3,"file":"kinesis.js","mappings":";mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,m/DCFvD,IAAMC,EAAQ,WAajB,SAAAA,EAAYC,gGAAkBC,CAAA,KAAAF,GAAAG,EAAA,yBAAAA,EAAA,yBAAAA,EAAA,qBAC1B,IAEMC,GADDH,EAASI,WAAW,aAAeJ,EAASI,WAAW,YACvB,GAAAC,OAC5BN,EAASO,iBAAgB,OAAAD,OAAML,GAClCA,EAEAO,EAAgBJ,EAAYK,MAAM,YAEjCC,EAA0CC,EAD7BP,EAAYQ,QAAQ,eAAgB,IACjBC,MAAM,KAAI,GAA1B,GAEvBC,KAAKC,UAAYP,EAAgBA,EAAc,GAAGQ,MAAM,GAAI,GAAKhB,EAASO,iBAC1EO,KAAKG,UAAYP,EAAiBG,MAAM,KAAK,GAC7CC,KAAKI,MAAQR,EAAi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,kBAKAA,GAAA,6BAKAA,GAAA,qCAKAA,GAAA,4BAAAA,GAAA,mCAcIW,KAAK8d,GAAKA,EACV9d,KAAKie,cAAgBA,EACrBje,KAAKke,sBAAwBA,EAC7Ble,KAAK+d,aAAeA,EACpB/d,KAAKge,oBAAsBA,CAC/B,CAAC,OAAA1c,GAAAuc,EAAA,OAAAzf,IAAA,WAAAa,MAED,SAAgBsF,GACZ,OAAO,IAAIsZ,EACPtZ,EAAK0U,QACL1U,EAAK4Z,aACL5Z,EAAK6Z,oBACL7Z,EAAK8Z,cACL9Z,EAAK+Z,sBAEb,IAAC,CA7Ca,GAoFZ/E,GAAwB,WAM1B,SAAAA,EAAY1B,GAAuBzY,GAAA,KAAAma,GALnCla,GAAA,6BAMIW,KAAK6X,cAAgBA,CACzB,CAAC,OAAAvW,GAAAiY,EAAA,OAAAnb,IAAA,WAAAa,MAED,SAAgBsF,GACZ,OAAO,IAAIgV,EAAyBhV,EAAKyT,cAC7C,IAAC,CAZyB","sources":["webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/./src/internal/kinesis.ts","webpack://k6-jslib-aws/./src/internal/client.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/crypto\");","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/html\");","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/http\");","import http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\n\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { JSONObject } from './json'\nimport { HTTPHeaders } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\nThis API is based on\nhttps://docs.aws.amazon.com/kinesis/latest/APIReference/API_Operations.html\n*/\n\n/**\n * Allows interacting with the Kinesis API.\n */\nexport class KinesisClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n private readonly serviceVersion: string\n\n /**\n * A constructor function that creates a new instance of the Kinesis class.\n * @param {AWSConfig} awsConfig - AWSConfig - This is the configuration object that is passed to\n * the constructor.\n * @returns A Proxy object.\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'kinesis')\n\n this.serviceVersion = 'Kinesis_20131202'\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: false,\n applyChecksum: true,\n })\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Creates a new Kinesis stream with the specified name and options.\n *\n * @param {string} streamName - The name of the stream to create.\n * @param {{\n * shardCount?: number;\n * streamModeDetails?: {\n * streamMode: StreamMode;\n * };\n * }} [options={}] - An optional object containing configuration options for the stream.\n * @param {number} [options.shardCount] - The number of shards for the stream. If not provided, the default value will be used.\n * @param {{streamMode: StreamMode}} [options.streamModeDetails] - An optional object containing the stream mode details.\n * @param {StreamMode} [options.streamModeDetails.streamMode] - The mode of the stream. If not provided, the default mode will be used.\n *\n * @throws {Error} Throws an error if the stream creation request fails.\n * @returns {void}\n */\n async createStream(\n streamName: string,\n options: { shardCount?: number; streamModeDetails?: { streamMode: StreamMode } } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(options.shardCount && { ShardCount: options.shardCount }),\n ...(options.streamModeDetails && { StreamMode: options.streamModeDetails.streamMode }),\n }\n\n await this._send_request('CreateStream', body)\n }\n\n /**\n * Deletes a Kinesis stream with the specified parameters.\n *\n * @param {string} streamName - The name of the stream to delete.\n * @param {{\n * streamARN?: string;\n * enforceConsumerDeletion?: boolean;\n * }} [parameters={}] - An optional object containing configuration options for the stream deletion.\n * @param {string} [parameters.streamARN] - The Amazon Resource Name (ARN) of the stream. If not provided, the ARN will be derived from the stream name.\n * @param {boolean} [parameters.enforceConsumerDeletion] - Whether to enforce the deletion of all registered consumers before deleting the stream. Defaults to false.\n *\n * @throws {Error} Throws an error if the stream deletion request fails.\n * @returns {void}\n */\n async deleteStream(\n streamName: string,\n parameters: { streamARN?: string; enforceConsumerDeletion?: boolean } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n ...(parameters.enforceConsumerDeletion && {\n EnforceConsumerDeletion: parameters.enforceConsumerDeletion,\n }),\n }\n\n await this._send_request('DeleteStream', body)\n }\n\n /**\n * Returns a list of Kinesis streams with the specified parameters.\n *\n * @param {{\n * exclusiveStartStreamName?: string;\n * limit?: number;\n * nextToken?: string;\n * }} [parameters={}] - An optional object containing configuration options for listing the streams.\n * @param {string} [parameters.exclusiveStartStreamName] - The name of the stream to start listing from. If not provided, the listing starts from the beginning.\n * @param {number} [parameters.limit] - The maximum number of streams to list. If not provided, the default value will be used.\n * @param {string} [parameters.nextToken] - A token to paginate the list of streams. If not provided, the first page will be returned.\n *\n * @throws {Error} Throws an error if the list streams request fails.\n * @returns {Partial} A partial of the ListStreamsResponse class.\n */\n async listStreams(\n parameters: {\n exclusiveStartStreamName?: string\n limit?: number\n nextToken?: string\n } = {}\n ): Promise {\n const body = {\n ...(parameters.exclusiveStartStreamName && {\n ExclusiveStartStreamName: parameters.exclusiveStartStreamName,\n }),\n ...(parameters.limit && { Limit: parameters.limit }),\n ...(parameters.nextToken && { NextToken: parameters.nextToken }),\n }\n\n const res = await this._send_request('ListStreams', body)\n return ListStreamsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Sends multiple records to a Kinesis stream in a single request.\n *\n * @param {string} streamName - The name of the stream to put records into.\n * @param {PutRecordsRequestEntry[]} records - An array of records to put into the stream.\n *\n * @throws {Error} Throws an error if the put records request fails.\n * @returns {Partial} A partial of the PutRecordsResponse class.\n */\n async putRecords(\n records: PutRecordsRequestEntry[],\n parameters: { streamName?: string; streamARN?: string } = {}\n ): Promise {\n if (!parameters.streamName && !parameters.streamARN) {\n throw new Error('Either streamName or streamARN must be provided')\n }\n\n const body = {\n Records: records,\n ...(parameters.streamName && { StreamName: parameters.streamName }),\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n }\n\n const res = await this._send_request('PutRecords', body)\n return PutRecordsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Retrieves records from a Kinesis stream.\n *\n * @param {string} shardIterator - The shard iterator to start retrieving records from.\n * @param {number} [limit] - The maximum number of records to return. If not provided, the default value will be used.\n *\n * @throws {Error} Throws an error if the get records request fails.\n * @returns {Partial} A partial of the GetRecordsResponse class.\n */\n async getRecords(\n shardIterator: string,\n parameters: { limit?: number; streamARN?: string } = {}\n ): Promise {\n const body = {\n ShardIterator: shardIterator,\n ...(parameters.limit && { Limit: parameters.limit }),\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n }\n\n const res = await this._send_request('GetRecords', body)\n return GetRecordsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Lists the shards in a Kinesis stream.\n *\n * @param {string} streamName - The name of the stream to list shards from.\n * @param {{\n * nextToken?: string;\n * maxResults?: number;\n * }} [parameters={}] - An optional object containing configuration options for listing shards.\n * @param {string} [parameters.nextToken] - A token to specify where to start paginating the shard list. If not provided, the first page will be returned.\n * @param {number} [parameters.maxResults] - The maximum number of shards to return. If not provided, the default value will be used.\n *\n * @throws {Error} Throws an error if the list shards request fails.\n * @returns {ListShardsResponse} A ListShardsResponse class instance.\n */\n async listShards(\n streamName: string,\n parameters: { nextToken?: string; maxResults?: number } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(parameters.nextToken && { NextToken: parameters.nextToken }),\n ...(parameters.maxResults && {\n MaxResults: parameters.maxResults,\n }),\n }\n\n const res = await this._send_request('ListShards', body)\n return ListShardsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Retrieves a shard iterator for the specified shard in a Kinesis stream.\n *\n * @param {string} streamName - The name of the stream.\n * @param {string} shardId - The shard ID for which to get the iterator.\n * @param {string} shardIteratorType - The shard iterator type. One of 'AT_SEQUENCE_NUMBER', 'AFTER_SEQUENCE_NUMBER', 'TRIM_HORIZON', 'LATEST', or 'AT_TIMESTAMP'.\n * @param {{\n * startingSequenceNumber?: string;\n * timestamp?: number;\n * }} [parameters={}] - An optional object containing configuration options for the shard iterator.\n * @param {string} [parameters.startingSequenceNumber] - The sequence number to start with when using 'AT_SEQUENCE_NUMBER' or 'AFTER_SEQUENCE_NUMBER' iterator types.\n * @param {number} [parameters.timestamp] - The timestamp to start with when using the 'AT_TIMESTAMP' iterator type.\n *\n * @throws {Error} Throws an error if the get shard iterator request fails.\n * @returns {string} The next position in the shard from which to start sequentially reading data records. If set to null, the shard has been closed and the requested iterator does not return any more data.\n */\n async getShardIterator(\n streamName: string,\n shardId: string,\n shardIteratorType: ShardIteratorKind,\n parameters: { startingSequenceNumber?: string; timestamp?: number } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ShardId: shardId,\n ShardIteratorType: shardIteratorType,\n ...(parameters.startingSequenceNumber && {\n StartingSequenceNumber: parameters.startingSequenceNumber,\n }),\n ...(parameters.timestamp && { Timestamp: parameters.timestamp }),\n }\n\n const res = await this._send_request('GetShardIterator', body)\n return GetShardIteratorResponse.fromJson(res?.json() as JSONObject)\n }\n\n private async _send_request(\n action: string,\n body: unknown\n ): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceVersion}.${action}`,\n },\n body: JSON.stringify(body),\n },\n {}\n )\n\n const res = await http.asyncRequest('POST', signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n\n this._handle_error(action, res)\n return res\n }\n\n /**\n * If the response is an error, throw an error\n *\n * @param {string} operation - The name of the operation that was called.\n * @param response - RefinedResponse\n * @returns The response is being returned.\n */\n _handle_error(operation: string, response: RefinedResponse) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new KinesisServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new KinesisServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/* `KinesisServiceError` is a subclass of `AWSError` that adds an `operation` property */\nexport class KinesisServiceError extends AWSError {\n operation: string\n\n /**\n * Constructs a KinesisServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: string) {\n super(message, code)\n this.name = 'KinesisServiceError'\n this.operation = operation\n }\n}\n\n/**\n * Describes the options for a Kinesis stream.\n */\ntype StreamMode = 'PROVISIONED' | 'ON_DEMAND'\n\n/**\n * Determines how the shard iterator is used to start reading data records from the shard.\n */\nexport type ShardIteratorKind =\n | 'AT_SEQUENCE_NUMBER'\n | 'AFTER_SEQUENCE_NUMBER'\n | 'TRIM_HORIZON'\n | 'LATEST'\n | 'AT_TIMESTAMP'\n\n/**\n * Describes the status of a Kinesis data stream.\n */\nexport type StreamStatus = 'CREATING' | 'DELETING' | 'ACTIVE' | 'UPDATING'\n\nexport type StreamModeDetails = {\n /**\n * Specifies the capacity mode to which you want to set your data stream.\n */\n SteamMode: 'PROVISIONED' | 'ON_DEMAND'\n}\n\nexport class ListStreamsResponse {\n /**\n * Indicates whether there are more streams available to list.\n */\n hasMoreStreams: boolean\n\n /**\n * The token that identifies which batch of results you can retrieve.\n */\n nextToken?: string\n\n /**\n * The names of the streams that are associated with the AWS account making the ListStreams request.\n */\n streamNames: string[]\n\n /**\n * A list of StreamSummary objects.\n */\n streamSummaries: StreamSummary[]\n\n constructor(\n HasMoreStreams: boolean,\n NextToken: string,\n StreamNames: string[],\n StreamSummaries: StreamSummary[]\n ) {\n this.hasMoreStreams = HasMoreStreams\n this.nextToken = NextToken\n this.streamNames = StreamNames\n this.streamSummaries = StreamSummaries\n }\n\n static fromJson(result: JSONObject): ListStreamsResponse {\n const {\n HasMoreStreams = false,\n NextToken = '',\n StreamNames = [],\n StreamSummaries = [],\n } = result\n\n return new ListStreamsResponse(\n HasMoreStreams as boolean,\n NextToken as string,\n StreamNames as string[],\n (StreamSummaries as JSONObject[])?.map(StreamSummary.fromJson) as StreamSummary[]\n )\n }\n}\n\n/**\n * Summarizes a Stream\n */\nexport class StreamSummary {\n /**\n * The Amazon Resource Name (ARN) for the stream.\n */\n streamARN: string\n\n /**\n * The time at which the stream was created.\n */\n streamCreationTimestamp: number\n\n /**\n * Specify the capacity mode to which you want to set your data stream.\n */\n streamModeDetails: StreamModeDetails\n\n /**\n * The name of the stream.\n */\n streamName: string\n\n /**\n * The current status of the stream being described.\n */\n streamStatus: StreamStatus\n\n constructor(\n StreamARN: string,\n StreamCreationTimestamp: number,\n StreamMode: StreamModeDetails,\n StreamName: string,\n StreamStatus: StreamStatus\n ) {\n this.streamARN = StreamARN\n this.streamCreationTimestamp = StreamCreationTimestamp\n this.streamModeDetails = StreamMode\n this.streamName = StreamName\n this.streamStatus = StreamStatus\n }\n\n static fromJson(summary: JSONObject): StreamSummary {\n const {\n StreamARN = '',\n StreamCreationTimestamp = 0,\n StreamModeDetails = {},\n StreamName = '',\n StreamStatus = '',\n } = summary\n\n return new StreamSummary(\n StreamARN as string,\n StreamCreationTimestamp as number,\n StreamModeDetails as StreamModeDetails,\n StreamName as string,\n StreamStatus as StreamStatus\n )\n }\n}\n\n/**\n * Represents the output for PutRecords.\n */\nexport interface PutRecordsRequestEntry {\n /**\n * The data blob to put into the record, which is base64-encoded when the blob is serialized.\n */\n Data: string | ArrayBuffer\n\n /**\n * Determines which share in the stream the data record is assigned to.\n */\n PartitionKey: string\n}\n\n// Response class for PutRecords API\nexport class PutRecordsResponse {\n /**\n * The encryption type used on the records. This parameter can be one of the following values:\n * - NONE: Do not encrypt the records.\n * - KMS: Use server-side encryption on the records using a customer-managed AWS KMS key.\n */\n encryptionType: EncryptionType\n\n /**\n * The number of unsuccessfully processed records in a PutRecords request.\n */\n failedRecordCount: number\n\n /**\n * An array of successfully and unsuccessfully processed record results.\n */\n records: PutRecordsResultEntry[]\n\n constructor(\n encryptionType: 'NONE' | 'KMS',\n failedRecordCount: number,\n records: PutRecordsResultEntry[]\n ) {\n this.encryptionType = encryptionType\n this.failedRecordCount = failedRecordCount\n this.records = records\n }\n\n static fromJson(json: JSONObject): PutRecordsResponse {\n const { EncryptionType = 'NONE', FailedRecordCount = 0, Records = [] } = json\n const records = (Records as JSONObject[]).map(PutRecordsResultEntry.fromJson)\n\n return new PutRecordsResponse(\n EncryptionType as EncryptionType,\n FailedRecordCount as number,\n records\n )\n }\n}\n\ntype EncryptionType = 'NONE' | 'KMS'\n\n/**\n * Represents the result of an individual record from a PutRecords request.\n */\nexport class PutRecordsResultEntry {\n /**\n * The sequence number for an individual record result.\n */\n sequenceNumber: string\n\n /**\n * The shard ID for an individual record result.\n */\n shardId: string\n\n constructor(sequenceNumber: string, shardId: string) {\n this.sequenceNumber = sequenceNumber\n this.shardId = shardId\n }\n\n static fromJson(json: JSONObject): PutRecordsResultEntry {\n return new PutRecordsResultEntry(json.SequenceNumber as string, json.ShardId as string)\n }\n}\n\n/**\n * Represents the response format of the GetRecords operation.\n */\nexport class GetRecordsResponse {\n /**\n * The next position in the shard from which to start sequentially reading data records.\n */\n nextShardIterator: string\n\n /**\n * The data records retrieved from the shard.\n */\n records: Record[]\n\n /**\n * The number of milliseconds the GetRecords response is from the\n * tip of the stream, indicating how far behind current time the\n * consumer is.\n *\n * A value of zero indicates that record processing is caught\n * up, and there are no new records to process at this moment.\n */\n millisBehindLatest: number\n\n constructor(nextShardIterator: string, records: Record[], millisBehindLatest: number) {\n this.nextShardIterator = nextShardIterator\n this.records = records\n this.millisBehindLatest = millisBehindLatest\n }\n\n static fromJson(json: JSONObject): GetRecordsResponse {\n const { NextShardIterator = '', Records = [], MillisBehindLatest = 0 } = json\n const records = (Records as JSONObject[]).map(Record.fromJson)\n\n return new GetRecordsResponse(\n NextShardIterator as string,\n records as Record[],\n MillisBehindLatest as number\n )\n }\n}\n\n/**\n * The unit of data of the Kinesis data stream, which is composed of a sequence\n * number, a partition key, and a data blob.\n */\nclass Record {\n /**\n * The data blob.\n */\n data: string | ArrayBuffer\n\n /**\n * Identifies which shard in the stream the data record is assigned to.\n */\n partitionKey: string\n\n /**\n * The unique identifier of the record in the stream.\n */\n sequenceNumber: string\n\n constructor(data: string | ArrayBuffer, partitionKey: string, sequenceNumber: string) {\n this.data = data\n this.partitionKey = partitionKey\n this.sequenceNumber = sequenceNumber\n }\n\n static fromJson(json: JSONObject): Record {\n return new Record(\n json.Data as string | ArrayBuffer,\n json.PartitionKey as string,\n json.SequenceNumber as string\n )\n }\n}\n\n// Response class for ListShards API\nexport class ListShardsResponse {\n /**\n * An array of JSON objects.\n *\n * Each object represents one shard and specifies the IDs of the shard, the\n * shard's parent, and the shard that's adjacent to the shard's parent.\n */\n shards: Shard[]\n\n /**\n * When the number of shards in the data stream is greater than the\n * default value for the MaxResults parameter, or if you explicitly specify\n * a value for MaxResults that is less than the number of shards in the data\n * stream, the response includes a pagination token named NextToken.\n */\n nextToken?: string\n\n constructor(shards: Shard[], nextToken?: string) {\n this.shards = shards\n this.nextToken = nextToken\n }\n\n static fromJson(json: JSONObject): ListShardsResponse {\n const { Shards = [], NextToken } = json\n const shards = (Shards as JSONObject[]).map(Shard.fromJson)\n\n return new ListShardsResponse(shards, NextToken as string | undefined)\n }\n}\n\n/**\n * A uniquely identified group of data records in a Kinesis data stream.\n */\nexport class Shard {\n /**\n * The unique identifier of the shard within the stream.\n */\n id: string\n\n /**\n * The shard ID of the shard's parent.\n */\n parentShardId?: string\n\n /**\n * The shard ID of the shard adjacent to the shard's parent.\n */\n adjacentParentShardId?: string\n\n /**\n * The range of possible hash key values for the shard, which is a set of ordered contiguous positive integers.\n */\n hashKeyRange: HashKeyRange\n\n sequenceNumberRange: SequenceNumberRange\n\n constructor(\n id: string,\n hashKeyRange: HashKeyRange,\n sequenceNumberRange: SequenceNumberRange,\n parentShardId?: string,\n adjacentParentShardId?: string\n ) {\n this.id = id\n this.parentShardId = parentShardId\n this.adjacentParentShardId = adjacentParentShardId\n this.hashKeyRange = hashKeyRange\n this.sequenceNumberRange = sequenceNumberRange\n }\n\n static fromJson(json: JSONObject): Shard {\n return new Shard(\n json.ShardId as string,\n json.HashKeyRange as unknown as HashKeyRange,\n json.SequenceNumberRange as unknown as SequenceNumberRange,\n json.ParentShardId as string | undefined,\n json.AdjacentParentShardId as string | undefined\n )\n }\n}\n\n/**\n * Describes the range of possible hash key values for the shard, which is\n * a set of ordered contiguous positive integers.\n */\nexport interface HashKeyRange {\n /**\n * The starting hash key of the hash key range.\n */\n startingHashKey: string\n\n /**\n * The ending hash key of the hash key range.\n */\n endingHashKey: string\n}\n\n/**\n * The range of possible sequence numbers for the shard.\n */\nexport interface SequenceNumberRange {\n /**\n * The ending sequence number for the range.\n *\n * Shards that are in the OPEN state have an ending sequence number of null.\n */\n endingSequenceNumber?: string\n\n /**\n * The starting sequence number for the range.\n */\n startingSequenceNumber: string\n}\n\n/**\n * Describes a shard iterator response.\n */\nclass GetShardIteratorResponse {\n /**\n * The position in the shard from which to start reading data records sequentially.\n */\n shardIterator: string\n\n constructor(shardIterator: string) {\n this.shardIterator = shardIterator\n }\n\n static fromJson(json: JSONObject): GetShardIteratorResponse {\n return new GetShardIteratorResponse(json.ShardIterator as string)\n }\n}\n","import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Endpoint","endpoint","_classCallCheck","_defineProperty","completeUrl","startsWith","concat","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","this","_protocol","slice","_hostname","_port","parseInt","undefined","href","set","_value$split2","hostname","port","protocol","host","AWSConfig","options","region","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","require","AMZ_DATE_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","_i","_Object$keys","keys","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","soughtHeader","hasHeader","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","_regeneratorRuntime","t","r","i","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","_asyncToGenerator","fn","self","args","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","KinesisClient","_AWSClient","awsConfig","serviceVersion","serviceName","commonHeaders","_createStream","_callee","streamName","_args","_context","StreamName","shardCount","ShardCount","streamModeDetails","StreamMode","streamMode","_send_request","_x","_deleteStream","_callee2","parameters","_args2","_context2","streamARN","StreamARN","enforceConsumerDeletion","EnforceConsumerDeletion","_x2","_listStreams","_callee3","res","_args3","_context3","exclusiveStartStreamName","ExclusiveStartStreamName","limit","Limit","nextToken","NextToken","ListStreamsResponse","fromJson","_putRecords","_callee4","records","_args4","_context4","Records","PutRecordsResponse","_x3","_getRecords","_callee5","shardIterator","_args5","_context5","ShardIterator","GetRecordsResponse","_x4","_listShards","_callee6","_args6","_context6","maxResults","MaxResults","ListShardsResponse","_x5","_getShardIterator","_callee7","shardId","shardIteratorType","_args7","_context7","ShardId","ShardIteratorType","startingSequenceNumber","StartingSequenceNumber","timestamp","Timestamp","GetShardIteratorResponse","_x6","_x7","_x8","_send_request2","_callee8","action","signedRequest","_context8","sign","http","_handle_error","_x9","_x10","operation","errorCode","error_code","errorMessage","KinesisServiceError","AWSClient","_endpoint","_this2","HasMoreStreams","StreamNames","StreamSummaries","hasMoreStreams","streamNames","streamSummaries","result","_result$HasMoreStream","_result$NextToken","_result$StreamNames","_result$StreamSummari","StreamSummary","StreamCreationTimestamp","StreamStatus","streamCreationTimestamp","streamStatus","summary","_summary$StreamARN","_summary$StreamCreati","_summary$StreamModeDe","StreamModeDetails","_summary$StreamName","_summary$StreamStatus","encryptionType","failedRecordCount","_json$EncryptionType","EncryptionType","_json$FailedRecordCou","FailedRecordCount","_json$Records","PutRecordsResultEntry","sequenceNumber","SequenceNumber","nextShardIterator","millisBehindLatest","_json$NextShardIterat","NextShardIterator","_json$Records2","_json$MillisBehindLat","MillisBehindLatest","Record","data","partitionKey","Data","PartitionKey","shards","_json$Shards","Shards","Shard","id","hashKeyRange","sequenceNumberRange","parentShardId","adjacentParentShardId","HashKeyRange","SequenceNumberRange","ParentShardId","AdjacentParentShardId"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"kinesis.js","mappings":";mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,m/DCFvD,IAAMC,EAAQ,WAajB,SAAAA,EAAYC,gGAAkBC,CAAA,KAAAF,GAAAG,EAAA,yBAAAA,EAAA,yBAAAA,EAAA,qBAC1B,IAEMC,GADDH,EAASI,WAAW,aAAeJ,EAASI,WAAW,YACvB,GAAAC,OAC5BN,EAASO,iBAAgB,OAAAD,OAAML,GAClCA,EAEAO,EAAgBJ,EAAYK,MAAM,YAEjCC,EAA0CC,EAD7BP,EAAYQ,QAAQ,eAAgB,IACjBC,MAAM,KAAI,GAA1B,GAEvBC,KAAKC,UAAYP,EA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,EAC1C,IAAC,CA3B0B,GAiClB6G,GAAK,WAuBd,SAAAA,EACIC,EACAC,EACAC,EACAC,EACAC,GACF9e,GAAA,KAAAye,GA5BFxe,GAAA,kBAKAA,GAAA,6BAKAA,GAAA,qCAKAA,GAAA,4BAAAA,GAAA,mCAcIW,KAAK8d,GAAKA,EACV9d,KAAKie,cAAgBA,EACrBje,KAAKke,sBAAwBA,EAC7Ble,KAAK+d,aAAeA,EACpB/d,KAAKge,oBAAsBA,CAC/B,CAAC,OAAA1c,GAAAuc,EAAA,OAAAzf,IAAA,WAAAa,MAED,SAAgBsF,GACZ,OAAO,IAAIsZ,EACPtZ,EAAK0U,QACL1U,EAAK4Z,aACL5Z,EAAK6Z,oBACL7Z,EAAK8Z,cACL9Z,EAAK+Z,sBAEb,IAAC,CA7Ca,GAoFZ/E,GAAwB,WAM1B,SAAAA,EAAY1B,GAAuBzY,GAAA,KAAAma,GALnCla,GAAA,6BAMIW,KAAK6X,cAAgBA,CACzB,CAAC,OAAAvW,GAAAiY,EAAA,OAAAnb,IAAA,WAAAa,MAED,SAAgBsF,GACZ,OAAO,IAAIgV,EAAyBhV,EAAKyT,cAC7C,IAAC,CAZyB","sources":["webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/./src/internal/kinesis.ts","webpack://k6-jslib-aws/./src/internal/client.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/crypto\");","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/html\");","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n\nexport class NetworkError extends Error {\n code: number;\n\n constructor(message: string, code: number) {\n super(message)\n this.name = 'NetworkError'\n this.code = code\n }\n}","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/http\");","import http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\n\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { JSONObject } from './json'\nimport { HTTPHeaders } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\nThis API is based on\nhttps://docs.aws.amazon.com/kinesis/latest/APIReference/API_Operations.html\n*/\n\n/**\n * Allows interacting with the Kinesis API.\n */\nexport class KinesisClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n private readonly serviceVersion: string\n\n /**\n * A constructor function that creates a new instance of the Kinesis class.\n * @param {AWSConfig} awsConfig - AWSConfig - This is the configuration object that is passed to\n * the constructor.\n * @returns A Proxy object.\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'kinesis')\n\n this.serviceVersion = 'Kinesis_20131202'\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: false,\n applyChecksum: true,\n })\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Creates a new Kinesis stream with the specified name and options.\n *\n * @param {string} streamName - The name of the stream to create.\n * @param {{\n * shardCount?: number;\n * streamModeDetails?: {\n * streamMode: StreamMode;\n * };\n * }} [options={}] - An optional object containing configuration options for the stream.\n * @param {number} [options.shardCount] - The number of shards for the stream. If not provided, the default value will be used.\n * @param {{streamMode: StreamMode}} [options.streamModeDetails] - An optional object containing the stream mode details.\n * @param {StreamMode} [options.streamModeDetails.streamMode] - The mode of the stream. If not provided, the default mode will be used.\n *\n * @throws {Error} Throws an error if the stream creation request fails.\n * @returns {void}\n */\n async createStream(\n streamName: string,\n options: { shardCount?: number; streamModeDetails?: { streamMode: StreamMode } } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(options.shardCount && { ShardCount: options.shardCount }),\n ...(options.streamModeDetails && { StreamMode: options.streamModeDetails.streamMode }),\n }\n\n await this._send_request('CreateStream', body)\n }\n\n /**\n * Deletes a Kinesis stream with the specified parameters.\n *\n * @param {string} streamName - The name of the stream to delete.\n * @param {{\n * streamARN?: string;\n * enforceConsumerDeletion?: boolean;\n * }} [parameters={}] - An optional object containing configuration options for the stream deletion.\n * @param {string} [parameters.streamARN] - The Amazon Resource Name (ARN) of the stream. If not provided, the ARN will be derived from the stream name.\n * @param {boolean} [parameters.enforceConsumerDeletion] - Whether to enforce the deletion of all registered consumers before deleting the stream. Defaults to false.\n *\n * @throws {Error} Throws an error if the stream deletion request fails.\n * @returns {void}\n */\n async deleteStream(\n streamName: string,\n parameters: { streamARN?: string; enforceConsumerDeletion?: boolean } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n ...(parameters.enforceConsumerDeletion && {\n EnforceConsumerDeletion: parameters.enforceConsumerDeletion,\n }),\n }\n\n await this._send_request('DeleteStream', body)\n }\n\n /**\n * Returns a list of Kinesis streams with the specified parameters.\n *\n * @param {{\n * exclusiveStartStreamName?: string;\n * limit?: number;\n * nextToken?: string;\n * }} [parameters={}] - An optional object containing configuration options for listing the streams.\n * @param {string} [parameters.exclusiveStartStreamName] - The name of the stream to start listing from. If not provided, the listing starts from the beginning.\n * @param {number} [parameters.limit] - The maximum number of streams to list. If not provided, the default value will be used.\n * @param {string} [parameters.nextToken] - A token to paginate the list of streams. If not provided, the first page will be returned.\n *\n * @throws {Error} Throws an error if the list streams request fails.\n * @returns {Partial} A partial of the ListStreamsResponse class.\n */\n async listStreams(\n parameters: {\n exclusiveStartStreamName?: string\n limit?: number\n nextToken?: string\n } = {}\n ): Promise {\n const body = {\n ...(parameters.exclusiveStartStreamName && {\n ExclusiveStartStreamName: parameters.exclusiveStartStreamName,\n }),\n ...(parameters.limit && { Limit: parameters.limit }),\n ...(parameters.nextToken && { NextToken: parameters.nextToken }),\n }\n\n const res = await this._send_request('ListStreams', body)\n return ListStreamsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Sends multiple records to a Kinesis stream in a single request.\n *\n * @param {string} streamName - The name of the stream to put records into.\n * @param {PutRecordsRequestEntry[]} records - An array of records to put into the stream.\n *\n * @throws {Error} Throws an error if the put records request fails.\n * @returns {Partial} A partial of the PutRecordsResponse class.\n */\n async putRecords(\n records: PutRecordsRequestEntry[],\n parameters: { streamName?: string; streamARN?: string } = {}\n ): Promise {\n if (!parameters.streamName && !parameters.streamARN) {\n throw new Error('Either streamName or streamARN must be provided')\n }\n\n const body = {\n Records: records,\n ...(parameters.streamName && { StreamName: parameters.streamName }),\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n }\n\n const res = await this._send_request('PutRecords', body)\n return PutRecordsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Retrieves records from a Kinesis stream.\n *\n * @param {string} shardIterator - The shard iterator to start retrieving records from.\n * @param {number} [limit] - The maximum number of records to return. If not provided, the default value will be used.\n *\n * @throws {Error} Throws an error if the get records request fails.\n * @returns {Partial} A partial of the GetRecordsResponse class.\n */\n async getRecords(\n shardIterator: string,\n parameters: { limit?: number; streamARN?: string } = {}\n ): Promise {\n const body = {\n ShardIterator: shardIterator,\n ...(parameters.limit && { Limit: parameters.limit }),\n ...(parameters.streamARN && { StreamARN: parameters.streamARN }),\n }\n\n const res = await this._send_request('GetRecords', body)\n return GetRecordsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Lists the shards in a Kinesis stream.\n *\n * @param {string} streamName - The name of the stream to list shards from.\n * @param {{\n * nextToken?: string;\n * maxResults?: number;\n * }} [parameters={}] - An optional object containing configuration options for listing shards.\n * @param {string} [parameters.nextToken] - A token to specify where to start paginating the shard list. If not provided, the first page will be returned.\n * @param {number} [parameters.maxResults] - The maximum number of shards to return. If not provided, the default value will be used.\n *\n * @throws {Error} Throws an error if the list shards request fails.\n * @returns {ListShardsResponse} A ListShardsResponse class instance.\n */\n async listShards(\n streamName: string,\n parameters: { nextToken?: string; maxResults?: number } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ...(parameters.nextToken && { NextToken: parameters.nextToken }),\n ...(parameters.maxResults && {\n MaxResults: parameters.maxResults,\n }),\n }\n\n const res = await this._send_request('ListShards', body)\n return ListShardsResponse.fromJson(res?.json() as JSONObject)\n }\n\n /**\n * Retrieves a shard iterator for the specified shard in a Kinesis stream.\n *\n * @param {string} streamName - The name of the stream.\n * @param {string} shardId - The shard ID for which to get the iterator.\n * @param {string} shardIteratorType - The shard iterator type. One of 'AT_SEQUENCE_NUMBER', 'AFTER_SEQUENCE_NUMBER', 'TRIM_HORIZON', 'LATEST', or 'AT_TIMESTAMP'.\n * @param {{\n * startingSequenceNumber?: string;\n * timestamp?: number;\n * }} [parameters={}] - An optional object containing configuration options for the shard iterator.\n * @param {string} [parameters.startingSequenceNumber] - The sequence number to start with when using 'AT_SEQUENCE_NUMBER' or 'AFTER_SEQUENCE_NUMBER' iterator types.\n * @param {number} [parameters.timestamp] - The timestamp to start with when using the 'AT_TIMESTAMP' iterator type.\n *\n * @throws {Error} Throws an error if the get shard iterator request fails.\n * @returns {string} The next position in the shard from which to start sequentially reading data records. If set to null, the shard has been closed and the requested iterator does not return any more data.\n */\n async getShardIterator(\n streamName: string,\n shardId: string,\n shardIteratorType: ShardIteratorKind,\n parameters: { startingSequenceNumber?: string; timestamp?: number } = {}\n ): Promise {\n const body = {\n StreamName: streamName,\n ShardId: shardId,\n ShardIteratorType: shardIteratorType,\n ...(parameters.startingSequenceNumber && {\n StartingSequenceNumber: parameters.startingSequenceNumber,\n }),\n ...(parameters.timestamp && { Timestamp: parameters.timestamp }),\n }\n\n const res = await this._send_request('GetShardIterator', body)\n return GetShardIteratorResponse.fromJson(res?.json() as JSONObject)\n }\n\n private async _send_request(\n action: string,\n body: unknown\n ): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceVersion}.${action}`,\n },\n body: JSON.stringify(body),\n },\n {}\n )\n\n const res = await http.asyncRequest('POST', signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n\n this._handle_error(action, res)\n return res\n }\n\n /**\n * If the response is an error, throw an error\n *\n * @param {string} operation - The name of the operation that was called.\n * @param response - RefinedResponse\n * @returns The response is being returned.\n */\n _handle_error(operation: string, response: RefinedResponse) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new KinesisServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new KinesisServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/* `KinesisServiceError` is a subclass of `AWSError` that adds an `operation` property */\nexport class KinesisServiceError extends AWSError {\n operation: string\n\n /**\n * Constructs a KinesisServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: string) {\n super(message, code)\n this.name = 'KinesisServiceError'\n this.operation = operation\n }\n}\n\n/**\n * Describes the options for a Kinesis stream.\n */\ntype StreamMode = 'PROVISIONED' | 'ON_DEMAND'\n\n/**\n * Determines how the shard iterator is used to start reading data records from the shard.\n */\nexport type ShardIteratorKind =\n | 'AT_SEQUENCE_NUMBER'\n | 'AFTER_SEQUENCE_NUMBER'\n | 'TRIM_HORIZON'\n | 'LATEST'\n | 'AT_TIMESTAMP'\n\n/**\n * Describes the status of a Kinesis data stream.\n */\nexport type StreamStatus = 'CREATING' | 'DELETING' | 'ACTIVE' | 'UPDATING'\n\nexport type StreamModeDetails = {\n /**\n * Specifies the capacity mode to which you want to set your data stream.\n */\n SteamMode: 'PROVISIONED' | 'ON_DEMAND'\n}\n\nexport class ListStreamsResponse {\n /**\n * Indicates whether there are more streams available to list.\n */\n hasMoreStreams: boolean\n\n /**\n * The token that identifies which batch of results you can retrieve.\n */\n nextToken?: string\n\n /**\n * The names of the streams that are associated with the AWS account making the ListStreams request.\n */\n streamNames: string[]\n\n /**\n * A list of StreamSummary objects.\n */\n streamSummaries: StreamSummary[]\n\n constructor(\n HasMoreStreams: boolean,\n NextToken: string,\n StreamNames: string[],\n StreamSummaries: StreamSummary[]\n ) {\n this.hasMoreStreams = HasMoreStreams\n this.nextToken = NextToken\n this.streamNames = StreamNames\n this.streamSummaries = StreamSummaries\n }\n\n static fromJson(result: JSONObject): ListStreamsResponse {\n const {\n HasMoreStreams = false,\n NextToken = '',\n StreamNames = [],\n StreamSummaries = [],\n } = result\n\n return new ListStreamsResponse(\n HasMoreStreams as boolean,\n NextToken as string,\n StreamNames as string[],\n (StreamSummaries as JSONObject[])?.map(StreamSummary.fromJson) as StreamSummary[]\n )\n }\n}\n\n/**\n * Summarizes a Stream\n */\nexport class StreamSummary {\n /**\n * The Amazon Resource Name (ARN) for the stream.\n */\n streamARN: string\n\n /**\n * The time at which the stream was created.\n */\n streamCreationTimestamp: number\n\n /**\n * Specify the capacity mode to which you want to set your data stream.\n */\n streamModeDetails: StreamModeDetails\n\n /**\n * The name of the stream.\n */\n streamName: string\n\n /**\n * The current status of the stream being described.\n */\n streamStatus: StreamStatus\n\n constructor(\n StreamARN: string,\n StreamCreationTimestamp: number,\n StreamMode: StreamModeDetails,\n StreamName: string,\n StreamStatus: StreamStatus\n ) {\n this.streamARN = StreamARN\n this.streamCreationTimestamp = StreamCreationTimestamp\n this.streamModeDetails = StreamMode\n this.streamName = StreamName\n this.streamStatus = StreamStatus\n }\n\n static fromJson(summary: JSONObject): StreamSummary {\n const {\n StreamARN = '',\n StreamCreationTimestamp = 0,\n StreamModeDetails = {},\n StreamName = '',\n StreamStatus = '',\n } = summary\n\n return new StreamSummary(\n StreamARN as string,\n StreamCreationTimestamp as number,\n StreamModeDetails as StreamModeDetails,\n StreamName as string,\n StreamStatus as StreamStatus\n )\n }\n}\n\n/**\n * Represents the output for PutRecords.\n */\nexport interface PutRecordsRequestEntry {\n /**\n * The data blob to put into the record, which is base64-encoded when the blob is serialized.\n */\n Data: string | ArrayBuffer\n\n /**\n * Determines which share in the stream the data record is assigned to.\n */\n PartitionKey: string\n}\n\n// Response class for PutRecords API\nexport class PutRecordsResponse {\n /**\n * The encryption type used on the records. This parameter can be one of the following values:\n * - NONE: Do not encrypt the records.\n * - KMS: Use server-side encryption on the records using a customer-managed AWS KMS key.\n */\n encryptionType: EncryptionType\n\n /**\n * The number of unsuccessfully processed records in a PutRecords request.\n */\n failedRecordCount: number\n\n /**\n * An array of successfully and unsuccessfully processed record results.\n */\n records: PutRecordsResultEntry[]\n\n constructor(\n encryptionType: 'NONE' | 'KMS',\n failedRecordCount: number,\n records: PutRecordsResultEntry[]\n ) {\n this.encryptionType = encryptionType\n this.failedRecordCount = failedRecordCount\n this.records = records\n }\n\n static fromJson(json: JSONObject): PutRecordsResponse {\n const { EncryptionType = 'NONE', FailedRecordCount = 0, Records = [] } = json\n const records = (Records as JSONObject[]).map(PutRecordsResultEntry.fromJson)\n\n return new PutRecordsResponse(\n EncryptionType as EncryptionType,\n FailedRecordCount as number,\n records\n )\n }\n}\n\ntype EncryptionType = 'NONE' | 'KMS'\n\n/**\n * Represents the result of an individual record from a PutRecords request.\n */\nexport class PutRecordsResultEntry {\n /**\n * The sequence number for an individual record result.\n */\n sequenceNumber: string\n\n /**\n * The shard ID for an individual record result.\n */\n shardId: string\n\n constructor(sequenceNumber: string, shardId: string) {\n this.sequenceNumber = sequenceNumber\n this.shardId = shardId\n }\n\n static fromJson(json: JSONObject): PutRecordsResultEntry {\n return new PutRecordsResultEntry(json.SequenceNumber as string, json.ShardId as string)\n }\n}\n\n/**\n * Represents the response format of the GetRecords operation.\n */\nexport class GetRecordsResponse {\n /**\n * The next position in the shard from which to start sequentially reading data records.\n */\n nextShardIterator: string\n\n /**\n * The data records retrieved from the shard.\n */\n records: Record[]\n\n /**\n * The number of milliseconds the GetRecords response is from the\n * tip of the stream, indicating how far behind current time the\n * consumer is.\n *\n * A value of zero indicates that record processing is caught\n * up, and there are no new records to process at this moment.\n */\n millisBehindLatest: number\n\n constructor(nextShardIterator: string, records: Record[], millisBehindLatest: number) {\n this.nextShardIterator = nextShardIterator\n this.records = records\n this.millisBehindLatest = millisBehindLatest\n }\n\n static fromJson(json: JSONObject): GetRecordsResponse {\n const { NextShardIterator = '', Records = [], MillisBehindLatest = 0 } = json\n const records = (Records as JSONObject[]).map(Record.fromJson)\n\n return new GetRecordsResponse(\n NextShardIterator as string,\n records as Record[],\n MillisBehindLatest as number\n )\n }\n}\n\n/**\n * The unit of data of the Kinesis data stream, which is composed of a sequence\n * number, a partition key, and a data blob.\n */\nclass Record {\n /**\n * The data blob.\n */\n data: string | ArrayBuffer\n\n /**\n * Identifies which shard in the stream the data record is assigned to.\n */\n partitionKey: string\n\n /**\n * The unique identifier of the record in the stream.\n */\n sequenceNumber: string\n\n constructor(data: string | ArrayBuffer, partitionKey: string, sequenceNumber: string) {\n this.data = data\n this.partitionKey = partitionKey\n this.sequenceNumber = sequenceNumber\n }\n\n static fromJson(json: JSONObject): Record {\n return new Record(\n json.Data as string | ArrayBuffer,\n json.PartitionKey as string,\n json.SequenceNumber as string\n )\n }\n}\n\n// Response class for ListShards API\nexport class ListShardsResponse {\n /**\n * An array of JSON objects.\n *\n * Each object represents one shard and specifies the IDs of the shard, the\n * shard's parent, and the shard that's adjacent to the shard's parent.\n */\n shards: Shard[]\n\n /**\n * When the number of shards in the data stream is greater than the\n * default value for the MaxResults parameter, or if you explicitly specify\n * a value for MaxResults that is less than the number of shards in the data\n * stream, the response includes a pagination token named NextToken.\n */\n nextToken?: string\n\n constructor(shards: Shard[], nextToken?: string) {\n this.shards = shards\n this.nextToken = nextToken\n }\n\n static fromJson(json: JSONObject): ListShardsResponse {\n const { Shards = [], NextToken } = json\n const shards = (Shards as JSONObject[]).map(Shard.fromJson)\n\n return new ListShardsResponse(shards, NextToken as string | undefined)\n }\n}\n\n/**\n * A uniquely identified group of data records in a Kinesis data stream.\n */\nexport class Shard {\n /**\n * The unique identifier of the shard within the stream.\n */\n id: string\n\n /**\n * The shard ID of the shard's parent.\n */\n parentShardId?: string\n\n /**\n * The shard ID of the shard adjacent to the shard's parent.\n */\n adjacentParentShardId?: string\n\n /**\n * The range of possible hash key values for the shard, which is a set of ordered contiguous positive integers.\n */\n hashKeyRange: HashKeyRange\n\n sequenceNumberRange: SequenceNumberRange\n\n constructor(\n id: string,\n hashKeyRange: HashKeyRange,\n sequenceNumberRange: SequenceNumberRange,\n parentShardId?: string,\n adjacentParentShardId?: string\n ) {\n this.id = id\n this.parentShardId = parentShardId\n this.adjacentParentShardId = adjacentParentShardId\n this.hashKeyRange = hashKeyRange\n this.sequenceNumberRange = sequenceNumberRange\n }\n\n static fromJson(json: JSONObject): Shard {\n return new Shard(\n json.ShardId as string,\n json.HashKeyRange as unknown as HashKeyRange,\n json.SequenceNumberRange as unknown as SequenceNumberRange,\n json.ParentShardId as string | undefined,\n json.AdjacentParentShardId as string | undefined\n )\n }\n}\n\n/**\n * Describes the range of possible hash key values for the shard, which is\n * a set of ordered contiguous positive integers.\n */\nexport interface HashKeyRange {\n /**\n * The starting hash key of the hash key range.\n */\n startingHashKey: string\n\n /**\n * The ending hash key of the hash key range.\n */\n endingHashKey: string\n}\n\n/**\n * The range of possible sequence numbers for the shard.\n */\nexport interface SequenceNumberRange {\n /**\n * The ending sequence number for the range.\n *\n * Shards that are in the OPEN state have an ending sequence number of null.\n */\n endingSequenceNumber?: string\n\n /**\n * The starting sequence number for the range.\n */\n startingSequenceNumber: string\n}\n\n/**\n * Describes a shard iterator response.\n */\nclass GetShardIteratorResponse {\n /**\n * The position in the shard from which to start reading data records sequentially.\n */\n shardIterator: string\n\n constructor(shardIterator: string) {\n this.shardIterator = shardIterator\n }\n\n static fromJson(json: JSONObject): GetShardIteratorResponse {\n return new GetShardIteratorResponse(json.ShardIterator as string)\n }\n}\n","import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Endpoint","endpoint","_classCallCheck","_defineProperty","completeUrl","startsWith","concat","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","this","_protocol","slice","_hostname","_port","parseInt","undefined","href","set","_value$split2","hostname","port","protocol","host","AWSConfig","options","region","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","require","AMZ_DATE_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","_i","_Object$keys","keys","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","soughtHeader","hasHeader","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","_regeneratorRuntime","t","r","i","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","_asyncToGenerator","fn","self","args","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","KinesisClient","_AWSClient","awsConfig","serviceVersion","serviceName","commonHeaders","_createStream","_callee","streamName","_args","_context","StreamName","shardCount","ShardCount","streamModeDetails","StreamMode","streamMode","_send_request","_x","_deleteStream","_callee2","parameters","_args2","_context2","streamARN","StreamARN","enforceConsumerDeletion","EnforceConsumerDeletion","_x2","_listStreams","_callee3","res","_args3","_context3","exclusiveStartStreamName","ExclusiveStartStreamName","limit","Limit","nextToken","NextToken","ListStreamsResponse","fromJson","_putRecords","_callee4","records","_args4","_context4","Records","PutRecordsResponse","_x3","_getRecords","_callee5","shardIterator","_args5","_context5","ShardIterator","GetRecordsResponse","_x4","_listShards","_callee6","_args6","_context6","maxResults","MaxResults","ListShardsResponse","_x5","_getShardIterator","_callee7","shardId","shardIteratorType","_args7","_context7","ShardId","ShardIteratorType","startingSequenceNumber","StartingSequenceNumber","timestamp","Timestamp","GetShardIteratorResponse","_x6","_x7","_x8","_send_request2","_callee8","action","signedRequest","_context8","sign","http","_handle_error","_x9","_x10","operation","errorCode","error_code","errorMessage","KinesisServiceError","AWSClient","_endpoint","_this2","HasMoreStreams","StreamNames","StreamSummaries","hasMoreStreams","streamNames","streamSummaries","result","_result$HasMoreStream","_result$NextToken","_result$StreamNames","_result$StreamSummari","StreamSummary","StreamCreationTimestamp","StreamStatus","streamCreationTimestamp","streamStatus","summary","_summary$StreamARN","_summary$StreamCreati","_summary$StreamModeDe","StreamModeDetails","_summary$StreamName","_summary$StreamStatus","encryptionType","failedRecordCount","_json$EncryptionType","EncryptionType","_json$FailedRecordCou","FailedRecordCount","_json$Records","PutRecordsResultEntry","sequenceNumber","SequenceNumber","nextShardIterator","millisBehindLatest","_json$NextShardIterat","NextShardIterator","_json$Records2","_json$MillisBehindLat","MillisBehindLatest","Record","data","partitionKey","Data","PartitionKey","shards","_json$Shards","Shards","Shard","id","hashKeyRange","sequenceNumberRange","parentShardId","adjacentParentShardId","HashKeyRange","SequenceNumberRange","ParentShardId","AdjacentParentShardId"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/kms.js b/dist/kms.js index c7e74ba..5757b56 100644 --- a/dist/kms.js +++ b/dist/kms.js @@ -1,3 +1,3 @@ /*! For license information please see kms.js.LICENSE.txt */ -(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rw,InvalidAWSConfigError:()=>O,InvalidSignatureError:()=>ve,KMSClient:()=>De,KMSDataKey:()=>Re,KMSServiceError:()=>He});var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"_protocol",void 0),a(this,"_hostname",void 0),a(this,"_port",void 0);var r=!t.startsWith("http://")&&!t.startsWith("https://")?"".concat(e.DEFAULT_PROTOCOL,"://").concat(t):t,o=r.match(/^https?:/),i=n(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=o?o[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return t=e,(r=[{key:"copy",value:function(){return new e(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(e){var t=n(e.split(":"),2),r=t[0],o=t[1];this._hostname=r,this._port=o?parseInt(o):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(e){this._hostname=e}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(t){var r=t.match(/^https?:/),o=n(t.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=o.split(":")[0],this._port=o.split(":")[1]?parseInt(o.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(e){this._port=e}},{key:"protocol",get:function(){return this._protocol},set:function(e){this._protocol=e}}])&&i(t.prototype,r),o&&i(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}();function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t,r){return t=h(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&y(o,r.prototype),o}(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),y(r,e)},l(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r128)throw new O("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new O("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new u(t.endpoint):this.endpoint=t.endpoint)}return b(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),O=function(e){function t(e){return d(this,t),f(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),b(t)}(l(Error));const S=require("k6/http");var j=e.n(S);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function P(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=se(se({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=me(r.signingDate),o=n.longDate,i=n.shortDate,a=r.signingService||this.service,c=r.signingRegion||this.region,u="".concat(i,"/").concat(c,"/").concat(a,"/").concat(M);e.headers[z]||(e.headers[z]=e.endpoint.hostname);for(var s=0,f=Object.keys(e.headers);s-1&&delete e.headers[l]}e.headers[K]=o,this.credentials.sessionToken&&(e.headers[N]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var p=this.computePayloadHash(e);!function(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=t.signingDate,n=void 0===r?new Date:r,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,c=t.unhoistableHeaders,u=t.signableHeaders,s=t.signingRegion,f=t.signingService,l=me(n),p=l.longDate,y=l.shortDate,h=s||this.region,d=f||this.service;if(i>604800)throw new ve("Signature version 4 presigned URLs can't be valid for more than 7 days");var v="".concat(y,"/").concat(h,"/").concat(d,"/").concat(M),b=this.moveHeadersToQuery(e,{unhoistableHeaders:c});b.headers[z]||(b.headers[z]=e.endpoint.hostname),this.credentials.sessionToken&&(b.query[C]=this.credentials.sessionToken),b.query["X-Amz-Algorithm"]=W,b.query["X-Amz-Credential"]="".concat(this.credentials.accessKeyId,"/").concat(v),b.query[x]=p,b.query["X-Amz-Expires"]=i.toString(10);var m=this.computeCanonicalHeaders(b,a,u);b.query["X-Amz-SignedHeaders"]=Object.keys(m).sort().join(";");var g=this.deriveSigningKey(this.credentials,d,h,y),w=this.computePayloadHash(e),O=this.createCanonicalRequest(b,m,w);b.query[T]=this.calculateSignature(p,v,g,O);var S=b.endpoint.href;return b.path&&(S+=b.path),b.query&&(S+="?".concat(this.serializeQueryParameters(b.query))),se({url:S},b)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=ee().sha256(r,"hex");return"".concat(W,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var o=this.createStringToSign(e,t,n);return ee().hmac("sha256",r,o,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var o=e.secretAccessKey,i=ee().hmac("sha256","AWS4"+o,n,"binary"),a=ee().hmac("sha256",i,r,"binary"),c=ee().hmac("sha256",a,t,"binary");return ee().hmac("sha256",c,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=ae(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],i={},a=function(e){if(e.toLowerCase()===I)return 1;o.push(e);var t=n[e];"string"==typeof t?i[e]="".concat(be(e),"=").concat(be(t)):Array.isArray(t)&&(i[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(be(e),"=").concat(be(r))])}),[]).join("&"))},c=ae(Object.keys(n).sort());try{for(c.s();!(t=c.n()).done;){a(t.value)}}catch(e){c.e(e)}finally{c.f()}return o.map((function(e){return i[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,i={},a=ae(Object.keys(o).sort());try{for(a.s();!(n=a.n()).done;){var c=n.value;if(null!=o[c]){var u=c.toLowerCase();(u in q||null!=t&&t.has(u))&&(!r||r&&!r.has(u))||"string"==typeof o[c]&&(i[u]=o[c]=o[c].trim().replace(/\s+/g," "))}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"computePayloadHash",value:function(e){var t,r=e.headers,n=e.body;return r[L]?r[L]:null==n?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":"string"==typeof n||(t=n,"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)))?ee().sha256(n,"hex").toLowerCase():ArrayBuffer.isView(n)?ee().sha256(n.buffer,"hex").toLowerCase():"UNSIGNED-PAYLOAD"}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Se(e){for(var t=1;t1&&void 0!==i[1]?i[1]:qe.Size256,n=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/",headers:Se(Se({},this.commonHeaders),{},Ke({},D,"TrentService.GenerateDataKey")),body:JSON.stringify({KeyId:t,NumberOfBytes:r})},{}),e.next=4,j().asyncRequest(this.method,n.url,n.body,{headers:n.headers});case 4:return o=e.sent,this._handle_error(ze.GenerateDataKey,o),e.abrupt("return",Re.fromJSON(o.json()));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_handle_error",value:function(e,t){var r=t.error_code;if(0!==r){var n=t.json();if(r>=1400&&r<=1499){var o=n.Message||n.message||n.__type;if("InvalidSignatureException"===n.__type)throw new ve(o,n.__type);throw new He(o,n.__type,e)}if(1500===r)throw new He("An error occured on the server side","InternalServiceError",e)}}}]);var r,n}(A),Ne=function(){function e(t,r){Pe(this,e),Ke(this,"keyArn",void 0),Ke(this,"keyId",void 0),this.keyArn=t,this.keyId=r}return ke(e,null,[{key:"fromJSON",value:function(t){return new e(t.KeyArn,t.KeyId)}}])}(),Re=function(){function e(t,r,n){Pe(this,e),Ke(this,"id",void 0),Ke(this,"ciphertextBlob",void 0),Ke(this,"plaintext",void 0),this.ciphertextBlob=t,this.id=r,this.plaintext=n}return ke(e,null,[{key:"fromJSON",value:function(t){return new e(t.CiphertextBlob,t.KeyId,t.Plaintext)}}])}(),He=function(e){function t(e,r,n){var o;return Pe(this,t),Ke(o=Ae(this,t,[e,r]),"operation",void 0),o.name="KMSServiceError",o.operation=n,o}return Ce(t,e),ke(t)}($),ze=function(e){return e.GenerateDataKey="GenerateDataKey",e.ListKeys="ListKeys",e}(ze||{}),qe=function(e){return e[e.Size256=32]="Size256",e[e.Size512=64]="Size512",e}(qe||{}),Me=exports;for(var We in t)Me[We]=t[We];t.__esModule&&Object.defineProperty(Me,"__esModule",{value:!0})})(); +(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rw,InvalidAWSConfigError:()=>O,InvalidSignatureError:()=>we,KMSClient:()=>ze,KMSDataKey:()=>Me,KMSServiceError:()=>We});var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"_protocol",void 0),a(this,"_hostname",void 0),a(this,"_port",void 0);var r=!t.startsWith("http://")&&!t.startsWith("https://")?"".concat(e.DEFAULT_PROTOCOL,"://").concat(t):t,o=r.match(/^https?:/),i=n(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=o?o[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return t=e,(r=[{key:"copy",value:function(){return new e(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(e){var t=n(e.split(":"),2),r=t[0],o=t[1];this._hostname=r,this._port=o?parseInt(o):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(e){this._hostname=e}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(t){var r=t.match(/^https?:/),o=n(t.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=o.split(":")[0],this._port=o.split(":")[1]?parseInt(o.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(e){this._port=e}},{key:"protocol",get:function(){return this._protocol},set:function(e){this._protocol=e}}])&&i(t.prototype,r),o&&i(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}();function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t,r){return t=h(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&y(o,r.prototype),o}(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),y(r,e)},l(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r128)throw new O("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new O("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new u(t.endpoint):this.endpoint=t.endpoint)}return b(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),O=function(e){function t(e){return d(this,t),f(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),b(t)}(l(Error));const S=require("k6/http");var j=e.n(S);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function P(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=ye(ye({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=Se(r.signingDate),o=n.longDate,i=n.shortDate,a=r.signingService||this.service,c=r.signingRegion||this.region,u="".concat(i,"/").concat(c,"/").concat(a,"/").concat(M);e.headers[z]||(e.headers[z]=e.endpoint.hostname);for(var s=0,f=Object.keys(e.headers);s-1&&delete e.headers[l]}e.headers[K]=o,this.credentials.sessionToken&&(e.headers[N]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var p=this.computePayloadHash(e);!function(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=t.signingDate,n=void 0===r?new Date:r,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,c=t.unhoistableHeaders,u=t.signableHeaders,s=t.signingRegion,f=t.signingService,l=Se(n),p=l.longDate,y=l.shortDate,h=s||this.region,d=f||this.service;if(i>604800)throw new we("Signature version 4 presigned URLs can't be valid for more than 7 days");var v="".concat(y,"/").concat(h,"/").concat(d,"/").concat(M),b=this.moveHeadersToQuery(e,{unhoistableHeaders:c});b.headers[z]||(b.headers[z]=e.endpoint.hostname),this.credentials.sessionToken&&(b.query[C]=this.credentials.sessionToken),b.query["X-Amz-Algorithm"]=W,b.query["X-Amz-Credential"]="".concat(this.credentials.accessKeyId,"/").concat(v),b.query[x]=p,b.query["X-Amz-Expires"]=i.toString(10);var m=this.computeCanonicalHeaders(b,a,u);b.query["X-Amz-SignedHeaders"]=Object.keys(m).sort().join(";");var g=this.deriveSigningKey(this.credentials,d,h,y),w=this.computePayloadHash(e),O=this.createCanonicalRequest(b,m,w);b.query[T]=this.calculateSignature(p,v,g,O);var S=b.endpoint.href;return b.path&&(S+=b.path),b.query&&(S+="?".concat(this.serializeQueryParameters(b.query))),ye({url:S},b)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=oe().sha256(r,"hex");return"".concat(W,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var o=this.createStringToSign(e,t,n);return oe().hmac("sha256",r,o,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var o=e.secretAccessKey,i=oe().hmac("sha256","AWS4"+o,n,"binary"),a=oe().hmac("sha256",i,r,"binary"),c=oe().hmac("sha256",a,t,"binary");return oe().hmac("sha256",c,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=fe(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],i={},a=function(e){if(e.toLowerCase()===I)return 1;o.push(e);var t=n[e];"string"==typeof t?i[e]="".concat(Oe(e),"=").concat(Oe(t)):Array.isArray(t)&&(i[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(Oe(e),"=").concat(Oe(r))])}),[]).join("&"))},c=fe(Object.keys(n).sort());try{for(c.s();!(t=c.n()).done;){a(t.value)}}catch(e){c.e(e)}finally{c.f()}return o.map((function(e){return i[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,i={},a=fe(Object.keys(o).sort());try{for(a.s();!(n=a.n()).done;){var c=n.value;if(null!=o[c]){var u=c.toLowerCase();(u in q||null!=t&&t.has(u))&&(!r||r&&!r.has(u))||"string"==typeof o[c]&&(i[u]=o[c]=o[c].trim().replace(/\s+/g," "))}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"computePayloadHash",value:function(e){var t,r=e.headers,n=e.body;return r[L]?r[L]:null==n?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":"string"==typeof n||(t=n,"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)))?oe().sha256(n,"hex").toLowerCase():ArrayBuffer.isView(n)?oe().sha256(n.buffer,"hex").toLowerCase():"UNSIGNED-PAYLOAD"}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ee(e){for(var t=1;t1&&void 0!==i[1]?i[1]:Ge.Size256,n=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/",headers:Ee(Ee({},this.commonHeaders),{},Re({},D,"TrentService.GenerateDataKey")),body:JSON.stringify({KeyId:t,NumberOfBytes:r})},{}),e.next=4,j().asyncRequest(this.method,n.url,n.body,{headers:n.headers});case 4:return o=e.sent,this._handle_error(Be.GenerateDataKey,o),e.abrupt("return",Me.fromJSON(o.json()));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_handle_error",value:function(e,t){var r=t.error_code;if(0!==r){var n=t.json();if(r>=1400&&r<=1499){var o=n.Message||n.message||n.__type;if("InvalidSignatureException"===n.__type)throw new we(o,n.__type);throw new We(o,n.__type,e)}if(1500===r)throw new We("An error occured on the server side","InternalServiceError",e)}}}]);var r,n}(A),qe=function(){function e(t,r){xe(this,e),Re(this,"keyArn",void 0),Re(this,"keyId",void 0),this.keyArn=t,this.keyId=r}return Ce(e,null,[{key:"fromJSON",value:function(t){return new e(t.KeyArn,t.KeyId)}}])}(),Me=function(){function e(t,r,n){xe(this,e),Re(this,"id",void 0),Re(this,"ciphertextBlob",void 0),Re(this,"plaintext",void 0),this.ciphertextBlob=t,this.id=r,this.plaintext=n}return Ce(e,null,[{key:"fromJSON",value:function(t){return new e(t.CiphertextBlob,t.KeyId,t.Plaintext)}}])}(),We=function(e){function t(e,r,n){var o;return xe(this,t),Re(o=Le(this,t,[e,r]),"operation",void 0),o.name="KMSServiceError",o.operation=n,o}return De(t,e),Ce(t)}(re),Be=function(e){return e.GenerateDataKey="GenerateDataKey",e.ListKeys="ListKeys",e}(Be||{}),Ge=function(e){return e[e.Size256=32]="Size256",e[e.Size512=64]="Size512",e}(Ge||{}),Ue=exports;for(var Fe in t)Ue[Fe]=t[Fe];t.__esModule&&Object.defineProperty(Ue,"__esModule",{value:!0})})(); //# sourceMappingURL=kms.js.map \ No newline at end of file diff --git a/dist/kms.js.map b/dist/kms.js.map index 5358ef9..194284d 100644 --- a/dist/kms.js.map +++ b/dist/kms.js.map @@ -1 +1 @@ -{"version":3,"file":"kms.js","mappings":";mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,6/DCFvD,IAAMC,EAAQ,WAajB,SAAAA,EAAYC,gGAAkBC,CAAA,KAAAF,GAAAG,EAAA,yBAA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,GAAA,KAAAuW,GAV3CtW,GAAA,sBAKAA,GAAA,qBAMIW,KAAK+W,OAASA,EACd/W,KAAKgX,MAAQX,CACjB,CAAC,OAAA/U,GAAAqU,EAAA,OAAAvX,IAAA,WAAAa,MAED,SAAgB0F,GACZ,OAAO,IAAIgR,EAAOhR,EAAKsS,OAAkBtS,EAAK0R,MAClD,IAAC,CAlBc,GAwBNG,GAAU,WAiBnB,SAAAA,EAAYU,EAAwBb,EAAec,GAAmB/X,GAAA,KAAAoX,GAhBtEnX,GAAA,kBAKAA,GAAA,8BAKAA,GAAA,yBAOIW,KAAKoX,eAAiBF,EACtBlX,KAAK+V,GAAKM,EACVrW,KAAKqX,UAAYF,CACrB,CAAC,OAAA7V,GAAAkV,EAAA,OAAApY,IAAA,WAAAa,MAED,SAAgB0F,GACZ,OAAO,IAAI6R,EACP7R,EAAKuS,eACLvS,EAAK0R,MACL1R,EAAKwS,UAEb,IAAC,CA7BkB,GAgCVL,GAAe,SAAA/J,GAUxB,SAAA+J,EAAYjV,EAAiBmC,EAAc0S,GAAyB,IAAAY,EAGtC,OAHsClY,GAAA,KAAA0X,GAC5CzX,GAApBiY,EAAAxV,GAAA,KAAAgV,EAAA,CAAMjV,EAASmC,IAAK,oBACpBsT,EAAKpT,KAAO,kBACZoT,EAAKZ,UAAYA,EAASY,CAC9B,CAAC,OAAAvV,GAAA+U,EAAA/J,GAAAzL,GAAAwV,EAAA,CAduB,CAAS/S,GAoBhCyR,GAAY,SAAZA,GAAY,OAAZA,EAAY,kCAAZA,EAAY,oBAAZA,CAAY,EAAZA,IAAY,IAQZW,GAAU,SAAVA,GAAU,OAAVA,EAAAA,EAAU,sBAAVA,EAAAA,EAAU,sBAAVA,CAAU,EAAVA,IAAU","sources":["webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/./src/internal/client.ts","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/./src/internal/kms.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/http\");","import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/html\");","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/crypto\");","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","import { JSONArray, JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's KMS service\n */\nexport class KMSClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a KMSClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'kms')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: awsConfig.region,\n credentials: {\n accessKeyId: awsConfig.accessKeyId,\n secretAccessKey: awsConfig.secretAccessKey,\n sessionToken: awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n // All interactions with the KMS service\n // are made via the GET or POST method.\n this.method = 'POST'\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Gets a list of all the KMS keys in the caller's AWS\n * account and region.\n *\n * @returns an array of all the available keys\n */\n async listKeys(): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n // For some reason, the base target is not kms...\n [AMZ_TARGET_HEADER]: `TrentService.ListKeys`,\n },\n body: JSON.stringify({}),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(KMSOperation.ListKeys, res)\n\n const json: JSONArray = res.json('Keys') as JSONArray\n return json.map((k) => KMSKey.fromJSON(k as JSONObject))\n }\n\n /**\n * GenerateDataKey returns a unique symmetric data key for use outside of AWS KMS.\n *\n * This operation returns a plaintext copy of the data key and a copy that is encrypted under a symmetric encryption KMS key that you specify.\n * The bytes in the plaintext key are random; they are not related to the caller or the KMS key.\n * You can use the plaintext key to encrypt your data outside of AWS KMS and store the encrypted data key with the encrypted data.\n *\n * To generate a data key, specify the symmetric encryption KMS key that will be used to encrypt the data key.\n * You cannot use an asymmetric KMS key to encrypt data keys.\n *\n * Used to generate data key with the KMS key defined\n * @param {string} id - Specifies the symmetric encryption KMS key that encrypts the data key. Use its key ID, key ARN, alias name, or alias ARN.\n * @param {KMKeySize} size - Specifies the length of the data key in bytes. For example, use the value 64 to generate a 512-bit data key (64 bytes is 512 bits). Default is 32, and generates a 256-bit data key.\n * @throws {KMSServiceError}\n * @throws {InvalidSignatureError}\n * @returns {KMSDataKey} - The generated data key.\n */\n async generateDataKey(\n id: string,\n size: KMSKeySize = KMSKeySize.Size256\n ): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n // For some reason, the base target is not kms...\n [AMZ_TARGET_HEADER]: `TrentService.GenerateDataKey`,\n },\n body: JSON.stringify({ KeyId: id, NumberOfBytes: size }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(KMSOperation.GenerateDataKey, res)\n\n return KMSDataKey.fromJSON(res.json() as JSONObject)\n }\n\n _handle_error(operation: KMSOperation, response: RefinedResponse) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new KMSServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new KMSServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/**\n * Class representing a KMS key\n */\nexport class KMSKey {\n /**\n * ARN of the key\n */\n keyArn: string\n\n /**\n * Unique identifier of the key\n */\n keyId: string\n\n constructor(keyArn: string, KeyId: string) {\n this.keyArn = keyArn\n this.keyId = KeyId\n }\n\n static fromJSON(json: JSONObject) {\n return new KMSKey(json.KeyArn as string, json.KeyId as string)\n }\n}\n\n/**\n * Class representing a data key\n */\nexport class KMSDataKey {\n /**\n * The Amazon Resource Name (key ARN) of the KMS key that encrypted the data key.\n */\n id: string\n\n /**\n * The (base64-encoded) encrypted copy of the data key.\n */\n ciphertextBlob: string\n\n /**\n * The plaintext data key.\n * Use this data key to encrypt your data outside of KMS. Then, remove it from memory as soon as possible.\n */\n plaintext: string\n\n constructor(CiphertextBlob: string, KeyId: string, Plaintext: string) {\n this.ciphertextBlob = CiphertextBlob\n this.id = KeyId\n this.plaintext = Plaintext\n }\n\n static fromJSON(json: JSONObject) {\n return new KMSDataKey(\n json.CiphertextBlob as string,\n json.KeyId as string,\n json.Plaintext as string\n )\n }\n}\n\nexport class KMSServiceError extends AWSError {\n operation: KMSOperation\n\n /**\n * Constructs a KMSServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: KMSOperation) {\n super(message, code)\n this.name = 'KMSServiceError'\n this.operation = operation\n }\n}\n\n/**\n * KMSOperation defines all currently implemented KMS Service operations.\n */\nenum KMSOperation {\n GenerateDataKey = 'GenerateDataKey',\n ListKeys = 'ListKeys',\n}\n\n/**\n * KMSKeyLength describes possible key lenght values for KMS API data key operations.\n */\nenum KMSKeySize {\n Size256 = 32,\n Size512 = 64,\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Endpoint","endpoint","_classCallCheck","_defineProperty","completeUrl","startsWith","concat","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","this","_protocol","slice","_hostname","_port","parseInt","undefined","href","set","_value$split2","hostname","port","protocol","host","AWSConfig","options","region","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","require","AWSClient","awsConfig","serviceName","_endpoint","AMZ_DATE_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","_i","_Object$keys","keys","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","soughtHeader","hasHeader","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","_regeneratorRuntime","t","r","i","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","_asyncToGenerator","fn","self","args","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","KMSClient","_AWSClient","commonHeaders","_listKeys","_callee","signedRequest","res","_context","sign","http","_handle_error","KMSOperation","ListKeys","k","KMSKey","fromJSON","_generateDataKey","_callee2","id","size","_args2","_context2","KMSKeySize","Size256","KeyId","NumberOfBytes","GenerateDataKey","KMSDataKey","_x","operation","errorCode","error_code","errorMessage","KMSServiceError","keyArn","keyId","KeyArn","CiphertextBlob","Plaintext","ciphertextBlob","plaintext","_this2"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"kms.js","mappings":";mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,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k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/./src/internal/client.ts","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/./src/internal/kms.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/http\");","import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/html\");","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n\nexport class NetworkError extends Error {\n code: number;\n\n constructor(message: string, code: number) {\n super(message)\n this.name = 'NetworkError'\n this.code = code\n }\n}","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/crypto\");","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","import { JSONArray, JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's KMS service\n */\nexport class KMSClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a KMSClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'kms')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: awsConfig.region,\n credentials: {\n accessKeyId: awsConfig.accessKeyId,\n secretAccessKey: awsConfig.secretAccessKey,\n sessionToken: awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n // All interactions with the KMS service\n // are made via the GET or POST method.\n this.method = 'POST'\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Gets a list of all the KMS keys in the caller's AWS\n * account and region.\n *\n * @returns an array of all the available keys\n */\n async listKeys(): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n // For some reason, the base target is not kms...\n [AMZ_TARGET_HEADER]: `TrentService.ListKeys`,\n },\n body: JSON.stringify({}),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(KMSOperation.ListKeys, res)\n\n const json: JSONArray = res.json('Keys') as JSONArray\n return json.map((k) => KMSKey.fromJSON(k as JSONObject))\n }\n\n /**\n * GenerateDataKey returns a unique symmetric data key for use outside of AWS KMS.\n *\n * This operation returns a plaintext copy of the data key and a copy that is encrypted under a symmetric encryption KMS key that you specify.\n * The bytes in the plaintext key are random; they are not related to the caller or the KMS key.\n * You can use the plaintext key to encrypt your data outside of AWS KMS and store the encrypted data key with the encrypted data.\n *\n * To generate a data key, specify the symmetric encryption KMS key that will be used to encrypt the data key.\n * You cannot use an asymmetric KMS key to encrypt data keys.\n *\n * Used to generate data key with the KMS key defined\n * @param {string} id - Specifies the symmetric encryption KMS key that encrypts the data key. Use its key ID, key ARN, alias name, or alias ARN.\n * @param {KMKeySize} size - Specifies the length of the data key in bytes. For example, use the value 64 to generate a 512-bit data key (64 bytes is 512 bits). Default is 32, and generates a 256-bit data key.\n * @throws {KMSServiceError}\n * @throws {InvalidSignatureError}\n * @returns {KMSDataKey} - The generated data key.\n */\n async generateDataKey(\n id: string,\n size: KMSKeySize = KMSKeySize.Size256\n ): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n // For some reason, the base target is not kms...\n [AMZ_TARGET_HEADER]: `TrentService.GenerateDataKey`,\n },\n body: JSON.stringify({ KeyId: id, NumberOfBytes: size }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(KMSOperation.GenerateDataKey, res)\n\n return KMSDataKey.fromJSON(res.json() as JSONObject)\n }\n\n _handle_error(operation: KMSOperation, response: RefinedResponse) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new KMSServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new KMSServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/**\n * Class representing a KMS key\n */\nexport class KMSKey {\n /**\n * ARN of the key\n */\n keyArn: string\n\n /**\n * Unique identifier of the key\n */\n keyId: string\n\n constructor(keyArn: string, KeyId: string) {\n this.keyArn = keyArn\n this.keyId = KeyId\n }\n\n static fromJSON(json: JSONObject) {\n return new KMSKey(json.KeyArn as string, json.KeyId as string)\n }\n}\n\n/**\n * Class representing a data key\n */\nexport class KMSDataKey {\n /**\n * The Amazon Resource Name (key ARN) of the KMS key that encrypted the data key.\n */\n id: string\n\n /**\n * The (base64-encoded) encrypted copy of the data key.\n */\n ciphertextBlob: string\n\n /**\n * The plaintext data key.\n * Use this data key to encrypt your data outside of KMS. Then, remove it from memory as soon as possible.\n */\n plaintext: string\n\n constructor(CiphertextBlob: string, KeyId: string, Plaintext: string) {\n this.ciphertextBlob = CiphertextBlob\n this.id = KeyId\n this.plaintext = Plaintext\n }\n\n static fromJSON(json: JSONObject) {\n return new KMSDataKey(\n json.CiphertextBlob as string,\n json.KeyId as string,\n json.Plaintext as string\n )\n }\n}\n\nexport class KMSServiceError extends AWSError {\n operation: KMSOperation\n\n /**\n * Constructs a KMSServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: KMSOperation) {\n super(message, code)\n this.name = 'KMSServiceError'\n this.operation = operation\n }\n}\n\n/**\n * KMSOperation defines all currently implemented KMS Service operations.\n */\nenum KMSOperation {\n GenerateDataKey = 'GenerateDataKey',\n ListKeys = 'ListKeys',\n}\n\n/**\n * KMSKeyLength describes possible key lenght values for KMS API data key operations.\n */\nenum KMSKeySize {\n Size256 = 32,\n Size512 = 64,\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Endpoint","endpoint","_classCallCheck","_defineProperty","completeUrl","startsWith","concat","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","this","_protocol","slice","_hostname","_port","parseInt","undefined","href","set","_value$split2","hostname","port","protocol","host","AWSConfig","options","region","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","require","AWSClient","awsConfig","serviceName","_endpoint","AMZ_DATE_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","_i","_Object$keys","keys","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","soughtHeader","hasHeader","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","_regeneratorRuntime","t","r","i","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","_asyncToGenerator","fn","self","args","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","KMSClient","_AWSClient","commonHeaders","_listKeys","_callee","signedRequest","res","_context","sign","http","_handle_error","KMSOperation","ListKeys","k","KMSKey","fromJSON","_generateDataKey","_callee2","id","size","_args2","_context2","KMSKeySize","Size256","KeyId","NumberOfBytes","GenerateDataKey","KMSDataKey","_x","operation","errorCode","error_code","errorMessage","KMSServiceError","keyArn","keyId","KeyArn","CiphertextBlob","Plaintext","ciphertextBlob","plaintext","_this2"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/lambda.js b/dist/lambda.js index 52b7b5e..1551f28 100644 --- a/dist/lambda.js +++ b/dist/lambda.js @@ -1,3 +1,3 @@ /*! For license information please see lambda.js.LICENSE.txt */ -(()=>{"use strict";var e={2:(e,t,r)=>{r.d(t,{R:()=>u});var n=r(556);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var r=0;r{r.d(t,{g:()=>d,r:()=>v});var n=r(556);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,r){return t=s(t),function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(c())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&u(o,r.prototype),o}(e,arguments,s(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,e)},a(e)}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r128)throw new v("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new v("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new n.y(t.endpoint):this.endpoint=t.endpoint)}return p(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),v=function(e){function t(e){return f(this,t),i(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),p(t)}(a(Error))},464:(e,t,r)=>{r.d(t,{Kq:()=>o,Qt:()=>u,Qz:()=>w,SN:()=>m,Uv:()=>O,V1:()=>y,VQ:()=>g,Zs:()=>i,_e:()=>j,b2:()=>f,fk:()=>h,he:()=>a,iK:()=>s,ot:()=>l,pj:()=>v,sY:()=>p,ud:()=>d,wN:()=>n,z8:()=>S,zG:()=>c,zX:()=>b});var n="X-Amz-Algorithm",o="X-Amz-Credential",i="X-Amz-Date",a="X-Amz-Expires",c="X-Amz-Signature",u="X-Amz-SignedHeaders",s="X-Amz-Security-Token",f="x-amz-content-sha256",l=i.toLowerCase(),p=c.toLowerCase(),y="X-Amz-Target".toLowerCase(),h=s.toLowerCase(),d="authorization",v=[d,l,"date"],b="host",m={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},g="aws4_request",w="AWS4-HMAC-SHA256",O=604800,j="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",S="UNSIGNED-PAYLOAD"},556:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rs});var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"_protocol",void 0),c(this,"_hostname",void 0),c(this,"_port",void 0);var r=!t.startsWith("http://")&&!t.startsWith("https://")?"".concat(e.DEFAULT_PROTOCOL,"://").concat(t):t,n=r.match(/^https?:/),i=o(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=n?n[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return t=e,(r=[{key:"copy",value:function(){return new e(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(e){var t=o(e.split(":"),2),r=t[0],n=t[1];this._hostname=r,this._port=n?parseInt(n):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(e){this._hostname=e}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(t){var r=t.match(/^https?:/),n=o(t.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=n.split(":")[0],this._port=n.split(":")[1]?parseInt(n.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(e){this._port=e}},{key:"protocol",get:function(){return this._protocol},set:function(e){this._protocol=e}}])&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();c(s,"DEFAULT_PROTOCOL","https")},539:(e,t,r)=>{r.d(t,{c:()=>p});var n=r(95);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var r=0;r{function n(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);rn})},639:(e,t,r)=>{r.d(t,{B:()=>S,s:()=>_});var n=r(275),o=r.n(n),i=r(464),a=r(539),c=r(21),u=r(680);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t,r){return t=p(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=b(b({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=E(r.signingDate),o=n.longDate,a=n.shortDate,u=r.signingService||this.service,s=r.signingRegion||this.region,f="".concat(a,"/").concat(s,"/").concat(u,"/").concat(i.VQ);e.headers[i.zX]||(e.headers[i.zX]=e.endpoint.hostname);for(var l=0,p=Object.keys(e.headers);l-1&&delete e.headers[y]}e.headers[i.ot]=o,this.credentials.sessionToken&&(e.headers[i.fk]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var h=this.computePayloadHash(e);!(0,c.o)(i.b2,e.headers)&&this.applyChecksum&&(e.headers[i.b2]=h);var d=this.computeCanonicalHeaders(e,r.unsignableHeaders,r.signableHeaders),v=this.calculateSignature(o,f,this.deriveSigningKey(this.credentials,u,s,a),this.createCanonicalRequest(e,d,h));e.headers[i.ud]="".concat(i.Qz," ")+"Credential=".concat(this.credentials.accessKeyId,"/").concat(f,", ")+"SignedHeaders=".concat(Object.keys(d).sort().join(";"),", ")+"Signature=".concat(v);var m=e.endpoint.href;return e.path&&(m+=e.path),e.query&&(m+="?".concat(this.serializeQueryParameters(e.query))),b({url:m},e)}},{key:"presign",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.signingDate,n=void 0===r?new Date:r,o=t.expiresIn,a=void 0===o?3600:o,c=t.unsignableHeaders,u=t.unhoistableHeaders,s=t.signableHeaders,f=t.signingRegion,l=t.signingService,p=E(n),y=p.longDate,h=p.shortDate,d=f||this.region,v=l||this.service;if(a>i.Uv)throw new _("Signature version 4 presigned URLs can't be valid for more than 7 days");var m="".concat(h,"/").concat(d,"/").concat(v,"/").concat(i.VQ),g=this.moveHeadersToQuery(e,{unhoistableHeaders:u});g.headers[i.zX]||(g.headers[i.zX]=e.endpoint.hostname),this.credentials.sessionToken&&(g.query[i.iK]=this.credentials.sessionToken),g.query[i.wN]=i.Qz,g.query[i.Kq]="".concat(this.credentials.accessKeyId,"/").concat(m),g.query[i.Zs]=y,g.query[i.he]=a.toString(10);var w=this.computeCanonicalHeaders(g,c,s);g.query[i.Qt]=Object.keys(w).sort().join(";");var O=this.deriveSigningKey(this.credentials,v,d,h),j=this.computePayloadHash(e),S=this.createCanonicalRequest(g,w,j);g.query[i.zG]=this.calculateSignature(y,m,O,S);var P=g.endpoint.href;return g.path&&(P+=g.path),g.query&&(P+="?".concat(this.serializeQueryParameters(g.query))),b({url:P},g)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=o().sha256(r,"hex");return"".concat(i.Qz,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var i=this.createStringToSign(e,t,n);return o().hmac("sha256",r,i,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var i=e.secretAccessKey,a=o().hmac("sha256","AWS4"+i,n,"binary"),c=o().hmac("sha256",a,r,"binary"),u=o().hmac("sha256",c,t,"binary");return o().hmac("sha256",u,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=h(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],a={},c=function(e){if(e.toLowerCase()===i.sY)return 1;o.push(e);var t=n[e];"string"==typeof t?a[e]="".concat(P(e),"=").concat(P(t)):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(P(e),"=").concat(P(r))])}),[]).join("&"))},u=h(Object.keys(n).sort());try{for(u.s();!(t=u.n()).done;){c(t.value)}}catch(e){u.e(e)}finally{u.f()}return o.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,a={},c=h(Object.keys(o).sort());try{for(c.s();!(n=c.n()).done;){var u=n.value;if(null!=o[u]){var s=u.toLowerCase();(s in i.SN||null!=t&&t.has(s))&&(!r||r&&!r.has(s))||"string"==typeof o[u]&&(a[s]=o[u]=o[u].trim().replace(/\s+/g," "))}}}catch(e){c.e(e)}finally{c.f()}return a}},{key:"computePayloadHash",value:function(e){var t=e.headers,r=e.body;return t[i.b2]?t[i.b2]:null==r?i._e:"string"==typeof r||(0,u.m)(r)?o().sha256(r,"hex").toLowerCase():ArrayBuffer.isView(r)?o().sha256(r.buffer,"hex").toLowerCase():i.z8}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a{function n(e){return"function"==typeof ArrayBuffer&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e))}r.d(t,{m:()=>n})},275:e=>{e.exports=require("k6/crypto")},95:e=>{e.exports=require("k6/html")},570:e=>{e.exports=require("k6/http")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{r.r(n),r.d(n,{AWSConfig:()=>e.g,InvalidAWSConfigError:()=>e.r,InvalidSignatureError:()=>t.s,LambdaClient:()=>k,LambdaInvocationError:()=>A});var e=r(811),t=r(639),o=r(570),i=r.n(o);const a=require("k6/encoding");var c=r.n(a),u=r(2),s=r(539),f=r(464);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function p(e){var t="function"==typeof Map?new Map:void 0;return p=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(O())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&_(o,r.prototype),o}(e,arguments,j(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_(r,e)},p(e)}function y(){y=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),c=new L(n||[]);return o(a,"_invoke",{value:A(e,r,c)}),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",d="suspendedYield",v="executing",b="completed",m={};function g(){}function w(){}function O(){}var j={};s(j,a,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(I([])));_&&_!==r&&n.call(_,a)&&(j=_);var P=O.prototype=g.prototype=Object.create(j);function E(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,c){var u=p(e[o],e,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=x(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(t,r,n);if("normal"===s.type){if(o=n.done?b:d,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function x(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,x(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t2&&void 0!==b[2]?b[2]:{}).invocationType||"RequestResponse",u=d(d({},this.commonHeaders),{},P(P(P({},f.V1,"AWSLambda.".concat(a)),"X-Amz-Invocation-Type",a),"X-Amz-Log-Type",n.logType||"None")),n.clientContext&&(u["X-Amz-Client-Context"]=n.clientContext),n.qualifier&&(o.Qualifier=n.qualifier),s=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/2015-03-31/functions/".concat(t,"/invocations"),query:o,headers:u,body:r||""},{}),e.next=9,i().asyncRequest(this.method,s.url,s.body,{headers:s.headers});case 9:if(l=e.sent,this._handle_error(l),p=l.headers["X-Amz-Log-Result"],h={executedVersion:l.headers["X-Amz-Executed-Version"],logResult:p?c().b64decode(p,"std","s"):void 0,statusCode:l.status,payload:l.body},!(v=l.headers["X-Amz-Function-Error"])){e.next=18;break}throw new A(v,h);case 18:return e.abrupt("return",h);case 19:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(e){v(i,r,o,a,c,"next",e)}function c(e){v(i,r,o,a,c,"throw",e)}a(void 0)}))},function(e,t){return o.apply(this,arguments)})},{key:"_handle_error",value:function(e){var r=e.error_code;if(""!=e.error||0!==r){var n=s.c.parse(e);switch(n.code){case"AuthorizationHeaderMalformed":case"InvalidSignatureException":throw new t.s(n.message,n.code);default:throw n}}}}]);var n,o}(u.R),A=function(e){function t(e,r){var n;return b(this,t),P(n=w(this,t,["".concat(e,": ").concat(r.payload)]),"response",void 0),n.response=r,n}return S(t,e),g(t)}(p(Error))})();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})(); +(()=>{"use strict";var e={2:(e,t,r)=>{r.d(t,{R:()=>u});var n=r(556);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var r=0;r{r.d(t,{g:()=>d,r:()=>v});var n=r(556);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,r){return t=s(t),function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(c())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&u(o,r.prototype),o}(e,arguments,s(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,e)},a(e)}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r128)throw new v("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new v("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new n.y(t.endpoint):this.endpoint=t.endpoint)}return p(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),v=function(e){function t(e){return f(this,t),i(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),p(t)}(a(Error))},464:(e,t,r)=>{r.d(t,{Kq:()=>o,Qt:()=>u,Qz:()=>w,SN:()=>m,Uv:()=>O,V1:()=>y,VQ:()=>g,Zs:()=>i,_e:()=>j,b2:()=>f,fk:()=>h,he:()=>a,iK:()=>s,ot:()=>l,pj:()=>v,sY:()=>p,ud:()=>d,wN:()=>n,z8:()=>S,zG:()=>c,zX:()=>b});var n="X-Amz-Algorithm",o="X-Amz-Credential",i="X-Amz-Date",a="X-Amz-Expires",c="X-Amz-Signature",u="X-Amz-SignedHeaders",s="X-Amz-Security-Token",f="x-amz-content-sha256",l=i.toLowerCase(),p=c.toLowerCase(),y="X-Amz-Target".toLowerCase(),h=s.toLowerCase(),d="authorization",v=[d,l,"date"],b="host",m={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},g="aws4_request",w="AWS4-HMAC-SHA256",O=604800,j="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",S="UNSIGNED-PAYLOAD"},556:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rs});var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"_protocol",void 0),c(this,"_hostname",void 0),c(this,"_port",void 0);var r=!t.startsWith("http://")&&!t.startsWith("https://")?"".concat(e.DEFAULT_PROTOCOL,"://").concat(t):t,n=r.match(/^https?:/),i=o(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=n?n[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return t=e,(r=[{key:"copy",value:function(){return new e(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(e){var t=o(e.split(":"),2),r=t[0],n=t[1];this._hostname=r,this._port=n?parseInt(n):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(e){this._hostname=e}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(t){var r=t.match(/^https?:/),n=o(t.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=n.split(":")[0],this._port=n.split(":")[1]?parseInt(n.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(e){this._port=e}},{key:"protocol",get:function(){return this._protocol},set:function(e){this._protocol=e}}])&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();c(s,"DEFAULT_PROTOCOL","https")},539:(e,t,r)=>{r.d(t,{D:()=>b,c:()=>v});var n=r(95);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r{function n(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);rn})},639:(e,t,r)=>{r.d(t,{B:()=>S,s:()=>_});var n=r(275),o=r.n(n),i=r(464),a=r(539),c=r(21),u=r(680);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t,r){return t=p(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=b(b({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=E(r.signingDate),o=n.longDate,a=n.shortDate,u=r.signingService||this.service,s=r.signingRegion||this.region,f="".concat(a,"/").concat(s,"/").concat(u,"/").concat(i.VQ);e.headers[i.zX]||(e.headers[i.zX]=e.endpoint.hostname);for(var l=0,p=Object.keys(e.headers);l-1&&delete e.headers[y]}e.headers[i.ot]=o,this.credentials.sessionToken&&(e.headers[i.fk]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var h=this.computePayloadHash(e);!(0,c.o)(i.b2,e.headers)&&this.applyChecksum&&(e.headers[i.b2]=h);var d=this.computeCanonicalHeaders(e,r.unsignableHeaders,r.signableHeaders),v=this.calculateSignature(o,f,this.deriveSigningKey(this.credentials,u,s,a),this.createCanonicalRequest(e,d,h));e.headers[i.ud]="".concat(i.Qz," ")+"Credential=".concat(this.credentials.accessKeyId,"/").concat(f,", ")+"SignedHeaders=".concat(Object.keys(d).sort().join(";"),", ")+"Signature=".concat(v);var m=e.endpoint.href;return e.path&&(m+=e.path),e.query&&(m+="?".concat(this.serializeQueryParameters(e.query))),b({url:m},e)}},{key:"presign",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.signingDate,n=void 0===r?new Date:r,o=t.expiresIn,a=void 0===o?3600:o,c=t.unsignableHeaders,u=t.unhoistableHeaders,s=t.signableHeaders,f=t.signingRegion,l=t.signingService,p=E(n),y=p.longDate,h=p.shortDate,d=f||this.region,v=l||this.service;if(a>i.Uv)throw new _("Signature version 4 presigned URLs can't be valid for more than 7 days");var m="".concat(h,"/").concat(d,"/").concat(v,"/").concat(i.VQ),g=this.moveHeadersToQuery(e,{unhoistableHeaders:u});g.headers[i.zX]||(g.headers[i.zX]=e.endpoint.hostname),this.credentials.sessionToken&&(g.query[i.iK]=this.credentials.sessionToken),g.query[i.wN]=i.Qz,g.query[i.Kq]="".concat(this.credentials.accessKeyId,"/").concat(m),g.query[i.Zs]=y,g.query[i.he]=a.toString(10);var w=this.computeCanonicalHeaders(g,c,s);g.query[i.Qt]=Object.keys(w).sort().join(";");var O=this.deriveSigningKey(this.credentials,v,d,h),j=this.computePayloadHash(e),S=this.createCanonicalRequest(g,w,j);g.query[i.zG]=this.calculateSignature(y,m,O,S);var P=g.endpoint.href;return g.path&&(P+=g.path),g.query&&(P+="?".concat(this.serializeQueryParameters(g.query))),b({url:P},g)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=o().sha256(r,"hex");return"".concat(i.Qz,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var i=this.createStringToSign(e,t,n);return o().hmac("sha256",r,i,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var i=e.secretAccessKey,a=o().hmac("sha256","AWS4"+i,n,"binary"),c=o().hmac("sha256",a,r,"binary"),u=o().hmac("sha256",c,t,"binary");return o().hmac("sha256",u,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=h(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],a={},c=function(e){if(e.toLowerCase()===i.sY)return 1;o.push(e);var t=n[e];"string"==typeof t?a[e]="".concat(P(e),"=").concat(P(t)):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(P(e),"=").concat(P(r))])}),[]).join("&"))},u=h(Object.keys(n).sort());try{for(u.s();!(t=u.n()).done;){c(t.value)}}catch(e){u.e(e)}finally{u.f()}return o.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,a={},c=h(Object.keys(o).sort());try{for(c.s();!(n=c.n()).done;){var u=n.value;if(null!=o[u]){var s=u.toLowerCase();(s in i.SN||null!=t&&t.has(s))&&(!r||r&&!r.has(s))||"string"==typeof o[u]&&(a[s]=o[u]=o[u].trim().replace(/\s+/g," "))}}}catch(e){c.e(e)}finally{c.f()}return a}},{key:"computePayloadHash",value:function(e){var t=e.headers,r=e.body;return t[i.b2]?t[i.b2]:null==r?i._e:"string"==typeof r||(0,u.m)(r)?o().sha256(r,"hex").toLowerCase():ArrayBuffer.isView(r)?o().sha256(r.buffer,"hex").toLowerCase():i.z8}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a{function n(e){return"function"==typeof ArrayBuffer&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e))}r.d(t,{m:()=>n})},275:e=>{e.exports=require("k6/crypto")},95:e=>{e.exports=require("k6/html")},570:e=>{e.exports=require("k6/http")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{r.r(n),r.d(n,{AWSConfig:()=>e.g,AWSError:()=>s.c,InvalidAWSConfigError:()=>e.r,InvalidSignatureError:()=>t.s,LambdaClient:()=>k,LambdaInvocationError:()=>A,NetworkError:()=>s.D});var e=r(811),t=r(639),o=r(570),i=r.n(o);const a=require("k6/encoding");var c=r.n(a),u=r(2),s=r(539),f=r(464);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function p(e){var t="function"==typeof Map?new Map:void 0;return p=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(O())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&_(o,r.prototype),o}(e,arguments,j(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_(r,e)},p(e)}function y(){y=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),c=new L(n||[]);return o(a,"_invoke",{value:A(e,r,c)}),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",d="suspendedYield",v="executing",b="completed",m={};function g(){}function w(){}function O(){}var j={};s(j,a,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(I([])));_&&_!==r&&n.call(_,a)&&(j=_);var P=O.prototype=g.prototype=Object.create(j);function E(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,c){var u=p(e[o],e,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=x(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(t,r,n);if("normal"===s.type){if(o=n.done?b:d,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function x(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,x(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t2&&void 0!==b[2]?b[2]:{}).invocationType||"RequestResponse",u=d(d({},this.commonHeaders),{},P(P(P({},f.V1,"AWSLambda.".concat(a)),"X-Amz-Invocation-Type",a),"X-Amz-Log-Type",n.logType||"None")),n.clientContext&&(u["X-Amz-Client-Context"]=n.clientContext),n.qualifier&&(o.Qualifier=n.qualifier),s=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/2015-03-31/functions/".concat(t,"/invocations"),query:o,headers:u,body:r||""},{}),e.next=9,i().asyncRequest(this.method,s.url,s.body,{headers:s.headers});case 9:if(l=e.sent,this._handle_error(l),p=l.headers["X-Amz-Log-Result"],h={executedVersion:l.headers["X-Amz-Executed-Version"],logResult:p?c().b64decode(p,"std","s"):void 0,statusCode:l.status,payload:l.body},!(v=l.headers["X-Amz-Function-Error"])){e.next=18;break}throw new A(v,h);case 18:return e.abrupt("return",h);case 19:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(e){v(i,r,o,a,c,"next",e)}function c(e){v(i,r,o,a,c,"throw",e)}a(void 0)}))},function(e,t){return o.apply(this,arguments)})},{key:"_handle_error",value:function(e){var r=e.error_code,n=e.error;if(""!=n||0!==r){if(r<1400||r>=1600)throw new s.D(n,r);var o=s.c.parse(e);switch(o.code){case"AuthorizationHeaderMalformed":case"InvalidSignatureException":throw new t.s(o.message,o.code);default:throw o}}}}]);var n,o}(u.R),A=function(e){function t(e,r){var n;return b(this,t),P(n=w(this,t,["".concat(e,": ").concat(r.payload)]),"response",void 0),n.response=r,n}return S(t,e),g(t)}(p(Error))})();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})(); //# sourceMappingURL=lambda.js.map \ No newline at end of file diff --git a/dist/lambda.js.map b/dist/lambda.js.map index b0d4d68..1c00f54 100644 --- a/dist/lambda.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,OAAAxX,EAAAiX,EAAApX,GAAAP,EAAA2X,EAAA,CAN6B,CAM7BhX,EANsCC","sources":["webpack://k6-jslib-aws/./src/internal/client.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/external commonjs \"k6/encoding\"","webpack://k6-jslib-aws/./src/internal/lambda.ts"],"sourcesContent":["import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","module.exports = require(\"k6/crypto\");","module.exports = require(\"k6/html\");","module.exports = require(\"k6/http\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/encoding\");","import http, { RefinedResponse, ResponseType } from 'k6/http'\nimport encoding from 'k6/encoding'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { HTTPHeaders, HTTPMethod, QueryParameterBag } from './http'\n\n/**\n * Class allowing to interact with Amazon AWS's Lambda service\n */\nexport class LambdaClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n private readonly method: HTTPMethod\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'lambda')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Invoke an AWS Lambda function\n *\n * @param {string} name - The name of the function\n * @param {string} payload - The payload to send to function\n * @param {InvocationOptions} options - Additional options to customize invocation\n *\n * @throws {LambdaInvocationError}\n */\n async invoke(\n name: string,\n payload: string,\n options: InvocationOptions = {}\n ): Promise {\n const query: QueryParameterBag = {}\n const invocationType = options.invocationType || 'RequestResponse'\n const headers = {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AWSLambda.${invocationType}`,\n 'X-Amz-Invocation-Type': invocationType,\n 'X-Amz-Log-Type': options.logType || 'None',\n }\n if (options.clientContext) {\n headers['X-Amz-Client-Context'] = options.clientContext\n }\n if (options.qualifier) {\n query['Qualifier'] = options.qualifier\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: `/2015-03-31/functions/${name}/invocations`,\n query,\n headers,\n body: payload || '',\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(res)\n\n const logResult = res.headers['X-Amz-Log-Result']\n const response = {\n executedVersion: res.headers['X-Amz-Executed-Version'],\n logResult: logResult ? encoding.b64decode(logResult, 'std', 's') : undefined,\n statusCode: res.status,\n payload: res.body as string,\n }\n\n const functionError = res.headers['X-Amz-Function-Error']\n if (functionError) {\n throw new LambdaInvocationError(functionError, response)\n } else {\n return response\n }\n }\n\n private _handle_error(response: RefinedResponse) {\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n if (errorMessage == '' && errorCode === 0) {\n return\n }\n\n const awsError = AWSError.parse(response)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n case 'InvalidSignatureException':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw awsError\n }\n }\n}\n\nexport class LambdaInvocationError extends Error {\n response: InvocationResponse\n\n constructor(message: string, response: InvocationResponse) {\n super(`${message}: ${response.payload}`)\n this.response = response\n }\n}\n\ninterface InvocationOptions {\n /**\n * Defines whether the function is invoked synchronously or asynchronously.\n * - `RequestResponse` (default): Invoke the function synchronously.\n * - `Event`: Invoke the function asynchronously.\n * - `DryRun`: Validate parameter values and verify that the user or role has permission to invoke the function.\n */\n invocationType?: 'RequestResponse' | 'Event' | 'DryRun'\n /**\n * Set to `Tail` to include the execution log in the response. Applies to synchronously invoked functions only.\n */\n logType?: 'None' | 'Tail'\n /**\n * Up to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object.\n */\n clientContext?: string\n /**\n * Specify a version or alias to invoke a published version of the function.\n */\n qualifier?: string\n}\n\ninterface InvocationResponse {\n statusCode: number\n executedVersion?: string\n logResult?: string\n payload?: string\n}\n"],"names":["AWSClient","awsConfig","serviceName","_classCallCheck","_defineProperty","this","undefined","endpoint","_endpoint","key","get","Endpoint","concat","region","set","AWSConfig","options","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","value","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","AMZ_ALGORITHM_QUERY_PARAM","AMZ_CREDENTIAL_QUERY_PARAM","AMZ_DATE_QUERY_PARAM","AMZ_EXPIRES_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_SIGNED_HEADERS_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","MAX_PRESIGNED_TTL","EMPTY_SHA256","UNSIGNED_PAYLOAD","completeUrl","startsWith","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","_protocol","slice","_hostname","_port","parseInt","href","_value$split2","hostname","port","protocol","host","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","hasHeader","soughtHeader","_i","_Object$keys","Object","keys","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","isArrayBuffer","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","prototype","call","module","exports","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","d","a","definition","o","defineProperty","enumerable","obj","prop","hasOwnProperty","r","Symbol","toStringTag","_regeneratorRuntime","t","i","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","self","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","LambdaClient","_AWSClient","commonHeaders","fn","_callee","payload","invocationType","signedRequest","res","logResult","functionError","_args","_context","logType","clientContext","qualifier","sign","http","_handle_error","executedVersion","encoding","statusCode","status","LambdaInvocationError","args","_x","_x2","errorCode","error_code","awsError","_this2"],"sourceRoot":""}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AsB2P,EAAS7X,QAAS6X,EAASpU,MAC/D,QACI,MAAMoU,EAZd,CAcJ,KAlFA,IAtCJ3B,EAsCIvF,CAkFC,CA5GoB,CAASzS,EAAAA,GA+GrBoZ,EAAqB,SAAAvX,GAG9B,SAAAuX,EAAYtX,EAAiBiE,GAA8B,IAAAU,EAE/B,OAF+BtG,EAAA,KAAAiZ,GACfhZ,EAAxCqG,EAAA1E,EAAA,KAAAqX,EAAA,IAAAxY,OAASkB,EAAO,MAAAlB,OAAKmF,EAASmS,WAAU,mBACxCzR,EAAKV,SAAWA,EAAQU,CAC5B,CAAC,OAAAzE,EAAAoX,EAAAvX,GAAAP,EAAA8X,EAAA,CAN6B,CAM7BnX,EANsCC","sources":["webpack://k6-jslib-aws/./src/internal/client.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/external commonjs \"k6/encoding\"","webpack://k6-jslib-aws/./src/internal/lambda.ts"],"sourcesContent":["import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n\nexport class NetworkError extends Error {\n code: number;\n\n constructor(message: string, code: number) {\n super(message)\n this.name = 'NetworkError'\n this.code = code\n }\n}","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","module.exports = require(\"k6/crypto\");","module.exports = require(\"k6/html\");","module.exports = require(\"k6/http\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/encoding\");","import http, { RefinedResponse, ResponseType } from 'k6/http'\nimport encoding from 'k6/encoding'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError, NetworkError } from './error'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { HTTPHeaders, HTTPMethod, QueryParameterBag } from './http'\n\n/**\n * Class allowing to interact with Amazon AWS's Lambda service\n */\nexport class LambdaClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n private readonly method: HTTPMethod\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'lambda')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Invoke an AWS Lambda function\n *\n * @param {string} name - The name of the function\n * @param {string} payload - The payload to send to function\n * @param {InvocationOptions} options - Additional options to customize invocation\n *\n * @throws {LambdaInvocationError}\n */\n async invoke(\n name: string,\n payload: string,\n options: InvocationOptions = {}\n ): Promise {\n const query: QueryParameterBag = {}\n const invocationType = options.invocationType || 'RequestResponse'\n const headers = {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AWSLambda.${invocationType}`,\n 'X-Amz-Invocation-Type': invocationType,\n 'X-Amz-Log-Type': options.logType || 'None',\n }\n if (options.clientContext) {\n headers['X-Amz-Client-Context'] = options.clientContext\n }\n if (options.qualifier) {\n query['Qualifier'] = options.qualifier\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: `/2015-03-31/functions/${name}/invocations`,\n query,\n headers,\n body: payload || '',\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(res)\n\n const logResult = res.headers['X-Amz-Log-Result']\n const response = {\n executedVersion: res.headers['X-Amz-Executed-Version'],\n logResult: logResult ? encoding.b64decode(logResult, 'std', 's') : undefined,\n statusCode: res.status,\n payload: res.body as string,\n }\n\n const functionError = res.headers['X-Amz-Function-Error']\n if (functionError) {\n throw new LambdaInvocationError(functionError, response)\n } else {\n return response\n }\n }\n\n private _handle_error(response: RefinedResponse) {\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n if (errorMessage == '' && errorCode === 0) {\n return\n }\n\n if (errorCode < 1400 || errorCode >= 1600 ) {\n throw new NetworkError(errorMessage, errorCode)\n }\n \n const awsError = AWSError.parse(response)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n case 'InvalidSignatureException':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw awsError\n }\n }\n}\n\nexport class LambdaInvocationError extends Error {\n response: InvocationResponse\n\n constructor(message: string, response: InvocationResponse) {\n super(`${message}: ${response.payload}`)\n this.response = response\n }\n}\n\ninterface InvocationOptions {\n /**\n * Defines whether the function is invoked synchronously or asynchronously.\n * - `RequestResponse` (default): Invoke the function synchronously.\n * - `Event`: Invoke the function asynchronously.\n * - `DryRun`: Validate parameter values and verify that the user or role has permission to invoke the function.\n */\n invocationType?: 'RequestResponse' | 'Event' | 'DryRun'\n /**\n * Set to `Tail` to include the execution log in the response. Applies to synchronously invoked functions only.\n */\n logType?: 'None' | 'Tail'\n /**\n * Up to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object.\n */\n clientContext?: string\n /**\n * Specify a version or alias to invoke a published version of the function.\n */\n qualifier?: string\n}\n\ninterface InvocationResponse {\n statusCode: number\n executedVersion?: string\n logResult?: string\n payload?: string\n}\n"],"names":["AWSClient","awsConfig","serviceName","_classCallCheck","_defineProperty","this","undefined","endpoint","_endpoint","key","get","Endpoint","concat","region","set","AWSConfig","options","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","value","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","AMZ_ALGORITHM_QUERY_PARAM","AMZ_CREDENTIAL_QUERY_PARAM","AMZ_DATE_QUERY_PARAM","AMZ_EXPIRES_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_SIGNED_HEADERS_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","MAX_PRESIGNED_TTL","EMPTY_SHA256","UNSIGNED_PAYLOAD","completeUrl","startsWith","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","_protocol","slice","_hostname","_port","parseInt","href","_value$split2","hostname","port","protocol","host","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","NetworkError","_Error2","_this2","hasHeader","soughtHeader","_i","_Object$keys","Object","keys","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","isArrayBuffer","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","prototype","call","module","exports","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","d","a","definition","o","defineProperty","enumerable","obj","prop","hasOwnProperty","r","Symbol","toStringTag","_regeneratorRuntime","t","i","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","self","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","LambdaClient","_AWSClient","commonHeaders","fn","_callee","payload","invocationType","signedRequest","res","logResult","functionError","_args","_context","logType","clientContext","qualifier","sign","http","_handle_error","executedVersion","encoding","statusCode","status","LambdaInvocationError","args","_x","_x2","errorCode","error_code","errorMessage","awsError"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/s3.js b/dist/s3.js index 22cec96..1c9d45b 100644 --- a/dist/s3.js +++ b/dist/s3.js @@ -1,3 +1,3 @@ /*! For license information please see s3.js.LICENSE.txt */ -(()=>{"use strict";var t={n:e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],s=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rw,InvalidAWSConfigError:()=>O,InvalidSignatureError:()=>st,S3Bucket:()=>It,S3Client:()=>Dt,S3MultipartUpload:()=>Nt,S3Object:()=>Rt,S3Part:()=>Mt,S3ServiceError:()=>qt});var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,"_protocol",void 0),a(this,"_hostname",void 0),a(this,"_port",void 0);var r=!e.startsWith("http://")&&!e.startsWith("https://")?"".concat(t.DEFAULT_PROTOCOL,"://").concat(e):e,o=r.match(/^https?:/),i=n(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=o?o[0].slice(0,-1):t.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return e=t,(r=[{key:"copy",value:function(){return new t(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(t){var e=n(t.split(":"),2),r=e[0],o=e[1];this._hostname=r,this._port=o?parseInt(o):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(t){this._hostname=t}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(e){var r=e.match(/^https?:/),o=n(e.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):t.DEFAULT_PROTOCOL,this._hostname=o.split(":")[0],this._port=o.split(":")[1]?parseInt(o.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(t){this._port=t}},{key:"protocol",get:function(){return this._protocol},set:function(t){this._protocol=t}}])&&i(e.prototype,r),o&&i(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,o}();function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function l(t,e,r){return e=y(e),function(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,r||[],y(t).constructor):e.apply(t,r))}function f(t){var e="function"==typeof Map?new Map:void 0;return f=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&h(o,r.prototype),o}(t,arguments,y(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,t)},f(t)}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var r=0;r128)throw new O("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(e.accessKeyId.length));if(!e.secretAccessKey||""===e.secretAccessKey)throw new O("invalid AWS secret access key; reason: expected a non empty string, got `".concat(e.secretAccessKey,"`"));this.region=e.region,this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,void 0!==e.sessionToken&&(this.sessionToken=e.sessionToken),void 0!==e.endpoint&&("string"==typeof e.endpoint?this.endpoint=new s(e.endpoint):this.endpoint=e.endpoint)}return b(t,null,[{key:"fromEnvironment",value:function(e){return new t({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==e?void 0:e.endpoint})}}])}(),O=function(t){function e(t){return d(this,e),l(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(e,t),b(e)}(f(Error));const j=require("k6/crypto");var S=t.n(j),_="X-Amz-Date",P="X-Amz-Signature",E="X-Amz-Security-Token",k="x-amz-content-sha256",T=_.toLowerCase(),C=P.toLowerCase(),x=("X-Amz-Target".toLowerCase(),E.toLowerCase()),A="authorization",L=[A,T,"date"],D="host",I={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},R="aws4_request",N="AWS4-HMAC-SHA256";const M=require("k6/html");function q(t){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q(t)}function K(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{},r=et(et({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),e),n=lt(r.signingDate),o=n.longDate,i=n.shortDate,a=r.signingService||this.service,c=r.signingRegion||this.region,s="".concat(i,"/").concat(c,"/").concat(a,"/").concat(R);t.headers[D]||(t.headers[D]=t.endpoint.hostname);for(var u=0,l=Object.keys(t.headers);u-1&&delete t.headers[f]}t.headers[T]=o,this.credentials.sessionToken&&(t.headers[x]=this.credentials.sessionToken),ArrayBuffer.isView(t.body)&&(t.body=t.body.buffer),t.body||(t.body="");var p=this.computePayloadHash(t);!function(t,e){t=t.toLowerCase();for(var r=0,n=Object.keys(e);r1&&void 0!==arguments[1]?arguments[1]:{},r=e.signingDate,n=void 0===r?new Date:r,o=e.expiresIn,i=void 0===o?3600:o,a=e.unsignableHeaders,c=e.unhoistableHeaders,s=e.signableHeaders,u=e.signingRegion,l=e.signingService,f=lt(n),p=f.longDate,h=f.shortDate,y=u||this.region,d=l||this.service;if(i>604800)throw new st("Signature version 4 presigned URLs can't be valid for more than 7 days");var v="".concat(h,"/").concat(y,"/").concat(d,"/").concat(R),b=this.moveHeadersToQuery(t,{unhoistableHeaders:c});b.headers[D]||(b.headers[D]=t.endpoint.hostname),this.credentials.sessionToken&&(b.query[E]=this.credentials.sessionToken),b.query["X-Amz-Algorithm"]=N,b.query["X-Amz-Credential"]="".concat(this.credentials.accessKeyId,"/").concat(v),b.query[_]=p,b.query["X-Amz-Expires"]=i.toString(10);var m=this.computeCanonicalHeaders(b,a,s);b.query["X-Amz-SignedHeaders"]=Object.keys(m).sort().join(";");var g=this.deriveSigningKey(this.credentials,d,y,h),w=this.computePayloadHash(t),O=this.createCanonicalRequest(b,m,w);b.query[P]=this.calculateSignature(p,v,g,O);var j=b.endpoint.href;return b.path&&(j+=b.path),b.query&&(j+="?".concat(this.serializeQueryParameters(b.query))),et({url:j},b)}},{key:"createCanonicalRequest",value:function(t,e,r){var n=Object.keys(e).sort(),o=n.map((function(t){return"".concat(t,":").concat(e[t])})).join("\n"),i=n.join(";");return"".concat(t.method,"\n")+"".concat(this.computeCanonicalURI(t),"\n")+"".concat(this.computeCanonicalQuerystring(t),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(t,e,r){var n=S().sha256(r,"hex");return"".concat(N,"\n")+"".concat(t,"\n")+"".concat(e,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(t,e,r,n){var o=this.createStringToSign(t,e,n);return S().hmac("sha256",r,o,"hex")}},{key:"deriveSigningKey",value:function(t,e,r,n){var o=t.secretAccessKey,i=S().hmac("sha256","AWS4"+o,n,"binary"),a=S().hmac("sha256",i,r,"binary"),c=S().hmac("sha256",a,e,"binary");return S().hmac("sha256",c,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(t){var e=t.path;if(this.uriEscapePath){var r,n=[],o=J(e.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(t){o.e(t)}finally{o.f()}var a=null!=e&&e.startsWith("/")?"/":"",c=n.join("/"),s=n.length>0&&null!=e&&e.endsWith("/")?"/":"",u="".concat(a).concat(c).concat(s);return encodeURIComponent(u).replace(/%2F/g,"/")}return e}},{key:"computeCanonicalQuerystring",value:function(t){var e,r=t.query,n=void 0===r?{}:r,o=[],i={},a=function(t){if(t.toLowerCase()===C)return 1;o.push(t);var e=n[t];"string"==typeof e?i[t]="".concat(ut(t),"=").concat(ut(e)):Array.isArray(e)&&(i[t]=e.slice(0).sort().reduce((function(e,r){return e.concat(["".concat(ut(t),"=").concat(ut(r))])}),[]).join("&"))},c=J(Object.keys(n).sort());try{for(c.s();!(e=c.n()).done;){a(e.value)}}catch(t){c.e(t)}finally{c.f()}return o.map((function(t){return i[t]})).filter((function(t){return t})).join("&")}},{key:"computeCanonicalHeaders",value:function(t,e,r){var n,o=t.headers,i={},a=J(Object.keys(o).sort());try{for(a.s();!(n=a.n()).done;){var c=n.value;if(null!=o[c]){var s=c.toLowerCase();(s in I||null!=e&&e.has(s))&&(!r||r&&!r.has(s))||"string"==typeof o[c]&&(i[s]=o[c]=o[c].trim().replace(/\s+/g," "))}}}catch(t){a.e(t)}finally{a.f()}return i}},{key:"computePayloadHash",value:function(t){var e,r=t.headers,n=t.body;return r[k]?r[k]:null==n?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":"string"==typeof n||(e=n,"function"==typeof ArrayBuffer&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e)))?S().sha256(n,"hex").toLowerCase():ArrayBuffer.isView(n)?S().sha256(n.buffer,"hex").toLowerCase():"UNSIGNED-PAYLOAD"}},{key:"moveHeadersToQuery",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(t)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function Ot(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function jt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ot(i,n,o,a,c,"next",t)}function c(t){Ot(i,n,o,a,c,"throw",t)}a(void 0)}))}}function St(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _t(t,e){for(var r=0;r".concat(t.partNumber,"").concat(t.eTag,"")})).join(""),""),(c=this.endpoint.copy()).hostname="".concat(e,".").concat(this.endpoint.hostname),s=this.signature.sign({method:i,endpoint:c,path:"/".concat(r),headers:{},body:a,query:{uploadId:"".concat(n)}},{}),t.next=7,pt().asyncRequest(i,s.url,s.body||null,{headers:s.headers});case 7:u=t.sent,this._handle_error("CompleteMultipartUpload",u);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,r,o){return n.apply(this,arguments)})},{key:"abortMultipartUpload",value:(r=jt(wt().mark((function t(e,r,n){var o,i,a,c;return wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o="DELETE",(i=this.endpoint.copy()).hostname="".concat(e,".").concat(this.endpoint.hostname),a=this.signature.sign({method:o,endpoint:i,path:"/".concat(r),headers:{},query:{uploadId:"".concat(n)}},{}),t.next=6,pt().asyncRequest(o,a.url,a.body||null,{headers:a.headers});case 6:c=t.sent,this._handle_error("AbortMultipartUpload",c);case 8:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return r.apply(this,arguments)})},{key:"_handle_error",value:function(t,e){var r=e.status,n=e.error_code,o=e.error;if(!(r>=200&&r<300&&""==o&&0===n)){if(301==r||o&&o.startsWith("301"))throw new qt("Resource not found","ResourceNotFound",t);var i=F.parseXML(e.body);if("AuthorizationHeaderMalformed"===i.code)throw new st(i.message,i.code);throw new qt(i.message,i.code||"unknown",t)}}}]);var r,n,o,i,a,c,s,u,l,f}(function(){return t=function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),dt(this,"awsConfig",void 0),dt(this,"serviceName",void 0),dt(this,"_endpoint",void 0),this.awsConfig=e,this.serviceName=r,null!=e.endpoint&&(this._endpoint=e.endpoint)},(e=[{key:"endpoint",get:function(){return null==this._endpoint&&(this._endpoint=new s("https://".concat(this.serviceName,".").concat(this.awsConfig.region,".amazonaws.com"))),this._endpoint},set:function(t){this._endpoint=t}}])&&yt(t.prototype,e),r&&yt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}()),It=Pt((function t(e,r){St(this,t),At(this,"name",void 0),At(this,"creationDate",void 0),this.name=e,this.creationDate=r})),Rt=Pt((function t(e,r,n,o,i,a){St(this,t),At(this,"key",void 0),At(this,"lastModified",void 0),At(this,"etag",void 0),At(this,"size",void 0),At(this,"storageClass",void 0),At(this,"data",void 0),this.key=e,this.lastModified=r,this.etag=n,this.size=o,this.storageClass=i,this.data=a})),Nt=Pt((function t(e,r){St(this,t),At(this,"key",void 0),At(this,"uploadId",void 0),this.key=e,this.uploadId=r})),Mt=Pt((function t(e,r){St(this,t),At(this,"partNumber",void 0),At(this,"eTag",void 0),this.partNumber=e,this.eTag=r})),qt=function(t){function e(t,r,n){var o;return St(this,e),At(o=Et(this,e,[t,r]),"operation",void 0),o.name="S3ServiceError",o.operation=n,o}return Ct(e,t),Pt(e)}(F),Kt=exports;for(var Ut in e)Kt[Ut]=e[Ut];e.__esModule&&Object.defineProperty(Kt,"__esModule",{value:!0})})(); +(()=>{"use strict";var t={n:e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],s=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rw,InvalidAWSConfigError:()=>O,InvalidSignatureError:()=>pt,S3Bucket:()=>qt,S3Client:()=>Mt,S3MultipartUpload:()=>Ut,S3Object:()=>Kt,S3Part:()=>Ht,S3ServiceError:()=>zt});var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,"_protocol",void 0),a(this,"_hostname",void 0),a(this,"_port",void 0);var r=!e.startsWith("http://")&&!e.startsWith("https://")?"".concat(t.DEFAULT_PROTOCOL,"://").concat(e):e,o=r.match(/^https?:/),i=n(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=o?o[0].slice(0,-1):t.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return e=t,(r=[{key:"copy",value:function(){return new t(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(t){var e=n(t.split(":"),2),r=e[0],o=e[1];this._hostname=r,this._port=o?parseInt(o):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(t){this._hostname=t}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(e){var r=e.match(/^https?:/),o=n(e.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):t.DEFAULT_PROTOCOL,this._hostname=o.split(":")[0],this._port=o.split(":")[1]?parseInt(o.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(t){this._port=t}},{key:"protocol",get:function(){return this._protocol},set:function(t){this._protocol=t}}])&&i(e.prototype,r),o&&i(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,o}();function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function l(t,e,r){return e=y(e),function(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,r||[],y(t).constructor):e.apply(t,r))}function f(t){var e="function"==typeof Map?new Map:void 0;return f=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&h(o,r.prototype),o}(t,arguments,y(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,t)},f(t)}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var r=0;r128)throw new O("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(e.accessKeyId.length));if(!e.secretAccessKey||""===e.secretAccessKey)throw new O("invalid AWS secret access key; reason: expected a non empty string, got `".concat(e.secretAccessKey,"`"));this.region=e.region,this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,void 0!==e.sessionToken&&(this.sessionToken=e.sessionToken),void 0!==e.endpoint&&("string"==typeof e.endpoint?this.endpoint=new s(e.endpoint):this.endpoint=e.endpoint)}return b(t,null,[{key:"fromEnvironment",value:function(e){return new t({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==e?void 0:e.endpoint})}}])}(),O=function(t){function e(t){return d(this,e),l(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(e,t),b(e)}(f(Error));const j=require("k6/crypto");var S=t.n(j),_="X-Amz-Date",P="X-Amz-Signature",E="X-Amz-Security-Token",k="x-amz-content-sha256",T=_.toLowerCase(),C=P.toLowerCase(),x=("X-Amz-Target".toLowerCase(),E.toLowerCase()),A="authorization",L=[A,T,"date"],D="host",I={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},R="aws4_request",N="AWS4-HMAC-SHA256";const M=require("k6/html");function q(t){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q(t)}function K(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function nt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{},r=it(it({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),e),n=yt(r.signingDate),o=n.longDate,i=n.shortDate,a=r.signingService||this.service,c=r.signingRegion||this.region,s="".concat(i,"/").concat(c,"/").concat(a,"/").concat(R);t.headers[D]||(t.headers[D]=t.endpoint.hostname);for(var u=0,l=Object.keys(t.headers);u-1&&delete t.headers[f]}t.headers[T]=o,this.credentials.sessionToken&&(t.headers[x]=this.credentials.sessionToken),ArrayBuffer.isView(t.body)&&(t.body=t.body.buffer),t.body||(t.body="");var p=this.computePayloadHash(t);!function(t,e){t=t.toLowerCase();for(var r=0,n=Object.keys(e);r1&&void 0!==arguments[1]?arguments[1]:{},r=e.signingDate,n=void 0===r?new Date:r,o=e.expiresIn,i=void 0===o?3600:o,a=e.unsignableHeaders,c=e.unhoistableHeaders,s=e.signableHeaders,u=e.signingRegion,l=e.signingService,f=yt(n),p=f.longDate,h=f.shortDate,y=u||this.region,d=l||this.service;if(i>604800)throw new pt("Signature version 4 presigned URLs can't be valid for more than 7 days");var v="".concat(h,"/").concat(y,"/").concat(d,"/").concat(R),b=this.moveHeadersToQuery(t,{unhoistableHeaders:c});b.headers[D]||(b.headers[D]=t.endpoint.hostname),this.credentials.sessionToken&&(b.query[E]=this.credentials.sessionToken),b.query["X-Amz-Algorithm"]=N,b.query["X-Amz-Credential"]="".concat(this.credentials.accessKeyId,"/").concat(v),b.query[_]=p,b.query["X-Amz-Expires"]=i.toString(10);var m=this.computeCanonicalHeaders(b,a,s);b.query["X-Amz-SignedHeaders"]=Object.keys(m).sort().join(";");var g=this.deriveSigningKey(this.credentials,d,y,h),w=this.computePayloadHash(t),O=this.createCanonicalRequest(b,m,w);b.query[P]=this.calculateSignature(p,v,g,O);var j=b.endpoint.href;return b.path&&(j+=b.path),b.query&&(j+="?".concat(this.serializeQueryParameters(b.query))),it({url:j},b)}},{key:"createCanonicalRequest",value:function(t,e,r){var n=Object.keys(e).sort(),o=n.map((function(t){return"".concat(t,":").concat(e[t])})).join("\n"),i=n.join(";");return"".concat(t.method,"\n")+"".concat(this.computeCanonicalURI(t),"\n")+"".concat(this.computeCanonicalQuerystring(t),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(t,e,r){var n=S().sha256(r,"hex");return"".concat(N,"\n")+"".concat(t,"\n")+"".concat(e,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(t,e,r,n){var o=this.createStringToSign(t,e,n);return S().hmac("sha256",r,o,"hex")}},{key:"deriveSigningKey",value:function(t,e,r,n){var o=t.secretAccessKey,i=S().hmac("sha256","AWS4"+o,n,"binary"),a=S().hmac("sha256",i,r,"binary"),c=S().hmac("sha256",a,e,"binary");return S().hmac("sha256",c,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(t){var e=t.path;if(this.uriEscapePath){var r,n=[],o=rt(e.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(t){o.e(t)}finally{o.f()}var a=null!=e&&e.startsWith("/")?"/":"",c=n.join("/"),s=n.length>0&&null!=e&&e.endsWith("/")?"/":"",u="".concat(a).concat(c).concat(s);return encodeURIComponent(u).replace(/%2F/g,"/")}return e}},{key:"computeCanonicalQuerystring",value:function(t){var e,r=t.query,n=void 0===r?{}:r,o=[],i={},a=function(t){if(t.toLowerCase()===C)return 1;o.push(t);var e=n[t];"string"==typeof e?i[t]="".concat(ht(t),"=").concat(ht(e)):Array.isArray(e)&&(i[t]=e.slice(0).sort().reduce((function(e,r){return e.concat(["".concat(ht(t),"=").concat(ht(r))])}),[]).join("&"))},c=rt(Object.keys(n).sort());try{for(c.s();!(e=c.n()).done;){a(e.value)}}catch(t){c.e(t)}finally{c.f()}return o.map((function(t){return i[t]})).filter((function(t){return t})).join("&")}},{key:"computeCanonicalHeaders",value:function(t,e,r){var n,o=t.headers,i={},a=rt(Object.keys(o).sort());try{for(a.s();!(n=a.n()).done;){var c=n.value;if(null!=o[c]){var s=c.toLowerCase();(s in I||null!=e&&e.has(s))&&(!r||r&&!r.has(s))||"string"==typeof o[c]&&(i[s]=o[c]=o[c].trim().replace(/\s+/g," "))}}}catch(t){a.e(t)}finally{a.f()}return i}},{key:"computePayloadHash",value:function(t){var e,r=t.headers,n=t.body;return r[k]?r[k]:null==n?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":"string"==typeof n||(e=n,"function"==typeof ArrayBuffer&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e)))?S().sha256(n,"hex").toLowerCase():ArrayBuffer.isView(n)?S().sha256(n.buffer,"hex").toLowerCase():"UNSIGNED-PAYLOAD"}},{key:"moveHeadersToQuery",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(t)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function Pt(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Et(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Pt(i,n,o,a,c,"next",t)}function c(t){Pt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function kt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tt(t,e){for(var r=0;r".concat(t.partNumber,"").concat(t.eTag,"")})).join(""),""),(c=this.endpoint.copy()).hostname="".concat(e,".").concat(this.endpoint.hostname),s=this.signature.sign({method:i,endpoint:c,path:"/".concat(r),headers:{},body:a,query:{uploadId:"".concat(n)}},{}),t.next=7,vt().asyncRequest(i,s.url,s.body||null,{headers:s.headers});case 7:u=t.sent,this._handle_error("CompleteMultipartUpload",u);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,r,o){return n.apply(this,arguments)})},{key:"abortMultipartUpload",value:(r=Et(_t().mark((function t(e,r,n){var o,i,a,c;return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o="DELETE",(i=this.endpoint.copy()).hostname="".concat(e,".").concat(this.endpoint.hostname),a=this.signature.sign({method:o,endpoint:i,path:"/".concat(r),headers:{},query:{uploadId:"".concat(n)}},{}),t.next=6,vt().asyncRequest(o,a.url,a.body||null,{headers:a.headers});case 6:c=t.sent,this._handle_error("AbortMultipartUpload",c);case 8:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return r.apply(this,arguments)})},{key:"_handle_error",value:function(t,e){var r=e.status,n=e.error_code,o=e.error;if(!(r>=200&&r<300&&""==o&&0===n)){if(301==r||o&&o.startsWith("301"))throw new zt("Resource not found","ResourceNotFound",t);var i=Y.parseXML(e.body);if("AuthorizationHeaderMalformed"===i.code)throw new pt(i.message,i.code);throw new zt(i.message,i.code||"unknown",t)}}}]);var r,n,o,i,a,c,s,u,l,f}(function(){return t=function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),gt(this,"awsConfig",void 0),gt(this,"serviceName",void 0),gt(this,"_endpoint",void 0),this.awsConfig=e,this.serviceName=r,null!=e.endpoint&&(this._endpoint=e.endpoint)},(e=[{key:"endpoint",get:function(){return null==this._endpoint&&(this._endpoint=new s("https://".concat(this.serviceName,".").concat(this.awsConfig.region,".amazonaws.com"))),this._endpoint},set:function(t){this._endpoint=t}}])&&mt(t.prototype,e),r&&mt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}()),qt=Ct((function t(e,r){kt(this,t),Rt(this,"name",void 0),Rt(this,"creationDate",void 0),this.name=e,this.creationDate=r})),Kt=Ct((function t(e,r,n,o,i,a){kt(this,t),Rt(this,"key",void 0),Rt(this,"lastModified",void 0),Rt(this,"etag",void 0),Rt(this,"size",void 0),Rt(this,"storageClass",void 0),Rt(this,"data",void 0),this.key=e,this.lastModified=r,this.etag=n,this.size=o,this.storageClass=i,this.data=a})),Ut=Ct((function t(e,r){kt(this,t),Rt(this,"key",void 0),Rt(this,"uploadId",void 0),this.key=e,this.uploadId=r})),Ht=Ct((function t(e,r){kt(this,t),Rt(this,"partNumber",void 0),Rt(this,"eTag",void 0),this.partNumber=e,this.eTag=r})),zt=function(t){function e(t,r,n){var o;return kt(this,e),Rt(o=xt(this,e,[t,r]),"operation",void 0),o.name="S3ServiceError",o.operation=n,o}return Dt(e,t),Ct(e)}(Y),Wt=exports;for(var Bt in e)Wt[Bt]=e[Bt];e.__esModule&&Object.defineProperty(Wt,"__esModule",{value:!0})})(); //# sourceMappingURL=s3.js.map \ No newline at end of file diff --git a/dist/s3.js.map b/dist/s3.js.map index cdb9101..74d2fba 100644 --- a/dist/s3.js.map +++ b/dist/s3.js.map @@ -1 +1 @@ -{"version":3,"file":"s3.js","mappings":";mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAA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BAAAA,GAAA,4BAAAA,GAAA,oBACEW,KAAK5B,IAAMA,EACX4B,KAAKiW,aAAeA,EACpBjW,KAAKkW,KAAOA,EACZlW,KAAKmW,KAAOA,EACZnW,KAAKoW,aAAeA,EACpBpW,KAAKiX,KAAOA,CAChB,IAISmC,GAAiB9X,IAU1B,SAAA8X,EAAYhb,EAAaqb,GAAkBra,GAAA,KAAAga,GAAA/Z,GAAA,mBAAAA,GAAA,wBACvCW,KAAK5B,IAAMA,EACX4B,KAAKyZ,SAAWA,CACpB,IAISG,GAAMtY,IAUf,SAAAsY,EAAYF,EAAoBa,GAAcnb,GAAA,KAAAwa,GAAAva,GAAA,0BAAAA,GAAA,oBAC1CW,KAAK0Z,WAAaA,EAClB1Z,KAAKua,KAAOA,CAChB,IAWSgB,GAAc,SAAA7O,GAUvB,SAAA6O,EAAY1Z,EAAiB8B,EAAcuX,GAAmB,IAAAU,EAGhC,OAHgCxc,GAAA,KAAAmc,GACtClc,GAApBuc,EAAA9Z,GAAA,KAAAyZ,EAAA,CAAM1Z,EAAS8B,IAAK,oBACpBiY,EAAK/X,KAAO,iBACZ+X,EAAKV,UAAYA,EAASU,CAC9B,CAAC,OAAA7Z,GAAAwZ,EAAA7O,GAAApL,GAAAia,EAAA,CAdsB,CAAS7X","sources":["webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/./src/internal/s3.ts","webpack://k6-jslib-aws/./src/internal/client.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/crypto\");","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/html\");","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/http\");","import { bytes } from 'k6'\nimport { parseHTML } from 'k6/html'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { SignedHTTPRequest } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/** Class allowing to interact with Amazon AWS's S3 service */\nexport class S3Client extends AWSClient {\n private readonly signature: SignatureV4\n\n /**\n * Create a S3Client\n *\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 's3')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: false,\n applyChecksum: true,\n })\n }\n\n /**\n * Returns a list of all buckets owned by the authenticated sender of the request.\n * To use this operation, you must have the s3:ListAllMyBuckets permission.\n *\n * @return {Array.} buckets - An array of objects describing S3 buckets\n * with the following fields: name, and creationDate.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async listBuckets(): Promise> {\n const method = 'GET'\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'GET',\n endpoint: this.endpoint,\n path: '/',\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('ListBuckets', res)\n\n const buckets: Array = []\n\n const doc = parseHTML(res.body as string)\n\n doc.find('Buckets')\n .children()\n .each((_, bucketDefinition) => {\n const bucket = {}\n\n bucketDefinition.children().forEach((child) => {\n switch (child.nodeName()) {\n case 'name':\n Object.assign(bucket, { name: child.textContent() })\n break\n case 'creationdate':\n Object.assign(bucket, {\n creationDate: Date.parse(child.textContent()),\n })\n }\n })\n\n buckets.push(bucket as S3Bucket)\n })\n\n return buckets\n }\n\n /**\n * Returns some or all (up to 1,000) of the objects in a bucket.\n *\n * @param {string} bucketName - Bucket name to list.\n * @param {string?} prefix='' - Limits the response to keys that begin with the specified prefix.\n * @return {Array.} - returns an array of objects describing S3 objects\n * with the following fields: key, lastModified, etag, size and storageClass.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async listObjects(bucketName: string, prefix?: string): Promise> {\n const method = 'GET'\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/`,\n query: {\n 'list-type': '2',\n prefix: prefix || '',\n },\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('ListObjectsV2', res)\n\n const objects: Array = []\n\n // Extract the objects definition from\n // the XML response\n parseHTML(res.body as string)\n .find('Contents')\n .each((_, objectDefinition) => {\n const obj = {}\n\n objectDefinition.children().forEach((child) => {\n switch (child.nodeName()) {\n case 'key':\n Object.assign(obj, { key: child.textContent() })\n break\n case 'lastmodified':\n Object.assign(obj, { lastModified: Date.parse(child.textContent()) })\n break\n case 'etag':\n Object.assign(obj, { etag: child.textContent() })\n break\n case 'size':\n Object.assign(obj, { size: parseInt(child.textContent()) })\n break\n case 'storageclass':\n Object.assign(obj, { storageClass: child.textContent() })\n }\n })\n\n objects.push(obj as S3Object)\n })\n\n return objects\n }\n /**\n * Retrieves an Object from Amazon S3.\n *\n * To use getObject, you must have `READ` access to the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to get.\n * @return {S3Object} - returns the content of the fetched S3 Object.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async getObject(bucketName: string, objectKey: string): Promise {\n // Prepare request\n const method = 'GET'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('GetObject', res)\n\n return new S3Object(\n objectKey,\n Date.parse(res.headers['Last-Modified']),\n res.headers['ETag'],\n parseInt(res.headers['Content-Length']),\n\n // The X-Amz-Storage-Class header is only set if the storage class is\n // not the default 'STANDARD' one.\n (res.headers['X-Amz-Storage-Class'] ?? 'STANDARD') as StorageClass,\n\n res.body\n )\n }\n /**\n * Adds an object to a bucket.\n *\n * You must have WRITE permissions on a bucket to add an object to it.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to put.\n * @param {string | ArrayBuffer} data - the content of the S3 Object to upload.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async putObject(\n bucketName: string,\n objectKey: string,\n data: string | ArrayBuffer,\n params?: PutObjectParams\n ): Promise {\n // Prepare request\n const method = 'PUT'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {\n Host: this.endpoint.host,\n ...(params?.contentDisposition && {\n 'Content-Disposition': params.contentDisposition,\n }),\n ...(params?.contentEncoding && { 'Content-Encoding': params.contentEncoding }),\n ...(params?.contentLength && { 'Content-Length': params.contentLength }),\n ...(params?.contentMD5 && { 'Content-MD5': params.contentMD5 }),\n ...(params?.contentType && { 'Content-Type': params.contentType }),\n },\n body: data,\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error('PutObject', res)\n }\n\n /**\n * Removes the null version (if there is one) of an object and inserts a delete marker,\n * which becomes the latest version of the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async deleteObject(bucketName: string, objectKey: string): Promise {\n // Prepare request\n const method = 'DELETE'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('DeleteObject', res)\n }\n\n /**\n * Copies an object from one bucket to another\n *\n * @param {string} sourceBucket - The source bucket name containing the object.\n * @param {string} sourceKey - Key of the source object to copy.\n * @param {string} destinationBucket - The destination bucket name containing the object.\n * @param {string} destinationKey - Key of the destination object.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async copyObject(\n sourceBucket: string,\n sourceKey: string,\n destinationBucket: string,\n destinationKey: string\n ): Promise {\n const method = 'PUT'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${destinationBucket}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${destinationKey}`,\n headers: {\n 'x-amz-copy-source': `${sourceBucket}/${sourceKey}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n\n this._handle_error('CopyObject', res)\n }\n\n /**\n * Creates a new multipart upload for a given objectKey.\n * The uploadId returned can be used to upload parts to the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to upload.\n * @return {S3MultipartUpload} - returns the uploadId of the newly created multipart upload.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async createMultipartUpload(bucketName: string, objectKey: string): Promise {\n const method = 'POST'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n query: { uploads: '' },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('CreateMultipartUpload', res)\n\n return new S3MultipartUpload(\n objectKey,\n parseHTML(res.body as string)\n .find('UploadId')\n .text()\n )\n }\n\n /**\n * Uploads a part in a multipart upload.\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to upload.\n * @param {string} uploadId - The uploadId of the multipart upload.\n * @param {number} partNumber - The part number of the part to upload.\n * @param {string | ArrayBuffer} data - The content of the part to upload.\n * @return {S3Part} - returns the ETag of the uploaded part.\n * @throws {S3ServiceError}\n */\n async uploadPart(\n bucketName: string,\n objectKey: string,\n uploadId: string,\n partNumber: number,\n data: string | ArrayBuffer\n ): Promise {\n const method = 'PUT'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n body: data,\n query: {\n partNumber: `${partNumber}`,\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('UploadPart', res)\n\n return new S3Part(partNumber, res.headers['Etag'])\n }\n\n /**\n * Completes a multipart upload by assembling previously uploaded parts.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @param {string} uploadId - The uploadId of the multipart upload to complete.\n * @param {S3Part[]} parts - The parts to assemble.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async completeMultipartUpload(\n bucketName: string,\n objectKey: string,\n uploadId: string,\n parts: S3Part[]\n ) {\n // Prepare request\n const method = 'POST'\n const body = `${parts\n .map(\n (part) =>\n `${part.partNumber}${part.eTag}`\n )\n .join('')}`\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n body: body,\n query: {\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n\n this._handle_error('CompleteMultipartUpload', res)\n }\n\n /**\n * Aborts a multipart upload.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @param {string} uploadId - The uploadId of the multipart upload to abort.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async abortMultipartUpload(bucketName: string, objectKey: string, uploadId: string) {\n const method = 'DELETE'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n query: {\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('AbortMultipartUpload', res)\n }\n\n _handle_error(operation: S3Operation, response: RefinedResponse) {\n const status: number = response.status\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n // We consider codes 200-299 as success\n if (status >= 200 && status < 300 && errorMessage == '' && errorCode === 0) {\n return\n }\n\n // A 301 response is returned when the bucket is not found.\n // Generally meaning that either the bucket name is wrong or the\n // region is wrong.\n //\n // See: https://github.com/grafana/k6/issues/2474\n // See: https://github.com/golang/go/issues/49281\n if (status == 301 || (errorMessage && errorMessage.startsWith('301'))) {\n throw new S3ServiceError('Resource not found', 'ResourceNotFound', operation)\n }\n\n const awsError = AWSError.parseXML(response.body as string)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw new S3ServiceError(awsError.message, awsError.code || 'unknown', operation)\n }\n }\n}\n\n/** Class representing a S3 Bucket */\nexport class S3Bucket {\n name: string\n creationDate: Date\n\n /**\n * Create an S3 Bucket\n *\n * @param {string} name - S3 bucket's name\n * @param {Date} creationDate - S3 bucket's creation date\n */\n constructor(name: string, creationDate: Date) {\n this.name = name\n this.creationDate = creationDate\n }\n}\n\n/** Class representing an S3 Object */\nexport class S3Object {\n key: string\n lastModified: number\n etag: string\n size: number\n storageClass: StorageClass\n data?: string | bytes | null\n\n /**\n * Create an S3 Object\n *\n * @param {string} key - S3 object's key\n * @param {Date} lastModified - S3 object last modification date\n * @param {string} etag - S3 object's etag\n * @param {number} size - S3 object's size\n * @param {StorageClass} storageClass - S3 object's storage class\n * @param {string | bytes | null} data=null - S3 Object's data\n */\n constructor(\n key: string,\n lastModified: number,\n etag: string,\n size: number,\n storageClass: StorageClass,\n data?: string | bytes | null\n ) {\n this.key = key\n this.lastModified = lastModified\n this.etag = etag\n this.size = size\n this.storageClass = storageClass\n this.data = data\n }\n}\n\n/** Class representing a S3 Multipart Upload */\nexport class S3MultipartUpload {\n key: string\n uploadId: string\n\n /**\n * Create an S3 Multipart Upload\n * @param {string} key - S3 object's key\n * @param {string} uploadId - S3 multipart upload id\n */\n\n constructor(key: string, uploadId: string) {\n this.key = key\n this.uploadId = uploadId\n }\n}\n\n/** Class representing a S3 Part */\nexport class S3Part {\n partNumber: number\n eTag: string\n\n /**\n * Create an S3 Part\n * @param {number} partNumber - Part number\n * @param {string} eTag - Part's etag\n */\n\n constructor(partNumber: number, eTag: string) {\n this.partNumber = partNumber\n this.eTag = eTag\n }\n}\n\n/**\n * Error indicating a S3 operation failed\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class S3ServiceError extends AWSError {\n operation: string\n\n /**\n * Constructs a S3ServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: string) {\n super(message, code)\n this.name = 'S3ServiceError'\n this.operation = operation\n }\n}\n\n/**\n * S3Operation describes possible values for S3 API operations,\n * as defined by AWS APIs.\n */\ntype S3Operation =\n | 'ListBuckets'\n | 'ListObjectsV2'\n | 'GetObject'\n | 'PutObject'\n | 'DeleteObject'\n | 'CopyObject'\n | 'CreateMultipartUpload'\n | 'CompleteMultipartUpload'\n | 'UploadPart'\n | 'AbortMultipartUpload'\n\n/**\n * Describes the class of storage used to store a S3 object.\n */\ntype StorageClass =\n | 'STANDARD'\n | 'REDUCED_REDUNDANCY'\n | 'GLACIER'\n | 'STANDARD_IA'\n | 'INTELLIGENT_TIERING'\n | 'DEEP_ARCHIVE'\n | 'OUTPOSTS'\n | 'GLACIER_IR'\n | undefined\n\n/**\n * PutObjectParams describes the parameters that can be passed to the PutObject operation.\n */\nexport interface PutObjectParams {\n /**\n * Specifies presentational information for the object.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.\n */\n contentDisposition?: string\n\n /**\n * Specifies what content encodings have been applied to the object and thus\n * what decoding mechanisms must be applied to obtain the media-type referenced\n * by the ContentType option.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.\n */\n contentEncoding?: string\n\n /**\n * Size of the body in bytes. This parameter is useful when the size of the body cannot be\n * determined automatically.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.\n */\n contentLength?: string\n\n /**\n * The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864.\n * This header can be used as a message integrity check to verify that the data is the same data that\n * was originally sent.\n *\n * Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity\n * check.\n */\n contentMD5?: string\n\n /**\n * A standard MIME type describing the format of the contents.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.\n */\n contentType?: string\n}\n","import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Endpoint","endpoint","_classCallCheck","_defineProperty","completeUrl","startsWith","concat","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","this","_protocol","slice","_hostname","_port","parseInt","undefined","href","set","_value$split2","hostname","port","protocol","host","AWSConfig","options","region","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","require","AMZ_DATE_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","_i","_Object$keys","keys","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","soughtHeader","hasHeader","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","_regeneratorRuntime","t","r","i","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","asyncGeneratorStep","gen","reject","_next","_throw","info","_asyncToGenerator","fn","self","args","apply","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","S3Client","_AWSClient","awsConfig","serviceName","_listBuckets","_callee","signedRequest","res","buckets","_context","sign","http","_handle_error","children","each","_","bucketDefinition","bucket","child","nodeName","assign","textContent","creationDate","_listObjects","_callee2","bucketName","prefix","objects","_context2","objectDefinition","lastModified","etag","size","storageClass","_x","_x2","_getObject","_callee3","objectKey","_res$headers$XAmzSt","_context3","S3Object","_x3","_x4","_putObject","_callee4","data","params","_context4","Host","contentDisposition","contentEncoding","contentLength","contentMD5","contentType","_x5","_x6","_x7","_x8","_deleteObject","_callee5","_context5","_x9","_x10","_copyObject","_callee6","sourceBucket","sourceKey","destinationBucket","destinationKey","bucketEndpoint","_context6","copy","_x11","_x12","_x13","_x14","_createMultipartUpload","_callee7","_context7","uploads","S3MultipartUpload","_x15","_x16","_uploadPart","_callee8","uploadId","partNumber","_context8","S3Part","_x17","_x18","_x19","_x20","_x21","_completeMultipartUpload","_callee9","parts","_context9","part","eTag","_x22","_x23","_x24","_x25","_abortMultipartUpload","_callee10","_context10","_x26","_x27","_x28","operation","status","errorCode","error_code","errorMessage","S3ServiceError","awsError","AWSClient","_endpoint","S3Bucket","_this2"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"s3.js","mappings":";mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa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,GAAA,oBAAAA,GAAA,oBAAAA,GAAA,4BAAAA,GAAA,oBACEW,KAAK5B,IAAMA,EACX4B,KAAKiW,aAAeA,EACpBjW,KAAKkW,KAAOA,EACZlW,KAAKmW,KAAOA,EACZnW,KAAKoW,aAAeA,EACpBpW,KAAKiX,KAAOA,CAChB,IAISmC,GAAiB9X,IAU1B,SAAA8X,EAAYhb,EAAaqb,GAAkBra,GAAA,KAAAga,GAAA/Z,GAAA,mBAAAA,GAAA,wBACvCW,KAAK5B,IAAMA,EACX4B,KAAKyZ,SAAWA,CACpB,IAISG,GAAMtY,IAUf,SAAAsY,EAAYF,EAAoBa,GAAcnb,GAAA,KAAAwa,GAAAva,GAAA,0BAAAA,GAAA,oBAC1CW,KAAK0Z,WAAaA,EAClB1Z,KAAKua,KAAOA,CAChB,IAWSgB,GAAc,SAAA7O,GAUvB,SAAA6O,EAAY1Z,EAAiB8B,EAAcuX,GAAmB,IAAAU,EAGhC,OAHgCxc,GAAA,KAAAmc,GACtClc,GAApBuc,EAAA9Z,GAAA,KAAAyZ,EAAA,CAAM1Z,EAAS8B,IAAK,oBACpBiY,EAAK/X,KAAO,iBACZ+X,EAAKV,UAAYA,EAASU,CAC9B,CAAC,OAAA7Z,GAAAwZ,EAAA7O,GAAApL,GAAAia,EAAA,CAdsB,CAAS7X","sources":["webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/./src/internal/s3.ts","webpack://k6-jslib-aws/./src/internal/client.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/crypto\");","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/html\");","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n\nexport class NetworkError extends Error {\n code: number;\n\n constructor(message: string, code: number) {\n super(message)\n this.name = 'NetworkError'\n this.code = code\n }\n}","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/http\");","import { bytes } from 'k6'\nimport { parseHTML } from 'k6/html'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AWSError } from './error'\nimport { SignedHTTPRequest } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/** Class allowing to interact with Amazon AWS's S3 service */\nexport class S3Client extends AWSClient {\n private readonly signature: SignatureV4\n\n /**\n * Create a S3Client\n *\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 's3')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: false,\n applyChecksum: true,\n })\n }\n\n /**\n * Returns a list of all buckets owned by the authenticated sender of the request.\n * To use this operation, you must have the s3:ListAllMyBuckets permission.\n *\n * @return {Array.} buckets - An array of objects describing S3 buckets\n * with the following fields: name, and creationDate.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async listBuckets(): Promise> {\n const method = 'GET'\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'GET',\n endpoint: this.endpoint,\n path: '/',\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('ListBuckets', res)\n\n const buckets: Array = []\n\n const doc = parseHTML(res.body as string)\n\n doc.find('Buckets')\n .children()\n .each((_, bucketDefinition) => {\n const bucket = {}\n\n bucketDefinition.children().forEach((child) => {\n switch (child.nodeName()) {\n case 'name':\n Object.assign(bucket, { name: child.textContent() })\n break\n case 'creationdate':\n Object.assign(bucket, {\n creationDate: Date.parse(child.textContent()),\n })\n }\n })\n\n buckets.push(bucket as S3Bucket)\n })\n\n return buckets\n }\n\n /**\n * Returns some or all (up to 1,000) of the objects in a bucket.\n *\n * @param {string} bucketName - Bucket name to list.\n * @param {string?} prefix='' - Limits the response to keys that begin with the specified prefix.\n * @return {Array.} - returns an array of objects describing S3 objects\n * with the following fields: key, lastModified, etag, size and storageClass.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async listObjects(bucketName: string, prefix?: string): Promise> {\n const method = 'GET'\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/`,\n query: {\n 'list-type': '2',\n prefix: prefix || '',\n },\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('ListObjectsV2', res)\n\n const objects: Array = []\n\n // Extract the objects definition from\n // the XML response\n parseHTML(res.body as string)\n .find('Contents')\n .each((_, objectDefinition) => {\n const obj = {}\n\n objectDefinition.children().forEach((child) => {\n switch (child.nodeName()) {\n case 'key':\n Object.assign(obj, { key: child.textContent() })\n break\n case 'lastmodified':\n Object.assign(obj, { lastModified: Date.parse(child.textContent()) })\n break\n case 'etag':\n Object.assign(obj, { etag: child.textContent() })\n break\n case 'size':\n Object.assign(obj, { size: parseInt(child.textContent()) })\n break\n case 'storageclass':\n Object.assign(obj, { storageClass: child.textContent() })\n }\n })\n\n objects.push(obj as S3Object)\n })\n\n return objects\n }\n /**\n * Retrieves an Object from Amazon S3.\n *\n * To use getObject, you must have `READ` access to the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to get.\n * @return {S3Object} - returns the content of the fetched S3 Object.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async getObject(bucketName: string, objectKey: string): Promise {\n // Prepare request\n const method = 'GET'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('GetObject', res)\n\n return new S3Object(\n objectKey,\n Date.parse(res.headers['Last-Modified']),\n res.headers['ETag'],\n parseInt(res.headers['Content-Length']),\n\n // The X-Amz-Storage-Class header is only set if the storage class is\n // not the default 'STANDARD' one.\n (res.headers['X-Amz-Storage-Class'] ?? 'STANDARD') as StorageClass,\n\n res.body\n )\n }\n /**\n * Adds an object to a bucket.\n *\n * You must have WRITE permissions on a bucket to add an object to it.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to put.\n * @param {string | ArrayBuffer} data - the content of the S3 Object to upload.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async putObject(\n bucketName: string,\n objectKey: string,\n data: string | ArrayBuffer,\n params?: PutObjectParams\n ): Promise {\n // Prepare request\n const method = 'PUT'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {\n Host: this.endpoint.host,\n ...(params?.contentDisposition && {\n 'Content-Disposition': params.contentDisposition,\n }),\n ...(params?.contentEncoding && { 'Content-Encoding': params.contentEncoding }),\n ...(params?.contentLength && { 'Content-Length': params.contentLength }),\n ...(params?.contentMD5 && { 'Content-MD5': params.contentMD5 }),\n ...(params?.contentType && { 'Content-Type': params.contentType }),\n },\n body: data,\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error('PutObject', res)\n }\n\n /**\n * Removes the null version (if there is one) of an object and inserts a delete marker,\n * which becomes the latest version of the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async deleteObject(bucketName: string, objectKey: string): Promise {\n // Prepare request\n const method = 'DELETE'\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: this.endpoint,\n path: `/${bucketName}/${objectKey}`,\n headers: {},\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('DeleteObject', res)\n }\n\n /**\n * Copies an object from one bucket to another\n *\n * @param {string} sourceBucket - The source bucket name containing the object.\n * @param {string} sourceKey - Key of the source object to copy.\n * @param {string} destinationBucket - The destination bucket name containing the object.\n * @param {string} destinationKey - Key of the destination object.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async copyObject(\n sourceBucket: string,\n sourceKey: string,\n destinationBucket: string,\n destinationKey: string\n ): Promise {\n const method = 'PUT'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${destinationBucket}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${destinationKey}`,\n headers: {\n 'x-amz-copy-source': `${sourceBucket}/${sourceKey}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n\n this._handle_error('CopyObject', res)\n }\n\n /**\n * Creates a new multipart upload for a given objectKey.\n * The uploadId returned can be used to upload parts to the object.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to upload.\n * @return {S3MultipartUpload} - returns the uploadId of the newly created multipart upload.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async createMultipartUpload(bucketName: string, objectKey: string): Promise {\n const method = 'POST'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n query: { uploads: '' },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('CreateMultipartUpload', res)\n\n return new S3MultipartUpload(\n objectKey,\n parseHTML(res.body as string)\n .find('UploadId')\n .text()\n )\n }\n\n /**\n * Uploads a part in a multipart upload.\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to upload.\n * @param {string} uploadId - The uploadId of the multipart upload.\n * @param {number} partNumber - The part number of the part to upload.\n * @param {string | ArrayBuffer} data - The content of the part to upload.\n * @return {S3Part} - returns the ETag of the uploaded part.\n * @throws {S3ServiceError}\n */\n async uploadPart(\n bucketName: string,\n objectKey: string,\n uploadId: string,\n partNumber: number,\n data: string | ArrayBuffer\n ): Promise {\n const method = 'PUT'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n body: data,\n query: {\n partNumber: `${partNumber}`,\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('UploadPart', res)\n\n return new S3Part(partNumber, res.headers['Etag'])\n }\n\n /**\n * Completes a multipart upload by assembling previously uploaded parts.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @param {string} uploadId - The uploadId of the multipart upload to complete.\n * @param {S3Part[]} parts - The parts to assemble.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async completeMultipartUpload(\n bucketName: string,\n objectKey: string,\n uploadId: string,\n parts: S3Part[]\n ) {\n // Prepare request\n const method = 'POST'\n const body = `${parts\n .map(\n (part) =>\n `${part.partNumber}${part.eTag}`\n )\n .join('')}`\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n body: body,\n query: {\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n\n this._handle_error('CompleteMultipartUpload', res)\n }\n\n /**\n * Aborts a multipart upload.\n *\n * @param {string} bucketName - The bucket name containing the object.\n * @param {string} objectKey - Key of the object to delete.\n * @param {string} uploadId - The uploadId of the multipart upload to abort.\n * @throws {S3ServiceError}\n * @throws {InvalidSignatureError}\n */\n async abortMultipartUpload(bucketName: string, objectKey: string, uploadId: string) {\n const method = 'DELETE'\n\n const bucketEndpoint = this.endpoint.copy()\n bucketEndpoint.hostname = `${bucketName}.${this.endpoint.hostname}`\n\n const signedRequest = this.signature.sign(\n {\n method: method,\n endpoint: bucketEndpoint,\n path: `/${objectKey}`,\n headers: {},\n query: {\n uploadId: `${uploadId}`,\n },\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {\n headers: signedRequest.headers,\n })\n this._handle_error('AbortMultipartUpload', res)\n }\n\n _handle_error(operation: S3Operation, response: RefinedResponse) {\n const status: number = response.status\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n // We consider codes 200-299 as success\n if (status >= 200 && status < 300 && errorMessage == '' && errorCode === 0) {\n return\n }\n\n // A 301 response is returned when the bucket is not found.\n // Generally meaning that either the bucket name is wrong or the\n // region is wrong.\n //\n // See: https://github.com/grafana/k6/issues/2474\n // See: https://github.com/golang/go/issues/49281\n if (status == 301 || (errorMessage && errorMessage.startsWith('301'))) {\n throw new S3ServiceError('Resource not found', 'ResourceNotFound', operation)\n }\n\n const awsError = AWSError.parseXML(response.body as string)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw new S3ServiceError(awsError.message, awsError.code || 'unknown', operation)\n }\n }\n}\n\n/** Class representing a S3 Bucket */\nexport class S3Bucket {\n name: string\n creationDate: Date\n\n /**\n * Create an S3 Bucket\n *\n * @param {string} name - S3 bucket's name\n * @param {Date} creationDate - S3 bucket's creation date\n */\n constructor(name: string, creationDate: Date) {\n this.name = name\n this.creationDate = creationDate\n }\n}\n\n/** Class representing an S3 Object */\nexport class S3Object {\n key: string\n lastModified: number\n etag: string\n size: number\n storageClass: StorageClass\n data?: string | bytes | null\n\n /**\n * Create an S3 Object\n *\n * @param {string} key - S3 object's key\n * @param {Date} lastModified - S3 object last modification date\n * @param {string} etag - S3 object's etag\n * @param {number} size - S3 object's size\n * @param {StorageClass} storageClass - S3 object's storage class\n * @param {string | bytes | null} data=null - S3 Object's data\n */\n constructor(\n key: string,\n lastModified: number,\n etag: string,\n size: number,\n storageClass: StorageClass,\n data?: string | bytes | null\n ) {\n this.key = key\n this.lastModified = lastModified\n this.etag = etag\n this.size = size\n this.storageClass = storageClass\n this.data = data\n }\n}\n\n/** Class representing a S3 Multipart Upload */\nexport class S3MultipartUpload {\n key: string\n uploadId: string\n\n /**\n * Create an S3 Multipart Upload\n * @param {string} key - S3 object's key\n * @param {string} uploadId - S3 multipart upload id\n */\n\n constructor(key: string, uploadId: string) {\n this.key = key\n this.uploadId = uploadId\n }\n}\n\n/** Class representing a S3 Part */\nexport class S3Part {\n partNumber: number\n eTag: string\n\n /**\n * Create an S3 Part\n * @param {number} partNumber - Part number\n * @param {string} eTag - Part's etag\n */\n\n constructor(partNumber: number, eTag: string) {\n this.partNumber = partNumber\n this.eTag = eTag\n }\n}\n\n/**\n * Error indicating a S3 operation failed\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class S3ServiceError extends AWSError {\n operation: string\n\n /**\n * Constructs a S3ServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: string) {\n super(message, code)\n this.name = 'S3ServiceError'\n this.operation = operation\n }\n}\n\n/**\n * S3Operation describes possible values for S3 API operations,\n * as defined by AWS APIs.\n */\ntype S3Operation =\n | 'ListBuckets'\n | 'ListObjectsV2'\n | 'GetObject'\n | 'PutObject'\n | 'DeleteObject'\n | 'CopyObject'\n | 'CreateMultipartUpload'\n | 'CompleteMultipartUpload'\n | 'UploadPart'\n | 'AbortMultipartUpload'\n\n/**\n * Describes the class of storage used to store a S3 object.\n */\ntype StorageClass =\n | 'STANDARD'\n | 'REDUCED_REDUNDANCY'\n | 'GLACIER'\n | 'STANDARD_IA'\n | 'INTELLIGENT_TIERING'\n | 'DEEP_ARCHIVE'\n | 'OUTPOSTS'\n | 'GLACIER_IR'\n | undefined\n\n/**\n * PutObjectParams describes the parameters that can be passed to the PutObject operation.\n */\nexport interface PutObjectParams {\n /**\n * Specifies presentational information for the object.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.\n */\n contentDisposition?: string\n\n /**\n * Specifies what content encodings have been applied to the object and thus\n * what decoding mechanisms must be applied to obtain the media-type referenced\n * by the ContentType option.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.\n */\n contentEncoding?: string\n\n /**\n * Size of the body in bytes. This parameter is useful when the size of the body cannot be\n * determined automatically.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.\n */\n contentLength?: string\n\n /**\n * The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864.\n * This header can be used as a message integrity check to verify that the data is the same data that\n * was originally sent.\n *\n * Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity\n * check.\n */\n contentMD5?: string\n\n /**\n * A standard MIME type describing the format of the contents.\n *\n * For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.\n */\n contentType?: string\n}\n","import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Endpoint","endpoint","_classCallCheck","_defineProperty","completeUrl","startsWith","concat","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","this","_protocol","slice","_hostname","_port","parseInt","undefined","href","set","_value$split2","hostname","port","protocol","host","AWSConfig","options","region","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","require","AMZ_DATE_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","_i","_Object$keys","keys","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","soughtHeader","hasHeader","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","_regeneratorRuntime","t","r","i","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","asyncGeneratorStep","gen","reject","_next","_throw","info","_asyncToGenerator","fn","self","args","apply","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","S3Client","_AWSClient","awsConfig","serviceName","_listBuckets","_callee","signedRequest","res","buckets","_context","sign","http","_handle_error","children","each","_","bucketDefinition","bucket","child","nodeName","assign","textContent","creationDate","_listObjects","_callee2","bucketName","prefix","objects","_context2","objectDefinition","lastModified","etag","size","storageClass","_x","_x2","_getObject","_callee3","objectKey","_res$headers$XAmzSt","_context3","S3Object","_x3","_x4","_putObject","_callee4","data","params","_context4","Host","contentDisposition","contentEncoding","contentLength","contentMD5","contentType","_x5","_x6","_x7","_x8","_deleteObject","_callee5","_context5","_x9","_x10","_copyObject","_callee6","sourceBucket","sourceKey","destinationBucket","destinationKey","bucketEndpoint","_context6","copy","_x11","_x12","_x13","_x14","_createMultipartUpload","_callee7","_context7","uploads","S3MultipartUpload","_x15","_x16","_uploadPart","_callee8","uploadId","partNumber","_context8","S3Part","_x17","_x18","_x19","_x20","_x21","_completeMultipartUpload","_callee9","parts","_context9","part","eTag","_x22","_x23","_x24","_x25","_abortMultipartUpload","_callee10","_context10","_x26","_x27","_x28","operation","status","errorCode","error_code","errorMessage","S3ServiceError","awsError","AWSClient","_endpoint","S3Bucket","_this2"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/secrets-manager.js b/dist/secrets-manager.js index cbaba86..a279ef6 100644 --- a/dist/secrets-manager.js +++ b/dist/secrets-manager.js @@ -1,3 +1,3 @@ /*! For license information please see secrets-manager.js.LICENSE.txt */ -(()=>{var e={414:(e,t,r)=>{var n=r(33),o=r(550),i=o;i.v1=n,i.v4=o,e.exports=i},471:e=>{for(var t=[],r=0;r<256;++r)t[r]=(r+256).toString(16).substr(1);e.exports=function(e,r){var n=r||0,o=t;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")}},814:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var r=new Uint8Array(16);e.exports=function(){return t(r),r}}else{var n=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)3&t||(e=4294967296*Math.random()),n[t]=e>>>((3&t)<<3)&255;return n}}},33:(e,t,r)=>{var n,o,i=r(814),a=r(471),c=0,u=0;e.exports=function(e,t,r){var s=t&&r||0,f=t||[],l=(e=e||{}).node||n,p=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==p){var y=i();null==l&&(l=n=[1|y[0],y[1],y[2],y[3],y[4],y[5]]),null==p&&(p=o=16383&(y[6]<<8|y[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),d=void 0!==e.nsecs?e.nsecs:u+1,v=h-c+(d-u)/1e4;if(v<0&&void 0===e.clockseq&&(p=p+1&16383),(v<0||h>c)&&void 0===e.nsecs&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=h,u=d,o=p;var b=(1e4*(268435455&(h+=122192928e5))+d)%4294967296;f[s++]=b>>>24&255,f[s++]=b>>>16&255,f[s++]=b>>>8&255,f[s++]=255&b;var m=h/4294967296*1e4&268435455;f[s++]=m>>>8&255,f[s++]=255&m,f[s++]=m>>>24&15|16,f[s++]=m>>>16&255,f[s++]=p>>>8|128,f[s++]=255&p;for(var g=0;g<6;++g)f[s+g]=l[g];return t||a(f)}},550:(e,t,r)=>{var n=r(814),o=r(471);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var c=0;c<16;++c)t[i+c]=a[c];return t||o(a)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rw,InvalidAWSConfigError:()=>S,InvalidSignatureError:()=>se,Secret:()=>Re,SecretsManagerClient:()=>Ie,SecretsManagerServiceError:()=>qe});var u=function(){function e(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"_protocol",void 0),a(this,"_hostname",void 0),a(this,"_port",void 0);var n=!r.startsWith("http://")&&!r.startsWith("https://")?"".concat(e.DEFAULT_PROTOCOL,"://").concat(r):r,o=n.match(/^https?:/),i=t(n.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=o?o[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return r=e,(n=[{key:"copy",value:function(){return new e(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(e){var r=t(e.split(":"),2),n=r[0],o=r[1];this._hostname=n,this._port=o?parseInt(o):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(e){this._hostname=e}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(r){var n=r.match(/^https?:/),o=t(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=n?n[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=o.split(":")[0],this._port=o.split(":")[1]?parseInt(o.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(e){this._port=e}},{key:"protocol",get:function(){return this._protocol},set:function(e){this._protocol=e}}])&&i(r.prototype,n),o&&i(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}();function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t,r){return t=h(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&y(o,r.prototype),o}(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),y(r,e)},l(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r128)throw new S("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new S("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new u(t.endpoint):this.endpoint=t.endpoint)}return b(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),S=function(e){function t(e){return d(this,t),f(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),b(t)}(l(Error));const O=require("k6/crypto");var j=r.n(O),_="X-Amz-Date",P="X-Amz-Signature",E="X-Amz-Security-Token",k="x-amz-content-sha256",C=_.toLowerCase(),A=P.toLowerCase(),x="X-Amz-Target".toLowerCase(),T=E.toLowerCase(),L="authorization",D=[L,C,"date"],N="host",I={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},R="aws4_request",q="AWS4-HMAC-SHA256";const K=require("k6/html");function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function M(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=re(re({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=le(r.signingDate),o=n.longDate,i=n.shortDate,a=r.signingService||this.service,c=r.signingRegion||this.region,u="".concat(i,"/").concat(c,"/").concat(a,"/").concat(R);e.headers[N]||(e.headers[N]=e.endpoint.hostname);for(var s=0,f=Object.keys(e.headers);s-1&&delete e.headers[l]}e.headers[C]=o,this.credentials.sessionToken&&(e.headers[T]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var p=this.computePayloadHash(e);!function(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=t.signingDate,n=void 0===r?new Date:r,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,c=t.unhoistableHeaders,u=t.signableHeaders,s=t.signingRegion,f=t.signingService,l=le(n),p=l.longDate,y=l.shortDate,h=s||this.region,d=f||this.service;if(i>604800)throw new se("Signature version 4 presigned URLs can't be valid for more than 7 days");var v="".concat(y,"/").concat(h,"/").concat(d,"/").concat(R),b=this.moveHeadersToQuery(e,{unhoistableHeaders:c});b.headers[N]||(b.headers[N]=e.endpoint.hostname),this.credentials.sessionToken&&(b.query[E]=this.credentials.sessionToken),b.query["X-Amz-Algorithm"]=q,b.query["X-Amz-Credential"]="".concat(this.credentials.accessKeyId,"/").concat(v),b.query[_]=p,b.query["X-Amz-Expires"]=i.toString(10);var m=this.computeCanonicalHeaders(b,a,u);b.query["X-Amz-SignedHeaders"]=Object.keys(m).sort().join(";");var g=this.deriveSigningKey(this.credentials,d,h,y),w=this.computePayloadHash(e),S=this.createCanonicalRequest(b,m,w);b.query[P]=this.calculateSignature(p,v,g,S);var O=b.endpoint.href;return b.path&&(O+=b.path),b.query&&(O+="?".concat(this.serializeQueryParameters(b.query))),re({url:O},b)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=j().sha256(r,"hex");return"".concat(q,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var o=this.createStringToSign(e,t,n);return j().hmac("sha256",r,o,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var o=e.secretAccessKey,i=j().hmac("sha256","AWS4"+o,n,"binary"),a=j().hmac("sha256",i,r,"binary"),c=j().hmac("sha256",a,t,"binary");return j().hmac("sha256",c,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=Z(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],i={},a=function(e){if(e.toLowerCase()===A)return 1;o.push(e);var t=n[e];"string"==typeof t?i[e]="".concat(fe(e),"=").concat(fe(t)):Array.isArray(t)&&(i[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(fe(e),"=").concat(fe(r))])}),[]).join("&"))},c=Z(Object.keys(n).sort());try{for(c.s();!(t=c.n()).done;){a(t.value)}}catch(e){c.e(e)}finally{c.f()}return o.map((function(e){return i[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,i={},a=Z(Object.keys(o).sort());try{for(a.s();!(n=a.n()).done;){var c=n.value;if(null!=o[c]){var u=c.toLowerCase();(u in I||null!=t&&t.has(u))&&(!r||r&&!r.has(u))||"string"==typeof o[c]&&(i[u]=o[c]=o[c].trim().replace(/\s+/g," "))}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"computePayloadHash",value:function(e){var t,r=e.headers,n=e.body;return r[k]?r[k]:null==n?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":"string"==typeof n||(t=n,"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)))?j().sha256(n,"hex").toLowerCase():ArrayBuffer.isView(n)?j().sha256(n.buffer,"hex").toLowerCase():"UNSIGNED-PAYLOAD"}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oe(e){for(var t=1;t=1400&&r<=1499){var o=n.Message||n.message||n.__type;if("InvalidSignatureException"===n.__type)throw new se(o,n.__type);throw new qe(o,n.__type,e)}if(1500===r)throw new qe("An error occured on the server side","InternalServiceError",e)}}}]);var r,n,o,i,a}(function(){return e=function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),be(this,"awsConfig",void 0),be(this,"serviceName",void 0),be(this,"_endpoint",void 0),this.awsConfig=t,this.serviceName=r,null!=t.endpoint&&(this._endpoint=t.endpoint)},(t=[{key:"endpoint",get:function(){return null==this._endpoint&&(this._endpoint=new u("https://".concat(this.serviceName,".").concat(this.awsConfig.region,".amazonaws.com"))),this._endpoint},set:function(e){this._endpoint=e}}])&&ve(e.prototype,t),r&&ve(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}()),Re=function(){function e(t,r,n,o,i,a){var c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[];Pe(this,e),De(this,"name",void 0),De(this,"arn",void 0),De(this,"secret",void 0),De(this,"createdDate",void 0),De(this,"lastAccessedDate",void 0),De(this,"lastChangedDate",void 0),De(this,"tags",void 0),this.name=t,this.arn=r,this.secret=n,this.createdDate=o,this.lastAccessedDate=i,this.lastChangedDate=a,this.tags=c}return ke(e,null,[{key:"fromJSON",value:function(t){return new e(t.Name,t.ARN,t.SecretString,t.CreatedDate,t.LastAccessedDate,t.LastChangedDate,t.Tags)}}])}(),qe=function(e){function t(e,r,n){var o;return Pe(this,t),De(o=Ce(this,t,[e,r]),"operation",void 0),o.name="SecretsManagerServiceError",o.operation=n,o}return Te(t,e),ke(t)}(F),Ke=function(e){return e.ListSecrets="ListSecrets",e.GetSecretValue="GetSecretValue",e.CreateSecret="CreateSecret",e.PutSecretValue="PutSecretValue",e.DeleteSecret="DeleteSecret",e}(Ke||{})})();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})(); +(()=>{var e={414:(e,t,r)=>{var n=r(33),o=r(550),i=o;i.v1=n,i.v4=o,e.exports=i},471:e=>{for(var t=[],r=0;r<256;++r)t[r]=(r+256).toString(16).substr(1);e.exports=function(e,r){var n=r||0,o=t;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")}},814:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var r=new Uint8Array(16);e.exports=function(){return t(r),r}}else{var n=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)3&t||(e=4294967296*Math.random()),n[t]=e>>>((3&t)<<3)&255;return n}}},33:(e,t,r)=>{var n,o,i=r(814),a=r(471),c=0,u=0;e.exports=function(e,t,r){var s=t&&r||0,f=t||[],l=(e=e||{}).node||n,p=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==p){var y=i();null==l&&(l=n=[1|y[0],y[1],y[2],y[3],y[4],y[5]]),null==p&&(p=o=16383&(y[6]<<8|y[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),d=void 0!==e.nsecs?e.nsecs:u+1,v=h-c+(d-u)/1e4;if(v<0&&void 0===e.clockseq&&(p=p+1&16383),(v<0||h>c)&&void 0===e.nsecs&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=h,u=d,o=p;var b=(1e4*(268435455&(h+=122192928e5))+d)%4294967296;f[s++]=b>>>24&255,f[s++]=b>>>16&255,f[s++]=b>>>8&255,f[s++]=255&b;var m=h/4294967296*1e4&268435455;f[s++]=m>>>8&255,f[s++]=255&m,f[s++]=m>>>24&15|16,f[s++]=m>>>16&255,f[s++]=p>>>8|128,f[s++]=255&p;for(var g=0;g<6;++g)f[s+g]=l[g];return t||a(f)}},550:(e,t,r)=>{var n=r(814),o=r(471);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var c=0;c<16;++c)t[i+c]=a[c];return t||o(a)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rw,InvalidAWSConfigError:()=>S,InvalidSignatureError:()=>ye,Secret:()=>Me,SecretsManagerClient:()=>He,SecretsManagerServiceError:()=>We});var u=function(){function e(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"_protocol",void 0),a(this,"_hostname",void 0),a(this,"_port",void 0);var n=!r.startsWith("http://")&&!r.startsWith("https://")?"".concat(e.DEFAULT_PROTOCOL,"://").concat(r):r,o=n.match(/^https?:/),i=t(n.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=o?o[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return r=e,(n=[{key:"copy",value:function(){return new e(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(e){var r=t(e.split(":"),2),n=r[0],o=r[1];this._hostname=n,this._port=o?parseInt(o):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(e){this._hostname=e}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(r){var n=r.match(/^https?:/),o=t(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=n?n[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=o.split(":")[0],this._port=o.split(":")[1]?parseInt(o.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(e){this._port=e}},{key:"protocol",get:function(){return this._protocol},set:function(e){this._protocol=e}}])&&i(r.prototype,n),o&&i(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}();function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t,r){return t=h(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&y(o,r.prototype),o}(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),y(r,e)},l(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r128)throw new S("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new S("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new u(t.endpoint):this.endpoint=t.endpoint)}return b(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),S=function(e){function t(e){return d(this,t),f(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),b(t)}(l(Error));const O=require("k6/crypto");var j=r.n(O),_="X-Amz-Date",P="X-Amz-Signature",E="X-Amz-Security-Token",k="x-amz-content-sha256",C=_.toLowerCase(),A=P.toLowerCase(),x="X-Amz-Target".toLowerCase(),T=E.toLowerCase(),L="authorization",D=[L,C,"date"],N="host",I={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},R="aws4_request",q="AWS4-HMAC-SHA256";const K=require("k6/html");function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=ae(ae({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=de(r.signingDate),o=n.longDate,i=n.shortDate,a=r.signingService||this.service,c=r.signingRegion||this.region,u="".concat(i,"/").concat(c,"/").concat(a,"/").concat(R);e.headers[N]||(e.headers[N]=e.endpoint.hostname);for(var s=0,f=Object.keys(e.headers);s-1&&delete e.headers[l]}e.headers[C]=o,this.credentials.sessionToken&&(e.headers[T]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var p=this.computePayloadHash(e);!function(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=t.signingDate,n=void 0===r?new Date:r,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,c=t.unhoistableHeaders,u=t.signableHeaders,s=t.signingRegion,f=t.signingService,l=de(n),p=l.longDate,y=l.shortDate,h=s||this.region,d=f||this.service;if(i>604800)throw new ye("Signature version 4 presigned URLs can't be valid for more than 7 days");var v="".concat(y,"/").concat(h,"/").concat(d,"/").concat(R),b=this.moveHeadersToQuery(e,{unhoistableHeaders:c});b.headers[N]||(b.headers[N]=e.endpoint.hostname),this.credentials.sessionToken&&(b.query[E]=this.credentials.sessionToken),b.query["X-Amz-Algorithm"]=q,b.query["X-Amz-Credential"]="".concat(this.credentials.accessKeyId,"/").concat(v),b.query[_]=p,b.query["X-Amz-Expires"]=i.toString(10);var m=this.computeCanonicalHeaders(b,a,u);b.query["X-Amz-SignedHeaders"]=Object.keys(m).sort().join(";");var g=this.deriveSigningKey(this.credentials,d,h,y),w=this.computePayloadHash(e),S=this.createCanonicalRequest(b,m,w);b.query[P]=this.calculateSignature(p,v,g,S);var O=b.endpoint.href;return b.path&&(O+=b.path),b.query&&(O+="?".concat(this.serializeQueryParameters(b.query))),ae({url:O},b)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=j().sha256(r,"hex");return"".concat(q,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var o=this.createStringToSign(e,t,n);return j().hmac("sha256",r,o,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var o=e.secretAccessKey,i=j().hmac("sha256","AWS4"+o,n,"binary"),a=j().hmac("sha256",i,r,"binary"),c=j().hmac("sha256",a,t,"binary");return j().hmac("sha256",c,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=ne(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],i={},a=function(e){if(e.toLowerCase()===A)return 1;o.push(e);var t=n[e];"string"==typeof t?i[e]="".concat(he(e),"=").concat(he(t)):Array.isArray(t)&&(i[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(he(e),"=").concat(he(r))])}),[]).join("&"))},c=ne(Object.keys(n).sort());try{for(c.s();!(t=c.n()).done;){a(t.value)}}catch(e){c.e(e)}finally{c.f()}return o.map((function(e){return i[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,i={},a=ne(Object.keys(o).sort());try{for(a.s();!(n=a.n()).done;){var c=n.value;if(null!=o[c]){var u=c.toLowerCase();(u in I||null!=t&&t.has(u))&&(!r||r&&!r.has(u))||"string"==typeof o[c]&&(i[u]=o[c]=o[c].trim().replace(/\s+/g," "))}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"computePayloadHash",value:function(e){var t,r=e.headers,n=e.body;return r[k]?r[k]:null==n?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":"string"==typeof n||(t=n,"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)))?j().sha256(n,"hex").toLowerCase():ArrayBuffer.isView(n)?j().sha256(n.buffer,"hex").toLowerCase():"UNSIGNED-PAYLOAD"}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ee(e){for(var t=1;t=1400&&r<=1499){var o=n.Message||n.message||n.__type;if("InvalidSignatureException"===n.__type)throw new ye(o,n.__type);throw new We(o,n.__type,e)}if(1500===r)throw new We("An error occured on the server side","InternalServiceError",e)}}}]);var r,n,o,i,a}(function(){return e=function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Se(this,"awsConfig",void 0),Se(this,"serviceName",void 0),Se(this,"_endpoint",void 0),this.awsConfig=t,this.serviceName=r,null!=t.endpoint&&(this._endpoint=t.endpoint)},(t=[{key:"endpoint",get:function(){return null==this._endpoint&&(this._endpoint=new u("https://".concat(this.serviceName,".").concat(this.awsConfig.region,".amazonaws.com"))),this._endpoint},set:function(e){this._endpoint=e}}])&&we(e.prototype,t),r&&we(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}()),Me=function(){function e(t,r,n,o,i,a){var c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[];Ae(this,e),qe(this,"name",void 0),qe(this,"arn",void 0),qe(this,"secret",void 0),qe(this,"createdDate",void 0),qe(this,"lastAccessedDate",void 0),qe(this,"lastChangedDate",void 0),qe(this,"tags",void 0),this.name=t,this.arn=r,this.secret=n,this.createdDate=o,this.lastAccessedDate=i,this.lastChangedDate=a,this.tags=c}return Te(e,null,[{key:"fromJSON",value:function(t){return new e(t.Name,t.ARN,t.SecretString,t.CreatedDate,t.LastAccessedDate,t.LastChangedDate,t.Tags)}}])}(),We=function(e){function t(e,r,n){var o;return Ae(this,t),qe(o=Le(this,t,[e,r]),"operation",void 0),o.name="SecretsManagerServiceError",o.operation=n,o}return Ie(t,e),Te(t)}(Y),ze=function(e){return e.ListSecrets="ListSecrets",e.GetSecretValue="GetSecretValue",e.CreateSecret="CreateSecret",e.PutSecretValue="PutSecretValue",e.DeleteSecret="DeleteSecret",e}(ze||{})})();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})(); //# sourceMappingURL=secrets-manager.js.map \ No newline at end of file diff --git a/dist/secrets-manager.js.map b/dist/secrets-manager.js.map index 162a779..0f9b714 100644 --- a/dist/secrets-manager.js.map +++ b/dist/secrets-manager.js.map @@ -1 +1 @@ -{"version":3,"file":"secrets-manager.js","mappings":";2B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2BAAAA,GAAA,gCAAAA,GAAA,+BAAAA,GAAA,oBAE3CW,KAAK2D,KAAOA,EACZ3D,KAAKiY,IAAMA,EACXjY,KAAKuV,OAAS2C,EACdlY,KAAKmY,YAAcA,EACnBnY,KAAKoY,iBAAmBA,EACxBpY,KAAKqY,gBAAkBA,EACvBrY,KAAK0V,KAAOA,CAChB,CAEA,OAAAtU,GAAAwT,EAAA,OAAAxW,IAAA,WAAAa,MAQA,SAAgBmF,GACZ,OAAO,IAAIwQ,EACPxQ,EAAKyR,KACLzR,EAAKkU,IACLlU,EAAK2R,aACL3R,EAAKmU,YACLnU,EAAKoU,iBACLpU,EAAKqU,gBACLrU,EAAK6R,KAEb,IAAC,CAxDc,GA2DN6B,GAA0B,SAAA5L,GAUnC,SAAA4L,EAAYnW,EAAiB8B,EAAciU,GAAoC,IAAAgB,EAGjD,OAHiDtZ,GAAA,KAAA0Y,GACvDzY,GAApBqZ,EAAA9W,GAAA,KAAAkW,EAAA,CAAMnW,EAAS8B,IAAK,oBACpBiV,EAAK/U,KAAO,6BACZ+U,EAAKhB,UAAYA,EAASgB,CAC9B,CAAC,OAAA7W,GAAAiW,EAAA5L,GAAA9K,GAAA0W,EAAA,CAdkC,CAAStU,GAoB3CkR,GAAuB,SAAvBA,GAAuB,OAAvBA,EAAuB,0BAAvBA,EAAuB,gCAAvBA,EAAuB,4BAAvBA,EAAuB,gCAAvBA,EAAuB,4BAAvBA,CAAuB,EAAvBA,IAAuB","sources":["webpack://k6-jslib-aws/./node_modules/uuid/index.js","webpack://k6-jslib-aws/./node_modules/uuid/lib/bytesToUuid.js","webpack://k6-jslib-aws/./node_modules/uuid/lib/rng-browser.js","webpack://k6-jslib-aws/./node_modules/uuid/v1.js","webpack://k6-jslib-aws/./node_modules/uuid/v4.js","webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/./src/internal/secrets-manager.ts","webpack://k6-jslib-aws/./src/internal/client.ts"],"sourcesContent":["var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/crypto\");","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/html\");","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/http\");","import { JSONArray, JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { v4 as uuidv4 } from 'uuid'\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's SecretsManager service\n */\nexport class SecretsManagerClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a SecretsManagerClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'secretsmanager')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n // All interactions with the Secrets Manager service\n // are made via the GET or POST method.\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Returns a list of all secrets owned by the authenticated sender of the request.\n * To use this operation, you must have the secretsmanager:ListSecrets permission.\n *\n * @return {Array.} secrets - An array of objects describing Secret Manager's secrets\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async listSecrets(): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.ListSecrets`,\n },\n body: JSON.stringify({}),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.ListSecrets, res)\n const json: JSONArray = res.json('SecretList') as JSONArray\n\n return json.map((s) => Secret.fromJSON(s as JSONObject))\n }\n\n /**\n * Retrieves a secret from Amazon Sercets Manager\n *\n * @param {string} id - The ARN or name of the secret to retrieve.\n * @returns {Secret} - returns the content of the fetched Secret object.\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async getSecret(id: string): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.GetSecretValue`,\n },\n body: JSON.stringify({ SecretId: id }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n\n this._handle_error(SecretsManagerOperation.GetSecretValue, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n\n /**\n * Creates a new secret\n *\n * Note that this method only supports string-based values at the moment.\n *\n * @param {string} name - The name of the new secret.\n * The secret name can contain ASCII letters, numbers, and the following characters: /_+=.@\n * @param {string} secret - The text data to encrypt and store in this new version of the secret.\n * @param {string} description - The description of the secret.\n * @param {string} versionID=null - Version of the secret. This value helps ensure idempotency.\n * As a default, if no versionID is provided, one will be created for you using the UUID v4\n * algorithm.\n * @param {Array.} tags=[] - A list of tags to attach to the secret. Each tag is a key and\n * value pair of strings in a JSON text string. Note that tag key names are case sensitive.\n * @returns {Secret} - returns the created secret\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async createSecret(\n name: string,\n secret: string,\n description: string,\n versionID?: string,\n tags?: Array\n ): Promise {\n versionID = versionID || uuidv4()\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.CreateSecret`,\n },\n body: JSON.stringify({\n Name: name,\n Description: description,\n SecretString: secret,\n ClientRequestToken: versionID,\n Tags: tags,\n }),\n },\n {}\n )\n\n // Ensure to include the desired 'Action' in the X-Amz-Target\n // header field, as documented by the AWS API docs.\n // headers['X-Amz-Target'] = `${this.serviceName}.CreateSecret`\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.CreateSecret, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n /**\n * Update a secret's value.\n *\n * Note that this method only support string-based values at the moment.\n *\n * @param {string} id - The ARN or name of the secret to update.\n * @param {string} secret - The text data to encrypt and store in this new version of the secret.\n * @param {} versionID=null - A unique identifier for the new version of the secret. This value helps ensure idempotency.\n * As a default, if no versionID is provided, one will be created for you using the UUID v4\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async putSecretValue(id: string, secret: string, versionID?: string): Promise {\n versionID = versionID || uuidv4()\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.PutSecretValue`,\n },\n body: JSON.stringify({\n SecretId: id,\n SecretString: secret,\n ClientRequestToken: versionID,\n }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.PutSecretValue, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n\n /**\n * Deletes a secret and all of its versions.\n *\n * You can specify a recovery window during which you can restore the secret.\n * The minimum recovery window is 7 days. The default recovery window is 30 days.\n *\n * @param {string} secretID - The ARN or name of the secret to delete.\n * @param {number} recoveryWindow - The number of days from 7 to 30 that Secrets Manager\n * waits before permanently deleting the secret.\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async deleteSecret(\n id: string,\n { recoveryWindow = 30, noRecovery = false }: { recoveryWindow: number; noRecovery: boolean }\n ): Promise {\n const payload: { [key: string]: string | boolean | number } = {\n SecretId: id,\n }\n\n // noRecovery and recoveryWindow are exclusive parameters\n if (noRecovery === true) {\n payload['ForceDeleteWithoutRecovery'] = true\n } else {\n payload['RecoveryWindowInDays'] = recoveryWindow\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.DeleteSecret`,\n },\n body: JSON.stringify(payload),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.DeleteSecret, res)\n }\n\n _handle_error(\n operation: SecretsManagerOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new SecretsManagerServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new SecretsManagerServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n// TODO: create a Tags type\n\n/**\n * Class representing a Secret Manager's secret\n */\nexport class Secret {\n name: string\n arn: string\n secret: string\n createdDate: number\n lastAccessedDate: number\n lastChangedDate: number\n tags: Array<{ [key: string]: string }>\n\n /**\n * Constructs a Secret Manager's Secret\n *\n * @param {string} name - The friendly name of the secret.\n * @param {string} arn - The ARN of the secret.\n * @param {number} createdDate - The date and time that this version of the secret was created.\n * @param {number} lastAccessedDate - The last date that this secret was accessed. This value is\n * truncated to midnight of the date and therefore shows only the date, not the time.\n * @param {number} lastChangedDate - The last date and time that this secret was modified in any way.\n * @param {Array.} tags - The list of user-defined tags associated with the secret.\n */\n constructor(\n name: string,\n arn: string,\n secretString: string,\n createdDate: number,\n lastAccessedDate: number,\n lastChangedDate: number,\n tags: Array<{ [key: string]: string }> = []\n ) {\n this.name = name\n this.arn = arn\n this.secret = secretString\n this.createdDate = createdDate\n this.lastAccessedDate = lastAccessedDate\n this.lastChangedDate = lastChangedDate\n this.tags = tags\n }\n\n /**\n * Parses and constructs a Secret Manager's Secret from the content\n * of a JSON response returned by the AWS service\n *\n * @param {Object} json - JSON object as returned and parsed from\n * the AWS service's API call.\n * @returns {Secret}\n */\n static fromJSON(json: JSONObject) {\n return new Secret(\n json.Name as string,\n json.ARN as string,\n json.SecretString as string,\n json.CreatedDate as number,\n json.LastAccessedDate as number,\n json.LastChangedDate as number,\n json.Tags as Array<{ [key: string]: string }>\n )\n }\n}\n\nexport class SecretsManagerServiceError extends AWSError {\n operation: SecretsManagerOperation\n\n /**\n * Constructs a SecretsManagerServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: SecretsManagerOperation) {\n super(message, code)\n this.name = 'SecretsManagerServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SecretsManagerOperation defines all currently implemented Secrets Manager Service operations.\n */\nenum SecretsManagerOperation {\n ListSecrets = 'ListSecrets',\n GetSecretValue = 'GetSecretValue',\n CreateSecret = 'CreateSecret',\n PutSecretValue = 'PutSecretValue',\n DeleteSecret = 'DeleteSecret',\n}\n","import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n"],"names":["v1","v4","uuid","module","exports","byteToHex","i","toString","substr","buf","offset","bth","join","getRandomValues","crypto","bind","window","msCrypto","rnds8","Uint8Array","rnds","Array","r","Math","random","_nodeId","_clockseq","rng","bytesToUuid","_lastMSecs","_lastNSecs","options","b","node","clockseq","undefined","seedBytes","msecs","Date","getTime","nsecs","dt","Error","tl","tmh","n","ii","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Endpoint","endpoint","_classCallCheck","_defineProperty","completeUrl","startsWith","concat","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","this","_protocol","slice","_hostname","_port","parseInt","href","set","_value$split2","hostname","port","protocol","host","AWSConfig","region","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","require","AMZ_DATE_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","_i","_Object$keys","keys","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","soughtHeader","hasHeader","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","_regeneratorRuntime","t","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","_asyncToGenerator","fn","self","args","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","SecretsManagerClient","_AWSClient","awsConfig","serviceName","commonHeaders","_listSecrets","_callee","signedRequest","res","_context","sign","http","_handle_error","SecretsManagerOperation","ListSecrets","Secret","fromJSON","_getSecret","_callee2","id","_context2","SecretId","GetSecretValue","_x","_createSecret","_callee3","secret","description","versionID","tags","_context3","uuidv4","Name","Description","SecretString","ClientRequestToken","Tags","CreateSecret","_x2","_x3","_x4","_x5","_x6","_putSecretValue","_callee4","_context4","PutSecretValue","_x7","_x8","_x9","_deleteSecret","_callee5","_ref$recoveryWindow","recoveryWindow","_ref$noRecovery","payload","_context5","noRecovery","DeleteSecret","_x10","_x11","operation","errorCode","error_code","errorMessage","SecretsManagerServiceError","AWSClient","_endpoint","arn","secretString","createdDate","lastAccessedDate","lastChangedDate","ARN","CreatedDate","LastAccessedDate","LastChangedDate","_this2"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"secrets-manager.js","mappings":";2BAAA,IAAIA,EAAK,EAAQ,IACbC,EAAK,EAAQ,KAEbC,EAAOD,EACXC,EAAKF,GAAKA,EACVE,EAAKD,GAAKA,EAEVE,EAAOC,QAAUF,WCFjB,IADA,IAAIG,EAAY,GACPC,EAAI,EAAGA,EAAI,MAAOA,EACzBD,EAAUC,IAAMA,EAAI,KAAOC,SAAS,IAAIC,OAAO,GAmBjDL,EAAOC,QAhBP,SAAqBK,EAAKC,GACxB,IAAIJ,EAAII,GAAU,EACdC,EAAMN,EAEV,MAAO,CACLM,EAAIF,EAAIH,MAAOK,EAAIF,EAAIH,MACvBK,EAAIF,EAAIH,MAAOK,EAAIF,EAAIH,MAAO,IAC9BK,EAAIF,EAAIH,MAAOK,EAAIF,EAAIH,MAAO,IAC9BK,EAAIF,EAAIH,MAAOK,EAAIF,EAAIH,MAAO,IAC9BK,EAAIF,EAAIH,MAAOK,EAAIF,EAAIH,MAAO,IAC9BK,EAAIF,EAAIH,MAAOK,EAAIF,EAAIH,MACvBK,EAAIF,EAAIH,MAAOK,EAAIF,EAAIH,MACvBK,EAAIF,EAAIH,MAAOK,EAAIF,EAAIH,OACtBM,KAAK,GACV,WChBA,IAAIC,EAAqC,oBAAZ,QAA2BC,OAAOD,iBAAmBC,OAAOD,gBAAgBE,KAAKD,SACnE,oBAAd,UAAuE,mBAAnCE,OAAOC,SAASJ,iBAAiCI,SAASJ,gBAAgBE,KAAKE,UAEhJ,GAAIJ,EAAiB,CAEnB,IAAIK,EAAQ,IAAIC,WAAW,IAE3BhB,EAAOC,QAAU,WAEf,OADAS,EAAgBK,GACTA,CACT,CACF,KAAO,CAKL,IAAIE,EAAO,IAAIC,MAAM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A,EACIjR,EACAsU,EACAC,EACAC,EACAC,EACAC,GAEF,IADE3C,EAAsC1Q,UAAA/D,OAAA,QAAAnE,IAAAkI,UAAA,GAAAA,UAAA,GAAG,GAAE5F,GAAA,KAAAwV,GAAAvV,GAAA,oBAAAA,GAAA,mBAAAA,GAAA,sBAAAA,GAAA,2BAAAA,GAAA,gCAAAA,GAAA,+BAAAA,GAAA,oBAE3CW,KAAK2D,KAAOA,EACZ3D,KAAKiY,IAAMA,EACXjY,KAAKuV,OAAS2C,EACdlY,KAAKmY,YAAcA,EACnBnY,KAAKoY,iBAAmBA,EACxBpY,KAAKqY,gBAAkBA,EACvBrY,KAAK0V,KAAOA,CAChB,CAEA,OAAAtU,GAAAwT,EAAA,OAAAxW,IAAA,WAAAa,MAQA,SAAgBmF,GACZ,OAAO,IAAIwQ,EACPxQ,EAAKyR,KACLzR,EAAKkU,IACLlU,EAAK2R,aACL3R,EAAKmU,YACLnU,EAAKoU,iBACLpU,EAAKqU,gBACLrU,EAAK6R,KAEb,IAAC,CAxDc,GA2DN6B,GAA0B,SAAA5L,GAUnC,SAAA4L,EAAYnW,EAAiB8B,EAAciU,GAAoC,IAAAgB,EAGjD,OAHiDtZ,GAAA,KAAA0Y,GACvDzY,GAApBqZ,EAAA9W,GAAA,KAAAkW,EAAA,CAAMnW,EAAS8B,IAAK,oBACpBiV,EAAK/U,KAAO,6BACZ+U,EAAKhB,UAAYA,EAASgB,CAC9B,CAAC,OAAA7W,GAAAiW,EAAA5L,GAAA9K,GAAA0W,EAAA,CAdkC,CAAStU,GAoB3CkR,GAAuB,SAAvBA,GAAuB,OAAvBA,EAAuB,0BAAvBA,EAAuB,gCAAvBA,EAAuB,4BAAvBA,EAAuB,gCAAvBA,EAAuB,4BAAvBA,CAAuB,EAAvBA,IAAuB","sources":["webpack://k6-jslib-aws/./node_modules/uuid/index.js","webpack://k6-jslib-aws/./node_modules/uuid/lib/bytesToUuid.js","webpack://k6-jslib-aws/./node_modules/uuid/lib/rng-browser.js","webpack://k6-jslib-aws/./node_modules/uuid/v1.js","webpack://k6-jslib-aws/./node_modules/uuid/v4.js","webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/./src/internal/secrets-manager.ts","webpack://k6-jslib-aws/./src/internal/client.ts"],"sourcesContent":["var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/crypto\");","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/html\");","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n\nexport class NetworkError extends Error {\n code: number;\n\n constructor(message: string, code: number) {\n super(message)\n this.name = 'NetworkError'\n this.code = code\n }\n}","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/http\");","import { JSONArray, JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { v4 as uuidv4 } from 'uuid'\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's SecretsManager service\n */\nexport class SecretsManagerClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a SecretsManagerClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'secretsmanager')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n\n // All interactions with the Secrets Manager service\n // are made via the GET or POST method.\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n }\n\n /**\n * Returns a list of all secrets owned by the authenticated sender of the request.\n * To use this operation, you must have the secretsmanager:ListSecrets permission.\n *\n * @return {Array.} secrets - An array of objects describing Secret Manager's secrets\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async listSecrets(): Promise> {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.ListSecrets`,\n },\n body: JSON.stringify({}),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.ListSecrets, res)\n const json: JSONArray = res.json('SecretList') as JSONArray\n\n return json.map((s) => Secret.fromJSON(s as JSONObject))\n }\n\n /**\n * Retrieves a secret from Amazon Sercets Manager\n *\n * @param {string} id - The ARN or name of the secret to retrieve.\n * @returns {Secret} - returns the content of the fetched Secret object.\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async getSecret(id: string): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.GetSecretValue`,\n },\n body: JSON.stringify({ SecretId: id }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n\n this._handle_error(SecretsManagerOperation.GetSecretValue, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n\n /**\n * Creates a new secret\n *\n * Note that this method only supports string-based values at the moment.\n *\n * @param {string} name - The name of the new secret.\n * The secret name can contain ASCII letters, numbers, and the following characters: /_+=.@\n * @param {string} secret - The text data to encrypt and store in this new version of the secret.\n * @param {string} description - The description of the secret.\n * @param {string} versionID=null - Version of the secret. This value helps ensure idempotency.\n * As a default, if no versionID is provided, one will be created for you using the UUID v4\n * algorithm.\n * @param {Array.} tags=[] - A list of tags to attach to the secret. Each tag is a key and\n * value pair of strings in a JSON text string. Note that tag key names are case sensitive.\n * @returns {Secret} - returns the created secret\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async createSecret(\n name: string,\n secret: string,\n description: string,\n versionID?: string,\n tags?: Array\n ): Promise {\n versionID = versionID || uuidv4()\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.CreateSecret`,\n },\n body: JSON.stringify({\n Name: name,\n Description: description,\n SecretString: secret,\n ClientRequestToken: versionID,\n Tags: tags,\n }),\n },\n {}\n )\n\n // Ensure to include the desired 'Action' in the X-Amz-Target\n // header field, as documented by the AWS API docs.\n // headers['X-Amz-Target'] = `${this.serviceName}.CreateSecret`\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.CreateSecret, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n /**\n * Update a secret's value.\n *\n * Note that this method only support string-based values at the moment.\n *\n * @param {string} id - The ARN or name of the secret to update.\n * @param {string} secret - The text data to encrypt and store in this new version of the secret.\n * @param {} versionID=null - A unique identifier for the new version of the secret. This value helps ensure idempotency.\n * As a default, if no versionID is provided, one will be created for you using the UUID v4\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async putSecretValue(id: string, secret: string, versionID?: string): Promise {\n versionID = versionID || uuidv4()\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.PutSecretValue`,\n },\n body: JSON.stringify({\n SecretId: id,\n SecretString: secret,\n ClientRequestToken: versionID,\n }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.PutSecretValue, res)\n\n return Secret.fromJSON(res.json() as JSONObject)\n }\n\n /**\n * Deletes a secret and all of its versions.\n *\n * You can specify a recovery window during which you can restore the secret.\n * The minimum recovery window is 7 days. The default recovery window is 30 days.\n *\n * @param {string} secretID - The ARN or name of the secret to delete.\n * @param {number} recoveryWindow - The number of days from 7 to 30 that Secrets Manager\n * waits before permanently deleting the secret.\n * @throws {SecretsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async deleteSecret(\n id: string,\n { recoveryWindow = 30, noRecovery = false }: { recoveryWindow: number; noRecovery: boolean }\n ): Promise {\n const payload: { [key: string]: string | boolean | number } = {\n SecretId: id,\n }\n\n // noRecovery and recoveryWindow are exclusive parameters\n if (noRecovery === true) {\n payload['ForceDeleteWithoutRecovery'] = true\n } else {\n payload['RecoveryWindowInDays'] = recoveryWindow\n }\n\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `${this.serviceName}.DeleteSecret`,\n },\n body: JSON.stringify(payload),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SecretsManagerOperation.DeleteSecret, res)\n }\n\n _handle_error(\n operation: SecretsManagerOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new SecretsManagerServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new SecretsManagerServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n// TODO: create a Tags type\n\n/**\n * Class representing a Secret Manager's secret\n */\nexport class Secret {\n name: string\n arn: string\n secret: string\n createdDate: number\n lastAccessedDate: number\n lastChangedDate: number\n tags: Array<{ [key: string]: string }>\n\n /**\n * Constructs a Secret Manager's Secret\n *\n * @param {string} name - The friendly name of the secret.\n * @param {string} arn - The ARN of the secret.\n * @param {number} createdDate - The date and time that this version of the secret was created.\n * @param {number} lastAccessedDate - The last date that this secret was accessed. This value is\n * truncated to midnight of the date and therefore shows only the date, not the time.\n * @param {number} lastChangedDate - The last date and time that this secret was modified in any way.\n * @param {Array.} tags - The list of user-defined tags associated with the secret.\n */\n constructor(\n name: string,\n arn: string,\n secretString: string,\n createdDate: number,\n lastAccessedDate: number,\n lastChangedDate: number,\n tags: Array<{ [key: string]: string }> = []\n ) {\n this.name = name\n this.arn = arn\n this.secret = secretString\n this.createdDate = createdDate\n this.lastAccessedDate = lastAccessedDate\n this.lastChangedDate = lastChangedDate\n this.tags = tags\n }\n\n /**\n * Parses and constructs a Secret Manager's Secret from the content\n * of a JSON response returned by the AWS service\n *\n * @param {Object} json - JSON object as returned and parsed from\n * the AWS service's API call.\n * @returns {Secret}\n */\n static fromJSON(json: JSONObject) {\n return new Secret(\n json.Name as string,\n json.ARN as string,\n json.SecretString as string,\n json.CreatedDate as number,\n json.LastAccessedDate as number,\n json.LastChangedDate as number,\n json.Tags as Array<{ [key: string]: string }>\n )\n }\n}\n\nexport class SecretsManagerServiceError extends AWSError {\n operation: SecretsManagerOperation\n\n /**\n * Constructs a SecretsManagerServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {string} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: SecretsManagerOperation) {\n super(message, code)\n this.name = 'SecretsManagerServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SecretsManagerOperation defines all currently implemented Secrets Manager Service operations.\n */\nenum SecretsManagerOperation {\n ListSecrets = 'ListSecrets',\n GetSecretValue = 'GetSecretValue',\n CreateSecret = 'CreateSecret',\n PutSecretValue = 'PutSecretValue',\n DeleteSecret = 'DeleteSecret',\n}\n","import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n"],"names":["v1","v4","uuid","module","exports","byteToHex","i","toString","substr","buf","offset","bth","join","getRandomValues","crypto","bind","window","msCrypto","rnds8","Uint8Array","rnds","Array","r","Math","random","_nodeId","_clockseq","rng","bytesToUuid","_lastMSecs","_lastNSecs","options","b","node","clockseq","undefined","seedBytes","msecs","Date","getTime","nsecs","dt","Error","tl","tmh","n","ii","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Endpoint","endpoint","_classCallCheck","_defineProperty","completeUrl","startsWith","concat","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","this","_protocol","slice","_hostname","_port","parseInt","href","set","_value$split2","hostname","port","protocol","host","AWSConfig","region","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","require","AMZ_DATE_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","_i","_Object$keys","keys","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","soughtHeader","hasHeader","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","_regeneratorRuntime","t","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","_asyncToGenerator","fn","self","args","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","SecretsManagerClient","_AWSClient","awsConfig","serviceName","commonHeaders","_listSecrets","_callee","signedRequest","res","_context","sign","http","_handle_error","SecretsManagerOperation","ListSecrets","Secret","fromJSON","_getSecret","_callee2","id","_context2","SecretId","GetSecretValue","_x","_createSecret","_callee3","secret","description","versionID","tags","_context3","uuidv4","Name","Description","SecretString","ClientRequestToken","Tags","CreateSecret","_x2","_x3","_x4","_x5","_x6","_putSecretValue","_callee4","_context4","PutSecretValue","_x7","_x8","_x9","_deleteSecret","_callee5","_ref$recoveryWindow","recoveryWindow","_ref$noRecovery","payload","_context5","noRecovery","DeleteSecret","_x10","_x11","operation","errorCode","error_code","errorMessage","SecretsManagerServiceError","AWSClient","_endpoint","arn","secretString","createdDate","lastAccessedDate","lastChangedDate","ARN","CreatedDate","LastAccessedDate","LastChangedDate","_this2"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/signature.js b/dist/signature.js index 2cfb4eb..4403978 100644 --- a/dist/signature.js +++ b/dist/signature.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{AMZ_ALGORITHM_QUERY_PARAM:()=>r,AMZ_CONTENT_SHA256_HEADER:()=>s,AMZ_CREDENTIAL_QUERY_PARAM:()=>n,AMZ_DATE_HEADER:()=>l,AMZ_DATE_QUERY_PARAM:()=>o,AMZ_EXPIRES_QUERY_PARAM:()=>i,AMZ_SIGNATURE_QUERY_PARAM:()=>a,AMZ_SIGNED_HEADERS_QUERY_PARAM:()=>c,AMZ_TOKEN_QUERY_PARAM:()=>u,AUTHORIZATION_HEADER:()=>y,AWSConfig:()=>x,Endpoint:()=>E,HOST_HEADER:()=>d,InvalidAWSConfigError:()=>K,InvalidSignatureError:()=>ye,SIGNING_ALGORITHM_IDENTIFIER:()=>m,SignatureV4:()=>pe,UNSIGNED_PAYLOAD:()=>g});var r="X-Amz-Algorithm",n="X-Amz-Credential",o="X-Amz-Date",i="X-Amz-Expires",a="X-Amz-Signature",c="X-Amz-SignedHeaders",u="X-Amz-Security-Token",s="x-amz-content-sha256",l=o.toLowerCase(),f=a.toLowerCase(),p=("X-Amz-Target".toLowerCase(),u.toLowerCase()),y="authorization",h=[y,l,"date"],d="host",b={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},v="aws4_request",m="AWS4-HMAC-SHA256",g="UNSIGNED-PAYLOAD";function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return S(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r128)throw new K("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new K("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new E(t.endpoint):this.endpoint=t.endpoint)}return H(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),K=function(e){function t(e){return D(this,t),T(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}(t,e),H(t)}(k(Error));const U=require("k6/crypto");var q=e.n(U);const z=require("k6/html");function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function Q(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=ae(ae({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=de(r.signingDate),o=n.longDate,i=n.shortDate,a=r.signingService||this.service,c=r.signingRegion||this.region,u="".concat(i,"/").concat(c,"/").concat(a,"/").concat(v);e.headers[d]||(e.headers[d]=e.endpoint.hostname);for(var f=0,b=Object.keys(e.headers);f-1&&delete e.headers[g]}e.headers[l]=o,this.credentials.sessionToken&&(e.headers[p]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var O=this.computePayloadHash(e);!function(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);r1&&void 0!==arguments[1]?arguments[1]:{},s=t.signingDate,l=void 0===s?new Date:s,f=t.expiresIn,p=void 0===f?3600:f,y=t.unsignableHeaders,h=t.unhoistableHeaders,b=t.signableHeaders,g=t.signingRegion,O=t.signingService,w=de(l),S=w.longDate,_=w.shortDate,A=g||this.region,j=O||this.service;if(p>604800)throw new ye("Signature version 4 presigned URLs can't be valid for more than 7 days");var E="".concat(_,"/").concat(A,"/").concat(j,"/").concat(v),P=this.moveHeadersToQuery(e,{unhoistableHeaders:h});P.headers[d]||(P.headers[d]=e.endpoint.hostname),this.credentials.sessionToken&&(P.query[u]=this.credentials.sessionToken),P.query[r]=m,P.query[n]="".concat(this.credentials.accessKeyId,"/").concat(E),P.query[o]=S,P.query[i]=p.toString(10);var T=this.computeCanonicalHeaders(P,y,b);P.query[c]=Object.keys(T).sort().join(";");var k=this.deriveSigningKey(this.credentials,j,A,_),C=this.computePayloadHash(e),R=this.createCanonicalRequest(P,T,C);P.query[a]=this.calculateSignature(S,E,k,R);var I=P.endpoint.href;return P.path&&(I+=P.path),P.query&&(I+="?".concat(this.serializeQueryParameters(P.query))),ae({url:I},P)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=q().sha256(r,"hex");return"".concat(m,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var o=this.createStringToSign(e,t,n);return q().hmac("sha256",r,o,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var o=e.secretAccessKey,i=q().hmac("sha256","AWS4"+o,n,"binary"),a=q().hmac("sha256",i,r,"binary"),c=q().hmac("sha256",a,t,"binary");return q().hmac("sha256",c,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=ne(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],i={},a=function(e){if(e.toLowerCase()===f)return 1;o.push(e);var t=n[e];"string"==typeof t?i[e]="".concat(he(e),"=").concat(he(t)):Array.isArray(t)&&(i[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(he(e),"=").concat(he(r))])}),[]).join("&"))},c=ne(Object.keys(n).sort());try{for(c.s();!(t=c.n()).done;){a(t.value)}}catch(e){c.e(e)}finally{c.f()}return o.map((function(e){return i[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,i={},a=ne(Object.keys(o).sort());try{for(a.s();!(n=a.n()).done;){var c=n.value;if(null!=o[c]){var u=c.toLowerCase();(u in b||null!=t&&t.has(u))&&(!r||r&&!r.has(u))||"string"==typeof o[c]&&(i[u]=o[c]=o[c].trim().replace(/\s+/g," "))}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"computePayloadHash",value:function(e){var t,r=e.headers,n=e.body;return r[s]?r[s]:null==n?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":"string"==typeof n||(t=n,"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)))?q().sha256(n,"hex").toLowerCase():ArrayBuffer.isView(n)?q().sha256(n.buffer,"hex").toLowerCase():g}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{AMZ_ALGORITHM_QUERY_PARAM:()=>r,AMZ_CONTENT_SHA256_HEADER:()=>s,AMZ_CREDENTIAL_QUERY_PARAM:()=>n,AMZ_DATE_HEADER:()=>l,AMZ_DATE_QUERY_PARAM:()=>o,AMZ_EXPIRES_QUERY_PARAM:()=>i,AMZ_SIGNATURE_QUERY_PARAM:()=>a,AMZ_SIGNED_HEADERS_QUERY_PARAM:()=>c,AMZ_TOKEN_QUERY_PARAM:()=>u,AUTHORIZATION_HEADER:()=>y,AWSConfig:()=>x,Endpoint:()=>E,HOST_HEADER:()=>d,InvalidAWSConfigError:()=>K,InvalidSignatureError:()=>ve,SIGNING_ALGORITHM_IDENTIFIER:()=>m,SignatureV4:()=>be,UNSIGNED_PAYLOAD:()=>g});var r="X-Amz-Algorithm",n="X-Amz-Credential",o="X-Amz-Date",i="X-Amz-Expires",a="X-Amz-Signature",c="X-Amz-SignedHeaders",u="X-Amz-Security-Token",s="x-amz-content-sha256",l=o.toLowerCase(),f=a.toLowerCase(),p=("X-Amz-Target".toLowerCase(),u.toLowerCase()),y="authorization",h=[y,l,"date"],d="host",b={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},v="aws4_request",m="AWS4-HMAC-SHA256",g="UNSIGNED-PAYLOAD";function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return S(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r128)throw new K("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new K("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new E(t.endpoint):this.endpoint=t.endpoint)}return H(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),K=function(e){function t(e){return D(this,t),T(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}(t,e),H(t)}(k(Error));const U=require("k6/crypto");var q=e.n(U);const z=require("k6/html");function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=le(le({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=ge(r.signingDate),o=n.longDate,i=n.shortDate,a=r.signingService||this.service,c=r.signingRegion||this.region,u="".concat(i,"/").concat(c,"/").concat(a,"/").concat(v);e.headers[d]||(e.headers[d]=e.endpoint.hostname);for(var f=0,b=Object.keys(e.headers);f-1&&delete e.headers[g]}e.headers[l]=o,this.credentials.sessionToken&&(e.headers[p]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var O=this.computePayloadHash(e);!function(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);r1&&void 0!==arguments[1]?arguments[1]:{},s=t.signingDate,l=void 0===s?new Date:s,f=t.expiresIn,p=void 0===f?3600:f,y=t.unsignableHeaders,h=t.unhoistableHeaders,b=t.signableHeaders,g=t.signingRegion,O=t.signingService,w=ge(l),S=w.longDate,_=w.shortDate,A=g||this.region,j=O||this.service;if(p>604800)throw new ve("Signature version 4 presigned URLs can't be valid for more than 7 days");var E="".concat(_,"/").concat(A,"/").concat(j,"/").concat(v),P=this.moveHeadersToQuery(e,{unhoistableHeaders:h});P.headers[d]||(P.headers[d]=e.endpoint.hostname),this.credentials.sessionToken&&(P.query[u]=this.credentials.sessionToken),P.query[r]=m,P.query[n]="".concat(this.credentials.accessKeyId,"/").concat(E),P.query[o]=S,P.query[i]=p.toString(10);var T=this.computeCanonicalHeaders(P,y,b);P.query[c]=Object.keys(T).sort().join(";");var k=this.deriveSigningKey(this.credentials,j,A,_),C=this.computePayloadHash(e),R=this.createCanonicalRequest(P,T,C);P.query[a]=this.calculateSignature(S,E,k,R);var I=P.endpoint.href;return P.path&&(I+=P.path),P.query&&(I+="?".concat(this.serializeQueryParameters(P.query))),le({url:I},P)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=q().sha256(r,"hex");return"".concat(m,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var o=this.createStringToSign(e,t,n);return q().hmac("sha256",r,o,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var o=e.secretAccessKey,i=q().hmac("sha256","AWS4"+o,n,"binary"),a=q().hmac("sha256",i,r,"binary"),c=q().hmac("sha256",a,t,"binary");return q().hmac("sha256",c,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=ce(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],i={},a=function(e){if(e.toLowerCase()===f)return 1;o.push(e);var t=n[e];"string"==typeof t?i[e]="".concat(me(e),"=").concat(me(t)):Array.isArray(t)&&(i[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(me(e),"=").concat(me(r))])}),[]).join("&"))},c=ce(Object.keys(n).sort());try{for(c.s();!(t=c.n()).done;){a(t.value)}}catch(e){c.e(e)}finally{c.f()}return o.map((function(e){return i[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,i={},a=ce(Object.keys(o).sort());try{for(a.s();!(n=a.n()).done;){var c=n.value;if(null!=o[c]){var u=c.toLowerCase();(u in b||null!=t&&t.has(u))&&(!r||r&&!r.has(u))||"string"==typeof o[c]&&(i[u]=o[c]=o[c].trim().replace(/\s+/g," "))}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"computePayloadHash",value:function(e){var t,r=e.headers,n=e.body;return r[s]?r[s]:null==n?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":"string"==typeof n||(t=n,"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)))?q().sha256(n,"hex").toLowerCase():ArrayBuffer.isView(n)?q().sha256(n.buffer,"hex").toLowerCase():g}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/crypto\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/html\");","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","AMZ_ALGORITHM_QUERY_PARAM","AMZ_CREDENTIAL_QUERY_PARAM","AMZ_DATE_QUERY_PARAM","AMZ_EXPIRES_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_SIGNED_HEADERS_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","UNSIGNED_PAYLOAD","Endpoint","endpoint","_classCallCheck","_defineProperty","completeUrl","startsWith","concat","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","this","_protocol","slice","_hostname","_port","parseInt","undefined","href","set","_value$split2","hostname","port","protocol","host","AWSConfig","options","region","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","require","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","_i","_Object$keys","keys","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","soughtHeader","hasHeader","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"signature.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,wfCFvD,IAAMC,EAA4B,kBAC5BC,EAA6B,mBAC7BC,EAAuB,aACvBC,EAA0B,gBAC1BC,EAA4B,kBAC5BC,EAAiC,sBAEjCC,EAAwB,uBAKxBC,EAA4B,uBAC5BC,EAAkBN,EAAqBO,cACvCC,EAAuBN,EAA0BK,cAEjDE,GAVyB,eASkBF,cACxBH,EAAsBG,eAKzCG,EAAuB,gBAMvBC,EAAoB,CAACD,EAAsBJ,EAL7B,QAMdM,EAAc,OAMdC,EAA4B,CACrCC,eAAe,EACf,iBAAiB,EACjBC,YAAY,EACZC,QAAQ,EACRC,MAAM,EACN,cAAc,EACd,gBAAgB,EAChBC,QAAQ,EAC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,IACd,IAAC,CA5nBmB,GAuoBXW,GAAqB,SAAA0E,GAM9B,SAAA1E,EAAY5E,EAAiBO,GAAe,IAAAC,EAEL,OAFKjD,GAAA,KAAAqH,IACxCpE,EAAAP,GAAA,KAAA2E,EAAA,CAAM5E,EAASO,KACVE,KAAO,wBAAuBD,CACvC,CAAC,O,sRAAAN,CAAA0E,EAAA0E,GAAA7J,GAAAmF,EAAA,CAT6B,CAAStE,IA+I3C,SAASoH,GAAUV,GAKf,OAAOI,mBAAmBJ,GAAK/I,QAAQ,YAJrB,SAACsL,GACf,MAAO,IAAP5L,OAAW4L,EAAEC,WAAW,GAAG1E,SAAS,IAAI2E,cAC5C,GAGJ,CASA,SAASlH,GAAWmH,GAChB,IAeaC,EAfPnH,GAeOmH,EAfYD,EA2B7B,SAAgBC,GACZ,MAAoB,iBAATA,EACA,IAAIzH,KAAY,IAAPyH,GAGA,iBAATA,EACHC,OAAOD,GACA,IAAIzH,KAAoB,IAAf0H,OAAOD,IAGpB,IAAIzH,KAAKyH,GAGbA,CACX,CAzBWE,CAAOF,GACTG,cACA7L,QAAQ,YAAa,MAlBKA,QAAQ,QAAS,IAChD,MAAO,CACHuE,SAAAA,EACAC,UAAWD,EAASnE,MAAM,EAAG,GAErC,C","sources":["webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/utils.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/crypto\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/html\");","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n\nexport class NetworkError extends Error {\n code: number;\n\n constructor(message: string, code: number) {\n super(message)\n this.name = 'NetworkError'\n this.code = code\n }\n}","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","AMZ_ALGORITHM_QUERY_PARAM","AMZ_CREDENTIAL_QUERY_PARAM","AMZ_DATE_QUERY_PARAM","AMZ_EXPIRES_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_SIGNED_HEADERS_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","UNSIGNED_PAYLOAD","Endpoint","endpoint","_classCallCheck","_defineProperty","completeUrl","startsWith","concat","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","this","_protocol","slice","_hostname","_port","parseInt","undefined","href","set","_value$split2","hostname","port","protocol","host","AWSConfig","options","region","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","require","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","_i","_Object$keys","keys","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","soughtHeader","hasHeader","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/sqs.js b/dist/sqs.js index 76fbe27..8514cd6 100644 --- a/dist/sqs.js +++ b/dist/sqs.js @@ -1,3 +1,3 @@ /*! For license information please see sqs.js.LICENSE.txt */ -(()=>{"use strict";var e={2:(e,t,r)=>{r.d(t,{R:()=>u});var n=r(556);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var r=0;r{r.d(t,{g:()=>d,r:()=>v});var n=r(556);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,r){return t=s(t),function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(c())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&u(o,r.prototype),o}(e,arguments,s(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,e)},a(e)}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r128)throw new v("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new v("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new n.y(t.endpoint):this.endpoint=t.endpoint)}return p(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),v=function(e){function t(e){return f(this,t),i(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),p(t)}(a(Error))},464:(e,t,r)=>{r.d(t,{Kq:()=>o,Qt:()=>u,Qz:()=>g,SN:()=>b,Uv:()=>w,VQ:()=>m,Zs:()=>i,_e:()=>O,b2:()=>f,fk:()=>y,he:()=>a,iK:()=>s,ot:()=>l,pj:()=>d,sY:()=>p,ud:()=>h,wN:()=>n,z8:()=>S,zG:()=>c,zX:()=>v});var n="X-Amz-Algorithm",o="X-Amz-Credential",i="X-Amz-Date",a="X-Amz-Expires",c="X-Amz-Signature",u="X-Amz-SignedHeaders",s="X-Amz-Security-Token",f="x-amz-content-sha256",l=i.toLowerCase(),p=c.toLowerCase(),y=("X-Amz-Target".toLowerCase(),s.toLowerCase()),h="authorization",d=[h,l,"date"],v="host",b={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},m="aws4_request",g="AWS4-HMAC-SHA256",w=604800,O="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",S="UNSIGNED-PAYLOAD"},556:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rs});var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"_protocol",void 0),c(this,"_hostname",void 0),c(this,"_port",void 0);var r=!t.startsWith("http://")&&!t.startsWith("https://")?"".concat(e.DEFAULT_PROTOCOL,"://").concat(t):t,n=r.match(/^https?:/),i=o(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=n?n[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return t=e,(r=[{key:"copy",value:function(){return new e(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(e){var t=o(e.split(":"),2),r=t[0],n=t[1];this._hostname=r,this._port=n?parseInt(n):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(e){this._hostname=e}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(t){var r=t.match(/^https?:/),n=o(t.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=n.split(":")[0],this._port=n.split(":")[1]?parseInt(n.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(e){this._port=e}},{key:"protocol",get:function(){return this._protocol},set:function(e){this._protocol=e}}])&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();c(s,"DEFAULT_PROTOCOL","https")},539:(e,t,r)=>{r.d(t,{c:()=>p});var n=r(95);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var r=0;r{function n(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);rn})},639:(e,t,r)=>{r.d(t,{B:()=>j,s:()=>_});var n=r(275),o=r.n(n),i=r(464),a=r(539),c=r(21),u=r(680);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t,r){return t=p(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=b(b({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=E(r.signingDate),o=n.longDate,a=n.shortDate,u=r.signingService||this.service,s=r.signingRegion||this.region,f="".concat(a,"/").concat(s,"/").concat(u,"/").concat(i.VQ);e.headers[i.zX]||(e.headers[i.zX]=e.endpoint.hostname);for(var l=0,p=Object.keys(e.headers);l-1&&delete e.headers[y]}e.headers[i.ot]=o,this.credentials.sessionToken&&(e.headers[i.fk]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var h=this.computePayloadHash(e);!(0,c.o)(i.b2,e.headers)&&this.applyChecksum&&(e.headers[i.b2]=h);var d=this.computeCanonicalHeaders(e,r.unsignableHeaders,r.signableHeaders),v=this.calculateSignature(o,f,this.deriveSigningKey(this.credentials,u,s,a),this.createCanonicalRequest(e,d,h));e.headers[i.ud]="".concat(i.Qz," ")+"Credential=".concat(this.credentials.accessKeyId,"/").concat(f,", ")+"SignedHeaders=".concat(Object.keys(d).sort().join(";"),", ")+"Signature=".concat(v);var m=e.endpoint.href;return e.path&&(m+=e.path),e.query&&(m+="?".concat(this.serializeQueryParameters(e.query))),b({url:m},e)}},{key:"presign",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.signingDate,n=void 0===r?new Date:r,o=t.expiresIn,a=void 0===o?3600:o,c=t.unsignableHeaders,u=t.unhoistableHeaders,s=t.signableHeaders,f=t.signingRegion,l=t.signingService,p=E(n),y=p.longDate,h=p.shortDate,d=f||this.region,v=l||this.service;if(a>i.Uv)throw new _("Signature version 4 presigned URLs can't be valid for more than 7 days");var m="".concat(h,"/").concat(d,"/").concat(v,"/").concat(i.VQ),g=this.moveHeadersToQuery(e,{unhoistableHeaders:u});g.headers[i.zX]||(g.headers[i.zX]=e.endpoint.hostname),this.credentials.sessionToken&&(g.query[i.iK]=this.credentials.sessionToken),g.query[i.wN]=i.Qz,g.query[i.Kq]="".concat(this.credentials.accessKeyId,"/").concat(m),g.query[i.Zs]=y,g.query[i.he]=a.toString(10);var w=this.computeCanonicalHeaders(g,c,s);g.query[i.Qt]=Object.keys(w).sort().join(";");var O=this.deriveSigningKey(this.credentials,v,d,h),S=this.computePayloadHash(e),j=this.createCanonicalRequest(g,w,S);g.query[i.zG]=this.calculateSignature(y,m,O,j);var P=g.endpoint.href;return g.path&&(P+=g.path),g.query&&(P+="?".concat(this.serializeQueryParameters(g.query))),b({url:P},g)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=o().sha256(r,"hex");return"".concat(i.Qz,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var i=this.createStringToSign(e,t,n);return o().hmac("sha256",r,i,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var i=e.secretAccessKey,a=o().hmac("sha256","AWS4"+i,n,"binary"),c=o().hmac("sha256",a,r,"binary"),u=o().hmac("sha256",c,t,"binary");return o().hmac("sha256",u,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=h(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],a={},c=function(e){if(e.toLowerCase()===i.sY)return 1;o.push(e);var t=n[e];"string"==typeof t?a[e]="".concat(P(e),"=").concat(P(t)):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(P(e),"=").concat(P(r))])}),[]).join("&"))},u=h(Object.keys(n).sort());try{for(u.s();!(t=u.n()).done;){c(t.value)}}catch(e){u.e(e)}finally{u.f()}return o.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,a={},c=h(Object.keys(o).sort());try{for(c.s();!(n=c.n()).done;){var u=n.value;if(null!=o[u]){var s=u.toLowerCase();(s in i.SN||null!=t&&t.has(s))&&(!r||r&&!r.has(s))||"string"==typeof o[u]&&(a[s]=o[u]=o[u].trim().replace(/\s+/g," "))}}}catch(e){c.e(e)}finally{c.f()}return a}},{key:"computePayloadHash",value:function(e){var t=e.headers,r=e.body;return t[i.b2]?t[i.b2]:null==r?i._e:"string"==typeof r||(0,u.m)(r)?o().sha256(r,"hex").toLowerCase():ArrayBuffer.isView(r)?o().sha256(r.buffer,"hex").toLowerCase():i.z8}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a{function n(e){return"function"==typeof ArrayBuffer&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e))}function o(e){return Object.keys(e).reduce((function(t,r){var n=e[r];return null!=n&&t.push("".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(n))),t}),[]).join("&")}r.d(t,{R:()=>o,m:()=>n})},275:e=>{e.exports=require("k6/crypto")},95:e=>{e.exports=require("k6/html")},570:e=>{e.exports=require("k6/http")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{r.r(n),r.d(n,{AWSConfig:()=>e.g,InvalidAWSConfigError:()=>e.r,InvalidSignatureError:()=>t.s,SQSClient:()=>A,SQSServiceError:()=>T});var e=r(811),t=r(639),o=r(2),i=r(570),a=r.n(i),c=r(680),u=r(539);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(){f=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),c=new L(n||[]);return o(a,"_invoke",{value:A(e,r,c)}),a}function y(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",d="suspendedYield",v="executing",b="completed",m={};function g(){}function w(){}function O(){}var S={};l(S,a,(function(){return this}));var j=Object.getPrototypeOf,_=j&&j(j(I([])));_&&_!==r&&n.call(_,a)&&(S=_);var P=O.prototype=g.prototype=Object.create(S);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,c){var u=y(e[o],e,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==s(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(l).then((function(e){f.value=e,a(f)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=x(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=y(t,r,n);if("normal"===s.type){if(o=n.done?b:d,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function x(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,x(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=y(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==y[2]?y[2]:{}).messageDeduplicationId&&(o=h(h({},o),{},{MessageDeduplicationId:n.messageDeduplicationId})),void 0!==n.messageGroupId&&(o=h(h({},o),{},{MessageGroupId:n.messageGroupId})),void 0!==n.messageAttributes&&(i=Object.entries(n.messageAttributes).reduce((function(e,t,r){var n=l(t,2),o=n[0],i=n[1],a="Binary"===i.type?"BinaryValue":"StringValue";return Object.assign(e,P(P(P({},"MessageAttribute.".concat(r+1,".Name"),o),"MessageAttribute.".concat(r+1,".Value.").concat(a),i.value),"MessageAttribute.".concat(r+1,".Value.DataType"),i.type))}),{}),o=h(h({},o),i)),void 0!==n.delaySeconds&&(o=h(h({},o),{},{DelaySeconds:n.delaySeconds})),u=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:h({},this.commonHeaders),body:(0,c.R)(o)},{}),e.next=10,a().asyncRequest("POST",u.url,u.body||"",{headers:u.headers});case 10:return s=e.sent,this._handleError("SendMessage",s),p=s.html("SendMessageResponse > SendMessageResult"),e.abrupt("return",new x(p.find("MessageId").text(),p.find("MD5OfMessageBody").text()));case 14:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"listQueues",value:(n=v(f().mark((function e(){var t,r,n,o,i,u=arguments;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={Action:"ListQueues",Version:k},void 0!==(null==(t=u.length>0&&void 0!==u[0]?u[0]:{})?void 0:t.maxResults)&&(r=h(h({},r),{},{MaxResults:t.maxResults})),void 0!==(null==t?void 0:t.nextToken)&&(r=h(h({},r),{},{NextToken:t.nextToken})),void 0!==(null==t?void 0:t.queueNamePrefix)&&(r=h(h({},r),{},{QueueNamePrefix:t.queueNamePrefix})),n=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:h(h({},this.commonHeaders),{},{Host:this.endpoint.host}),body:(0,c.R)(r)},{}),e.next=9,a().asyncRequest("POST",n.url,n.body||"",{headers:n.headers});case 9:return o=e.sent,this._handleError("ListQueues",o),i=o.html(),e.abrupt("return",{urls:i.find("QueueUrl").toArray().map((function(e){return e.text()})),nextToken:i.find("NextToken").text()||void 0});case 13:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"_handleError",value:function(e,r){var n=r.error_code;if(""!=r.error||0!==n){var o=u.c.parseXML(r.body);if("AuthorizationHeaderMalformed"===o.code)throw new t.s(o.message,o.code);throw new T(o.message,o.code||"unknown",e)}}}]);var n,o}(o.R),x=g((function e(t,r){b(this,e),P(this,"id",void 0),P(this,"bodyMD5",void 0),this.id=t,this.bodyMD5=r})),T=function(e){function t(e,r,n){var o;return b(this,t),P(o=w(this,t,[e,r]),"operation",void 0),o.name="SQSServiceError",o.operation=n,o}return j(t,e),g(t)}(u.c)})();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})(); +(()=>{"use strict";var e={2:(e,t,r)=>{r.d(t,{R:()=>u});var n=r(556);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var r=0;r{r.d(t,{g:()=>d,r:()=>v});var n=r(556);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,r){return t=s(t),function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(c())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&u(o,r.prototype),o}(e,arguments,s(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,e)},a(e)}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r128)throw new v("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new v("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new n.y(t.endpoint):this.endpoint=t.endpoint)}return p(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),v=function(e){function t(e){return f(this,t),i(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),p(t)}(a(Error))},464:(e,t,r)=>{r.d(t,{Kq:()=>o,Qt:()=>u,Qz:()=>g,SN:()=>b,Uv:()=>w,VQ:()=>m,Zs:()=>i,_e:()=>O,b2:()=>f,fk:()=>y,he:()=>a,iK:()=>s,ot:()=>l,pj:()=>d,sY:()=>p,ud:()=>h,wN:()=>n,z8:()=>S,zG:()=>c,zX:()=>v});var n="X-Amz-Algorithm",o="X-Amz-Credential",i="X-Amz-Date",a="X-Amz-Expires",c="X-Amz-Signature",u="X-Amz-SignedHeaders",s="X-Amz-Security-Token",f="x-amz-content-sha256",l=i.toLowerCase(),p=c.toLowerCase(),y=("X-Amz-Target".toLowerCase(),s.toLowerCase()),h="authorization",d=[h,l,"date"],v="host",b={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},m="aws4_request",g="AWS4-HMAC-SHA256",w=604800,O="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",S="UNSIGNED-PAYLOAD"},556:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rs});var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"_protocol",void 0),c(this,"_hostname",void 0),c(this,"_port",void 0);var r=!t.startsWith("http://")&&!t.startsWith("https://")?"".concat(e.DEFAULT_PROTOCOL,"://").concat(t):t,n=r.match(/^https?:/),i=o(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=n?n[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return t=e,(r=[{key:"copy",value:function(){return new e(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(e){var t=o(e.split(":"),2),r=t[0],n=t[1];this._hostname=r,this._port=n?parseInt(n):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(e){this._hostname=e}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(t){var r=t.match(/^https?:/),n=o(t.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=n.split(":")[0],this._port=n.split(":")[1]?parseInt(n.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(e){this._port=e}},{key:"protocol",get:function(){return this._protocol},set:function(e){this._protocol=e}}])&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();c(s,"DEFAULT_PROTOCOL","https")},539:(e,t,r)=>{r.d(t,{c:()=>v});var n=r(95);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r{function n(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);rn})},639:(e,t,r)=>{r.d(t,{B:()=>j,s:()=>_});var n=r(275),o=r.n(n),i=r(464),a=r(539),c=r(21),u=r(680);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t,r){return t=p(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=b(b({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=E(r.signingDate),o=n.longDate,a=n.shortDate,u=r.signingService||this.service,s=r.signingRegion||this.region,f="".concat(a,"/").concat(s,"/").concat(u,"/").concat(i.VQ);e.headers[i.zX]||(e.headers[i.zX]=e.endpoint.hostname);for(var l=0,p=Object.keys(e.headers);l-1&&delete e.headers[y]}e.headers[i.ot]=o,this.credentials.sessionToken&&(e.headers[i.fk]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var h=this.computePayloadHash(e);!(0,c.o)(i.b2,e.headers)&&this.applyChecksum&&(e.headers[i.b2]=h);var d=this.computeCanonicalHeaders(e,r.unsignableHeaders,r.signableHeaders),v=this.calculateSignature(o,f,this.deriveSigningKey(this.credentials,u,s,a),this.createCanonicalRequest(e,d,h));e.headers[i.ud]="".concat(i.Qz," ")+"Credential=".concat(this.credentials.accessKeyId,"/").concat(f,", ")+"SignedHeaders=".concat(Object.keys(d).sort().join(";"),", ")+"Signature=".concat(v);var m=e.endpoint.href;return e.path&&(m+=e.path),e.query&&(m+="?".concat(this.serializeQueryParameters(e.query))),b({url:m},e)}},{key:"presign",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.signingDate,n=void 0===r?new Date:r,o=t.expiresIn,a=void 0===o?3600:o,c=t.unsignableHeaders,u=t.unhoistableHeaders,s=t.signableHeaders,f=t.signingRegion,l=t.signingService,p=E(n),y=p.longDate,h=p.shortDate,d=f||this.region,v=l||this.service;if(a>i.Uv)throw new _("Signature version 4 presigned URLs can't be valid for more than 7 days");var m="".concat(h,"/").concat(d,"/").concat(v,"/").concat(i.VQ),g=this.moveHeadersToQuery(e,{unhoistableHeaders:u});g.headers[i.zX]||(g.headers[i.zX]=e.endpoint.hostname),this.credentials.sessionToken&&(g.query[i.iK]=this.credentials.sessionToken),g.query[i.wN]=i.Qz,g.query[i.Kq]="".concat(this.credentials.accessKeyId,"/").concat(m),g.query[i.Zs]=y,g.query[i.he]=a.toString(10);var w=this.computeCanonicalHeaders(g,c,s);g.query[i.Qt]=Object.keys(w).sort().join(";");var O=this.deriveSigningKey(this.credentials,v,d,h),S=this.computePayloadHash(e),j=this.createCanonicalRequest(g,w,S);g.query[i.zG]=this.calculateSignature(y,m,O,j);var P=g.endpoint.href;return g.path&&(P+=g.path),g.query&&(P+="?".concat(this.serializeQueryParameters(g.query))),b({url:P},g)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=o().sha256(r,"hex");return"".concat(i.Qz,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var i=this.createStringToSign(e,t,n);return o().hmac("sha256",r,i,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var i=e.secretAccessKey,a=o().hmac("sha256","AWS4"+i,n,"binary"),c=o().hmac("sha256",a,r,"binary"),u=o().hmac("sha256",c,t,"binary");return o().hmac("sha256",u,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=h(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],a={},c=function(e){if(e.toLowerCase()===i.sY)return 1;o.push(e);var t=n[e];"string"==typeof t?a[e]="".concat(P(e),"=").concat(P(t)):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(P(e),"=").concat(P(r))])}),[]).join("&"))},u=h(Object.keys(n).sort());try{for(u.s();!(t=u.n()).done;){c(t.value)}}catch(e){u.e(e)}finally{u.f()}return o.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,a={},c=h(Object.keys(o).sort());try{for(c.s();!(n=c.n()).done;){var u=n.value;if(null!=o[u]){var s=u.toLowerCase();(s in i.SN||null!=t&&t.has(s))&&(!r||r&&!r.has(s))||"string"==typeof o[u]&&(a[s]=o[u]=o[u].trim().replace(/\s+/g," "))}}}catch(e){c.e(e)}finally{c.f()}return a}},{key:"computePayloadHash",value:function(e){var t=e.headers,r=e.body;return t[i.b2]?t[i.b2]:null==r?i._e:"string"==typeof r||(0,u.m)(r)?o().sha256(r,"hex").toLowerCase():ArrayBuffer.isView(r)?o().sha256(r.buffer,"hex").toLowerCase():i.z8}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a{function n(e){return"function"==typeof ArrayBuffer&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e))}function o(e){return Object.keys(e).reduce((function(t,r){var n=e[r];return null!=n&&t.push("".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(n))),t}),[]).join("&")}r.d(t,{R:()=>o,m:()=>n})},275:e=>{e.exports=require("k6/crypto")},95:e=>{e.exports=require("k6/html")},570:e=>{e.exports=require("k6/http")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{r.r(n),r.d(n,{AWSConfig:()=>e.g,InvalidAWSConfigError:()=>e.r,InvalidSignatureError:()=>t.s,SQSClient:()=>A,SQSServiceError:()=>T});var e=r(811),t=r(639),o=r(2),i=r(570),a=r.n(i),c=r(680),u=r(539);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(){f=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),c=new L(n||[]);return o(a,"_invoke",{value:A(e,r,c)}),a}function y(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",d="suspendedYield",v="executing",b="completed",m={};function g(){}function w(){}function O(){}var S={};l(S,a,(function(){return this}));var j=Object.getPrototypeOf,_=j&&j(j(I([])));_&&_!==r&&n.call(_,a)&&(S=_);var P=O.prototype=g.prototype=Object.create(S);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,c){var u=y(e[o],e,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==s(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(l).then((function(e){f.value=e,a(f)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=x(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=y(t,r,n);if("normal"===s.type){if(o=n.done?b:d,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function x(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,x(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=y(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==y[2]?y[2]:{}).messageDeduplicationId&&(o=h(h({},o),{},{MessageDeduplicationId:n.messageDeduplicationId})),void 0!==n.messageGroupId&&(o=h(h({},o),{},{MessageGroupId:n.messageGroupId})),void 0!==n.messageAttributes&&(i=Object.entries(n.messageAttributes).reduce((function(e,t,r){var n=l(t,2),o=n[0],i=n[1],a="Binary"===i.type?"BinaryValue":"StringValue";return Object.assign(e,P(P(P({},"MessageAttribute.".concat(r+1,".Name"),o),"MessageAttribute.".concat(r+1,".Value.").concat(a),i.value),"MessageAttribute.".concat(r+1,".Value.DataType"),i.type))}),{}),o=h(h({},o),i)),void 0!==n.delaySeconds&&(o=h(h({},o),{},{DelaySeconds:n.delaySeconds})),u=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:h({},this.commonHeaders),body:(0,c.R)(o)},{}),e.next=10,a().asyncRequest("POST",u.url,u.body||"",{headers:u.headers});case 10:return s=e.sent,this._handleError("SendMessage",s),p=s.html("SendMessageResponse > SendMessageResult"),e.abrupt("return",new x(p.find("MessageId").text(),p.find("MD5OfMessageBody").text()));case 14:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"listQueues",value:(n=v(f().mark((function e(){var t,r,n,o,i,u=arguments;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={Action:"ListQueues",Version:k},void 0!==(null==(t=u.length>0&&void 0!==u[0]?u[0]:{})?void 0:t.maxResults)&&(r=h(h({},r),{},{MaxResults:t.maxResults})),void 0!==(null==t?void 0:t.nextToken)&&(r=h(h({},r),{},{NextToken:t.nextToken})),void 0!==(null==t?void 0:t.queueNamePrefix)&&(r=h(h({},r),{},{QueueNamePrefix:t.queueNamePrefix})),n=this.signature.sign({method:"POST",endpoint:this.endpoint,path:"/",headers:h(h({},this.commonHeaders),{},{Host:this.endpoint.host}),body:(0,c.R)(r)},{}),e.next=9,a().asyncRequest("POST",n.url,n.body||"",{headers:n.headers});case 9:return o=e.sent,this._handleError("ListQueues",o),i=o.html(),e.abrupt("return",{urls:i.find("QueueUrl").toArray().map((function(e){return e.text()})),nextToken:i.find("NextToken").text()||void 0});case 13:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"_handleError",value:function(e,r){var n=r.error_code;if(""!=r.error||0!==n){var o=u.c.parseXML(r.body);if("AuthorizationHeaderMalformed"===o.code)throw new t.s(o.message,o.code);throw new T(o.message,o.code||"unknown",e)}}}]);var n,o}(o.R),x=g((function e(t,r){b(this,e),P(this,"id",void 0),P(this,"bodyMD5",void 0),this.id=t,this.bodyMD5=r})),T=function(e){function t(e,r,n){var o;return b(this,t),P(o=w(this,t,[e,r]),"operation",void 0),o.name="SQSServiceError",o.operation=n,o}return j(t,e),g(t)}(u.c)})();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})(); //# sourceMappingURL=sqs.js.map \ No newline at end of file diff --git a/dist/sqs.js.map b/dist/sqs.js.map index cdc3147..425a34a 100644 --- a/dist/sqs.js.map +++ b/dist/sqs.js.map @@ -1 +1 @@ -{"version":3,"file":"sqs.js","mappings":";u4BAWO,IAAMA,EAAS,WAsBlB,SAXA,SAAAA,EAAYC,EAAsBC,gGAAqBC,CAAA,KAAAH,GAAAI,EAAA,yBAAAA,EAAA,2BAAAA,EAAA,yBACnDC,KAAKJ,UAAYA,EACjBI,KAAKH,YAAcA,EAIOI,MAAtBL,EAAUM,WACVF,KAAKG,UAAYP,EAAUM,SAEnC,KAEA,EAAAE,IAAA,WAAAC,IASA,WAMI,OALsBJ,MAAlBD,KAAKG,YACLH,KAAKG,UAAY,IAAIG,EAAAA,EAAS,WAADC,OACdP,KAAKH,YAAW,KAAAU,OAAIP,KAAKJ,UAAUY,OAAM,oBAGrDR,KAAKG,SAChB,EAEAM,IAQA,SAAoBP,GAChBF,KAAKG,UAAYD,CACrB,+FAAC,CAlDiB,uiFCPf,IAAMQ,EAAS,WA2El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EAAAA,GA6LlBkG,EAAO5E,GAkBhB,SAAA4E,EAAY6V,EAAYC,GAAiB7b,EAAA,KAAA+F,GAjBzC9F,EAAA,kBAMAA,EAAA,uBAYIC,KAAK0b,GAAKA,EACV1b,KAAK2b,QAAUA,CACnB,IAMSF,EAAe,SAAAvN,GAGxB,SAAAuN,EAAYha,EAAiBwD,EAAcoW,GAAyB,IAAAO,EAGtC,OAHsC9b,EAAA,KAAA2b,GAC5C1b,EAApB6b,EAAAla,EAAA,KAAA+Z,EAAA,CAAMha,EAASwD,IAAK,oBACpB2W,EAAKzW,KAAO,kBACZyW,EAAKP,UAAYA,EAASO,CAC9B,CAAC,OAAAja,EAAA8Z,EAAAvN,GAAAjN,EAAAwa,EAAA,CAPuB,CAASzW,EAAAA","sources":["webpack://k6-jslib-aws/./src/internal/client.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/sqs.ts"],"sourcesContent":["import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","module.exports = require(\"k6/crypto\");","module.exports = require(\"k6/html\");","module.exports = require(\"k6/http\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { HTTPHeaders, SignedHTTPRequest } from './http'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\nimport { toFormUrlEncoded } from './utils'\nimport { AWSError } from './error'\n\nconst API_VERSION = '2012-11-05'\n\nexport class SQSClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'sqs')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: true,\n })\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-www-form-urlencoded',\n }\n }\n\n /**\n * Delivers a message to the specified queue.\n *\n * @param {string} queueUrl - The URL of the Amazon SQS queue to which a message is sent. Queue URLs and names are case-sensitive.\n * @param {string} messageBody - The message to send. The minimum size is one character. The maximum size is 256 KB.\n * @param {Object} options - Options for the request\n * @param {string} [options.messageDeduplicationId] - The message deduplication id.\n * @param {string} [options.messageGroupId] - The message group ID for FIFO queues\n * @returns {Message} - The message that was sent.\n */\n async sendMessage(\n queueUrl: string,\n messageBody: string,\n options: SendMessageOptions = {}\n ): Promise {\n const method = 'POST'\n\n let body: object = {\n Action: 'SendMessage',\n Version: API_VERSION,\n QueueUrl: queueUrl,\n MessageBody: messageBody,\n }\n\n if (typeof options.messageDeduplicationId !== 'undefined') {\n body = { ...body, MessageDeduplicationId: options.messageDeduplicationId }\n }\n\n if (typeof options.messageGroupId !== 'undefined') {\n body = { ...body, MessageGroupId: options.messageGroupId }\n }\n\n if (typeof options.messageAttributes !== 'undefined') {\n /*\n * A single message attribute is represented as 3 separate parameters: name, value, and type.\n * The name of the value parameter varies based on the data type.\n * See https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html#SQS-SendMessage-request-MessageAttributes\n * for more information.\n */\n const attributeParameters = Object.entries(options.messageAttributes).reduce(\n (params, [name, attribute], i) => {\n const valueParameterSuffix =\n attribute.type === 'Binary' ? 'BinaryValue' : 'StringValue'\n return Object.assign(params, {\n [`MessageAttribute.${i + 1}.Name`]: name,\n [`MessageAttribute.${i + 1}.Value.${valueParameterSuffix}`]:\n attribute.value,\n [`MessageAttribute.${i + 1}.Value.DataType`]: attribute.type,\n })\n },\n {} as Record\n )\n body = { ...body, ...attributeParameters }\n }\n\n if (typeof options.delaySeconds !== 'undefined') {\n body = { ...body, DelaySeconds: options.delaySeconds }\n }\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n },\n body: toFormUrlEncoded(body),\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {\n headers: signedRequest.headers,\n })\n this._handleError('SendMessage', res)\n\n const parsed = res.html('SendMessageResponse > SendMessageResult')\n return new Message(parsed.find('MessageId').text(), parsed.find('MD5OfMessageBody').text())\n }\n\n /**\n * Returns a list of your queues in the current region.\n *\n * @param {ListQueuesRequestParameters} [parameters={}] request parameters\n * @param {number} [ListQueuesRequestParameters.maxResults] Maximum number of results to include in the response. Value range is 1 to 1000. You must set maxResults to receive a value for nextToken in the response.\n * @param {string} [ListQueuesRequestParameters.nextToken] Pagination token to request the next set of results.\n * @param {string} [ListQueuesRequestParameters.queueNamePrefix] A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned.\n * @returns {Object}\n * @returns {string[]} Object.queueUrls - A list of queue URLs, up to 1000 entries.\n * @returns {string} [Object.nextToken] - In the future, you can use NextToken to request the next set of results.\n */\n async listQueues(parameters: ListQueuesRequestParameters = {}): Promise {\n const method = 'POST'\n\n let body: object = {\n Action: 'ListQueues',\n Version: API_VERSION,\n }\n\n if (typeof parameters?.maxResults !== 'undefined') {\n body = { ...body, MaxResults: parameters.maxResults }\n }\n\n if (typeof parameters?.nextToken !== 'undefined') {\n body = { ...body, NextToken: parameters.nextToken }\n }\n\n if (typeof parameters?.queueNamePrefix !== 'undefined') {\n body = { ...body, QueueNamePrefix: parameters.queueNamePrefix }\n }\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n Host: this.endpoint.host,\n },\n body: toFormUrlEncoded(body),\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {\n headers: signedRequest.headers,\n })\n this._handleError('ListQueues', res)\n\n const parsed = res.html()\n return {\n urls: parsed\n .find('QueueUrl')\n .toArray()\n .map((e) => e.text()),\n nextToken: parsed.find('NextToken').text() || undefined,\n }\n }\n\n private _handleError(\n operation: SQSOperation,\n response: RefinedResponse\n ) {\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n if (errorMessage == '' && errorCode === 0) {\n return\n }\n\n const awsError = AWSError.parseXML(response.body as string)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw new SQSServiceError(awsError.message, awsError.code || 'unknown', operation)\n }\n }\n}\n\n/**\n * An Amazon SQS message.\n */\nexport class Message {\n /**\n * A unique identifier for the message.\n * A MessageIdis considered unique across all AWS accounts for an extended period of time.\n */\n id: string\n\n /**\n * An MD5 digest of the non-URL-encoded message body string.\n */\n bodyMD5: string\n\n /**\n * Instantiates a new Message object.\n *\n * @param id\n * @param md5Ofbody\n */\n constructor(id: string, bodyMD5: string) {\n this.id = id\n this.bodyMD5 = bodyMD5\n }\n}\n\n/**\n * SQSServiceError indicates an error occurred while interacting with the SQS API.\n */\nexport class SQSServiceError extends AWSError {\n operation: SQSOperation\n\n constructor(message: string, code: string, operation: SQSOperation) {\n super(message, code)\n this.name = 'SQSServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SQSOperation describes possible SQS operations.\n */\ntype SQSOperation = 'ListQueues' | 'SendMessage'\n\nexport interface SendMessageOptions {\n /**\n * The message deduplication ID for FIFO queues\n */\n messageDeduplicationId?: string\n\n /**\n * The message group ID for FIFO queues\n */\n messageGroupId?: string\n\n /**\n * The message attributes\n */\n messageAttributes?: {\n [name: string]: { type: 'String' | 'Number' | 'Binary'; value: string }\n }\n\n /**\n * The length of time, in seconds, for which to delay a specific message.\n */\n delaySeconds?: number\n}\n\nexport interface ListQueuesRequestParameters {\n /**\n * Maximum number of results to include in the response. Value range is 1 to 1000.\n */\n maxResults?: number\n /**\n * Pagination token to request the next set of results.\n */\n nextToken?: string\n /**\n * A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned.\n * Queue URLs and names are case-sensitive.\n */\n queueNamePrefix?: string\n}\n\nexport interface ListQueuesResponse {\n /**\n * A list of queue URLs, up to 1,000 entries, or the value of MaxResults you sent in the request.\n */\n urls: string[]\n /**\n * Pagination token to include in the next request.\n */\n nextToken?: string\n}\n"],"names":["AWSClient","awsConfig","serviceName","_classCallCheck","_defineProperty","this","undefined","endpoint","_endpoint","key","get","Endpoint","concat","region","set","AWSConfig","options","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","value","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","AMZ_ALGORITHM_QUERY_PARAM","AMZ_CREDENTIAL_QUERY_PARAM","AMZ_DATE_QUERY_PARAM","AMZ_EXPIRES_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_SIGNED_HEADERS_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","MAX_PRESIGNED_TTL","EMPTY_SHA256","UNSIGNED_PAYLOAD","completeUrl","startsWith","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","_protocol","slice","_hostname","_port","parseInt","href","_value$split2","hostname","port","protocol","host","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","hasHeader","soughtHeader","_i","_Object$keys","Object","keys","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","isArrayBuffer","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","prototype","call","toFormUrlEncoded","form","params","module","exports","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","d","a","definition","o","defineProperty","enumerable","obj","prop","hasOwnProperty","r","Symbol","toStringTag","_regeneratorRuntime","t","i","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","arr","_arrayWithHoles","_iterableToArrayLimit","minLen","_arrayLikeToArray","test","_unsupportedIterableToArray","_nonIterableRest","len","arr2","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","_asyncToGenerator","fn","self","args","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","API_VERSION","SQSClient","_AWSClient","commonHeaders","_sendMessage","_callee","queueUrl","messageBody","attributeParameters","signedRequest","res","parsed","_args","_context","Action","Version","QueueUrl","MessageBody","messageDeduplicationId","MessageDeduplicationId","messageGroupId","MessageGroupId","messageAttributes","entries","attribute","valueParameterSuffix","assign","delaySeconds","DelaySeconds","sign","http","_handleError","html","_x","_x2","_listQueues","_callee2","parameters","_args2","_context2","maxResults","MaxResults","nextToken","NextToken","queueNamePrefix","QueueNamePrefix","Host","urls","toArray","operation","errorCode","error_code","awsError","SQSServiceError","id","bodyMD5","_this2"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"sqs.js","mappings":";u4BAWO,IAAMA,EAAS,WAsBlB,SAXA,SAAAA,EAAYC,EAAsBC,gGAAqBC,CAAA,KAAAH,GAAAI,EAAA,yBAAAA,EAAA,2BAAAA,EAAA,yBACnDC,KAAKJ,UAAYA,EACjBI,KAAKH,YAAcA,EAIOI,MAAtBL,EAAUM,WACVF,KAAKG,UAAYP,EAAUM,SAEnC,KAEA,EAAAE,IAAA,WAAAC,IASA,WAMI,OALsBJ,MAAlBD,KAAKG,YACLH,KAAKG,UAAY,IAAIG,EAAAA,EAAS,WAADC,OACdP,KAAKH,YAAW,KAAAU,OAAIP,KAAKJ,UAAUY,OAAM,oBAGrDR,KAAKG,SAChB,EAEAM,IAQA,SAAoBP,GAChBF,KAAKG,UAAYD,CACrB,+FAAC,CAlDiB,uiFCPf,IAAMQ,EAAS,WA2ElB,SAAAA,EAAYC,GACR,GADmCb,EAAA,KAAAY,GA1EvCX,EAAA,sBAOAA,EAAA,2BAOAA,EAAA,+BAOAA,EAAA,4BAOAA,EAAA,yBA+CSY,EAAQH,QAA6B,KAAnBG,EAAQH,OAC3B,MAAM,IAAII,EAAsB,yFAADL,OAC+DI,EAAQH,OAAM,MAIhH,IAAKG,EAAQE,aAAuC,KAAxBF,EAAQE,YAChC,MAAM,IAAID,EAAsB,wEAADL,OAC8CI,EAAQE,YAAW,MAIpG,GAAIF,EAAQE,YAAYC,OAAS,IAAMH,EAAQE,YAAYC,OAAS,IAChE,MAAM,IAAIF,EAAsB,wFAADL,OAC6DI,EAAQE,YAAYC,SAIpH,IAAKH,EAAQI,iBAA+C,KAA5BJ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zW,EAAAA","sources":["webpack://k6-jslib-aws/./src/internal/client.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/sqs.ts"],"sourcesContent":["import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n\nexport class NetworkError extends Error {\n code: number;\n\n constructor(message: string, code: number) {\n super(message)\n this.name = 'NetworkError'\n this.code = code\n }\n}","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","module.exports = require(\"k6/crypto\");","module.exports = require(\"k6/html\");","module.exports = require(\"k6/http\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\nimport { HTTPHeaders, SignedHTTPRequest } from './http'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\nimport { toFormUrlEncoded } from './utils'\nimport { AWSError } from './error'\n\nconst API_VERSION = '2012-11-05'\n\nexport class SQSClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly commonHeaders: HTTPHeaders\n\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'sqs')\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: this.awsConfig.region,\n credentials: {\n accessKeyId: this.awsConfig.accessKeyId,\n secretAccessKey: this.awsConfig.secretAccessKey,\n sessionToken: this.awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: true,\n })\n\n this.commonHeaders = {\n 'Content-Type': 'application/x-www-form-urlencoded',\n }\n }\n\n /**\n * Delivers a message to the specified queue.\n *\n * @param {string} queueUrl - The URL of the Amazon SQS queue to which a message is sent. Queue URLs and names are case-sensitive.\n * @param {string} messageBody - The message to send. The minimum size is one character. The maximum size is 256 KB.\n * @param {Object} options - Options for the request\n * @param {string} [options.messageDeduplicationId] - The message deduplication id.\n * @param {string} [options.messageGroupId] - The message group ID for FIFO queues\n * @returns {Message} - The message that was sent.\n */\n async sendMessage(\n queueUrl: string,\n messageBody: string,\n options: SendMessageOptions = {}\n ): Promise {\n const method = 'POST'\n\n let body: object = {\n Action: 'SendMessage',\n Version: API_VERSION,\n QueueUrl: queueUrl,\n MessageBody: messageBody,\n }\n\n if (typeof options.messageDeduplicationId !== 'undefined') {\n body = { ...body, MessageDeduplicationId: options.messageDeduplicationId }\n }\n\n if (typeof options.messageGroupId !== 'undefined') {\n body = { ...body, MessageGroupId: options.messageGroupId }\n }\n\n if (typeof options.messageAttributes !== 'undefined') {\n /*\n * A single message attribute is represented as 3 separate parameters: name, value, and type.\n * The name of the value parameter varies based on the data type.\n * See https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html#SQS-SendMessage-request-MessageAttributes\n * for more information.\n */\n const attributeParameters = Object.entries(options.messageAttributes).reduce(\n (params, [name, attribute], i) => {\n const valueParameterSuffix =\n attribute.type === 'Binary' ? 'BinaryValue' : 'StringValue'\n return Object.assign(params, {\n [`MessageAttribute.${i + 1}.Name`]: name,\n [`MessageAttribute.${i + 1}.Value.${valueParameterSuffix}`]:\n attribute.value,\n [`MessageAttribute.${i + 1}.Value.DataType`]: attribute.type,\n })\n },\n {} as Record\n )\n body = { ...body, ...attributeParameters }\n }\n\n if (typeof options.delaySeconds !== 'undefined') {\n body = { ...body, DelaySeconds: options.delaySeconds }\n }\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n },\n body: toFormUrlEncoded(body),\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {\n headers: signedRequest.headers,\n })\n this._handleError('SendMessage', res)\n\n const parsed = res.html('SendMessageResponse > SendMessageResult')\n return new Message(parsed.find('MessageId').text(), parsed.find('MD5OfMessageBody').text())\n }\n\n /**\n * Returns a list of your queues in the current region.\n *\n * @param {ListQueuesRequestParameters} [parameters={}] request parameters\n * @param {number} [ListQueuesRequestParameters.maxResults] Maximum number of results to include in the response. Value range is 1 to 1000. You must set maxResults to receive a value for nextToken in the response.\n * @param {string} [ListQueuesRequestParameters.nextToken] Pagination token to request the next set of results.\n * @param {string} [ListQueuesRequestParameters.queueNamePrefix] A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned.\n * @returns {Object}\n * @returns {string[]} Object.queueUrls - A list of queue URLs, up to 1000 entries.\n * @returns {string} [Object.nextToken] - In the future, you can use NextToken to request the next set of results.\n */\n async listQueues(parameters: ListQueuesRequestParameters = {}): Promise {\n const method = 'POST'\n\n let body: object = {\n Action: 'ListQueues',\n Version: API_VERSION,\n }\n\n if (typeof parameters?.maxResults !== 'undefined') {\n body = { ...body, MaxResults: parameters.maxResults }\n }\n\n if (typeof parameters?.nextToken !== 'undefined') {\n body = { ...body, NextToken: parameters.nextToken }\n }\n\n if (typeof parameters?.queueNamePrefix !== 'undefined') {\n body = { ...body, QueueNamePrefix: parameters.queueNamePrefix }\n }\n\n const signedRequest: SignedHTTPRequest = this.signature.sign(\n {\n method: 'POST',\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n Host: this.endpoint.host,\n },\n body: toFormUrlEncoded(body),\n },\n {}\n )\n\n const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {\n headers: signedRequest.headers,\n })\n this._handleError('ListQueues', res)\n\n const parsed = res.html()\n return {\n urls: parsed\n .find('QueueUrl')\n .toArray()\n .map((e) => e.text()),\n nextToken: parsed.find('NextToken').text() || undefined,\n }\n }\n\n private _handleError(\n operation: SQSOperation,\n response: RefinedResponse\n ) {\n const errorCode: number = response.error_code\n const errorMessage: string = response.error\n\n if (errorMessage == '' && errorCode === 0) {\n return\n }\n\n const awsError = AWSError.parseXML(response.body as string)\n switch (awsError.code) {\n case 'AuthorizationHeaderMalformed':\n throw new InvalidSignatureError(awsError.message, awsError.code)\n default:\n throw new SQSServiceError(awsError.message, awsError.code || 'unknown', operation)\n }\n }\n}\n\n/**\n * An Amazon SQS message.\n */\nexport class Message {\n /**\n * A unique identifier for the message.\n * A MessageIdis considered unique across all AWS accounts for an extended period of time.\n */\n id: string\n\n /**\n * An MD5 digest of the non-URL-encoded message body string.\n */\n bodyMD5: string\n\n /**\n * Instantiates a new Message object.\n *\n * @param id\n * @param md5Ofbody\n */\n constructor(id: string, bodyMD5: string) {\n this.id = id\n this.bodyMD5 = bodyMD5\n }\n}\n\n/**\n * SQSServiceError indicates an error occurred while interacting with the SQS API.\n */\nexport class SQSServiceError extends AWSError {\n operation: SQSOperation\n\n constructor(message: string, code: string, operation: SQSOperation) {\n super(message, code)\n this.name = 'SQSServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SQSOperation describes possible SQS operations.\n */\ntype SQSOperation = 'ListQueues' | 'SendMessage'\n\nexport interface SendMessageOptions {\n /**\n * The message deduplication ID for FIFO queues\n */\n messageDeduplicationId?: string\n\n /**\n * The message group ID for FIFO queues\n */\n messageGroupId?: string\n\n /**\n * The message attributes\n */\n messageAttributes?: {\n [name: string]: { type: 'String' | 'Number' | 'Binary'; value: string }\n }\n\n /**\n * The length of time, in seconds, for which to delay a specific message.\n */\n delaySeconds?: number\n}\n\nexport interface ListQueuesRequestParameters {\n /**\n * Maximum number of results to include in the response. Value range is 1 to 1000.\n */\n maxResults?: number\n /**\n * Pagination token to request the next set of results.\n */\n nextToken?: string\n /**\n * A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned.\n * Queue URLs and names are case-sensitive.\n */\n queueNamePrefix?: string\n}\n\nexport interface ListQueuesResponse {\n /**\n * A list of queue URLs, up to 1,000 entries, or the value of MaxResults you sent in the request.\n */\n urls: string[]\n /**\n * Pagination token to include in the next request.\n */\n nextToken?: string\n}\n"],"names":["AWSClient","awsConfig","serviceName","_classCallCheck","_defineProperty","this","undefined","endpoint","_endpoint","key","get","Endpoint","concat","region","set","AWSConfig","options","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","value","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","AMZ_ALGORITHM_QUERY_PARAM","AMZ_CREDENTIAL_QUERY_PARAM","AMZ_DATE_QUERY_PARAM","AMZ_EXPIRES_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_SIGNED_HEADERS_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","MAX_PRESIGNED_TTL","EMPTY_SHA256","UNSIGNED_PAYLOAD","completeUrl","startsWith","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","_protocol","slice","_hostname","_port","parseInt","href","_value$split2","hostname","port","protocol","host","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","hasHeader","soughtHeader","_i","_Object$keys","Object","keys","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","isArrayBuffer","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","prototype","call","toFormUrlEncoded","form","params","module","exports","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","d","a","definition","o","defineProperty","enumerable","obj","prop","hasOwnProperty","r","Symbol","toStringTag","_regeneratorRuntime","t","i","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","arr","_arrayWithHoles","_iterableToArrayLimit","minLen","_arrayLikeToArray","test","_unsupportedIterableToArray","_nonIterableRest","len","arr2","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","_asyncToGenerator","fn","self","args","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","API_VERSION","SQSClient","_AWSClient","commonHeaders","_sendMessage","_callee","queueUrl","messageBody","attributeParameters","signedRequest","res","parsed","_args","_context","Action","Version","QueueUrl","MessageBody","messageDeduplicationId","MessageDeduplicationId","messageGroupId","MessageGroupId","messageAttributes","entries","attribute","valueParameterSuffix","assign","delaySeconds","DelaySeconds","sign","http","_handleError","html","_x","_x2","_listQueues","_callee2","parameters","_args2","_context2","maxResults","MaxResults","nextToken","NextToken","queueNamePrefix","QueueNamePrefix","Host","urls","toArray","operation","errorCode","error_code","awsError","SQSServiceError","id","bodyMD5","_this2"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/ssm.js b/dist/ssm.js index ea20e19..2560080 100644 --- a/dist/ssm.js +++ b/dist/ssm.js @@ -1,3 +1,3 @@ /*! For license information please see ssm.js.LICENSE.txt */ -(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rw,InvalidAWSConfigError:()=>O,InvalidSignatureError:()=>se,SystemsManagerClient:()=>Ie,SystemsManagerParameter:()=>De,SystemsManagerServiceError:()=>Ne});var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"_protocol",void 0),a(this,"_hostname",void 0),a(this,"_port",void 0);var r=!t.startsWith("http://")&&!t.startsWith("https://")?"".concat(e.DEFAULT_PROTOCOL,"://").concat(t):t,o=r.match(/^https?:/),i=n(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=o?o[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return t=e,(r=[{key:"copy",value:function(){return new e(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(e){var t=n(e.split(":"),2),r=t[0],o=t[1];this._hostname=r,this._port=o?parseInt(o):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(e){this._hostname=e}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(t){var r=t.match(/^https?:/),o=n(t.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=o.split(":")[0],this._port=o.split(":")[1]?parseInt(o.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(e){this._port=e}},{key:"protocol",get:function(){return this._protocol},set:function(e){this._protocol=e}}])&&i(t.prototype,r),o&&i(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}();function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t,r){return t=h(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&y(o,r.prototype),o}(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),y(r,e)},l(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r128)throw new O("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new O("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new u(t.endpoint):this.endpoint=t.endpoint)}return b(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),O=function(e){function t(e){return d(this,t),f(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),b(t)}(l(Error));const S=require("k6/crypto");var j=e.n(S),_="X-Amz-Date",P="X-Amz-Signature",E="X-Amz-Security-Token",k="x-amz-content-sha256",A=_.toLowerCase(),T=P.toLowerCase(),C="X-Amz-Target".toLowerCase(),x=E.toLowerCase(),L="authorization",I=[L,A,"date"],D="host",N={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},R="aws4_request",K="AWS4-HMAC-SHA256";const M=require("k6/html");function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function q(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=re(re({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=le(r.signingDate),o=n.longDate,i=n.shortDate,a=r.signingService||this.service,c=r.signingRegion||this.region,u="".concat(i,"/").concat(c,"/").concat(a,"/").concat(R);e.headers[D]||(e.headers[D]=e.endpoint.hostname);for(var s=0,f=Object.keys(e.headers);s-1&&delete e.headers[l]}e.headers[A]=o,this.credentials.sessionToken&&(e.headers[x]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var p=this.computePayloadHash(e);!function(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=t.signingDate,n=void 0===r?new Date:r,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,c=t.unhoistableHeaders,u=t.signableHeaders,s=t.signingRegion,f=t.signingService,l=le(n),p=l.longDate,y=l.shortDate,h=s||this.region,d=f||this.service;if(i>604800)throw new se("Signature version 4 presigned URLs can't be valid for more than 7 days");var v="".concat(y,"/").concat(h,"/").concat(d,"/").concat(R),b=this.moveHeadersToQuery(e,{unhoistableHeaders:c});b.headers[D]||(b.headers[D]=e.endpoint.hostname),this.credentials.sessionToken&&(b.query[E]=this.credentials.sessionToken),b.query["X-Amz-Algorithm"]=K,b.query["X-Amz-Credential"]="".concat(this.credentials.accessKeyId,"/").concat(v),b.query[_]=p,b.query["X-Amz-Expires"]=i.toString(10);var m=this.computeCanonicalHeaders(b,a,u);b.query["X-Amz-SignedHeaders"]=Object.keys(m).sort().join(";");var g=this.deriveSigningKey(this.credentials,d,h,y),w=this.computePayloadHash(e),O=this.createCanonicalRequest(b,m,w);b.query[P]=this.calculateSignature(p,v,g,O);var S=b.endpoint.href;return b.path&&(S+=b.path),b.query&&(S+="?".concat(this.serializeQueryParameters(b.query))),re({url:S},b)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=j().sha256(r,"hex");return"".concat(K,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var o=this.createStringToSign(e,t,n);return j().hmac("sha256",r,o,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var o=e.secretAccessKey,i=j().hmac("sha256","AWS4"+o,n,"binary"),a=j().hmac("sha256",i,r,"binary"),c=j().hmac("sha256",a,t,"binary");return j().hmac("sha256",c,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=Z(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],i={},a=function(e){if(e.toLowerCase()===T)return 1;o.push(e);var t=n[e];"string"==typeof t?i[e]="".concat(fe(e),"=").concat(fe(t)):Array.isArray(t)&&(i[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(fe(e),"=").concat(fe(r))])}),[]).join("&"))},c=Z(Object.keys(n).sort());try{for(c.s();!(t=c.n()).done;){a(t.value)}}catch(e){c.e(e)}finally{c.f()}return o.map((function(e){return i[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,i={},a=Z(Object.keys(o).sort());try{for(a.s();!(n=a.n()).done;){var c=n.value;if(null!=o[c]){var u=c.toLowerCase();(u in N||null!=t&&t.has(u))&&(!r||r&&!r.has(u))||"string"==typeof o[c]&&(i[u]=o[c]=o[c].trim().replace(/\s+/g," "))}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"computePayloadHash",value:function(e){var t,r=e.headers,n=e.body;return r[k]?r[k]:null==n?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":"string"==typeof n||(t=n,"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)))?j().sha256(n,"hex").toLowerCase():ArrayBuffer.isView(n)?j().sha256(n.buffer,"hex").toLowerCase():"UNSIGNED-PAYLOAD"}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:x(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function we(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oe(e){for(var t=1;t1&&void 0!==i[1]&&i[1],n=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/",headers:Oe(Oe({},this.commonHeaders),{},xe({},C,"AmazonSSM.GetParameter")),body:JSON.stringify({Name:t,WithDecryption:r})},{}),e.next=4,ye().asyncRequest(this.method,n.url,n.body,{headers:n.headers});case 4:return o=e.sent,this._handle_error(Re.GetParameter,o),e.abrupt("return",De.fromJSON(o.json()));case 7:case"end":return e.stop()}}),e,this)})),n=function(){var e=this,t=arguments;return new Promise((function(n,o){var i=r.apply(e,t);function a(e){Se(i,n,o,a,c,"next",e)}function c(e){Se(i,n,o,a,c,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)})},{key:"_handle_error",value:function(e,t){var r=t.error_code;if(0!==r){var n=t.json();if(r>=1400&&r<=1499){var o=n.Message||n.message||n.__type;if("InvalidSignatureException"===n.__type)throw new se(o,n.__type);throw new Ne(o,n.__type,e)}if(1500===r)throw new Ne("An error occured on the server side","InternalServiceError",e)}}}]);var r,n}(function(){return e=function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ve(this,"awsConfig",void 0),ve(this,"serviceName",void 0),ve(this,"_endpoint",void 0),this.awsConfig=t,this.serviceName=r,null!=t.endpoint&&(this._endpoint=t.endpoint)},(t=[{key:"endpoint",get:function(){return null==this._endpoint&&(this._endpoint=new u("https://".concat(this.serviceName,".").concat(this.awsConfig.region,".amazonaws.com"))),this._endpoint},set:function(e){this._endpoint=e}}])&&de(e.prototype,t),r&&de(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}()),De=function(){function e(t,r,n,o,i,a,c,u,s){je(this,e),xe(this,"arn",void 0),xe(this,"dataType",void 0),xe(this,"lastModifiedDate",void 0),xe(this,"name",void 0),xe(this,"selector",void 0),xe(this,"sourceResult",void 0),xe(this,"type",void 0),xe(this,"value",void 0),xe(this,"version",void 0),this.arn=t,this.dataType=r,this.lastModifiedDate=n,this.name=o,this.selector=i,this.sourceResult=a,this.type=c,this.value=u,this.version=s}return Pe(e,null,[{key:"fromJSON",value:function(t){var r=t.Parameter;return new e(r.ARN,r.DataType,r.LastModifiedDate,r.Name,r.Selector,r.SourceResult,r.Type,r.Value,r.Version)}}])}(),Ne=function(e){function t(e,r,n){var o;return je(this,t),xe(o=Ee(this,t,[e,r]),"operation",void 0),o.name="SystemsManagerServiceError",o.operation=n,o}return Te(t,e),Pe(t)}(X),Re=function(e){return e.GetParameter="GetParameter",e}(Re||{}),Ke=exports;for(var Me in t)Ke[Me]=t[Me];t.__esModule&&Object.defineProperty(Ke,"__esModule",{value:!0})})(); +(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rw,InvalidAWSConfigError:()=>O,InvalidSignatureError:()=>ye,SystemsManagerClient:()=>Ke,SystemsManagerParameter:()=>Me,SystemsManagerServiceError:()=>He});var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"_protocol",void 0),a(this,"_hostname",void 0),a(this,"_port",void 0);var r=!t.startsWith("http://")&&!t.startsWith("https://")?"".concat(e.DEFAULT_PROTOCOL,"://").concat(t):t,o=r.match(/^https?:/),i=n(r.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=o?o[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=i.split(":")[0],this._port=i.split(":")[1]?parseInt(i.split(":")[1]):void 0}return t=e,(r=[{key:"copy",value:function(){return new e(this.href)}},{key:"host",get:function(){return this._port?"".concat(this._hostname,":").concat(this._port):this._hostname},set:function(e){var t=n(e.split(":"),2),r=t[0],o=t[1];this._hostname=r,this._port=o?parseInt(o):void 0}},{key:"hostname",get:function(){return this._hostname},set:function(e){this._hostname=e}},{key:"href",get:function(){return"".concat(this.protocol,"://").concat(this.host)},set:function(t){var r=t.match(/^https?:/),o=n(t.replace(/^https?:\/\//,"").split("/"),1)[0];this._protocol=r?r[0].slice(0,-1):e.DEFAULT_PROTOCOL,this._hostname=o.split(":")[0],this._port=o.split(":")[1]?parseInt(o.split(":")[1]):void 0}},{key:"port",get:function(){return this._port},set:function(e){this._port=e}},{key:"protocol",get:function(){return this._protocol},set:function(e){this._protocol=e}}])&&i(t.prototype,r),o&&i(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}();function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t,r){return t=h(t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&y(o,r.prototype),o}(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),y(r,e)},l(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r128)throw new O("invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ".concat(t.accessKeyId.length));if(!t.secretAccessKey||""===t.secretAccessKey)throw new O("invalid AWS secret access key; reason: expected a non empty string, got `".concat(t.secretAccessKey,"`"));this.region=t.region,this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,void 0!==t.sessionToken&&(this.sessionToken=t.sessionToken),void 0!==t.endpoint&&("string"==typeof t.endpoint?this.endpoint=new u(t.endpoint):this.endpoint=t.endpoint)}return b(e,null,[{key:"fromEnvironment",value:function(t){return new e({region:__ENV.AWS_REGION,accessKeyId:__ENV.AWS_ACCESS_KEY_ID,secretAccessKey:__ENV.AWS_SECRET_ACCESS_KEY,sessionToken:__ENV.AWS_SESSION_TOKEN,endpoint:null==t?void 0:t.endpoint})}}])}(),O=function(e){function t(e){return d(this,t),f(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),b(t)}(l(Error));const S=require("k6/crypto");var j=e.n(S),_="X-Amz-Date",P="X-Amz-Signature",E="X-Amz-Security-Token",k="x-amz-content-sha256",A=_.toLowerCase(),T=P.toLowerCase(),C="X-Amz-Target".toLowerCase(),x=E.toLowerCase(),L="authorization",I=[L,A,"date"],D="host",N={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},R="aws4_request",K="AWS4-HMAC-SHA256";const M=require("k6/html");function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=ae(ae({},{signingDate:new Date,unsignableHeaders:new Set,signableHeaders:new Set}),t),n=de(r.signingDate),o=n.longDate,i=n.shortDate,a=r.signingService||this.service,c=r.signingRegion||this.region,u="".concat(i,"/").concat(c,"/").concat(a,"/").concat(R);e.headers[D]||(e.headers[D]=e.endpoint.hostname);for(var s=0,f=Object.keys(e.headers);s-1&&delete e.headers[l]}e.headers[A]=o,this.credentials.sessionToken&&(e.headers[x]=this.credentials.sessionToken),ArrayBuffer.isView(e.body)&&(e.body=e.body.buffer),e.body||(e.body="");var p=this.computePayloadHash(e);!function(e,t){e=e.toLowerCase();for(var r=0,n=Object.keys(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=t.signingDate,n=void 0===r?new Date:r,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,c=t.unhoistableHeaders,u=t.signableHeaders,s=t.signingRegion,f=t.signingService,l=de(n),p=l.longDate,y=l.shortDate,h=s||this.region,d=f||this.service;if(i>604800)throw new ye("Signature version 4 presigned URLs can't be valid for more than 7 days");var v="".concat(y,"/").concat(h,"/").concat(d,"/").concat(R),b=this.moveHeadersToQuery(e,{unhoistableHeaders:c});b.headers[D]||(b.headers[D]=e.endpoint.hostname),this.credentials.sessionToken&&(b.query[E]=this.credentials.sessionToken),b.query["X-Amz-Algorithm"]=K,b.query["X-Amz-Credential"]="".concat(this.credentials.accessKeyId,"/").concat(v),b.query[_]=p,b.query["X-Amz-Expires"]=i.toString(10);var m=this.computeCanonicalHeaders(b,a,u);b.query["X-Amz-SignedHeaders"]=Object.keys(m).sort().join(";");var g=this.deriveSigningKey(this.credentials,d,h,y),w=this.computePayloadHash(e),O=this.createCanonicalRequest(b,m,w);b.query[P]=this.calculateSignature(p,v,g,O);var S=b.endpoint.href;return b.path&&(S+=b.path),b.query&&(S+="?".concat(this.serializeQueryParameters(b.query))),ae({url:S},b)}},{key:"createCanonicalRequest",value:function(e,t,r){var n=Object.keys(t).sort(),o=n.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),i=n.join(";");return"".concat(e.method,"\n")+"".concat(this.computeCanonicalURI(e),"\n")+"".concat(this.computeCanonicalQuerystring(e),"\n")+"".concat(o,"\n\n")+"".concat(i,"\n")+"".concat(r)}},{key:"createStringToSign",value:function(e,t,r){var n=j().sha256(r,"hex");return"".concat(K,"\n")+"".concat(e,"\n")+"".concat(t,"\n")+"".concat(n)}},{key:"calculateSignature",value:function(e,t,r,n){var o=this.createStringToSign(e,t,n);return j().hmac("sha256",r,o,"hex")}},{key:"deriveSigningKey",value:function(e,t,r,n){var o=e.secretAccessKey,i=j().hmac("sha256","AWS4"+o,n,"binary"),a=j().hmac("sha256",i,r,"binary"),c=j().hmac("sha256",a,t,"binary");return j().hmac("sha256",c,"aws4_request","binary")}},{key:"computeCanonicalURI",value:function(e){var t=e.path;if(this.uriEscapePath){var r,n=[],o=ne(t.split("/"));try{for(o.s();!(r=o.n()).done;){var i=r.value;0!==(null==i?void 0:i.length)&&("."!==i&&(".."===i?n.pop():n.push(i)))}}catch(e){o.e(e)}finally{o.f()}var a=null!=t&&t.startsWith("/")?"/":"",c=n.join("/"),u=n.length>0&&null!=t&&t.endsWith("/")?"/":"",s="".concat(a).concat(c).concat(u);return encodeURIComponent(s).replace(/%2F/g,"/")}return t}},{key:"computeCanonicalQuerystring",value:function(e){var t,r=e.query,n=void 0===r?{}:r,o=[],i={},a=function(e){if(e.toLowerCase()===T)return 1;o.push(e);var t=n[e];"string"==typeof t?i[e]="".concat(he(e),"=").concat(he(t)):Array.isArray(t)&&(i[e]=t.slice(0).sort().reduce((function(t,r){return t.concat(["".concat(he(e),"=").concat(he(r))])}),[]).join("&"))},c=ne(Object.keys(n).sort());try{for(c.s();!(t=c.n()).done;){a(t.value)}}catch(e){c.e(e)}finally{c.f()}return o.map((function(e){return i[e]})).filter((function(e){return e})).join("&")}},{key:"computeCanonicalHeaders",value:function(e,t,r){var n,o=e.headers,i={},a=ne(Object.keys(o).sort());try{for(a.s();!(n=a.n()).done;){var c=n.value;if(null!=o[c]){var u=c.toLowerCase();(u in N||null!=t&&t.has(u))&&(!r||r&&!r.has(u))||"string"==typeof o[c]&&(i[u]=o[c]=o[c].trim().replace(/\s+/g," "))}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"computePayloadHash",value:function(e){var t,r=e.headers,n=e.body;return r[k]?r[k]:null==n?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":"string"==typeof n||(t=n,"function"==typeof ArrayBuffer&&(t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)))?j().sha256(n,"hex").toLowerCase():ArrayBuffer.isView(n)?j().sha256(n.buffer,"hex").toLowerCase():"UNSIGNED-PAYLOAD"}},{key:"moveHeadersToQuery",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.parse(JSON.stringify(e)),n=r.headers,o=r.query,i=void 0===o?{}:o,a=0,c=Object.keys(n);a=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:x(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function _e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pe(e){for(var t=1;t1&&void 0!==i[1]&&i[1],n=this.signature.sign({method:this.method,endpoint:this.endpoint,path:"/",headers:Pe(Pe({},this.commonHeaders),{},Ne({},C,"AmazonSSM.GetParameter")),body:JSON.stringify({Name:t,WithDecryption:r})},{}),e.next=4,be().asyncRequest(this.method,n.url,n.body,{headers:n.headers});case 4:return o=e.sent,this._handle_error(qe.GetParameter,o),e.abrupt("return",Me.fromJSON(o.json()));case 7:case"end":return e.stop()}}),e,this)})),n=function(){var e=this,t=arguments;return new Promise((function(n,o){var i=r.apply(e,t);function a(e){Ee(i,n,o,a,c,"next",e)}function c(e){Ee(i,n,o,a,c,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)})},{key:"_handle_error",value:function(e,t){var r=t.error_code;if(0!==r){var n=t.json();if(r>=1400&&r<=1499){var o=n.Message||n.message||n.__type;if("InvalidSignatureException"===n.__type)throw new ye(o,n.__type);throw new He(o,n.__type,e)}if(1500===r)throw new He("An error occured on the server side","InternalServiceError",e)}}}]);var r,n}(function(){return e=function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),we(this,"awsConfig",void 0),we(this,"serviceName",void 0),we(this,"_endpoint",void 0),this.awsConfig=t,this.serviceName=r,null!=t.endpoint&&(this._endpoint=t.endpoint)},(t=[{key:"endpoint",get:function(){return null==this._endpoint&&(this._endpoint=new u("https://".concat(this.serviceName,".").concat(this.awsConfig.region,".amazonaws.com"))),this._endpoint},set:function(e){this._endpoint=e}}])&&ge(e.prototype,t),r&&ge(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}()),Me=function(){function e(t,r,n,o,i,a,c,u,s){ke(this,e),Ne(this,"arn",void 0),Ne(this,"dataType",void 0),Ne(this,"lastModifiedDate",void 0),Ne(this,"name",void 0),Ne(this,"selector",void 0),Ne(this,"sourceResult",void 0),Ne(this,"type",void 0),Ne(this,"value",void 0),Ne(this,"version",void 0),this.arn=t,this.dataType=r,this.lastModifiedDate=n,this.name=o,this.selector=i,this.sourceResult=a,this.type=c,this.value=u,this.version=s}return Te(e,null,[{key:"fromJSON",value:function(t){var r=t.Parameter;return new e(r.ARN,r.DataType,r.LastModifiedDate,r.Name,r.Selector,r.SourceResult,r.Type,r.Value,r.Version)}}])}(),He=function(e){function t(e,r,n){var o;return ke(this,t),Ne(o=Ce(this,t,[e,r]),"operation",void 0),o.name="SystemsManagerServiceError",o.operation=n,o}return Ie(t,e),Te(t)}(Y),qe=function(e){return e.GetParameter="GetParameter",e}(qe||{}),ze=exports;for(var We in t)ze[We]=t[We];t.__esModule&&Object.defineProperty(ze,"__esModule",{value:!0})})(); //# sourceMappingURL=ssm.js.map \ No newline at end of file diff --git a/dist/ssm.js.map b/dist/ssm.js.map index e76887a..9040ef1 100644 --- a/dist/ssm.js.map +++ b/dist/ssm.js.map @@ -1 +1 @@ -{"version":3,"file":"ssm.js","mappings":";mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,giECFvD,IAAMC,EAAQ,WAajB,SAAAA,EAAYC,gGAAkBC,CAAA,KAAAF,GAAAG,EAAA,yBAAAA,EAAA,yBAAAA,EAAA,qBAC1B,IAEMC,GADDH,EAASI,WAAW,aAAeJ,EAASI,WAAW,YACvB,GAAAC,OAC5BN,EAASO,iBAAgB,OAAAD,OAAML,GAClCA,EAEAO,EAAgBJ,EAAYK,MAAM,YAEjCC,EAA0CC,EAD7BP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,4BAAvBA,CAAuB,EAAvBA,IAAuB","sources":["webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/./src/internal/ssm.ts","webpack://k6-jslib-aws/./src/internal/client.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/crypto\");","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/html\");","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/http\");","import { JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's Systems Manager service\n */\nexport class SystemsManagerClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a SystemsManagerClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'ssm')\n\n // All interactions with the Systems Manager service\n // are made via the POST method.\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: awsConfig.region,\n credentials: {\n accessKeyId: awsConfig.accessKeyId,\n secretAccessKey: awsConfig.secretAccessKey,\n sessionToken: awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n }\n\n /**\n * Retrieves a parameter from Amazon Systems Manager\n *\n * @param {string} name - The ARN or name of the parameter to retrieve.\n * @param {boolean} withDecryption - whether returned secure string parameters should be decrypted.\n * @returns {SystemsManagerParameter} - returns the fetched Parameter object.\n * @throws {SystemsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async getParameter(\n name: string,\n withDecryption: boolean = false\n ): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AmazonSSM.GetParameter`,\n },\n body: JSON.stringify({ Name: name, WithDecryption: withDecryption }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SystemsManagerOperation.GetParameter, res)\n\n return SystemsManagerParameter.fromJSON(res.json() as JSONObject)\n }\n\n _handle_error(\n operation: SystemsManagerOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new SystemsManagerServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new SystemsManagerServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/**\n * Class representing a Systems Manager's Parameter\n */\nexport class SystemsManagerParameter {\n /**\n * The Amazon Resource Name (ARN) of the parameter.\n */\n arn: string\n\n /**\n * The data type of the parameter, such as text or aws:ec2:image.\n * The default is text.\n */\n dataType: string\n\n /**\n * Date the parameter was last changed or updated and the parameter version was created.\n */\n lastModifiedDate: number\n\n /**\n * The friendly name of the parameter.\n */\n name: string\n\n /**\n * Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:\n * parameter_name:version\n * parameter_name:label\n */\n selector: string\n\n /**\n * plies to parameters that reference information in other AWS services. SourceResult is the raw result or response from the source.\n */\n sourceResult: string\n\n /**\n * The type of parameter. Valid values include the following: String, StringList, and SecureString.\n */\n type: string\n\n /**\n * The parameter value.\n */\n value: string\n\n /**\n * The parameter version.\n */\n version: number\n\n /**\n * Constructs a Systems Manager's Parameter\n *\n * @param {string} arn - The Amazon Resource Name (ARN) of the parameter.\n * @param {string} dataType - The data type of the parameter, such as text or aws:ec2:image. The default is text.\n * @param {number} lastModifiedDate - Date the parameter was last changed or updated and the parameter version was created.\n * @param {string} name - The friendly name of the parameter.\n * @param {string} selector - Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:\n * parameter_name:version\n * parameter_name:label\n * @param {string} sourceResult - Applies to parameters that reference information in other AWS services. SourceResult is the raw result or response from the source.\n * @param {string} type - The type of parameter. Valid values include the following: String, StringList, and SecureString.\n * @param {string} value - The parameter value.\n * @param {number} version - The parameter version.\n */\n constructor(\n arn: string,\n dataType: string,\n lastModifiedDate: number,\n name: string,\n selector: string,\n sourceResult: string,\n type: string,\n value: string,\n version: number\n ) {\n this.arn = arn\n this.dataType = dataType\n this.lastModifiedDate = lastModifiedDate\n this.name = name\n this.selector = selector\n this.sourceResult = sourceResult\n this.type = type\n this.value = value\n this.version = version\n }\n\n /**\n * Parses and constructs a Systems Manager's Parameter from the content\n * of a JSON response returned by the AWS service\n *\n * @param {Object} json - JSON object as returned and parsed from\n * the AWS service's API call.\n * @returns {SystemsManagerParameter}\n */\n static fromJSON(json: JSONObject): SystemsManagerParameter {\n const parameter = json.Parameter as JSONObject\n\n return new SystemsManagerParameter(\n parameter.ARN as string,\n parameter.DataType as string,\n parameter.LastModifiedDate as number,\n parameter.Name as string,\n parameter.Selector as string,\n parameter.SourceResult as string,\n parameter.Type as string,\n parameter.Value as string,\n parameter.Version as number\n )\n }\n}\n\nexport class SystemsManagerServiceError extends AWSError {\n operation: SystemsManagerOperation\n\n /**\n * Constructs a SystemsManagerServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {SystemsManagerOperation} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: SystemsManagerOperation) {\n super(message, code)\n this.name = 'SystemsManagerServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SystemsManagerOperation defines all currently implemented Systems Manager operations.\n */\nenum SystemsManagerOperation {\n GetParameter = 'GetParameter',\n}\n","import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Endpoint","endpoint","_classCallCheck","_defineProperty","completeUrl","startsWith","concat","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","this","_protocol","slice","_hostname","_port","parseInt","undefined","href","set","_value$split2","hostname","port","protocol","host","AWSConfig","options","region","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","require","AMZ_DATE_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","_i","_Object$keys","keys","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","soughtHeader","hasHeader","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","_regeneratorRuntime","t","r","i","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","self","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","SystemsManagerClient","_AWSClient","awsConfig","commonHeaders","serviceName","fn","_callee","withDecryption","signedRequest","res","_args","_context","sign","Name","WithDecryption","http","_handle_error","SystemsManagerOperation","GetParameter","SystemsManagerParameter","fromJSON","_getParameter","args","_x","operation","errorCode","error_code","errorMessage","SystemsManagerServiceError","AWSClient","_endpoint","arn","dataType","lastModifiedDate","selector","sourceResult","version","parameter","Parameter","ARN","DataType","LastModifiedDate","Selector","SourceResult","Type","Value","Version","_this2"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"ssm.js","mappings":";mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,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,EAAUxB,KACVwB,EAAUK,SACVL,EAAUM,aACVN,EAAUO,KACVP,EAAUQ,MACVR,EAAUS,QAElB,IAAC,CA5G+B,GA+GvBlB,GAA0B,SAAAvJ,GAUnC,SAAAuJ,EAAYrU,EAAiB+B,EAAckS,GAAoC,IAAAuB,EAGjD,OAHiDjY,GAAA,KAAA8W,GACvD7W,GAApBgY,EAAAvV,GAAA,KAAAoU,EAAA,CAAMrU,EAAS+B,IAAK,oBACpByT,EAAKvT,KAAO,6BACZuT,EAAKvB,UAAYA,EAASuB,CAC9B,CAAC,OAAAtV,GAAAmU,EAAAvJ,GAAArL,GAAA4U,EAAA,CAdkC,CAASvS,GAoB3C4R,GAAuB,SAAvBA,GAAuB,OAAvBA,EAAuB,4BAAvBA,CAAuB,EAAvBA,IAAuB","sources":["webpack://k6-jslib-aws/webpack/bootstrap","webpack://k6-jslib-aws/webpack/runtime/compat get default export","webpack://k6-jslib-aws/webpack/runtime/define property getters","webpack://k6-jslib-aws/webpack/runtime/hasOwnProperty shorthand","webpack://k6-jslib-aws/webpack/runtime/make namespace object","webpack://k6-jslib-aws/./src/internal/endpoint.ts","webpack://k6-jslib-aws/./src/internal/config.ts","webpack://k6-jslib-aws/external commonjs \"k6/crypto\"","webpack://k6-jslib-aws/./src/internal/constants.ts","webpack://k6-jslib-aws/external commonjs \"k6/html\"","webpack://k6-jslib-aws/./src/internal/error.ts","webpack://k6-jslib-aws/./src/internal/signature.ts","webpack://k6-jslib-aws/./src/internal/http.ts","webpack://k6-jslib-aws/./src/internal/utils.ts","webpack://k6-jslib-aws/external commonjs \"k6/http\"","webpack://k6-jslib-aws/./src/internal/ssm.ts","webpack://k6-jslib-aws/./src/internal/client.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\nexport class Endpoint {\n private _protocol: string\n private _hostname: string\n private _port?: number\n\n // Default protocol, this can be globally changed as per application requirements\n private static readonly DEFAULT_PROTOCOL = 'https' // Set this as per AWS.config\n\n /**\n // * Constructs a new Endpoint instance.\n *\n * @param {string} endpoint - The URL to construct an endpoint from. If the URL omits a protocol, the default protocol will be used.\n */\n constructor(endpoint: string) {\n const isDefaultProtocol =\n !endpoint.startsWith('http://') && !endpoint.startsWith('https://')\n const completeUrl = isDefaultProtocol\n ? `${Endpoint.DEFAULT_PROTOCOL}://${endpoint}`\n : endpoint\n\n const protocolMatch = completeUrl.match(/^https?:/)\n const hostAndPath = completeUrl.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = hostAndPath.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Creates a new Endpoint instance that is a copy of the current one.\n *\n * @returns {Endpoint} The copied Endpoint.\n */\n public copy(): Endpoint {\n return new Endpoint(this.href)\n }\n\n /**\n * Gets the host portion of the endpoint including the port.\n *\n * @returns {string} The host portion of the endpoint including the port.\n */\n public get host(): string {\n return this._port ? `${this._hostname}:${this._port}` : this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint including the port.\n *\n * @param {string} value - The value to set for the host.\n */\n public set host(value: string) {\n const [hostname, port] = value.split(':')\n this._hostname = hostname\n this._port = port ? parseInt(port) : undefined\n }\n\n /**\n * Gets the host portion of the endpoint without the port.\n *\n * @returns {string} The host portion of the endpoint.\n */\n public get hostname(): string {\n return this._hostname\n }\n\n /**\n * Sets the host portion of the endpoint without the port.\n *\n * @param {string} value - The value to set for the hostname.\n */\n public set hostname(value: string) {\n this._hostname = value\n }\n\n /**\n * Gets the full URL of the endpoint.\n *\n * @returns {string} The full URL of the endpoint.\n */\n public get href(): string {\n return `${this.protocol}://${this.host}`\n }\n\n /**\n * Sets the full URL of the endpoint.\n *\n * @param {string} value - The value to set for the full URL.\n */\n public set href(value: string) {\n const protocolMatch = value.match(/^https?:/)\n const withoutProtocol = value.replace(/^https?:\\/\\//, '')\n const [hostnameWithPort] = withoutProtocol.split('/')\n\n this._protocol = protocolMatch ? protocolMatch[0].slice(0, -1) : Endpoint.DEFAULT_PROTOCOL // remove the trailing colon\n this._hostname = hostnameWithPort.split(':')[0]\n this._port = hostnameWithPort.split(':')[1]\n ? parseInt(hostnameWithPort.split(':')[1])\n : undefined\n }\n\n /**\n * Gets the port of the endpoint.\n *\n * @returns {number|undefined} The port of the endpoint.\n */\n public get port(): number | undefined {\n return this._port\n }\n\n /**\n * Sets the port of the endpoint.\n *\n * @param {number|undefined} value - The value to set for the port.\n */\n public set port(value: number | undefined) {\n this._port = value\n }\n\n /**\n * Gets the protocol (http or https) of the endpoint URL.\n *\n * @returns {string} The protocol of the endpoint URL.\n */\n public get protocol(): string {\n return this._protocol\n }\n\n /**\n * Sets the protocol (http or https) of the endpoint URL.\n *\n * @param {string} value - The value to set for the protocol.\n */\n public set protocol(value: string) {\n this._protocol = value\n }\n}\n","import { HTTPScheme } from './http'\nimport { Endpoint } from './endpoint'\n\n/** Class holding an AWS connection information */\nexport class AWSConfig {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string} ['amazonaws.com']\n */\n endpoint?: Endpoint\n\n /**\n * fromEnvironment creates an AWSConfig from the environment variables.\n *\n * It expects to find the following compulsory environment variables:\n * * AWS_REGION\n * * AWS_ACCESS_KEY_ID\n * * AWS_SECRET_ACCESS_KEY\n *\n * If set, the following optional environment variables are also used:\n * * AWS_SESSION_TOKEN\n *\n * Finally, the options parameter allows to explicitly set the scheme and endpoint\n * to use when connecting to AWS.\n *\n * @param options {AWSConnectionOptions}\n * @returns\n */\n static fromEnvironment(options?: AWSConnectionOptions): AWSConfig {\n const region = __ENV.AWS_REGION\n const accessKeyId = __ENV.AWS_ACCESS_KEY_ID\n const secretAccessKey = __ENV.AWS_SECRET_ACCESS_KEY\n const sessionToken: string | undefined = __ENV.AWS_SESSION_TOKEN\n const endpoint: Endpoint | string | undefined = options?.endpoint\n\n return new AWSConfig({\n region,\n accessKeyId,\n secretAccessKey,\n sessionToken,\n endpoint: endpoint,\n })\n }\n\n /**\n * Create an AWSConfig.\n *\n * @param {AWSConfigOptions} options - configuration attributes to use when interacting with AWS' APIs\n * @throws {InvalidArgumentException}\n */\n constructor(options: AWSConfigOptions) {\n if (!options.region || options.region === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS region; reason: expected a valid AWS region name (e.g. \"us-east-1\"), got \\`${options.region}\\``\n )\n }\n\n if (!options.accessKeyId || options.accessKeyId === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: expected a non empty string, got \\`${options.accessKeyId}\\``\n )\n }\n\n if (options.accessKeyId.length < 16 || options.accessKeyId.length > 128) {\n throw new InvalidAWSConfigError(\n `invalid AWS access key ID; reason: size should be between 16 and 128 characters, got ${options.accessKeyId.length}`\n )\n }\n\n if (!options.secretAccessKey || options.secretAccessKey === '') {\n throw new InvalidAWSConfigError(\n `invalid AWS secret access key; reason: expected a non empty string, got \\`${options.secretAccessKey}\\``\n )\n }\n\n this.region = options.region\n this.accessKeyId = options.accessKeyId\n this.secretAccessKey = options.secretAccessKey\n\n if (options.sessionToken !== undefined) {\n this.sessionToken = options.sessionToken\n }\n\n if (options.endpoint !== undefined) {\n if (typeof options.endpoint === 'string') {\n this.endpoint = new Endpoint(options.endpoint)\n } else {\n this.endpoint = options.endpoint\n }\n }\n }\n}\n\n/**\n * Interface representing AWSConfig options\n */\nexport interface AWSConfigOptions extends AWSConnectionOptions {\n /**\n * The AWS region to connect to, as listed: https://docs.aws.amazon.com/general/latest/gr/rande.html\n *\n * @type {string}\n */\n region: string\n\n /**\n * Your user's AWS access key id credential.\n *\n * @type {string}\n */\n accessKeyId: string\n\n /**\n * Your user's AWS secret access key credential.\n *\n * @type {string}\n */\n secretAccessKey: string\n\n /**\n * Your user's AWS session token credential.\n *\n * @type {string}\n */\n sessionToken?: string\n}\n\n/**\n * Interface representing AWS connection options\n */\nexport interface AWSConnectionOptions {\n /**\n * The HTTP scheme to use when connecting to AWS.\n *\n * @type {HTTPScheme}\n */\n scheme?: HTTPScheme\n\n /**\n * The AWS hostname to connect to.\n *\n * @type {string}\n */\n endpoint?: Endpoint | string\n}\n\n/** Class representing an invalid AWS configuration */\nexport class InvalidAWSConfigError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/crypto\");","/**\n * Standard Amazon AWS query parameter names\n */\nexport const AMZ_ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm'\nexport const AMZ_CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential'\nexport const AMZ_DATE_QUERY_PARAM = 'X-Amz-Date'\nexport const AMZ_EXPIRES_QUERY_PARAM = 'X-Amz-Expires'\nexport const AMZ_SIGNATURE_QUERY_PARAM = 'X-Amz-Signature'\nexport const AMZ_SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders'\nexport const AMZ_TARGET_QUERY_PARAM = 'X-Amz-Target'\nexport const AMZ_TOKEN_QUERY_PARAM = 'X-Amz-Security-Token'\n\n/**\n * Standard Amazon AWS header names\n */\nexport const AMZ_CONTENT_SHA256_HEADER = 'x-amz-content-sha256'\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase()\nexport const AMZ_SIGNATURE_HEADER = AMZ_SIGNATURE_QUERY_PARAM.toLowerCase()\nexport const AMZ_TARGET_HEADER = AMZ_TARGET_QUERY_PARAM.toLowerCase()\nexport const AMZ_TOKEN_HEADER = AMZ_TOKEN_QUERY_PARAM.toLowerCase()\n\n/**\n * Common HTTP headers we rely on in the signing process\n */\nexport const AUTHORIZATION_HEADER = 'authorization'\nexport const DATE_HEADER = 'date'\n\n/**\n * Lists the headers that are generated as part of the signature process.\n */\nexport const GENERATED_HEADERS = [AUTHORIZATION_HEADER, AMZ_DATE_HEADER, DATE_HEADER]\nexport const HOST_HEADER = 'host'\n\n/**\n * Lists the headers that should never be included in the\n * request signature signature process.\n */\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n 'cache-control': true,\n connection: true,\n expect: true,\n from: true,\n 'keep-alive': true,\n 'max-forwards': true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n 'transfer-encoding': true,\n upgrade: true,\n 'user-agent': true,\n 'x-amzn-trace-id': true,\n}\n\n/**\n * Signature specific constants included in the signing process\n */\nexport const KEY_TYPE_IDENTIFIER = 'aws4_request'\nexport const SIGNING_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256'\n\n/**\n * Maximum time to live of a signed request in seconds: 7 days.\n */\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7\n\n/**\n * SHA256 hash of an empty string (so we don't waste cycles recomputing it)\n */\nexport const EMPTY_SHA256 = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\n/**\n * SHA256 hash of the unsigned payload constant (so we don't waste cycles recomputing it)\n */\nexport const UNSIGNED_PAYLOAD_SHA256 =\n '5a41b0751e4537c6ff868564ab44a4d4ecceec2ec5b1c5f74d97422968e04237'\n\nexport const UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD'\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/html\");","import { JSONObject } from './json'\nimport { parseHTML } from 'k6/html'\nimport { Response } from 'k6/http'\n\n/**\n * Base class to derive errors from\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class AWSError extends Error {\n /**\n * Error code issued by the service (if any)\n */\n code?: string\n\n /**\n * Create an AWSError\n *\n * @param {string} message - A longer human readable error message.\n * @param {string?} code - A unique short code representing the error that was emitted\n */\n constructor(message: string, code?: string) {\n super(message)\n this.name = 'AWSError'\n this.code = code\n }\n\n /**\n * Parse an AWSError from an XML document\n *\n * @param {string} xmlDocument - Serialized XML document to parse the error from\n */\n static parseXML(xmlDocument: string): AWSError {\n const doc = parseHTML(xmlDocument)\n return new AWSError(doc.find('Message').text(), doc.find('Code').text())\n }\n\n static parse(response: Response): AWSError {\n if (response.headers['Content-Type'] === 'application/json') {\n const error = (response.json() as JSONObject) || {}\n const message =\n error.Message ||\n error.message ||\n error.__type ||\n 'An error occurred on the server side'\n const code = response.headers['X-Amzn-Errortype'] || error.__type\n return new AWSError(message as string, code as string)\n } else {\n return AWSError.parseXML(response.body as string)\n }\n }\n}\n\nexport class NetworkError extends Error {\n code: number;\n\n constructor(message: string, code: number) {\n super(message)\n this.name = 'NetworkError'\n this.code = code\n }\n}","import crypto from 'k6/crypto'\n\nimport * as constants from './constants'\nimport { AWSError } from './error'\nimport { hasHeader, HTTPHeaderBag, HTTPRequest, QueryParameterBag, SignedHTTPRequest } from './http'\nimport { isArrayBuffer } from './utils'\n\n/**\n * SignatureV4 can be used to sign HTTP requests and presign URLs using the AWS Signature\n * Version 4 signing process.\n *\n * It offers two signing methods:\n * - sign: signs the request headers and payload\n * - presign: returns a presigned (authorization information contained in the query string) URL\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html\n */\nexport class SignatureV4 {\n /**\n * The name of the service to sign for.\n */\n private readonly service: string\n\n /**\n * The name of the region to sign for.\n */\n private readonly region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n private readonly credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n private readonly uriEscapePath: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n private readonly applyChecksum: boolean\n\n // TODO: uriEscapePath and applyChecksum should not be present in the constructor\n constructor({\n service,\n region,\n credentials,\n uriEscapePath,\n applyChecksum,\n }: SignatureV4Options) {\n this.service = service\n this.region = region\n this.credentials = credentials\n this.uriEscapePath = typeof uriEscapePath === 'boolean' ? uriEscapePath : true\n this.applyChecksum = typeof applyChecksum === 'boolean' ? applyChecksum : true\n }\n\n /**\n * Includes AWS v4 signing information to the provided HTTP request.\n *\n * This method adds an Authorization header to the request, containing\n * the signature and other signing information. It also returns a preformatted\n * URL that can be used to make the k6 http request.\n *\n * This method mutates the request object.\n *\n * @param request {HTTPRequest} The request to sign.\n * @param options {Partial} Options for signing the request.\n * @returns {SignedHTTPRequest} The signed request.\n */\n sign(request: HTTPRequest, options: Partial = {}): SignedHTTPRequest {\n // Set default values for options which are not provided by the user.\n const defaultOptions = {\n signingDate: new Date(),\n unsignableHeaders: new Set(),\n signableHeaders: new Set(),\n }\n\n // Merge default options with the ones maybe provided by the user.\n const finalOptions = { ...defaultOptions, ...options }\n\n const { longDate, shortDate }: DateInfo = formatDate(finalOptions.signingDate)\n const service = finalOptions.signingService || this.service\n const region = finalOptions.signingRegion || this.region\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = request.endpoint.hostname\n }\n \n\n // Filter out headers that will be generated and managed by the signing process.\n // If the user provide any of those as part of the HTTPRequest's headers, they\n // will be ignored.\n for (const headerName of Object.keys(request.headers)) {\n if (constants.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName]\n }\n }\n\n request.headers[constants.AMZ_DATE_HEADER] = longDate\n if (this.credentials.sessionToken) {\n request.headers[constants.AMZ_TOKEN_HEADER] = this.credentials.sessionToken\n }\n\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n if (ArrayBuffer.isView(request.body)) {\n request.body = request.body.buffer\n }\n\n // Ensure we avoid passing undefined to the crypto hash function.\n if (!request.body) {\n request.body = ''\n }\n\n const payloadHash = this.computePayloadHash(request)\n if (\n !hasHeader(constants.AMZ_CONTENT_SHA256_HEADER, request.headers) &&\n this.applyChecksum\n ) {\n request.headers[constants.AMZ_CONTENT_SHA256_HEADER] = payloadHash\n }\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n finalOptions.unsignableHeaders,\n finalOptions.signableHeaders\n )\n const signature = this.calculateSignature(\n longDate,\n scope,\n this.deriveSigningKey(this.credentials, service, region, shortDate),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n )\n\n /**\n * Step 4 of the signing process: add the signature to the HTTP request's headers.\n *\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n */\n request.headers[constants.AUTHORIZATION_HEADER] =\n `${constants.SIGNING_ALGORITHM_IDENTIFIER} ` +\n `Credential=${this.credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${Object.keys(canonicalHeaders).sort().join(';')}, ` +\n `Signature=${signature}`\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n // We exclude the signature from the query string\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return {\n url: url,\n ...request,\n }\n }\n\n /**\n * Produces a presigned URL with AWS v4 signature information for the provided HTTP request.\n *\n * A presigned URL is a URL that contains the authorization information\n * (signature and other signing information) in the query string. This method\n * returns a preformatted URL that can be used to make the k6 http request.\n *\n * @param originalRequest - The original request to presign.\n * @param options - Options controlling the signing of the request.\n * @returns A signed request, including the presigned URL.\n */\n presign(originalRequest: HTTPRequest, options: PresignOptions = {}): SignedHTTPRequest {\n const {\n signingDate = new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService,\n } = options\n const { longDate, shortDate }: DateInfo = formatDate(signingDate)\n const region = signingRegion || this.region\n const service = signingService || this.service\n\n if (expiresIn > constants.MAX_PRESIGNED_TTL) {\n throw new InvalidSignatureError(\n \"Signature version 4 presigned URLs can't be valid for more than 7 days\"\n )\n }\n\n const scope = `${shortDate}/${region}/${service}/${constants.KEY_TYPE_IDENTIFIER}`\n const request = this.moveHeadersToQuery(originalRequest, { unhoistableHeaders })\n\n // Required by the specification:\n // \"For HTTP/1.1 requests, you must include the host header at a minimum.\n // Standard headers like content-type are optional.\n // For HTTP/2 requests, you must include the :authority header instead of\n // the host header. Different services might require other headers.\"\n if (!request.headers[constants.HOST_HEADER]) {\n request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname\n }\n\n // If the user provided a session token, include it in the signed url query string.\n if (this.credentials.sessionToken) {\n request.query[constants.AMZ_TOKEN_QUERY_PARAM] = this.credentials.sessionToken\n }\n\n // Add base signing query parameters to the request, as described in the documentation\n // @see https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\n request.query[constants.AMZ_ALGORITHM_QUERY_PARAM] = constants.SIGNING_ALGORITHM_IDENTIFIER\n request.query[\n constants.AMZ_CREDENTIAL_QUERY_PARAM\n ] = `${this.credentials.accessKeyId}/${scope}`\n request.query[constants.AMZ_DATE_QUERY_PARAM] = longDate\n request.query[constants.AMZ_EXPIRES_QUERY_PARAM] = expiresIn.toString(10)\n\n const canonicalHeaders = this.computeCanonicalHeaders(\n request,\n unsignableHeaders,\n signableHeaders\n )\n request.query[constants.AMZ_SIGNED_HEADERS_QUERY_PARAM] = Object.keys(canonicalHeaders)\n .sort()\n .join(';')\n\n const signingKey = this.deriveSigningKey(this.credentials, service, region, shortDate)\n\n // Computing the payload from the original request. This is required\n // in the event the user attempts to produce a presigned URL for s3,\n // which requires the payload hash to be 'UNSIGNED-PAYLOAD'.\n //\n // To that effect, users need to set the 'x-amz-content-sha256' header,\n // and mark it as unhoistable and unsignable. When setup this way,\n // the computePayloadHash method will then return the string 'UNSIGNED-PAYLOAD'.\n const payloadHash = this.computePayloadHash(originalRequest)\n const canonicalRequest = this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n\n request.query[constants.AMZ_SIGNATURE_QUERY_PARAM] = this.calculateSignature(\n longDate,\n scope,\n signingKey,\n canonicalRequest\n )\n\n // If a request path was provided, add it to the URL\n let url = request.endpoint.href\n if (request.path) {\n url += request.path\n }\n\n // If a request query string was provided, add it to the URL\n if (request.query) {\n url += `?${this.serializeQueryParameters(request.query)}`\n }\n\n return { url: url, ...request }\n }\n\n /**\n * Create a string including information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * Step 1 of the signing process: create the canonical request string.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html\n *\n * @param request {HTTPRequest} The request to sign.\n * @param canonicalHeaders {HTTPHeaderBag} The request's canonical headers.\n * @param payloadHash {string} The hexadecimally encoded request's payload hash .\n * @returns {string} The canonical request string.\n */\n private createCanonicalRequest(\n request: HTTPRequest,\n canonicalHeaders: HTTPHeaderBag,\n payloadHash: string\n ): string {\n const sortedHeaders = Object.keys(canonicalHeaders).sort()\n const sortedCanonicalHeaders = sortedHeaders\n .map((name) => `${name}:${canonicalHeaders[name]}`)\n .join('\\n')\n const signedHeaders = sortedHeaders.join(';')\n\n return (\n `${request.method}\\n` +\n `${this.computeCanonicalURI(request)}\\n` +\n `${this.computeCanonicalQuerystring(request)}\\n` +\n `${sortedCanonicalHeaders}\\n\\n` +\n `${signedHeaders}\\n` +\n `${payloadHash}`\n )\n }\n\n /**\n * Create the \"string to sign\" part of the signature Version 4 protocol.\n *\n * The \"string to sign\" includes meta information about your request and\n * about the canonical request that you created with `createCanonicalRequest`.\n * It is used hand in hand with the signing key to create the request signature.\n * Step 2 of the signing process: create the string to sign.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The \"string to sign\".\n */\n private createStringToSign(\n longDate: string,\n credentialScope: string,\n canonicalRequest: string\n ): string {\n const hashedCanonicalRequest = crypto.sha256(canonicalRequest, 'hex')\n\n return (\n `${constants.SIGNING_ALGORITHM_IDENTIFIER}\\n` +\n `${longDate}\\n` +\n `${credentialScope}\\n` +\n `${hashedCanonicalRequest}`\n )\n }\n\n /**\n * Calculte the signature for AWS signature version 4.\n *\n * Step 3 of the signing process: create the signature.\n * @see https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html\n *\n * @param longDate {string} The request's date in iso 8601 format.\n * @param credentialScope {string} The request's credential scope.\n * @param signingKey {string} the signing key as computed by the deriveSigningKey method.\n * @param canonicalRequest {string} The request's canonical request.\n * @returns {string} The signature.\n */\n private calculateSignature(\n longDate: string,\n credentialScope: string,\n signingKey: Uint8Array,\n canonicalRequest: string\n ): string {\n const stringToSign = this.createStringToSign(longDate, credentialScope, canonicalRequest)\n return crypto.hmac('sha256', signingKey, stringToSign, 'hex')\n }\n\n /**\n * Derives the signing key for authenticating requests signed with\n * the Signature version 4 authentication protocol.\n *\n * deriveSigningKey produces a signing key by creating a series of\n * hash-based message authentication codes (HMACs) represented in\n * a binary format.\n *\n * The derived signing key is specific to the date it's made at, as well as\n * the service and region it targets.\n *\n * @param credentials {AWSCredentials} The credentials to use for signing.\n * @param service {string} The service the request is targeted at.\n * @param region {string} The region the request is targeted at.\n * @param shortDate {string} The request's date in YYYYMMDD format.\n * @returns {Uint8Array} The derived signing key.\n */\n private deriveSigningKey(\n credentials: Credentials,\n service: string,\n region: string,\n shortDate: string\n ): Uint8Array {\n const kSecret: string = credentials.secretAccessKey\n /**\n * crypto.hmac returns a value of type `bytes`, which is an alias for\n * number[]. However, the secret argument to hmac needs to either be\n * a `string` or ArrayBuffer. The only way to get around this is to\n * cast the return value of hmac to any, thus, we disable the no-explicit-any\n * ESLint rule for this function.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const kDate: any = crypto.hmac('sha256', 'AWS4' + kSecret, shortDate, 'binary')\n const kRegion: any = crypto.hmac('sha256', kDate, region, 'binary')\n const kService: any = crypto.hmac('sha256', kRegion, service, 'binary')\n const kSigning: any = crypto.hmac('sha256', kService, 'aws4_request', 'binary')\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n return kSigning\n }\n\n /**\n * Create a string that includes information from your request\n * in a AWS signature v4 standardized (canonical) format.\n *\n * @param param0 {HTTPRequest} The request to sign.\n * @returns {string} The canonical URI.\n */\n private computeCanonicalURI({ path }: HTTPRequest): string {\n if (this.uriEscapePath) {\n // Non-S3 services, we normalize the path and then double URI encode it.\n // Ref: \"Remove Dot Segments\" https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n const normalizedURISegments = []\n\n for (const URISegment of path.split('/')) {\n if (URISegment?.length === 0) {\n continue\n }\n\n if (URISegment === '.') {\n continue\n }\n\n if (URISegment === '..') {\n normalizedURISegments.pop()\n } else {\n normalizedURISegments.push(URISegment)\n }\n }\n\n // Normalize the URI\n const leading = path?.startsWith('/') ? '/' : ''\n const URI = normalizedURISegments.join('/')\n const trailing = normalizedURISegments.length > 0 && path?.endsWith('/') ? '/' : ''\n const normalizedURI = `${leading}${URI}${trailing}`\n\n const doubleEncoded = encodeURIComponent(normalizedURI)\n\n return doubleEncoded.replace(/%2F/g, '/')\n }\n\n // For S3, we shouldn't normalize the path. For example, object name\n // my-object//example//photo.user should not be normalized to\n // my-object/example/photo.user\n return path\n }\n\n /**\n * Serializes the request's query parameters into their canonical\n * string version. If the request does not include a query parameters,\n * returns an empty string.\n *\n * @param param0 {HTTPRequest} The request containing the query parameters.\n * @returns {string} The canonical query string.\n */\n private computeCanonicalQuerystring({ query = {} }: HTTPRequest): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === constants.AMZ_SIGNATURE_HEADER) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n\n /**\n * Create the canonical form of the request's headers.\n * Canonical headers consist of all the HTTP headers you\n * are including with the signed request.\n *\n * @param param0 {HTTPRequest} The request to compute the canonical headers of.\n * @param unsignableHeaders {Set} The headers that should not be signed.\n * @param signableHeaders {Set} The headers that should be signed.\n * @returns {string} The canonical headers.\n */\n private computeCanonicalHeaders(\n { headers }: HTTPRequest,\n unsignableHeaders?: Set,\n signableHeaders?: Set\n ): HTTPHeaderBag {\n const canonicalHeaders: HTTPHeaderBag = {}\n\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue\n }\n\n const canonicalHeaderName = headerName.toLowerCase()\n if (\n canonicalHeaderName in constants.ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName)\n ) {\n if (\n !signableHeaders ||\n (signableHeaders && !signableHeaders.has(canonicalHeaderName))\n ) {\n continue\n }\n }\n\n if (typeof headers[headerName] === 'string') {\n canonicalHeaders[canonicalHeaderName] = headers[headerName] = headers[headerName]\n .trim()\n .replace(/\\s+/g, ' ')\n }\n }\n\n return canonicalHeaders\n }\n\n /**\n * Computes the SHA256 cryptographic hash of the request's body.\n *\n * If the headers contain the 'X-Amz-Content-Sha256' header, then\n * the value of that header is returned instead. This proves useful\n * when, for example, presiging a URL for S3, as the payload hash\n * must always be equal to 'UNSIGNED-PAYLOAD'.\n *\n * @param param0 {HTTPRequest} The request to compute the payload hash of.\n * @returns {string} The hex encoded SHA256 payload hash, or the value of the 'X-Amz-Content-Sha256' header.\n */\n private computePayloadHash({ headers, body }: HTTPRequest): string {\n // for (const headerName of Object.keys(headers)) {\n // // If the header is present, return its value.\n // // So that we let the 'UNSIGNED-PAYLOAD' value pass through.\n // if (headerName.toLowerCase() === constants.AMZ_CONTENT_SHA256_HEADER) {\n // return headers[headerName]\n // }\n // }\n\n if (headers[constants.AMZ_CONTENT_SHA256_HEADER]) {\n return headers[constants.AMZ_CONTENT_SHA256_HEADER]\n }\n\n if (body == undefined) {\n return constants.EMPTY_SHA256\n }\n\n if (typeof body === 'string' || isArrayBuffer(body)) {\n return crypto.sha256(body, 'hex').toLowerCase()\n }\n\n if (ArrayBuffer.isView(body)) {\n // If the request body is a typed array, we need to convert it to a buffer\n // so that we can calculate the checksum.\n return crypto.sha256((body as DataView).buffer, 'hex').toLowerCase()\n }\n\n return constants.UNSIGNED_PAYLOAD\n }\n\n /**\n * Moves a request's headers to its query parameters.\n *\n * The operation will ignore any amazon standard headers, prefixed\n * with 'X-Amz-'. It will also ignore any headers specified as unhoistable\n * by the options.\n *\n * The operation will delete the headers from the request.\n *\n * @param request {HTTPRequest} The request to move the headers from.\n * @param options\n * @returns {HTTPRequest} The request with the headers moved to the query parameters.\n */\n private moveHeadersToQuery(\n request: HTTPRequest,\n options: { unhoistableHeaders?: Set } = {}\n ): HTTPRequest & { query: QueryParameterBag } {\n const requestCopy = JSON.parse(JSON.stringify(request))\n const { headers, query = {} as QueryParameterBag } = requestCopy\n\n for (const name of Object.keys(headers)) {\n const lowerCaseName = name.toLowerCase()\n if (\n lowerCaseName.slice(0, 6) === 'x-amz-' &&\n !options.unhoistableHeaders?.has(lowerCaseName)\n ) {\n query[name] = headers[name]\n delete headers[name]\n }\n }\n\n return {\n ...requestCopy,\n headers,\n query,\n }\n }\n\n /**\n * Serializes a HTTPRequest's query parameter bag into a string.\n *\n * @param query {QueryParameterBag} The query parameters to serialize.\n * @param ignoreKeys {Set} The keys to ignore.\n * @returns {string} The serialized, and ready to use in a URL, query parameters.\n */\n private serializeQueryParameters(query: QueryParameterBag, ignoreKeys?: string[]): string {\n const keys: Array = []\n const serialized: Record = {}\n\n for (const key of Object.keys(query).sort()) {\n if (ignoreKeys?.includes(key.toLowerCase())) {\n continue\n }\n\n keys.push(key)\n const value = query[key]\n\n if (typeof value === 'string') {\n serialized[key] = `${escapeURI(key)}=${escapeURI(value)}`\n } else if (Array.isArray(value)) {\n serialized[key] = value\n .slice(0)\n .sort()\n .reduce(\n (encoded: Array, value: string) =>\n encoded.concat([`${escapeURI(key)}=${escapeURI(value)}`]),\n []\n )\n .join('&')\n }\n }\n\n return keys\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join('&')\n }\n}\n\n/**\n * Error indicating an Invalid signature has been sent to AWS services\n *\n * Inspired from AWS official error types, as\n * described in:\n * * https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/\n * * https://github.com/aws/aws-sdk-js/blob/master/lib/error.d.ts\n */\nexport class InvalidSignatureError extends AWSError {\n /**\n * Constructs an InvalidSignatureError\n *\n * @param {string} message - human readable error message\n */\n constructor(message: string, code?: string) {\n super(message, code)\n this.name = 'InvalidSignatureError'\n }\n}\n\nexport interface SignatureV4Options {\n /**\n * The name of the service to sign for.\n */\n service: string\n\n /**\n * The name of the region to sign for.\n */\n region: string\n\n /**\n * The credentials with which the request should be signed.\n */\n credentials: Credentials\n\n /**\n * Whether to uri-escape the request URI path as part of computing the\n * canonical request string. This is required for every AWS service, except\n * Amazon S3, as of late 2017.\n *\n * @default [true]\n */\n uriEscapePath?: boolean\n\n /**\n * Whether to calculate a checksum of the request body and include it as\n * either a request header (when signing) or as a query string parameter\n * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for\n * every other AWS service as of late 2017.\n *\n * @default [true]\n */\n applyChecksum?: boolean\n}\n\nexport interface SignOptions {\n /**\n * The date and time to be used as signature metadata. This value should be\n * a Date object, a unix (epoch) timestamp, or a string that can be\n * understood by the JavaScript `Date` constructor.If not supplied, the\n * value returned by `new Date()` will be used.\n */\n signingDate?: Date\n\n /**\n * The service signing name. It will override the service name of the signer\n * in current invocation\n */\n signingService?: string\n\n /**\n * The region name to sign the request. It will override the signing region of the\n * signer in current invocation\n */\n signingRegion?: string\n}\n\nexport interface RequestSigningOptions extends SignOptions {\n /**\n * A set of strings whose members represents headers that cannot be signed.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unsignableHeaders set.\n */\n unsignableHeaders?: Set\n\n /**\n * A set of strings whose members represents headers that should be signed.\n * Any values passed here will override those provided via unsignableHeaders,\n * allowing them to be signed.\n *\n * All headers in the provided request will have their names converted to\n * lower case before signing.\n */\n signableHeaders?: Set\n}\n\nexport interface PresignOptions extends RequestSigningOptions {\n /**\n * The number of seconds before the presigned URL expires\n */\n expiresIn?: number\n\n /**\n * A set of strings whose representing headers that should not be hoisted\n * to presigned request's query string. If not supplied, the presigner\n * moves all the AWS-specific headers (starting with `x-amz-`) to the request\n * query string. If supplied, these headers remain in the presigned request's\n * header.\n * All headers in the provided request will have their names converted to\n * lower case and then checked for existence in the unhoistableHeaders set.\n */\n unhoistableHeaders?: Set\n}\n\nexport interface Credentials {\n /**\n * AWS access key ID\n */\n readonly accessKeyId: string\n\n /**\n * AWS secret access key\n */\n readonly secretAccessKey: string\n\n /**\n * A security or session token to use with these credentials. Usually\n * present for temporary credentials.\n */\n readonly sessionToken?: string\n}\n\nexport interface DateInfo {\n /**\n * ISO8601 formatted date string\n */\n longDate: string\n\n /**\n * String in the format YYYYMMDD\n */\n shortDate: string\n}\n\n/**\n * Escapes a URI following the AWS signature v4 escaping rules.\n *\n * @param URI {string} The URI to escape.\n * @returns {string} The escaped URI.\n */\nfunction escapeURI(URI: string): string {\n const hexEncode = (c: string): string => {\n return `%${c.charCodeAt(0).toString(16).toUpperCase()}`\n }\n\n return encodeURIComponent(URI).replace(/[!'()*]/g, hexEncode)\n}\n\n/**\n * formatDate formats a Date object into a ISO8601 formatted date string\n * and a string in the format YYYYMMDD.\n *\n * @param date {Date} The date to format.\n * @returns {DateInfo} The formatted date.\n */\nfunction formatDate(date: Date): DateInfo {\n const longDate = iso8601(date).replace(/[-:]/g, '')\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n }\n}\n\n/**\n * Formats a time into an ISO 8601 string.\n *\n * @see https://en.wikipedia.org/wiki/ISO_8601\n *\n * @param time {number | string | Date} The time to format.\n * @returns {string} The ISO 8601 formatted time.\n */\nfunction iso8601(time: number | string | Date): string {\n return toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, 'Z')\n}\n\n/**\n * Converts a time value into a Date object.\n *\n * @param time {number | string | Date} The time to convert.\n * @returns {Date} The resulting Date object.\n */\nfunction toDate(time: number | string | Date): Date {\n if (typeof time === 'number') {\n return new Date(time * 1000)\n }\n\n if (typeof time === 'string') {\n if (Number(time)) {\n return new Date(Number(time) * 1000)\n }\n\n return new Date(time)\n }\n\n return time\n}\n","import { Endpoint } from './endpoint'\n\n/**\n * Type representing HTTP schemes\n */\nexport type HTTPScheme = 'http' | 'https'\n\n/**\n * Type representing HTTP Methods\n *\n */\nexport type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\n/**\n * Type alias representing HTTP Headers\n */\nexport type HTTPHeaders = { [key: string]: string }\n\n/**\n * HTTPHeaderBag is a type alias representing HTTP Headers\n */\nexport type HTTPHeaderBag = Record\n\nexport function hasHeader(soughtHeader: string, headers: HTTPHeaderBag): boolean {\n soughtHeader = soughtHeader.toLowerCase()\n\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * QueryParameterBag is a type alias representing HTTP Query Parameters\n */\nexport type QueryParameterBag = Record>\n\n/**\n * HTTPRequest represents an HTTP request\n */\nexport interface HTTPRequest {\n /**\n * The HTTP method to use\n */\n method: HTTPMethod\n\n /**\n * Represents an AWS service endpoint, providing utilities for parsing and handling URL details.\n */\n endpoint: Endpoint\n\n /**\n * The path to the resource\n */\n path: string\n\n /**\n * The query parameters to include in the request\n */\n query?: QueryParameterBag\n\n /**\n * The headers to include in the request\n */\n headers: HTTPHeaderBag\n\n /**\n * The body of the request\n */\n body?: string | ArrayBuffer | null\n}\n\n/**\n * SignedHTTPRequest represents an HTTP request that has been signed\n * with an AWS signature. It is a superset of HTTPRequest adding\n * the following fields:\n * - url: the fully qualified URL of the request that can be used in a k6 http.request.\n */\nexport interface SignedHTTPRequest extends HTTPRequest {\n url: string\n}\n","/**\n *\n * @param value\n * @returns\n */\nexport function isArrayBuffer(value: unknown): value is ArrayBuffer {\n return (\n typeof ArrayBuffer === 'function' &&\n (value instanceof ArrayBuffer ||\n Object.prototype.toString.call(value) === '[object ArrayBuffer]')\n )\n}\n\nexport function toFormUrlEncoded(form: Record): string {\n return Object.keys(form)\n .reduce((params, key) => {\n const value = form[key]\n if (value !== undefined && value !== null) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n }\n return params\n }, [] as string[])\n .join('&')\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"k6/http\");","import { JSONObject } from 'k6'\nimport http, { RefinedResponse, ResponseType } from 'k6/http'\n\nimport { AWSClient } from './client'\nimport { AWSConfig } from './config'\nimport { AMZ_TARGET_HEADER } from './constants'\nimport { AWSError } from './error'\nimport { HTTPHeaders, HTTPMethod } from './http'\nimport { InvalidSignatureError, SignatureV4 } from './signature'\n\n/**\n * Class allowing to interact with Amazon AWS's Systems Manager service\n */\nexport class SystemsManagerClient extends AWSClient {\n private readonly signature: SignatureV4\n private readonly method: HTTPMethod\n private readonly commonHeaders: HTTPHeaders\n\n /**\n * Create a SystemsManagerClient\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n */\n constructor(awsConfig: AWSConfig) {\n super(awsConfig, 'ssm')\n\n // All interactions with the Systems Manager service\n // are made via the POST method.\n this.method = 'POST'\n this.commonHeaders = {\n 'Content-Type': 'application/x-amz-json-1.1',\n }\n\n this.signature = new SignatureV4({\n service: this.serviceName,\n region: awsConfig.region,\n credentials: {\n accessKeyId: awsConfig.accessKeyId,\n secretAccessKey: awsConfig.secretAccessKey,\n sessionToken: awsConfig.sessionToken,\n },\n uriEscapePath: true,\n applyChecksum: false,\n })\n }\n\n /**\n * Retrieves a parameter from Amazon Systems Manager\n *\n * @param {string} name - The ARN or name of the parameter to retrieve.\n * @param {boolean} withDecryption - whether returned secure string parameters should be decrypted.\n * @returns {SystemsManagerParameter} - returns the fetched Parameter object.\n * @throws {SystemsManagerServiceError}\n * @throws {InvalidSignatureError}\n */\n async getParameter(\n name: string,\n withDecryption: boolean = false\n ): Promise {\n const signedRequest = this.signature.sign(\n {\n method: this.method,\n endpoint: this.endpoint,\n path: '/',\n headers: {\n ...this.commonHeaders,\n [AMZ_TARGET_HEADER]: `AmazonSSM.GetParameter`,\n },\n body: JSON.stringify({ Name: name, WithDecryption: withDecryption }),\n },\n {}\n )\n\n const res = await http.asyncRequest(this.method, signedRequest.url, signedRequest.body, {\n headers: signedRequest.headers,\n })\n this._handle_error(SystemsManagerOperation.GetParameter, res)\n\n return SystemsManagerParameter.fromJSON(res.json() as JSONObject)\n }\n\n _handle_error(\n operation: SystemsManagerOperation,\n response: RefinedResponse\n ) {\n const errorCode = response.error_code\n if (errorCode === 0) {\n return\n }\n\n const error = response.json() as JSONObject\n if (errorCode >= 1400 && errorCode <= 1499) {\n // In the event of certain errors, the message is not set.\n // Also, note the inconsistency in casing...\n const errorMessage: string =\n (error.Message as string) || (error.message as string) || (error.__type as string)\n\n // Handle specifically the case of an invalid signature\n if (error.__type === 'InvalidSignatureException') {\n throw new InvalidSignatureError(errorMessage, error.__type)\n }\n\n // Otherwise throw a standard service error\n throw new SystemsManagerServiceError(errorMessage, error.__type as string, operation)\n }\n\n if (errorCode === 1500) {\n throw new SystemsManagerServiceError(\n 'An error occured on the server side',\n 'InternalServiceError',\n operation\n )\n }\n }\n}\n\n/**\n * Class representing a Systems Manager's Parameter\n */\nexport class SystemsManagerParameter {\n /**\n * The Amazon Resource Name (ARN) of the parameter.\n */\n arn: string\n\n /**\n * The data type of the parameter, such as text or aws:ec2:image.\n * The default is text.\n */\n dataType: string\n\n /**\n * Date the parameter was last changed or updated and the parameter version was created.\n */\n lastModifiedDate: number\n\n /**\n * The friendly name of the parameter.\n */\n name: string\n\n /**\n * Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:\n * parameter_name:version\n * parameter_name:label\n */\n selector: string\n\n /**\n * plies to parameters that reference information in other AWS services. SourceResult is the raw result or response from the source.\n */\n sourceResult: string\n\n /**\n * The type of parameter. Valid values include the following: String, StringList, and SecureString.\n */\n type: string\n\n /**\n * The parameter value.\n */\n value: string\n\n /**\n * The parameter version.\n */\n version: number\n\n /**\n * Constructs a Systems Manager's Parameter\n *\n * @param {string} arn - The Amazon Resource Name (ARN) of the parameter.\n * @param {string} dataType - The data type of the parameter, such as text or aws:ec2:image. The default is text.\n * @param {number} lastModifiedDate - Date the parameter was last changed or updated and the parameter version was created.\n * @param {string} name - The friendly name of the parameter.\n * @param {string} selector - Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:\n * parameter_name:version\n * parameter_name:label\n * @param {string} sourceResult - Applies to parameters that reference information in other AWS services. SourceResult is the raw result or response from the source.\n * @param {string} type - The type of parameter. Valid values include the following: String, StringList, and SecureString.\n * @param {string} value - The parameter value.\n * @param {number} version - The parameter version.\n */\n constructor(\n arn: string,\n dataType: string,\n lastModifiedDate: number,\n name: string,\n selector: string,\n sourceResult: string,\n type: string,\n value: string,\n version: number\n ) {\n this.arn = arn\n this.dataType = dataType\n this.lastModifiedDate = lastModifiedDate\n this.name = name\n this.selector = selector\n this.sourceResult = sourceResult\n this.type = type\n this.value = value\n this.version = version\n }\n\n /**\n * Parses and constructs a Systems Manager's Parameter from the content\n * of a JSON response returned by the AWS service\n *\n * @param {Object} json - JSON object as returned and parsed from\n * the AWS service's API call.\n * @returns {SystemsManagerParameter}\n */\n static fromJSON(json: JSONObject): SystemsManagerParameter {\n const parameter = json.Parameter as JSONObject\n\n return new SystemsManagerParameter(\n parameter.ARN as string,\n parameter.DataType as string,\n parameter.LastModifiedDate as number,\n parameter.Name as string,\n parameter.Selector as string,\n parameter.SourceResult as string,\n parameter.Type as string,\n parameter.Value as string,\n parameter.Version as number\n )\n }\n}\n\nexport class SystemsManagerServiceError extends AWSError {\n operation: SystemsManagerOperation\n\n /**\n * Constructs a SystemsManagerServiceError\n *\n * @param {string} message - human readable error message\n * @param {string} code - A unique short code representing the error that was emitted\n * @param {SystemsManagerOperation} operation - Name of the failed Operation\n */\n constructor(message: string, code: string, operation: SystemsManagerOperation) {\n super(message, code)\n this.name = 'SystemsManagerServiceError'\n this.operation = operation\n }\n}\n\n/**\n * SystemsManagerOperation defines all currently implemented Systems Manager operations.\n */\nenum SystemsManagerOperation {\n GetParameter = 'GetParameter',\n}\n","import { AWSConfig } from './config'\nimport { Endpoint } from './endpoint'\nimport { HTTPHeaders } from './http'\n\n/**\n * Class allowing to build requests targeting AWS APIs\n *\n * This class is meant to be used as a base class for specific\n * services clients. See S3Client or SecretsManagerClient for\n * usage examples.\n */\nexport class AWSClient {\n readonly awsConfig: AWSConfig\n readonly serviceName: string\n\n private _endpoint?: Endpoint\n\n /**\n * @param {AWSConfig} awsConfig - configuration attributes to use when interacting with AWS' APIs\n * @param {string} serviceName - name of the service to target.\n * @param {URIEncodingConfig} URIencodingConfig - configures how requests URIs should be encoded.\n */\n constructor(awsConfig: AWSConfig, serviceName: string) {\n this.awsConfig = awsConfig\n this.serviceName = serviceName\n\n // If an endpoint is provided in the config, set it\n // to ensure the default endpoint is not used.\n if (awsConfig.endpoint != undefined) {\n this._endpoint = awsConfig.endpoint\n }\n }\n\n /**\n * Represents the endpoint URL of the AWS service.\n *\n * If no custom endpoint is set, a default endpoint will be constructed\n * using the service name and region provided in the AWS config.\n *\n * @type {Endpoint}\n * @public\n */\n public get endpoint() {\n if (this._endpoint == undefined) {\n this._endpoint = new Endpoint(\n `https://${this.serviceName}.${this.awsConfig.region}.amazonaws.com`\n )\n }\n return this._endpoint\n }\n\n /**\n * Updates the endpoint URL of the AWS service.\n *\n * This can be used to override the default AWS service endpoint or set a custom endpoint.\n *\n * @param {Endpoint} endpoint - The new endpoint to set for the AWS service.\n * @public\n */\n public set endpoint(endpoint: Endpoint) {\n this._endpoint = endpoint\n }\n}\n\n/**\n * Type alias representing the result of an AWSClient.buildRequest call\n */\nexport interface AWSRequest {\n readonly url: string\n readonly headers: HTTPHeaders\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Endpoint","endpoint","_classCallCheck","_defineProperty","completeUrl","startsWith","concat","DEFAULT_PROTOCOL","protocolMatch","match","hostnameWithPort","_slicedToArray","replace","split","this","_protocol","slice","_hostname","_port","parseInt","undefined","href","set","_value$split2","hostname","port","protocol","host","AWSConfig","options","region","InvalidAWSConfigError","accessKeyId","length","secretAccessKey","sessionToken","_createClass","__ENV","AWS_REGION","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","_Error","message","_callSuper","_inherits","_wrapNativeSuper","Error","require","AMZ_DATE_QUERY_PARAM","AMZ_SIGNATURE_QUERY_PARAM","AMZ_TOKEN_QUERY_PARAM","AMZ_CONTENT_SHA256_HEADER","AMZ_DATE_HEADER","toLowerCase","AMZ_SIGNATURE_HEADER","AMZ_TARGET_HEADER","AMZ_TOKEN_HEADER","AUTHORIZATION_HEADER","GENERATED_HEADERS","HOST_HEADER","ALWAYS_UNSIGNABLE_HEADERS","authorization","connection","expect","from","pragma","referer","te","trailer","upgrade","KEY_TYPE_IDENTIFIER","SIGNING_ALGORITHM_IDENTIFIER","AWSError","code","_this","name","xmlDocument","doc","parseHTML","find","text","response","headers","error","json","Message","__type","parseXML","body","SignatureV4","_ref","service","credentials","uriEscapePath","applyChecksum","request","arguments","finalOptions","_objectSpread","signingDate","Date","unsignableHeaders","Set","signableHeaders","_formatDate","formatDate","longDate","shortDate","signingService","signingRegion","scope","constants","_i","_Object$keys","keys","headerName","indexOf","ArrayBuffer","isView","buffer","payloadHash","computePayloadHash","soughtHeader","hasHeader","canonicalHeaders","computeCanonicalHeaders","signature","calculateSignature","deriveSigningKey","createCanonicalRequest","sort","join","url","path","query","serializeQueryParameters","originalRequest","_options$signingDate","_options$expiresIn","expiresIn","unhoistableHeaders","_formatDate2","InvalidSignatureError","moveHeadersToQuery","toString","signingKey","canonicalRequest","sortedHeaders","sortedCanonicalHeaders","map","signedHeaders","method","computeCanonicalURI","computeCanonicalQuerystring","credentialScope","hashedCanonicalRequest","crypto","stringToSign","createStringToSign","kSecret","kDate","kRegion","kService","_ref2","_step","normalizedURISegments","_iterator","_createForOfIteratorHelper","s","n","done","URISegment","pop","push","err","e","f","leading","URI","trailing","endsWith","normalizedURI","encodeURIComponent","_ref3","_step2","_ref3$query","serialized","_loop","escapeURI","Array","isArray","reduce","encoded","_iterator2","filter","_ref4","_step3","_iterator3","canonicalHeaderName","has","trim","_ref5","requestCopy","JSON","parse","stringify","_requestCopy$query","_i2","_Object$keys2","_options$unhoistableH","lowerCaseName","ignoreKeys","_step4","_loop2","includes","_iterator4","_AWSError","c","charCodeAt","toUpperCase","date","time","Number","toDate","toISOString","_regeneratorRuntime","t","r","i","iterator","asyncIterator","u","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","y","GeneratorFunction","GeneratorFunctionPrototype","p","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","prev","charAt","stop","rval","handle","complete","finish","delegateYield","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","apply","getOwnPropertyDescriptors","defineProperties","asyncGeneratorStep","gen","reject","_next","_throw","info","instance","Constructor","_defineProperties","target","props","descriptor","_toPropertyKey","protoProps","staticProps","_getPrototypeOf","self","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","bind","subClass","superClass","_setPrototypeOf","toPrimitive","String","_toPrimitive","SystemsManagerClient","_AWSClient","awsConfig","commonHeaders","serviceName","fn","_callee","withDecryption","signedRequest","res","_args","_context","sign","Name","WithDecryption","http","_handle_error","SystemsManagerOperation","GetParameter","SystemsManagerParameter","fromJSON","_getParameter","args","_x","operation","errorCode","error_code","errorMessage","SystemsManagerServiceError","AWSClient","_endpoint","arn","dataType","lastModifiedDate","selector","sourceResult","version","parameter","Parameter","ARN","DataType","LastModifiedDate","Selector","SourceResult","Type","Value","Version","_this2"],"sourceRoot":""} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 24d441d..f281acf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -19,3 +19,4 @@ export { SQSClient } from './sqs' export { KinesisClient } from './internal/kinesis' export { EventBridgeClient } from './internal/event-bridge' export { LambdaClient, LambdaInvocationError } from './lambda' +export { AWSError, NetworkError} from './internal/error' \ No newline at end of file diff --git a/src/internal/error.ts b/src/internal/error.ts index 1e7760a..ceea2ef 100644 --- a/src/internal/error.ts +++ b/src/internal/error.ts @@ -53,3 +53,13 @@ export class AWSError extends Error { } } } + +export class NetworkError extends Error { + code: number; + + constructor(message: string, code: number) { + super(message) + this.name = 'NetworkError' + this.code = code + } +} \ No newline at end of file diff --git a/src/internal/lambda.ts b/src/internal/lambda.ts index be44356..3029ed7 100644 --- a/src/internal/lambda.ts +++ b/src/internal/lambda.ts @@ -3,7 +3,7 @@ import encoding from 'k6/encoding' import { AWSClient } from './client' import { AWSConfig } from './config' -import { AWSError } from './error' +import { AWSError, NetworkError } from './error' import { InvalidSignatureError, SignatureV4 } from './signature' import { AMZ_TARGET_HEADER } from './constants' import { HTTPHeaders, HTTPMethod, QueryParameterBag } from './http' @@ -107,6 +107,10 @@ export class LambdaClient extends AWSClient { return } + if (errorCode < 1400 || errorCode >= 1600 ) { + throw new NetworkError(errorMessage, errorCode) + } + const awsError = AWSError.parse(response) switch (awsError.code) { case 'AuthorizationHeaderMalformed': diff --git a/src/lambda.ts b/src/lambda.ts index bb567ad..a47b853 100644 --- a/src/lambda.ts +++ b/src/lambda.ts @@ -5,3 +5,4 @@ export { LambdaInvocationError, LambdaClient } from './internal/lambda' +export { AWSError, NetworkError} from './internal/error' \ No newline at end of file