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

@nguniversal/common

Package Overview
Dependencies
Maintainers
1
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nguniversal/common - npm Package Compare versions

Comparing version 6.0.0 to 6.1.0

bundles/common-engine.umd.js

77

bundles/common.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('@angular/core'), require('@angular/platform-browser'), require('rxjs'), require('rxjs/operators'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define(['exports', '@angular/common/http', '@angular/core', '@angular/platform-browser', 'rxjs', 'rxjs/operators', '@angular/common'], factory) :
(factory((global.npm_package = {}),global.ng.common.http,global.ng.core,global.ng.platformBrowser,global.Rx,global.Rx.operators,global.ng.common));
typeof define === 'function' && define.amd ? define('@nguniversal/common', ['exports', '@angular/common/http', '@angular/core', '@angular/platform-browser', 'rxjs', 'rxjs/operators', '@angular/common'], factory) :
(factory((global.nguniversal = global.nguniversal || {}, global.nguniversal.common = {}),global.ng.common.http,global.ng.core,global.ng.platformBrowser,global.rxjs,global.rxjs.operators,global.ng.common));
}(this, (function (exports,http,core,platformBrowser,rxjs,operators,common) { 'use strict';

@@ -17,2 +17,9 @@

};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function getHeadersMap(headers) {

@@ -23,3 +30,3 @@ var headersMap = {};

var key = _b.value;
headersMap[key] = (headers.getAll(key));
headersMap[key] = headers.getAll(key);
}

@@ -49,5 +56,12 @@ }

TransferHttpCacheInterceptor.prototype.invalidateCacheEntry = function (url) {
this.transferState.remove(platformBrowser.makeStateKey('G.' + url));
this.transferState.remove(platformBrowser.makeStateKey('H.' + url));
var _this = this;
Object.keys(this.transferState['store'])
.forEach(function (key) { return key.includes(url) ? _this.transferState.remove(platformBrowser.makeStateKey(key)) : null; });
};
TransferHttpCacheInterceptor.prototype.makeCacheKey = function (method, url, params) {
// make the params encoded same as a url so it's easy to identify
var encodedParams = params.keys().sort().map(function (k) { return k + "=" + params.get(k); }).join('&');
var key = (method === 'GET' ? 'G.' : 'H.') + url + '?' + encodedParams;
return platformBrowser.makeStateKey(key);
};
TransferHttpCacheInterceptor.prototype.intercept = function (req, next) {

@@ -64,4 +78,3 @@ var _this = this;

}
var key = (req.method === 'GET' ? 'G.' : 'H.') + req.url;
var storeKey = platformBrowser.makeStateKey(key);
var storeKey = this.makeCacheKey(req.method, req.url, req.params);
if (this.transferState.hasKey(storeKey)) {

@@ -89,3 +102,3 @@ // Request found in cache. Respond using it.

statusText: event.statusText,
url: (event.url),
url: event.url,
});

@@ -101,4 +114,4 @@ }

TransferHttpCacheInterceptor.ctorParameters = function () { return [
{ type: core.ApplicationRef, },
{ type: platformBrowser.TransferState, },
{ type: core.ApplicationRef },
{ type: platformBrowser.TransferState }
]; };

@@ -134,11 +147,9 @@ return TransferHttpCacheInterceptor;

function domContentLoadedFactory(doc) {
return function () {
return new Promise(function (resolve, _reject) {
var contentLoaded = function () {
doc.removeEventListener('DOMContentLoaded', contentLoaded);
resolve();
};
doc.addEventListener('DOMContentLoaded', contentLoaded);
});
};
return function () { return new Promise(function (resolve, _reject) {
var contentLoaded = function () {
doc.removeEventListener('DOMContentLoaded', contentLoaded);
resolve();
};
doc.addEventListener('DOMContentLoaded', contentLoaded);
}); };
}

