@alwatr/logger 6.0.17 → 6.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/main.cjs +1 -2
- package/dist/main.cjs.map +1 -1
- package/dist/main.mjs +1 -2
- package/dist/main.mjs.map +1 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [6.0.18](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@6.0.17...@alwatr/logger@6.0.18) (2026-03-16)
|
|
7
|
+
|
|
8
|
+
### 🔨 Code Refactoring
|
|
9
|
+
|
|
10
|
+
* migrate build scripts from yarn to bun across multiple packages ([d90e962](https://github.com/Alwatr/nanolib/commit/d90e962f15e5c951e191d5f02341279b6472abc3))
|
|
11
|
+
|
|
12
|
+
### 🔗 Dependencies update
|
|
13
|
+
|
|
14
|
+
* bump the npm-dependencies group with 10 updates ([c48d9ba](https://github.com/Alwatr/nanolib/commit/c48d9baa1cd7c2dc144b3e01e0fda60bf87c074c))
|
|
15
|
+
|
|
6
16
|
## [6.0.17](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@6.0.16...@alwatr/logger@6.0.17) (2026-02-18)
|
|
7
17
|
|
|
8
18
|
### 🔗 Dependencies update
|
package/dist/main.cjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
/** 📦 @alwatr/logger v6.0.
|
|
2
|
-
__dev_mode__: console.debug("📦 @alwatr/logger v6.0.17");
|
|
1
|
+
/** 📦 @alwatr/logger v6.0.18 */
|
|
3
2
|
"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);var main_exports={};__export(main_exports,{createLogger:()=>createLogger});module.exports=__toCommonJS(main_exports);var import_global_this=require("@alwatr/global-this");var import_platform_info=require("@alwatr/platform-info");var console_=(0,import_global_this.getGlobalThis)().console;var defaultDebugMode=(()=>{if(import_platform_info.platformInfo.development){if(import_platform_info.platformInfo.isCli){return process.env.ALWATR_DEBUG!=="0"}else{return typeof localStorage!=="undefined"&&localStorage.getItem("ALWATR_DEBUG")!=="0"}}return import_platform_info.platformInfo.isCli?Boolean(process.env.DEBUG):typeof localStorage!=="undefined"&&localStorage.getItem("ALWATR_DEBUG")==="1"})();var colorList=(()=>import_platform_info.platformInfo.isCli?["0;36","0;35","0;34","0;33","0;32"]:["#35b997","#f05561","#ee224a","#91c13e","#22af4b","#f0e995","#0fe995","#0f89ca","#08b9a5","#fee851","#ee573d","#f9df30","#1da2dc","#f05123","#ee2524"])();var style_=(()=>({scope:import_platform_info.platformInfo.isCli?"\x1B[{{color}}m":"color: {{color}};",reset:import_platform_info.platformInfo.isCli?"\x1B[0m":"color: inherit;"}))();var keySection_=(()=>import_platform_info.platformInfo.isCli?"%s%s%s":"%c%s%c")();var colorIndex_=0;function getNextColor_(){const color=colorList[colorIndex_];colorIndex_=(colorIndex_+1)%colorList.length;return color}function sanitizeDomain_(domain){domain=domain.trim();if(!/^[[{<]/.test(domain)){domain=`{${domain}}`}return domain}function createLogger(domain,debugMode=defaultDebugMode){const color=getNextColor_();const styleScope=style_.scope.replace("{{color}}",color);const sanitizedDomain=sanitizeDomain_(domain);const requiredItems={debugMode,banner:import_platform_info.platformInfo.isCli?console_.log.bind(console_,`\x1B[1;37;45m {{{ %s }}} ${style_.reset}`):console_.log.bind(console_,"%c%s","font-size: 2rem; background-color: #5858e8; color: #fff; padding: 1rem 4rem; border-radius: 0.5rem;"),accident:import_platform_info.platformInfo.isCli?console_.warn.bind(console_,`${styleScope}⚠️
|
|
4
3
|
%s\x1B[33m.%s() Accident \`%s\`!${style_.reset}`,sanitizedDomain):console_.warn.bind(console_,"%c%s%c.%s() Accident `%s`!",styleScope,sanitizedDomain,style_.reset),error:import_platform_info.platformInfo.isCli?console_.error.bind(console_,`${styleScope}❌
|
|
5
4
|
%s\x1B[31m.%s() Error \`%s\`${style_.reset}
|
package/dist/main.cjs.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts", "../src/logger.ts"],
|
|
4
4
|
"sourcesContent": ["export * from './logger.js';\nexport * from './type.js';\n", "import {getGlobalThis} from '@alwatr/global-this';\nimport {platformInfo} from '@alwatr/platform-info';\n\nimport type {AlwatrLogger} from './type.js';\n\nconst console_ = getGlobalThis().console;\n\n/**\n * Default debug mode state, determined by environment variables or localStorage.\n */\nconst defaultDebugMode = (() => {\n if (platformInfo.development) {\n if (platformInfo.isCli) {\n return process.env.ALWATR_DEBUG !== '0';\n }\n else {\n return typeof localStorage !== 'undefined' && localStorage.getItem('ALWATR_DEBUG') !== '0';\n }\n }\n // else\n return platformInfo.isCli\n ? Boolean(process.env.DEBUG)\n : typeof localStorage !== 'undefined' && localStorage.getItem('ALWATR_DEBUG') === '1';\n})();\n\n/**\n * A list of aesthetically pleasing colors for console logging, adapted for CLI and browser environments.\n */\nconst colorList = (() =>\n platformInfo.isCli\n ? ['0;36', '0;35', '0;34', '0;33', '0;32'] // CLI-safe colors\n : [\n '#35b997',\n '#f05561',\n '#ee224a',\n '#91c13e',\n '#22af4b',\n '#f0e995',\n '#0fe995',\n '#0f89ca',\n '#08b9a5',\n '#fee851',\n '#ee573d',\n '#f9df30',\n '#1da2dc',\n '#f05123',\n '#ee2524',\n ])();\n\n/**\n * Platform-specific styling templates for logger output.\n */\nconst style_ = (() => ({\n scope: platformInfo.isCli ? '\\x1b[{{color}}m' : 'color: {{color}};',\n reset: platformInfo.isCli ? '\\x1b[0m' : 'color: inherit;',\n}))();\n\n/**\n * Platform-specific format for displaying the logger's scope.\n */\nconst keySection_ = (() => (platformInfo.isCli ? '%s%s%s' : '%c%s%c'))();\n\n// --- Utility Functions ---\n\nlet colorIndex_ = 0;\n/**\n * Cycles through the `colorList` to provide a new color for each logger instance.\n */\nfunction getNextColor_(): string {\n const color = colorList[colorIndex_];\n colorIndex_ = (colorIndex_ + 1) % colorList.length;\n return color;\n}\n\n/**\n * Sanitizes and formats the logger domain string by wrapping it in brackets if not already.\n */\nfunction sanitizeDomain_(domain: string): string {\n domain = domain.trim();\n if (!/^[[{<]/.test(domain)) {\n domain = `{${domain}}`;\n }\n return domain;\n}\n\n// --- Core Factory ---\n\n/**\n * Create a logger function for fancy console debug with custom scope.\n *\n * - `color` is optional and automatically selected from an internal list.\n * - `debug` is optional and automatically detected from `ALWATR_DEBUG` in localStorage or `process.env.DEBUG`.\n *\n * @example\n * ```ts\n * import {createLogger} from '@alwatr/logger';\n * const logger = createLogger('my-module');\n *\n * logger.logMethodArgs?.('myMethod', {a: 1}); // This line is ignored if debugMode is false.\n * ```\n */\nexport function createLogger(domain: string, debugMode = defaultDebugMode): AlwatrLogger {\n const color = getNextColor_();\n const styleScope = style_.scope.replace('{{color}}', color);\n const sanitizedDomain = sanitizeDomain_(domain);\n\n /**\n * Logger methods that are always available, regardless of debugMode.\n */\n const requiredItems: AlwatrLogger = {\n debugMode,\n\n banner: platformInfo.isCli\n ? console_.log.bind(console_, `\\x1b[1;37;45m {{{ %s }}} ${style_.reset}`)\n : console_.log.bind(\n console_,\n '%c%s',\n 'font-size: 2rem; background-color: #5858e8; color: #fff; padding: 1rem 4rem; border-radius: 0.5rem;',\n ),\n\n accident: platformInfo.isCli\n ? console_.warn.bind(console_, `${styleScope}⚠️\\n%s\\x1b[33m.%s() Accident \\`%s\\`!${style_.reset}`, sanitizedDomain)\n : console_.warn.bind(console_, '%c%s%c.%s() Accident `%s`!', styleScope, sanitizedDomain, style_.reset),\n\n error: platformInfo.isCli\n ? console_.error.bind(console_, `${styleScope}❌\\n%s\\x1b[31m.%s() Error \\`%s\\`${style_.reset}\\n`, sanitizedDomain)\n : console_.error.bind(console_, '%c%s%c.%s() Error `%s`\\n', styleScope, sanitizedDomain, style_.reset),\n };\n\n if (!debugMode) {\n return requiredItems;\n }\n\n /**\n * Logger methods available only when debugMode is true.\n * Using `console.debug` which is often filtered by default in browsers unless \"Verbose\" logs are enabled.\n */\n return {\n ...requiredItems,\n\n logProperty: console_.debug.bind(console_, keySection_ + '.%s = %o;', styleScope, sanitizedDomain, style_.reset),\n\n logMethod: console_.debug.bind(console_, keySection_ + '.%s();', styleScope, sanitizedDomain, style_.reset),\n\n logFileModule: console_.debug.bind(console_, keySection_ + '/%s.js;', styleScope, sanitizedDomain, style_.reset),\n\n logMethodArgs: console_.debug.bind(console_, keySection_ + '.%s(%o);', styleScope, sanitizedDomain, style_.reset),\n\n logMethodFull: console_.debug.bind(console_, keySection_ + '.%s(%o) => %o', styleScope, sanitizedDomain, style_.reset),\n\n logStep: console_.debug.bind(console_, keySection_ + '.%s() -> %s', styleScope, sanitizedDomain, style_.reset),\n\n logOther: console_.debug.bind(console_, keySection_, styleScope, sanitizedDomain, style_.reset),\n\n logTable: console_.table.bind(console_),\n\n incident: platformInfo.isCli\n ? console_.log.bind(console_, `${styleScope}🚸\\n%s${style_.reset}.%s() Incident \\`%s\\`!${style_.reset}`, sanitizedDomain)\n : console_.log.bind(console_, '%c%s%c.%s() Incident `%s`!', styleScope, sanitizedDomain, 'color: orange;'),\n\n time: (label: string) => console_.time(sanitizedDomain + '.' + label),\n timeEnd: (label: string) => console_.timeEnd(sanitizedDomain + '.' + label),\n } as const;\n}\n"],
|
|
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B,SAAS,KAAK,gBAAkB,IAAM,KAAK,EACpE,QAAU,OAAkB,SAAS,QAAQ,gBAAkB,IAAM,KAAK,CAC5E,CACF",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/main.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
/** 📦 @alwatr/logger v6.0.
|
|
2
|
-
__dev_mode__: console.debug("📦 @alwatr/logger v6.0.17");
|
|
1
|
+
/** 📦 @alwatr/logger v6.0.18 */
|
|
3
2
|
import{getGlobalThis}from"@alwatr/global-this";import{platformInfo}from"@alwatr/platform-info";var console_=getGlobalThis().console;var defaultDebugMode=(()=>{if(platformInfo.development){if(platformInfo.isCli){return process.env.ALWATR_DEBUG!=="0"}else{return typeof localStorage!=="undefined"&&localStorage.getItem("ALWATR_DEBUG")!=="0"}}return platformInfo.isCli?Boolean(process.env.DEBUG):typeof localStorage!=="undefined"&&localStorage.getItem("ALWATR_DEBUG")==="1"})();var colorList=(()=>platformInfo.isCli?["0;36","0;35","0;34","0;33","0;32"]:["#35b997","#f05561","#ee224a","#91c13e","#22af4b","#f0e995","#0fe995","#0f89ca","#08b9a5","#fee851","#ee573d","#f9df30","#1da2dc","#f05123","#ee2524"])();var style_=(()=>({scope:platformInfo.isCli?"\x1B[{{color}}m":"color: {{color}};",reset:platformInfo.isCli?"\x1B[0m":"color: inherit;"}))();var keySection_=(()=>platformInfo.isCli?"%s%s%s":"%c%s%c")();var colorIndex_=0;function getNextColor_(){const color=colorList[colorIndex_];colorIndex_=(colorIndex_+1)%colorList.length;return color}function sanitizeDomain_(domain){domain=domain.trim();if(!/^[[{<]/.test(domain)){domain=`{${domain}}`}return domain}function createLogger(domain,debugMode=defaultDebugMode){const color=getNextColor_();const styleScope=style_.scope.replace("{{color}}",color);const sanitizedDomain=sanitizeDomain_(domain);const requiredItems={debugMode,banner:platformInfo.isCli?console_.log.bind(console_,`\x1B[1;37;45m {{{ %s }}} ${style_.reset}`):console_.log.bind(console_,"%c%s","font-size: 2rem; background-color: #5858e8; color: #fff; padding: 1rem 4rem; border-radius: 0.5rem;"),accident:platformInfo.isCli?console_.warn.bind(console_,`${styleScope}⚠️
|
|
4
3
|
%s\x1B[33m.%s() Accident \`%s\`!${style_.reset}`,sanitizedDomain):console_.warn.bind(console_,"%c%s%c.%s() Accident `%s`!",styleScope,sanitizedDomain,style_.reset),error:platformInfo.isCli?console_.error.bind(console_,`${styleScope}❌
|
|
5
4
|
%s\x1B[31m.%s() Error \`%s\`${style_.reset}
|
package/dist/main.mjs.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/logger.ts"],
|
|
4
4
|
"sourcesContent": ["import {getGlobalThis} from '@alwatr/global-this';\nimport {platformInfo} from '@alwatr/platform-info';\n\nimport type {AlwatrLogger} from './type.js';\n\nconst console_ = getGlobalThis().console;\n\n/**\n * Default debug mode state, determined by environment variables or localStorage.\n */\nconst defaultDebugMode = (() => {\n if (platformInfo.development) {\n if (platformInfo.isCli) {\n return process.env.ALWATR_DEBUG !== '0';\n }\n else {\n return typeof localStorage !== 'undefined' && localStorage.getItem('ALWATR_DEBUG') !== '0';\n }\n }\n // else\n return platformInfo.isCli\n ? Boolean(process.env.DEBUG)\n : typeof localStorage !== 'undefined' && localStorage.getItem('ALWATR_DEBUG') === '1';\n})();\n\n/**\n * A list of aesthetically pleasing colors for console logging, adapted for CLI and browser environments.\n */\nconst colorList = (() =>\n platformInfo.isCli\n ? ['0;36', '0;35', '0;34', '0;33', '0;32'] // CLI-safe colors\n : [\n '#35b997',\n '#f05561',\n '#ee224a',\n '#91c13e',\n '#22af4b',\n '#f0e995',\n '#0fe995',\n '#0f89ca',\n '#08b9a5',\n '#fee851',\n '#ee573d',\n '#f9df30',\n '#1da2dc',\n '#f05123',\n '#ee2524',\n ])();\n\n/**\n * Platform-specific styling templates for logger output.\n */\nconst style_ = (() => ({\n scope: platformInfo.isCli ? '\\x1b[{{color}}m' : 'color: {{color}};',\n reset: platformInfo.isCli ? '\\x1b[0m' : 'color: inherit;',\n}))();\n\n/**\n * Platform-specific format for displaying the logger's scope.\n */\nconst keySection_ = (() => (platformInfo.isCli ? '%s%s%s' : '%c%s%c'))();\n\n// --- Utility Functions ---\n\nlet colorIndex_ = 0;\n/**\n * Cycles through the `colorList` to provide a new color for each logger instance.\n */\nfunction getNextColor_(): string {\n const color = colorList[colorIndex_];\n colorIndex_ = (colorIndex_ + 1) % colorList.length;\n return color;\n}\n\n/**\n * Sanitizes and formats the logger domain string by wrapping it in brackets if not already.\n */\nfunction sanitizeDomain_(domain: string): string {\n domain = domain.trim();\n if (!/^[[{<]/.test(domain)) {\n domain = `{${domain}}`;\n }\n return domain;\n}\n\n// --- Core Factory ---\n\n/**\n * Create a logger function for fancy console debug with custom scope.\n *\n * - `color` is optional and automatically selected from an internal list.\n * - `debug` is optional and automatically detected from `ALWATR_DEBUG` in localStorage or `process.env.DEBUG`.\n *\n * @example\n * ```ts\n * import {createLogger} from '@alwatr/logger';\n * const logger = createLogger('my-module');\n *\n * logger.logMethodArgs?.('myMethod', {a: 1}); // This line is ignored if debugMode is false.\n * ```\n */\nexport function createLogger(domain: string, debugMode = defaultDebugMode): AlwatrLogger {\n const color = getNextColor_();\n const styleScope = style_.scope.replace('{{color}}', color);\n const sanitizedDomain = sanitizeDomain_(domain);\n\n /**\n * Logger methods that are always available, regardless of debugMode.\n */\n const requiredItems: AlwatrLogger = {\n debugMode,\n\n banner: platformInfo.isCli\n ? console_.log.bind(console_, `\\x1b[1;37;45m {{{ %s }}} ${style_.reset}`)\n : console_.log.bind(\n console_,\n '%c%s',\n 'font-size: 2rem; background-color: #5858e8; color: #fff; padding: 1rem 4rem; border-radius: 0.5rem;',\n ),\n\n accident: platformInfo.isCli\n ? console_.warn.bind(console_, `${styleScope}⚠️\\n%s\\x1b[33m.%s() Accident \\`%s\\`!${style_.reset}`, sanitizedDomain)\n : console_.warn.bind(console_, '%c%s%c.%s() Accident `%s`!', styleScope, sanitizedDomain, style_.reset),\n\n error: platformInfo.isCli\n ? console_.error.bind(console_, `${styleScope}❌\\n%s\\x1b[31m.%s() Error \\`%s\\`${style_.reset}\\n`, sanitizedDomain)\n : console_.error.bind(console_, '%c%s%c.%s() Error `%s`\\n', styleScope, sanitizedDomain, style_.reset),\n };\n\n if (!debugMode) {\n return requiredItems;\n }\n\n /**\n * Logger methods available only when debugMode is true.\n * Using `console.debug` which is often filtered by default in browsers unless \"Verbose\" logs are enabled.\n */\n return {\n ...requiredItems,\n\n logProperty: console_.debug.bind(console_, keySection_ + '.%s = %o;', styleScope, sanitizedDomain, style_.reset),\n\n logMethod: console_.debug.bind(console_, keySection_ + '.%s();', styleScope, sanitizedDomain, style_.reset),\n\n logFileModule: console_.debug.bind(console_, keySection_ + '/%s.js;', styleScope, sanitizedDomain, style_.reset),\n\n logMethodArgs: console_.debug.bind(console_, keySection_ + '.%s(%o);', styleScope, sanitizedDomain, style_.reset),\n\n logMethodFull: console_.debug.bind(console_, keySection_ + '.%s(%o) => %o', styleScope, sanitizedDomain, style_.reset),\n\n logStep: console_.debug.bind(console_, keySection_ + '.%s() -> %s', styleScope, sanitizedDomain, style_.reset),\n\n logOther: console_.debug.bind(console_, keySection_, styleScope, sanitizedDomain, style_.reset),\n\n logTable: console_.table.bind(console_),\n\n incident: platformInfo.isCli\n ? console_.log.bind(console_, `${styleScope}🚸\\n%s${style_.reset}.%s() Incident \\`%s\\`!${style_.reset}`, sanitizedDomain)\n : console_.log.bind(console_, '%c%s%c.%s() Incident `%s`!', styleScope, sanitizedDomain, 'color: orange;'),\n\n time: (label: string) => console_.time(sanitizedDomain + '.' + label),\n timeEnd: (label: string) => console_.timeEnd(sanitizedDomain + '.' + label),\n } as const;\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA,OAAQ,kBAAoB,sBAC5B,OAAQ,iBAAmB,wBAI3B,IAAM,SAAW,cAAc,EAAE,QAKjC,IAAM,kBAAoB,I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GED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/logger",
|
|
3
3
|
"description": "Fancy colorful console debugger with custom scope written in tiny TypeScript, ES module.",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.18",
|
|
5
5
|
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
|
|
6
6
|
"bugs": "https://github.com/Alwatr/nanolib/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@alwatr/global-this": "5.6.
|
|
9
|
-
"@alwatr/platform-info": "5.5.
|
|
8
|
+
"@alwatr/global-this": "5.6.10",
|
|
9
|
+
"@alwatr/platform-info": "5.5.29"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@alwatr/nano-build": "6.4.
|
|
12
|
+
"@alwatr/nano-build": "6.4.2",
|
|
13
13
|
"@alwatr/prettier-config": "6.0.2",
|
|
14
14
|
"@alwatr/tsconfig-base": "6.0.4",
|
|
15
|
-
"@types/node": "^24.
|
|
15
|
+
"@types/node": "^24.12.0",
|
|
16
16
|
"typescript": "^5.9.3"
|
|
17
17
|
},
|
|
18
18
|
"exports": {
|
|
@@ -61,21 +61,21 @@
|
|
|
61
61
|
"directory": "packages/logger"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
|
-
"b": "
|
|
65
|
-
"build": "
|
|
64
|
+
"b": "bun run build",
|
|
65
|
+
"build": "bun run build:ts && bun run build:es",
|
|
66
66
|
"build:es": "nano-build --preset=module",
|
|
67
67
|
"build:ts": "tsc --build",
|
|
68
|
-
"c": "
|
|
69
|
-
"cb": "
|
|
68
|
+
"c": "bun run clean",
|
|
69
|
+
"cb": "bun run clean && bun run build",
|
|
70
70
|
"clean": "rm -rfv dist *.tsbuildinfo",
|
|
71
|
-
"d": "
|
|
72
|
-
"w": "
|
|
73
|
-
"watch": "
|
|
74
|
-
"watch:es": "
|
|
75
|
-
"watch:ts": "
|
|
71
|
+
"d": "bun run build:es && bun --enable-source-maps --trace-warnings",
|
|
72
|
+
"w": "bun run watch",
|
|
73
|
+
"watch": "bun run watch:ts & bun run watch:es",
|
|
74
|
+
"watch:es": "bun run build:es --watch",
|
|
75
|
+
"watch:ts": "bun run build:ts --watch --preserveWatchOutput"
|
|
76
76
|
},
|
|
77
77
|
"sideEffects": false,
|
|
78
78
|
"type": "module",
|
|
79
79
|
"types": "./dist/main.d.ts",
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "c3889e3756b0a0f9b935a1b702a1373ac52cb379"
|
|
81
81
|
}
|