
Security News
PHP Foundation Says Chainguard Broke Security Embargo Ahead of Emergency Patches
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.
@valantic/spartacus-mock
Advanced tools
This project offers you the possibility to mock the OCC Endpoints of your Composable Storefront (Spartacus). It uses the Mock Service Worker to mock the API calls.
This project offers you the possibility, to mock the API (OCC) Endpoints of your Composable-Storefront (Spartacus). It uses the Mock Service Worker (MSW) library to mock the API calls.
You want to get started quickly? Follow the steps of the Getting Started section.
This project is tested to work with the listed angular versions and the listed Spartacus Versions in this table.
| Angular | Spartacus | msw | spartacus-mock |
|---|---|---|---|
| >=21.0.0 <22.0.0 | 221121.7.x | 2.x | 6.x |
| >=19.0.0 <20.0.0 | 2211.x | 2.x | 5.x |
| >=17.0.0 <18.0.0 | 2211.x | 2.x | 4.x |
| >=15.0.0 <16.0.0 | 6.x.x | 2.x | 3.x |
| >=15.0.0 <16.0.0 | 6.x.x | 1.x | 2.x |
| >=14.0.0 <15.0.0 | 5.x.x | 1.x | 1.x |
It is possible that it works with other versions, but not tested.
When building Frontend application for SAP Commerce (former hybris), it was always a little bit annoying, as the frontend engineers needed to run hybris on their local machines. Additionally, one needed to wait until new features where built by the backend to be able to build the frontend for it.
In the new world of composable storefront (former spartacus), it already got easier as it is now possible to use a remote environment as backend. The problem of features not being ready yet or not being deployed to the remote environment still exists.
Spartacus-mock tries to solve both problems since you don't need to wait anymore, until
It comes with the mock-data for the standard electronics store.
You can then define your own custom mock-data tailored to your custom spartacus project. Adding new pages and components in no time helps you, developing your actual feature, without waiting until the Backend has finished or the hassle of running a local hybris ;-).
Spartacus-Mock currently offers mock-data for the following spartacus features / pages for the default electronics store:
See Roadmap for more information about the planned features.
For more information about the underlying Mock Service Worker tool, see the MSW documentation.
The developer documentation including api reference & examples can be found here.
If you encounter a problem with this library or if you have a new feature you'd like to see in this project, please create a new issue.
The contribution guidelines can be found here.
FAQs
This project offers you the possibility to mock the OCC Endpoints of your Composable Storefront (Spartacus). It uses the Mock Service Worker to mock the API calls.
The npm package @valantic/spartacus-mock receives a total of 0 weekly downloads. As such, @valantic/spartacus-mock popularity was classified as not popular.
We found that @valantic/spartacus-mock demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.

Security News
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.

Security News
PHP releases emergency patches for two critical RCE vulnerabilities as agencies urge organizations to take unpatched sites offline.

Threat Research
/Security News
A supply chain attack compromised LiteLLM 1.107.0 on PyPI and Docker, spreading malware that steals cloud credentials, developer secrets, and AI provider keys.