-
Notifications
You must be signed in to change notification settings - Fork 6
Issues Fixes around OmniScript and VlocityCard deployment #428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -288,9 +288,14 @@ export class SalesforcePackageBuilder { | |
| } | ||
|
|
||
| if (metadataType.isBundle) { | ||
| // Only Aura and LWC are bundled at this moment | ||
| // Experience Bundle, Digital Experience Bundles, Only Aura and LWC are bundled at this moment | ||
| // Classic metadata package all related files | ||
| await this.addBundledSources(path.dirname(file), metadataType); | ||
| if (metadataType.id === 'experiencebundle' && file.endsWith('-meta.xml')) { | ||
| await this.addBundledSources(file.replace(/-meta\.xml$/ig, '').split('.').shift()!, metadataType); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
| } | ||
| else { | ||
| await this.addBundledSources(path.dirname(file), metadataType); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a test method for this use case? For changes to the package builder I'd like to have test cases which will also prevent the feature from breaking in the future. There is an existing test class that you can extend. |
||
| } | ||
| } | ||
|
|
||
| // add source | ||
|
|
@@ -421,14 +426,17 @@ export class SalesforcePackageBuilder { | |
| return false; | ||
| } | ||
|
|
||
| private async addBundledSources(bundleFolder: string, metadataType: MetadataType) { | ||
| private async addBundledSources(bundleFolder: string, metadataType: MetadataType, componentName?: string) { | ||
| const bundleFiles = await this.fs.readDirectory(bundleFolder); | ||
| const componentName = bundleFolder.split(/\\|\//g).pop()!; | ||
| componentName = componentName ?? bundleFolder.split(/\\|\//g).pop(); | ||
| for (const file of bundleFiles) { | ||
| const fullPath = path.join(bundleFolder, file.name); | ||
| if (file.isFile() && this.addParsedFile(fullPath)) { | ||
| await this.addSingleSourceFile(fullPath, metadataType, componentName); | ||
| } | ||
| if (file.isDirectory()) { | ||
| await this.addBundledSources(fullPath, metadataType, componentName); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doens't this also flatten nested structures in for example LWC bundles? And is that wanted, how would it affect |
||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -821,6 +829,9 @@ export class SalesforcePackageBuilder { | |
| const componentName = sourceFileName.replace(/\.[^.]+$/ig, ''); | ||
|
|
||
| if (metadataType.isBundle) { | ||
| if (metadataType.id == 'experiencebundle' || metadataType.id == 'digitalexperiencebundle') { | ||
| return sourceFileName.split('.').shift()!; | ||
| } | ||
| return metaFile.split(/\\|\//g).slice(-2).shift()!; | ||
| } | ||
|
|
||
|
|
@@ -848,7 +859,7 @@ export class SalesforcePackageBuilder { | |
| } | ||
|
|
||
| if (metadataType.isBundle && componentPackageFolder) { | ||
| const componentName = fullSourcePath.split(/\\|\//g).slice(-2).shift()!; | ||
| const componentName = this.getPackageComponentName(fullSourcePath, metadataType); | ||
| return path.posix.join(componentPackageFolder, componentName); | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,7 +76,7 @@ export class FlexCardLwcCompiler { | |
| const files: Array<{ | ||
| filepath: string, | ||
| source: string | ||
| }> = compiler.generateLWCFiles(name, card, 'card', null, metaObject); | ||
| }> = await compiler.generateLWCFiles(name, card, 'card', null, metaObject); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of calling |
||
|
|
||
| return { | ||
| name: name, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't noticed when this typo creaped in, thanks for addressing it.