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

@nguniversal/common

Package Overview
Dependencies
Maintainers
3
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 11.1.1 to 11.1.2

14

bundles/common-engine.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/compiler'), require('@angular/core'), require('@angular/platform-server'), require('path'), require('fs'), require('util'), require('critters')) :
typeof define === 'function' && define.amd ? define('@nguniversal/common/engine', ['exports', '@angular/compiler', '@angular/core', '@angular/platform-server', 'path', 'fs', 'util', 'critters'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.nguniversal = global.nguniversal || {}, global.nguniversal.common = global.nguniversal.common || {}, global.nguniversal.common.engine = {}), global.ng.compiler, global.ng.core, global.ng.platformServer, global.path, global.fs, global.util, global.critters));
}(this, (function (exports, compiler, core, platformServer, path, fs, util, Critters) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/compiler'), require('@angular/core'), require('@angular/platform-server'), require('path'), require('url'), require('fs'), require('util'), require('critters')) :
typeof define === 'function' && define.amd ? define('@nguniversal/common/engine', ['exports', '@angular/compiler', '@angular/core', '@angular/platform-server', 'path', 'url', 'fs', 'util', 'critters'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.nguniversal = global.nguniversal || {}, global.nguniversal.common = global.nguniversal.common || {}, global.nguniversal.common.engine = {}), global.ng.compiler, global.ng.core, global.ng.platformServer, global.path, global.url, global.fs, global.util, global.critters));
}(this, (function (exports, compiler, core, platformServer, path, url, fs, util, Critters) { 'use strict';

@@ -448,3 +448,3 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

return __awaiter(this, void 0, void 0, function () {
var url, pathname, pagePath, pageExists, extraProviders, doc, moduleOrFactory, factory, html, _b, content, errors, warnings;
var url$1, pathname, pagePath, pageExists, extraProviders, doc, moduleOrFactory, factory, html, _b, content, errors, warnings;
return __generator(this, function (_c) {

@@ -454,4 +454,4 @@ switch (_c.label) {

if (!(opts.publicPath && opts.documentFilePath && opts.url !== undefined)) return [3 /*break*/, 3];
url = new URL(opts.url);
pathname = url.pathname.substring(1);
url$1 = new url.URL(opts.url);
pathname = url$1.pathname.substring(1);
pagePath = path.resolve(opts.publicPath, pathname, 'index.html');

@@ -458,0 +458,0 @@ if (!(pagePath !== path.resolve(opts.documentFilePath))) return [3 /*break*/, 3];

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/compiler"),require("@angular/core"),require("@angular/platform-server"),require("path"),require("fs"),require("util"),require("critters")):"function"==typeof define&&define.amd?define("@nguniversal/common/engine",["exports","@angular/compiler","@angular/core","@angular/platform-server","path","fs","util","critters"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).nguniversal=e.nguniversal||{},e.nguniversal.common=e.nguniversal.common||{},e.nguniversal.common.engine={}),e.ng.compiler,e.ng.core,e.ng.platformServer,e.path,e.fs,e.util,e.critters)}(this,(function(e,t,r,n,o,i,s,c){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=u(c),l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/compiler"),require("@angular/core"),require("@angular/platform-server"),require("path"),require("url"),require("fs"),require("util"),require("critters")):"function"==typeof define&&define.amd?define("@nguniversal/common/engine",["exports","@angular/compiler","@angular/core","@angular/platform-server","path","url","fs","util","critters"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).nguniversal=e.nguniversal||{},e.nguniversal.common=e.nguniversal.common||{},e.nguniversal.common.engine={}),e.ng.compiler,e.ng.core,e.ng.platformServer,e.path,e.url,e.fs,e.util,e.critters)}(this,(function(e,t,r,n,o,i,s,u,c){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=a(c),f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};
/*! *****************************************************************************

@@ -15,3 +15,3 @@ Copyright (c) Microsoft Corporation.

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function f(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function c(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):function t(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(s,c)}u((n=n.apply(e,t||[])).next())}))}function p(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function u(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function h(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}var d=s.promisify(i.readFile),y=s.promisify(i.access);function v(e){return f(this,void 0,void 0,(function(){return p(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,y(e,i.constants.F_OK)];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}}))}))}var m=function(){function e(){}return e.prototype.get=function(e){return d(e,"utf-8")},e}(),g=function(e){function t(t,r){var n=e.call(this,{logger:{warn:function(e){return n.warnings.push(e)},error:function(e){return n.errors.push(e)},log:function(){},info:function(){}},path:t.outputPath,publicPath:t.deployUrl,compress:!!t.minify,pruneSource:!1,reduceInlineStyles:!1,mergeStylesheets:!1,preload:"media",noscriptFallback:!0})||this;return n.optionsExtended=t,n.resourceCache=r,n.warnings=[],n.errors=[],n}return function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.readFile=function(e){return f(this,void 0,void 0,(function(){var t;return p(this,(function(r){switch(r.label){case 0:return void 0!==(t=this.resourceCache.get(e))?[3,2]:[4,d(e,"utf-8")];case 1:t=r.sent(),this.resourceCache.set(e,t),r.label=2;case 2:return[2,t]}}))}))},t}(a.default),b=function(){function e(e){this.options=e,this.resourceCache=new Map}return e.prototype.process=function(e,t){return f(this,void 0,void 0,(function(){var r;return p(this,(function(n){switch(n.label){case 0:return[4,(r=new g(Object.assign(Object.assign({},this.options),t),this.resourceCache)).process(e)];case 1:return[2,{content:n.sent(),errors:r.errors,warnings:r.warnings}]}}))}))},e}(),w=function(){function e(e,t){void 0===t&&(t=[]),this.moduleOrFactory=e,this.providers=t,this.factoryCacheMap=new Map,this.templateCache=new Map,this.pageExists=new Map,this.inlineCriticalCssProcessor=new b({minify:!0})}return e.prototype.render=function(e){var t;return f(this,void 0,void 0,(function(){var r,i,s,c,u,a,l,f,y,m,g;return p(this,(function(p){switch(p.label){case 0:return e.publicPath&&e.documentFilePath&&void 0!==e.url?(r=new URL(e.url),i=r.pathname.substring(1),(s=o.resolve(e.publicPath,i,"index.html"))===o.resolve(e.documentFilePath)?[3,3]:void 0!==(c=this.pageExists.get(s))?[3,2]:[4,v(s)]):[3,3];case 1:c=p.sent(),this.pageExists.set(s,c),p.label=2;case 2:if(c)return[2,d(s,"utf-8")];p.label=3;case 3:return u=function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}(e.providers||[],this.providers||[]),(a=e.document)||!e.documentFilePath?[3,5]:[4,this.getDocument(e.documentFilePath)];case 4:a=p.sent(),p.label=5;case 5:return a&&u.push({provide:n.INITIAL_CONFIG,useValue:{document:e.inlineCriticalCss?a.replace(/ media=\"print\" onload=\"this\.media='all'"><noscript><link .+?><\/noscript>/g,">"):a,url:e.url}}),[4,this.getFactory(this.moduleOrFactory||e.bootstrap)];case 6:return l=p.sent(),[4,n.renderModuleFactory(l,{extraProviders:u})];case 7:return f=p.sent(),e.inlineCriticalCss?[4,this.inlineCriticalCssProcessor.process(f,{outputPath:null!==(t=e.publicPath)&&void 0!==t?t:e.documentFilePath?o.dirname(e.documentFilePath):void 0})]:[2,f];case 8:return y=p.sent(),m=y.content,g=y.errors,y.warnings.forEach((function(e){return console.warn(e)})),g.forEach((function(e){return console.error(e)})),[2,m]}}))}))},e.prototype.getFactory=function(e){return f(this,void 0,void 0,(function(){var t,n;return p(this,(function(o){switch(o.label){case 0:return e instanceof r.NgModuleFactory?[2,e]:[3,1];case 1:return(t=this.factoryCacheMap.get(e))?[2,t]:[4,this.getCompiler().compileModuleAsync(e)];case 2:return n=o.sent(),this.factoryCacheMap.set(e,n),[2,n]}}))}))},e.prototype.getDocument=function(e){return f(this,void 0,void 0,(function(){var t;return p(this,(function(r){switch(r.label){case 0:return(t=this.templateCache.get(e))?[3,2]:[4,d(e,"utf-8")];case 1:t=r.sent(),this.templateCache.set(e,t),r.label=2;case 2:return[2,t]}}))}))},e.prototype.getCompiler=function(){return n.platformDynamicServer().injector.get(r.CompilerFactory).createCompiler([{providers:[{provide:t.ResourceLoader,useClass:m,deps:[]}]}])},e}();
***************************************************************************** */function p(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):function t(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(s,u)}c((n=n.apply(e,t||[])).next())}))}function h(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function c(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}var y=u.promisify(s.readFile),v=u.promisify(s.access);function m(e){return p(this,void 0,void 0,(function(){return h(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,v(e,s.constants.F_OK)];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}}))}))}var g=function(){function e(){}return e.prototype.get=function(e){return y(e,"utf-8")},e}(),b=function(e){function t(t,r){var n=e.call(this,{logger:{warn:function(e){return n.warnings.push(e)},error:function(e){return n.errors.push(e)},log:function(){},info:function(){}},path:t.outputPath,publicPath:t.deployUrl,compress:!!t.minify,pruneSource:!1,reduceInlineStyles:!1,mergeStylesheets:!1,preload:"media",noscriptFallback:!0})||this;return n.optionsExtended=t,n.resourceCache=r,n.warnings=[],n.errors=[],n}return function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.readFile=function(e){return p(this,void 0,void 0,(function(){var t;return h(this,(function(r){switch(r.label){case 0:return void 0!==(t=this.resourceCache.get(e))?[3,2]:[4,y(e,"utf-8")];case 1:t=r.sent(),this.resourceCache.set(e,t),r.label=2;case 2:return[2,t]}}))}))},t}(l.default),w=function(){function e(e){this.options=e,this.resourceCache=new Map}return e.prototype.process=function(e,t){return p(this,void 0,void 0,(function(){var r;return h(this,(function(n){switch(n.label){case 0:return[4,(r=new b(Object.assign(Object.assign({},this.options),t),this.resourceCache)).process(e)];case 1:return[2,{content:n.sent(),errors:r.errors,warnings:r.warnings}]}}))}))},e}(),C=function(){function e(e,t){void 0===t&&(t=[]),this.moduleOrFactory=e,this.providers=t,this.factoryCacheMap=new Map,this.templateCache=new Map,this.pageExists=new Map,this.inlineCriticalCssProcessor=new w({minify:!0})}return e.prototype.render=function(e){var t;return p(this,void 0,void 0,(function(){var r,s,u,c,a,l,f,p,v,g,b;return h(this,(function(h){switch(h.label){case 0:return e.publicPath&&e.documentFilePath&&void 0!==e.url?(r=new i.URL(e.url),s=r.pathname.substring(1),(u=o.resolve(e.publicPath,s,"index.html"))===o.resolve(e.documentFilePath)?[3,3]:void 0!==(c=this.pageExists.get(u))?[3,2]:[4,m(u)]):[3,3];case 1:c=h.sent(),this.pageExists.set(u,c),h.label=2;case 2:if(c)return[2,y(u,"utf-8")];h.label=3;case 3:return a=function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e}(e.providers||[],this.providers||[]),(l=e.document)||!e.documentFilePath?[3,5]:[4,this.getDocument(e.documentFilePath)];case 4:l=h.sent(),h.label=5;case 5:return l&&a.push({provide:n.INITIAL_CONFIG,useValue:{document:e.inlineCriticalCss?l.replace(/ media=\"print\" onload=\"this\.media='all'"><noscript><link .+?><\/noscript>/g,">"):l,url:e.url}}),[4,this.getFactory(this.moduleOrFactory||e.bootstrap)];case 6:return f=h.sent(),[4,n.renderModuleFactory(f,{extraProviders:a})];case 7:return p=h.sent(),e.inlineCriticalCss?[4,this.inlineCriticalCssProcessor.process(p,{outputPath:null!==(t=e.publicPath)&&void 0!==t?t:e.documentFilePath?o.dirname(e.documentFilePath):void 0})]:[2,p];case 8:return v=h.sent(),g=v.content,b=v.errors,v.warnings.forEach((function(e){return console.warn(e)})),b.forEach((function(e){return console.error(e)})),[2,g]}}))}))},e.prototype.getFactory=function(e){return p(this,void 0,void 0,(function(){var t,n;return h(this,(function(o){switch(o.label){case 0:return e instanceof r.NgModuleFactory?[2,e]:[3,1];case 1:return(t=this.factoryCacheMap.get(e))?[2,t]:[4,this.getCompiler().compileModuleAsync(e)];case 2:return n=o.sent(),this.factoryCacheMap.set(e,n),[2,n]}}))}))},e.prototype.getDocument=function(e){return p(this,void 0,void 0,(function(){var t;return h(this,(function(r){switch(r.label){case 0:return(t=this.templateCache.get(e))?[3,2]:[4,y(e,"utf-8")];case 1:t=r.sent(),this.templateCache.set(e,t),r.label=2;case 2:return[2,t]}}))}))},e.prototype.getCompiler=function(){return n.platformDynamicServer().injector.get(r.CompilerFactory).createCompiler([{providers:[{provide:t.ResourceLoader,useClass:g,deps:[]}]}])},e}();
/**

@@ -38,2 +38,2 @@ * @license

*/
e.ɵCommonEngine=w,e.ɵInlineCriticalCssProcessor=b,Object.defineProperty(e,"__esModule",{value:!0})}));
e.ɵCommonEngine=C,e.ɵInlineCriticalCssProcessor=w,Object.defineProperty(e,"__esModule",{value:!0})}));

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

