Socket
Socket
Sign inDemoInstall

react-streaming

Package Overview
Dependencies
8
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.17 to 0.2.18

3

dist/cjs/renderToStream.js

@@ -38,4 +38,5 @@ "use strict";

const utils_1 = require("./utils");
const debug_1 = require("@brillout/debug");
const loadNodeStreamModule_1 = require("./renderToStream/loadNodeStreamModule");
const debug = (0, utils_1.createDebugger)('react-streaming:flow');
const debug = (0, debug_1.createDebugger)('react-streaming:flow');
assertReact();

@@ -42,0 +43,0 @@ const globalConfig = (globalThis.__react_streaming = globalThis

@@ -5,3 +5,4 @@ "use strict";

const utils_1 = require("../utils");
const debug = (0, utils_1.createDebugger)('react-streaming:buffer');
const debug_1 = require("@brillout/debug");
const debug = (0, debug_1.createDebugger)('react-streaming:buffer');
function createBuffer(bufferParams) {

@@ -8,0 +9,0 @@ const buffer = [];

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createPipeWrapper = void 0;
const utils_1 = require("../utils");
const debug_1 = require("@brillout/debug");
const createBuffer_1 = require("./createBuffer");
const loadNodeStreamModule_1 = require("./loadNodeStreamModule");
const debug = (0, utils_1.createDebugger)('react-streaming:createPipeWrapper');
const debug = (0, debug_1.createDebugger)('react-streaming:createPipeWrapper');
async function createPipeWrapper(pipeFromReact, { onReactBug }) {

@@ -9,0 +9,0 @@ const { Writable } = await (0, loadNodeStreamModule_1.loadNodeStreamModule)();

@@ -6,5 +6,1 @@ export declare function isServerSide(): boolean;

export declare function assertWarning(condition: unknown, msg: string): void;
import debug from 'debug';
export declare function createDebugger(namespace: `react-streaming:${string}`, options?: {
onlyWhenFocused?: true | string;
}): debug.Debugger['log'];
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDebugger = exports.assertWarning = exports.assertUsage = exports.assert = exports.isClientSide = exports.isServerSide = void 0;
exports.assertWarning = exports.assertUsage = exports.assert = exports.isClientSide = exports.isServerSide = void 0;
function isServerSide() {

@@ -41,33 +38,1 @@ return !isClientSide();

exports.assertWarning = assertWarning;
const debug_1 = __importDefault(require("debug"));
function createDebugger(namespace, options = {}) {
let DEBUG;
let DEBUG_FILTER;
// - `process` can be undefined in edge workers
// - We want bundlers to be able to statically replace `process.env.*`
try {
DEBUG = process.env.DEBUG;
}
catch (_a) { }
try {
DEBUG_FILTER = process.env.DEBUG_FILTER_REACT_STREAMING;
}
catch (_b) { }
try {
DEBUG_FILTER || (DEBUG_FILTER = process.env.DEBUG_FILTER);
}
catch (_c) { }
const log = (0, debug_1.default)(namespace);
const { onlyWhenFocused } = options;
const focus = typeof onlyWhenFocused === 'string' ? onlyWhenFocused : namespace;
return (msg, ...args) => {
if (DEBUG_FILTER && !msg.includes(DEBUG_FILTER)) {
return;
}
if (onlyWhenFocused && !(DEBUG === null || DEBUG === void 0 ? void 0 : DEBUG.includes(focus))) {
return;
}
log(msg, ...args);
};
}
exports.createDebugger = createDebugger;

@@ -10,3 +10,4 @@ export { renderToStream };

import { resolveSeoStrategy } from './renderToStream/resolveSeoStrategy';
import { assert, assertUsage, createDebugger } from './utils';
import { assert, assertUsage } from './utils';
import { createDebugger } from '@brillout/debug';
import { nodeStreamModuleIsAvailable } from './renderToStream/loadNodeStreamModule';

@@ -13,0 +14,0 @@ const debug = createDebugger('react-streaming:flow');

export { createBuffer };
import { assert, assertUsage, createDebugger } from '../utils';
import { assert, assertUsage } from '../utils';
import { createDebugger } from '@brillout/debug';
const debug = createDebugger('react-streaming:buffer');

@@ -4,0 +5,0 @@ function createBuffer(bufferParams) {

export { createPipeWrapper };
import { createDebugger } from '../utils';
import { createDebugger } from '@brillout/debug';
import { createBuffer } from './createBuffer';

@@ -4,0 +4,0 @@ import { loadNodeStreamModule } from './loadNodeStreamModule';

@@ -6,5 +6,1 @@ export declare function isServerSide(): boolean;

export declare function assertWarning(condition: unknown, msg: string): void;
import debug from 'debug';
export declare function createDebugger(namespace: `react-streaming:${string}`, options?: {
onlyWhenFocused?: true | string;
}): debug.Debugger['log'];

@@ -30,32 +30,1 @@ export function isServerSide() {

}
import debug from 'debug';
export function createDebugger(namespace, options = {}) {
let DEBUG;
let DEBUG_FILTER;
// - `process` can be undefined in edge workers
// - We want bundlers to be able to statically replace `process.env.*`
try {
DEBUG = process.env.DEBUG;
}
catch { }
try {
DEBUG_FILTER = process.env.DEBUG_FILTER_REACT_STREAMING;
}
catch { }
try {
DEBUG_FILTER || (DEBUG_FILTER = process.env.DEBUG_FILTER);
}
catch { }
const log = debug(namespace);
const { onlyWhenFocused } = options;
const focus = typeof onlyWhenFocused === 'string' ? onlyWhenFocused : namespace;
return (msg, ...args) => {
if (DEBUG_FILTER && !msg.includes(DEBUG_FILTER)) {
return;
}
if (onlyWhenFocused && !(DEBUG === null || DEBUG === void 0 ? void 0 : DEBUG.includes(focus))) {
return;
}
log(msg, ...args);
};
}
{
"name": "react-streaming",
"description": "React 18 Streaming. Full-fledged & Easy.",
"version": "0.2.17",
"version": "0.2.18",
"main": "./dist/cjs/index.js",

@@ -11,4 +11,4 @@ "peerDependencies": {

"dependencies": {
"@brillout/debug": "^0.1.1",
"@brillout/json-s": "^0.4.5",
"debug": "4.3.4",
"isbot-fast": "1.2.0"

@@ -38,7 +38,9 @@ },

"node": "./dist/cjs/index.js",
"browser": "./dist/esm/index.js"
"browser": "./dist/esm/index.js",
"deno": "./dist/esm/index.js"
},
"./server": {
"worker": "./dist/cjs/server.js",
"node": "./dist/cjs/server.js"
"node": "./dist/cjs/server.js",
"deno": "./dist/esm/server.js"
},

@@ -45,0 +47,0 @@ "./client": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc