Lines 4-44javascript
6} from "./chunk-7W3WYDYY.js";
7import "./chunk-FG7DZRU2.js";
9// ../../node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js
10var isImdsCredentials = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string";
11var fromImdsCredentials = (creds) => ({
12 accessKeyId: creds.AccessKeyId,
13 secretAccessKey: creds.SecretAccessKey,
14 sessionToken: creds.Token,
15 expiration: new Date(creds.Expiration),
16 ...creds.AccountId && { accountId: creds.AccountId }
19// ../../node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/RemoteProviderInit.js
20var DEFAULT_TIMEOUT = 1e3;
21var DEFAULT_MAX_RETRIES = 0;
22var providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT }) => ({ maxRetries, timeout });
24// ../../node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/node-http.js
25import node_http from "http";
26
HighCloud Metadata Access
Source reaches cloud instance metadata or link-local credential endpoints.
dist/dist-es-QUWKNR3E.jsView on unpkg · L24 27// ../../node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js
28function httpRequest(options) {
29 return new Promise((resolve, reject) => {
30 const req = node_http.request({
33 hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1")
35 req.on("error", (err) => {
36 reject(Object.assign(new ProviderError("Unable to connect to instance metadata service"), err));
39 req.on("timeout", () => {
40 reject(new ProviderError("TimeoutError from instance metadata service"));
43 req.on("response", (res) => {
44 const { statusCode = 400 } = res;