@karmaniverous/get-dotenv 7.0.0 → 7.0.2
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/chunks/{AwsRestJsonProtocol-DeiE3wkO.mjs → AwsRestJsonProtocol-Bh3OvjNM.mjs} +158 -81
- package/dist/chunks/{createCli-B9-MIwWj.mjs → createCli-wmAcTdWR.mjs} +4 -4
- package/dist/chunks/{externalDataInterceptor-gi2RH4ez.mjs → externalDataInterceptor-BBvsYwZE.mjs} +2 -2
- package/dist/chunks/{getSSOTokenFromFile-BfAhZf_d.mjs → getSSOTokenFromFile-BSeYpbLi.mjs} +4 -4
- package/dist/chunks/{index-98yxYe1W.mjs → index-BZrYAvLs.mjs} +281 -205
- package/dist/chunks/{index-CAtxK29A.mjs → index-BhMXFr37.mjs} +12 -9
- package/dist/chunks/{index-DY7wYcXW.mjs → index-C-9h7h7x.mjs} +14 -17
- package/dist/chunks/{index-AssUn9IY.mjs → index-CGG9e0xu.mjs} +11157 -8059
- package/dist/chunks/{index-CMSCF_uw.mjs → index-CQoEnkSc.mjs} +493 -254
- package/dist/chunks/{index-xRi3oKvY.mjs → index-CnnI9zSQ.mjs} +10 -12
- package/dist/chunks/{index-D8S1lJ24.mjs → index-DLciMnJ6.mjs} +271 -181
- package/dist/chunks/{index-B6r8O7PJ.mjs → index-DmynYewb.mjs} +14 -17
- package/dist/chunks/{index-C21RHLO4.mjs → index-DyRIwYWf.mjs} +33 -18
- package/dist/chunks/{index-mPj0Vhpw.mjs → index-GcL_Hrrr.mjs} +13 -15
- package/dist/chunks/{index-DfvhftMN.mjs → index-aUz_8rS_.mjs} +29 -28
- package/dist/chunks/index-cIL2r09o.mjs +31 -0
- package/dist/chunks/{index-Ccay5Db0.mjs → index-tlD9zcww.mjs} +16 -19
- package/dist/chunks/{loadSso-C-y9gQEz.mjs → loadSso-9hx2nl0k.mjs} +242 -180
- package/dist/chunks/{package-DiDNabNr.mjs → package-DbbYaehr.mjs} +1 -1
- package/dist/chunks/{parseKnownFiles-KczcjlE0.mjs → parseKnownFiles-CewXrtbo.mjs} +1 -1
- package/dist/chunks/{readDotenvCascade-HLU7FsEQ.mjs → readDotenvCascade-Dgx4SC1p.mjs} +3 -7
- package/dist/chunks/{readMergedOptions-D6niy_Ep.mjs → readMergedOptions-atT1xkoe.mjs} +5 -3
- package/dist/chunks/{resolveCliOptions-PWF1aEM9.mjs → resolveCliOptions-BLSqCGm7.mjs} +1 -1
- package/dist/chunks/{sdk-stream-mixin-blFikF4G.mjs → sdk-stream-mixin-CMdQ7nO8.mjs} +145 -5
- package/dist/chunks/{spawnEnv-5kdIVv0x.mjs → spawnEnv-CKgnHGpr.mjs} +5 -5
- package/dist/chunks/{types-Bp3u5-IH.mjs → types-BdKCfPRW.mjs} +1 -1
- package/dist/cli.mjs +12 -14
- package/dist/cliHost.mjs +5 -5
- package/dist/env-overlay.mjs +2 -2
- package/dist/getdotenv.cli.mjs +12 -14
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +16 -18
- package/dist/plugins-aws.mjs +3 -3
- package/dist/plugins-batch.mjs +3 -3
- package/dist/plugins-cmd.mjs +5 -5
- package/dist/plugins-init.mjs +4 -4
- package/dist/plugins.mjs +11 -13
- package/package.json +1 -1
- package/dist/chunks/index-DtdHVcXz.mjs +0 -27
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import fs from 'fs/promises';
|
|
2
|
-
import {
|
|
3
|
-
import { s as sdkStreamMixin } from './sdk-stream-mixin-
|
|
4
|
-
import './readMergedOptions-
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import { e as CredentialsProviderError, n as HttpRequest, ax as parseRfc3339DateTime, y as NodeHttpHandler, aO as setCredentialFeature } from './index-CGG9e0xu.mjs';
|
|
3
|
+
import { s as sdkStreamMixin } from './sdk-stream-mixin-CMdQ7nO8.mjs';
|
|
4
|
+
import './readMergedOptions-atT1xkoe.mjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '@commander-js/extra-typings';
|
|
7
|
-
import './readDotenvCascade-
|
|
7
|
+
import './readDotenvCascade-Dgx4SC1p.mjs';
|
|
8
8
|
import 'fs-extra';
|
|
9
9
|
import 'radash';
|
|
10
10
|
import 'node:buffer';
|
|
@@ -19,14 +19,12 @@ import './loader-CE4HSRN4.mjs';
|
|
|
19
19
|
import 'package-directory';
|
|
20
20
|
import 'yaml';
|
|
21
21
|
import 'execa';
|
|
22
|
-
import '
|
|
23
|
-
import '
|
|
24
|
-
import 'node:
|
|
25
|
-
import 'http';
|
|
26
|
-
import 'https';
|
|
27
|
-
import 'stream';
|
|
28
|
-
import 'process';
|
|
22
|
+
import 'node:os';
|
|
23
|
+
import 'node:stream';
|
|
24
|
+
import 'node:crypto';
|
|
29
25
|
import 'node:fs';
|
|
26
|
+
import 'node:https';
|
|
27
|
+
import 'node:process';
|
|
30
28
|
|
|
31
29
|
const ECS_CONTAINER_HOST = "169.254.170.2";
|
|
32
30
|
const EKS_CONTAINER_HOST_IPv4 = "169.254.170.23";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { p as packageInfo } from './package-
|
|
3
|
-
import
|
|
4
|
-
import './
|
|
1
|
+
import { aE as resolveAwsSdkSigV4Config, au as normalizeProvider, ap as getSmithyContext, B as BinaryDecisionDiagram, l as EndpointCache, $ as decideEndpoint, Q as awsEndpointFunctions, Z as customEndpointFunctions, M as ServiceException, T as TypeRegistry, aT as toUtf8, a8 as fromUtf8, aA as parseUrl, x as NoOpLogger, b as AwsSdkSigV4Signer, w as NoAuthSigner, aR as toBase64, a6 as fromBase64, a1 as emitWarningIfUnsupportedVersion, aG as resolveDefaultsModeConfig, a2 as emitWarningIfUnsupportedVersion$1, aQ as streamCollector, V as calculateBodyLength, ar as loadConfig, N as NODE_APP_ID_CONFIG_OPTIONS, v as NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, u as NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, H as Hash, s as NODE_RETRY_MODE_CONFIG_OPTIONS, D as DEFAULT_RETRY_MODE, y as NodeHttpHandler, q as NODE_REGION_CONFIG_FILE_OPTIONS, r as NODE_REGION_CONFIG_OPTIONS, p as NODE_MAX_ATTEMPT_CONFIG_OPTIONS, Y as createDefaultUserAgentProvider, o as NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, as as loadConfigsForDefaultMode, aa as getAwsRegionExtensionConfiguration, ad as getDefaultExtensionConfiguration, ai as getHttpHandlerExtensionConfiguration, aC as resolveAwsRegionExtensionConfiguration, aF as resolveDefaultRuntimeConfig, aJ as resolveHttpHandlerRuntimeConfig, c as Client, aN as resolveUserAgentConfig, aM as resolveRetryConfig, aL as resolveRegionConfig, aH as resolveEndpointConfig, ao as getSchemaSerdePlugin, aq as getUserAgentPlugin, an as getRetryPlugin, ac as getContentLengthPlugin, ag as getHostHeaderPlugin, ak as getLoggerPlugin, am as getRecursionDetectionPlugin, ah as getHttpAuthSchemeEndpointRuleSetPlugin, f as DefaultIdentityProviderConfig, aj as getHttpSigningPlugin, aI as resolveHostHeaderConfig, d as Command, ae as getEndpointPlugin } from './index-CGG9e0xu.mjs';
|
|
2
|
+
import { p as packageInfo } from './package-DbbYaehr.mjs';
|
|
3
|
+
import 'node:crypto';
|
|
4
|
+
import { A as AwsRestJsonProtocol } from './AwsRestJsonProtocol-Bh3OvjNM.mjs';
|
|
5
|
+
import './readMergedOptions-atT1xkoe.mjs';
|
|
5
6
|
import 'zod';
|
|
6
7
|
import '@commander-js/extra-typings';
|
|
7
|
-
import './readDotenvCascade-
|
|
8
|
+
import './readDotenvCascade-Dgx4SC1p.mjs';
|
|
8
9
|
import 'fs-extra';
|
|
9
10
|
import 'radash';
|
|
10
11
|
import 'node:buffer';
|
|
@@ -19,15 +20,13 @@ import './loader-CE4HSRN4.mjs';
|
|
|
19
20
|
import 'package-directory';
|
|
20
21
|
import 'yaml';
|
|
21
22
|
import 'execa';
|
|
22
|
-
import '
|
|
23
|
-
import 'os';
|
|
23
|
+
import 'node:os';
|
|
24
24
|
import 'node:fs/promises';
|
|
25
|
-
import '
|
|
26
|
-
import 'https';
|
|
27
|
-
import 'stream';
|
|
28
|
-
import 'process';
|
|
25
|
+
import 'node:stream';
|
|
29
26
|
import 'node:fs';
|
|
30
|
-
import '
|
|
27
|
+
import 'node:https';
|
|
28
|
+
import 'node:process';
|
|
29
|
+
import './sdk-stream-mixin-CMdQ7nO8.mjs';
|
|
31
30
|
|
|
32
31
|
const defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
33
32
|
return {
|
|
@@ -92,174 +91,105 @@ const commonParams = {
|
|
|
92
91
|
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
93
92
|
};
|
|
94
93
|
|
|
95
|
-
const
|
|
96
|
-
const a =
|
|
97
|
-
const _data = {
|
|
98
|
-
|
|
94
|
+
const m = "ref";
|
|
95
|
+
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = "stringEquals", h = { [m]: "Endpoint" }, i = { [m]: d }, j = { fn: f, argv: [i, "name"] }, k = {}, l = [{ [m]: "Region" }];
|
|
96
|
+
const _data = {
|
|
97
|
+
conditions: [
|
|
98
|
+
[c, [h]],
|
|
99
|
+
[c, l],
|
|
100
|
+
["aws.partition", l, d],
|
|
101
|
+
[e, [{ [m]: "UseFIPS" }, b]],
|
|
102
|
+
[e, [{ [m]: "UseDualStack" }, b]],
|
|
103
|
+
[e, [{ fn: f, argv: [i, "supportsDualStack"] }, b]],
|
|
104
|
+
[e, [{ fn: f, argv: [i, "supportsFIPS"] }, b]],
|
|
105
|
+
[g, [j, "aws"]],
|
|
106
|
+
[g, [j, "aws-cn"]],
|
|
107
|
+
[g, [j, "aws-us-gov"]],
|
|
108
|
+
],
|
|
109
|
+
results: [
|
|
110
|
+
[a],
|
|
111
|
+
[a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
112
|
+
[a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
|
|
113
|
+
[h, k],
|
|
114
|
+
["https://{Region}.signin.aws.amazon.com", k],
|
|
115
|
+
["https://{Region}.signin.amazonaws.cn", k],
|
|
116
|
+
["https://{Region}.signin.amazonaws-us-gov.com", k],
|
|
117
|
+
["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", k],
|
|
118
|
+
[a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
|
|
119
|
+
["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}", k],
|
|
120
|
+
[a, "FIPS is enabled but this partition does not support FIPS"],
|
|
121
|
+
["https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}", k],
|
|
122
|
+
[a, "DualStack is enabled but this partition does not support DualStack"],
|
|
123
|
+
["https://signin.{Region}.{PartitionResult#dnsSuffix}", k],
|
|
124
|
+
[a, "Invalid Configuration: Missing Region"],
|
|
125
|
+
],
|
|
126
|
+
};
|
|
127
|
+
const root = 2;
|
|
128
|
+
const r = 100_000_000;
|
|
129
|
+
const nodes = new Int32Array([
|
|
130
|
+
-1,
|
|
131
|
+
1,
|
|
132
|
+
-1,
|
|
133
|
+
0,
|
|
134
|
+
15,
|
|
135
|
+
3,
|
|
136
|
+
1,
|
|
137
|
+
4,
|
|
138
|
+
r + 14,
|
|
139
|
+
2,
|
|
140
|
+
5,
|
|
141
|
+
r + 14,
|
|
142
|
+
3,
|
|
143
|
+
11,
|
|
144
|
+
6,
|
|
145
|
+
4,
|
|
146
|
+
10,
|
|
147
|
+
7,
|
|
148
|
+
7,
|
|
149
|
+
r + 4,
|
|
150
|
+
8,
|
|
151
|
+
8,
|
|
152
|
+
r + 5,
|
|
153
|
+
9,
|
|
154
|
+
9,
|
|
155
|
+
r + 6,
|
|
156
|
+
r + 13,
|
|
157
|
+
5,
|
|
158
|
+
r + 11,
|
|
159
|
+
r + 12,
|
|
160
|
+
4,
|
|
161
|
+
13,
|
|
162
|
+
12,
|
|
163
|
+
6,
|
|
164
|
+
r + 9,
|
|
165
|
+
r + 10,
|
|
166
|
+
5,
|
|
167
|
+
14,
|
|
168
|
+
r + 8,
|
|
169
|
+
6,
|
|
170
|
+
r + 7,
|
|
171
|
+
r + 8,
|
|
172
|
+
3,
|
|
173
|
+
r + 1,
|
|
174
|
+
16,
|
|
175
|
+
4,
|
|
176
|
+
r + 2,
|
|
177
|
+
r + 3,
|
|
178
|
+
]);
|
|
179
|
+
const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
99
180
|
|
|
100
181
|
const cache = new EndpointCache({
|
|
101
182
|
size: 50,
|
|
102
183
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
103
184
|
});
|
|
104
185
|
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
105
|
-
return cache.get(endpointParams, () =>
|
|
186
|
+
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
106
187
|
endpointParams: endpointParams,
|
|
107
188
|
logger: context.logger,
|
|
108
189
|
}));
|
|
109
190
|
};
|
|
110
191
|
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
111
192
|
|
|
112
|
-
const getRuntimeConfig$1 = (config) => {
|
|
113
|
-
return {
|
|
114
|
-
apiVersion: "2023-01-01",
|
|
115
|
-
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
116
|
-
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
117
|
-
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
118
|
-
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
119
|
-
extensions: config?.extensions ?? [],
|
|
120
|
-
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSigninHttpAuthSchemeProvider,
|
|
121
|
-
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
122
|
-
{
|
|
123
|
-
schemeId: "aws.auth#sigv4",
|
|
124
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
125
|
-
signer: new AwsSdkSigV4Signer(),
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
schemeId: "smithy.api#noAuth",
|
|
129
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
130
|
-
signer: new NoAuthSigner(),
|
|
131
|
-
},
|
|
132
|
-
],
|
|
133
|
-
logger: config?.logger ?? new NoOpLogger(),
|
|
134
|
-
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
135
|
-
protocolSettings: config?.protocolSettings ?? {
|
|
136
|
-
defaultNamespace: "com.amazonaws.signin",
|
|
137
|
-
version: "2023-01-01",
|
|
138
|
-
serviceTarget: "Signin",
|
|
139
|
-
},
|
|
140
|
-
serviceId: config?.serviceId ?? "Signin",
|
|
141
|
-
urlParser: config?.urlParser ?? parseUrl,
|
|
142
|
-
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
143
|
-
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
const getRuntimeConfig = (config) => {
|
|
148
|
-
emitWarningIfUnsupportedVersion(process.version);
|
|
149
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
150
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
151
|
-
const clientSharedValues = getRuntimeConfig$1(config);
|
|
152
|
-
emitWarningIfUnsupportedVersion$1(process.version);
|
|
153
|
-
const loaderConfig = {
|
|
154
|
-
profile: config?.profile,
|
|
155
|
-
logger: clientSharedValues.logger,
|
|
156
|
-
};
|
|
157
|
-
return {
|
|
158
|
-
...clientSharedValues,
|
|
159
|
-
...config,
|
|
160
|
-
runtime: "node",
|
|
161
|
-
defaultsMode,
|
|
162
|
-
authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
163
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
164
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
165
|
-
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
166
|
-
maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
167
|
-
region: config?.region ??
|
|
168
|
-
loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
169
|
-
requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
170
|
-
retryMode: config?.retryMode ??
|
|
171
|
-
loadConfig({
|
|
172
|
-
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
173
|
-
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
174
|
-
}, config),
|
|
175
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
176
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
177
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
178
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
179
|
-
userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
184
|
-
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
185
|
-
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
186
|
-
let _credentials = runtimeConfig.credentials;
|
|
187
|
-
return {
|
|
188
|
-
setHttpAuthScheme(httpAuthScheme) {
|
|
189
|
-
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
190
|
-
if (index === -1) {
|
|
191
|
-
_httpAuthSchemes.push(httpAuthScheme);
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
195
|
-
}
|
|
196
|
-
},
|
|
197
|
-
httpAuthSchemes() {
|
|
198
|
-
return _httpAuthSchemes;
|
|
199
|
-
},
|
|
200
|
-
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
201
|
-
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
202
|
-
},
|
|
203
|
-
httpAuthSchemeProvider() {
|
|
204
|
-
return _httpAuthSchemeProvider;
|
|
205
|
-
},
|
|
206
|
-
setCredentials(credentials) {
|
|
207
|
-
_credentials = credentials;
|
|
208
|
-
},
|
|
209
|
-
credentials() {
|
|
210
|
-
return _credentials;
|
|
211
|
-
},
|
|
212
|
-
};
|
|
213
|
-
};
|
|
214
|
-
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
215
|
-
return {
|
|
216
|
-
httpAuthSchemes: config.httpAuthSchemes(),
|
|
217
|
-
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
218
|
-
credentials: config.credentials(),
|
|
219
|
-
};
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
223
|
-
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
224
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
225
|
-
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
class SigninClient extends Client {
|
|
229
|
-
config;
|
|
230
|
-
constructor(...[configuration]) {
|
|
231
|
-
const _config_0 = getRuntimeConfig(configuration || {});
|
|
232
|
-
super(_config_0);
|
|
233
|
-
this.initConfig = _config_0;
|
|
234
|
-
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
235
|
-
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
236
|
-
const _config_3 = resolveRetryConfig(_config_2);
|
|
237
|
-
const _config_4 = resolveRegionConfig(_config_3);
|
|
238
|
-
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
239
|
-
const _config_6 = resolveEndpointConfig(_config_5);
|
|
240
|
-
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
241
|
-
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
242
|
-
this.config = _config_8;
|
|
243
|
-
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
244
|
-
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
245
|
-
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
246
|
-
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
247
|
-
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
248
|
-
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
249
|
-
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
250
|
-
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
251
|
-
httpAuthSchemeParametersProvider: defaultSigninHttpAuthSchemeParametersProvider,
|
|
252
|
-
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
253
|
-
"aws.auth#sigv4": config.credentials,
|
|
254
|
-
}),
|
|
255
|
-
}));
|
|
256
|
-
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
257
|
-
}
|
|
258
|
-
destroy() {
|
|
259
|
-
super.destroy();
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
193
|
class SigninServiceException extends ServiceException {
|
|
264
194
|
constructor(options) {
|
|
265
195
|
super(options);
|
|
@@ -351,17 +281,28 @@ const _jN = "jsonName";
|
|
|
351
281
|
const _m = "message";
|
|
352
282
|
const _rT = "refreshToken";
|
|
353
283
|
const _rU = "redirectUri";
|
|
354
|
-
const _s = "
|
|
284
|
+
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.signin";
|
|
355
285
|
const _sAK = "secretAccessKey";
|
|
356
286
|
const _sT = "sessionToken";
|
|
357
|
-
const
|
|
287
|
+
const _se = "server";
|
|
358
288
|
const _tI = "tokenInput";
|
|
359
289
|
const _tO = "tokenOutput";
|
|
360
290
|
const _tT = "tokenType";
|
|
361
291
|
const n0 = "com.amazonaws.signin";
|
|
292
|
+
const _s_registry = TypeRegistry.for(_s);
|
|
293
|
+
var SigninServiceException$ = [-3, _s, "SigninServiceException", 0, [], []];
|
|
294
|
+
_s_registry.registerError(SigninServiceException$, SigninServiceException);
|
|
295
|
+
const n0_registry = TypeRegistry.for(n0);
|
|
296
|
+
var AccessDeniedException$ = [-3, n0, _ADE, { [_e]: _c }, [_e, _m], [0, 0], 2];
|
|
297
|
+
n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
|
|
298
|
+
var InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _m], [0, 0], 2];
|
|
299
|
+
n0_registry.registerError(InternalServerException$, InternalServerException);
|
|
300
|
+
var TooManyRequestsError$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_e, _m], [0, 0], 2];
|
|
301
|
+
n0_registry.registerError(TooManyRequestsError$, TooManyRequestsError);
|
|
302
|
+
var ValidationException$ = [-3, n0, _VE, { [_e]: _c, [_hE]: 400 }, [_e, _m], [0, 0], 2];
|
|
303
|
+
n0_registry.registerError(ValidationException$, ValidationException);
|
|
304
|
+
const errorTypeRegistries = [_s_registry, n0_registry];
|
|
362
305
|
var RefreshToken = [0, n0, _RT, 8, 0];
|
|
363
|
-
var AccessDeniedException$ = [-3, n0, _ADE, { [_e]: _c }, [_e, _m], [0, 0]];
|
|
364
|
-
TypeRegistry.for(n0).registerError(AccessDeniedException$, AccessDeniedException);
|
|
365
306
|
var AccessToken$ = [
|
|
366
307
|
3,
|
|
367
308
|
n0,
|
|
@@ -373,6 +314,7 @@ var AccessToken$ = [
|
|
|
373
314
|
[0, { [_jN]: _sAK }],
|
|
374
315
|
[0, { [_jN]: _sT }],
|
|
375
316
|
],
|
|
317
|
+
3,
|
|
376
318
|
];
|
|
377
319
|
var CreateOAuth2TokenRequest$ = [
|
|
378
320
|
3,
|
|
@@ -381,6 +323,7 @@ var CreateOAuth2TokenRequest$ = [
|
|
|
381
323
|
0,
|
|
382
324
|
[_tI],
|
|
383
325
|
[[() => CreateOAuth2TokenRequestBody$, 16]],
|
|
326
|
+
1,
|
|
384
327
|
];
|
|
385
328
|
var CreateOAuth2TokenRequestBody$ = [
|
|
386
329
|
3,
|
|
@@ -396,6 +339,7 @@ var CreateOAuth2TokenRequestBody$ = [
|
|
|
396
339
|
[0, { [_jN]: _cV }],
|
|
397
340
|
[() => RefreshToken, { [_jN]: _rT }],
|
|
398
341
|
],
|
|
342
|
+
2,
|
|
399
343
|
];
|
|
400
344
|
var CreateOAuth2TokenResponse$ = [
|
|
401
345
|
3,
|
|
@@ -404,6 +348,7 @@ var CreateOAuth2TokenResponse$ = [
|
|
|
404
348
|
0,
|
|
405
349
|
[_tO],
|
|
406
350
|
[[() => CreateOAuth2TokenResponseBody$, 16]],
|
|
351
|
+
1,
|
|
407
352
|
];
|
|
408
353
|
var CreateOAuth2TokenResponseBody$ = [
|
|
409
354
|
3,
|
|
@@ -418,15 +363,8 @@ var CreateOAuth2TokenResponseBody$ = [
|
|
|
418
363
|
[() => RefreshToken, { [_jN]: _rT }],
|
|
419
364
|
[0, { [_jN]: _iT }],
|
|
420
365
|
],
|
|
366
|
+
4,
|
|
421
367
|
];
|
|
422
|
-
var InternalServerException$ = [-3, n0, _ISE, { [_e]: _s, [_hE]: 500 }, [_e, _m], [0, 0]];
|
|
423
|
-
TypeRegistry.for(n0).registerError(InternalServerException$, InternalServerException);
|
|
424
|
-
var TooManyRequestsError$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_e, _m], [0, 0]];
|
|
425
|
-
TypeRegistry.for(n0).registerError(TooManyRequestsError$, TooManyRequestsError);
|
|
426
|
-
var ValidationException$ = [-3, n0, _VE, { [_e]: _c, [_hE]: 400 }, [_e, _m], [0, 0]];
|
|
427
|
-
TypeRegistry.for(n0).registerError(ValidationException$, ValidationException);
|
|
428
|
-
var SigninServiceException$ = [-3, _sm, "SigninServiceException", 0, [], []];
|
|
429
|
-
TypeRegistry.for(_sm).registerError(SigninServiceException$, SigninServiceException);
|
|
430
368
|
var CreateOAuth2Token$ = [
|
|
431
369
|
9,
|
|
432
370
|
n0,
|
|
@@ -436,6 +374,158 @@ var CreateOAuth2Token$ = [
|
|
|
436
374
|
() => CreateOAuth2TokenResponse$,
|
|
437
375
|
];
|
|
438
376
|
|
|
377
|
+
const getRuntimeConfig$1 = (config) => {
|
|
378
|
+
return {
|
|
379
|
+
apiVersion: "2023-01-01",
|
|
380
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
381
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
382
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
383
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
384
|
+
extensions: config?.extensions ?? [],
|
|
385
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSigninHttpAuthSchemeProvider,
|
|
386
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
387
|
+
{
|
|
388
|
+
schemeId: "aws.auth#sigv4",
|
|
389
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
390
|
+
signer: new AwsSdkSigV4Signer(),
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
schemeId: "smithy.api#noAuth",
|
|
394
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
395
|
+
signer: new NoAuthSigner(),
|
|
396
|
+
},
|
|
397
|
+
],
|
|
398
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
399
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
400
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
401
|
+
defaultNamespace: "com.amazonaws.signin",
|
|
402
|
+
errorTypeRegistries,
|
|
403
|
+
version: "2023-01-01",
|
|
404
|
+
serviceTarget: "Signin",
|
|
405
|
+
},
|
|
406
|
+
serviceId: config?.serviceId ?? "Signin",
|
|
407
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
408
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
409
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
const getRuntimeConfig = (config) => {
|
|
414
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
415
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
416
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
417
|
+
const clientSharedValues = getRuntimeConfig$1(config);
|
|
418
|
+
emitWarningIfUnsupportedVersion$1(process.version);
|
|
419
|
+
const loaderConfig = {
|
|
420
|
+
profile: config?.profile,
|
|
421
|
+
logger: clientSharedValues.logger,
|
|
422
|
+
};
|
|
423
|
+
return {
|
|
424
|
+
...clientSharedValues,
|
|
425
|
+
...config,
|
|
426
|
+
runtime: "node",
|
|
427
|
+
defaultsMode,
|
|
428
|
+
authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
429
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
430
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
431
|
+
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
432
|
+
maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
433
|
+
region: config?.region ??
|
|
434
|
+
loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
435
|
+
requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
436
|
+
retryMode: config?.retryMode ??
|
|
437
|
+
loadConfig({
|
|
438
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
439
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
440
|
+
}, config),
|
|
441
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
442
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
443
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
444
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
445
|
+
userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
450
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
451
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
452
|
+
let _credentials = runtimeConfig.credentials;
|
|
453
|
+
return {
|
|
454
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
455
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
456
|
+
if (index === -1) {
|
|
457
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
458
|
+
}
|
|
459
|
+
else {
|
|
460
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
httpAuthSchemes() {
|
|
464
|
+
return _httpAuthSchemes;
|
|
465
|
+
},
|
|
466
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
467
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
468
|
+
},
|
|
469
|
+
httpAuthSchemeProvider() {
|
|
470
|
+
return _httpAuthSchemeProvider;
|
|
471
|
+
},
|
|
472
|
+
setCredentials(credentials) {
|
|
473
|
+
_credentials = credentials;
|
|
474
|
+
},
|
|
475
|
+
credentials() {
|
|
476
|
+
return _credentials;
|
|
477
|
+
},
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
481
|
+
return {
|
|
482
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
483
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
484
|
+
credentials: config.credentials(),
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
489
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
490
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
491
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
class SigninClient extends Client {
|
|
495
|
+
config;
|
|
496
|
+
constructor(...[configuration]) {
|
|
497
|
+
const _config_0 = getRuntimeConfig(configuration || {});
|
|
498
|
+
super(_config_0);
|
|
499
|
+
this.initConfig = _config_0;
|
|
500
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
501
|
+
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
502
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
503
|
+
const _config_4 = resolveRegionConfig(_config_3);
|
|
504
|
+
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
505
|
+
const _config_6 = resolveEndpointConfig(_config_5);
|
|
506
|
+
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
507
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
508
|
+
this.config = _config_8;
|
|
509
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
510
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
511
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
512
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
513
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
514
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
515
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
516
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
517
|
+
httpAuthSchemeParametersProvider: defaultSigninHttpAuthSchemeParametersProvider,
|
|
518
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
519
|
+
"aws.auth#sigv4": config.credentials,
|
|
520
|
+
}),
|
|
521
|
+
}));
|
|
522
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
523
|
+
}
|
|
524
|
+
destroy() {
|
|
525
|
+
super.destroy();
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
439
529
|
class CreateOAuth2TokenCommand extends Command
|
|
440
530
|
.classBuilder()
|
|
441
531
|
.ep(commonParams)
|
|
@@ -448,4 +538,4 @@ class CreateOAuth2TokenCommand extends Command
|
|
|
448
538
|
.build() {
|
|
449
539
|
}
|
|
450
540
|
|
|
451
|
-
export { Command as $Command, AccessDeniedException, AccessDeniedException$, AccessToken$, CreateOAuth2Token$, CreateOAuth2TokenCommand, CreateOAuth2TokenRequest$, CreateOAuth2TokenRequestBody$, CreateOAuth2TokenResponse$, CreateOAuth2TokenResponseBody$, InternalServerException, InternalServerException$, SigninClient, SigninServiceException, SigninServiceException$, TooManyRequestsError, TooManyRequestsError$, ValidationException, ValidationException$, Client as __Client };
|
|
541
|
+
export { Command as $Command, AccessDeniedException, AccessDeniedException$, AccessToken$, CreateOAuth2Token$, CreateOAuth2TokenCommand, CreateOAuth2TokenRequest$, CreateOAuth2TokenRequestBody$, CreateOAuth2TokenResponse$, CreateOAuth2TokenResponseBody$, InternalServerException, InternalServerException$, SigninClient, SigninServiceException, SigninServiceException$, TooManyRequestsError, TooManyRequestsError$, ValidationException, ValidationException$, Client as __Client, errorTypeRegistries };
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import { readFileSync } from 'fs';
|
|
2
|
-
import { e as
|
|
3
|
-
import {
|
|
4
|
-
import './
|
|
5
|
-
import 'fs/promises';
|
|
6
|
-
import 'crypto';
|
|
7
|
-
import 'path';
|
|
8
|
-
import './readMergedOptions-D6niy_Ep.mjs';
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { e as CredentialsProviderError, aO as setCredentialFeature } from './index-CGG9e0xu.mjs';
|
|
3
|
+
import { e as externalDataInterceptor } from './externalDataInterceptor-BBvsYwZE.mjs';
|
|
4
|
+
import './readMergedOptions-atT1xkoe.mjs';
|
|
9
5
|
import 'zod';
|
|
10
6
|
import '@commander-js/extra-typings';
|
|
11
|
-
import './readDotenvCascade-
|
|
7
|
+
import './readDotenvCascade-Dgx4SC1p.mjs';
|
|
12
8
|
import 'fs-extra';
|
|
13
9
|
import 'radash';
|
|
14
10
|
import 'node:buffer';
|
|
15
11
|
import 'node:path';
|
|
16
12
|
import './loadModuleDefault-Dj8B3Stt.mjs';
|
|
13
|
+
import 'crypto';
|
|
14
|
+
import 'path';
|
|
17
15
|
import 'url';
|
|
18
16
|
import 'dotenv';
|
|
19
17
|
import 'nanoid';
|
|
@@ -21,21 +19,20 @@ import './loader-CE4HSRN4.mjs';
|
|
|
21
19
|
import 'package-directory';
|
|
22
20
|
import 'yaml';
|
|
23
21
|
import 'execa';
|
|
24
|
-
import '
|
|
25
|
-
import 'os';
|
|
22
|
+
import 'node:os';
|
|
26
23
|
import 'node:fs/promises';
|
|
27
|
-
import '
|
|
28
|
-
import '
|
|
29
|
-
import '
|
|
30
|
-
import 'process';
|
|
31
|
-
import '
|
|
24
|
+
import 'node:stream';
|
|
25
|
+
import 'node:crypto';
|
|
26
|
+
import 'node:https';
|
|
27
|
+
import 'node:process';
|
|
28
|
+
import './getSSOTokenFromFile-BSeYpbLi.mjs';
|
|
32
29
|
|
|
33
30
|
const fromWebToken = (init) => async (awsIdentityProperties) => {
|
|
34
31
|
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");
|
|
35
32
|
const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
|
|
36
33
|
let { roleAssumerWithWebIdentity } = init;
|
|
37
34
|
if (!roleAssumerWithWebIdentity) {
|
|
38
|
-
const { getDefaultRoleAssumerWithWebIdentity } = await import('./index-
|
|
35
|
+
const { getDefaultRoleAssumerWithWebIdentity } = await import('./index-CQoEnkSc.mjs');
|
|
39
36
|
roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
|
|
40
37
|
...init.clientConfig,
|
|
41
38
|
credentialProviderLogger: init.logger,
|