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

@ngrx/effects

Package Overview
Dependencies
Maintainers
4
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngrx/effects - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

35

@ngrx/effects.es5.js

@@ -27,2 +27,33 @@ var __extends = (this && this.__extends) || (function () {

/**
* @param {?} sourceType
* @return {?}
*/
function hasStaticMetadata(sourceType) {
return !!((sourceType)).propDecorators;
}
/**
* @param {?} sourceType
* @return {?}
*/
function getStaticMetadata(sourceType) {
var /** @type {?} */ propDecorators = sourceType.propDecorators;
return Object.keys(propDecorators).reduce(function (all, key) { return all.concat(getStaticMetadataEntry(propDecorators[key], key)); }, []);
}
/**
* @param {?} metadataEntry
* @param {?} propertyName
* @return {?}
*/
function getStaticMetadataEntry(metadataEntry, propertyName) {
return metadataEntry
.filter(function (entry) { return entry.type === Effect; })
.map(function (entry) {
var /** @type {?} */ dispatch = true;
if (entry.args.length) {
dispatch = !!entry.args[0].dispatch;
}
return { propertyName: propertyName, dispatch: dispatch };
});
}
/**
* @param {?} sourceProto

@@ -32,2 +63,5 @@ * @return {?}

function getEffectMetadataEntries(sourceProto) {
if (hasStaticMetadata(sourceProto.constructor)) {
return getStaticMetadata(sourceProto.constructor);
}
if (r.hasOwnMetadata(METADATA_KEY, sourceProto)) {

@@ -47,2 +81,3 @@ return r.getOwnMetadata(METADATA_KEY, sourceProto);

/**
* \@Annotation
* @param {?=} __0

@@ -49,0 +84,0 @@ * @return {?}

@@ -18,2 +18,33 @@ import { ScannedActionsSubject, Store, compose } from '@ngrx/store';

/**
* @param {?} sourceType
* @return {?}
*/
function hasStaticMetadata(sourceType) {
return !!((sourceType)).propDecorators;
}
/**
* @param {?} sourceType
* @return {?}
*/
function getStaticMetadata(sourceType) {
const /** @type {?} */ propDecorators = sourceType.propDecorators;
return Object.keys(propDecorators).reduce((all, key) => all.concat(getStaticMetadataEntry(propDecorators[key], key)), []);
}
/**
* @param {?} metadataEntry
* @param {?} propertyName
* @return {?}
*/
function getStaticMetadataEntry(metadataEntry, propertyName) {
return metadataEntry
.filter((entry) => entry.type === Effect)
.map((entry) => {
let /** @type {?} */ dispatch = true;
if (entry.args.length) {
dispatch = !!entry.args[0].dispatch;
}
return { propertyName, dispatch };
});
}
/**
* @param {?} sourceProto

@@ -23,2 +54,5 @@ * @return {?}

function getEffectMetadataEntries(sourceProto) {
if (hasStaticMetadata(sourceProto.constructor)) {
return getStaticMetadata(sourceProto.constructor);
}
if (r.hasOwnMetadata(METADATA_KEY, sourceProto)) {

@@ -38,2 +72,3 @@ return r.getOwnMetadata(METADATA_KEY, sourceProto);

/**
* \@Annotation
* @param {?=} __0

@@ -40,0 +75,0 @@ * @return {?}

@@ -20,2 +20,33 @@ (function (global, factory) {

/**
* @param {?} sourceType
* @return {?}
*/
function hasStaticMetadata(sourceType) {
return !!((sourceType)).propDecorators;
}
/**
* @param {?} sourceType
* @return {?}
*/
function getStaticMetadata(sourceType) {
var /** @type {?} */ propDecorators = sourceType.propDecorators;
return Object.keys(propDecorators).reduce(function (all, key) { return all.concat(getStaticMetadataEntry(propDecorators[key], key)); }, []);
}
/**
* @param {?} metadataEntry
* @param {?} propertyName
* @return {?}
*/
function getStaticMetadataEntry(metadataEntry, propertyName) {
return metadataEntry
.filter(function (entry) { return entry.type === Effect; })
.map(function (entry) {
var /** @type {?} */ dispatch = true;
if (entry.args.length) {
dispatch = !!entry.args[0].dispatch;
}
return { propertyName: propertyName, dispatch: dispatch };
});
}
/**
* @param {?} sourceProto

@@ -25,2 +56,5 @@ * @return {?}

function getEffectMetadataEntries(sourceProto) {
if (hasStaticMetadata(sourceProto.constructor)) {
return getStaticMetadata(sourceProto.constructor);
}
if (r.hasOwnMetadata(METADATA_KEY, sourceProto)) {

@@ -40,2 +74,3 @@ return r.getOwnMetadata(METADATA_KEY, sourceProto);

/**
* \@Annotation
* @param {?=} __0

@@ -42,0 +77,0 @@ * @return {?}

2

bundles/effects.umd.min.js

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

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@ngrx/store"),require("rxjs/observable/merge"),require("rxjs/operator/ignoreElements"),require("rxjs/operator/materialize"),require("rxjs/operator/map"),require("@angular/core"),require("rxjs/Observable"),require("rxjs/operator/filter"),require("rxjs/operator/groupBy"),require("rxjs/operator/mergeMap"),require("rxjs/operator/exhaustMap"),require("rxjs/operator/dematerialize"),require("rxjs/Subject")):"function"==typeof define&&define.amd?define(["exports","@ngrx/store","rxjs/observable/merge","rxjs/operator/ignoreElements","rxjs/operator/materialize","rxjs/operator/map","@angular/core","rxjs/Observable","rxjs/operator/filter","rxjs/operator/groupBy","rxjs/operator/mergeMap","rxjs/operator/exhaustMap","rxjs/operator/dematerialize","rxjs/Subject"],r):r((e.ngrx=e.ngrx||{},e.ngrx.effects=e.ngrx.effects||{}),e.ngrx.store,e.Rx.Observable,e.Rx.Observable.prototype,e.rxjs_operator_materialize,e.rxjs_operator_map,e.ng.core,e.Rx,e.Rx.Observable.prototype,e.rxjs_operator_groupBy,e.rxjs_operator_mergeMap,e.rxjs_operator_exhaustMap,e.rxjs_operator_dematerialize,e.rxjs_Subject)}(this,function(e,r,t,o,n,c,i,a,s,u,f,p,l,d){"use strict";function y(e){return P.hasOwnMetadata(N,e)?P.getOwnMetadata(N,e):[]}function x(e,r){P.defineMetadata(N,r,e)}function g(e){var r=(void 0===e?{dispatch:!0}:e).dispatch;return function(e,t){var o=y(e),n={propertyName:t,dispatch:r};x(e,o.concat([n]))}}function j(e){return Object.getPrototypeOf(e)}function h(e){var r=j(e);return R in r&&"function"==typeof r[R]}function v(e){var r=j(e).constructor.name,i=w(e).map(function(t){var i=t.propertyName,a=t.dispatch,s="function"==typeof e[i]?e[i]():e[i];if(!1===a)return o.ignoreElements.call(s);var u=n.materialize.call(s);return c.map.call(u,function(t){return{effect:e[i],notification:t,propertyName:i,sourceName:r,sourceInstance:e}})});return t.merge.apply(void 0,i)}function m(e){var r=v(e);return h(e)?e.ngrxOnRunEffects(r):r}function b(e,r){E(e,r),_(e,r)}function E(e,r){if("E"===e.notification.kind){var t="Effect "+M(e)+" threw an error";r.report(t,{Source:e.sourceInstance,Effect:e.effect,Error:e.notification.error,Notification:e.notification})}}function _(e,r){if("N"===e.notification.kind){var t=e.notification.value;if(!O(t)){var o="Effect "+M(e)+" dispatched an invalid action";r.report(o,{Source:e.sourceInstance,Effect:e.effect,Dispatched:t,Notification:e.notification})}}}function O(e){return e&&e.type&&"string"==typeof e.type}function M(e){var r=e.propertyName,t=e.sourceInstance;return'"'+e.sourceName+"."+r+("function"==typeof t[r]?"()":"")+'"'}function S(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e}function I(e){return e.payload}var q=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])};return function(r,t){function o(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}(),N="@ngrx/effects",P=Reflect,w=r.compose(y,j),R="ngrxOnRunEffects",z=function(e){function r(r){var t=e.call(this)||this;return r&&(t.source=r),t}return q(r,e),r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.ofType=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return s.filter.call(this,function(r){return e.some(function(e){return e===r.type})})},r}(a.Observable);z.decorators=[{type:i.Injectable}],z.ctorParameters=function(){return[{type:a.Observable,decorators:[{type:i.Inject,args:[r.ScannedActionsSubject]}]}]};var A=(new i.InjectionToken("ngrx/effects: Immediate Effects"),new i.InjectionToken("ngrx/effects: Root Effects")),k=new i.InjectionToken("ngrx/effects: Feature Effects"),B=new i.InjectionToken("Browser Console"),T=function(){function e(e){this.console=e}return e.prototype.report=function(e,r){this.console.group(e);for(var t in r)this.console.error(t+":",r[t]);this.console.groupEnd()},e}();T.decorators=[{type:i.Injectable}],T.ctorParameters=function(){return[{type:void 0,decorators:[{type:i.Inject,args:[B]}]}]};var F=function(e){function r(r){var t=e.call(this)||this;return t.errorReporter=r,t}return q(r,e),r.prototype.addEffects=function(e){this.next(e)},r.prototype.toActions=function(){var e=this;return f.mergeMap.call(u.groupBy.call(this,j),function(r){return l.dematerialize.call(c.map.call(p.exhaustMap.call(r,m),function(r){return b(r,e.errorReporter),r.notification}))})},r}(d.Subject);F.decorators=[{type:i.Injectable}],F.ctorParameters=function(){return[{type:T}]};var D=function(){function e(e,r){this.effectSources=e,this.store=r,this.effectsSubscription=null}return e.prototype.start=function(){this.effectsSubscription||(this.effectsSubscription=this.effectSources.toActions().subscribe(this.store))},e.prototype.ngOnDestroy=function(){this.effectsSubscription&&(this.effectsSubscription.unsubscribe(),this.effectsSubscription=null)},e}();D.decorators=[{type:i.Injectable}],D.ctorParameters=function(){return[{type:F},{type:r.Store}]};var C=function(){function e(e,r,t){this.sources=e,r.start(),t.forEach(function(r){return e.addEffects(r)})}return e.prototype.addEffects=function(e){this.sources.addEffects(e)},e}();C.decorators=[{type:i.NgModule,args:[{}]}],C.ctorParameters=function(){return[{type:F},{type:D},{type:Array,decorators:[{type:i.Inject,args:[A]}]}]};var V=function(){function e(e,r){this.root=e,r.forEach(function(r){return r.forEach(function(r){return e.addEffects(r)})})}return e}();V.decorators=[{type:i.NgModule,args:[{}]}],V.ctorParameters=function(){return[{type:C},{type:Array,decorators:[{type:i.Inject,args:[k]}]}]};var G=function(){function e(){}return e.forFeature=function(e){return{ngModule:V,providers:[e,{provide:k,multi:!0,deps:e,useFactory:S}]}},e.forRoot=function(e){return{ngModule:C,providers:[D,F,T,z,e,{provide:A,deps:e,useFactory:S},{provide:B,useValue:console}]}},e}();G.decorators=[{type:i.NgModule,args:[{}]}],G.ctorParameters=function(){return[]},e.Effect=g,e.mergeEffects=v,e.Actions=z,e.EffectsModule=G,e.EffectSources=F,e.toPayload=I,e.ɵb=V,e.ɵa=S,e.ɵf=C,e.ɵh=D,e.ɵg=T,e.ɵe=B,e.ɵd=k,e.ɵc=A,Object.defineProperty(e,"__esModule",{value:!0})});
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@ngrx/store"),require("rxjs/observable/merge"),require("rxjs/operator/ignoreElements"),require("rxjs/operator/materialize"),require("rxjs/operator/map"),require("@angular/core"),require("rxjs/Observable"),require("rxjs/operator/filter"),require("rxjs/operator/groupBy"),require("rxjs/operator/mergeMap"),require("rxjs/operator/exhaustMap"),require("rxjs/operator/dematerialize"),require("rxjs/Subject")):"function"==typeof define&&define.amd?define(["exports","@ngrx/store","rxjs/observable/merge","rxjs/operator/ignoreElements","rxjs/operator/materialize","rxjs/operator/map","@angular/core","rxjs/Observable","rxjs/operator/filter","rxjs/operator/groupBy","rxjs/operator/mergeMap","rxjs/operator/exhaustMap","rxjs/operator/dematerialize","rxjs/Subject"],e):e((r.ngrx=r.ngrx||{},r.ngrx.effects=r.ngrx.effects||{}),r.ngrx.store,r.Rx.Observable,r.Rx.Observable.prototype,r.rxjs_operator_materialize,r.rxjs_operator_map,r.ng.core,r.Rx,r.Rx.Observable.prototype,r.rxjs_operator_groupBy,r.rxjs_operator_mergeMap,r.rxjs_operator_exhaustMap,r.rxjs_operator_dematerialize,r.rxjs_Subject)}(this,function(r,e,t,o,n,c,a,i,s,u,f,p,l,d){"use strict";function y(r){return!!r.propDecorators}function g(r){var e=r.propDecorators;return Object.keys(e).reduce(function(r,t){return r.concat(x(e[t],t))},[])}function x(r,e){return r.filter(function(r){return r.type===v}).map(function(r){var t=!0;return r.args.length&&(t=!!r.args[0].dispatch),{propertyName:e,dispatch:t}})}function j(r){return y(r.constructor)?g(r.constructor):z.hasOwnMetadata(R,r)?z.getOwnMetadata(R,r):[]}function h(r,e){z.defineMetadata(R,e,r)}function v(r){var e=(void 0===r?{dispatch:!0}:r).dispatch;return function(r,t){var o=j(r),n={propertyName:t,dispatch:e};h(r,o.concat([n]))}}function m(r){return Object.getPrototypeOf(r)}function b(r){var e=m(r);return A in e&&"function"==typeof e[A]}function E(r){var e=m(r).constructor.name,a=k(r).map(function(t){var a=t.propertyName,i=t.dispatch,s="function"==typeof r[a]?r[a]():r[a];if(!1===i)return o.ignoreElements.call(s);var u=n.materialize.call(s);return c.map.call(u,function(t){return{effect:r[a],notification:t,propertyName:a,sourceName:e,sourceInstance:r}})});return t.merge.apply(void 0,a)}function _(r){var e=E(r);return b(r)?r.ngrxOnRunEffects(e):e}function O(r,e){M(r,e),S(r,e)}function M(r,e){if("E"===r.notification.kind){var t="Effect "+q(r)+" threw an error";e.report(t,{Source:r.sourceInstance,Effect:r.effect,Error:r.notification.error,Notification:r.notification})}}function S(r,e){if("N"===r.notification.kind){var t=r.notification.value;if(!I(t)){var o="Effect "+q(r)+" dispatched an invalid action";e.report(o,{Source:r.sourceInstance,Effect:r.effect,Dispatched:t,Notification:r.notification})}}}function I(r){return r&&r.type&&"string"==typeof r.type}function q(r){var e=r.propertyName,t=r.sourceInstance;return'"'+r.sourceName+"."+e+("function"==typeof t[e]?"()":"")+'"'}function N(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r}function P(r){return r.payload}var w=function(){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t])};return function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}(),R="@ngrx/effects",z=Reflect,k=e.compose(j,m),A="ngrxOnRunEffects",B=function(r){function e(e){var t=r.call(this)||this;return e&&(t.source=e),t}return w(e,r),e.prototype.lift=function(r){var t=new e;return t.source=this,t.operator=r,t},e.prototype.ofType=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return s.filter.call(this,function(e){return r.some(function(r){return r===e.type})})},e}(i.Observable);B.decorators=[{type:a.Injectable}],B.ctorParameters=function(){return[{type:i.Observable,decorators:[{type:a.Inject,args:[e.ScannedActionsSubject]}]}]};var T=(new a.InjectionToken("ngrx/effects: Immediate Effects"),new a.InjectionToken("ngrx/effects: Root Effects")),D=new a.InjectionToken("ngrx/effects: Feature Effects"),F=new a.InjectionToken("Browser Console"),C=function(){function r(r){this.console=r}return r.prototype.report=function(r,e){this.console.group(r);for(var t in e)this.console.error(t+":",e[t]);this.console.groupEnd()},r}();C.decorators=[{type:a.Injectable}],C.ctorParameters=function(){return[{type:void 0,decorators:[{type:a.Inject,args:[F]}]}]};var V=function(r){function e(e){var t=r.call(this)||this;return t.errorReporter=e,t}return w(e,r),e.prototype.addEffects=function(r){this.next(r)},e.prototype.toActions=function(){var r=this;return f.mergeMap.call(u.groupBy.call(this,m),function(e){return l.dematerialize.call(c.map.call(p.exhaustMap.call(e,_),function(e){return O(e,r.errorReporter),e.notification}))})},e}(d.Subject);V.decorators=[{type:a.Injectable}],V.ctorParameters=function(){return[{type:C}]};var G=function(){function r(r,e){this.effectSources=r,this.store=e,this.effectsSubscription=null}return r.prototype.start=function(){this.effectsSubscription||(this.effectsSubscription=this.effectSources.toActions().subscribe(this.store))},r.prototype.ngOnDestroy=function(){this.effectsSubscription&&(this.effectsSubscription.unsubscribe(),this.effectsSubscription=null)},r}();G.decorators=[{type:a.Injectable}],G.ctorParameters=function(){return[{type:V},{type:e.Store}]};var H=function(){function r(r,e,t){this.sources=r,e.start(),t.forEach(function(e){return r.addEffects(e)})}return r.prototype.addEffects=function(r){this.sources.addEffects(r)},r}();H.decorators=[{type:a.NgModule,args:[{}]}],H.ctorParameters=function(){return[{type:V},{type:G},{type:Array,decorators:[{type:a.Inject,args:[T]}]}]};var J=function(){function r(r,e){this.root=r,e.forEach(function(e){return e.forEach(function(e){return r.addEffects(e)})})}return r}();J.decorators=[{type:a.NgModule,args:[{}]}],J.ctorParameters=function(){return[{type:H},{type:Array,decorators:[{type:a.Inject,args:[D]}]}]};var K=function(){function r(){}return r.forFeature=function(r){return{ngModule:J,providers:[r,{provide:D,multi:!0,deps:r,useFactory:N}]}},r.forRoot=function(r){return{ngModule:H,providers:[G,V,C,B,r,{provide:T,deps:r,useFactory:N},{provide:F,useValue:console}]}},r}();K.decorators=[{type:a.NgModule,args:[{}]}],K.ctorParameters=function(){return[]},r.Effect=v,r.mergeEffects=E,r.Actions=B,r.EffectsModule=K,r.EffectSources=V,r.toPayload=P,r.ɵb=J,r.ɵa=N,r.ɵf=H,r.ɵh=G,r.ɵg=C,r.ɵe=F,r.ɵd=D,r.ɵc=T,Object.defineProperty(r,"__esModule",{value:!0})});
//# sourceMappingURL=./dist/effects/bundles/effects.umd.min.js.map

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

{"__symbolic":"module","version":3,"metadata":{"ɵa":{"__symbolic":"function","parameters":["instances"],"value":{"__symbolic":"reference","name":"instances"}},"Effect":{"__symbolic":"function","parameters":["dispatch"],"defaults":[{"dispatch":true}],"value":{"__symbolic":"error","message":"Function call not supported","line":26,"character":9,"module":"./src/effects_metadata"}},"mergeEffects":{"__symbolic":"function"},"Actions":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"Observable","module":"rxjs/Observable","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":8,"character":65,"context":{"typeName":"V"},"module":"./src/actions"}]},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"@ngrx/store","name":"ScannedActionsSubject"}]}]],"parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs/Observable","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":8,"character":65,"context":{"typeName":"V"},"module":"./src/actions"}]}]}],"lift":[{"__symbolic":"method"}],"ofType":[{"__symbolic":"method"}]}},"EffectsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"members":{},"statics":{"forFeature":{"__symbolic":"function","parameters":["featureEffects"],"value":{"ngModule":{"__symbolic":"reference","name":"ɵb"},"providers":[{"__symbolic":"reference","name":"featureEffects"},{"provide":{"__symbolic":"reference","name":"ɵd"},"multi":true,"deps":{"__symbolic":"reference","name":"featureEffects"},"useFactory":{"__symbolic":"reference","name":"ɵa"}}]}},"forRoot":{"__symbolic":"function","parameters":["rootEffects"],"value":{"ngModule":{"__symbolic":"reference","name":"ɵf"},"providers":[{"__symbolic":"reference","name":"ɵh"},{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"ɵg"},{"__symbolic":"reference","name":"Actions"},{"__symbolic":"reference","name":"rootEffects"},{"provide":{"__symbolic":"reference","name":"ɵc"},"deps":{"__symbolic":"reference","name":"rootEffects"},"useFactory":{"__symbolic":"reference","name":"ɵa"}},{"provide":{"__symbolic":"reference","name":"ɵe"},"useValue":{"__symbolic":"reference","name":"console"}}]}}}},"EffectSources":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"rxjs/Subject","name":"Subject"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵg"}]}],"addEffects":[{"__symbolic":"method"}],"toActions":[{"__symbolic":"method"}]}},"OnRunEffects":{"__symbolic":"interface"},"toPayload":{"__symbolic":"function","parameters":["action"],"value":{"__symbolic":"error","message":"Expression form not supported","line":3,"character":10,"module":"./src/util"}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ɵd"}]}]],"parameters":[{"__symbolic":"reference","name":"ɵf"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}]}]}},"ɵc":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["ngrx/effects: Root Effects"]},"ɵd":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["ngrx/effects: Feature Effects"]},"ɵe":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["Browser Console"]},"ɵf":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ɵc"}]}]],"parameters":[{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"ɵh"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"addEffects":[{"__symbolic":"method"}]}},"ɵg":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ɵe"}]}]],"parameters":[{"__symbolic":"reference","name":"any"}]}],"report":[{"__symbolic":"method"}]}},"ɵh":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"start":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"ɵa":"./src/effects_module","Effect":"./src/effects_metadata","mergeEffects":"./src/effects_resolver","Actions":"./src/actions","EffectsModule":"./src/effects_module","EffectSources":"./src/effect_sources","OnRunEffects":"./src/on_run_effects","toPayload":"./src/util","ɵb":"./src/effects_feature_module","ɵc":"./src/tokens","ɵd":"./src/tokens","ɵe":"./src/tokens","ɵf":"./src/effects_root_module","ɵg":"./src/error_reporter","ɵh":"./src/effects_runner"},"importAs":"@ngrx/effects"}
{"__symbolic":"module","version":3,"metadata":{"ɵa":{"__symbolic":"function","parameters":["instances"],"value":{"__symbolic":"reference","name":"instances"}},"Effect":{"__symbolic":"function","parameters":["dispatch"],"defaults":[{"dispatch":true}],"value":{"__symbolic":"error","message":"Function call not supported","line":57,"character":9,"module":"./src/effects_metadata"}},"mergeEffects":{"__symbolic":"function"},"Actions":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"Observable","module":"rxjs/Observable","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":8,"character":65,"context":{"typeName":"V"},"module":"./src/actions"}]},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"@ngrx/store","name":"ScannedActionsSubject"}]}]],"parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs/Observable","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":8,"character":65,"context":{"typeName":"V"},"module":"./src/actions"}]}]}],"lift":[{"__symbolic":"method"}],"ofType":[{"__symbolic":"method"}]}},"EffectsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"members":{},"statics":{"forFeature":{"__symbolic":"function","parameters":["featureEffects"],"value":{"ngModule":{"__symbolic":"reference","name":"ɵb"},"providers":[{"__symbolic":"reference","name":"featureEffects"},{"provide":{"__symbolic":"reference","name":"ɵd"},"multi":true,"deps":{"__symbolic":"reference","name":"featureEffects"},"useFactory":{"__symbolic":"reference","name":"ɵa"}}]}},"forRoot":{"__symbolic":"function","parameters":["rootEffects"],"value":{"ngModule":{"__symbolic":"reference","name":"ɵf"},"providers":[{"__symbolic":"reference","name":"ɵh"},{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"ɵg"},{"__symbolic":"reference","name":"Actions"},{"__symbolic":"reference","name":"rootEffects"},{"provide":{"__symbolic":"reference","name":"ɵc"},"deps":{"__symbolic":"reference","name":"rootEffects"},"useFactory":{"__symbolic":"reference","name":"ɵa"}},{"provide":{"__symbolic":"reference","name":"ɵe"},"useValue":{"__symbolic":"reference","name":"console"}}]}}}},"EffectSources":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"rxjs/Subject","name":"Subject"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵg"}]}],"addEffects":[{"__symbolic":"method"}],"toActions":[{"__symbolic":"method"}]}},"OnRunEffects":{"__symbolic":"interface"},"toPayload":{"__symbolic":"function","parameters":["action"],"value":{"__symbolic":"error","message":"Expression form not supported","line":3,"character":10,"module":"./src/util"}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ɵd"}]}]],"parameters":[{"__symbolic":"reference","name":"ɵf"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}]}]}},"ɵc":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["ngrx/effects: Root Effects"]},"ɵd":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["ngrx/effects: Feature Effects"]},"ɵe":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["Browser Console"]},"ɵf":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ɵc"}]}]],"parameters":[{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"ɵh"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"addEffects":[{"__symbolic":"method"}]}},"ɵg":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ɵe"}]}]],"parameters":[{"__symbolic":"reference","name":"any"}]}],"report":[{"__symbolic":"method"}]}},"ɵh":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"start":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"ɵa":"./src/effects_module","Effect":"./src/effects_metadata","mergeEffects":"./src/effects_resolver","Actions":"./src/actions","EffectsModule":"./src/effects_module","EffectSources":"./src/effect_sources","OnRunEffects":"./src/on_run_effects","toPayload":"./src/util","ɵb":"./src/effects_feature_module","ɵc":"./src/tokens","ɵd":"./src/tokens","ɵe":"./src/tokens","ɵf":"./src/effects_root_module","ɵg":"./src/error_reporter","ɵh":"./src/effects_runner"},"importAs":"@ngrx/effects"}
{
"name": "@ngrx/effects",
"version": "4.0.0",
"version": "4.0.1",
"description": "Side effect model for @ngrx/store",

@@ -5,0 +5,0 @@ "module": "@ngrx/effects.es5.js",

@@ -5,2 +5,5 @@ export interface EffectMetadata {

}
/**
* @Annotation
*/
export declare function Effect({dispatch}?: {

@@ -7,0 +10,0 @@ dispatch: boolean;

@@ -5,2 +5,33 @@ import { compose } from '@ngrx/store';

/**
* @param {?} sourceType
* @return {?}
*/
function hasStaticMetadata(sourceType) {
return !!((sourceType)).propDecorators;
}
/**
* @param {?} sourceType
* @return {?}
*/
function getStaticMetadata(sourceType) {
const /** @type {?} */ propDecorators = sourceType.propDecorators;
return Object.keys(propDecorators).reduce((all, key) => all.concat(getStaticMetadataEntry(propDecorators[key], key)), []);
}
/**
* @param {?} metadataEntry
* @param {?} propertyName
* @return {?}
*/
function getStaticMetadataEntry(metadataEntry, propertyName) {
return metadataEntry
.filter((entry) => entry.type === Effect)
.map((entry) => {
let /** @type {?} */ dispatch = true;
if (entry.args.length) {
dispatch = !!entry.args[0].dispatch;
}
return { propertyName, dispatch };
});
}
/**
* @param {?} sourceProto

@@ -10,2 +41,5 @@ * @return {?}

function getEffectMetadataEntries(sourceProto) {
if (hasStaticMetadata(sourceProto.constructor)) {
return getStaticMetadata(sourceProto.constructor);
}
if (r.hasOwnMetadata(METADATA_KEY, sourceProto)) {

@@ -25,2 +59,3 @@ return r.getOwnMetadata(METADATA_KEY, sourceProto);

/**
* \@Annotation
* @param {?=} __0

@@ -27,0 +62,0 @@ * @return {?}

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

export * from './effects/testing/index';
export * from './testing/testing';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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