@songtonyli/dsh-cli 0.1.80 → 0.1.82

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.
Files changed (70) hide show
  1. package/README.md +1 -1
  2. package/bin/dsh.mjs +1 -1
  3. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +94 -1589
  4. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -7
  5. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -3
  6. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -3
  7. package/node_modules/@aws-sdk/core/package.json +2 -2
  8. package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
  9. package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
  10. package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
  11. package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
  12. package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
  13. package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
  14. package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
  15. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
  16. package/node_modules/@aws-sdk/eventstream-handler-node/package.json +2 -2
  17. package/node_modules/@aws-sdk/middleware-eventstream/package.json +2 -2
  18. package/node_modules/@aws-sdk/middleware-websocket/package.json +3 -3
  19. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  20. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  21. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  22. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  23. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  24. package/node_modules/@aws-sdk/nested-clients/package.json +3 -3
  25. package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
  26. package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +37 -19
  27. package/node_modules/@aws-sdk/token-providers/package.json +4 -4
  28. package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +1 -1
  29. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  30. package/node_modules/@deepseek-ai/dsh-subprocess-local/README.i18n.yaml +14 -14
  31. package/node_modules/@deepseek-ai/dsh-subprocess-local/README.md +7 -5
  32. package/node_modules/@deepseek-ai/dsh-subprocess-local/README.zh.md +7 -5
  33. package/node_modules/@deepseek-ai/dsh-subprocess-local/lib/index.js +15 -3
  34. package/node_modules/@deepseek-ai/dsh-subprocess-local/lib/runner-launch-f9xQyTek.js +1669 -0
  35. package/node_modules/@deepseek-ai/dsh-subprocess-local/lib/runner.js +1 -1
  36. package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +19 -16
  37. package/node_modules/@deepseek-ai/dsh-tui-app/README.md +30 -13
  38. package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +30 -13
  39. package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +615 -245
  40. package/node_modules/execa/lib/convert/duplex.js +8 -4
  41. package/node_modules/execa/lib/convert/readable.js +3 -8
  42. package/node_modules/execa/lib/convert/writable.js +6 -5
  43. package/node_modules/execa/lib/io/input-sync.js +2 -1
  44. package/node_modules/execa/lib/io/max-buffer.js +2 -1
  45. package/node_modules/execa/lib/io/output-sync.js +2 -1
  46. package/node_modules/execa/lib/methods/create.js +7 -0
  47. package/node_modules/execa/lib/methods/node.js +1 -1
  48. package/node_modules/execa/lib/methods/script.js +3 -3
  49. package/node_modules/execa/lib/resolve/all-async.js +2 -1
  50. package/node_modules/execa/lib/resolve/wait-subprocess.js +6 -0
  51. package/node_modules/execa/lib/stdio/handle-async.js +3 -2
  52. package/node_modules/execa/lib/stdio/handle.js +8 -3
  53. package/node_modules/execa/lib/transform/generator.js +7 -0
  54. package/node_modules/execa/lib/transform/run-sync.js +17 -5
  55. package/node_modules/execa/package.json +1 -1
  56. package/package.json +16 -16
  57. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -1
  58. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -20
  59. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -1
  60. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +0 -160
  61. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +0 -193
  62. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -103
  63. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -20
  64. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +0 -200
  65. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +0 -519
  66. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -18
  67. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -46
  68. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -121
  69. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/needsReviver.js +0 -41
  70. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +0 -89
@@ -3,13 +3,7 @@ export { AwsJson1_0Protocol } from "./json/AwsJson1_0Protocol";
3
3
  export { AwsJson1_1Protocol } from "./json/AwsJson1_1Protocol";
4
4
  export { AwsJsonRpcProtocol } from "./json/AwsJsonRpcProtocol";
5
5
  export { AwsRestJsonProtocol } from "./json/AwsRestJsonProtocol";
