@karmaniverous/get-dotenv 6.2.3 → 6.2.4

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 (89) hide show
  1. package/dist/chunks/AwsRestJsonProtocol-Bq1HE-Ln.mjs +932 -0
  2. package/dist/chunks/createCli-BY6_cfZr.mjs +439 -0
  3. package/dist/chunks/externalDataInterceptor-CbsdEYa-.mjs +19 -0
  4. package/dist/chunks/getSSOTokenFromFile-hUSpR7Wf.mjs +22 -0
  5. package/dist/chunks/helpConfig-CGejgwWW.mjs +12 -0
  6. package/dist/chunks/index-B5JKTBOL.mjs +443 -0
  7. package/dist/chunks/index-BEJFiHMX.mjs +522 -0
  8. package/dist/chunks/index-BPYF6K_G.mjs +82 -0
  9. package/dist/chunks/index-Bc3h0a95.mjs +374 -0
  10. package/dist/chunks/index-BpCF5UKx.mjs +272 -0
  11. package/dist/chunks/index-C_wqbTwI.mjs +187 -0
  12. package/dist/chunks/index-CeCufHlm.mjs +9374 -0
  13. package/dist/chunks/index-Cu7rdyqN.mjs +102 -0
  14. package/dist/chunks/index-DWAtHEA-.mjs +379 -0
  15. package/dist/chunks/index-Dp1Ip6Ra.mjs +354 -0
  16. package/dist/chunks/index-DyU5pKKi.mjs +24 -0
  17. package/dist/chunks/index-c7zKtEuy.mjs +578 -0
  18. package/dist/chunks/index-cIunyiUQ.mjs +702 -0
  19. package/dist/chunks/invoke-DuRPU1oC.mjs +60 -0
  20. package/dist/chunks/loadModuleDefault-Dj8B3Stt.mjs +123 -0
  21. package/dist/chunks/loadSso-w1eTVg0O.mjs +412 -0
  22. package/dist/chunks/loader-DnhPeGfq.mjs +346 -0
  23. package/dist/chunks/overlayEnv-Bs2kVayG.mjs +234 -0
  24. package/dist/chunks/package-boo9EyYs.mjs +5 -0
  25. package/dist/chunks/parseKnownFiles-B9cDK21V.mjs +23 -0
  26. package/dist/chunks/readMergedOptions-Nt0TR7dX.mjs +1626 -0
  27. package/dist/chunks/resolveCliOptions-TFRzhB2c.mjs +138 -0
  28. package/dist/chunks/sdk-stream-mixin-BZoJ5jy9.mjs +167 -0
  29. package/dist/chunks/spawnEnv-CN8a7cNR.mjs +306 -0
  30. package/dist/chunks/types-DJ-BGABd.mjs +59 -0
  31. package/dist/chunks/validate-CDl0rE6k.mjs +61 -0
  32. package/dist/cli.mjs +39 -19307
  33. package/dist/cliHost.mjs +20 -2800
  34. package/dist/config.mjs +10 -509
  35. package/dist/env-overlay.mjs +6 -337
  36. package/dist/getdotenv.cli.mjs +39 -19305
  37. package/dist/index.mjs +39 -19396
  38. package/dist/plugins-aws.d.ts +1 -4
  39. package/dist/plugins-aws.mjs +65 -2568
  40. package/dist/plugins-batch.mjs +16 -2573
  41. package/dist/plugins-cmd.mjs +19 -3094
  42. package/dist/plugins-init.d.ts +8 -0
  43. package/dist/plugins-init.mjs +85 -2297
  44. package/dist/plugins.mjs +36 -18817
  45. package/package.json +1 -2
  46. package/dist/templates/cli/index.ts +0 -25
  47. package/dist/templates/cli/plugins/hello/defaultAction.ts +0 -27
  48. package/dist/templates/cli/plugins/hello/index.ts +0 -26
  49. package/dist/templates/cli/plugins/hello/options.ts +0 -31
  50. package/dist/templates/cli/plugins/hello/strangerAction.ts +0 -20
  51. package/dist/templates/cli/plugins/hello/types.ts +0 -13
  52. package/dist/templates/config/js/getdotenv.config.js +0 -20
  53. package/dist/templates/config/json/local/getdotenv.config.local.json +0 -7
  54. package/dist/templates/config/json/public/getdotenv.config.json +0 -9
  55. package/dist/templates/config/public/getdotenv.config.json +0 -8
  56. package/dist/templates/config/ts/getdotenv.config.ts +0 -28
  57. package/dist/templates/config/yaml/local/getdotenv.config.local.yaml +0 -7
  58. package/dist/templates/config/yaml/public/getdotenv.config.yaml +0 -7
  59. package/dist/templates/defaultAction.ts +0 -27
  60. package/dist/templates/getdotenv.config.js +0 -20
  61. package/dist/templates/getdotenv.config.json +0 -9
  62. package/dist/templates/getdotenv.config.local.json +0 -7
  63. package/dist/templates/getdotenv.config.local.yaml +0 -7
  64. package/dist/templates/getdotenv.config.ts +0 -28
  65. package/dist/templates/getdotenv.config.yaml +0 -7
  66. package/dist/templates/hello/defaultAction.ts +0 -27
  67. package/dist/templates/hello/index.ts +0 -26
  68. package/dist/templates/hello/options.ts +0 -31
  69. package/dist/templates/hello/strangerAction.ts +0 -20
  70. package/dist/templates/hello/types.ts +0 -13
  71. package/dist/templates/index.ts +0 -26
  72. package/dist/templates/js/getdotenv.config.js +0 -20
  73. package/dist/templates/json/local/getdotenv.config.local.json +0 -7
  74. package/dist/templates/json/public/getdotenv.config.json +0 -9
  75. package/dist/templates/local/getdotenv.config.local.json +0 -7
  76. package/dist/templates/local/getdotenv.config.local.yaml +0 -7
  77. package/dist/templates/options.ts +0 -31
  78. package/dist/templates/plugins/hello/defaultAction.ts +0 -27
  79. package/dist/templates/plugins/hello/index.ts +0 -26
  80. package/dist/templates/plugins/hello/options.ts +0 -31
  81. package/dist/templates/plugins/hello/strangerAction.ts +0 -20
  82. package/dist/templates/plugins/hello/types.ts +0 -13
  83. package/dist/templates/public/getdotenv.config.json +0 -9
  84. package/dist/templates/public/getdotenv.config.yaml +0 -7
  85. package/dist/templates/strangerAction.ts +0 -20
  86. package/dist/templates/ts/getdotenv.config.ts +0 -28
  87. package/dist/templates/types.ts +0 -13
  88. package/dist/templates/yaml/local/getdotenv.config.local.yaml +0 -7
  89. package/dist/templates/yaml/public/getdotenv.config.yaml +0 -7
