Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fable-serviceproviderbase

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fable-serviceproviderbase - npm Package Compare versions

Comparing version 3.0.11 to 3.0.12

31

dist/fable-serviceproviderbase.compatible.js

@@ -67,10 +67,12 @@ "use strict";

_classCallCheck(this, FableServiceProviderBase);
// Check if a fable was passed in
// Check if a fable was passed in; connect it if so
if (_typeof(pFable) === 'object' && pFable.isFable) {
this.fable = pFable;
this.connectFable(pFable);
} else {
this.fable = false;
}
// initialize options and UUID based on whether the fable was passed in or not.
if (this.fable) {
this.connectFable(this.fable);
this.UUID = pFable.getUUID();
this.options = _typeof(pOptions) === 'object' ? pOptions : {};

@@ -81,12 +83,7 @@ } else {

this.options = _typeof(pFable) === 'object' && !pFable.isFable ? pFable : _typeof(pOptions) === 'object' ? pOptions : {};
this.UUID = "CORE-SVC-".concat(Math.floor(Math.random() * (99999 - 10000) + 10000));
}
// It's expected that the deriving class will set this
this.serviceType = 'Unknown';
if (this.fable) {
this.UUID = pFable.getUUID();
} else {
// Without any dependencies, get a decently random UUID for the service
this.UUID = "CORE-SVC-".concat(Math.floor(Math.random() * (99999 - 10000) + 10000));
}
this.serviceType = "Unknown-".concat(this.UUID);

@@ -107,5 +104,11 @@ // The service hash is used to identify the specific instantiation of the service in the services map

}
this.log = this.fable.log;
this.servicesMap = this.fable.servicesMap;
this.services = this.fable.services;
if (!this.log) {
this.log = this.fable.Logging;
}
if (!this.services) {
this.services = this.fable.services;
}
if (!this.servicesMap) {
this.servicesMap = this.fable.servicesMap;
}
return true;

@@ -119,3 +122,3 @@ }

// This is left here in case we want to go back to having different code for "core" services
// This is left here in case we want to go back to having different code/base class for "core" services
module.exports.CoreServiceProviderBase = FableServiceProviderBase;

@@ -122,0 +125,0 @@ }, {}]

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

