cdk-real-drift 0.2.63 → 0.2.64

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
@@ -10822,13 +10822,22 @@ const writeLexBotLocales = async (ctx, ops) => {
10822
10822
  const loc = rawLocale;
10823
10823
  const localeId = lexStr(loc.LocaleId);
10824
10824
  if (!localeId) throw new Error("Lex BotLocales revert: a declared locale has no LocaleId");
10825
- const liveSlotTypes = await c.send(new ListSlotTypesCommand({
10826
- botId,
10827
- botVersion,
10828
- localeId
10829
- }));
10825
+ const slotTypeSummaries = [];
10826
+ {
10827
+ let nextToken;
10828
+ do {
10829
+ const r = await c.send(new ListSlotTypesCommand({
10830
+ botId,
10831
+ botVersion,
10832
+ localeId,
10833
+ ...nextToken && { nextToken }
10834
+ }));
10835
+ slotTypeSummaries.push(...r.slotTypeSummaries ?? []);
10836
+ nextToken = r.nextToken;
10837
+ } while (nextToken);
10838
+ }
10830
10839
  const slotTypeNameToId = /* @__PURE__ */ new Map();
10831
- for (const s of liveSlotTypes.slotTypeSummaries ?? []) {
10840
+ for (const s of slotTypeSummaries) {
10832
10841
  const id = lexStr(s.slotTypeId);
10833
10842
  const name = lexStr(s.slotTypeName);
10834
10843
  if (id && name && !id.startsWith("AMAZON.")) slotTypeNameToId.set(name, id);
@@ -10881,13 +10890,22 @@ const writeLexBotLocales = async (ctx, ops) => {
10881
10890
  else input.valueSelectionSetting = live.valueSelectionSetting;
10882
10891
  await c.send(new UpdateSlotTypeCommand(input));
10883
10892
  }
10884
- const liveIntents = await c.send(new ListIntentsCommand({
10885
- botId,
10886
- botVersion,
10887
- localeId
10888
- }));
10893
+ const intentSummaries = [];
10894
+ {
10895
+ let nextToken;
10896
+ do {
10897
+ const r = await c.send(new ListIntentsCommand({
10898
+ botId,
10899
+ botVersion,
10900
+ localeId,
10901
+ ...nextToken && { nextToken }
10902
+ }));
10903
+ intentSummaries.push(...r.intentSummaries ?? []);
10904
+ nextToken = r.nextToken;
10905
+ } while (nextToken);
10906
+ }
10889
10907
  const intentNameToId = /* @__PURE__ */ new Map();
10890
- for (const i of liveIntents.intentSummaries ?? []) {
10908
+ for (const i of intentSummaries) {
10891
10909
  const id = lexStr(i.intentId);
10892
10910
  const name = lexStr(i.intentName);
10893
10911
  if (id && name) intentNameToId.set(name, id);
@@ -10914,14 +10932,23 @@ const writeLexBotLocales = async (ctx, ops) => {
10914
10932
  const iName = lexStr(di.Name);
10915
10933
  const intentId = iName ? intentNameToId.get(iName) : void 0;
10916
10934
  if (!intentId || !iName || isBuiltinIntent(iName)) continue;
10917
- const liveSlots = await c.send(new ListSlotsCommand({
10918
- botId,
10919
- botVersion,
10920
- localeId,
10921
- intentId
10922
- }));
10935
+ const slotSummaries = [];
10936
+ {
10937
+ let nextToken;
10938
+ do {
10939
+ const r = await c.send(new ListSlotsCommand({
10940
+ botId,
10941
+ botVersion,
10942
+ localeId,
10943
+ intentId,
10944
+ ...nextToken && { nextToken }
10945
+ }));
10946
+ slotSummaries.push(...r.slotSummaries ?? []);
10947
+ nextToken = r.nextToken;
10948
+ } while (nextToken);
10949
+ }
10923
10950
  const slotNameToId = /* @__PURE__ */ new Map();
10924
- for (const s of liveSlots.slotSummaries ?? []) {
10951
+ for (const s of slotSummaries) {
10925
10952
  const id = lexStr(s.slotId);
10926
10953
  const name = lexStr(s.slotName);
10927
10954
  if (id && name) slotNameToId.set(name, id);