@stacksjs/buddy 0.66.0 → 0.68.0

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 (296) hide show
  1. package/dist/add.d.ts +4 -0
  2. package/dist/build.d.ts +4 -0
  3. package/dist/changelog.d.ts +3 -0
  4. package/dist/chunk-06g79v9j.js +2 -0
  5. package/dist/chunk-08bm2xax.js +2 -0
  6. package/dist/chunk-0enrsn65.js +978 -0
  7. package/dist/chunk-0m218zhk.js +2 -0
  8. package/dist/chunk-0q0jn0kk.js +6 -0
  9. package/dist/chunk-0yyhz107.js +2 -0
  10. package/dist/chunk-11vhe2za.js +2 -0
  11. package/dist/chunk-13143jmy.js +3 -0
  12. package/dist/chunk-1agj4qty.js +2 -0
  13. package/dist/chunk-1c4yywmn.js +9 -0
  14. package/dist/chunk-1e2f0z80.js +2 -0
  15. package/dist/chunk-1v13dkfw.js +2 -0
  16. package/dist/chunk-20e0mpcw.js +9 -0
  17. package/dist/chunk-25nxsybw.js +2 -0
  18. package/dist/chunk-27ksm11g.js +2 -0
  19. package/dist/chunk-2mhj5ght.js +2 -0
  20. package/dist/chunk-2wrs9p57.js +1 -0
  21. package/dist/chunk-2yj4j69j.js +2 -0
  22. package/dist/chunk-2ymn50ck.js +2 -0
  23. package/dist/chunk-3vjfkr7v.js +978 -0
  24. package/dist/{chunk-3zx3yk1m.js → chunk-3wpw5xgd.js} +1 -4
  25. package/dist/chunk-3y0gapf6.js +2 -0
  26. package/dist/chunk-4rb5r88h.js +978 -0
  27. package/dist/chunk-4wb68jfr.js +2 -0
  28. package/dist/chunk-5ewcj9vd.js +2 -0
  29. package/dist/chunk-5fm9mfqs.js +2 -0
  30. package/dist/chunk-5jhkn5by.js +2 -0
  31. package/dist/chunk-5m9xts4v.js +2 -0
  32. package/dist/chunk-6sqy7049.js +2 -0
  33. package/dist/chunk-6yazdvb4.js +2 -0
  34. package/dist/chunk-746p83dw.js +2 -0
  35. package/dist/chunk-76g7tr80.js +2 -0
  36. package/dist/chunk-7fz1p8p3.js +10 -0
  37. package/dist/chunk-814adsn3.js +2 -0
  38. package/dist/chunk-831wk0b3.js +2 -0
  39. package/dist/chunk-833tanrb.js +2 -0
  40. package/dist/chunk-8cx90pvv.js +2 -0
  41. package/dist/chunk-8gx9at51.js +1 -0
  42. package/dist/chunk-91pnyybg.js +9 -0
  43. package/dist/chunk-99syj1p0.js +2 -0
  44. package/dist/chunk-9bxh78vd.js +5 -0
  45. package/dist/chunk-9jaqey2q.js +2 -0
  46. package/dist/chunk-9tyaew40.js +2 -0
  47. package/dist/chunk-9zcyq5gh.js +2 -0
  48. package/dist/chunk-a4g1e1n0.js +2 -0
  49. package/dist/chunk-a6g2jk1y.js +2 -0
  50. package/dist/chunk-aaqd43t5.js +2 -0
  51. package/dist/chunk-adswb3gq.js +2 -0
  52. package/dist/chunk-atnw2cq3.js +2 -0
  53. package/dist/chunk-avdharmq.js +2 -0
  54. package/dist/chunk-b13gbfg3.js +2 -0
  55. package/dist/chunk-b3wr7cpk.js +2 -0
  56. package/dist/chunk-bngyck4v.js +2 -0
  57. package/dist/chunk-brb5zthb.js +1 -0
  58. package/dist/chunk-bx2vf8g7.js +5 -0
  59. package/dist/chunk-c343n0yt.js +2 -0
  60. package/dist/chunk-cdwpqzrw.js +2 -0
  61. package/dist/chunk-cm7bwdk9.js +2 -0
  62. package/dist/chunk-cs5k02gt.js +1 -0
  63. package/dist/chunk-cv8f2v27.js +2 -0
  64. package/dist/chunk-d2dbhn2h.js +2 -0
  65. package/dist/chunk-d3awsfqm.js +9 -0
  66. package/dist/chunk-d9q17hb8.js +2 -0
  67. package/dist/chunk-dw62d69f.js +2 -0
  68. package/dist/chunk-e8p8v7ca.js +978 -0
  69. package/dist/chunk-ehhrhkwe.js +9 -0
  70. package/dist/chunk-enhf12a1.js +2 -0
  71. package/dist/chunk-f0ksrase.js +8 -0
  72. package/dist/chunk-f2d9w3nr.js +2 -0
  73. package/dist/chunk-f3y73e4b.js +6 -0
  74. package/dist/chunk-fe3xb8z9.js +2 -0
  75. package/dist/chunk-fg5gh4dn.js +2 -0
  76. package/dist/chunk-fh4rw8kr.js +5 -0
  77. package/dist/chunk-fxsv4p5c.js +8 -0
  78. package/dist/chunk-gg80s18j.js +2 -0
  79. package/dist/chunk-h5saw32v.js +2 -0
  80. package/dist/chunk-ha75r57f.js +8 -0
  81. package/dist/chunk-hgrs6wcy.js +2 -0
  82. package/dist/chunk-hrsat16n.js +8 -0
  83. package/dist/chunk-hxy5t7tm.js +10 -0
  84. package/dist/chunk-hzfqtj82.js +2 -0
  85. package/dist/chunk-j2n86dsz.js +2 -0
  86. package/dist/chunk-jg68fsnk.js +10 -0
  87. package/dist/chunk-jhvjhf1j.js +2 -0
  88. package/dist/chunk-jr4naxsv.js +2 -0
  89. package/dist/chunk-jtax0mpm.js +2 -0
  90. package/dist/chunk-k59kbbvm.js +2 -0
  91. package/dist/chunk-kanz993c.js +2 -0
  92. package/dist/chunk-kg9abatp.js +2 -0
  93. package/dist/chunk-kvghsjg7.js +5 -0
  94. package/dist/chunk-ky8p46ae.js +5 -0
  95. package/dist/chunk-kzm498bh.js +2 -0
  96. package/dist/chunk-m4gwjnfh.js +6 -0
  97. package/dist/chunk-msv6dcc2.js +2 -0
  98. package/dist/chunk-mxdajhb4.js +10 -0
  99. package/dist/chunk-mxzjn2gs.js +978 -0
  100. package/dist/chunk-n1bqkqk7.js +10 -0
  101. package/dist/chunk-njtyervf.js +1 -0
  102. package/dist/chunk-nx1598yr.js +2 -0
  103. package/dist/chunk-p18kqenr.js +1 -0
  104. package/dist/chunk-p23aswbf.js +2 -0
  105. package/dist/chunk-p55ntqj0.js +2 -0
  106. package/dist/chunk-p5va3trj.js +2 -0
  107. package/dist/chunk-p88bsqtc.js +10 -0
  108. package/dist/chunk-p9z7f8c8.js +2 -0
  109. package/dist/chunk-ppkzf21q.js +8 -0
  110. package/dist/chunk-prqq5zw2.js +2 -0
  111. package/dist/chunk-pv6hp18q.js +10 -0
  112. package/dist/chunk-q9ycfthp.js +2 -0
  113. package/dist/chunk-qhcx6dmf.js +2 -0
  114. package/dist/chunk-qma4ysd8.js +9 -0
  115. package/dist/chunk-qqp394c2.js +2 -0
  116. package/dist/chunk-ra5sfgg4.js +2 -0
  117. package/dist/chunk-rfd43z7p.js +5 -0
  118. package/dist/chunk-s2n3hw0a.js +2 -0
  119. package/dist/chunk-sm7vvfqf.js +2 -0
  120. package/dist/chunk-sqbdav33.js +2 -0
  121. package/dist/chunk-sy4d4hnx.js +2 -0
  122. package/dist/chunk-t0b356bb.js +978 -0
  123. package/dist/chunk-t9wdnzz4.js +6 -0
  124. package/dist/chunk-v25g7h01.js +2 -0
  125. package/dist/chunk-v7zy7xda.js +1 -0
  126. package/dist/chunk-vg4vfkzk.js +6 -0
  127. package/dist/chunk-vgcre8jy.js +2 -0
  128. package/dist/chunk-vqyngnj0.js +9 -0
  129. package/dist/chunk-w17d2rbd.js +6 -0
  130. package/dist/chunk-x22v9kvb.js +2 -0
  131. package/dist/chunk-xacjs4ar.js +6 -0
  132. package/dist/chunk-xmdbxa8w.js +1 -0
  133. package/dist/chunk-xy6hjazn.js +978 -0
  134. package/dist/chunk-y0m35t3m.js +2 -0
  135. package/dist/chunk-y1tre8v8.js +8 -0
  136. package/dist/chunk-y50mc7dt.js +2 -0
  137. package/dist/chunk-y93ke5m6.js +2 -0
  138. package/dist/chunk-yktee4wv.js +1 -0
  139. package/dist/chunk-yvmyw2r2.js +2 -0
  140. package/dist/chunk-z1h35hsa.js +2 -0
  141. package/dist/chunk-z6xydw90.js +2 -0
  142. package/dist/chunk-zak32nab.js +2 -0
  143. package/dist/clean.d.ts +3 -0
  144. package/dist/cli.d.ts +4 -1
  145. package/dist/cli.js +1 -4
  146. package/dist/cloud.d.ts +3 -0
  147. package/dist/commit.d.ts +3 -0
  148. package/dist/configure.d.ts +4 -0
  149. package/dist/create.d.ts +8 -0
  150. package/dist/custom-cli.d.ts +1 -1
  151. package/dist/deploy.d.ts +7 -0
  152. package/dist/{commands/dev.d.ts → dev.d.ts} +3 -1
  153. package/dist/dns.d.ts +18 -0
  154. package/dist/domains.d.ts +3 -0
  155. package/dist/fresh.d.ts +3 -0
  156. package/dist/generate.d.ts +3 -0
  157. package/dist/http.d.ts +6 -0
  158. package/dist/index.d.ts +1 -1
  159. package/dist/index.js +1 -4
  160. package/dist/install.d.ts +3 -0
  161. package/dist/key.d.ts +3 -0
  162. package/dist/lint.d.ts +3 -0
  163. package/dist/list.d.ts +3 -0
  164. package/dist/make.d.ts +1 -0
  165. package/dist/migrate.d.ts +3 -0
  166. package/dist/outdated.d.ts +3 -0
  167. package/dist/ports.d.ts +7 -0
  168. package/dist/prepublish.d.ts +3 -0
  169. package/dist/projects.d.ts +3 -0
  170. package/dist/release.d.ts +9 -0
  171. package/dist/route.d.ts +3 -0
  172. package/dist/saas.d.ts +3 -0
  173. package/dist/seed.d.ts +3 -0
  174. package/dist/setup.d.ts +8 -0
  175. package/dist/stacks +0 -0
  176. package/dist/test.d.ts +3 -0
  177. package/dist/tinker.d.ts +3 -0
  178. package/dist/types.d.ts +3 -0
  179. package/dist/upgrade.d.ts +4 -0
  180. package/dist/version.d.ts +3 -0
  181. package/package.json +48 -49
  182. package/dist/chunk-3cfvbq6w.js +0 -5
  183. package/dist/chunk-3cfvbq6w.js.map +0 -32
  184. package/dist/chunk-3v3h2zkp.js +0 -5
  185. package/dist/chunk-3v3h2zkp.js.map +0 -46
  186. package/dist/chunk-3zx3yk1m.js.map +0 -15
  187. package/dist/chunk-8a487snn.js +0 -5
  188. package/dist/chunk-8a487snn.js.map +0 -9
  189. package/dist/chunk-9kkf5maz.js +0 -5
  190. package/dist/chunk-9kkf5maz.js.map +0 -23
  191. package/dist/chunk-9qba8jdt.js +0 -12
  192. package/dist/chunk-9qba8jdt.js.map +0 -11
  193. package/dist/chunk-cvpb67bs.js +0 -5
  194. package/dist/chunk-cvpb67bs.js.map +0 -10
  195. package/dist/chunk-eqwfdbyk.js +0 -5
  196. package/dist/chunk-eqwfdbyk.js.map +0 -17
  197. package/dist/chunk-f41k7dpa.js +0 -5
  198. package/dist/chunk-f41k7dpa.js.map +0 -11
  199. package/dist/chunk-fx1zxxxa.js +0 -9
  200. package/dist/chunk-fx1zxxxa.js.map +0 -13
  201. package/dist/chunk-get5gzkc.js +0 -11
  202. package/dist/chunk-get5gzkc.js.map +0 -10
  203. package/dist/chunk-m43npkjw.js +0 -5
  204. package/dist/chunk-m43npkjw.js.map +0 -12
  205. package/dist/chunk-mrrgcavv.js +0 -831
  206. package/dist/chunk-mrrgcavv.js.map +0 -240
  207. package/dist/chunk-n5y0mrsg.js +0 -15
  208. package/dist/chunk-n5y0mrsg.js.map +0 -173
  209. package/dist/chunk-qebxvzqz.js +0 -5
  210. package/dist/chunk-qebxvzqz.js.map +0 -26
  211. package/dist/chunk-qj2v5psd.js +0 -5
  212. package/dist/chunk-qj2v5psd.js.map +0 -20
  213. package/dist/chunk-rh4brnzh.js +0 -5
  214. package/dist/chunk-rh4brnzh.js.map +0 -16
  215. package/dist/chunk-w2vwjv6k.js +0 -6
  216. package/dist/chunk-w2vwjv6k.js.map +0 -57
  217. package/dist/chunk-w81rbh65.js +0 -5
  218. package/dist/chunk-w81rbh65.js.map +0 -10
  219. package/dist/chunk-wayp5kn2.js +0 -5
  220. package/dist/chunk-wayp5kn2.js.map +0 -22
  221. package/dist/chunk-x5c5ngpb.js +0 -4
  222. package/dist/chunk-x5c5ngpb.js.map +0 -23
  223. package/dist/cli.js.map +0 -10
  224. package/dist/commands/add.d.ts +0 -2
  225. package/dist/commands/build.d.ts +0 -2
  226. package/dist/commands/changelog.d.ts +0 -2
  227. package/dist/commands/clean.d.ts +0 -2
  228. package/dist/commands/cloud.d.ts +0 -2
  229. package/dist/commands/commit.d.ts +0 -2
  230. package/dist/commands/configure.d.ts +0 -2
  231. package/dist/commands/create.d.ts +0 -2
  232. package/dist/commands/deploy.d.ts +0 -2
  233. package/dist/commands/dns.d.ts +0 -2
  234. package/dist/commands/domains.d.ts +0 -2
  235. package/dist/commands/fresh.d.ts +0 -2
  236. package/dist/commands/generate.d.ts +0 -2
  237. package/dist/commands/http.d.ts +0 -2
  238. package/dist/commands/index.d.ts +0 -33
  239. package/dist/commands/install.d.ts +0 -2
  240. package/dist/commands/key.d.ts +0 -2
  241. package/dist/commands/lint.d.ts +0 -2
  242. package/dist/commands/list.d.ts +0 -2
  243. package/dist/commands/make.d.ts +0 -2
  244. package/dist/commands/migrate.d.ts +0 -2
  245. package/dist/commands/outdated.d.ts +0 -2
  246. package/dist/commands/ports.d.ts +0 -2
  247. package/dist/commands/prepublish.d.ts +0 -2
  248. package/dist/commands/projects.d.ts +0 -2
  249. package/dist/commands/release.d.ts +0 -2
  250. package/dist/commands/route.d.ts +0 -2
  251. package/dist/commands/seed.d.ts +0 -2
  252. package/dist/commands/setup.d.ts +0 -4
  253. package/dist/commands/test.d.ts +0 -2
  254. package/dist/commands/tinker.d.ts +0 -2
  255. package/dist/commands/types.d.ts +0 -2
  256. package/dist/commands/upgrade.d.ts +0 -2
  257. package/dist/commands/version.d.ts +0 -2
  258. package/dist/index.js.map +0 -9
  259. package/src/cli.ts +0 -105
  260. package/src/commands/add.ts +0 -71
  261. package/src/commands/build.ts +0 -299
  262. package/src/commands/changelog.ts +0 -52
  263. package/src/commands/clean.ts +0 -46
  264. package/src/commands/cloud.ts +0 -553
  265. package/src/commands/commit.ts +0 -26
  266. package/src/commands/configure.ts +0 -84
  267. package/src/commands/create.ts +0 -143
  268. package/src/commands/deploy.ts +0 -194
  269. package/src/commands/dev.ts +0 -292
  270. package/src/commands/dns.ts +0 -86
  271. package/src/commands/domains.ts +0 -255
  272. package/src/commands/fresh.ts +0 -48
  273. package/src/commands/generate.ts +0 -202
  274. package/src/commands/http.ts +0 -57
  275. package/src/commands/index.ts +0 -33
  276. package/src/commands/install.ts +0 -30
  277. package/src/commands/key.ts +0 -36
  278. package/src/commands/lint.ts +0 -54
  279. package/src/commands/list.ts +0 -42
  280. package/src/commands/make.ts +0 -352
  281. package/src/commands/migrate.ts +0 -105
  282. package/src/commands/outdated.ts +0 -31
  283. package/src/commands/ports.ts +0 -188
  284. package/src/commands/prepublish.ts +0 -28
  285. package/src/commands/projects.ts +0 -54
  286. package/src/commands/release.ts +0 -47
  287. package/src/commands/route.ts +0 -39
  288. package/src/commands/seed.ts +0 -47
  289. package/src/commands/setup.ts +0 -145
  290. package/src/commands/test.ts +0 -214
  291. package/src/commands/tinker.ts +0 -42
  292. package/src/commands/types.ts +0 -35
  293. package/src/commands/upgrade.ts +0 -200
  294. package/src/commands/version.ts +0 -29
  295. package/src/custom-cli.ts +0 -35
  296. package/src/index.ts +0 -1
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{wa as z,xa as P}from"./chunk-b13gbfg3.js";import"./chunk-8gx9at51.js";import"./chunk-6yazdvb4.js";import{wb as D}from"./chunk-gg80s18j.js";import{xb as _}from"./chunk-d2dbhn2h.js";var m=_(D(),1);import{parse as o}from"url";var K=_(D(),1);import{Buffer as a}from"buffer";import{request as n}from"http";function u(c){return new Promise((I,x)=>{let T=n({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K.ProviderError("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K.ProviderError("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{let{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K.ProviderError("Error response received from instance metadata service"),{statusCode:O})),T.destroy();let E=[];N.on("data",(y)=>{E.push(y)}),N.on("end",()=>{I(a.concat(E)),T.destroy()})}),T.end()})}var G=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",Q=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var uc=1000,Ec=0,X=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var f=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var v="AWS_CONTAINER_CREDENTIALS_FULL_URI",L="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",B="AWS_CONTAINER_AUTHORIZATION_TOKEN",Kc=(c={})=>{let{timeout:I,maxRetries:x}=X(c);return()=>f(async()=>{let T=await d({logger:c.logger}),N=JSON.parse(await s(I,T));if(!G(N))throw new m.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:c.logger});return Q(N)},x)},s=async(c,I)=>{if(process.env[B])I.headers={...I.headers,Authorization:process.env[B]};return(await u({...I,timeout:c})).toString()},g="169.254.170.2",l={localhost:!0,"127.0.0.1":!0},r={"http:":!0,"https:":!0},d=async({logger:c})=>{if(process.env[L])return{hostname:g,path:process.env[L]};if(process.env[v]){let I=o(process.env[v]);if(!I.hostname||!(I.hostname in l))throw new m.CredentialsProviderError(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in r))throw new m.CredentialsProviderError(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new m.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${L} or ${v} environment variable is set`,{tryNextLink:!1,logger:c})};var q=_(D(),1);var U=_(D(),1);class Z extends U.CredentialsProviderError{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Z.prototype)}}var A;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(A||(A={}));var t={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var S;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(S||(S={}));var e="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",i="ec2_metadata_service_endpoint_mode",F={environmentVariableSelector:(c)=>c[e],configFileSelector:(c)=>c[i],default:S.IPv4};var W=async()=>P(await cc()||await Ic()),cc=async()=>z(t)(),Ic=async()=>{let c=await z(F)();switch(c){case S.IPv4:return A.IPv4;case S.IPv6:return A.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(S)}`)}};var b=(c,I)=>{let x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var V=(c,I={})=>{let x=I?.logger||console,T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=b(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=b(T,x);else throw O}return T=N,N}};var k="/latest/meta-data/iam/security-credentials/",Tc="/latest/api/token",H="AWS_EC2_METADATA_V1_DISABLED",R="ec2_metadata_v1_disabled",M="x-aws-ec2-metadata-token",oc=(c={})=>V(Nc(c),{logger:c.logger}),Nc=(c={})=>{let I=!1,{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=X(c),E=async(y,$)=>{if(I||$.headers?.[M]==null){let w=!1,h=!1,C=await z({environmentVariableSelector:(Y)=>{let j=Y[H];if(h=!!j&&j!=="false",j===void 0)throw new q.CredentialsProviderError(`${H} not set in env, checking config file next.`,{logger:c.logger});return h},configFileSelector:(Y)=>{let j=Y[R];return w=!!j&&j!=="false",w},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||C){let Y=[];if(c.ec2MetadataV1Disabled)Y.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(w)Y.push(`config file profile (${R})`);if(h)Y.push(`process environment variable (${H})`);throw new Z(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Y.join(", ")}].`)}}let p=(await f(async()=>{let w;try{w=await Oc($)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)).trim();return f(async()=>{let w;try{w=await yc(p,$,c)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)};return async()=>{let y=await W();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(O,{...y,timeout:N});else{let $;try{$=(await xc({...y,timeout:N})).toString()}catch(J){if(J?.statusCode===400)throw Object.assign(J,{message:"EC2 Metadata token request returned error"});else if(J.message==="TimeoutError"||[403,404,405].includes(J.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(O,{...y,timeout:N})}return E(O,{...y,headers:{[M]:$},timeout:N})}}},xc=async(c)=>u({...c,path:Tc,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Oc=async(c)=>(await u({...c,path:k})).toString(),yc=async(c,I,x)=>{let T=JSON.parse((await u({...I,path:k+c})).toString());if(!G(T))throw new q.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:x.logger});return Q(T)};export{X as providerConfigFromInit,u as httpRequest,W as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,Kc as fromContainerMetadata,A as Endpoint,L as ENV_CMDS_RELATIVE_URI,v as ENV_CMDS_FULL_URI,B as ENV_CMDS_AUTH_TOKEN,uc as DEFAULT_TIMEOUT,Ec as DEFAULT_MAX_RETRIES};
@@ -0,0 +1,8 @@
1
+ import{Eb as X}from"./chunk-p9z7f8c8.js";var M=X((N,T)=>{var{defineProperty:B,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Z}=Object,$=Object.prototype.hasOwnProperty,H=(b,j)=>B(b,"name",{value:j,configurable:!0}),A=(b,j)=>{for(var q in j)B(b,q,{get:j[q],enumerable:!0})},D=(b,j,q,K)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let z of Z(j))if(!$.call(b,z)&&z!==q)B(b,z,{get:()=>j[z],enumerable:!(K=Y(j,z))||K.enumerable})}return b},E=(b)=>D(B({},"__esModule",{value:!0}),b),L={};A(L,{emitWarningIfUnsupportedVersion:()=>I,setCredentialFeature:()=>Q,setFeature:()=>R,state:()=>G});T.exports=E(L);var G={warningEmitted:!1},I=H((b)=>{if(b&&!G.warningEmitted&&parseInt(b.substring(1,b.indexOf(".")))<18)G.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
2
+ no longer support Node.js 16.x on January 6, 2025.
3
+
4
+ To continue receiving updates to AWS services, bug fixes, and security
5
+ updates please upgrade to a supported Node.js LTS version.
6
+
7
+ More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");function Q(b,j,q){if(!b.$source)b.$source={};return b.$source[j]=q,b}H(Q,"setCredentialFeature");function R(b,j,q){if(!b.__aws_sdk_context)b.__aws_sdk_context={features:{}};else if(!b.__aws_sdk_context.features)b.__aws_sdk_context.features={};b.__aws_sdk_context.features[j]=q}H(R,"setFeature")});
8
+ export{M as vb};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{lb as L,rb as M}from"./chunk-xmdbxa8w.js";import"./chunk-ra5sfgg4.js";import{wb as j}from"./chunk-hrsat16n.js";import{Ab as D,yb as O}from"./chunk-yktee4wv.js";import{Db as k}from"./chunk-yvmyw2r2.js";var R=k(j(),1);var G=k(j(),1);var J=(y,w,_)=>{let I={EcsContainer:async(b)=>{let{fromHttp:x}=await import("./chunk-xacjs4ar.js"),{fromContainerMetadata:E}=await import("./chunk-cdwpqzrw.js");return _?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>D(x(b??{}),E(b))().then(C)},Ec2InstanceMetadata:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:x}=await import("./chunk-cdwpqzrw.js");return async()=>x(b)().then(C)},Environment:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:x}=await import("./chunk-jr4naxsv.js");return async()=>x(b)().then(C)}};if(y in I)return I[y];else throw new O(`Unsupported credential source in profile ${w}. Got ${y}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:_})},C=(y)=>G.setCredentialFeature(y,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var T=(y,{profile:w="default",logger:_}={})=>{return Boolean(y)&&typeof y==="object"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1&&["undefined","string"].indexOf(typeof y.external_id)>-1&&["undefined","string"].indexOf(typeof y.mfa_serial)>-1&&(u(y,{profile:w,logger:_})||v(y,{profile:w,logger:_}))},u=(y,{profile:w,logger:_})=>{let I=typeof y.source_profile==="string"&&typeof y.credential_source==="undefined";if(I)_?.debug?.(` ${w} isAssumeRoleWithSourceProfile source_profile=${y.source_profile}`);return I},v=(y,{profile:w,logger:_})=>{let I=typeof y.credential_source==="string"&&typeof y.source_profile==="undefined";if(I)_?.debug?.(` ${w} isCredentialSourceProfile credential_source=${y.credential_source}`);return I},U=async(y,w,_,I={})=>{_.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let b=w[y];if(!_.roleAssumer){let{getDefaultRoleAssumer:K}=await import("./chunk-06g79v9j.js");_.roleAssumer=K({..._.clientConfig,credentialProviderLogger:_.logger,parentClientConfig:_?.parentClientConfig},_.clientPlugins)}let{source_profile:x}=b;if(x&&x in I)throw new O(`Detected a cycle attempting to resolve credentials for profile ${L(_)}. Profiles visited: `+Object.keys(I).join(", "),{logger:_.logger});_.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${x?`source_profile=[${x}]`:`profile=[${y}]`}`);let E=x?A(x,w,_,{...I,[x]:!0},Q(w[x]??{})):(await J(b.credential_source,y,_.logger)(_))();if(Q(b))return E.then((K)=>R.setCredentialFeature(K,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let K={RoleArn:b.role_arn,RoleSessionName:b.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:b.external_id,DurationSeconds:parseInt(b.duration_seconds||"3600",10)},{mfa_serial:B}=b;if(B){if(!_.mfaCodeProvider)throw new O(`Profile ${y} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:_.logger,tryNextLink:!1});K.SerialNumber=B,K.TokenCode=await _.mfaCodeProvider(B)}let h=await E;return _.roleAssumer(h,K).then((m)=>R.setCredentialFeature(m,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},Q=(y)=>{return!y.role_arn&&!!y.credential_source};var V=k(j(),1),W=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.credential_process==="string",X=async(y,w)=>import("./chunk-zak32nab.js").then(({fromProcess:_})=>_({...y,profile:w})().then((I)=>V.setCredentialFeature(I,"CREDENTIALS_PROFILE_PROCESS","v")));var $=k(j(),1),Y=async(y,w,_={})=>{let{fromSSO:I}=await import("./chunk-11vhe2za.js");return I({profile:y,logger:_.logger})().then((b)=>{if(w.sso_session)return $.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO","r");else return $.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},Z=(y)=>y&&(typeof y.sso_start_url==="string"||typeof y.sso_account_id==="string"||typeof y.sso_session==="string"||typeof y.sso_region==="string"||typeof y.sso_role_name==="string");var H=k(j(),1),q=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.aws_access_key_id==="string"&&typeof y.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof y.aws_session_token)>-1&&["undefined","string"].indexOf(typeof y.aws_account_id)>-1,z=async(y,w)=>{w?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let _={accessKeyId:y.aws_access_key_id,secretAccessKey:y.aws_secret_access_key,sessionToken:y.aws_session_token,...y.aws_credential_scope&&{credentialScope:y.aws_credential_scope},...y.aws_account_id&&{accountId:y.aws_account_id}};return H.setCredentialFeature(_,"CREDENTIALS_PROFILE","n")};var c=k(j(),1),S=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.web_identity_token_file==="string"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1,F=async(y,w)=>import("./chunk-sqbdav33.js").then(({fromTokenFile:_})=>_({webIdentityTokenFile:y.web_identity_token_file,roleArn:y.role_arn,roleSessionName:y.role_session_name,roleAssumerWithWebIdentity:w.roleAssumerWithWebIdentity,logger:w.logger,parentClientConfig:w.parentClientConfig})().then((I)=>c.setCredentialFeature(I,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var A=async(y,w,_,I={},b=!1)=>{let x=w[y];if(Object.keys(I).length>0&&q(x))return z(x,_);if(b||T(x,{profile:y,logger:_.logger}))return U(y,w,_,I);if(q(x))return z(x,_);if(S(x))return F(x,_);if(W(x))return X(_,y);if(Z(x))return await Y(y,x,_);throw new O(`Could not resolve credentials using profile: [${y}] in configuration/credentials file(s).`,{logger:_.logger})};var by=(y={})=>async()=>{y.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let w=await M(y);return A(L(y),w,y)};export{by as fromIni};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{kb as N,lb as X,mb as I,pb as R,qb as v}from"./chunk-8gx9at51.js";import"./chunk-6yazdvb4.js";import{vb as ee}from"./chunk-ha75r57f.js";import{wb as h}from"./chunk-gg80s18j.js";import{xb as l}from"./chunk-d2dbhn2h.js";var T=l(h(),1);var K=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var $=l(ee(),1);var u=l(h(),1);var b=300000,_="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var D={},U=async(e)=>{let{SSOOIDCClient:r}=await import("./chunk-sm7vvfqf.js");if(D[e])return D[e];let s=new r({region:e});return D[e]=s,s};var q=async(e,r)=>{let{CreateTokenCommand:s}=await import("./chunk-sm7vvfqf.js");return(await U(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var W=l(h(),1);var P=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new W.TokenProviderError(`Token is expired. ${_}`,!1)};var j=l(h(),1);var p=(e,r,s=!1)=>{if(typeof r==="undefined")throw new j.TokenProviderError(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${_}`,!1)};import{promises as Q}from"fs";var{writeFile:Z}=Q,z=(e,r)=>{let s=X(e),t=JSON.stringify(r,null,2);return Z(s,t)};var J=new Date(0),V=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let r=await v(e),s=N(e),t=r[s];if(!t)throw new u.TokenProviderError(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new u.TokenProviderError(`Profile '${s}' is missing required property 'sso_session'.`);let i=t.sso_session,a=(await R(e))[i];if(!a)throw new u.TokenProviderError(`Sso session '${i}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!a[n])throw new u.TokenProviderError(`Sso session '${i}' is missing required property '${n}'.`,!1);let{sso_start_url:f,sso_region:S}=a,o;try{o=await I(i)}catch(n){throw new u.TokenProviderError(`The SSO session token associated with profile=${s} was not found or is invalid. ${_}`,!1)}p("accessToken",o.accessToken),p("expiresAt",o.expiresAt);let{accessToken:E,expiresAt:x}=o,c={token:E,expiration:new Date(x)};if(c.expiration.getTime()-Date.now()>b)return c;if(Date.now()-J.getTime()<30000)return P(c),c;p("clientId",o.clientId,!0),p("clientSecret",o.clientSecret,!0),p("refreshToken",o.refreshToken,!0);try{J.setTime(Date.now());let n=await q(o,S);p("accessToken",n.accessToken),p("expiresIn",n.expiresIn);let g=new Date(Date.now()+n.expiresIn*1000);try{await z(i,{...o,accessToken:n.accessToken,expiresAt:g.toISOString(),refreshToken:n.refreshToken})}catch(C){}return{token:n.accessToken,expiration:g}}catch(n){return P(c),c}};var k=l(h(),1);var y=!1,F=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:m,clientConfig:a,profile:f,logger:S})=>{let o,E="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{let w=await V({profile:f})();o={accessToken:w.token,expiresAt:new Date(w.expiration).toISOString()}}catch(w){throw new k.CredentialsProviderError(w.message,{tryNextLink:y,logger:S})}else try{o=await I(e)}catch(w){throw new k.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:S})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:S});let{accessToken:x}=o,{SSOClient:c,GetRoleCredentialsCommand:n}=await import("./chunk-2yj4j69j.js"),g=m||new c(Object.assign({},a??{},{region:a?.region??t})),C;try{C=await g.send(new n({accountId:s,roleName:i,accessToken:x}))}catch(w){throw new k.CredentialsProviderError(w,{tryNextLink:y,logger:S})}let{roleCredentials:{accessKeyId:d,secretAccessKey:O,sessionToken:L,expiration:M,credentialScope:G,accountId:H}={}}=C;if(!d||!O||!L||!M)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:y,logger:S});let A={accessKeyId:d,secretAccessKey:O,sessionToken:L,expiration:new Date(M),...G&&{credentialScope:G},...H&&{accountId:H}};if(r)$.setCredentialFeature(A,"CREDENTIALS_SSO","s");else $.setCredentialFeature(A,"CREDENTIALS_SSO_LEGACY","u");return A};var Y=l(h(),1),B=(e,r)=>{let{sso_start_url:s,sso_account_id:t,sso_region:i,sso_role_name:m}=e;if(!s||!t||!i||!m)throw new Y.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Ie=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoSession:m}=e,{ssoClient:a}=e,f=N(e);if(!r&&!s&&!t&&!i&&!m){let o=(await v(e))[f];if(!o)throw new T.CredentialsProviderError(`Profile ${f} was not found.`,{logger:e.logger});if(!K(o))throw new T.CredentialsProviderError(`Profile ${f} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){let d=(await R(e))[o.sso_session],O=` configurations in profile ${f} and sso-session ${o.sso_session}`;if(t&&t!==d.sso_region)throw new T.CredentialsProviderError("Conflicting SSO region"+O,{tryNextLink:!1,logger:e.logger});if(r&&r!==d.sso_start_url)throw new T.CredentialsProviderError("Conflicting SSO start_url"+O,{tryNextLink:!1,logger:e.logger});o.sso_region=d.sso_region,o.sso_start_url=d.sso_start_url}let{sso_start_url:E,sso_account_id:x,sso_region:c,sso_role_name:n,sso_session:g}=B(o,e.logger);return F({ssoStartUrl:E,ssoSession:g,ssoAccountId:x,ssoRegion:c,ssoRoleName:n,ssoClient:a,clientConfig:e.clientConfig,profile:f})}else if(!r||!s||!t||!i)throw new T.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return F({ssoStartUrl:r,ssoSession:m,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:a,clientConfig:e.clientConfig,profile:f})};export{B as validateSsoProfile,K as isSsoProfile,Ie as fromSSO};
@@ -0,0 +1 @@
1
+ class n extends Error{constructor(t,e=!0){let o,r=!0;if(typeof e==="boolean")o=void 0,r=e;else if(e!=null&&typeof e==="object")o=e.logger,r=e.tryNextLink??!0;super(t);this.name="ProviderError",this.tryNextLink=r,Object.setPrototypeOf(this,n.prototype),o?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${t}`)}static from(t,e=!0){return Object.assign(new this(t.message,e),t)}}class u extends n{constructor(t,e=!0){super(t,e);this.name="CredentialsProviderError",Object.setPrototypeOf(this,u.prototype)}}class l extends n{constructor(t,e=!0){super(t,e);this.name="TokenProviderError",Object.setPrototypeOf(this,l.prototype)}}var v=(...t)=>async()=>{if(t.length===0)throw new n("No providers in chain");let e;for(let o of t)try{return await o()}catch(r){if(e=r,r?.tryNextLink)continue;throw r}throw e};var w=(t)=>()=>Promise.resolve(t);var b=(t,e,o)=>{let r,i,s,f=!1,a=async()=>{if(!i)i=t();try{r=await i,s=!0,f=!1}finally{i=void 0}return r};if(e===void 0)return async(c)=>{if(!s||c?.forceRefresh)r=await a();return r};return async(c)=>{if(!s||c?.forceRefresh)r=await a();if(f)return r;if(o&&!o(r))return f=!0,r;if(e(r))return await a(),r;return r}};export{n as xb,u as yb,l as zb,v as Ab,w as Bb,b as Cb};
@@ -0,0 +1,2 @@
1
+ var j=Object.create;var{getPrototypeOf:k,defineProperty:e,getOwnPropertyNames:h,getOwnPropertyDescriptor:l}=Object,i=Object.prototype.hasOwnProperty;var m=(a,b,c)=>{c=a!=null?j(k(a)):{};let d=b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c;for(let f of h(a))if(!i.call(d,f))e(d,f,{get:()=>a[f],enumerable:!0});return d},g=new WeakMap,n=(a)=>{var b=g.get(a),c;if(b)return b;if(b=e({},"__esModule",{value:!0}),a&&typeof a==="object"||typeof a==="function")h(a).map((d)=>!i.call(b,d)&&e(b,d,{get:()=>a[d],enumerable:!(c=l(a,d))||c.enumerable}));return g.set(a,b),b},o=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var p=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0,configurable:!0,set:(d)=>b[c]=()=>d})};var q=(a,b)=>()=>(a&&(b=a(a=0)),b);
2
+ export{m as Db,n as Eb,o as Fb,p as Gb,q as Hb};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{wa as z,xa as B}from"./chunk-p55ntqj0.js";import"./chunk-njtyervf.js";import"./chunk-avdharmq.js";import{wb as K,xb as y}from"./chunk-v7zy7xda.js";import"./chunk-p9z7f8c8.js";import{parse as p}from"url";import{Buffer as M}from"buffer";import{request as k}from"http";function E(c){return new Promise((I,x)=>{let T=k({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{let{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K("Error response received from instance metadata service"),{statusCode:O})),T.destroy();let $=[];N.on("data",(w)=>{$.push(w)}),N.on("end",()=>{I(M.concat($)),T.destroy()})}),T.end()})}var _=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",D=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var hc=1000,Yc=0,G=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var X="AWS_CONTAINER_CREDENTIALS_FULL_URI",Z="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="AWS_CONTAINER_AUTHORIZATION_TOKEN",mc=(c={})=>{let{timeout:I,maxRetries:x}=G(c);return()=>m(async()=>{let T=await s({logger:c.logger}),N=JSON.parse(await C(I,T));if(!_(N))throw new y("Invalid response received from instance metadata service.",{logger:c.logger});return D(N)},x)},C=async(c,I)=>{if(process.env[b])I.headers={...I.headers,Authorization:process.env[b]};return(await E({...I,timeout:c})).toString()},a="169.254.170.2",n={localhost:!0,"127.0.0.1":!0},o={"http:":!0,"https:":!0},s=async({logger:c})=>{if(process.env[Z])return{hostname:a,path:process.env[Z]};if(process.env[X]){let I=p(process.env[X]);if(!I.hostname||!(I.hostname in n))throw new y(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in o))throw new y(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new y(`The container metadata credential provider cannot be used unless the ${Z} or ${X} environment variable is set`,{tryNextLink:!1,logger:c})};class Q extends y{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Q.prototype)}}var J;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(J||(J={}));var H={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var u;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(u||(u={}));var g="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",l="ec2_metadata_service_endpoint_mode",q={environmentVariableSelector:(c)=>c[g],configFileSelector:(c)=>c[l],default:u.IPv4};var v=async()=>B(await r()||await d()),r=async()=>z(H)(),d=async()=>{let c=await z(q)();switch(c){case u.IPv4:return J.IPv4;case u.IPv6:return J.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(u)}`)}};var L=(c,I)=>{let x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var U=(c,I={})=>{let x=I?.logger||console,T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var P="/latest/meta-data/iam/security-credentials/",e="/latest/api/token",W="AWS_EC2_METADATA_V1_DISABLED",t="ec2_metadata_v1_disabled",F="x-aws-ec2-metadata-token",oc=(c={})=>U(i(c),{logger:c.logger}),i=(c={})=>{let I=!1,{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=G(c),$=async(w,j)=>{if(I||j.headers?.[F]==null){let h=!1,Y=!1,R=await z({environmentVariableSelector:(S)=>{let A=S[W];if(Y=!!A&&A!=="false",A===void 0)throw new y(`${W} not set in env, checking config file next.`,{logger:c.logger});return Y},configFileSelector:(S)=>{let A=S[t];return h=!!A&&A!=="false",h},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||R){let S=[];if(c.ec2MetadataV1Disabled)S.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(h)S.push(`config file profile (${t})`);if(Y)S.push(`process environment variable (${W})`);throw new Q(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${S.join(", ")}].`)}}let V=(await m(async()=>{let h;try{h=await Ic(j)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)).trim();return m(async()=>{let h;try{h=await Tc(V,j,c)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)};return async()=>{let w=await v();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(O,{...w,timeout:N});else{let j;try{j=(await cc({...w,timeout:N})).toString()}catch(f){if(f?.statusCode===400)throw Object.assign(f,{message:"EC2 Metadata token request returned error"});else if(f.message==="TimeoutError"||[403,404,405].includes(f.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(O,{...w,timeout:N})}return $(O,{...w,headers:{[F]:j},timeout:N})}}},cc=async(c)=>E({...c,path:e,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Ic=async(c)=>(await E({...c,path:P})).toString(),Tc=async(c,I,x)=>{let T=JSON.parse((await E({...I,path:P+c})).toString());if(!_(T))throw new y("Invalid response received from instance metadata service.",{logger:x.logger});return D(T)};export{G as providerConfigFromInit,E as httpRequest,v as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,mc as fromContainerMetadata,J as Endpoint,Z as ENV_CMDS_RELATIVE_URI,X as ENV_CMDS_FULL_URI,b as ENV_CMDS_AUTH_TOKEN,hc as DEFAULT_TIMEOUT,Yc as DEFAULT_MAX_RETRIES};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$ as pe,M as Le,N as Me,O as We,P as Ae,Q as ys,R as F,S as Ke,T as V,U as O,V as N,W as f,X as x,Y as Qe,Z as ie,_ as le,aa as ye,ba as Xe,ca as Ye,da as ds,ea as ns,fa as Ze,ga as me,ha as he,ia as Te,ja as ue,ka as He,la as ke,ma as Re,na as te,oa as re,pa as Ee,qa as qe,ra as ae,sa as de,ta as Se,ua as Ie,va as Pe}from"./chunk-p88bsqtc.js";import{wa as l,xa as ee}from"./chunk-p55ntqj0.js";import{$a as $e,Ja as je,Ka as os,La as R,Pa as D,Qa as fe,Ra as h,Va as Ve,Wa as u,Xa as ge,Ya as we,Za as be,ab as Je,cb as es,db as se,eb as i,fb as y,gb as ss,hb as xe,ib as ve,ya as Ue,za as _e}from"./chunk-ky8p46ae.js";import"./chunk-njtyervf.js";import"./chunk-avdharmq.js";import"./chunk-y1tre8v8.js";import"./chunk-v7zy7xda.js";import{Cb as c}from"./chunk-p9z7f8c8.js";var p=c(F(),1);var _=c(x(),1),v=c(ys(),1),$=async(e,s,t)=>{return{operation:v.getSmithyContext(s).operation,region:await v.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function ms(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}}function b(e){return{schemeId:"smithy.api#noAuth"}}var J=(e)=>{let s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(ms(e))}return s},I=(e)=>{return{..._.resolveAwsSdkSigV4Config(e)}};var P=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},C={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var L={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.679.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},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.679.0","@aws-sdk/middleware-host-header":"3.679.0","@aws-sdk/middleware-logger":"3.679.0","@aws-sdk/middleware-recursion-detection":"3.679.0","@aws-sdk/middleware-user-agent":"3.679.0","@aws-sdk/region-config-resolver":"3.679.0","@aws-sdk/types":"3.679.0","@aws-sdk/util-endpoints":"3.679.0","@aws-sdk/util-user-agent-browser":"3.679.0","@aws-sdk/util-user-agent-node":"3.679.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"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-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var ze=c(x(),1);var ne=c(x(),1),oe=c(F(),1);var M={["required"]:!1,type:"String"},W={["required"]:!0,default:!1,type:"Boolean"},A={["ref"]:"Endpoint"},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},j={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},n={},K={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},H={["ref"]:"PartitionResult"},Q={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[H,"supportsDualStack"]}]},X=[T],Y=[j],Z=[{["ref"]:"Region"}],us={version:"1.0",parameters:{Region:M,UseDualStack:W,UseFIPS:W,Endpoint:M},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[A]}],rules:[{conditions:X,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Y,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:A,properties:n,headers:n},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:Z}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:Z,assign:"PartitionResult"}],rules:[{conditions:[T,j],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,K]},Q],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:X,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[K,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[H,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:n,headers:n},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[Q],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},G=us;var ws=new V({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),g=(e,s={})=>{return ws.get(e,()=>N(G,{endpointParams:e,logger:s.logger}))};O.aws=f;var ce=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ae,base64Encoder:e?.base64Encoder??de,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??g,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??J,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new ne.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new oe.NoAuthSigner}],logger:e?.logger??new se,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??ee,utf8Decoder:e?.utf8Decoder??te,utf8Encoder:e?.utf8Encoder??re}};var De=(e)=>{be(process.version);let s=Se(e),t=()=>s().then(we),r=ce(e);return ze.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??qe,defaultUserAgentProvider:e?.defaultUserAgentProvider??ke({serviceId:r.serviceId,clientVersion:L.version}),maxAttempts:e?.maxAttempts??l(he),region:e?.region??l(pe,ye),requestHandler:xe.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...ue,default:async()=>(await t()).retryMode||me}),sha256:e?.sha256??Ee.bind(null,"sha256"),streamCollector:e?.streamCollector??ve,useDualstackEndpoint:e?.useDualstackEndpoint??l(ie),useFipsEndpoint:e?.useFipsEndpoint??l(le),userAgentAppId:e?.userAgentAppId??l(Re)}};var Be=(e)=>{let{httpAuthSchemes:s,httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){let d=s.findIndex((B)=>B.schemeId===a.schemeId);if(d===-1)s.push(a);else s.splice(d,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},Fe=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var k=(e)=>e,Ce=(e,s)=>{let t={...k(Ie(e)),...k($e(e)),...k(Ue(e)),...k(Be(e))};return s.forEach((r)=>r.configure(t)),{...e,...Pe(t),...Je(t),..._e(t),...Fe(t)}};class Ge extends je{constructor(...[e]){let s=De(e||{}),t=P(s),r=Ke(t),a=Te(r),d=Xe(a),B=Le(d),is=Ze(B),ls=I(is),U=Ce(ls,e?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Qe(this.config)),this.middlewareStack.use(He(this.config)),this.middlewareStack.use(Ye(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:$,identityProviderConfigProvider:async(ps)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":ps.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class o extends Ve{constructor(e){super(e);Object.setPrototypeOf(this,o.prototype)}}class E extends o{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class q extends o{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class S extends o{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}class z extends o{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,z.prototype)}}var Oe=(e)=>({...e,...e.accessToken&&{accessToken:R}}),bs=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:R},...e.sessionToken&&{sessionToken:R}}),Ne=(e)=>({...e,...e.roleCredentials&&{roleCredentials:bs(e.roleCredentials)}});var m=c(x(),1),ts=c(F(),1);var rs=async(e,s)=>{let t=ts.requestBuilder(e,s),r=i({},es,{[Us]:e[zs]});t.bp("/federation/credentials");let a=i({[Fs]:[,D(e[Bs],"roleName")],[Ds]:[,D(e[Ss],"accountId")]}),d;return t.m("GET").h(r).q(a).b(d),t.build()};var as=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return xs(e,s);let t=i({$metadata:w(e)}),r=D(fe(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:ss});return Object.assign(t,a),t};var xs=async(e,s)=>{let t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await ks(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await Rs(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Es(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await qs(t,s);default:let a=t.body;return vs({output:e,parsedBody:a,errorCode:r})}},vs=ge(o),ks=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new E({$metadata:w(e),...t});return u(d,e.body)},Rs=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new q({$metadata:w(e),...t});return u(d,e.body)},Es=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new S({$metadata:w(e),...t});return u(d,e.body)},qs=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new z({$metadata:w(e),...t});return u(d,e.body)},w=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var Ss="accountId",zs="accessToken",Ds="account_id";var Bs="roleName",Fs="role_name",Us="x-amz-sso_bearer_token";class cs extends os.classBuilder().ep(C).m(function(e,s,t,r){return[ds(t,this.serialize,this.deserialize),ns(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Oe,Ne).ser(rs).de(as).build(){}export{Ge as SSOClient,cs as GetRoleCredentialsCommand};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{lb as _,rb as A}from"./chunk-xmdbxa8w.js";import"./chunk-ra5sfgg4.js";import{wb as K}from"./chunk-hrsat16n.js";import{yb as o}from"./chunk-yktee4wv.js";import{Db as E}from"./chunk-yvmyw2r2.js";import{exec as T}from"child_process";import{promisify as y}from"util";var w=E(K(),1),S=(c,n,e)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){let i=new Date;if(new Date(n.Expiration)<i)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let s=n.AccountId;if(!s&&e?.[c]?.aws_account_id)s=e[c].aws_account_id;let t={accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...s&&{accountId:s}};return w.setCredentialFeature(t,"CREDENTIALS_PROCESS","w"),t};var x=async(c,n,e)=>{let s=n[c];if(n[c]){let t=s.credential_process;if(t!==void 0){let i=y(T);try{let{stdout:r}=await i(t),u;try{u=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return S(c,u,n)}catch(r){throw new o(r.message,{logger:e})}}else throw new o(`Profile ${c} did not contain credential_process.`,{logger:e})}else throw new o(`Profile ${c} could not be found in shared credentials file.`,{logger:e})};var R=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let n=await A(c);return x(_(c),n,c.logger)};export{R as fromProcess};
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function clean(buddy: CLI): void;
package/dist/cli.d.ts CHANGED
@@ -1 +1,4 @@
1
- export {};
1
+ import type { CAC } from '@stacksjs/cli';
2
+
3
+ declare function main(): void;
4
+ declare function dynamicImports(buddy: CAC): void;
package/dist/cli.js CHANGED
@@ -1,5 +1,2 @@
1
1
  // @bun
2
- import{A as f,B as j,C as J,F as I,G as g,I as p,J as a,a as M,b as N,c as O,d as Q,e as R,f as S,h as T,i as U,k as V,l as W,m as X,n as Y,o as Z,p as _,q as $,r as x,s as z,t as C,u as F,v as P,w as h,x as A,y as D,z as k}from"./chunk-mrrgcavv.js";import"./chunk-9qba8jdt.js";import"./chunk-n5y0mrsg.js";import"./chunk-rh4brnzh.js";import"./chunk-w2vwjv6k.js";import"./chunk-x5c5ngpb.js";import"./chunk-w81rbh65.js";import"./chunk-cvpb67bs.js";import"./chunk-get5gzkc.js";import"./chunk-3zx3yk1m.js";import"./chunk-8a487snn.js";import w from"process";import{runAction as m}from"@stacksjs/actions";import{cli as n,log as v}from"@stacksjs/cli";import{Action as l}from"@stacksjs/enums";import{path as L}from"@stacksjs/path";import{fs as i}from"@stacksjs/storage";import{ensureProjectIsInitialized as c}from"@stacksjs/utils";async function t(){const q=n("buddy");if(J(q),$(q),await c())v.debug("Project is initialized");else{v.info("Your `APP_KEY` is not yet set"),v.info("Generating application key...");const B=await m(l.KeyGenerate);if(B.isErr())v.error("Failed to set random application key.",B.error),w.exit()}M(q),N(q),O(q),Q(q),R(q),S(q),U(q),W(q),T(q),V(q),h(q),D(q),X(q),Y(q),Z(q),_(q),x(q),z(q),C(q),F(q),P(q),k(q),f(q),j(q),J(q),I(q),g(q),a(q),A(q),p(q),await e(q),q.help(),q.parse()}async function e(q){const G=L.appPath("Commands"),B=i.readdirSync(G).filter((E)=>E.endsWith(".ts"));for(let E of B){const H=await import(`${G}/${E}`);if(typeof H.default==="function")H.default(q);else console.error(`Expected a default export function in ${E}, but got:`,H.default)}const K=await import(L.listenersPath("Console.ts"));if(typeof K.default==="function")K.default(q)}w.on("uncaughtException",(q)=>{v.debug("Buddy uncaughtException"),v.error(q),w.exit(1)});w.on("unhandledRejection",(q)=>{v.debug("Buddy unhandledRejection"),v.error(q),w.exit(1)});await t();
3
-
4
- //# debugId=D6C317F38B22716E64756E2164756E21
5
- //# sourceMappingURL=cli.js.map
2
+ import{A as f,B as j,C as I,D as J,G as g,H as p,J as a,K as m,a as M,b as N,c as O,d as Q,e as R,f as S,h as T,i as U,k as V,l as W,m as X,n as Y,o as Z,p as _,q as $,r as x,s as z,t as C,u as F,v as P,w as h,x as A,y as D,z as k}from"./chunk-3vjfkr7v.js";import"./chunk-d3awsfqm.js";import"./chunk-pv6hp18q.js";import"./chunk-b3wr7cpk.js";import"./chunk-9bxh78vd.js";import"./chunk-xmdbxa8w.js";import"./chunk-ra5sfgg4.js";import"./chunk-jr4naxsv.js";import"./chunk-hrsat16n.js";import"./chunk-yktee4wv.js";import"./chunk-yvmyw2r2.js";import w from"process";import{runAction as n}from"@stacksjs/actions";import{cli as l,log as v}from"@stacksjs/cli";import{Action as i}from"@stacksjs/enums";import{path as L}from"@stacksjs/path";import{fs as c}from"@stacksjs/storage";import{ensureProjectIsInitialized as t}from"@stacksjs/utils";w.on("uncaughtException",(q)=>{v.debug("Buddy uncaughtException"),v.error(q),w.exit(1)});w.on("unhandledRejection",(q)=>{v.debug("Buddy unhandledRejection"),v.error(q),w.exit(1)});async function e(){let q=l("buddy");if(J(q),$(q),await t())v.debug("Project is initialized");else{v.info("Your `APP_KEY` is not yet set"),v.info("Generating application key...");let B=await n(i.KeyGenerate);if(B.isErr())v.error("Failed to set random application key.",B.error),w.exit()}M(q),N(q),O(q),Q(q),R(q),S(q),U(q),W(q),T(q),V(q),h(q),D(q),X(q),Y(q),Z(q),_(q),x(q),z(q),C(q),F(q),P(q),k(q),f(q),j(q),I(q),J(q),g(q),p(q),m(q),A(q),a(q),await o(q),q.help(),q.parse()}await e();async function o(q){let G=L.appPath("Commands"),B=c.readdirSync(G).filter((E)=>E.endsWith(".ts"));for(let E of B){let H=await import(`${G}/${E}`);if(typeof H.default==="function")H.default(q);else console.error(`Expected a default export function in ${E}, but got:`,H.default)}let K=await import(L.listenersPath("Console.ts"));if(typeof K.default==="function")K.default(q)}
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function cloud(buddy: CLI): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function commit(buddy: CLI): void;
@@ -0,0 +1,4 @@
1
+ import type { CLI, ConfigureOptions } from '@stacksjs/types';
2
+
3
+ export declare function configure(buddy: CLI): void;
4
+ declare function configureAws(options?: ConfigureOptions): void;
@@ -0,0 +1,8 @@
1
+ import type { CreateOptions } from '@stacksjs/types';
2
+
3
+ declare function s:(): void;
4
+ declare function isFolderCheck(path: string): void;
5
+ declare function onlineCheck(): void;
6
+ declare function download(name: string, path: string, options: CreateOptions): void;
7
+ declare function ensureEnv(path: string, options: CreateOptions): void;
8
+ declare function install(path: string, options: CreateOptions): void;
@@ -1 +1 @@
1
- export {};
1
+ declare function main(): void;
@@ -0,0 +1,7 @@
1
+ import type { CLI, DeployOptions } from '@stacksjs/types';
2
+
3
+ export declare function deploy(buddy: CLI): void;
4
+ declare function confirmProductionDeployment(): void;
5
+ declare function configureDomain(domain: string, options: DeployOptions, startTime: number): void;
6
+ declare function checkIfAwsIsConfigured(): void;
7
+ declare function checkIfAwsIsBootstrapped(): void;
@@ -1,3 +1,5 @@
1
- import type { CLI, DevOptions } from "@stacksjs/types";
1
+ import type { CLI, DevOptions } from '@stacksjs/types';
2
+
2
3
  export declare function dev(buddy: CLI): void;
3
4
  export declare function startDevelopmentServer(options: DevOptions): Promise<void>;
5
+ declare function wantsInteractive(options: DevOptions): void;
package/dist/dns.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ declare interface DnsOptions {
4
+ query?: string
5
+ type?: string
6
+ nameserver?: string
7
+ class?: string
8
+ udp?: boolean
9
+ tcp?: boolean
10
+ tls?: boolean
11
+ https?: boolean
12
+ short?: boolean
13
+ json?: boolean
14
+ pretty?: boolean
15
+ p?: boolean
16
+ verbose?: boolean
17
+ }
18
+ export declare function dns(buddy: CLI): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function domains(buddy: CLI): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function fresh(buddy: CLI): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function generate(buddy: CLI): void;
package/dist/http.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ declare interface HttpOptions {
4
+ verbose?: boolean
5
+ }
6
+ export declare function http(buddy: CLI): void;
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./commands";
1
+ export * from './commands'
package/dist/index.js CHANGED
@@ -1,5 +1,2 @@
1
1
  // @bun
2
- import{A as C,B as D,C as E,D as F,E as G,F as H,G as I,H as J,I as K,J as L,a as e,b as f,c as m,d as p,e as t,f as x,g as a,h as b,i as c,j as d,k as g,l as h,m as i,n as j,o as k,p as l,q as n,r as q,s,t as u,u as v,v as w,w as y,x as z,y as A,z as B}from"./chunk-mrrgcavv.js";import"./chunk-9qba8jdt.js";import"./chunk-n5y0mrsg.js";import"./chunk-rh4brnzh.js";import"./chunk-w2vwjv6k.js";import"./chunk-x5c5ngpb.js";import"./chunk-w81rbh65.js";import"./chunk-cvpb67bs.js";import"./chunk-get5gzkc.js";import"./chunk-3zx3yk1m.js";import"./chunk-8a487snn.js";export{L as version,K as upgrade,J as types,I as tinker,H as test,d as startDevelopmentServer,E as setup,D as seed,C as route,B as release,A as projects,z as prepublish,y as ports,w as outdated,F as optimizePkgxDeps,v as migrate,u as make,s as list,q as lint,n as key,l as install,k as http,j as generate,i as fresh,G as ensureEnvIsSet,h as domains,g as dns,c as dev,b as deploy,a as create,x as configure,t as commit,p as cloud,m as clean,f as changelog,e as build};
3
-
4
- //# debugId=82A1EEF47F56914E64756E2164756E21
5
- //# sourceMappingURL=index.js.map
2
+ import{A as C,B as D,C as E,D as F,E as G,F as H,G as I,H as J,I as K,J as L,K as M,a as e,b as f,c as m,d as p,e as t,f as x,g as a,h as b,i as c,j as d,k as g,l as h,m as i,n as j,o as k,p as l,q as n,r as q,s,t as u,u as v,v as w,w as y,x as z,y as A,z as B}from"./chunk-3vjfkr7v.js";import"./chunk-d3awsfqm.js";import"./chunk-pv6hp18q.js";import"./chunk-b3wr7cpk.js";import"./chunk-9bxh78vd.js";import"./chunk-xmdbxa8w.js";import"./chunk-ra5sfgg4.js";import"./chunk-jr4naxsv.js";import"./chunk-hrsat16n.js";import"./chunk-yktee4wv.js";import"./chunk-yvmyw2r2.js";export{M as version,L as upgrade,K as types,J as tinker,I as test,d as startDevelopmentServer,F as setup,E as seed,D as saas,C as route,B as release,A as projects,z as prepublish,y as ports,w as outdated,G as optimizePkgxDeps,v as migrate,u as make,s as list,q as lint,n as key,l as install,k as http,j as generate,i as fresh,H as ensureEnvIsSet,h as domains,g as dns,c as dev,b as deploy,a as create,x as configure,t as commit,p as cloud,m as clean,f as changelog,e as build};
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function install(buddy: CLI): void;
package/dist/key.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function key(buddy: CLI): void;
package/dist/lint.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function lint(buddy: CLI): void;
package/dist/list.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function list(buddy: CLI): void;
package/dist/make.d.ts ADDED
@@ -0,0 +1 @@
1
+ declare function :(): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function migrate(buddy: CLI): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function outdated(buddy: CLI): void;
@@ -0,0 +1,7 @@
1
+ import type { CLI, Ports, PortsOptions } from '@stacksjs/types';
2
+ import { ports as projectPorts } from '@stacksjs/config';
3
+
4
+ export declare function ports(buddy: CLI): void;
5
+ declare function getPortsForProjectPath(path: string, options: PortsOptions): void;
6
+ declare const ports: unknown;
7
+ declare function outputPorts(ports: Ports, options: PortsOptions): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function prepublish(buddy: CLI): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function projects(buddy: CLI): void;
@@ -0,0 +1,9 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ declare const descriptions: {
4
+ release: 'Release a new version of your libraries/packages';
5
+ project: 'Target a specific project';
6
+ dryRun: 'Run the release without actually releasing';
7
+ verbose: 'Enable verbose output'
8
+ };
9
+ export declare function release(buddy: CLI): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function route(buddy: CLI): void;
package/dist/saas.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function saas(buddy: CLI): void;
package/dist/seed.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function seed(buddy: CLI): void;
@@ -0,0 +1,8 @@
1
+ import type { CLI, CliOptions } from '@stacksjs/types';
2
+
3
+ export declare function setup(buddy: CLI): void;
4
+ declare function isPkgxInstalled(): Promise<boolean>;
5
+ declare function installPkgx(): Promise<void>;
6
+ declare function initializeProject(options: CliOptions): Promise<void>;
7
+ export declare function optimizePkgxDeps(): Promise<void>;
8
+ export declare function ensureEnvIsSet(options: CliOptions): Promise<void>;
package/dist/stacks CHANGED
Binary file
package/dist/test.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function test(buddy: CLI): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function tinker(buddy: CLI): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function types(buddy: CLI): void;
@@ -0,0 +1,4 @@
1
+ import type { CLI, UpgradeOptions } from '@stacksjs/types';
2
+
3
+ export declare function upgrade(buddy: CLI): void;
4
+ declare function hasNoOptions(options: UpgradeOptions): void;
@@ -0,0 +1,3 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+
3
+ export declare function version(buddy: CLI): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/buddy",
3
3
  "type": "module",
4
- "version": "0.66.0",
4
+ "version": "0.68.0",
5
5
  "description": "Meet Buddy. The Stacks runtime.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": ["Chris Breuer <chris@stacksjs.org>"],
@@ -38,12 +38,11 @@
38
38
  ],
39
39
  "exports": {
40
40
  ".": {
41
- "bun": "./src/index.ts"
41
+ "import": "./dist/index.js"
42
42
  },
43
43
  "./cli": {
44
- "bun": "./src/cli.ts",
45
44
  "types": "./dist/cli.d.ts",
46
- "import": "./dist/cli.mjs"
45
+ "import": "./dist/cli.js"
47
46
  },
48
47
  "./*": {
49
48
  "bun": "./*"
@@ -57,7 +56,7 @@
57
56
  "buddy": "dist/cli.mjs",
58
57
  "bud": "dist/cli.mjs"
59
58
  },
60
- "files": ["README.md", "dist", "src"],
59
+ "files": ["README.md", "dist"],
61
60
  "scripts": {
62
61
  "buddy": "bunx --bun ./src/cli.ts",
63
62
  "build": "bun build.ts && bun run compile",
@@ -73,52 +72,52 @@
73
72
  "prepublishOnly": "bun run build"
74
73
  },
75
74
  "dependencies": {
76
- "@stacksjs/actions": "0.65.1",
77
- "@stacksjs/ai": "0.65.1",
78
- "@stacksjs/alias": "0.65.1",
79
- "@stacksjs/arrays": "0.65.1",
80
- "@stacksjs/auth": "0.65.1",
81
- "@stacksjs/build": "0.65.1",
82
- "@stacksjs/cache": "0.65.1",
83
- "@stacksjs/cli": "0.65.1",
84
- "@stacksjs/cloud": "0.65.1",
85
- "@stacksjs/collections": "0.65.1",
86
- "@stacksjs/config": "0.65.1",
87
- "@stacksjs/database": "0.65.1",
88
- "@stacksjs/desktop": "0.65.1",
89
- "@stacksjs/development": "0.65.1",
90
- "@stacksjs/dns": "0.65.1",
91
- "@stacksjs/docs": "0.65.1",
92
- "@stacksjs/email": "0.65.1",
93
- "@stacksjs/enums": "0.65.1",
94
- "@stacksjs/error-handling": "0.65.1",
95
- "@stacksjs/events": "0.65.1",
96
- "@stacksjs/faker": "0.65.1",
97
- "@stacksjs/git": "0.65.1",
98
- "@stacksjs/health": "0.65.1",
99
- "@stacksjs/lint": "0.65.1",
100
- "@stacksjs/logging": "0.65.1",
101
- "@stacksjs/notifications": "0.65.1",
102
- "@stacksjs/objects": "0.65.1",
103
- "@stacksjs/orm": "0.65.1",
104
- "@stacksjs/path": "0.65.1",
105
- "@stacksjs/payments": "0.65.1",
106
- "@stacksjs/realtime": "0.65.1",
107
- "@stacksjs/router": "0.65.1",
108
- "@stacksjs/search-engine": "0.65.1",
109
- "@stacksjs/security": "0.65.1",
110
- "@stacksjs/server": "0.65.1",
111
- "@stacksjs/storage": "0.65.1",
112
- "@stacksjs/strings": "0.65.1",
113
- "@stacksjs/testing": "0.65.1",
114
- "@stacksjs/tunnel": "0.65.1",
115
- "@stacksjs/types": "0.65.1",
116
- "@stacksjs/ui": "0.65.1",
117
- "@stacksjs/utils": "0.65.1",
118
- "@stacksjs/validation": "0.65.1"
75
+ "@stacksjs/actions": "0.67.0",
76
+ "@stacksjs/ai": "0.67.0",
77
+ "@stacksjs/alias": "0.67.0",
78
+ "@stacksjs/arrays": "0.67.0",
79
+ "@stacksjs/auth": "0.67.0",
80
+ "@stacksjs/build": "0.67.0",
81
+ "@stacksjs/cache": "0.67.0",
82
+ "@stacksjs/cli": "0.67.0",
83
+ "@stacksjs/cloud": "0.67.0",
84
+ "@stacksjs/collections": "0.67.0",
85
+ "@stacksjs/config": "0.67.0",
86
+ "@stacksjs/database": "0.67.0",
87
+ "@stacksjs/desktop": "0.67.0",
88
+ "@stacksjs/development": "0.67.0",
89
+ "@stacksjs/dns": "0.67.0",
90
+ "@stacksjs/docs": "0.67.0",
91
+ "@stacksjs/email": "0.67.0",
92
+ "@stacksjs/enums": "0.67.0",
93
+ "@stacksjs/error-handling": "0.67.0",
94
+ "@stacksjs/events": "0.67.0",
95
+ "@stacksjs/faker": "0.67.0",
96
+ "@stacksjs/git": "0.67.0",
97
+ "@stacksjs/health": "0.67.0",
98
+ "@stacksjs/lint": "0.67.0",
99
+ "@stacksjs/logging": "0.67.0",
100
+ "@stacksjs/notifications": "0.67.0",
101
+ "@stacksjs/objects": "0.67.0",
102
+ "@stacksjs/orm": "0.67.0",
103
+ "@stacksjs/path": "0.67.0",
104
+ "@stacksjs/payments": "0.67.0",
105
+ "@stacksjs/realtime": "0.67.0",
106
+ "@stacksjs/router": "0.67.0",
107
+ "@stacksjs/search-engine": "0.67.0",
108
+ "@stacksjs/security": "0.67.0",
109
+ "@stacksjs/server": "0.67.0",
110
+ "@stacksjs/storage": "0.67.0",
111
+ "@stacksjs/strings": "0.67.0",
112
+ "@stacksjs/testing": "0.67.0",
113
+ "@stacksjs/tunnel": "0.67.0",
114
+ "@stacksjs/types": "0.67.0",
115
+ "@stacksjs/ui": "0.67.0",
116
+ "@stacksjs/utils": "0.67.0",
117
+ "@stacksjs/validation": "0.67.0"
119
118
  },
120
119
  "devDependencies": {
121
- "@stacksjs/development": "0.65.1"
120
+ "@stacksjs/development": "0.67.0"
122
121
  },
123
122
  "config": {
124
123
  "commitizen": {