@stacksjs/actions 0.70.10 → 0.70.12

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 (54) hide show
  1. package/dist/build/core.js +1 -1
  2. package/dist/build.js +18 -3
  3. package/dist/{chunk-8swsxabt.js → chunk-0w5577pa.js} +63 -3
  4. package/dist/{chunk-fxan91t8.js → chunk-2dvnt46s.js} +31 -31
  5. package/dist/chunk-38cnnp2b.js +3823 -0
  6. package/dist/chunk-76zhb40c.js +92 -0
  7. package/dist/{chunk-v1qz355d.js → chunk-7exdh0pw.js} +4 -4
  8. package/dist/{chunk-6jdq6549.js → chunk-7hbpybtk.js} +18 -3
  9. package/dist/chunk-7s5qcjkt.js +105 -0
  10. package/dist/chunk-9exgwfkw.js +1283 -0
  11. package/dist/chunk-a13x0e43.js +1180 -0
  12. package/dist/chunk-a7k3cdby.js +2266 -0
  13. package/dist/chunk-bf8bq8pc.js +205 -0
  14. package/dist/chunk-csa76zyn.js +658 -0
  15. package/dist/chunk-e7mp4xy5.js +169 -0
  16. package/dist/chunk-f6a9g4qa.js +902 -0
  17. package/dist/chunk-frw3va9v.js +69 -0
  18. package/dist/chunk-hp8vmq3g.js +179242 -0
  19. package/dist/chunk-mdj7x1vs.js +790 -0
  20. package/dist/chunk-mdqphqep.js +438 -0
  21. package/dist/chunk-p0c688mg.js +729 -0
  22. package/dist/chunk-pnre7439.js +2228 -0
  23. package/dist/chunk-q9dmga3k.js +11 -0
  24. package/dist/chunk-qhh0v93n.js +73 -0
  25. package/dist/chunk-qkm8e752.js +51 -0
  26. package/dist/chunk-r1ednxa6.js +311 -0
  27. package/dist/chunk-saqpg5nd.js +118 -0
  28. package/dist/chunk-t5em30ak.js +379 -0
  29. package/dist/chunk-veja9rez.js +5764 -0
  30. package/dist/chunk-xt9exr2c.js +1481 -0
  31. package/dist/chunk-zbqapk7v.js +212 -0
  32. package/dist/chunk-zsm2c35w.js +72 -0
  33. package/dist/chunk-zzerxbrm.js +107 -0
  34. package/dist/database/seed.js +18 -3
  35. package/dist/deploy/index.js +1 -1
  36. package/dist/examples.js +1 -1
  37. package/dist/fresh.js +1 -1
  38. package/dist/generate/index.js +19 -4
  39. package/dist/helpers/component-meta.js +10 -10
  40. package/dist/helpers/lib-entries.js +1 -1
  41. package/dist/index.js +18 -3
  42. package/dist/key-generate.js +1 -1
  43. package/dist/lint/fix.js +1 -1
  44. package/dist/make.js +1 -1
  45. package/dist/prepublish.js +1 -1
  46. package/dist/release.js +18 -3
  47. package/dist/test/feature.js +1 -1
  48. package/dist/test/index.js +1 -1
  49. package/dist/test/unit.js +1 -1
  50. package/dist/types.js +1 -1
  51. package/dist/upgrade/index.js +1 -1
  52. package/dist/upgrade.js +2 -2
  53. package/package.json +17 -17
  54. package/dist/chunk-8tjc3whz.js +0 -77989
