skill-tree 0.3.0 → 0.3.1

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 (90) hide show
  1. package/package.json +1 -1
  2. package/dist/bowser-XBWM4HVL.mjs +0 -2821
  3. package/dist/chunk-3MV4GQ3N.mjs +0 -19
  4. package/dist/chunk-3SRB47JW.mjs +0 -8344
  5. package/dist/chunk-43YOKLZP.mjs +0 -6081
  6. package/dist/chunk-4AGZU52D.mjs +0 -7918
  7. package/dist/chunk-4HXHCEFH.mjs +0 -9157
  8. package/dist/chunk-4OC5QFIF.mjs +0 -11267
  9. package/dist/chunk-4TFMKAVC.mjs +0 -1225
  10. package/dist/chunk-55SMGVTP.mjs +0 -7126
  11. package/dist/chunk-6AZMD3Q3.mjs +0 -1243
  12. package/dist/chunk-6FX4IK4Z.mjs +0 -5368
  13. package/dist/chunk-6UPDN5QM.mjs +0 -163
  14. package/dist/chunk-7EGDKOHV.mjs +0 -9439
  15. package/dist/chunk-7IHYDFWW.mjs +0 -163
  16. package/dist/chunk-7LMOQW5H.mjs +0 -4893
  17. package/dist/chunk-7QIQJVNP.mjs +0 -14206
  18. package/dist/chunk-7VB4ZRZO.mjs +0 -7127
  19. package/dist/chunk-A3SILZYX.mjs +0 -8360
  20. package/dist/chunk-BPVRW25O.mjs +0 -6089
  21. package/dist/chunk-CI4476KM.mjs +0 -6607
  22. package/dist/chunk-DDXYQ74I.mjs +0 -13969
  23. package/dist/chunk-DQOFJXBX.mjs +0 -6595
  24. package/dist/chunk-E2CVK23F.mjs +0 -8751
  25. package/dist/chunk-F3YEUQAP.mjs +0 -654
  26. package/dist/chunk-FKJJ4RJG.mjs +0 -13874
  27. package/dist/chunk-GBIK7WMX.mjs +0 -9293
  28. package/dist/chunk-GFK5SZRJ.mjs +0 -580
  29. package/dist/chunk-II7DECZQ.mjs +0 -9111
  30. package/dist/chunk-INKVOZXK.mjs +0 -15898
  31. package/dist/chunk-J2JM7HAK.mjs +0 -8787
  32. package/dist/chunk-K6NRCSAZ.mjs +0 -4355
  33. package/dist/chunk-M4RPUUZT.mjs +0 -3156
  34. package/dist/chunk-MR4TVINH.mjs +0 -1234
  35. package/dist/chunk-OOECXYLU.mjs +0 -1379
  36. package/dist/chunk-OYHYXKXO.mjs +0 -7297
  37. package/dist/chunk-P5GJJ4JB.mjs +0 -9237
  38. package/dist/chunk-PDPN7FW7.mjs +0 -1045
  39. package/dist/chunk-PJJJQXJL.mjs +0 -1174
  40. package/dist/chunk-PK3BAIFW.mjs +0 -9294
  41. package/dist/chunk-QNK3WYNA.mjs +0 -8971
  42. package/dist/chunk-T4PVQW5O.mjs +0 -124
  43. package/dist/chunk-TENXZJB3.mjs +0 -349
  44. package/dist/chunk-TEUB6DZR.mjs +0 -6453
  45. package/dist/chunk-TWPEHDW4.mjs +0 -1067
  46. package/dist/chunk-VHFTX33A.mjs +0 -6724
  47. package/dist/chunk-VNZSS2WY.mjs +0 -1057
  48. package/dist/chunk-WJP5XYS7.mjs +0 -2102
  49. package/dist/chunk-WX6N7KNO.mjs +0 -1239
  50. package/dist/chunk-Y54UK2J3.mjs +0 -13071
  51. package/dist/chunk-YDNGMDXC.mjs +0 -9294
  52. package/dist/chunk-YJ6NZQLT.mjs +0 -9237
  53. package/dist/chunk-YWRKGXK4.mjs +0 -9300
  54. package/dist/chunk-ZI4AIAWQ.mjs +0 -46
  55. package/dist/chunk-ZQVS7MQK.mjs +0 -6081
  56. package/dist/dist-es-27NPMXP7.mjs +0 -22
  57. package/dist/dist-es-2JG6ZWFR.mjs +0 -69
  58. package/dist/dist-es-5QD5QJS2.mjs +0 -495
  59. package/dist/dist-es-5ZD454R2.mjs +0 -317
  60. package/dist/dist-es-DYHMPEKZ.mjs +0 -170
  61. package/dist/dist-es-FIVW7BUZ.mjs +0 -317
  62. package/dist/dist-es-HRBPKDMR.mjs +0 -935
  63. package/dist/dist-es-L5AMJHSY.mjs +0 -935
  64. package/dist/dist-es-LHPJ63IO.mjs +0 -4437
  65. package/dist/dist-es-OK2J7EV3.mjs +0 -378
  66. package/dist/dist-es-XFAHNA2L.mjs +0 -69
  67. package/dist/dist-es-XPNJAJI7.mjs +0 -4437
  68. package/dist/dist-es-Y4JPNLF3.mjs +0 -6077
  69. package/dist/dist-es-ZGPJUGVW.mjs +0 -87
  70. package/dist/dist-es-ZYHLY2E6.mjs +0 -487
  71. package/dist/event-streams-6MFHPNRF.mjs +0 -42
  72. package/dist/lib-B245IUXF.mjs +0 -778
  73. package/dist/loadSso-CAWKILED.mjs +0 -579
  74. package/dist/loadSso-OYKG6ZRE.mjs +0 -579
  75. package/dist/signin-KUENA7ZD.mjs +0 -743
  76. package/dist/signin-LMFNL434.mjs +0 -665
  77. package/dist/sqlite-5LHEQTBD.mjs +0 -7
  78. package/dist/sqlite-BZK5GF76.mjs +0 -7
  79. package/dist/sqlite-MG45OOTV.mjs +0 -6
  80. package/dist/sqlite-OLU72GHB.mjs +0 -6
  81. package/dist/sqlite-RR2SJ3SR.mjs +0 -7
  82. package/dist/sqlite-XJRPMNAJ.mjs +0 -6
  83. package/dist/sqlite-ZKQKQKPT.mjs +0 -7
  84. package/dist/sso-oidc-3VGFPMFD.mjs +0 -832
  85. package/dist/sso-oidc-NNH6SQIH.mjs +0 -832
  86. package/dist/sts-EF755UBF.mjs +0 -6290
  87. package/dist/sts-QGXULWRT.mjs +0 -6290
  88. package/dist/sync-4DCV43GA.mjs +0 -15
  89. package/dist/sync-BSWMMDA6.mjs +0 -14
  90. package/dist/sync-WHIIDHML.mjs +0 -14
