@loglayer/transport-sentry 1.0.6-alpha-0.0 → 1.0.7

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/index.cjs CHANGED
@@ -1,28 +1,4 @@
1
- //#region rolldown:runtime
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
- key = keys[i];
11
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
- get: ((k) => from[k]).bind(null, key),
13
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
- });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
- value: mod,
20
- enumerable: true
21
- }) : target, mod));
22
-
23
- //#endregion
24
1
  let __loglayer_transport = require("@loglayer/transport");
25
- __loglayer_transport = __toESM(__loglayer_transport);
26
2
 
27
3
  //#region src/SentryTransport.ts
28
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["BaseTransport"],"sources":["../src/SentryTransport.ts"],"sourcesContent":["import type { LogLayerTransportConfig, LogLayerTransportParams } from \"@loglayer/transport\";\nimport { BaseTransport } from \"@loglayer/transport\";\n\n/**\n * Sentry logger interface\n */\nexport interface SentryLogger {\n trace: (...args: any[]) => void;\n debug: (...args: any[]) => void;\n info: (...args: any[]) => void;\n warn: (...args: any[]) => void;\n error: (...args: any[]) => void;\n fatal: (...args: any[]) => void;\n}\n\n/**\n * Configuration options for the Sentry transport.\n */\nexport interface SentryTransportConfig extends LogLayerTransportConfig<SentryLogger> {\n // No additional configuration needed beyond the base transport config\n}\n\n/**\n * SentryTransport is responsible for sending logs to Sentry using the Sentry SDK.\n * It uses the Sentry logger API to send structured logs to Sentry.\n *\n * Features:\n * - Uses Sentry logger for structured logging\n * - Supports all Sentry log levels (trace, debug, info, warn, error, fatal)\n * - Automatic error and debug callbacks\n * - Integrates with Sentry's structured logging features\n */\nexport class SentryTransport extends BaseTransport<SentryLogger> {\n /**\n * Processes and ships log entries to Sentry using the Sentry logger.\n *\n * @param params - Log parameters including level, messages, and metadata\n * @returns The original messages array\n */\n shipToLogger({ logLevel, messages, data, hasData }: LogLayerTransportParams): any[] {\n // Create a new array with joined message and optional data\n const args = [messages.join(\" \")];\n\n if (data && hasData) {\n // Add data object as a separate parameter\n // @ts-expect-error\n args.push(data);\n }\n\n // Map LogLayer log levels to Sentry logger methods\n switch (logLevel) {\n case \"trace\":\n this.logger.trace(...args);\n break;\n case \"debug\":\n this.logger.debug(...args);\n break;\n case \"info\":\n this.logger.info(...args);\n break;\n case \"warn\":\n this.logger.warn(...args);\n break;\n case \"error\":\n this.logger.error(...args);\n break;\n case \"fatal\":\n this.logger.fatal(...args);\n break;\n default:\n // Fallback to info level for unknown log levels\n this.logger.info(...args);\n }\n\n return messages;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,IAAa,kBAAb,cAAqCA,mCAA4B;;;;;;;CAO/D,aAAa,EAAE,UAAU,UAAU,MAAM,WAA2C;EAElF,MAAM,OAAO,CAAC,SAAS,KAAK,IAAI,CAAC;AAEjC,MAAI,QAAQ,QAGV,MAAK,KAAK,KAAK;AAIjB,UAAQ,UAAR;GACE,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,KAAK;AACH,SAAK,OAAO,KAAK,GAAG,KAAK;AACzB;GACF,KAAK;AACH,SAAK,OAAO,KAAK,GAAG,KAAK;AACzB;GACF,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,QAEE,MAAK,OAAO,KAAK,GAAG,KAAK;;AAG7B,SAAO"}
1
+ {"version":3,"file":"index.cjs","names":["BaseTransport"],"sources":["../src/SentryTransport.ts"],"sourcesContent":["import type { LogLayerTransportConfig, LogLayerTransportParams } from \"@loglayer/transport\";\nimport { BaseTransport } from \"@loglayer/transport\";\n\n/**\n * Sentry logger interface\n */\nexport interface SentryLogger {\n trace: (...args: any[]) => void;\n debug: (...args: any[]) => void;\n info: (...args: any[]) => void;\n warn: (...args: any[]) => void;\n error: (...args: any[]) => void;\n fatal: (...args: any[]) => void;\n}\n\n/**\n * Configuration options for the Sentry transport.\n */\nexport interface SentryTransportConfig extends LogLayerTransportConfig<SentryLogger> {\n // No additional configuration needed beyond the base transport config\n}\n\n/**\n * SentryTransport is responsible for sending logs to Sentry using the Sentry SDK.\n * It uses the Sentry logger API to send structured logs to Sentry.\n *\n * Features:\n * - Uses Sentry logger for structured logging\n * - Supports all Sentry log levels (trace, debug, info, warn, error, fatal)\n * - Automatic error and debug callbacks\n * - Integrates with Sentry's structured logging features\n */\nexport class SentryTransport extends BaseTransport<SentryLogger> {\n /**\n * Processes and ships log entries to Sentry using the Sentry logger.\n *\n * @param params - Log parameters including level, messages, and metadata\n * @returns The original messages array\n */\n shipToLogger({ logLevel, messages, data, hasData }: LogLayerTransportParams): any[] {\n // Create a new array with joined message and optional data\n const args = [messages.join(\" \")];\n\n if (data && hasData) {\n // Add data object as a separate parameter\n // @ts-expect-error\n args.push(data);\n }\n\n // Map LogLayer log levels to Sentry logger methods\n switch (logLevel) {\n case \"trace\":\n this.logger.trace(...args);\n break;\n case \"debug\":\n this.logger.debug(...args);\n break;\n case \"info\":\n this.logger.info(...args);\n break;\n case \"warn\":\n this.logger.warn(...args);\n break;\n case \"error\":\n this.logger.error(...args);\n break;\n case \"fatal\":\n this.logger.fatal(...args);\n break;\n default:\n // Fallback to info level for unknown log levels\n this.logger.info(...args);\n }\n\n return messages;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAgCA,IAAa,kBAAb,cAAqCA,mCAA4B;;;;;;;CAO/D,aAAa,EAAE,UAAU,UAAU,MAAM,WAA2C;EAElF,MAAM,OAAO,CAAC,SAAS,KAAK,IAAI,CAAC;AAEjC,MAAI,QAAQ,QAGV,MAAK,KAAK,KAAK;AAIjB,UAAQ,UAAR;GACE,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,KAAK;AACH,SAAK,OAAO,KAAK,GAAG,KAAK;AACzB;GACF,KAAK;AACH,SAAK,OAAO,KAAK,GAAG,KAAK;AACzB;GACF,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,KAAK;AACH,SAAK,OAAO,MAAM,GAAG,KAAK;AAC1B;GACF,QAEE,MAAK,OAAO,KAAK,GAAG,KAAK;;AAG7B,SAAO"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@loglayer/transport-sentry",
3
3
  "description": "Sentry transport for the LogLayer logging library.",
4
- "version": "1.0.6-alpha-0.0",
4
+ "version": "1.0.7",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -16,6 +16,7 @@
16
16
  }
17
17
  },
