sfcc-cartridge-integrity-check
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.2 • Public • Published

    NPM version Downloads star this repo fork this repo Build Status

    sfcc-cartridge-integrity-check

    Check the integrity of SFCC cartridges that shouldn't be modified.

    Screenshot

    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 © 2022 Jens Simon

    Install

    npm i sfcc-cartridge-integrity-check

    DownloadsWeekly Downloads

    34

    Version

    2.0.2

    License

    MIT

    Unpacked Size

    14.5 kB

    Total Files

    6

    Last publish

    Collaborators

    • jenssimon