@cdk8s/awscdk-resolver 0.0.719 → 0.0.721
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/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +5 -5
- package/node_modules/@aws-sdk/core/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +4 -4
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +13 -37
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +44 -29
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +12 -37
- package/node_modules/@smithy/core/dist-es/submodules/protocols/AbstractRpcV2Protocol.js +35 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +8 -31
- package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/RpcProtocol.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/RpcProtocol.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +48 -6
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +9 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +20 -2
- package/node_modules/@smithy/node-http-handler/dist-es/resolve-default-socket-timeout.js +4 -0
- package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +16 -3
- package/node_modules/@smithy/node-http-handler/dist-types/resolve-default-socket-timeout.d.ts +4 -0
- package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +6 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/resolve-default-socket-timeout.d.ts +4 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +6 -1
- package/node_modules/@smithy/node-http-handler/package.json +3 -3
- package/node_modules/bowser/README.md +26 -3
- package/node_modules/bowser/bowser.mjs +2225 -0
- package/node_modules/bowser/bundled.js +14 -1
- package/node_modules/bowser/es5.js +14 -1
- package/node_modules/bowser/index.d.mts +45 -0
- package/node_modules/bowser/package.json +90 -31
- package/node_modules/bowser/src/bowser.js +9 -1
- package/node_modules/bowser/src/constants.js +7 -0
- package/node_modules/bowser/src/parser-browsers.js +73 -7
- package/node_modules/bowser/src/parser-engines.js +12 -0
- package/node_modules/bowser/src/parser-os.js +3 -1
- package/node_modules/bowser/src/parser-platforms.js +3 -1
- package/node_modules/bowser/src/parser.js +22 -5
- package/node_modules/bowser/src/utils.js +16 -0
- package/package.json +5 -5
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { timing } from "./timing";
|
|
2
2
|
const DEFER_EVENT_LISTENER_TIME = 3000;
|
|
3
|
-
export const setSocketTimeout = (request, reject, timeoutInMs = 0) => {
|
|
3
|
+
export const setSocketTimeout = (request, reject, timeoutInMs = 0, destroyResponseBodyOnTimeout = false) => {
|
|
4
|
+
let response;
|
|
5
|
+
if (destroyResponseBodyOnTimeout) {
|
|
6
|
+
request.once("response", (res) => (response = res));
|
|
7
|
+
}
|
|
4
8
|
const registerTimeout = (offset) => {
|
|
5
9
|
const timeout = timeoutInMs - offset;
|
|
6
10
|
const onTimeout = () => {
|
|
11
|
+
const error = Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (${destroyResponseBodyOnTimeout ? "service default socket timeout" : "configured by client requestHandler"}).`), { name: "TimeoutError" });
|
|
12
|
+
if (destroyResponseBodyOnTimeout) {
|
|
13
|
+
response?.destroy(error);
|
|
14
|
+
}
|
|
7
15
|
request.destroy();
|
|
8
|
-
reject(
|
|
16
|
+
reject(error);
|
|
9
17
|
};
|
|
10
18
|
if (request.socket) {
|
|
11
19
|
request.socket.setTimeout(timeout, onTimeout);
|
|
@@ -19,5 +27,10 @@ export const setSocketTimeout = (request, reject, timeoutInMs = 0) => {
|
|
|
19
27
|
registerTimeout(0);
|
|
20
28
|
return 0;
|
|
21
29
|
}
|
|
22
|
-
|
|
30
|
+
const deferralId = timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);
|
|
31
|
+
if (destroyResponseBodyOnTimeout) {
|
|
32
|
+
request.once("close", () => timing.clearTimeout(deferralId));
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
35
|
+
return deferralId;
|
|
23
36
|
};
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import type { ClientRequest } from "node:http";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* @param destroyResponseBodyOnTimeout - set by the service default. On timeout the response
|
|
5
|
+
* body is destroyed with the TimeoutError, and the timeout stays armed through the body.
|
|
6
|
+
*/
|
|
7
|
+
export declare const setSocketTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number, destroyResponseBodyOnTimeout?: boolean) => NodeJS.Timeout | number;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { ClientRequest } from "node:http";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* @param destroyResponseBodyOnTimeout - set by the service default. On timeout the response
|
|
5
|
+
* body is destroyed with the TimeoutError, and the timeout stays armed through the body.
|
|
6
|
+
*/
|
|
7
|
+
export declare const setSocketTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number, destroyResponseBodyOnTimeout?: boolean) => NodeJS.Timeout | number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/node-http-handler",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.13.0",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/node-http-handler",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"test:watch": "yarn g:vitest watch"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@smithy/core": "^3.
|
|
43
|
-
"@smithy/types": "^4.
|
|
42
|
+
"@smithy/core": "^3.37.0",
|
|
43
|
+
"@smithy/types": "^4.19.0",
|
|
44
44
|
"tslib": "^2.6.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -27,7 +27,9 @@ _For legacy code, check out the [1.x](https://github.com/bowser-js/bowser/tree/v
|
|
|
27
27
|
|
|
28
28
|
# Use cases
|
|
29
29
|
|
|
30
|
-
First of all, require the library.
|
|
30
|
+
First of all, require the library. Bowser is a dual package: `require` resolves
|
|
31
|
+
to a UMD build (which also works for AMD and as a plain `<script>` tag), and
|
|
32
|
+
`import` resolves to a real ES module.
|
|
31
33
|
|
|
32
34
|
```javascript
|
|
33
35
|
const Bowser = require("bowser"); // CommonJS
|
|
@@ -37,11 +39,32 @@ import * as Bowser from "bowser"; // TypeScript
|
|
|
37
39
|
import Bowser from "bowser"; // ES6 (and TypeScript with --esModuleInterop enabled)
|
|
38
40
|
```
|
|
39
41
|
|
|
42
|
+
The ES module build also exposes `parse`, `getParser`, `BROWSER_MAP`,
|
|
43
|
+
`ENGINE_MAP`, `OS_MAP` and `PLATFORMS_MAP` as named exports. Detection needs
|
|
44
|
+
every parser either way, so named imports are a matter of style, not bundle
|
|
45
|
+
size — but an import that ends up unused is dropped entirely:
|
|
46
|
+
|
|
47
|
+
```javascript
|
|
48
|
+
import { getParser, parse } from "bowser";
|
|
49
|
+
|
|
50
|
+
const browser = getParser(window.navigator.userAgent);
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Loaded from a CDN or a `<script>` tag, Bowser attaches itself to the global as
|
|
54
|
+
`bowser` (lowercase):
|
|
55
|
+
|
|
56
|
+
```html
|
|
57
|
+
<script src="https://unpkg.com/bowser@2/es5.js"></script>
|
|
58
|
+
<script>
|
|
59
|
+
console.log(bowser.parse(window.navigator.userAgent));
|
|
60
|
+
</script>
|
|
61
|
+
```
|
|
62
|
+
|
|
40
63
|
By default, the exported version is the *ES5 transpiled version*, which **do not** include any polyfills.
|
|
41
64
|
|
|
42
|
-
In case you don't use your own
|
|
65
|
+
In case you don't use your own polyfills you may need to have pre-built bundle with all needed polyfills.
|
|
43
66
|
So, for you it's suitable to require bowser like this: `require('bowser/bundled')`.
|
|
44
|
-
As the result, you get a ES5 version of bowser with `
|
|
67
|
+
As the result, you get a ES5 version of bowser with `core-js` polyfills bundled together.
|
|
45
68
|
|
|
46
69
|
You may need to use the source files, so they will be available in the package as well.
|
|
47
70
|
|