@ctx-core/logger
Advanced tools
Comparing version 9.0.3 to 9.0.5
# @ctx-core/logger | ||
## 9.0.5 | ||
### Patch Changes | ||
- back to esm module with cjs using esm npm package to load library | ||
## 9.0.4 | ||
### Patch Changes | ||
- back to esm module with cjs using esm npm package to load library | ||
## 9.0.3 | ||
@@ -4,0 +16,0 @@ |
@@ -1,32 +0,21 @@ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.chalk_error = exports.chalk_warn = exports.chalk_info = exports.chalk_log = exports.chalk_debug = void 0; | ||
const chalk_1 = __importDefault(require("chalk")); | ||
import chalk from 'chalk'; | ||
const use_chalk = !!(typeof window === 'undefined' && typeof require === 'function'); | ||
function chalk_debug(...arg_a) { | ||
export function chalk_debug(...arg_a) { | ||
return (console.debug || console.info).apply(console, debug_chalk_a_(...arg_a)); | ||
} | ||
exports.chalk_debug = chalk_debug; | ||
function chalk_log(...arg_a) { | ||
export function chalk_log(...arg_a) { | ||
return console.log.apply(console, log_chalk_a_(...arg_a)); | ||
} | ||
exports.chalk_log = chalk_log; | ||
function chalk_info(...arg_a) { | ||
export function chalk_info(...arg_a) { | ||
return console.info.apply(console, info_chalk_a_(...arg_a)); | ||
} | ||
exports.chalk_info = chalk_info; | ||
function chalk_warn(...arg_a) { | ||
export function chalk_warn(...arg_a) { | ||
return console.warn.apply(console, warn_chalk_a_(...arg_a)); | ||
} | ||
exports.chalk_warn = chalk_warn; | ||
function chalk_error(...arg_a) { | ||
export function chalk_error(...arg_a) { | ||
return console.error.apply(console, error_chalk_a_(...arg_a)); | ||
} | ||
exports.chalk_error = chalk_error; | ||
function debug_chalk_a_(...arg_a) { | ||
return (use_chalk | ||
? [chalk_1.default.white(...arg_a)] | ||
? [chalk.white(...arg_a)] | ||
: arg_a); | ||
@@ -36,3 +25,3 @@ } | ||
return (use_chalk | ||
? [chalk_1.default.grey(...arg_a)] | ||
? [chalk.grey(...arg_a)] | ||
: arg_a); | ||
@@ -42,3 +31,3 @@ } | ||
return (use_chalk | ||
? [chalk_1.default.green(...arg_a)] | ||
? [chalk.green(...arg_a)] | ||
: arg_a); | ||
@@ -48,3 +37,3 @@ } | ||
return (use_chalk | ||
? [chalk_1.default.red(...arg_a)] | ||
? [chalk.red(...arg_a)] | ||
: arg_a); | ||
@@ -54,5 +43,5 @@ } | ||
return (use_chalk | ||
? [chalk_1.default.red.bold(...arg_a)] | ||
? [chalk.red.bold(...arg_a)] | ||
: arg_a); | ||
} | ||
//# sourceMappingURL=../src/dist/chalk.js.map |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._console = exports.console_ = void 0; | ||
function console_(fn, log_ctx) { | ||
export function console_(fn, log_ctx) { | ||
return (...arg_a) => { | ||
@@ -13,4 +10,3 @@ let key; | ||
} | ||
exports.console_ = console_; | ||
exports._console = console_; | ||
export { console_ as _console, }; | ||
//# sourceMappingURL=../src/dist/console_.js.map |
@@ -1,10 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.debug = void 0; | ||
const chalk_js_1 = require("./chalk.js"); | ||
const logger_timestamp__js_1 = require("./logger_timestamp_.js"); | ||
function debug(...arg_a) { | ||
return chalk_js_1.chalk_debug(logger_timestamp__js_1.logger_timestamp_(), ...arg_a); | ||
import { chalk_debug } from './chalk.js'; | ||
import { logger_timestamp_ } from './logger_timestamp_.js'; | ||
export function debug(...arg_a) { | ||
return chalk_debug(logger_timestamp_(), ...arg_a); | ||
} | ||
exports.debug = debug; | ||
//# sourceMappingURL=../src/dist/debug.js.map |
@@ -1,11 +0,7 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.error__log = exports.error = void 0; | ||
const chalk_js_1 = require("./chalk.js"); | ||
const logger_timestamp__js_1 = require("./logger_timestamp_.js"); | ||
function error(...arg_a) { | ||
return chalk_js_1.chalk_error(logger_timestamp__js_1.logger_timestamp_(), ...arg_a); | ||
import { chalk_error } from './chalk.js'; | ||
import { logger_timestamp_ } from './logger_timestamp_.js'; | ||
export function error(...arg_a) { | ||
return chalk_error(logger_timestamp_(), ...arg_a); | ||
} | ||
exports.error = error; | ||
exports.error__log = error; | ||
export { error as error__log }; | ||
//# sourceMappingURL=../src/dist/error.js.map |
@@ -1,22 +0,10 @@ | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./console_.js"), exports); | ||
__exportStar(require("./log_.js"), exports); | ||
__exportStar(require("./logger_timestamp_.js"), exports); | ||
__exportStar(require("./chalk.js"), exports); | ||
__exportStar(require("./debug.js"), exports); | ||
__exportStar(require("./error.js"), exports); | ||
__exportStar(require("./info.js"), exports); | ||
__exportStar(require("./log.js"), exports); | ||
__exportStar(require("./warn.js"), exports); | ||
export * from './console_.js'; | ||
export * from './log_.js'; | ||
export * from './logger_timestamp_.js'; | ||
export * from './chalk.js'; | ||
export * from './debug.js'; | ||
export * from './error.js'; | ||
export * from './info.js'; | ||
export * from './log.js'; | ||
export * from './warn.js'; | ||
//# sourceMappingURL=../src/dist/index.js.map |
@@ -1,10 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.info = void 0; | ||
const chalk_js_1 = require("./chalk.js"); | ||
const logger_timestamp__js_1 = require("./logger_timestamp_.js"); | ||
function info(...arg_a) { | ||
return chalk_js_1.chalk_info(logger_timestamp__js_1.logger_timestamp_(), ...arg_a); | ||
import { chalk_info } from './chalk.js'; | ||
import { logger_timestamp_ } from './logger_timestamp_.js'; | ||
export function info(...arg_a) { | ||
return chalk_info(logger_timestamp_(), ...arg_a); | ||
} | ||
exports.info = info; | ||
//# sourceMappingURL=../src/dist/info.js.map |
@@ -1,13 +0,9 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._log = exports.log_ = void 0; | ||
const log_js_1 = require("./log.js"); | ||
function log_(message, fn) { | ||
import { log } from './log.js'; | ||
export function log_(message, fn) { | ||
return (...arg_a) => { | ||
log_js_1.log(message); | ||
log(message); | ||
return fn(...arg_a); | ||
}; | ||
} | ||
exports.log_ = log_; | ||
exports._log = log_; | ||
export { log_ as _log, }; | ||
//# sourceMappingURL=../src/dist/log_.js.map |
@@ -1,10 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.log = void 0; | ||
const chalk_js_1 = require("./chalk.js"); | ||
const logger_timestamp__js_1 = require("./logger_timestamp_.js"); | ||
function log(...arg_a) { | ||
return chalk_js_1.chalk_log(logger_timestamp__js_1.logger_timestamp_(), ...arg_a); | ||
import { chalk_log } from './chalk.js'; | ||
import { logger_timestamp_ } from './logger_timestamp_.js'; | ||
export function log(...arg_a) { | ||
return chalk_log(logger_timestamp_(), ...arg_a); | ||
} | ||
exports.log = log; | ||
//# sourceMappingURL=../src/dist/log.js.map |
@@ -1,9 +0,5 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._logger_timestamp = exports.logger_timestamp_ = void 0; | ||
function logger_timestamp_() { | ||
export function logger_timestamp_() { | ||
return (new Date()).toISOString(); | ||
} | ||
exports.logger_timestamp_ = logger_timestamp_; | ||
exports._logger_timestamp = logger_timestamp_; | ||
export { logger_timestamp_ as _logger_timestamp, }; | ||
//# sourceMappingURL=../src/dist/logger_timestamp_.js.map |
@@ -1,10 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.warn = void 0; | ||
const chalk_js_1 = require("./chalk.js"); | ||
const logger_timestamp__js_1 = require("./logger_timestamp_.js"); | ||
function warn(...arg_a) { | ||
return chalk_js_1.chalk_warn(logger_timestamp__js_1.logger_timestamp_(), ...arg_a); | ||
import { chalk_warn } from './chalk.js'; | ||
import { logger_timestamp_ } from './logger_timestamp_.js'; | ||
export function warn(...arg_a) { | ||
return chalk_warn(logger_timestamp_(), ...arg_a); | ||
} | ||
exports.warn = warn; | ||
//# sourceMappingURL=../src/dist/warn.js.map |
{ | ||
"name": "@ctx-core/logger", | ||
"version": "9.0.3", | ||
"version": "9.0.5", | ||
"description": "ctx-core logger", | ||
@@ -19,2 +19,3 @@ "keywords": [ | ||
"author": "Brian Takita", | ||
"type": "module", | ||
"main": "./dist/index.js", | ||
@@ -24,7 +25,8 @@ "module": "./dist/index.js", | ||
"exports": { | ||
"require": "./dist/index.js", | ||
"import": "./dist/index.mjs" | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.js" | ||
}, | ||
"dependencies": { | ||
"chalk": "^4.1.1" | ||
"chalk": "^4.1.1", | ||
"esm": "^3.2.25" | ||
}, | ||
@@ -42,5 +44,5 @@ "devDependencies": { | ||
"compile": "./node_modules/.bin/tsc -b .", | ||
"copy-mjs": "cd dist && echo \"export * from './index.js'\" > index.mjs", | ||
"copy-mjs": "cd dist && echo \"require = require('esm')(module/*, options*/)\nmodule.exports = require('./main.js')\nexport * from './index.js'\" > index.cjs", | ||
"exec": "$@" | ||
} | ||
} |
@@ -10,3 +10,3 @@ { | ||
"noErrorTruncation": true, | ||
"module": "commonjs", | ||
"module": "ESNext", | ||
"moduleResolution": "node", | ||
@@ -13,0 +13,0 @@ "esModuleInterop": true, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
Yes
18032
2
46
284
+ Addedesm@^3.2.25
+ Addedesm@3.2.25(transitive)