New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

arch-stream

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arch-stream - npm Package Compare versions

Comparing version 0.0.106 to 0.0.107

2

dist/arch-stream.min.js

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

/*! arch-stream v0.0.106 https://github.com/falsandtru/arch-stream | (c) 2015, falsandtru | undefined License (undefined) */
/*! arch-stream v0.0.107 https://github.com/falsandtru/arch-stream | (c) 2015, falsandtru | undefined License (undefined) */
define="function"==typeof define&&define.amd?define:function(){"use strict";var t="arch-stream",e={};return function r(i,n,o){return o?void o.apply(this,n.map(function(t){switch(t){case"require":return"function"==typeof require?require:void 0;case"exports":return-1===i.indexOf("/")?e[i]="undefined"==typeof exports?self[i]=self[i]||{}:exports:e[i]=e.hasOwnProperty(i)?e[i]:{};default:return".d"===t.slice(-2)&&{}||e.hasOwnProperty(t)&&e[t]||"function"==typeof require&&require(t)||self[t]}})):void r(t,i,n)}}();var __extends=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)};define("src/lib/thenable",["require","exports"],function(t,e){"use strict";function r(t){return!!t&&"object"==typeof t&&void 0!==t.then}e.isThenable=r}),define("src/lib/tick",["require","exports"],function(t,e){"use strict";var r;!function(t){function e(t){void n.push(t),void i()}function r(){void i(),void--o;for(var t=n.length;t-- >0;)void n.shift()()}function i(){if(0!==n.length)for(;o<s.length;)void setTimeout(r,s[o%s.length]),void++o}t.queue=e;var n=[],o=0,s=[0,4,10,20,25].reverse()}(r||(r={}));var i=Function("return typeof process === 'object' && typeof window !== 'object'")();e.Tick=i?Function("return fn => process.nextTick(fn)")():r.queue}),define("src/lib/message",["require","exports","src/lib/thenable","src/lib/tick"],function(t,e,r,i){"use strict";function n(t){return t}var o=Object.create(null),s=function(){function t(t,e){void 0===e&&(e=n),this.parent=t,this.listener=e,this.memory_=o,this.collection_=[],this.transform_=!1,this.listeners_=[],t&&(this.parent.child_=this)}return t.prototype.root=function(){return this.parent?this.parent.root():this},t.prototype.collect_=function(){if(this.collection_.length>0)return this.collection_;var t=this,e=[];do void e.push(t);while(t=t.child_);return this.collection_=e},t.prototype.transport_=function(t,e){function i(t,i,c){function u(t){o=!0,i=c?t:i,s&&n.child_&&void n.child_.send(i,e)}return t.every(function(t){n=t,n.memory_=i;var e=n.listener(n.memory_);return r.isThenable(e)?(o=!1,void e.then(u,u),o):(i=c?e:i,!0)})}var n,o=!1,s=!1,c=i(this.collect_(),t,this.transform_);s=!0,c&&"function"==typeof e&&void e(t)},t.prototype.clone=function(){function e(r){return r.parent?new t(e(r.parent),r.listener):new t(void 0,r.listener)}return e(this)},t.prototype.connect=function(t){return this.parent.child_=t,t.parent=this.parent,this},t.prototype.send=function(t,e,r){var n=this;switch(!0){case"function"==typeof e:return this.send(t,!1,e);case e===!0:return void i.Tick(function(){return n.transport_(t,r)}),this;case e===!1:default:return void this.transport_(t,r),this}},t.prototype.recv=function(e){var r=new t(this);return this.listener=e,this.collection_=[],this.memory_!==o&&void this.send(this.memory_),r},t.prototype.trans=function(t){return this.transform_=!0,this.recv(t)},t.prototype.then=function(e,r){var i=this,o=new t;return this.child_=void 0,this.listener=n,this.listeners_.push(o),this.trans(function(t){var e=i.listeners_;i.listeners_=[],function r(){try{for(;e.length>0;)e.shift().send(t)}catch(i){void console.error(i),void r()}}()}),o.trans(e||n)},t}();e.Message=s}),define("src/lib/throttle",["require","exports"],function(t,e){"use strict";var r=function(){function t(){this.queue_=[],this.processing_=[],this.limit_=1/0,this.volume_=1/0}return t.prototype.isDrainable_=function(){return this.processing_.length<this.volume_},t.prototype.discharger_=function(t,e){},t.prototype.flow=function(t,e,r){void 0===e&&(e=1/0),void 0===r&&(r=function(){}),this.volume_=t,this.limit_=e,this.discharger_=r},t.prototype.enqueue=function(t){if(this.isDrainable_())return void this.processing_.push(t),void this.resolver_(t),!0;this.queue_.push(t);do void this.discharger_(this.queue_,this.processing_);while(this.processing_.length+this.queue_.length>this.limit_);return!1},t.prototype.dequeue=function(t){var e=this.processing_.indexOf(t);e>0?void this.processing_.splice(e,1):void this.processing_.shift(),this.queue_.length>0&&this.isDrainable_()&&void this.enqueue(this.queue_.shift())},t.prototype.register=function(t){this.resolver_=t},t}();Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r}),define("src/lib/noop",["require","exports"],function(t,e){"use strict";function r(){}e.noop=r}),define("src/stream/modular",["require","exports","src/lib/throttle","src/lib/tick","src/lib/noop"],function(t,e,r,i,n){"use strict";var o=function(){function t(t,e,r){var n=this;void 0===e&&(e=1),this.procs=t,this.count=e,this.branched=r,this.read=this.read.bind(this),this.write=this.write.bind(this),void i.Tick(function(t){return 0<n.count&&n.count<1/0&&n.throwCountDeprivedError()})}return t.prototype.compose_=function(){this.last_=this.procs.map(function(t){return t.clone()}).reduce(function(t,e){return t.connect(e.root())&&e}),this.first_=this.last_.root()},t.prototype.wrap=function(t){function e(e){return function(r){return t(r,e)}}void this.compose_();var r=this.last_;do r=r.parent,r.listener=e(r.listener);while(r.parent);return this.procs=[this.last_],this},t.prototype.read_=function(t){void--this.count,this.count<0&&void this.throwCountExceededError(),void this.compose_(),void this.last_.recv(t)},t.prototype.read=function(t){var e=this;void 0===t&&(t=n.noop);var r=!1;return void this.read_(function(n){e.flow_&&void i.Tick(function(){return void e.flow_.dequeue(n)}),r&&void t(n)}),r=!0,this},t.prototype.write_=function(t,e){void this.first_.send(t,e)},t.prototype.write=function(t,e){return this.flow_?void this.flow_.enqueue(t):void this.write_(t,e),this},t.prototype.flow=function(t,e,i){var n=this;return void 0===e&&(e=1/0),this.flow_=new r["default"],void this.flow_.flow(t,e,i),void this.flow_.register(function(t){return n.write_(t)}),this},t.prototype.throwCountExceededError=function(){throw new Error("ArchStream: Import and read counts are exeeded.")},t.prototype.throwCountDeprivedError=function(){throw this.count=0,new Error("ArchStream: Import and read counts are not deprived.")},t}();e.ModularStream=o}),define("src/stream/compose",["require","exports","src/stream/modular"],function(t,e,r){"use strict";var i=function(){function t(t){this.extract_=t,this.procs_=[],this.branched_=0}return t.prototype.register=function(t){var e=this.procs_.length;return void t.reduceRight(function(t,r,i){return t[i+e]=r,t},this.procs_),this},t.prototype["import"]=function(e,r){var i=this;return void this.throwErrorIfNotImportable_(e,r),r&&(e=(new t)["import"](e)["export"]().wrap(function(t,e){return i.extract_(t)instanceof r?e(t):0})),void--e.count,e.count<0&&void e.throwCountExceededError(),void this.register(e.procs),this},t.prototype["export"]=function(t){return new r.ModularStream(this.procs_,t,this.branched_)},t.prototype.throwErrorIfNotImportable_=function(t,e){e?((t.branched>0||this.branched_>1)&&(void--t.count,void this.throwConditionalImportError()),this.branched_=1):(t.branched>0&&this.branched_>0&&(void--t.count,void this.throwConditionalImportError()),this.branched_=t.branched>0?t.branched+1:t.branched)},t.prototype.throwConditionalImportError=function(){throw new Error("ArchStream: Conditional import cannot call from different streams.")},t}();e.ComposeStream=i}),define("src/stream/transform",["require","exports","src/lib/message","src/stream/compose","src/stream/modular"],function(t,e,r,i,n){"use strict";var o=function(){function t(t,e){var i=this;void 0===e&&(e=new r.Message),this.parent_=t,this.message_=e,this.proxies_=[],this.parent_&&void this.parent_.proxies_.reduce(function(t,e){return i.proxy(function(){return e})},void 0)}return t.prototype.pipe=function(e){return new t(this,this.message_.recv(e))},t.prototype["import"]=function(t,e){return t instanceof n.ModularStream?(new i.ComposeStream)["import"](t,e):new i.ComposeStream(t)},t.prototype["export"]=function(t){return(new i.ComposeStream).register([this.message_])["export"](t)},t.prototype.proxy=function(e){function r(e,i,n){function o(t){return Array.isArray(t)?t:[t]}var s=e.proxies_.filter(function(t){return"function"==typeof t[i]}).reduce(function(t,e){return o(e[i].apply(void 0,t)||t)},n),c="pipe";switch(i){case c:return t.prototype[i].call(e,s[0]);case"import":throw new Error("ArchStream: `import` method cannot extend by proxy.");case"export":return(u=t.prototype[i]).call.apply(u,[r(e,c,s)].concat(n));default:return r(e,c,s)}var u}var i=this,n="function"==typeof e?e():e;return this.proxies_.push(n),void Object.keys(n).filter(function(t){return t.length>0&&"_"!==t[0]&&"_"!==t[t.length-1]}).filter(function(t){return"function"==typeof n[t]}).reduce(function(t,e){return i[e]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n-0]=arguments[n];return r(i,e,t)}},void 0),this},t}();e.ArchStream=o}),define("src/proxy/case",["require","exports"],function(t,e){"use strict";function r(t,e){function r(){for(var t=[],r=0;r<arguments.length;r++)t[r-0]=arguments[r];return function(r){var n=+i[e(r)+""];n>-1&&n<t.length&&t[n](r)}}var i=Object.create(null);return void t.reduce(function(t,e,r){return i[e+""]=r},void 0),function(t){return{pipe:r}}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r}),define("src/proxy/hook",["require","exports","src/lib/noop"],function(t,e,r){"use strict";function i(t){function e(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return t.map(function(t){return function(e){n(e),t(e),s(e)}})}var i=t.pre,n=void 0===i?r.noop:i,o=t.post,s=void 0===o?r.noop:o;return function(t){return{pipe:e}}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=i}),define("src/proxy/responsibility",["require","exports","src/lib/noop"],function(t,e,r){"use strict";function i(){function t(t,i){return e.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];return e.map(function(e){return function(r){if(!(i(r)instanceof t))throw TypeError("ArchStream: ResponsibilityProxy: Uncovered internal entity.\n "+i(r).constructor);e(r)}})},e["export"]=function(){return function(e){i(e)instanceof t&&void Object.freeze(i(e))}},r.noop}var e;return function(r){return e={rule:t}}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=i}),define("src/lib/proxy",["require","exports","src/proxy/case","src/proxy/hook","src/proxy/responsibility"],function(t,e,r,i,n){"use strict";e.Proxy={Case:r["default"],Hook:i["default"],Responsibility:n["default"]}}),define("src/lib/concat",["require","exports"],function(t,e){"use strict";function r(t,e){for(var r=0,i=e.length,n=t.length;i>r;++r)t[r+n]=e[r];return t}e.concat=r}),define("src/lib/observable",["require","exports","src/lib/concat"],function(t,e,r){"use strict";var i=function(){function t(){this.node_={parent:void 0,childrenMap:Object.create(null),childrenList:[],registers:[]}}return t.prototype.monitor=function(t,e,r){var i=this;return void 0===r&&(r=e),void this.throwTypeErrorIfInvalidSubscriber_(e,t),void this.seekNode_(t).registers.push([t,r,!0,e]),function(){return i.off(t,r)}},t.prototype.on=function(t,e,r){var i=this;return void 0===r&&(r=e),void this.throwTypeErrorIfInvalidSubscriber_(e,t),void this.seekNode_(t).registers.push([t,r,!1,function(t){return e(t)}]),function(){return i.off(t,r)}},t.prototype.off=function(t,e){switch(typeof e){case"function":return void void this.seekNode_(t).registers.some(function(t,r,i){var n=t[1];if(e!==n)return!1;switch(r){case 0:return!void i.shift();case i.length-1:return!void i.pop();default:return!void i.splice(r,1)}});case"undefined":var r=this.seekNode_(t);return r.childrenMap=Object.create(null),r.childrenList=[],void(r.registers=[]);default:throw this.throwTypeErrorIfInvalidSubscriber_(e,t)}},t.prototype.once=function(t,e){var r=this;return void this.throwTypeErrorIfInvalidSubscriber_(e,t),this.on(t,function(i){return void r.off(t,e),e(i)},e)},t.prototype.emit=function(t,e,r){void this.drain_(t,e,r)},t.prototype.reflect=function(t,e){var r;return void this.emit(t,e,function(t,e){return r=e}),r},t.prototype.drain_=function(t,e,r){var i=[];if(void this.refsBelow_(this.seekNode_(t)).reduce(function(t,n){var o=n[2],s=n[3];if(!o)try{var c=s(e);r&&(i[i.length]=c)}catch(u){void 0!==u&&null!==u&&void console.error(u+"")}},void 0),void this.refsAbove_(this.seekNode_(t)).reduce(function(t,r){var i=r[2],n=r[3];if(i)try{void n(e)}catch(o){void 0!==o&&null!==o&&void console.error(o)}},void 0),r)try{void r(e,i)}catch(n){void console.error(n)}},t.prototype.refs=function(t){return this.refsBelow_(this.seekNode_(t))},t.prototype.refsAbove_=function(t){var e=t.parent,i=t.registers;for(i=r.concat([],i);e;)i=r.concat(i,e.registers),e=e.parent;return i},t.prototype.refsBelow_=function(t){var e=t.childrenList,i=t.childrenMap,n=t.registers;n=r.concat([],n);for(var o=0;o<e.length;++o){var s=e[o],c=this.refsBelow_(i[s]);n=r.concat(n,c),0===c.length&&(void delete i[s],void e.splice(e.indexOf(s),1),void--o)}return n},t.prototype.seekNode_=function(t){for(var e=this.node_,r=0,i=t;r<i.length;r++){var n=i[r],o=e.childrenMap;o[n+""]||(void e.childrenList.push(n+""),e.childrenList=e.childrenList.sort(),o[n+""]={parent:e,childrenMap:Object.create(null),childrenList:[],registers:[]}),e=o[n+""]}return e},t.prototype.throwTypeErrorIfInvalidSubscriber_=function(t,e){switch(typeof t){case"function":return;default:throw new TypeError("ArchStream: Observable: Invalid subscriber.\n "+t)}},t}();e.Observable=i}),define("src/lib/fingerprint",["require","exports"],function(t,e){"use strict";function r(){return n(o([s(window.navigator),s(window.screen),s((new Date).getTimezoneOffset())].join()))}function i(){return n(o([s(process)].join()))}function n(t){return t.split("").reduce(function(t,e,r){return(+e*r+t)%1e9||t-+e},0)}function o(t){return t.split("").map(function(t){return t.charCodeAt(0)}).join("")}function s(t,e){if(void 0===e&&(e=5),e>0&&t&&"object"==typeof t){var r="{";for(var i in t)r+='"'+i+'": '+s(t[i],e-1)+",";return r+="}"}return!t||t.toString?'"'+t+'"':'"'+Object.prototype.toString.call(t)+'"'}e.FINGERPRINT="object"==typeof window?r():i(),e.browser=r,e.server=i,e.hash=n,e.str2digit=o,e.stringify=s}),define("src/lib/uuid",["require","exports","src/lib/fingerprint"],function(t,e,r){"use strict";function i(){var t=s=s*Date.now()%1e15;if(16>t||t>1e15)throw new Error("ArchStream: uuid: Invalid uuid dynamic seed.");for(var e="",r=0,i=o;r<i.length;r++){var n=i[r];if("x"===n||"y"===n){var c=Math.random()*t%16|0,u="x"==n?c:3&c|8;e+=u.toString(16)}else e+=n}return e.toLowerCase()}var n=r.FINGERPRINT*Date.now()%1e15;if(!n||"number"!=typeof n||100>n||n>1e15)throw new Error("ArchStream: uuid: Invalid uuid static seed.\n "+r.FINGERPRINT);var o=Object.freeze("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".split("")),s=n;e.v4=i}),define("src/lib/dict/datamap",["require","exports","src/lib/uuid"],function(t,e,r){"use strict";function i(t){for(var e="",r=0,i=t;r<i.length;r++){var o=i[r];e+=o+n}return e}var n="�"+r.v4().slice(-4)+"�",o=function(){function t(){this.store=Object.create(null),void this.reset_()}return t.prototype.get=function(t){return(this.store[i(t)]||[])[1]},t.prototype.set=function(t,e){return void this.reset_(),(this.store[i(t)]=[t,e])[1]},t.prototype.has=function(t){return!!this.store[i(t)]},t.prototype["delete"]=function(t){return void this.reset_(),void delete this.store[i(t)]},t.prototype.clear=function(){void this.reset_(),this.store=Object.create(null)},t.prototype.reset_=function(){this.size_=NaN,this.entries_=void 0},Object.defineProperty(t.prototype,"size",{get:function(){return this.size_>=0?this.size_:this.size_=Object.keys(this.store).length},enumerable:!0,configurable:!0}),t.prototype.entries=function(){var t=this;return this.entries_?this.entries_:this.entries_=Object.keys(this.store).map(function(e){return t.store[e]})},t}();e.DataMap=o}),define("src/lib/dict/dataset",["require","exports","src/lib/dict/datamap"],function(t,e,r){"use strict";var i=function(){function t(t){this.replacer=t,this.store=new r.DataMap}return t.prototype.get=function(t){return this.store.get(t)},t.prototype.add=function(t,e){if(!this.has(t))return this.store.set(t,e);if(!this.replacer)throw new Error("ArchStream: Set: Cannot overwrite value of set without replacer.");return this.store.set(t,this.replacer(this.get(t),e))},t.prototype.has=function(t){return this.store.has(t)},t.prototype["delete"]=function(t){return void this.store["delete"](t)},t.prototype.clear=function(){return void this.store.clear()},Object.defineProperty(t.prototype,"size",{get:function(){return this.store.size},enumerable:!0,configurable:!0}),t.prototype.entries=function(){return this.store.entries()},t}();e.DataSet=i}),define("src/lib/supervisor",["require","exports","src/lib/observable","src/lib/dict/dataset","src/lib/tick","src/lib/thenable","src/lib/concat","src/lib/noop"],function(t,e,r,i,n,o,s,c){"use strict";function u(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}var a=function(){function t(e){var n=this,o=void 0===e?{}:e,s=o.name,u=void 0===s?"":s,a=o.dependencies,h=void 0===a?[]:a,p=o.retry,d=void 0===p?!1:p,f=o.timeout,l=void 0===f?0:f,v=o.destructor,y=void 0===v?c.noop:v;if(this.deps=new i.DataSet,this.events={exec:new r.Observable,fail:new r.Observable,loss:new r.Observable,exit:new r.Observable},this.procs=new r.Observable,this.alive=!0,this.registerable=!0,this.scheduled=!1,this.workerSharedResource={procs:this.procs,dependenciesStack:[]},this.queue=[],this.constructor===t)throw new Error("ArchStream: Supervisor: Cannot instantiate abstract classes.");this.name=u,void h.reduce(function(t,e){var r=e[0],i=e[1];return void n.deps.add(r,i)},void 0),this.retry=d,this.timeout=l,this.destructor_=y,void++this.constructor.count}return t.prototype.destructor=function(t){for(void this.checkState(),this.alive=!1;this.queue.length>0;){var e=this.queue.shift(),r=e[0],i=e[1];void this.events.loss.emit(r,[r,void 0,i])}try{void this.destructor_(t)}catch(n){void console.error(n)}void--this.constructor.count,void Object.freeze(this)},t.prototype.schedule=function(){var t=this;this.alive&&(this.scheduled||(void n.Tick(function(e){t.alive&&(t.scheduled=!1,void t.drain())}),this.scheduled=!0))},t.prototype.register=function(t,e){if(void this.checkState(),!this.registerable)throw new Error("ArchStream: Supervisor: Supervisor "+this.name+" cannot register process during the exiting.");return t=s.concat([],t),void this.schedule(),new l(this,this.workerSharedResource,t,e,this.deps.get(t)||[]).terminate},t.prototype.call=function(t,e,r,i){var n=this;void 0===r&&(r=this.timeout),void 0===i&&(i=c.noop),void this.checkState(),t=s.concat([],t),void this.queue.push([t,e,function(t,e){return void i(e,t)},r,Date.now()]),void this.schedule(),r>0!=!1&&void setTimeout(function(){return n.drain(t)},r)},t.prototype.cast=function(t,e,r){void 0===r&&(r=this.retry),void this.checkState();var i=this.procs.reflect(t,new d(e));return 0===i.length&&void this.events.fail.emit(t,[t,void 0,e]),i.length>0||!r?i:this.cast(t,e,!1)},t.prototype.refs=function(t){return void this.checkState(),this.procs.refs(t).map(function(t){var e=(t[0],t[1]),r=e(void 0);return[r.namespace,r.process,r.terminate]})},t.prototype.terminate=function(t,e){void this.checkState(),void 0===t&&(this.registerable=!1),void this.procs.emit(t||[],new f(e)),void this.procs.off(t||[]),void 0===t&&void this.destructor(e)},t.prototype.checkState=function(){if(!this.alive)throw new Error("ArchStream: Supervisor: Supervisor "+this.name+" already exited.")},t.prototype.drain=function(t){void 0===t&&(t=[]);for(var e,r=Date.now(),i=function(i){var o=n.queue[i],s=o[0],c=o[1],u=o[2],a=o[3],h=o[4],p=t.every(function(t,e){return t===s[e]})?n.procs.reflect(s,new d(c)):[];if(0===p.length&&void n.events.fail.emit(s,[s,void 0,c]),0===p.length&&h+a>r)return e=i,"continue";if(0===i?void n.queue.shift():void n.queue.splice(i,1),void--i,0===p.length&&void n.events.loss.emit(s,[s,void 0,c]),!u)return e=i,"continue";try{void u(c,p)}catch(f){void console.error(f)}e=i},n=this,o=0;o<this.queue.length;++o){i(o);o=e}},t.count=0,t.procs=0,t}();e.Supervisor=a;var h=function(){function t(){}return t}(),p=function(t){function e(e){t.call(this),this.namespace=e}return __extends(e,t),e}(h),d=function(t){function e(e){t.call(this),this.data=e}return __extends(e,t),e}(h),f=function(t){function e(e){t.call(this),this.reason=e}return __extends(e,t),e}(h),l=function(){function t(e,r,i,n,o){var s=this;this.sv=e,this.sharedResource=r,this.namespace=i,this.process=n,this.dependencies=o,this.alive=!0,this.called=!1,this.concurrency=1,this.receive=function(e){return t.prototype.receive.call(s,e)},this.terminate=function(e){return t.prototype.terminate.call(s,e)},this.sharedResource.allRefsCache=void 0,void++this.sv.constructor.procs,void this.sharedResource.procs.on(i,this.receive)}return t.prototype.destructor=function(t){void this.checkState(),void this.sharedResource.procs.off(this.namespace,this.receive),this.alive=!1,void--this.sv.constructor.procs,this.sharedResource.allRefsCache=void 0,void Object.freeze(this),void this.sv.events.exit.emit(this.namespace,[this.namespace,this.process,t])},t.prototype.tryDependencyResolving=function(t){if(this.receive(new p(this.namespace)))return void(this.sharedResource.dependenciesStack=[]);throw void(this.sharedResource.dependenciesStack=[])},t.prototype.receive=function(t){var e=this;if(void this.checkState(),void 0===t)return this;if(t instanceof p){if(t.namespace.length!==this.namespace.length)return!1;if(0===this.concurrency)return!1;for(var r=0,i=this.sharedResource.dependenciesStack;r<i.length;r++){var n=i[r];if(u(this.namespace,n))return!0}return void this.sharedResource.dependenciesStack.push(this.namespace),this.dependencies.every(function(t){return(e.sharedResource.allRefsCache=e.sharedResource.allRefsCache||e.sharedResource.procs.refs([])).some(function(e){var r=e[0],i=e[1];return u(r,t)&&!!i(new p(t))})})}if(t instanceof d){if(0===this.concurrency)throw void 0;void this.tryDependencyResolving(t),this.called||(this.called=!0,void this.sv.events.exec.emit(this.namespace,[this.namespace,this.process]));try{void--this.concurrency;var s=(0,this.process)(t.data);return o.isThenable(s)?void s.then(function(t){void e.sv.schedule(),e.alive&&void++e.concurrency},function(t){void e.sv.schedule(),e.alive&&(void++e.concurrency,void e.terminate(t))}):void++this.concurrency,s}catch(c){throw void void this.terminate(c)}}if(t instanceof f)throw void void this.terminate(t.reason);throw new TypeError("ArchStream: Supervisor: Invalid command: "+t)},t.prototype.terminate=function(t){void this.destructor(t)},t.prototype.checkState=function(){if(!this.alive)throw new Error("ArchStream: Supervisor: Process "+this.namespace+"/"+this.process+" already exited.")},t}()}),define("src/lib/monad/monad",["require","exports"],function(t,e){"use strict";var r=function(){function t(t){this.thunk=t}return t.prototype.extract=function(t){return this.evaluate().extract(t)},t.prototype.evaluate=function(){return this.memory_=this.memory_||this.thunk()},t.prototype.assert=function(t){return this},t}();e.Monad=r}),define("src/lib/monad/maybe.impl",["require","exports","src/lib/monad/monad"],function(t,e,r){"use strict";var i=function(t){function e(e){t.call(this,e),this.thunk=e}return __extends(e,t),e.prototype.bind=function(t){var r=this;return new e(function(){var i=r.evaluate();if(i instanceof n)return t(i.extract());if(i instanceof o)return i;if(i instanceof e)return i.bind(t);throw new TypeError("ArchStream: Maybe: Invalid monad value.\n "+i)})},e.prototype.fmap=function(t){return this.bind(function(e){return new n(t(e))})},e.prototype.extract=function(e){return t.prototype.extract.call(this,e)},e.prototype.assert=function(t){return this},e}(r.Monad);e.Maybe=i;var n=function(t){function e(e){t.call(this),this.val_=e}return __extends(e,t),e.prototype.bind=function(t){var e=this;return new i(function(){return e}).bind(t)},e.prototype.extract=function(t){return this.val_},e.prototype.assert=function(t){return this},e}(i);e.Just=n;var o=function(t){function e(){t.apply(this,arguments)}return __extends(e,t),e.prototype.bind=function(t){return this},e.prototype.fmap=function(t){return this},e.prototype.extract=function(t){if(!t)throw void 0;return t()},e.prototype.assert=function(t){return this},e}(i);e.Nothing=o}),define("src/lib/monad/maybe",["require","exports","src/lib/monad/maybe.impl"],function(t,e,r){"use strict";var i;!function(t){function e(t){return new r.Just(t)}t.Just=e,t.Nothing=new r.Nothing,t.Return=e}(i=e.Maybe||(e.Maybe={})),e.Just=i.Just,e.Nothing=i.Nothing,e.Return=e.Just}),define("src/lib/monad/either.impl",["require","exports","src/lib/monad/monad"],function(t,e,r){"use strict";var i=function(t){function e(e){t.call(this,e),this.thunk=e}return __extends(e,t),e.prototype.bind=function(t){var r=this;return new e(function(){var i=r.evaluate();if(i instanceof n)return i;if(i instanceof o)return t(i.extract());if(i instanceof e)return i.bind(t);throw new TypeError("ArchStream: Either: Invalid monad value.\n "+i)})},e.prototype.fmap=function(t){return this.bind(function(e){return new o(t(e))})},e.prototype.extract=function(e){return t.prototype.extract.call(this,e)},e.prototype.assert=function(t){return this},e}(r.Monad);e.Either=i;var n=function(t){function e(e){t.call(this),this.val_=e}return __extends(e,t),e.prototype.bind=function(t){return this},e.prototype.fmap=function(t){return this},e.prototype.extract=function(t){if(!t)throw this.val_;return t(this.val_)},e.prototype.assert=function(t){return this},e}(i);e.Left=n;var o=function(t){function e(e){t.call(this),this.val_=e}return __extends(e,t),e.prototype.bind=function(t){var e=this;return new i(function(){return e}).bind(t)},e.prototype.extract=function(t){return this.val_},e.prototype.assert=function(t){return this},e}(i);e.Right=o}),define("src/lib/monad/either",["require","exports","src/lib/monad/either.impl"],function(t,e,r){"use strict";var i;!function(t){function e(t){return new r.Left(t)}function i(t){return new r.Right(t)}t.Left=e,t.Right=i,t.Return=i}(i=e.Either||(e.Either={})),e.Left=i.Left,e.Right=i.Right,e.Return=i.Return}),define("src/lib/sqid",["require","exports"],function(t,e){"use strict";function r(t){return void 0===t?(1e15+ ++i+"").slice(1):(1e15+t+"").slice(1)}var i=0;e.sqid=r}),define("src/lib/dict/weakmap",["require","exports","src/lib/uuid","src/lib/sqid"],function(t,e,r,i){"use strict";function n(t){return t[o]?t[o]:Object.defineProperty(t,o,{value:Object.create(null),enumerable:!1,writable:!1,configurable:!0})[o]}var o=""+r.v4(),s=function(){function t(){this.id=+i.sqid()}return t.prototype.get=function(t){return(n(t)[this.id]||[])[0]},t.prototype.set=function(t,e){return(n(t)[this.id]=[e])[0]},t.prototype.has=function(t){return!!n(t)[this.id]},t.prototype["delete"]=function(t){void delete n(t)[this.id]},t}();e.WeakMap=s}),define("src/lib/dict/map",["require","exports","src/lib/dict/weakmap","src/lib/concat","src/lib/sqid"],function(t,e,r,i,n){"use strict";function o(t){return s[typeof t]||t instanceof Object==!1}var s=(u={},u.undefined=!0,u[typeof!0]=!0,u.number=!0,u.string=!0,u),c=function(){function t(){this.pstore=Object.create(null),this.ostore=Object.create(null),this.weakstore=new r.WeakMap,void this.reset_()}return t.prototype.get=function(t){return o(t)?(this.pstore[typeof t+t]||[])[1]:(this.weakstore.get(t)||[])[1]},t.prototype.set=function(t,e){if(void this.reset_(),o(t))this.pstore[typeof t+t]=[t,e];else{var r=+n.sqid();void this.weakstore.set(t,[r,e])[1],this.ostore[r]=[t,e,r]}return e},t.prototype.has=function(t){return o(t)?!!this.pstore[typeof t+t]:this.weakstore.has(t)},t.prototype["delete"]=function(t){void this.reset_(),o(t)?void delete this.pstore[typeof t+t]:(void delete this.ostore[(this.weakstore.get(t)||[])[0]],void this.weakstore["delete"](t))},t.prototype.clear=function(){var t=this;void this.reset_(),void Object.keys(this.ostore).forEach(function(e){return void t["delete"](t.ostore[e][0])}),this.weakstore=new r.WeakMap,this.pstore=Object.create(null),this.ostore=Object.create(null)},t.prototype.reset_=function(){this.size_=NaN,this.entries_=void 0},Object.defineProperty(t.prototype,"size",{get:function(){return this.size_>=0?this.size_:this.size_=Object.keys(this.pstore).length+Object.keys(this.ostore).length},enumerable:!0,configurable:!0}),t.prototype.entries=function(){var t=this;return this.entries_?this.entries_:this.entries_=i.concat(Object.keys(this.pstore).map(function(e){return[t.pstore[e][0],t.pstore[e][1]]}),Object.keys(this.ostore).map(function(e){return[t.ostore[e][0],t.ostore[e][1]]}))},t}();e.Map=c;var u}),define("src/lib/dict/attrmap",["require","exports","src/lib/dict/map","src/lib/dict/weakmap"],function(t,e,r,i){"use strict";var n=function(){function t(){this.store=new i.WeakMap}return t.prototype.get=function(t,e){return this.store.get(t)&&this.store.get(t).get(e)},t.prototype.set=function(t,e,i){return(this.store.get(t)||this.store.set(t,new r.Map)).set(e,i)},t.prototype.has=function(t,e){return this.store.has(t)&&this.store.get(t).has(e)},t.prototype["delete"]=function(t,e){return void 0===e?this.store["delete"](t):this.store.get(t)&&this.store.get(t)["delete"](e)},t}();e.AttrMap=n}),define("src/lib/dict/relationmap",["require","exports","src/lib/dict/weakmap"],function(t,e,r){"use strict";var i=function(){function t(){this.store=new r.WeakMap}return t.prototype.get=function(t,e){return this.store.get(t)&&this.store.get(t).get(e)},t.prototype.set=function(t,e,i){return(this.store.get(t)||this.store.set(t,new r.WeakMap)).set(e,i)},t.prototype.has=function(t,e){return this.store.has(t)&&this.store.get(t).has(e)},t.prototype["delete"]=function(t,e){return void 0===e?this.store["delete"](t):this.store.get(t)&&this.store.get(t)["delete"](e)},t}();e.RelationMap=i}),define("src/lib/dict/set",["require","exports","src/lib/dict/map"],function(t,e,r){"use strict";var i=function(){function t(t){this.replacer=t,this.store=new r.Map}return t.prototype.get=function(t){return this.store.get(t)},t.prototype.add=function(t,e){if(!this.has(t))return this.store.set(t,e);if(!this.replacer)throw new Error("ArchStream: Set: Cannot overwrite value of set without replacer.");return this.store.set(t,this.replacer(this.get(t),e))},t.prototype.has=function(t){return this.store.has(t)},t.prototype["delete"]=function(t){return void this.store["delete"](t)},t.prototype.clear=function(){return void this.store.clear()},Object.defineProperty(t.prototype,"size",{get:function(){return this.store.size},enumerable:!0,configurable:!0}),t.prototype.entries=function(){return this.store.entries()},t}();e.Set=i}),define("src/lib/dict/weakset",["require","exports","src/lib/dict/weakmap"],function(t,e,r){"use strict";var i=function(){function t(t){this.replacer=t,this.store=new r.WeakMap}return t.prototype.get=function(t){return this.store.get(t)},t.prototype.add=function(t,e){if(!this.has(t))return this.store.set(t,e);if(!this.replacer)throw new Error("ArchStream: WeakSet: Cannot overwrite value of set without replacer.");return this.store.set(t,this.replacer(this.get(t),e))},t.prototype.has=function(t){return this.store.has(t)},t.prototype["delete"]=function(t){void this.store["delete"](t)},t}();e.WeakSet=i}),define("src/lib/dict/attrset",["require","exports","src/lib/dict/set","src/lib/dict/weakmap"],function(t,e,r,i){"use strict";var n=function(){function t(t){this.replacer=t,this.store=new i.WeakMap}return t.prototype.get=function(t,e){return this.store.get(t)&&this.store.get(t).get(e)},t.prototype.add=function(t,e,i){return(this.store.get(t)||this.store.set(t,new r.Set(this.replacer))).add(e,i)},t.prototype.has=function(t,e){return this.store.has(t)&&this.store.get(t).has(e)},t.prototype["delete"]=function(t,e){return void 0===e?this.store["delete"](t):this.store.get(t)&&this.store.get(t)["delete"](e)},t}();e.AttrSet=n}),define("src/lib/dict/relationset",["require","exports","src/lib/dict/weakset","src/lib/dict/weakmap"],function(t,e,r,i){
"use strict";var n=function(){function t(t){this.replacer=t,this.store=new i.WeakMap}return t.prototype.get=function(t,e){return this.store.get(t)&&this.store.get(t).get(e)},t.prototype.add=function(t,e,i){return(this.store.get(t)||this.store.set(t,new r.WeakSet(this.replacer))).add(e,i)},t.prototype.has=function(t,e){return this.store.has(t)&&this.store.get(t).has(e)},t.prototype["delete"]=function(t,e){return void 0===e?this.store["delete"](t):this.store.get(t)&&this.store.get(t)["delete"](e)},t}();e.RelationSet=n}),define("src/lib/timer",["require","exports"],function(t,e){"use strict";function r(t){var e=t.begin,i=void 0===e?0:e,n=t.end,o=void 0===n?864e5:n,s=t.step,c=void 0===s?function(t){return 3*(t||1)}:s,u=t.precond,a=void 0===u?function(){return!0}:u,h=t.task,p=void 0===h?function(){}:h,d=t.postcond,f=void 0===d?function(){return!0}:d,l=t.complete,v=void 0===l?function(){return 0}:l,y=t.error,b=void 0===y?function(){return 0}:y,m=t.timeout,_=void 0===m?function(){return 0}:m,w=t.since,g=void 0===w?Date.now():w;i=0>i?0:i,void setTimeout(function(){try{if(a()){var t=p();if(f())return void v(t)}}catch(e){return void b(e)}var n=Date.now(),s=c(n-g);return 0>=o-(n-g)?void _():void void r({precond:a,task:p,postcond:f,complete:v,timeout:_,begin:i+s,end:o,step:c,since:g})},i)}e.Timer=r}),define("src/lib/assign",["require","exports"],function(t,e){"use strict";function r(t){return function(e){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];if(void 0===e||null===e)throw new TypeError("ArchStream: assign: Cannot walk on "+e+".");for(var n=0,o=r;n<o.length;n++){var s=o[n];if(void 0!==s&&null!==s)for(var c=0,u=Object.keys(Object(s));c<u.length;c++){var a=u[c],h=Object.getOwnPropertyDescriptor(Object(s),a);void 0!==h&&h.enumerable&&void t(a,Object(e),Object(s))}}return Object(e)}}function i(t){return Object.prototype.toString.call(t).split(" ").pop().slice(0,-1)}e.assign=r(function(t,e,r){return e[t]=r[t]}),e.clone=r(function(t,r,n){switch(i(n[t])){case"Array":return r[t]=e.clone([],n[t]);case"Function":case"Object":return r[t]=e.clone({},n[t]);default:return r[t]=n[t]}}),e.extend=r(function(t,r,n){switch(i(n[t])){case"Array":return r[t]=e.extend([],n[t]);case"Function":case"Object":switch(i(r[t])){case"Function":case"Object":return r[t]=e.extend(r[t],n[t]);default:return r[t]=e.extend({},n[t])}default:return r[t]=n[t]}})}),define("src/export",["require","exports","src/stream/transform","src/lib/message","src/lib/proxy","src/lib/supervisor","src/lib/observable","src/lib/monad/maybe","src/lib/monad/either","src/lib/dict/map","src/lib/dict/datamap","src/lib/dict/weakmap","src/lib/dict/attrmap","src/lib/dict/relationmap","src/lib/dict/set","src/lib/dict/dataset","src/lib/dict/weakset","src/lib/dict/attrset","src/lib/dict/relationset","src/lib/tick","src/lib/timer","src/lib/fingerprint","src/lib/uuid","src/lib/sqid","src/lib/assign","src/lib/concat","src/stream/transform"],function(t,e,r,i,n,o,s,c,u,a,h,p,d,f,l,v,y,b,m,_,w,g,x,k,S,q,O){"use strict";function j(){return new O.ArchStream}e.ArchStream=r.ArchStream,e.Message=i.Message,e.Proxy=n.Proxy,e.Supervisor=o.Supervisor,e.Observable=s.Observable,e.Maybe=c.Maybe,e.Just=c.Just,e.Nothing=c.Nothing,e.Either=u.Either,e.Left=u.Left,e.Right=u.Right,e.Map=a.Map,e.DataMap=h.DataMap,e.WeakMap=p.WeakMap,e.AttrMap=d.AttrMap,e.RelationMap=f.RelationMap,e.Set=l.Set,e.DataSet=v.DataSet,e.WeakSet=y.WeakSet,e.AttrSet=b.AttrSet,e.RelationSet=m.RelationSet,e.Tick=_.Tick,e.Timer=w.Timer,e.FINGERPRINT=g.FINGERPRINT,e.uuid=x.v4,e.sqid=k.sqid,e.assign=S.assign,e.clone=S.clone,e.extend=S.extend,e.concat=q.concat,Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=j}),define("arch-stream",["require","exports","src/export","src/export"],function(t,e,r,i){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r),e["default"]=i["default"]});
{
"name": "arch-stream",
"version": "0.0.106",
"version": "0.0.107",
"description": "Pipeline stream for software architecture of Domain-Driven Design and Data-Oriented Design.",

@@ -5,0 +5,0 @@ "private": false,

Sorry, the diff of this file is too big to display

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