@@ -1,317 +0,0 @@
1
- import {
2
- setCredentialFeature
3
- } from "./chunk-2NL4MXNX.mjs";
4
- import {
5
- CredentialsProviderError,
6
- TokenProviderError,
7
- getProfileName,
8
- getSSOTokenFilepath,
9
- getSSOTokenFromFile,
10
- loadSsoSessionData,
11
- parseKnownFiles
12
- } from "./chunk-YDVZIFIU.mjs";
13
- import "./chunk-BZ2JKJ54.mjs";
14
- import "./chunk-QZ7TP4HQ.mjs";
15
-
16
- // node_modules/@aws-sdk/credential-provider-sso/dist-es/isSsoProfile.js
17
- 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");
18
-
19
- // node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/constants.js
20
- var EXPIRE_WINDOW_MS = 5 * 60 * 1e3;
21
- var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
22
-
23
- // node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js
24
- var getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
25
- const { SSOOIDCClient } = await import("./sso-oidc-NNH6SQIH.mjs");
26
- const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
27
- const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
28
- region: ssoRegion ?? init.clientConfig?.region,
29
- logger: coalesce("logger"),
30
- userAgentAppId: coalesce("userAgentAppId")
31
- }));
32
- return ssoOidcClient;
33
- };
34
-
35
- // node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js
36
- var getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
37
- const { CreateTokenCommand } = await import("./sso-oidc-NNH6SQIH.mjs");
38
- const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);
39
- return ssoOidcClient.send(new CreateTokenCommand({
40
- clientId: ssoToken.clientId,
41
- clientSecret: ssoToken.clientSecret,
42
- refreshToken: ssoToken.refreshToken,
43
- grantType: "refresh_token"
44
- }));
45
- };
46
-
47
- // node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js
48
- var validateTokenExpiry = (token) => {
49
- if (token.expiration && token.expiration.getTime() < Date.now()) {
50
- throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
51
- }
52
- };
53
-
54
- // node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js
55
- var validateTokenKey = (key, value, forRefresh = false) => {
56
- if (typeof value === "undefined") {
57
- throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
58
- }
59
- };
60
-
61
- // node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js
62
- import { promises as fsPromises } from "fs";
63
- var { writeFile } = fsPromises;
64
- var writeSSOTokenToFile = (id, ssoToken) => {
65
- const tokenFilepath = getSSOTokenFilepath(id);
66
- const tokenString = JSON.stringify(ssoToken, null, 2);
67
- return writeFile(tokenFilepath, tokenString);
68
- };
69
-
70
- // node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js
71
- var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);
72
- var fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
73
- init.logger?.debug("@aws-sdk/token-providers - fromSso");
74
- const profiles = await parseKnownFiles(init);
75
- const profileName = getProfileName({
76
- profile: init.profile ?? callerClientConfig?.profile
77
- });
78
- const profile = profiles[profileName];
79
- if (!profile) {
80
- throw new TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
81
- } else if (!profile["sso_session"]) {
82
- throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
83
- }
84
- const ssoSessionName = profile["sso_session"];
85
- const ssoSessions = await loadSsoSessionData(init);
86
- const ssoSession = ssoSessions[ssoSessionName];
87
- if (!ssoSession) {
88
- throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
89
- }
90
- for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
91
- if (!ssoSession[ssoSessionRequiredKey]) {
92
- throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
93
- }
94
- }
95
- const ssoStartUrl = ssoSession["sso_start_url"];
96
- const ssoRegion = ssoSession["sso_region"];
97
- let ssoToken;
98
- try {
99
- ssoToken = await getSSOTokenFromFile(ssoSessionName);
100
- } catch (e) {
101
- throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
102
- }
103
- validateTokenKey("accessToken", ssoToken.accessToken);
104
- validateTokenKey("expiresAt", ssoToken.expiresAt);
105
- const { accessToken, expiresAt } = ssoToken;
106
- const existingToken = { token: accessToken, expiration: new Date(expiresAt) };
107
- if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
108
- return existingToken;
109
- }
110
- if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) {
111
- validateTokenExpiry(existingToken);
112
- return existingToken;
113
- }
114
- validateTokenKey("clientId", ssoToken.clientId, true);
115
- validateTokenKey("clientSecret", ssoToken.clientSecret, true);
116
- validateTokenKey("refreshToken", ssoToken.refreshToken, true);
117
- try {
118
- lastRefreshAttemptTime.setTime(Date.now());
119
- const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
120
- validateTokenKey("accessToken", newSsoOidcToken.accessToken);
121
- validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
122
- const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);
123
- try {
124
- await writeSSOTokenToFile(ssoSessionName, {
125
- ...ssoToken,
126
- accessToken: newSsoOidcToken.accessToken,
127
- expiresAt: newTokenExpiration.toISOString(),
128
- refreshToken: newSsoOidcToken.refreshToken
129
- });
130
- } catch (error) {
131
- }
132
- return {
133
- token: newSsoOidcToken.accessToken,
134
- expiration: newTokenExpiration
135
- };
136
- } catch (error) {
137
- validateTokenExpiry(existingToken);
138
- return existingToken;
139
- }
140
- };
141
-
142
- // node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js
143
- var SHOULD_FAIL_CREDENTIAL_CHAIN = false;
144
- var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger }) => {
145
- let token;
146
- const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
147
- if (ssoSession) {
148
- try {
149
- const _token = await fromSso({
150
- profile,
151
- filepath,
152
- configFilepath,
153
- ignoreCache,
154
- clientConfig,
155
- parentClientConfig,
156
- logger
157
- })({ callerClientConfig });
158
- token = {
159
- accessToken: _token.token,
160
- expiresAt: new Date(_token.expiration).toISOString()
161
- };
162
- } catch (e) {
163
- throw new CredentialsProviderError(e.message, {
164
- tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
165
- logger
166
- });
167
- }
168
- } else {
169
- try {
170
- token = await getSSOTokenFromFile(ssoStartUrl);
171
- } catch (e) {
172
- throw new CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
173
- tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
174
- logger
175
- });
176
- }
177
- }
178
- if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
179
- throw new CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
180
- tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
181
- logger
182
- });
183
- }
184
- const { accessToken } = token;
185
- const { SSOClient, GetRoleCredentialsCommand } = await import("./loadSso-OYKG6ZRE.mjs");
186
- const sso = ssoClient || new SSOClient(Object.assign({}, clientConfig ?? {}, {
187
- logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,
188
- region: clientConfig?.region ?? ssoRegion,
189
- userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId
190
- }));
191
- let ssoResp;
192
- try {
193
- ssoResp = await sso.send(new GetRoleCredentialsCommand({
194
- accountId: ssoAccountId,
195
- roleName: ssoRoleName,
196
- accessToken
197
- }));
198
- } catch (e) {
199
- throw new CredentialsProviderError(e, {
200
- tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
201
- logger
202
- });
203
- }
204
- const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} } = ssoResp;
205
- if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
206
- throw new CredentialsProviderError("SSO returns an invalid temporary credential.", {
207
- tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
208
- logger
209
- });
210
- }
211
- const credentials = {
212
- accessKeyId,
213
- secretAccessKey,
214
- sessionToken,
215
- expiration: new Date(expiration),
216
- ...credentialScope && { credentialScope },
217
- ...accountId && { accountId }
218
- };
219
- if (ssoSession) {
220
- setCredentialFeature(credentials, "CREDENTIALS_SSO", "s");
221
- } else {
222
- setCredentialFeature(credentials, "CREDENTIALS_SSO_LEGACY", "u");
223
- }
224
- return credentials;
225
- };
226
-
227
- // node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js
228
- var validateSsoProfile = (profile, logger) => {
229
- const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
230
- if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
231
- throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}
232
- Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });
233
- }
234
- return profile;
235
- };
236
-
237
- // node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js
238
- var fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
239
- init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
240
- const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
241
- const { ssoClient } = init;
242
- const profileName = getProfileName({
243
- profile: init.profile ?? callerClientConfig?.profile
244
- });
245
- if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
246
- const profiles = await parseKnownFiles(init);
247
- const profile = profiles[profileName];
248
- if (!profile) {
249
- throw new CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
250
- }
251
- if (!isSsoProfile(profile)) {
252
- throw new CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
253
- logger: init.logger
254
- });
255
- }
256
- if (profile?.sso_session) {
257
- const ssoSessions = await loadSsoSessionData(init);
258
- const session = ssoSessions[profile.sso_session];
259
- const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
260
- if (ssoRegion && ssoRegion !== session.sso_region) {
261
- throw new CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
262
- tryNextLink: false,
263
- logger: init.logger
264
- });
265
- }
266
- if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
267
- throw new CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
268
- tryNextLink: false,
269
- logger: init.logger
270
- });
271
- }
272
- profile.sso_region = session.sso_region;
273
- profile.sso_start_url = session.sso_start_url;
274
- }
275
- const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);
276
- return resolveSSOCredentials({
277
- ssoStartUrl: sso_start_url,
278
- ssoSession: sso_session,
279
- ssoAccountId: sso_account_id,
280
- ssoRegion: sso_region,
281
- ssoRoleName: sso_role_name,
282
- ssoClient,
283
- clientConfig: init.clientConfig,
284
- parentClientConfig: init.parentClientConfig,
285
- callerClientConfig: init.callerClientConfig,
286
- profile: profileName,
287
- filepath: init.filepath,
288
- configFilepath: init.configFilepath,
289
- ignoreCache: init.ignoreCache,
290
- logger: init.logger
291
- });
292
- } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
293
- throw new CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger });
294
- } else {
295
- return resolveSSOCredentials({
296
- ssoStartUrl,
297
- ssoSession,
298
- ssoAccountId,
299
- ssoRegion,
300
- ssoRoleName,
301
- ssoClient,
302
- clientConfig: init.clientConfig,
303
- parentClientConfig: init.parentClientConfig,
304
- callerClientConfig: init.callerClientConfig,
305
- profile: profileName,
306
- filepath: init.filepath,
307
- configFilepath: init.configFilepath,
308
- ignoreCache: init.ignoreCache,
309
- logger: init.logger
310
- });
311
- }
312
- };
313
- export {
314
- fromSSO,
315
- isSsoProfile,
316
- validateSsoProfile
317
- };