Skip to content

Commit

Permalink
Merge pull request #621 from vlocityinc/beta
Browse files Browse the repository at this point in the history
Release 1.17.5
  • Loading branch information
manas-sf authored Nov 7, 2023
2 parents e9b4caa + 73f3ea1 commit 09b5154
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
2 changes: 1 addition & 1 deletion lib/datapacksexpanddefinition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ SObjects:
FilterFields:
- VersionNumber
- IsActive
- LightningWebComponentId
- WebComponentKey
FolderName:
- Type
- SubType
Expand Down
5 changes: 5 additions & 0 deletions lib/datapacksjob.js
Original file line number Diff line number Diff line change
Expand Up @@ -2783,6 +2783,9 @@ DataPacksJob.prototype.deployJob = async function(jobInfo) {
VlocityUtils.error('Can\'t find compiled LWC components path. Skipping...');
}else{
try {
if (fs.readdirSync(tempSfdxLwcFolder+'/lwc').length === 0){
return;
}
VlocityUtils.log('Deploying generated LWC components');
this.vlocity.datapacksutils.addPackageDirToSfdxProjectJson(tempSfdxLwcFolder);
const mdapiTempFolder = path.join(jobInfo.tempFolder, 'mdapi');
Expand Down Expand Up @@ -2815,6 +2818,7 @@ DataPacksJob.prototype.deployJob = async function(jobInfo) {
var metadataKey = `${metadata.componentType}/${metadata.fullName}`;
VlocityUtils.success('Metadata Deployed', metadataKey);
jobInfo.currentStatus[metadataKey] = 'Success';
this.rmdirCustom(tempSfdxLwcFolder+'/lwc/'+metadata.fullName);
}
}
);
Expand All @@ -2828,6 +2832,7 @@ DataPacksJob.prototype.deployJob = async function(jobInfo) {
var metadataKey = `${metadata.componentType}/${metadata.fullName}`;
VlocityUtils.success('Metadata Deployed', metadataKey);
jobInfo.currentStatus[metadataKey] = 'Success';
this.rmdirCustom(tempSfdxLwcFolder+'/lwc/'+metadata.fullName);
}
}
);
Expand Down
41 changes: 21 additions & 20 deletions lib/datapacktypes/vlocitycard.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,34 +175,35 @@ VlocityCard.prototype.onDeployFinish = async function(jobInfo) {
return;
}

//--------Load Flexcard compiler-------
// Make sure we load the package version
await this.vlocity.utilityservice.getPackageVersion();

const compilerName = 'flexcard-compiler';
const namespace = this.vlocity.namespace;
const packageVersion = this.vlocity.PackageVersion;

const flexCardsCompiler = await VlocityUtils.loadCompiler(compilerName,
jobInfo, packageVersion, namespace);
if(flexCardsCompiler){
for (let i = 0; i < idsArray.length; i++) {
let flexCardID = idsArray[i];
await this.compileFlexCardsLwc(flexCardID,jobInfo,flexCardsCompiler) ;
}
if (!jobInfo.ignoreLocalCompilationCards){
//--------Load Flexcard compiler-------
// Make sure we load the package version
await this.vlocity.utilityservice.getPackageVersion();

const compilerName = 'flexcard-compiler';
const namespace = this.vlocity.namespace;
const packageVersion = this.vlocity.PackageVersion;

const flexCardsCompiler = await VlocityUtils.loadCompiler(compilerName,
jobInfo, packageVersion, namespace);
if(flexCardsCompiler){
for (let i = 0; i < idsArray.length; i++) {
let flexCardID = idsArray[i];
await this.compileFlexCardsLwc(flexCardID,jobInfo,flexCardsCompiler) ;
}
} else{
hasFlexCardCompiler= false;
}
} else{
hasFlexCardCompiler= false;
}

hasFlexCardCompiler= false;
}
} catch (e) {

hasFlexCardCompiler= false;
VlocityUtils.error('Error while loading Flexcard Compiler', e);
}

// If we were unable to load the compiler package, use the legacy method
if(!hasFlexCardCompiler){

await this.flexCardDeployWithPuppeteer(jobInfo) ;
return;
}
Expand Down

0 comments on commit 09b5154

Please sign in to comment.