6
- export { JsonCodec } from "./json/codec-v1/JsonCodec";
7
- export { JsonShapeDeserializer } from "./json/codec-v1/JsonShapeDeserializer";
8
- export { JsonShapeSerializer } from "./json/codec-v1/JsonShapeSerializer";
9
- export { JsonCodec2 } from "./json/codec-v2/JsonCodec2";
10
- export { JsonShapeDeserializer2 } from "./json/codec-v2/JsonShapeDeserializer2";
11
- export { JsonShapeSerializer2 } from "./json/codec-v2/JsonShapeSerializer2";
12
- export { parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode, loadJsonRpcErrorCode } from "./json/parseJsonBody";
6
+ export { JsonCodec, JsonCodec2, JsonShapeDeserializer, JsonShapeDeserializer2, JsonShapeSerializer, JsonShapeSerializer2, loadJsonRpcErrorCode, loadRestJsonErrorCode, parseJsonBody, parseJsonErrorBody, } from "@smithy/core/protocols";
13
7
  export { AwsEc2QueryProtocol } from "./query/AwsEc2QueryProtocol";
14
8
  export { AwsQueryProtocol } from "./query/AwsQueryProtocol";
15
9
  export { QueryShapeSerializer } from "./query/QueryShapeSerializer";
@@ -1,8 +1,6 @@
1
- import { RpcProtocol } from "@smithy/core/protocols";
1
+ import { JsonCodec2, loadJsonRpcErrorCode, RpcProtocol } from "@smithy/core/protocols";
2
2
  import { deref, NormalizedSchema } from "@smithy/core/schema";
3
3
  import { ProtocolLib } from "../ProtocolLib";
