@layerzerolabs/vm-tooling 0.0.30

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 (262) hide show
  1. package/bin/lz-tool.cjs +18 -0
  2. package/dist/2TPNSECS.cjs +274 -0
  3. package/dist/2TPNSECS.cjs.map +1 -0
  4. package/dist/33GUXAT7.js +67 -0
  5. package/dist/33GUXAT7.js.map +1 -0
  6. package/dist/3AX3IZXK.cjs +79 -0
  7. package/dist/3AX3IZXK.cjs.map +1 -0
  8. package/dist/3BKFBGX3.cjs +17 -0
  9. package/dist/3BKFBGX3.cjs.map +1 -0
  10. package/dist/3EOFF6NK.cjs +51 -0
  11. package/dist/3EOFF6NK.cjs.map +1 -0
  12. package/dist/4NINFZK7.cjs +38 -0
  13. package/dist/4NINFZK7.cjs.map +1 -0
  14. package/dist/4XKJ5GJB.js +793 -0
  15. package/dist/4XKJ5GJB.js.map +1 -0
  16. package/dist/5EKZTTNT.js +82 -0
  17. package/dist/5EKZTTNT.js.map +1 -0
  18. package/dist/5MIIPWV7.cjs +75 -0
  19. package/dist/5MIIPWV7.cjs.map +1 -0
  20. package/dist/5N3Q6FCT.cjs +4 -0
  21. package/dist/5N3Q6FCT.cjs.map +1 -0
  22. package/dist/63H5FLN6.cjs +216 -0
  23. package/dist/63H5FLN6.cjs.map +1 -0
  24. package/dist/6A3MRQDI.js +3164 -0
  25. package/dist/6A3MRQDI.js.map +1 -0
  26. package/dist/6NLXVH5R.cjs +1089 -0
  27. package/dist/6NLXVH5R.cjs.map +1 -0
  28. package/dist/6UWCX7SA.js +60 -0
  29. package/dist/6UWCX7SA.js.map +1 -0
  30. package/dist/7EXYTS34.js +125 -0
  31. package/dist/7EXYTS34.js.map +1 -0
  32. package/dist/7LKSKL4C.cjs +64 -0
  33. package/dist/7LKSKL4C.cjs.map +1 -0
  34. package/dist/7PKC46XS.js +244 -0
  35. package/dist/7PKC46XS.js.map +1 -0
  36. package/dist/7SRULFYS.cjs +55 -0
  37. package/dist/7SRULFYS.cjs.map +1 -0
  38. package/dist/AH2UQL5E.js +6 -0
  39. package/dist/AH2UQL5E.js.map +1 -0
  40. package/dist/AOG2M3LV.cjs +122 -0
  41. package/dist/AOG2M3LV.cjs.map +1 -0
  42. package/dist/BA2LAHMY.js +43 -0
  43. package/dist/BA2LAHMY.js.map +1 -0
  44. package/dist/BHBC6Q3Y.js +47 -0
  45. package/dist/BHBC6Q3Y.js.map +1 -0
  46. package/dist/CQHBPXZ2.cjs +94 -0
  47. package/dist/CQHBPXZ2.cjs.map +1 -0
  48. package/dist/CSNPKKTO.js +125 -0
  49. package/dist/CSNPKKTO.js.map +1 -0
  50. package/dist/E75FXJNJ.js +393 -0
  51. package/dist/E75FXJNJ.js.map +1 -0
  52. package/dist/EASTPCLB.js +195 -0
  53. package/dist/EASTPCLB.js.map +1 -0
  54. package/dist/EJCGU7LP.cjs +252 -0
  55. package/dist/EJCGU7LP.cjs.map +1 -0
  56. package/dist/EKUFNO5X.js +3 -0
  57. package/dist/EKUFNO5X.js.map +1 -0
  58. package/dist/EQPMZDRH.js +63 -0
  59. package/dist/EQPMZDRH.js.map +1 -0
  60. package/dist/F5UPK5ZZ.js +2445 -0
  61. package/dist/F5UPK5ZZ.js.map +1 -0
  62. package/dist/GAZMRBLT.js +36 -0
  63. package/dist/GAZMRBLT.js.map +1 -0
  64. package/dist/JBULQDMK.js +1064 -0
  65. package/dist/JBULQDMK.js.map +1 -0
  66. package/dist/JY6PMFYV.js +60 -0
  67. package/dist/JY6PMFYV.js.map +1 -0
  68. package/dist/KTOZRP5U.cjs +404 -0
  69. package/dist/KTOZRP5U.cjs.map +1 -0
  70. package/dist/L3BNN3KF.cjs +2490 -0
  71. package/dist/L3BNN3KF.cjs.map +1 -0
  72. package/dist/L75NPWJX.cjs +204 -0
  73. package/dist/L75NPWJX.cjs.map +1 -0
  74. package/dist/LBQPL6VK.cjs +46 -0
  75. package/dist/LBQPL6VK.cjs.map +1 -0
  76. package/dist/LUG7USNZ.js +120 -0
  77. package/dist/LUG7USNZ.js.map +1 -0
  78. package/dist/LXXIBLJQ.js +15 -0
  79. package/dist/LXXIBLJQ.js.map +1 -0
  80. package/dist/MBTHP667.cjs +39 -0
  81. package/dist/MBTHP667.cjs.map +1 -0
  82. package/dist/NMC54VEB.cjs +128 -0
  83. package/dist/NMC54VEB.cjs.map +1 -0
  84. package/dist/NX4KBEWA.cjs +13 -0
  85. package/dist/NX4KBEWA.cjs.map +1 -0
  86. package/dist/OU33HN4T.js +92 -0
  87. package/dist/OU33HN4T.js.map +1 -0
  88. package/dist/OVH4V3F6.js +77 -0
  89. package/dist/OVH4V3F6.js.map +1 -0
  90. package/dist/OWJM6QQP.js +233 -0
  91. package/dist/OWJM6QQP.js.map +1 -0
  92. package/dist/PC55ZLZD.cjs +66 -0
  93. package/dist/PC55ZLZD.cjs.map +1 -0
  94. package/dist/PGRNZALP.cjs +3427 -0
  95. package/dist/PGRNZALP.cjs.map +1 -0
  96. package/dist/PXT4MQYT.cjs +3191 -0
  97. package/dist/PXT4MQYT.cjs.map +1 -0
  98. package/dist/QMIU5HY3.cjs +174 -0
  99. package/dist/QMIU5HY3.cjs.map +1 -0
  100. package/dist/QNKHVJNZ.js +43 -0
  101. package/dist/QNKHVJNZ.js.map +1 -0
  102. package/dist/QSKQ7BQT.cjs +111 -0
  103. package/dist/QSKQ7BQT.cjs.map +1 -0
  104. package/dist/QWROCDWJ.cjs +315 -0
  105. package/dist/QWROCDWJ.cjs.map +1 -0
  106. package/dist/RAIK357L.js +214 -0
  107. package/dist/RAIK357L.js.map +1 -0
  108. package/dist/RLUL6JFM.cjs +4 -0
  109. package/dist/RLUL6JFM.cjs.map +1 -0
  110. package/dist/RVOOJEDH.js +3385 -0
  111. package/dist/RVOOJEDH.js.map +1 -0
  112. package/dist/RVTTXEXB.cjs +235 -0
  113. package/dist/RVTTXEXB.cjs.map +1 -0
  114. package/dist/SKAV3OJX.js +118 -0
  115. package/dist/SKAV3OJX.js.map +1 -0
  116. package/dist/TA2DABDY.cjs +126 -0
  117. package/dist/TA2DABDY.cjs.map +1 -0
  118. package/dist/THMQMWYA.cjs +17 -0
  119. package/dist/THMQMWYA.cjs.map +1 -0
  120. package/dist/TPVIFJX4.js +236 -0
  121. package/dist/TPVIFJX4.js.map +1 -0
  122. package/dist/VDH76SF6.cjs +132 -0
  123. package/dist/VDH76SF6.cjs.map +1 -0
  124. package/dist/VUOMXK5T.js +6 -0
  125. package/dist/VUOMXK5T.js.map +1 -0
  126. package/dist/W3KWDJYA.cjs +85 -0
  127. package/dist/W3KWDJYA.cjs.map +1 -0
  128. package/dist/WAGFMHUT.js +311 -0
  129. package/dist/WAGFMHUT.js.map +1 -0
  130. package/dist/WBKUP4MX.js +168 -0
  131. package/dist/WBKUP4MX.js.map +1 -0
  132. package/dist/XH4FQTBY.cjs +62 -0
  133. package/dist/XH4FQTBY.cjs.map +1 -0
  134. package/dist/YTUEW27V.js +109 -0
  135. package/dist/YTUEW27V.js.map +1 -0
  136. package/dist/YVV5I7A5.js +15 -0
  137. package/dist/YVV5I7A5.js.map +1 -0
  138. package/dist/Z5NOJAAG.cjs +796 -0
  139. package/dist/Z5NOJAAG.cjs.map +1 -0
  140. package/dist/ZEW74YLA.js +3 -0
  141. package/dist/ZEW74YLA.js.map +1 -0
  142. package/dist/config/index.cjs +27 -0
  143. package/dist/config/index.cjs.map +1 -0
  144. package/dist/config/index.d.ts +5 -0
  145. package/dist/config/index.d.ts.map +1 -0
  146. package/dist/config/index.js +6 -0
  147. package/dist/config/index.js.map +1 -0
  148. package/dist/config/tools.cjs +15 -0
  149. package/dist/config/tools.cjs.map +1 -0
  150. package/dist/config/tools.d.ts +6 -0
  151. package/dist/config/tools.d.ts.map +1 -0
  152. package/dist/config/tools.js +6 -0
  153. package/dist/config/tools.js.map +1 -0
  154. package/dist/config/version-matrices.cjs +13 -0
  155. package/dist/config/version-matrices.cjs.map +1 -0
  156. package/dist/config/version-matrices.d.ts +7 -0
  157. package/dist/config/version-matrices.d.ts.map +1 -0
  158. package/dist/config/version-matrices.js +4 -0
  159. package/dist/config/version-matrices.js.map +1 -0
  160. package/dist/core/compatibility.cjs +13 -0
  161. package/dist/core/compatibility.cjs.map +1 -0
  162. package/dist/core/compatibility.d.ts +8 -0
  163. package/dist/core/compatibility.d.ts.map +1 -0
  164. package/dist/core/compatibility.js +4 -0
  165. package/dist/core/compatibility.js.map +1 -0
  166. package/dist/core/index.cjs +35 -0
  167. package/dist/core/index.cjs.map +1 -0
  168. package/dist/core/index.d.ts +4 -0
  169. package/dist/core/index.d.ts.map +1 -0
  170. package/dist/core/index.js +10 -0
  171. package/dist/core/index.js.map +1 -0
  172. package/dist/core/tool-executor.cjs +18 -0
  173. package/dist/core/tool-executor.cjs.map +1 -0
  174. package/dist/core/tool-executor.d.ts +12 -0
  175. package/dist/core/tool-executor.d.ts.map +1 -0
  176. package/dist/core/tool-executor.js +9 -0
  177. package/dist/core/tool-executor.js.map +1 -0
  178. package/dist/core/version-resolver.cjs +25 -0
  179. package/dist/core/version-resolver.cjs.map +1 -0
  180. package/dist/core/version-resolver.d.ts +30 -0
  181. package/dist/core/version-resolver.d.ts.map +1 -0
  182. package/dist/core/version-resolver.js +8 -0
  183. package/dist/core/version-resolver.js.map +1 -0
  184. package/dist/display/formatters.cjs +17 -0
  185. package/dist/display/formatters.cjs.map +1 -0
  186. package/dist/display/formatters.d.ts +15 -0
  187. package/dist/display/formatters.d.ts.map +1 -0
  188. package/dist/display/formatters.js +4 -0
  189. package/dist/display/formatters.js.map +1 -0
  190. package/dist/display/index.cjs +30 -0
  191. package/dist/display/index.cjs.map +1 -0
  192. package/dist/display/index.d.ts +3 -0
  193. package/dist/display/index.d.ts.map +1 -0
  194. package/dist/display/index.js +9 -0
  195. package/dist/display/index.js.map +1 -0
  196. package/dist/display/version-display.cjs +21 -0
  197. package/dist/display/version-display.cjs.map +1 -0
  198. package/dist/display/version-display.d.ts +9 -0
  199. package/dist/display/version-display.d.ts.map +1 -0
  200. package/dist/display/version-display.js +8 -0
  201. package/dist/display/version-display.js.map +1 -0
  202. package/dist/index.cjs +111 -0
  203. package/dist/index.cjs.map +1 -0
  204. package/dist/index.d.ts +2 -0
  205. package/dist/index.d.ts.map +1 -0
  206. package/dist/index.js +103 -0
  207. package/dist/index.js.map +1 -0
  208. package/dist/scripts/generate-github-matrix.cjs +1946 -0
  209. package/dist/scripts/generate-github-matrix.cjs.map +1 -0
  210. package/dist/scripts/generate-github-matrix.d.ts +2 -0
  211. package/dist/scripts/generate-github-matrix.d.ts.map +1 -0
  212. package/dist/scripts/generate-github-matrix.js +1944 -0
  213. package/dist/scripts/generate-github-matrix.js.map +1 -0
  214. package/dist/types/docker.cjs +6 -0
  215. package/dist/types/docker.cjs.map +1 -0
  216. package/dist/types/docker.d.ts +10 -0
  217. package/dist/types/docker.d.ts.map +1 -0
  218. package/dist/types/docker.js +3 -0
  219. package/dist/types/docker.js.map +1 -0
  220. package/dist/types/index.cjs +6 -0
  221. package/dist/types/index.cjs.map +1 -0
  222. package/dist/types/index.d.ts +4 -0
  223. package/dist/types/index.d.ts.map +1 -0
  224. package/dist/types/index.js +3 -0
  225. package/dist/types/index.js.map +1 -0
  226. package/dist/types/tool.cjs +6 -0
  227. package/dist/types/tool.cjs.map +1 -0
  228. package/dist/types/tool.d.ts +27 -0
  229. package/dist/types/tool.d.ts.map +1 -0
  230. package/dist/types/tool.js +3 -0
  231. package/dist/types/tool.js.map +1 -0
  232. package/dist/types/version.cjs +6 -0
  233. package/dist/types/version.cjs.map +1 -0
  234. package/dist/types/version.d.ts +33 -0
  235. package/dist/types/version.d.ts.map +1 -0
  236. package/dist/types/version.js +3 -0
  237. package/dist/types/version.js.map +1 -0
  238. package/dist/utils/finder-utils.cjs +39 -0
  239. package/dist/utils/finder-utils.cjs.map +1 -0
  240. package/dist/utils/finder-utils.d.ts +31 -0
  241. package/dist/utils/finder-utils.d.ts.map +1 -0
  242. package/dist/utils/finder-utils.js +6 -0
  243. package/dist/utils/finder-utils.js.map +1 -0
  244. package/dist/utils/index.cjs +55 -0
  245. package/dist/utils/index.cjs.map +1 -0
  246. package/dist/utils/index.d.ts +3 -0
  247. package/dist/utils/index.d.ts.map +1 -0
  248. package/dist/utils/index.js +6 -0
  249. package/dist/utils/index.js.map +1 -0
  250. package/dist/utils/version-utils.cjs +27 -0
  251. package/dist/utils/version-utils.cjs.map +1 -0
  252. package/dist/utils/version-utils.d.ts +18 -0
  253. package/dist/utils/version-utils.d.ts.map +1 -0
  254. package/dist/utils/version-utils.js +6 -0
  255. package/dist/utils/version-utils.js.map +1 -0
  256. package/dist/utils.cjs +17 -0
  257. package/dist/utils.cjs.map +1 -0
  258. package/dist/utils.d.ts +9 -0
  259. package/dist/utils.d.ts.map +1 -0
  260. package/dist/utils.js +4 -0
  261. package/dist/utils.js.map +1 -0
  262. package/package.json +57 -0
