effect-errors 1.9.2 → 1.10.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/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"name": "effect-errors",
|
|
23
|
-
"version": "1.
|
|
23
|
+
"version": "1.10.0",
|
|
24
24
|
"author": "jpb06 <jp.bois.06@outlook.fr>",
|
|
25
25
|
"description": "A POC for errors reporting in Effect",
|
|
26
26
|
"keywords": [
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"copyfiles": "2.4.1",
|
|
71
71
|
"del-cli": "6.0.0",
|
|
72
72
|
"esbuild": "0.25.2",
|
|
73
|
-
"readme-package-icons": "1.2.
|
|
74
|
-
"ts-paths-resolver": "1.2.
|
|
73
|
+
"readme-package-icons": "1.2.1",
|
|
74
|
+
"ts-paths-resolver": "1.2.53",
|
|
75
75
|
"tsx": "4.19.3",
|
|
76
76
|
"typescript": "5.8.3",
|
|
77
77
|
"vite-tsconfig-paths": "5.1.4",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LoggerConsoleLive = exports.Logger = void 0;
|
|
4
|
-
const effect_1 = require("effect");
|
|
5
|
-
class Logger extends effect_1.Context.Tag('Logger')() {
|
|
6
|
-
}
|
|
7
|
-
exports.Logger = Logger;
|
|
8
|
-
exports.LoggerConsoleLive = effect_1.Layer.succeed(Logger, {
|
|
9
|
-
info: (message, ...optionalParams) => (0, effect_1.pipe)(effect_1.Effect.succeed(console.info(message, ...optionalParams)), effect_1.Effect.withSpan('logger-console/info')),
|
|
10
|
-
error: (message, ...optionalParams) => (0, effect_1.pipe)(effect_1.Effect.succeed(console.error(message, ...optionalParams)), effect_1.Effect.withSpan('logger-console/error')),
|
|
11
|
-
warn: (message, ...optionalParams) => (0, effect_1.pipe)(effect_1.Effect.succeed(console.warn(message, ...optionalParams)), effect_1.Effect.withSpan('logger-console/warn')),
|
|
12
|
-
});
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dependencies/logger/index.ts"],"names":[],"mappings":";;;AAAA,mCAAsD;AAEtD,MAAa,MAAO,SAAQ,gBAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAgB9C;CAAG;AAhBN,wBAgBM;AAGO,QAAA,iBAAiB,GAAG,cAAK,CAAC,OAAO,CAAC,MAAM,EAAE;IACrD,IAAI,EAAE,CAAC,OAAiB,EAAE,GAAG,cAAyB,EAAE,EAAE,CACxD,IAAA,aAAI,EACF,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,cAAc,CAAC,CAAC,EACxD,eAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CACvC;IACH,KAAK,EAAE,CAAC,OAAiB,EAAE,GAAG,cAAyB,EAAE,EAAE,CACzD,IAAA,aAAI,EACF,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,cAAc,CAAC,CAAC,EACzD,eAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CACxC;IACH,IAAI,EAAE,CAAC,OAAiB,EAAE,GAAG,cAAyB,EAAE,EAAE,CACxD,IAAA,aAAI,EACF,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,cAAc,CAAC,CAAC,EACxD,eAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CACvC;CACJ,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Context, Effect, Layer } from 'effect';
|
|
2
|
-
declare const Logger_base: Context.TagClass<Logger, "Logger", {
|
|
3
|
-
readonly info: (message?: unknown, ...optionalParams: unknown[]) => Effect.Effect<void>;
|
|
4
|
-
readonly error: (message?: unknown, ...optionalParams: unknown[]) => Effect.Effect<void>;
|
|
5
|
-
readonly warn: (message?: unknown, ...optionalParams: unknown[]) => Effect.Effect<void>;
|
|
6
|
-
}>;
|
|
7
|
-
export declare class Logger extends Logger_base {
|
|
8
|
-
}
|
|
9
|
-
export type LoggerLayer = (typeof Logger)['Service'];
|
|
10
|
-
export declare const LoggerConsoleLive: Layer.Layer<Logger, never, never>;
|
|
11
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Context, Effect, Layer, pipe } from 'effect';
|
|
2
|
-
export class Logger extends Context.Tag('Logger')() {
|
|
3
|
-
}
|
|
4
|
-
export const LoggerConsoleLive = Layer.succeed(Logger, {
|
|
5
|
-
info: (message, ...optionalParams) => pipe(Effect.succeed(console.info(message, ...optionalParams)), Effect.withSpan('logger-console/info')),
|
|
6
|
-
error: (message, ...optionalParams) => pipe(Effect.succeed(console.error(message, ...optionalParams)), Effect.withSpan('logger-console/error')),
|
|
7
|
-
warn: (message, ...optionalParams) => pipe(Effect.succeed(console.warn(message, ...optionalParams)), Effect.withSpan('logger-console/warn')),
|
|
8
|
-
});
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dependencies/logger/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEtD,MAAM,OAAO,MAAO,SAAQ,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAgB9C;CAAG;AAGN,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;IACrD,IAAI,EAAE,CAAC,OAAiB,EAAE,GAAG,cAAyB,EAAE,EAAE,CACxD,IAAI,CACF,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,cAAc,CAAC,CAAC,EACxD,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CACvC;IACH,KAAK,EAAE,CAAC,OAAiB,EAAE,GAAG,cAAyB,EAAE,EAAE,CACzD,IAAI,CACF,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,cAAc,CAAC,CAAC,EACzD,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CACxC;IACH,IAAI,EAAE,CAAC,OAAiB,EAAE,GAAG,cAAyB,EAAE,EAAE,CACxD,IAAI,CACF,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,cAAc,CAAC,CAAC,EACxD,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CACvC;CACJ,CAAC,CAAC"}
|