2.3.0 • Published 6 months ago

sfcc-cartridge-integrity-check v2.3.0

Weekly downloads
9
License
MIT
Repository
github
Last release
6 months ago

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

2.3.0

6 months ago

2.2.0

7 months ago

2.1.1

10 months ago

2.1.0

10 months ago

2.0.3

1 year ago

2.0.2

2 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.0

4 years ago

1.1.2

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago