0.0.4 • Published 4 months ago

@kvytech/medusa-plugin-management v0.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

Medusa Plugin Management

Plugins Management for manage plugins in Medusa Ecommerce

Install

yarn add @kvytech/medusa-plugin-management

or

npm install @kvytech/medusa-plugin-management

Configuration

Enable in your medusa-config.js file similar to other plugins:

const plugins = [
    // ... other plugins
  {
    resolve: `@kvytech/medusa-plugin-management`,
    options: {
      enableUI: true,
      blackList: ["@medusajs/file-local", "@medusajs/admin"], //Here is disable list plugin will scan in project
    },
  },
]

Plugin will auto scan all plugins in project and auto create in database, It will load name, tags, setting_link from static constant in service file

Example:

class PluginsManagementService extends TransactionBaseService {
  static PLUGIN_NAME = 'medusa-payment-manual'
  static TAGS = ['payment']
  static SETTING_LINK = 'a/settings/medusa-payment-manual'
}

URL Docs

URL: ${baseURL}/medusa-plugin-management/docs

Entity Type

@Entity()
export class PluginsManagement {
  @PrimaryColumn()
  @Column({ type: "text", primary: true })
  name: string;

  @Column({ type: "boolean" })
  is_enable: boolean;

  @Column({ type: "jsonb" })
  tags: string[];

  @Column({ type: "character" })
  setting_link: string;
}