@karmaniverous/get-dotenv 7.0.1 → 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.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,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
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';
|
|
4
6
|
import 'zod';
|
|
5
7
|
import '@commander-js/extra-typings';
|
|
6
|
-
import './readDotenvCascade-
|
|
8
|
+
import './readDotenvCascade-Dgx4SC1p.mjs';
|
|
7
9
|
import 'fs-extra';
|
|
8
10
|
import 'radash';
|
|
9
11
|
import 'node:buffer';
|
|
@@ -18,22 +20,21 @@ import './loader-CE4HSRN4.mjs';
|
|
|
18
20
|
import 'package-directory';
|
|
19
21
|
import 'yaml';
|
|
20
22
|
import 'execa';
|
|
21
|
-
import '
|
|
22
|
-
import 'os';
|
|
23
|
+
import 'node:os';
|
|
23
24
|
import 'node:fs/promises';
|
|
24
|
-
import '
|
|
25
|
-
import 'https';
|
|
26
|
-
import 'stream';
|
|
27
|
-
import 'process';
|
|
25
|
+
import 'node:stream';
|
|
28
26
|
import 'node:fs';
|
|
29
|
-
import '
|
|
27
|
+
import 'node:https';
|
|
28
|
+
import 'node:process';
|
|
29
|
+
import './sdk-stream-mixin-CMdQ7nO8.mjs';
|
|
30
30
|
|
|
31
31
|
const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
32
32
|
return {
|
|
33
33
|
operation: getSmithyContext(context).operation,
|
|
34
|
-
region: await normalizeProvider(config.region)() ||
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
region: (await normalizeProvider(config.region)()) ||
|
|
35
|
+
(() => {
|
|
36
|
+
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
37
|
+
})(),
|
|
37
38
|
};
|
|
38
39
|
};
|
|
39
40
|
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
@@ -59,26 +60,10 @@ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
|
|
59
60
|
const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
|
|
60
61
|
const options = [];
|
|
61
62
|
switch (authParameters.operation) {
|
|
62
|
-
case "GetRoleCredentials":
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
case "ListAccountRoles":
|
|
68
|
-
{
|
|
69
|
-
options.push(createSmithyApiNoAuthHttpAuthOption());
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
case "ListAccounts":
|
|
73
|
-
{
|
|
74
|
-
options.push(createSmithyApiNoAuthHttpAuthOption());
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
77
|
-
case "Logout":
|
|
78
|
-
{
|
|
79
|
-
options.push(createSmithyApiNoAuthHttpAuthOption());
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
63
|
+
case "GetRoleCredentials": {
|
|
64
|
+
options.push(createSmithyApiNoAuthHttpAuthOption());
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
82
67
|
default: {
|
|
83
68
|
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
84
69
|
}
|
|
@@ -106,27 +91,236 @@ const commonParams = {
|
|
|
106
91
|
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
107
92
|
};
|
|
108
93
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
94
|
+
const k = "ref";
|
|
95
|
+
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = {}, j = [{ [k]: "Region" }];
|
|
96
|
+
const _data = {
|
|
97
|
+
conditions: [
|
|
98
|
+
[c, [g]],
|
|
99
|
+
[c, j],
|
|
100
|
+
["aws.partition", j, d],
|
|
101
|
+
[e, [{ [k]: "UseFIPS" }, b]],
|
|
102
|
+
[e, [{ [k]: "UseDualStack" }, b]],
|
|
103
|
+
[e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
|
|
104
|
+
[e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]],
|
|
105
|
+
["stringEquals", [{ fn: f, argv: [h, "name"] }, "aws-us-gov"]],
|
|
106
|
+
],
|
|
107
|
+
results: [
|
|
108
|
+
[a],
|
|
109
|
+
[a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
110
|
+
[a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
|
|
111
|
+
[g, i],
|
|
112
|
+
["https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
|
|
113
|
+
[a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
|
|
114
|
+
["https://portal.sso.{Region}.amazonaws.com", i],
|
|
115
|
+
["https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", i],
|
|
116
|
+
[a, "FIPS is enabled but this partition does not support FIPS"],
|
|
117
|
+
["https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
|
|
118
|
+
[a, "DualStack is enabled but this partition does not support DualStack"],
|
|
119
|
+
["https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", i],
|
|
120
|
+
[a, "Invalid Configuration: Missing Region"],
|
|
121
|
+
],
|
|
122
|
+
};
|
|
123
|
+
const root = 2;
|
|
124
|
+
const r = 100_000_000;
|
|
125
|
+
const nodes = new Int32Array([
|
|
126
|
+
-1,
|
|
127
|
+
1,
|
|
128
|
+
-1,
|
|
129
|
+
0,
|
|
130
|
+
13,
|
|
131
|
+
3,
|
|
132
|
+
1,
|
|
133
|
+
4,
|
|
134
|
+
r + 12,
|
|
135
|
+
2,
|
|
136
|
+
5,
|
|
137
|
+
r + 12,
|
|
138
|
+
3,
|
|
139
|
+
8,
|
|
140
|
+
6,
|
|
141
|
+
4,
|
|
142
|
+
7,
|
|
143
|
+
r + 11,
|
|
144
|
+
5,
|
|
145
|
+
r + 9,
|
|
146
|
+
r + 10,
|
|
147
|
+
4,
|
|
148
|
+
11,
|
|
149
|
+
9,
|
|
150
|
+
6,
|
|
151
|
+
10,
|
|
152
|
+
r + 8,
|
|
153
|
+
7,
|
|
154
|
+
r + 6,
|
|
155
|
+
r + 7,
|
|
156
|
+
5,
|
|
157
|
+
12,
|
|
158
|
+
r + 5,
|
|
159
|
+
6,
|
|
160
|
+
r + 4,
|
|
161
|
+
r + 5,
|
|
162
|
+
3,
|
|
163
|
+
r + 1,
|
|
164
|
+
14,
|
|
165
|
+
4,
|
|
166
|
+
r + 2,
|
|
167
|
+
r + 3,
|
|
168
|
+
]);
|
|
169
|
+
const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
117
170
|
|
|
118
171
|
const cache = new EndpointCache({
|
|
119
172
|
size: 50,
|
|
120
173
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
121
174
|
});
|
|
122
175
|
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
123
|
-
return cache.get(endpointParams, () =>
|
|
176
|
+
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
124
177
|
endpointParams: endpointParams,
|
|
125
178
|
logger: context.logger,
|
|
126
179
|
}));
|
|
127
180
|
};
|
|
128
181
|
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
129
182
|
|
|
183
|
+
class SSOServiceException extends ServiceException {
|
|
184
|
+
constructor(options) {
|
|
185
|
+
super(options);
|
|
186
|
+
Object.setPrototypeOf(this, SSOServiceException.prototype);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
class InvalidRequestException extends SSOServiceException {
|
|
191
|
+
name = "InvalidRequestException";
|
|
192
|
+
$fault = "client";
|
|
193
|
+
constructor(opts) {
|
|
194
|
+
super({
|
|
195
|
+
name: "InvalidRequestException",
|
|
196
|
+
$fault: "client",
|
|
197
|
+
...opts,
|
|
198
|
+
});
|
|
199
|
+
Object.setPrototypeOf(this, InvalidRequestException.prototype);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
class ResourceNotFoundException extends SSOServiceException {
|
|
203
|
+
name = "ResourceNotFoundException";
|
|
204
|
+
$fault = "client";
|
|
205
|
+
constructor(opts) {
|
|
206
|
+
super({
|
|
207
|
+
name: "ResourceNotFoundException",
|
|
208
|
+
$fault: "client",
|
|
209
|
+
...opts,
|
|
210
|
+
});
|
|
211
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
class TooManyRequestsException extends SSOServiceException {
|
|
215
|
+
name = "TooManyRequestsException";
|
|
216
|
+
$fault = "client";
|
|
217
|
+
constructor(opts) {
|
|
218
|
+
super({
|
|
219
|
+
name: "TooManyRequestsException",
|
|
220
|
+
$fault: "client",
|
|
221
|
+
...opts,
|
|
222
|
+
});
|
|
223
|
+
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
class UnauthorizedException extends SSOServiceException {
|
|
227
|
+
name = "UnauthorizedException";
|
|
228
|
+
$fault = "client";
|
|
229
|
+
constructor(opts) {
|
|
230
|
+
super({
|
|
231
|
+
name: "UnauthorizedException",
|
|
232
|
+
$fault: "client",
|
|
233
|
+
...opts,
|
|
234
|
+
});
|
|
235
|
+
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
const _ATT = "AccessTokenType";
|
|
240
|
+
const _GRC = "GetRoleCredentials";
|
|
241
|
+
const _GRCR = "GetRoleCredentialsRequest";
|
|
242
|
+
const _GRCRe = "GetRoleCredentialsResponse";
|
|
243
|
+
const _IRE = "InvalidRequestException";
|
|
244
|
+
const _RC = "RoleCredentials";
|
|
245
|
+
const _RNFE = "ResourceNotFoundException";
|
|
246
|
+
const _SAKT = "SecretAccessKeyType";
|
|
247
|
+
const _STT = "SessionTokenType";
|
|
248
|
+
const _TMRE = "TooManyRequestsException";
|
|
249
|
+
const _UE = "UnauthorizedException";
|
|
250
|
+
const _aI = "accountId";
|
|
251
|
+
const _aKI = "accessKeyId";
|
|
252
|
+
const _aT = "accessToken";
|
|
253
|
+
const _ai = "account_id";
|
|
254
|
+
const _c = "client";
|
|
255
|
+
const _e = "error";
|
|
256
|
+
const _ex = "expiration";
|
|
257
|
+
const _h = "http";
|
|
258
|
+
const _hE = "httpError";
|
|
259
|
+
const _hH = "httpHeader";
|
|
260
|
+
const _hQ = "httpQuery";
|
|
261
|
+
const _m = "message";
|
|
262
|
+
const _rC = "roleCredentials";
|
|
263
|
+
const _rN = "roleName";
|
|
264
|
+
const _rn = "role_name";
|
|
265
|
+
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sso";
|
|
266
|
+
const _sAK = "secretAccessKey";
|
|
267
|
+
const _sT = "sessionToken";
|
|
268
|
+
const _xasbt = "x-amz-sso_bearer_token";
|
|
269
|
+
const n0 = "com.amazonaws.sso";
|
|
270
|
+
const _s_registry = TypeRegistry.for(_s);
|
|
271
|
+
var SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []];
|
|
272
|
+
_s_registry.registerError(SSOServiceException$, SSOServiceException);
|
|
273
|
+
const n0_registry = TypeRegistry.for(n0);
|
|
274
|
+
var InvalidRequestException$ = [-3, n0, _IRE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];
|
|
275
|
+
n0_registry.registerError(InvalidRequestException$, InvalidRequestException);
|
|
276
|
+
var ResourceNotFoundException$ = [-3, n0, _RNFE, { [_e]: _c, [_hE]: 404 }, [_m], [0]];
|
|
277
|
+
n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
|
|
278
|
+
var TooManyRequestsException$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_m], [0]];
|
|
279
|
+
n0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);
|
|
280
|
+
var UnauthorizedException$ = [-3, n0, _UE, { [_e]: _c, [_hE]: 401 }, [_m], [0]];
|
|
281
|
+
n0_registry.registerError(UnauthorizedException$, UnauthorizedException);
|
|
282
|
+
const errorTypeRegistries = [_s_registry, n0_registry];
|
|
283
|
+
var AccessTokenType = [0, n0, _ATT, 8, 0];
|
|
284
|
+
var SecretAccessKeyType = [0, n0, _SAKT, 8, 0];
|
|
285
|
+
var SessionTokenType = [0, n0, _STT, 8, 0];
|
|
286
|
+
var GetRoleCredentialsRequest$ = [
|
|
287
|
+
3,
|
|
288
|
+
n0,
|
|
289
|
+
_GRCR,
|
|
290
|
+
0,
|
|
291
|
+
[_rN, _aI, _aT],
|
|
292
|
+
[
|
|
293
|
+
[0, { [_hQ]: _rn }],
|
|
294
|
+
[0, { [_hQ]: _ai }],
|
|
295
|
+
[() => AccessTokenType, { [_hH]: _xasbt }],
|
|
296
|
+
],
|
|
297
|
+
3,
|
|
298
|
+
];
|
|
299
|
+
var GetRoleCredentialsResponse$ = [
|
|
300
|
+
3,
|
|
301
|
+
n0,
|
|
302
|
+
_GRCRe,
|
|
303
|
+
0,
|
|
304
|
+
[_rC],
|
|
305
|
+
[[() => RoleCredentials$, 0]],
|
|
306
|
+
];
|
|
307
|
+
var RoleCredentials$ = [
|
|
308
|
+
3,
|
|
309
|
+
n0,
|
|
310
|
+
_RC,
|
|
311
|
+
0,
|
|
312
|
+
[_aKI, _sAK, _sT, _ex],
|
|
313
|
+
[0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1],
|
|
314
|
+
];
|
|
315
|
+
var GetRoleCredentials$ = [
|
|
316
|
+
9,
|
|
317
|
+
n0,
|
|
318
|
+
_GRC,
|
|
319
|
+
{ [_h]: ["GET", "/federation/credentials", 200] },
|
|
320
|
+
() => GetRoleCredentialsRequest$,
|
|
321
|
+
() => GetRoleCredentialsResponse$,
|
|
322
|
+
];
|
|
323
|
+
|
|
130
324
|
const getRuntimeConfig$1 = (config) => {
|
|
131
325
|
return {
|
|
132
326
|
apiVersion: "2019-06-10",
|
|
@@ -152,6 +346,7 @@ const getRuntimeConfig$1 = (config) => {
|
|
|
152
346
|
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
153
347
|
protocolSettings: config?.protocolSettings ?? {
|
|
154
348
|
defaultNamespace: "com.amazonaws.sso",
|
|
349
|
+
errorTypeRegistries,
|
|
155
350
|
version: "2019-06-10",
|
|
156
351
|
serviceTarget: "SWBPortalService",
|
|
157
352
|
},
|
|
@@ -179,9 +374,11 @@ const getRuntimeConfig = (config) => {
|
|
|
179
374
|
defaultsMode,
|
|
180
375
|
authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
181
376
|
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
182
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
377
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
378
|
+
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
183
379
|
maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
184
|
-
region: config?.region ??
|
|
380
|
+
region: config?.region ??
|
|
381
|
+
loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
185
382
|
requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
186
383
|
retryMode: config?.retryMode ??
|
|
187
384
|
loadConfig({
|
|
@@ -276,141 +473,6 @@ class SSOClient extends Client {
|
|
|
276
473
|
}
|
|
277
474
|
}
|
|
278
475
|
|
|
279
|
-
class SSOServiceException extends ServiceException {
|
|
280
|
-
constructor(options) {
|
|
281
|
-
super(options);
|
|
282
|
-
Object.setPrototypeOf(this, SSOServiceException.prototype);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
class InvalidRequestException extends SSOServiceException {
|
|
287
|
-
name = "InvalidRequestException";
|
|
288
|
-
$fault = "client";
|
|
289
|
-
constructor(opts) {
|
|
290
|
-
super({
|
|
291
|
-
name: "InvalidRequestException",
|
|
292
|
-
$fault: "client",
|
|
293
|
-
...opts,
|
|
294
|
-
});
|
|
295
|
-
Object.setPrototypeOf(this, InvalidRequestException.prototype);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
class ResourceNotFoundException extends SSOServiceException {
|
|
299
|
-
name = "ResourceNotFoundException";
|
|
300
|
-
$fault = "client";
|
|
301
|
-
constructor(opts) {
|
|
302
|
-
super({
|
|
303
|
-
name: "ResourceNotFoundException",
|
|
304
|
-
$fault: "client",
|
|
305
|
-
...opts,
|
|
306
|
-
});
|
|
307
|
-
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
class TooManyRequestsException extends SSOServiceException {
|
|
311
|
-
name = "TooManyRequestsException";
|
|
312
|
-
$fault = "client";
|
|
313
|
-
constructor(opts) {
|
|
314
|
-
super({
|
|
315
|
-
name: "TooManyRequestsException",
|
|
316
|
-
$fault: "client",
|
|
317
|
-
...opts,
|
|
318
|
-
});
|
|
319
|
-
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
class UnauthorizedException extends SSOServiceException {
|
|
323
|
-
name = "UnauthorizedException";
|
|
324
|
-
$fault = "client";
|
|
325
|
-
constructor(opts) {
|
|
326
|
-
super({
|
|
327
|
-
name: "UnauthorizedException",
|
|
328
|
-
$fault: "client",
|
|
329
|
-
...opts,
|
|
330
|
-
});
|
|
331
|
-
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
const _ATT = "AccessTokenType";
|
|
336
|
-
const _GRC = "GetRoleCredentials";
|
|
337
|
-
const _GRCR = "GetRoleCredentialsRequest";
|
|
338
|
-
const _GRCRe = "GetRoleCredentialsResponse";
|
|
339
|
-
const _IRE = "InvalidRequestException";
|
|
340
|
-
const _RC = "RoleCredentials";
|
|
341
|
-
const _RNFE = "ResourceNotFoundException";
|
|
342
|
-
const _SAKT = "SecretAccessKeyType";
|
|
343
|
-
const _STT = "SessionTokenType";
|
|
344
|
-
const _TMRE = "TooManyRequestsException";
|
|
345
|
-
const _UE = "UnauthorizedException";
|
|
346
|
-
const _aI = "accountId";
|
|
347
|
-
const _aKI = "accessKeyId";
|
|
348
|
-
const _aT = "accessToken";
|
|
349
|
-
const _ai = "account_id";
|
|
350
|
-
const _c = "client";
|
|
351
|
-
const _e = "error";
|
|
352
|
-
const _ex = "expiration";
|
|
353
|
-
const _h = "http";
|
|
354
|
-
const _hE = "httpError";
|
|
355
|
-
const _hH = "httpHeader";
|
|
356
|
-
const _hQ = "httpQuery";
|
|
357
|
-
const _m = "message";
|
|
358
|
-
const _rC = "roleCredentials";
|
|
359
|
-
const _rN = "roleName";
|
|
360
|
-
const _rn = "role_name";
|
|
361
|
-
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sso";
|
|
362
|
-
const _sAK = "secretAccessKey";
|
|
363
|
-
const _sT = "sessionToken";
|
|
364
|
-
const _xasbt = "x-amz-sso_bearer_token";
|
|
365
|
-
const n0 = "com.amazonaws.sso";
|
|
366
|
-
var AccessTokenType = [0, n0, _ATT, 8, 0];
|
|
367
|
-
var SecretAccessKeyType = [0, n0, _SAKT, 8, 0];
|
|
368
|
-
var SessionTokenType = [0, n0, _STT, 8, 0];
|
|
369
|
-
var GetRoleCredentialsRequest$ = [3, n0, _GRCR,
|
|
370
|
-
0,
|
|
371
|
-
[_rN, _aI, _aT],
|
|
372
|
-
[[0, { [_hQ]: _rn }], [0, { [_hQ]: _ai }], [() => AccessTokenType, { [_hH]: _xasbt }]]
|
|
373
|
-
];
|
|
374
|
-
var GetRoleCredentialsResponse$ = [3, n0, _GRCRe,
|
|
375
|
-
0,
|
|
376
|
-
[_rC],
|
|
377
|
-
[[() => RoleCredentials$, 0]]
|
|
378
|
-
];
|
|
379
|
-
var InvalidRequestException$ = [-3, n0, _IRE,
|
|
380
|
-
{ [_e]: _c, [_hE]: 400 },
|
|
381
|
-
[_m],
|
|
382
|
-
[0]
|
|
383
|
-
];
|
|
384
|
-
TypeRegistry.for(n0).registerError(InvalidRequestException$, InvalidRequestException);
|
|
385
|
-
var ResourceNotFoundException$ = [-3, n0, _RNFE,
|
|
386
|
-
{ [_e]: _c, [_hE]: 404 },
|
|
387
|
-
[_m],
|
|
388
|
-
[0]
|
|
389
|
-
];
|
|
390
|
-
TypeRegistry.for(n0).registerError(ResourceNotFoundException$, ResourceNotFoundException);
|
|
391
|
-
var RoleCredentials$ = [3, n0, _RC,
|
|
392
|
-
0,
|
|
393
|
-
[_aKI, _sAK, _sT, _ex],
|
|
394
|
-
[0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1]
|
|
395
|
-
];
|
|
396
|
-
var TooManyRequestsException$ = [-3, n0, _TMRE,
|
|
397
|
-
{ [_e]: _c, [_hE]: 429 },
|
|
398
|
-
[_m],
|
|
399
|
-
[0]
|
|
400
|
-
];
|
|
401
|
-
TypeRegistry.for(n0).registerError(TooManyRequestsException$, TooManyRequestsException);
|
|
402
|
-
var UnauthorizedException$ = [-3, n0, _UE,
|
|
403
|
-
{ [_e]: _c, [_hE]: 401 },
|
|
404
|
-
[_m],
|
|
405
|
-
[0]
|
|
406
|
-
];
|
|
407
|
-
TypeRegistry.for(n0).registerError(UnauthorizedException$, UnauthorizedException);
|
|
408
|
-
var SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []];
|
|
409
|
-
TypeRegistry.for(_s).registerError(SSOServiceException$, SSOServiceException);
|
|
410
|
-
var GetRoleCredentials$ = [9, n0, _GRC,
|
|
411
|
-
{ [_h]: ["GET", "/federation/credentials", 200] }, () => GetRoleCredentialsRequest$, () => GetRoleCredentialsResponse$
|
|
412
|
-
];
|
|
413
|
-
|
|
414
476
|
class GetRoleCredentialsCommand extends Command
|
|
415
477
|
.classBuilder()
|
|
416
478
|
.ep(commonParams)
|
|
@@ -201,9 +201,7 @@ function applyDynamicMap(target, map, env) {
|
|
|
201
201
|
if (!map)
|
|
202
202
|
return;
|
|
203
203
|
for (const key of Object.keys(map)) {
|
|
204
|
-
const val = typeof map[key] === 'function'
|
|
205
|
-
? map[key](target, env)
|
|
206
|
-
: map[key];
|
|
204
|
+
const val = typeof map[key] === 'function' ? map[key](target, env) : map[key];
|
|
207
205
|
Object.assign(target, { [key]: val });
|
|
208
206
|
}
|
|
209
207
|
}
|
|
@@ -253,9 +251,7 @@ function applyDynamicMapWithProvenance(target, map, env, prov, meta) {
|
|
|
253
251
|
if (!map)
|
|
254
252
|
return;
|
|
255
253
|
for (const key of Object.keys(map)) {
|
|
256
|
-
const val = typeof map[key] === 'function'
|
|
257
|
-
? map[key](target, env)
|
|
258
|
-
: map[key];
|
|
254
|
+
const val = typeof map[key] === 'function' ? map[key](target, env) : map[key];
|
|
259
255
|
Object.assign(target, { [key]: val });
|
|
260
256
|
pushDotenvProvenance(prov, key, {
|
|
261
257
|
kind: 'dynamic',
|
|
@@ -546,4 +542,4 @@ async function readDotenvCascadeWithProvenance(args) {
|
|
|
546
542
|
return { dotenv: expanded, provenance: prov };
|
|
547
543
|
}
|
|
548
544
|
|
|
549
|
-
export { applyDynamicMap as a, applyDynamicMapWithProvenance as b,
|
|
545
|
+
export { applyDynamicMap as a, applyDynamicMapWithProvenance as b, createDotenvProvenance as c, dotenvExpand as d, dotenvExpandAll as e, dotenvExpandFromProcessEnv as f, loadDynamicModuleDefault as g, readDotenvCascadeWithProvenance as h, loadAndApplyDynamic as l, overlayEnvWithProvenance as o, pushDotenvProvenance as p, readDotenv as r };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Option, Command } from '@commander-js/extra-typings';
|
|
3
|
-
import {
|
|
3
|
+
import { d as dotenvExpand, h as readDotenvCascadeWithProvenance, o as overlayEnvWithProvenance, b as applyDynamicMapWithProvenance, g as loadDynamicModuleDefault, f as dotenvExpandFromProcessEnv } from './readDotenvCascade-Dgx4SC1p.mjs';
|
|
4
4
|
import fs from 'fs-extra';
|
|
5
5
|
import 'node:path';
|
|
6
6
|
import 'nanoid';
|
|
@@ -1264,7 +1264,9 @@ class GetDotenvCli extends Command {
|
|
|
1264
1264
|
}
|
|
1265
1265
|
/** Internal: climb to the true root (host) command. */
|
|
1266
1266
|
_root() {
|
|
1267
|
-
let node = this;
|
|
1267
|
+
let node = this.parent;
|
|
1268
|
+
if (!node)
|
|
1269
|
+
return this;
|
|
1268
1270
|
while (node.parent) {
|
|
1269
1271
|
node = node.parent;
|
|
1270
1272
|
}
|
|
@@ -1436,4 +1438,4 @@ const readMergedOptions = (cmd) => {
|
|
|
1436
1438
|
return bag;
|
|
1437
1439
|
};
|
|
1438
1440
|
|
|
1439
|
-
export { GetDotenvCli as G,
|
|
1441
|
+
export { GetDotenvCli as G, assertLogger as a, attachRootOptions as b, baseRootOptionDefaults as c, defaultsDeep as d, defineDynamic as e, defineGetDotenvConfig as f, definePlugin as g, getDotenvCliOptions2Options as h, interpolateDeep as i, resolveGetDotenvOptions as j, readMergedOptions as r, writeDotenvFile as w };
|