Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vechain/sdk-logging

Package Overview
Dependencies
Maintainers
8
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vechain/sdk-logging - npm Package Compare versions

Comparing version 1.0.0-beta.32 to 1.0.0-rc.1

105

dist/index.js

@@ -1,92 +0,21 @@

"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
'use strict';
// src/index.ts
var src_exports = {};
__export(src_exports, {
VeChainSDKLogger: () => VeChainSDKLogger,
logging: () => logging_exports
});
module.exports = __toCommonJS(src_exports);
// src/logging.ts
var logging_exports = {};
__export(logging_exports, {
VeChainSDKLogger: () => VeChainSDKLogger
});
// src/logger/log-logger/log-logger.ts
var _logLogFunction = {
log: (data) => {
const messagesAsString = data.messages.map((message) => `- ${message}`).join("\n");
console.log(
`
****************** EVENT: ${data.title} ******************
` + messagesAsString + `
`
);
}
};
// src/logger/error-logger/error-logger.ts
var _logErrorFunction = {
log: (error) => {
console.error(
`
****************** ERROR ON: ${error.methodName} ******************
- Error message: '${error.errorMessage}'
var i=Object.defineProperty;var s=(o,r)=>{for(var e in r)i(o,e,{get:r[e],enumerable:!0});};var p={};s(p,{VeChainSDKLogger:()=>m});var n={log:o=>{let r=o.messages.map(e=>`- ${e}`).join(`
`);console.log(`
****************** EVENT: ${o.title} ******************
`+r+`
`);}};var t={log:o=>{console.error(`
****************** ERROR ON: %s ******************
- Error message: '%s'
- Error data:
`,
error.data,
`
%o
- Internal error:
`,
error.innerError,
`
`
);
}
};
%o
`,o.methodName,o.errorMessage,o.data,o.innerError);}};var g={log:o=>{let r=o.messages.map(e=>`- ${e}`).join(`
`);console.warn(`
****************** WARNING: ${o.title} ******************
`+r+`
`);}};var m=o=>o==="error"?t:o==="warning"?g:n;
// src/logger/warning-logger/warning-logger.ts
var _logWarningFunction = {
log: (data) => {
const messagesAsString = data.messages.map((message) => `- ${message}`).join("\n");
console.warn(
`
****************** WARNING: ${data.title} ******************
` + messagesAsString + `
`
);
}
};
// src/logger/vechainSDKLogger.ts
var VeChainSDKLogger = (loggerType) => {
if (loggerType === "error")
return _logErrorFunction;
if (loggerType === "warning")
return _logWarningFunction;
return _logLogFunction;
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
VeChainSDKLogger,
logging
});
exports.VeChainSDKLogger = m;
exports.logging = p;

4

package.json
{
"name": "@vechain/sdk-logging",
"version": "1.0.0-beta.32",
"version": "1.0.0-rc.1",
"description": "This module provides functionality to logging data for vechain-sdk",

@@ -37,4 +37,4 @@ "author": "VeChain Foundation",

"dependencies": {
"@vechain/sdk-errors": "1.0.0-beta.32"
"@vechain/sdk-errors": "1.0.0-rc.1"
}
}

@@ -10,9 +10,10 @@ import type { LogFunctionType } from '../types';

console.error(
`\n****************** ERROR ON: ${error.methodName} ******************\n` +
`- Error message: '${error.errorMessage}'` +
'\n- Error data:\n',
`\n****************** ERROR ON: %s ******************\n` +
`- Error message: '%s'` +
'\n- Error data:\n%o' +
`\n- Internal error:\n%o\n`,
error.methodName,
error.errorMessage,
error.data,
`\n- Internal error:\n`,
error.innerError,
`\n`
error.innerError
);

@@ -19,0 +20,0 @@ }

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