@@ -159,9 +170,33 @@ var StateTransferInitializerModule = /** @class */ (function () {

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Generated bundle index. Do not edit.
*/
exports.ɵnguniversal_modules_common_common_b = domContentLoadedFactory;
exports.ɵnguniversal_modules_common_common_a = TransferHttpCacheInterceptor;
exports.ɵnguniversal_modules_common_common_a = domContentLoadedFactory;
exports.TransferHttpCacheModule = TransferHttpCacheModule;
exports.StateTransferInitializerModule = StateTransferInitializerModule;
exports.ɵTransferHttpCacheInterceptor = TransferHttpCacheInterceptor;

@@ -168,0 +203,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common/http"),require("@angular/core"),require("@angular/platform-browser"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/common/http","@angular/core","@angular/platform-browser","rxjs","rxjs/operators","@angular/common"],t):t(e.npm_package={},e.ng.common.http,e.ng.core,e.ng.platformBrowser,e.Rx,e.Rx.operators,e.ng.common)}(this,function(e,t,r,n,o,a,s){"use strict";var i=function(){function e(e,t){var r=this;this.transferState=t,this.isCacheActive=!0,e.isStable.pipe(a.filter(function(e){return e}),a.take(1)).toPromise().then(function(){r.isCacheActive=!1})}return e.prototype.invalidateCacheEntry=function(e){this.transferState.remove(n.makeStateKey("G."+e)),this.transferState.remove(n.makeStateKey("H."+e))},e.prototype.intercept=function(e,r){var s=this;if("GET"!==e.method&&"HEAD"!==e.method&&(this.isCacheActive=!1,this.invalidateCacheEntry(e.url)),!this.isCacheActive)return r.handle(e);var i=n.makeStateKey(("GET"===e.method?"G.":"H.")+e.url);if(this.transferState.hasKey(i)){var u=this.transferState.get(i,{});return o.of(new t.HttpResponse({body:u.body,headers:new t.HttpHeaders(u.headers),status:u.status,statusText:u.statusText,url:u.url}))}return r.handle(e).pipe(a.tap(function(e){e instanceof t.HttpResponse&&s.transferState.set(i,{body:e.body,headers:function r(e){var t,r,n={};try{for(var o=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}(e.keys()),a=o.next();!a.done;a=o.next()){var s=a.value;n[s]=e.getAll(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n}(e.headers),status:e.status,statusText:e.statusText,url:e.url})}))},e.decorators=[{type:r.Injectable}],e.ctorParameters=function(){return[{type:r.ApplicationRef},{type:n.TransferState}]},e}(),u=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{imports:[n.BrowserTransferStateModule],providers:[i,{provide:t.HTTP_INTERCEPTORS,useExisting:i,multi:!0}]}]}],e}();
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common/http"),require("@angular/core"),require("@angular/platform-browser"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("@nguniversal/common",["exports","@angular/common/http","@angular/core","@angular/platform-browser","rxjs","rxjs/operators","@angular/common"],t):t((e.nguniversal=e.nguniversal||{},e.nguniversal.common={}),e.ng.common.http,e.ng.core,e.ng.platformBrowser,e.rxjs,e.rxjs.operators,e.ng.common)}(this,function(e,t,r,n,o,a,s){"use strict";var i=function(){function e(e,t){var r=this;this.transferState=t,this.isCacheActive=!0,e.isStable.pipe(a.filter(function(e){return e}),a.take(1)).toPromise().then(function(){r.isCacheActive=!1})}return e.prototype.invalidateCacheEntry=function(e){var t=this;Object.keys(this.transferState.store).forEach(function(r){return r.includes(e)?t.transferState.remove(n.makeStateKey(r)):null})},e.prototype.makeCacheKey=function(e,t,r){var o=r.keys().sort().map(function(e){return e+"="+r.get(e)}).join("&");return n.makeStateKey(("GET"===e?"G.":"H.")+t+"?"+o)},e.prototype.intercept=function(e,r){var n=this;if("GET"!==e.method&&"HEAD"!==e.method&&(this.isCacheActive=!1,this.invalidateCacheEntry(e.url)),!this.isCacheActive)return r.handle(e);var s=this.makeCacheKey(e.method,e.url,e.params);if(this.transferState.hasKey(s)){var i=this.transferState.get(s,{});return o.of(new t.HttpResponse({body:i.body,headers:new t.HttpHeaders(i.headers),status:i.status,statusText:i.statusText,url:i.url}))}return r.handle(e).pipe(a.tap(function(e){e instanceof t.HttpResponse&&n.transferState.set(s,{body:e.body,headers:
/**

@@ -9,2 +9,31 @@ * @license

*/
function c(e){return function(){return new Promise(function(t,r){var n=function(){e.removeEventListener("DOMContentLoaded",n),t()};e.addEventListener("DOMContentLoaded",n)})}}var f=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{providers:[{provide:r.APP_INITIALIZER,multi:!0,useFactory:c,deps:[s.DOCUMENT]}]}]}],e}();e.ɵnguniversal_modules_common_common_b=c,e.ɵnguniversal_modules_common_common_a=i,e.TransferHttpCacheModule=u,e.StateTransferInitializerModule=f,Object.defineProperty(e,"__esModule",{value:!0})});
function r(e){var t,r,n={};try{for(var o=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}(e.keys()),a=o.next();!a.done;a=o.next()){var s=a.value;n[s]=e.getAll(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n}(e.headers),status:e.status,statusText:e.statusText,url:e.url})}))},e.decorators=[{type:r.Injectable}],e.ctorParameters=function(){return[{type:r.ApplicationRef},{type:n.TransferState}]},e}(),u=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{imports:[n.BrowserTransferStateModule],providers:[i,{provide:t.HTTP_INTERCEPTORS,useExisting:i,multi:!0}]}]}],e}();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function c(e){return function(){return new Promise(function(t,r){var n=function(){e.removeEventListener("DOMContentLoaded",n),t()};e.addEventListener("DOMContentLoaded",n)})}}var f=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{providers:[{provide:r.APP_INITIALIZER,multi:!0,useFactory:c,deps:[s.DOCUMENT]}]}]}],e}();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/e.ɵnguniversal_modules_common_common_a=c,e.TransferHttpCacheModule=u,e.StateTransferInitializerModule=f,e.ɵTransferHttpCacheInterceptor=i,Object.defineProperty(e,"__esModule",{value:!0})});

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

export * from './index';
export { domContentLoadedFactory as ɵnguniversal_modules_common_common_b } from './src/state-transfer-initializer/module';
export { TransferHttpCacheInterceptor as ɵnguniversal_modules_common_common_a } from './src/transfer_http';
export { domContentLoadedFactory as ɵnguniversal_modules_common_common_a } from './src/state-transfer-initializer/module';

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

