cdk-real-drift 0.2.47 → 0.2.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -6767,7 +6767,7 @@ const readEc2Eip = async ({ physicalId, region }) => {
6767
6767
  return model;
6768
6768
  };
6769
6769
  const dimSetEqual = (a, b) => {
6770
- const norm = (v) => JSON.stringify((Array.isArray(v) ? v : []).map((d) => [str$1(d.Name) ?? "", str$1(d.Value) ?? ""]).sort());
6770
+ const norm = (v) => JSON.stringify((Array.isArray(v) ? v : []).map((d) => [str$1(d.Name) ?? "", str$1(d.Value) ?? ""]).sort((x, y) => x[0] === y[0] ? x[1].localeCompare(y[1]) : x[0].localeCompare(y[0])));
6771
6771
  return norm(a) === norm(b);
6772
6772
  };
6773
6773
  const cfnRangeTime = (v) => v instanceof Date ? v.toISOString().slice(0, 19) : v;
@@ -7078,10 +7078,21 @@ const readEc2ClientVpnAuthorizationRule = async ({ declared, region }) => {
7078
7078
  if (!endpointId) return void 0;
7079
7079
  const cidr = str$1(declared.TargetNetworkCidr);
7080
7080
  const groupId = str$1(declared.AccessGroupId);
7081
- const rule = ((await new EC2Client({
7081
+ const c = new EC2Client({
7082
7082
  region,
7083
7083
  ...READ_RETRY
7084
- }).send(new DescribeClientVpnAuthorizationRulesCommand({ ClientVpnEndpointId: endpointId }))).AuthorizationRules ?? []).find((a) => (cidr === void 0 || a.DestinationCidr === cidr) && (groupId === void 0 || a.GroupId === groupId));
7084
+ });
7085
+ const isOurRule = (a) => (cidr === void 0 || a.DestinationCidr === cidr) && (groupId === void 0 || a.GroupId === groupId);
7086
+ let rule;
7087
+ let nextToken;
7088
+ do {
7089
+ const r = await c.send(new DescribeClientVpnAuthorizationRulesCommand({
7090
+ ClientVpnEndpointId: endpointId,
7091
+ NextToken: nextToken
7092
+ }));
7093
+ rule = (r.AuthorizationRules ?? []).find(isOurRule);
7094
+ nextToken = r.NextToken;
7095
+ } while (!rule && nextToken);
7085
7096
  if (!rule) throw new ResourceGoneError(`ClientVpnAuthorizationRule cidr=${cidr} group=${groupId} absent from endpoint ${endpointId}`);
7086
7097
  const model = {};
7087
7098
  model.ClientVpnEndpointId = endpointId;
@@ -7640,11 +7651,23 @@ const readAppSyncApiKey = async ({ physicalId, declared, region }) => {
7640
7651
  const apiId = m?.[1] ?? str$1(declared.ApiId);
7641
7652
  const keyId = m?.[2];
7642
7653
  if (!apiId) return void 0;
7643
- const keys = (await new AppSyncClient({
7654
+ const c = new AppSyncClient({
7644
7655
  region,
7645
7656
  ...READ_RETRY
7646
- }).send(new ListApiKeysCommand({ apiId }))).apiKeys ?? [];
7647
- const k = keyId ? keys.find((x) => x.id === keyId) : keys[0];
7657
+ });
7658
+ const keys = [];
7659
+ let nextToken;
7660
+ let k;
7661
+ do {
7662
+ const r = await c.send(new ListApiKeysCommand({
7663
+ apiId,
7664
+ ...nextToken && { nextToken }
7665
+ }));
7666
+ keys.push(...r.apiKeys ?? []);
7667
+ if (keyId) k = keys.find((x) => x.id === keyId);
7668
+ nextToken = r.nextToken;
7669
+ } while (!k && nextToken);
7670
+ if (!keyId) k = keys[0];
7648
7671
  if (!k) return void 0;
7649
7672
  const model = { ApiId: apiId };
7650
7673
  if (k.description !== void 0 && k.description !== "") model.Description = k.description;
@@ -8000,10 +8023,19 @@ const supplementLexBot = async ({ physicalId, region }) => {
8000
8023
  ...READ_RETRY
8001
8024
  });
8002
8025
  try {
8003
- const localeSummaries = (await c.send(new ListBotLocalesCommand({
8004
- botId,
8005
- botVersion
8006
- }))).botLocaleSummaries ?? [];
8026
+ const localeSummaries = [];
8027
+ {
8028
+ let nextToken;
8029
+ do {
8030
+ const r = await c.send(new ListBotLocalesCommand({
8031
+ botId,
8032
+ botVersion,
8033
+ ...nextToken && { nextToken }
8034
+ }));
8035
+ localeSummaries.push(...r.botLocaleSummaries ?? []);
8036
+ nextToken = r.nextToken;
8037
+ } while (nextToken);
8038
+ }
8007
8039
  const botLocales = [];
8008
8040
  for (const ls of localeSummaries) {
8009
8041
  const localeId = str$1(ls.localeId);
@@ -8025,13 +8057,22 @@ const supplementLexBot = async ({ physicalId, region }) => {
8025
8057
  cfnLocale.VoiceSettings = vs;
8026
8058
  }
8027
8059
  const slotTypeNames = /* @__PURE__ */ new Map();
8028
- const slotTypes = await c.send(new ListSlotTypesCommand({
8029
- botId,
8030
- botVersion,
8031
- localeId
8032
- }));
8060
+ const slotTypeSummaries = [];
8061
+ {
8062
+ let nextToken;
8063
+ do {
8064
+ const r = await c.send(new ListSlotTypesCommand({
8065
+ botId,
8066
+ botVersion,
8067
+ localeId,
8068
+ ...nextToken && { nextToken }
8069
+ }));
8070
+ slotTypeSummaries.push(...r.slotTypeSummaries ?? []);
8071
+ nextToken = r.nextToken;
8072
+ } while (nextToken);
8073
+ }
8033
8074
  const cfnSlotTypes = [];
8034
- for (const sts of slotTypes.slotTypeSummaries ?? []) {
8075
+ for (const sts of slotTypeSummaries) {
8035
8076
  const slotTypeId = str$1(sts.slotTypeId);
8036
8077
  if (!slotTypeId) continue;
8037
8078
  if (slotTypeId.startsWith("AMAZON.")) {
@@ -8064,13 +8105,22 @@ const supplementLexBot = async ({ physicalId, region }) => {
8064
8105
  if (strategy !== void 0) cfnSt.ValueSelectionSetting = { ResolutionStrategy: LEX_RESOLUTION_STRATEGY_TO_CFN[strategy] ?? strategy };
8065
8106
  cfnSlotTypes.push(cfnSt);
8066
8107
  }
8067
- const intents = await c.send(new ListIntentsCommand({
8068
- botId,
8069
- botVersion,
8070
- localeId
8071
- }));
8108
+ const intentSummaries = [];
8109
+ {
8110
+ let nextToken;
8111
+ do {
8112
+ const r = await c.send(new ListIntentsCommand({
8113
+ botId,
8114
+ botVersion,
8115
+ localeId,
8116
+ ...nextToken && { nextToken }
8117
+ }));
8118
+ intentSummaries.push(...r.intentSummaries ?? []);
8119
+ nextToken = r.nextToken;
8120
+ } while (nextToken);
8121
+ }
8072
8122
  const cfnIntents = [];
8073
- for (const is of intents.intentSummaries ?? []) {
8123
+ for (const is of intentSummaries) {
8074
8124
  const intentId = str$1(is.intentId);
8075
8125
  if (!intentId) continue;
8076
8126
  const intent = await c.send(new DescribeIntentCommand({
@@ -8092,13 +8142,22 @@ const supplementLexBot = async ({ physicalId, region }) => {
8092
8142
  }
8093
8143
  const slotNames = /* @__PURE__ */ new Map();
8094
8144
  const cfnSlots = [];
8095
- const slots = await c.send(new ListSlotsCommand({
8096
- botId,
8097
- botVersion,
8098
- localeId,
8099
- intentId
8100
- }));
8101
- for (const ss of slots.slotSummaries ?? []) {
8145
+ const slotSummaries = [];
8146
+ {
8147
+ let nextToken;
8148
+ do {
8149
+ const r = await c.send(new ListSlotsCommand({
8150
+ botId,
8151
+ botVersion,
8152
+ localeId,
8153
+ intentId,
8154
+ ...nextToken && { nextToken }
8155
+ }));
8156
+ slotSummaries.push(...r.slotSummaries ?? []);
8157
+ nextToken = r.nextToken;
8158
+ } while (nextToken);
8159
+ }
8160
+ for (const ss of slotSummaries) {
8102
8161
  const slotId = str$1(ss.slotId);
8103
8162
  if (!slotId) continue;
8104
8163
  const slot = await c.send(new DescribeSlotCommand({