@@ -0,0 +1,235 @@
1
+ 'use strict';
2
+
3
+ var L75NPWJX_cjs = require('./L75NPWJX.cjs');
4
+ var _3BKFBGX3_cjs = require('./3BKFBGX3.cjs');
5
+ require('./XH4FQTBY.cjs');
6
+ var VDH76SF6_cjs = require('./VDH76SF6.cjs');
7
+ var NX4KBEWA_cjs = require('./NX4KBEWA.cjs');
8
+
9
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js
10
+ var resolveCredentialSource = /* @__PURE__ */ NX4KBEWA_cjs.__name((credentialSource, profileName, logger) => {
11
+ const sourceProvidersMap = {
12
+ EcsContainer: /* @__PURE__ */ NX4KBEWA_cjs.__name(async (options) => {
13
+ const { fromHttp } = await import('./QMIU5HY3.cjs');
14
+ const { fromContainerMetadata } = await import('./KTOZRP5U.cjs');
15
+ logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
16
+ return async () => VDH76SF6_cjs.chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
17
+ }, "EcsContainer"),
18
+ Ec2InstanceMetadata: /* @__PURE__ */ NX4KBEWA_cjs.__name(async (options) => {
19
+ logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
20
+ const { fromInstanceMetadata } = await import('./KTOZRP5U.cjs');
21
+ return async () => fromInstanceMetadata(options)().then(setNamedProvider);
22
+ }, "Ec2InstanceMetadata"),
23
+ Environment: /* @__PURE__ */ NX4KBEWA_cjs.__name(async (options) => {
24
+ logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
25
+ const { fromEnv } = await import('./MBTHP667.cjs');
26
+ return async () => fromEnv(options)().then(setNamedProvider);
27
+ }, "Environment")
28
+ };
29
+ if (credentialSource in sourceProvidersMap) {
30
+ return sourceProvidersMap[credentialSource];
31
+ } else {
32
+ throw new VDH76SF6_cjs.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, {
33
+ logger
34
+ });
35
+ }
36
+ }, "resolveCredentialSource");
37
+ var setNamedProvider = /* @__PURE__ */ NX4KBEWA_cjs.__name((creds) => _3BKFBGX3_cjs.setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p"), "setNamedProvider");
38
+
39
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js
40
+ var isAssumeRoleProfile = /* @__PURE__ */ NX4KBEWA_cjs.__name((arg, { profile = "default", logger } = {}) => {
41
+ return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && [
42
+ "undefined",
43
+ "string"
44
+ ].indexOf(typeof arg.role_session_name) > -1 && [
45
+ "undefined",
46
+ "string"
47
+ ].indexOf(typeof arg.external_id) > -1 && [
48
+ "undefined",
49
+ "string"
50
+ ].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, {
51
+ profile,
52
+ logger
53
+ }) || isCredentialSourceProfile(arg, {
54
+ profile,
55
+ logger
56
+ }));
57
+ }, "isAssumeRoleProfile");
58
+ var isAssumeRoleWithSourceProfile = /* @__PURE__ */ NX4KBEWA_cjs.__name((arg, { profile, logger }) => {
59
+ const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
60
+ if (withSourceProfile) {
61
+ logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);
62
+ }
63
+ return withSourceProfile;
64
+ }, "isAssumeRoleWithSourceProfile");
65
+ var isCredentialSourceProfile = /* @__PURE__ */ NX4KBEWA_cjs.__name((arg, { profile, logger }) => {
66
+ const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined";
67
+ if (withProviderProfile) {
68
+ logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);
69
+ }
70
+ return withProviderProfile;
71
+ }, "isCredentialSourceProfile");
72
+ var resolveAssumeRoleCredentials = /* @__PURE__ */ NX4KBEWA_cjs.__name(async (profileName, profiles, options, visitedProfiles = {}) => {
73
+ options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
74
+ const profileData = profiles[profileName];
75
+ const { source_profile, region } = profileData;
76
+ if (!options.roleAssumer) {
77
+ const { getDefaultRoleAssumer } = await import('./PXT4MQYT.cjs');
78
+ options.roleAssumer = getDefaultRoleAssumer({
79
+ ...options.clientConfig,
80
+ credentialProviderLogger: options.logger,
81
+ parentClientConfig: {
82
+ ...options?.parentClientConfig,
83
+ region: region ?? options?.parentClientConfig?.region
84
+ }
85
+ }, options.clientPlugins);
86
+ }
87
+ if (source_profile && source_profile in visitedProfiles) {
88
+ throw new VDH76SF6_cjs.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${L75NPWJX_cjs.getProfileName(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), {
89
+ logger: options.logger
90
+ });
91
+ }
92
+ options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
93
+ const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, {
94
+ ...visitedProfiles,
95
+ [source_profile]: true
96
+ }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();
97
+ if (isCredentialSourceWithoutRoleArn(profileData)) {
98
+ return sourceCredsProvider.then((creds) => _3BKFBGX3_cjs.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
99
+ } else {
100
+ const params = {
101
+ RoleArn: profileData.role_arn,
102
+ RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,
103
+ ExternalId: profileData.external_id,
104
+ DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10)
105
+ };
106
+ const { mfa_serial } = profileData;
107
+ if (mfa_serial) {
108
+ if (!options.mfaCodeProvider) {
109
+ throw new VDH76SF6_cjs.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, {
110
+ logger: options.logger,
111
+ tryNextLink: false
112
+ });
113
+ }
114
+ params.SerialNumber = mfa_serial;
115
+ params.TokenCode = await options.mfaCodeProvider(mfa_serial);
116
+ }
117
+ const sourceCreds = await sourceCredsProvider;
118
+ return options.roleAssumer(sourceCreds, params).then((creds) => _3BKFBGX3_cjs.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
119
+ }
120
+ }, "resolveAssumeRoleCredentials");
121
+ var isCredentialSourceWithoutRoleArn = /* @__PURE__ */ NX4KBEWA_cjs.__name((section) => {
122
+ return !section.role_arn && !!section.credential_source;
123
+ }, "isCredentialSourceWithoutRoleArn");
124
+
125
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js
126
+ var isProcessProfile = /* @__PURE__ */ NX4KBEWA_cjs.__name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile");
127
+ var resolveProcessCredentials = /* @__PURE__ */ NX4KBEWA_cjs.__name(async (options, profile) => import('./CQHBPXZ2.cjs').then(({ fromProcess }) => fromProcess({
128
+ ...options,
129
+ profile
130
+ })().then((creds) => _3BKFBGX3_cjs.setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v"))), "resolveProcessCredentials");
131
+
132
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js
133
+ var resolveSsoCredentials = /* @__PURE__ */ NX4KBEWA_cjs.__name(async (profile, profileData, options = {}) => {
134
+ const { fromSSO } = await import('./QWROCDWJ.cjs');
135
+ return fromSSO({
136
+ profile,
137
+ logger: options.logger,
138
+ parentClientConfig: options.parentClientConfig,
139
+ clientConfig: options.clientConfig
140
+ })().then((creds) => {
141
+ if (profileData.sso_session) {
142
+ return _3BKFBGX3_cjs.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
143
+ } else {
144
+ return _3BKFBGX3_cjs.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
145
+ }
146
+ });
147
+ }, "resolveSsoCredentials");
148
+ var isSsoProfile = /* @__PURE__ */ NX4KBEWA_cjs.__name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
149
+
150
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js
151
+ var isStaticCredsProfile = /* @__PURE__ */ NX4KBEWA_cjs.__name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && [
152
+ "undefined",
153
+ "string"
154
+ ].indexOf(typeof arg.aws_session_token) > -1 && [
155
+ "undefined",
156
+ "string"
157
+ ].indexOf(typeof arg.aws_account_id) > -1, "isStaticCredsProfile");
158
+ var resolveStaticCredentials = /* @__PURE__ */ NX4KBEWA_cjs.__name(async (profile, options) => {
159
+ options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
160
+ const credentials = {
161
+ accessKeyId: profile.aws_access_key_id,
162
+ secretAccessKey: profile.aws_secret_access_key,
163
+ sessionToken: profile.aws_session_token,
164
+ ...profile.aws_credential_scope && {
165
+ credentialScope: profile.aws_credential_scope
166
+ },
167
+ ...profile.aws_account_id && {
168
+ accountId: profile.aws_account_id
169
+ }
170
+ };
171
+ return _3BKFBGX3_cjs.setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
172
+ }, "resolveStaticCredentials");
173
+
174
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js
175
+ var isWebIdentityProfile = /* @__PURE__ */ NX4KBEWA_cjs.__name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && [
176
+ "undefined",
177
+ "string"
178
+ ].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile");
179
+ var resolveWebIdentityCredentials = /* @__PURE__ */ NX4KBEWA_cjs.__name(async (profile, options) => import('./PC55ZLZD.cjs').then(({ fromTokenFile }) => fromTokenFile({
180
+ webIdentityTokenFile: profile.web_identity_token_file,
181
+ roleArn: profile.role_arn,
182
+ roleSessionName: profile.role_session_name,
183
+ roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
184
+ logger: options.logger,
185
+ parentClientConfig: options.parentClientConfig
186
+ })().then((creds) => _3BKFBGX3_cjs.setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q"))), "resolveWebIdentityCredentials");
187
+
188
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js
189
+ var resolveProfileData = /* @__PURE__ */ NX4KBEWA_cjs.__name(async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
190
+ const data = profiles[profileName];
191
+ if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
192
+ return resolveStaticCredentials(data, options);
193
+ }
194
+ if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, {
195
+ profile: profileName,
196
+ logger: options.logger
197
+ })) {
198
+ return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);
199
+ }
200
+ if (isStaticCredsProfile(data)) {
201
+ return resolveStaticCredentials(data, options);
202
+ }
203
+ if (isWebIdentityProfile(data)) {
204
+ return resolveWebIdentityCredentials(data, options);
205
+ }
206
+ if (isProcessProfile(data)) {
207
+ return resolveProcessCredentials(options, profileName);
208
+ }
209
+ if (isSsoProfile(data)) {
210
+ return await resolveSsoCredentials(profileName, data, options);
211
+ }
212
+ throw new VDH76SF6_cjs.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, {
213
+ logger: options.logger
214
+ });
215
+ }, "resolveProfileData");
216
+
217
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js
218
+ var fromIni = /* @__PURE__ */ NX4KBEWA_cjs.__name((_init = {}) => async ({ callerClientConfig } = {}) => {
219
+ const init = {
220
+ ..._init,
221
+ parentClientConfig: {
222
+ ...callerClientConfig,
223
+ ..._init.parentClientConfig
224
+ }
225
+ };
226
+ init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
227
+ const profiles = await L75NPWJX_cjs.parseKnownFiles(init);
228
+ return resolveProfileData(L75NPWJX_cjs.getProfileName({
229
+ profile: _init.profile ?? callerClientConfig?.profile
230
+ }), profiles, init);
231
+ }, "fromIni");
232
+
233
+ exports.fromIni = fromIni;
234
+ //# sourceMappingURL=RVTTXEXB.cjs.map
235
+ //# sourceMappingURL=RVTTXEXB.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js","../../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js","../../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js","../../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js","../../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js","../../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js","../../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js","../../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.879.0/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js"],"names":["resolveCredentialSource","__name","credentialSource","profileName","logger","sourceProvidersMap","EcsContainer","options","fromHttp","fromContainerMetadata","debug","chain","then","setNamedProvider","Ec2InstanceMetadata","fromInstanceMetadata","Environment","fromEnv","CredentialsProviderError","creds","setCredentialFeature","isAssumeRoleProfile","arg","profile","Boolean","role_arn","indexOf","role_session_name","external_id","mfa_serial","isAssumeRoleWithSourceProfile","isCredentialSourceProfile","withSourceProfile","source_profile","credential_source","withProviderProfile","resolveAssumeRoleCredentials","profiles","visitedProfiles","profileData","region","roleAssumer","getDefaultRoleAssumer","clientConfig","credentialProviderLogger","parentClientConfig","clientPlugins","getProfileName","Object","keys","join","sourceCredsProvider","resolveProfileData","isCredentialSourceWithoutRoleArn","params","RoleArn","RoleSessionName","Date","now","ExternalId","DurationSeconds","parseInt","duration_seconds","mfaCodeProvider","tryNextLink","SerialNumber","TokenCode","sourceCreds","section","isProcessProfile","credential_process","resolveProcessCredentials","fromProcess","resolveSsoCredentials","fromSSO","sso_session","isSsoProfile","sso_start_url","sso_account_id","sso_region","sso_role_name","isStaticCredsProfile","aws_access_key_id","aws_secret_access_key","aws_session_token","aws_account_id","resolveStaticCredentials","credentials","accessKeyId","secretAccessKey","sessionToken","aws_credential_scope","credentialScope","accountId","isWebIdentityProfile","web_identity_token_file","resolveWebIdentityCredentials","fromTokenFile","webIdentityTokenFile","roleArn","roleSessionName","roleAssumerWithWebIdentity","isAssumeRoleRecursiveCall","data","length","fromIni","_init","callerClientConfig","init","parseKnownFiles"],"mappings":";;;;;;;;;AAEO,IAAMA,uBAAAA,mBAA0BC,mBAAA,CAAA,CAACC,gBAAAA,EAAkBC,WAAAA,EAAaC,MAAAA,KAAAA;AACnE,EAAA,MAAMC,kBAAAA,GAAqB;AACvBC,IAAAA,YAAAA,6CAAqBC,OAAAA,KAAAA;AACjB,MAAA,MAAM,EAAEC,QAAAA,EAAQ,GAAK,MAAM,OAAO,gBAAA,CAAA;AAClC,MAAA,MAAM,EAAEC,qBAAAA,EAAqB,GAAK,MAAM,OAAO,gBAAA,CAAA;AAC/CL,MAAAA,MAAAA,EAAQM,MAAM,sEAAA,CAAA;AACd,MAAA,OAAO,YAAYC,kBAAAA,CAAMH,QAAAA,CAASD,OAAAA,IAAW,EAAC,CAAA,EAAIE,qBAAAA,CAAsBF,OAAAA,CAAAA,CAAAA,EAAAA,CAAYK,KAAKC,gBAAAA,CAAAA;IAC7F,CAAA,EALc,cAAA,CAAA;AAMdC,IAAAA,mBAAAA,6CAA4BP,OAAAA,KAAAA;AACxBH,MAAAA,MAAAA,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,GAAO;IACT,GAAGF,KAAAA;IACH7D,kBAAAA,EAAoB;MAChB,GAAG8D,kBAAAA;AACH,MAAA,GAAGD,KAAAA,CAAM7D;AACb;AACJ,GAAA;AACA+D,EAAAA,IAAAA,CAAKxG,MAAAA,EAAQM,MAAM,4CAAA,CAAA;AACnB,EAAA,MAAM2B,QAAAA,GAAW,MAAMwE,4BAAAA,CAAgBD,IAAAA,CAAAA;AACvC,EAAA,OAAOxD,mBAAmBL,2BAAAA,CAAe;IACrCxB,OAAAA,EAASmF,KAAAA,CAAMnF,WAAWoF,kBAAAA,EAAoBpF;GAClD,CAAA,EAAIc,UAAUuE,IAAAA,CAAAA;AAClB,CAAA,EAbuB,SAAA","file":"RVTTXEXB.cjs","sourcesContent":["import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { chain, CredentialsProviderError } from \"@smithy/property-provider\";\nexport const resolveCredentialSource = (credentialSource, profileName, logger) => {\n const sourceProvidersMap = {\n EcsContainer: async (options) => {\n const { fromHttp } = await import(\"@aws-sdk/credential-provider-http\");\n const { fromContainerMetadata } = await import(\"@smithy/credential-provider-imds\");\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is EcsContainer\");\n return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);\n },\n Ec2InstanceMetadata: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata\");\n const { fromInstanceMetadata } = await import(\"@smithy/credential-provider-imds\");\n return async () => fromInstanceMetadata(options)().then(setNamedProvider);\n },\n Environment: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Environment\");\n const { fromEnv } = await import(\"@aws-sdk/credential-provider-env\");\n return async () => fromEnv(options)().then(setNamedProvider);\n },\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource];\n }\n else {\n throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +\n `expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });\n }\n};\nconst setNamedProvider = (creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_NAMED_PROVIDER\", \"p\");\n","import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { getProfileName } from \"@smithy/shared-ini-file-loader\";\nimport { resolveCredentialSource } from \"./resolveCredentialSource\";\nimport { resolveProfileData } from \"./resolveProfileData\";\nexport const isAssumeRoleProfile = (arg, { profile = \"default\", logger } = {}) => {\n return (Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1 &&\n (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })));\n};\nconst isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {\n const withSourceProfile = typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\";\n if (withSourceProfile) {\n logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);\n }\n return withSourceProfile;\n};\nconst isCredentialSourceProfile = (arg, { profile, logger }) => {\n const withProviderProfile = typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\";\n if (withProviderProfile) {\n logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);\n }\n return withProviderProfile;\n};\nexport const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)\");\n const profileData = profiles[profileName];\n const { source_profile, region } = profileData;\n if (!options.roleAssumer) {\n const { getDefaultRoleAssumer } = await import(\"@aws-sdk/nested-clients/sts\");\n options.roleAssumer = getDefaultRoleAssumer({\n ...options.clientConfig,\n credentialProviderLogger: options.logger,\n parentClientConfig: {\n ...options?.parentClientConfig,\n region: region ?? options?.parentClientConfig?.region,\n },\n }, options.clientPlugins);\n }\n if (source_profile && source_profile in visitedProfiles) {\n throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +\n ` ${getProfileName(options)}. Profiles visited: ` +\n Object.keys(visitedProfiles).join(\", \"), { logger: options.logger });\n }\n options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);\n const sourceCredsProvider = source_profile\n ? resolveProfileData(source_profile, profiles, options, {\n ...visitedProfiles,\n [source_profile]: true,\n }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))\n : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();\n if (isCredentialSourceWithoutRoleArn(profileData)) {\n return sourceCredsProvider.then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n else {\n const params = {\n RoleArn: profileData.role_arn,\n RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,\n ExternalId: profileData.external_id,\n DurationSeconds: parseInt(profileData.duration_seconds || \"3600\", 10),\n };\n const { mfa_serial } = profileData;\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n const sourceCreds = await sourceCredsProvider;\n return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n};\nconst isCredentialSourceWithoutRoleArn = (section) => {\n return !section.role_arn && !!section.credential_source;\n};\n","import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isProcessProfile = (arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.credential_process === \"string\";\nexport const resolveProcessCredentials = async (options, profile) => import(\"@aws-sdk/credential-provider-process\").then(({ fromProcess }) => fromProcess({\n ...options,\n profile,\n})().then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_PROCESS\", \"v\")));\n","import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const resolveSsoCredentials = async (profile, profileData, options = {}) => {\n const { fromSSO } = await import(\"@aws-sdk/credential-provider-sso\");\n return fromSSO({\n profile,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n clientConfig: options.clientConfig,\n })().then((creds) => {\n if (profileData.sso_session) {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO\", \"r\");\n }\n else {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO_LEGACY\", \"t\");\n }\n });\n};\nexport const isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n","import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isStaticCredsProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.aws_access_key_id === \"string\" &&\n typeof arg.aws_secret_access_key === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_account_id) > -1;\nexport const resolveStaticCredentials = async (profile, options) => {\n options?.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveStaticCredentials\");\n const credentials = {\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n ...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),\n ...(profile.aws_account_id && { accountId: profile.aws_account_id }),\n };\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE\", \"n\");\n};\n","import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isWebIdentityProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.web_identity_token_file === \"string\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1;\nexport const resolveWebIdentityCredentials = async (profile, options) => import(\"@aws-sdk/credential-provider-web-identity\").then(({ fromTokenFile }) => fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n})().then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN\", \"q\")));\n","import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { isAssumeRoleProfile, resolveAssumeRoleCredentials } from \"./resolveAssumeRoleCredentials\";\nimport { isProcessProfile, resolveProcessCredentials } from \"./resolveProcessCredentials\";\nimport { isSsoProfile, resolveSsoCredentials } from \"./resolveSsoCredentials\";\nimport { isStaticCredsProfile, resolveStaticCredentials } from \"./resolveStaticCredentials\";\nimport { isWebIdentityProfile, resolveWebIdentityCredentials } from \"./resolveWebIdentityCredentials\";\nexport const resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, data, options);\n }\n throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });\n};\n","import { getProfileName, parseKnownFiles } from \"@smithy/shared-ini-file-loader\";\nimport { resolveProfileData } from \"./resolveProfileData\";\nexport const fromIni = (_init = {}) => async ({ callerClientConfig } = {}) => {\n const init = {\n ..._init,\n parentClientConfig: {\n ...callerClientConfig,\n ..._init.parentClientConfig,\n },\n };\n init.logger?.debug(\"@aws-sdk/credential-provider-ini - fromIni\");\n const profiles = await parseKnownFiles(init);\n return resolveProfileData(getProfileName({\n profile: _init.profile ?? callerClientConfig?.profile,\n }), profiles, init);\n};\n"]}
@@ -0,0 +1,118 @@
1
+ import { tools, findToolByName, getToolDefaultVersion, findMatrixByType, findToolsByType, getToolSupportedVersions } from './TPVIFJX4.js';
2
+ import { parseVersionFileContents } from './BA2LAHMY.js';
3
+ import { findBestCompatibleCombination } from './GAZMRBLT.js';
4
+ import { __name } from './VUOMXK5T.js';
5
+ import process from 'process';
6
+
7
+ function extractUserVersions(options) {
8
+ const userVersions = {};
9
+ for (const tool of tools) {
10
+ const versionKey = `${tool.name}Version`;
11
+ const versionValue = options[versionKey];
12
+ if (typeof versionValue === "string" && versionValue !== "") {
13
+ userVersions[tool.name] = versionValue;
14
+ }
15
+ }
16
+ return userVersions;
17
+ }
18
+ __name(extractUserVersions, "extractUserVersions");
19
+ function resolveToolVersion(toolName, userSpecifiedVersions, options, cwd) {
20
+ const tool = findToolByName(toolName);
21
+ if (!tool) {
22
+ throw new Error(`Tool ${toolName} not found`);
23
+ }
24
+ const userVersion = userSpecifiedVersions[toolName];
25
+ if (typeof userVersion === "string" && userVersion !== "") {
26
+ return userVersion;
27
+ }
28
+ const envKey = `${tool.name.toUpperCase()}_VERSION`;
29
+ const envVersion = process.env[envKey];
30
+ if (typeof envVersion === "string" && envVersion !== "") {
31
+ return envVersion;
32
+ }
33
+ try {
34
+ const parsedVersions = parseVersionFileContents(cwd);
35
+ const versionKey = `${tool.name}_version`.toUpperCase();
36
+ const foundVersion = parsedVersions[versionKey];
37
+ if (typeof foundVersion === "string" && foundVersion !== "") {
38
+ return foundVersion;
39
+ }
40
+ } catch (error) {
41
+ }
42
+ return getToolDefaultVersion(tool.name);
43
+ }
44
+ __name(resolveToolVersion, "resolveToolVersion");
45
+ function resolveTypeVersions(type, userSpecifiedVersions, options, cwd) {
46
+ const matrix = findMatrixByType(type);
47
+ const typeTools = findToolsByType(type);
48
+ if (!matrix || typeTools.length === 0) {
49
+ throw new Error(`Type ${type} not found or no version matrix available`);
50
+ }
51
+ const resolvedVersions = {};
52
+ const usedDefaultFor = [];
53
+ const warnings = [];
54
+ for (const tool of typeTools) {
55
+ const version = resolveToolVersion(tool.name, userSpecifiedVersions, options, cwd);
56
+ resolvedVersions[tool.name] = version;
57
+ if (version === getToolDefaultVersion(tool.name)) {
58
+ usedDefaultFor.push(tool.name);
59
+ }
60
+ if (version !== getToolDefaultVersion(tool.name)) {
61
+ const supportedVersions = getToolSupportedVersions(tool.name);
62
+ if (!supportedVersions.includes(version)) {
63
+ warnings.push(`\u26A0\uFE0F Version ${version} for ${tool.name} is not in the supported list.
64
+ Supported versions: ${supportedVersions.join(", ")}
65
+ Continuing with Docker availability as final validation...`);
66
+ }
67
+ }
68
+ }
69
+ let matchedCombination;
70
+ let isCompatibleCombination = false;
71
+ for (const combo of matrix.combinations) {
72
+ const matches = Object.entries(combo.versions).every(([tool, version]) => resolvedVersions[tool] === version);
73
+ if (matches) {
74
+ matchedCombination = combo;
75
+ isCompatibleCombination = true;
76
+ break;
77
+ }
78
+ }
79
+ if (!isCompatibleCombination && usedDefaultFor.length > 0) {
80
+ const compatibleCombo = findBestCompatibleCombination(resolvedVersions, matrix);
81
+ if (compatibleCombo) {
82
+ let adjusted = false;
83
+ for (const toolName of usedDefaultFor) {
84
+ const comboVersion = compatibleCombo.versions[toolName];
85
+ if (comboVersion !== void 0 && comboVersion !== resolvedVersions[toolName]) {
86
+ const oldVersion = resolvedVersions[toolName];
87
+ resolvedVersions[toolName] = comboVersion;
88
+ warnings.push(`\u{1F504} Auto-adjusted ${toolName}: ${oldVersion} \u2192 ${comboVersion} (for compatibility)`);
89
+ adjusted = true;
90
+ }
91
+ }
92
+ if (adjusted) {
93
+ matchedCombination = compatibleCombo;
94
+ isCompatibleCombination = true;
95
+ }
96
+ }
97
+ }
98
+ if (!isCompatibleCombination) {
99
+ const recommendedCombos = matrix.combinations.filter((c) => c.isRecommended).map((c) => c.id).join(", ");
100
+ warnings.push(`\u26A0\uFE0F Custom version combination detected - not officially tested.
101
+ \u{1F4A1} Stable combinations: ${recommendedCombos}
102
+ \u{1F50D} Use 'lz-tool --list-versions' to see all tested combinations.`);
103
+ } else if (matchedCombination?.description !== void 0) {
104
+ console.info(`\u2705 ${matchedCombination.description} (${matchedCombination.id})`);
105
+ }
106
+ return {
107
+ resolvedVersions,
108
+ isCompatibleCombination,
109
+ usedDefaultFor,
110
+ warnings,
111
+ combinationId: matchedCombination?.id
112
+ };
113
+ }
114
+ __name(resolveTypeVersions, "resolveTypeVersions");
115
+
116
+ export { extractUserVersions, resolveToolVersion, resolveTypeVersions };
117
+ //# sourceMappingURL=SKAV3OJX.js.map
118
+ //# sourceMappingURL=SKAV3OJX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/version-resolver.ts"],"names":["extractUserVersions","options","userVersions","tool","tools","versionKey","name","versionValue","resolveToolVersion","toolName","userSpecifiedVersions","cwd","findToolByName","Error","userVersion","envKey","toUpperCase","envVersion","process","env","parsedVersions","parseVersionFileContents","foundVersion","error","getToolDefaultVersion","resolveTypeVersions","type","matrix","findMatrixByType","typeTools","findToolsByType","length","resolvedVersions","usedDefaultFor","warnings","version","push","supportedVersions","getToolSupportedVersions","includes","join","matchedCombination","isCompatibleCombination","combo","combinations","matches","Object","entries","versions","every","compatibleCombo","findBestCompatibleCombination","adjusted","comboVersion","undefined","oldVersion","recommendedCombos","filter","c","isRecommended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AAA,CAAA;EAEjF,CAAA,MAAA,IAAWf,kBAAAA,EAAoBqB,gBAAgBR,MAAAA,EAAW;AACtDS,IAAAA,OAAAA,CAAQC,KAAK,CAAA,OAAA,EAAKvB,kBAAAA,CAAmBqB,WAAW,CAAA,EAAA,EAAKrB,kBAAAA,CAAmBoB,EAAE,CAAA,CAAA,CAAG,CAAA;AACjF,EAAA;AAEA,EAAA,OAAO;AACH7B,IAAAA,gBAAAA;AACAU,IAAAA,uBAAAA;AACAT,IAAAA,cAAAA;AACAC,IAAAA,QAAAA;AACA+B,IAAAA,aAAAA,EAAexB,kBAAAA,EAAoBoB;AACvC,GAAA;AACJ;AAxGgBpC,MAAAA,CAAAA,mBAAAA,EAAAA,qBAAAA,CAAAA","file":"SKAV3OJX.js","sourcesContent":["import process from 'process';\n\nimport { tools } from '../config';\nimport type { ToolType, VersionCombination, VersionResolutionResult } from '../types';\nimport { parseVersionFileContents } from '../utils';\nimport {\n findMatrixByType,\n findToolByName,\n findToolsByType,\n getToolDefaultVersion,\n getToolSupportedVersions,\n} from '../utils/finder-utils';\nimport { findBestCompatibleCombination } from './compatibility';\n\n/**\n * Extract user-specified versions from command line options\n */\nexport function extractUserVersions(options: { [key: string]: any }): { [key: string]: string } {\n const userVersions: { [key: string]: string } = {};\n\n // Extract versions from command line options\n for (const tool of tools) {\n const versionKey = `${tool.name}Version`;\n const versionValue = options[versionKey] as unknown;\n if (typeof versionValue === 'string' && versionValue !== '') {\n userVersions[tool.name] = versionValue;\n }\n }\n\n return userVersions;\n}\n\n/**\n * Resolve version for a single tool following priority order:\n * 1. Command line options\n * 2. Environment variables\n * 3. .versions file\n * 4. Default version\n */\nexport function resolveToolVersion(\n toolName: string,\n userSpecifiedVersions: { [key: string]: string },\n options: { [key: string]: any },\n cwd: string,\n): string {\n const tool = findToolByName(toolName);\n if (!tool) {\n throw new Error(`Tool ${toolName} not found`);\n }\n\n // 1. Check command line options (highest priority)\n const userVersion = userSpecifiedVersions[toolName];\n if (typeof userVersion === 'string' && userVersion !== '') {\n return userVersion;\n }\n\n // 2. Check environment variables\n const envKey = `${tool.name.toUpperCase()}_VERSION`;\n const envVersion = process.env[envKey];\n if (typeof envVersion === 'string' && envVersion !== '') {\n return envVersion;\n }\n\n // 3. Check .versions file\n try {\n const parsedVersions = parseVersionFileContents(cwd);\n const versionKey = `${tool.name}_version`.toUpperCase();\n const foundVersion = parsedVersions[versionKey];\n\n if (typeof foundVersion === 'string' && foundVersion !== '') {\n return foundVersion;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (error) {\n // If .versions file doesn't exist or can't be parsed, continue to default\n }\n\n // 4. Use default version\n return getToolDefaultVersion(tool.name);\n}\n\n/**\n * Resolve versions for all tools in a type with compatibility checking\n */\nexport function resolveTypeVersions(\n type: ToolType,\n userSpecifiedVersions: { [key: string]: string },\n options: { [key: string]: any },\n cwd: string,\n): VersionResolutionResult {\n const matrix = findMatrixByType(type);\n const typeTools = findToolsByType(type);\n\n if (!matrix || typeTools.length === 0) {\n throw new Error(`Type ${type} not found or no version matrix available`);\n }\n\n // 1. Collect versions from all sources for each tool\n const resolvedVersions: { [key: string]: string } = {};\n const usedDefaultFor: string[] = [];\n const warnings: string[] = [];\n\n for (const tool of typeTools) {\n const version = resolveToolVersion(tool.name, userSpecifiedVersions, options, cwd);\n resolvedVersions[tool.name] = version;\n\n if (version === getToolDefaultVersion(tool.name)) {\n usedDefaultFor.push(tool.name);\n }\n\n // Validate user-specified version if not default\n if (version !== getToolDefaultVersion(tool.name)) {\n const supportedVersions = getToolSupportedVersions(tool.name);\n if (!supportedVersions.includes(version)) {\n warnings.push(\n `⚠️ Version ${version} for ${tool.name} is not in the supported list.\\n` +\n ` Supported versions: ${supportedVersions.join(', ')}\\n` +\n ` Continuing with Docker availability as final validation...`,\n );\n }\n }\n }\n\n // 2. Check if current combination matches any compatible combination\n let matchedCombination: VersionCombination | undefined;\n let isCompatibleCombination = false;\n\n for (const combo of matrix.combinations) {\n const matches = Object.entries(combo.versions).every(\n ([tool, version]) => resolvedVersions[tool] === version,\n );\n\n if (matches) {\n matchedCombination = combo;\n isCompatibleCombination = true;\n break;\n }\n }\n\n // 3. If not compatible and some tools used defaults, try to auto-adjust\n if (!isCompatibleCombination && usedDefaultFor.length > 0) {\n const compatibleCombo = findBestCompatibleCombination(resolvedVersions, matrix);\n\n if (compatibleCombo) {\n let adjusted = false;\n\n for (const toolName of usedDefaultFor) {\n const comboVersion = compatibleCombo.versions[toolName];\n if (comboVersion !== undefined && comboVersion !== resolvedVersions[toolName]) {\n const oldVersion = resolvedVersions[toolName];\n resolvedVersions[toolName] = comboVersion;\n warnings.push(\n `🔄 Auto-adjusted ${toolName}: ${oldVersion} → ${comboVersion} (for compatibility)`,\n );\n adjusted = true;\n }\n }\n\n if (adjusted) {\n matchedCombination = compatibleCombo;\n isCompatibleCombination = true;\n }\n }\n }\n\n // 4. Add compatibility warnings\n if (!isCompatibleCombination) {\n const recommendedCombos = matrix.combinations\n .filter((c) => c.isRecommended)\n .map((c) => c.id)\n .join(', ');\n\n warnings.push(\n `⚠️ Custom version combination detected - not officially tested.\\n` +\n ` 💡 Stable combinations: ${recommendedCombos}\\n` +\n ` 🔍 Use 'lz-tool --list-versions' to see all tested combinations.`,\n );\n } else if (matchedCombination?.description !== undefined) {\n console.info(`✅ ${matchedCombination.description} (${matchedCombination.id})`);\n }\n\n return {\n resolvedVersions,\n isCompatibleCombination,\n usedDefaultFor,\n warnings,\n combinationId: matchedCombination?.id,\n };\n}\n"]}
@@ -0,0 +1,126 @@
1
+ 'use strict';
2
+
3
+ var _2TPNSECS_cjs = require('./2TPNSECS.cjs');
4
+ var _3EOFF6NK_cjs = require('./3EOFF6NK.cjs');
5
+ var _4NINFZK7_cjs = require('./4NINFZK7.cjs');
6
+ var NX4KBEWA_cjs = require('./NX4KBEWA.cjs');
7
+ var process = require('process');
8
+
9
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
+
11
+ var process__default = /*#__PURE__*/_interopDefault(process);
12
+
13
+ function extractUserVersions(options) {
14
+ const userVersions = {};
15
+ for (const tool of _2TPNSECS_cjs.tools) {
16
+ const versionKey = `${tool.name}Version`;
17
+ const versionValue = options[versionKey];
18
+ if (typeof versionValue === "string" && versionValue !== "") {
19
+ userVersions[tool.name] = versionValue;
20
+ }
21
+ }
22
+ return userVersions;
23
+ }
24
+ NX4KBEWA_cjs.__name(extractUserVersions, "extractUserVersions");
25
+ function resolveToolVersion(toolName, userSpecifiedVersions, options, cwd) {
26
+ const tool = _2TPNSECS_cjs.findToolByName(toolName);
27
+ if (!tool) {
28
+ throw new Error(`Tool ${toolName} not found`);
29
+ }
30
+ const userVersion = userSpecifiedVersions[toolName];
31
+ if (typeof userVersion === "string" && userVersion !== "") {
32
+ return userVersion;
33
+ }
34
+ const envKey = `${tool.name.toUpperCase()}_VERSION`;
35
+ const envVersion = process__default.default.env[envKey];
36
+ if (typeof envVersion === "string" && envVersion !== "") {
37
+ return envVersion;
38
+ }
39
+ try {
40
+ const parsedVersions = _3EOFF6NK_cjs.parseVersionFileContents(cwd);
41
+ const versionKey = `${tool.name}_version`.toUpperCase();
42
+ const foundVersion = parsedVersions[versionKey];
43
+ if (typeof foundVersion === "string" && foundVersion !== "") {
44
+ return foundVersion;
45
+ }
46
+ } catch (error) {
47
+ }
48
+ return _2TPNSECS_cjs.getToolDefaultVersion(tool.name);
49
+ }
50
+ NX4KBEWA_cjs.__name(resolveToolVersion, "resolveToolVersion");
51
+ function resolveTypeVersions(type, userSpecifiedVersions, options, cwd) {
52
+ const matrix = _2TPNSECS_cjs.findMatrixByType(type);
53
+ const typeTools = _2TPNSECS_cjs.findToolsByType(type);
54
+ if (!matrix || typeTools.length === 0) {
55
+ throw new Error(`Type ${type} not found or no version matrix available`);
56
+ }
57
+ const resolvedVersions = {};
58
+ const usedDefaultFor = [];
59
+ const warnings = [];
60
+ for (const tool of typeTools) {
61
+ const version = resolveToolVersion(tool.name, userSpecifiedVersions, options, cwd);
62
+ resolvedVersions[tool.name] = version;
63
+ if (version === _2TPNSECS_cjs.getToolDefaultVersion(tool.name)) {
64
+ usedDefaultFor.push(tool.name);
65
+ }
66
+ if (version !== _2TPNSECS_cjs.getToolDefaultVersion(tool.name)) {
67
+ const supportedVersions = _2TPNSECS_cjs.getToolSupportedVersions(tool.name);
68
+ if (!supportedVersions.includes(version)) {
69
+ warnings.push(`\u26A0\uFE0F Version ${version} for ${tool.name} is not in the supported list.
70
+ Supported versions: ${supportedVersions.join(", ")}
71
+ Continuing with Docker availability as final validation...`);
72
+ }
73
+ }
74
+ }
75
+ let matchedCombination;
76
+ let isCompatibleCombination = false;
77
+ for (const combo of matrix.combinations) {
78
+ const matches = Object.entries(combo.versions).every(([tool, version]) => resolvedVersions[tool] === version);
79
+ if (matches) {
80
+ matchedCombination = combo;
81
+ isCompatibleCombination = true;
82
+ break;
83
+ }
84
+ }
85
+ if (!isCompatibleCombination && usedDefaultFor.length > 0) {
86
+ const compatibleCombo = _4NINFZK7_cjs.findBestCompatibleCombination(resolvedVersions, matrix);
87
+ if (compatibleCombo) {
88
+ let adjusted = false;
89
+ for (const toolName of usedDefaultFor) {
90
+ const comboVersion = compatibleCombo.versions[toolName];
91
+ if (comboVersion !== void 0 && comboVersion !== resolvedVersions[toolName]) {
92
+ const oldVersion = resolvedVersions[toolName];
93
+ resolvedVersions[toolName] = comboVersion;
94
+ warnings.push(`\u{1F504} Auto-adjusted ${toolName}: ${oldVersion} \u2192 ${comboVersion} (for compatibility)`);
95
+ adjusted = true;
96
+ }
97
+ }
98
+ if (adjusted) {
99
+ matchedCombination = compatibleCombo;
100
+ isCompatibleCombination = true;
101
+ }
102
+ }
103
+ }
104
+ if (!isCompatibleCombination) {
105
+ const recommendedCombos = matrix.combinations.filter((c) => c.isRecommended).map((c) => c.id).join(", ");
106
+ warnings.push(`\u26A0\uFE0F Custom version combination detected - not officially tested.
107
+ \u{1F4A1} Stable combinations: ${recommendedCombos}
108
+ \u{1F50D} Use 'lz-tool --list-versions' to see all tested combinations.`);
109
+ } else if (matchedCombination?.description !== void 0) {
110
+ console.info(`\u2705 ${matchedCombination.description} (${matchedCombination.id})`);
111
+ }
112
+ return {
113
+ resolvedVersions,
114
+ isCompatibleCombination,
115
+ usedDefaultFor,
116
+ warnings,
117
+ combinationId: matchedCombination?.id
118
+ };
119
+ }
120
+ NX4KBEWA_cjs.__name(resolveTypeVersions, "resolveTypeVersions");
121
+
122
+ exports.extractUserVersions = extractUserVersions;
123
+ exports.resolveToolVersion = resolveToolVersion;
124
+ exports.resolveTypeVersions = resolveTypeVersions;
125
+ //# sourceMappingURL=TA2DABDY.cjs.map
126
+ //# sourceMappingURL=TA2DABDY.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/version-resolver.ts"],"names":["extractUserVersions","options","userVersions","tool","tools","versionKey","name","versionValue","resolveToolVersion","toolName","userSpecifiedVersions","cwd","findToolByName","Error","userVersion","envKey","toUpperCase","envVersion","process","env","parsedVersions","parseVersionFileContents","foundVersion","error","getToolDefaultVersion","resolveTypeVersions","type","matrix","findMatrixByType","typeTools","findToolsByType","length","resolvedVersions","usedDefaultFor","warnings","version","push","supportedVersions","getToolSupportedVersions","includes","join","matchedCombination","isCompatibleCombination","combo","combinations","matches","Object","entries","versions","every","compatibleCombo","findBestCompatibleCombination","adjusted","comboVersion","undefined","oldVersion","recommendedCombos","filter","c","isRecommended","map","id","description","console","info","combinationId"],"mappings":";;;;;;;;;;;;AAiBO,SAASA,oBAAoBC,OAAAA,EAA+B;AAC/D,EAAA,MAAMC,eAA0C,EAAC;AAGjD,EAAA,KAAA,MAAWC,QAAQC,mBAAAA,EAAO;AACtB,IAAA,MAAMC,UAAAA,GAAa,CAAA,EAAGF,IAAAA,CAAKG,IAAI,CAAA,OAAA,CAAA;AAC/B,IAAA,MAAMC,YAAAA,GAAeN,QAAQI,UAAAA,CAAAA;AAC7B,IAAA,IAAI,OAAOE,YAAAA,KAAiB,QAAA,IAAYA,YAAAA,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IAAAA,aAAAA,EAAexB,kBAAAA,EAAoBoB;AACvC,GAAA;AACJ;AAxGgBpC,mBAAAA,CAAAA,mBAAAA,EAAAA,qBAAAA,CAAAA","file":"TA2DABDY.cjs","sourcesContent":["import process from 'process';\n\nimport { tools } from '../config';\nimport type { ToolType, VersionCombination, VersionResolutionResult } from '../types';\nimport { parseVersionFileContents } from '../utils';\nimport {\n findMatrixByType,\n findToolByName,\n findToolsByType,\n getToolDefaultVersion,\n getToolSupportedVersions,\n} from '../utils/finder-utils';\nimport { findBestCompatibleCombination } from './compatibility';\n\n/**\n * Extract user-specified versions from command line options\n */\nexport function extractUserVersions(options: { [key: string]: any }): { [key: string]: string } {\n const userVersions: { [key: string]: string } = {};\n\n // Extract versions from command line options\n for (const tool of tools) {\n const versionKey = `${tool.name}Version`;\n const versionValue = options[versionKey] as unknown;\n if (typeof versionValue === 'string' && versionValue !== '') {\n userVersions[tool.name] = versionValue;\n }\n }\n\n return userVersions;\n}\n\n/**\n * Resolve version for a single tool following priority order:\n * 1. Command line options\n * 2. Environment variables\n * 3. .versions file\n * 4. Default version\n */\nexport function resolveToolVersion(\n toolName: string,\n userSpecifiedVersions: { [key: string]: string },\n options: { [key: string]: any },\n cwd: string,\n): string {\n const tool = findToolByName(toolName);\n if (!tool) {\n throw new Error(`Tool ${toolName} not found`);\n }\n\n // 1. Check command line options (highest priority)\n const userVersion = userSpecifiedVersions[toolName];\n if (typeof userVersion === 'string' && userVersion !== '') {\n return userVersion;\n }\n\n // 2. Check environment variables\n const envKey = `${tool.name.toUpperCase()}_VERSION`;\n const envVersion = process.env[envKey];\n if (typeof envVersion === 'string' && envVersion !== '') {\n return envVersion;\n }\n\n // 3. Check .versions file\n try {\n const parsedVersions = parseVersionFileContents(cwd);\n const versionKey = `${tool.name}_version`.toUpperCase();\n const foundVersion = parsedVersions[versionKey];\n\n if (typeof foundVersion === 'string' && foundVersion !== '') {\n return foundVersion;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (error) {\n // If .versions file doesn't exist or can't be parsed, continue to default\n }\n\n // 4. Use default version\n return getToolDefaultVersion(tool.name);\n}\n\n/**\n * Resolve versions for all tools in a type with compatibility checking\n */\nexport function resolveTypeVersions(\n type: ToolType,\n userSpecifiedVersions: { [key: string]: string },\n options: { [key: string]: any },\n cwd: string,\n): VersionResolutionResult {\n const matrix = findMatrixByType(type);\n const typeTools = findToolsByType(type);\n\n if (!matrix || typeTools.length === 0) {\n throw new Error(`Type ${type} not found or no version matrix available`);\n }\n\n // 1. Collect versions from all sources for each tool\n const resolvedVersions: { [key: string]: string } = {};\n const usedDefaultFor: string[] = [];\n const warnings: string[] = [];\n\n for (const tool of typeTools) {\n const version = resolveToolVersion(tool.name, userSpecifiedVersions, options, cwd);\n resolvedVersions[tool.name] = version;\n\n if (version === getToolDefaultVersion(tool.name)) {\n usedDefaultFor.push(tool.name);\n }\n\n // Validate user-specified version if not default\n if (version !== getToolDefaultVersion(tool.name)) {\n const supportedVersions = getToolSupportedVersions(tool.name);\n if (!supportedVersions.includes(version)) {\n warnings.push(\n `⚠️ Version ${version} for ${tool.name} is not in the supported list.\\n` +\n ` Supported versions: ${supportedVersions.join(', ')}\\n` +\n ` Continuing with Docker availability as final validation...`,\n );\n }\n }\n }\n\n // 2. Check if current combination matches any compatible combination\n let matchedCombination: VersionCombination | undefined;\n let isCompatibleCombination = false;\n\n for (const combo of matrix.combinations) {\n const matches = Object.entries(combo.versions).every(\n ([tool, version]) => resolvedVersions[tool] === version,\n );\n\n if (matches) {\n matchedCombination = combo;\n isCompatibleCombination = true;\n break;\n }\n }\n\n // 3. If not compatible and some tools used defaults, try to auto-adjust\n if (!isCompatibleCombination && usedDefaultFor.length > 0) {\n const compatibleCombo = findBestCompatibleCombination(resolvedVersions, matrix);\n\n if (compatibleCombo) {\n let adjusted = false;\n\n for (const toolName of usedDefaultFor) {\n const comboVersion = compatibleCombo.versions[toolName];\n if (comboVersion !== undefined && comboVersion !== resolvedVersions[toolName]) {\n const oldVersion = resolvedVersions[toolName];\n resolvedVersions[toolName] = comboVersion;\n warnings.push(\n `🔄 Auto-adjusted ${toolName}: ${oldVersion} → ${comboVersion} (for compatibility)`,\n );\n adjusted = true;\n }\n }\n\n if (adjusted) {\n matchedCombination = compatibleCombo;\n isCompatibleCombination = true;\n }\n }\n }\n\n // 4. Add compatibility warnings\n if (!isCompatibleCombination) {\n const recommendedCombos = matrix.combinations\n .filter((c) => c.isRecommended)\n .map((c) => c.id)\n .join(', ');\n\n warnings.push(\n `⚠️ Custom version combination detected - not officially tested.\\n` +\n ` 💡 Stable combinations: ${recommendedCombos}\\n` +\n ` 🔍 Use 'lz-tool --list-versions' to see all tested combinations.`,\n );\n } else if (matchedCombination?.description !== undefined) {\n console.info(`✅ ${matchedCombination.description} (${matchedCombination.id})`);\n }\n\n return {\n resolvedVersions,\n isCompatibleCombination,\n usedDefaultFor,\n warnings,\n combinationId: matchedCombination?.id,\n };\n}\n"]}
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var NX4KBEWA_cjs = require('./NX4KBEWA.cjs');
4
+
5
+ // ../../node_modules/.pnpm/@smithy+core@3.9.1/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js
6
+ var NoAuthSigner = class {
7
+ static {
8
+ NX4KBEWA_cjs.__name(this, "NoAuthSigner");
9
+ }
10
+ async sign(httpRequest, identity, signingProperties) {
11
+ return httpRequest;
12
+ }
13
+ };
14
+
15
+ exports.NoAuthSigner = NoAuthSigner;
16
+ //# sourceMappingURL=THMQMWYA.cjs.map
17
+ //# sourceMappingURL=THMQMWYA.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@smithy+core@3.9.1/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js"],"names":["NoAuthSigner","sign","httpRequest","identity","signingProperties"],"mappings":";;;;;AAAO,IAAMA,eAAN,MAAMA;EAAb;;;EACI,MAAMC,IAAAA,CAAKC,WAAAA,EAAaC,QAAAA,EAAUC,iBAAAA,EAAmB;AACjD,IAAA,OAAOF,WAAAA;AACX,EAAA;AACJ","file":"THMQMWYA.cjs","sourcesContent":["export class NoAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n return httpRequest;\n }\n}\n"]}