{"__symbolic":"module","version":4,"metadata":{"ɵnguniversal_modules_common_common_a":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":37,"character":1}}],"members":{"invalidateCacheEntry":[{"__symbolic":"method"}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef","line":47,"character":22},{"__symbolic":"reference","module":"@angular/platform-browser","name":"TransferState","line":47,"character":61}]}],"intercept":[{"__symbolic":"method"}]}},"ɵnguniversal_modules_common_common_b":{"__symbolic":"function","parameters":["doc"],"value":{"__symbolic":"error","message":"Lambda not supported","line":12,"character":9,"module":"./src/state-transfer-initializer/module"}},"TransferHttpCacheModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":108,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"BrowserTransferStateModule","line":109,"character":12}],"providers":[{"__symbolic":"reference","name":"ɵnguniversal_modules_common_common_a"},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HTTP_INTERCEPTORS","line":112,"character":14},"useExisting":{"__symbolic":"reference","name":"ɵnguniversal_modules_common_common_a"},"multi":true}]}]}],"members":{}},"StateTransferInitializerModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":22,"character":1},"arguments":[{"providers":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_INITIALIZER","line":24,"character":14},"multi":true,"useFactory":{"__symbolic":"reference","name":"ɵnguniversal_modules_common_common_b"},"deps":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":24,"character":88}]}]}]}],"members":{}}},"origins":{"ɵnguniversal_modules_common_common_a":"./src/transfer_http","ɵnguniversal_modules_common_common_b":"./src/state-transfer-initializer/module","TransferHttpCacheModule":"./src/transfer_http","StateTransferInitializerModule":"./src/state-transfer-initializer/module"},"importAs":"@nguniversal/common"}
{"__symbolic":"module","version":4,"metadata":{"ɵnguniversal_modules_common_common_a":{"__symbolic":"function","parameters":["doc"],"value":{"__symbolic":"error","message":"Lambda not supported","line":12,"character":9,"module":"./src/state-transfer-initializer/module"}},"TransferHttpCacheModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":120,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"BrowserTransferStateModule","line":121,"character":12}],"providers":[{"__symbolic":"reference","name":"ɵTransferHttpCacheInterceptor"},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HTTP_INTERCEPTORS","line":124,"character":14},"useExisting":{"__symbolic":"reference","name":"ɵTransferHttpCacheInterceptor"},"multi":true}]}]}],"members":{}},"StateTransferInitializerModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":22,"character":1},"arguments":[{"providers":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_INITIALIZER","line":24,"character":14},"multi":true,"useFactory":{"__symbolic":"reference","name":"ɵnguniversal_modules_common_common_a"},"deps":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":24,"character":88}]}]}]}],"members":{}},"ɵTransferHttpCacheInterceptor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":43,"character":1}}],"members":{"invalidateCacheEntry":[{"__symbolic":"method"}],"makeCacheKey":[{"__symbolic":"method"}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef","line":60,"character":22},{"__symbolic":"reference","module":"@angular/platform-browser","name":"TransferState","line":60,"character":61}]}],"intercept":[{"__symbolic":"method"}]}}},"origins":{"ɵnguniversal_modules_common_common_a":"./src/state-transfer-initializer/module","TransferHttpCacheModule":"./src/transfer_http","StateTransferInitializerModule":"./src/state-transfer-initializer/module","ɵTransferHttpCacheInterceptor":"./src/transfer_http"},"importAs":"@nguniversal/common"}

@@ -5,5 +5,4 @@ /**

export * from './index';
export { domContentLoadedFactory as ɵnguniversal_modules_common_common_b } from './src/state-transfer-initializer/module';
export { TransferHttpCacheInterceptor as ɵnguniversal_modules_common_common_a } from './src/transfer_http';
export { domContentLoadedFactory as ɵnguniversal_modules_common_common_a } from './src/state-transfer-initializer/module';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uX3B1YmxpY19pbmRleC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL21vZHVsZXMvY29tbW9uL2NvbW1vbl9wdWJsaWNfaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFj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nJvbSAnLi9pbmRleCc7XG5cbmV4cG9ydCB7ZG9tQ29udGVudExvYWRlZEZhY3RvcnkgYXMgybVuZ3VuaXZlcnNhbF9tb2R1bGVzX2NvbW1vbl9jb21tb25fYX0gZnJvbSAnLi9zcmMvc3RhdGUtdHJhbnNmZXItaW5pdGlhbGl6ZXIvbW9kdWxlJzsiXX0=

@@ -12,4 +12,4 @@ /**

*/
export { TransferHttpCacheModule, StateTransferInitializerModule } from './public_api';
export { TransferHttpCacheModule, StateTransferInitializerModule, ɵTransferHttpCacheInterceptor } from './public_api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9tb2R1bGVzL2NvbW1vbi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQU9BLHdFQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2VcbiAqL1xuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9tb2R1bGVzL2NvbW1vbi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQU9BLHVHQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2VcbiAqL1xuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ==

@@ -7,3 +7,4 @@ /**

export { StateTransferInitializerModule } from './src/state-transfer-initializer/module';
export { ɵTransferHttpCacheInterceptor } from './private_api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL21vZHVsZXMvY29tbW9uL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQU9BLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQzlELE9BQU8sRUFBRSw4QkFBOEIsRUFBRSxNQUFNLHlDQUF5QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZm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sZSB9IGZyb20gJy4vc3JjL3N0YXRlLXRyYW5zZmVyLWluaXRpYWxpemVyL21vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL3ByaXZhdGVfYXBpJztcbiJdfQ==

@@ -36,12 +36,3 @@ /**

];
function StateTransferInitializerModule_tsickle_Closure_declarations() {
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
StateTransferInitializerModule.decorators;
/**
* @nocollapse
* @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
*/
StateTransferInitializerModule.ctorParameters;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbW9kdWxlcy9jb21tb24vc3JjL3N0YXRlLXRyYW5zZmVyLWluaXRpYWxpemVyL21vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQVFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsZUFBZSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzFELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQzs7Ozs7QUFFM0MsTUFBTSxrQ0FBa0MsR0FBYTtJQUNuRCxNQUFNLENBQUMsR0FBRyxFQUFFLENBQUMsSUFBSSxPQUFPLENBQUUsQ0FBQyxPQUFPLEVBQUUsT0FBTyxFQUFFLEVBQUU7UUFDN0MsdUJBQU0sYUFBYSxHQUFHLEdBQUcsRUFBRTtZQUN6QixHQUFHLENBQUMsbUJBQW1CLENBQUMsa0JBQWtCLEVBQUUsYUFBYSxDQUFDLENBQUM7WUFDM0QsT0FBTyxFQUFFLENBQUM7U0FDWCxDQUFDO1FBQ0YsR0FBRyxDQUFDLGdCQUFnQixDQUFDLGtCQUFrQixFQUFFLGFBQWE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sIGNvbnRlbnRMb2FkZWQpO1xuICB9KTtcbn1cblxuXG5ATmdNb2R1bGUoe1xuICBwcm92aWRlcnM6IFtcbiAgICB7cHJvdmlkZTogQVBQX0lOSVRJQUxJWkVSLCBtdWx0aTogdHJ1ZSwgdXNlRmFjdG9yeTogZG9tQ29udGVudExvYWRlZEZhY3RvcnksIGRlcHM6IFtET0NVTUVOVF19LFxuICBdXG59KVxuZXhwb3J0IGNsYXNzIFN0YXRlVHJhbnNmZXJJbml0aWFsaXplck1vZHVsZSB7fVxuIl19

