@stacksjs/actions 0.70.16 → 0.70.17

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 (28) hide show
  1. package/dist/build.js +8 -8
  2. package/dist/{chunk-hd6fdt5s.js → chunk-38cnnp2b.js} +4 -6
  3. package/dist/{chunk-jdqxwpvc.js → chunk-6r2cfyvs.js} +17 -21
  4. package/dist/{chunk-6xeh1279.js → chunk-76zhb40c.js} +6 -7
  5. package/dist/{chunk-bh25aaf7.js → chunk-7s5qcjkt.js} +9 -17
  6. package/dist/{chunk-cv02w7e2.js → chunk-8qbv8f54.js} +3 -3
  7. package/dist/{chunk-gdzs9jf4.js → chunk-9exgwfkw.js} +4 -5
  8. package/dist/{chunk-6xbhnbwy.js → chunk-b7b7x0pa.js} +17 -21
  9. package/dist/{chunk-hfkdpbh8.js → chunk-dzyhk6dv.js} +8 -8
  10. package/dist/{chunk-wvzpmd54.js → chunk-e7mp4xy5.js} +10 -13
  11. package/dist/{chunk-wn25qps4.js → chunk-env90z3g.js} +25 -34
  12. package/dist/{chunk-ad9b7jvj.js → chunk-f6a9g4qa.js} +4 -5
  13. package/dist/{chunk-kz10a3s9.js → chunk-kz2maxj4.js} +68 -68
  14. package/dist/{chunk-y73a5ex0.js → chunk-m3bwb2j7.js} +6 -6
  15. package/dist/{chunk-whqcyjvm.js → chunk-p90c4ksp.js} +13 -8
  16. package/dist/{chunk-8dsect0a.js → chunk-qkm8e752.js} +4 -5
  17. package/dist/{chunk-9menqd9a.js → chunk-t5em30ak.js} +16 -24
  18. package/dist/{chunk-0crtxf8d.js → chunk-veja9rez.js} +156 -19
  19. package/dist/{chunk-b5g5w1hh.js → chunk-xt9exr2c.js} +5 -6
  20. package/dist/{chunk-f1cxwjkf.js → chunk-zsm2c35w.js} +5 -6
  21. package/dist/chunk-zzerxbrm.js +107 -0
  22. package/dist/database/seed.js +7 -7
  23. package/dist/generate/index.js +8 -8
  24. package/dist/index.js +8 -8
  25. package/dist/release.js +8 -8
  26. package/dist/upgrade.js +1 -1
  27. package/package.json +17 -17
  28. package/dist/chunk-2m04vhea.js +0 -145
@@ -6,37 +6,32 @@ import {
6
6
  loadSsoSessionData,
7
7
  parseKnownFiles
8
8
  } from "./chunk-bf8bq8pc.js";
9
+ import {
10
+ CredentialsProviderError,
11
+ TokenProviderError
12
+ } from "./chunk-zzerxbrm.js";
9
13
  import {
10
14
  require_client
11
15
  } from "./chunk-frw3va9v.js";
12
16
  import"./chunk-saqpg5nd.js";
13
- import {
14
- require_dist_cjs
15
- } from "./chunk-2m04vhea.js";
16
17
  import {
17
18
  __require,
18
19
  __toESM
19
20
  } from "./chunk-9v6qtbez.js";
20
21
 
21
- // ../../../../node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js
22
- var import_property_provider6 = __toESM(require_dist_cjs(), 1);
23
-
24
22
  // ../../../../node_modules/@aws-sdk/credential-provider-sso/dist-es/isSsoProfile.js
25
23
  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");
26
24
 
27
25
  // ../../../../node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js
28
26
  var import_client = __toESM(require_client(), 1);
29
27
 
30
- // ../../../../node_modules/@aws-sdk/token-providers/dist-es/fromSso.js
31
- var import_property_provider3 = __toESM(require_dist_cjs(), 1);
32
-
33
28
  // ../../../../node_modules/@aws-sdk/token-providers/dist-es/constants.js
34
29
  var EXPIRE_WINDOW_MS = 5 * 60 * 1000;
35
30
  var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
36
31
 
37
32
  // ../../../../node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js