{"__symbolic":"module","version":4,"metadata":{"ɵCommonEngine":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Type","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":47,"character":45,"module":"./engine"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","module":"@angular/core","name":"StaticProvider","line":48,"character":33}]}]}],"render":[{"__symbolic":"method"}],"getFactory":[{"__symbolic":"method"}],"getDocument":[{"__symbolic":"method"}],"getCompiler":[{"__symbolic":"method"}]}},"ɵRenderOptions":{"__symbolic":"interface"},"ɵInlineCriticalCssProcessor":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"}]}],"process":[{"__symbolic":"method"}]}}},"origins":{"ɵCommonEngine":"./engine","ɵRenderOptions":"./engine","ɵInlineCriticalCssProcessor":"./engine"},"importAs":"@nguniversal/common/engine"}
{"__symbolic":"module","version":4,"metadata":{"ɵCommonEngine":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Type","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":48,"character":45,"module":"./engine"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","module":"@angular/core","name":"StaticProvider","line":49,"character":33}]}]}],"render":[{"__symbolic":"method"}],"getFactory":[{"__symbolic":"method"}],"getDocument":[{"__symbolic":"method"}],"getCompiler":[{"__symbolic":"method"}]}},"ɵRenderOptions":{"__symbolic":"interface"},"ɵInlineCriticalCssProcessor":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"}]}],"process":[{"__symbolic":"method"}]}}},"origins":{"ɵCommonEngine":"./engine","ɵRenderOptions":"./engine","ɵInlineCriticalCssProcessor":"./engine"},"importAs":"@nguniversal/common/engine"}