@@ -56,6 +56,18 @@ /**

invalidateCacheEntry(url) {
this.transferState.remove(makeStateKey('G.' + url));
this.transferState.remove(makeStateKey('H.' + url));
Object.keys(this.transferState['store'])
.forEach(key => key.includes(url) ? this.transferState.remove(makeStateKey(key)) : null);
}
/**
* @param {?} method
* @param {?} url
* @param {?} params
* @return {?}
*/
makeCacheKey(method, url, params) {
// make the params encoded same as a url so it's easy to identify
const /** @type {?} */ encodedParams = params.keys().sort().map(k => `${k}=${params.get(k)}`).join('&');
const /** @type {?} */ key = (method === 'GET' ? 'G.' : 'H.') + url + '?' + encodedParams;
return makeStateKey(key);
}
/**
* @param {?} req

@@ -75,4 +87,3 @@ * @param {?} next

}
const /** @type {?} */ key = (req.method === 'GET' ? 'G.' : 'H.') + req.url;
const /** @type {?} */ storeKey = makeStateKey(key);
const /** @type {?} */ storeKey = this.makeCacheKey(req.method, req.url, req.params);
if (this.transferState.hasKey(storeKey)) {

@@ -112,13 +123,6 @@ // Request found in cache. Respond using it.

TransferHttpCacheInterceptor.ctorParameters = () => [
{ type: ApplicationRef, },
{ type: TransferState, },
{ type: ApplicationRef },
{ type: TransferState }
];
function TransferHttpCacheInterceptor_tsickle_Closure_declarations() {
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
TransferHttpCacheInterceptor.decorators;
/**
* @nocollapse
* @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
*/
TransferHttpCacheInterceptor.ctorParameters;
/** @type {?} */

@@ -144,12 +148,3 @@ TransferHttpCacheInterceptor.prototype.isCacheActive;

];
function TransferHttpCacheModule_tsickle_Closure_declarations() {
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
TransferHttpCacheModule.decorators;
/**
* @nocollapse
* @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
*/
TransferHttpCacheModule.ctorParameters;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNmZXJfaHR0cC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL21vZHVsZXMvY29tbW9uL3NyYy90cmFuc2Zlcl9odHRwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFPQSxPQUFPLEVBQ0wsaUJBQWlCLEVBR2pCLFdBQVcsRUFHWCxZQUFZLEVBQ2IsTUFBTSxzQkFBc0IsQ0FBQztBQUM5QixPQUFPLEVBQUMsY0FBYyxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDbkUsT0FBTyxFQUFDLDBCQUEwQixFQUFFLGFBQWEsRUFBRSxZQUFZLEVBQUMsTUFBTSwyQkFBMkIsQ0FBQztBQUNsRyxPQUFPLEVBQWEsRUFBRSxJQUFJLFlBQVksRUFBQyxNQUFNLE1BQU0sQ0FBQztBQUNwRCxPQUFPLEVBQUMsR0FBRyxFQUFFLElBQUksRUFBRSxNQUFNLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBVWpELHVCQUF1QixPQUFvQjtJQUN6Qyx1QkFBTSxVQUFVLEdBQStCLEVBQUUsQ0FBQztJQUNsRCxHQUFHLENBQUMsQ0FBQyx1QkFBTSxHQUFHLElBQ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b2JzZXJ2YWJsZU9mKG5ldyBIdHRwUmVzcG9uc2U8YW55Pih7XG4gICAgICAgIGJvZHk6IHJlc3BvbnNlLmJvZHksXG4gICAgICAgIGhlYWRlcnM6IG5ldyBIdHRwSGVhZGVycyhyZXNwb25zZS5oZWFkZXJzKSxcbiAgICAgICAgc3RhdHVzOiByZXNwb25zZS5zdGF0dXMsXG4gICAgICAgIHN0YXR1c1RleHQ6IHJlc3BvbnNlLnN0YXR1c1RleHQsXG4gICAgICAgIHVybDogcmVzcG9uc2UudXJsLFxuICAgICAgfSkpO1xuICAgIH0gZWxzZSB7XG4gICAgICAvLyBSZXF1ZXN0IG5vdCBmb3VuZCBpbiBjYWNoZS4gTWFrZSB0aGUgcmVxdWVzdCBhbmQgY2FjaGUgaXQuXG4gICAgICBjb25zdCBodHRwRXZlbnQgPSBuZXh0LmhhbmRsZShyZXEpO1xuICAgICAgcmV0dXJuIGh0dHBFdmVudFxuICAgICAgICAucGlwZShcbiAgICAgICAgICB0YXAoKGV2ZW50OiBIdHRwRXZlbnQ8YW55PikgPT4ge1xuICAgICAgICAgICAgaWYgKGV2ZW50IGluc3RhbmNlb2YgSHR0cFJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgIHRoaXMudHJhbnNmZXJTdGF0ZS5zZXQoc3RvcmVLZXksIHtcbiAgICAgICAgICAgICAgICBib2R5OiBldmVudC5ib2R5LFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IGdldEhlYWRlcnNNYXAoZXZlbnQuaGVhZGVycyksXG4gICAgICAgICAgICAgICAgc3RhdHVzOiBldmVudC5zdGF0dXMsXG4gICAgICAgICAgICAgICAgc3RhdHVzVGV4dDogZXZlbnQuc3RhdHVzVGV4dCxcbiAgICAgICAgICAgICAgICB1cmw6IGV2ZW50LnVybCEsXG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG4gICAgICAgICk7XG4gICAgfVxuICB9XG59XG5cbi8qKlxuICogQW4g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c3RhdHVzLFxuICAgICAgICAgICAgICAgIHN0YXR1c1RleHQ6IGV2ZW50LnN0YXR1c1RleHQsXG4gICAgICAgICAgICAgICAgdXJsOiBldmVudC51cmwhLFxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KVxuICAgICAgICApO1xuICAgIH1cbiAgfVxufVxuXG4vKipcbiAqIEFuIE5nTW9kdWxlIHVzZWQgaW4gY29uanVuY3Rpb24gd2l0aCBgU2VydmVyVHJhbnNmZXJIdHRwQ2FjaGVNb2R1bGVgIHRvIHRyYW5zZmVyIGNhY2hlZCBIVFRQXG4gKiBjYWxscyBmcm9tIHRoZSBzZXJ2ZXIgdG8gdGhlIGNsaWVudCBhcHBsaWNhdGlvbi5cbiAqL1xuQE5nTW9kdWxlKHtcbiAgaW1wb3J0czogW0Jyb3dzZXJUcmFuc2ZlclN0YXRlTW9kdWxlXSxcbiAgcHJvdmlkZXJzOiBbXG4gICAgVHJhbnNmZXJIdHRwQ2FjaGVJbnRlcmNlcHRvcixcbiAgICB7cHJvdmlkZTogSFRUUF9JTlRFUkNFUFRPUlMsIHVzZUV4aXN0aW5nOiBUcmFuc2Zlckh0dHBDYWNoZUludGVyY2VwdG9yLCBtdWx0aTogdHJ1ZX0sXG4gIF0sXG59KVxuZXhwb3J0IGNsYXNzIFRyYW5zZmVySHR0cENhY2hlTW9kdWxlIHt9XG4iXX0=

@@ -5,5 +5,4 @@ /**

export * from './index';
export { domContentLoadedFactory as ɵnguniversal_modules_common_common_b } from './src/state-transfer-initializer/module';
export { TransferHttpCacheInterceptor as ɵnguniversal_modules_common_common_a } from './src/transfer_http';
export { domContentLoadedFactory as ɵnguniversal_modules_common_common_a } from './src/state-transfer-initializer/module';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uX3B1YmxpY19pbmRleC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4u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QW9DLEVBQUMsTUFBTSx5Q0FBeUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG5cbmV4cG9ydCB7ZG9tQ29udGVudExvYWRlZEZhY3RvcnkgYXMgybVuZ3VuaXZlcnNhbF9tb2R1bGVzX2NvbW1vbl9jb21tb25fYX0gZnJvbSAnLi9zcmMvc3RhdGUtdHJhbnNmZXItaW5pdGlhbGl6ZXIvbW9kdWxlJzsiXX0=

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

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
export * from './public_api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9tb2R1bGVzL2NvbW1vbi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPQSxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2VcbiAqL1xuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9tb2R1bGVzL2NvbW1vbi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFDSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2VcbiAqL1xuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ==

@@ -0,4 +1,12 @@

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
export { TransferHttpCacheModule } from './src/transfer_http';
export { StateTransferInitializerModule } from './src/state-transfer-initializer/module';
export * from './private_api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL21vZHVsZXMvY29tbW9uL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBT0EsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDOUQsT0FBTyxFQUFFLDhCQUE4QixFQUFFLE1BQU0seUNBQXlDLENBQUMiLCJzb3VyY2VzQ29udGVudC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BsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5pby9saWNlbnNlXG4gKi9cbmV4cG9ydCB7IFRyYW5zZmVySHR0cENhY2hlTW9kdWxlIH0gZnJvbSAnLi9zcmMvdHJhbnNmZXJfaHR0cCc7XG5leHBvcnQgeyBTdGF0ZVRyYW5zZmVySW5pdGlhbGl6ZXJNb2R1bGUgfSBmcm9tICcuL3NyYy9zdGF0ZS10cmFuc2Zlci1pbml0aWFsaXplci9tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9wcml2YXRlX2FwaSc7XG4iXX0=

@@ -11,11 +11,9 @@ /**

export function domContentLoadedFactory(doc) {
return function () {
return new Promise(function (resolve, _reject) {
var contentLoaded = function () {
doc.removeEventListener('DOMContentLoaded', contentLoaded);
resolve();
};
doc.addEventListener('DOMContentLoaded', contentLoaded);
});
};
return function () { return new Promise(function (resolve, _reject) {
var contentLoaded = function () {
doc.removeEventListener('DOMContentLoaded', contentLoaded);
resolve();
};
doc.addEventListener('DOMContentLoaded', contentLoaded);
}); };
}

@@ -36,2 +34,2 @@ var StateTransferInitializerModule = /** @class */ (function () {

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbW9kdWxlcy9jb21tb24vc3JjL3N0YXRlLXRyYW5zZmVyLWluaXRpYWxpemVyL21vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBUUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxlQUFlLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDMUQsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRTNDLE1BQU0sa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IH0gZnJvbSAnQGFuZ3VsYXIvY29tbW9uJztcblxuZXhwb3J0IGZ1bmN0aW9uIGRvbUNvbnRlbnRMb2FkZWRGYWN0b3J5KGRvYzogRG9jdW1lbnQpIHtcbiAgcmV0dXJuICgpID0+IG5ldyBQcm9taXNlICgocmVzb2x2ZSwgX3JlamVjdCkgPT4ge1xuICAgIGNvbnN0IGNvbnRlbnRMb2FkZWQgPSAoKSA9PiB7XG4gICAgICBkb2MucmVtb3ZlRXZlbnRMaXN0ZW5lcignRE9NQ29udGVudExvYWRlZCcsIGNvbnRlbnRMb2FkZWQpO1xuICAgICAgcmVzb2x2ZSgpO1xuICAgIH07XG4gICAgZG9jLmFkZEV2ZW50TGlzdGVuZXIoJ0RPTUNvbnRlbnRMb2FkZWQnLCBjb250ZW50TG9hZGVkKTtcbiAgfSk7XG59XG5cblxuQE5nTW9kdWxlKHtcbiAgcHJvdmlkZXJzOiBbXG4gICAge3Byb3ZpZGU6IEFQUF9JTklUSUFMSVpFUiwgbXVsdGk6IHRydWUsIHVzZUZhY3Rvcnk6IGRvbUNvbnRlbnRMb2FkZWRGYWN0b3J5LCBkZXBzOiBbRE9DVU1FTlRdfSxcbiAgXVxufSlcbmV4cG9ydCBjbGFzcyBTdGF0ZVRyYW5zZmVySW5pdGlhbGl6ZXJNb2R1bGUge31cbiJdfQ==

@@ -11,2 +11,9 @@ var __values = (this && this.__values) || function (o) {

};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { HTTP_INTERCEPTORS, HttpHeaders, HttpResponse } from '@angular/common/http';

@@ -22,3 +29,3 @@ import { ApplicationRef, Injectable, NgModule } from '@angular/core';

var key = _b.value;
headersMap[key] = (headers.getAll(key));
headersMap[key] = headers.getAll(key);
}

@@ -48,5 +55,12 @@ }

TransferHttpCacheInterceptor.prototype.invalidateCacheEntry = function (url) {
this.transferState.remove(makeStateKey('G.' + url));
this.transferState.remove(makeStateKey('H.' + url));
var _this = this;
Object.keys(this.transferState['store'])
.forEach(function (key) { return key.includes(url) ? _this.transferState.remove(makeStateKey(key)) : null; });
};
TransferHttpCacheInterceptor.prototype.makeCacheKey = function (method, url, params) {
// make the params encoded same as a url so it's easy to identify
var encodedParams = params.keys().sort().map(function (k) { return k + "=" + params.get(k); }).join('&');
var key = (method === 'GET' ? 'G.' : 'H.') + url + '?' + encodedParams;
return makeStateKey(key);
};
TransferHttpCacheInterceptor.prototype.intercept = function (req, next) {

@@ -63,4 +77,3 @@ var _this = this;

}
var key = (req.method === 'GET' ? 'G.' : 'H.') + req.url;
var storeKey = makeStateKey(key);
var storeKey = this.makeCacheKey(req.method, req.url, req.params);
if (this.transferState.hasKey(storeKey)) {

@@ -88,3 +101,3 @@ // Request found in cache. Respond using it.

statusText: event.statusText,
url: (event.url),
url: event.url,
});

@@ -100,4 +113,4 @@ }

