@larkup/cli 0.2.25 → 0.2.27

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 (45) hide show
  1. package/README.md +8 -0
  2. package/dist/{analytics-store-KI3NXDYV.js → analytics-store-4NYU7DMO.js} +2 -2
  3. package/dist/api-X4PHQJTH.js +6943 -0
  4. package/dist/bowser-GZLEN3PD.js +2821 -0
  5. package/dist/{chroma-BCASZNMJ.js → chroma-RJVBZZMP.js} +2 -11
  6. package/dist/chunk-3EBUYTA7.js +136 -0
  7. package/dist/chunk-4XN2IRCG.js +46 -0
  8. package/dist/{chunk-FM6HYXZ5.js → chunk-5UWKP64Q.js} +24 -72
  9. package/dist/chunk-65EVYGDT.js +2904 -0
  10. package/dist/chunk-A7HMSODH.js +126 -0
  11. package/dist/chunk-BDMLJQRN.js +534 -0
  12. package/dist/chunk-FUTLPXFR.js +921 -0
  13. package/dist/chunk-HAABLEPO.js +1570 -0
  14. package/dist/chunk-HOPZALAP.js +449 -0
  15. package/dist/{chunk-L34L3RDQ.js → chunk-JZ3UCEGF.js} +157 -197
  16. package/dist/chunk-MACWQEJS.js +2091 -0
  17. package/dist/chunk-MYOADNR2.js +515 -0
  18. package/dist/chunk-N6IF5QLH.js +1850 -0
  19. package/dist/chunk-ODWAFTDP.js +1711 -0
  20. package/dist/chunk-QGM4M3NI.js +37 -0
  21. package/dist/chunk-S5DCG3CZ.js +41 -0
  22. package/dist/{chunk-I6JJWCUQ.js → chunk-V3VNCOZ6.js} +118 -29
  23. package/dist/dist-es-5DTOPEBY.js +322 -0
  24. package/dist/dist-es-BM4STLL5.js +70 -0
  25. package/dist/dist-es-DS5SFRTK.js +377 -0
  26. package/dist/dist-es-F6WXDZQY.js +88 -0
  27. package/dist/dist-es-KMHWFNXI.js +295 -0
  28. package/dist/dist-es-LRDDK5LI.js +11761 -0
  29. package/dist/dist-es-LWW2DNRF.js +139 -0
  30. package/dist/dist-es-NEADJWQM.js +176 -0
  31. package/dist/dist-es-S5FAFKBD.js +23 -0
  32. package/dist/dist-es-YD724GH3.js +221 -0
  33. package/dist/event-streams-NPIZBVLJ.js +43 -0
  34. package/dist/index.js +2076 -1768
  35. package/dist/{lancedb-UB2EPDCN.js → lancedb-TCUZKSHN.js} +1 -1
  36. package/dist/lexer-DQCqS3nf-CGRGK47I.js +62 -0
  37. package/dist/loadSso-HXXA5UNF.js +584 -0
  38. package/dist/{pinecone-OHOY4YYM.js → pinecone-ME3YOCQJ.js} +3 -21
  39. package/dist/signin-7FUGJFG3.js +822 -0
  40. package/dist/sso-oidc-EPMF7LMF.js +838 -0
  41. package/dist/sts-RBEOIBEJ.js +1118 -0
  42. package/dist/{tool-loader-KKODIWEV.js → tool-loader-PEQZZWTB.js} +3 -3
  43. package/dist/{tool-registry-CXCFMOWA.js → tool-registry-VJYLRXKJ.js} +2 -2
  44. package/package.json +20 -16
  45. package/dist/chunk-3RG5ZIWI.js +0 -10
