From 30362274ab08f30c81958d1fe4a25cdd459fae0d Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Mon, 30 Oct 2023 14:46:40 -0600 Subject: [PATCH] chore: comments --- .../transformers/decomposedMetadataTransformer.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/convert/transformers/decomposedMetadataTransformer.ts b/src/convert/transformers/decomposedMetadataTransformer.ts index a5b8397c92..71455a0fd7 100644 --- a/src/convert/transformers/decomposedMetadataTransformer.ts +++ b/src/convert/transformers/decomposedMetadataTransformer.ts @@ -130,11 +130,17 @@ export class DecomposedMetadataTransformer extends BaseMetadataTransformer { } // if no child component is found to merge with yet, mark it as so in the state else if (!this.getDecomposedState(childComponent)?.foundMerge) { - // if the child can't exist without the parent, redirect the output to the parents output, rather than the default output if (mergeWith?.content && childComponent.type.unaddressableWithoutParent && childComponent.type.suffix) { + // if the child can't exist without the parent, and we found a parent (mergeWith) redirect the output to the parents output, rather than the default output writeInfos.push({ source, - output: path.join(mergeWith.content, entryName + '.' + childComponent.type.suffix + '-meta.xml'), + output: path.join(mergeWith.content, `${entryName}.${childComponent.type.suffix}${META_XML_SUFFIX}`), + }); + } else if (!mergeWith) { + // if the child can't exist without a parent, and there's no parent found, redirect to the default pkg dir + writeInfos.push({ + source, + output: getDefaultOutput(childComponent), }); } else { this.setDecomposedState(childComponent, {