@@ -13,2 +13,3 @@ import { __awaiter } from "tslib";

import { dirname, resolve } from 'path';
import { URL } from 'url';
import { FileLoader } from './file-loader';

@@ -135,2 +136,2 @@ import { InlineCriticalCssProcessor } from './inline-css-processor';

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW5naW5lLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbW9kdWxlcy9jb21tb24vZW5naW5lL3NyYy9lbmdpbmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRztBQUNILE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNuRCxPQUFPLEVBQVksZUFBZSxFQUFFLGVBQWUsRUFBd0IsTUFBTSxlQUFlLENBQUM7QUFDakcsT0FBTyxFQUFFLGNBQWMsRUFBRSxxQkFBcUIsRUFBRSxtQkFBbUIsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQ3RHLE9BQU8sRUFB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XG5cbiAgICBpZiAoIWRvYykge1xuICAgICAgZG9jID0gYXdhaXQgcmVhZEZpbGUoZmlsZVBhdGgsICd1dGYtOCcpO1xuICAgICAgdGhpcy50ZW1wbGF0ZUNhY2hlLnNldChmaWxlUGF0aCwgZG9jKTtcbiAgICB9XG5cbiAgICByZXR1cm4gZG9jO1xuICB9XG5cbiAgLyoqIFJldHVybiBhbiBpbnN0YW5jZSBvZiB0aGUgcGxhdGZvcm1TZXJ2ZXIgY29tcGlsZXIgKi9cbiAgcHJpdmF0ZSBnZXRDb21waWxlcigpOiBDb21waWxlciB7XG4gICAgY29uc3QgY29tcGlsZXJGYWN0b3J5OiBDb21waWxlckZhY3RvcnkgPSBwbGF0Zm9ybUR5bmFtaWNTZXJ2ZXIoKS5pbmplY3Rvci5nZXQoQ29tcGlsZXJGYWN0b3J5KTtcblxuICAgIHJldHVybiBjb21waWxlckZhY3RvcnkuY3JlYXRlQ29tcGlsZXIoW1xuICAgICAgeyBwcm92aWRlcnM6IFt7IHByb3ZpZGU6IFJlc291cmNlTG9hZGVyLCB1c2VDbGFzczogRmlsZUxvYWRlciwgZGVwczogW10gfV0gfVxuICAgIF0pO1xuICB9XG59XG4iXX0=

@@ -6,2 +6,3 @@ import { __awaiter } from 'tslib';

import { resolve, dirname } from 'path';
import { URL } from 'url';
import { readFile as readFile$1, access as access$1, constants } from 'fs';

@@ -8,0 +9,0 @@ import { promisify } from 'util';

{
"name": "@nguniversal/common",
"version": "11.1.1",
"version": "11.1.2",
"description": "Angular Universal common utilities",

@@ -18,4 +18,4 @@ "license": "MIT",

"peerDependencies": {
"@angular/common": "^11.1.1",
"@angular/core": "^11.1.1"
"@angular/common": "^11.1.2",
"@angular/core": "^11.1.2"
},

@@ -22,0 +22,0 @@ "ng-update": {

@@ -225,3 +225,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

type: dependencies_1.NodeDependencyType.Dev,
version: '^11.1.1',
version: '^11.1.2',
});

@@ -228,0 +228,0 @@ return host;

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