README
sfcc-cartridge-integrity-check
Check the integrity of SFCC cartridges that shouldn't be modified.
Install
$ yarn add sfcc-cartridge-integrity-check --dev
Usage
Salesforce Commerce Cloud (SFCC) introduced the concept of cartridges that shouldn't be modified with their Storefront Reference Architecture (SFRA).
To protect your customization projects from (unintented) modifications of such cartridges here is a small tool to check these cartridges. The git hash of the last commit in the cartridge is used to check if there is a modification. Also the uncommitted files will be checked and a warning will be shown.
const cartridgeIntegrity = require('./cartridgeIntegrity');
// retrieve this data from a file
const integrityData = {
'app_storefront_base': 'SHA',
};
const { checkCartridgeIntegrity, generateCartridgeIntegrityDataFile } = cartridgeIntegrity({
readOnlyCartridges: [
'app_storefront_base',
],
integrityData,
customizationProject: true, // if false integrity won't be checked
});
checkCartridgeIntegrity();
You can generate a file containing the integrity data as JSON.
generateCartridgeIntegrityDataFile('./path/to/file.json');
License
MIT © 2021 Jens Simon