@cdk8s/awscdk-resolver 0.0.194 → 0.0.195
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/.jsii +3 -3
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/README.md +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +36 -36
- package/node_modules/@aws-sdk/client-sso/README.md +1 -1
- package/node_modules/@aws-sdk/client-sso/package.json +32 -32
- package/node_modules/@aws-sdk/client-sso-oidc/README.md +1 -1
- package/node_modules/@aws-sdk/client-sso-oidc/package.json +34 -34
- package/node_modules/@aws-sdk/client-sts/README.md +1 -1
- package/node_modules/@aws-sdk/client-sts/package.json +34 -34
- package/node_modules/@aws-sdk/core/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-env/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-http/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-process/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +7 -7
- package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/util-endpoints/package.json +4 -4
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +5 -5
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +2 -27
- package/node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js +2 -25
- package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
- package/package.json +4 -4
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/LICENSE +0 -201
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/README.md +0 -11
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-cjs/fetch-http-handler.js +0 -1
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +0 -230
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-cjs/request-timeout.js +0 -1
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-cjs/stream-collector.js +0 -1
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +0 -138
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-es/index.js +0 -2
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js +0 -11
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js +0 -27
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/fetch-http-handler.d.ts +0 -33
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/index.d.ts +0 -2
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/request-timeout.d.ts +0 -1
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/stream-collector.d.ts +0 -2
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/fetch-http-handler.d.ts +0 -33
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/index.d.ts +0 -2
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/request-timeout.d.ts +0 -1
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/stream-collector.d.ts +0 -2
- package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/package.json +0 -62
package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js
DELETED
@@ -1,230 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
6
|
-
var __export = (target, all) => {
|
7
|
-
for (var name in all)
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
-
};
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
-
for (let key of __getOwnPropNames(from))
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
-
}
|
16
|
-
return to;
|
17
|
-
};
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
|
20
|
-
// src/index.ts
|
21
|
-
var src_exports = {};
|
22
|
-
__export(src_exports, {
|
23
|
-
FetchHttpHandler: () => FetchHttpHandler,
|
24
|
-
keepAliveSupport: () => keepAliveSupport,
|
25
|
-
streamCollector: () => streamCollector
|
26
|
-
});
|
27
|
-
module.exports = __toCommonJS(src_exports);
|
28
|
-
|
29
|
-
// src/fetch-http-handler.ts
|
30
|
-
var import_protocol_http = require("@smithy/protocol-http");
|
31
|
-
var import_querystring_builder = require("@smithy/querystring-builder");
|
32
|
-
|
33
|
-
// src/request-timeout.ts
|
34
|
-
function requestTimeout(timeoutInMs = 0) {
|
35
|
-
return new Promise((resolve, reject) => {
|
36
|
-
if (timeoutInMs) {
|
37
|
-
setTimeout(() => {
|
38
|
-
const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);
|
39
|
-
timeoutError.name = "TimeoutError";
|
40
|
-
reject(timeoutError);
|
41
|
-
}, timeoutInMs);
|
42
|
-
}
|
43
|
-
});
|
44
|
-
}
|
45
|
-
__name(requestTimeout, "requestTimeout");
|
46
|
-
|
47
|
-
// src/fetch-http-handler.ts
|
48
|
-
var keepAliveSupport = {
|
49
|
-
supported: void 0
|
50
|
-
};
|
51
|
-
var _FetchHttpHandler = class _FetchHttpHandler {
|
52
|
-
/**
|
53
|
-
* @returns the input if it is an HttpHandler of any class,
|
54
|
-
* or instantiates a new instance of this handler.
|
55
|
-
*/
|
56
|
-
static create(instanceOrOptions) {
|
57
|
-
if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") {
|
58
|
-
return instanceOrOptions;
|
59
|
-
}
|
60
|
-
return new _FetchHttpHandler(instanceOrOptions);
|
61
|
-
}
|
62
|
-
constructor(options) {
|
63
|
-
if (typeof options === "function") {
|
64
|
-
this.configProvider = options().then((opts) => opts || {});
|
65
|
-
} else {
|
66
|
-
this.config = options ?? {};
|
67
|
-
this.configProvider = Promise.resolve(this.config);
|
68
|
-
}
|
69
|
-
if (keepAliveSupport.supported === void 0) {
|
70
|
-
keepAliveSupport.supported = Boolean(
|
71
|
-
typeof Request !== "undefined" && "keepalive" in new Request("https://[::1]")
|
72
|
-
);
|
73
|
-
}
|
74
|
-
}
|
75
|
-
destroy() {
|
76
|
-
}
|
77
|
-
async handle(request, { abortSignal } = {}) {
|
78
|
-
var _a;
|
79
|
-
if (!this.config) {
|
80
|
-
this.config = await this.configProvider;
|
81
|
-
}
|
82
|
-
const requestTimeoutInMs = this.config.requestTimeout;
|
83
|
-
const keepAlive = this.config.keepAlive === true;
|
84
|
-
const credentials = this.config.credentials;
|
85
|
-
if (abortSignal == null ? void 0 : abortSignal.aborted) {
|
86
|
-
const abortError = new Error("Request aborted");
|
87
|
-
abortError.name = "AbortError";
|
88
|
-
return Promise.reject(abortError);
|
89
|
-
}
|
90
|
-
let path = request.path;
|
91
|
-
const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {});
|
92
|
-
if (queryString) {
|
93
|
-
path += `?${queryString}`;
|
94
|
-
}
|
95
|
-
if (request.fragment) {
|
96
|
-
path += `#${request.fragment}`;
|
97
|
-
}
|
98
|
-
let auth = "";
|
99
|
-
if (request.username != null || request.password != null) {
|
100
|
-
const username = request.username ?? "";
|
101
|
-
const password = request.password ?? "";
|
102
|
-
auth = `${username}:${password}@`;
|
103
|
-
}
|
104
|
-
const { port, method } = request;
|
105
|
-
const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`;
|
106
|
-
const body = method === "GET" || method === "HEAD" ? void 0 : request.body;
|
107
|
-
const requestOptions = {
|
108
|
-
body,
|
109
|
-
headers: new Headers(request.headers),
|
110
|
-
method,
|
111
|
-
credentials
|
112
|
-
};
|
113
|
-
if ((_a = this.config) == null ? void 0 : _a.cache) {
|
114
|
-
requestOptions.cache = this.config.cache;
|
115
|
-
}
|
116
|
-
if (body) {
|
117
|
-
requestOptions.duplex = "half";
|
118
|
-
}
|
119
|
-
if (typeof AbortController !== "undefined") {
|
120
|
-
requestOptions.signal = abortSignal;
|
121
|
-
}
|
122
|
-
if (keepAliveSupport.supported) {
|
123
|
-
requestOptions.keepalive = keepAlive;
|
124
|
-
}
|
125
|
-
if (typeof this.config.requestInit === "function") {
|
126
|
-
Object.assign(requestOptions, this.config.requestInit(request));
|
127
|
-
}
|
128
|
-
let removeSignalEventListener = /* @__PURE__ */ __name(() => {
|
129
|
-
}, "removeSignalEventListener");
|
130
|
-
const fetchRequest = new Request(url, requestOptions);
|
131
|
-
const raceOfPromises = [
|
132
|
-
fetch(fetchRequest).then((response) => {
|
133
|
-
const fetchHeaders = response.headers;
|
134
|
-
const transformedHeaders = {};
|
135
|
-
for (const pair of fetchHeaders.entries()) {
|
136
|
-
transformedHeaders[pair[0]] = pair[1];
|
137
|
-
}
|
138
|
-
const hasReadableStream = response.body != void 0;
|
139
|
-
if (!hasReadableStream) {
|
140
|
-
return response.blob().then((body2) => ({
|
141
|
-
response: new import_protocol_http.HttpResponse({
|
142
|
-
headers: transformedHeaders,
|
143
|
-
reason: response.statusText,
|
144
|
-
statusCode: response.status,
|
145
|
-
body: body2
|
146
|
-
})
|
147
|
-
}));
|
148
|
-
}
|
149
|
-
return {
|
150
|
-
response: new import_protocol_http.HttpResponse({
|
151
|
-
headers: transformedHeaders,
|
152
|
-
reason: response.statusText,
|
153
|
-
statusCode: response.status,
|
154
|
-
body: response.body
|
155
|
-
})
|
156
|
-
};
|
157
|
-
}),
|
158
|
-
requestTimeout(requestTimeoutInMs)
|
159
|
-
];
|
160
|
-
if (abortSignal) {
|
161
|
-
raceOfPromises.push(
|
162
|
-
new Promise((resolve, reject) => {
|
163
|
-
const onAbort = /* @__PURE__ */ __name(() => {
|
164
|
-
const abortError = new Error("Request aborted");
|
165
|
-
abortError.name = "AbortError";
|
166
|
-
reject(abortError);
|
167
|
-
}, "onAbort");
|
168
|
-
if (typeof abortSignal.addEventListener === "function") {
|
169
|
-
const signal = abortSignal;
|
170
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
171
|
-
removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "removeSignalEventListener");
|
172
|
-
} else {
|
173
|
-
abortSignal.onabort = onAbort;
|
174
|
-
}
|
175
|
-
})
|
176
|
-
);
|
177
|
-
}
|
178
|
-
return Promise.race(raceOfPromises).finally(removeSignalEventListener);
|
179
|
-
}
|
180
|
-
updateHttpClientConfig(key, value) {
|
181
|
-
this.config = void 0;
|
182
|
-
this.configProvider = this.configProvider.then((config) => {
|
183
|
-
config[key] = value;
|
184
|
-
return config;
|
185
|
-
});
|
186
|
-
}
|
187
|
-
httpHandlerConfigs() {
|
188
|
-
return this.config ?? {};
|
189
|
-
}
|
190
|
-
};
|
191
|
-
__name(_FetchHttpHandler, "FetchHttpHandler");
|
192
|
-
var FetchHttpHandler = _FetchHttpHandler;
|
193
|
-
|
194
|
-
// src/stream-collector.ts
|
195
|
-
var streamCollector = /* @__PURE__ */ __name(async (stream) => {
|
196
|
-
if (typeof Blob === "function" && stream instanceof Blob) {
|
197
|
-
return new Uint8Array(await stream.arrayBuffer());
|
198
|
-
}
|
199
|
-
return collectStream(stream);
|
200
|
-
}, "streamCollector");
|
201
|
-
async function collectStream(stream) {
|
202
|
-
const chunks = [];
|
203
|
-
const reader = stream.getReader();
|
204
|
-
let isDone = false;
|
205
|
-
let length = 0;
|
206
|
-
while (!isDone) {
|
207
|
-
const { done, value } = await reader.read();
|
208
|
-
if (value) {
|
209
|
-
chunks.push(value);
|
210
|
-
length += value.length;
|
211
|
-
}
|
212
|
-
isDone = done;
|
213
|
-
}
|
214
|
-
const collected = new Uint8Array(length);
|
215
|
-
let offset = 0;
|
216
|
-
for (const chunk of chunks) {
|
217
|
-
collected.set(chunk, offset);
|
218
|
-
offset += chunk.length;
|
219
|
-
}
|
220
|
-
return collected;
|
221
|
-
}
|
222
|
-
__name(collectStream, "collectStream");
|
223
|
-
// Annotate the CommonJS export names for ESM import in node:
|
224
|
-
|
225
|
-
0 && (module.exports = {
|
226
|
-
keepAliveSupport,
|
227
|
-
FetchHttpHandler,
|
228
|
-
streamCollector
|
229
|
-
});
|
230
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
module.exports = require("./index.js");
|
@@ -1 +0,0 @@
|
|
1
|
-
module.exports = require("./index.js");
|
@@ -1,138 +0,0 @@
|
|
1
|
-
import { HttpResponse } from "@smithy/protocol-http";
|
2
|
-
import { buildQueryString } from "@smithy/querystring-builder";
|
3
|
-
import { requestTimeout } from "./request-timeout";
|
4
|
-
export const keepAliveSupport = {
|
5
|
-
supported: undefined,
|
6
|
-
};
|
7
|
-
export class FetchHttpHandler {
|
8
|
-
static create(instanceOrOptions) {
|
9
|
-
if (typeof instanceOrOptions?.handle === "function") {
|
10
|
-
return instanceOrOptions;
|
11
|
-
}
|
12
|
-
return new FetchHttpHandler(instanceOrOptions);
|
13
|
-
}
|
14
|
-
constructor(options) {
|
15
|
-
if (typeof options === "function") {
|
16
|
-
this.configProvider = options().then((opts) => opts || {});
|
17
|
-
}
|
18
|
-
else {
|
19
|
-
this.config = options ?? {};
|
20
|
-
this.configProvider = Promise.resolve(this.config);
|
21
|
-
}
|
22
|
-
if (keepAliveSupport.supported === undefined) {
|
23
|
-
keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in new Request("https://[::1]"));
|
24
|
-
}
|
25
|
-
}
|
26
|
-
destroy() {
|
27
|
-
}
|
28
|
-
async handle(request, { abortSignal } = {}) {
|
29
|
-
if (!this.config) {
|
30
|
-
this.config = await this.configProvider;
|
31
|
-
}
|
32
|
-
const requestTimeoutInMs = this.config.requestTimeout;
|
33
|
-
const keepAlive = this.config.keepAlive === true;
|
34
|
-
const credentials = this.config.credentials;
|
35
|
-
if (abortSignal?.aborted) {
|
36
|
-
const abortError = new Error("Request aborted");
|
37
|
-
abortError.name = "AbortError";
|
38
|
-
return Promise.reject(abortError);
|
39
|
-
}
|
40
|
-
let path = request.path;
|
41
|
-
const queryString = buildQueryString(request.query || {});
|
42
|
-
if (queryString) {
|
43
|
-
path += `?${queryString}`;
|
44
|
-
}
|
45
|
-
if (request.fragment) {
|
46
|
-
path += `#${request.fragment}`;
|
47
|
-
}
|
48
|
-
let auth = "";
|
49
|
-
if (request.username != null || request.password != null) {
|
50
|
-
const username = request.username ?? "";
|
51
|
-
const password = request.password ?? "";
|
52
|
-
auth = `${username}:${password}@`;
|
53
|
-
}
|
54
|
-
const { port, method } = request;
|
55
|
-
const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`;
|
56
|
-
const body = method === "GET" || method === "HEAD" ? undefined : request.body;
|
57
|
-
const requestOptions = {
|
58
|
-
body,
|
59
|
-
headers: new Headers(request.headers),
|
60
|
-
method: method,
|
61
|
-
credentials,
|
62
|
-
};
|
63
|
-
if (this.config?.cache) {
|
64
|
-
requestOptions.cache = this.config.cache;
|
65
|
-
}
|
66
|
-
if (body) {
|
67
|
-
requestOptions.duplex = "half";
|
68
|
-
}
|
69
|
-
if (typeof AbortController !== "undefined") {
|
70
|
-
requestOptions.signal = abortSignal;
|
71
|
-
}
|
72
|
-
if (keepAliveSupport.supported) {
|
73
|
-
requestOptions.keepalive = keepAlive;
|
74
|
-
}
|
75
|
-
if (typeof this.config.requestInit === "function") {
|
76
|
-
Object.assign(requestOptions, this.config.requestInit(request));
|
77
|
-
}
|
78
|
-
let removeSignalEventListener = () => { };
|
79
|
-
const fetchRequest = new Request(url, requestOptions);
|
80
|
-
const raceOfPromises = [
|
81
|
-
fetch(fetchRequest).then((response) => {
|
82
|
-
const fetchHeaders = response.headers;
|
83
|
-
const transformedHeaders = {};
|
84
|
-
for (const pair of fetchHeaders.entries()) {
|
85
|
-
transformedHeaders[pair[0]] = pair[1];
|
86
|
-
}
|
87
|
-
const hasReadableStream = response.body != undefined;
|
88
|
-
if (!hasReadableStream) {
|
89
|
-
return response.blob().then((body) => ({
|
90
|
-
response: new HttpResponse({
|
91
|
-
headers: transformedHeaders,
|
92
|
-
reason: response.statusText,
|
93
|
-
statusCode: response.status,
|
94
|
-
body,
|
95
|
-
}),
|
96
|
-
}));
|
97
|
-
}
|
98
|
-
return {
|
99
|
-
response: new HttpResponse({
|
100
|
-
headers: transformedHeaders,
|
101
|
-
reason: response.statusText,
|
102
|
-
statusCode: response.status,
|
103
|
-
body: response.body,
|
104
|
-
}),
|
105
|
-
};
|
106
|
-
}),
|
107
|
-
requestTimeout(requestTimeoutInMs),
|
108
|
-
];
|
109
|
-
if (abortSignal) {
|
110
|
-
raceOfPromises.push(new Promise((resolve, reject) => {
|
111
|
-
const onAbort = () => {
|
112
|
-
const abortError = new Error("Request aborted");
|
113
|
-
abortError.name = "AbortError";
|
114
|
-
reject(abortError);
|
115
|
-
};
|
116
|
-
if (typeof abortSignal.addEventListener === "function") {
|
117
|
-
const signal = abortSignal;
|
118
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
119
|
-
removeSignalEventListener = () => signal.removeEventListener("abort", onAbort);
|
120
|
-
}
|
121
|
-
else {
|
122
|
-
abortSignal.onabort = onAbort;
|
123
|
-
}
|
124
|
-
}));
|
125
|
-
}
|
126
|
-
return Promise.race(raceOfPromises).finally(removeSignalEventListener);
|
127
|
-
}
|
128
|
-
updateHttpClientConfig(key, value) {
|
129
|
-
this.config = undefined;
|
130
|
-
this.configProvider = this.configProvider.then((config) => {
|
131
|
-
config[key] = value;
|
132
|
-
return config;
|
133
|
-
});
|
134
|
-
}
|
135
|
-
httpHandlerConfigs() {
|
136
|
-
return this.config ?? {};
|
137
|
-
}
|
138
|
-
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
export function requestTimeout(timeoutInMs = 0) {
|
2
|
-
return new Promise((resolve, reject) => {
|
3
|
-
if (timeoutInMs) {
|
4
|
-
setTimeout(() => {
|
5
|
-
const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);
|
6
|
-
timeoutError.name = "TimeoutError";
|
7
|
-
reject(timeoutError);
|
8
|
-
}, timeoutInMs);
|
9
|
-
}
|
10
|
-
});
|
11
|
-
}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
export const streamCollector = async (stream) => {
|
2
|
-
if (typeof Blob === "function" && stream instanceof Blob) {
|
3
|
-
return new Uint8Array(await stream.arrayBuffer());
|
4
|
-
}
|
5
|
-
return collectStream(stream);
|
6
|
-
};
|
7
|
-
async function collectStream(stream) {
|
8
|
-
const chunks = [];
|
9
|
-
const reader = stream.getReader();
|
10
|
-
let isDone = false;
|
11
|
-
let length = 0;
|
12
|
-
while (!isDone) {
|
13
|
-
const { done, value } = await reader.read();
|
14
|
-
if (value) {
|
15
|
-
chunks.push(value);
|
16
|
-
length += value.length;
|
17
|
-
}
|
18
|
-
isDone = done;
|
19
|
-
}
|
20
|
-
const collected = new Uint8Array(length);
|
21
|
-
let offset = 0;
|
22
|
-
for (const chunk of chunks) {
|
23
|
-
collected.set(chunk, offset);
|
24
|
-
offset += chunk.length;
|
25
|
-
}
|
26
|
-
return collected;
|
27
|
-
}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http";
|
2
|
-
import type { FetchHttpHandlerOptions } from "@smithy/types";
|
3
|
-
import { HttpHandlerOptions, Provider } from "@smithy/types";
|
4
|
-
export { FetchHttpHandlerOptions };
|
5
|
-
type FetchHttpHandlerConfig = FetchHttpHandlerOptions;
|
6
|
-
/**
|
7
|
-
* @internal
|
8
|
-
* Detection of keepalive support. Can be overridden for testing.
|
9
|
-
*/
|
10
|
-
export declare const keepAliveSupport: {
|
11
|
-
supported: boolean | undefined;
|
12
|
-
};
|
13
|
-
/**
|
14
|
-
* @public
|
15
|
-
*
|
16
|
-
* HttpHandler implementation using browsers' `fetch` global function.
|
17
|
-
*/
|
18
|
-
export declare class FetchHttpHandler implements HttpHandler<FetchHttpHandlerConfig> {
|
19
|
-
private config?;
|
20
|
-
private configProvider;
|
21
|
-
/**
|
22
|
-
* @returns the input if it is an HttpHandler of any class,
|
23
|
-
* or instantiates a new instance of this handler.
|
24
|
-
*/
|
25
|
-
static create(instanceOrOptions?: HttpHandler<any> | FetchHttpHandlerOptions | Provider<FetchHttpHandlerOptions | void>): FetchHttpHandler | HttpHandler<any>;
|
26
|
-
constructor(options?: FetchHttpHandlerOptions | Provider<FetchHttpHandlerOptions | void>);
|
27
|
-
destroy(): void;
|
28
|
-
handle(request: HttpRequest, { abortSignal }?: HttpHandlerOptions): Promise<{
|
29
|
-
response: HttpResponse;
|
30
|
-
}>;
|
31
|
-
updateHttpClientConfig(key: keyof FetchHttpHandlerConfig, value: FetchHttpHandlerConfig[typeof key]): void;
|
32
|
-
httpHandlerConfigs(): FetchHttpHandlerConfig;
|
33
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function requestTimeout(timeoutInMs?: number): Promise<never>;
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http";
|
2
|
-
import { FetchHttpHandlerOptions } from "@smithy/types";
|
3
|
-
import { HttpHandlerOptions, Provider } from "@smithy/types";
|
4
|
-
export { FetchHttpHandlerOptions };
|
5
|
-
type FetchHttpHandlerConfig = FetchHttpHandlerOptions;
|
6
|
-
/**
|
7
|
-
* @internal
|
8
|
-
* Detection of keepalive support. Can be overridden for testing.
|
9
|
-
*/
|
10
|
-
export declare const keepAliveSupport: {
|
11
|
-
supported: boolean | undefined;
|
12
|
-
};
|
13
|
-
/**
|
14
|
-
* @public
|
15
|
-
*
|
16
|
-
* HttpHandler implementation using browsers' `fetch` global function.
|
17
|
-
*/
|
18
|
-
export declare class FetchHttpHandler implements HttpHandler<FetchHttpHandlerConfig> {
|
19
|
-
private config?;
|
20
|
-
private configProvider;
|
21
|
-
/**
|
22
|
-
* @returns the input if it is an HttpHandler of any class,
|
23
|
-
* or instantiates a new instance of this handler.
|
24
|
-
*/
|
25
|
-
static create(instanceOrOptions?: HttpHandler<any> | FetchHttpHandlerOptions | Provider<FetchHttpHandlerOptions | void>): FetchHttpHandler | HttpHandler<any>;
|
26
|
-
constructor(options?: FetchHttpHandlerOptions | Provider<FetchHttpHandlerOptions | void>);
|
27
|
-
destroy(): void;
|
28
|
-
handle(request: HttpRequest, { abortSignal }?: HttpHandlerOptions): Promise<{
|
29
|
-
response: HttpResponse;
|
30
|
-
}>;
|
31
|
-
updateHttpClientConfig(key: keyof FetchHttpHandlerConfig, value: FetchHttpHandlerConfig[typeof key]): void;
|
32
|
-
httpHandlerConfigs(): FetchHttpHandlerConfig;
|
33
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function requestTimeout(timeoutInMs?: number): Promise<never>;
|
package/node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler/package.json
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "@smithy/fetch-http-handler",
|
3
|
-
"version": "4.0.0",
|
4
|
-
"description": "Provides a way to make requests",
|
5
|
-
"scripts": {
|
6
|
-
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
7
|
-
"build:cjs": "node ../../scripts/inline fetch-http-handler",
|
8
|
-
"build:es": "yarn g:tsc -p tsconfig.es.json",
|
9
|
-
"build:types": "yarn g:tsc -p tsconfig.types.json",
|
10
|
-
"build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
|
11
|
-
"stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
|
12
|
-
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
|
13
|
-
"lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
|
14
|
-
"format": "prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"",
|
15
|
-
"extract:docs": "api-extractor run --local",
|
16
|
-
"test": "yarn g:jest --coverage --forceExit && yarn g:karma start karma.conf.js"
|
17
|
-
},
|
18
|
-
"author": {
|
19
|
-
"name": "AWS SDK for JavaScript Team",
|
20
|
-
"url": "https://aws.amazon.com/javascript/"
|
21
|
-
},
|
22
|
-
"license": "Apache-2.0",
|
23
|
-
"main": "./dist-cjs/index.js",
|
24
|
-
"module": "./dist-es/index.js",
|
25
|
-
"types": "./dist-types/index.d.ts",
|
26
|
-
"dependencies": {
|
27
|
-
"@smithy/protocol-http": "^4.1.5",
|
28
|
-
"@smithy/querystring-builder": "^3.0.8",
|
29
|
-
"@smithy/types": "^3.6.0",
|
30
|
-
"@smithy/util-base64": "^3.0.0",
|
31
|
-
"tslib": "^2.6.2"
|
32
|
-
},
|
33
|
-
"devDependencies": {
|
34
|
-
"@smithy/abort-controller": "^3.1.6",
|
35
|
-
"concurrently": "7.0.0",
|
36
|
-
"downlevel-dts": "0.10.1",
|
37
|
-
"rimraf": "3.0.2",
|
38
|
-
"typedoc": "0.23.23"
|
39
|
-
},
|
40
|
-
"typesVersions": {
|
41
|
-
"<4.0": {
|
42
|
-
"dist-types/*": [
|
43
|
-
"dist-types/ts3.4/*"
|
44
|
-
]
|
45
|
-
}
|
46
|
-
},
|
47
|
-
"files": [
|
48
|
-
"dist-*/**"
|
49
|
-
],
|
50
|
-
"homepage": "https://github.com/awslabs/smithy-typescript/tree/main/packages/fetch-http-handler",
|
51
|
-
"repository": {
|
52
|
-
"type": "git",
|
53
|
-
"url": "https://github.com/awslabs/smithy-typescript.git",
|
54
|
-
"directory": "packages/fetch-http-handler"
|
55
|
-
},
|
56
|
-
"typedoc": {
|
57
|
-
"entryPoint": "src/index.ts"
|
58
|
-
},
|
59
|
-
"publishConfig": {
|
60
|
-
"directory": ".release/package"
|
61
|
-
}
|
62
|
-
}
|