Socket
Socket
Sign inDemoInstall

@tinacms/core

Package Overview
Dependencies
Maintainers
12
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.9.0 to 0.10.0-alpha.0

1

build/cms.d.ts

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

disable(): void;
toggle(): 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 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=!1,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=!0,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||void 0===t.enabled?this.enable():this.disable()}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})});
!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=!1,this.events.dispatch(a.DISABLED)},a.prototype.toggle=function(){this.enabled?this.disable():this.enable()},a.ENABLED={type:"cms:enable"},a.DISABLED={type:"cms:disable"},a);function a(t){var i=this;void 0===t&&(t={}),this._enabled=!0,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||void 0===t.enabled?this.enable():this.disable()}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.10.0-alpha.0](https://github.com/tinacms/tinacms/compare/@tinacms/core@0.9.0...@tinacms/core@0.10.0-alpha.0) (2020-06-17)
### Features
* add cms.toggle to make togling the cms.enabled prop easier ([2f3c288](https://github.com/tinacms/tinacms/commit/2f3c288))
# [0.9.0](https://github.com/tinacms/tinacms/compare/@tinacms/core@0.9.0-alpha.1...@tinacms/core@0.9.0) (2020-06-01)

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

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

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

},
"gitHead": "7964eefc0f095f6b3b7b2277aebd9fe2fcdf0c8c"
"gitHead": "65d302c2e3508f25b4893efdf16c8f80cf43ac43"
}
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