@jjrawlins/cdk-iam-policy-builder-helper 0.0.51 → 0.0.53

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 (111) hide show
  1. package/.jsii +3 -3
  2. package/cdk-iam-policy-builder-helper/go.mod +1 -1
  3. package/cdk-iam-policy-builder-helper/jsii/jsii.go +2 -2
  4. package/cdk-iam-policy-builder-helper/version +1 -1
  5. package/node_modules/@aws-sdk/client-iam/dist-cjs/index.js +13439 -13574
  6. package/node_modules/@aws-sdk/client-iam/package.json +5 -5
  7. package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +478 -596
  8. package/node_modules/@aws-sdk/client-sso/package.json +4 -4
  9. package/node_modules/@aws-sdk/core/dist-cjs/index.js +1969 -6
  10. package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +48 -88
  11. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +35 -74
  12. package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +273 -365
  13. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1581 -1863
  14. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +2 -2
  15. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +2 -2
  16. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +4 -4
  17. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +4 -4
  18. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +3 -3
  19. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +4 -4
  20. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +2 -2
  21. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +4 -4
  22. package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +1 -1
  23. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +1 -1
  24. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +1 -1
  25. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +1 -1
  26. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +1 -1
  27. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +1 -1
  28. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonCodec.d.ts +1 -1
  29. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeDeserializer.d.ts +1 -1
  30. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeSerializer.d.ts +2 -2
  31. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QuerySerializerSettings.d.ts +1 -1
  32. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/XmlCodec.d.ts +1 -1
  33. package/node_modules/@aws-sdk/core/package.json +1 -1
  34. package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +38 -73
  35. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  36. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  37. package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +194 -259
  38. package/node_modules/@aws-sdk/credential-provider-ini/package.json +8 -8
  39. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +72 -132
  40. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  41. package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +71 -107
  42. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  43. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +176 -249
  44. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-CVy8iqsZ.js +14 -0
  45. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  46. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +16 -25
  47. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  48. package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +170 -203
  49. package/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
  50. package/node_modules/@aws-sdk/nested-clients/dist-cjs/index.js +2 -2
  51. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +583 -858
  52. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +795 -928
  53. package/node_modules/@aws-sdk/nested-clients/package.json +4 -4
  54. package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +147 -222
  55. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  56. package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +50 -94
  57. package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
  58. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1 -1
  59. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +5 -3
  60. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +32 -30
  61. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +133 -202
  62. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +126 -34
  63. package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +2 -2
  64. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +5 -3
  65. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +4 -4
  66. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +3 -3
  67. package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +2 -2
  68. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +19 -17
  69. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +4 -4
  70. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js +5 -6
  71. package/node_modules/@smithy/core/dist-es/submodules/schema/index.js +1 -0
  72. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +82 -176
  73. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +22 -0
  74. package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
  75. package/node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js +110 -0
  76. package/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +4 -26
  77. package/node_modules/@smithy/core/dist-types/submodules/schema/index.d.ts +1 -0
  78. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +5 -24
  79. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/sentinels.d.ts +2 -0
  80. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/translateTraits.d.ts +7 -0
  81. package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
  82. package/node_modules/@smithy/core/dist-types/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +47 -0
  83. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/index.d.ts +1 -0
  84. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +5 -24
  85. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/sentinels.d.ts +2 -0
  86. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/translateTraits.d.ts +7 -0
  87. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
  88. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +47 -0
  89. package/node_modules/@smithy/core/package.json +3 -3
  90. package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
  91. package/node_modules/@smithy/middleware-endpoint/package.json +2 -2
  92. package/node_modules/@smithy/middleware-retry/package.json +2 -2
  93. package/node_modules/@smithy/smithy-client/package.json +4 -4
  94. package/node_modules/@smithy/util-base64/dist-cjs/constants.browser.js +9 -32
  95. package/node_modules/@smithy/util-base64/dist-es/constants.browser.js +9 -28
  96. package/node_modules/@smithy/util-base64/dist-types/constants.browser.d.ts +5 -6
  97. package/node_modules/@smithy/util-base64/dist-types/ts3.4/constants.browser.d.ts +5 -6
  98. package/node_modules/@smithy/util-base64/package.json +1 -1
  99. package/node_modules/@smithy/util-body-length-node/dist-cjs/index.js +8 -6
  100. package/node_modules/@smithy/util-body-length-node/dist-es/calculateBodyLength.js +8 -6
  101. package/node_modules/@smithy/util-body-length-node/package.json +1 -1
  102. package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.js +11 -9
  103. package/node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js +11 -8
  104. package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -3
  105. package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
  106. package/node_modules/@smithy/util-stream/dist-cjs/index.js +3 -5
  107. package/node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js +3 -5
  108. package/node_modules/@smithy/util-stream/dist-types/blob/Uint8ArrayBlobAdapter.d.ts +1 -0
  109. package/node_modules/@smithy/util-stream/dist-types/ts3.4/blob/Uint8ArrayBlobAdapter.d.ts +1 -0
  110. package/node_modules/@smithy/util-stream/package.json +3 -3
  111. package/package.json +3 -3
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @internal
3
+ *
4
+ * Parses a value into a Date. Returns undefined if the input is null or
5
+ * undefined, throws an error if the input is not a number or a parseable string.
6
+ *
7
+ * Input strings must be an integer or floating point number. Fractional seconds are supported.
8
+ *
9
+ * @param value - the value to parse
10
+ * @returns a Date or undefined
11
+ */
12
+ export declare const _parseEpochTimestamp: (value: unknown) => Date | undefined;
13
+ /**
14
+ * @internal
15
+ *
16
+ * Parses a value into a Date. Returns undefined if the input is null or
17
+ * undefined, throws an error if the input is not a string that can be parsed
18
+ * as an RFC 3339 date.
19
+ *
20
+ * Input strings must conform to RFC3339 section 5.6, and can have a UTC
21
+ * offset. Fractional precision is supported.
22
+ *
23
+ * @see {@link https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14}
24
+ *
25
+ * @param value - the value to parse
26
+ * @returns a Date or undefined
27
+ */
28
+ export declare const _parseRfc3339DateTimeWithOffset: (value: unknown) => Date | undefined;
29
+ /**
30
+ * @internal
31
+ *
32
+ * Parses a value into a Date. Returns undefined if the input is null or
33
+ * undefined, throws an error if the input is not a string that can be parsed
34
+ * as an RFC 7231 date.
35
+ *
36
+ * Input strings must conform to RFC7231 section 7.1.1.1. Fractional seconds are supported.
37
+ *
38
+ * RFC 850 and unix asctime formats are also accepted.
39
+ * todo: practically speaking, are RFC 850 and asctime even used anymore?
40
+ * todo: can we remove those parts?
41
+ *
42
+ * @see {@link https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1}
43
+ *
44
+ * @param value - the value to parse.
45
+ * @returns a Date or undefined.
46
+ */
47
+ export declare const _parseRfc7231DateTime: (value: unknown) => Date | undefined;
@@ -9,4 +9,5 @@ export * from "./schemas/Schema";
9
9
  export * from "./schemas/SimpleSchema";
