Socket
Socket
Sign inDemoInstall

medusa-plugin-strapi-ts

Package Overview
Dependencies
12
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    medusa-plugin-strapi-ts

A plugin for medusa to use strapi in the backend as the cms in typescript


Version published
Weekly downloads
342
increased by54.05%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Medusa Plugin Strapi Writtent in TypeScript

Getting started

Strapi is an amazing headless cms, this plugin helps bridge the medusajsa and strapi. This is based on the medusa-plugin-strapi developed by DeathWish, and additionally implements handshaking between strapi and medusa.

This plugin hands over control of strapi to Medusa. And medusa is purely used as a content engine.

Pre-requisities

You need to install the strapi-plugin-medusajs and enable it in strapi and follow the instructions in its readme file.

Installation

yarn add medusa-plugin-strapi-ts

configuration

You can register the plugin like so


{
            resolve: "medusa-plugin-strapi-ts",
            options: {
                ...strapiOptions
            }
},


where the strapiOptions will be like

const strapiOptions = 
    {
        encryption_algorithm: "aes-256-cbc",
        strapi_protocol: process?.env?.STRAPI_PROTOCOL,
        strapi_default_user: {
            username: process?.env?.STRAPI_MEDUSA_USER,
            password: process?.env?.STRAPI_MEDUSA_PASSWORD,
            email: process?.env?.STRAPI_MEDUSA_EMAIL,
            confirmed: true,
            blocked: false,
            provider: "local"
        },
        strapi_host: process?.env?.STRAPI_SERVER_HOSTNAME,
        strapi_admin: {
            username:
                process?.env?.STRAPI_SUPER_USERNAME ||
                "SuperUser",
            password:
                process?.env?.STRAPI_SUPER_PASSWORD ||
                "MedusaStrapi1",
            email:
                process?.env?.STRAPI_SUPER_USER_EMAIL ||
                "support@medusa-commerce.com"
        },
        strapi_port: process?.env?.STRAPI_PORT,
        strapi_secret: process?.env?.STRAPI_SECRET,
        strapi_public_key: process?.env?.STRAPI_PUBLIC_KEY,
        strapi_ignore_threshold: 3
    }

Usage

Install and fire away

Known Issues

  1. the tests need to be made a lot more rigorous to catch edge cases

Cavaets,

the package uses axios retry with a default fixed retry interval of 400seconds for any 429 errors. I'm happy to accept a PR which defines a better way of dealing with 429 errors

Support us

As much as we love FOSS software, nothing in this world is truely free. We'll be grateful if you can buy our team a coffee (https://www.buymeacoffee.com/uMRqW9NmS9).

Keywords

FAQs

Last updated on 13 Feb 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc