cdk-real-drift 0.2.46 → 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
@@ -100,9 +100,17 @@ const NOT_FOUND_ERROR_NAMES = new Set([
100
100
  "NoSuchEntityException",
101
101
  "InvalidAllocationID.NotFound",
102
102
  "InvalidAddress.NotFound",
103
+ "InvalidLaunchTemplateId.NotFound",
104
+ "InvalidNetworkAclID.NotFound",
103
105
  "EntityNotFoundException",
104
106
  "DBClusterNotFoundFault",
105
107
  "DBInstanceNotFoundFault",
108
+ "ResourceNotFoundFault",
109
+ "ClusterNotFoundFault",
110
+ "ParameterGroupNotFoundFault",
111
+ "SubnetGroupNotFoundFault",
112
+ "CacheParameterGroupNotFoundFault",
113
+ "NoSuchHostedZone",
106
114
  "NamespaceNotFound",
107
115
  "ServiceNotFound",
108
116
  "RuleSetDoesNotExistException",
@@ -3202,11 +3210,14 @@ function buildResolverContext(template, stackParams, physIds, region, accountId,
3202
3210
  const paramDefs = template.Parameters ?? {};
3203
3211
  const isList = (k) => {
3204
3212
  const t = paramDefs[k]?.Type ?? "";
3205
- return t === "CommaDelimitedList" || t.startsWith("List<");
3213
+ return t === "CommaDelimitedList" || t.startsWith("List<") || t.includes("::Parameter::Value<List<") || t.includes("::Parameter::Value<CommaDelimitedList");
3206
3214
  };
3207
3215
  const toParam = (k, raw) => isList(k) ? raw === "" ? [] : raw.split(",").map((s) => s.trim()) : raw;
3208
3216
  const params = {};
3209
- for (const [k, def] of Object.entries(paramDefs)) if (def && "Default" in def) params[k] = toParam(k, String(def.Default));
3217
+ for (const [k, def] of Object.entries(paramDefs)) {
3218
+ if (def?.NoEcho === true || def?.NoEcho === "true") continue;
3219
+ if (def && "Default" in def) params[k] = toParam(k, String(def.Default));
3220
+ }
3210
3221
  for (const [k, v] of Object.entries(stackParams)) params[k] = toParam(k, v);
3211
3222
  const templateResources = template.Resources ?? {};
3212
3223
  const typeOf = {};
@@ -3296,6 +3307,8 @@ async function loadDesired(client, stackName, region, templateOverride, recovery
3296
3307
  stackParams[p.ParameterKey] = value;
3297
3308
  }
3298
3309
  const ctx = buildResolverContext(template, stackParams, physIds, region, accountId, stackName, stackId);
3310
+ const notificationArns = stack?.NotificationARNs ?? [];
3311
+ if (notificationArns.length > 0) ctx.params["AWS::NotificationARNs"] = notificationArns;
3299
3312
  if (JSON.stringify(template).includes("Fn::ImportValue")) ctx.exports = await listExports(client, region);
3300
3313
  const resources = [];
3301
3314
  const principalsWithSiblingPolicy = collectPrincipalsWithSiblingPolicies(template.Resources ?? {}, ctx);
@@ -6754,7 +6767,7 @@ const readEc2Eip = async ({ physicalId, region }) => {
6754
6767
  return model;
6755
6768
  };
6756
6769
  const dimSetEqual = (a, b) => {
6757
- 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])));
6758
6771
  return norm(a) === norm(b);
6759
6772
  };
6760
6773
  const cfnRangeTime = (v) => v instanceof Date ? v.toISOString().slice(0, 19) : v;