10
10
  export * from "./schemas/StructureSchema";
11
11
  export * from "./schemas/sentinels";
12
+ export * from "./schemas/translateTraits";
12
13
  export * from "./TypeRegistry";
@@ -1,4 +1,4 @@
1
- import { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISchema, SchemaRef, SchemaTraits, SchemaTraitsObject } from "@smithy/types";
1
+ import { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISchema, SchemaRef, SchemaTraitsObject } from "@smithy/types";
2
2
  /**
3
3
  * Wraps both class instances, numeric sentinel values, and member schema pairs.
4
4
  * Presents a consistent interface for interacting with polymorphic schema representations.
@@ -7,7 +7,7 @@ import { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISchema,
7
7
  */
8
8
  export declare class NormalizedSchema implements INormalizedSchema {
9
9
  readonly ref: SchemaRef;
10
- private memberName?;
10
+ private readonly memberName?;
11
11
  static readonly symbol: unique symbol;
12
12
  protected readonly symbol: symbol;
13
13
  private readonly name;
@@ -26,11 +26,6 @@ export declare class NormalizedSchema implements INormalizedSchema {
26
26
  * Static constructor that attempts to avoid wrapping a NormalizedSchema within another.
27
27
  */
28
28
  static of(ref: SchemaRef): NormalizedSchema;
29
- /**
30
- * @param indicator - numeric indicator for preset trait combination.
31
- * @returns equivalent trait object.
32
- */
33
- static translateTraits(indicator: SchemaTraits): SchemaTraitsObject;
34
29
  /**
35
30
  * @returns the underlying non-normalized schema.
36
31
  */
@@ -42,11 +37,9 @@ export declare class NormalizedSchema implements INormalizedSchema {
42
37
  getName(withNamespace?: boolean): string | undefined;
43
38
  /**
44
39
  * @returns the member name if the schema is a member schema.
45
- * @throws Error when the schema isn't a member schema.
46
40
  */
47
41
  getMemberName(): string;
48
42
  isMemberSchema(): boolean;
49
- isUnitSchema(): boolean;
50
43
  /**
51
44
  * boolean methods on this class help control flow in shape serialization and deserialization.
52
45
  */
@@ -55,6 +48,7 @@ export declare class NormalizedSchema implements INormalizedSchema {
55
48
  isStructSchema(): boolean;
56
49
  isBlobSchema(): boolean;
57
50
  isTimestampSchema(): boolean;
51
+ isUnitSchema(): boolean;
58
52
  isDocumentSchema(): boolean;
59
53
  isStringSchema(): boolean;
60
54
  isBooleanSchema(): boolean;
@@ -94,20 +88,15 @@ export declare class NormalizedSchema implements INormalizedSchema {
94
88
  * @throws Error if the schema is not a Map, List, nor Document.
95
89
  */
96
90
  getValueSchema(): NormalizedSchema;
97
- /**
98
- * @param member - to query.
99
- * @returns whether there is a memberSchema with the given member name. False if not a structure (or union).
100
- */
101
- hasMemberSchema(member: string): boolean;
102
91
  /**
103
92
  * @returns the NormalizedSchema for the given member name. The returned instance will return true for `isMemberSchema()`
104
93
  * and will have the member name given.
105
- * @param member - which member to retrieve and wrap.
94
+ * @param memberName - which member to retrieve and wrap.
106
95
  *
107
96
  * @throws Error if member does not exist or the schema is neither a document nor structure.
108
97
  * Note that errors are assumed to be structures and unions are considered structures for these purposes.
109
98
  */
110
- getMemberSchema(member: string): NormalizedSchema;
99
+ getMemberSchema(memberName: string): NormalizedSchema;
111
100
  /**
112
101
  * This can be used for checking the members as a hashmap.
113
102
  * Prefer the structIterator method for iteration.
@@ -134,12 +123,4 @@ export declare class NormalizedSchema implements INormalizedSchema {
134
123
  string,
135
124
  NormalizedSchema
136
125
  ], undefined, undefined>;
137
- /**
138
- * Creates a normalized member schema from the given schema and member name.
139
- */
140
- private memberFrom;
141
- /**
142
- * @returns a last-resort human-readable name for the schema if it has no other identifiers.
143
- */
144
- private getSchemaName;
145
126
  }
@@ -2,6 +2,8 @@ import { BigDecimalSchema, BigIntegerSchema, BlobSchema, BooleanSchema, Document
2
2
  /**
3
3
  * Schema sentinel runtime values.
4
4
  * @alpha
5
+ *
6
+ * @deprecated use inline numbers with type annotation to save space.
5
7
  */
6
8
  export declare const SCHEMA: {
7
9
  BLOB: BlobSchema;
@@ -0,0 +1,7 @@
1
+ import { SchemaTraits, SchemaTraitsObject } from "@smithy/types";
2
+ /**
3
+ * @internal
4
+ * @param indicator - numeric indicator for preset trait combination.
5
+ * @returns equivalent trait object.
6
+ */
7
+ export declare function translateTraits(indicator: SchemaTraits): SchemaTraitsObject;
@@ -4,6 +4,7 @@ export * from "./generateIdempotencyToken";
4
4
  export * from "./lazy-json";
5
5
  export * from "./parse-utils";
6
6
  export * from "./quote-header";
7
+ export * from "./schema-serde-lib/schema-date-utils";
7
8
  export * from "./split-every";
8
9
  export * from "./split-header";
9
10
  export * from "./value/NumericValue";
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @internal
3
+ *
4
+ * Parses a value into a Date. Returns undefined if the input is null or
5
+ * undefined, throws an error if the input is not a number or a parseable string.
6
+ *
7
+ * Input strings must be an integer or floating point number. Fractional seconds are supported.
8
+ *
9
+ * @param value - the value to parse
10
+ * @returns a Date or undefined
11
+ */
12
+ export declare const _parseEpochTimestamp: (value: unknown) => Date | undefined;
13
+ /**
14
+ * @internal
15
+ *
16
+ * Parses a value into a Date. Returns undefined if the input is null or
17
+ * undefined, throws an error if the input is not a string that can be parsed
18
+ * as an RFC 3339 date.
19
+ *
20
+ * Input strings must conform to RFC3339 section 5.6, and can have a UTC
21
+ * offset. Fractional precision is supported.
22
+ *
23
+ * @see {@link https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14}
24
+ *
25
+ * @param value - the value to parse
26
+ * @returns a Date or undefined
27
+ */
28
+ export declare const _parseRfc3339DateTimeWithOffset: (value: unknown) => Date | undefined;
29
+ /**
30
+ * @internal
31
+ *
32
+ * Parses a value into a Date. Returns undefined if the input is null or
33
+ * undefined, throws an error if the input is not a string that can be parsed
34
+ * as an RFC 7231 date.
35
+ *
36
+ * Input strings must conform to RFC7231 section 7.1.1.1. Fractional seconds are supported.
37
+ *
38
+ * RFC 850 and unix asctime formats are also accepted.
39
+ * todo: practically speaking, are RFC 850 and asctime even used anymore?
40
+ * todo: can we remove those parts?
41
+ *
42
+ * @see {@link https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1}
43
+ *
44
+ * @param value - the value to parse.
45
+ * @returns a Date or undefined.
46
+ */
47
+ export declare const _parseRfc7231DateTime: (value: unknown) => Date | undefined;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.14.0",
3
+ "version": "3.15.0",
4
4
  "scripts": {
5
5
  "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline core",
@@ -80,10 +80,10 @@
80
80
  "@smithy/middleware-serde": "^4.2.0",
81
81
  "@smithy/protocol-http": "^5.3.0",
82
82
  "@smithy/types": "^4.6.0",
83
- "@smithy/util-base64": "^4.2.0",
83
+ "@smithy/util-base64": "^4.3.0",
84
84
  "@smithy/util-body-length-browser": "^4.2.0",
85
85
  "@smithy/util-middleware": "^4.2.0",
86
- "@smithy/util-stream": "^4.4.0",
86
+ "@smithy/util-stream": "^4.5.0",
87
87
  "@smithy/util-utf8": "^4.2.0",
88
88
  "@smithy/uuid": "^1.1.0",
89
89
  "tslib": "^2.6.2"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/fetch-http-handler",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "description": "Provides a way to make requests",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
@@ -31,7 +31,7 @@
31
31
  "@smithy/protocol-http": "^5.3.0",
32
32
  "@smithy/querystring-builder": "^4.2.0",
33
33
  "@smithy/types": "^4.6.0",
34
- "@smithy/util-base64": "^4.2.0",
34
+ "@smithy/util-base64": "^4.3.0",
35
35
  "tslib": "^2.6.2"
36
36
  },
37
37
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-endpoint",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline middleware-endpoint",
@@ -25,7 +25,7 @@
25
25
  "license": "Apache-2.0",
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
- "@smithy/core": "^3.14.0",
28
+ "@smithy/core": "^3.15.0",
29
29
  "@smithy/middleware-serde": "^4.2.0",
30
30
  "@smithy/node-config-provider": "^4.3.0",
31
31
  "@smithy/shared-ini-file-loader": "^4.3.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-retry",
3
- "version": "4.4.0",
3
+ "version": "4.4.1",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline middleware-retry",
@@ -37,7 +37,7 @@
37
37
  "@smithy/node-config-provider": "^4.3.0",
38
38
  "@smithy/protocol-http": "^5.3.0",
39
39
  "@smithy/service-error-classification": "^4.2.0",
40
- "@smithy/smithy-client": "^4.7.0",
40
+ "@smithy/smithy-client": "^4.7.1",
41
41
  "@smithy/types": "^4.6.0",
42
42
  "@smithy/util-middleware": "^4.2.0",
43
43
  "@smithy/util-retry": "^4.2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/smithy-client",
3
- "version": "4.7.0",
3
+ "version": "4.7.1",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline smithy-client",
@@ -25,12 +25,12 @@
25
25
  "license": "Apache-2.0",
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
- "@smithy/core": "^3.14.0",
29
- "@smithy/middleware-endpoint": "^4.3.0",
28
+ "@smithy/core": "^3.15.0",
29
+ "@smithy/middleware-endpoint": "^4.3.1",
30
30
  "@smithy/middleware-stack": "^4.2.0",
31
31
  "@smithy/protocol-http": "^5.3.0",
32
32
  "@smithy/types": "^4.6.0",
33
- "@smithy/util-stream": "^4.4.0",
33
+ "@smithy/util-stream": "^4.5.0",
34
34
  "tslib": "^2.6.2"
35
35
  },
36
36
  "engines": {
@@ -1,35 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.maxLetterValue = exports.bitsPerByte = exports.bitsPerLetter = exports.alphabetByValue = exports.alphabetByEncoding = void 0;
4
- const alphabetByEncoding = {};
5
- exports.alphabetByEncoding = alphabetByEncoding;
6
- const alphabetByValue = new Array(64);
7
- exports.alphabetByValue = alphabetByValue;
8
- for (let i = 0, start = "A".charCodeAt(0), limit = "Z".charCodeAt(0); i + start <= limit; i++) {
9
- const char = String.fromCharCode(i + start);
10
- alphabetByEncoding[char] = i;
11
- alphabetByValue[i] = char;
12
- }
13
- for (let i = 0, start = "a".charCodeAt(0), limit = "z".charCodeAt(0); i + start <= limit; i++) {
14
- const char = String.fromCharCode(i + start);
15
- const index = i + 26;
16
- alphabetByEncoding[char] = index;
17
- alphabetByValue[index] = char;
18
- }
19
- for (let i = 0; i < 10; i++) {
20
- alphabetByEncoding[i.toString(10)] = i + 52;
21
- const char = i.toString(10);
22
- const index = i + 52;
23
- alphabetByEncoding[char] = index;
24
- alphabetByValue[index] = char;
25
- }
26
- alphabetByEncoding["+"] = 62;
27
- alphabetByValue[62] = "+";
28
- alphabetByEncoding["/"] = 63;
29
- alphabetByValue[63] = "/";
30
- const bitsPerLetter = 6;
31
- exports.bitsPerLetter = bitsPerLetter;
32
- const bitsPerByte = 8;
33
- exports.bitsPerByte = bitsPerByte;
34
- const maxLetterValue = 0b111111;
35
- exports.maxLetterValue = maxLetterValue;
4
+ const chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;
5
+ exports.alphabetByEncoding = Object.entries(chars).reduce((acc, [i, c]) => {
6
+ acc[c] = Number(i);
7
+ return acc;
8
+ }, {});
9
+ exports.alphabetByValue = chars.split("");
10
+ exports.bitsPerLetter = 6;
11
+ exports.bitsPerByte = 8;
12
+ exports.maxLetterValue = 0b111111;
@@ -1,28 +1,9 @@
1
- const alphabetByEncoding = {};
2
- const alphabetByValue = new Array(64);
3
- for (let i = 0, start = "A".charCodeAt(0), limit = "Z".charCodeAt(0); i + start <= limit; i++) {
4
- const char = String.fromCharCode(i + start);
5
- alphabetByEncoding[char] = i;
6
- alphabetByValue[i] = char;
7
- }
8
- for (let i = 0, start = "a".charCodeAt(0), limit = "z".charCodeAt(0); i + start <= limit; i++) {
9
- const char = String.fromCharCode(i + start);
10
- const index = i + 26;
11
- alphabetByEncoding[char] = index;
12
- alphabetByValue[index] = char;
13
- }
14
- for (let i = 0; i < 10; i++) {
15
- alphabetByEncoding[i.toString(10)] = i + 52;
16
- const char = i.toString(10);
17
- const index = i + 52;
18
- alphabetByEncoding[char] = index;
19
- alphabetByValue[index] = char;
20
- }
21
- alphabetByEncoding["+"] = 62;
22
- alphabetByValue[62] = "+";
23
- alphabetByEncoding["/"] = 63;
24
- alphabetByValue[63] = "/";
25
- const bitsPerLetter = 6;
26
- const bitsPerByte = 8;
27
- const maxLetterValue = 0b111111;
28
- export { alphabetByEncoding, alphabetByValue, bitsPerLetter, bitsPerByte, maxLetterValue };
1
+ const chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;
2
+ export const alphabetByEncoding = Object.entries(chars).reduce((acc, [i, c]) => {
3
+ acc[c] = Number(i);
4
+ return acc;
5
+ }, {});
6
+ export const alphabetByValue = chars.split("");
7
+ export const bitsPerLetter = 6;
8
+ export const bitsPerByte = 8;
9
+ export const maxLetterValue = 0b111111;
@@ -1,6 +1,5 @@
1
- declare const alphabetByEncoding: Record<string, number>;
2
- declare const alphabetByValue: Array<string>;
3
- declare const bitsPerLetter = 6;
4
- declare const bitsPerByte = 8;
5
- declare const maxLetterValue = 63;
6
- export { alphabetByEncoding, alphabetByValue, bitsPerLetter, bitsPerByte, maxLetterValue };
1
+ export declare const alphabetByEncoding: Record<string, number>;
2
+ export declare const alphabetByValue: Array<string>;
3
+ export declare const bitsPerLetter = 6;
4
+ export declare const bitsPerByte = 8;
5
+ export declare const maxLetterValue = 63;
@@ -1,6 +1,5 @@
1
- declare const alphabetByEncoding: Record<string, number>;
2
- declare const alphabetByValue: Array<string>;
3
- declare const bitsPerLetter = 6;
4
- declare const bitsPerByte = 8;
5
- declare const maxLetterValue = 63;
6
- export { alphabetByEncoding, alphabetByValue, bitsPerLetter, bitsPerByte, maxLetterValue };
1
+ export declare const alphabetByEncoding: Record<string, number>;
2
+ export declare const alphabetByValue: Array<string>;
3
+ export declare const bitsPerLetter = 6;
4
+ export declare const bitsPerByte = 8;
5
+ export declare const maxLetterValue = 63;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-base64",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
4
  "description": "A Base64 <-> UInt8Array converter",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var fs = require('fs');
3
+ var node_fs = require('node:fs');
4
4
 
5
5
  const calculateBodyLength = (body) => {
6
6
  if (!body) {
@@ -18,11 +18,13 @@ const calculateBodyLength = (body) => {
18
18
  else if (typeof body.start === "number" && typeof body.end === "number") {
19
19
  return body.end + 1 - body.start;
20
20
  }
21
- else if (typeof body.path === "string" || Buffer.isBuffer(body.path)) {
22
- return fs.lstatSync(body.path).size;
23
- }
24
- else if (typeof body.fd === "number") {
25
- return fs.fstatSync(body.fd).size;
21
+ else if (body instanceof node_fs.ReadStream) {
22
+ if (body.path != null) {
23
+ return node_fs.lstatSync(body.path).size;
24
+ }
25
+ else if (typeof body.fd === "number") {
26
+ return node_fs.fstatSync(body.fd).size;
27
+ }
26
28
  }
27
29
  throw new Error(`Body Length computation failed for ${body}`);
28
30
  };
@@ -1,4 +1,4 @@
1
- import { fstatSync, lstatSync } from "fs";
1
+ import { fstatSync, lstatSync, ReadStream } from "node:fs";
2
2
  export const calculateBodyLength = (body) => {
3
3
  if (!body) {
4
4
  return 0;
@@ -15,11 +15,13 @@ export const calculateBodyLength = (body) => {
15
15
  else if (typeof body.start === "number" && typeof body.end === "number") {
16
16
  return body.end + 1 - body.start;
17
17
  }
18
- else if (typeof body.path === "string" || Buffer.isBuffer(body.path)) {
19
- return lstatSync(body.path).size;
20
- }
21
- else if (typeof body.fd === "number") {
22
- return fstatSync(body.fd).size;
18
+ else if (body instanceof ReadStream) {
19
+ if (body.path != null) {
20
+ return lstatSync(body.path).size;
21
+ }
22
+ else if (typeof body.fd === "number") {
23
+ return fstatSync(body.fd).size;
24
+ }
23
25
  }
24
26
  throw new Error(`Body Length computation failed for ${body}`);
25
27
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@smithy/util-body-length-node",
3
3
  "description": "Determines the length of a request body in node.js",
4
- "version": "4.2.0",
4
+ "version": "4.2.1",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
7
7
  "build:cjs": "node ../../scripts/inline util-body-length-node",
@@ -1,15 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveDefaultsModeConfig = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const property_provider_1 = require("@smithy/property-provider");
6
- const bowser_1 = tslib_1.__importDefault(require("bowser"));
7
5
  const constants_1 = require("./constants");
8
6
  const resolveDefaultsModeConfig = ({ defaultsMode, } = {}) => (0, property_provider_1.memoize)(async () => {
9
7
  const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode;
10
8
  switch (mode?.toLowerCase()) {
11
9
  case "auto":
12
- return Promise.resolve(isMobileBrowser() ? "mobile" : "standard");
10
+ return Promise.resolve(useMobileConfiguration() ? "mobile" : "standard");
13
11
  case "mobile":
14
12
  case "in-region":
15
13
  case "cross-region":
@@ -23,10 +21,14 @@ const resolveDefaultsModeConfig = ({ defaultsMode, } = {}) => (0, property_provi
23
21
  }
24
22
  });
25
23
  exports.resolveDefaultsModeConfig = resolveDefaultsModeConfig;
26
- const isMobileBrowser = () => {
27
- const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent
28
- ? bowser_1.default.parse(window.navigator.userAgent)
29
- : undefined;
30
- const platform = parsedUA?.platform?.type;
31
- return platform === "tablet" || platform === "mobile";
24
+ const useMobileConfiguration = () => {
25
+ const navigator = window?.navigator;
26
+ if (navigator?.connection) {
27
+ const { effectiveType, rtt, downlink } = navigator?.connection;
28
+ const slow = (typeof effectiveType === "string" && effectiveType !== "4g") || Number(rtt) > 100 || Number(downlink) < 10;
29
+ if (slow) {
30
+ return true;
31
+ }
32
+ }
33
+ return (navigator?.userAgentData?.mobile || (typeof navigator?.maxTouchPoints === "number" && navigator?.maxTouchPoints > 1));
32
34
  };
@@ -1,11 +1,10 @@
1
1
  import { memoize } from "@smithy/property-provider";
2
- import bowser from "bowser";
3
2
  import { DEFAULTS_MODE_OPTIONS } from "./constants";
4
3
  export const resolveDefaultsModeConfig = ({ defaultsMode, } = {}) => memoize(async () => {
5
4
  const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode;
6
5
  switch (mode?.toLowerCase()) {
7
6
  case "auto":
8
- return Promise.resolve(isMobileBrowser() ? "mobile" : "standard");
7
+ return Promise.resolve(useMobileConfiguration() ? "mobile" : "standard");
9
8
  case "mobile":
10
9
  case "in-region":
11
10
  case "cross-region":
@@ -18,10 +17,14 @@ export const resolveDefaultsModeConfig = ({ defaultsMode, } = {}) => memoize(asy
18
17
  throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`);
19
18
  }
20
19
  });
21
- const isMobileBrowser = () => {
22
- const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent
23
- ? bowser.parse(window.navigator.userAgent)
24
- : undefined;
25
- const platform = parsedUA?.platform?.type;
26
- return platform === "tablet" || platform === "mobile";
20
+ const useMobileConfiguration = () => {
21
+ const navigator = window?.navigator;
22
+ if (navigator?.connection) {
23
+ const { effectiveType, rtt, downlink } = navigator?.connection;
24
+ const slow = (typeof effectiveType === "string" && effectiveType !== "4g") || Number(rtt) > 100 || Number(downlink) < 10;
25
+ if (slow) {
26
+ return true;
27
+ }
28
+ }
29
+ return (navigator?.userAgentData?.mobile || (typeof navigator?.maxTouchPoints === "number" && navigator?.maxTouchPoints > 1));
27
30
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-browser",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline util-defaults-mode-browser",
@@ -25,9 +25,8 @@
25
25
  "sideEffects": false,
26
26
  "dependencies": {
27
27
  "@smithy/property-provider": "^4.2.0",
28
- "@smithy/smithy-client": "^4.7.0",
28
+ "@smithy/smithy-client": "^4.7.1",
29
29
  "@smithy/types": "^4.6.0",
30
- "bowser": "^2.11.0",
31
30
  "tslib": "^2.6.2"
32
31
  },
33
32
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-node",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline util-defaults-mode-node",
@@ -28,7 +28,7 @@
28
28
  "@smithy/credential-provider-imds": "^4.2.0",
29
29
  "@smithy/node-config-provider": "^4.3.0",
30
30
  "@smithy/property-provider": "^4.2.0",
31
- "@smithy/smithy-client": "^4.7.0",
31
+ "@smithy/smithy-client": "^4.7.1",
32
32
  "@smithy/types": "^4.6.0",
33
33
  "tslib": "^2.6.2"
34
34
  },
@@ -26,12 +26,10 @@ function transformFromString(str, encoding) {
26
26
 
27
27
  class Uint8ArrayBlobAdapter extends Uint8Array {
28
28
  static fromString(source, encoding = "utf-8") {
29
- switch (typeof source) {
30
- case "string":
31
- return transformFromString(source, encoding);
32
- default:
33
- throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
29
+ if (typeof source === "string") {
30
+ return transformFromString(source, encoding);
34
31
  }
32
+ throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
35
33
  }
36
34
  static mutate(source) {
37
35
  Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype);
@@ -1,12 +1,10 @@
1
1
  import { transformFromString, transformToString } from "./transforms";
2
2
  export class Uint8ArrayBlobAdapter extends Uint8Array {
3
3
  static fromString(source, encoding = "utf-8") {
4
- switch (typeof source) {
5
- case "string":
6
- return transformFromString(source, encoding);
7
- default:
8
- throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
4
+ if (typeof source === "string") {
5
+ return transformFromString(source, encoding);
9
6
  }
7
+ throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
10
8
  }
11
9
  static mutate(source) {
12
10
  Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype);