cdk-real-drift 0.4.8 → 0.4.9

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
@@ -4916,7 +4916,12 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
4916
4916
  const freeFormMapPaths = schema.freeFormMapPaths ?? [];
4917
4917
  const underFreeFormMap = (schemaPath) => freeFormMapPaths.some((ff) => schemaPath.startsWith(`${ff}.`));
4918
4918
  const emitNested = (path, value) => {
4919
- if (isAllAwsTags(value) || isTrivialEmpty(value)) return;
4919
+ if (isTrivialEmpty(value)) return;
4920
+ if (isAllAwsTags(value)) {
4921
+ const isObjectForm = value !== null && typeof value === "object" && !Array.isArray(value);
4922
+ const parentKey = (path.split(".").pop() ?? "").replace(/\[.*$/, "");
4923
+ if (!isObjectForm || /tags$/i.test(parentKey)) return;
4924
+ }
4920
4925
  const schemaPath = path.replace(/\[[^\]]*\]/g, ".*");
4921
4926
  const tier = schemaPath in schema.defaultPaths && matchesKnownDefault(value, schema.defaultPaths[schemaPath]) || schemaPath in knownDefPaths && matchesKnownDefault(value, knownDefPaths[schemaPath]) || dynamoGsiWarmThroughputAtDefault(resourceType, path, value, live) ? "atDefault" : generatedPaths.includes(schemaPath) && isPhysicalIdSegment(value, physicalId) || generatedNestedPaths?.has(schemaPath) && !(schemaPath in knownDefPaths) ? "generated" : "undeclared";
4922
4927
  const freeFormKey = tier === "undeclared" && underFreeFormMap(schemaPath);