TransferHttpCacheInterceptor.ctorParameters = function () { return [
{ type: ApplicationRef, },
{ type: TransferState, },
{ type: ApplicationRef },
{ type: TransferState }
]; };

@@ -127,2 +140,2 @@ return TransferHttpCacheInterceptor;

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNmZXJfaHR0cC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL21vZHVsZXMvY29tbW9uL3NyYy90cmFuc2Zlcl9odHRwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFPQSxPQUFPLEVBQ0wsaUJBQWlCLEVBR2pCLFdBQVcsRUFHWCxZQUFZLEVBQ2IsTUFBTSxzQkFBc0IsQ0FBQztBQUM5QixPQUFPLEVBQUMsY0FBYyxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDbkUsT0FBTyxFQUFDLDBCQUEwQixFQUFFLGFB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dGhpcy50cmFuc2ZlclN0YXRlLnNldChzdG9yZUtleSwge1xuICAgICAgICAgICAgICAgIGJvZHk6IGV2ZW50LmJvZHksXG4gICAgICAgICAgICAgICAgaGVhZGVyczogZ2V0SGVhZGVyc01hcChldmVudC5oZWFkZXJzKSxcbiAgICAgICAgICAgICAgICBzdGF0dXM6IGV2ZW50LnN0YXR1cyxcbiAgICAgICAgICAgICAgICBzdGF0dXNUZXh0OiBldmVudC5zdGF0dXNUZXh0LFxuICAgICAgICAgICAgICAgIHVybDogZXZlbnQudXJsISxcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSlcbiAgICAgICAgKTtcbiAgICB9XG4gIH1cbn1cblxuLyoqXG4gKiBBbiBOZ01vZHVsZSB1c2VkIGluIGNvbmp1bmN0aW9uIHdpdGggYFNlcnZlclRyYW5zZmVySHR0cENhY2hlTW9kdWxlYCB0byB0cmFuc2ZlciBjYWNoZWQgSFRUUFxuICogY2FsbHMgZnJvbSB0aGUgc2VydmVyIHRvIHRoZSBjbGllbnQgYXBwbGljYXRpb24uXG4gKi9cbkBOZ01vZHVsZSh7XG4gIGltcG9ydHM6IFtCcm93c2VyVHJhbnNmZXJTdGF0ZU1vZHVsZV0sXG4gIHByb3ZpZGVyczogW1xuICAgIFRyYW5zZmVySHR0cENhY2hlSW50ZXJjZXB0b3IsXG4gICAge3Byb3ZpZGU6IEhUVFBfSU5URVJDRVBUT1JTLCB1c2VFeGlzdGluZzogVHJhbnNmZXJIdHRwQ2FjaGVJbnRlcmNlcHRvciwgbXVsdGk6IHRydWV9LFxuICBdLFxufSlcbmV4cG9ydCBjbGFzcyBUcmFuc2Zlckh0dHBDYWNoZU1vZHVsZSB7fVxuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNmZXJfaHR0cC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4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SHR0cFJlc3BvbnNlPGFueT4oe1xuICAgICAgICBib2R5OiByZXNwb25zZS5ib2R5LFxuICAgICAgICBoZWFkZXJzOiBuZXcgSHR0cEhlYWRlcnMocmVzcG9uc2UuaGVhZGVycyksXG4gICAgICAgIHN0YXR1czogcmVzcG9uc2Uuc3RhdHVzLFxuICAgICAgICBzdGF0dXNUZXh0OiByZXNwb25zZS5zdGF0dXNUZXh0LFxuICAgICAgICB1cmw6IHJlc3BvbnNlLnVybCxcbiAgICAgIH0pKTtcbiAgICB9IGVsc2Uge1xuICAgICAgLy8gUmVxdWVzdCBub3QgZm91bmQgaW4gY2FjaGUuIE1ha2UgdGhlIHJlcXVlc3QgYW5kIGNhY2hlIGl0LlxuICAgICAgY29uc3QgaHR0cEV2ZW50ID0gbmV4dC5oYW5kbGUocmVxKTtcbiAgICAgIHJldHVybiBodHRwRXZlbnRcbiAgICAgICAgLnBpcGUoXG4gICAgICAgICAgdGFwKChldmVudDogSHR0cEV2ZW50PGFueT4pID0+IHtcbiAgICAgICAgICAgIGlmIChldmVudCBpbnN0YW5jZW9mIEh0dHBSZXNwb25zZSkge1xuICAgICAgICAgICAgICB0aGlzLnRyYW5zZmVyU3RhdGUuc2V0KHN0b3JlS2V5LCB7XG4gICAgICAgICAgICAgICAgYm9keTogZXZlbnQuYm9keSxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiBnZXRIZWFkZXJzTWFwKGV2ZW50LmhlYWRlcnMpLFxuICAgICAgICAgICAgICAgIHN0YXR1czogZXZlbnQuc3RhdHVzLFxuICAgICAgICAgICAgICAgIHN0YXR1c1RleHQ6IGV2ZW50LnN0YXR1c1RleHQsXG4gICAgICAgICAgICAgICAgdXJsOiBldmVudC51cmwhLFxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KVxuICAgICAgICApO1xuICAgIH1cbiAgfVxufVxuXG4vKipcbiAqIEFuIE5nTW9kdWxlIHVzZWQgaW4gY29uanVuY3Rpb24gd2l0aCBgU2VydmVyVHJhbnNmZXJIdHRwQ2FjaGVNb2R1bGVgIHRvIHRyYW5zZmVyIGNhY2hlZCBIVFRQXG4gKiBjYWxscyBmcm9tIHRoZSBzZXJ2ZXIgdG8gdGhlIGNsaWVudCBhcHBsaWNhdGlvbi5cbiAqL1xuQE5nTW9kdWxlKHtcbiAgaW1wb3J0czogW0Jyb3dzZXJUcmFuc2ZlclN0YXRlTW9kdWxlXSxcbiAgcHJvdmlkZXJzOiBbXG4gICAgVHJhbnNmZXJIdHRwQ2FjaGVJbnRlcmNlcHRvcixcbiAgICB7cHJvdmlkZTogSFRUUF9JTlRFUkNFUFRPUlMsIHVzZUV4aXN0aW5nOiBUcmFuc2Zlckh0dHBDYWNoZUludGVyY2VwdG9yLCBtdWx0aTogdHJ1ZX0sXG4gIF0sXG59KVxuZXhwb3J0IGNsYXNzIFRyYW5zZmVySHR0cENhY2hlTW9kdWxlIHt9XG4iXX0=

