Socket
Socket
Sign inDemoInstall

@tinacms/core

Package Overview
Dependencies
Maintainers
11
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinacms/core - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0-alpha.0

12

build/cms.d.ts

@@ -69,2 +69,3 @@ /**

export interface CMSConfig {
enabled?: boolean;
plugins?: Array<Plugin>;

@@ -76,2 +77,9 @@ apis?: {

export declare class CMS {
static ENABLED: {
type: string;
};
static DISABLED: {
type: string;
};
private _enabled;
/**

@@ -131,2 +139,6 @@ * An object for managing CMSs plugins.

registerApi(name: string, api: any): void;
get enabled(): boolean;
get disabled(): boolean;
enable(): void;
disable(): void;
}

2

build/index.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self)["@tinacms/core"]={})}(this,function(t){"use strict";var e=(n.prototype.getType=function(t){return this.plugins[t]=this.plugins[t]||new i(t,this.events)},n.prototype.findOrCreateMap=function(t){return this.getType(t)},n.prototype.add=function(t){this.findOrCreateMap(t.__type).add(t)},n.prototype.remove=function(t){this.findOrCreateMap(t.__type).remove(t)},n.prototype.all=function(t){return this.findOrCreateMap(t).all()},n);function n(t){this.events=t,this.plugins={}}var i=(s.prototype.add=function(t){var e=t;e.__type||(e.__type=this.__type),this.__plugins[e.name]=e,this.events.dispatch({type:"plugin:add:"+this.__type})},s.prototype.all=function(){var e=this;return Object.keys(this.__plugins).map(function(t){return e.__plugins[t]})},s.prototype.find=function(t){return this.__plugins[t]},s.prototype.remove=function(t){var e="string"==typeof t?t:t.name,n=this.__plugins[e];return delete this.__plugins[e],this.events.dispatch({type:"plugin:remove:"+this.__type}),n},s.prototype.subscribe=function(t){return this.events.subscribe("plugin:*:"+this.__type,t)},s);function s(t,e){this.__type=t,this.events=e,this.__plugins={}}var r=function(){var i=this;this.listeners=new Set,this.subscribe=function(t,e){var n=new u(t,e);return i.listeners.add(n),function(){i.listeners.delete(n)}},this.dispatch=function(e){Array.from(i.listeners.values()).forEach(function(t){return t.handleEvent(e)})}},u=(p.prototype.handleEvent=function(t){return!!this.watchesEvent(t)&&(this.callback(t),!0)},p.prototype.watchesEvent=function(t){if("*"===this.eventPattern)return!0;for(var e=t.type.split(":"),n=this.eventPattern.split(":"),i=0,s=!1;!s&&i<n.length;){var r="*"===n[i],u=n[i]===e[i];s=!(r||u),i++}return!s},p);function p(t,e){this.eventPattern=t,this.callback=e}var o=(c.prototype.registerApi=function(t,e){this.api[t]=e},c);function c(t){var i=this;void 0===t&&(t={}),this.api={},this.events=new r,this.plugins=new e(this.events),t.plugins&&t.plugins.forEach(function(t){return i.plugins.add(t)}),t.apis&&Object.entries(t.apis).forEach(function(t){var e=t[0],n=t[1];return i.registerApi(e,n)})}var a=(h.prototype.subscribe=function(t){var e=this;return this.__subscribers.push(t),function(){return e.unsubscribe(t)}},h.prototype.unsubscribe=function(t){var e=this.__subscribers.indexOf(t);this.__subscribers.splice(e,1)},h.prototype.notifiySubscribers=function(){this.__subscribers.forEach(function(t){return t()})},h);function h(){this.__subscribers=[]}t.CMS=o,t.EventBus=r,t.Listener=u,t.PluginType=i,t.PluginTypeManager=e,t.Subscribable=a,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self)["@tinacms/core"]={})}(this,function(t){"use strict";var e=(n.prototype.getType=function(t){return this.plugins[t]=this.plugins[t]||new i(t,this.events)},n.prototype.findOrCreateMap=function(t){return this.getType(t)},n.prototype.add=function(t){this.findOrCreateMap(t.__type).add(t)},n.prototype.remove=function(t){this.findOrCreateMap(t.__type).remove(t)},n.prototype.all=function(t){return this.findOrCreateMap(t).all()},n);function n(t){this.events=t,this.plugins={}}var i=(s.prototype.add=function(t){var e=t;e.__type||(e.__type=this.__type),this.__plugins[e.name]=e,this.events.dispatch({type:"plugin:add:"+this.__type})},s.prototype.all=function(){var e=this;return Object.keys(this.__plugins).map(function(t){return e.__plugins[t]})},s.prototype.find=function(t){return this.__plugins[t]},s.prototype.remove=function(t){var e="string"==typeof t?t:t.name,n=this.__plugins[e];return delete this.__plugins[e],this.events.dispatch({type:"plugin:remove:"+this.__type}),n},s.prototype.subscribe=function(t){return this.events.subscribe("plugin:*:"+this.__type,t)},s);function s(t,e){this.__type=t,this.events=e,this.__plugins={}}var r=function(){var i=this;this.listeners=new Set,this.subscribe=function(t,e){var n=new o(t,e);return i.listeners.add(n),function(){i.listeners.delete(n)}},this.dispatch=function(e){Array.from(i.listeners.values()).forEach(function(t){return t.handleEvent(e)})}},o=(p.prototype.handleEvent=function(t){return!!this.watchesEvent(t)&&(this.callback(t),!0)},p.prototype.watchesEvent=function(t){if("*"===this.eventPattern)return!0;for(var e=t.type.split(":"),n=this.eventPattern.split(":"),i=0,s=!1;!s&&i<n.length;){var r="*"===n[i],o=n[i]===e[i];s=!(r||o),i++}return!s},p);function p(t,e){this.eventPattern=t,this.callback=e}var u=(a.prototype.registerApi=function(t,e){this.api[t]=e},Object.defineProperty(a.prototype,"enabled",{get:function(){return this._enabled},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"disabled",{get:function(){return!this._enabled},enumerable:!0,configurable:!0}),a.prototype.enable=function(){this._enabled=!0,this.events.dispatch(a.ENABLED)},a.prototype.disable=function(){this._enabled=!0,this.events.dispatch(a.DISABLED)},a.ENABLED={type:"cms:enable"},a.DISABLED={type:"cms:disable"},a);function a(t){var i=this;void 0===t&&(t={}),this._enabled=!1,this.api={},this.events=new r,this.plugins=new e(this.events),t.plugins&&t.plugins.forEach(function(t){return i.plugins.add(t)}),t.apis&&Object.entries(t.apis).forEach(function(t){var e=t[0],n=t[1];return i.registerApi(e,n)}),t.enabled&&this.enable()}var c=(h.prototype.subscribe=function(t){var e=this;return this.__subscribers.push(t),function(){return e.unsubscribe(t)}},h.prototype.unsubscribe=function(t){var e=this.__subscribers.indexOf(t);this.__subscribers.splice(e,1)},h.prototype.notifiySubscribers=function(){this.__subscribers.forEach(function(t){return t()})},h);function h(){this.__subscribers=[]}t.CMS=u,t.EventBus=r,t.Listener=o,t.PluginType=i,t.PluginTypeManager=e,t.Subscribable=c,Object.defineProperty(t,"__esModule",{value:!0})});

@@ -6,2 +6,13 @@ # Change Log

# [0.9.0-alpha.0](https://github.com/tinacms/tinacms/compare/@tinacms/core@0.8.0...@tinacms/core@0.9.0-alpha.0) (2020-05-28)
### Features
* **cms:** add new first-class enabled state ([0b4a000](https://github.com/tinacms/tinacms/commit/0b4a000))
# [0.8.0](https://github.com/tinacms/tinacms/compare/@tinacms/core@0.8.0-alpha.0...@tinacms/core@0.8.0) (2020-05-11)

@@ -8,0 +19,0 @@

{
"name": "@tinacms/core",
"version": "0.8.0",
"version": "0.9.0-alpha.0",
"main": "build/index.js",

@@ -32,3 +32,3 @@ "types": "build/index.d.ts",

},
"gitHead": "c5946efeb35f872e4900ed3bdbede71c61823b8c"
"gitHead": "7ff6d0f8cdcb7bdf7bfcd47d89db4bb0223ee897"
}
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