This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

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

2.3.0 • Public • Published

NPM version Downloads star this repo fork this repo CI

sfcc-cartridge-integrity-check

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

Warning

DEPRECATED

There are easier ways to detect that something has changed in SFRA core cartridges.

Example:

Using GitHub actions labeler can be used to mark PRs with a label when a change on SFRA core cartridges is included.

# .github/labeler.yml
sfra-change:
- cartridges/app_storefront_base/**/*
- cartridges/bm_app_storefront_base/**/*
- modules/server/**/*

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published

Package Sidebar

Install

npm i sfcc-cartridge-integrity-check

Weekly Downloads

152

Version

2.3.0

License

MIT

Unpacked Size

15 kB

Total Files

6

Last publish

Collaborators

  • jenssimon