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

@nguniversal/socket-engine

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nguniversal/socket-engine - npm Package Compare versions

Comparing version 9.0.0-next.0.with-local-changes to 9.0.0-next.1

8

bundles/socket-engine.umd.js

@@ -57,3 +57,3 @@ (function (global, factory) {

return tslib_1.__awaiter(this, void 0, void 0, function () {
var doc, _a, extraProviders, factory;
var doc, _a, extraProviders, moduleOrFactory, factory;
return tslib_1.__generator(this, function (_b) {

@@ -79,3 +79,4 @@ switch (_b.label) {

]);
return [4 /*yield*/, this.getFactory()];
moduleOrFactory = this.moduleOrFactory || opts.bootstrap;
return [4 /*yield*/, this.getFactory(moduleOrFactory)];
case 3:

@@ -89,6 +90,5 @@ factory = _b.sent();

/** Return the factory for a given engine instance */
CommonEngine.prototype.getFactory = function () {
CommonEngine.prototype.getFactory = function (moduleOrFactory) {
var _this = this;
// If module has been compiled AoT
var moduleOrFactory = this.moduleOrFactory;
if (moduleOrFactory instanceof core.NgModuleFactory) {

@@ -95,0 +95,0 @@ return Promise.resolve(moduleOrFactory);

@@ -8,3 +8,3 @@ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("tslib"),require("fs"),require("@angular/compiler"),require("@angular/core"),require("@angular/platform-server"),require("net")):"function"==typeof define&&define.amd?define("@nguniversal/socket-engine",["exports","tslib","fs","@angular/compiler","@angular/core","@angular/platform-server","net"],r):r(((e=e||self).nguniversal=e.nguniversal||{},e.nguniversal.socketEngine={}),e.tslib,e.fs,e.ng.compiler,e.ng.core,e.ng.platformServer,e.net)}(this,function(e,r,t,n,o,i,a){"use strict";

* found in the LICENSE file at https://angular.io/license
*/var s=function(){function e(){}return e.prototype.get=function(e){return new Promise(function(r,n){t.readFile(e,function(e,t){if(e)return n(e);r(t.toString())})})},e}(),u=function(){function e(e,r){void 0===r&&(r=[]),this.moduleOrFactory=e,this.providers=r,this.factoryCacheMap=new Map,this.templateCache={}}return e.prototype.getCompiler=function(){return i.platformDynamicServer().injector.get(o.CompilerFactory).createCompiler([{providers:[{provide:n.ResourceLoader,useClass:s,deps:[]}]}])},e.prototype.render=function(e){return r.__awaiter(this,void 0,void 0,function(){var t,n,o;return r.__generator(this,function(a){switch(a.label){case 0:return(t=e.document)?[3,2]:[4,this.getDocument(e.documentFilePath)];case 1:t=a.sent(),a.label=2;case 2:return n=r.__spread(e.providers||[],this.providers||[],[{provide:i.INITIAL_CONFIG,useValue:{document:t,url:e.url}}]),[4,this.getFactory()];case 3:return o=a.sent(),[2,i.renderModuleFactory(o,{extraProviders:n})]}})})},e.prototype.getFactory=function(){var e=this,r=this.moduleOrFactory;if(r instanceof o.NgModuleFactory)return Promise.resolve(r);var t=this.factoryCacheMap.get(r);return t?Promise.resolve(t):this.getCompiler().compileModuleAsync(r).then(function(t){return e.factoryCacheMap.set(r,t),t})},e.prototype.getDocument=function(e){var r=this.templateCache[e]=this.templateCache[e]||t.readFileSync(e).toString();return Promise.resolve(r)},e}();
*/var s=function(){function e(){}return e.prototype.get=function(e){return new Promise(function(r,n){t.readFile(e,function(e,t){if(e)return n(e);r(t.toString())})})},e}(),u=function(){function e(e,r){void 0===r&&(r=[]),this.moduleOrFactory=e,this.providers=r,this.factoryCacheMap=new Map,this.templateCache={}}return e.prototype.getCompiler=function(){return i.platformDynamicServer().injector.get(o.CompilerFactory).createCompiler([{providers:[{provide:n.ResourceLoader,useClass:s,deps:[]}]}])},e.prototype.render=function(e){return r.__awaiter(this,void 0,void 0,function(){var t,n,o;return r.__generator(this,function(a){switch(a.label){case 0:return(t=e.document)?[3,2]:[4,this.getDocument(e.documentFilePath)];case 1:t=a.sent(),a.label=2;case 2:return n=r.__spread(e.providers||[],this.providers||[],[{provide:i.INITIAL_CONFIG,useValue:{document:t,url:e.url}}]),[4,this.getFactory(this.moduleOrFactory||e.bootstrap)];case 3:return o=a.sent(),[2,i.renderModuleFactory(o,{extraProviders:n})]}})})},e.prototype.getFactory=function(e){var r=this;if(e instanceof o.NgModuleFactory)return Promise.resolve(e);var t=this.factoryCacheMap.get(e);return t?Promise.resolve(t):this.getCompiler().compileModuleAsync(e).then(function(t){return r.factoryCacheMap.set(e,t),t})},e.prototype.getDocument=function(e){var r=this.templateCache[e]=this.templateCache[e]||t.readFileSync(e).toString();return Promise.resolve(r)},e}();
/**

@@ -11,0 +11,0 @@ * @license

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

/**
* @param {?} moduleOrFactory
* @param {?=} moduleOrFactory
* @param {?=} providers

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

/** @type {?} */
const factory = yield this.getFactory();
const moduleOrFactory = this.moduleOrFactory || opts.bootstrap;
/** @type {?} */
const factory = yield this.getFactory(moduleOrFactory);
return renderModuleFactory(factory, { extraProviders });

@@ -127,8 +129,7 @@ });

* Return the factory for a given engine instance
* @param {?} moduleOrFactory
* @return {?}
*/
getFactory() {
getFactory(moduleOrFactory) {
// If module has been compiled AoT
/** @type {?} */
const moduleOrFactory = this.moduleOrFactory;
if (moduleOrFactory instanceof NgModuleFactory) {

@@ -135,0 +136,0 @@ return Promise.resolve(moduleOrFactory);

@@ -58,3 +58,3 @@ import { __awaiter, __generator, __spread } from 'tslib';

return __awaiter(this, void 0, void 0, function () {
var doc, _a, extraProviders, factory;
var doc, _a, extraProviders, moduleOrFactory, factory;
return __generator(this, function (_b) {

@@ -80,3 +80,4 @@ switch (_b.label) {

]);
return [4 /*yield*/, this.getFactory()];
moduleOrFactory = this.moduleOrFactory || opts.bootstrap;
return [4 /*yield*/, this.getFactory(moduleOrFactory)];
case 3:

@@ -90,6 +91,5 @@ factory = _b.sent();

/** Return the factory for a given engine instance */
CommonEngine.prototype.getFactory = function () {
CommonEngine.prototype.getFactory = function (moduleOrFactory) {
var _this = this;
// If module has been compiled AoT
var moduleOrFactory = this.moduleOrFactory;
if (moduleOrFactory instanceof NgModuleFactory) {

@@ -96,0 +96,0 @@ return Promise.resolve(moduleOrFactory);

{
"name": "@nguniversal/socket-engine",
"version": "v9.0.0-next.0.with-local-changes",
"version": "v9.0.0-next.1",
"description": "Socket Engine for running Server Angular Apps",

@@ -12,3 +12,3 @@ "license": "MIT",

"peerDependencies": {
"@nguniversal/common": "v9.0.0-next.0.with-local-changes",
"@nguniversal/common": "v9.0.0-next.1",
"@angular/core": "^9.0.0-next.5"

@@ -15,0 +15,0 @@ },

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