create-sailor 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +18 -28
  2. package/dist/aws-kms-BRGZLC2X.js +1 -0
  3. package/dist/chunk-2VIWVVHK.js +1 -0
  4. package/dist/chunk-4F23MJOI.js +1 -0
  5. package/dist/chunk-6EI2BXXZ.js +1 -0
  6. package/dist/chunk-7DCGNQSQ.js +5 -0
  7. package/dist/chunk-7HOF72FC.js +1 -0
  8. package/dist/chunk-7VJYOZUP.js +2 -0
  9. package/dist/chunk-7Z3O7WJM.js +49 -0
  10. package/dist/chunk-B35GFLVZ.js +5 -0
  11. package/dist/chunk-BAI5W3AB.js +1 -0
  12. package/dist/chunk-DGJUBN33.js +1 -0
  13. package/dist/chunk-DIXI4M5O.js +1 -0
  14. package/dist/chunk-EA5HU2X4.js +9 -0
  15. package/dist/chunk-EXLRPVEX.js +1 -0
  16. package/dist/chunk-FGJ5K4WM.js +1 -0
  17. package/dist/chunk-HC3S5NWW.js +1 -0
  18. package/dist/chunk-KIX47M2V.js +40 -0
  19. package/dist/chunk-LOPYJ44X.js +31 -0
  20. package/dist/chunk-O3WYNHSC.js +20 -0
  21. package/dist/chunk-OJM5Y4UT.js +1 -0
  22. package/dist/chunk-PXU2OOBT.js +1 -0
  23. package/dist/chunk-QEIMNOY2.js +1 -0
  24. package/dist/chunk-QMKVUKS6.js +1 -0
  25. package/dist/chunk-RR5R4AKJ.js +1 -0
  26. package/dist/chunk-XSSPJU77.js +1 -0
  27. package/dist/chunk-YW4FFW47.js +1 -0
  28. package/dist/chunk-ZEEOYOWD.js +1 -0
  29. package/dist/credits-L2HL2UEU.js +1787 -0
  30. package/dist/dist-XS6SQF6X.js +5 -0
  31. package/dist/dist-Z6UUHTH2.js +8 -0
  32. package/dist/dist-es-M3FWVZJF.js +1 -0
  33. package/dist/dist-es-NDZJSZR3.js +2 -0
  34. package/dist/dist-es-NVFYVK4E.js +1 -0
  35. package/dist/dist-es-OUTR3NFA.js +5 -0
  36. package/dist/dist-es-UGE2JJUB.js +1 -0
  37. package/dist/dist-es-VHZAJVLW.js +1 -0
  38. package/dist/dist-es-WTYBIVJ2.js +2 -0
  39. package/dist/event-streams-WTP73PI5.js +1 -0
  40. package/dist/getMachineId-bsd-DVN24SFH.js +1 -0
  41. package/dist/getMachineId-darwin-LMU6AYNV.js +2 -0
  42. package/dist/getMachineId-linux-BHWLMOUW.js +1 -0
  43. package/dist/getMachineId-unsupported-G5LY7Y3J.js +1 -0
  44. package/dist/getMachineId-win-CWK62SDK.js +1 -0
  45. package/dist/index.js +2 -2
  46. package/dist/loadSso-O5OGD76B.js +1 -0
  47. package/dist/local-V5XPOCXA.js +1 -0
  48. package/dist/multipart-parser-73SROTP5.js +2 -0
  49. package/dist/query_compiler_fast_bg.postgresql-7BFUBDOL.js +2 -0
  50. package/dist/query_compiler_fast_bg.postgresql.wasm-base64-I4FAC6EL.js +1 -0
  51. package/dist/signin-DZIPNQBV.js +1 -0
  52. package/dist/src-BFSJ5KFS.js +3 -0
  53. package/dist/src-ERQKJBBE.js +1 -0
  54. package/dist/sso-oidc-SYBBWZG3.js +1 -0
  55. package/dist/sts-DREA5KZD.js +6 -0
  56. package/package.json +12 -14
