Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@onebeyond/agnostic-cms-harmonizer

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onebeyond/agnostic-cms-harmonizer

Library to manage the communication with any CMS agnostic to the user

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
123
increased by35.16%
Maintainers
3
Weekly downloads
 
Created
Source

Agnostic CMS harmonizer

all-contributors

Library to handle communication with different CMSs in a user-agnostic way.

Contribute

To contribute to this project, you need to follow the next steps:

Requirements

  • contentful requirements
  • If you don't want to install the contentful CLI you can use the npx command to run it without installing it globally, as it's an optional dependency.

Contentful

  1. You have to create a space in contentful to run the tests.
  2. Follow the instructions here to create an API key.

Environment variables

Create a .env file in the root of the project with the following content:

CONTENTFUL_ACCESS_TOKEN=your_access_token
CONTENTFUL_ENVIRONMENT=your_environment
CONTENTFUL_SPACE=your_space
CONTENTFUL_ENTRY=your_entry

Import dummy content to your space

To run the e2e tests you need to be authenticated in your contentful account and import the dummy content into the space you created before. The content you need to import is located at __tests__/exports/contentful/agnostic-cms-harmonizer_space.json and should not be updated.

To log in to your contentful account run the following command and follow the instructions in the terminal:

# If you have the contenful-cli installed globally
contenful login

# If you don't have the contenful-cli installed globally
npx contentful-cli login

To import the dummy content run the following command:

# If you have the contenful-cli installed globally
contentful space import --content-file __tests__/exports/contentful/agnostic-cms-harmonizer_space.json --space-id <your-contentful-space-id> --environment-id <your-contentful-environment-id>

# If you don't have the contenful-cli installed globally
npx contentful-cli space import --content-file __tests__/exports/contentful/agnostic-cms-harmonizer_space.json --space-id <your-contentful-space-id> --environment-id <your-contentful-environment-id>

There is also a located at ./__tests__/exports/contentful/config.json in case you need to export your space's content for any reason. You just need to run the following command:

# If you have the contenful-cli installed globally
contentful space export --config ./__tests__/exports/contentful/config.json --space-id <your-contentful-space-id> --environment-id <your-contentful-environment-id>

# If you don't have the contenful-cli installed globally
npx contentful-cli space export --config ./__tests__/exports/contentful/config.json --space-id <your-contentful-space-id> --environment-id <your-contentful-environment-id>

Tests

At this point, no further configuration is required to run the unit tests.

npm run test

More of the same, for the E2E tests. Here it is crucial to have configured our .env and imported the dummy content to our space.

npm run test:e2e

The pipeline is configured to use the Contentful space managed by the agnostic.cms.harmonizer@proton.me account during the E2E tests execution. If the content of these tests needs to be updated in the provider, you must have access to this vault, otherwise, you can open an issue referencing the new content exported.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Íñigo Marquínez Prado
Íñigo Marquínez Prado

💻 📖 👀
Àlex Serra
Àlex Serra

💻 ⚠️ 📖 👀
Matyas Angyal
Matyas Angyal

👀 💻 📖 ⚠️
Ulises Gascón
Ulises Gascón

👀

This project follows the all-contributors specification. Contributions of any kind welcome!

Keywords

FAQs

Package last updated on 14 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc