@alwatr/logger
Advanced tools
Comparing version 0.27.0 to 0.28.0
@@ -6,2 +6,12 @@ # Change Log | ||
# [0.28.0](https://github.com/AliMD/alwatr/compare/v0.27.0...v0.28.0) (2023-01-20) | ||
### Bug Fixes | ||
- **logger:** _ALWATR_VERSION_ ([9cf8f20](https://github.com/AliMD/alwatr/commit/9cf8f208e8adbfa2e2c622a8465453d5554cbd37)) | ||
### Features | ||
- **type:** define alwatrRegistredList ([25406c2](https://github.com/AliMD/alwatr/commit/25406c268f39cf3e055ea05c9fc7b50bd3dd0a17)) | ||
# [0.27.0](https://github.com/AliMD/alwatr/compare/v0.26.0...v0.27.0) (2022-12-29) | ||
@@ -8,0 +18,0 @@ |
@@ -0,10 +1,4 @@ | ||
import { globalAlwatr } from './global-alwatr.js'; | ||
import type { AlwatrLogger } from './type.js'; | ||
export { AlwatrLogger }; | ||
/** | ||
* Define `globalThis.Alwatr.registeredList` | ||
*/ | ||
export declare const alwatrRegisteredList: { | ||
name: string; | ||
version: string; | ||
}[]; | ||
export { type AlwatrLogger, globalAlwatr }; | ||
export declare const style: { | ||
@@ -11,0 +5,0 @@ scope: string; |
@@ -1,11 +0,8 @@ | ||
var _a, _b, _c, _d, _e, _f; | ||
var _a, _b, _c, _d; | ||
import { globalAlwatr } from './global-alwatr.js'; | ||
export { globalAlwatr }; | ||
const isBrowser = typeof process === 'undefined'; | ||
/** | ||
* Define `globalThis.Alwatr.registeredList` | ||
*/ | ||
export const alwatrRegisteredList = ((_a = globalThis.Alwatr) === null || _a === void 0 ? void 0 : _a.registeredList) || []; | ||
(_b = globalThis.Alwatr) !== null && _b !== void 0 ? _b : (globalThis.Alwatr = { version: '0.26.0', registeredList: alwatrRegisteredList }); | ||
alwatrRegisteredList.push({ | ||
globalAlwatr.registeredList.push({ | ||
name: '@alwatr/logger', | ||
version: '{{ALWATR_VERSION}}', // TODO: replace with real version at release time. | ||
version: _ALWATR_VERSION_, | ||
}); | ||
@@ -44,4 +41,4 @@ /** | ||
const debugString = isBrowser | ||
? (_d = (_c = globalThis.localStorage) === null || _c === void 0 ? void 0 : _c.getItem('ALWATR_DEBUG')) === null || _d === void 0 ? void 0 : _d.trim() | ||
: (_f = (_e = process === null || process === void 0 ? void 0 : process.env) === null || _e === void 0 ? void 0 : _e.ALWATR_DEBUG) === null || _f === void 0 ? void 0 : _f.trim(); | ||
? (_b = (_a = globalThis.localStorage) === null || _a === void 0 ? void 0 : _a.getItem('ALWATR_DEBUG')) === null || _b === void 0 ? void 0 : _b.trim() | ||
: (_d = (_c = process === null || process === void 0 ? void 0 : process.env) === null || _c === void 0 ? void 0 : _c.ALWATR_DEBUG) === null || _d === void 0 ? void 0 : _d.trim(); | ||
const getDebugState = (scope) => { | ||
@@ -48,0 +45,0 @@ if (debugString == null && isBrowser === false && process.env.NODE_ENV !== 'production') { |
{ | ||
"name": "@alwatr/logger", | ||
"version": "0.27.0", | ||
"version": "0.28.0", | ||
"description": "Fancy colorful console debugger with custom scope written in tiny TypeScript, ES module.", | ||
@@ -35,5 +35,6 @@ "keywords": [ | ||
"dependencies": { | ||
"tslib": "~2.4.1" | ||
"@alwatr/type": "^0.28.0", | ||
"tslib": "^2.4.1" | ||
}, | ||
"gitHead": "f6612d969fe49af71ab27e75fa54601071953141" | ||
"gitHead": "f4f63e7db916fda3ceac8b1d448068fc46da6334" | ||
} |
@@ -1,18 +0,1 @@ | ||
export interface GlobalAlwatr { | ||
version: string; | ||
registeredList: Array<{ | ||
name: string; | ||
version: string; | ||
}>; | ||
} | ||
declare global { | ||
var Alwatr: GlobalAlwatr; | ||
var ALWATR_DEBUG: string | undefined; | ||
/** | ||
* @TODO: Make an issue to TS, WTF is this way! any better solution for more args in bind?! | ||
*/ | ||
interface CallableFunction { | ||
bind<T, A0, A1, A2, A3, A4, A extends unknown[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, arg4: A4, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, arg4: A4): (...args: A) => R; | ||
} | ||
} | ||
export interface AlwatrLogger { | ||
@@ -19,0 +2,0 @@ /** |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
16
38091
2
277
2
+ Added@alwatr/type@^0.28.0
+ Added@alwatr/type@0.28.0(transitive)
+ Addedtslib@2.8.1(transitive)
- Removedtslib@2.4.1(transitive)
Updatedtslib@^2.4.1