Socket
Socket
Sign inDemoInstall

inferno-server

Package Overview
Dependencies
Maintainers
5
Versions
311
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inferno-server - npm Package Compare versions

Comparing version 7.4.10 to 8.0.0-alpha.0

42

dist/index.cjs.js

@@ -443,3 +443,3 @@ 'use strict';

RenderQueueStream.prototype.renderVNodeToQueue = function renderVNodeToQueue (vNode, context, position) {
var this$1 = this;
var this$1$1 = this;

@@ -488,14 +488,14 @@ var flags = vNode.flags;

if (isInvalid(renderOut)) {
this$1.addToQueue('<!--!-->', promisePosition);
this$1$1.addToQueue('<!--!-->', promisePosition);
}
else if (isString(renderOut)) {
this$1.addToQueue(escapeText(renderOut), promisePosition);
this$1$1.addToQueue(escapeText(renderOut), promisePosition);
}
else if (isNumber(renderOut)) {
this$1.addToQueue(renderOut + '', promisePosition);
this$1$1.addToQueue(renderOut + '', promisePosition);
}
else {
this$1.renderVNodeToQueue(renderOut, instance.context, promisePosition);
this$1$1.renderVNodeToQueue(renderOut, instance.context, promisePosition);
}
setTimeout(this$1.pushQueue, 0);
setTimeout(this$1$1.pushQueue, 0);
return promisePosition;

@@ -691,3 +691,3 @@ }), position);

RenderStream.prototype._read = function _read () {
var this$1 = this;
var this$1$1 = this;

@@ -700,9 +700,9 @@ if (this.started) {

.then(function () {
return this$1.renderNode(this$1.initNode, null);
return this$1$1.renderNode(this$1$1.initNode, null);
})
.then(function () {
this$1.push(null);
this$1$1.push(null);
})
.catch(function (err) {
this$1.emit('error', err);
this$1$1.emit('error', err);
});

@@ -724,3 +724,3 @@ };

RenderStream.prototype.renderArrayOrFragment = function renderArrayOrFragment (vNode, context) {
var this$1 = this;
var this$1$1 = this;

@@ -735,3 +735,3 @@ var childFlags = vNode.childFlags;

return p.then(function () {
return Promise.resolve(this$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
return Promise.resolve(this$1$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
});

@@ -742,3 +742,3 @@ }, Promise.resolve(false));

RenderStream.prototype.renderComponent = function renderComponent (vComponent, context, isClass) {
var this$1 = this;
var this$1$1 = this;

@@ -780,15 +780,15 @@ var type = vComponent.type;

if (isInvalid(renderOutput)) {
return this$1.push('<!--!-->');
return this$1$1.push('<!--!-->');
}
if (isString(renderOutput)) {
return this$1.push(escapeText(renderOutput));
return this$1$1.push(escapeText(renderOutput));
}
if (isNumber(renderOutput)) {
return this$1.push(renderOutput + '');
return this$1$1.push(renderOutput + '');
}
return this$1.renderNode(renderOutput, context);
return this$1$1.renderNode(renderOutput, context);
});
};
RenderStream.prototype.renderChildren = function renderChildren (children, context, childFlags) {
var this$1 = this;
var this$1$1 = this;

@@ -804,3 +804,3 @@ if (childFlags === 2 /* HasVNodeChildren */) {

return p.then(function () {
return Promise.resolve(this$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
return Promise.resolve(this$1$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
});

@@ -814,3 +814,3 @@ }, Promise.resolve(false));

RenderStream.prototype.renderElement = function renderElement (vNode, context) {
var this$1 = this;
var this$1$1 = this;

@@ -894,3 +894,3 @@ var type = vNode.type;

return Promise.resolve(this.renderChildren(vNode.children, context, childFlags)).then(function () {
this$1.push(("</" + type + ">"));
this$1$1.push(("</" + type + ">"));
});

@@ -897,0 +897,0 @@ };

@@ -439,3 +439,3 @@ import { EMPTY_OBJ } from 'inferno';

RenderQueueStream.prototype.renderVNodeToQueue = function renderVNodeToQueue (vNode, context, position) {
var this$1 = this;
var this$1$1 = this;

@@ -484,14 +484,14 @@ var flags = vNode.flags;

if (isInvalid(renderOut)) {
this$1.addToQueue('<!--!-->', promisePosition);
this$1$1.addToQueue('<!--!-->', promisePosition);
}
else if (isString(renderOut)) {
this$1.addToQueue(escapeText(renderOut), promisePosition);
this$1$1.addToQueue(escapeText(renderOut), promisePosition);
}
else if (isNumber(renderOut)) {
this$1.addToQueue(renderOut + '', promisePosition);
this$1$1.addToQueue(renderOut + '', promisePosition);
}
else {
this$1.renderVNodeToQueue(renderOut, instance.context, promisePosition);
this$1$1.renderVNodeToQueue(renderOut, instance.context, promisePosition);
}
setTimeout(this$1.pushQueue, 0);
setTimeout(this$1$1.pushQueue, 0);
return promisePosition;

@@ -687,3 +687,3 @@ }), position);

