Skip to content

Commit

Permalink
feat(appFrameworkTemplateBundle): update type to string, string[] ins…
Browse files Browse the repository at this point in the history
…tead of | string[]
  • Loading branch information
rvwatch committed Oct 28, 2024
1 parent 656608f commit e9f3a6a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/utils/filePathGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ export const filePathsFromMetadataComponent = (

// lwc, aura, waveTemplate, experiencePropertyType
if (type.strategies?.adapter === 'bundle') {
const mappings = new Map<string, string | string[]>([
['ExperiencePropertyTypeBundle', join(packageDirWithTypeDir, `${fullName}${sep}schema.json`)],
['WaveTemplateBundle', join(packageDirWithTypeDir, `${fullName}${sep}template-info.json`)],
['LightningComponentBundle', join(packageDirWithTypeDir, `${fullName}${sep}${fullName}.js${META_XML_SUFFIX}`)],
['AuraDefinitionBundle', join(packageDirWithTypeDir, `${fullName}${sep}${fullName}.cmp${META_XML_SUFFIX}`)],
const mappings = new Map<string, string[]>([
['ExperiencePropertyTypeBundle', [join(packageDirWithTypeDir, `${fullName}${sep}schema.json`)]],
['WaveTemplateBundle', [join(packageDirWithTypeDir, `${fullName}${sep}template-info.json`)]],
['LightningComponentBundle', [join(packageDirWithTypeDir, `${fullName}${sep}${fullName}.js${META_XML_SUFFIX}`)]],
['AuraDefinitionBundle', [join(packageDirWithTypeDir, `${fullName}${sep}${fullName}.cmp${META_XML_SUFFIX}`)]],
[
'AppFrameworkTemplateBundle',
[
Expand All @@ -131,7 +131,7 @@ export const filePathsFromMetadataComponent = (
throw messages.createError('unsupportedBundleType', [type.name]);
}

return Array.isArray(matched) ? matched : [matched];
return matched;
}

throw messages.createError('filePathGeneratorNoTypeSupport', [type.name]);
Expand Down

2 comments on commit e9f3a6a

@svc-idee-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: e9f3a6a Previous: 8e1de56 Ratio
eda-componentSetCreate-linux 232 ms 234 ms 0.99
eda-sourceToMdapi-linux 2395 ms 2428 ms 0.99
eda-sourceToZip-linux 1902 ms 1896 ms 1.00
eda-mdapiToSource-linux 2985 ms 2965 ms 1.01
lotsOfClasses-componentSetCreate-linux 433 ms 447 ms 0.97
lotsOfClasses-sourceToMdapi-linux 3683 ms 3872 ms 0.95
lotsOfClasses-sourceToZip-linux 3145 ms 3195 ms 0.98
lotsOfClasses-mdapiToSource-linux 3568 ms 3641 ms 0.98
lotsOfClassesOneDir-componentSetCreate-linux 772 ms 754 ms 1.02
lotsOfClassesOneDir-sourceToMdapi-linux 6541 ms 6709 ms 0.97
lotsOfClassesOneDir-sourceToZip-linux 5809 ms 5836 ms 1.00
lotsOfClassesOneDir-mdapiToSource-linux 6522 ms 6604 ms 0.99

This comment was automatically generated by workflow using github-action-benchmark.

@svc-idee-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: e9f3a6a Previous: 8e1de56 Ratio
eda-componentSetCreate-win32 733 ms 675 ms 1.09
eda-sourceToMdapi-win32 4698 ms 4624 ms 1.02
eda-sourceToZip-win32 3200 ms 3020 ms 1.06
eda-mdapiToSource-win32 6404 ms 6428 ms 1.00
lotsOfClasses-componentSetCreate-win32 1326 ms 1213 ms 1.09
lotsOfClasses-sourceToMdapi-win32 8664 ms 7616 ms 1.14
lotsOfClasses-sourceToZip-win32 5282 ms 5002 ms 1.06
lotsOfClasses-mdapiToSource-win32 8012 ms 7750 ms 1.03
lotsOfClassesOneDir-componentSetCreate-win32 2155 ms 2084 ms 1.03
lotsOfClassesOneDir-sourceToMdapi-win32 14072 ms 13457 ms 1.05
lotsOfClassesOneDir-sourceToZip-win32 9483 ms 8948 ms 1.06
lotsOfClassesOneDir-mdapiToSource-win32 14338 ms 13755 ms 1.04

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.