@jjrawlins/cdk-ami-builder 0.0.143 → 0.0.144

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 (61) hide show
  1. package/.jsii +3 -3
  2. package/cdkamibuilder/go.mod +2 -2
  3. package/cdkamibuilder/jsii/jsii.go +2 -2
  4. package/cdkamibuilder/version +1 -1
  5. package/lib/ImagePipeline/ImagePipeline.js +1 -1
  6. package/lib/Lambdas/CheckStateMachineStatus/CheckStateMachineStatus-function.js +1 -1
  7. package/lib/Lambdas/StartStateMachine/StartStateMachine-function.js +1 -1
  8. package/node_modules/@aws-sdk/client-ec2/dist-cjs/index.js +68 -0
  9. package/node_modules/@aws-sdk/client-ec2/dist-es/models/enums.js +68 -0
  10. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateCapacityReservationFleetCommand.d.ts +2 -2
  11. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateFleetCommand.d.ts +4 -4
  12. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateLaunchTemplateCommand.d.ts +1 -1
  13. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateLaunchTemplateVersionCommand.d.ts +2 -2
  14. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeCapacityReservationFleetsCommand.d.ts +1 -1
  15. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeFleetsCommand.d.ts +4 -4
  16. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeInstanceImageMetadataCommand.d.ts +1 -1
  17. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeInstanceTypeOfferingsCommand.d.ts +1 -1
  18. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeInstanceTypesCommand.d.ts +2 -2
  19. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeInstancesCommand.d.ts +1 -1
  20. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeLaunchTemplateVersionsCommand.d.ts +1 -1
  21. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeReservedInstancesCommand.d.ts +1 -1
  22. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeReservedInstancesModificationsCommand.d.ts +1 -1
  23. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeReservedInstancesOfferingsCommand.d.ts +2 -2
  24. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeSpotFleetRequestsCommand.d.ts +2 -2
  25. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeSpotInstanceRequestsCommand.d.ts +1 -1
  26. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeSpotPriceHistoryCommand.d.ts +2 -2
  27. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetLaunchTemplateDataCommand.d.ts +1 -1
  28. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ImportInstanceCommand.d.ts +1 -1
  29. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyFleetCommand.d.ts +1 -1
  30. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyReservedInstancesCommand.d.ts +1 -1
  31. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifySpotFleetRequestCommand.d.ts +1 -1
  32. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RequestSpotFleetCommand.d.ts +2 -2
  33. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RequestSpotInstancesCommand.d.ts +2 -2
  34. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RunInstancesCommand.d.ts +2 -2
  35. package/node_modules/@aws-sdk/client-ec2/dist-types/models/enums.d.ts +68 -0
  36. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/enums.d.ts +68 -0
  37. package/node_modules/@aws-sdk/client-ec2/package.json +2 -2
  38. package/node_modules/@aws-sdk/core/dist-cjs/index.js +4 -44
  39. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +4 -44
  40. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +1 -2
  41. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +1 -2
  42. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.js +1 -2
  43. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +1 -2
  44. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +1 -2
  45. package/node_modules/@aws-sdk/core/package.json +1 -1
  46. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +7 -1
  47. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +7 -1
  48. package/node_modules/@smithy/core/package.json +1 -1
  49. package/node_modules/@smithy/middleware-endpoint/package.json +2 -2
  50. package/node_modules/@smithy/middleware-retry/package.json +2 -2
  51. package/node_modules/@smithy/smithy-client/dist-cjs/index.js +29 -3
  52. package/node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js +29 -3
  53. package/node_modules/@smithy/smithy-client/dist-types/create-aggregated-client.d.ts +8 -1
  54. package/node_modules/@smithy/smithy-client/dist-types/ts3.4/create-aggregated-client.d.ts +8 -1
  55. package/node_modules/@smithy/smithy-client/package.json +3 -3
  56. package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
  57. package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
  58. package/package.json +2 -2
  59. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/structIterator.js +0 -40
  60. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/structIterator.d.ts +0 -27
  61. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/structIterator.d.ts +0 -12
