@meshflow/logger 0.1.1 → 0.1.3
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/index.d.mts +3 -0
- package/index.d.ts +3 -0
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +2 -2
package/index.d.mts
CHANGED
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var p=(
|
|
1
|
+
"use strict";var a=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var p=(o,t)=>{for(var n in t)a(o,n,{get:t[n],enumerable:!0})},u=(o,t,n,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of d(t))!g.call(o,r)&&r!==n&&a(o,r,{get:()=>t[r],enumerable:!(e=l(t,r))||e.enumerable});return o};var f=o=>u(a({},"__esModule",{value:!0}),o);var x={};p(x,{useLogger:()=>h});module.exports=f(x);var i={1:o=>` \u4E0A\u6E38${o.path} \u503C\u53D8\u4E86`,2:o=>`\u4E0A\u6E38 ${o.path} \u5B8C\u6210(\u7A7F\u900F)`,3:o=>`\u6C34\u4F4D\u63A8\u8FDB\u81F3 L${o.level}\uFF0C\u91CA\u653E\u6682\u5B58\u8282\u70B9`,4:o=>`\u8D2A\u5A6A\u63A8\u8FDB${o.path}`},b={1:()=>"\u4EE4\u724C\u8FC7\u671F\uFF0C\u4E22\u5F03\u65E7\u4EFB\u52A1\u8BA1\u7B97\u7ED3\u679C",2:()=>"\u5DF2\u8BA1\u7B97\u5B8C\u6210",3:()=>"\u8282\u70B9\u6B63\u5728\u88AB\u8BA1\u7B97,\u5FFD\u7565\u672C\u6B21\u91CD\u590D\u4FE1\u53F7",3.1:()=>"\u8282\u70B9\u6B63\u5728\u961F\u5217\u4E2D,\u5FFD\u7565\u672C\u6B21\u91CD\u590D\u4FE1\u53F7",4:o=>`\u5C42\u7EA7\u8FC7\u9AD8(L${o.targetLevel}>L${o.currentLevel})\uFF0C\u9000\u56DE\u6682\u5B58\u533A\u7B49\u5F85\u4E0A\u6E38(\u4F59${o.pendingParentsCount})`,5:o=>`\u4E0A\u6E38\u5DF2\u6E05,\u6682\u65F6\u6263\u62BC\uFF0C\u7B49\u5F85\u6C34\u4F4D (L${o.currentLevel} \u2794 L${o.targetLevel})`,6:()=>"\u4E0A\u6E38\u9759\u9ED8\uFF0C\u94FE\u8DEF\u6536\u655B",7:()=>"\u80CC\u538B\u62E6\u622A"},y={1:o=>`\u8C03\u5EA6\u6302\u8D77\uFF1A\u5C1A\u6709 ${o.nums} \u4E2A\u5F02\u6B65\u4EFB\u52A1\u5728\u9014...`,2:()=>"\u5E76\u53D1\u8FBE\u5230\u4E0A\u9650\uFF0C\u6682\u505C\u53D1\u8F66"},E={1:o=>`\u5F52\u822A\uFF0C\u6D3B\u8DC3\u533A: ${o.active}\u4E2A\u4EFB\u52A1, \u7F13\u51B2\u533A: ${o.pending}\u4E2A\u4EFB\u52A1,\u6302\u8D77\u533A:${o.blocked}\u4E2A\u4EFB\u52A1.`},$={1:()=>"\u4E0A\u6E38\u9759\u9ED8\uFF0C\u5019\u8865\u6302\u8D77"},L={1:()=>"\u6700\u7EC8\u5F52\u822A\uFF01\u6240\u6709\u4EFB\u52A1\u5DF2\u6E05\u7A7A\uFF0C\u91CD\u542F\u8C03\u5EA6\u68C0\u67E5\u6536\u5C3E\u3002"},h=()=>({apply:t=>{let n=(e,r)=>t.on(e,r);n("node:start",({path:e})=>{console.log(`%c\u{1F680} [Start] %c${e}`,"color: #58b9ff; font-weight: bold","color: #e0e0e0")}),n("node:success",({path:e})=>{console.log(`%c\u2705 [Success] %c${e}`,"color: #67C23A; font-weight: bold","color: #e0e0e0")}),n("node:bucket:success",({path:e,key:r,value:c})=>{console.log(` %c\u2514\u2500 %c[${e}] %c${r} %c\u2794`,"color: #717171","color: #58b9ff","color: #e0e0e0; font-weight: bold","color: #909399",c)}),n("node:processing",({path:e})=>{console.log(`%c\u{1F6F0}\uFE0F [Processing] %c${e}`,"color: #00bcd4","color: #909399")}),n("node:error",({path:e,error:r})=>{console.log(`%c\u274C [Error] %c${e}`,"background: #F56C6C; color: #fff; padding: 2px 4px","color: #F56C6C",r)}),n("node:release",({path:e,type:r,detail:c})=>{let s=i[r](c);console.log(`%c\u{1F30A} [Release] %c${s} %c\u2794 %c${e}`,"color: #F56C6C; font-weight: bold","color: #909399","color: #717171","color: #58b9ff; font-weight: bold")}),n("node:intercept",({path:e,type:r,detail:c})=>{let s=b[r](c);console.log(`%c\u{1F6D1} [Intercept] %c${e} | ${s}`,"background: #FFF7E8; color: #E6A23C; padding: 2px 4px","color: #E6A23C")}),n("node:stagnate",({path:e,type:r})=>{let c=$[r]();console.log(`%c\u{1F9CA} [Stagnate] %c${c} %c\u2794 %c${e}`,"color: #909399; font-weight: bold","color: #909399","color: #717171","color: #e0e0e0")}),n("flow:wait",({type:e,detail:r})=>{let c=y[e](r);console.log(`%c \u{1F4A4} [Wait] %c ${c} `,"background: #444; font-weight: bold; border-radius: 4px 0 0 4px; border: 1px solid #555; border-right: none;","background: #222; border-radius: 0 4px 4px 0; border: 1px solid #555; ")}),n("flow:fire",({path:e,type:r,detail:c})=>{let s=E[r](c);console.log(`%c\u{1F525} [Fire] %c ${e} ${s} `,"background: #ff9800; color: #000; font-weight: bold; border-radius: 2px 0 0 2px;","background: #444; color: #ff9800; border-radius: 0 2px 2px 0;")}),n("flow:end",({type:e})=>{let r=L[e]();console.log(`%c ${r} `,"background: #ff9800; color: #000; font-weight: bold; border-radius: 2px 0 0 2px;")}),n("flow:success",({duration:e})=>{console.log(`%c\u{1F389} [Flow Success] ${e} \u26A1 `,"color: #fff; background: #2e7d32; padding: 2px 4px; border-radius: 4px 0 0 4px;")})}});0&&(module.exports={useLogger});
|
package/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var a={1:e=>` \u4E0A\u6E38${e.path} \u503C\u53D8\u4E86`,2:e=>`\u4E0A\u6E38 ${e.path} \u5B8C\u6210(\u7A7F\u900F)`,3:e=>`\u6C34\u4F4D\u63A8\u8FDB\u81F3 L${e.level}\uFF0C\u91CA\u653E\u6682\u5B58\u8282\u70B9`},l={1:()=>"\u4EE4\u724C\u8FC7\u671F\uFF0C\u4E22\u5F03\u65E7\u4EFB\u52A1\u8BA1\u7B97\u7ED3\u679C",2:()=>"\u5DF2\u8BA1\u7B97\u5B8C\u6210",3:()=>"\u8282\u70B9\u6B63\u5728\
|
|
1
|
+
var a={1:e=>` \u4E0A\u6E38${e.path} \u503C\u53D8\u4E86`,2:e=>`\u4E0A\u6E38 ${e.path} \u5B8C\u6210(\u7A7F\u900F)`,3:e=>`\u6C34\u4F4D\u63A8\u8FDB\u81F3 L${e.level}\uFF0C\u91CA\u653E\u6682\u5B58\u8282\u70B9`,4:e=>`\u8D2A\u5A6A\u63A8\u8FDB${e.path}`},l={1:()=>"\u4EE4\u724C\u8FC7\u671F\uFF0C\u4E22\u5F03\u65E7\u4EFB\u52A1\u8BA1\u7B97\u7ED3\u679C",2:()=>"\u5DF2\u8BA1\u7B97\u5B8C\u6210",3:()=>"\u8282\u70B9\u6B63\u5728\u88AB\u8BA1\u7B97,\u5FFD\u7565\u672C\u6B21\u91CD\u590D\u4FE1\u53F7",3.1:()=>"\u8282\u70B9\u6B63\u5728\u961F\u5217\u4E2D,\u5FFD\u7565\u672C\u6B21\u91CD\u590D\u4FE1\u53F7",4:e=>`\u5C42\u7EA7\u8FC7\u9AD8(L${e.targetLevel}>L${e.currentLevel})\uFF0C\u9000\u56DE\u6682\u5B58\u533A\u7B49\u5F85\u4E0A\u6E38(\u4F59${e.pendingParentsCount})`,5:e=>`\u4E0A\u6E38\u5DF2\u6E05,\u6682\u65F6\u6263\u62BC\uFF0C\u7B49\u5F85\u6C34\u4F4D (L${e.currentLevel} \u2794 L${e.targetLevel})`,6:()=>"\u4E0A\u6E38\u9759\u9ED8\uFF0C\u94FE\u8DEF\u6536\u655B",7:()=>"\u80CC\u538B\u62E6\u622A"},d={1:e=>`\u8C03\u5EA6\u6302\u8D77\uFF1A\u5C1A\u6709 ${e.nums} \u4E2A\u5F02\u6B65\u4EFB\u52A1\u5728\u9014...`,2:()=>"\u5E76\u53D1\u8FBE\u5230\u4E0A\u9650\uFF0C\u6682\u505C\u53D1\u8F66"},g={1:e=>`\u5F52\u822A\uFF0C\u6D3B\u8DC3\u533A: ${e.active}\u4E2A\u4EFB\u52A1, \u7F13\u51B2\u533A: ${e.pending}\u4E2A\u4EFB\u52A1,\u6302\u8D77\u533A:${e.blocked}\u4E2A\u4EFB\u52A1.`},p={1:()=>"\u4E0A\u6E38\u9759\u9ED8\uFF0C\u5019\u8865\u6302\u8D77"},u={1:()=>"\u6700\u7EC8\u5F52\u822A\uFF01\u6240\u6709\u4EFB\u52A1\u5DF2\u6E05\u7A7A\uFF0C\u91CD\u542F\u8C03\u5EA6\u68C0\u67E5\u6536\u5C3E\u3002"},f=()=>({apply:s=>{let n=(o,r)=>s.on(o,r);n("node:start",({path:o})=>{console.log(`%c\u{1F680} [Start] %c${o}`,"color: #58b9ff; font-weight: bold","color: #e0e0e0")}),n("node:success",({path:o})=>{console.log(`%c\u2705 [Success] %c${o}`,"color: #67C23A; font-weight: bold","color: #e0e0e0")}),n("node:bucket:success",({path:o,key:r,value:t})=>{console.log(` %c\u2514\u2500 %c[${o}] %c${r} %c\u2794`,"color: #717171","color: #58b9ff","color: #e0e0e0; font-weight: bold","color: #909399",t)}),n("node:processing",({path:o})=>{console.log(`%c\u{1F6F0}\uFE0F [Processing] %c${o}`,"color: #00bcd4","color: #909399")}),n("node:error",({path:o,error:r})=>{console.log(`%c\u274C [Error] %c${o}`,"background: #F56C6C; color: #fff; padding: 2px 4px","color: #F56C6C",r)}),n("node:release",({path:o,type:r,detail:t})=>{let c=a[r](t);console.log(`%c\u{1F30A} [Release] %c${c} %c\u2794 %c${o}`,"color: #F56C6C; font-weight: bold","color: #909399","color: #717171","color: #58b9ff; font-weight: bold")}),n("node:intercept",({path:o,type:r,detail:t})=>{let c=l[r](t);console.log(`%c\u{1F6D1} [Intercept] %c${o} | ${c}`,"background: #FFF7E8; color: #E6A23C; padding: 2px 4px","color: #E6A23C")}),n("node:stagnate",({path:o,type:r})=>{let t=p[r]();console.log(`%c\u{1F9CA} [Stagnate] %c${t} %c\u2794 %c${o}`,"color: #909399; font-weight: bold","color: #909399","color: #717171","color: #e0e0e0")}),n("flow:wait",({type:o,detail:r})=>{let t=d[o](r);console.log(`%c \u{1F4A4} [Wait] %c ${t} `,"background: #444; font-weight: bold; border-radius: 4px 0 0 4px; border: 1px solid #555; border-right: none;","background: #222; border-radius: 0 4px 4px 0; border: 1px solid #555; ")}),n("flow:fire",({path:o,type:r,detail:t})=>{let c=g[r](t);console.log(`%c\u{1F525} [Fire] %c ${o} ${c} `,"background: #ff9800; color: #000; font-weight: bold; border-radius: 2px 0 0 2px;","background: #444; color: #ff9800; border-radius: 0 2px 2px 0;")}),n("flow:end",({type:o})=>{let r=u[o]();console.log(`%c ${r} `,"background: #ff9800; color: #000; font-weight: bold; border-radius: 2px 0 0 2px;")}),n("flow:success",({duration:o})=>{console.log(`%c\u{1F389} [Flow Success] ${o} \u26A1 `,"color: #fff; background: #2e7d32; padding: 2px 4px; border-radius: 4px 0 0 4px;")})}});export{f as useLogger};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshflow/logger",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "The official logger plugin for MeshFlow",
|
|
5
5
|
"main": "./lib-dist/index.js",
|
|
6
6
|
"module": "./lib-dist/index.mjs",
|
|
7
7
|
"types": "./lib-dist/index.d.ts",
|
|
8
8
|
"author": "nzy",
|
|
9
9
|
"peerDependencies": {
|
|
10
|
-
"@meshflow/core": ">=0.1.
|
|
10
|
+
"@meshflow/core": ">=0.1.6"
|
|
11
11
|
},
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"access": "public",
|