@karmaniverous/get-dotenv 7.0.6 → 7.0.8
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/{createCli-BkHLeYXL.mjs → createCli-CUPiFVdZ.mjs} +27 -10
- package/dist/chunks/index-CNXekCQC.mjs +96 -0
- package/dist/chunks/{index-Dd6S1nZ-.mjs → index-DnG3N6yj.mjs} +6 -6
- package/dist/chunks/{loader-V1vbmtyw.mjs → loader-C3DtD6HB.mjs} +4 -2
- package/dist/chunks/{readDotenvCascade-Dgx4SC1p.mjs → readDotenvCascade-CfFPgLCp.mjs} +52 -21
- package/dist/chunks/{readMergedOptions-CraAnYdB.mjs → readMergedOptions-BT1C87_u.mjs} +53 -13
- package/dist/chunks/{resolveCliOptions-BMBkWDYJ.mjs → resolveCliOptions-BbfouWSK.mjs} +1 -1
- package/dist/chunks/{spawnEnv-CKgnHGpr.mjs → spawnEnv-DvisqPiU.mjs} +28 -3
- package/dist/chunks/{types-BthqmnDr.mjs → types-BkQxnyZK.mjs} +1 -1
- package/dist/cli.d.ts +29 -8
- package/dist/cli.mjs +11 -15
- package/dist/cliHost.d.ts +29 -8
- package/dist/cliHost.mjs +6 -6
- package/dist/config.d.ts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/env-overlay.d.ts +13 -9
- package/dist/env-overlay.mjs +2 -2
- package/dist/getdotenv.cli.mjs +11 -15
- package/dist/index.d.ts +30 -9
- package/dist/index.mjs +31 -23
- package/dist/plugins-aws.d.ts +12 -1
- package/dist/plugins-aws.mjs +8 -7
- package/dist/plugins-batch.d.ts +28 -1
- package/dist/plugins-batch.mjs +202 -68
- package/dist/plugins-cmd.d.ts +12 -1
- package/dist/plugins-cmd.mjs +6 -6
- package/dist/plugins-init.d.ts +12 -1
- package/dist/plugins-init.mjs +3 -3
- package/dist/plugins.d.ts +14 -1
- package/dist/plugins.mjs +10 -14
- package/package.json +40 -40
- package/schema/getdotenv.config.schema.json +207 -0
- package/dist/chunks/AwsRestJsonProtocol-4m7HHwvS.mjs +0 -1026
- package/dist/chunks/externalDataInterceptor-DyDNbv-D.mjs +0 -19
- package/dist/chunks/getSSOTokenFromFile-CkYcEieD.mjs +0 -22
- package/dist/chunks/index-B35hOhgq.mjs +0 -669
- package/dist/chunks/index-B3fM_U6F.mjs +0 -349
- package/dist/chunks/index-B_yJRqty.mjs +0 -541
- package/dist/chunks/index-BuxEK_Z4.mjs +0 -12529
- package/dist/chunks/index-C58EanKv.mjs +0 -383
- package/dist/chunks/index-CjWZ4uNg.mjs +0 -103
- package/dist/chunks/index-CsI5JuIM.mjs +0 -188
- package/dist/chunks/index-D-a5vkZL.mjs +0 -82
- package/dist/chunks/index-D6iVe1wh.mjs +0 -946
- package/dist/chunks/index-Dl8qC51H.mjs +0 -290
- package/dist/chunks/index-FT37CtcF.mjs +0 -31
- package/dist/chunks/index-QkVZTs6l.mjs +0 -519
- package/dist/chunks/loadSso-DF7GLUZf.mjs +0 -488
- package/dist/chunks/package-DbbYaehr.mjs +0 -5
- package/dist/chunks/parseKnownFiles-BZNrX_JE.mjs +0 -23
- package/dist/chunks/sdk-stream-mixin-BL49AxZx.mjs +0 -307
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
2
|
-
import { e as CredentialsProviderError, aO as setCredentialFeature } from './index-BuxEK_Z4.mjs';
|
|
3
|
-
import { e as externalDataInterceptor } from './externalDataInterceptor-DyDNbv-D.mjs';
|
|
4
|
-
import './readMergedOptions-CraAnYdB.mjs';
|
|
5
|
-
import 'zod';
|
|
6
|
-
import '@commander-js/extra-typings';
|
|
7
|
-
import './readDotenvCascade-Dgx4SC1p.mjs';
|
|
8
|
-
import 'fs-extra';
|
|
9
|
-
import 'radash';
|
|
10
|
-
import 'node:buffer';
|
|
11
|
-
import 'node:path';
|
|
12
|
-
import './loadModuleDefault-Dj8B3Stt.mjs';
|
|
13
|
-
import 'crypto';
|
|
14
|
-
import 'path';
|
|
15
|
-
import 'url';
|
|
16
|
-
import 'dotenv';
|
|
17
|
-
import 'nanoid';
|
|
18
|
-
import './loader-V1vbmtyw.mjs';
|
|
19
|
-
import 'package-directory';
|
|
20
|
-
import 'yaml';
|
|
21
|
-
import 'execa';
|
|
22
|
-
import 'node:os';
|
|
23
|
-
import 'node:fs/promises';
|
|
24
|
-
import 'node:stream';
|
|
25
|
-
import 'node:crypto';
|
|
26
|
-
import 'node:https';
|
|
27
|
-
import 'node:process';
|
|
28
|
-
import './getSSOTokenFromFile-CkYcEieD.mjs';
|
|
29
|
-
|
|
30
|
-
const fromWebToken = (init) => async (awsIdentityProperties) => {
|
|
31
|
-
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");
|
|
32
|
-
const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
|
|
33
|
-
let { roleAssumerWithWebIdentity } = init;
|
|
34
|
-
if (!roleAssumerWithWebIdentity) {
|
|
35
|
-
const { getDefaultRoleAssumerWithWebIdentity } = await import('./index-D6iVe1wh.mjs');
|
|
36
|
-
roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
|
|
37
|
-
...init.clientConfig,
|
|
38
|
-
credentialProviderLogger: init.logger,
|
|
39
|
-
parentClientConfig: {
|
|
40
|
-
...awsIdentityProperties?.callerClientConfig,
|
|
41
|
-
...init.parentClientConfig,
|
|
42
|
-
},
|
|
43
|
-
}, init.clientPlugins);
|
|
44
|
-
}
|
|
45
|
-
return roleAssumerWithWebIdentity({
|
|
46
|
-
RoleArn: roleArn,
|
|
47
|
-
RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,
|
|
48
|
-
WebIdentityToken: webIdentityToken,
|
|
49
|
-
ProviderId: providerId,
|
|
50
|
-
PolicyArns: policyArns,
|
|
51
|
-
Policy: policy,
|
|
52
|
-
DurationSeconds: durationSeconds,
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
|
|
57
|
-
const ENV_ROLE_ARN = "AWS_ROLE_ARN";
|
|
58
|
-
const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
|
|
59
|
-
const fromTokenFile = (init = {}) => async (awsIdentityProperties) => {
|
|
60
|
-
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");
|
|
61
|
-
const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];
|
|
62
|
-
const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];
|
|
63
|
-
const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];
|
|
64
|
-
if (!webIdentityTokenFile || !roleArn) {
|
|
65
|
-
throw new CredentialsProviderError("Web identity configuration not specified", {
|
|
66
|
-
logger: init.logger,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
const credentials = await fromWebToken({
|
|
70
|
-
...init,
|
|
71
|
-
webIdentityToken: externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??
|
|
72
|
-
readFileSync(webIdentityTokenFile, { encoding: "ascii" }),
|
|
73
|
-
roleArn,
|
|
74
|
-
roleSessionName,
|
|
75
|
-
})(awsIdentityProperties);
|
|
76
|
-
if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
|
|
77
|
-
setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
|
|
78
|
-
}
|
|
79
|
-
return credentials;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export { fromTokenFile, fromWebToken };
|