feat: Complete zCode CLI X with Telegram bot integration

- Add full Telegram bot functionality with Z.AI API integration
- Implement 4 tools: Bash, FileEdit, WebSearch, Git
- Add 3 agents: Code Reviewer, Architect, DevOps Engineer
- Add 6 skills for common coding tasks
- Add systemd service file for 24/7 operation
- Add nginx configuration for HTTPS webhook
- Add comprehensive documentation
- Implement WebSocket server for real-time updates
- Add logging system with Winston
- Add environment validation

🤖 zCode CLI X - Agentic coder with Z.AI + Telegram integration
This commit is contained in:
admin
2026-05-05 09:01:26 +00:00
Unverified
parent 4a7035dd92
commit 875c7f9b91
24688 changed files with 3224957 additions and 221 deletions

View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.propertyProviderChain = exports.createCredentialChain = void 0;
const property_provider_1 = require("@smithy/property-provider");
const createCredentialChain = (...credentialProviders) => {
let expireAfter = -1;
const baseFunction = async (awsIdentityProperties) => {
const credentials = await (0, exports.propertyProviderChain)(...credentialProviders)(awsIdentityProperties);
if (!credentials.expiration && expireAfter !== -1) {
credentials.expiration = new Date(Date.now() + expireAfter);
}
return credentials;
};
const withOptions = Object.assign(baseFunction, {
expireAfter(milliseconds) {
if (milliseconds < 5 * 60_000) {
throw new Error("@aws-sdk/credential-providers - createCredentialChain(...).expireAfter(ms) may not be called with a duration lower than five minutes.");
}
expireAfter = milliseconds;
return withOptions;
},
});
return withOptions;
};
exports.createCredentialChain = createCredentialChain;
const propertyProviderChain = (...providers) => async (awsIdentityProperties) => {
if (providers.length === 0) {
throw new property_provider_1.ProviderError("No providers in chain", { tryNextLink: false });
}
let lastProviderError;
for (const provider of providers) {
try {
return await provider(awsIdentityProperties);
}
catch (err) {
lastProviderError = err;
if (err?.tryNextLink) {
continue;
}
throw err;
}
}
throw lastProviderError;
};
exports.propertyProviderChain = propertyProviderChain;

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromCognitoIdentity = void 0;
const credential_provider_cognito_identity_1 = require("@aws-sdk/credential-provider-cognito-identity");
const fromCognitoIdentity = (options) => (0, credential_provider_cognito_identity_1.fromCognitoIdentity)({
...options,
});
exports.fromCognitoIdentity = fromCognitoIdentity;

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromCognitoIdentityPool = void 0;
const credential_provider_cognito_identity_1 = require("@aws-sdk/credential-provider-cognito-identity");
const fromCognitoIdentityPool = (options) => (0, credential_provider_cognito_identity_1.fromCognitoIdentityPool)({
...options,
});
exports.fromCognitoIdentityPool = fromCognitoIdentityPool;

View File

@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromContainerMetadata = void 0;
const credential_provider_imds_1 = require("@smithy/credential-provider-imds");
const fromContainerMetadata = (init) => {
init?.logger?.debug("@smithy/credential-provider-imds", "fromContainerMetadata");
return (0, credential_provider_imds_1.fromContainerMetadata)(init);
};
exports.fromContainerMetadata = fromContainerMetadata;

View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromEnv = void 0;
const credential_provider_env_1 = require("@aws-sdk/credential-provider-env");
const fromEnv = (init) => (0, credential_provider_env_1.fromEnv)(init);
exports.fromEnv = fromEnv;

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromIni = void 0;
const credential_provider_ini_1 = require("@aws-sdk/credential-provider-ini");
const fromIni = (init = {}) => (0, credential_provider_ini_1.fromIni)({
...init,
});
exports.fromIni = fromIni;

View File

@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromInstanceMetadata = void 0;
const client_1 = require("@aws-sdk/core/client");
const credential_provider_imds_1 = require("@smithy/credential-provider-imds");
const fromInstanceMetadata = (init) => {
init?.logger?.debug("@smithy/credential-provider-imds", "fromInstanceMetadata");
return async () => (0, credential_provider_imds_1.fromInstanceMetadata)(init)().then((creds) => (0, client_1.setCredentialFeature)(creds, "CREDENTIALS_IMDS", "0"));
};
exports.fromInstanceMetadata = fromInstanceMetadata;

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromLoginCredentials = void 0;
const credential_provider_login_1 = require("@aws-sdk/credential-provider-login");
const fromLoginCredentials = (init) => (0, credential_provider_login_1.fromLoginCredentials)({
...init,
});
exports.fromLoginCredentials = fromLoginCredentials;

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromNodeProviderChain = void 0;
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
const fromNodeProviderChain = (init = {}) => (0, credential_provider_node_1.defaultProvider)({
...init,
});
exports.fromNodeProviderChain = fromNodeProviderChain;

View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromProcess = void 0;
const credential_provider_process_1 = require("@aws-sdk/credential-provider-process");
const fromProcess = (init) => (0, credential_provider_process_1.fromProcess)(init);
exports.fromProcess = fromProcess;

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromSSO = void 0;
const credential_provider_sso_1 = require("@aws-sdk/credential-provider-sso");
const fromSSO = (init = {}) => {
return (0, credential_provider_sso_1.fromSSO)({ ...init });
};
exports.fromSSO = fromSSO;

View File

@@ -0,0 +1,155 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromTemporaryCredentials = void 0;
const core_1 = require("@smithy/core");
const property_provider_1 = require("@smithy/property-provider");
const ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
const fromTemporaryCredentials = (options, credentialDefaultProvider, regionProvider) => {
let stsClient;
return async (awsIdentityProperties = {}) => {
const { callerClientConfig } = awsIdentityProperties;
const profile = options.clientConfig?.profile ?? callerClientConfig?.profile;
const logger = options.logger ?? callerClientConfig?.logger;
logger?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");
const params = { ...options.params, RoleSessionName: options.params.RoleSessionName ?? "aws-sdk-js-" + Date.now() };
if (params?.SerialNumber) {
if (!options.mfaCodeProvider) {
throw new property_provider_1.CredentialsProviderError(`Temporary credential requires multi-factor authentication, but no MFA code callback was provided.`, {
tryNextLink: false,
logger,
});
}
params.TokenCode = await options.mfaCodeProvider(params?.SerialNumber);
}
const { AssumeRoleCommand, STSClient } = await Promise.resolve().then(() => __importStar(require("./loadSts")));
if (!stsClient) {
const defaultCredentialsOrError = typeof credentialDefaultProvider === "function" ? credentialDefaultProvider() : undefined;
const credentialSources = [
options.masterCredentials,
options.clientConfig?.credentials,
void callerClientConfig?.credentials,
callerClientConfig?.credentialDefaultProvider?.(),
defaultCredentialsOrError,
];
let credentialSource = "STS client default credentials";
if (credentialSources[0]) {
credentialSource = "options.masterCredentials";
}
else if (credentialSources[1]) {
credentialSource = "options.clientConfig.credentials";
}
else if (credentialSources[2]) {
credentialSource = "caller client's credentials";
throw new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");
}
else if (credentialSources[3]) {
credentialSource = "caller client's credentialDefaultProvider";
}
else if (credentialSources[4]) {
credentialSource = "AWS SDK default credentials";
}
const regionSources = [
options.clientConfig?.region,
callerClientConfig?.region,
await regionProvider?.({
profile,
}),
ASSUME_ROLE_DEFAULT_REGION,
];
let regionSource = "default partition's default region";
if (regionSources[0]) {
regionSource = "options.clientConfig.region";
}
else if (regionSources[1]) {
regionSource = "caller client's region";
}
else if (regionSources[2]) {
regionSource = "file or env region";
}
const requestHandlerSources = [
filterRequestHandler(options.clientConfig?.requestHandler),
filterRequestHandler(callerClientConfig?.requestHandler),
];
let requestHandlerSource = "STS default requestHandler";
if (requestHandlerSources[0]) {
requestHandlerSource = "options.clientConfig.requestHandler";
}
else if (requestHandlerSources[1]) {
requestHandlerSource = "caller client's requestHandler";
}
logger?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ` +
`${regionSource}=${await (0, core_1.normalizeProvider)(coalesce(regionSources))()}, ${credentialSource}, ${requestHandlerSource}.`);
stsClient = new STSClient({
userAgentAppId: callerClientConfig?.userAgentAppId,
...options.clientConfig,
credentials: coalesce(credentialSources),
logger,
profile,
region: coalesce(regionSources),
requestHandler: coalesce(requestHandlerSources),
});
}
if (options.clientPlugins) {
for (const plugin of options.clientPlugins) {
stsClient.middlewareStack.use(plugin);
}
}
const { Credentials } = await stsClient.send(new AssumeRoleCommand(params));
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
throw new property_provider_1.CredentialsProviderError(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`, {
logger,
});
}
return {
accessKeyId: Credentials.AccessKeyId,
secretAccessKey: Credentials.SecretAccessKey,
sessionToken: Credentials.SessionToken,
expiration: Credentials.Expiration,
credentialScope: Credentials.CredentialScope,
};
};
};
exports.fromTemporaryCredentials = fromTemporaryCredentials;
const filterRequestHandler = (requestHandler) => {
return requestHandler?.metadata?.handlerProtocol === "h2" ? undefined : requestHandler;
};
const coalesce = (args) => {
for (const item of args) {
if (item !== undefined) {
return item;
}
}
};