@@ -0,0 +1,169 @@
1
+ // @bun
2
+ import {
3
+ HttpRequest,
4
+ NodeHttpHandler,
5
+ parseRfc3339DateTime
6
+ } from "./chunk-xt9exr2c.js";
7
+ import {
8
+ CredentialsProviderError
9
+ } from "./chunk-zzerxbrm.js";
10
+ import {
11
+ require_dist_cjs8 as require_dist_cjs
12
+ } from "./chunk-a7k3cdby.js";
13
+ import {
14
+ require_client
15
+ } from "./chunk-frw3va9v.js";
16
+ import"./chunk-saqpg5nd.js";
17
+ import {
18
+ __toESM
19
+ } from "./chunk-9v6qtbez.js";
20
+
21
+ // ../../../../node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js
22
+ var import_client = __toESM(require_client(), 1);
23
+ import fs from "node:fs/promises";
24
+
25
+ // ../../../../node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js
26
+ var ECS_CONTAINER_HOST = "169.254.170.2";
27
+ var EKS_CONTAINER_HOST_IPv4 = "169.254.170.23";
28
+ var EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]";
29
+ var checkUrl = (url, logger) => {
30
+ if (url.protocol === "https:") {
31
+ return;
32
+ }
33
+ if (url.hostname === ECS_CONTAINER_HOST || url.hostname === EKS_CONTAINER_HOST_IPv4 || url.hostname === EKS_CONTAINER_HOST_IPv6) {
34
+ return;
35
+ }
36
+ if (url.hostname.includes("[")) {
37
+ if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") {
38
+ return;
39
+ }
40
+ } else {
41
+ if (url.hostname === "localhost") {
42
+ return;
43
+ }
44
+ const ipComponents = url.hostname.split(".");
45
+ const inRange = (component) => {
46
+ const num = parseInt(component, 10);
47
+ return 0 <= num && num <= 255;
48
+ };
49
+ if (ipComponents[0] === "127" && inRange(ipComponents[1]) && inRange(ipComponents[2]) && inRange(ipComponents[3]) && ipComponents.length === 4) {
50
+ return;
51
+ }
52
+ }
53
+ throw new CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
54
+ - loopback CIDR 127.0.0.0/8 or [::1/128]
55
+ - ECS container host 169.254.170.2
56
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });
57
+ };
58
+
59
+ // ../../../../node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js
60
+ var import_util_stream = __toESM(require_dist_cjs(), 1);
61
+ function createGetRequest(url) {
62
+ return new HttpRequest({
63
+ protocol: url.protocol,
64
+ hostname: url.hostname,
65
+ port: Number(url.port),
66
+ path: url.pathname,
67
+ query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {
68
+ acc[k] = v;
69
+ return acc;
70
+ }, {}),
71
+ fragment: url.hash
72
+ });
73
+ }
74
+ async function getCredentials(response, logger) {
75
+ const stream = import_util_stream.sdkStreamMixin(response.body);
76
+ const str = await stream.transformToString();
77
+ if (response.statusCode === 200) {
78
+ const parsed = JSON.parse(str);
79
+ if (typeof parsed.AccessKeyId !== "string" || typeof parsed.SecretAccessKey !== "string" || typeof parsed.Token !== "string" || typeof parsed.Expiration !== "string") {
80
+ 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 });
81
+ }
82
+ return {
83
+ accessKeyId: parsed.AccessKeyId,
84
+ secretAccessKey: parsed.SecretAccessKey,
85
+ sessionToken: parsed.Token,
86
+ expiration: parseRfc3339DateTime(parsed.Expiration)
87
+ };
88
+ }
89
+ if (response.statusCode >= 400 && response.statusCode < 500) {
90
+ let parsedBody = {};
91
+ try {
92
+ parsedBody = JSON.parse(str);
93
+ } catch (e) {}
94
+ throw Object.assign(new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {
95
+ Code: parsedBody.Code,
96
+ Message: parsedBody.Message
97
+ });
98
+ }
99
+ throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });
100
+ }
101
+
102
+ // ../../../../node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/retry-wrapper.js
103
+ var retryWrapper = (toRetry, maxRetries, delayMs) => {
104
+ return async () => {
105
+ for (let i = 0;i < maxRetries; ++i) {
106
+ try {
107
+ return await toRetry();
108
+ } catch (e) {
109
+ await new Promise((resolve) => setTimeout(resolve, delayMs));
110
+ }
111
+ }
112
+ return await toRetry();
113
+ };
114
+ };
115
+
116
+ // ../../../../node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js
117
+ var AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
118
+ var DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2";
119
+ var AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
120
+ var AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE";
121
+ var AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
122
+ var fromHttp = (options = {}) => {
123
+ options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
124
+ let host;
125
+ const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
126
+ const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];
127
+ const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];
128
+ const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];
129
+ const warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger ? console.warn : options.logger.warn;
130
+ if (relative && full) {
131
+ warn("@aws-sdk/credential-provider-http: " + "you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.");
132
+ warn("awsContainerCredentialsFullUri will take precedence.");
133
+ }
134
+ if (token && tokenFile) {
135
+ warn("@aws-sdk/credential-provider-http: " + "you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.");
136
+ warn("awsContainerAuthorizationToken will take precedence.");
137
+ }
138
+ if (full) {
139
+ host = full;
140
+ } else if (relative) {
141
+ host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;
142
+ } else {
143
+ throw new CredentialsProviderError(`No HTTP credential provider host provided.
144
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });
145
+ }
146
+ const url = new URL(host);
147
+ checkUrl(url, options.logger);
148
+ const requestHandler = new NodeHttpHandler({
149
+ requestTimeout: options.timeout ?? 1000,
150
+ connectionTimeout: options.timeout ?? 1000
151
+ });
152
+ return retryWrapper(async () => {
153
+ const request = createGetRequest(url);
154
+ if (token) {
155
+ request.headers.Authorization = token;
156
+ } else if (tokenFile) {
157
+ request.headers.Authorization = (await fs.readFile(tokenFile)).toString();
158
+ }
159
+ try {
160
+ const result = await requestHandler.handle(request);
161
+ return getCredentials(result.response).then((creds) => import_client.setCredentialFeature(creds, "CREDENTIALS_HTTP", "z"));
162
+ } catch (e) {
163
+ throw new CredentialsProviderError(String(e), { logger: options.logger });
164
+ }
165
+ }, options.maxRetries ?? 3, options.timeout ?? 1000);
166
+ };
167
+ export {
168
+ fromHttp
169
+ };