"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"===_typeof(t)?t:String(t)}function _toPrimitive(e,t){if("object"!==_typeof(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}!function(e){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).FableServiceproviderbase=e()}}((function(){return function e(t,r,o){function n(f,a){if(!r[f]){if(!t[f]){var s="function"==typeof require&&require;if(!a&&s)return s(f,!0);if(i)return i(f,!0);var l=new Error("Cannot find module '"+f+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[f]={exports:{}};t[f][0].call(c.exports,(function(e){return n(t[f][1][e]||e)}),c,c.exports,e,t,r,o)}return r[f].exports}for(var i="function"==typeof require&&require,f=0;f<o.length;f++)n(o[f]);return n}({1:[function(e,t,r){var o=function(){function e(t,r,o){_classCallCheck(this,e),"object"===_typeof(t)&&t.isFable?this.fable=t:this.fable=!1,this.fable?(this.connectFable(this.fable),this.options="object"===_typeof(r)?r:{}):this.options="object"!==_typeof(t)||t.isFable?"object"===_typeof(r)?r:{}:t,this.serviceType="Unknown",this.fable?this.UUID=t.getUUID():this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4)),this.Hash="string"==typeof o?o:this.fable||"string"!=typeof r?"".concat(this.UUID):r}return _createClass(e,[{key:"connectFable",value:function(e){if("object"!==_typeof(e)||!e.isFable){var t="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(_typeof(e),"].}");return console.log(t),new Error(t)}return this.fable||(this.fable=e),this.log=this.fable.log,this.servicesMap=this.fable.servicesMap,this.services=this.fable.services,!0}}]),e}();_defineProperty(o,"isFableService",!0),t.exports=o,t.exports.CoreServiceProviderBase=o},{}]},{},[1])(1)}));
"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"===_typeof(t)?t:String(t)}function _toPrimitive(e,t){if("object"!==_typeof(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}!function(e){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).FableServiceproviderbase=e()}}((function(){return function e(t,r,o){function i(f,s){if(!r[f]){if(!t[f]){var a="function"==typeof require&&require;if(!s&&a)return a(f,!0);if(n)return n(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[f]={exports:{}};t[f][0].call(l.exports,(function(e){return i(t[f][1][e]||e)}),l,l.exports,e,t,r,o)}return r[f].exports}for(var n="function"==typeof require&&require,f=0;f<o.length;f++)i(o[f]);return i}({1:[function(e,t,r){var o=function(){function e(t,r,o){_classCallCheck(this,e),"object"===_typeof(t)&&t.isFable?this.connectFable(t):this.fable=!1,this.fable?(this.UUID=t.getUUID(),this.options="object"===_typeof(r)?r:{}):(this.options="object"!==_typeof(t)||t.isFable?"object"===_typeof(r)?r:{}:t,this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4))),this.serviceType="Unknown-".concat(this.UUID),this.Hash="string"==typeof o?o:this.fable||"string"!=typeof r?"".concat(this.UUID):r}return _createClass(e,[{key:"connectFable",value:function(e){if("object"!==_typeof(e)||!e.isFable){var t="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(_typeof(e),"].}");return console.log(t),new Error(t)}return this.fable||(this.fable=e),this.log||(this.log=this.fable.Logging),this.services||(this.services=this.fable.services),this.servicesMap||(this.servicesMap=this.fable.servicesMap),!0}}]),e}();_defineProperty(o,"isFableService",!0),t.exports=o,t.exports.CoreServiceProviderBase=o},{}]},{},[1])(1)}));
//# sourceMappingURL=fable-serviceproviderbase.compatible.min.js.map

@@ -63,10 +63,12 @@ "use strict";

constructor(pFable, pOptions, pServiceHash) {
// Check if a fable was passed in
// Check if a fable was passed in; connect it if so
if (typeof pFable === 'object' && pFable.isFable) {
this.fable = pFable;
this.connectFable(pFable);
} else {
this.fable = false;
}
// initialize options and UUID based on whether the fable was passed in or not.
if (this.fable) {
this.connectFable(this.fable);
this.UUID = pFable.getUUID();
this.options = typeof pOptions === 'object' ? pOptions : {};

@@ -77,12 +79,7 @@ } else {

this.options = typeof pFable === 'object' && !pFable.isFable ? pFable : typeof pOptions === 'object' ? pOptions : {};
this.UUID = "CORE-SVC-".concat(Math.floor(Math.random() * (99999 - 10000) + 10000));
}
// It's expected that the deriving class will set this
this.serviceType = 'Unknown';
if (this.fable) {
this.UUID = pFable.getUUID();
} else {
// Without any dependencies, get a decently random UUID for the service
this.UUID = "CORE-SVC-".concat(Math.floor(Math.random() * (99999 - 10000) + 10000));
}
this.serviceType = "Unknown-".concat(this.UUID);

@@ -101,5 +98,11 @@ // The service hash is used to identify the specific instantiation of the service in the services map

}
this.log = this.fable.log;
this.servicesMap = this.fable.servicesMap;
this.services = this.fable.services;
if (!this.log) {
this.log = this.fable.Logging;
}
if (!this.services) {
this.services = this.fable.services;
}
if (!this.servicesMap) {
this.servicesMap = this.fable.servicesMap;
}
return true;

@@ -111,3 +114,3 @@ }

// This is left here in case we want to go back to having different code for "core" services
// This is left here in case we want to go back to having different code/base class for "core" services
module.exports.CoreServiceProviderBase = FableServiceProviderBase;

@@ -114,0 +117,0 @@ }, {}]

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

"use strict";function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).FableServiceproviderbase=e()}}((function(){return function e(t,r,i){function o(f,s){if(!r[f]){if(!t[f]){var a="function"==typeof require&&require;if(!s&&a)return a(f,!0);if(n)return n(f,!0);var l=new Error("Cannot find module '"+f+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[f]={exports:{}};t[f][0].call(c.exports,(function(e){return o(t[f][1][e]||e)}),c,c.exports,e,t,r,i)}return r[f].exports}for(var n="function"==typeof require&&require,f=0;f<i.length;f++)o(i[f]);return o}({1:[function(e,t,r){class i{constructor(e,t,r){"object"==typeof e&&e.isFable?this.fable=e:this.fable=!1,this.fable?(this.connectFable(this.fable),this.options="object"==typeof t?t:{}):this.options="object"!=typeof e||e.isFable?"object"==typeof t?t:{}:e,this.serviceType="Unknown",this.fable?this.UUID=e.getUUID():this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4)),this.Hash="string"==typeof r?r:this.fable||"string"!=typeof t?"".concat(this.UUID):t}connectFable(e){if("object"!=typeof e||!e.isFable){let t="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(typeof e,"].}");return console.log(t),new Error(t)}return this.fable||(this.fable=e),this.log=this.fable.log,this.servicesMap=this.fable.servicesMap,this.services=this.fable.services,!0}}_defineProperty(i,"isFableService",!0),t.exports=i,t.exports.CoreServiceProviderBase=i},{}]},{},[1])(1)}));
"use strict";function _defineProperty(e,t,i){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).FableServiceproviderbase=e()}}((function(){return function e(t,i,r){function o(s,f){if(!i[s]){if(!t[s]){var a="function"==typeof require&&require;if(!f&&a)return a(s,!0);if(n)return n(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=i[s]={exports:{}};t[s][0].call(l.exports,(function(e){return o(t[s][1][e]||e)}),l,l.exports,e,t,i,r)}return i[s].exports}for(var n="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t,i){class r{constructor(e,t,i){"object"==typeof e&&e.isFable?this.connectFable(e):this.fable=!1,this.fable?(this.UUID=e.getUUID(),this.options="object"==typeof t?t:{}):(this.options="object"!=typeof e||e.isFable?"object"==typeof t?t:{}:e,this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4))),this.serviceType="Unknown-".concat(this.UUID),this.Hash="string"==typeof i?i:this.fable||"string"!=typeof t?"".concat(this.UUID):t}connectFable(e){if("object"!=typeof e||!e.isFable){let t="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(typeof e,"].}");return console.log(t),new Error(t)}return this.fable||(this.fable=e),this.log||(this.log=this.fable.Logging),this.services||(this.services=this.fable.services),this.servicesMap||(this.servicesMap=this.fable.servicesMap),!0}}_defineProperty(r,"isFableService",!0),t.exports=r,t.exports.CoreServiceProviderBase=r},{}]},{},[1])(1)}));
//# sourceMappingURL=fable-serviceproviderbase.min.js.map
{
"name": "fable-serviceproviderbase",
"version": "3.0.11",
"version": "3.0.12",
"description": "Simple base classes for fable services.",

@@ -5,0 +5,0 @@ "main": "source/Fable-ServiceProviderBase.js",

@@ -13,6 +13,6 @@ /**

{
// Check if a fable was passed in
// Check if a fable was passed in; connect it if so
if ((typeof(pFable) === 'object') && pFable.isFable)
{
this.fable = pFable;
this.connectFable(pFable);
}

@@ -24,5 +24,6 @@ else

// initialize options and UUID based on whether the fable was passed in or not.
if (this.fable)
{
this.connectFable(this.fable);
this.UUID = pFable.getUUID();
this.options = (typeof(pOptions) === 'object') ? pOptions

@@ -38,17 +39,8 @@ : {};

: {};
this.UUID = `CORE-SVC-${Math.floor((Math.random() * (99999 - 10000)) + 10000)}`
}
// It's expected that the deriving class will set this
this.serviceType = 'Unknown';
this.serviceType = `Unknown-${this.UUID}`;
if (this.fable)
{
this.UUID = pFable.getUUID();
}
else
{
// Without any dependencies, get a decently random UUID for the service
this.UUID = `CORE-SVC-${Math.floor((Math.random() * (99999 - 10000)) + 10000)}`
}
// The service hash is used to identify the specific instantiation of the service in the services map

@@ -74,6 +66,16 @@ this.Hash = (typeof(pServiceHash) === 'string') ? pServiceHash

this.log = this.fable.log;
this.servicesMap = this.fable.servicesMap;
this.services = this.fable.services;
if (!this.log)
{
this.log = this.fable.Logging;
}
if (!this.services)
{
this.services = this.fable.services;
}
if (!this.servicesMap)
{
this.servicesMap = this.fable.servicesMap;
}
return true;

@@ -87,3 +89,3 @@ }

// This is left here in case we want to go back to having different code for "core" services
// This is left here in case we want to go back to having different code/base class for "core" services
module.exports.CoreServiceProviderBase = FableServiceProviderBase;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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