@songtonyli/dsh-cli 0.1.87 → 0.1.88
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/README.md +1 -1
- package/bin/dsh.mjs +1 -1
- 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/eventstream-handler-node/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-websocket/package.json +3 -3
- 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/@deepseek-ai/dsh-client-modules/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +13 -7
- 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/package.json +84 -27
- 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 +16 -16
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ workspace and no build step. Native packages that ship one build per platform
|
|
|
26
26
|
ripgrep, the PTY backend's addons, sharp, koffi, and the Landlock launcher — are
|
|
27
27
|
ordinary optional dependencies, so npm resolves the right one for your machine.
|
|
28
28
|
|
|
29
|
-
Requires Node `^22.19.0 || >=24.0.0`. Version 0.1.
|
|
29
|
+
Requires Node `^22.19.0 || >=24.0.0`. Version 0.1.88; `dsh --version`
|
|
30
30
|
also reports the harness build the package was assembled from.
|
|
31
31
|
|
|
32
32
|
## License
|
package/bin/dsh.mjs
CHANGED
|
@@ -18,7 +18,7 @@ const argv = process.argv.slice(2)
|
|
|
18
18
|
// version this package publishes. Reporting only one of the two would make an
|
|
19
19
|
// ordinary `npm install @songtonyli/dsh-cli@x` look like it installed something else.
|
|
20
20
|
if (argv.length === 1 && (argv[0] === '--version' || argv[0] === '-V')) {
|
|
21
|
-
console.log('@songtonyli/dsh-cli 0.1.
|
|
21
|
+
console.log('@songtonyli/dsh-cli 0.1.88 (deepseek-harness 0.2.1-rc.3)')
|
|
22
22
|
process.exit(0)
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/core",
|
|
3
|
-
"version": "3.978.
|
|
3
|
+
"version": "3.978.6",
|
|
4
4
|
"description": "Core functions & classes shared by multiple AWS SDK clients.",
|
|
5
5
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/core",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"@aws-sdk/types": "^3.975.0",
|
|
110
110
|
"@aws-sdk/xml-builder": "^3.972.41",
|
|
111
111
|
"@aws/lambda-invoke-store": "^0.3.0",
|
|
112
|
-
"@smithy/core": "^3.
|
|
112
|
+
"@smithy/core": "^3.37.0",
|
|
113
113
|
"@smithy/signature-v4": "^5.7.4",
|
|
114
114
|
"@smithy/types": "^4.19.0",
|
|
115
115
|
"bowser": "^2.11.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-env",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.77",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from known environment variables",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@aws-sdk/core": "^3.978.
|
|
35
|
+
"@aws-sdk/core": "^3.978.6",
|
|
36
36
|
"@aws-sdk/types": "^3.975.0",
|
|
37
|
-
"@smithy/core": "^3.
|
|
37
|
+
"@smithy/core": "^3.37.0",
|
|
38
38
|
"@smithy/types": "^4.19.0",
|
|
39
39
|
"tslib": "^2.6.2"
|
|
40
40
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-http",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.79",
|
|
4
4
|
"description": "AWS credential provider for containers and HTTP sources",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"./dist-es/fromHttp/fromHttp": "./dist-es/fromHttp/fromHttp.browser"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@aws-sdk/core": "^3.978.
|
|
43
|
+
"@aws-sdk/core": "^3.978.6",
|
|
44
44
|
"@aws-sdk/types": "^3.975.0",
|
|
45
|
-
"@smithy/core": "^3.
|
|
45
|
+
"@smithy/core": "^3.37.0",
|
|
46
46
|
"@smithy/fetch-http-handler": "^5.8.0",
|
|
47
|
-
"@smithy/node-http-handler": "^4.
|
|
47
|
+
"@smithy/node-http-handler": "^4.13.0",
|
|
48
48
|
"@smithy/types": "^4.19.0",
|
|
49
49
|
"tslib": "^2.6.2"
|
|
50
50
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-ini",
|
|
3
|
-
"version": "3.973.
|
|
3
|
+
"version": "3.973.22",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@aws-sdk/core": "^3.978.
|
|
36
|
-
"@aws-sdk/credential-provider-env": "^3.972.
|
|
37
|
-
"@aws-sdk/credential-provider-http": "^3.972.
|
|
38
|
-
"@aws-sdk/credential-provider-login": "^3.972.
|
|
39
|
-
"@aws-sdk/credential-provider-process": "^3.972.
|
|
40
|
-
"@aws-sdk/credential-provider-sso": "^3.973.
|
|
41
|
-
"@aws-sdk/credential-provider-web-identity": "^3.972.
|
|
42
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
35
|
+
"@aws-sdk/core": "^3.978.6",
|
|
36
|
+
"@aws-sdk/credential-provider-env": "^3.972.77",
|
|
37
|
+
"@aws-sdk/credential-provider-http": "^3.972.79",
|
|
38
|
+
"@aws-sdk/credential-provider-login": "^3.972.84",
|
|
39
|
+
"@aws-sdk/credential-provider-process": "^3.972.77",
|
|
40
|
+
"@aws-sdk/credential-provider-sso": "^3.973.21",
|
|
41
|
+
"@aws-sdk/credential-provider-web-identity": "^3.972.83",
|
|
42
|
+
"@aws-sdk/nested-clients": "^3.997.51",
|
|
43
43
|
"@aws-sdk/types": "^3.975.0",
|
|
44
|
-
"@smithy/core": "^3.
|
|
44
|
+
"@smithy/core": "^3.37.0",
|
|
45
45
|
"@smithy/credential-provider-imds": "^4.5.2",
|
|
46
46
|
"@smithy/types": "^4.19.0",
|
|
47
47
|
"tslib": "^2.6.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-login",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.84",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from aws login cached tokens",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@aws-sdk/core": "^3.978.
|
|
38
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
37
|
+
"@aws-sdk/core": "^3.978.6",
|
|
38
|
+
"@aws-sdk/nested-clients": "^3.997.51",
|
|
39
39
|
"@aws-sdk/types": "^3.975.0",
|
|
40
|
-
"@smithy/core": "^3.
|
|
40
|
+
"@smithy/core": "^3.37.0",
|
|
41
41
|
"@smithy/types": "^4.19.0",
|
|
42
42
|
"tslib": "^2.6.2"
|
|
43
43
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-node",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.89",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from a Node.JS environment. ",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@aws-sdk/credential-provider-env": "^3.972.
|
|
36
|
-
"@aws-sdk/credential-provider-http": "^3.972.
|
|
37
|
-
"@aws-sdk/credential-provider-ini": "^3.973.
|
|
38
|
-
"@aws-sdk/credential-provider-process": "^3.972.
|
|
39
|
-
"@aws-sdk/credential-provider-sso": "^3.973.
|
|
40
|
-
"@aws-sdk/credential-provider-web-identity": "^3.972.
|
|
35
|
+
"@aws-sdk/credential-provider-env": "^3.972.77",
|
|
36
|
+
"@aws-sdk/credential-provider-http": "^3.972.79",
|
|
37
|
+
"@aws-sdk/credential-provider-ini": "^3.973.22",
|
|
38
|
+
"@aws-sdk/credential-provider-process": "^3.972.77",
|
|
39
|
+
"@aws-sdk/credential-provider-sso": "^3.973.21",
|
|
40
|
+
"@aws-sdk/credential-provider-web-identity": "^3.972.83",
|
|
41
41
|
"@aws-sdk/types": "^3.975.0",
|
|
42
|
-
"@smithy/core": "^3.
|
|
42
|
+
"@smithy/core": "^3.37.0",
|
|
43
43
|
"@smithy/credential-provider-imds": "^4.5.2",
|
|
44
44
|
"@smithy/types": "^4.19.0",
|
|
45
45
|
"tslib": "^2.6.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-process",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.77",
|
|
4
4
|
"description": "AWS credential provider that sources credential_process from ~/.aws/credentials and ~/.aws/config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@aws-sdk/core": "^3.978.
|
|
35
|
+
"@aws-sdk/core": "^3.978.6",
|
|
36
36
|
"@aws-sdk/types": "^3.975.0",
|
|
37
|
-
"@smithy/core": "^3.
|
|
37
|
+
"@smithy/core": "^3.37.0",
|
|
38
38
|
"@smithy/types": "^4.19.0",
|
|
39
39
|
"tslib": "^2.6.2"
|
|
40
40
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-sso",
|
|
3
|
-
"version": "3.973.
|
|
3
|
+
"version": "3.973.21",
|
|
4
4
|
"description": "AWS credential provider that exchanges a resolved SSO login token file for temporary AWS credentials",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@aws-sdk/core": "^3.978.
|
|
36
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
37
|
-
"@aws-sdk/token-providers": "3.
|
|
35
|
+
"@aws-sdk/core": "^3.978.6",
|
|
36
|
+
"@aws-sdk/nested-clients": "^3.997.51",
|
|
37
|
+
"@aws-sdk/token-providers": "3.1157.0",
|
|
38
38
|
"@aws-sdk/types": "^3.975.0",
|
|
39
|
-
"@smithy/core": "^3.
|
|
39
|
+
"@smithy/core": "^3.37.0",
|
|
40
40
|
"@smithy/types": "^4.19.0",
|
|
41
41
|
"tslib": "^2.6.2"
|
|
42
42
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-web-identity",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.83",
|
|
4
4
|
"description": "AWS credential provider that calls STS assumeRole for temporary AWS credentials",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"./dist-es/fromTokenFile": false
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@aws-sdk/core": "^3.978.
|
|
43
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
42
|
+
"@aws-sdk/core": "^3.978.6",
|
|
43
|
+
"@aws-sdk/nested-clients": "^3.997.51",
|
|
44
44
|
"@aws-sdk/types": "^3.975.0",
|
|
45
|
-
"@smithy/core": "^3.
|
|
45
|
+
"@smithy/core": "^3.37.0",
|
|
46
46
|
"@smithy/types": "^4.19.0",
|
|
47
47
|
"tslib": "^2.6.2"
|
|
48
48
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/eventstream-handler-node",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.39",
|
|
4
4
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/eventstream-handler-node",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@aws-sdk/types": "^3.975.0",
|
|
31
|
-
"@smithy/core": "^3.
|
|
31
|
+
"@smithy/core": "^3.37.0",
|
|
32
32
|
"@smithy/types": "^4.19.0",
|
|
33
33
|
"tslib": "^2.6.2"
|
|
34
34
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-eventstream",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.34",
|
|
4
4
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/middleware-eventstream",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@aws-sdk/types": "^3.975.0",
|
|
31
|
-
"@smithy/core": "^3.
|
|
31
|
+
"@smithy/core": "^3.37.0",
|
|
32
32
|
"@smithy/types": "^4.19.0",
|
|
33
33
|
"tslib": "^2.6.2"
|
|
34
34
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-websocket",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.59",
|
|
4
4
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/middleware-websocket",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@aws-sdk/core": "^3.978.
|
|
30
|
+
"@aws-sdk/core": "^3.978.6",
|
|
31
31
|
"@aws-sdk/types": "^3.975.0",
|
|
32
|
-
"@smithy/core": "^3.
|
|
32
|
+
"@smithy/core": "^3.37.0",
|
|
33
33
|
"@smithy/fetch-http-handler": "^5.8.0",
|
|
34
34
|
"@smithy/signature-v4": "^5.7.4",
|
|
35
35
|
"@smithy/types": "^4.19.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/nested-clients",
|
|
3
|
-
"version": "3.997.
|
|
3
|
+
"version": "3.997.51",
|
|
4
4
|
"description": "Nested clients for AWS SDK packages.",
|
|
5
5
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@aws-sdk/core": "^3.978.
|
|
90
|
+
"@aws-sdk/core": "^3.978.6",
|
|
91
91
|
"@aws-sdk/signature-v4-multi-region": "^3.996.49",
|
|
92
92
|
"@aws-sdk/types": "^3.975.0",
|
|
93
|
-
"@smithy/core": "^3.
|
|
93
|
+
"@smithy/core": "^3.37.0",
|
|
94
94
|
"@smithy/fetch-http-handler": "^5.8.0",
|
|
95
|
-
"@smithy/node-http-handler": "^4.
|
|
95
|
+
"@smithy/node-http-handler": "^4.13.0",
|
|
96
96
|
"@smithy/types": "^4.19.0",
|
|
97
97
|
"tslib": "^2.6.2"
|
|
98
98
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/token-providers",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1157.0",
|
|
4
4
|
"description": "A collection of token providers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
},
|
|
35
35
|
"react-native": {},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@aws-sdk/core": "^3.978.
|
|
38
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
37
|
+
"@aws-sdk/core": "^3.978.6",
|
|
38
|
+
"@aws-sdk/nested-clients": "^3.997.51",
|
|
39
39
|
"@aws-sdk/types": "^3.975.0",
|
|
40
|
-
"@smithy/core": "^3.
|
|
40
|
+
"@smithy/core": "^3.37.0",
|
|
41
41
|
"@smithy/types": "^4.19.0",
|
|
42
42
|
"tslib": "^2.6.2"
|
|
43
43
|
},
|
|
@@ -592,7 +592,7 @@ var ClientModuleRegistry = class extends Service {
|
|
|
592
592
|
constructor(ctx) {
|
|
593
593
|
super(ctx, "clientModules");
|
|
594
594
|
const { version } = createRequire(import.meta.url)("../package.json");
|
|
595
|
-
const commit = "
|
|
595
|
+
const commit = "802c05c";
|
|
596
596
|
this.release = {
|
|
597
597
|
version,
|
|
598
598
|
commit
|
|
@@ -195,7 +195,7 @@ window.__ModuleLoader__.load({
|
|
|
195
195
|
const SCROLLBAR_LINGER_MS = 2e3;
|
|
196
196
|
/** Format complete-build metadata for the local brand badge. */
|
|
197
197
|
function localBuildVersion() {
|
|
198
|
-
return `0.2.1-rc.3-
|
|
198
|
+
return `0.2.1-rc.3-802c05c` + ({}.DSH_CLIENT_GIT_DIRTY === "true" ? "-dirty" : "");
|
|
199
199
|
}
|
|
200
200
|
/** Analytics category of an official panel; other panels are never reported. */
|
|
201
201
|
function officialEntry(id) {
|
|
@@ -2483,8 +2483,8 @@ function describeFailure(error) {
|
|
|
2483
2483
|
}
|
|
2484
2484
|
/**
|
|
2485
2485
|
* The transcript row for one shell command, with the prompt outside the source.
|
|
2486
|
-
* @param command - the command text,
|
|
2487
|
-
* @returns `$ ${command}
|
|
2486
|
+
* @param command - the command text, which may hold several lines.
|
|
2487
|
+
* @returns `$ ${command}`, still one row: the prompt leads the first line only.
|
|
2488
2488
|
*/
|
|
2489
2489
|
function shellCommandRow(command) {
|
|
2490
2490
|
return `\$ ${command}`;
|
|
@@ -2782,8 +2782,8 @@ function toolResultBody(view, content) {
|
|
|
2782
2782
|
* Draw card rows in syntax colour where a highlighter and a span allow it.
|
|
2783
2783
|
* Consecutive spans of one language are coloured as one block, so a comment
|
|
2784
2784
|
* or string that spans rows keeps its colour; a group the highlighter cannot
|
|
2785
|
-
* colour yet, or colours to a different
|
|
2786
|
-
* again once its grammar lands.
|
|
2785
|
+
* colour yet, or colours to a different number of lines than its sources
|
|
2786
|
+
* hold, draws plain and is drawn again once its grammar lands.
|
|
2787
2787
|
* @param lines - the plain rows.
|
|
2788
2788
|
* @param code - the span behind each row, aligned by index; absent rows draw plain.
|
|
2789
2789
|
* @param highlight - the highlighter; absent draws every row plain.
|
|
@@ -2802,10 +2802,16 @@ function paintCodeRows(lines, code, highlight) {
|
|
|
2802
2802
|
let end = index + 1;
|
|
2803
2803
|
while (end < lines.length && code[end]?.lang === span.lang) end += 1;
|
|
2804
2804
|
const group = code.slice(index, end);
|
|
2805
|
+
const heights = group.map((row) => row.source.split("\n").length);
|
|
2805
2806
|
const coloured = highlight.lines(group.map((row) => row.source).join("\n"), span.lang);
|
|
2806
|
-
if (coloured !== void 0 && coloured.length ===
|
|
2807
|
-
|
|
2808
|
-
|
|
2807
|
+
if (coloured !== void 0 && coloured.length === heights.reduce((total, height) => total + height, 0)) {
|
|
2808
|
+
let taken = 0;
|
|
2809
|
+
for (const [offset, row] of group.entries()) {
|
|
2810
|
+
const height = heights[offset];
|
|
2811
|
+
out[index + offset] = `${row.prefix}${coloured.slice(taken, taken + height).join("\n")}`;
|
|
2812
|
+
taken += height;
|
|
2813
|
+
}
|
|
2814
|
+
}
|
|
2809
2815
|
index = end;
|
|
2810
2816
|
}
|
|
2811
2817
|
return out;
|
|
@@ -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
|
|