@kcuf/sls-logger-base 0.0.2 → 0.0.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.
Files changed (64) hide show
  1. package/coverage/clover.xml +170 -180
  2. package/coverage/coverage-final.json +10 -10
  3. package/coverage/index.html +9 -9
  4. package/coverage/src/class/index.html +1 -1
  5. package/coverage/src/class/index.ts.html +1 -1
  6. package/coverage/src/class/sls-logger.ts.html +59 -59
  7. package/coverage/src/class/sls-pipe.ts.html +36 -36
  8. package/coverage/src/const/index.html +1 -1
  9. package/coverage/src/const/index.ts.html +1 -1
  10. package/coverage/src/factory/create-logger.ts.html +1 -1
  11. package/coverage/src/factory/generate-create-logger.ts.html +11 -17
  12. package/coverage/src/factory/index.html +5 -5
  13. package/coverage/src/index.html +1 -1
  14. package/coverage/src/index.ts.html +1 -1
  15. package/coverage/src/util/build-post-body.ts.html +14 -14
  16. package/coverage/src/util/convert-error-to-plain.ts.html +1 -1
  17. package/coverage/src/util/convert-log-info.ts.html +19 -19
  18. package/coverage/src/util/create-sls-log-quick.ts.html +1 -1
  19. package/coverage/src/util/flatten-object.ts.html +65 -50
  20. package/coverage/src/util/{flatten-should-ignore.ts.html → flatten-test-path.ts.html} +17 -59
  21. package/coverage/src/util/get-log-once-key.ts.html +6 -6
  22. package/coverage/src/util/get-silent-countdown.ts.html +1 -1
  23. package/coverage/src/util/index.html +12 -12
  24. package/coverage/src/util/index.ts.html +2 -2
  25. package/coverage/src/util/merge-default-params.ts.html +1 -1
  26. package/coverage/src/util/{merge-should-ignore.ts.html → merge-dont-send.ts.html} +8 -8
  27. package/coverage/src/util/resolve-default-params.ts.html +4 -4
  28. package/dist/cjs/class/sls-logger.js +7 -7
  29. package/dist/cjs/factory/generate-create-logger.js +4 -4
  30. package/dist/cjs/util/flatten-object.js +14 -9
  31. package/dist/cjs/util/flatten-test-path.js +11 -0
  32. package/dist/cjs/util/index.js +3 -3
  33. package/dist/cjs/util/merge-dont-send.js +14 -0
  34. package/dist/esm/class/sls-logger.js +7 -7
  35. package/dist/esm/class/sls-logger.js.map +1 -1
  36. package/dist/esm/factory/generate-create-logger.js +5 -5
  37. package/dist/esm/factory/generate-create-logger.js.map +1 -1
  38. package/dist/esm/types/common.js.map +1 -1
  39. package/dist/esm/types/options.js.map +1 -1
  40. package/dist/esm/util/flatten-object.js +14 -9
  41. package/dist/esm/util/flatten-object.js.map +1 -1
  42. package/dist/esm/util/flatten-test-path.js +6 -0
  43. package/dist/esm/util/flatten-test-path.js.map +1 -0
  44. package/dist/esm/util/index.js +1 -1
  45. package/dist/esm/util/index.js.map +1 -1
  46. package/dist/esm/util/merge-dont-send.js +9 -0
  47. package/dist/esm/util/merge-dont-send.js.map +1 -0
  48. package/dist/types/class/sls-logger.d.ts +1 -1
  49. package/dist/types/factory/generate-create-logger.d.ts +1 -1
  50. package/dist/types/types/common.d.ts +2 -12
  51. package/dist/types/types/options.d.ts +15 -8
  52. package/dist/types/util/flatten-object.d.ts +2 -2
  53. package/dist/types/util/flatten-test-path.d.ts +2 -0
  54. package/dist/types/util/index.d.ts +1 -1
  55. package/dist/types/util/merge-dont-send.d.ts +2 -0
  56. package/package.json +1 -1
  57. package/dist/cjs/util/flatten-should-ignore.js +0 -22
  58. package/dist/cjs/util/merge-should-ignore.js +0 -14
  59. package/dist/esm/util/flatten-should-ignore.js +0 -17
  60. package/dist/esm/util/flatten-should-ignore.js.map +0 -1
  61. package/dist/esm/util/merge-should-ignore.js +0 -9
  62. package/dist/esm/util/merge-should-ignore.js.map +0 -1
  63. package/dist/types/util/flatten-should-ignore.d.ts +0 -2
  64. package/dist/types/util/merge-should-ignore.d.ts +0 -2
