New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

yog-bigpipe

Package Overview
Dependencies
Maintainers
4
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yog-bigpipe - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

6

lib/bigpipe.js

@@ -117,3 +117,3 @@ var Pagelet = require('./pagelet.js');

parent = this.map[parent.parentId];
if (parent.mode === mode.quickling && !!~this.quicklings.indexOf(parent.id)) {
if (this.isQuicklingWidget(parent) && !!~this.quicklings.indexOf(parent.id)) {
founded = true;

@@ -156,2 +156,6 @@ // 插入为需要输出的Pagelet

BigPipe.prototype.isQuicklingWidget = function (item) {
return (item.mode === mode.quickling || item.mode === mode.async || item.mode === mode.pipeline);
}
BigPipe.prototype.render = function () {

@@ -158,0 +162,0 @@ var pagelets = this.pagelets.concat();

2

package.json
{
"name": "yog-bigpipe",
"version": "0.2.1",
"version": "0.2.2",
"description": "An express.js middleware for fis widget pipline output.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -288,2 +288,3 @@ (function (root) {

var BigPipe = function () {
var insertQueue = [];

@@ -309,4 +310,11 @@ // The order of render pagelet.

var remaining = 0;
var item = {
cssLoaded: false,
finish: function () {
insertDom();
}
};
var loadCss = function () {
insertQueue.push(item);
// load css

@@ -317,3 +325,7 @@ if (data.css && data.css.length) {

Util.loadCss(data.css[i], BigPipe.ignoreDuplicate, function () {
--remaining || insertDom();
--remaining;
if (remaining === 0) {
item.cssLoaded = true;
finishInsertQueue();
}
});

@@ -323,6 +335,16 @@ }

else {
insertDom();
item.cssLoaded = true;
finishInsertQueue();
}
};
var finishInsertQueue = function () {
var item = insertQueue[0];
while (item && item.cssLoaded) {
insertQueue.shift();
item.finish();
item = insertQueue[0];
}
};
var insertDom = function () {

@@ -359,4 +381,4 @@ var i, len, dom, node, text, scriptText, temp;

var len = data.js && data.js.length;
var remaining = len,
i;
var remaining = len;
var i;

@@ -399,3 +421,2 @@ // exec data.scripts

/* registered pagelets */
currentPagelet = null,
currReqID = null,

@@ -415,4 +436,3 @@ cache = {},

this.trigger('pageletarrive', obj);
var pagelet = PageLet(obj, function () {
var pagelet = new PageLet(obj, function () {
// console.log('dom ready', obj.id);

@@ -426,6 +446,6 @@ var item;

// console.log('pagelet exec js', item.pageletData.id);
item.loadJs(function () {
item.loadJs((function (item) {
// console.log('pagelet exec done', item.pageletData.id);
BigPipe.trigger('pageletdone', pagelet, item.pageletData);
});
})(item));
}

@@ -432,0 +452,0 @@ }

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