View File

@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromTemporaryCredentials = void 0;
var fromTemporaryCredentials_base_1 = require("./fromTemporaryCredentials.base");
Object.defineProperty(exports, "fromTemporaryCredentials", { enumerable: true, get: function () { return fromTemporaryCredentials_base_1.fromTemporaryCredentials; } });

View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromTemporaryCredentials = void 0;
const config_resolver_1 = require("@smithy/config-resolver");
const node_config_provider_1 = require("@smithy/node-config-provider");
const fromNodeProviderChain_1 = require("./fromNodeProviderChain");
const fromTemporaryCredentials_base_1 = require("./fromTemporaryCredentials.base");
const fromTemporaryCredentials = (options) => {
return (0, fromTemporaryCredentials_base_1.fromTemporaryCredentials)(options, fromNodeProviderChain_1.fromNodeProviderChain, async ({ profile = process.env.AWS_PROFILE }) => (0, node_config_provider_1.loadConfig)({
environmentVariableSelector: (env) => env.AWS_REGION,
configFileSelector: (profileData) => {
return profileData.region;
},
default: () => undefined,
}, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, profile })());
};
exports.fromTemporaryCredentials = fromTemporaryCredentials;

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromTokenFile = void 0;
const credential_provider_web_identity_1 = require("@aws-sdk/credential-provider-web-identity");
const fromTokenFile = (init = {}) => (0, credential_provider_web_identity_1.fromTokenFile)({
...init,
});
exports.fromTokenFile = fromTokenFile;

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromWebToken = void 0;
const credential_provider_web_identity_1 = require("@aws-sdk/credential-provider-web-identity");
const fromWebToken = (init) => (0, credential_provider_web_identity_1.fromWebToken)({
...init,
});
exports.fromWebToken = fromWebToken;

View File

@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromHttp = void 0;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./fromCognitoIdentity"), exports);
tslib_1.__exportStar(require("./fromCognitoIdentityPool"), exports);
var credential_provider_http_1 = require("@aws-sdk/credential-provider-http");
Object.defineProperty(exports, "fromHttp", { enumerable: true, get: function () { return credential_provider_http_1.fromHttp; } });
tslib_1.__exportStar(require("./fromTemporaryCredentials.browser"), exports);
tslib_1.__exportStar(require("./fromWebToken"), exports);

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromHttp = void 0;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./createCredentialChain"), exports);
tslib_1.__exportStar(require("./fromCognitoIdentity"), exports);
tslib_1.__exportStar(require("./fromCognitoIdentityPool"), exports);
tslib_1.__exportStar(require("./fromContainerMetadata"), exports);
tslib_1.__exportStar(require("./fromEnv"), exports);
var credential_provider_http_1 = require("@aws-sdk/credential-provider-http");
Object.defineProperty(exports, "fromHttp", { enumerable: true, get: function () { return credential_provider_http_1.fromHttp; } });
tslib_1.__exportStar(require("./fromIni"), exports);
tslib_1.__exportStar(require("./fromInstanceMetadata"), exports);
tslib_1.__exportStar(require("./fromLoginCredentials"), exports);
tslib_1.__exportStar(require("./fromNodeProviderChain"), exports);
tslib_1.__exportStar(require("./fromProcess"), exports);
tslib_1.__exportStar(require("./fromSSO"), exports);
tslib_1.__exportStar(require("./fromTemporaryCredentials"), exports);
tslib_1.__exportStar(require("./fromTokenFile"), exports);
tslib_1.__exportStar(require("./fromWebToken"), exports);

View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.STSClient = exports.AssumeRoleCommand = void 0;
const sts_1 = require("@aws-sdk/nested-clients/sts");
Object.defineProperty(exports, "AssumeRoleCommand", { enumerable: true, get: function () { return sts_1.AssumeRoleCommand; } });
Object.defineProperty(exports, "STSClient", { enumerable: true, get: function () { return sts_1.STSClient; } });

View File

@@ -0,0 +1,40 @@
import { ProviderError } from "@smithy/property-provider";
export const createCredentialChain = (...credentialProviders) => {
let expireAfter = -1;
const baseFunction = async (awsIdentityProperties) => {
const credentials = await propertyProviderChain(...credentialProviders)(awsIdentityProperties);
if (!credentials.expiration && expireAfter !== -1) {
credentials.expiration = new Date(Date.now() + expireAfter);
}
return credentials;
};
const withOptions = Object.assign(baseFunction, {
expireAfter(milliseconds) {
if (milliseconds < 5 * 60_000) {
throw new Error("@aws-sdk/credential-providers - createCredentialChain(...).expireAfter(ms) may not be called with a duration lower than five minutes.");
}
expireAfter = milliseconds;
return withOptions;
},
});
return withOptions;
};
export const propertyProviderChain = (...providers) => async (awsIdentityProperties) => {
if (providers.length === 0) {
throw new ProviderError("No providers in chain", { tryNextLink: false });
}
let lastProviderError;
for (const provider of providers) {
try {
return await provider(awsIdentityProperties);
}
catch (err) {
lastProviderError = err;
if (err?.tryNextLink) {
continue;
}
throw err;
}
}
throw lastProviderError;
};

View File

@@ -0,0 +1,4 @@
import { fromCognitoIdentity as _fromCognitoIdentity } from "@aws-sdk/credential-provider-cognito-identity";
export const fromCognitoIdentity = (options) => _fromCognitoIdentity({
...options,
});

