@stacksjs/actions 0.70.19 → 0.70.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/build.js +7 -7
- package/dist/{chunk-4tte2ccn.js → chunk-161fpm3p.js} +17 -17
- package/dist/{chunk-z4k3w6hz.js → chunk-1vc5eq0h.js} +25 -34
- package/dist/{chunk-2jssg98j.js → chunk-56ar3gp7.js} +4 -6
- package/dist/{chunk-6xeh1279.js → chunk-76zhb40c.js} +6 -7
- package/dist/{chunk-x1ny4wwh.js → chunk-7dp08yqh.js} +3 -3
- package/dist/{chunk-bh25aaf7.js → chunk-7s5qcjkt.js} +9 -17
- package/dist/{chunk-264njj8m.js → chunk-adq5n04j.js} +7 -7
- package/dist/{chunk-annfdd3f.js → chunk-b82x4201.js} +7 -7
- package/dist/{chunk-6egz2b52.js → chunk-dvkgakrr.js} +4 -5
- package/dist/{chunk-6vn0j49q.js → chunk-e7mp4xy5.js} +9 -12
- package/dist/{chunk-jqbza09y.js → chunk-mdb86mpr.js} +17 -21
- package/dist/{chunk-b7b7jd25.js → chunk-pacq2bz6.js} +4 -5
- package/dist/{chunk-74nzt2f7.js → chunk-pnre7439.js} +29 -32
- package/dist/{chunk-cvxddy4g.js → chunk-psa9yf21.js} +5 -6
- package/dist/{chunk-8dsect0a.js → chunk-qkm8e752.js} +4 -5
- package/dist/{chunk-9menqd9a.js → chunk-t5em30ak.js} +16 -24
- package/dist/{chunk-fsa32kvk.js → chunk-tsrpjtkt.js} +69 -70
- package/dist/{chunk-0crtxf8d.js → chunk-veja9rez.js} +156 -19
- package/dist/chunk-zzerxbrm.js +107 -0
- package/dist/database/seed.js +6 -6
- package/dist/generate/index.js +7 -7
- package/dist/index.js +7 -7
- package/dist/release.js +7 -7
- package/dist/upgrade.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2m04vhea.js +0 -145
|
@@ -3,51 +3,47 @@ import {
|
|
|
3
3
|
getProfileName,
|
|
4
4
|
parseKnownFiles
|
|
5
5
|
} from "./chunk-bf8bq8pc.js";
|
|
6
|
+
import {
|
|
7
|
+
CredentialsProviderError,
|
|
8
|
+
chain
|
|
9
|
+
} from "./chunk-zzerxbrm.js";
|
|
6
10
|
import {
|
|
7
11
|
require_client
|
|
8
12
|
} from "./chunk-frw3va9v.js";
|
|
9
13
|
import"./chunk-saqpg5nd.js";
|
|
10
|
-
import {
|
|
11
|
-
require_dist_cjs
|
|
12
|
-
} from "./chunk-2m04vhea.js";
|
|
13
14
|
import {
|
|
14
15
|
__require,
|
|
15
16
|
__toESM
|
|
16
17
|
} from "./chunk-9v6qtbez.js";
|
|
17
18
|
|
|
18
|
-
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js
|
|
19
|
-
var import_property_provider3 = __toESM(require_dist_cjs(), 1);
|
|
20
|
-
|
|
21
19
|
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js
|
|
22
20
|
var import_client2 = __toESM(require_client(), 1);
|
|
23
|
-
var import_property_provider2 = __toESM(require_dist_cjs(), 1);
|
|
24
21
|
|
|
25
22
|
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js
|
|
26
23
|
var import_client = __toESM(require_client(), 1);
|
|
27
|
-
var import_property_provider = __toESM(require_dist_cjs(), 1);
|
|
28
24
|
var resolveCredentialSource = (credentialSource, profileName, logger) => {
|
|
29
25
|
const sourceProvidersMap = {
|
|
30
26
|
EcsContainer: async (options) => {
|
|
31
|
-
const { fromHttp } = await import("./chunk-
|
|
32
|
-
const { fromContainerMetadata } = await import("./chunk-
|
|
27
|
+
const { fromHttp } = await import("./chunk-e7mp4xy5.js");
|
|
28
|
+
const { fromContainerMetadata } = await import("./chunk-t5em30ak.js");
|
|
33
29
|
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
|
|
34
|
-
return async () =>
|
|
30
|
+
return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
|
|
35
31
|
},
|
|
36
32
|
Ec2InstanceMetadata: async (options) => {
|
|
37
33
|
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
|
|
38
|
-
const { fromInstanceMetadata } = await import("./chunk-
|
|
34
|
+
const { fromInstanceMetadata } = await import("./chunk-t5em30ak.js");
|
|
39
35
|
return async () => fromInstanceMetadata(options)().then(setNamedProvider);
|
|
40
36
|
},
|
|
41
37
|
Environment: async (options) => {
|
|
42
38
|
logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
|
|
43
|
-
const { fromEnv } = await import("./chunk-
|
|
39
|
+
const { fromEnv } = await import("./chunk-qkm8e752.js");
|
|
44
40
|
return async () => fromEnv(options)().then(setNamedProvider);
|
|
45
41
|
}
|
|
46
42
|
};
|
|
47
43
|
if (credentialSource in sourceProvidersMap) {
|
|
48
44
|
return sourceProvidersMap[credentialSource];
|
|
49
45
|
} else {
|
|
50
|
-
throw new
|
|
46
|
+
throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });
|
|
51
47
|
}
|
|
52
48
|
};
|
|
53
49
|
var setNamedProvider = (creds) => import_client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p");
|
|
@@ -75,7 +71,7 @@ var resolveAssumeRoleCredentials = async (profileName, profiles, options, visite
|
|
|
75
71
|
const profileData = profiles[profileName];
|
|
76
72
|
const { source_profile, region } = profileData;
|
|
77
73
|
if (!options.roleAssumer) {
|
|
78
|
-
const { getDefaultRoleAssumer } = await import("./chunk-
|
|
74
|
+
const { getDefaultRoleAssumer } = await import("./chunk-dvkgakrr.js");
|
|
79
75
|
options.roleAssumer = getDefaultRoleAssumer({
|
|
80
76
|
...options.clientConfig,
|
|
81
77
|
credentialProviderLogger: options.logger,
|
|
@@ -86,7 +82,7 @@ var resolveAssumeRoleCredentials = async (profileName, profiles, options, visite
|
|
|
86
82
|
}, options.clientPlugins);
|
|
87
83
|
}
|
|
88
84
|
if (source_profile && source_profile in visitedProfiles) {
|
|
89
|
-
throw new
|
|
85
|
+
throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${getProfileName(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), { logger: options.logger });
|
|
90
86
|
}
|
|
91
87
|
options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
|
|
92
88
|
const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, {
|
|
@@ -105,7 +101,7 @@ var resolveAssumeRoleCredentials = async (profileName, profiles, options, visite
|
|
|
105
101
|
const { mfa_serial } = profileData;
|
|
106
102
|
if (mfa_serial) {
|
|
107
103
|
if (!options.mfaCodeProvider) {
|
|
108
|
-
throw new
|
|
104
|
+
throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
|
|
109
105
|
}
|
|
110
106
|
params.SerialNumber = mfa_serial;
|
|
111
107
|
params.TokenCode = await options.mfaCodeProvider(mfa_serial);
|
|
@@ -121,7 +117,7 @@ var isCredentialSourceWithoutRoleArn = (section) => {
|
|
|
121
117
|
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js
|
|
122
118
|
var import_client3 = __toESM(require_client(), 1);
|
|
123
119
|
var isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
|
|
124
|
-
var resolveProcessCredentials = async (options, profile) => import("./chunk-
|
|
120
|
+
var resolveProcessCredentials = async (options, profile) => import("./chunk-76zhb40c.js").then(({ fromProcess }) => fromProcess({
|
|
125
121
|
...options,
|
|
126
122
|
profile
|
|
127
123
|
})().then((creds) => import_client3.setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v")));
|
|
@@ -129,7 +125,7 @@ var resolveProcessCredentials = async (options, profile) => import("./chunk-6xeh
|
|
|
129
125
|
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js
|
|
130
126
|
var import_client4 = __toESM(require_client(), 1);
|
|
131
127
|
var resolveSsoCredentials = async (profile, profileData, options = {}) => {
|
|
132
|
-
const { fromSSO } = await import("./chunk-
|
|
128
|
+
const { fromSSO } = await import("./chunk-1vc5eq0h.js");
|
|
133
129
|
return fromSSO({
|
|
134
130
|
profile,
|
|
135
131
|
logger: options.logger,
|
|
@@ -163,7 +159,7 @@ var resolveStaticCredentials = async (profile, options) => {
|
|
|
163
159
|
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js
|
|
164
160
|
var import_client6 = __toESM(require_client(), 1);
|
|
165
161
|
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;
|
|
166
|
-
var resolveWebIdentityCredentials = async (profile, options) => import("./chunk-
|
|
162
|
+
var resolveWebIdentityCredentials = async (profile, options) => import("./chunk-psa9yf21.js").then(({ fromTokenFile }) => fromTokenFile({
|
|
167
163
|
webIdentityTokenFile: profile.web_identity_token_file,
|
|
168
164
|
roleArn: profile.role_arn,
|
|
169
165
|
roleSessionName: profile.role_session_name,
|
|
@@ -193,7 +189,7 @@ var resolveProfileData = async (profileName, profiles, options, visitedProfiles
|
|
|
193
189
|
if (isSsoProfile(data)) {
|
|
194
190
|
return await resolveSsoCredentials(profileName, data, options);
|
|
195
191
|
}
|
|
196
|
-
throw new
|
|
192
|
+
throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
|
|
197
193
|
};
|
|
198
194
|
|
|
199
195
|
// ../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js
|
|
@@ -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-
|
|
22
|
+
} from "./chunk-56ar3gp7.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
|
-
|
|
28
|
-
|
|
27
|
+
require_dist_cjs4 as require_dist_cjs8,
|
|
28
|
+
require_dist_cjs5 as require_dist_cjs9,
|
|
29
29
|
require_tslib
|
|
30
|
-
} from "./chunk-
|
|
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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadConfig,
|
|
3
3
|
parseUrl
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7s5qcjkt.js";
|
|
5
5
|
import {
|
|
6
6
|
CONFIG_PREFIX_SEPARATOR
|
|
7
7
|
} from "./chunk-bf8bq8pc.js";
|
|
@@ -10,18 +10,17 @@ import {
|
|
|
10
10
|
HttpResponse,
|
|
11
11
|
NoOpLogger
|
|
12
12
|
} from "./chunk-xt9exr2c.js";
|
|
13
|
+
import {
|
|
14
|
+
memoize
|
|
15
|
+
} from "./chunk-zzerxbrm.js";
|
|
13
16
|
import {
|
|
14
17
|
require_dist,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} from "./chunk-0crtxf8d.js";
|
|
18
|
+
require_dist_cjs2,
|
|
19
|
+
require_dist_cjs5 as require_dist_cjs3
|
|
20
|
+
} from "./chunk-veja9rez.js";
|
|
19
21
|
import {
|
|
20
22
|
require_dist_cjs
|
|
21
23
|
} from "./chunk-saqpg5nd.js";
|
|
22
|
-
import {
|
|
23
|
-
require_dist_cjs as require_dist_cjs4
|
|
24
|
-
} from "./chunk-2m04vhea.js";
|
|
25
24
|
import {
|
|
26
25
|
__require,
|
|
27
26
|
__toESM
|
|
@@ -140,7 +139,7 @@ var getRecursionDetectionPlugin = (options) => ({
|
|
|
140
139
|
});
|
|
141
140
|
|
|
142
141
|
// ../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js
|
|
143
|
-
var import_core = __toESM(
|
|
142
|
+
var import_core = __toESM(require_dist_cjs2(), 1);
|
|
144
143
|
var DEFAULT_UA_APP_ID = undefined;
|
|
145
144
|
function isValidUserAgentAppId(appId) {
|
|
146
145
|
if (appId === undefined) {
|
|
@@ -946,7 +945,7 @@ var awsEndpointFunctions = {
|
|
|
946
945
|
};
|
|
947
946
|
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
948
947
|
// ../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js
|
|
949
|
-
var import_core2 = __toESM(
|
|
948
|
+
var import_core2 = __toESM(require_dist_cjs3(), 1);
|
|
950
949
|
var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
|
|
951
950
|
async function checkFeatures(context, config, args) {
|
|
952
951
|
const request = args.request;
|
|
@@ -1152,10 +1151,16 @@ var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {
|
|
|
1152
1151
|
configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG),
|
|
1153
1152
|
default: false
|
|
1154
1153
|
};
|
|
1155
|
-
// ../../../../node_modules/@smithy/
|
|
1156
|
-
var
|
|
1157
|
-
|
|
1158
|
-
|
|
1154
|
+
// ../../../../node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js
|
|
1155
|
+
var import_types12 = __toESM(require_dist_cjs(), 1);
|
|
1156
|
+
var getSmithyContext = (context) => context[import_types12.SMITHY_CONTEXT_KEY] || (context[import_types12.SMITHY_CONTEXT_KEY] = {});
|
|
1157
|
+
// ../../../../node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js
|
|
1158
|
+
var normalizeProvider2 = (input) => {
|
|
1159
|
+
if (typeof input === "function")
|
|
1160
|
+
return input;
|
|
1161
|
+
const promisified = Promise.resolve(input);
|
|
1162
|
+
return () => promisified;
|
|
1163
|
+
};
|
|
1159
1164
|
// ../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/config.js
|
|
1160
1165
|
var REGION_ENV_NAME = "AWS_REGION";
|
|
1161
1166
|
var REGION_INI_NAME = "region";
|
|
@@ -1274,8 +1279,7 @@ function getSerdePlugin(config2, serializer, deserializer) {
|
|
|
1274
1279
|
};
|
|
1275
1280
|
}
|
|
1276
1281
|
// ../../../../node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js
|
|
1277
|
-
var import_core3 = __toESM(
|
|
1278
|
-
var import_util_middleware3 = __toESM(require_dist_cjs2(), 1);
|
|
1282
|
+
var import_core3 = __toESM(require_dist_cjs2(), 1);
|
|
1279
1283
|
|
|
1280
1284
|
// ../../../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js
|
|
1281
1285
|
var resolveParamsForS3 = async (endpointParams) => {
|
|
@@ -1464,7 +1468,7 @@ var endpointMiddleware = ({ config: config2, instructions }) => {
|
|
|
1464
1468
|
if (authScheme) {
|
|
1465
1469
|
context["signing_region"] = authScheme.signingRegion;
|
|
1466
1470
|
context["signing_service"] = authScheme.signingName;
|
|
1467
|
-
const smithyContext =
|
|
1471
|
+
const smithyContext = getSmithyContext(context);
|
|
1468
1472
|
const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;
|
|
1469
1473
|
if (httpAuthOption) {
|
|
1470
1474
|
httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {
|
|
@@ -1501,18 +1505,17 @@ var getEndpointPlugin = (config2, instructions) => ({
|
|
|
1501
1505
|
});
|
|
1502
1506
|
|
|
1503
1507
|
// ../../../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js
|
|
1504
|
-
var import_util_middleware4 = __toESM(require_dist_cjs2(), 1);
|
|
1505
1508
|
var resolveEndpointConfig = (input) => {
|
|
1506
1509
|
const tls = input.tls ?? true;
|
|
1507
1510
|
const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;
|
|
1508
|
-
const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await
|
|
1511
|
+
const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await normalizeProvider2(endpoint)()) : undefined;
|
|
1509
1512
|
const isCustomEndpoint = !!endpoint;
|
|
1510
1513
|
const resolvedConfig = Object.assign(input, {
|
|
1511
1514
|
endpoint: customEndpointProvider,
|
|
1512
1515
|
tls,
|
|
1513
1516
|
isCustomEndpoint,
|
|
1514
|
-
useDualstackEndpoint:
|
|
1515
|
-
useFipsEndpoint:
|
|
1517
|
+
useDualstackEndpoint: normalizeProvider2(useDualstackEndpoint ?? false),
|
|
1518
|
+
useFipsEndpoint: normalizeProvider2(useFipsEndpoint ?? false)
|
|
1516
1519
|
});
|
|
1517
1520
|
let configuredEndpointPromise = undefined;
|
|
1518
1521
|
resolvedConfig.serviceConfiguredEndpoint = async () => {
|
|
@@ -1523,9 +1526,6 @@ var resolveEndpointConfig = (input) => {
|
|
|
1523
1526
|
};
|
|
1524
1527
|
return resolvedConfig;
|
|
1525
1528
|
};
|
|
1526
|
-
// ../../../../node_modules/@smithy/middleware-retry/dist-es/configurations.js
|
|
1527
|
-
var import_util_middleware5 = __toESM(require_dist_cjs2(), 1);
|
|
1528
|
-
|
|
1529
1529
|
// ../../../../node_modules/@smithy/util-retry/dist-es/config.js
|
|
1530
1530
|
var RETRY_MODES;
|
|
1531
1531
|
(function(RETRY_MODES2) {
|
|
@@ -1817,14 +1817,14 @@ var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
|
|
|
1817
1817
|
};
|
|
1818
1818
|
var resolveRetryConfig = (input) => {
|
|
1819
1819
|
const { retryStrategy, retryMode: _retryMode, maxAttempts: _maxAttempts } = input;
|
|
1820
|
-
const maxAttempts =
|
|
1820
|
+
const maxAttempts = normalizeProvider2(_maxAttempts ?? DEFAULT_MAX_ATTEMPTS);
|
|
1821
1821
|
return Object.assign(input, {
|
|
1822
1822
|
maxAttempts,
|
|
1823
1823
|
retryStrategy: async () => {
|
|
1824
1824
|
if (retryStrategy) {
|
|
1825
1825
|
return retryStrategy;
|
|
1826
1826
|
}
|
|
1827
|
-
const retryMode = await
|
|
1827
|
+
const retryMode = await normalizeProvider2(_retryMode)();
|
|
1828
1828
|
if (retryMode === RETRY_MODES.ADAPTIVE) {
|
|
1829
1829
|
return new AdaptiveRetryStrategy(maxAttempts);
|
|
1830
1830
|
}
|
|
@@ -2117,9 +2117,6 @@ var calculateBodyLength = (body) => {
|
|
|
2117
2117
|
}
|
|
2118
2118
|
throw new Error(`Body Length computation failed for ${body}`);
|
|
2119
2119
|
};
|
|
2120
|
-
// ../../../../node_modules/@smithy/util-defaults-mode-node/dist-es/resolveDefaultsModeConfig.js
|
|
2121
|
-
var import_property_provider = __toESM(require_dist_cjs4(), 1);
|
|
2122
|
-
|
|
2123
2120
|
// ../../../../node_modules/@smithy/util-defaults-mode-node/dist-es/constants.js
|
|
2124
2121
|
var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV";
|
|
2125
2122
|
var AWS_REGION_ENV = "AWS_REGION";
|
|
@@ -2142,7 +2139,7 @@ var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {
|
|
|
2142
2139
|
};
|
|
2143
2140
|
|
|
2144
2141
|
// ../../../../node_modules/@smithy/util-defaults-mode-node/dist-es/resolveDefaultsModeConfig.js
|
|
2145
|
-
var resolveDefaultsModeConfig = ({ region = loadConfig(NODE_REGION_CONFIG_OPTIONS), defaultsMode = loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) =>
|
|
2142
|
+
var resolveDefaultsModeConfig = ({ region = loadConfig(NODE_REGION_CONFIG_OPTIONS), defaultsMode = loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => memoize(async () => {
|
|
2146
2143
|
const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode;
|
|
2147
2144
|
switch (mode?.toLowerCase()) {
|
|
2148
2145
|
case "auto":
|
|
@@ -2180,7 +2177,7 @@ var inferPhysicalRegion = async () => {
|
|
|
2180
2177
|
}
|
|
2181
2178
|
if (!process.env[ENV_IMDS_DISABLED]) {
|
|
2182
2179
|
try {
|
|
2183
|
-
const { getInstanceMetadataEndpoint, httpRequest } = await import("./chunk-
|
|
2180
|
+
const { getInstanceMetadataEndpoint, httpRequest } = await import("./chunk-t5em30ak.js");
|
|
2184
2181
|
const endpoint = await getInstanceMetadataEndpoint();
|
|
2185
2182
|
return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString();
|
|
2186
2183
|
} catch (e) {}
|
|
@@ -2228,4 +2225,4 @@ var toBase64 = (_input) => {
|
|
|
2228
2225
|
}
|
|
2229
2226
|
return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64");
|
|
2230
2227
|
};
|
|
2231
|
-
export { resolveHostHeaderConfig, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, resolveUserAgentConfig, EndpointCache, customEndpointFunctions, resolveEndpoint, awsEndpointFunctions, getUserAgentPlugin, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig, getContentLengthPlugin, getSerdePlugin, getEndpointPlugin, resolveEndpointConfig, DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, NODE_RETRY_MODE_CONFIG_OPTIONS, getRetryPlugin, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, fromUtf8, toUtf8, Hash, calculateBodyLength, fromBase64, toBase64, resolveDefaultsModeConfig, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration };
|
|
2228
|
+
export { resolveHostHeaderConfig, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, resolveUserAgentConfig, EndpointCache, customEndpointFunctions, resolveEndpoint, awsEndpointFunctions, getUserAgentPlugin, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, getSmithyContext, normalizeProvider2 as normalizeProvider, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig, getContentLengthPlugin, getSerdePlugin, getEndpointPlugin, resolveEndpointConfig, DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, NODE_RETRY_MODE_CONFIG_OPTIONS, getRetryPlugin, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, fromUtf8, toUtf8, Hash, calculateBodyLength, fromBase64, toBase64, resolveDefaultsModeConfig, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
CredentialsProviderError
|
|
4
|
+
} from "./chunk-zzerxbrm.js";
|
|
2
5
|
import {
|
|
3
6
|
require_client
|
|
4
7
|
} from "./chunk-frw3va9v.js";
|
|
5
|
-
import {
|
|
6
|
-
require_dist_cjs
|
|
7
|
-
} from "./chunk-2m04vhea.js";
|
|
8
8
|
import {
|
|
9
9
|
__require,
|
|
10
10
|
__toESM
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
|
|
13
13
|
// ../../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js
|
|
14
14
|
var import_client = __toESM(require_client(), 1);
|
|
15
|
-
var import_property_provider = __toESM(require_dist_cjs(), 1);
|
|
16
15
|
import { readFileSync } from "node:fs";
|
|
17
16
|
|
|
18
17
|
// ../../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js
|
|
@@ -21,7 +20,7 @@ var fromWebToken = (init) => async (awsIdentityProperties) => {
|
|
|
21
20
|
const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
|
|
22
21
|
let { roleAssumerWithWebIdentity } = init;
|
|
23
22
|
if (!roleAssumerWithWebIdentity) {
|
|
24
|
-
const { getDefaultRoleAssumerWithWebIdentity } = await import("./chunk-
|
|
23
|
+
const { getDefaultRoleAssumerWithWebIdentity } = await import("./chunk-dvkgakrr.js");
|
|
25
24
|
roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
|
|
26
25
|
...init.clientConfig,
|
|
27
26
|
credentialProviderLogger: init.logger,
|
|
@@ -52,7 +51,7 @@ var fromTokenFile = (init = {}) => async () => {
|
|
|
52
51
|
const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];
|
|
53
52
|
const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];
|
|
54
53
|
if (!webIdentityTokenFile || !roleArn) {
|
|
55
|
-
throw new
|
|
54
|
+
throw new CredentialsProviderError("Web identity configuration not specified", {
|
|
56
55
|
logger: init.logger
|
|
57
56
|
});
|
|
58
57
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
CredentialsProviderError
|
|
4
|
+
} from "./chunk-zzerxbrm.js";
|
|
2
5
|
import {
|
|
3
6
|
require_client
|
|
4
7
|
} from "./chunk-frw3va9v.js";
|
|
5
|
-
import {
|
|
6
|
-
require_dist_cjs
|
|
7
|
-
} from "./chunk-2m04vhea.js";
|
|
8
8
|
import {
|
|
9
9
|
__toESM
|
|
10
10
|
} from "./chunk-9v6qtbez.js";
|
|
11
11
|
|
|
12
12
|
// ../../../../node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js
|
|
13
13
|
var import_client = __toESM(require_client(), 1);
|
|
14
|
-
var import_property_provider = __toESM(require_dist_cjs(), 1);
|
|
15
14
|
var ENV_KEY = "AWS_ACCESS_KEY_ID";
|
|
16
15
|
var ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
|
|
17
16
|
var ENV_SESSION = "AWS_SESSION_TOKEN";
|
|
@@ -38,7 +37,7 @@ var fromEnv = (init) => async () => {
|
|
|
38
37
|
import_client.setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS", "g");
|
|
39
38
|
return credentials;
|
|
40
39
|
}
|
|
41
|
-
throw new
|
|
40
|
+
throw new CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger });
|
|
42
41
|
};
|
|
43
42
|
export {
|
|
44
43
|
fromEnv,
|
|
@@ -2,22 +2,19 @@
|
|
|
2
2
|
import {
|
|
3
3
|
loadConfig,
|
|
4
4
|
parseUrl
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7s5qcjkt.js";
|
|
6
6
|
import"./chunk-bf8bq8pc.js";
|
|
7
|
-
import"./chunk-saqpg5nd.js";
|
|
8
|
-
import {
|
|
9
|
-
require_dist_cjs
|
|
10
|
-
} from "./chunk-2m04vhea.js";
|
|
11
7
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
CredentialsProviderError,
|
|
9
|
+
ProviderError
|
|
10
|
+
} from "./chunk-zzerxbrm.js";
|
|
11
|
+
import"./chunk-saqpg5nd.js";
|
|
12
|
+
import"./chunk-9v6qtbez.js";
|
|
14
13
|
|
|
15
14
|
// ../../../../node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js
|
|
16
|
-
var import_property_provider2 = __toESM(require_dist_cjs(), 1);
|
|
17
15
|
import { parse } from "node:url";
|
|
18
16
|
|
|
19
17
|
// ../../../../node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js
|
|
20
|
-
var import_property_provider = __toESM(require_dist_cjs(), 1);
|
|
21
18
|
import { Buffer } from "node:buffer";
|
|
22
19
|
import { request } from "node:http";
|
|
23
20
|
function httpRequest(options) {
|
|
@@ -28,17 +25,17 @@ function httpRequest(options) {
|
|
|
28
25
|
hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1")
|
|
29
26
|
});
|
|
30
27
|
req.on("error", (err) => {
|
|
31
|
-
reject(Object.assign(new
|
|
28
|
+
reject(Object.assign(new ProviderError("Unable to connect to instance metadata service"), err));
|
|
32
29
|
req.destroy();
|
|
33
30
|
});
|
|
34
31
|
req.on("timeout", () => {
|
|
35
|
-
reject(new
|
|
32
|
+
reject(new ProviderError("TimeoutError from instance metadata service"));
|
|
36
33
|
req.destroy();
|
|
37
34
|
});
|
|
38
35
|
req.on("response", (res) => {
|
|
39
36
|
const { statusCode = 400 } = res;
|
|
40
37
|
if (statusCode < 200 || 300 <= statusCode) {
|
|
41
|
-
reject(Object.assign(new
|
|
38
|
+
reject(Object.assign(new ProviderError("Error response received from instance metadata service"), { statusCode }));
|
|
42
39
|
req.destroy();
|
|
43
40
|
}
|
|
44
41
|
const chunks = [];
|
|
@@ -88,7 +85,7 @@ var fromContainerMetadata = (init = {}) => {
|
|
|
88
85
|
const requestOptions = await getCmdsUri({ logger: init.logger });
|
|
89
86
|
const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));
|
|
90
87
|
if (!isImdsCredentials(credsResponse)) {
|
|
91
|
-
throw new
|
|
88
|
+
throw new CredentialsProviderError("Invalid response received from instance metadata service.", {
|
|
92
89
|
logger: init.logger
|
|
93
90
|
});
|
|
94
91
|
}
|
|
@@ -127,13 +124,13 @@ var getCmdsUri = async ({ logger }) => {
|
|
|
127
124
|
if (process.env[ENV_CMDS_FULL_URI]) {
|
|
128
125
|
const parsed = parse(process.env[ENV_CMDS_FULL_URI]);
|
|
129
126
|
if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) {
|
|
130
|
-
throw new
|
|
127
|
+
throw new CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {
|
|
131
128
|
tryNextLink: false,
|
|
132
129
|
logger
|
|
133
130
|
});
|
|
134
131
|
}
|
|
135
132
|
if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) {
|
|
136
|
-
throw new
|
|
133
|
+
throw new CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {
|
|
137
134
|
tryNextLink: false,
|
|
138
135
|
logger
|
|
139
136
|
});
|
|
@@ -143,18 +140,13 @@ var getCmdsUri = async ({ logger }) => {
|
|
|
143
140
|
port: parsed.port ? parseInt(parsed.port, 10) : undefined
|
|
144
141
|
};
|
|
145
142
|
}
|
|
146
|
-
throw new
|
|
143
|
+
throw new CredentialsProviderError("The container metadata credential provider cannot be used unless" + ` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` + " variable is set", {
|
|
147
144
|
tryNextLink: false,
|
|
148
145
|
logger
|
|
149
146
|
});
|
|
150
147
|
};
|
|
151
|
-
// ../../../../node_modules/@smithy/credential-provider-imds/dist-es/fromInstanceMetadata.js
|
|
152
|
-
var import_property_provider4 = __toESM(require_dist_cjs(), 1);
|
|
153
|
-
|
|
154
148
|
// ../../../../node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
class InstanceMetadataV1FallbackError extends import_property_provider3.CredentialsProviderError {
|
|
149
|
+
class InstanceMetadataV1FallbackError extends CredentialsProviderError {
|
|
158
150
|
constructor(message, tryNextLink = true) {
|
|
159
151
|
super(message, tryNextLink);
|
|
160
152
|
this.tryNextLink = tryNextLink;
|
|
@@ -272,7 +264,7 @@ var getInstanceMetadataProvider = (init = {}) => {
|
|
|
272
264
|
const envValue = env[AWS_EC2_METADATA_V1_DISABLED];
|
|
273
265
|
fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false";
|
|
274
266
|
if (envValue === undefined) {
|
|
275
|
-
throw new
|
|
267
|
+
throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });
|
|
276
268
|
}
|
|
277
269
|
return fallbackBlockedFromProcessEnv;
|
|
278
270
|
},
|
|
@@ -366,7 +358,7 @@ var getCredentialsFromProfile = async (profile, options, init) => {
|
|
|
366
358
|
path: IMDS_PATH + profile
|
|
367
359
|
})).toString());
|
|
368
360
|
if (!isImdsCredentials(credentialsResponse)) {
|
|
369
|
-
throw new
|
|
361
|
+
throw new CredentialsProviderError("Invalid response received from instance metadata service.", {
|
|
370
362
|
logger: init.logger
|
|
371
363
|
});
|
|
372
364
|
}
|