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

koatty_logger

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koatty_logger - npm Package Compare versions

Comparing version 2.1.6 to 2.1.8

99

.rollup.config.js

@@ -6,59 +6,56 @@ /*

* @Date: 2021-12-17 10:20:44
* @LastEditTime: 2021-12-18 11:58:46
* @LastEditTime: 2024-11-04 22:04:45
*/
import commonjs from '@rollup/plugin-commonjs';
import json from "@rollup/plugin-json";
import resolve from '@rollup/plugin-node-resolve';
import { builtinModules } from 'module';
import del from "rollup-plugin-delete";
import typescript from 'rollup-plugin-typescript2';
// import babel from '@rollup/plugin-babel';
const pkg = require('./package.json');
export default [
{
input: './src/index.ts',
output: [{
format: 'cjs',
file: './dist/index.js',
banner: require('./scripts/copyright')
}],
plugins: [
// babel({
// babelHelpers: "runtime",
// configFile: './babel.config.js',
// exclude: 'node_modules/**',
// }),
json(),
typescript({
tsconfigOverride: {
compilerOptions: {
declaration: false,
declarationMap: false,
module: "ESNext"
}
}
})
]
},
{
input: './src/index.ts',
output: [{
format: 'es',
file: './dist/index.mjs',
banner: require('./scripts/copyright')
}],
plugins: [
// babel({
// babelHelpers: "runtime",
// configFile: './babel.config.js',
// exclude: 'node_modules/**',
// }),
json(),
typescript({
tsconfigOverride: {
compilerOptions: {
declaration: false,
declarationMap: false,
module: "ESNext"
}
}
})
]
}
{
input: './src/index.ts',
output: [
{
format: 'cjs',
file: './dist/index.js',
banner: require('./scripts/copyright'),
},
{
format: 'es',
file: './dist/index.mjs',
banner: require('./scripts/copyright'),
},
],
plugins: [
del({ targets: ["dist/*", "temp/*", "docs/api"] }),
// babel({
// babelHelpers: "runtime",
// configFile: './babel.config.js',
// exclude: 'node_modules/**',
// }),
json(),
resolve({
preferBuiltins: true, // 优先选择内置模块
}),
commonjs(),
typescript({
tsconfigOverride: {
compilerOptions: {
declaration: false,
declarationMap: false,
module: "ESNext"
}
}
})
],
external: [
...builtinModules, // 排除 Node.js 内置模块
...Object.keys(pkg.dependencies || {}), // 排除 package.json 中的外部依赖
],
},
]

@@ -5,2 +5,4 @@ # Changelog

### [2.1.8](https://github.com/thinkkoa/koatty_logger/compare/v2.1.6...v2.1.8) (2024-11-05)
### [2.1.6](https://github.com/thinkkoa/koatty_logger/compare/v2.1.4...v2.1.6) (2024-10-31)

@@ -7,0 +9,0 @@

