@fougere/log 0.16.8-alpha.0 → 0.17.0-alpha.0

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/dist/CallLines.js CHANGED
@@ -8,10 +8,10 @@ import { CARRIES_LINE } from '@fougere/core';
8
8
  */
9
9
  export function callLines(logger) {
10
10
  return async (context, next) => {
11
- if (CARRIES_LINE.has(context.entity))
11
+ if (CARRIES_LINE.has(context.address))
12
12
  return next();
13
13
  const log = context.frond ? logger.child(context.frond) : logger;
14
- const call = `${context.handler ?? context.entity}.${context.operation}`;
14
+ const call = `${context.handler ?? context.address}.${context.operation}`;
15
15
  const from = context.invocation?.caller ? ` ← ${context.invocation.caller}` : '';
16
16
  const start = performance.now();
17
17
  const cost = () => `(${(performance.now() - start).toFixed(1)}ms)`;
@@ -1 +1 @@
1
- {"version":3,"file":"CallLines.js","sourceRoot":"","sources":["../src/CallLines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAmC,MAAM,eAAe,CAAC;AAE9E;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,MAAc;IACtC,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC7B,IAAI,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC;YAAE,OAAO,IAAI,EAAE,CAAC;QAEpD,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QACjE,MAAM,IAAI,GAAG,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACzE,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE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C1E,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjF,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;QAEnE,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI,EAAE,CAAC,CAAC;QAC3B,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,EAAE,CAAC;YAC5B,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;YAErC,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;YAC7C,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fougere/log",
3
- "version": "0.16.8-alpha.0",
3
+ "version": "0.17.0-alpha.0",
4
4
  "description": "Logging for Fougere: two lines for every call, in every process, and a file destination for the lines.",
5
5
  "keywords": [
6
6
  "fougere",
@@ -29,17 +29,17 @@
29
29
  "src"
30
30
  ],
31
31
  "peerDependencies": {
32
- "@fougere/core": "^0.16.8-alpha.0",
33
- "@fougere/schema": "^0.16.8-alpha.0"
32
+ "@fougere/core": "^0.17.0-alpha.0",
33
+ "@fougere/schema": "^0.17.0-alpha.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@fougere/compiler": "0.16.8-alpha.0",
37
- "@fougere/container": "0.16.8-alpha.0",
38
- "@fougere/core": "0.16.8-alpha.0",
39
- "@fougere/schema": "0.16.8-alpha.0",
36
+ "@fougere/compiler": "0.17.0-alpha.0",
37
+ "@fougere/container": "0.17.0-alpha.0",
38
+ "@fougere/core": "0.17.0-alpha.0",
39
+ "@fougere/schema": "0.17.0-alpha.0",
40
40
  "vitest": "^4.1.0",
41
41
  "jiti": "^2.6.1",
42
- "@fougere/testing": "0.16.8-alpha.0"
42
+ "@fougere/testing": "0.17.0-alpha.0"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public"
package/src/CallLines.ts CHANGED
@@ -9,10 +9,10 @@ import { CARRIES_LINE, type AppMiddleware, type Logger } from '@fougere/core';
9
9
  */
10
10
  export function callLines(logger: Logger): AppMiddleware {
11
11
  return async (context, next) => {
12
- if (CARRIES_LINE.has(context.entity)) return next();
12
+ if (CARRIES_LINE.has(context.address)) return next();
13
13
 
14
14
  const log = context.frond ? logger.child(context.frond) : logger;
15
- const call = `${context.handler ?? context.entity}.${context.operation}`;
15
+ const call = `${context.handler ?? context.address}.${context.operation}`;
16
16
  const from = context.invocation?.caller ? ` ← ${context.invocation.caller}` : '';
17
17
  const start = performance.now();
18
18
  const cost = () => `(${(performance.now() - start).toFixed(1)}ms)`;