@devopsplaybook.io/otel-utils-fastify 1.0.16 → 1.0.17-beta.22.708e176

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.
@@ -9,5 +9,8 @@ on:
9
9
  jobs:
10
10
  npm-upgrade:
11
11
  uses: devopsplaybook-io/common-utils/.github/workflows/reusable-npm-upgrade.yml@main
12
+ permissions:
13
+ contents: write
14
+ pull-requests: write
12
15
  with:
13
- npm_services: '[]'
16
+ npm_services: "[]"
@@ -10,13 +10,12 @@ const propagator = new core_1.W3CTraceContextPropagator();
10
10
  function StandardTracerFastifyRegisterHooks(fastify, standardTracer, standardLogger, options) {
11
11
  const logger = standardLogger.createModuleLogger("Fastify");
12
12
  fastify.addHook("onRequest", async (req) => {
13
- var _a;
14
13
  if (req.method === "OPTIONS" ||
15
- !req.url.startsWith((options === null || options === void 0 ? void 0 : options.rootApiPath) || "/api")) {
14
+ !req.url.startsWith(options?.rootApiPath || "/api")) {
16
15
  return;
17
16
  }
18
17
  const spanName = `${req.method}-${req.url.split("?")[0]}`;
19
- if ((_a = options === null || options === void 0 ? void 0 : options.ignoreList) === null || _a === void 0 ? void 0 : _a.includes(spanName)) {
18
+ if (options?.ignoreList?.includes(spanName)) {
20
19
  return;
21
20
  }
22
21
  const callerContext = propagator.extract(api_1.ROOT_CONTEXT, req.headers, api_1.defaultTextMapGetter);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopsplaybook.io/otel-utils-fastify",
3
- "version": "1.0.16",
3
+ "version": "1.0.17-beta.22.708e176",
4
4
  "description": "Utility to simplify integration with Open Telemetry for Fastify API Server",
5
5
  "keywords": [
6
6
  "Open Telemetry",
@@ -20,15 +20,15 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "fastify": "^5.8.4",
23
- "@devopsplaybook.io/otel-utils": "^1.0.13"
23
+ "@devopsplaybook.io/otel-utils": "^1.0.16"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@eslint/js": "^10.0.1",
27
- "@types/node": "^25.5.0",
27
+ "@types/node": "^25.6.0",
28
28
  "@types/sqlite3": "^5.1.0",
29
29
  "ts-node": "^10.9.2",
30
- "typescript-eslint": "^8.57.2",
31
- "typescript": "^5.9.3"
30
+ "typescript-eslint": "^8.58.2",
31
+ "typescript": "^6.0.2"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"
package/tsconfig.json CHANGED
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "ES2019",
3
+ "target": "ES2020",
4
4
  "module": "commonjs",
5
- "declaration": true,
6
- "outDir": "./dist",
7
- "strict": true,
5
+ "lib": ["ES2020"],
6
+ "rootDir": "src",
7
+ "outDir": "dist",
8
+ "allowJs": true,
8
9
  "esModuleInterop": true,
9
10
  "skipLibCheck": true,
10
- "forceConsistentCasingInFileNames": true
11
+ "forceConsistentCasingInFileNames": true,
12
+ "strict": false,
13
+ "noImplicitAny": false,
14
+ "strictPropertyInitialization": false,
15
+ "strictNullChecks": false
11
16
  },
12
- "include": ["index.ts", "src/**/*"]
17
+ "include": ["src/**/*"],
18
+ "exclude": ["node_modules", "coverage", "test", "dist", "src/**/*.spec.ts"]
13
19
  }
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./src/StandardTracerFastify";
package/dist/index.js DELETED
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/StandardTracerFastify"), exports);
@@ -1,9 +0,0 @@
1
- import { StandardLogger, StandardTracer } from "@devopsplaybook.io/otel-utils";
2
- import { Span } from "@opentelemetry/sdk-trace-base";
3
- import { FastifyInstance } from "fastify";
4
- export declare function StandardTracerFastifyRegisterHooks(fastify: FastifyInstance, standardTracer: StandardTracer, standardLogger: StandardLogger, options?: StandardTracerFastifyRegisterHooksOptions): void;
5
- export interface StandardTracerFastifyRegisterHooksOptions {
6
- rootApiPath?: string;
7
- ignoreList?: string[];
8
- }
9
- export declare function OTelRequestSpan(req: any): Span;