@@ -0,0 +1,139 @@
1
+ import {
2
+ formatUrl
3
+ } from "./chunk-S5DCG3CZ.js";
4
+ import {
5
+ SignatureV4MultiRegion
6
+ } from "./chunk-3EBUYTA7.js";
7
+ import "./chunk-BDMLJQRN.js";
8
+ import {
9
+ getEndpointFromInstructions
10
+ } from "./chunk-ODWAFTDP.js";
11
+ import "./chunk-HAABLEPO.js";
12
+ import {
13
+ HttpRequest
14
+ } from "./chunk-MACWQEJS.js";
15
+ import "./chunk-QGM4M3NI.js";
16
+
17
+ // ../../node_modules/.pnpm/@aws-sdk+s3-request-presigner@3.1125.0/node_modules/@aws-sdk/s3-request-presigner/dist-es/constants.js
18
+ var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";
19
+ var SHA256_HEADER = "X-Amz-Content-Sha256";
20
+
21
+ // ../../node_modules/.pnpm/@aws-sdk+s3-request-presigner@3.1125.0/node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js
22
+ var S3RequestPresigner = class {
23
+ signer;
24
+ constructor(options) {
25
+ const resolvedOptions = {
26
+ service: options.signingName || options.service || "s3",
27
+ uriEscapePath: options.uriEscapePath || false,
28
+ applyChecksum: options.applyChecksum || false,
29
+ ...options
30
+ };
31
+ this.signer = new SignatureV4MultiRegion(resolvedOptions);
32
+ }
33
+ presign(requestToSign, { unsignableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), ...options } = {}) {
34
+ this.prepareRequest(requestToSign, {
35
+ unsignableHeaders,
36
+ unhoistableHeaders,
37
+ hoistableHeaders
38
+ });
39
+ return this.signer.presign(requestToSign, {
40
+ expiresIn: 900,
41
+ unsignableHeaders,
42
+ unhoistableHeaders,
43
+ ...options
44
+ });
45
+ }
46
+ presignWithCredentials(requestToSign, credentials, { unsignableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), ...options } = {}) {
47
+ this.prepareRequest(requestToSign, {
48
+ unsignableHeaders,
49
+ unhoistableHeaders,
50
+ hoistableHeaders
51
+ });
52
+ return this.signer.presignWithCredentials(requestToSign, credentials, {
53
+ expiresIn: 900,
54
+ unsignableHeaders,
55
+ unhoistableHeaders,
56
+ ...options
57
+ });
58
+ }
59
+ prepareRequest(requestToSign, { unsignableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set() } = {}) {
60
+ unsignableHeaders.add("content-type");
61
+ Object.keys(requestToSign.headers).map((header) => header.toLowerCase()).filter((header) => header.startsWith("x-amz-server-side-encryption")).forEach((header) => {
62
+ if (!hoistableHeaders.has(header)) {
63
+ unhoistableHeaders.add(header);
64
+ }
65
+ });
66
+ requestToSign.headers[SHA256_HEADER] = UNSIGNED_PAYLOAD;
67
+ const currentHostHeader = requestToSign.headers.host;
68
+ const port = requestToSign.port;
69
+ const expectedHostHeader = `${requestToSign.hostname}${requestToSign.port != null ? ":" + port : ""}`;
70
+ if (!currentHostHeader || currentHostHeader === requestToSign.hostname && requestToSign.port != null) {
71
+ requestToSign.headers.host = expectedHostHeader;
72
+ }
73
+ }
74
+ };
75
+
76
+ // ../../node_modules/.pnpm/@aws-sdk+s3-request-presigner@3.1125.0/node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js
77
+ var getSignedUrl = async (client, command, options = {}) => {
78
+ let s3Presigner;
79
+ let region;
80
+ if (typeof client.config.endpointProvider === "function") {
81
+ const endpointV2 = await getEndpointFromInstructions(command.input, command.constructor, client.config);
82
+ const authScheme = endpointV2.properties?.authSchemes?.[0];
83
+ if (authScheme?.name === "sigv4a") {
84
+ region = authScheme?.signingRegionSet?.join(",");
85
+ } else {
86
+ region = authScheme?.signingRegion;
87
+ }
88
+ s3Presigner = new S3RequestPresigner({
89
+ ...client.config,
90
+ signingName: authScheme?.signingName,
91
+ region: async () => region
92
+ });
93
+ } else {
94
+ s3Presigner = new S3RequestPresigner(client.config);
95
+ }
96
+ const presignInterceptMiddleware = (next, context) => async (args) => {
97
+ const { request } = args;
98
+ if (!HttpRequest.isInstance(request)) {
99
+ throw new Error("Request to be presigned is not an valid HTTP request.");
100
+ }
101
+ delete request.headers["amz-sdk-invocation-id"];
102
+ delete request.headers["amz-sdk-request"];
103
+ delete request.headers["x-amz-user-agent"];
104
+ let presigned2;
105
+ const presignerOptions = {
106
+ ...options,
107
+ signingRegion: options.signingRegion ?? context["signing_region"] ?? region,
108
+ signingService: options.signingService ?? context["signing_service"]
109
+ };
110
+ if (context.s3ExpressIdentity) {
111
+ presigned2 = await s3Presigner.presignWithCredentials(request, context.s3ExpressIdentity, presignerOptions);
112
+ } else {
113
+ presigned2 = await s3Presigner.presign(request, presignerOptions);
114
+ }
115
+ return {
116
+ response: {},
117
+ output: {
118
+ $metadata: { httpStatusCode: 200 },
119
+ presigned: presigned2
120
+ }
121
+ };
122
+ };
123
+ const middlewareName = "presignInterceptMiddleware";
124
+ const clientStack = client.middlewareStack.clone();
125
+ clientStack.addRelativeTo(presignInterceptMiddleware, {
126
+ name: middlewareName,
127
+ relation: "before",
128
+ toMiddleware: "awsAuthMiddleware",
129
+ override: true
130
+ });
131
+ const handler = command.resolveMiddleware(clientStack, client.config, {});
132
+ const { output } = await handler({ input: command.input });
133
+ const { presigned } = output;
134
+ return formatUrl(presigned);
135
+ };
136
+ export {
137
+ S3RequestPresigner,
138
+ getSignedUrl
139
+ };
@@ -0,0 +1,176 @@
1
+ import {
2
+ NodeHttpHandler
3
+ } from "./chunk-HOPZALAP.js";
4
+ import {
5
+ setCredentialFeature
6
+ } from "./chunk-N6IF5QLH.js";
7
+ import "./chunk-ODWAFTDP.js";
8
+ import {
9
+ CredentialsProviderError
10
+ } from "./chunk-HAABLEPO.js";
11
+ import {
12
+ HttpRequest,
13
+ parseRfc3339DateTime,
14
+ sdkStreamMixin
15
+ } from "./chunk-MACWQEJS.js";
16
+ import "./chunk-QGM4M3NI.js";
17
+
18
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.72/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js
19
+ import fs from "fs/promises";
20
+
21
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.72/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js
22
+ var ECS_CONTAINER_HOST = "169.254.170.2";
23
+ var EKS_CONTAINER_HOST_IPv4 = "169.254.170.23";
24
+ var EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]";
25
+ var checkUrl = (url, logger) => {
26
+ if (url.protocol === "https:") {
27
+ return;
28
+ }
29
+ if (url.hostname === ECS_CONTAINER_HOST || url.hostname === EKS_CONTAINER_HOST_IPv4 || url.hostname === EKS_CONTAINER_HOST_IPv6) {
30
+ return;
31
+ }
32
+ if (url.hostname.includes("[")) {
33
+ if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") {
34
+ return;
35
+ }
36
+ } else {
37
+ if (url.hostname === "localhost") {
38
+ return;
39
+ }
40
+ const ipComponents = url.hostname.split(".");
41
+ const inRange = (component) => {
42
+ const num = parseInt(component, 10);
43
+ return 0 <= num && num <= 255;
44
+ };
45
+ if (ipComponents[0] === "127" && inRange(ipComponents[1]) && inRange(ipComponents[2]) && inRange(ipComponents[3]) && ipComponents.length === 4) {
46
+ return;
47
+ }
48
+ }
49
+ throw new CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
50
+ - loopback CIDR 127.0.0.0/8 or [::1/128]
51
+ - ECS container host 169.254.170.2
52
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });
53
+ };
54
+
55
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.72/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js
56
+ function createGetRequest(url) {
57
+ return new HttpRequest({
58
+ protocol: url.protocol,
59
+ hostname: url.hostname,
60
+ port: Number(url.port),
61
+ path: url.pathname,
62
+ query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {
63
+ acc[k] = v;
64
+ return acc;
65
+ }, {}),
66
+ fragment: url.hash
67
+ });
68
+ }
69
+ async function getCredentials(response, logger) {
70
+ const stream = sdkStreamMixin(response.body);
71
+ const str = await stream.transformToString();
72
+ if (response.statusCode === 200) {
73
+ const parsed = JSON.parse(str);
74
+ if (typeof parsed.AccessKeyId !== "string" || typeof parsed.SecretAccessKey !== "string" || typeof parsed.Token !== "string" || typeof parsed.Expiration !== "string") {
75
+ throw new CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger });
76
+ }
77
+ return {
78
+ accessKeyId: parsed.AccessKeyId,
79
+ secretAccessKey: parsed.SecretAccessKey,
80
+ sessionToken: parsed.Token,
81
+ expiration: parseRfc3339DateTime(parsed.Expiration)
82
+ };
83
+ }
84
+ if (response.statusCode >= 400 && response.statusCode < 500) {
85
+ let parsedBody = {};
86
+ try {
87
+ parsedBody = JSON.parse(str);
88
+ } catch (e) {
89
+ }
90
+ throw Object.assign(new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {
91
+ Code: parsedBody.Code,
92
+ Message: parsedBody.Message
93
+ });
94
+ }
95
+ throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });
96
+ }
97
+
98
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.72/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/retry-wrapper.js
99
+ var retryWrapper = (toRetry, maxRetries, delayMs) => {
100
+ return async () => {
101
+ for (let i = 0; i < maxRetries; ++i) {
102
+ try {
103
+ return await toRetry();
104
+ } catch (e) {
105
+ await new Promise((resolve) => setTimeout(resolve, delayMs));
106
+ }
107
+ }
108
+ return await toRetry();
109
+ };
110
+ };
111
+
112
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.72/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js
113
+ var AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
114
+ var DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2";
115
+ var AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
116
+ var AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE";
117
+ var AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
118
+ var fromHttp = (options = {}) => {
119
+ options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
120
+ let host;
121
+ const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
122
+ const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];
123
+ const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];
124
+ const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];
125
+ const warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger?.warn ? console.warn : options.logger.warn.bind(options.logger);
126
+ if (relative && full) {
127
+ warn("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.");
128
+ warn("awsContainerCredentialsRelativeUri will take precedence.");
129
+ }
130
+ if (token && tokenFile) {
131
+ warn("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.");
132
+ warn("awsContainerAuthorizationTokenFile will take precedence.");
133
+ }
134
+ if (relative) {
135
+ host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;
136
+ } else if (full) {
137
+ host = full;
138
+ } else {
139
+ throw new CredentialsProviderError(`No HTTP credential provider host provided.
140
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });
141
+ }
142
+ const url = new URL(host);
143
+ checkUrl(url, options.logger);
144
+ const requestHandler = NodeHttpHandler.create({ connectionTimeout: options.timeout ?? 1e3 });
145
+ const requestTimeout = options.timeout ?? 1e3;
146
+ const provider = retryWrapper(async () => {
147
+ const request = createGetRequest(url);
148
+ if (tokenFile) {
149
+ request.headers.Authorization = validateToken((await fs.readFile(tokenFile)).toString());
150
+ } else if (token) {
151
+ request.headers.Authorization = validateToken(token);
152
+ }
153
+ try {
154
+ const result = await requestHandler.handle(request, { requestTimeout });
155
+ return getCredentials(result.response).then((creds) => setCredentialFeature(creds, "CREDENTIALS_HTTP", "z"));
156
+ } catch (e) {
157
+ throw new CredentialsProviderError(String(e), { logger: options.logger });
158
+ }
159
+ }, options.maxRetries ?? 3, options.timeout ?? 1e3);
160
+ return async () => {
161
+ try {
162
+ return await provider();
163
+ } finally {
164
+ requestHandler.destroy?.();
165
+ }
166
+ };
167
+ };
168
+ var validateToken = (token) => {
169
+ if (token.includes("\r\n")) {
170
+ throw new CredentialsProviderError("Authorization token contains invalid \\r\\n sequence.");
171
+ }
172
+ return token;
173
+ };
174
+ export {
175
+ fromHttp
176
+ };
@@ -0,0 +1,23 @@
1
+ import {
2
+ ENV_ACCOUNT_ID,
3
+ ENV_CREDENTIAL_SCOPE,
4
+ ENV_EXPIRATION,
5
+ ENV_KEY,
6
+ ENV_SECRET,
7
+ ENV_SESSION,
8
+ fromEnv
9
+ } from "./chunk-4XN2IRCG.js";
10
+ import "./chunk-N6IF5QLH.js";
11
+ import "./chunk-ODWAFTDP.js";
12
+ import "./chunk-HAABLEPO.js";
13
+ import "./chunk-MACWQEJS.js";
14
+ import "./chunk-QGM4M3NI.js";
15
+ export {
16
+ ENV_ACCOUNT_ID,
17
+ ENV_CREDENTIAL_SCOPE,
18
+ ENV_EXPIRATION,
19
+ ENV_KEY,
20
+ ENV_SECRET,
21
+ ENV_SESSION,
22
+ fromEnv
23
+ };
@@ -0,0 +1,221 @@
1
+ import {
2
+ setCredentialFeature
3
+ } from "./chunk-N6IF5QLH.js";
4
+ import "./chunk-ODWAFTDP.js";
5
+ import {
6
+ CredentialsProviderError,
7
+ chain,
8
+ getProfileName,
9
+ parseKnownFiles
10
+ } from "./chunk-HAABLEPO.js";
11
+ import "./chunk-MACWQEJS.js";
12
+ import "./chunk-QGM4M3NI.js";
13
+
14
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js
15
+ var resolveCredentialSource = (credentialSource, profileName, logger) => {
16
+ const sourceProvidersMap = {
17
+ EcsContainer: async (options) => {
18
+ const { fromHttp } = await import("./dist-es-NEADJWQM.js");
19
+ const { fromContainerMetadata } = await import("./dist-es-DS5SFRTK.js");
20
+ logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
21
+ return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
22
+ },
23
+ Ec2InstanceMetadata: async (options) => {
24
+ logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
25
+ const { fromInstanceMetadata } = await import("./dist-es-DS5SFRTK.js");
26
+ return async () => fromInstanceMetadata(options)().then(setNamedProvider);
27
+ },
28
+ Environment: async (options) => {
29
+ logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
30
+ const { fromEnv } = await import("./dist-es-S5FAFKBD.js");
31
+ return async () => fromEnv(options)().then(setNamedProvider);
32
+ }
33
+ };
34
+ if (credentialSource in sourceProvidersMap) {
35
+ return sourceProvidersMap[credentialSource];
36
+ } else {
37
+ throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });
38
+ }
39
+ };
40
+ var setNamedProvider = (creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p");
41
+
42
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js
43
+ var isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => {
44
+ return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger }));
45
+ };
46
+ var isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {
47
+ const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
48
+ if (withSourceProfile) {
49
+ logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);
50
+ }
51
+ return withSourceProfile;
52
+ };
53
+ var isCredentialSourceProfile = (arg, { profile, logger }) => {
54
+ const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined";
55
+ if (withProviderProfile) {
56
+ logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);
57
+ }
58
+ return withProviderProfile;
59
+ };
60
+ var resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData2) => {
61
+ options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
62
+ const profileData = profiles[profileName];
63
+ const { source_profile, region } = profileData;
64
+ if (!options.roleAssumer) {
65
+ const { getDefaultRoleAssumer } = await import("./sts-RBEOIBEJ.js");
66
+ options.roleAssumer = getDefaultRoleAssumer({
67
+ ...options.clientConfig,
68
+ credentialProviderLogger: options.logger,
69
+ parentClientConfig: {
70
+ ...callerClientConfig,
71
+ ...options?.parentClientConfig,
72
+ region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region
73
+ }
74
+ }, options.clientPlugins);
75
+ }
76
+ if (source_profile && source_profile in visitedProfiles) {
77
+ throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${getProfileName(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), { logger: options.logger });
78
+ }
79
+ options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
80
+ const sourceCredsProvider = source_profile ? resolveProfileData2(source_profile, profiles, options, callerClientConfig, {
81
+ ...visitedProfiles,
82
+ [source_profile]: true
83
+ }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();
84
+ if (isCredentialSourceWithoutRoleArn(profileData)) {
85
+ return sourceCredsProvider.then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
86
+ } else {
87
+ const params = {
88
+ RoleArn: profileData.role_arn,
89
+ RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,
90
+ ExternalId: profileData.external_id,
91
+ DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10)
92
+ };
93
+ const { mfa_serial } = profileData;
94
+ if (mfa_serial) {
95
+ if (!options.mfaCodeProvider) {
96
+ throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
97
+ }
98
+ params.SerialNumber = mfa_serial;
99
+ params.TokenCode = await options.mfaCodeProvider(mfa_serial);
100
+ }
101
+ const sourceCreds = await sourceCredsProvider;
102
+ return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
103
+ }
104
+ };
105
+ var isCredentialSourceWithoutRoleArn = (section) => {
106
+ return !section.role_arn && !!section.credential_source;
107
+ };
108
+
109
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js
110
+ var isLoginProfile = (data) => {
111
+ return Boolean(data && data.login_session);
112
+ };
113
+ var resolveLoginCredentials = async (profileName, options, callerClientConfig) => {
114
+ const { fromLoginCredentials } = await import("./dist-es-KMHWFNXI.js");
115
+ const credentials = await fromLoginCredentials({
116
+ ...options,
117
+ profile: profileName
118
+ })({ callerClientConfig });
119
+ return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
120
+ };
121
+
122
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js
123
+ var isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
124
+ var resolveProcessCredentials = async (options, profile) => {
125
+ const { fromProcess } = await import("./dist-es-F6WXDZQY.js");
126
+ const credentials = await fromProcess({
127
+ ...options,
128
+ profile
129
+ })();
130
+ return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_PROCESS", "v");
131
+ };
132
+
133
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js
134
+ var resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {
135
+ const { fromSSO } = await import("./dist-es-5DTOPEBY.js");
136
+ return fromSSO({
137
+ profile,
138
+ logger: options.logger,
139
+ parentClientConfig: options.parentClientConfig,
140
+ clientConfig: options.clientConfig
141
+ })({
142
+ callerClientConfig
143
+ }).then((creds) => {
144
+ if (profileData.sso_session) {
145
+ return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
146
+ } else {
147
+ return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
148
+ }
149
+ });
150
+ };
151
+ var isSsoProfile = (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");
152
+
153
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js
154
+ var isStaticCredsProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1;
155
+ var resolveStaticCredentials = async (profile, options) => {
156
+ options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
157
+ const credentials = {
158
+ accessKeyId: profile.aws_access_key_id,
159
+ secretAccessKey: profile.aws_secret_access_key,
160
+ sessionToken: profile.aws_session_token,
161
+ ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },
162
+ ...profile.aws_account_id && { accountId: profile.aws_account_id }
163
+ };
164
+ return setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
165
+ };
166
+
167
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js
168
+ var isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
169
+ var resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => {
170
+ const { fromTokenFile } = await import("./dist-es-BM4STLL5.js");
171
+ const credentials = await fromTokenFile({
172
+ webIdentityTokenFile: profile.web_identity_token_file,
173
+ roleArn: profile.role_arn,
174
+ roleSessionName: profile.role_session_name,
175
+ roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
176
+ logger: options.logger,
177
+ parentClientConfig: options.parentClientConfig
178
+ })({
179
+ callerClientConfig
180
+ });
181
+ return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q");
182
+ };
183
+
184
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js
185
+ var resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
186
+ const data = profiles[profileName];
187
+ if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
188
+ return resolveStaticCredentials(data, options);
189
+ }
190
+ if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
191
+ return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);
192
+ }
193
+ if (isStaticCredsProfile(data)) {
194
+ return resolveStaticCredentials(data, options);
195
+ }
196
+ if (isWebIdentityProfile(data)) {
197
+ return resolveWebIdentityCredentials(data, options, callerClientConfig);
198
+ }
199
+ if (isProcessProfile(data)) {
200
+ return resolveProcessCredentials(options, profileName);
201
+ }
202
+ if (isSsoProfile(data)) {
203
+ return await resolveSsoCredentials(profileName, data, options, callerClientConfig);
204
+ }
205
+ if (isLoginProfile(data)) {
206
+ return resolveLoginCredentials(profileName, options, callerClientConfig);
207
+ }
208
+ throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
209
+ };
210
+
211
+ // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js
212
+ var fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {
213
+ init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
214
+ const profiles = await parseKnownFiles(init);
215
+ return resolveProfileData(getProfileName({
216
+ profile: init.profile ?? callerClientConfig?.profile
217
+ }), profiles, init, callerClientConfig);
218
+ };
219
+ export {
220
+ fromIni
221
+ };
@@ -0,0 +1,43 @@
1
+ import {
2
+ EventStreamCodec,
3
+ EventStreamMarshaller,
4
+ EventStreamMarshaller2,
5
+ EventStreamSerde,
6
+ HeaderMarshaller,
7
+ Int64,
8
+ MessageDecoderStream,
9
+ MessageEncoderStream,
10
+ SmithyMessageDecoderStream,
11
+ SmithyMessageEncoderStream,
12
+ eventStreamSerdeProvider,
13
+ eventStreamSerdeProvider2,
14
+ getChunkedStream,
15
+ getMessageUnmarshaller,
16
+ getUnmarshalledStream,
17
+ iterableToReadableStream,
18
+ readableStreamToIterable,
19
+ resolveEventStreamSerdeConfig
20
+ } from "./chunk-FUTLPXFR.js";
21
+ import "./chunk-MYOADNR2.js";
22
+ import "./chunk-MACWQEJS.js";
23
+ import "./chunk-QGM4M3NI.js";
24
+ export {
25
+ EventStreamCodec,
26
+ EventStreamMarshaller2 as EventStreamMarshaller,
27
+ EventStreamSerde,
28
+ HeaderMarshaller,
29
+ Int64,
30
+ MessageDecoderStream,
31
+ MessageEncoderStream,
32
+ SmithyMessageDecoderStream,
33
+ SmithyMessageEncoderStream,
34
+ EventStreamMarshaller as UniversalEventStreamMarshaller,
35
+ eventStreamSerdeProvider2 as eventStreamSerdeProvider,
36
+ getChunkedStream,
37
+ getMessageUnmarshaller,
38
+ getUnmarshalledStream,
39
+ iterableToReadableStream,
40
+ readableStreamToIterable,
41
+ resolveEventStreamSerdeConfig,
42
+ eventStreamSerdeProvider as universalEventStreamSerdeProvider
43
+ };