@@ -234,46 +234,6 @@ class SerdeContextConfig {
234
234
  }
235
235
  }
236
236
 
237
- function* serializingStructIterator(ns, sourceObject) {
238
- if (ns.isUnitSchema()) {
239
- return;
240
- }
241
- const struct = ns.getSchema();
242
- for (let i = 0; i < struct[4].length; ++i) {
243
- const key = struct[4][i];
244
- const memberSchema = struct[5][i];
245
- const memberNs = new schema.NormalizedSchema([memberSchema, 0], key);
246
- if (!(key in sourceObject) && !memberNs.isIdempotencyToken()) {
247
- continue;
248
- }
249
- yield [key, memberNs];
250
- }
251
- }
252
- function* deserializingStructIterator(ns, sourceObject, nameTrait) {
253
- if (ns.isUnitSchema()) {
254
- return;
255
- }
256
- const struct = ns.getSchema();
257
- let keysRemaining = Object.keys(sourceObject).filter((k) => k !== "__type").length;
258
- for (let i = 0; i < struct[4].length; ++i) {
259
- if (keysRemaining === 0) {
260
- break;
261
- }
262
- const key = struct[4][i];
263
- const memberSchema = struct[5][i];
264
- const memberNs = new schema.NormalizedSchema([memberSchema, 0], key);
265
- let serializationKey = key;
266
- if (nameTrait) {
267
- serializationKey = memberNs.getMergedTraits()[nameTrait] ?? key;
268
- }
269
- if (!(serializationKey in sourceObject)) {
270
- continue;
271
- }
272
- yield [key, memberNs];
273
- keysRemaining -= 1;
274
- }
275
- }
276
-
277
237
  class UnionSerde {
278
238
  from;
279
239
  to;
@@ -401,7 +361,7 @@ class JsonShapeDeserializer extends SerdeContextConfig {
401
361
  if (union) {
402
362
  unionSerde = new UnionSerde(record, out);
403
363
  }
404
- for (const [memberName, memberSchema] of deserializingStructIterator(ns, record, jsonName ? "jsonName" : false)) {
364
+ for (const [memberName, memberSchema] of ns.structIterator()) {
405
365
  let fromKey = memberName;
406
366
  if (jsonName) {
407
367
  fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;
@@ -610,7 +570,7 @@ class JsonShapeSerializer extends SerdeContextConfig {
610
570
  if (jsonName) {
611
571
  nameMap = {};
612
572
  }
613
- for (const [memberName, memberSchema] of serializingStructIterator(ns, record)) {
573
+ for (const [memberName, memberSchema] of ns.structIterator()) {
614
574
  const serializableValue = this._write(memberSchema, record[memberName], ns);
615
575
  if (serializableValue !== undefined) {
616
576
  let targetKey = memberName;
@@ -1229,7 +1189,7 @@ class QueryShapeSerializer extends SerdeContextConfig {
1229
1189
  else if (ns.isStructSchema()) {
1230
1190
  if (value && typeof value === "object") {
1231
1191
  let didWriteMember = false;
1232
- for (const [memberName, member] of serializingStructIterator(ns, value)) {
1192
+ for (const [memberName, member] of ns.structIterator()) {
1233
1193
  if (value[memberName] == null && !member.isIdempotencyToken()) {
1234
1194
  continue;
1235
1195
  }
@@ -1530,7 +1490,7 @@ class XmlShapeSerializer extends SerdeContextConfig {
1530
1490
  }
1531
1491
  const structXmlNode = xmlBuilder.XmlNode.of(name);
1532
1492
  const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);
1533
- for (const [memberName, memberSchema] of serializingStructIterator(ns, value)) {
1493
+ for (const [memberName, memberSchema] of ns.structIterator()) {
1534
1494
  const val = value[memberName];
1535
1495
  if (val != null || memberSchema.isIdempotencyToken()) {
1536
1496
  if (memberSchema.getMergedTraits().xmlAttribute) {
@@ -3,7 +3,6 @@ import { NormalizedSchema } from "@smithy/core/schema";
3
3
  import { LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, } from "@smithy/core/serde";
4
4
  import { fromBase64 } from "@smithy/util-base64";
5
5
  import { SerdeContextConfig } from "../ConfigurableSerdeContext";
6
- import { deserializingStructIterator } from "../structIterator";
7
6
  import { UnionSerde } from "../UnionSerde";
8
7
  import { jsonReviver } from "./jsonReviver";
9
8
  import { parseJsonBody } from "./parseJsonBody";
@@ -36,7 +35,7 @@ export class JsonShapeDeserializer extends SerdeContextConfig {
36
35
  if (union) {
37
36
  unionSerde = new UnionSerde(record, out);
38
37
  }
39
- for (const [memberName, memberSchema] of deserializingStructIterator(ns, record, jsonName ? "jsonName" : false)) {
38
+ for (const [memberName, memberSchema] of ns.structIterator()) {
40
39
  let fromKey = memberName;
41
40
  if (jsonName) {
42
41
  fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;
@@ -3,7 +3,6 @@ import { NormalizedSchema } from "@smithy/core/schema";
3
3
  import { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue } from "@smithy/core/serde";
4
4
  import { toBase64 } from "@smithy/util-base64";
5
5
  import { SerdeContextConfig } from "../ConfigurableSerdeContext";
6
- import { serializingStructIterator } from "../structIterator";
7
6
  import { JsonReplacer } from "./jsonReplacer";
8
7
  export class JsonShapeSerializer extends SerdeContextConfig {
9
8
  settings;
@@ -49,7 +48,7 @@ export class JsonShapeSerializer extends SerdeContextConfig {
49
48
  if (jsonName) {
50
49
  nameMap = {};
51
50
  }
52
- for (const [memberName, memberSchema] of serializingStructIterator(ns, record)) {
51
+ for (const [memberName, memberSchema] of ns.structIterator()) {
53
52
  const serializableValue = this._write(memberSchema, record[memberName], ns);
54
53
  if (serializableValue !== undefined) {
55
54
  let targetKey = memberName;
@@ -3,7 +3,6 @@ import { NormalizedSchema } from "@smithy/core/schema";
3
3
  import { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue } from "@smithy/core/serde";
4
4
  import { toBase64 } from "@smithy/util-base64";
5
5
  import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
6
- import { serializingStructIterator } from "../../structIterator";
7
6
  export class SinglePassJsonShapeSerializer extends SerdeContextConfig {
8
7
  settings;
9
8
  buffer;
@@ -46,7 +45,7 @@ export class SinglePassJsonShapeSerializer extends SerdeContextConfig {
46
45
  else if (ns.isStructSchema()) {
47
46
  b += "{";
48
47
  let didWriteMember = false;
49
- for (const [name, member] of serializingStructIterator(ns, value)) {
48
+ for (const [name, member] of ns.structIterator()) {
50
49
  const item = value[name];
51
50
  const targetKey = this.settings.jsonName ? member.getMergedTraits().jsonName ?? name : name;
52
51
  const serializableValue = this.writeValue(member, item);
@@ -4,7 +4,6 @@ import { generateIdempotencyToken, NumericValue } from "@smithy/core/serde";
4
4
  import { dateToUtcString } from "@smithy/smithy-client";
5
5
  import { toBase64 } from "@smithy/util-base64";
6
6
  import { SerdeContextConfig } from "../ConfigurableSerdeContext";
7
- import { serializingStructIterator } from "../structIterator";
8
7
  export class QueryShapeSerializer extends SerdeContextConfig {
9
8
  settings;
10
9
  buffer;
@@ -130,7 +129,7 @@ export class QueryShapeSerializer extends SerdeContextConfig {
130
129
  else if (ns.isStructSchema()) {
131
130
  if (value && typeof value === "object") {
132
131
  let didWriteMember = false;
133
- for (const [memberName, member] of serializingStructIterator(ns, value)) {
132
+ for (const [memberName, member] of ns.structIterator()) {
134
133
  if (value[memberName] == null && !member.isIdempotencyToken()) {
135
134
  continue;
136
135
  }
@@ -5,7 +5,6 @@ import { generateIdempotencyToken, NumericValue } from "@smithy/core/serde";
5
5
  import { dateToUtcString } from "@smithy/smithy-client";
6
6
  import { fromBase64, toBase64 } from "@smithy/util-base64";
7
7
  import { SerdeContextConfig } from "../ConfigurableSerdeContext";
8
- import { serializingStructIterator } from "../structIterator";
9
8
  export class XmlShapeSerializer extends SerdeContextConfig {
10
9
  settings;
11
10
  stringBuffer;
@@ -64,7 +63,7 @@ export class XmlShapeSerializer extends SerdeContextConfig {
64
63
  }
65
64
  const structXmlNode = XmlNode.of(name);
66
65
  const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);
67
- for (const [memberName, memberSchema] of serializingStructIterator(ns, value)) {
66
+ for (const [memberName, memberSchema] of ns.structIterator()) {
68
67
  const val = value[memberName];
69
68
  if (val != null || memberSchema.isIdempotencyToken()) {
70
69
  if (memberSchema.getMergedTraits().xmlAttribute) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/core",
3
- "version": "3.973.2",
3
+ "version": "3.973.3",
4
4
  "description": "Core functions & classes shared by multiple AWS SDK clients.",
5
5
  "scripts": {
6
6
  "build": "yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
@@ -323,7 +323,7 @@ class NormalizedSchema {
323
323
  }
324
324
  getSchema() {
325
325
  const sc = this.schema;
326
- if (sc[0] === 0) {
326
+ if (Array.isArray(sc) && sc[0] === 0) {
327
327
  return sc[4];
328
328
  }
329
329
  return sc;
@@ -353,6 +353,9 @@ class NormalizedSchema {
353
353
  }
354
354
  isStructSchema() {
355
355
  const sc = this.getSchema();
356
+ if (typeof sc !== "object") {
357
+ return false;
358
+ }
356
359
  const id = sc[0];
357
360
  return (id === 3 ||
358
361
  id === -3 ||
@@ -360,6 +363,9 @@ class NormalizedSchema {
360
363
  }
361
364
  isUnionSchema() {
362
365
  const sc = this.getSchema();
366
+ if (typeof sc !== "object") {
367
+ return false;
368
+ }
363
369
  return sc[0] === 4;
364
370
  }
365
371
  isBlobSchema() {
@@ -83,7 +83,7 @@ export class NormalizedSchema {
83
83
  }
84
84
  getSchema() {
85
85
  const sc = this.schema;
86
- if (sc[0] === 0) {
86
+ if (Array.isArray(sc) && sc[0] === 0) {
87
87
  return sc[4];
88
88
  }
89
89
  return sc;
@@ -113,6 +113,9 @@ export class NormalizedSchema {
113
113
  }
114
114
  isStructSchema() {
115
115
  const sc = this.getSchema();
116
+ if (typeof sc !== "object") {
117
+ return false;
118
+ }
116
119
  const id = sc[0];
117
120
  return (id === 3 ||
118
121
  id === -3 ||
@@ -120,6 +123,9 @@ export class NormalizedSchema {
120
123
  }
121
124
  isUnionSchema() {
122
125
  const sc = this.getSchema();
126
+ if (typeof sc !== "object") {
127
+ return false;
128
+ }
123
129
  return sc[0] === 4;
124
130
  }
125
131
  isBlobSchema() {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.21.1",
3
+ "version": "3.22.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",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-endpoint",
3
- "version": "4.4.11",
3
+ "version": "4.4.12",
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.21.1",
28
+ "@smithy/core": "^3.22.0",
29
29
  "@smithy/middleware-serde": "^4.2.9",
30
30
  "@smithy/node-config-provider": "^4.3.8",
31
31
  "@smithy/shared-ini-file-loader": "^4.4.3",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-retry",
3
- "version": "4.4.27",
3
+ "version": "4.4.29",
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.8",
38
38
  "@smithy/protocol-http": "^5.3.8",
39
39
  "@smithy/service-error-classification": "^4.2.8",
40
- "@smithy/smithy-client": "^4.10.12",
40
+ "@smithy/smithy-client": "^4.11.1",
41
41
  "@smithy/types": "^4.12.0",
42
42
  "@smithy/util-middleware": "^4.2.8",
43
43
  "@smithy/util-retry": "^4.2.8",
@@ -215,9 +215,8 @@ class ClassBuilder {
215
215
 
216
216
  const SENSITIVE_STRING = "***SensitiveInformation***";
217
217
 
218
- const createAggregatedClient = (commands, Client) => {
219
- for (const command of Object.keys(commands)) {
220
- const CommandCtor = commands[command];
218
+ const createAggregatedClient = (commands, Client, options) => {
219
+ for (const [command, CommandCtor] of Object.entries(commands)) {
221
220
  const methodImpl = async function (args, optionsOrCb, cb) {
222
221
  const command = new CommandCtor(args);
223
222
  if (typeof optionsOrCb === "function") {
@@ -235,6 +234,33 @@ const createAggregatedClient = (commands, Client) => {
235
234
  const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, "");
236
235
  Client.prototype[methodName] = methodImpl;
237
236
  }
237
+ const { paginators = {}, waiters = {} } = options ?? {};
238
+ for (const [paginatorName, paginatorFn] of Object.entries(paginators)) {
239
+ if (Client.prototype[paginatorName] === void 0) {
240
+ Client.prototype[paginatorName] = function (commandInput = {}, paginationConfiguration, ...rest) {
241
+ return paginatorFn({
242
+ ...paginationConfiguration,
243
+ client: this,
244
+ }, commandInput, ...rest);
245
+ };
246
+ }
247
+ }
248
+ for (const [waiterName, waiterFn] of Object.entries(waiters)) {
249
+ if (Client.prototype[waiterName] === void 0) {
250
+ Client.prototype[waiterName] = async function (commandInput = {}, waiterConfiguration, ...rest) {
251
+ let config = waiterConfiguration;
252
+ if (typeof waiterConfiguration === "number") {
253
+ config = {
254
+ maxWaitTime: waiterConfiguration,
255
+ };
256
+ }
257
+ return waiterFn({
258
+ ...config,
259
+ client: this,
260
+ }, commandInput, ...rest);
261
+ };
262
+ }
263
+ }
238
264
  };
239
265
 
240
266
  class ServiceException extends Error {
@@ -1,6 +1,5 @@
1
- export const createAggregatedClient = (commands, Client) => {
2
- for (const command of Object.keys(commands)) {
3
- const CommandCtor = commands[command];
1
+ export const createAggregatedClient = (commands, Client, options) => {
2
+ for (const [command, CommandCtor] of Object.entries(commands)) {
4
3
  const methodImpl = async function (args, optionsOrCb, cb) {
5
4
  const command = new CommandCtor(args);
6
5
  if (typeof optionsOrCb === "function") {
@@ -18,4 +17,31 @@ export const createAggregatedClient = (commands, Client) => {
18
17
  const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, "");
19
18
  Client.prototype[methodName] = methodImpl;
20
19
  }
20
+ const { paginators = {}, waiters = {} } = options ?? {};
21
+ for (const [paginatorName, paginatorFn] of Object.entries(paginators)) {
22
+ if (Client.prototype[paginatorName] === void 0) {
23
+ Client.prototype[paginatorName] = function (commandInput = {}, paginationConfiguration, ...rest) {
24
+ return paginatorFn({
25
+ ...paginationConfiguration,
26
+ client: this,
27
+ }, commandInput, ...rest);
28
+ };
29
+ }
30
+ }
31
+ for (const [waiterName, waiterFn] of Object.entries(waiters)) {
32
+ if (Client.prototype[waiterName] === void 0) {
33
+ Client.prototype[waiterName] = async function (commandInput = {}, waiterConfiguration, ...rest) {
34
+ let config = waiterConfiguration;
35
+ if (typeof waiterConfiguration === "number") {
36
+ config = {
37
+ maxWaitTime: waiterConfiguration,
38
+ };
39
+ }
40
+ return waiterFn({
41
+ ...config,
42
+ client: this,
43
+ }, commandInput, ...rest);
44
+ };
45
+ }
46
+ }
21
47
  };
@@ -3,9 +3,16 @@ import type { Client } from "./client";
3
3
  * @internal
4
4
  *
5
5
  * @param commands - command lookup container.
6
- * @param client - client instance on which to add aggregated methods.
6
+ * @param Client - client instance on which to add aggregated methods.
7
+ * @param options
8
+ * @param options.paginators - paginator functions.
9
+ * @param options.waiters - waiter functions.
10
+ *
7
11
  * @returns an aggregated client with dynamically created methods.
8
12
  */
9
13
  export declare const createAggregatedClient: (commands: Record<string, any>, Client: {
10
14
  new (...args: any): Client<any, any, any, any>;
15
+ }, options?: {
16
+ paginators?: Record<string, any>;
17
+ waiters?: Record<string, any>;
11
18
  }) => void;
@@ -3,9 +3,16 @@ import { Client } from "./client";
3
3
  * @internal
4
4
  *
5
5
  * @param commands - command lookup container.
6
- * @param client - client instance on which to add aggregated methods.
6
+ * @param Client - client instance on which to add aggregated methods.
7
+ * @param options
8
+ * @param options.paginators - paginator functions.
9
+ * @param options.waiters - waiter functions.
10
+ *
7
11
  * @returns an aggregated client with dynamically created methods.
8
12
  */
9
13
  export declare const createAggregatedClient: (commands: Record<string, any>, Client: {
10
14
  new (...args: any): Client<any, any, any, any>;
15
+ }, options?: {
16
+ paginators?: Record<string, any>;
17
+ waiters?: Record<string, any>;
11
18
  }) => void;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/smithy-client",
3
- "version": "4.10.12",
3
+ "version": "4.11.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,8 +25,8 @@
25
25
  "license": "Apache-2.0",
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
- "@smithy/core": "^3.21.1",
29
- "@smithy/middleware-endpoint": "^4.4.11",
28
+ "@smithy/core": "^3.22.0",
29
+ "@smithy/middleware-endpoint": "^4.4.12",
30
30
  "@smithy/middleware-stack": "^4.2.8",
31
31
  "@smithy/protocol-http": "^5.3.8",
32
32
  "@smithy/types": "^4.12.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-browser",
3
- "version": "4.3.26",
3
+ "version": "4.3.28",
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,7 +25,7 @@
25
25
  "sideEffects": false,
26
26
  "dependencies": {
27
27
  "@smithy/property-provider": "^4.2.8",
28
- "@smithy/smithy-client": "^4.10.12",
28
+ "@smithy/smithy-client": "^4.11.1",
29
29
  "@smithy/types": "^4.12.0",
30
30
  "tslib": "^2.6.2"
31
31
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-node",
3
- "version": "4.2.29",
3
+ "version": "4.2.31",
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.8",
29
29
  "@smithy/node-config-provider": "^4.3.8",
30
30
  "@smithy/property-provider": "^4.2.8",
31
- "@smithy/smithy-client": "^4.10.12",
31
+ "@smithy/smithy-client": "^4.11.1",
32
32
  "@smithy/types": "^4.12.0",
33
33
  "tslib": "^2.6.2"
34
34
  },
package/package.json CHANGED
@@ -78,7 +78,7 @@
78
78
  "constructs": ">=10.0.5 <11.0.0"
79
79
  },
80
80
  "dependencies": {
81
- "@aws-sdk/client-ec2": "^3.976.0",
81
+ "@aws-sdk/client-ec2": "^3.977.0",
82
82
  "@aws-sdk/client-ecs": "^3.975.0",
83
83
  "@aws-sdk/client-kms": "^3.975.0",
84
84
  "@aws-sdk/client-s3": "^3.975.0",
@@ -136,7 +136,7 @@
136
136
  "publishConfig": {
137
137
  "access": "public"
138
138
  },
139
- "version": "0.0.143",
139
+ "version": "0.0.144",
140
140
  "jest": {
141
141
  "coverageProvider": "v8",
142
142
  "testMatch": [
@@ -1,40 +0,0 @@
1
- import { NormalizedSchema } from "@smithy/core/schema";
2
- export function* serializingStructIterator(ns, sourceObject) {
3
- if (ns.isUnitSchema()) {
4
- return;
5
- }
6
- const struct = ns.getSchema();
7
- for (let i = 0; i < struct[4].length; ++i) {
8
- const key = struct[4][i];
9
- const memberSchema = struct[5][i];
10
- const memberNs = new NormalizedSchema([memberSchema, 0], key);
11
- if (!(key in sourceObject) && !memberNs.isIdempotencyToken()) {
12
- continue;
13
- }
14
- yield [key, memberNs];
15
- }
16
- }
17
- export function* deserializingStructIterator(ns, sourceObject, nameTrait) {
18
- if (ns.isUnitSchema()) {
19
- return;
20
- }
21
- const struct = ns.getSchema();
22
- let keysRemaining = Object.keys(sourceObject).filter((k) => k !== "__type").length;
23
- for (let i = 0; i < struct[4].length; ++i) {
24
- if (keysRemaining === 0) {
25
- break;
26
- }
27
- const key = struct[4][i];
28
- const memberSchema = struct[5][i];
29
- const memberNs = new NormalizedSchema([memberSchema, 0], key);
30
- let serializationKey = key;
31
- if (nameTrait) {
32
- serializationKey = memberNs.getMergedTraits()[nameTrait] ?? key;
33
- }
34
- if (!(serializationKey in sourceObject)) {
35
- continue;
36
- }
37
- yield [key, memberNs];
38
- keysRemaining -= 1;
39
- }
40
- }
@@ -1,27 +0,0 @@
1
- import { NormalizedSchema } from "@smithy/core/schema";
2
- /**
3
- * @internal
4
- */
5
- type SourceObject = Record<string, any>;
6
- /**
7
- * For serialization use only.
8
- * @internal
9
- *
10
- * @param ns - normalized schema object.
11
- * @param sourceObject - source object from serialization.
12
- */
13
- export declare function serializingStructIterator(ns: NormalizedSchema, sourceObject: SourceObject): Generator<any[], void, unknown>;
14
- /**
15
- * For deserialization use only.
16
- * Yields a subset of NormalizedSchema::structIterator matched to the source object keys.
17
- * This is a performance optimization to avoid creation of NormalizedSchema member
18
- * objects for members that are undefined in the source data object but may be numerous
19
- * in the schema/model.
20
- * @internal
21
- *
22
- * @param ns - normalized schema object.
23
- * @param sourceObject - source object from deserialization.
24
- * @param nameTrait - xmlName or jsonName trait to look for.
25
- */
26
- export declare function deserializingStructIterator(ns: NormalizedSchema, sourceObject: SourceObject, nameTrait?: "xmlName" | "jsonName" | false): Generator<any[], void, unknown>;
27
- export {};
@@ -1,12 +0,0 @@
1
- import { NormalizedSchema } from "@smithy/core/schema";
2
- type SourceObject = Record<string, any>;
3
- export declare function serializingStructIterator(
4
- ns: NormalizedSchema,
5
- sourceObject: SourceObject
6
- ): Generator<any[], void, unknown>;
7
- export declare function deserializingStructIterator(
8
- ns: NormalizedSchema,
9
- sourceObject: SourceObject,
10
- nameTrait?: "xmlName" | "jsonName" | false
11
- ): Generator<any[], void, unknown>;
12
- export {};