View File

@@ -0,0 +1,4 @@
import { fromCognitoIdentityPool as _fromCognitoIdentityPool } from "@aws-sdk/credential-provider-cognito-identity";
export const fromCognitoIdentityPool = (options) => _fromCognitoIdentityPool({
...options,
});

View File

@@ -0,0 +1,5 @@
import { fromContainerMetadata as _fromContainerMetadata } from "@smithy/credential-provider-imds";
export const fromContainerMetadata = (init) => {
init?.logger?.debug("@smithy/credential-provider-imds", "fromContainerMetadata");
return _fromContainerMetadata(init);
};

View File

@@ -0,0 +1,2 @@
import { fromEnv as _fromEnv } from "@aws-sdk/credential-provider-env";
export const fromEnv = (init) => _fromEnv(init);

View File

@@ -0,0 +1,4 @@
import { fromIni as _fromIni } from "@aws-sdk/credential-provider-ini";
export const fromIni = (init = {}) => _fromIni({
...init,
});

View File

@@ -0,0 +1,6 @@
import { setCredentialFeature } from "@aws-sdk/core/client";
import { fromInstanceMetadata as _fromInstanceMetadata } from "@smithy/credential-provider-imds";
export const fromInstanceMetadata = (init) => {
init?.logger?.debug("@smithy/credential-provider-imds", "fromInstanceMetadata");
return async () => _fromInstanceMetadata(init)().then((creds) => setCredentialFeature(creds, "CREDENTIALS_IMDS", "0"));
};

View File

@@ -0,0 +1,4 @@
import { fromLoginCredentials as _fromLoginCredentials, } from "@aws-sdk/credential-provider-login";
export const fromLoginCredentials = (init) => _fromLoginCredentials({
...init,
});

View File

@@ -0,0 +1,4 @@
import { defaultProvider } from "@aws-sdk/credential-provider-node";
export const fromNodeProviderChain = (init = {}) => defaultProvider({
...init,
});

View File

@@ -0,0 +1,2 @@
import { fromProcess as _fromProcess } from "@aws-sdk/credential-provider-process";
export const fromProcess = (init) => _fromProcess(init);

View File

@@ -0,0 +1,4 @@
import { fromSSO as _fromSSO } from "@aws-sdk/credential-provider-sso";
export const fromSSO = (init = {}) => {
return _fromSSO({ ...init });
};

View File

@@ -0,0 +1,118 @@
import { normalizeProvider } from "@smithy/core";
import { CredentialsProviderError } from "@smithy/property-provider";
const ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
export const fromTemporaryCredentials = (options, credentialDefaultProvider, regionProvider) => {
let stsClient;
return async (awsIdentityProperties = {}) => {
const { callerClientConfig } = awsIdentityProperties;
const profile = options.clientConfig?.profile ?? callerClientConfig?.profile;
const logger = options.logger ?? callerClientConfig?.logger;
logger?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");
const params = { ...options.params, RoleSessionName: options.params.RoleSessionName ?? "aws-sdk-js-" + Date.now() };
if (params?.SerialNumber) {
if (!options.mfaCodeProvider) {
throw new CredentialsProviderError(`Temporary credential requires multi-factor authentication, but no MFA code callback was provided.`, {
tryNextLink: false,
logger,
});
}
params.TokenCode = await options.mfaCodeProvider(params?.SerialNumber);
}
const { AssumeRoleCommand, STSClient } = await import("./loadSts");
if (!stsClient) {
const defaultCredentialsOrError = typeof credentialDefaultProvider === "function" ? credentialDefaultProvider() : undefined;
const credentialSources = [
options.masterCredentials,
options.clientConfig?.credentials,
void callerClientConfig?.credentials,
callerClientConfig?.credentialDefaultProvider?.(),
defaultCredentialsOrError,
];
let credentialSource = "STS client default credentials";
if (credentialSources[0]) {
credentialSource = "options.masterCredentials";
}
else if (credentialSources[1]) {
credentialSource = "options.clientConfig.credentials";
}
else if (credentialSources[2]) {
credentialSource = "caller client's credentials";
throw new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");
}
else if (credentialSources[3]) {
credentialSource = "caller client's credentialDefaultProvider";
}
else if (credentialSources[4]) {
credentialSource = "AWS SDK default credentials";
}
const regionSources = [
options.clientConfig?.region,
callerClientConfig?.region,
await regionProvider?.({
profile,
}),
ASSUME_ROLE_DEFAULT_REGION,
];
let regionSource = "default partition's default region";
if (regionSources[0]) {
regionSource = "options.clientConfig.region";
}
else if (regionSources[1]) {
regionSource = "caller client's region";
}
else if (regionSources[2]) {
regionSource = "file or env region";
}
const requestHandlerSources = [
filterRequestHandler(options.clientConfig?.requestHandler),
filterRequestHandler(callerClientConfig?.requestHandler),
];
let requestHandlerSource = "STS default requestHandler";
if (requestHandlerSources[0]) {
requestHandlerSource = "options.clientConfig.requestHandler";
}
else if (requestHandlerSources[1]) {
requestHandlerSource = "caller client's requestHandler";
}
logger?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ` +
`${regionSource}=${await normalizeProvider(coalesce(regionSources))()}, ${credentialSource}, ${requestHandlerSource}.`);
stsClient = new STSClient({
userAgentAppId: callerClientConfig?.userAgentAppId,
...options.clientConfig,
credentials: coalesce(credentialSources),
logger,
profile,
region: coalesce(regionSources),
requestHandler: coalesce(requestHandlerSources),
});
}
if (options.clientPlugins) {
for (const plugin of options.clientPlugins) {
stsClient.middlewareStack.use(plugin);
}
}
const { Credentials } = await stsClient.send(new AssumeRoleCommand(params));
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
throw new CredentialsProviderError(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`, {
logger,
});
}
return {
accessKeyId: Credentials.AccessKeyId,
secretAccessKey: Credentials.SecretAccessKey,
sessionToken: Credentials.SessionToken,
expiration: Credentials.Expiration,
credentialScope: Credentials.CredentialScope,
};
};
};
const filterRequestHandler = (requestHandler) => {
return requestHandler?.metadata?.handlerProtocol === "h2" ? undefined : requestHandler;
};
const coalesce = (args) => {
for (const item of args) {
if (item !== undefined) {
return item;
}
}
};

View File

@@ -0,0 +1 @@
export { fromTemporaryCredentials } from "./fromTemporaryCredentials.base";

View File

@@ -0,0 +1,13 @@
import { NODE_REGION_CONFIG_FILE_OPTIONS } from "@smithy/config-resolver";
import { loadConfig } from "@smithy/node-config-provider";
import { fromNodeProviderChain } from "./fromNodeProviderChain";
import { fromTemporaryCredentials as fromTemporaryCredentialsBase } from "./fromTemporaryCredentials.base";
export const fromTemporaryCredentials = (options) => {
return fromTemporaryCredentialsBase(options, fromNodeProviderChain, async ({ profile = process.env.AWS_PROFILE }) => loadConfig({
environmentVariableSelector: (env) => env.AWS_REGION,
configFileSelector: (profileData) => {
return profileData.region;
},
default: () => undefined,
}, { ...NODE_REGION_CONFIG_FILE_OPTIONS, profile })());
};

View File

@@ -0,0 +1,4 @@
import { fromTokenFile as _fromTokenFile } from "@aws-sdk/credential-provider-web-identity";
export const fromTokenFile = (init = {}) => _fromTokenFile({
...init,
});

