Giter VIP home page Giter VIP logo

sfcc-cartridge-integrity-check's Introduction

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

sfcc-cartridge-integrity-check's People

Contributors

dependabot[bot] avatar jenssimon avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sfcc-cartridge-integrity-check's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/codeql-analysis.yml
  • actions/checkout v4
  • github/codeql-action v3
  • github/codeql-action v3
  • github/codeql-action v3
.github/workflows/commitlint.yml
  • actions/checkout v4
  • wagoid/commitlint-github-action v5
npm
package.json
  • chalk ^5.3.0
  • shelljs ^0.8.5
  • table ^6.8.1
  • @commitlint/cli ^18.0.0
  • @commitlint/config-conventional ^18.0.0
  • @jenssimon/eslint-config-base ^7.3.1
  • @jenssimon/eslint-config-typescript ^5.2.2
  • @types/node ^20.0.0
  • @types/shelljs ^0.8.14
  • commitizen ^4.3.0
  • cz-conventional-changelog ^3.3.0
  • eslint ^8.52.0
  • husky ^9.0.0
  • lint-staged ^15.0.2
  • npm-run-all ^4.1.5
  • pinst ^3.0.0
  • semantic-release ^23.0.0
  • ts-node ^10.9.1
  • typescript ^5.2.2
  • yarn 4.0.2
nvm
.nvmrc
  • node 20.11.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.