@@ -1,17 +0,0 @@
1
- export default function flattenShouldIgnore(ignore, path, key, value) {
2
- if (/^_/.test(key)) {
3
- // 默认不记录 _ 打头的所有数据
4
- return true;
5
- }
6
- if (!ignore) {
7
- return false;
8
- }
9
- if (typeof ignore === 'function') {
10
- return ignore(path, key, value);
11
- }
12
- if (Array.isArray(ignore)) {
13
- return ignore.includes(key);
14
- }
15
- return key === ignore;
16
- }
17
- //# sourceMappingURL=flatten-should-ignore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten-should-ignore.js","names":["flattenShouldIgnore","ignore","path","key","value","test","Array","isArray","includes"],"sources":["../../../src/util/flatten-should-ignore.ts"],"sourcesContent":["import type {\n ISlsFlattenOptions\n} from '../types';\n\nexport default function flattenShouldIgnore(ignore: ISlsFlattenOptions['ignore'], path: string, key: string, value: unknown): boolean {\n if (/^_/.test(key)) { // 默认不记录 _ 打头的所有数据\n return true;\n }\n \n if (!ignore) {\n return false;\n }\n \n if (typeof ignore === 'function') {\n return ignore(path, key, value);\n }\n \n if (Array.isArray(ignore)) {\n return ignore.includes(key);\n }\n \n return key === ignore;\n}"],"mappings":"AAIA,eAAe,SAASA,mBAAmBA,CAACC,MAAoC,EAAEC,IAAY,EAAEC,GAAW,EAAEC,KAAc,EAAW;EACpI,IAAI,IAAI,CAACC,IAAI,CAACF,GAAG,CAAC,EAAE;IAAE;IACpB,OAAO,IAAI;EACb;EAEA,IAAI,CAACF,MAAM,EAAE;IACX,OAAO,KAAK;EACd;EAEA,IAAI,OAAOA,MAAM,KAAK,UAAU,EAAE;IAChC,OAAOA,MAAM,CAACC,IAAI,EAAEC,GAAG,EAAEC,KAAK,CAAC;EACjC;EAEA,IAAIE,KAAK,CAACC,OAAO,CAACN,MAAM,CAAC,EAAE;IACzB,OAAOA,MAAM,CAACO,QAAQ,CAACL,GAAG,CAAC;EAC7B;EAEA,OAAOA,GAAG,KAAKF,MAAM;AACvB","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- export default function mergeShouldIgnore(factoryShouldIgnore, shouldIgnore) {
2
- if (!factoryShouldIgnore || !shouldIgnore) {
3
- return shouldIgnore || factoryShouldIgnore;
4
- }
5
- return function () {
6
- return factoryShouldIgnore() || shouldIgnore();
7
- };
8
- }
9
- //# sourceMappingURL=merge-should-ignore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"merge-should-ignore.js","names":["mergeShouldIgnore","factoryShouldIgnore","shouldIgnore"],"sources":["../../../src/util/merge-should-ignore.ts"],"sourcesContent":["import type {\n IShouldIgnore\n} from '../types';\n\nexport default function mergeShouldIgnore(factoryShouldIgnore?: IShouldIgnore, shouldIgnore?: IShouldIgnore): IShouldIgnore | undefined {\n if (!factoryShouldIgnore || !shouldIgnore) {\n return shouldIgnore || factoryShouldIgnore;\n }\n \n return (): boolean | void => factoryShouldIgnore() || shouldIgnore();\n}"],"mappings":"AAIA,eAAe,SAASA,iBAAiBA,CAACC,mBAAmC,EAAEC,YAA4B,EAA6B;EACtI,IAAI,CAACD,mBAAmB,IAAI,CAACC,YAAY,EAAE;IACzC,OAAOA,YAAY,IAAID,mBAAmB;EAC5C;EAEA,OAAO;IAAA,OAAsBA,mBAAmB,CAAC,CAAC,IAAIC,YAAY,CAAC,CAAC;EAAA;AACtE","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import type { ISlsFlattenOptions } from '../types';
2
- export default function flattenShouldIgnore(ignore: ISlsFlattenOptions['ignore'], path: string, key: string, value: unknown): boolean;
@@ -1,2 +0,0 @@
1
- import type { IShouldIgnore } from '../types';
2
- export default function mergeShouldIgnore(factoryShouldIgnore?: IShouldIgnore, shouldIgnore?: IShouldIgnore): IShouldIgnore | undefined;