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

oasis-std

Package Overview
Dependencies
Maintainers
20
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oasis-std - npm Package Compare versions

Comparing version 0.1.0-rc.37 to 0.1.0-rc.38

42

lib/src/logging.js

@@ -16,28 +16,22 @@ "use strict";

let logLevel = 'silent'; // default
// Look at either the node or the browser env.
if (isNode) {
const spec = (_a = process.env.OASIS_SDK_LOG_LEVEL) !== null && _a !== void 0 ? _a : '';
for (const subspec of spec.split(',')) {
if (subspec === '') {
continue;
const spec = (_a = process.env.OASIS_SDK_LOG_LEVEL) !== null && _a !== void 0 ? _a : '';
for (const subspec of spec.split(',')) {
if (subspec === '') {
continue;
}
else if (subspec.indexOf('=') === -1) {
// Simple subspec -- just the level
logLevel = subspec;
}
else {
const [pattern, level] = subspec.split('=', 2);
try {
if (new RegExp(pattern).test(name))
logLevel = level;
}
else if (subspec.indexOf('=') === -1) {
// Simple subspec -- just the level
logLevel = subspec;
catch (_b) {
// A malformed regex, most likely. Ignore silently.
}
else {
const [pattern, level] = subspec.split('=', 2);
try {
if (new RegExp(pattern).test(name))
logLevel = level;
}
catch (_b) {
// A malformed regex, most likely. Ignore silently.
}
}
}
}
else {
logLevel = location.hostname === 'localhost' ? 'debug' : 'silent';
}
// If env requested some logging, but it's not a recognized level,

@@ -66,5 +60,7 @@ if (pino_1.default.levels.values[logLevel] === undefined) {

name,
timestamp: pino_1.default.stdTimeFunctions.isoTime,
serializers: { err: pino_1.default.stdSerializers.err },
level: logLevelFromEnv(name),
// ISO format instead of epoch for Node API
// Note that Browser API does not support time
timestamp: isNode ? pino_1.default.stdTimeFunctions.isoTime : undefined,
// Append "v":"1" to log messages so bunyan recognizes them as pretty-printable.

@@ -71,0 +67,0 @@ mixin() {

{
"name": "oasis-std",
"version": "0.1.0-rc.37",
"version": "0.1.0-rc.38",
"description": "Oasis platform standard library",

@@ -31,3 +31,3 @@ "license": "Apache-2.0",

},
"gitHead": "53ebecbf98ec71c1a648dfa1ab282ff85186412f"
"gitHead": "f7275f635d5238e8c9d21c1f3a623c774a1b2767"
}

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