18
18
  "types": "./dist/index.d.ts",
19
+ "sideEffects": false,
19
20
  "license": "MIT",
20
21
  "repository": {
21
22
  "type": "git",
@@ -31,19 +32,19 @@
31
32
  "transport"
32
33
  ],
33
34
  "dependencies": {
34
- "@loglayer/transport": "2.3.10-alpha-0.0"
35
+ "@loglayer/transport": "2.3.11"
35
36
  },
36
37
  "devDependencies": {
37
38
  "@sentry/node": "10.19.0",
38
- "@types/node": "24.10.1",
39
+ "@types/node": "24.10.2",
39
40
  "dotenv": "17.2.3",
40
41
  "serialize-error": "12.0.0",
41
- "tsdown": "0.15.12",
42
- "tsx": "4.20.6",
42
+ "tsdown": "0.17.2",
43
+ "tsx": "4.21.0",
43
44
  "typescript": "5.9.3",
44
- "vitest": "4.0.9",
45
+ "vitest": "4.0.15",
45
46
  "@internal/tsconfig": "2.1.0",
46
- "loglayer": "8.1.0-alpha-0.0"
47
+ "loglayer": "8.1.1"
47
48
  },
48
49
  "bugs": "https://github.com/loglayer/loglayer/issues",
49
50
  "engines": {