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

@graphql-markdown/logger

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-markdown/logger - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

4

dist/index.d.ts

@@ -30,3 +30,3 @@ /**

* ```js
* import { Logger, log } from "@graphql-markdown/utils/logger";
* import Logger, { log } from "@graphql-markdown/utils/logger";
*

@@ -40,3 +40,3 @@ * log("Info message"); // Expected console output "Info message"

*/
export declare const Logger: (moduleName?: string) => void;
export declare const Logger: (moduleName?: string) => Promise<void>;
/**

@@ -43,0 +43,0 @@ * Logs a message by calling the active logger instance.

@@ -7,2 +7,25 @@ "use strict";

*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -31,3 +54,3 @@ exports.log = exports.Logger = exports.LogLevel = void 0;

* ```js
* import { Logger, log } from "@graphql-markdown/utils/logger";
* import Logger, { log } from "@graphql-markdown/utils/logger";
*

@@ -41,3 +64,3 @@ * log("Info message"); // Expected console output "Info message"

*/
const Logger = (moduleName) => {
const Logger = async (moduleName) => {
if (global.logger?.instance && typeof moduleName === "undefined") {

@@ -47,3 +70,3 @@ return;

const instance = typeof moduleName === "string" && moduleName !== ""
? require(moduleName)
? (await Promise.resolve(`${moduleName}`).then(s => __importStar(require(s)))).default
: global.console;

@@ -76,3 +99,5 @@ const _log = (message, level = LogLevel.info) => {

const log = (message, level = LogLevel.info) => {
(0, exports.Logger)();
new Promise((resolve) => {
resolve((0, exports.Logger)());
}).catch(() => { });
global.logger?._log(message, level);

@@ -79,0 +104,0 @@ };

@@ -8,3 +8,3 @@ {

},
"version": "1.0.4",
"version": "1.0.5",
"license": "MIT",

@@ -11,0 +11,0 @@ "repository": {

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