@larkup/cli 0.3.19 → 0.3.21
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.
- package/dist/{analytics-store-4EI56OLE.js → analytics-store-UU5MX3JA.js} +1 -1
- package/dist/bowser-KBMRPWZW.js +2100 -0
- package/dist/{chunk-OSTTFYPX.js → chunk-2PEO3NCV.js} +4 -4
- package/dist/{chunk-GYXT77I3.js → chunk-2QOWBHZK.js} +10 -10
- package/dist/{chunk-DTRGAEFR.js → chunk-4SOSQVIA.js} +4 -4
- package/dist/{chunk-HYYSI5FE.js → chunk-5YXDD2GC.js} +183 -174
- package/dist/{chunk-DT2STGSS.js → chunk-6B7OTI2Y.js} +2 -2
- package/dist/{chunk-TFGGCUFR.js → chunk-D3H2VEHZ.js} +7 -7
- package/dist/{chunk-VZAREDRR.js → chunk-EFPXIMED.js} +3 -3
- package/dist/{chunk-PFTSXAZG.js → chunk-FDCIUBLI.js} +46 -27
- package/dist/{chunk-6HRBZ7QP.js → chunk-G5BURVQB.js} +3 -3
- package/dist/{chunk-ZH2A3TFQ.js → chunk-HTNZPVID.js} +99 -1154
- package/dist/{chunk-YOPP3ETL.js → chunk-JAIHHTKN.js} +111 -80
- package/dist/{chunk-54YIZOXQ.js → chunk-PTQR3VCA.js} +58 -26
- package/dist/{chunk-CUA3FHFQ.js → chunk-RUMUOFC7.js} +39 -26
- package/dist/{chunk-6VBJAFWY.js → chunk-RV756WXU.js} +85 -70
- package/dist/{chunk-FMBWCTFV.js → chunk-WSDGBXA3.js} +1223 -77
- package/dist/{dist-es-PY4YS7TC.js → dist-es-27PHRDP5.js} +7 -7
- package/dist/{dist-es-FEVR73CQ.js → dist-es-2OQPXBWH.js} +8 -8
- package/dist/{dist-es-CM7567P2.js → dist-es-DXUGAPLS.js} +8 -8
- package/dist/{dist-es-3SVFRI6P.js → dist-es-I2CSW44W.js} +248 -232
- package/dist/{dist-es-M6OXVHSI.js → dist-es-MNMQ7EY7.js} +2 -2
- package/dist/{dist-es-OB4H2RSG.js → dist-es-OOS7VNC3.js} +10 -10
- package/dist/{dist-es-ZDCXFYRX.js → dist-es-P55SOOJS.js} +5 -5
- package/dist/{dist-es-DC3KLBPR.js → dist-es-TVPOX7SI.js} +9 -9
- package/dist/{dist-es-IS5PH45I.js → dist-es-YACWQ6TD.js} +54 -37
- package/dist/{dist-es-KY7QTIEX.js → dist-es-ZM2PC6Y7.js} +22 -22
- package/dist/{event-streams-KOWL2S4G.js → event-streams-7VYAXCGO.js} +3 -3
- package/dist/index.js +11 -11
- package/dist/{loadSso-OLMNBQ4H.js → loadSso-MPKJCJHV.js} +23 -23
- package/dist/{signin-NBTUJ5KD.js → signin-WY5DIZ6I.js} +33 -26
- package/dist/{sso-oidc-WNK6HQX7.js → sso-oidc-6P6INS3W.js} +25 -25
- package/dist/{sts-TGY2Y4DZ.js → sts-2EDS5GKI.js} +28 -28
- package/dist/{tool-loader-SOIT6ZYY.js → tool-loader-LURY25XY.js} +2 -2
- package/dist/{tool-registry-SNMN6NUP.js → tool-registry-I7553RRN.js} +1 -1
- package/package.json +3 -3
- package/dist/bowser-GZLEN3PD.js +0 -2821
- /package/dist/{chunk-SMQUSHD4.js → chunk-OXX5AQPP.js} +0 -0
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
CredentialsProviderError,
|
|
3
3
|
ProviderError,
|
|
4
4
|
loadConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WSDGBXA3.js";
|
|
6
6
|
import {
|
|
7
7
|
parseUrl
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5YXDD2GC.js";
|
|
9
9
|
import "./chunk-QGM4M3NI.js";
|
|
10
10
|
|
|
11
11
|
// ../../node_modules/.pnpm/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NodeHttpHandler
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PTQR3VCA.js";
|
|
4
4
|
import {
|
|
5
5
|
setCredentialFeature
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-RV756WXU.js";
|
|
7
|
+
import "./chunk-JAIHHTKN.js";
|
|
8
8
|
import {
|
|
9
9
|
CredentialsProviderError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WSDGBXA3.js";
|
|
11
11
|
import {
|
|
12
12
|
HttpRequest,
|
|
13
13
|
parseRfc3339DateTime,
|
|
14
14
|
sdkStreamMixin
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5YXDD2GC.js";
|
|
16
16
|
import "./chunk-QGM4M3NI.js";
|
|
17
17
|
|
|
18
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.
|
|
18
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.82/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js
|
|
19
19
|
import fs from "fs/promises";
|
|
20
20
|
|
|
21
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.
|
|
21
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.82/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js
|
|
22
22
|
var ECS_CONTAINER_HOST = "169.254.170.2";
|
|
23
23
|
var EKS_CONTAINER_HOST_IPv4 = "169.254.170.23";
|
|
24
24
|
var EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]";
|
|
@@ -52,7 +52,7 @@ var checkUrl = (url, logger) => {
|
|
|
52
52
|
- EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.
|
|
55
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.82/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js
|
|
56
56
|
function createGetRequest(url) {
|
|
57
57
|
return new HttpRequest({
|
|
58
58
|
protocol: url.protocol,
|
|
@@ -95,7 +95,7 @@ async function getCredentials(response, logger) {
|
|
|
95
95
|
throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.
|
|
98
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.82/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/retry-wrapper.js
|
|
99
99
|
var retryWrapper = (toRetry, maxRetries, delayMs) => {
|
|
100
100
|
return async () => {
|
|
101
101
|
for (let i = 0; i < maxRetries; ++i) {
|
|
@@ -109,7 +109,7 @@ var retryWrapper = (toRetry, maxRetries, delayMs) => {
|
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.
|
|
112
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-http@3.972.82/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js
|
|
113
113
|
var AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
|
|
114
114
|
var DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2";
|
|
115
115
|
var AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
ENV_SECRET,
|
|
7
7
|
ENV_SESSION,
|
|
8
8
|
fromEnv
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-EFPXIMED.js";
|
|
10
|
+
import "./chunk-RV756WXU.js";
|
|
11
|
+
import "./chunk-JAIHHTKN.js";
|
|
12
|
+
import "./chunk-WSDGBXA3.js";
|
|
13
|
+
import "./chunk-5YXDD2GC.js";
|
|
14
14
|
import "./chunk-QGM4M3NI.js";
|
|
15
15
|
export {
|
|
16
16
|
ENV_ACCOUNT_ID,
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G5BURVQB.js";
|
|
4
4
|
import {
|
|
5
5
|
SignatureV4MultiRegion
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-4SOSQVIA.js";
|
|
7
|
+
import "./chunk-RUMUOFC7.js";
|
|
8
8
|
import {
|
|
9
9
|
getEndpointFromInstructions
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-JAIHHTKN.js";
|
|
11
|
+
import "./chunk-WSDGBXA3.js";
|
|
12
12
|
import {
|
|
13
13
|
HttpRequest
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5YXDD2GC.js";
|
|
15
15
|
import "./chunk-QGM4M3NI.js";
|
|
16
16
|
|
|
17
|
-
// ../../node_modules/.pnpm/@aws-sdk+s3-request-presigner@3.
|
|
17
|
+
// ../../node_modules/.pnpm/@aws-sdk+s3-request-presigner@3.1161.0/node_modules/@aws-sdk/s3-request-presigner/dist-es/constants.js
|
|
18
18
|
var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";
|
|
19
19
|
var SHA256_HEADER = "X-Amz-Content-Sha256";
|
|
20
20
|
|
|
21
|
-
// ../../node_modules/.pnpm/@aws-sdk+s3-request-presigner@3.
|
|
21
|
+
// ../../node_modules/.pnpm/@aws-sdk+s3-request-presigner@3.1161.0/node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js
|
|
22
22
|
var S3RequestPresigner = class {
|
|
23
23
|
signer;
|
|
24
24
|
constructor(options) {
|
|
@@ -73,7 +73,7 @@ var S3RequestPresigner = class {
|
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
// ../../node_modules/.pnpm/@aws-sdk+s3-request-presigner@3.
|
|
76
|
+
// ../../node_modules/.pnpm/@aws-sdk+s3-request-presigner@3.1161.0/node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js
|
|
77
77
|
var getSignedUrl = async (client, command, options = {}) => {
|
|
78
78
|
let s3Presigner;
|
|
79
79
|
let region;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
setCredentialFeature
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RV756WXU.js";
|
|
4
|
+
import "./chunk-JAIHHTKN.js";
|
|
5
5
|
import {
|
|
6
6
|
CredentialsProviderError,
|
|
7
7
|
TokenProviderError,
|
|
@@ -10,20 +10,20 @@ import {
|
|
|
10
10
|
getSSOTokenFromFile,
|
|
11
11
|
loadSsoSessionData,
|
|
12
12
|
parseKnownFiles
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-WSDGBXA3.js";
|
|
14
|
+
import "./chunk-5YXDD2GC.js";
|
|
15
15
|
import "./chunk-QGM4M3NI.js";
|
|
16
16
|
|
|
17
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.973.
|
|
17
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.973.24/node_modules/@aws-sdk/credential-provider-sso/dist-es/isSsoProfile.js
|
|
18
18
|
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");
|
|
19
19
|
|
|
20
|
-
// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.
|
|
20
|
+
// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.1161.0/node_modules/@aws-sdk/token-providers/dist-es/constants.js
|
|
21
21
|
var EXPIRE_WINDOW_MS = 5 * 60 * 1e3;
|
|
22
22
|
var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
|
|
23
23
|
|
|
24
|
-
// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.
|
|
24
|
+
// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.1161.0/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js
|
|
25
25
|
var getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
|
|
26
|
-
const { SSOOIDCClient } = await import("./sso-oidc-
|
|
26
|
+
const { SSOOIDCClient } = await import("./sso-oidc-6P6INS3W.js");
|
|
27
27
|
const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
|
|
28
28
|
const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
|
|
29
29
|
region: ssoRegion ?? init.clientConfig?.region,
|
|
@@ -33,9 +33,9 @@ var getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
|
|
|
33
33
|
return ssoOidcClient;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.
|
|
36
|
+
// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.1161.0/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js
|
|
37
37
|
var getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
|
|
38
|
-
const { CreateTokenCommand } = await import("./sso-oidc-
|
|
38
|
+
const { CreateTokenCommand } = await import("./sso-oidc-6P6INS3W.js");
|
|
39
39
|
const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);
|
|
40
40
|
return ssoOidcClient.send(new CreateTokenCommand({
|
|
41
41
|
clientId: ssoToken.clientId,
|
|
@@ -45,21 +45,21 @@ var getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConf
|
|
|
45
45
|
}));
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.
|
|
48
|
+
// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.1161.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js
|
|
49
49
|
var validateTokenExpiry = (token) => {
|
|
50
50
|
if (token.expiration && token.expiration.getTime() < Date.now()) {
|
|
51
51
|
throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.
|
|
55
|
+
// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.1161.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js
|
|
56
56
|
var validateTokenKey = (key, value, forRefresh = false) => {
|
|
57
57
|
if (typeof value === "undefined") {
|
|
58
58
|
throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.
|
|
62
|
+
// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.1161.0/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js
|
|
63
63
|
import { promises as fsPromises } from "fs";
|
|
64
64
|
var { writeFile } = fsPromises;
|
|
65
65
|
var writeSSOTokenToFile = (id, ssoToken) => {
|
|
@@ -68,8 +68,9 @@ var writeSSOTokenToFile = (id, ssoToken) => {
|
|
|
68
68
|
return writeFile(tokenFilepath, tokenString);
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.
|
|
71
|
+
// ../../node_modules/.pnpm/@aws-sdk+token-providers@3.1161.0/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js
|
|
72
72
|
var lastRefreshAttemptTimes = /* @__PURE__ */ new Map();
|
|
73
|
+
var inFlightRefreshes = /* @__PURE__ */ new Map();
|
|
73
74
|
var fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
74
75
|
init.logger?.debug("@aws-sdk/token-providers - fromSso");
|
|
75
76
|
const profiles = await parseKnownFiles(init);
|
|
@@ -83,6 +84,10 @@ var fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
|
83
84
|
throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
|
|
84
85
|
}
|
|
85
86
|
const ssoSessionName = profile["sso_session"];
|
|
87
|
+
const inFlightRefresh = inFlightRefreshes.get(ssoSessionName);
|
|
88
|
+
if (inFlightRefresh) {
|
|
89
|
+
return await inFlightRefresh;
|
|
90
|
+
}
|
|
86
91
|
const ssoSessions = await loadSsoSessionData(init);
|
|
87
92
|
const ssoSession = ssoSessions[ssoSessionName];
|
|
88
93
|
if (!ssoSession) {
|
|
@@ -111,6 +116,10 @@ var fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
|
111
116
|
if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
|
|
112
117
|
return existingToken;
|
|
113
118
|
}
|
|
119
|
+
const inFlightRefreshAfterReadingToken = inFlightRefreshes.get(ssoSessionName);
|
|
120
|
+
if (inFlightRefreshAfterReadingToken) {
|
|
121
|
+
return await inFlightRefreshAfterReadingToken;
|
|
122
|
+
}
|
|
114
123
|
const lastRefreshAttemptTime = lastRefreshAttemptTimes.get(ssoSessionName) ?? 0;
|
|
115
124
|
if (Date.now() - lastRefreshAttemptTime < 30 * 1e3) {
|
|
116
125
|
validateTokenExpiry(existingToken);
|
|
@@ -119,32 +128,40 @@ var fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
|
119
128
|
validateTokenKey("clientId", ssoToken.clientId, true);
|
|
120
129
|
validateTokenKey("clientSecret", ssoToken.clientSecret, true);
|
|
121
130
|
validateTokenKey("refreshToken", ssoToken.refreshToken, true);
|
|
122
|
-
|
|
123
|
-
lastRefreshAttemptTimes.set(ssoSessionName, Date.now());
|
|
124
|
-
const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
|
|
125
|
-
validateTokenKey("accessToken", newSsoOidcToken.accessToken);
|
|
126
|
-
validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
|
|
127
|
-
const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);
|
|
131
|
+
const refresh = (async () => {
|
|
128
132
|
try {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
lastRefreshAttemptTimes.set(ssoSessionName, Date.now());
|
|
134
|
+
const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
|
|
135
|
+
validateTokenKey("accessToken", newSsoOidcToken.accessToken);
|
|
136
|
+
validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
|
|
137
|
+
const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);
|
|
138
|
+
try {
|
|
139
|
+
await writeSSOTokenToFile(ssoSessionName, {
|
|
140
|
+
...ssoToken,
|
|
141
|
+
accessToken: newSsoOidcToken.accessToken,
|
|
142
|
+
expiresAt: newTokenExpiration.toISOString(),
|
|
143
|
+
refreshToken: newSsoOidcToken.refreshToken
|
|
144
|
+
});
|
|
145
|
+
} catch (error) {
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
token: newSsoOidcToken.accessToken,
|
|
149
|
+
expiration: newTokenExpiration
|
|
150
|
+
};
|
|
135
151
|
} catch (error) {
|
|
152
|
+
validateTokenExpiry(existingToken);
|
|
153
|
+
return existingToken;
|
|
136
154
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return existingToken;
|
|
155
|
+
})();
|
|
156
|
+
inFlightRefreshes.set(ssoSessionName, refresh);
|
|
157
|
+
try {
|
|
158
|
+
return await refresh;
|
|
159
|
+
} finally {
|
|
160
|
+
inFlightRefreshes.delete(ssoSessionName);
|
|
144
161
|
}
|
|
145
162
|
};
|
|
146
163
|
|
|
147
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.973.
|
|
164
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.973.24/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js
|
|
148
165
|
var SHOULD_FAIL_CREDENTIAL_CHAIN = false;
|
|
149
166
|
var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger }) => {
|
|
150
167
|
let token;
|
|
@@ -187,7 +204,7 @@ var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoR
|
|
|
187
204
|
});
|
|
188
205
|
}
|
|
189
206
|
const { accessToken } = token;
|
|
190
|
-
const { SSOClient, GetRoleCredentialsCommand } = await import("./loadSso-
|
|
207
|
+
const { SSOClient, GetRoleCredentialsCommand } = await import("./loadSso-MPKJCJHV.js");
|
|
191
208
|
const sso = ssoClient || new SSOClient(Object.assign({}, clientConfig ?? {}, {
|
|
192
209
|
logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,
|
|
193
210
|
region: clientConfig?.region ?? ssoRegion,
|
|
@@ -229,7 +246,7 @@ var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoR
|
|
|
229
246
|
return credentials;
|
|
230
247
|
};
|
|
231
248
|
|
|
232
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.973.
|
|
249
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.973.24/node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js
|
|
233
250
|
var validateSsoProfile = (profile, logger) => {
|
|
234
251
|
const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
|
|
235
252
|
if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
|
|
@@ -239,7 +256,7 @@ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.ht
|
|
|
239
256
|
return profile;
|
|
240
257
|
};
|
|
241
258
|
|
|
242
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.973.
|
|
259
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-sso@3.973.24/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js
|
|
243
260
|
var fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
244
261
|
init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
|
|
245
262
|
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
2
|
setCredentialFeature
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RV756WXU.js";
|
|
4
|
+
import "./chunk-JAIHHTKN.js";
|
|
5
5
|
import {
|
|
6
6
|
CredentialsProviderError,
|
|
7
7
|
chain,
|
|
8
8
|
getProfileName,
|
|
9
9
|
parseKnownFiles
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-WSDGBXA3.js";
|
|
11
|
+
import "./chunk-5YXDD2GC.js";
|
|
12
12
|
import "./chunk-QGM4M3NI.js";
|
|
13
13
|
|
|
14
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.
|
|
14
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.25/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js
|
|
15
15
|
var resolveCredentialSource = (credentialSource, profileName, logger) => {
|
|
16
16
|
const sourceProvidersMap = {
|
|
17
17
|
EcsContainer: async (options) => {
|
|
18
|
-
const { fromHttp } = await import("./dist-es-
|
|
19
|
-
const { fromContainerMetadata } = await import("./dist-es-
|
|
18
|
+
const { fromHttp } = await import("./dist-es-OOS7VNC3.js");
|
|
19
|
+
const { fromContainerMetadata } = await import("./dist-es-MNMQ7EY7.js");
|
|
20
20
|
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
|
|
21
21
|
return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
|
|
22
22
|
},
|
|
23
23
|
Ec2InstanceMetadata: async (options) => {
|
|
24
24
|
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
|
|
25
|
-
const { fromInstanceMetadata } = await import("./dist-es-
|
|
25
|
+
const { fromInstanceMetadata } = await import("./dist-es-MNMQ7EY7.js");
|
|
26
26
|
return async () => fromInstanceMetadata(options)().then(setNamedProvider);
|
|
27
27
|
},
|
|
28
28
|
Environment: async (options) => {
|
|
29
29
|
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
|
|
30
|
-
const { fromEnv } = await import("./dist-es-
|
|
30
|
+
const { fromEnv } = await import("./dist-es-P55SOOJS.js");
|
|
31
31
|
return async () => fromEnv(options)().then(setNamedProvider);
|
|
32
32
|
}
|
|
33
33
|
};
|
|
@@ -39,7 +39,7 @@ var resolveCredentialSource = (credentialSource, profileName, logger) => {
|
|
|
39
39
|
};
|
|
40
40
|
var setNamedProvider = (creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p");
|
|
41
41
|
|
|
42
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.
|
|
42
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.25/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js
|
|
43
43
|
var isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => {
|
|
44
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
45
|
};
|
|
@@ -62,7 +62,7 @@ var resolveAssumeRoleCredentials = async (profileName, profiles, options, caller
|
|
|
62
62
|
const profileData = profiles[profileName];
|
|
63
63
|
const { source_profile, region } = profileData;
|
|
64
64
|
if (!options.roleAssumer) {
|
|
65
|
-
const { getDefaultRoleAssumer } = await import("./sts-
|
|
65
|
+
const { getDefaultRoleAssumer } = await import("./sts-2EDS5GKI.js");
|
|
66
66
|
options.roleAssumer = getDefaultRoleAssumer({
|
|
67
67
|
...options.clientConfig,
|
|
68
68
|
credentialProviderLogger: options.logger,
|
|
@@ -106,12 +106,12 @@ var isCredentialSourceWithoutRoleArn = (section) => {
|
|
|
106
106
|
return !section.role_arn && !!section.credential_source;
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.
|
|
109
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.25/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js
|
|
110
110
|
var isLoginProfile = (data) => {
|
|
111
111
|
return Boolean(data && data.login_session);
|
|
112
112
|
};
|
|
113
113
|
var resolveLoginCredentials = async (profileName, options, callerClientConfig) => {
|
|
114
|
-
const { fromLoginCredentials } = await import("./dist-es-
|
|
114
|
+
const { fromLoginCredentials } = await import("./dist-es-27PHRDP5.js");
|
|
115
115
|
const credentials = await fromLoginCredentials({
|
|
116
116
|
...options,
|
|
117
117
|
profile: profileName
|
|
@@ -119,10 +119,10 @@ var resolveLoginCredentials = async (profileName, options, callerClientConfig) =
|
|
|
119
119
|
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
|
|
120
120
|
};
|
|
121
121
|
|
|
122
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.
|
|
122
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.25/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js
|
|
123
123
|
var isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
|
|
124
124
|
var resolveProcessCredentials = async (options, profile) => {
|
|
125
|
-
const { fromProcess } = await import("./dist-es-
|
|
125
|
+
const { fromProcess } = await import("./dist-es-DXUGAPLS.js");
|
|
126
126
|
const credentials = await fromProcess({
|
|
127
127
|
...options,
|
|
128
128
|
profile
|
|
@@ -130,9 +130,9 @@ var resolveProcessCredentials = async (options, profile) => {
|
|
|
130
130
|
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_PROCESS", "v");
|
|
131
131
|
};
|
|
132
132
|
|
|
133
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.
|
|
133
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.25/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js
|
|
134
134
|
var resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {
|
|
135
|
-
const { fromSSO } = await import("./dist-es-
|
|
135
|
+
const { fromSSO } = await import("./dist-es-YACWQ6TD.js");
|
|
136
136
|
return fromSSO({
|
|
137
137
|
profile,
|
|
138
138
|
logger: options.logger,
|
|
@@ -150,7 +150,7 @@ var resolveSsoCredentials = async (profile, profileData, options = {}, callerCli
|
|
|
150
150
|
};
|
|
151
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
152
|
|
|
153
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.
|
|
153
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.25/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js
|
|
154
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
155
|
var resolveStaticCredentials = async (profile, options) => {
|
|
156
156
|
options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
|
|
@@ -164,10 +164,10 @@ var resolveStaticCredentials = async (profile, options) => {
|
|
|
164
164
|
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.
|
|
167
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.25/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js
|
|
168
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
169
|
var resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => {
|
|
170
|
-
const { fromTokenFile } = await import("./dist-es-
|
|
170
|
+
const { fromTokenFile } = await import("./dist-es-2OQPXBWH.js");
|
|
171
171
|
const credentials = await fromTokenFile({
|
|
172
172
|
webIdentityTokenFile: profile.web_identity_token_file,
|
|
173
173
|
roleArn: profile.role_arn,
|
|
@@ -181,7 +181,7 @@ var resolveWebIdentityCredentials = async (profile, options, callerClientConfig)
|
|
|
181
181
|
return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q");
|
|
182
182
|
};
|
|
183
183
|
|
|
184
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.
|
|
184
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.25/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js
|
|
185
185
|
var resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
|
|
186
186
|
const data = profiles[profileName];
|
|
187
187
|
if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
|
|
@@ -208,7 +208,7 @@ var resolveProfileData = async (profileName, profiles, options, callerClientConf
|
|
|
208
208
|
throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
|
|
209
209
|
};
|
|
210
210
|
|
|
211
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.
|
|
211
|
+
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.25/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js
|
|
212
212
|
var fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
213
213
|
init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
|
|
214
214
|
const profiles = await parseKnownFiles(init);
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
iterableToReadableStream,
|
|
18
18
|
readableStreamToIterable,
|
|
19
19
|
resolveEventStreamSerdeConfig
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-FDCIUBLI.js";
|
|
21
|
+
import "./chunk-2QOWBHZK.js";
|
|
22
|
+
import "./chunk-5YXDD2GC.js";
|
|
23
23
|
import "./chunk-QGM4M3NI.js";
|
|
24
24
|
export {
|
|
25
25
|
EventStreamCodec,
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
isToolInstalled,
|
|
7
7
|
loadTool,
|
|
8
8
|
uninstallTool
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2PEO3NCV.js";
|
|
10
10
|
import {
|
|
11
11
|
ALL_MODELS,
|
|
12
12
|
DEFAULT_CONFIG,
|
|
@@ -21,14 +21,14 @@ import {
|
|
|
21
21
|
runWithProject,
|
|
22
22
|
setActiveProject,
|
|
23
23
|
trackUsageEvent
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-OXX5AQPP.js";
|
|
25
25
|
import {
|
|
26
26
|
workspaceHost
|
|
27
27
|
} from "./chunk-MEYK3O6D.js";
|
|
28
28
|
import {
|
|
29
29
|
getAllTools,
|
|
30
30
|
getToolById
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-6B7OTI2Y.js";
|
|
32
32
|
import {
|
|
33
33
|
__require
|
|
34
34
|
} from "./chunk-QGM4M3NI.js";
|
|
@@ -39,7 +39,7 @@ import { Command } from "commander";
|
|
|
39
39
|
// package.json
|
|
40
40
|
var package_default = {
|
|
41
41
|
name: "@larkup/cli",
|
|
42
|
-
version: "0.3.
|
|
42
|
+
version: "0.3.21",
|
|
43
43
|
engines: {
|
|
44
44
|
node: ">=22"
|
|
45
45
|
},
|
|
@@ -4316,7 +4316,7 @@ async function embedTexts(config, texts, abortSignal) {
|
|
|
4316
4316
|
...abortSignal ? { abortSignal } : {}
|
|
4317
4317
|
});
|
|
4318
4318
|
const totalTokens = texts.reduce((acc, t) => acc + Math.ceil(t.length / 4), 0);
|
|
4319
|
-
const { trackUsageEvent: trackUsageEvent2, estimateCost: estimateCost2 } = await import("./analytics-store-
|
|
4319
|
+
const { trackUsageEvent: trackUsageEvent2, estimateCost: estimateCost2 } = await import("./analytics-store-UU5MX3JA.js");
|
|
4320
4320
|
await trackUsageEvent2({
|
|
4321
4321
|
type: "embedding",
|
|
4322
4322
|
embeddingModelId: config.embeddingModelId,
|
|
@@ -5089,7 +5089,7 @@ var S3StorageProvider = class {
|
|
|
5089
5089
|
}
|
|
5090
5090
|
async client() {
|
|
5091
5091
|
if (!this._client) {
|
|
5092
|
-
const { S3Client } = await import("./dist-es-
|
|
5092
|
+
const { S3Client } = await import("./dist-es-I2CSW44W.js");
|
|
5093
5093
|
this._client = new S3Client({
|
|
5094
5094
|
region: this.region,
|
|
5095
5095
|
...this._credentials ? { credentials: this._credentials } : {}
|
|
@@ -5108,7 +5108,7 @@ var S3StorageProvider = class {
|
|
|
5108
5108
|
return { bucket: withoutScheme.slice(0, slashIndex), key: withoutScheme.slice(slashIndex + 1) };
|
|
5109
5109
|
}
|
|
5110
5110
|
async store(key, data, mimeType) {
|
|
5111
|
-
const { PutObjectCommand } = await import("./dist-es-
|
|
5111
|
+
const { PutObjectCommand } = await import("./dist-es-I2CSW44W.js");
|
|
5112
5112
|
const client = await this.client();
|
|
5113
5113
|
const objectKey = this.objectKey(key);
|
|
5114
5114
|
await client.send(
|
|
@@ -5126,7 +5126,7 @@ var S3StorageProvider = class {
|
|
|
5126
5126
|
return this.store(key, await fs9.readFile(sourcePath), mimeType);
|
|
5127
5127
|
}
|
|
5128
5128
|
async retrieve(uri) {
|
|
5129
|
-
const { GetObjectCommand } = await import("./dist-es-
|
|
5129
|
+
const { GetObjectCommand } = await import("./dist-es-I2CSW44W.js");
|
|
5130
5130
|
const { bucket, key } = this.parseUri(uri);
|
|
5131
5131
|
const client = await this.client();
|
|
5132
5132
|
const response = await client.send(new GetObjectCommand({ Bucket: bucket, Key: key }));
|
|
@@ -5142,8 +5142,8 @@ var S3StorageProvider = class {
|
|
|
5142
5142
|
return void 0;
|
|
5143
5143
|
}
|
|
5144
5144
|
async getReadUrl(uri, expiresInSecs) {
|
|
5145
|
-
const { GetObjectCommand } = await import("./dist-es-
|
|
5146
|
-
const { getSignedUrl } = await import("./dist-es-
|
|
5145
|
+
const { GetObjectCommand } = await import("./dist-es-I2CSW44W.js");
|
|
5146
|
+
const { getSignedUrl } = await import("./dist-es-TVPOX7SI.js");
|
|
5147
5147
|
const { bucket, key } = this.parseUri(uri);
|
|
5148
5148
|
const client = await this.client();
|
|
5149
5149
|
return getSignedUrl(client, new GetObjectCommand({ Bucket: bucket, Key: key }), {
|
|
@@ -5151,7 +5151,7 @@ var S3StorageProvider = class {
|
|
|
5151
5151
|
});
|
|
5152
5152
|
}
|
|
5153
5153
|
async delete(uri) {
|
|
5154
|
-
const { DeleteObjectCommand } = await import("./dist-es-
|
|
5154
|
+
const { DeleteObjectCommand } = await import("./dist-es-I2CSW44W.js");
|
|
5155
5155
|
const { bucket, key } = this.parseUri(uri);
|
|
5156
5156
|
const client = await this.client();
|
|
5157
5157
|
try {
|