View File

@@ -0,0 +1,4 @@
import { fromWebToken as _fromWebToken } from "@aws-sdk/credential-provider-web-identity";
export const fromWebToken = (init) => _fromWebToken({
...init,
});

View File

@@ -0,0 +1,5 @@
export * from "./fromCognitoIdentity";
export * from "./fromCognitoIdentityPool";
export { fromHttp } from "@aws-sdk/credential-provider-http";
export * from "./fromTemporaryCredentials.browser";
export * from "./fromWebToken";

View File

@@ -0,0 +1,15 @@
export * from "./createCredentialChain";
export * from "./fromCognitoIdentity";
export * from "./fromCognitoIdentityPool";
export * from "./fromContainerMetadata";
export * from "./fromEnv";
export { fromHttp } from "@aws-sdk/credential-provider-http";
export * from "./fromIni";
export * from "./fromInstanceMetadata";
export * from "./fromLoginCredentials";
export * from "./fromNodeProviderChain";
export * from "./fromProcess";
export * from "./fromSSO";
export * from "./fromTemporaryCredentials";
export * from "./fromTokenFile";
export * from "./fromWebToken";

View File

@@ -0,0 +1,2 @@
import { AssumeRoleCommand, STSClient } from "@aws-sdk/nested-clients/sts";
export { AssumeRoleCommand, STSClient };

View File

@@ -0,0 +1,51 @@
import type { RuntimeConfigAwsCredentialIdentityProvider, RuntimeConfigIdentityProvider } from "@aws-sdk/types";
import type { AwsCredentialIdentityProvider } from "@smithy/types";
export interface CustomCredentialChainOptions {
expireAfter(milliseconds: number): AwsCredentialIdentityProvider & CustomCredentialChainOptions;
}
/**
* @example
* ```js
* import { fromEnv, fromIni, createCredentialChain } from '@aws-sdk/credential-providers';
* import { S3 } from '@aws-sdk/client-s3';
*
* // You can mix existing AWS SDK credential providers
* // and custom async functions returning credential objects.
* new S3({
* credentials: createCredentialChain(
* fromEnv(),
* async () => {
* // credentials customized by your code...
* return credentials;
* },
* fromIni()
* ),
* });
*
* // Set a max duration on the credentials (client side only).
* // A set expiration will cause the credentials function to be called again
* // when the time left is less than 5 minutes.
* new S3({
* // expire after 15 minutes (in milliseconds).
* credentials: createCredentialChain(fromEnv(), fromIni()).expireAfter(15 * 60_000),
* });
*
* // Apply shared init properties.
* const init = { logger: console };
*
* new S3({
* credentials: createCredentialChain(fromEnv(init), fromIni(init)),
* });
* ```
*
* @param credentialProviders - one or more credential providers.
* @returns a single AwsCredentialIdentityProvider that calls the given
* providers in sequence until one succeeds or all fail.
*
* @public
*/
export declare const createCredentialChain: (...credentialProviders: RuntimeConfigAwsCredentialIdentityProvider[]) => RuntimeConfigAwsCredentialIdentityProvider & CustomCredentialChainOptions;
/**
* @internal
*/
export declare const propertyProviderChain: <T>(...providers: Array<RuntimeConfigIdentityProvider<T>>) => RuntimeConfigIdentityProvider<T>;

View File

@@ -0,0 +1,50 @@
import type { CognitoIdentityClientConfig } from "@aws-sdk/client-cognito-identity";
import type { CognitoIdentityCredentialProvider as _CognitoIdentityCredentialProvider, FromCognitoIdentityParameters as _FromCognitoIdentityParameters } from "@aws-sdk/credential-provider-cognito-identity";
/**
* @public
*/
export interface FromCognitoIdentityParameters extends Omit<_FromCognitoIdentityParameters, "client"> {
/**
* Custom client configuration if you need overwrite default Cognito Identity client configuration.
*/
clientConfig?: CognitoIdentityClientConfig;
}
export type CognitoIdentityCredentialProvider = _CognitoIdentityCredentialProvider;
/**
* Creates a credential provider function that reetrieves temporary AWS credentials using Amazon Cognito's
* `GetCredentialsForIdentity` operation.
*
* Results from this function call are not cached internally.
*
* ```javascript
* import { fromCognitoIdentity } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromCognitoIdentity } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new FooClient({
* region,
* credentials: fromCognitoIdentity({
* // Required. The unique identifier for the identity against which credentials
* // will be issued.
* identityId: "us-east-1:128d0a74-c82f-4553-916d-90053e4a8b0f"
* // optional. The ARN of the role to be assumed when multiple roles were
* // received in the token from the identity provider.
* customRoleArn: "arn:aws:iam::1234567890:role/MYAPP-CognitoIdentity"
* // Optional. A set of name-value pairs that map provider names to provider
* // tokens. Required when using identities associated with external identity
* // providers such as Facebook.
* logins: {
* "graph.facebook.com": "FBTOKEN",
* "www.amazon.com": "AMAZONTOKEN",
* "accounts.google.com": "GOOGLETOKEN",
* "api.twitter.com": "TWITTERTOKEN'",
* "www.digits.com": "DIGITSTOKEN"
* },
* // Optional. Custom client configuration if you need overwrite default Cognito Identity client configuration.
* clientConfig: { region }
* }),
* });
* ```
*
* @public
*/
export declare const fromCognitoIdentity: (options: FromCognitoIdentityParameters) => CognitoIdentityCredentialProvider;

View File

@@ -0,0 +1,48 @@
import type { CognitoIdentityClientConfig } from "@aws-sdk/client-cognito-identity";
import type { CognitoIdentityCredentialProvider, FromCognitoIdentityPoolParameters as _FromCognitoIdentityPoolParameters } from "@aws-sdk/credential-provider-cognito-identity";
export interface FromCognitoIdentityPoolParameters extends Omit<_FromCognitoIdentityPoolParameters, "client"> {
clientConfig?: CognitoIdentityClientConfig;
}
/**
* Creates a credential provider function that retrieves or generates a unique identifier using Amazon Cognito's `GetId`
* operation, then generates temporary AWS credentials using Amazon Cognito's `GetCredentialsForIdentity` operation.
*
* Results from `GetId` are cached internally, but results from `GetCredentialsForIdentity` are not.
*
* ```javascript
* import { fromCognitoIdentityPool } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromCognitoIdentityPool } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new FooClient({
* region,
* credentials: fromCognitoIdentityPool({
* // Required. The unique identifier for the identity pool from which an identity should be retrieved or generated.
* identityPoolId: "us-east-1:1699ebc0-7900-4099-b910-2df94f52a030";
* // Optional. A standard AWS account ID (9+ digits)
* accountId: "123456789",
* // Optional. A cache in which to store resolved Cognito IdentityIds.
* cache: custom_storage,
* // Optional. A unique identifier for the user used to cache Cognito IdentityIds on a per-user basis.
* userIdentifier: "user_0",
* // optional. The ARN of the role to be assumed when multiple roles were
* // received in the token from the identity provider.
* customRoleArn: "arn:aws:iam::1234567890:role/MYAPP-CognitoIdentity"
* // Optional. A set of name-value pairs that map provider names to provider
* // tokens. Required when using identities associated with external identity
* // providers such as Facebook.
* logins: {
* 'graph.facebook.com': 'FBTOKEN',
* 'www.amazon.com': 'AMAZONTOKEN',
* 'accounts.google.com': 'GOOGLETOKEN',
* 'api.twitter.com': 'TWITTERTOKEN',
* 'www.digits.com': 'DIGITSTOKEN'
* },
* // Optional. Custom client configuration if you need overwrite default Cognito Identity client configuration.
* client: new CognitoIdentityClient({ region })
* }),
* });
* ```
*
* @public
*/
export declare const fromCognitoIdentityPool: (options: FromCognitoIdentityPoolParameters) => CognitoIdentityCredentialProvider;

