@inversifyjs/http-instrumentation-core 5.8.0 → 5.9.1
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/lib/actions/emitHttpInstrumentationEvent.d.ts +4 -0
- package/lib/actions/emitHttpInstrumentationEvent.d.ts.map +1 -0
- package/lib/actions/emitHttpInstrumentationEvent.js +18 -0
- package/lib/actions/emitHttpInstrumentationEvent.js.map +1 -0
- package/lib/actions/httpInstrumentationState.d.ts +5 -0
- package/lib/actions/httpInstrumentationState.d.ts.map +1 -0
- package/lib/actions/httpInstrumentationState.js +50 -0
- package/lib/actions/httpInstrumentationState.js.map +1 -0
- package/lib/actions/markHttpInstrumentedHandler.d.ts +3 -0
- package/lib/actions/markHttpInstrumentedHandler.d.ts.map +1 -0
- package/lib/actions/markHttpInstrumentedHandler.js +14 -0
- package/lib/actions/markHttpInstrumentedHandler.js.map +1 -0
- package/lib/actions/runInstrumentedHttpStage.d.ts +11 -0
- package/lib/actions/runInstrumentedHttpStage.d.ts.map +1 -0
- package/lib/actions/runInstrumentedHttpStage.js +28 -0
- package/lib/actions/runInstrumentedHttpStage.js.map +1 -0
- package/lib/calculations/buildHttpInstrumentationContext.d.ts +5 -0
- package/lib/calculations/buildHttpInstrumentationContext.d.ts.map +1 -0
- package/lib/calculations/buildHttpInstrumentationContext.js +10 -0
- package/lib/calculations/buildHttpInstrumentationContext.js.map +1 -0
- package/lib/calculations/redactHttpHeaders.d.ts +2 -0
- package/lib/calculations/redactHttpHeaders.d.ts.map +1 -0
- package/lib/calculations/redactHttpHeaders.js +28 -0
- package/lib/calculations/redactHttpHeaders.js.map +1 -0
- package/lib/calculations/startHttpStage.d.ts +4 -0
- package/lib/calculations/startHttpStage.d.ts.map +1 -0
- package/lib/calculations/startHttpStage.js +10 -0
- package/lib/calculations/startHttpStage.js.map +1 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -0
- package/lib/models/EventSink.d.ts +4 -0
- package/lib/models/EventSink.d.ts.map +1 -0
- package/lib/models/EventSink.js +2 -0
- package/lib/models/EventSink.js.map +1 -0
- package/lib/models/HttpInstrumentationContext.d.ts +7 -0
- package/lib/models/HttpInstrumentationContext.d.ts.map +1 -0
- package/lib/models/HttpInstrumentationContext.js +2 -0
- package/lib/models/HttpInstrumentationContext.js.map +1 -0
- package/lib/models/HttpInstrumentationEvent.d.ts +91 -0
- package/lib/models/HttpInstrumentationEvent.d.ts.map +1 -0
- package/lib/models/HttpInstrumentationEvent.js +2 -0
- package/lib/models/HttpInstrumentationEvent.js.map +1 -0
- package/lib/models/HttpInstrumentationScope.d.ts +6 -0
- package/lib/models/HttpInstrumentationScope.d.ts.map +1 -0
- package/lib/models/HttpInstrumentationScope.js +2 -0
- package/lib/models/HttpInstrumentationScope.js.map +1 -0
- package/lib/models/HttpStageClock.d.ts +5 -0
- package/lib/models/HttpStageClock.d.ts.map +1 -0
- package/lib/models/HttpStageClock.js +2 -0
- package/lib/models/HttpStageClock.js.map +1 -0
- package/lib/models/httpInstrumentationStateSymbol.d.ts +6 -0
- package/lib/models/httpInstrumentationStateSymbol.d.ts.map +1 -0
- package/lib/models/httpInstrumentationStateSymbol.js +2 -0
- package/lib/models/httpInstrumentationStateSymbol.js.map +1 -0
- package/lib/models/httpInstrumentedHandlerSymbol.d.ts +2 -0
- package/lib/models/httpInstrumentedHandlerSymbol.d.ts.map +1 -0
- package/lib/models/httpInstrumentedHandlerSymbol.js +2 -0
- package/lib/models/httpInstrumentedHandlerSymbol.js.map +1 -0
- package/package.json +7 -7
- package/.gitignore +0 -17
- package/.lintstagedrc.json +0 -4
- package/CHANGELOG.md +0 -11
- package/eslint.config.mjs +0 -23
- package/prettier.config.mjs +0 -3
- package/src/actions/emitHttpInstrumentationEvent.spec.ts +0 -130
- package/src/actions/emitHttpInstrumentationEvent.ts +0 -28
- package/src/actions/httpInstrumentationState.spec.ts +0 -49
- package/src/actions/httpInstrumentationState.ts +0 -93
- package/src/actions/markHttpInstrumentedHandler.ts +0 -16
- package/src/actions/runInstrumentedHttpStage.ts +0 -76
- package/src/calculations/buildHttpInstrumentationContext.spec.ts +0 -37
- package/src/calculations/buildHttpInstrumentationContext.ts +0 -17
- package/src/calculations/redactHttpHeaders.spec.ts +0 -36
- package/src/calculations/redactHttpHeaders.ts +0 -38
- package/src/calculations/startHttpStage.ts +0 -12
- package/src/index.ts +0 -26
- package/src/models/EventSink.ts +0 -3
- package/src/models/HttpInstrumentationContext.ts +0 -7
- package/src/models/HttpInstrumentationEvent.ts +0 -187
- package/src/models/HttpInstrumentationScope.ts +0 -5
- package/src/models/HttpStageClock.ts +0 -4
- package/src/models/httpInstrumentationStateSymbol.ts +0 -8
- package/src/models/httpInstrumentedHandlerSymbol.ts +0 -3
- package/stryker.config.mjs +0 -3
- package/tsconfig.esm.json +0 -11
- package/tsconfig.json +0 -4
- package/vitest.config.mjs +0 -3
- package/vitest.config.stryker.mjs +0 -3
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { type MiddlewarePhase } from '@inversifyjs/framework-core';
|
|
2
|
-
|
|
3
|
-
interface HttpControllerExecutedEvent {
|
|
4
|
-
readonly controller: string;
|
|
5
|
-
readonly duration: number;
|
|
6
|
-
readonly error?: unknown;
|
|
7
|
-
readonly executionId: string;
|
|
8
|
-
readonly method: string;
|
|
9
|
-
readonly parentExecutionId?: string;
|
|
10
|
-
readonly requestId: string;
|
|
11
|
-
readonly startedAt: number;
|
|
12
|
-
readonly timestamp: number;
|
|
13
|
-
readonly type: 'http.controller.executed';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
interface HttpControllerStartedEvent {
|
|
17
|
-
readonly controller: string;
|
|
18
|
-
readonly executionId: string;
|
|
19
|
-
readonly method: string;
|
|
20
|
-
readonly parentExecutionId?: string;
|
|
21
|
-
readonly requestId: string;
|
|
22
|
-
readonly timestamp: number;
|
|
23
|
-
readonly type: 'http.controller.started';
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
interface HttpErrorEvent {
|
|
27
|
-
readonly duration: number;
|
|
28
|
-
readonly error: unknown;
|
|
29
|
-
readonly executionId: string;
|
|
30
|
-
readonly filter?: string;
|
|
31
|
-
readonly parentExecutionId?: string;
|
|
32
|
-
readonly requestId: string;
|
|
33
|
-
readonly startedAt: number;
|
|
34
|
-
readonly timestamp: number;
|
|
35
|
-
readonly type: 'http.error';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
interface HttpGuardExecutedEvent {
|
|
39
|
-
readonly allowed?: boolean;
|
|
40
|
-
readonly duration: number;
|
|
41
|
-
readonly error?: unknown;
|
|
42
|
-
readonly executionId: string;
|
|
43
|
-
readonly guard: string;
|
|
44
|
-
readonly parentExecutionId?: string;
|
|
45
|
-
readonly requestId: string;
|
|
46
|
-
readonly startedAt: number;
|
|
47
|
-
readonly timestamp: number;
|
|
48
|
-
readonly type: 'http.guard.executed';
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
interface HttpGuardStartedEvent {
|
|
52
|
-
readonly executionId: string;
|
|
53
|
-
readonly guard: string;
|
|
54
|
-
readonly parentExecutionId?: string;
|
|
55
|
-
readonly requestId: string;
|
|
56
|
-
readonly timestamp: number;
|
|
57
|
-
readonly type: 'http.guard.started';
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
interface HttpInterceptorExecutedEvent {
|
|
61
|
-
readonly duration: number;
|
|
62
|
-
readonly error?: unknown;
|
|
63
|
-
readonly executionId: string;
|
|
64
|
-
readonly interceptor: string;
|
|
65
|
-
readonly parentExecutionId?: string;
|
|
66
|
-
readonly requestId: string;
|
|
67
|
-
readonly startedAt: number;
|
|
68
|
-
readonly timestamp: number;
|
|
69
|
-
readonly type: 'http.interceptor.executed';
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
interface HttpInterceptorStartedEvent {
|
|
73
|
-
readonly executionId: string;
|
|
74
|
-
readonly interceptor: string;
|
|
75
|
-
readonly parentExecutionId?: string;
|
|
76
|
-
readonly requestId: string;
|
|
77
|
-
readonly timestamp: number;
|
|
78
|
-
readonly type: 'http.interceptor.started';
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
interface HttpMiddlewareExecutedEvent {
|
|
82
|
-
readonly duration: number;
|
|
83
|
-
readonly error?: unknown;
|
|
84
|
-
readonly executionId: string;
|
|
85
|
-
readonly middleware: string;
|
|
86
|
-
readonly parentExecutionId?: string;
|
|
87
|
-
readonly phase: MiddlewarePhase;
|
|
88
|
-
readonly requestId: string;
|
|
89
|
-
readonly startedAt: number;
|
|
90
|
-
readonly timestamp: number;
|
|
91
|
-
readonly type: 'http.middleware.executed';
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
interface HttpMiddlewareStartedEvent {
|
|
95
|
-
readonly executionId: string;
|
|
96
|
-
readonly middleware: string;
|
|
97
|
-
readonly parentExecutionId?: string;
|
|
98
|
-
readonly phase: MiddlewarePhase;
|
|
99
|
-
readonly requestId: string;
|
|
100
|
-
readonly timestamp: number;
|
|
101
|
-
readonly type: 'http.middleware.started';
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
interface HttpNativeMiddlewareExecutedEvent {
|
|
105
|
-
readonly duration: number;
|
|
106
|
-
readonly error?: unknown;
|
|
107
|
-
readonly executionId: string;
|
|
108
|
-
readonly name: string;
|
|
109
|
-
readonly parentExecutionId?: string;
|
|
110
|
-
readonly requestId: string;
|
|
111
|
-
readonly startedAt: number;
|
|
112
|
-
readonly timestamp: number;
|
|
113
|
-
readonly type: 'http.nativeMiddleware.executed';
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
interface HttpNativeMiddlewareStartedEvent {
|
|
117
|
-
readonly executionId: string;
|
|
118
|
-
readonly name: string;
|
|
119
|
-
readonly parentExecutionId?: string;
|
|
120
|
-
readonly requestId: string;
|
|
121
|
-
readonly timestamp: number;
|
|
122
|
-
readonly type: 'http.nativeMiddleware.started';
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
interface HttpPipeExecutedEvent {
|
|
126
|
-
readonly duration: number;
|
|
127
|
-
readonly error?: unknown;
|
|
128
|
-
readonly executionId: string;
|
|
129
|
-
readonly method: string;
|
|
130
|
-
readonly parameterIndex: number;
|
|
131
|
-
readonly parentExecutionId?: string;
|
|
132
|
-
readonly pipe: string;
|
|
133
|
-
readonly requestId: string;
|
|
134
|
-
readonly startedAt: number;
|
|
135
|
-
readonly timestamp: number;
|
|
136
|
-
readonly type: 'http.pipe.executed';
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
interface HttpPipeStartedEvent {
|
|
140
|
-
readonly executionId: string;
|
|
141
|
-
readonly method: string;
|
|
142
|
-
readonly parameterIndex: number;
|
|
143
|
-
readonly parentExecutionId?: string;
|
|
144
|
-
readonly pipe: string;
|
|
145
|
-
readonly requestId: string;
|
|
146
|
-
readonly timestamp: number;
|
|
147
|
-
readonly type: 'http.pipe.started';
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
interface HttpRequestStartedEvent {
|
|
151
|
-
readonly executionId: string;
|
|
152
|
-
readonly headers: Readonly<Record<string, string | readonly string[]>>;
|
|
153
|
-
readonly method: string;
|
|
154
|
-
readonly requestId: string;
|
|
155
|
-
readonly timestamp: number;
|
|
156
|
-
readonly type: 'http.request.started';
|
|
157
|
-
readonly url: string;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
interface HttpResponseSentEvent {
|
|
161
|
-
readonly aborted: boolean;
|
|
162
|
-
readonly duration: number;
|
|
163
|
-
readonly executionId: string;
|
|
164
|
-
readonly headers: Readonly<Record<string, string | readonly string[]>>;
|
|
165
|
-
readonly requestId: string;
|
|
166
|
-
readonly startedAt: number;
|
|
167
|
-
readonly statusCode: number;
|
|
168
|
-
readonly timestamp: number;
|
|
169
|
-
readonly type: 'http.response.sent';
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export type HttpInstrumentationEvent =
|
|
173
|
-
| HttpControllerExecutedEvent
|
|
174
|
-
| HttpControllerStartedEvent
|
|
175
|
-
| HttpErrorEvent
|
|
176
|
-
| HttpGuardExecutedEvent
|
|
177
|
-
| HttpGuardStartedEvent
|
|
178
|
-
| HttpInterceptorExecutedEvent
|
|
179
|
-
| HttpInterceptorStartedEvent
|
|
180
|
-
| HttpMiddlewareExecutedEvent
|
|
181
|
-
| HttpMiddlewareStartedEvent
|
|
182
|
-
| HttpNativeMiddlewareExecutedEvent
|
|
183
|
-
| HttpNativeMiddlewareStartedEvent
|
|
184
|
-
| HttpPipeExecutedEvent
|
|
185
|
-
| HttpPipeStartedEvent
|
|
186
|
-
| HttpRequestStartedEvent
|
|
187
|
-
| HttpResponseSentEvent;
|
package/stryker.config.mjs
DELETED
package/tsconfig.esm.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json.schemastore.org/tsconfig",
|
|
3
|
-
"extends": "@inversifyjs/foundation-typescript-config/tsconfig.base.esm.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"outDir": "./lib",
|
|
6
|
-
"rootDir": "./src",
|
|
7
|
-
"tsBuildInfoFile": "tsconfig.esm.tsbuildinfo",
|
|
8
|
-
"types": ["node"]
|
|
9
|
-
},
|
|
10
|
-
"include": ["src"]
|
|
11
|
-
}
|
package/tsconfig.json
DELETED
package/vitest.config.mjs
DELETED