npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@thaleslabs/strapi-plugin-record-locking

v0.3.1

Published

Hey I am editing, don't change my content

Downloads

1

Readme

# Strapi plugin record-locking

Hey I am editing, don't change my content! Plugin

This plugin provides the ability to stop data loss when two users are editing the same record in STRAPI v4

Benefits

✅ Have only one user editing one record at a time ✅ Clearly shows you who is the other user editing the record

🧑‍💻 Install

npm i @notum-cz/strapi-plugin-record-locking

yarn add @notum-cz/strapi-plugin-record-locking

🖐 ⚠️ Read before installation


1. You need to create/modify file config/plugins.js with

module.exports = ({ env }) => ({
 "record-locking": {
    enabled: true,
  },
});

2. To suppport websocket protocol configure strapi middleware

For the config/middlewares.js file you will need to either replace 'strapi::security' with middleware object (example below) or update your existing configuration accordingly...

  1. Ensure that "ws:" and "wss:" are present in strapi::security config under contentSecurityPolicy.directives.connect-src
  2. Rebuild strapi and test record locking features.
  3. There should be no Content Security Policy error in the console.
module.exports = [
  'strapi::errors',
  {
    name: "strapi::security",
    config: {
      contentSecurityPolicy: {
        useDefaults: true,
        directives: {
          "connect-src": ["'self'", "https:",  "wss:", "http:"],
          "img-src": [
            "'self'",
            "data:",
            "blob:",
          ],
          "media-src": ["'self'", "data:", "blob:"],
          upgradeInsecureRequests: null,
        },
      },
    },
  },
  'strapi::cors', ...

This is optional but recommended as Socket.io will fallback to using http protocol and throws the following error in web console...
Refused to connect to <protocol>://<url> because it does not appear in the connect-src directive of the Content Security Policy


🛣️ Road map

  • ✨ Option to choose specific collection types
  • ✨ Add a "Takeover" button
  • ✨ Possibility to choose roles prioritization (Author cannot Takover SuperAdmin)

🐛 Bugs

We are using GitHub Issues to manage bugs. If you want to help us you would be a rock ⭐.

🧔 Authors

The main star: Martin Čapek https://github.com/martincapek Developer: Filip Janko https://github.com/fikoun Project owner: Ondřej Janošík

🚀 Created with passion by Notum Technologies

  • Official STRAPI partner and Czech based custom development agency.
  • We love to share expertise with the open source community, that's why this plugin was created. 🖤

🎯 How can Notum help you with your STRAPI project?

✔️ We can help you develop custom STRAPI, web and mobile apps. ✔️ With 100+ projects, open communication and great project management we have the tools to get your project across the finish line. 📅 If you want to discuss your Strapi project, text us at [email protected]

Keywords