@@ -0,0 +1,5 @@
1
+ import{a as S,b as X,c as v,d as ee,f as re}from"./chunk-DGJUBN33.js";var G=v((_e,j)=>{"use strict";var b=1e3,O=b*60,w=O*60,g=w*24,te=g*7,ne=g*365.25;j.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return oe(e);if(r==="number"&&isFinite(e))return t.long?ie(e):se(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function oe(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*ne;case"weeks":case"week":case"w":return r*te;case"days":case"day":case"d":return r*g;case"hours":case"hour":case"hrs":case"hr":case"h":return r*w;case"minutes":case"minute":case"mins":case"min":case"m":return r*O;case"seconds":case"second":case"secs":case"sec":case"s":return r*b;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function se(e){var t=Math.abs(e);return t>=g?Math.round(e/g)+"d":t>=w?Math.round(e/w)+"h":t>=O?Math.round(e/O)+"m":t>=b?Math.round(e/b)+"s":e+"ms"}function ie(e){var t=Math.abs(e);return t>=g?T(e,t,g,"day"):t>=w?T(e,t,w,"hour"):t>=O?T(e,t,O,"minute"):t>=b?T(e,t,b,"second"):e+" ms"}function T(e,t,r,n){var l=t>=r*1.5;return Math.round(e/r)+" "+n+(l?"s":"")}});var N=v((Me,U)=>{"use strict";function ce(e){r.debug=r,r.default=r,r.coerce=W,r.disable=h,r.enable=l,r.enabled=J,r.humanize=G(),r.destroy=Z,Object.keys(e).forEach(o=>{r[o]=e[o]}),r.names=[],r.skips=[],r.formatters={};function t(o){let s=0;for(let c=0;c<o.length;c++)s=(s<<5)-s+o.charCodeAt(c),s|=0;return r.colors[Math.abs(s)%r.colors.length]}r.selectColor=t;function r(o){let s,c=null,a,y;function f(...d){if(!f.enabled)return;let F=f,E=Number(new Date),H=E-(s||E);F.diff=H,F.prev=s,F.curr=E,s=E,d[0]=r.coerce(d[0]),typeof d[0]!="string"&&d.unshift("%O");let I=0;d[0]=d[0].replace(/%([a-zA-Z%])/g,(M,K)=>{if(M==="%%")return"%";I++;let B=r.formatters[K];if(typeof B=="function"){let Q=d[I];M=B.call(F,Q),d.splice(I,1),I--}return M}),r.formatArgs.call(F,d),(F.log||r.log).apply(F,d)}return f.namespace=o,f.useColors=r.useColors(),f.color=r.selectColor(o),f.extend=n,f.destroy=r.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>c!==null?c:(a!==r.namespaces&&(a=r.namespaces,y=r.enabled(o)),y),set:d=>{c=d}}),typeof r.init=="function"&&r.init(f),f}function n(o,s){let c=r(this.namespace+(typeof s>"u"?":":s)+o);return c.log=this.log,c}function l(o){r.save(o),r.namespaces=o,r.names=[],r.skips=[];let s=(typeof o=="string"?o:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let c of s)c[0]==="-"?r.skips.push(c.slice(1)):r.names.push(c)}function m(o,s){let c=0,a=0,y=-1,f=0;for(;c<o.length;)if(a<s.length&&(s[a]===o[c]||s[a]==="*"))s[a]==="*"?(y=a,f=c,a++):(c++,a++);else if(y!==-1)a=y+1,f++,c=f;else return!1;for(;a<s.length&&s[a]==="*";)a++;return a===s.length}function h(){let o=[...r.names,...r.skips.map(s=>"-"+s)].join(",");return r.enable(""),o}function J(o){for(let s of r.skips)if(m(o,s))return!1;for(let s of r.names)if(m(o,s))return!0;return!1}function W(o){return o instanceof Error?o.stack||o.message:o}function Z(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}U.exports=ce});var P=v((C,R)=>{"use strict";C.formatArgs=le;C.save=ae;C.load=fe;C.useColors=ue;C.storage=Ce();C.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();C.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ue(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function le(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+R.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,l=>{l!=="%%"&&(r++,l==="%c"&&(n=r))}),e.splice(n,0,t)}C.log=console.debug||console.log||(()=>{});function ae(e){try{e?C.storage.setItem("debug",e):C.storage.removeItem("debug")}catch{}}function fe(){let e;try{e=C.storage.getItem("debug")||C.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Ce(){try{return localStorage}catch{}}R.exports=N()(C);var{formatters:de}=R.exports;de.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var z={};ee(z,{createSupportsColor:()=>L,default:()=>ye});import D from"process";import pe from"os";import q from"tty";function p(e,t=globalThis.Deno?globalThis.Deno.args:D.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),l=t.indexOf("--");return n!==-1&&(l===-1||n<l)}function me(){if(!("FORCE_COLOR"in i))return;if(i.FORCE_COLOR==="true")return 1;if(i.FORCE_COLOR==="false")return 0;if(i.FORCE_COLOR.length===0)return 1;let e=Math.min(Number.parseInt(i.FORCE_COLOR,10),3);if([0,1,2,3].includes(e))return e}function he(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Fe(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=me();n!==void 0&&(x=n);let l=r?x:n;if(l===0)return 0;if(r){if(p("color=16m")||p("color=full")||p("color=truecolor"))return 3;if(p("color=256"))return 2}if("TF_BUILD"in i&&"AGENT_NAME"in i)return 1;if(e&&!t&&l===void 0)return 0;let m=l||0;if(i.TERM==="dumb")return m;if(D.platform==="win32"){let h=pe.release().split(".");return Number(h[0])>=10&&Number(h[2])>=10586?Number(h[2])>=14931?3:2:1}if("CI"in i)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(h=>h in i)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(h=>h in i)||i.CI_NAME==="codeship"?1:m;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if(i.COLORTERM==="truecolor"||i.TERM==="xterm-kitty"||i.TERM==="xterm-ghostty"||i.TERM==="wezterm")return 3;if("TERM_PROGRAM"in i){let h=Number.parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return h>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:m}function L(e,t={}){let r=Fe(e,{streamIsTTY:e&&e.isTTY,...t});return he(r)}var i,x,ge,ye,Y=X(()=>{"use strict";({env:i}=D);p("no-color")||p("no-colors")||p("color=false")||p("color=never")?x=0:(p("color")||p("colors")||p("color=true")||p("color=always"))&&(x=1);ge={stdout:L({isTTY:q.isatty(1)}),stderr:L({isTTY:q.isatty(2)})},ye=ge});var V=v((u,_)=>{"use strict";var be=S("tty"),A=S("util");u.init=Re;u.log=Ee;u.formatArgs=we;u.save=Ie;u.load=Te;u.useColors=Oe;u.destroy=A.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");u.colors=[6,2,3,4,5,1];try{let e=(Y(),re(z));e&&(e.stderr||e).level>=2&&(u.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}u.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(l,m)=>m.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function Oe(){return"colors"in u.inspectOpts?!!u.inspectOpts.colors:be.isatty(process.stderr.fd)}function we(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,l="\x1B[3"+(n<8?n:"8;5;"+n),m=` ${l};1m${t} \x1B[0m`;e[0]=m+e[0].split(`
2
+ `).join(`
3
+ `+m),e.push(l+"m+"+_.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=ve()+t+" "+e[0]}function ve(){return u.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Ee(...e){return process.stderr.write(A.formatWithOptions(u.inspectOpts,...e)+`
4
+ `)}function Ie(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Te(){return process.env.DEBUG}function Re(e){e.inspectOpts={};let t=Object.keys(u.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=u.inspectOpts[t[r]]}_.exports=N()(u);var{formatters:$}=_.exports;$.o=function(e){return this.inspectOpts.colors=this.useColors,A.inspect(e,this.inspectOpts).split(`
5
+ `).map(t=>t.trim()).join(" ")};$.O=function(e){return this.inspectOpts.colors=this.useColors,A.inspect(e,this.inspectOpts)}});var xe=v((ke,k)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?k.exports=P():k.exports=V()});export{xe as a};
@@ -0,0 +1 @@
1
+ import{b as c}from"./chunk-DGJUBN33.js";import*as o from"child_process";import*as s from"util";var r,i=c(()=>{"use strict";r=s.promisify(o.exec)});export{r as a,i as b};
@@ -0,0 +1 @@
1
+ var h=Object.create;var e=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(a&&(b=a(a=0)),b);var o=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),p=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},g=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of j(b))!l.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=i(b,d))||f.enumerable});return a};var q=(a,b,c)=>(c=a!=null?h(k(a)):{},g(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a)),r=a=>g(e({},"__esModule",{value:!0}),a);export{m as a,n as b,o as c,p as d,q as e,r as f};
@@ -0,0 +1 @@
1
+ import{a as e}from"./chunk-EXLRPVEX.js";var c=(...t)=>async()=>{if(t.length===0)throw new e("No providers in chain");let o;for(let n of t)try{return await n()}catch(r){if(o=r,r?.tryNextLink)continue;throw r}throw o};export{c as a};
@@ -0,0 +1,9 @@
1
+ import{a as Ne,b as qe,f as _,g as h}from"./chunk-RR5R4AKJ.js";import{a as E}from"./chunk-7Z3O7WJM.js";import{a as it}from"./chunk-6EI2BXXZ.js";import{a as Xt,b as Vt,g as Ft}from"./chunk-7HOF72FC.js";import{a as Pt,b as It}from"./chunk-2VIWVVHK.js";import{$ as Lt,A as dt,B as yt,C as mt,D as xt,E as vt,F as Rt,G as k,H as Kt,I as ft,J as gt,K as St,L as Ct,M as _t,N as ht,Q as $t,R as Dt,S as At,T as kt,U as Mt,V as bt,W as Ot,X as wt,Y as M,Z as Tt,_ as Ut,a as Xe,aa as Nt,b as Ve,ba as qt,c as Fe,ca as Ht,d as He,da as jt,e as je,ea as Wt,f as We,fa as Bt,g as Ge,ga as zt,h as Be,ha as Qt,i as ze,ia as Yt,k as ot,l as nt,n as st,o as Te,v as at,w as ct,x as pt,y as lt,z as ut}from"./chunk-O3WYNHSC.js";import{a as rt,c as f}from"./chunk-PXU2OOBT.js";import{a as Et}from"./chunk-DIXI4M5O.js";import{a as Gt}from"./chunk-FGJ5K4WM.js";import{b as Qe,c as Ze,e as et,f as tt}from"./chunk-7DCGNQSQ.js";import{d as Ye,e as Je}from"./chunk-QEIMNOY2.js";import{b as S}from"./chunk-EXLRPVEX.js";import{randomUUID as is}from"crypto";var b=class extends it{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:t,errorTypeRegistries:o,serviceTarget:s,awsQueryCompatible:r,jsonCodec:y}){super({defaultNamespace:t,errorTypeRegistries:o}),this.serviceTarget=s,this.codec=y??new It({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!r,this.mixin=new ht(this.awsQueryCompatible)}async serializeRequest(t,o,s){let r=await super.serializeRequest(t,o,s);return r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${t.name}`}),this.awsQueryCompatible&&(r.headers["x-amzn-query-mode"]="true"),(ot(t.input)==="unit"||!r.body)&&(r.body="{}"),r}getPayloadCodec(){return this.codec}async handleError(t,o,s,r,y){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,s);let m=Pt(s,r)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,m,this.options.defaultNamespace);let{errorSchema:x,errorMetadata:g}=await this.mixin.getErrorSchemaOrThrowBaseException(m,this.options.defaultNamespace,s,r,y,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),D=st.of(x),A=r.message??r.Message??"UnknownError",be=this.compositeErrorRegistry.getErrorCtor(x)??Error,Ho=new be(A),Oe={};for(let[we,jo]of D.structIterator())r[we]!=null&&(Oe[we]=this.codec.createDeserializer().readObject(jo,r[we]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,Oe),this.mixin.decorateServiceException(Object.assign(Ho,g,{$fault:D.getMergedTraits().error,message:A},Oe),r)}};var O=class extends b{constructor({defaultNamespace:t,errorTypeRegistries:o,serviceTarget:s,awsQueryCompatible:r,jsonCodec:y}){super({defaultNamespace:t,errorTypeRegistries:o,serviceTarget:s,awsQueryCompatible:r,jsonCodec:y})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}};var Jt=async(e,t,o)=>({operation:We(t).operation,region:await Ge(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Wo(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"kms",region:e.region},propertiesExtractor:(t,o)=>({signingProperties:{config:t,context:o}})}}var Zt=e=>{let t=[];switch(e.operation){default:t.push(Wo(e))}return t},eo=e=>{let t=vt(e);return Object.assign(t,{authSchemePreference:Ge(e.authSchemePreference??[])})};var to=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"kms"}),w={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var oo={name:"@aws-sdk/client-kms",description:"AWS SDK for JavaScript Kms Client for Node.js, Browser and React Native",version:"3.1019.0",scripts:{build:"concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline client-kms","build:es":"tsc -p tsconfig.es.json","build:include:deps":'yarn g:turbo run build -F="$npm_package_name"',"build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo kms","test:e2e":"yarn g:vitest run -c vitest.config.e2e.mts --mode development","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.mts","test:index":"tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.25","@aws-sdk/credential-provider-node":"^3.972.27","@aws-sdk/middleware-host-header":"^3.972.8","@aws-sdk/middleware-logger":"^3.972.8","@aws-sdk/middleware-recursion-detection":"^3.972.9","@aws-sdk/middleware-user-agent":"^3.972.26","@aws-sdk/region-config-resolver":"^3.972.10","@aws-sdk/types":"^3.973.6","@aws-sdk/util-endpoints":"^3.996.5","@aws-sdk/util-user-agent-browser":"^3.972.8","@aws-sdk/util-user-agent-node":"^3.973.12","@smithy/config-resolver":"^4.4.13","@smithy/core":"^3.23.12","@smithy/fetch-http-handler":"^5.3.15","@smithy/hash-node":"^4.2.12","@smithy/invalid-dependency":"^4.2.12","@smithy/middleware-content-length":"^4.2.12","@smithy/middleware-endpoint":"^4.4.27","@smithy/middleware-retry":"^4.4.44","@smithy/middleware-serde":"^4.2.15","@smithy/middleware-stack":"^4.2.12","@smithy/node-config-provider":"^4.3.12","@smithy/node-http-handler":"^4.5.0","@smithy/protocol-http":"^5.3.12","@smithy/smithy-client":"^4.12.7","@smithy/types":"^4.13.1","@smithy/url-parser":"^4.2.12","@smithy/util-base64":"^4.3.2","@smithy/util-body-length-browser":"^4.2.2","@smithy/util-body-length-node":"^4.2.3","@smithy/util-defaults-mode-browser":"^4.3.43","@smithy/util-defaults-mode-node":"^4.2.47","@smithy/util-endpoints":"^3.3.3","@smithy/util-middleware":"^4.2.12","@smithy/util-retry":"^4.2.12","@smithy/util-utf8":"^4.2.2",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node20":"20.1.8","@types/node":"^20.14.8",concurrently:"7.0.0","downlevel-dts":"0.10.1",premove:"4.0.0",typescript:"~5.8.3"},engines:{node:">=20.0.0"},typesVersions:{"<4.5":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-kms",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-kms"}};var ro="AWS_EC2_METADATA_DISABLED",no=async e=>{let{ENV_CMDS_FULL_URI:t,ENV_CMDS_RELATIVE_URI:o,fromContainerMetadata:s,fromInstanceMetadata:r}=await import("./dist-es-NDZJSZR3.js");if(process.env[o]||process.env[t]){e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:y}=await import("./dist-es-OUTR3NFA.js");return Et(y(e),s(e))}return process.env[ro]&&process.env[ro]!=="false"?async()=>{throw new S("EC2 Instance Metadata Service access disabled",{logger:e.logger})}:(e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),r(e))};function so(e,t){let o=zo(e),s,r,y,m=async x=>{if(x?.forceRefresh)return await o(x);if(y?.expiration&&y?.expiration?.getTime()<Date.now()&&(y=void 0),s)await s;else if(!y||t?.(y))if(y)r||(r=o(x).then(g=>{y=g}).finally(()=>{r=void 0}));else return s=o(x).then(g=>{y=g}).finally(()=>{s=void 0}),m(x);return y};return m}var zo=e=>async t=>{let o;for(let s of e)try{return await s(t)}catch(r){if(o=r,r?.tryNextLink)continue;throw r}throw o};var io=!1,ao=(e={})=>so([async()=>{if(e.profile??process.env[Gt])throw process.env[Xt]&&process.env[Vt]&&(io||((e.logger?.warn&&e.logger?.constructor?.name!=="NoOpLogger"?e.logger.warn.bind(e.logger):console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
2
+ Multiple credential sources detected:
3
+ Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
4
+ This SDK will proceed with the AWS_PROFILE value.
5
+
6
+ However, a future version may change this behavior to prefer the ENV static credentials.
7
+ Please ensure that your environment only sets either the AWS_PROFILE or the
8
+ AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
9
+ `),io=!0)),new S("AWS_PROFILE is set, skipping fromEnv provider.",{logger:e.logger,tryNextLink:!0});return e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),Ft(e)()},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:o,ssoAccountId:s,ssoRegion:r,ssoRoleName:y,ssoSession:m}=e;if(!o&&!s&&!r&&!y&&!m)throw new S("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:e.logger});let{fromSSO:x}=await import("./dist-es-WTYBIVJ2.js");return x(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:o}=await import("./dist-es-NVFYVK4E.js");return o(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:o}=await import("./dist-es-UGE2JJUB.js");return o(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:o}=await import("./dist-es-M3FWVZJF.js");return o(e)(t)},async()=>(e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await no(e))()),async()=>{throw new S("Could not load credentials from any providers",{tryNextLink:!1,logger:e.logger})}],Qo);var Qo=e=>e?.expiration!==void 0&&e.expiration.getTime()-Date.now()<3e5;var Ro="required";var R="argv";var co="isSet",I="booleanEquals",C="error",P="endpoint",K="tree",Ue="PartitionResult",po={[Ro]:!1,type:"string"},lo={[Ro]:!0,default:!1,type:"boolean"},uo={ref:"Endpoint"},Ko={fn:I,[R]:[{ref:"UseFIPS"},!0]},fo={fn:I,[R]:[{ref:"UseDualStack"},!0]},v={},yo={fn:"getAttr",[R]:[{ref:Ue},"supportsFIPS"]},mo={fn:I,[R]:[!0,{fn:"getAttr",[R]:[{ref:Ue},"supportsDualStack"]}]},xo=[Ko],Eo=[fo],vo=[{ref:"Region"}],Yo={version:"1.0",parameters:{Region:po,UseDualStack:lo,UseFIPS:lo,Endpoint:po},rules:[{conditions:[{fn:co,[R]:[uo]}],rules:[{conditions:xo,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:C},{conditions:Eo,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:C},{endpoint:{url:uo,properties:v,headers:v},type:P}],type:K},{conditions:[{fn:co,[R]:vo}],rules:[{conditions:[{fn:"aws.partition",[R]:vo,assign:Ue}],rules:[{conditions:[Ko,fo],rules:[{conditions:[{fn:I,[R]:[!0,yo]},mo],rules:[{endpoint:{url:"https://kms-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:v,headers:v},type:P}],type:K},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:C}],type:K},{conditions:xo,rules:[{conditions:[{fn:I,[R]:[yo,!0]}],rules:[{endpoint:{url:"https://kms-fips.{Region}.{PartitionResult#dnsSuffix}",properties:v,headers:v},type:P}],type:K},{error:"FIPS is enabled but this partition does not support FIPS",type:C}],type:K},{conditions:Eo,rules:[{conditions:[mo],rules:[{endpoint:{url:"https://kms.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:v,headers:v},type:P}],type:K},{error:"DualStack is enabled but this partition does not support DualStack",type:C}],type:K},{endpoint:{url:"https://kms.{Region}.{PartitionResult#dnsSuffix}",properties:v,headers:v},type:P}],type:K}],type:K},{error:"Invalid Configuration: Missing Region",type:C}]},go=Yo;var Jo=new pt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),So=(e,t={})=>Jo.get(e,()=>ut(go,{endpointParams:e,logger:t.logger}));lt.aws=dt;var i=class e extends Kt{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var G=class e extends i{name="AlreadyExistsException";$fault="client";constructor(t){super({name:"AlreadyExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},T=class e extends i{name="DependencyTimeoutException";$fault="server";constructor(t){super({name:"DependencyTimeoutException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype)}},U=class e extends i{name="InvalidArnException";$fault="client";constructor(t){super({name:"InvalidArnException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},L=class e extends i{name="KMSInternalException";$fault="server";constructor(t){super({name:"KMSInternalException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype)}},N=class e extends i{name="KMSInvalidStateException";$fault="client";constructor(t){super({name:"KMSInvalidStateException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},q=class e extends i{name="NotFoundException";$fault="client";constructor(t){super({name:"NotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},X=class e extends i{name="CloudHsmClusterInUseException";$fault="client";constructor(t){super({name:"CloudHsmClusterInUseException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},V=class e extends i{name="CloudHsmClusterInvalidConfigurationException";$fault="client";constructor(t){super({name:"CloudHsmClusterInvalidConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},F=class e extends i{name="CloudHsmClusterNotActiveException";$fault="client";constructor(t){super({name:"CloudHsmClusterNotActiveException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},H=class e extends i{name="CloudHsmClusterNotFoundException";$fault="client";constructor(t){super({name:"CloudHsmClusterNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},j=class e extends i{name="CloudHsmClusterNotRelatedException";$fault="client";constructor(t){super({name:"CloudHsmClusterNotRelatedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},W=class e extends i{name="ConflictException";$fault="client";constructor(t){super({name:"ConflictException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},B=class e extends i{name="CustomKeyStoreInvalidStateException";$fault="client";constructor(t){super({name:"CustomKeyStoreInvalidStateException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},z=class e extends i{name="CustomKeyStoreNotFoundException";$fault="client";constructor(t){super({name:"CustomKeyStoreNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Q=class e extends i{name="InvalidAliasNameException";$fault="client";constructor(t){super({name:"InvalidAliasNameException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Y=class e extends i{name="LimitExceededException";$fault="client";constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},J=class e extends i{name="CustomKeyStoreNameInUseException";$fault="client";constructor(t){super({name:"CustomKeyStoreNameInUseException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Z=class e extends i{name="IncorrectTrustAnchorException";$fault="client";constructor(t){super({name:"IncorrectTrustAnchorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},ee=class e extends i{name="XksProxyIncorrectAuthenticationCredentialException";$fault="client";constructor(t){super({name:"XksProxyIncorrectAuthenticationCredentialException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},te=class e extends i{name="XksProxyInvalidConfigurationException";$fault="client";constructor(t){super({name:"XksProxyInvalidConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},oe=class e extends i{name="XksProxyInvalidResponseException";$fault="client";constructor(t){super({name:"XksProxyInvalidResponseException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},re=class e extends i{name="XksProxyUriEndpointInUseException";$fault="client";constructor(t){super({name:"XksProxyUriEndpointInUseException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},ne=class e extends i{name="XksProxyUriInUseException";$fault="client";constructor(t){super({name:"XksProxyUriInUseException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},se=class e extends i{name="XksProxyUriUnreachableException";$fault="client";constructor(t){super({name:"XksProxyUriUnreachableException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},ie=class e extends i{name="XksProxyVpcEndpointServiceInUseException";$fault="client";constructor(t){super({name:"XksProxyVpcEndpointServiceInUseException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},ae=class e extends i{name="XksProxyVpcEndpointServiceInvalidConfigurationException";$fault="client";constructor(t){super({name:"XksProxyVpcEndpointServiceInvalidConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},ce=class e extends i{name="XksProxyVpcEndpointServiceNotFoundException";$fault="client";constructor(t){super({name:"XksProxyVpcEndpointServiceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},pe=class e extends i{name="DisabledException";$fault="client";constructor(t){super({name:"DisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},le=class e extends i{name="DryRunOperationException";$fault="client";constructor(t){super({name:"DryRunOperationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},ue=class e extends i{name="InvalidGrantTokenException";$fault="client";constructor(t){super({name:"InvalidGrantTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},de=class e extends i{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},ye=class e extends i{name="TagException";$fault="client";constructor(t){super({name:"TagException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},me=class e extends i{name="UnsupportedOperationException";$fault="client";constructor(t){super({name:"UnsupportedOperationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},xe=class e extends i{name="XksKeyAlreadyInUseException";$fault="client";constructor(t){super({name:"XksKeyAlreadyInUseException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Ee=class e extends i{name="XksKeyInvalidConfigurationException";$fault="client";constructor(t){super({name:"XksKeyInvalidConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},ve=class e extends i{name="XksKeyNotFoundException";$fault="client";constructor(t){super({name:"XksKeyNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Re=class e extends i{name="CustomKeyStoreHasCMKsException";$fault="client";constructor(t){super({name:"CustomKeyStoreHasCMKsException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Ke=class e extends i{name="IncorrectKeyException";$fault="client";constructor(t){super({name:"IncorrectKeyException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},fe=class e extends i{name="InvalidCiphertextException";$fault="client";constructor(t){super({name:"InvalidCiphertextException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},ge=class e extends i{name="InvalidKeyUsageException";$fault="client";constructor(t){super({name:"InvalidKeyUsageException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Se=class e extends i{name="KeyUnavailableException";$fault="server";constructor(t){super({name:"KeyUnavailableException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype)}},Ce=class e extends i{name="InvalidMarkerException";$fault="client";constructor(t){super({name:"InvalidMarkerException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},_e=class e extends i{name="ExpiredImportTokenException";$fault="client";constructor(t){super({name:"ExpiredImportTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},he=class e extends i{name="IncorrectKeyMaterialException";$fault="client";constructor(t){super({name:"IncorrectKeyMaterialException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Pe=class e extends i{name="InvalidImportTokenException";$fault="client";constructor(t){super({name:"InvalidImportTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Ie=class e extends i{name="InvalidGrantIdException";$fault="client";constructor(t){super({name:"InvalidGrantIdException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},$e=class e extends i{name="KMSInvalidMacException";$fault="client";constructor(t){super({name:"KMSInvalidMacException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},De=class e extends i{name="KMSInvalidSignatureException";$fault="client";constructor(t){super({name:"KMSInvalidSignatureException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};var Zo="AttestationDocument",er="AlreadyExistsException";var Co="CiphertextBlob";var tr="ConflictException";var _o="CiphertextForRecipient";var or="CloudHsmClusterInvalidConfigurationException",rr="CloudHsmClusterInUseException",nr="CloudHsmClusterNotActiveException",sr="CloudHsmClusterNotFoundException",ir="CloudHsmClusterNotRelatedException";var ar="CustomKeyStoreHasCMKsException";var cr="CustomKeyStoreInvalidStateException";var pr="CustomKeyStoreNotFoundException",lr="CustomKeyStoreNameInUseException";var ur="DisabledException";var ho="DryRun",dr="DryRunModifiers",yr="DryRunOperationException",mr="DecryptRequest",xr="DecryptResponse";var Er="DependencyTimeoutException",vr="Decrypt";var Po="EncryptionAlgorithm";var Io="EncryptionContext";var Rr="ExpiredImportTokenException";var Kr="GenerateDataKey";var fr="GenerateDataKeyRequest",gr="GenerateDataKeyResponse";var $o="GrantTokens";var Sr="InvalidArnException",Cr="InvalidAliasNameException",_r="InvalidCiphertextException",hr="InvalidGrantIdException",Pr="InvalidGrantTokenException",Ir="InvalidImportTokenException",$r="IncorrectKeyException";var Dr="IncorrectKeyMaterialException";var Ar="InvalidKeyUsageException",kr="InvalidMarkerException";var Mr="IncorrectTrustAnchorException";var br="KeyEncryptionAlgorithm",Ae="KeyId";var Do="KeyMaterialId";var Or="KMSInternalException",wr="KMSInvalidMacException",Gr="KMSInvalidSignatureException",Tr="KMSInvalidStateException";var Ur="KeySpec";var Lr="KeyUnavailableException";var Nr="LimitExceededException";var qr="MalformedPolicyDocumentException";var Xr="NotFoundException";var Vr="NumberOfBytes";var Fr="PlaintextType";var Ao="Plaintext",ko="Recipient";var Hr="RecipientInfo";var jr="TagException";var Wr="UnsupportedOperationException";var Br="XksKeyAlreadyInUseException";var zr="XksKeyInvalidConfigurationException",Qr="XksKeyNotFoundException";var Yr="XksProxyIncorrectAuthenticationCredentialException",Jr="XksProxyInvalidConfigurationException",Zr="XksProxyInvalidResponseException";var en="XksProxyUriEndpointInUseException",tn="XksProxyUriInUseException";var on="XksProxyUriUnreachableException",rn="XksProxyVpcEndpointServiceInvalidConfigurationException",nn="XksProxyVpcEndpointServiceInUseException";var sn="XksProxyVpcEndpointServiceNotFoundException";var c="awsQueryError",d="client",p="error",l="httpError",u="message",Mo="smithy.ts.sdk.synthetic.com.amazonaws.kms",Le="server",n="com.amazonaws.kms",bo=Te.for(Mo),an=[-3,Mo,"KMSServiceException",0,[],[]];bo.registerError(an,i);var a=Te.for(n),cn=[-3,n,er,{[c]:["AlreadyExists",409],[p]:d,[l]:409},[u],[0]];a.registerError(cn,G);var pn=[-3,n,rr,{[c]:["CloudHsmClusterInUseException",400],[p]:d,[l]:400},[u],[0]];a.registerError(pn,X);var ln=[-3,n,or,{[c]:["CloudHsmClusterInvalidConfigurationException",400],[p]:d,[l]:400},[u],[0]];a.registerError(ln,V);var un=[-3,n,nr,{[c]:["CloudHsmClusterNotActiveException",400],[p]:d,[l]:400},[u],[0]];a.registerError(un,F);var dn=[-3,n,sr,{[c]:["CloudHsmClusterNotFoundException",400],[p]:d,[l]:400},[u],[0]];a.registerError(dn,H);var yn=[-3,n,ir,{[c]:["CloudHsmClusterNotRelatedException",400],[p]:d,[l]:400},[u],[0]];a.registerError(yn,j);var mn=[-3,n,tr,{[c]:["ConflictException",409],[p]:d,[l]:409},[u],[0]];a.registerError(mn,W);var xn=[-3,n,ar,{[c]:["CustomKeyStoreHasCMKsException",400],[p]:d,[l]:400},[u],[0]];a.registerError(xn,Re);var En=[-3,n,cr,{[c]:["CustomKeyStoreInvalidStateException",400],[p]:d,[l]:400},[u],[0]];a.registerError(En,B);var vn=[-3,n,lr,{[c]:["CustomKeyStoreNameInUseException",400],[p]:d,[l]:400},[u],[0]];a.registerError(vn,J);var Rn=[-3,n,pr,{[c]:["CustomKeyStoreNotFoundException",400],[p]:d,[l]:400},[u],[0]];a.registerError(Rn,z);var Kn=[-3,n,Er,{[c]:["DependencyTimeout",503],[p]:Le,[l]:503},[u],[0]];a.registerError(Kn,T);var fn=[-3,n,ur,{[c]:["Disabled",409],[p]:d,[l]:409},[u],[0]];a.registerError(fn,pe);var gn=[-3,n,yr,{[c]:["DryRunOperation",412],[p]:d,[l]:412},[u],[0]];a.registerError(gn,le);var Sn=[-3,n,Rr,{[c]:["ExpiredImportTokenException",400],[p]:d,[l]:400},[u],[0]];a.registerError(Sn,_e);var Cn=[-3,n,$r,{[c]:["IncorrectKeyException",400],[p]:d,[l]:400},[u],[0]];a.registerError(Cn,Ke);var _n=[-3,n,Dr,{[c]:["IncorrectKeyMaterialException",400],[p]:d,[l]:400},[u],[0]];a.registerError(_n,he);var hn=[-3,n,Mr,{[c]:["IncorrectTrustAnchorException",400],[p]:d,[l]:400},[u],[0]];a.registerError(hn,Z);var Pn=[-3,n,Cr,{[c]:["InvalidAliasName",400],[p]:d,[l]:400},[u],[0]];a.registerError(Pn,Q);var In=[-3,n,Sr,{[c]:["InvalidArn",400],[p]:d,[l]:400},[u],[0]];a.registerError(In,U);var $n=[-3,n,_r,{[c]:["InvalidCiphertext",400],[p]:d,[l]:400},[u],[0]];a.registerError($n,fe);var Dn=[-3,n,hr,{[c]:["InvalidGrantId",400],[p]:d,[l]:400},[u],[0]];a.registerError(Dn,Ie);var An=[-3,n,Pr,{[c]:["InvalidGrantToken",400],[p]:d,[l]:400},[u],[0]];a.registerError(An,ue);var kn=[-3,n,Ir,{[c]:["InvalidImportTokenException",400],[p]:d,[l]:400},[u],[0]];a.registerError(kn,Pe);var Mn=[-3,n,Ar,{[c]:["InvalidKeyUsage",400],[p]:d,[l]:400},[u],[0]];a.registerError(Mn,ge);var bn=[-3,n,kr,{[c]:["InvalidMarker",400],[p]:d,[l]:400},[u],[0]];a.registerError(bn,Ce);var On=[-3,n,Lr,{[c]:["KeyUnavailable",500],[p]:Le,[l]:500},[u],[0]];a.registerError(On,Se);var wn=[-3,n,Or,{[c]:["KMSInternal",500],[p]:Le,[l]:500},[u],[0]];a.registerError(wn,L);var Gn=[-3,n,wr,{[c]:["KMSInvalidMac",400],[p]:d,[l]:400},[u],[0]];a.registerError(Gn,$e);var Tn=[-3,n,Gr,{[c]:["KMSInvalidSignature",400],[p]:d,[l]:400},[u],[0]];a.registerError(Tn,De);var Un=[-3,n,Tr,{[c]:["KMSInvalidStateException",409],[p]:d,[l]:409},[u],[0]];a.registerError(Un,N);var Ln=[-3,n,Nr,{[c]:["LimitExceeded",400],[p]:d,[l]:400},[u],[0]];a.registerError(Ln,Y);var Nn=[-3,n,qr,{[c]:["MalformedPolicyDocument",400],[p]:d,[l]:400},[u],[0]];a.registerError(Nn,de);var qn=[-3,n,Xr,{[c]:["NotFound",404],[p]:d,[l]:404},[u],[0]];a.registerError(qn,q);var Xn=[-3,n,jr,{[c]:["TagException",400],[p]:d,[l]:400},[u],[0]];a.registerError(Xn,ye);var Vn=[-3,n,Wr,{[c]:["UnsupportedOperation",400],[p]:d,[l]:400},[u],[0]];a.registerError(Vn,me);var Fn=[-3,n,Br,{[c]:["XksKeyAlreadyInUse",400],[p]:d,[l]:400},[u],[0]];a.registerError(Fn,xe);var Hn=[-3,n,zr,{[c]:["XksKeyInvalidConfiguration",400],[p]:d,[l]:400},[u],[0]];a.registerError(Hn,Ee);var jn=[-3,n,Qr,{[c]:["XksKeyNotFoundException",400],[p]:d,[l]:400},[u],[0]];a.registerError(jn,ve);var Wn=[-3,n,Yr,{[c]:["XksProxyIncorrectAuthenticationCredentialException",400],[p]:d,[l]:400},[u],[0]];a.registerError(Wn,ee);var Bn=[-3,n,Jr,{[c]:["XksProxyInvalidConfigurationException",400],[p]:d,[l]:400},[u],[0]];a.registerError(Bn,te);var zn=[-3,n,Zr,{[c]:["XksProxyInvalidResponseException",400],[p]:d,[l]:400},[u],[0]];a.registerError(zn,oe);var Qn=[-3,n,en,{[c]:["XksProxyUriEndpointInUseException",400],[p]:d,[l]:400},[u],[0]];a.registerError(Qn,re);var Yn=[-3,n,tn,{[c]:["XksProxyUriInUseException",400],[p]:d,[l]:400},[u],[0]];a.registerError(Yn,ne);var Jn=[-3,n,on,{[c]:["XksProxyUriUnreachableException",400],[p]:d,[l]:400},[u],[0]];a.registerError(Jn,se);var Zn=[-3,n,nn,{[c]:["XksProxyVpcEndpointServiceInUseException",400],[p]:d,[l]:400},[u],[0]];a.registerError(Zn,ie);var es=[-3,n,rn,{[c]:["XksProxyVpcEndpointServiceInvalidConfigurationException",400],[p]:d,[l]:400},[u],[0]];a.registerError(es,ae);var ts=[-3,n,sn,{[c]:["XksProxyVpcEndpointServiceNotFoundException",400],[p]:d,[l]:400},[u],[0]];a.registerError(ts,ce);var Oo=[bo,a];var wo=[0,n,Fr,8,21];var os=[3,n,mr,0,[Co,Io,$o,Ae,Po,ko,ho,dr],[21,128,64,0,0,()=>Go,2,64]],rs=[3,n,xr,0,[Ae,Ao,Po,_o,Do],[0,[()=>wo,0],0,21,0]];var ns=[3,n,fr,0,[Ae,Io,Vr,Ur,$o,ko,ho],[0,128,1,0,64,()=>Go,2],1],ss=[3,n,gr,0,[Co,Ao,Ae,_o,Do],[21,[()=>wo,0],0,21,0]];var Go=[3,n,Hr,0,[br,Zo],[0,21]];var To=[9,n,vr,0,()=>os,()=>rs];var Uo=[9,n,Kr,0,()=>ns,()=>ss];var Lo=e=>({apiVersion:"2014-11-01",base64Decoder:e?.base64Decoder??Qe,base64Encoder:e?.base64Encoder??Ze,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??So,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Zt,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new mt}],logger:e?.logger??new _t,protocol:e?.protocol??O,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.kms",errorTypeRegistries:Oo,xmlNamespace:"https://trent.amazonaws.com/doc/2014-11-01/",version:"2014-11-01",serviceTarget:"TrentService"},serviceId:e?.serviceId??"KMS",urlParser:e?.urlParser??rt,utf8Decoder:e?.utf8Decoder??Ye,utf8Encoder:e?.utf8Encoder??Je});var No=e=>{gt(process.version);let t=zt(e),o=()=>t().then(ft),s=Lo(e);yt(process.version);let r={profile:e?.profile,logger:s.logger};return{...s,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??f(xt,r),bodyLengthChecker:e?.bodyLengthChecker??Bt,credentialDefaultProvider:e?.credentialDefaultProvider??ao,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ht({serviceId:s.serviceId,clientVersion:oo.version}),maxAttempts:e?.maxAttempts??f(Ut,e),region:e?.region??f(Mt,{...bt,...r}),requestHandler:et.create(e?.requestHandler??o),retryMode:e?.retryMode??f({...Nt,default:async()=>(await o()).retryMode||$t},e),sha256:e?.sha256??Wt.bind(null,"sha256"),streamCollector:e?.streamCollector??tt,useDualstackEndpoint:e?.useDualstackEndpoint??f(At,r),useFipsEndpoint:e?.useFipsEndpoint??f(kt,r),userAgentAppId:e?.userAgentAppId??f(jt,r)}};var qo=e=>{let t=e.httpAuthSchemes,o=e.httpAuthSchemeProvider,s=e.credentials;return{setHttpAuthScheme(r){let y=t.findIndex(m=>m.schemeId===r.schemeId);y===-1?t.push(r):t.splice(y,1,r)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(r){o=r},httpAuthSchemeProvider(){return o},setCredentials(r){s=r},credentials(){return s}}},Xo=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var Vo=(e,t)=>{let o=Object.assign(Qt(e),St(e),Xe(e),qo(e));return t.forEach(s=>s.configure(o)),Object.assign(e,Yt(o),Ct(o),Ve(o),Xo(o))};var ke=class extends Rt{config;constructor(...[t]){let o=No(t||{});super(o),this.initConfig=o;let s=to(o),r=ct(s),y=Lt(r),m=Ot(y),x=m,g=Tt(x),D=eo(g),A=Vo(D,t?.extensions||[]);this.config=A,this.middlewareStack.use(nt(this.config)),this.middlewareStack.use(Dt(this.config)),this.middlewareStack.use(qt(this.config)),this.middlewareStack.use(wt(this.config)),this.middlewareStack.use(Fe(this.config)),this.middlewareStack.use(He(this.config)),this.middlewareStack.use(je(this.config)),this.middlewareStack.use(Be(this.config,{httpAuthSchemeParametersProvider:Jt,identityProviderConfigProvider:async be=>new at({"aws.auth#sigv4":be.credentials})})),this.middlewareStack.use(ze(this.config))}destroy(){super.destroy()}};var Me=class extends k.classBuilder().ep(w).m(function(t,o,s,r){return[M(s,t.getEndpointParameterInstructions())]}).s("TrentService","Decrypt",{}).n("KMSClient","DecryptCommand").sc(To).build(){};var $=class extends k.classBuilder().ep(w).m(function(t,o,s,r){return[M(s,t.getEndpointParameterInstructions())]}).s("TrentService","GenerateDataKey",{}).n("KMSClient","GenerateDataKeyCommand").sc(Uo).build(){};var Fo=class{name="aws-kms";client;keyId;keyVersion;constructor(t){let o=t.keyId??process.env.AWS_KMS_KEY_ID??process.env.AWS_KMS_KEY_ARN;if(!o)throw new Error("AWS KMS Key ID or ARN required. Set AWS_KMS_KEY_ID or pass keyId in config.");this.keyId=o,this.keyVersion=t.keyVersion??1;let s=t.region??process.env.AWS_REGION??"us-east-1";this.client=new ke({region:s,...t.credentials&&{credentials:{accessKeyId:t.credentials.accessKeyId,secretAccessKey:t.credentials.secretAccessKey}}}),E.debug("[vault:aws-kms] Initialized",{keyId:o,region:s,keyVersion:this.keyVersion})}async encrypt(t,o){try{let s=await this.client.send(new $({KeyId:this.keyId,KeySpec:"AES_256"})),r=s.Plaintext,y=s.CiphertextBlob;if(!r||!y)throw new Error("AWS KMS GenerateDataKey returned empty DEK");let m=Ne(t,r),x={id:o?.id??is(),ciphertext:_(m.ciphertext),encryptedDek:_(y),iv:_(m.iv),authTag:_(m.authTag),keyVersion:this.keyVersion,algorithm:"aes-256-gcm",...o?.tenantId!==void 0?{tenantId:o.tenantId}:{},metadata:o?.metadata,createdAt:new Date().toISOString()};return E.debug("[vault:aws-kms] Secret encrypted",{id:x.id,tenantId:o?.tenantId}),x}catch(s){throw E.error("[vault:aws-kms] Encryption failed",{error:s}),new Error(`AWS KMS encryption failed: ${s instanceof Error?s.message:String(s)}`)}}async decrypt(t,o){try{if(o?.tenantId&&t.tenantId&&t.tenantId!==o.tenantId)throw new Error("Tenant ID mismatch");let r=(await this.client.send(new Me({CiphertextBlob:h(t.encryptedDek)}))).Plaintext;if(!r)throw new Error("AWS KMS Decrypt returned empty DEK");let y=qe(h(t.ciphertext),r,{iv:h(t.iv),authTag:h(t.authTag)});return E.debug("[vault:aws-kms] Secret decrypted",{id:t.id,tenantId:o?.tenantId}),y.toString("utf-8")}catch(s){throw E.error("[vault:aws-kms] Decryption failed",{error:s}),new Error(`AWS KMS decryption failed: ${s instanceof Error?s.message:String(s)}`)}}async rotateKey(t){try{let o=await this.decrypt(t),s=await this.encrypt(o,{id:t.id,...t.tenantId!==void 0?{tenantId:t.tenantId}:{},metadata:t.metadata});return s.rotatedAt=new Date().toISOString(),E.debug("[vault:aws-kms] Key rotated",{id:t.id}),s}catch(o){throw E.error("[vault:aws-kms] Key rotation failed",{error:o}),new Error(`Key rotation failed: ${o instanceof Error?o.message:String(o)}`)}}async rotateKek(){this.keyVersion+=1,E.info("[vault:aws-kms] KEK rotated",{newVersion:this.keyVersion})}async generateDek(){try{return(await this.client.send(new $({KeyId:this.keyId,KeySpec:"AES_256"}))).Plaintext}catch(t){throw E.error("[vault:aws-kms] DEK generation failed",{error:t}),new Error(`DEK generation failed: ${t instanceof Error?t.message:String(t)}`)}}async close(){this.client.destroy(),E.debug("[vault:aws-kms] Closed")}};export{Fo as a};
@@ -0,0 +1 @@
1
+ var o=class s extends Error{name="ProviderError";tryNextLink;constructor(t,e=!0){let u,r=!0;typeof e=="boolean"?(u=void 0,r=e):e!=null&&typeof e=="object"&&(u=e.logger,r=e.tryNextLink??!0),super(t),this.tryNextLink=r,Object.setPrototypeOf(this,s.prototype),u?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${t}`)}static from(t,e=!0){return Object.assign(new this(t.message,e),t)}};var i=class s extends o{name="CredentialsProviderError";constructor(t,e=!0){super(t,e),Object.setPrototypeOf(this,s.prototype)}};export{o as a,i as b};
@@ -0,0 +1 @@
1
+ var A="AWS_PROFILE",N="default",q=e=>e.profile||process.env[A]||N;import{join as L}from"path";import{homedir as v}from"os";import{sep as w}from"path";var h={},H=()=>process&&process.geteuid?`${process.geteuid()}`:"DEFAULT",f=()=>{let{HOME:e,USERPROFILE:t,HOMEPATH:o,HOMEDRIVE:r=`C:${w}`}=process.env;if(e)return e;if(t)return t;if(o)return`${r}${o}`;let i=H();return h[i]||(h[i]=v()),h[i]};var b="AWS_CONFIG_FILE",F=()=>process.env[b]||L(f(),".aws","config");var c;(function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"})(c||(c={}));import{join as C}from"path";var E=e=>Object.entries(e).filter(([t])=>{let o=t.indexOf(".");return o===-1?!1:Object.values(c).includes(t.substring(0,o))}).reduce((t,[o,r])=>{let i=o.indexOf("."),n=o.substring(0,i)===c.PROFILE?o.substring(i+1):o;return t[n]=r,t},{...e.default&&{default:e.default}});import{join as j}from"path";var k="AWS_SHARED_CREDENTIALS_FILE",I=()=>process.env[k]||j(f(),".aws","credentials");var y=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,$=["__proto__","profile __proto__"],g=e=>{let t={},o,r;for(let i of e.split(/\r?\n/)){let n=i.split(/(^|\s)[;#]/)[0].trim();if(n[0]==="["&&n[n.length-1]==="]"){o=void 0,r=void 0;let s=n.substring(1,n.length-1),p=y.exec(s);if(p){let[,m,,x]=p;Object.values(c).includes(m)&&(o=[m,x].join("."))}else o=s;if($.includes(s))throw new Error(`Found invalid profile name "${s}"`)}else if(o){let s=n.indexOf("=");if(![0,-1].includes(s)){let[p,m]=[n.substring(0,s).trim(),n.substring(s+1).trim()];if(m==="")r=p;else{r&&i.trimStart()===i&&(r=void 0),t[o]=t[o]||{};let x=r?[r,p].join("."):p;t[o][x]=m}}}}return t};import{readFile as G}from"fs/promises";var O={},u={},a=(e,t)=>u[e]!==void 0?u[e]:((!O[e]||t?.ignoreCache)&&(O[e]=G(e,"utf8")),O[e]);var _=()=>({}),R=async(e={})=>{let{filepath:t=I(),configFilepath:o=F()}=e,r=f(),i="~/",n=t;t.startsWith(i)&&(n=C(r,t.slice(2)));let S=o;o.startsWith(i)&&(S=C(r,o.slice(2)));let s=await Promise.all([a(S,{ignoreCache:e.ignoreCache}).then(g).then(E).catch(_),a(n,{ignoreCache:e.ignoreCache}).then(g).catch(_)]);return{configFile:s[0],credentialsFile:s[1]}};var D=e=>Object.entries(e).filter(([t])=>t.startsWith(c.SSO_SESSION+".")).reduce((t,[o,r])=>({...t,[o.substring(o.indexOf(".")+1)]:r}),{});var W=()=>({}),Re=async(e={})=>a(e.configFilepath??F()).then(g).then(D).catch(W);var P=(...e)=>{let t={};for(let o of e)for(let[r,i]of Object.entries(o))t[r]!==void 0?Object.assign(t[r],i):t[r]=i;return t};var Ne=async e=>{let t=await R(e);return P(t.configFile,t.credentialsFile)};import{readFile as X}from"fs/promises";import{createHash as K}from"crypto";import{join as V}from"path";var T=e=>{let o=K("sha1").update(e).digest("hex");return V(f(),".aws","sso","cache",`${o}.json`)};var d={},M=async e=>{if(d[e])return d[e];let t=T(e),o=await X(t,"utf8");return JSON.parse(o)};var U={getFileRecord(){return u},interceptFile(e,t){u[e]=Promise.resolve(t)},getTokenRecord(){return d},interceptToken(e,t){d[e]=t}};export{A as a,q as b,T as c,M as d,a as e,R as f,Re as g,Ne as h,U as i};
@@ -0,0 +1 @@
1
+ import{a as d,b as l,c as u,d as y,f as n,g as i}from"./chunk-RR5R4AKJ.js";import{a}from"./chunk-7Z3O7WJM.js";import{randomUUID as h}from"crypto";var m=class{name="local";masterKey;salt;keyVersion;constructor(e){let t=e.masterKey??process.env.VAULT_MASTER_KEY;if(!t)throw new Error("Master key required. Set VAULT_MASTER_KEY env var or pass masterKey in config.");this.masterKey=Buffer.from(t,"utf-8"),this.salt=e.salt??Buffer.from("nebutra-vault","utf-8"),this.keyVersion=e.keyVersion??1,a.debug("[vault:local] Initialized",{keyVersion:this.keyVersion})}async deriveKek(){let e=Buffer.from(`nebutra-vault-kek-v${this.keyVersion}`,"utf-8");return u(this.masterKey,this.salt,e)}async encrypt(e,t){try{let r=await this.deriveKek(),c=y(32),o=d(c,r),s=d(e,c),f={id:t?.id??h(),ciphertext:n(s.ciphertext),encryptedDek:n(o.ciphertext),iv:n(s.iv),authTag:n(s.authTag),dekIv:n(o.iv),dekAuthTag:n(o.authTag),keyVersion:this.keyVersion,algorithm:"aes-256-gcm",...t?.tenantId!==void 0?{tenantId:t.tenantId}:{},metadata:t?.metadata,createdAt:new Date().toISOString()};return a.debug("[vault:local] Secret encrypted",{id:f.id,tenantId:t?.tenantId}),f}catch(r){throw a.error("[vault:local] Encryption failed",{error:r}),new Error(`Local vault encryption failed: ${r instanceof Error?r.message:String(r)}`)}}async decrypt(e,t){try{if(t?.tenantId&&e.tenantId&&e.tenantId!==t.tenantId)throw new Error("Tenant ID mismatch");e.keyVersion!==this.keyVersion&&a.warn("[vault:local] Key version mismatch",{secretVersion:e.keyVersion,currentVersion:this.keyVersion});let r=Buffer.from(`nebutra-vault-kek-v${e.keyVersion}`,"utf-8"),c=await u(this.masterKey,this.salt,r),o;if(e.dekIv&&e.dekAuthTag)o=l(i(e.encryptedDek),c,{iv:i(e.dekIv),authTag:i(e.dekAuthTag)});else throw new Error("Encrypted DEK missing IV/authTag \u2014 cannot decrypt. Re-encrypt with current version.");let s=l(i(e.ciphertext),o,{iv:i(e.iv),authTag:i(e.authTag)});return a.debug("[vault:local] Secret decrypted",{id:e.id,tenantId:t?.tenantId}),s.toString("utf-8")}catch(r){throw a.error("[vault:local] Decryption failed",{error:r}),new Error(`Local vault decryption failed: ${r instanceof Error?r.message:String(r)}`)}}async rotateKey(e){try{let t=await this.decrypt(e),r=await this.encrypt(t,{id:e.id,...e.tenantId!==void 0?{tenantId:e.tenantId}:{},metadata:e.metadata});return r.rotatedAt=new Date().toISOString(),a.debug("[vault:local] Key rotated",{id:e.id}),r}catch(t){throw a.error("[vault:local] Key rotation failed",{error:t}),new Error(`Key rotation failed: ${t instanceof Error?t.message:String(t)}`)}}async rotateKek(){this.keyVersion+=1,a.info("[vault:local] KEK rotated",{newVersion:this.keyVersion})}async generateDek(){return y(32)}async close(){a.debug("[vault:local] Closed")}};export{m as a};