@aws-sdk/ec2-metadata-service 3.569.0 → 3.574.0
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-cjs/index.js +11 -4
- package/dist-es/MetadataService.js +10 -4
- package/package.json +2 -2
package/dist-cjs/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -73,8 +74,11 @@ var _MetadataService = class _MetadataService {
|
|
|
73
74
|
this.disableFetchToken = (options == null ? void 0 : options.disableFetchToken) || false;
|
|
74
75
|
}
|
|
75
76
|
async request(path, options) {
|
|
76
|
-
const { endpoint, ec2MetadataV1Disabled } = await this.config;
|
|
77
|
-
const handler = new import_node_http_handler.NodeHttpHandler(
|
|
77
|
+
const { endpoint, ec2MetadataV1Disabled, httpOptions } = await this.config;
|
|
78
|
+
const handler = new import_node_http_handler.NodeHttpHandler({
|
|
79
|
+
requestTimeout: httpOptions == null ? void 0 : httpOptions.timeout,
|
|
80
|
+
connectionTimeout: httpOptions == null ? void 0 : httpOptions.timeout
|
|
81
|
+
});
|
|
78
82
|
const endpointUrl = new URL(endpoint);
|
|
79
83
|
const headers = options.headers || {};
|
|
80
84
|
if (this.disableFetchToken && ec2MetadataV1Disabled) {
|
|
@@ -109,8 +113,11 @@ var _MetadataService = class _MetadataService {
|
|
|
109
113
|
}
|
|
110
114
|
}
|
|
111
115
|
async fetchMetadataToken() {
|
|
112
|
-
const { endpoint } = await this.config;
|
|
113
|
-
const handler = new import_node_http_handler.NodeHttpHandler(
|
|
116
|
+
const { endpoint, httpOptions } = await this.config;
|
|
117
|
+
const handler = new import_node_http_handler.NodeHttpHandler({
|
|
118
|
+
requestTimeout: httpOptions == null ? void 0 : httpOptions.timeout,
|
|
119
|
+
connectionTimeout: httpOptions == null ? void 0 : httpOptions.timeout
|
|
120
|
+
});
|
|
114
121
|
const endpointUrl = new URL(endpoint);
|
|
115
122
|
const tokenRequest = new import_protocol_http.HttpRequest({
|
|
116
123
|
method: "PUT",
|
|
@@ -18,8 +18,11 @@ export class MetadataService {
|
|
|
18
18
|
this.disableFetchToken = options?.disableFetchToken || false;
|
|
19
19
|
}
|
|
20
20
|
async request(path, options) {
|
|
21
|
-
const { endpoint, ec2MetadataV1Disabled } = await this.config;
|
|
22
|
-
const handler = new NodeHttpHandler(
|
|
21
|
+
const { endpoint, ec2MetadataV1Disabled, httpOptions } = await this.config;
|
|
22
|
+
const handler = new NodeHttpHandler({
|
|
23
|
+
requestTimeout: httpOptions?.timeout,
|
|
24
|
+
connectionTimeout: httpOptions?.timeout,
|
|
25
|
+
});
|
|
23
26
|
const endpointUrl = new URL(endpoint);
|
|
24
27
|
const headers = options.headers || {};
|
|
25
28
|
if (this.disableFetchToken && ec2MetadataV1Disabled) {
|
|
@@ -56,8 +59,11 @@ export class MetadataService {
|
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
61
|
async fetchMetadataToken() {
|
|
59
|
-
const { endpoint } = await this.config;
|
|
60
|
-
const handler = new NodeHttpHandler(
|
|
62
|
+
const { endpoint, httpOptions } = await this.config;
|
|
63
|
+
const handler = new NodeHttpHandler({
|
|
64
|
+
requestTimeout: httpOptions?.timeout,
|
|
65
|
+
connectionTimeout: httpOptions?.timeout,
|
|
66
|
+
});
|
|
61
67
|
const endpointUrl = new URL(endpoint);
|
|
62
68
|
const tokenRequest = new HttpRequest({
|
|
63
69
|
method: "PUT",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/ec2-metadata-service",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.574.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline ec2-metadata-service",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"tslib": "^2.6.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@aws-sdk/credential-providers": "3.
|
|
33
|
+
"@aws-sdk/credential-providers": "3.574.0",
|
|
34
34
|
"@tsconfig/recommended": "1.0.1",
|
|
35
35
|
"@types/node": "^16.18.96",
|
|
36
36
|
"concurrently": "7.0.0",
|