react-streaming
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -43,4 +43,18 @@ "use strict"; | ||
function createDebugger(namespace, options = {}) { | ||
const DEBUG = process.env.DEBUG; | ||
const DEBUG_FILTER = process.env.REACT_STREAMING_DEBUG_FILTER || process.env.DEBUG_FILTER; | ||
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); | ||
@@ -47,0 +61,0 @@ const { onlyWhenFocused } = options; |
@@ -32,4 +32,18 @@ export function isServerSide() { | ||
export function createDebugger(namespace, options = {}) { | ||
const DEBUG = process.env.DEBUG; | ||
const DEBUG_FILTER = process.env.REACT_STREAMING_DEBUG_FILTER || process.env.DEBUG_FILTER; | ||
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); | ||
@@ -36,0 +50,0 @@ const { onlyWhenFocused } = options; |
{ | ||
"name": "react-streaming", | ||
"description": "React 18 Streaming. Full-fledged & Easy.", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"main": "./dist/cjs/index.js", | ||
@@ -6,0 +6,0 @@ "peerDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
70293
1482