@webiny/plugins
Advanced tools
Comparing version 3.0.1 to 4.0.0-beta.0
import { Plugin } from "./types"; | ||
import { PluginsContainer } from "./PluginsContainer"; | ||
declare const plugins: PluginsContainer; | ||
declare const registerPlugins: (...args: any) => void; | ||
@@ -7,2 +8,2 @@ declare const getPlugins: <T extends Plugin = Plugin>(type?: string) => T[]; | ||
declare const unregisterPlugin: (name: string) => void; | ||
export { PluginsContainer, registerPlugins, getPlugins, getPlugin, unregisterPlugin }; | ||
export { PluginsContainer, plugins, registerPlugins, getPlugins, getPlugin, unregisterPlugin }; |
13
index.js
@@ -12,10 +12,11 @@ "use strict"; | ||
}); | ||
exports.unregisterPlugin = exports.getPlugin = exports.getPlugins = exports.registerPlugins = void 0; | ||
exports.unregisterPlugin = exports.getPlugin = exports.getPlugins = exports.registerPlugins = exports.plugins = void 0; | ||
var _PluginsContainer = require("./PluginsContainer"); | ||
const __plugins = new _PluginsContainer.PluginsContainer(); | ||
const plugins = new _PluginsContainer.PluginsContainer(); | ||
exports.plugins = plugins; | ||
const registerPlugins = (...args) => { | ||
__plugins.register(...args); | ||
plugins.register(...args); | ||
}; | ||
@@ -26,3 +27,3 @@ | ||
const getPlugins = type => { | ||
return __plugins.byType(type); | ||
return plugins.byType(type); | ||
}; | ||
@@ -33,3 +34,3 @@ | ||
const getPlugin = name => { | ||
return __plugins.byName(name); | ||
return plugins.byName(name); | ||
}; | ||
@@ -40,3 +41,3 @@ | ||
const unregisterPlugin = name => { | ||
return __plugins.unregister(name); | ||
return plugins.unregister(name); | ||
}; | ||
@@ -43,0 +44,0 @@ |
{ | ||
"name": "@webiny/plugins", | ||
"version": "3.0.1", | ||
"version": "4.0.0-beta.0", | ||
"main": "index.js", | ||
@@ -23,3 +23,4 @@ "repository": { | ||
"publishConfig": { | ||
"access": "public" | ||
"access": "public", | ||
"directory": "dist" | ||
}, | ||
@@ -32,3 +33,3 @@ "scripts": { | ||
}, | ||
"gitHead": "170cd06dc00a635adc3ae88370f18056116fd9b1" | ||
"gitHead": "49bc7f5ad6bfc3b635510635000bda96948d0641" | ||
} |
import { Plugin } from "./types"; | ||
export declare class PluginsContainer { | ||
plugins: Record<string, Plugin>; | ||
constructor(plugins?: Plugin[]); | ||
constructor(plugins?: any); | ||
byName<T extends Plugin = Plugin>(name: string): T; | ||
@@ -6,0 +6,0 @@ byType<T extends Plugin>(type?: string): T[]; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11844
108
2