@@ -0,0 +1,578 @@
1
+ import { w as resolveAwsSdkSigV4Config, x as normalizeProvider, y as getSmithyContext, z as EndpointCache, A as resolveEndpoint, B as awsEndpointFunctions, D as customEndpointFunctions, t as toUtf8, i as fromUtf8, F as parseUrl, G as NoOpLogger, I as AwsSdkSigV4Signer, J as NoAuthSigner, n as toBase64, m as fromBase64, K as emitWarningIfUnsupportedVersion, L as resolveDefaultsModeConfig, M as emitWarningIfUnsupportedVersion$1, O as loadConfig, r as streamCollector, P as Hash, N as NodeHttpHandler, Q as createDefaultUserAgentProvider, R as calculateBodyLength, S as NODE_APP_ID_CONFIG_OPTIONS, T as NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, U as NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, V as NODE_RETRY_MODE_CONFIG_OPTIONS, W as DEFAULT_RETRY_MODE, X as NODE_REGION_CONFIG_FILE_OPTIONS, Y as NODE_REGION_CONFIG_OPTIONS, Z as NODE_MAX_ATTEMPT_CONFIG_OPTIONS, _ as NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, $ as loadConfigsForDefaultMode, a0 as getAwsRegionExtensionConfiguration, a1 as getDefaultExtensionConfiguration, a2 as getHttpHandlerExtensionConfiguration, a3 as resolveAwsRegionExtensionConfiguration, a4 as resolveDefaultRuntimeConfig, a5 as resolveHttpHandlerRuntimeConfig, a6 as Client, a7 as resolveUserAgentConfig, a8 as resolveRetryConfig, a9 as resolveRegionConfig, aa as resolveEndpointConfig, ab as resolveHostHeaderConfig, ac as getSchemaSerdePlugin, ad as getUserAgentPlugin, ae as getRetryPlugin, af as getContentLengthPlugin, ag as getHostHeaderPlugin, ah as getLoggerPlugin, ai as getRecursionDetectionPlugin, aj as getHttpAuthSchemeEndpointRuleSetPlugin, ak as DefaultIdentityProviderConfig, al as getHttpSigningPlugin, am as ServiceException, an as TypeRegistry, ao as Command, ap as getEndpointPlugin } from './index-CeCufHlm.mjs';
2
+ import { p as packageInfo } from './package-boo9EyYs.mjs';
3
+ import { A as AwsRestJsonProtocol } from './AwsRestJsonProtocol-Bq1HE-Ln.mjs';
4
+ import './readMergedOptions-Nt0TR7dX.mjs';
5
+ import 'zod';
6
+ import '@commander-js/extra-typings';
7
+ import './overlayEnv-Bs2kVayG.mjs';
8
+ import 'fs-extra';
9
+ import './loadModuleDefault-Dj8B3Stt.mjs';
10
+ import 'crypto';
11
+ import 'path';
12
+ import 'url';
13
+ import 'nanoid';
14
+ import 'dotenv';
15
+ import './loader-DnhPeGfq.mjs';
16
+ import 'package-directory';
17
+ import 'yaml';
18
+ import 'execa';
19
+ import 'buffer';
20
+ import 'os';
21
+ import 'node:fs/promises';
22
+ import 'http';
23
+ import 'https';
24
+ import 'stream';
25
+ import 'process';
26
+ import 'node:fs';
27
+ import './sdk-stream-mixin-BZoJ5jy9.mjs';
28
+
29
+ const defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
30
+ return {
31
+ operation: getSmithyContext(context).operation,
32
+ region: (await normalizeProvider(config.region)()) ||
33
+ (() => {
34
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
35
+ })(),
36
+ };
37
+ };
38
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
39
+ return {
40
+ schemeId: "aws.auth#sigv4",
41
+ signingProperties: {
42
+ name: "sso-oauth",
43
+ region: authParameters.region,
44
+ },
45
+ propertiesExtractor: (config, context) => ({
46
+ signingProperties: {
47
+ config,
48
+ context,
49
+ },
50
+ }),
51
+ };
52
+ }
53
+ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
54
+ return {
55
+ schemeId: "smithy.api#noAuth",
56
+ };
57
+ }
58
+ const defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {
59
+ const options = [];
60
+ switch (authParameters.operation) {
61
+ case "CreateToken": {
62
+ options.push(createSmithyApiNoAuthHttpAuthOption());
63
+ break;
64
+ }
65
+ default: {
66
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
67
+ }
68
+ }
69
+ return options;
70
+ };
71
+ const resolveHttpAuthSchemeConfig = (config) => {
72
+ const config_0 = resolveAwsSdkSigV4Config(config);
73
+ return Object.assign(config_0, {
74
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
75
+ });
76
+ };
77
+
78
+ const resolveClientEndpointParameters = (options) => {
79
+ return Object.assign(options, {
80
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
81
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
82
+ defaultSigningName: "sso-oauth",
83
+ });
84
+ };
85
+ const commonParams = {
86
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
87
+ Endpoint: { type: "builtInParams", name: "endpoint" },
88
+ Region: { type: "builtInParams", name: "region" },
89
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
90
+ };
91
+
92
+ const u = "required", v = "fn", w = "argv", x = "ref";
93
+ const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "string" }, j = { [u]: true, "default": false, "type": "boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }];
94
+ const _data = { parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
95
+ const ruleSet = _data;
96
+
97
+ const cache = new EndpointCache({
98
+ size: 50,
99
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
100
+ });
101
+ const defaultEndpointResolver = (endpointParams, context = {}) => {
102
+ return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
103
+ endpointParams: endpointParams,
104
+ logger: context.logger,
105
+ }));
106
+ };
107
+ customEndpointFunctions.aws = awsEndpointFunctions;
108
+
109
+ const getRuntimeConfig$1 = (config) => {
110
+ return {
111
+ apiVersion: "2019-06-10",
112
+ base64Decoder: config?.base64Decoder ?? fromBase64,
113
+ base64Encoder: config?.base64Encoder ?? toBase64,
114
+ disableHostPrefix: config?.disableHostPrefix ?? false,
115
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
116
+ extensions: config?.extensions ?? [],
117
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider,
118
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
119
+ {
120
+ schemeId: "aws.auth#sigv4",
121
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
122
+ signer: new AwsSdkSigV4Signer(),
123
+ },
124
+ {
125
+ schemeId: "smithy.api#noAuth",
126
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
127
+ signer: new NoAuthSigner(),
128
+ },
129
+ ],
130
+ logger: config?.logger ?? new NoOpLogger(),
131
+ protocol: config?.protocol ?? new AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.ssooidc" }),
132
+ serviceId: config?.serviceId ?? "SSO OIDC",
133
+ urlParser: config?.urlParser ?? parseUrl,
134
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
135
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
136
+ };
137
+ };
138
+
139
+ const getRuntimeConfig = (config) => {
140
+ emitWarningIfUnsupportedVersion(process.version);
141
+ const defaultsMode = resolveDefaultsModeConfig(config);
142
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
143
+ const clientSharedValues = getRuntimeConfig$1(config);
144
+ emitWarningIfUnsupportedVersion$1(process.version);
145
+ const loaderConfig = {
146
+ profile: config?.profile,
147
+ logger: clientSharedValues.logger,
148
+ };
149
+ return {
150
+ ...clientSharedValues,
151
+ ...config,
152
+ runtime: "node",
153
+ defaultsMode,
154
+ authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
155
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
156
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
157
+ createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
158
+ maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
159
+ region: config?.region ??
160
+ loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
161
+ requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
162
+ retryMode: config?.retryMode ??
163
+ loadConfig({
164
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
165
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
166
+ }, config),
167
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
168
+ streamCollector: config?.streamCollector ?? streamCollector,
169
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
170
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
171
+ userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
172
+ };
173
+ };
174
+
175
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
176
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
177
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
178
+ let _credentials = runtimeConfig.credentials;
179
+ return {
180
+ setHttpAuthScheme(httpAuthScheme) {
181
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
182
+ if (index === -1) {
183
+ _httpAuthSchemes.push(httpAuthScheme);
184
+ }
185
+ else {
186
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
187
+ }
188
+ },
189
+ httpAuthSchemes() {
190
+ return _httpAuthSchemes;
191
+ },
192
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
193
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
194
+ },
195
+ httpAuthSchemeProvider() {
196
+ return _httpAuthSchemeProvider;
197
+ },
198
+ setCredentials(credentials) {
199
+ _credentials = credentials;
200
+ },
201
+ credentials() {
202
+ return _credentials;
203
+ },
204
+ };
205
+ };
206
+ const resolveHttpAuthRuntimeConfig = (config) => {
207
+ return {
208
+ httpAuthSchemes: config.httpAuthSchemes(),
209
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
210
+ credentials: config.credentials(),
211
+ };
212
+ };
213
+
214
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
215
+ const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
216
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
217
+ return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
218
+ };
219
+
220
+ class SSOOIDCClient extends Client {
221
+ config;
222
+ constructor(...[configuration]) {
223
+ const _config_0 = getRuntimeConfig(configuration || {});
224
+ super(_config_0);
225
+ this.initConfig = _config_0;
226
+ const _config_1 = resolveClientEndpointParameters(_config_0);
227
+ const _config_2 = resolveUserAgentConfig(_config_1);
228
+ const _config_3 = resolveRetryConfig(_config_2);
229
+ const _config_4 = resolveRegionConfig(_config_3);
230
+ const _config_5 = resolveHostHeaderConfig(_config_4);
231
+ const _config_6 = resolveEndpointConfig(_config_5);
232
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
233
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
234
+ this.config = _config_8;
235
+ this.middlewareStack.use(getSchemaSerdePlugin(this.config));
236
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
237
+ this.middlewareStack.use(getRetryPlugin(this.config));
238
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
239
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
240
+ this.middlewareStack.use(getLoggerPlugin(this.config));
241
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
242
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
243
+ httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider,
244
+ identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
245
+ "aws.auth#sigv4": config.credentials,
246
+ }),
247
+ }));
248
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
249
+ }
250
+ destroy() {
251
+ super.destroy();
252
+ }
253
+ }
254
+
255
+ let SSOOIDCServiceException$1 = class SSOOIDCServiceException extends ServiceException {
256
+ constructor(options) {
257
+ super(options);
258
+ Object.setPrototypeOf(this, SSOOIDCServiceException.prototype);
259
+ }
260
+ };
261
+
262
+ let AccessDeniedException$1 = class AccessDeniedException extends SSOOIDCServiceException$1 {
263
+ name = "AccessDeniedException";
264
+ $fault = "client";
265
+ error;
266
+ reason;
267
+ error_description;
268
+ constructor(opts) {
269
+ super({
270
+ name: "AccessDeniedException",
271
+ $fault: "client",
272
+ ...opts,
273
+ });
274
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
275
+ this.error = opts.error;
276
+ this.reason = opts.reason;
277
+ this.error_description = opts.error_description;
278
+ }
279
+ };
280
+ let AuthorizationPendingException$1 = class AuthorizationPendingException extends SSOOIDCServiceException$1 {
281
+ name = "AuthorizationPendingException";
282
+ $fault = "client";
283
+ error;
284
+ error_description;
285
+ constructor(opts) {
286
+ super({
287
+ name: "AuthorizationPendingException",
288
+ $fault: "client",
289
+ ...opts,
290
+ });
291
+ Object.setPrototypeOf(this, AuthorizationPendingException.prototype);
292
+ this.error = opts.error;
293
+ this.error_description = opts.error_description;
294
+ }
295
+ };
296
+ let ExpiredTokenException$1 = class ExpiredTokenException extends SSOOIDCServiceException$1 {
297
+ name = "ExpiredTokenException";
298
+ $fault = "client";
299
+ error;
300
+ error_description;
301
+ constructor(opts) {
302
+ super({
303
+ name: "ExpiredTokenException",
304
+ $fault: "client",
305
+ ...opts,
306
+ });
307
+ Object.setPrototypeOf(this, ExpiredTokenException.prototype);
308
+ this.error = opts.error;
309
+ this.error_description = opts.error_description;
310
+ }
311
+ };
312
+ let InternalServerException$1 = class InternalServerException extends SSOOIDCServiceException$1 {
313
+ name = "InternalServerException";
314
+ $fault = "server";
315
+ error;
316
+ error_description;
317
+ constructor(opts) {
318
+ super({
319
+ name: "InternalServerException",
320
+ $fault: "server",
321
+ ...opts,
322
+ });
323
+ Object.setPrototypeOf(this, InternalServerException.prototype);
324
+ this.error = opts.error;
325
+ this.error_description = opts.error_description;
326
+ }
327
+ };
328
+ let InvalidClientException$1 = class InvalidClientException extends SSOOIDCServiceException$1 {
329
+ name = "InvalidClientException";
330
+ $fault = "client";
331
+ error;
332
+ error_description;
333
+ constructor(opts) {
334
+ super({
335
+ name: "InvalidClientException",
336
+ $fault: "client",
337
+ ...opts,
338
+ });
339
+ Object.setPrototypeOf(this, InvalidClientException.prototype);
340
+ this.error = opts.error;
341
+ this.error_description = opts.error_description;
342
+ }
343
+ };
344
+ let InvalidGrantException$1 = class InvalidGrantException extends SSOOIDCServiceException$1 {
345
+ name = "InvalidGrantException";
346
+ $fault = "client";
347
+ error;
348
+ error_description;
349
+ constructor(opts) {
350
+ super({
351
+ name: "InvalidGrantException",
352
+ $fault: "client",
353
+ ...opts,
354
+ });
355
+ Object.setPrototypeOf(this, InvalidGrantException.prototype);
356
+ this.error = opts.error;
357
+ this.error_description = opts.error_description;
358
+ }
359
+ };
360
+ let InvalidRequestException$1 = class InvalidRequestException extends SSOOIDCServiceException$1 {
361
+ name = "InvalidRequestException";
362
+ $fault = "client";
363
+ error;
364
+ reason;
365
+ error_description;
366
+ constructor(opts) {
367
+ super({
368
+ name: "InvalidRequestException",
369
+ $fault: "client",
370
+ ...opts,
371
+ });
372
+ Object.setPrototypeOf(this, InvalidRequestException.prototype);
373
+ this.error = opts.error;
374
+ this.reason = opts.reason;
375
+ this.error_description = opts.error_description;
376
+ }
377
+ };
378
+ let InvalidScopeException$1 = class InvalidScopeException extends SSOOIDCServiceException$1 {
379
+ name = "InvalidScopeException";
380
+ $fault = "client";
381
+ error;
382
+ error_description;
383
+ constructor(opts) {
384
+ super({
385
+ name: "InvalidScopeException",
386
+ $fault: "client",
387
+ ...opts,
388
+ });
389
+ Object.setPrototypeOf(this, InvalidScopeException.prototype);
390
+ this.error = opts.error;
391
+ this.error_description = opts.error_description;
392
+ }
393
+ };
394
+ let SlowDownException$1 = class SlowDownException extends SSOOIDCServiceException$1 {
395
+ name = "SlowDownException";
396
+ $fault = "client";
397
+ error;
398
+ error_description;
399
+ constructor(opts) {
400
+ super({
401
+ name: "SlowDownException",
402
+ $fault: "client",
403
+ ...opts,
404
+ });
405
+ Object.setPrototypeOf(this, SlowDownException.prototype);
406
+ this.error = opts.error;
407
+ this.error_description = opts.error_description;
408
+ }
409
+ };
410
+ let UnauthorizedClientException$1 = class UnauthorizedClientException extends SSOOIDCServiceException$1 {
411
+ name = "UnauthorizedClientException";
412
+ $fault = "client";
413
+ error;
414
+ error_description;
415
+ constructor(opts) {
416
+ super({
417
+ name: "UnauthorizedClientException",
418
+ $fault: "client",
419
+ ...opts,
420
+ });
421
+ Object.setPrototypeOf(this, UnauthorizedClientException.prototype);
422
+ this.error = opts.error;
423
+ this.error_description = opts.error_description;
424
+ }
425
+ };
426
+ let UnsupportedGrantTypeException$1 = class UnsupportedGrantTypeException extends SSOOIDCServiceException$1 {
427
+ name = "UnsupportedGrantTypeException";
428
+ $fault = "client";
429
+ error;
430
+ error_description;
431
+ constructor(opts) {
432
+ super({
433
+ name: "UnsupportedGrantTypeException",
434
+ $fault: "client",
435
+ ...opts,
436
+ });
437
+ Object.setPrototypeOf(this, UnsupportedGrantTypeException.prototype);
438
+ this.error = opts.error;
439
+ this.error_description = opts.error_description;
440
+ }
441
+ };
442
+
443
+ const _ADE = "AccessDeniedException";
444
+ const _APE = "AuthorizationPendingException";
445
+ const _AT = "AccessToken";
446
+ const _CS = "ClientSecret";
447
+ const _CT = "CreateToken";
448
+ const _CTR = "CreateTokenRequest";
449
+ const _CTRr = "CreateTokenResponse";
450
+ const _CV = "CodeVerifier";
451
+ const _ETE = "ExpiredTokenException";
452
+ const _ICE = "InvalidClientException";
453
+ const _IGE = "InvalidGrantException";
454
+ const _IRE = "InvalidRequestException";
455
+ const _ISE = "InternalServerException";
456
+ const _ISEn = "InvalidScopeException";
457
+ const _IT = "IdToken";
458
+ const _RT = "RefreshToken";
459
+ const _SDE = "SlowDownException";
460
+ const _UCE = "UnauthorizedClientException";
461
+ const _UGTE = "UnsupportedGrantTypeException";
462
+ const _aT = "accessToken";
463
+ const _c = "client";
464
+ const _cI = "clientId";
465
+ const _cS = "clientSecret";
466
+ const _cV = "codeVerifier";
467
+ const _co = "code";
468
+ const _dC = "deviceCode";
469
+ const _e = "error";
470
+ const _eI = "expiresIn";
471
+ const _ed = "error_description";
472
+ const _gT = "grantType";
473
+ const _h = "http";
474
+ const _hE = "httpError";
475
+ const _iT = "idToken";
476
+ const _r = "reason";
477
+ const _rT = "refreshToken";
478
+ const _rU = "redirectUri";
479
+ const _s = "scope";
480
+ const _se = "server";
481
+ const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.ssooidc";
482
+ const _tT = "tokenType";
483
+ const n0 = "com.amazonaws.ssooidc";
484
+ var AccessToken = [0, n0, _AT, 8, 0];
485
+ var ClientSecret = [0, n0, _CS, 8, 0];
486
+ var CodeVerifier = [0, n0, _CV, 8, 0];
487
+ var IdToken = [0, n0, _IT, 8, 0];
488
+ var RefreshToken = [0, n0, _RT, 8, 0];
489
+ var AccessDeniedException = [
490
+ -3,
491
+ n0,
492
+ _ADE,
493
+ { [_e]: _c, [_hE]: 400 },
494
+ [_e, _r, _ed],
495
+ [0, 0, 0],
496
+ ];
497
+ TypeRegistry.for(n0).registerError(AccessDeniedException, AccessDeniedException$1);
498
+ var AuthorizationPendingException = [
499
+ -3,
500
+ n0,
501
+ _APE,
502
+ { [_e]: _c, [_hE]: 400 },
503
+ [_e, _ed],
504
+ [0, 0],
505
+ ];
506
+ TypeRegistry.for(n0).registerError(AuthorizationPendingException, AuthorizationPendingException$1);
507
+ var CreateTokenRequest = [
508
+ 3,
509
+ n0,
510
+ _CTR,
511
+ 0,
512
+ [_cI, _cS, _gT, _dC, _co, _rT, _s, _rU, _cV],
513
+ [0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]],
514
+ ];
515
+ var CreateTokenResponse = [
516
+ 3,
517
+ n0,
518
+ _CTRr,
519
+ 0,
520
+ [_aT, _tT, _eI, _rT, _iT],
521
+ [[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]],
522
+ ];
523
+ var ExpiredTokenException = [-3, n0, _ETE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
524
+ TypeRegistry.for(n0).registerError(ExpiredTokenException, ExpiredTokenException$1);
525
+ var InternalServerException = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _ed], [0, 0]];
526
+ TypeRegistry.for(n0).registerError(InternalServerException, InternalServerException$1);
527
+ var InvalidClientException = [-3, n0, _ICE, { [_e]: _c, [_hE]: 401 }, [_e, _ed], [0, 0]];
528
+ TypeRegistry.for(n0).registerError(InvalidClientException, InvalidClientException$1);
529
+ var InvalidGrantException = [-3, n0, _IGE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
530
+ TypeRegistry.for(n0).registerError(InvalidGrantException, InvalidGrantException$1);
531
+ var InvalidRequestException = [
532
+ -3,
533
+ n0,
534
+ _IRE,
535
+ { [_e]: _c, [_hE]: 400 },
536
+ [_e, _r, _ed],
537
+ [0, 0, 0],
538
+ ];
539
+ TypeRegistry.for(n0).registerError(InvalidRequestException, InvalidRequestException$1);
540
+ var InvalidScopeException = [-3, n0, _ISEn, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
541
+ TypeRegistry.for(n0).registerError(InvalidScopeException, InvalidScopeException$1);
542
+ var SlowDownException = [-3, n0, _SDE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
543
+ TypeRegistry.for(n0).registerError(SlowDownException, SlowDownException$1);
544
+ var UnauthorizedClientException = [-3, n0, _UCE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]];
545
+ TypeRegistry.for(n0).registerError(UnauthorizedClientException, UnauthorizedClientException$1);
546
+ var UnsupportedGrantTypeException = [
547
+ -3,
548
+ n0,
549
+ _UGTE,
550
+ { [_e]: _c, [_hE]: 400 },
551
+ [_e, _ed],
552
+ [0, 0],
553
+ ];
554
+ TypeRegistry.for(n0).registerError(UnsupportedGrantTypeException, UnsupportedGrantTypeException$1);
555
+ var SSOOIDCServiceException = [-3, _sm, "SSOOIDCServiceException", 0, [], []];
556
+ TypeRegistry.for(_sm).registerError(SSOOIDCServiceException, SSOOIDCServiceException$1);
557
+ var CreateToken = [
558
+ 9,
559
+ n0,
560
+ _CT,
561
+ { [_h]: ["POST", "/token", 200] },
562
+ () => CreateTokenRequest,
563
+ () => CreateTokenResponse,
564
+ ];
565
+
566
+ class CreateTokenCommand extends Command
567
+ .classBuilder()
568
+ .ep(commonParams)
569
+ .m(function (Command, cs, config, o) {
570
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
571
+ })
572
+ .s("AWSSSOOIDCService", "CreateToken", {})
573
+ .n("SSOOIDCClient", "CreateTokenCommand")
574
+ .sc(CreateToken)
575
+ .build() {
576
+ }
577
+
578
+ export { Command as $Command, AccessDeniedException$1 as AccessDeniedException, AuthorizationPendingException$1 as AuthorizationPendingException, CreateTokenCommand, ExpiredTokenException$1 as ExpiredTokenException, InternalServerException$1 as InternalServerException, InvalidClientException$1 as InvalidClientException, InvalidGrantException$1 as InvalidGrantException, InvalidRequestException$1 as InvalidRequestException, InvalidScopeException$1 as InvalidScopeException, SSOOIDCClient, SSOOIDCServiceException$1 as SSOOIDCServiceException, SlowDownException$1 as SlowDownException, UnauthorizedClientException$1 as UnauthorizedClientException, UnsupportedGrantTypeException$1 as UnsupportedGrantTypeException, Client as __Client };