/*!
* @Author: richen
* @Date: 2024-10-31 16:34:29
* @Date: 2024-11-05 14:17:47
* @License: BSD (3-Clause)

@@ -5,0 +5,0 @@ * @Copyright (c) - <richenlin(at)gmail.com>

/*!
* @Author: richen
* @Date: 2024-10-31 16:34:10
* @Date: 2024-11-05 14:17:28
* @License: BSD (3-Clause)

@@ -168,2 +168,14 @@ * @Copyright (c) - <richenlin(at)gmail.com>

class Logger {
// 日志级别
logLevel = "debug";
// 默认打开日志
enableLog = true;
// 日志对象
emptyObj = {};
logger;
transports = {};
// 文件日志
logFilePath = "";
// 脱敏字段
sensFields = new Set();
/**

@@ -175,14 +187,2 @@ * Creates an instance of Logger.

constructor(opt) {
var _a, _b, _c;
// 日志级别
this.logLevel = "debug";
// 默认打开日志
this.enableLog = true;
// 日志对象
this.emptyObj = {};
this.transports = {};
// 文件日志
this.logFilePath = "";
// 脱敏字段
this.sensFields = new Set();
const level = (process.env.LOGS_LEVEL || "").toLowerCase();

@@ -196,5 +196,5 @@ if (level && LogLevelObj[level]) {

if (!helper__namespace.isTrueEmpty(opt)) {
this.logLevel = (_a = opt.logLevel) !== null && _a !== void 0 ? _a : this.logLevel;
this.logFilePath = (_b = opt.logFilePath) !== null && _b !== void 0 ? _b : this.logFilePath;
this.sensFields = (_c = opt.sensFields) !== null && _c !== void 0 ? _c : this.sensFields;
this.logLevel = opt.logLevel ?? this.logLevel;
this.logFilePath = opt.logFilePath ?? this.logFilePath;
this.sensFields = opt.sensFields ?? this.sensFields;
}

@@ -201,0 +201,0 @@ this.logger = this.createLogger();

{
"name": "koatty_logger",
"version": "2.1.6",
"version": "2.1.8",
"description": "Logger for koatty.",

@@ -8,14 +8,16 @@ "scripts": {

"build:cp": "node scripts/postBuild && copyfiles package.json LICENSE README.md dist/",
"build:js": "del-cli --force dist && npx rollup --bundleConfigAsCjs -c .rollup.config.js",
"build:doc": "del-cli --force docs/api && npx api-documenter markdown --input temp --output docs/api",
"build:dts": "del-cli --force temp && npx tsc && npx api-extractor run --local --verbose",
"build:js": "npx rollup --bundleConfigAsCjs -c .rollup.config.js",
"build:doc": "npx api-documenter markdown --input temp --output docs/api",
"build:dts": "npx tsc && npx api-extractor run --local --verbose",
"eslint": "eslint --ext .ts,.js ./",
"lock": "del-cli --force package-lock.json && npm i --package-lock-only",
"prepublishOnly": "npm test && npm run build",
"lock": "npm i --package-lock-only",
"prepublishOnly": "npm test && npm run build && git push --follow-tags origin",
"prerelease": "npm test && npm run build",
"pub": "git push --follow-tags origin && npm publish",
"release": "standard-version",
"release:pre": "npm run release -- --prerelease",
"release:major": "npm run release -- --release-as major",
"release:minor": "npm run release -- --release-as minor",
"test": "npm run eslint && jest --passWithNoTests"
"test": "npm run eslint && jest --passWithNoTests",
"test:cov": "jest --collectCoverage --detectOpenHandles",
"version": "conventional-changelog -p angular -i CHANGELOG.md -s"
},

@@ -25,3 +27,4 @@ "main": "./dist/index.js",

"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},

@@ -66,6 +69,8 @@ "repository": {

"@microsoft/api-extractor": "^7.x.x",
"@rollup/plugin-commonjs": "^28.0.1",
"@rollup/plugin-commonjs": "^28.x.x",
"@rollup/plugin-json": "^6.x.x",
"@rollup/plugin-node-resolve": "^15.x.x",
"@types/jest": "^29.x.x",
"@types/koa": "^2.x.x",
"@types/lodash": "^4.x.x",
"@types/node": "^22.x.x",

@@ -76,4 +81,3 @@ "@typescript-eslint/eslint-plugin": "^8.x.x",

"copyfiles": "^2.x.x",
"del-cli": "^6.x.x",
"eslint": "^8.57.x",
"eslint": "^8.x.x",
"eslint-plugin-jest": "^28.x.x",

@@ -85,2 +89,3 @@ "husky": "^4.x.x",

"rollup": "^4.x.x",
"rollup-plugin-delete": "^2.1.0",
"rollup-plugin-typescript2": "^0.x.x",

@@ -97,3 +102,3 @@ "standard-version": "^9.x.x",

"tslib": "^2.x.x",
"winston": "^3.15.0",
"winston": "^3.16.0",
"winston-daily-rotate-file": "^4.7.1"

@@ -100,0 +105,0 @@ },

{
"name": "koatty_logger",
"version": "2.1.6",
"version": "2.1.8",
"description": "Logger for koatty.",

@@ -8,14 +8,16 @@ "scripts": {

"build:cp": "node scripts/postBuild && copyfiles package.json LICENSE README.md dist/",
"build:js": "del-cli --force dist && npx rollup --bundleConfigAsCjs -c .rollup.config.js",
"build:doc": "del-cli --force docs/api && npx api-documenter markdown --input temp --output docs/api",
"build:dts": "del-cli --force temp && npx tsc && npx api-extractor run --local --verbose",
"build:js": "npx rollup --bundleConfigAsCjs -c .rollup.config.js",
"build:doc": "npx api-documenter markdown --input temp --output docs/api",
"build:dts": "npx tsc && npx api-extractor run --local --verbose",
"eslint": "eslint --ext .ts,.js ./",
"lock": "del-cli --force package-lock.json && npm i --package-lock-only",
"prepublishOnly": "npm test && npm run build",
"lock": "npm i --package-lock-only",
"prepublishOnly": "npm test && npm run build && git push --follow-tags origin",
"prerelease": "npm test && npm run build",
"pub": "git push --follow-tags origin && npm publish",
"release": "standard-version",
"release:pre": "npm run release -- --prerelease",
"release:major": "npm run release -- --release-as major",
"release:minor": "npm run release -- --release-as minor",
"test": "npm run eslint && jest --passWithNoTests"
"test": "npm run eslint && jest --passWithNoTests",
"test:cov": "jest --collectCoverage --detectOpenHandles",
"version": "conventional-changelog -p angular -i CHANGELOG.md -s"
},

@@ -25,3 +27,4 @@ "main": "./dist/index.js",

"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},

@@ -66,6 +69,8 @@ "repository": {

"@microsoft/api-extractor": "^7.x.x",
"@rollup/plugin-commonjs": "^28.0.1",
"@rollup/plugin-commonjs": "^28.x.x",
"@rollup/plugin-json": "^6.x.x",
"@rollup/plugin-node-resolve": "^15.x.x",
"@types/jest": "^29.x.x",
"@types/koa": "^2.x.x",
"@types/lodash": "^4.x.x",
"@types/node": "^22.x.x",

@@ -76,4 +81,3 @@ "@typescript-eslint/eslint-plugin": "^8.x.x",

"copyfiles": "^2.x.x",
"del-cli": "^6.x.x",
"eslint": "^8.57.x",
"eslint": "^8.x.x",
"eslint-plugin-jest": "^28.x.x",

@@ -85,2 +89,3 @@ "husky": "^4.x.x",

"rollup": "^4.x.x",
"rollup-plugin-delete": "^2.1.0",
"rollup-plugin-typescript2": "^0.x.x",

@@ -97,3 +102,3 @@ "standard-version": "^9.x.x",

"tslib": "^2.x.x",
"winston": "^3.15.0",
"winston": "^3.16.0",
"winston-daily-rotate-file": "^4.7.1"

@@ -100,0 +105,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