@@ -46,6 +46,18 @@ import { HTTP_INTERCEPTORS, HttpHeaders, HttpResponse } from '@angular/common/http';

invalidateCacheEntry(url) {
this.transferState.remove(makeStateKey('G.' + url));
this.transferState.remove(makeStateKey('H.' + url));
Object.keys(this.transferState['store'])
.forEach(key => key.includes(url) ? this.transferState.remove(makeStateKey(key)) : null);
}
/**
* @param {?} method
* @param {?} url
* @param {?} params
* @return {?}
*/
makeCacheKey(method, url, params) {
// make the params encoded same as a url so it's easy to identify
const /** @type {?} */ encodedParams = params.keys().sort().map(k => `${k}=${params.get(k)}`).join('&');
const /** @type {?} */ key = (method === 'GET' ? 'G.' : 'H.') + url + '?' + encodedParams;
return makeStateKey(key);
}
/**
* @param {?} req

@@ -65,4 +77,3 @@ * @param {?} next

}
const /** @type {?} */ key = (req.method === 'GET' ? 'G.' : 'H.') + req.url;
const /** @type {?} */ storeKey = makeStateKey(key);
const /** @type {?} */ storeKey = this.makeCacheKey(req.method, req.url, req.params);
if (this.transferState.hasKey(storeKey)) {

@@ -102,4 +113,4 @@ // Request found in cache. Respond using it.

TransferHttpCacheInterceptor.ctorParameters = () => [
{ type: ApplicationRef, },
{ type: TransferState, },
{ type: ApplicationRef },
{ type: TransferState }
];

@@ -165,3 +176,8 @@ /**

*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* @license

@@ -178,3 +194,3 @@ * Copyright Google LLC All Rights Reserved.

export { domContentLoadedFactory as ɵnguniversal_modules_common_common_b, TransferHttpCacheInterceptor as ɵnguniversal_modules_common_common_a, TransferHttpCacheModule, StateTransferInitializerModule };
export { domContentLoadedFactory as ɵnguniversal_modules_common_common_a, TransferHttpCacheModule, StateTransferInitializerModule, TransferHttpCacheInterceptor as ɵTransferHttpCacheInterceptor };
//# sourceMappingURL=common.js.map

@@ -18,2 +18,9 @@ import { HTTP_INTERCEPTORS, HttpHeaders, HttpResponse } from '@angular/common/http';

};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function getHeadersMap(headers) {

@@ -24,3 +31,3 @@ var headersMap = {};

var key = _b.value;
headersMap[key] = (headers.getAll(key));
headersMap[key] = headers.getAll(key);
}

@@ -50,5 +57,12 @@ }

TransferHttpCacheInterceptor.prototype.invalidateCacheEntry = function (url) {
this.transferState.remove(makeStateKey('G.' + url));
this.transferState.remove(makeStateKey('H.' + url));
var _this = this;
Object.keys(this.transferState['store'])
.forEach(function (key) { return key.includes(url) ? _this.transferState.remove(makeStateKey(key)) : null; });
};
TransferHttpCacheInterceptor.prototype.makeCacheKey = function (method, url, params) {
// make the params encoded same as a url so it's easy to identify
var encodedParams = params.keys().sort().map(function (k) { return k + "=" + params.get(k); }).join('&');
var key = (method === 'GET' ? 'G.' : 'H.') + url + '?' + encodedParams;
return makeStateKey(key);
};
TransferHttpCacheInterceptor.prototype.intercept = function (req, next) {

@@ -65,4 +79,3 @@ var _this = this;

}
var key = (req.method === 'GET' ? 'G.' : 'H.') + req.url;
var storeKey = makeStateKey(key);
var storeKey = this.makeCacheKey(req.method, req.url, req.params);
if (this.transferState.hasKey(storeKey)) {

@@ -90,3 +103,3 @@ // Request found in cache. Respond using it.

statusText: event.statusText,
url: (event.url),
url: event.url,
});

@@ -102,4 +115,4 @@ }

TransferHttpCacheInterceptor.ctorParameters = function () { return [
{ type: ApplicationRef, },
{ type: TransferState, },
{ type: ApplicationRef },
{ type: TransferState }
]; };

@@ -135,11 +148,9 @@ return TransferHttpCacheInterceptor;

function domContentLoadedFactory(doc) {
return function () {
return new Promise(function (resolve, _reject) {
var contentLoaded = function () {
doc.removeEventListener('DOMContentLoaded', contentLoaded);
resolve();
};
doc.addEventListener('DOMContentLoaded', contentLoaded);
});
};
return function () { return new Promise(function (resolve, _reject) {
var contentLoaded = function () {
doc.removeEventListener('DOMContentLoaded', contentLoaded);
resolve();
};
doc.addEventListener('DOMContentLoaded', contentLoaded);
}); };
}

@@ -160,6 +171,30 @@ var StateTransferInitializerModule = /** @class */ (function () {

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Generated bundle index. Do not edit.
*/
export { domContentLoadedFactory as ɵnguniversal_modules_common_common_b, TransferHttpCacheInterceptor as ɵnguniversal_modules_common_common_a, TransferHttpCacheModule, StateTransferInitializerModule };
export { domContentLoadedFactory as ɵnguniversal_modules_common_common_a, TransferHttpCacheModule, StateTransferInitializerModule, TransferHttpCacheInterceptor as ɵTransferHttpCacheInterceptor };
//# sourceMappingURL=common.js.map
{
"name": "@nguniversal/common",
"version": "v6.0.0",
"version": "v6.1.0",
"description": "Angular Universal common utilities",

@@ -39,2 +39,2 @@ "license": "MIT",

"es2015": "./fesm2015/common.js"
}
}

@@ -10,1 +10,2 @@ /**

export { StateTransferInitializerModule } from './src/state-transfer-initializer/module';
export * from './private_api';

@@ -12,65 +12,2 @@ # Angular Universal Common Module

`TransferHttpCacheModule` installs a Http interceptor that avoids duplicate `HttpClient` requests
on the client, for requests that were already made when the application was rendered on the server
side.
When the module is installed in the application `NgModule`, it will intercept `HttpClient` requests
on the server and store the response in the `TransferState` key-value store. This is transferred to the client, which then uses it to respond to the same `HttpClient` requests on the client.
### Usage
To use the `TransferHttpCacheModule`, first install it as part of the top-level App module.
```ts
import {TransferHttpCacheModule} from '@nguniversal/common';
@NgModule({
imports: [
BrowserModule.withServerTransition({appId: 'my-app'}),
TransferHttpCacheModule,
],
bootstrap: [MyApp]
})
export class AppBrowserModule() {}
```
Then, import `ServerTransferStateModule` in your Server module.
```ts
import { NgModule } from "@angular/core";
import {
ServerModule,
ServerTransferStateModule
} from "@angular/platform-server";
import { AppModule } from "./app.module";
import { AppComponent } from "./app.component";
@NgModule({
imports: [
AppModule,
ServerModule,
ServerTransferStateModule
],
bootstrap: [AppComponent]
})
export class AppServerModule {}
```
Finally, in `main.ts` change this:
```ts
...
platformBrowserDynamic().bootstrapModule(AppBrowserModule);
```
To this:
```ts
...
document.addEventListener("DOMContentLoaded", () => {
platformBrowserDynamic()
.bootstrapModule(AppBrowserModule)
.catch(err => console.log(err));
});
```
Moved to [/docs/transfer-http.md](https://github.com/angular/universal/tree/master/docs/transfer-http.md)

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

private invalidateCacheEntry(url);
private makeCacheKey(method, url, params);
constructor(appRef: ApplicationRef, transferState: TransferState);

@@ -27,0 +28,0 @@ intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;

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