From bc9b9f8f9cf1f55b35b94a2a168d40fc64548b16 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Thu, 12 Sep 2024 14:30:43 -0600 Subject: [PATCH] chore: fix merge with parent --- .../decomposedPermissionSetTransformer.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/convert/transformers/decomposedPermissionSetTransformer.ts b/src/convert/transformers/decomposedPermissionSetTransformer.ts index 6da678766..1cb7cdc7c 100644 --- a/src/convert/transformers/decomposedPermissionSetTransformer.ts +++ b/src/convert/transformers/decomposedPermissionSetTransformer.ts @@ -22,10 +22,8 @@ import { addChildType, forceIgnoreAllowsComponent, getOutputFile, - getWriteInfosFromMerge, getWriteInfosWithoutMerge, hasChildTypeId, - setDecomposedState, tagToChildTypeId, } from './decomposedMetadataTransformer'; import type { InfoContainer, ComposedMetadata } from './types'; @@ -84,7 +82,6 @@ export class DecomposedPermissionSetTransformer extends BaseMetadataTransformer if (forceIgnore.denies(getOutputFile(component, mergeWith))) { return []; } - const stateSetter = setDecomposedState(this.context.decomposition.transactionState); const composedMetadata = await getComposedMetadataEntries(component); const parentXmlObject: XmlObj = { @@ -112,7 +109,15 @@ export class DecomposedPermissionSetTransformer extends BaseMetadataTransformer ]); const writeInfoForParent = mergeWith - ? getWriteInfosFromMerge(mergeWith)(stateSetter)(parentXmlObject)(component) + ? [ + { + output: join( + ensureString(mergeWith.content), + `${component.name}.${ensureString(component.type.suffix)}${META_XML_SUFFIX}` + ), + source: new JsToXml(parentXmlObject), + }, + ] : getWriteInfosWithoutMerge(this.defaultDirectory)(parentXmlObject)(component); return [...writeInfosForChildren, ...writeInfoForParent];