RenderStream.prototype._read = function _read () {
var this$1 = this;
var this$1$1 = this;

@@ -696,9 +696,9 @@ if (this.started) {

.then(function () {
return this$1.renderNode(this$1.initNode, null);
return this$1$1.renderNode(this$1$1.initNode, null);
})
.then(function () {
this$1.push(null);
this$1$1.push(null);
})
.catch(function (err) {
this$1.emit('error', err);
this$1$1.emit('error', err);
});

@@ -720,3 +720,3 @@ };

RenderStream.prototype.renderArrayOrFragment = function renderArrayOrFragment (vNode, context) {
var this$1 = this;
var this$1$1 = this;

@@ -731,3 +731,3 @@ var childFlags = vNode.childFlags;

return p.then(function () {
return Promise.resolve(this$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
return Promise.resolve(this$1$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
});

@@ -738,3 +738,3 @@ }, Promise.resolve(false));

RenderStream.prototype.renderComponent = function renderComponent (vComponent, context, isClass) {
var this$1 = this;
var this$1$1 = this;

@@ -776,15 +776,15 @@ var type = vComponent.type;

if (isInvalid(renderOutput)) {
return this$1.push('<!--!-->');
return this$1$1.push('<!--!-->');
}
if (isString(renderOutput)) {
return this$1.push(escapeText(renderOutput));
return this$1$1.push(escapeText(renderOutput));
}
if (isNumber(renderOutput)) {
return this$1.push(renderOutput + '');
return this$1$1.push(renderOutput + '');
}
return this$1.renderNode(renderOutput, context);
return this$1$1.renderNode(renderOutput, context);
});
};
RenderStream.prototype.renderChildren = function renderChildren (children, context, childFlags) {
var this$1 = this;
var this$1$1 = this;

@@ -800,3 +800,3 @@ if (childFlags === 2 /* HasVNodeChildren */) {

return p.then(function () {
return Promise.resolve(this$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
return Promise.resolve(this$1$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
});

@@ -810,3 +810,3 @@ }, Promise.resolve(false));

RenderStream.prototype.renderElement = function renderElement (vNode, context) {
var this$1 = this;
var this$1$1 = this;

@@ -890,3 +890,3 @@ var type = vNode.type;

return Promise.resolve(this.renderChildren(vNode.children, context, childFlags)).then(function () {
this$1.push(("</" + type + ">"));
this$1$1.push(("</" + type + ">"));
});

@@ -893,0 +893,0 @@ };

@@ -427,3 +427,3 @@ import { EMPTY_OBJ } from 'inferno';

RenderQueueStream.prototype.renderVNodeToQueue = function renderVNodeToQueue (vNode, context, position) {
var this$1 = this;
var this$1$1 = this;

@@ -472,14 +472,14 @@ var flags = vNode.flags;

if (isInvalid(renderOut)) {
this$1.addToQueue('<!--!-->', promisePosition);
this$1$1.addToQueue('<!--!-->', promisePosition);
}
else if (isString(renderOut)) {
this$1.addToQueue(escapeText(renderOut), promisePosition);
this$1$1.addToQueue(escapeText(renderOut), promisePosition);
}
else if (isNumber(renderOut)) {
this$1.addToQueue(renderOut + '', promisePosition);
this$1$1.addToQueue(renderOut + '', promisePosition);
}
else {
this$1.renderVNodeToQueue(renderOut, instance.context, promisePosition);
this$1$1.renderVNodeToQueue(renderOut, instance.context, promisePosition);
}
setTimeout(this$1.pushQueue, 0);
setTimeout(this$1$1.pushQueue, 0);
return promisePosition;

@@ -667,3 +667,3 @@ }), position);