View File

@@ -0,0 +1,27 @@
import type { CredentialProviderOptions } from "@aws-sdk/types";
import type { RemoteProviderInit as _RemoteProviderInit } from "@smithy/credential-provider-imds";
import type { AwsCredentialIdentityProvider } from "@smithy/types";
export interface RemoteProviderInit extends _RemoteProviderInit, CredentialProviderOptions {
}
/**
* Create a credential provider function that reads from ECS container metadata service.
*
* ```javascript
* import { fromContainerMetadata } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromContainerMetadata } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const foo = new FooClient({
* credentials: fromContainerMetadata({
* // Optional. The connection timeout (in milliseconds) to apply to any remote requests. If not specified, a default value
* // of`1000` (one second) is used.
* timeout: 1000,
* // Optional. The maximum number of times any HTTP connections should be retried. If not specified, a default value of `0`
* // will be used.
* maxRetries: 0,
* }),
* });
* ```
*
* @public
*/
export declare const fromContainerMetadata: (init?: RemoteProviderInit) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,29 @@
import type { FromEnvInit } from "@aws-sdk/credential-provider-env";
import type { AwsCredentialIdentityProvider } from "@smithy/types";
/**
* Create a credential provider that reads credentials from the following environment variables:
*
* - `AWS_ACCESS_KEY_ID` - The access key for your AWS account.
* - `AWS_SECRET_ACCESS_KEY` - The secret key for your AWS account.
* - `AWS_SESSION_TOKEN` - The session key for your AWS account. This is only
* needed when you are using temporary credentials.
* - `AWS_CREDENTIAL_EXPIRATION` - The expiration time of the credentials contained
* in the environment variables described above. This value must be in a format
* compatible with the [ISO-8601 standard](https://en.wikipedia.org/wiki/ISO_8601)
* and is only needed when you are using temporary credentials.
*
* If either the `AWS_ACCESS_KEY_ID` or `AWS_SECRET_ACCESS_KEY` environment variable is not set or contains a falsy
* value, the promise returned by the `fromEnv` function will be rejected.
*
* ```javascript
* import { fromEnv } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromEnv } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new DynamoDBClient({
* credentials: fromEnv(),
* });
* ```
*
* @public
*/
export declare const fromEnv: (init?: FromEnvInit) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,44 @@
import type { FromIniInit } from "@aws-sdk/credential-provider-ini";
import type { RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
/**
* Creates a credential provider function that reads from a shared credentials file at `~/.aws/credentials` and a
* shared configuration file at `~/.aws/config`. Both files are expected to be INI formatted with section names
* corresponding to profiles. Sections in the credentials file are treated as profile names, whereas profile sections in
* the config file must have the format of`[profile profile-name]`, except for the default profile.
*
* Profiles that appear in both files will not be merged, and the version that appears in the credentials file will be
* given precedence over the profile found in the config file.
*
* ```javascript
* import { fromIni } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromIni } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new FooClient({
* credentials: fromIni({
* // Optional. The configuration profile to use. If not specified, the provider will use the value in the
* // `AWS_PROFILE` environment variable or a default of `default`.
* profile: "profile",
* // Optional. The path to the shared credentials file. If not specified, the provider will use the value in the
* // `AWS_SHARED_CREDENTIALS_FILE` environment variable or a default of `~/.aws/credentials`.
* filepath: "~/.aws/credentials",
* // Optional. The path to the shared config file. If not specified, the provider will use the value in the
* // `AWS_CONFIG_FILE` environment variable or a default of `~/.aws/config`.
* configFilepath: "~/.aws/config",
* // Optional. A function that returns a a promise fulfilled with an MFA token code for the provided MFA Serial
* // code. If a profile requires an MFA code and `mfaCodeProvider` is not a valid function, the credential provider
* // promise will be rejected.
* mfaCodeProvider: async (mfaSerial) => {
* return "token";
* },
* // Optional. Custom STS client configurations overriding the default ones.
* clientConfig: { region },
* // Optional. Custom STS client middleware plugin to modify the client default behavior.
* // e.g. adding custom headers.
* clientPlugins: [addFooHeadersPlugin],
* }),
* });
* ```
*
* @public
*/
export declare const fromIni: (init?: FromIniInit) => RuntimeConfigAwsCredentialIdentityProvider;

View File

@@ -0,0 +1,25 @@
import type { CredentialProviderOptions } from "@aws-sdk/types";
import type { RemoteProviderConfig as _RemoteProviderInit } from "@smithy/credential-provider-imds";
import type { AwsCredentialIdentityProvider } from "@smithy/types";
/**
* Creates a credential provider function that reads from the EC2 instance metadata service.
*
* ```javascript
* import { fromInstanceMetadata } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromInstanceMetadata } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new DynamoDBClient({
* credentials: fromInstanceMetadata({
* // Optional. The connection timeout (in milliseconds) to apply to any remote requests. If not specified, a
* // default value of`1000` (one second) is used.
* timeout: 1000,
* // Optional. The maximum number of times any HTTP connections should be retried. If not specified, a default
* // value of `0` will be used.
* maxRetries: 0,
* }),
* });
* ```
*
* @public
*/
export declare const fromInstanceMetadata: (init?: _RemoteProviderInit & CredentialProviderOptions) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,7 @@
import { type FromLoginCredentialsInit } from "@aws-sdk/credential-provider-login";
import type { RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
/**
* Creates a credential provider that sources credentials from `aws login` cached tokens
* @public
*/
export declare const fromLoginCredentials: (init?: FromLoginCredentialsInit) => RuntimeConfigAwsCredentialIdentityProvider;

View File

@@ -0,0 +1,34 @@
import type { DefaultProviderInit } from "@aws-sdk/credential-provider-node";
import type { AwsCredentialIdentityProvider } from "@smithy/types";
/**
* This is the same credential provider as {@link https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-credential-providers/#fromnodeproviderchain|the default provider for Node.js SDK},
* but with default role assumers so you don't need to import them from
* STS client and supply them manually. You normally don't need to use this explicitly in the client constructor.
* It is useful for utility functions requiring credentials like S3 presigner,
* or RDS signer.
*
* ```js
* import { fromNodeProviderChain } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromNodeProviderChain } = require("@aws-sdk/credential-providers") // CommonJS import
*
* const credentialProvider = fromNodeProviderChain({
* // init properties for fromEnv(), fromSSO(), fromTokenFile(), fromIni(),
* // fromProcess(), fromInstanceMetadata(), fromContainerMetadata()
*
* // For instance, to ignore the ini shared cache, change the credentials filepath for all
* // providers, and set the sso start id:
* ignoreCache: true,
* filepath: "~/.config/aws/credentials",
* ssoStartUrl: "https://d-abc123.awsapps.com/start"
*
* // Optional. Custom STS client configurations overriding the default ones.
* clientConfig: { region },
* // Optional. Custom STS client middleware plugin to modify the client default behavior.
* // e.g. adding custom headers.
* clientPlugins: [addFooHeadersPlugin],
* })
* ```
*
* @public
*/
export declare const fromNodeProviderChain: (init?: DefaultProviderInit) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,28 @@
import type { FromProcessInit } from "@aws-sdk/credential-provider-process";
import type { AwsCredentialIdentityProvider } from "@smithy/types";
/**
* Creates a credential provider function that executes a given process and attempt to read its standard output to
* receive a JSON payload containing the credentials.
*
* ```javascript
* import { fromProcess } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromProcess } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new FooClient({
* credentials: fromProcess({
* // Optional. The configuration profile to use. If not specified, the provider will use the value in the
* // `AWS_PROFILE` environment variable or a default of `default`.
* profile: "profile",
* // Optional. The path to the shared credentials file. If not specified, the provider will use the value in the
* // `AWS_SHARED_CREDENTIALS_FILE` environment variable or a default of `~/.aws/credentials`.
* filepath: "~/.aws/credentials",
* // Optional. The path to the shared config file. If not specified, the provider will use the value in the
* // `AWS_CONFIG_FILE` environment variable or a default of `~/.aws/config`.
* configFilepath: "~/.aws/config",
* }),
* });
* ```
*
* @public
*/
export declare const fromProcess: (init?: FromProcessInit) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,46 @@
import { fromSSO as _fromSSO } from "@aws-sdk/credential-provider-sso";
import type { AwsCredentialIdentityProvider } from "@smithy/types";
/**
* Creates a credential provider function that reads from the _resolved_ access token from local disk then requests
* temporary AWS credentials.
*
* You can create the `AwsCredentialIdentityProvider` functions using the inline SSO parameters(`ssoStartUrl`, `ssoAccountId`,
* `ssoRegion`, `ssoRoleName`) or load them from [AWS SDKs and Tools shared configuration and credentials files](https://docs.aws.amazon.com/credref/latest/refdocs/creds-config-files.html).
* Profiles in the `credentials` file are given precedence over profiles in the `config` file.
*
* ```javascript
* import { fromSSO } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromSSO } = require(@aws-sdk/credential-providers") // CommonJS import
*
* const client = new FooClient({
* credentials: fromSSO({
* // Optional. The configuration profile to use. If not specified, the provider will use the value in the
* // `AWS_PROFILE` environment variable or `default` by default.
* profile: "my-sso-profile",
* // Optional. The path to the shared credentials file. If not specified, the provider will use the value in the
* // `AWS_SHARED_CREDENTIALS_FILE` environment variable or a default of `~/.aws/credentials`.
* filepath: "~/.aws/credentials",
* // Optional. The path to the shared config file. If not specified, the provider will use the value in the
* // `AWS_CONFIG_FILE` environment variable or a default of `~/.aws/config`.
* configFilepath: "~/.aws/config",
* // Optional. The URL to the AWS SSO service. Required if any of the `sso*` options(except for `ssoClient`) is
* // provided.
* ssoStartUrl: "https://d-abc123.awsapps.com/start",
* // Optional. The ID of the AWS account to use for temporary credentials. Required if any of the `sso*`
* // options(except for `ssoClient`) is provided.
* ssoAccountId: "1234567890",
* // Optional. The AWS region to use for temporary credentials. Required if any of the `sso*` options(except for
* // `ssoClient`) is provided.
* ssoRegion: "us-east-1",
* // Optional. The name of the AWS role to assume. Required if any of the `sso*` options(except for `ssoClient`) is
* // provided.
* ssoRoleName: "SampleRole",
* // Optional. Overwrite the configuration used construct the SSO service client.
* clientConfig: { region },
* }),
* });
* ```
*
* @public
*/
export declare const fromSSO: (init?: Parameters<typeof _fromSSO>[0]) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,16 @@
import type { AssumeRoleCommandInput, STSClientConfig } from "@aws-sdk/nested-clients/sts";
import type { CredentialProviderOptions, RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
import type { AwsCredentialIdentity, AwsCredentialIdentityProvider, Logger, Pluggable } from "@smithy/types";
export interface FromTemporaryCredentialsOptions extends CredentialProviderOptions {
params: Omit<AssumeRoleCommandInput, "RoleSessionName"> & {
RoleSessionName?: string;
};
masterCredentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider;
clientConfig?: STSClientConfig;
logger?: Logger;
clientPlugins?: Pluggable<any, any>[];
mfaCodeProvider?: (mfaSerial: string) => Promise<string>;
}
export declare const fromTemporaryCredentials: (options: FromTemporaryCredentialsOptions, credentialDefaultProvider?: () => AwsCredentialIdentityProvider, regionProvider?: ({ profile }: {
profile?: string;
}) => Promise<string | undefined>) => RuntimeConfigAwsCredentialIdentityProvider;

View File

@@ -0,0 +1 @@
export { FromTemporaryCredentialsOptions, fromTemporaryCredentials } from "./fromTemporaryCredentials.base";

View File

@@ -0,0 +1,49 @@
import type { RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
import type { FromTemporaryCredentialsOptions } from "./fromTemporaryCredentials.base";
/**
* @public
*/
export { FromTemporaryCredentialsOptions };
/**
* Creates a credential provider function that retrieves temporary credentials from STS AssumeRole API.
*
* ```javascript
* import { fromTemporaryCredentials } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromTemporaryCredentials } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new FooClient({
* region,
* credentials: fromTemporaryCredentials(
* // Optional. The master credentials used to get and refresh temporary credentials from AWS STS. If skipped, it uses
* // the default credential resolved by internal STS client.
* masterCredentials: fromTemporaryCredentials({
* params: { RoleArn: "arn:aws:iam::1234567890:role/RoleA" }
* }),
* // Required. Options passed to STS AssumeRole operation.
* params: {
* // Required. ARN of role to assume.
* RoleArn: "arn:aws:iam::1234567890:role/RoleB",
* // Optional. An identifier for the assumed role session. If skipped, it generates a random session name with
* // prefix of 'aws-sdk-js-'.
* RoleSessionName: "aws-sdk-js-123",
* // Optional. The duration, in seconds, of the role session.
* DurationSeconds: 3600
* //... For more options see https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html
* },
* // Optional. Custom STS client configurations overriding the default ones.
* clientConfig: { region },
* // Optional. Custom STS client middleware plugin to modify the client default behavior.
* // e.g. adding custom headers.
* clientPlugins: [addFooHeadersPlugin],
* // Optional. A function that returns a promise fulfilled with an MFA token code for the provided MFA Serial code.
* // Required if `params` has `SerialNumber` config.
* mfaCodeProvider: async mfaSerial => {
* return "token"
* }
* ),
* });
* ```
*
* @public
*/
export declare const fromTemporaryCredentials: (options: FromTemporaryCredentialsOptions) => RuntimeConfigAwsCredentialIdentityProvider;

View File

@@ -0,0 +1,33 @@
import type { FromTokenFileInit } from "@aws-sdk/credential-provider-web-identity";
import type { AwsCredentialIdentityProvider } from "@smithy/types";
/**
* Creates a credential provider function that reads OIDC token from given file, then call STS.AssumeRoleWithWebIdentity
* API. The configurations must be specified in environmental variables:
*
* - Reads file location of where the OIDC token is stored from either provided option `webIdentityTokenFile` or
* environment variable `AWS_WEB_IDENTITY_TOKEN_FILE`.
* - Reads IAM role wanting to be assumed from either provided option `roleArn` or environment variable `AWS_ROLE_ARN`.
* - Reads optional role session name to be used to distinguish sessions from provided option `roleSessionName` or
* environment variable `AWS_ROLE_SESSION_NAME`.
* If session name is not defined, it comes up with a role session name.
* - Reads OIDC token from file on disk.
* - Calls sts:AssumeRoleWithWebIdentity via `roleAssumerWithWebIdentity` option to get credentials.
*
* ```javascript
* import { fromTokenFile } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromTokenFile } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new FooClient({
* credentials: fromTokenFile({
* // Optional. STS client config to make the assume role request.
* clientConfig: { region }
* // Optional. Custom STS client middleware plugin to modify the client default behavior.
* // e.g. adding custom headers.
* clientPlugins: [addFooHeadersPlugin],
* });
* });
* ```
*
* @public
*/
export declare const fromTokenFile: (init?: FromTokenFileInit) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,42 @@
import type { FromWebTokenInit } from "@aws-sdk/credential-provider-web-identity";
import type { AwsCredentialIdentityProvider } from "@smithy/types";
/**
* Creates a credential provider function that gets credentials calling STS
* AssumeRoleWithWebIdentity API.
*
* ```javascript
* import { fromWebToken } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromWebToken } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const dynamodb = new DynamoDBClient({
* region,
* credentials: fromWebToken({
* // Required. ARN of the role that the caller is assuming.
* roleArn: "arn:aws:iam::1234567890:role/RoleA",
* // Required. The OAuth 2.0 access token or OpenID Connect ID token that is provided by the identity provider.
* webIdentityToken: await openIdProvider()
* // Optional. Custom STS client configurations overriding the default ones.
* clientConfig: { region }
* // Optional. Custom STS client middleware plugin to modify the client default behavior.
* // e.g. adding custom headers.
* clientPlugins: [addFooHeadersPlugin],
* // Optional. A function that assumes a role with web identity and returns a promise fulfilled with credentials for
* // the assumed role.
* roleAssumerWithWebIdentity,
* // Optional. An identifier for the assumed role session.
* roleSessionName: "session_123",
* // Optional. The fully qualified host component of the domain name of the identity provider.
* providerId: "graph.facebook.com",
* // Optional. ARNs of the IAM managed policies that you want to use as managed session.
* policyArns: [{arn: "arn:aws:iam::1234567890:policy/SomePolicy"}],
* // Optional. An IAM policy in JSON format that you want to use as an inline session policy.
* policy: "JSON_STRING",
* // Optional. The duration, in seconds, of the role session. Default to 3600.
* durationSeconds: 7200
* }),
* });
* ```
*
* @public
*/
export declare const fromWebToken: (init: FromWebTokenInit) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,6 @@
export * from "./fromCognitoIdentity";
export * from "./fromCognitoIdentityPool";
export { fromHttp } from "@aws-sdk/credential-provider-http";
export type { FromHttpOptions, HttpProviderCredentials } from "@aws-sdk/credential-provider-http";
export * from "./fromTemporaryCredentials.browser";
export * from "./fromWebToken";

View File

@@ -0,0 +1,15 @@
export * from "./createCredentialChain";
export * from "./fromCognitoIdentity";
export * from "./fromCognitoIdentityPool";
export * from "./fromContainerMetadata";
export * from "./fromEnv";
export { fromHttp, FromHttpOptions, HttpProviderCredentials } from "@aws-sdk/credential-provider-http";
export * from "./fromIni";
export * from "./fromInstanceMetadata";
export * from "./fromLoginCredentials";
export * from "./fromNodeProviderChain";
export * from "./fromProcess";
export * from "./fromSSO";
export * from "./fromTemporaryCredentials";
export * from "./fromTokenFile";
export * from "./fromWebToken";

View File

@@ -0,0 +1,5 @@
import { AssumeRoleCommand, STSClient } from "@aws-sdk/nested-clients/sts";
/**
* @internal
*/
export { AssumeRoleCommand, STSClient };

View File

@@ -0,0 +1,16 @@
import {
RuntimeConfigAwsCredentialIdentityProvider,
RuntimeConfigIdentityProvider,
} from "@aws-sdk/types";
import { AwsCredentialIdentityProvider } from "@smithy/types";
export interface CustomCredentialChainOptions {
expireAfter(
milliseconds: number
): AwsCredentialIdentityProvider & CustomCredentialChainOptions;
}
export declare const createCredentialChain: (
...credentialProviders: RuntimeConfigAwsCredentialIdentityProvider[]
) => RuntimeConfigAwsCredentialIdentityProvider & CustomCredentialChainOptions;
export declare const propertyProviderChain: <T>(
...providers: Array<RuntimeConfigIdentityProvider<T>>
) => RuntimeConfigIdentityProvider<T>;

View File

@@ -0,0 +1,17 @@
import { CognitoIdentityClientConfig } from "@aws-sdk/client-cognito-identity";
import {
CognitoIdentityCredentialProvider as _CognitoIdentityCredentialProvider,
FromCognitoIdentityParameters as _FromCognitoIdentityParameters,
} from "@aws-sdk/credential-provider-cognito-identity";
export interface FromCognitoIdentityParameters
extends Pick<
_FromCognitoIdentityParameters,
Exclude<keyof _FromCognitoIdentityParameters, "client">
> {
clientConfig?: CognitoIdentityClientConfig;
}
export type CognitoIdentityCredentialProvider =
_CognitoIdentityCredentialProvider;
export declare const fromCognitoIdentity: (
options: FromCognitoIdentityParameters
) => CognitoIdentityCredentialProvider;

View File

@@ -0,0 +1,15 @@
import { CognitoIdentityClientConfig } from "@aws-sdk/client-cognito-identity";
import {
CognitoIdentityCredentialProvider,
FromCognitoIdentityPoolParameters as _FromCognitoIdentityPoolParameters,
} from "@aws-sdk/credential-provider-cognito-identity";
export interface FromCognitoIdentityPoolParameters
extends Pick<
_FromCognitoIdentityPoolParameters,
Exclude<keyof _FromCognitoIdentityPoolParameters, "client">
> {
clientConfig?: CognitoIdentityClientConfig;
}
export declare const fromCognitoIdentityPool: (
options: FromCognitoIdentityPoolParameters
) => CognitoIdentityCredentialProvider;

View File

@@ -0,0 +1,9 @@
import { CredentialProviderOptions } from "@aws-sdk/types";
import { RemoteProviderInit as _RemoteProviderInit } from "@smithy/credential-provider-imds";
import { AwsCredentialIdentityProvider } from "@smithy/types";
export interface RemoteProviderInit
extends _RemoteProviderInit,
CredentialProviderOptions {}
export declare const fromContainerMetadata: (
init?: RemoteProviderInit
) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,5 @@
import { FromEnvInit } from "@aws-sdk/credential-provider-env";
import { AwsCredentialIdentityProvider } from "@smithy/types";
export declare const fromEnv: (
init?: FromEnvInit
) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,5 @@
import { FromIniInit } from "@aws-sdk/credential-provider-ini";
import { RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
export declare const fromIni: (
init?: FromIniInit
) => RuntimeConfigAwsCredentialIdentityProvider;

View File

@@ -0,0 +1,6 @@
import { CredentialProviderOptions } from "@aws-sdk/types";
import { RemoteProviderConfig as _RemoteProviderInit } from "@smithy/credential-provider-imds";
import { AwsCredentialIdentityProvider } from "@smithy/types";
export declare const fromInstanceMetadata: (
init?: _RemoteProviderInit & CredentialProviderOptions
) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,5 @@
import { FromLoginCredentialsInit } from "@aws-sdk/credential-provider-login";
import { RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
export declare const fromLoginCredentials: (
init?: FromLoginCredentialsInit
) => RuntimeConfigAwsCredentialIdentityProvider;

View File

@@ -0,0 +1,5 @@
import { DefaultProviderInit } from "@aws-sdk/credential-provider-node";
import { AwsCredentialIdentityProvider } from "@smithy/types";
export declare const fromNodeProviderChain: (
init?: DefaultProviderInit
) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,5 @@
import { FromProcessInit } from "@aws-sdk/credential-provider-process";
import { AwsCredentialIdentityProvider } from "@smithy/types";
export declare const fromProcess: (
init?: FromProcessInit
) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,5 @@
import { fromSSO as _fromSSO } from "@aws-sdk/credential-provider-sso";
import { AwsCredentialIdentityProvider } from "@smithy/types";
export declare const fromSSO: (
init?: Parameters<typeof _fromSSO>[0]
) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,37 @@
import {
AssumeRoleCommandInput,
STSClientConfig,
} from "@aws-sdk/nested-clients/sts";
import {
CredentialProviderOptions,
RuntimeConfigAwsCredentialIdentityProvider,
} from "@aws-sdk/types";
import {
AwsCredentialIdentity,
AwsCredentialIdentityProvider,
Logger,
Pluggable,
} from "@smithy/types";
export interface FromTemporaryCredentialsOptions
extends CredentialProviderOptions {
params: Pick<
AssumeRoleCommandInput,
Exclude<keyof AssumeRoleCommandInput, "RoleSessionName">
> & {
RoleSessionName?: string;
};
masterCredentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider;
clientConfig?: STSClientConfig;
logger?: Logger;
clientPlugins?: Pluggable<any, any>[];
mfaCodeProvider?: (mfaSerial: string) => Promise<string>;
}
export declare const fromTemporaryCredentials: (
options: FromTemporaryCredentialsOptions,
credentialDefaultProvider?: () => AwsCredentialIdentityProvider,
regionProvider?: ({
profile,
}: {
profile?: string;
}) => Promise<string | undefined>
) => RuntimeConfigAwsCredentialIdentityProvider;

View File

@@ -0,0 +1,4 @@
export {
FromTemporaryCredentialsOptions,
fromTemporaryCredentials,
} from "./fromTemporaryCredentials.base";

View File

@@ -0,0 +1,6 @@
import { RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
import { FromTemporaryCredentialsOptions } from "./fromTemporaryCredentials.base";
export { FromTemporaryCredentialsOptions };
export declare const fromTemporaryCredentials: (
options: FromTemporaryCredentialsOptions
) => RuntimeConfigAwsCredentialIdentityProvider;

View File

@@ -0,0 +1,5 @@
import { FromTokenFileInit } from "@aws-sdk/credential-provider-web-identity";
import { AwsCredentialIdentityProvider } from "@smithy/types";
export declare const fromTokenFile: (
init?: FromTokenFileInit
) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,5 @@
import { FromWebTokenInit } from "@aws-sdk/credential-provider-web-identity";
import { AwsCredentialIdentityProvider } from "@smithy/types";
export declare const fromWebToken: (
init: FromWebTokenInit
) => AwsCredentialIdentityProvider;

View File

@@ -0,0 +1,9 @@
export * from "./fromCognitoIdentity";
export * from "./fromCognitoIdentityPool";
export { fromHttp } from "@aws-sdk/credential-provider-http";
export {
FromHttpOptions,
HttpProviderCredentials,
} from "@aws-sdk/credential-provider-http";
export * from "./fromTemporaryCredentials.browser";
export * from "./fromWebToken";

View File

@@ -0,0 +1,19 @@
export * from "./createCredentialChain";
export * from "./fromCognitoIdentity";
export * from "./fromCognitoIdentityPool";
export * from "./fromContainerMetadata";
export * from "./fromEnv";
export {
fromHttp,
FromHttpOptions,
HttpProviderCredentials,
} from "@aws-sdk/credential-provider-http";
export * from "./fromIni";
export * from "./fromInstanceMetadata";
export * from "./fromLoginCredentials";
export * from "./fromNodeProviderChain";
export * from "./fromProcess";
export * from "./fromSSO";
export * from "./fromTemporaryCredentials";
export * from "./fromTokenFile";
export * from "./fromWebToken";

View File

@@ -0,0 +1,2 @@
import { AssumeRoleCommand, STSClient } from "@aws-sdk/nested-clients/sts";
export { AssumeRoleCommand, STSClient };

View File

@@ -0,0 +1,83 @@
{
"name": "@aws-sdk/credential-providers",
"version": "3.1021.0",
"description": "A collection of credential providers, without requiring service clients like STS, Cognito",
"main": "./dist-cjs/index.js",
"module": "./dist-es/index.js",
"browser": "./dist-es/index.browser.js",
"react-native": "./dist-es/index.browser.js",
"scripts": {
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
"build:cjs": "node ../../scripts/compilation/inline credential-providers",
"build:es": "tsc -p tsconfig.es.json",
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
"build:types": "tsc -p tsconfig.types.json",
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
"clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
"extract:docs": "api-extractor run --local",
"test": "yarn g:vitest run",
"test:watch": "yarn g:vitest watch",
"test:integration": "yarn g:vitest run -c vitest.config.integ.mts",
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
},
"keywords": [
"aws",
"credentials"
],
"sideEffects": false,
"author": {
"name": "AWS SDK for JavaScript Team",
"url": "https://aws.amazon.com/javascript/"
},
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/client-cognito-identity": "3.1021.0",
"@aws-sdk/core": "^3.973.26",
"@aws-sdk/credential-provider-cognito-identity": "^3.972.21",
"@aws-sdk/credential-provider-env": "^3.972.24",
"@aws-sdk/credential-provider-http": "^3.972.26",
"@aws-sdk/credential-provider-ini": "^3.972.28",
"@aws-sdk/credential-provider-login": "^3.972.28",
"@aws-sdk/credential-provider-node": "^3.972.29",
"@aws-sdk/credential-provider-process": "^3.972.24",
"@aws-sdk/credential-provider-sso": "^3.972.28",
"@aws-sdk/credential-provider-web-identity": "^3.972.28",
"@aws-sdk/nested-clients": "^3.996.18",
"@aws-sdk/types": "^3.973.6",
"@smithy/config-resolver": "^4.4.13",
"@smithy/core": "^3.23.13",
"@smithy/credential-provider-imds": "^4.2.12",
"@smithy/node-config-provider": "^4.3.12",
"@smithy/property-provider": "^4.2.12",
"@smithy/types": "^4.13.1",
"tslib": "^2.6.2"
},
"devDependencies": {
"@tsconfig/recommended": "1.0.1",
"@types/node": "^20.14.8",
"concurrently": "7.0.0",
"downlevel-dts": "0.10.1",
"premove": "4.0.0",
"typescript": "~5.8.3"
},
"types": "./dist-types/index.d.ts",
"engines": {
"node": ">=20.0.0"
},
"typesVersions": {
"<4.5": {
"dist-types/*": [
"dist-types/ts3.4/*"
]
}
},
"files": [
"dist-*/**"
],
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/credential-providers",
"repository": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-js-v3.git",
"directory": "packages/credential-providers"
}
}