@eqxjs/nest-opentelemetry 3.1.0-beta.6 → 3.1.0-beta.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/commitlint.config.mjs +46 -0
- package/dist/register.js +34 -1
- package/dist/register.js.map +1 -1
- package/jest.config.mjs +24 -0
- package/package.json +25 -61
- package/tsconfig.spec.json +6 -0
- package/sonar-project.properties +0 -3
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/** @type {import('@commitlint/types').UserConfig} */
|
|
2
|
+
const Configuration = {
|
|
3
|
+
extends: ['@commitlint/config-conventional'],
|
|
4
|
+
parserPreset: 'conventional-changelog-atom',
|
|
5
|
+
formatter: '@commitlint/format',
|
|
6
|
+
rules: {
|
|
7
|
+
'type-enum': [
|
|
8
|
+
2,
|
|
9
|
+
'always',
|
|
10
|
+
[
|
|
11
|
+
'feat', // New feature
|
|
12
|
+
'fix', // Bug fix
|
|
13
|
+
'docs', // Documentation changes
|
|
14
|
+
'style', // Changes that do not affect the meaning of the code (white-space, formatting, etc.)
|
|
15
|
+
'refactor', // Code changes that neither fix a bug nor add a feature
|
|
16
|
+
'perf', // Performance improvement
|
|
17
|
+
'test', // Adding missing tests or correcting existing tests
|
|
18
|
+
'build', // Changes that affect the build system or external dependencies (example scopes: npm)
|
|
19
|
+
'ci', // Changes to CI configuration files and scripts
|
|
20
|
+
'chore', // Other changes that don't modify src or test files
|
|
21
|
+
'revert', // Reverts a previous commit
|
|
22
|
+
],
|
|
23
|
+
],
|
|
24
|
+
'scope-enum': [
|
|
25
|
+
2,
|
|
26
|
+
'always',
|
|
27
|
+
[
|
|
28
|
+
'setup', // Project setup
|
|
29
|
+
'config', // Configuration files
|
|
30
|
+
'deps', // Dependency updates
|
|
31
|
+
'feature', // Feature-specific changes
|
|
32
|
+
'bug', // Bug fixes
|
|
33
|
+
'docs', // Documentation
|
|
34
|
+
'style', // Code style/formatting
|
|
35
|
+
'refactor', // Code refactoring
|
|
36
|
+
'test', // Tests
|
|
37
|
+
'build', // Build scripts or configuration
|
|
38
|
+
'ci', // Continuous integration
|
|
39
|
+
'release', // Release related changes
|
|
40
|
+
'other', // Other changes
|
|
41
|
+
],
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default Configuration;
|
package/dist/register.js
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const opentelemetry = require("@opentelemetry/sdk-node");
|
|
36
|
+
const opentelemetry = __importStar(require("@opentelemetry/sdk-node"));
|
|
4
37
|
const api_1 = require("@opentelemetry/api");
|
|
5
38
|
const utils_1 = require("./utils");
|
|
6
39
|
const exporter_trace_otlp_proto_1 = require("@opentelemetry/exporter-trace-otlp-proto");
|
package/dist/register.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uEAAyD;AACzD,4CAA0C;AAC1C,mCAGiB;AACjB,wFAA6E;AAC7E,4DAAuD;AACvD,oDAAiE;AACjE,4FAAgF;AAChF,4DAA2E;AAC3E,0FAI+C;AAC/C,sDAAkE;AAClE,sFAA0E;AAE1E,IAAI,aAAkB,CAAC;AACvB,IAAI,cAAmB,CAAC;AACxB,IAAI,WAAgB,CAAC;AAErB,IAAI,OAAO,CAAC,GAAG,CAAC,2CAA2C,EAAE,CAAC;IAC5D,aAAa,GAAG,IAAI,0DAAyB,CAAC;QAC5C,gBAAgB,EACd,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC;KAC7D,CAAC,CAAC;AACL,CAAC;KAAM,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;IAClC,aAAa,GAAG,IAAI,6CAAiB,CAAC;QACpC,4DAA4D;QAC5D,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU;QAC3B,yFAAyF;QACzF,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;A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CAAC,CAAC;AAC5E,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,UAAI,CAAC,KAAK,CACR,2GAA2G,EAC3G,KAAK,CACN,CAAC;AACJ,CAAC;AAED,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;IACzB,GAAG;SACA,QAAQ,EAAE;SACV,IAAI,CAAC,GAAG,EAAE,CAAC,UAAI,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACtD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAI,CAAC,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC,CAAC;AAChF,CAAC,CAAC,CAAC"}
|
package/jest.config.mjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
|
2
|
+
export default {
|
|
3
|
+
preset: 'ts-jest/presets/default-esm',
|
|
4
|
+
extensionsToTreatAsEsm: ['.ts'],
|
|
5
|
+
moduleNameMapper: {
|
|
6
|
+
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
7
|
+
},
|
|
8
|
+
rootDir: '.',
|
|
9
|
+
testRegex: '.*\\.spec\\.ts$',
|
|
10
|
+
transform: {
|
|
11
|
+
'^.+\\.ts$': [
|
|
12
|
+
'ts-jest',
|
|
13
|
+
{
|
|
14
|
+
useESM: true,
|
|
15
|
+
tsconfig: 'tsconfig.spec.json',
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
collectCoverageFrom: ['src/**/*.ts', '!src/**/index.ts'],
|
|
20
|
+
coverageDirectory: './coverage',
|
|
21
|
+
testEnvironment: 'node',
|
|
22
|
+
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
|
|
23
|
+
setupFilesAfterEnv: ['<rootDir>/test/jest-setup.ts'],
|
|
24
|
+
};
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eqxjs/nest-opentelemetry",
|
|
3
|
-
"version": "3.1.0-beta.
|
|
3
|
+
"version": "3.1.0-beta.7",
|
|
4
4
|
"description": "Opentelemetry Service for nestjs",
|
|
5
5
|
"author": "Atit Plangson",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"private": false,
|
|
8
|
-
"main": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
10
|
"scripts": {
|
|
11
|
-
"prebuild": "
|
|
11
|
+
"prebuild": "rm -rf dist",
|
|
12
12
|
"format": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
13
13
|
"format:fix": "prettier --write --list-different \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
14
14
|
"install:dev": "yarn install && husky && yarn run install:dev:commit-msg && yarn run install:dev:pre-commit && yarn run install:dev:prepare-commit-msg",
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
"node": ">=22"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@azure/monitor-opentelemetry-exporter": "1.0.0-beta.33",
|
|
39
|
+
"@azure/monitor-opentelemetry-exporter": "^1.0.0-beta.33",
|
|
40
40
|
"@opentelemetry/api": "^1.9.0",
|
|
41
41
|
"@opentelemetry/exporter-logs-otlp-proto": "^0.203.0",
|
|
42
42
|
"@opentelemetry/exporter-metrics-otlp-proto": "^0.203.0",
|
|
43
43
|
"@opentelemetry/instrumentation": "^0.203.0",
|
|
44
44
|
"@opentelemetry/instrumentation-amqplib": "^0.50.0",
|
|
45
|
-
"@opentelemetry/instrumentation-aws-lambda": "^0.54.
|
|
46
|
-
"@opentelemetry/instrumentation-aws-sdk": "^0.
|
|
45
|
+
"@opentelemetry/instrumentation-aws-lambda": "^0.54.1",
|
|
46
|
+
"@opentelemetry/instrumentation-aws-sdk": "^0.58.0",
|
|
47
47
|
"@opentelemetry/instrumentation-bunyan": "^0.49.0",
|
|
48
48
|
"@opentelemetry/instrumentation-cassandra-driver": "^0.49.0",
|
|
49
49
|
"@opentelemetry/instrumentation-connect": "^0.47.0",
|
|
50
|
-
"@opentelemetry/instrumentation-cucumber": "^0.
|
|
51
|
-
"@opentelemetry/instrumentation-dataloader": "^0.21.
|
|
50
|
+
"@opentelemetry/instrumentation-cucumber": "^0.19.0",
|
|
51
|
+
"@opentelemetry/instrumentation-dataloader": "^0.21.1",
|
|
52
52
|
"@opentelemetry/instrumentation-dns": "^0.47.0",
|
|
53
53
|
"@opentelemetry/instrumentation-express": "^0.52.0",
|
|
54
54
|
"@opentelemetry/instrumentation-fastify": "^0.48.0",
|
|
@@ -69,15 +69,15 @@
|
|
|
69
69
|
"@opentelemetry/instrumentation-mysql2": "^0.50.0",
|
|
70
70
|
"@opentelemetry/instrumentation-nestjs-core": "^0.49.0",
|
|
71
71
|
"@opentelemetry/instrumentation-net": "^0.47.0",
|
|
72
|
-
"@opentelemetry/instrumentation-pg": "^0.56.
|
|
73
|
-
"@opentelemetry/instrumentation-pino": "^0.50.
|
|
74
|
-
"@opentelemetry/instrumentation-redis": "^0.
|
|
72
|
+
"@opentelemetry/instrumentation-pg": "^0.56.1",
|
|
73
|
+
"@opentelemetry/instrumentation-pino": "^0.50.1",
|
|
74
|
+
"@opentelemetry/instrumentation-redis": "^0.52.0",
|
|
75
75
|
"@opentelemetry/instrumentation-redis-4": "^0.49.0",
|
|
76
76
|
"@opentelemetry/instrumentation-restify": "^0.49.0",
|
|
77
77
|
"@opentelemetry/instrumentation-router": "^0.48.0",
|
|
78
78
|
"@opentelemetry/instrumentation-socket.io": "^0.50.0",
|
|
79
79
|
"@opentelemetry/instrumentation-tedious": "^0.22.0",
|
|
80
|
-
"@opentelemetry/instrumentation-winston": "^0.48.
|
|
80
|
+
"@opentelemetry/instrumentation-winston": "^0.48.1",
|
|
81
81
|
"@opentelemetry/resource-detector-alibaba-cloud": "^0.31.3",
|
|
82
82
|
"@opentelemetry/resource-detector-aws": "^2.3.0",
|
|
83
83
|
"@opentelemetry/resource-detector-azure": "^0.10.0",
|
|
@@ -93,71 +93,35 @@
|
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@commitlint/cli": "^19.8.1",
|
|
95
95
|
"@commitlint/config-conventional": "^19.8.1",
|
|
96
|
-
"@commitlint/types": "^19.
|
|
97
|
-
"@eslint/eslintrc": "^3.
|
|
98
|
-
"@eslint/js": "^9.
|
|
96
|
+
"@commitlint/types": "^19.8.1",
|
|
97
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
98
|
+
"@eslint/js": "^9.34.0",
|
|
99
99
|
"@types/jest": "^29.5.14",
|
|
100
|
-
"@types/node": "^22.
|
|
101
|
-
"@types/supertest": "^6.0.
|
|
100
|
+
"@types/node": "^22.18.0",
|
|
101
|
+
"@types/supertest": "^6.0.3",
|
|
102
102
|
"commitizen": "^4.3.1",
|
|
103
103
|
"conventional-changelog-atom": "^5.0.0",
|
|
104
104
|
"conventional-changelog-cli": "^5.0.0",
|
|
105
105
|
"cz-conventional-changelog": "^3.3.0",
|
|
106
|
-
"eslint": "^9.
|
|
106
|
+
"eslint": "^9.34.0",
|
|
107
107
|
"eslint-config-prettier": "^10.1.8",
|
|
108
108
|
"eslint-plugin-jest": "^29.0.1",
|
|
109
|
-
"eslint-plugin-prettier": "^5.5.
|
|
109
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
110
110
|
"globals": "^16.3.0",
|
|
111
111
|
"husky": "^9.1.7",
|
|
112
112
|
"jest": "^29.7.0",
|
|
113
113
|
"jest-mock-extended": "^3.0.7",
|
|
114
|
-
"lint-staged": "^16.1.
|
|
115
|
-
"prettier": "^3.
|
|
114
|
+
"lint-staged": "^16.1.6",
|
|
115
|
+
"prettier": "^3.6.2",
|
|
116
116
|
"reflect-metadata": "^0.2.2",
|
|
117
117
|
"source-map-support": "^0.5.21",
|
|
118
118
|
"standard-version": "^9.5.0",
|
|
119
119
|
"supertest": "^7.1.4",
|
|
120
120
|
"ts-jest": "^29.4.1",
|
|
121
|
-
"ts-loader": "^9.5.
|
|
121
|
+
"ts-loader": "^9.5.4",
|
|
122
122
|
"ts-node": "^10.9.2",
|
|
123
123
|
"tsconfig-paths": "^4.2.0",
|
|
124
|
-
"typescript": "^5.
|
|
125
|
-
"typescript-eslint": "^8.
|
|
126
|
-
},
|
|
127
|
-
"jest": {
|
|
128
|
-
"moduleFileExtensions": [
|
|
129
|
-
"js",
|
|
130
|
-
"json",
|
|
131
|
-
"ts"
|
|
132
|
-
],
|
|
133
|
-
"moduleNameMapper": {
|
|
134
|
-
"@/(.*)": "<rootDir>/src/$1"
|
|
135
|
-
},
|
|
136
|
-
"rootDir": ".",
|
|
137
|
-
"testRegex": ".*\\.spec\\.ts$",
|
|
138
|
-
"transform": {
|
|
139
|
-
"^.+\\.(t|j)s$": [
|
|
140
|
-
"ts-jest",
|
|
141
|
-
{
|
|
142
|
-
"tsconfig": "tsconfig.json"
|
|
143
|
-
}
|
|
144
|
-
]
|
|
145
|
-
},
|
|
146
|
-
"collectCoverageFrom": [
|
|
147
|
-
"src/**/*.(t|j)s",
|
|
148
|
-
"!src/**/*.index.(t|j)s"
|
|
149
|
-
],
|
|
150
|
-
"coverageDirectory": "../coverage",
|
|
151
|
-
"coveragePathIgnorePatterns": [
|
|
152
|
-
"index.ts"
|
|
153
|
-
],
|
|
154
|
-
"testEnvironment": "node",
|
|
155
|
-
"testPathIgnorePatterns": [
|
|
156
|
-
"/node_modules/",
|
|
157
|
-
"/dist/"
|
|
158
|
-
],
|
|
159
|
-
"setupFilesAfterEnv": [
|
|
160
|
-
"<rootDir>/test/jest-setup.ts"
|
|
161
|
-
]
|
|
124
|
+
"typescript": "^5.9.2",
|
|
125
|
+
"typescript-eslint": "^8.41.0"
|
|
162
126
|
}
|
|
163
127
|
}
|
package/sonar-project.properties
DELETED