@wutiange/log-listener-plugin 1.2.0 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -70,7 +70,7 @@ class Logger {
70
70
  if (input instanceof Request) {
71
71
  url = input.url;
72
72
  method = (_b = input.method) !== null && _b !== void 0 ? _b : 'get';
73
- headers = input.headers;
73
+ headers = input.headers['map'];
74
74
  body = input.body;
75
75
  }
76
76
  else if (input instanceof URL) {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,sDAA6B;AAG7B,MAAM,MAAM;IAAZ;QAEU,WAAM,GAAkB,IAAI,CAAA;QAC5B,aAAQ,GAAwB,EAAE,CAAA;QAClC,YAAO,GAAkB,IAAI,CAAA;IAwHvC,CAAC;IAtHC,UAAU,CAAC,GAAW;QACpB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;QAC5B,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,GAAG,IAAI,gBAAM,CAAC,GAAG,CAAC,CAAA;QAC/B,CAAC;IACH,CAAC;IAED,UAAU,CAAC,OAAe;;QACxB,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;YACtB,MAAA,IAAI,CAAC,MAAM,0CAAE,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC1C,CAAC;IACH,CAAC;IAED,UAAU;QACR,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;YACrC,OAAO,IAAI,CAAC,OAAO,CAAA;QACrB,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,WAAW,CAAC,OAA4B,EAAE;QACxC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;IACtB,CAAC;IAEO,I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CAAC,EACjC,UAAU,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,EAC5B,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,IACnB,CAAA;;KACH;IAEK,UAAU,CAAC,QAAgB;;;YAC/B,OAAO,MAAA,IAAI,CAAC,MAAM,0CAAE,OAAO,iCACtB,IAAI,CAAC,QAAQ,KAChB,SAAS,EAAE,IAAI,EACf,SAAS,EAAE,QAAQ,IACnB,CAAA;;KACH;IAEK,gBAAgB,CAAC,QAAgB;;;YACrC,OAAO,MAAA,IAAI,CAAC,MAAM,0CAAE,OAAO,iCACtB,IAAI,CAAC,QAAQ,KAChB,eAAe,EAAE,IAAI,EACrB,SAAS,EAAE,QAAQ,IACnB,CAAA;;KACH;IAEK,SAAS,CAAC,QAAgB,EAAE,QAAmB;;YACnD,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAA;QACjD,CAAC;KAAA;IAEK,GAAG,CAAC,KAAwB,EAAE,IAAkB;;YACpD,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CAAA;QAC/C,CAAC;KAAA;IAEK,GAAG,CAAC,EAAU,EAAE,QAAmB;;YACvC,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAA;QAC3C,CAAC;KAAA;CACF;AAGD,kBAAe,IAAI,MAAM,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wutiange/log-listener-plugin",
3
- "version": "1.2.0",
3
+ "version": "1.2.3",
4
4
  "description": "这是log-record的插件,如果需要使用这个日志监听,那么就需要把这个插件安装到项目中",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -68,7 +68,7 @@ class Logger {
68
68
  if (input instanceof Request) {
69
69
  url = input.url
70
70
  method = input.method ?? 'get'
71
- headers = input.headers
71
+ headers = (input.headers as Record<string, any>)['map']
72
72
  body = input.body
73
73
  } else if (input instanceof URL) {
74
74
  url = input.href