4
- import { JsonCodec2 } from "./codec-v2/JsonCodec2";
5
- import { loadJsonRpcErrorCode } from "./parseJsonBody";
6
4
  export class AwsJsonRpcProtocol extends RpcProtocol {
7
5
  serializer;
8
6
  deserializer;
@@ -1,8 +1,6 @@
1
- import { HttpBindingProtocol, HttpInterceptingShapeDeserializer, HttpInterceptingShapeSerializer, } from "@smithy/core/protocols";
1
+ import { HttpBindingProtocol, HttpInterceptingShapeDeserializer, HttpInterceptingShapeSerializer, JsonCodec2, loadRestJsonErrorCode, } from "@smithy/core/protocols";
2
2
  import { NormalizedSchema } from "@smithy/core/schema";
3
3
  import { ProtocolLib } from "../ProtocolLib";
4
- import { JsonCodec2 } from "./codec-v2/JsonCodec2";
5
- import { loadRestJsonErrorCode } from "./parseJsonBody";
6
4
  export class AwsRestJsonProtocol extends HttpBindingProtocol {
7
5
  serializer;
8
6
  deserializer;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/core",
3
- "version": "3.978.3",
3
+ "version": "3.978.4",
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.974.6",
110
110
  "@aws-sdk/xml-builder": "^3.972.41",
111
111
  "@aws/lambda-invoke-store": "^0.3.0",
112
- "@smithy/core": "^3.35.2",
112
+ "@smithy/core": "^3.36.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.74",
3
+ "version": "3.972.75",
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.3",
35
+ "@aws-sdk/core": "^3.978.4",
36
36
  "@aws-sdk/types": "^3.974.6",
37
- "@smithy/core": "^3.35.2",
37
+ "@smithy/core": "^3.36.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.76",
3
+ "version": "3.972.77",
4
4
  "description": "AWS credential provider for containers and HTTP sources",
5
5
  "keywords": [
6
6
  "aws",
@@ -40,9 +40,9 @@
40
40
  "./dist-es/fromHttp/fromHttp": "./dist-es/fromHttp/fromHttp.browser"
41
41
  },
42
42
  "dependencies": {
43
- "@aws-sdk/core": "^3.978.3",
43
+ "@aws-sdk/core": "^3.978.4",
44
44
  "@aws-sdk/types": "^3.974.6",
45
- "@smithy/core": "^3.35.2",
45
+ "@smithy/core": "^3.36.0",
46
46
  "@smithy/fetch-http-handler": "^5.8.0",
47
47
  "@smithy/node-http-handler": "^4.12.1",
48
48
  "@smithy/types": "^4.19.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-ini",
3
- "version": "3.973.19",
3
+ "version": "3.973.20",
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.3",
36
- "@aws-sdk/credential-provider-env": "^3.972.74",
37
- "@aws-sdk/credential-provider-http": "^3.972.76",
38
- "@aws-sdk/credential-provider-login": "^3.972.81",
39
- "@aws-sdk/credential-provider-process": "^3.972.74",
40
- "@aws-sdk/credential-provider-sso": "^3.973.18",
41
- "@aws-sdk/credential-provider-web-identity": "^3.972.80",
42
- "@aws-sdk/nested-clients": "^3.997.48",
35
+ "@aws-sdk/core": "^3.978.4",
36
+ "@aws-sdk/credential-provider-env": "^3.972.75",
37
+ "@aws-sdk/credential-provider-http": "^3.972.77",
38
+ "@aws-sdk/credential-provider-login": "^3.972.82",
39
+ "@aws-sdk/credential-provider-process": "^3.972.75",
40
+ "@aws-sdk/credential-provider-sso": "^3.973.19",
41
+ "@aws-sdk/credential-provider-web-identity": "^3.972.81",
42
+ "@aws-sdk/nested-clients": "^3.997.49",
43
43
  "@aws-sdk/types": "^3.974.6",
44
- "@smithy/core": "^3.35.2",
44
+ "@smithy/core": "^3.36.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.81",
3
+ "version": "3.972.82",
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.3",
38
- "@aws-sdk/nested-clients": "^3.997.48",
37
+ "@aws-sdk/core": "^3.978.4",
38
+ "@aws-sdk/nested-clients": "^3.997.49",
39
39
  "@aws-sdk/types": "^3.974.6",
40
- "@smithy/core": "^3.35.2",
40
+ "@smithy/core": "^3.36.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.86",
3
+ "version": "3.972.87",
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.74",
36
- "@aws-sdk/credential-provider-http": "^3.972.76",
37
- "@aws-sdk/credential-provider-ini": "^3.973.19",
38
- "@aws-sdk/credential-provider-process": "^3.972.74",
39
- "@aws-sdk/credential-provider-sso": "^3.973.18",
40
- "@aws-sdk/credential-provider-web-identity": "^3.972.80",
35
+ "@aws-sdk/credential-provider-env": "^3.972.75",
36
+ "@aws-sdk/credential-provider-http": "^3.972.77",
37
+ "@aws-sdk/credential-provider-ini": "^3.973.20",
38
+ "@aws-sdk/credential-provider-process": "^3.972.75",
39
+ "@aws-sdk/credential-provider-sso": "^3.973.19",
40
+ "@aws-sdk/credential-provider-web-identity": "^3.972.81",
41
41
  "@aws-sdk/types": "^3.974.6",
42
- "@smithy/core": "^3.35.2",
42
+ "@smithy/core": "^3.36.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.74",
3
+ "version": "3.972.75",
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.3",
35
+ "@aws-sdk/core": "^3.978.4",
36
36
  "@aws-sdk/types": "^3.974.6",
37
- "@smithy/core": "^3.35.2",
37
+ "@smithy/core": "^3.36.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.18",
3
+ "version": "3.973.19",
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.3",
36
- "@aws-sdk/nested-clients": "^3.997.48",
37
- "@aws-sdk/token-providers": "3.1150.0",
35
+ "@aws-sdk/core": "^3.978.4",
36
+ "@aws-sdk/nested-clients": "^3.997.49",
37
+ "@aws-sdk/token-providers": "3.1153.0",
38
38
  "@aws-sdk/types": "^3.974.6",
39
- "@smithy/core": "^3.35.2",
39
+ "@smithy/core": "^3.36.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.80",
3
+ "version": "3.972.81",
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.3",
43
- "@aws-sdk/nested-clients": "^3.997.48",
42
+ "@aws-sdk/core": "^3.978.4",
43
+ "@aws-sdk/nested-clients": "^3.997.49",
44
44
  "@aws-sdk/types": "^3.974.6",
45
- "@smithy/core": "^3.35.2",
45
+ "@smithy/core": "^3.36.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.36",
3
+ "version": "3.972.37",
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.974.6",
31
- "@smithy/core": "^3.35.2",
31
+ "@smithy/core": "^3.36.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.31",
3
+ "version": "3.972.32",
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.974.6",
31
- "@smithy/core": "^3.35.2",
31
+ "@smithy/core": "^3.36.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.56",
3
+ "version": "3.972.57",
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.3",
30
+ "@aws-sdk/core": "^3.978.4",
31
31
  "@aws-sdk/types": "^3.974.6",
32
- "@smithy/core": "^3.35.2",
32
+ "@smithy/core": "^3.36.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",
@@ -83,7 +83,7 @@ const commonParams = {
83
83
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
84
84
  };
85
85
 
86
- var version = "3.997.47";
86
+ var version = "3.997.48";
87
87
  var packageInfo = {
88
88
  version: version};
89
89
 
@@ -78,7 +78,7 @@ const commonParams = {
78
78
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
79
79
  };
80
80
 
81
- var version = "3.997.47";
81
+ var version = "3.997.48";
82
82
  var packageInfo = {
83
83
  version: version};
84
84
 
@@ -78,7 +78,7 @@ const commonParams = {
78
78
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
79
79
  };
80
80
 
81
- var version = "3.997.47";
81
+ var version = "3.997.48";
82
82
  var packageInfo = {
83
83
  version: version};
84
84
 
@@ -78,7 +78,7 @@ const commonParams = {
78
78
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
79
79
  };
80
80
 
81
- var version = "3.997.47";
81
+ var version = "3.997.48";
82
82
  var packageInfo = {
83
83
  version: version};
84
84
 
@@ -258,7 +258,7 @@ const commonParams = {
258
258
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
259
259
  };
260
260
 
261
- var version = "3.997.47";
261
+ var version = "3.997.48";
262
262
  var packageInfo = {
263
263
  version: version};
264
264
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/nested-clients",
3
- "version": "3.997.48",
3
+ "version": "3.997.49",
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,10 +87,10 @@
87
87
  }
88
88
  },
89
89
  "dependencies": {
90
- "@aws-sdk/core": "^3.978.3",
90
+ "@aws-sdk/core": "^3.978.4",
91
91
  "@aws-sdk/signature-v4-multi-region": "^3.996.48",
92
92
  "@aws-sdk/types": "^3.974.6",
93
- "@smithy/core": "^3.35.2",
93
+ "@smithy/core": "^3.36.0",
94
94
  "@smithy/fetch-http-handler": "^5.8.0",
95
95
  "@smithy/node-http-handler": "^4.12.1",
96
96
  "@smithy/types": "^4.19.0",
@@ -62,6 +62,7 @@ const writeSSOTokenToFile = (id, ssoToken) => {
62
62
  };
63
63
 
64
64
  const lastRefreshAttemptTimes = new Map();
65
+ const inFlightRefreshes = new Map();
65
66
  const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
66
67
  init.logger?.debug("@aws-sdk/token-providers - fromSso");
67
68
  const profiles = await parseKnownFiles(init);
@@ -76,6 +77,10 @@ const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
76
77
  throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
77
78
  }
78
79
  const ssoSessionName = profile["sso_session"];
80
+ const inFlightRefresh = inFlightRefreshes.get(ssoSessionName);
81
+ if (inFlightRefresh) {
82
+ return await inFlightRefresh;
83
+ }
79
84
  const ssoSessions = await loadSsoSessionData(init);
80
85
  const ssoSession = ssoSessions[ssoSessionName];
81
86
  if (!ssoSession) {
@@ -105,6 +110,10 @@ const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
105
110
  if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
106
111
  return existingToken;
107
112
  }
113
+ const inFlightRefreshAfterReadingToken = inFlightRefreshes.get(ssoSessionName);
114
+ if (inFlightRefreshAfterReadingToken) {
115
+ return await inFlightRefreshAfterReadingToken;
116
+ }
108
117
  const lastRefreshAttemptTime = lastRefreshAttemptTimes.get(ssoSessionName) ?? 0;
109
118
  if (Date.now() - lastRefreshAttemptTime < 30 * 1000) {
110
119
  validateTokenExpiry(existingToken);
@@ -113,30 +122,39 @@ const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
113
122
  validateTokenKey("clientId", ssoToken.clientId, true);
114
123
  validateTokenKey("clientSecret", ssoToken.clientSecret, true);
115
124
  validateTokenKey("refreshToken", ssoToken.refreshToken, true);
116
- try {
117
- lastRefreshAttemptTimes.set(ssoSessionName, Date.now());
118
- const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
119
- validateTokenKey("accessToken", newSsoOidcToken.accessToken);
120
- validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
121
- const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
125
+ const refresh = (async () => {
122
126
  try {
123
- await writeSSOTokenToFile(ssoSessionName, {
124
- ...ssoToken,
125
- accessToken: newSsoOidcToken.accessToken,
126
- expiresAt: newTokenExpiration.toISOString(),
127
- refreshToken: newSsoOidcToken.refreshToken,
128
- });
127
+ lastRefreshAttemptTimes.set(ssoSessionName, Date.now());
128
+ const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
129
+ validateTokenKey("accessToken", newSsoOidcToken.accessToken);
130
+ validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
131
+ const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
132
+ try {
133
+ await writeSSOTokenToFile(ssoSessionName, {
134
+ ...ssoToken,
135
+ accessToken: newSsoOidcToken.accessToken,
136
+ expiresAt: newTokenExpiration.toISOString(),
137
+ refreshToken: newSsoOidcToken.refreshToken,
138
+ });
139
+ }
140
+ catch (error) {
141
+ }
142
+ return {
143
+ token: newSsoOidcToken.accessToken,
144
+ expiration: newTokenExpiration,
145
+ };
129
146
  }
130
147
  catch (error) {
148
+ validateTokenExpiry(existingToken);
149
+ return existingToken;
131
150
  }
132
- return {
133
- token: newSsoOidcToken.accessToken,
134
- expiration: newTokenExpiration,
135
- };
151
+ })();
152
+ inFlightRefreshes.set(ssoSessionName, refresh);
153
+ try {
154
+ return await refresh;
136
155
  }
137
- catch (error) {
138
- validateTokenExpiry(existingToken);
139
- return existingToken;
156
+ finally {
157
+ inFlightRefreshes.delete(ssoSessionName);
140
158
  }
141
159
  };
142
160
 
@@ -5,6 +5,7 @@ import { validateTokenExpiry } from "./validateTokenExpiry";
5
5
  import { validateTokenKey } from "./validateTokenKey";
6
6
  import { writeSSOTokenToFile } from "./writeSSOTokenToFile";
7
7
  const lastRefreshAttemptTimes = new Map();
8
+ const inFlightRefreshes = new Map();
8
9
  export const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
9
10
  init.logger?.debug("@aws-sdk/token-providers - fromSso");
10
11
  const profiles = await parseKnownFiles(init);
@@ -19,6 +20,10 @@ export const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
19
20
  throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
20
21
  }
21
22
  const ssoSessionName = profile["sso_session"];
23
+ const inFlightRefresh = inFlightRefreshes.get(ssoSessionName);
24
+ if (inFlightRefresh) {
25
+ return await inFlightRefresh;
26
+ }
22
27
  const ssoSessions = await loadSsoSessionData(init);
23
28
  const ssoSession = ssoSessions[ssoSessionName];
24
29
  if (!ssoSession) {
@@ -48,6 +53,10 @@ export const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
48
53
  if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
49
54
  return existingToken;
50
55
  }
56
+ const inFlightRefreshAfterReadingToken = inFlightRefreshes.get(ssoSessionName);
57
+ if (inFlightRefreshAfterReadingToken) {
58
+ return await inFlightRefreshAfterReadingToken;
59
+ }
51
60
  const lastRefreshAttemptTime = lastRefreshAttemptTimes.get(ssoSessionName) ?? 0;
52
61
  if (Date.now() - lastRefreshAttemptTime < 30 * 1000) {
53
62
  validateTokenExpiry(existingToken);
@@ -56,29 +65,38 @@ export const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
56
65
  validateTokenKey("clientId", ssoToken.clientId, true);
57
66
  validateTokenKey("clientSecret", ssoToken.clientSecret, true);
58
67
  validateTokenKey("refreshToken", ssoToken.refreshToken, true);
59
- try {
60
- lastRefreshAttemptTimes.set(ssoSessionName, Date.now());
61
- const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
62
- validateTokenKey("accessToken", newSsoOidcToken.accessToken);
63
- validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
64
- const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
68
+ const refresh = (async () => {
65
69
  try {
66
- await writeSSOTokenToFile(ssoSessionName, {
67
- ...ssoToken,
68
- accessToken: newSsoOidcToken.accessToken,
69
- expiresAt: newTokenExpiration.toISOString(),
70
- refreshToken: newSsoOidcToken.refreshToken,
71
- });
70
+ lastRefreshAttemptTimes.set(ssoSessionName, Date.now());
71
+ const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
72
+ validateTokenKey("accessToken", newSsoOidcToken.accessToken);
73
+ validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
74
+ const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
75
+ try {
76
+ await writeSSOTokenToFile(ssoSessionName, {
77
+ ...ssoToken,
78
+ accessToken: newSsoOidcToken.accessToken,
79
+ expiresAt: newTokenExpiration.toISOString(),
80
+ refreshToken: newSsoOidcToken.refreshToken,
81
+ });
82
+ }
83
+ catch (error) {
84
+ }
85
+ return {
86
+ token: newSsoOidcToken.accessToken,
87
+ expiration: newTokenExpiration,
88
+ };
72
89
  }
73
90
  catch (error) {
91
+ validateTokenExpiry(existingToken);
92
+ return existingToken;
74
93
  }
75
- return {
76
- token: newSsoOidcToken.accessToken,
77
- expiration: newTokenExpiration,
78
- };
94
+ })();
95
+ inFlightRefreshes.set(ssoSessionName, refresh);
96
+ try {
97
+ return await refresh;
79
98
  }
80
- catch (error) {
81
- validateTokenExpiry(existingToken);
82
- return existingToken;
99
+ finally {
100
+ inFlightRefreshes.delete(ssoSessionName);
83
101
  }
84
102
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/token-providers",
3
- "version": "3.1150.0",
3
+ "version": "3.1153.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.3",
38
- "@aws-sdk/nested-clients": "^3.997.48",
37
+ "@aws-sdk/core": "^3.978.4",
38
+ "@aws-sdk/nested-clients": "^3.997.49",
39
39
  "@aws-sdk/types": "^3.974.6",
40
- "@smithy/core": "^3.35.2",
40
+ "@smithy/core": "^3.36.0",
41
41
  "@smithy/types": "^4.19.0",
42
42
  "tslib": "^2.6.2"
43
43
  },
@@ -537,7 +537,7 @@ var ClientModuleRegistry = class extends Service {
537
537
  constructor(ctx) {
538
538
  super(ctx, "clientModules");
539
539
  const { version } = createRequire(import.meta.url)("../package.json");
540
- const commit = "f517a47";
540
+ const commit = "b414572";
541
541
  this.release = {
542
542
  version,
543
543
  commit
@@ -167,7 +167,7 @@ window.__ModuleLoader__.load({
167
167
  const SCROLLBAR_LINGER_MS = 2e3;
168
168
  /** Format complete-build metadata for the local brand badge. */
169
169
  function localBuildVersion() {
170
- return `0.2.1-rc.2-f517a47-dirty`;
170
+ return `0.2.1-rc.2-b414572-dirty`;
171
171
  }
172
172
  /** Each panel row subscribes only to its own selection state. */
173
173
  function PanelRow({ id, label, wide, usePanelInfo, selectPanel, renderSlot }) {