RenderStream.prototype._read = function _read () {
var this$1 = this;
var this$1$1 = this;

@@ -676,9 +676,9 @@ if (this.started) {

.then(function () {
return this$1.renderNode(this$1.initNode, null);
return this$1$1.renderNode(this$1$1.initNode, null);
})
.then(function () {
this$1.push(null);
this$1$1.push(null);
})
.catch(function (err) {
this$1.emit('error', err);
this$1$1.emit('error', err);
});

@@ -700,3 +700,3 @@ };

RenderStream.prototype.renderArrayOrFragment = function renderArrayOrFragment (vNode, context) {
var this$1 = this;
var this$1$1 = this;

@@ -711,3 +711,3 @@ var childFlags = vNode.childFlags;

return p.then(function () {
return Promise.resolve(this$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
return Promise.resolve(this$1$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
});

@@ -718,3 +718,3 @@ }, Promise.resolve(false));

RenderStream.prototype.renderComponent = function renderComponent (vComponent, context, isClass) {
var this$1 = this;
var this$1$1 = this;

@@ -756,15 +756,15 @@ var type = vComponent.type;

if (isInvalid(renderOutput)) {
return this$1.push('<!--!-->');
return this$1$1.push('<!--!-->');
}
if (isString(renderOutput)) {
return this$1.push(escapeText(renderOutput));
return this$1$1.push(escapeText(renderOutput));
}
if (isNumber(renderOutput)) {
return this$1.push(renderOutput + '');
return this$1$1.push(renderOutput + '');
}
return this$1.renderNode(renderOutput, context);
return this$1$1.renderNode(renderOutput, context);
});
};
RenderStream.prototype.renderChildren = function renderChildren (children, context, childFlags) {
var this$1 = this;
var this$1$1 = this;

@@ -780,3 +780,3 @@ if (childFlags === 2 /* HasVNodeChildren */) {

return p.then(function () {
return Promise.resolve(this$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
return Promise.resolve(this$1$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
});

@@ -790,3 +790,3 @@ }, Promise.resolve(false));

RenderStream.prototype.renderElement = function renderElement (vNode, context) {
var this$1 = this;
var this$1$1 = this;

@@ -870,3 +870,3 @@ var type = vNode.type;

return Promise.resolve(this.renderChildren(vNode.children, context, childFlags)).then(function () {
this$1.push(("</" + type + ">"));
this$1$1.push(("</" + type + ">"));
});

@@ -873,0 +873,0 @@ };

import { EMPTY_OBJ } from 'inferno';
import { Readable } from 'stream';
var ERROR_MSG = 'a runtime error occured! Use Inferno in development environment to find the error.';
var isArray = Array.isArray;
const ERROR_MSG = 'a runtime error occured! Use Inferno in development environment to find the error.';
const isArray = Array.isArray;
function isStringOrNumber(o) {
var type = typeof o;
const type = typeof o;
return type === 'string' || type === 'number';

@@ -35,8 +35,8 @@ }

}
throw new Error(("Inferno Error: " + message));
throw new Error(`Inferno Error: ${message}`);
}
function combineFrom(first, second) {
var out = {};
const out = {};
if (first) {
for (var key in first) {
for (const key in first) {
out[key] = first[key];

@@ -46,4 +46,4 @@ }

if (second) {
for (var key$1 in second) {
out[key$1] = second[key$1];
for (const key in second) {
out[key] = second[key];
}

@@ -50,0 +50,0 @@ }

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

(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.Inferno = global.Inferno || {}, global.Inferno.Server = global.Inferno.Server || {}), global.Inferno, global.stream));
}(this, (function (exports, inferno, stream) { 'use strict';
})(this, (function (exports, inferno, stream) { 'use strict';

@@ -443,3 +443,3 @@ var ERROR_MSG = 'a runtime error occured! Use Inferno in development environment to find the error.';

RenderQueueStream.prototype.renderVNodeToQueue = function renderVNodeToQueue (vNode, context, position) {
var this$1 = this;
var this$1$1 = this;

@@ -488,14 +488,14 @@ var flags = vNode.flags;

if (isInvalid(renderOut)) {
this$1.addToQueue('<!--!-->', promisePosition);
this$1$1.addToQueue('<!--!-->', promisePosition);
}
else if (isString(renderOut)) {
this$1.addToQueue(escapeText(renderOut), promisePosition);
this$1$1.addToQueue(escapeText(renderOut), promisePosition);
}
else if (isNumber(renderOut)) {
this$1.addToQueue(renderOut + '', promisePosition);
this$1$1.addToQueue(renderOut + '', promisePosition);
}
else {
this$1.renderVNodeToQueue(renderOut, instance.context, promisePosition);
this$1$1.renderVNodeToQueue(renderOut, instance.context, promisePosition);
}
setTimeout(this$1.pushQueue, 0);
setTimeout(this$1$1.pushQueue, 0);
return promisePosition;

@@ -691,3 +691,3 @@ }), position);

RenderStream.prototype._read = function _read () {
var this$1 = this;
var this$1$1 = this;

@@ -700,9 +700,9 @@ if (this.started) {

.then(function () {
return this$1.renderNode(this$1.initNode, null);
return this$1$1.renderNode(this$1$1.initNode, null);
})
.then(function () {
this$1.push(null);
this$1$1.push(null);
})
.catch(function (err) {
this$1.emit('error', err);
this$1$1.emit('error', err);
});

@@ -724,3 +724,3 @@ };

RenderStream.prototype.renderArrayOrFragment = function renderArrayOrFragment (vNode, context) {
var this$1 = this;
var this$1$1 = this;

@@ -735,3 +735,3 @@ var childFlags = vNode.childFlags;

return p.then(function () {
return Promise.resolve(this$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
return Promise.resolve(this$1$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
});

@@ -742,3 +742,3 @@ }, Promise.resolve(false));

RenderStream.prototype.renderComponent = function renderComponent (vComponent, context, isClass) {
var this$1 = this;
var this$1$1 = this;

@@ -780,15 +780,15 @@ var type = vComponent.type;

if (isInvalid(renderOutput)) {
return this$1.push('<!--!-->');
return this$1$1.push('<!--!-->');
}
if (isString(renderOutput)) {
return this$1.push(escapeText(renderOutput));
return this$1$1.push(escapeText(renderOutput));
}
if (isNumber(renderOutput)) {
return this$1.push(renderOutput + '');
return this$1$1.push(renderOutput + '');
}
return this$1.renderNode(renderOutput, context);
return this$1$1.renderNode(renderOutput, context);
});
};
RenderStream.prototype.renderChildren = function renderChildren (children, context, childFlags) {
var this$1 = this;
var this$1$1 = this;

@@ -804,3 +804,3 @@ if (childFlags === 2 /* HasVNodeChildren */) {

return p.then(function () {
return Promise.resolve(this$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
return Promise.resolve(this$1$1.renderNode(child, context)).then(function () { return !!(child.flags & 16 /* Text */); });
});

@@ -814,3 +814,3 @@ }, Promise.resolve(false));

RenderStream.prototype.renderElement = function renderElement (vNode, context) {
var this$1 = this;
var this$1$1 = this;

@@ -894,3 +894,3 @@ var type = vNode.type;

return Promise.resolve(this.renderChildren(vNode.children, context, childFlags)).then(function () {
this$1.push(("</" + type + ">"));
this$1$1.push(("</" + type + ">"));
});

@@ -916,2 +916,2 @@ };

})));
}));
{
"name": "inferno-server",
"version": "7.4.10",
"version": "8.0.0-alpha.0",
"license": "MIT",

@@ -48,11 +48,11 @@ "description": "Provides methods to render HTML strings from Inferno elements",

"devDependencies": {
"inferno-create-class": "7.4.10",
"inferno-create-element": "7.4.10",
"inferno-hydrate": "7.4.10",
"inferno-shared": "7.4.10",
"inferno-vnode-flags": "7.4.10",
"inferno-create-class": "8.0.0-alpha.0",
"inferno-create-element": "8.0.0-alpha.0",
"inferno-hydrate": "8.0.0-alpha.0",
"inferno-shared": "8.0.0-alpha.0",
"inferno-vnode-flags": "8.0.0-alpha.0",
"mobx": "*"
},
"dependencies": {
"inferno": "7.4.10"
"inferno": "8.0.0-alpha.0"
},

@@ -69,3 +69,3 @@ "rollup": {

},
"gitHead": "50ee5642a8adb5f95432da69e51466eab9b11de0"
"gitHead": "7df70a812d233af097acffcc336ebe9a84dfd831"
}
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