38
33
  var getSsoOidcClient = async (ssoRegion, init = {}) => {
39
- const { SSOOIDCClient } = await import("./chunk-ad9b7jvj.js");
34
+ const { SSOOIDCClient } = await import("./chunk-f6a9g4qa.js");
40
35
  const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
41
36
  region: ssoRegion ?? init.clientConfig?.region,
42
37
  logger: init.clientConfig?.logger ?? init.parentClientConfig?.logger
@@ -46,7 +41,7 @@ var getSsoOidcClient = async (ssoRegion, init = {}) => {
46
41
 
47
42
  // ../../../../node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js
48
43
  var getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}) => {
49
- const { CreateTokenCommand } = await import("./chunk-ad9b7jvj.js");
44
+ const { CreateTokenCommand } = await import("./chunk-f6a9g4qa.js");
50
45
  const ssoOidcClient = await getSsoOidcClient(ssoRegion, init);
51
46
  return ssoOidcClient.send(new CreateTokenCommand({
52
47
  clientId: ssoToken.clientId,
@@ -57,18 +52,16 @@ var getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}) => {
57
52
  };
58
53
 
59
54
  // ../../../../node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js
60
- var import_property_provider = __toESM(require_dist_cjs(), 1);
61
55
  var validateTokenExpiry = (token) => {
62
56
  if (token.expiration && token.expiration.getTime() < Date.now()) {
63
- throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
57
+ throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
64
58
  }
65
59
  };
66
60
 
67
61
  // ../../../../node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js
68
- var import_property_provider2 = __toESM(require_dist_cjs(), 1);
69
62
  var validateTokenKey = (key, value, forRefresh = false) => {
70
63
  if (typeof value === "undefined") {
71
- throw new import_property_provider2.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
64
+ throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
72
65
  }
73
66
  };
74
67
 
@@ -98,19 +91,19 @@ var fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => {
98
91
  });
99
92
  const profile = profiles[profileName];
100
93
  if (!profile) {
101
- throw new import_property_provider3.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
94
+ throw new TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
102
95
  } else if (!profile["sso_session"]) {
103
- throw new import_property_provider3.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
96
+ throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
104
97
  }
105
98
  const ssoSessionName = profile["sso_session"];
106
99
  const ssoSessions = await loadSsoSessionData(init);
107
100
  const ssoSession = ssoSessions[ssoSessionName];
108
101
  if (!ssoSession) {
109
- throw new import_property_provider3.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
102
+ throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
110
103
  }
111
104
  for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
112
105
  if (!ssoSession[ssoSessionRequiredKey]) {
113
- throw new import_property_provider3.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
106
+ throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
114
107
  }
115
108
  }
116
109
  const ssoStartUrl = ssoSession["sso_start_url"];
@@ -119,7 +112,7 @@ var fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => {
119
112
  try {
120
113
  ssoToken = await getSSOTokenFromFile(ssoSessionName);
121
114
  } catch (e) {
122
- throw new import_property_provider3.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
115
+ throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
123
116
  }
124
117
  validateTokenKey("accessToken", ssoToken.accessToken);
125
118
  validateTokenKey("expiresAt", ssoToken.expiresAt);
@@ -160,7 +153,6 @@ var fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => {
160
153
  };
161
154
 
162
155
  // ../../../../node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js
163
- var import_property_provider4 = __toESM(require_dist_cjs(), 1);
164
156
  var SHOULD_FAIL_CREDENTIAL_CHAIN = false;
165
157
  var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, profile, logger }) => {
166
158
  let token;
@@ -173,7 +165,7 @@ var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoR
173
165
  expiresAt: new Date(_token.expiration).toISOString()
174
166
  };
175
167
  } catch (e) {
176
- throw new import_property_provider4.CredentialsProviderError(e.message, {
168
+ throw new CredentialsProviderError(e.message, {
177
169
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
178
170
  logger
179
171
  });
@@ -182,20 +174,20 @@ var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoR
182
174
  try {
183
175
  token = await getSSOTokenFromFile(ssoStartUrl);
184
176
  } catch (e) {
185
- throw new import_property_provider4.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
177
+ throw new CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
186
178
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
187
179
  logger
188
180
  });
189
181
  }
190
182
  }
191
183
  if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
192
- throw new import_property_provider4.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
184
+ throw new CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
193
185
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
194
186
  logger
195
187
  });
196
188
  }
197
189
  const { accessToken } = token;
