cdk-real-drift 0.2.47 → 0.2.49
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 +102 -32
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2888,9 +2888,13 @@ function isEqualUnorderedScalarSet(a, b) {
|
|
|
2888
2888
|
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;
|
|
2889
2889
|
const scalar = (v) => typeof v === "string" || typeof v === "number" || typeof v === "boolean";
|
|
2890
2890
|
if (!a.every(scalar) || !b.every(scalar)) return false;
|
|
2891
|
-
const
|
|
2892
|
-
|
|
2893
|
-
|
|
2891
|
+
const key = (v) => {
|
|
2892
|
+
if (typeof v === "number") return `num:${v}`;
|
|
2893
|
+
if (typeof v === "string" && DECIMAL_RE.test(v.trim())) return `num:${Number(v)}`;
|
|
2894
|
+
return `${typeof v}:${String(v)}`;
|
|
2895
|
+
};
|
|
2896
|
+
const sa = a.map(key).sort();
|
|
2897
|
+
const sb = b.map(key).sort();
|
|
2894
2898
|
return sa.every((v, i) => v === sb[i]);
|
|
2895
2899
|
}
|
|
2896
2900
|
const READGAP_COLLECTION_PATHS = {
|
|
@@ -3008,6 +3012,12 @@ function isStringlyEqualScalar(a, b) {
|
|
|
3008
3012
|
if (prim(b) && typeof a === "string") return eq(b, a);
|
|
3009
3013
|
return false;
|
|
3010
3014
|
}
|
|
3015
|
+
function isNumericStringEqualScalar(a, b) {
|
|
3016
|
+
const num = (v) => typeof v === "number" ? v : typeof v === "string" && DECIMAL_RE.test(v.trim()) ? Number(v) : void 0;
|
|
3017
|
+
const na = num(a);
|
|
3018
|
+
const nb = num(b);
|
|
3019
|
+
return na !== void 0 && nb !== void 0 && na === nb;
|
|
3020
|
+
}
|
|
3011
3021
|
function isStringlyEqualScalarArray(a, b) {
|
|
3012
3022
|
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;
|
|
3013
3023
|
const scalar = (v) => typeof v === "string" || typeof v === "number" || typeof v === "boolean";
|
|
@@ -4030,6 +4040,7 @@ function isPolicySubsetOf(sub, sup) {
|
|
|
4030
4040
|
}
|
|
4031
4041
|
function matchesKnownDefault(live, def) {
|
|
4032
4042
|
if (deepEqual(live, def)) return true;
|
|
4043
|
+
if (!isNestedObject(live) && !isNestedObject(def)) return isNumericStringEqualScalar(live, def);
|
|
4033
4044
|
if (!isNestedObject(live) || !isNestedObject(def)) return false;
|
|
4034
4045
|
return Object.entries(live).every(([k, v]) => k in def ? matchesKnownDefault(v, def[k]) : isTrivialEmpty(v));
|
|
4035
4046
|
}
|
|
@@ -6767,7 +6778,7 @@ const readEc2Eip = async ({ physicalId, region }) => {
|
|
|
6767
6778
|
return model;
|
|
6768
6779
|
};
|
|
6769
6780
|
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());
|
|
6781
|
+
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
6782
|
return norm(a) === norm(b);
|
|
6772
6783
|
};
|
|
6773
6784
|
const cfnRangeTime = (v) => v instanceof Date ? v.toISOString().slice(0, 19) : v;
|
|
@@ -7078,10 +7089,21 @@ const readEc2ClientVpnAuthorizationRule = async ({ declared, region }) => {
|
|
|
7078
7089
|
if (!endpointId) return void 0;
|
|
7079
7090
|
const cidr = str$1(declared.TargetNetworkCidr);
|
|
7080
7091
|
const groupId = str$1(declared.AccessGroupId);
|
|
7081
|
-
const
|
|
7092
|
+
const c = new EC2Client({
|
|
7082
7093
|
region,
|
|
7083
7094
|
...READ_RETRY
|
|
7084
|
-
})
|
|
7095
|
+
});
|
|
7096
|
+
const isOurRule = (a) => (cidr === void 0 || a.DestinationCidr === cidr) && (groupId === void 0 || a.GroupId === groupId);
|
|
7097
|
+
let rule;
|
|
7098
|
+
let nextToken;
|
|
7099
|
+
do {
|
|
7100
|
+
const r = await c.send(new DescribeClientVpnAuthorizationRulesCommand({
|
|
7101
|
+
ClientVpnEndpointId: endpointId,
|
|
7102
|
+
NextToken: nextToken
|
|
7103
|
+
}));
|
|
7104
|
+
rule = (r.AuthorizationRules ?? []).find(isOurRule);
|
|
7105
|
+
nextToken = r.NextToken;
|
|
7106
|
+
} while (!rule && nextToken);
|
|
7085
7107
|
if (!rule) throw new ResourceGoneError(`ClientVpnAuthorizationRule cidr=${cidr} group=${groupId} absent from endpoint ${endpointId}`);
|
|
7086
7108
|
const model = {};
|
|
7087
7109
|
model.ClientVpnEndpointId = endpointId;
|
|
@@ -7640,11 +7662,23 @@ const readAppSyncApiKey = async ({ physicalId, declared, region }) => {
|
|
|
7640
7662
|
const apiId = m?.[1] ?? str$1(declared.ApiId);
|
|
7641
7663
|
const keyId = m?.[2];
|
|
7642
7664
|
if (!apiId) return void 0;
|
|
7643
|
-
const
|
|
7665
|
+
const c = new AppSyncClient({
|
|
7644
7666
|
region,
|
|
7645
7667
|
...READ_RETRY
|
|
7646
|
-
})
|
|
7647
|
-
const
|
|
7668
|
+
});
|
|
7669
|
+
const keys = [];
|
|
7670
|
+
let nextToken;
|
|
7671
|
+
let k;
|
|
7672
|
+
do {
|
|
7673
|
+
const r = await c.send(new ListApiKeysCommand({
|
|
7674
|
+
apiId,
|
|
7675
|
+
...nextToken && { nextToken }
|
|
7676
|
+
}));
|
|
7677
|
+
keys.push(...r.apiKeys ?? []);
|
|
7678
|
+
if (keyId) k = keys.find((x) => x.id === keyId);
|
|
7679
|
+
nextToken = r.nextToken;
|
|
7680
|
+
} while (!k && nextToken);
|
|
7681
|
+
if (!keyId) k = keys[0];
|
|
7648
7682
|
if (!k) return void 0;
|
|
7649
7683
|
const model = { ApiId: apiId };
|
|
7650
7684
|
if (k.description !== void 0 && k.description !== "") model.Description = k.description;
|
|
@@ -8000,10 +8034,19 @@ const supplementLexBot = async ({ physicalId, region }) => {
|
|
|
8000
8034
|
...READ_RETRY
|
|
8001
8035
|
});
|
|
8002
8036
|
try {
|
|
8003
|
-
const localeSummaries =
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8037
|
+
const localeSummaries = [];
|
|
8038
|
+
{
|
|
8039
|
+
let nextToken;
|
|
8040
|
+
do {
|
|
8041
|
+
const r = await c.send(new ListBotLocalesCommand({
|
|
8042
|
+
botId,
|
|
8043
|
+
botVersion,
|
|
8044
|
+
...nextToken && { nextToken }
|
|
8045
|
+
}));
|
|
8046
|
+
localeSummaries.push(...r.botLocaleSummaries ?? []);
|
|
8047
|
+
nextToken = r.nextToken;
|
|
8048
|
+
} while (nextToken);
|
|
8049
|
+
}
|
|
8007
8050
|
const botLocales = [];
|
|
8008
8051
|
for (const ls of localeSummaries) {
|
|
8009
8052
|
const localeId = str$1(ls.localeId);
|
|
@@ -8025,13 +8068,22 @@ const supplementLexBot = async ({ physicalId, region }) => {
|
|
|
8025
8068
|
cfnLocale.VoiceSettings = vs;
|
|
8026
8069
|
}
|
|
8027
8070
|
const slotTypeNames = /* @__PURE__ */ new Map();
|
|
8028
|
-
const
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8071
|
+
const slotTypeSummaries = [];
|
|
8072
|
+
{
|
|
8073
|
+
let nextToken;
|
|
8074
|
+
do {
|
|
8075
|
+
const r = await c.send(new ListSlotTypesCommand({
|
|
8076
|
+
botId,
|
|
8077
|
+
botVersion,
|
|
8078
|
+
localeId,
|
|
8079
|
+
...nextToken && { nextToken }
|
|
8080
|
+
}));
|
|
8081
|
+
slotTypeSummaries.push(...r.slotTypeSummaries ?? []);
|
|
8082
|
+
nextToken = r.nextToken;
|
|
8083
|
+
} while (nextToken);
|
|
8084
|
+
}
|
|
8033
8085
|
const cfnSlotTypes = [];
|
|
8034
|
-
for (const sts of
|
|
8086
|
+
for (const sts of slotTypeSummaries) {
|
|
8035
8087
|
const slotTypeId = str$1(sts.slotTypeId);
|
|
8036
8088
|
if (!slotTypeId) continue;
|
|
8037
8089
|
if (slotTypeId.startsWith("AMAZON.")) {
|
|
@@ -8064,13 +8116,22 @@ const supplementLexBot = async ({ physicalId, region }) => {
|
|
|
8064
8116
|
if (strategy !== void 0) cfnSt.ValueSelectionSetting = { ResolutionStrategy: LEX_RESOLUTION_STRATEGY_TO_CFN[strategy] ?? strategy };
|
|
8065
8117
|
cfnSlotTypes.push(cfnSt);
|
|
8066
8118
|
}
|
|
8067
|
-
const
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8119
|
+
const intentSummaries = [];
|
|
8120
|
+
{
|
|
8121
|
+
let nextToken;
|
|
8122
|
+
do {
|
|
8123
|
+
const r = await c.send(new ListIntentsCommand({
|
|
8124
|
+
botId,
|
|
8125
|
+
botVersion,
|
|
8126
|
+
localeId,
|
|
8127
|
+
...nextToken && { nextToken }
|
|
8128
|
+
}));
|
|
8129
|
+
intentSummaries.push(...r.intentSummaries ?? []);
|
|
8130
|
+
nextToken = r.nextToken;
|
|
8131
|
+
} while (nextToken);
|
|
8132
|
+
}
|
|
8072
8133
|
const cfnIntents = [];
|
|
8073
|
-
for (const is of
|
|
8134
|
+
for (const is of intentSummaries) {
|
|
8074
8135
|
const intentId = str$1(is.intentId);
|
|
8075
8136
|
if (!intentId) continue;
|
|
8076
8137
|
const intent = await c.send(new DescribeIntentCommand({
|
|
@@ -8092,13 +8153,22 @@ const supplementLexBot = async ({ physicalId, region }) => {
|
|
|
8092
8153
|
}
|
|
8093
8154
|
const slotNames = /* @__PURE__ */ new Map();
|
|
8094
8155
|
const cfnSlots = [];
|
|
8095
|
-
const
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8156
|
+
const slotSummaries = [];
|
|
8157
|
+
{
|
|
8158
|
+
let nextToken;
|
|
8159
|
+
do {
|
|
8160
|
+
const r = await c.send(new ListSlotsCommand({
|
|
8161
|
+
botId,
|
|
8162
|
+
botVersion,
|
|
8163
|
+
localeId,
|
|
8164
|
+
intentId,
|
|
8165
|
+
...nextToken && { nextToken }
|
|
8166
|
+
}));
|
|
8167
|
+
slotSummaries.push(...r.slotSummaries ?? []);
|
|
8168
|
+
nextToken = r.nextToken;
|
|
8169
|
+
} while (nextToken);
|
|
8170
|
+
}
|
|
8171
|
+
for (const ss of slotSummaries) {
|
|
8102
8172
|
const slotId = str$1(ss.slotId);
|
|
8103
8173
|
if (!slotId) continue;
|
|
8104
8174
|
const slot = await c.send(new DescribeSlotCommand({
|