@@ -7065,10 +7078,21 @@ const readEc2ClientVpnAuthorizationRule = async ({ declared, region }) => {
7065
7078
  if (!endpointId) return void 0;
7066
7079
  const cidr = str$1(declared.TargetNetworkCidr);
7067
7080
  const groupId = str$1(declared.AccessGroupId);
7068
- const rule = ((await new EC2Client({
7081
+ const c = new EC2Client({
7069
7082
  region,
7070
7083
  ...READ_RETRY
7071
- }).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);
7072
7096
  if (!rule) throw new ResourceGoneError(`ClientVpnAuthorizationRule cidr=${cidr} group=${groupId} absent from endpoint ${endpointId}`);
7073
7097
  const model = {};
7074
7098
  model.ClientVpnEndpointId = endpointId;
@@ -7627,11 +7651,23 @@ const readAppSyncApiKey = async ({ physicalId, declared, region }) => {
7627
7651
  const apiId = m?.[1] ?? str$1(declared.ApiId);
7628
7652
  const keyId = m?.[2];
7629
7653
  if (!apiId) return void 0;
7630
- const keys = (await new AppSyncClient({
7654
+ const c = new AppSyncClient({
7631
7655
  region,
7632
7656
  ...READ_RETRY
7633
- }).send(new ListApiKeysCommand({ apiId }))).apiKeys ?? [];
7634
- 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];
7635
7671
  if (!k) return void 0;
7636
7672
  const model = { ApiId: apiId };
7637
7673
  if (k.description !== void 0 && k.description !== "") model.Description = k.description;
@@ -7987,10 +8023,19 @@ const supplementLexBot = async ({ physicalId, region }) => {
7987
8023
  ...READ_RETRY
7988
8024
  });
7989
8025
  try {
7990
- const localeSummaries = (await c.send(new ListBotLocalesCommand({
7991
- botId,
7992
- botVersion
7993
- }))).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
+ }
7994
8039
  const botLocales = [];
7995
8040
  for (const ls of localeSummaries) {
7996
8041
  const localeId = str$1(ls.localeId);
@@ -8012,13 +8057,22 @@ const supplementLexBot = async ({ physicalId, region }) => {
8012
8057
  cfnLocale.VoiceSettings = vs;
8013
8058
  }
8014
8059
  const slotTypeNames = /* @__PURE__ */ new Map();
8015
- const slotTypes = await c.send(new ListSlotTypesCommand({
8016
- botId,
8017
- botVersion,
8018
- localeId
8019
- }));
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
+ }
8020
8074
  const cfnSlotTypes = [];
8021
- for (const sts of slotTypes.slotTypeSummaries ?? []) {
8075
+ for (const sts of slotTypeSummaries) {
8022
8076
  const slotTypeId = str$1(sts.slotTypeId);
8023
8077
  if (!slotTypeId) continue;
8024
8078
  if (slotTypeId.startsWith("AMAZON.")) {
@@ -8051,13 +8105,22 @@ const supplementLexBot = async ({ physicalId, region }) => {
8051
8105
  if (strategy !== void 0) cfnSt.ValueSelectionSetting = { ResolutionStrategy: LEX_RESOLUTION_STRATEGY_TO_CFN[strategy] ?? strategy };
8052
8106
  cfnSlotTypes.push(cfnSt);
8053
8107
  }
8054
- const intents = await c.send(new ListIntentsCommand({
8055
- botId,
8056
- botVersion,
8057
- localeId
8058
- }));
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
+ }
8059
8122
  const cfnIntents = [];
8060
- for (const is of intents.intentSummaries ?? []) {
8123
+ for (const is of intentSummaries) {
8061
8124
  const intentId = str$1(is.intentId);
8062
8125
  if (!intentId) continue;
8063
8126
  const intent = await c.send(new DescribeIntentCommand({
@@ -8079,13 +8142,22 @@ const supplementLexBot = async ({ physicalId, region }) => {
8079
8142
  }
8080
8143
  const slotNames = /* @__PURE__ */ new Map();
8081
8144
  const cfnSlots = [];
8082
- const slots = await c.send(new ListSlotsCommand({
8083
- botId,
8084
- botVersion,
8085
- localeId,
8086
- intentId
8087
- }));
8088
- 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) {
8089
8161
  const slotId = str$1(ss.slotId);
8090
8162
  if (!slotId) continue;
8091
8163
  const slot = await c.send(new DescribeSlotCommand({