198
- const { SSOClient, GetRoleCredentialsCommand } = await import("./chunk-y73a5ex0.js");
190
+ const { SSOClient, GetRoleCredentialsCommand } = await import("./chunk-m3bwb2j7.js");
199
191
  const sso = ssoClient || new SSOClient(Object.assign({}, clientConfig ?? {}, {
200
192
  logger: clientConfig?.logger ?? parentClientConfig?.logger,
201
193
  region: clientConfig?.region ?? ssoRegion
@@ -208,14 +200,14 @@ var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoR
208
200
  accessToken
209
201
  }));
210
202
  } catch (e) {
211
- throw new import_property_provider4.CredentialsProviderError(e, {
203
+ throw new CredentialsProviderError(e, {
212
204
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
213
205
  logger
214
206
  });
215
207
  }
216
208
  const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} } = ssoResp;
217
209
  if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
218
- throw new import_property_provider4.CredentialsProviderError("SSO returns an invalid temporary credential.", {
210
+ throw new CredentialsProviderError("SSO returns an invalid temporary credential.", {
219
211
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
220
212
  logger
221
213
  });
@@ -237,11 +229,10 @@ var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoR
237
229
  };
238
230
 
239
231
  // ../../../../node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js
240
- var import_property_provider5 = __toESM(require_dist_cjs(), 1);
241
232
  var validateSsoProfile = (profile, logger) => {
242
233
  const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
243
234
  if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
244
- throw new import_property_provider5.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(", ")}
235
+ 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(", ")}
245
236
  Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });
246
237
  }
247
238
  return profile;
@@ -259,10 +250,10 @@ var fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
259
250
  const profiles = await parseKnownFiles(init);
260
251
  const profile = profiles[profileName];
261
252
  if (!profile) {
262
- throw new import_property_provider6.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
253
+ throw new CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
263
254
  }
264
255
  if (!isSsoProfile(profile)) {
265
- throw new import_property_provider6.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
256
+ throw new CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
266
257
  logger: init.logger
267
258
  });
268
259
  }
@@ -271,13 +262,13 @@ var fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
271
262
  const session = ssoSessions[profile.sso_session];
272
263
  const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
273
264
  if (ssoRegion && ssoRegion !== session.sso_region) {
274
- throw new import_property_provider6.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
265
+ throw new CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
275
266
  tryNextLink: false,
276
267
  logger: init.logger
277
268
  });
278
269
  }
279
270
  if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
280
- throw new import_property_provider6.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
271
+ throw new CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
281
272
  tryNextLink: false,
282
273
  logger: init.logger
283
274
  });
@@ -298,7 +289,7 @@ var fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
298
289
  profile: profileName
299
290
  });
300
291
  } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
301
- throw new import_property_provider6.CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " + '"ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger });
292
+ throw new CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " + '"ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger });
302
293
  } else {
303
294
  return resolveSSOCredentials({
304
295
  ssoStartUrl,
@@ -19,15 +19,15 @@ import {
19
19
  require_dist_cjs8 as require_dist_cjs18,
20
20
  require_dist_cjs9 as require_dist_cjs19,
21
21
  require_package
22
- } from "./chunk-hd6fdt5s.js";
22
+ } from "./chunk-38cnnp2b.js";
23
23
  import {
24
24
  require_dist_cjs,
25
25
  require_dist_cjs1 as require_dist_cjs2,
26
26
  require_dist_cjs2 as require_dist_cjs7,
27
- require_dist_cjs3 as require_dist_cjs8,
28
- require_dist_cjs4 as require_dist_cjs9,
27
+ require_dist_cjs4 as require_dist_cjs8,
28
+ require_dist_cjs5 as require_dist_cjs9,
29
29
  require_tslib
30
- } from "./chunk-0crtxf8d.js";
30
+ } from "./chunk-veja9rez.js";
31
31
  import {
32
32
  require_dist_cjs as require_dist_cjs3,
33
33
  require_dist_cjs3 as require_dist_cjs4,
@@ -36,7 +36,6 @@ import {
36
36
  } from "./chunk-a7k3cdby.js";
37
37
  import"./chunk-frw3va9v.js";
38
38
  import"./chunk-saqpg5nd.js";
39
- import"./chunk-2m04vhea.js";
40
39
  import {
41
40
  __commonJS
42
41
  } from "./chunk-9v6qtbez.js";