swagger-parser-mcp-server 2.3.3 → 3.0.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/README.md +81 -120
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +266 -102
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +2 -283
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +0 -108
- package/dist/schemas.js.map +1 -1
- package/dist/utils/swaggerCache.d.ts +0 -4
- package/dist/utils/swaggerCache.d.ts.map +1 -1
- package/dist/utils/swaggerCache.js +0 -8
- package/dist/utils/swaggerCache.js.map +1 -1
- package/package.json +3 -11
- package/dist/application/snapshot/createSnapshotRuntime.d.ts +0 -2
- package/dist/application/snapshot/createSnapshotRuntime.d.ts.map +0 -1
- package/dist/application/snapshot/createSnapshotRuntime.js +0 -2
- package/dist/application/snapshot/createSnapshotRuntime.js.map +0 -1
- package/dist/application/snapshot/snapshotCaptureService.d.ts +0 -90
- package/dist/application/snapshot/snapshotCaptureService.d.ts.map +0 -1
- package/dist/application/snapshot/snapshotCaptureService.js +0 -394
- package/dist/application/snapshot/snapshotCaptureService.js.map +0 -1
- package/dist/application/snapshot/snapshotRepository.d.ts +0 -77
- package/dist/application/snapshot/snapshotRepository.d.ts.map +0 -1
- package/dist/application/snapshot/snapshotRepository.js +0 -2
- package/dist/application/snapshot/snapshotRepository.js.map +0 -1
- package/dist/domain/canonical/canonicalSnapshot.d.ts +0 -61
- package/dist/domain/canonical/canonicalSnapshot.d.ts.map +0 -1
- package/dist/domain/canonical/canonicalSnapshot.js +0 -300
- package/dist/domain/canonical/canonicalSnapshot.js.map +0 -1
- package/dist/domain/contracts/runtimeEnvironmentContract.d.ts +0 -21
- package/dist/domain/contracts/runtimeEnvironmentContract.d.ts.map +0 -1
- package/dist/domain/contracts/runtimeEnvironmentContract.js +0 -50
- package/dist/domain/contracts/runtimeEnvironmentContract.js.map +0 -1
- package/dist/domain/contracts/snapshotDiffContract.d.ts +0 -270
- package/dist/domain/contracts/snapshotDiffContract.d.ts.map +0 -1
- package/dist/domain/contracts/snapshotDiffContract.js +0 -99
- package/dist/domain/contracts/snapshotDiffContract.js.map +0 -1
- package/dist/domain/diff/endpointDiffClassifier.d.ts +0 -78
- package/dist/domain/diff/endpointDiffClassifier.d.ts.map +0 -1
- package/dist/domain/diff/endpointDiffClassifier.js +0 -317
- package/dist/domain/diff/endpointDiffClassifier.js.map +0 -1
- package/dist/http.d.ts +0 -3
- package/dist/http.d.ts.map +0 -1
- package/dist/http.js +0 -52
- package/dist/http.js.map +0 -1
- package/dist/infrastructure/postgres/migrationRunner.d.ts +0 -14
- package/dist/infrastructure/postgres/migrationRunner.d.ts.map +0 -1
- package/dist/infrastructure/postgres/migrationRunner.js +0 -161
- package/dist/infrastructure/postgres/migrationRunner.js.map +0 -1
- package/dist/infrastructure/postgres/migrations/001_snapshot_schema.sql +0 -29
- package/dist/infrastructure/postgres/migrations/002_snapshot_change_history.sql +0 -32
- package/dist/infrastructure/postgres/postgresSnapshotRepository.d.ts +0 -25
- package/dist/infrastructure/postgres/postgresSnapshotRepository.d.ts.map +0 -1
- package/dist/infrastructure/postgres/postgresSnapshotRepository.js +0 -323
- package/dist/infrastructure/postgres/postgresSnapshotRepository.js.map +0 -1
- package/dist/infrastructure/postgres/runMigrations.d.ts +0 -3
- package/dist/infrastructure/postgres/runMigrations.d.ts.map +0 -1
- package/dist/infrastructure/postgres/runMigrations.js +0 -33
- package/dist/infrastructure/postgres/runMigrations.js.map +0 -1
- package/dist/infrastructure/runtime/createSnapshotRuntime.d.ts +0 -17
- package/dist/infrastructure/runtime/createSnapshotRuntime.d.ts.map +0 -1
- package/dist/infrastructure/runtime/createSnapshotRuntime.js +0 -38
- package/dist/infrastructure/runtime/createSnapshotRuntime.js.map +0 -1
- package/dist/tests/canonicalSnapshot.test.d.ts +0 -2
- package/dist/tests/canonicalSnapshot.test.d.ts.map +0 -1
- package/dist/tests/canonicalSnapshot.test.js +0 -425
- package/dist/tests/canonicalSnapshot.test.js.map +0 -1
- package/dist/tests/endpointDiffClassifier.test.d.ts +0 -2
- package/dist/tests/endpointDiffClassifier.test.d.ts.map +0 -1
- package/dist/tests/endpointDiffClassifier.test.js +0 -633
- package/dist/tests/endpointDiffClassifier.test.js.map +0 -1
- package/dist/tests/httpSnapshotTransport.test.d.ts +0 -2
- package/dist/tests/httpSnapshotTransport.test.d.ts.map +0 -1
- package/dist/tests/httpSnapshotTransport.test.js +0 -356
- package/dist/tests/httpSnapshotTransport.test.js.map +0 -1
- package/dist/tests/indexLifecycle.test.d.ts +0 -2
- package/dist/tests/indexLifecycle.test.d.ts.map +0 -1
- package/dist/tests/indexLifecycle.test.js +0 -44
- package/dist/tests/indexLifecycle.test.js.map +0 -1
- package/dist/tests/mcpSnapshotTools.test.d.ts +0 -2
- package/dist/tests/mcpSnapshotTools.test.d.ts.map +0 -1
- package/dist/tests/mcpSnapshotTools.test.js +0 -316
- package/dist/tests/mcpSnapshotTools.test.js.map +0 -1
- package/dist/tests/postgresMigrationSmoke.test.d.ts +0 -2
- package/dist/tests/postgresMigrationSmoke.test.d.ts.map +0 -1
- package/dist/tests/postgresMigrationSmoke.test.js +0 -187
- package/dist/tests/postgresMigrationSmoke.test.js.map +0 -1
- package/dist/tests/realPostgresTestSchema.d.ts +0 -10
- package/dist/tests/realPostgresTestSchema.d.ts.map +0 -1
- package/dist/tests/realPostgresTestSchema.js +0 -73
- package/dist/tests/realPostgresTestSchema.js.map +0 -1
- package/dist/tests/snapshotCapturePipeline.test.d.ts +0 -2
- package/dist/tests/snapshotCapturePipeline.test.d.ts.map +0 -1
- package/dist/tests/snapshotCapturePipeline.test.js +0 -475
- package/dist/tests/snapshotCapturePipeline.test.js.map +0 -1
- package/dist/tests/snapshotDiffContract.test.d.ts +0 -2
- package/dist/tests/snapshotDiffContract.test.d.ts.map +0 -1
- package/dist/tests/snapshotDiffContract.test.js +0 -156
- package/dist/tests/snapshotDiffContract.test.js.map +0 -1
- package/dist/tests/snapshotPersistence.real.test.d.ts +0 -2
- package/dist/tests/snapshotPersistence.real.test.d.ts.map +0 -1
- package/dist/tests/snapshotPersistence.real.test.js +0 -310
- package/dist/tests/snapshotPersistence.real.test.js.map +0 -1
- package/dist/tests/webServerRuntime.test.d.ts +0 -2
- package/dist/tests/webServerRuntime.test.d.ts.map +0 -1
- package/dist/tests/webServerRuntime.test.js +0 -123
- package/dist/tests/webServerRuntime.test.js.map +0 -1
- package/dist/transport/createSnapshotToolRuntime.d.ts +0 -7
- package/dist/transport/createSnapshotToolRuntime.d.ts.map +0 -1
- package/dist/transport/createSnapshotToolRuntime.js +0 -40
- package/dist/transport/createSnapshotToolRuntime.js.map +0 -1
- package/dist/transport/httpSnapshotServer.d.ts +0 -11
- package/dist/transport/httpSnapshotServer.d.ts.map +0 -1
- package/dist/transport/httpSnapshotServer.js +0 -216
- package/dist/transport/httpSnapshotServer.js.map +0 -1
- package/dist/transport/mcpToolRouter.d.ts +0 -81
- package/dist/transport/mcpToolRouter.d.ts.map +0 -1
- package/dist/transport/mcpToolRouter.js +0 -416
- package/dist/transport/mcpToolRouter.js.map +0 -1
- package/dist/transport/webServerRuntime.d.ts +0 -17
- package/dist/transport/webServerRuntime.d.ts.map +0 -1
- package/dist/transport/webServerRuntime.js +0 -73
- package/dist/transport/webServerRuntime.js.map +0 -1
- package/dist/web/dashboard.css +0 -411
- package/dist/web/dashboard.html +0 -141
- package/dist/web/dashboard.js +0 -540
package/dist/schemas.d.ts
CHANGED
|
@@ -33,12 +33,12 @@ export declare const getPathDetailsSchema: z.ZodObject<{
|
|
|
33
33
|
method: z.ZodEnum<["get", "post", "put", "delete", "patch", "head", "options", "trace"]>;
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
35
|
path: string;
|
|
36
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace";
|
|
37
36
|
url: string;
|
|
37
|
+
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace";
|
|
38
38
|
}, {
|
|
39
39
|
path: string;
|
|
40
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace";
|
|
41
40
|
url: string;
|
|
41
|
+
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace";
|
|
42
42
|
}>;
|
|
43
43
|
export declare const resolveSchemaSchema: z.ZodObject<{
|
|
44
44
|
url: z.ZodString;
|
|
@@ -50,290 +50,9 @@ export declare const resolveSchemaSchema: z.ZodObject<{
|
|
|
50
50
|
url: string;
|
|
51
51
|
ref: string;
|
|
52
52
|
}>;
|
|
53
|
-
export declare const captureSnapshotSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
54
|
-
export declare const listSnapshotsSchema: z.ZodObject<{
|
|
55
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
56
|
-
}, "strict", z.ZodTypeAny, {
|
|
57
|
-
limit?: number | undefined;
|
|
58
|
-
}, {
|
|
59
|
-
limit?: number | undefined;
|
|
60
|
-
}>;
|
|
61
|
-
export declare const getSnapshotDiffSchema: z.ZodObject<{
|
|
62
|
-
baselineSnapshotId: z.ZodString;
|
|
63
|
-
targetSnapshotId: z.ZodString;
|
|
64
|
-
}, "strict", z.ZodTypeAny, {
|
|
65
|
-
baselineSnapshotId: string;
|
|
66
|
-
targetSnapshotId: string;
|
|
67
|
-
}, {
|
|
68
|
-
baselineSnapshotId: string;
|
|
69
|
-
targetSnapshotId: string;
|
|
70
|
-
}>;
|
|
71
|
-
export declare const getEndpointDiffDetailSchema: z.ZodObject<{
|
|
72
|
-
baselineSnapshotId: z.ZodString;
|
|
73
|
-
targetSnapshotId: z.ZodString;
|
|
74
|
-
path: z.ZodString;
|
|
75
|
-
method: z.ZodEnum<["get", "post", "put", "delete", "patch", "head", "options", "trace"]>;
|
|
76
|
-
}, "strict", z.ZodTypeAny, {
|
|
77
|
-
path: string;
|
|
78
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace";
|
|
79
|
-
baselineSnapshotId: string;
|
|
80
|
-
targetSnapshotId: string;
|
|
81
|
-
}, {
|
|
82
|
-
path: string;
|
|
83
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace";
|
|
84
|
-
baselineSnapshotId: string;
|
|
85
|
-
targetSnapshotId: string;
|
|
86
|
-
}>;
|
|
87
|
-
export declare const listEndpointChangeHistorySchema: z.ZodEffects<z.ZodObject<{
|
|
88
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
89
|
-
path: z.ZodOptional<z.ZodString>;
|
|
90
|
-
method: z.ZodOptional<z.ZodEnum<["get", "post", "put", "delete", "patch", "head", "options", "trace"]>>;
|
|
91
|
-
}, "strict", z.ZodTypeAny, {
|
|
92
|
-
path?: string | undefined;
|
|
93
|
-
method?: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace" | undefined;
|
|
94
|
-
limit?: number | undefined;
|
|
95
|
-
}, {
|
|
96
|
-
path?: string | undefined;
|
|
97
|
-
method?: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace" | undefined;
|
|
98
|
-
limit?: number | undefined;
|
|
99
|
-
}>, {
|
|
100
|
-
path?: string | undefined;
|
|
101
|
-
method?: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace" | undefined;
|
|
102
|
-
limit?: number | undefined;
|
|
103
|
-
}, {
|
|
104
|
-
path?: string | undefined;
|
|
105
|
-
method?: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace" | undefined;
|
|
106
|
-
limit?: number | undefined;
|
|
107
|
-
}>;
|
|
108
|
-
export declare const listSnapshotItemSchema: z.ZodObject<{
|
|
109
|
-
id: z.ZodString;
|
|
110
|
-
sourceId: z.ZodString;
|
|
111
|
-
specHash: z.ZodString;
|
|
112
|
-
documentFingerprint: z.ZodString;
|
|
113
|
-
capturedAt: z.ZodString;
|
|
114
|
-
}, "strict", z.ZodTypeAny, {
|
|
115
|
-
specHash: string;
|
|
116
|
-
sourceId: string;
|
|
117
|
-
documentFingerprint: string;
|
|
118
|
-
id: string;
|
|
119
|
-
capturedAt: string;
|
|
120
|
-
}, {
|
|
121
|
-
specHash: string;
|
|
122
|
-
sourceId: string;
|
|
123
|
-
documentFingerprint: string;
|
|
124
|
-
id: string;
|
|
125
|
-
capturedAt: string;
|
|
126
|
-
}>;
|
|
127
|
-
export declare const listSnapshotsResultSchema: z.ZodObject<{
|
|
128
|
-
projectKey: z.ZodString;
|
|
129
|
-
sourceUrl: z.ZodString;
|
|
130
|
-
snapshots: z.ZodArray<z.ZodObject<{
|
|
131
|
-
id: z.ZodString;
|
|
132
|
-
sourceId: z.ZodString;
|
|
133
|
-
specHash: z.ZodString;
|
|
134
|
-
documentFingerprint: z.ZodString;
|
|
135
|
-
capturedAt: z.ZodString;
|
|
136
|
-
}, "strict", z.ZodTypeAny, {
|
|
137
|
-
specHash: string;
|
|
138
|
-
sourceId: string;
|
|
139
|
-
documentFingerprint: string;
|
|
140
|
-
id: string;
|
|
141
|
-
capturedAt: string;
|
|
142
|
-
}, {
|
|
143
|
-
specHash: string;
|
|
144
|
-
sourceId: string;
|
|
145
|
-
documentFingerprint: string;
|
|
146
|
-
id: string;
|
|
147
|
-
capturedAt: string;
|
|
148
|
-
}>, "many">;
|
|
149
|
-
}, "strict", z.ZodTypeAny, {
|
|
150
|
-
projectKey: string;
|
|
151
|
-
sourceUrl: string;
|
|
152
|
-
snapshots: {
|
|
153
|
-
specHash: string;
|
|
154
|
-
sourceId: string;
|
|
155
|
-
documentFingerprint: string;
|
|
156
|
-
id: string;
|
|
157
|
-
capturedAt: string;
|
|
158
|
-
}[];
|
|
159
|
-
}, {
|
|
160
|
-
projectKey: string;
|
|
161
|
-
sourceUrl: string;
|
|
162
|
-
snapshots: {
|
|
163
|
-
specHash: string;
|
|
164
|
-
sourceId: string;
|
|
165
|
-
documentFingerprint: string;
|
|
166
|
-
id: string;
|
|
167
|
-
capturedAt: string;
|
|
168
|
-
}[];
|
|
169
|
-
}>;
|
|
170
|
-
export declare const endpointDiffDetailOutputSchema: z.ZodObject<{
|
|
171
|
-
baselineSnapshotId: z.ZodString;
|
|
172
|
-
targetSnapshotId: z.ZodString;
|
|
173
|
-
path: z.ZodString;
|
|
174
|
-
method: z.ZodEnum<["get", "post", "put", "delete", "patch", "head", "options", "trace"]>;
|
|
175
|
-
hasChange: z.ZodBoolean;
|
|
176
|
-
classification: z.ZodNullable<z.ZodEnum<["breaking", "non-breaking", "info"]>>;
|
|
177
|
-
changeReason: z.ZodNullable<z.ZodString>;
|
|
178
|
-
details: z.ZodArray<z.ZodObject<{
|
|
179
|
-
reason: z.ZodString;
|
|
180
|
-
classification: z.ZodEnum<["breaking", "non-breaking", "info"]>;
|
|
181
|
-
message: z.ZodString;
|
|
182
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
183
|
-
}, "strict", z.ZodTypeAny, {
|
|
184
|
-
message: string;
|
|
185
|
-
classification: "breaking" | "non-breaking" | "info";
|
|
186
|
-
reason: string;
|
|
187
|
-
metadata?: Record<string, unknown> | undefined;
|
|
188
|
-
}, {
|
|
189
|
-
message: string;
|
|
190
|
-
classification: "breaking" | "non-breaking" | "info";
|
|
191
|
-
reason: string;
|
|
192
|
-
metadata?: Record<string, unknown> | undefined;
|
|
193
|
-
}>, "many">;
|
|
194
|
-
before: z.ZodNullable<z.ZodUnknown>;
|
|
195
|
-
after: z.ZodNullable<z.ZodUnknown>;
|
|
196
|
-
}, "strict", z.ZodTypeAny, {
|
|
197
|
-
path: string;
|
|
198
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace";
|
|
199
|
-
baselineSnapshotId: string;
|
|
200
|
-
targetSnapshotId: string;
|
|
201
|
-
classification: "breaking" | "non-breaking" | "info" | null;
|
|
202
|
-
changeReason: string | null;
|
|
203
|
-
hasChange: boolean;
|
|
204
|
-
details: {
|
|
205
|
-
message: string;
|
|
206
|
-
classification: "breaking" | "non-breaking" | "info";
|
|
207
|
-
reason: string;
|
|
208
|
-
metadata?: Record<string, unknown> | undefined;
|
|
209
|
-
}[];
|
|
210
|
-
before?: unknown;
|
|
211
|
-
after?: unknown;
|
|
212
|
-
}, {
|
|
213
|
-
path: string;
|
|
214
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace";
|
|
215
|
-
baselineSnapshotId: string;
|
|
216
|
-
targetSnapshotId: string;
|
|
217
|
-
classification: "breaking" | "non-breaking" | "info" | null;
|
|
218
|
-
changeReason: string | null;
|
|
219
|
-
hasChange: boolean;
|
|
220
|
-
details: {
|
|
221
|
-
message: string;
|
|
222
|
-
classification: "breaking" | "non-breaking" | "info";
|
|
223
|
-
reason: string;
|
|
224
|
-
metadata?: Record<string, unknown> | undefined;
|
|
225
|
-
}[];
|
|
226
|
-
before?: unknown;
|
|
227
|
-
after?: unknown;
|
|
228
|
-
}>;
|
|
229
|
-
export declare const endpointChangeHistoryEventSchema: z.ZodObject<{
|
|
230
|
-
baselineSnapshotId: z.ZodString;
|
|
231
|
-
targetSnapshotId: z.ZodString;
|
|
232
|
-
path: z.ZodString;
|
|
233
|
-
method: z.ZodEnum<["get", "post", "put", "delete", "patch", "head", "options", "trace"]>;
|
|
234
|
-
classification: z.ZodEnum<["breaking", "non-breaking", "info"]>;
|
|
235
|
-
changeReason: z.ZodString;
|
|
236
|
-
changedAt: z.ZodString;
|
|
237
|
-
}, "strict", z.ZodTypeAny, {
|
|
238
|
-
path: string;
|
|
239
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace";
|
|
240
|
-
baselineSnapshotId: string;
|
|
241
|
-
targetSnapshotId: string;
|
|
242
|
-
classification: "breaking" | "non-breaking" | "info";
|
|
243
|
-
changeReason: string;
|
|
244
|
-
changedAt: string;
|
|
245
|
-
}, {
|
|
246
|
-
path: string;
|
|
247
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace";
|
|
248
|
-
baselineSnapshotId: string;
|
|
249
|
-
targetSnapshotId: string;
|
|
250
|
-
classification: "breaking" | "non-breaking" | "info";
|
|
251
|
-
changeReason: string;
|
|
252
|
-
changedAt: string;
|
|
253
|
-
}>;
|
|
254
|
-
export declare const listEndpointChangeHistoryResultSchema: z.ZodObject<{
|
|
255
|
-
projectKey: z.ZodString;
|
|
256
|
-
sourceUrl: z.ZodString;
|
|
257
|
-
filter: z.ZodObject<{
|
|
258
|
-
path: z.ZodNullable<z.ZodString>;
|
|
259
|
-
method: z.ZodNullable<z.ZodEnum<["get", "post", "put", "delete", "patch", "head", "options", "trace"]>>;
|
|
260
|
-
}, "strict", z.ZodTypeAny, {
|
|
261
|
-
path: string | null;
|
|
262
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace" | null;
|
|
263
|
-
}, {
|
|
264
|
-
path: string | null;
|
|
265
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace" | null;
|
|
266
|
-
}>;
|
|
267
|
-
events: z.ZodArray<z.ZodObject<{
|
|
268
|
-
baselineSnapshotId: z.ZodString;
|
|
269
|
-
targetSnapshotId: z.ZodString;
|
|
270
|
-
path: z.ZodString;
|
|
271
|
-
method: z.ZodEnum<["get", "post", "put", "delete", "patch", "head", "options", "trace"]>;
|
|
272
|
-
classification: z.ZodEnum<["breaking", "non-breaking", "info"]>;
|
|
273
|
-
changeReason: z.ZodString;
|
|
274
|
-
changedAt: z.ZodString;
|
|
275
|
-
}, "strict", z.ZodTypeAny, {
|
|
276
|
-
path: string;
|
|
277
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace";
|
|
278
|
-
baselineSnapshotId: string;
|
|
279
|
-
targetSnapshotId: string;
|
|
280
|
-
classification: "breaking" | "non-breaking" | "info";
|
|
281
|
-
changeReason: string;
|
|
282
|
-
changedAt: string;
|
|
283
|
-
}, {
|
|
284
|
-
path: string;
|
|
285
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace";
|
|
286
|
-
baselineSnapshotId: string;
|
|
287
|
-
targetSnapshotId: string;
|
|
288
|
-
classification: "breaking" | "non-breaking" | "info";
|
|
289
|
-
changeReason: string;
|
|
290
|
-
changedAt: string;
|
|
291
|
-
}>, "many">;
|
|
292
|
-
}, "strict", z.ZodTypeAny, {
|
|
293
|
-
filter: {
|
|
294
|
-
path: string | null;
|
|
295
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace" | null;
|
|
296
|
-
};
|
|
297
|
-
projectKey: string;
|
|
298
|
-
sourceUrl: string;
|
|
299
|
-
events: {
|
|
300
|
-
path: string;
|
|
301
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace";
|
|
302
|
-
baselineSnapshotId: string;
|
|
303
|
-
targetSnapshotId: string;
|
|
304
|
-
classification: "breaking" | "non-breaking" | "info";
|
|
305
|
-
changeReason: string;
|
|
306
|
-
changedAt: string;
|
|
307
|
-
}[];
|
|
308
|
-
}, {
|
|
309
|
-
filter: {
|
|
310
|
-
path: string | null;
|
|
311
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace" | null;
|
|
312
|
-
};
|
|
313
|
-
projectKey: string;
|
|
314
|
-
sourceUrl: string;
|
|
315
|
-
events: {
|
|
316
|
-
path: string;
|
|
317
|
-
method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace";
|
|
318
|
-
baselineSnapshotId: string;
|
|
319
|
-
targetSnapshotId: string;
|
|
320
|
-
classification: "breaking" | "non-breaking" | "info";
|
|
321
|
-
changeReason: string;
|
|
322
|
-
changedAt: string;
|
|
323
|
-
}[];
|
|
324
|
-
}>;
|
|
325
53
|
export type LoadSwaggerInput = z.infer<typeof loadSwaggerSchema>;
|
|
326
54
|
export type GetControllersInput = z.infer<typeof getControllersSchema>;
|
|
327
55
|
export type GetPathsByControllerInput = z.infer<typeof getPathsByControllerSchema>;
|
|
328
56
|
export type GetPathDetailsInput = z.infer<typeof getPathDetailsSchema>;
|
|
329
57
|
export type ResolveSchemaInput = z.infer<typeof resolveSchemaSchema>;
|
|
330
|
-
export type CaptureSnapshotInput = z.infer<typeof captureSnapshotSchema>;
|
|
331
|
-
export type ListSnapshotsInput = z.infer<typeof listSnapshotsSchema>;
|
|
332
|
-
export type GetSnapshotDiffInput = z.infer<typeof getSnapshotDiffSchema>;
|
|
333
|
-
export type GetEndpointDiffDetailInput = z.infer<typeof getEndpointDiffDetailSchema>;
|
|
334
|
-
export type ListEndpointChangeHistoryInput = z.infer<typeof listEndpointChangeHistorySchema>;
|
|
335
|
-
export type ListSnapshotsResult = z.infer<typeof listSnapshotsResultSchema>;
|
|
336
|
-
export type EndpointDiffDetailOutput = z.infer<typeof endpointDiffDetailOutputSchema>;
|
|
337
|
-
export type EndpointChangeHistoryEvent = z.infer<typeof endpointChangeHistoryEventSchema>;
|
|
338
|
-
export type ListEndpointChangeHistoryResult = z.infer<typeof listEndpointChangeHistoryResultSchema>;
|
|
339
58
|
//# sourceMappingURL=schemas.d.ts.map
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;GAGG;AAGH,eAAO,MAAM,iBAAiB;;;;;;EAE5B,CAAC;AAGH,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAC;AAGH,eAAO,MAAM,0BAA0B;;;;;;;;;EAGrC,CAAC;AAGH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAM/B,CAAC;AAGH,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AAGH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACnF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/schemas.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { SUPPORTED_HTTP_METHODS } from './utils/types.js';
|
|
3
|
-
const httpMethodSchema = z.enum(SUPPORTED_HTTP_METHODS, {
|
|
4
|
-
errorMap: () => ({ message: 'Method must be a valid HTTP method' }),
|
|
5
|
-
});
|
|
6
3
|
/**
|
|
7
4
|
* Zod schemas for MCP tool input validation
|
|
8
5
|
* These schemas provide runtime validation and type safety for all MCP tools
|
|
@@ -33,109 +30,4 @@ export const resolveSchemaSchema = z.object({
|
|
|
33
30
|
url: z.string().url('Must be a valid URL'),
|
|
34
31
|
ref: z.string().regex(/^#\//, 'Reference must start with #/ (e.g., #/components/schemas/User)'),
|
|
35
32
|
});
|
|
36
|
-
// Schema for capture_snapshot tool
|
|
37
|
-
export const captureSnapshotSchema = z.object({}).strict();
|
|
38
|
-
// Schema for list_snapshots tool
|
|
39
|
-
export const listSnapshotsSchema = z
|
|
40
|
-
.object({
|
|
41
|
-
limit: z.number().int().min(1).max(200).optional(),
|
|
42
|
-
})
|
|
43
|
-
.strict();
|
|
44
|
-
// Schema for get_snapshot_diff tool
|
|
45
|
-
export const getSnapshotDiffSchema = z
|
|
46
|
-
.object({
|
|
47
|
-
baselineSnapshotId: z.string().min(1, 'baselineSnapshotId is required'),
|
|
48
|
-
targetSnapshotId: z.string().min(1, 'targetSnapshotId is required'),
|
|
49
|
-
})
|
|
50
|
-
.strict();
|
|
51
|
-
// Schema for get_endpoint_diff_detail tool
|
|
52
|
-
export const getEndpointDiffDetailSchema = z
|
|
53
|
-
.object({
|
|
54
|
-
baselineSnapshotId: z.string().min(1, 'baselineSnapshotId is required'),
|
|
55
|
-
targetSnapshotId: z.string().min(1, 'targetSnapshotId is required'),
|
|
56
|
-
path: z.string().min(1, 'path is required'),
|
|
57
|
-
method: httpMethodSchema,
|
|
58
|
-
})
|
|
59
|
-
.strict();
|
|
60
|
-
export const listEndpointChangeHistorySchema = z
|
|
61
|
-
.object({
|
|
62
|
-
limit: z.number().int().min(1).max(200).optional(),
|
|
63
|
-
path: z.string().min(1, 'path must not be empty').optional(),
|
|
64
|
-
method: httpMethodSchema.optional(),
|
|
65
|
-
})
|
|
66
|
-
.strict()
|
|
67
|
-
.superRefine((value, context) => {
|
|
68
|
-
const hasPath = typeof value.path === 'string';
|
|
69
|
-
const hasMethod = typeof value.method === 'string';
|
|
70
|
-
if (hasPath !== hasMethod) {
|
|
71
|
-
context.addIssue({
|
|
72
|
-
code: z.ZodIssueCode.custom,
|
|
73
|
-
message: 'path and method must be provided together.',
|
|
74
|
-
path: hasPath ? ['method'] : ['path'],
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
// Schema for list_snapshots output
|
|
79
|
-
export const listSnapshotItemSchema = z
|
|
80
|
-
.object({
|
|
81
|
-
id: z.string().min(1),
|
|
82
|
-
sourceId: z.string().min(1),
|
|
83
|
-
specHash: z.string().min(1),
|
|
84
|
-
documentFingerprint: z.string().min(1),
|
|
85
|
-
capturedAt: z.string().datetime({ offset: true }),
|
|
86
|
-
})
|
|
87
|
-
.strict();
|
|
88
|
-
export const listSnapshotsResultSchema = z
|
|
89
|
-
.object({
|
|
90
|
-
projectKey: z.string().min(1),
|
|
91
|
-
sourceUrl: z.string().url(),
|
|
92
|
-
snapshots: z.array(listSnapshotItemSchema),
|
|
93
|
-
})
|
|
94
|
-
.strict();
|
|
95
|
-
// Schema for get_endpoint_diff_detail output
|
|
96
|
-
export const endpointDiffDetailOutputSchema = z
|
|
97
|
-
.object({
|
|
98
|
-
baselineSnapshotId: z.string().min(1),
|
|
99
|
-
targetSnapshotId: z.string().min(1),
|
|
100
|
-
path: z.string().min(1),
|
|
101
|
-
method: z.enum(SUPPORTED_HTTP_METHODS),
|
|
102
|
-
hasChange: z.boolean(),
|
|
103
|
-
classification: z.enum(['breaking', 'non-breaking', 'info']).nullable(),
|
|
104
|
-
changeReason: z.string().nullable(),
|
|
105
|
-
details: z.array(z
|
|
106
|
-
.object({
|
|
107
|
-
reason: z.string().min(1),
|
|
108
|
-
classification: z.enum(['breaking', 'non-breaking', 'info']),
|
|
109
|
-
message: z.string().min(1),
|
|
110
|
-
metadata: z.record(z.unknown()).optional(),
|
|
111
|
-
})
|
|
112
|
-
.strict()),
|
|
113
|
-
before: z.unknown().nullable(),
|
|
114
|
-
after: z.unknown().nullable(),
|
|
115
|
-
})
|
|
116
|
-
.strict();
|
|
117
|
-
export const endpointChangeHistoryEventSchema = z
|
|
118
|
-
.object({
|
|
119
|
-
baselineSnapshotId: z.string().min(1),
|
|
120
|
-
targetSnapshotId: z.string().min(1),
|
|
121
|
-
path: z.string().min(1),
|
|
122
|
-
method: httpMethodSchema,
|
|
123
|
-
classification: z.enum(['breaking', 'non-breaking', 'info']),
|
|
124
|
-
changeReason: z.string().min(1),
|
|
125
|
-
changedAt: z.string().datetime({ offset: true }),
|
|
126
|
-
})
|
|
127
|
-
.strict();
|
|
128
|
-
export const listEndpointChangeHistoryResultSchema = z
|
|
129
|
-
.object({
|
|
130
|
-
projectKey: z.string().min(1),
|
|
131
|
-
sourceUrl: z.string().url(),
|
|
132
|
-
filter: z
|
|
133
|
-
.object({
|
|
134
|
-
path: z.string().min(1).nullable(),
|
|
135
|
-
method: httpMethodSchema.nullable(),
|
|
136
|
-
})
|
|
137
|
-
.strict(),
|
|
138
|
-
events: z.array(endpointChangeHistoryEventSchema),
|
|
139
|
-
})
|
|
140
|
-
.strict();
|
|
141
33
|
//# sourceMappingURL=schemas.js.map
|
package/dist/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;;GAGG;AAEH,+BAA+B;AAC/B,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,qBAAqB,CAAC;CAC3C,CAAC,CAAC;AAEH,kCAAkC;AAClC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,qBAAqB,CAAC;CAC3C,CAAC,CAAC;AAEH,0CAA0C;AAC1C,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,qBAAqB,CAAC;IAC1C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,6BAA6B,CAAC;CAC7D,CAAC,CAAC;AAEH,mCAAmC;AACnC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,qBAAqB,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC;IAC3C,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,EAAE;QACrC,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,oCAAoC,EAAE,CAAC;KACpE,CAAC;CACH,CAAC,CAAC;AAEH,iCAAiC;AACjC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,qBAAqB,CAAC;IAC1C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,gEAAgE,CAAC;CAChG,CAAC,CAAC"}
|
|
@@ -9,10 +9,6 @@ export declare class SwaggerCache {
|
|
|
9
9
|
* Loads and caches an OpenAPI document from URL
|
|
10
10
|
*/
|
|
11
11
|
load(url: string): Promise<OpenAPIDocument>;
|
|
12
|
-
/**
|
|
13
|
-
* Always fetches the latest OpenAPI document from URL and refreshes cache
|
|
14
|
-
*/
|
|
15
|
-
loadFresh(url: string): Promise<OpenAPIDocument>;
|
|
16
12
|
/**
|
|
17
13
|
* Gets a cached OpenAPI document
|
|
18
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swaggerCache.d.ts","sourceRoot":"","sources":["../../src/utils/swaggerCache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAA2C;IACxD,OAAO,CAAC,eAAe,CAAoD;IAE3E;;OAEG;IACG,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IA2BjD;;OAEG;
|
|
1
|
+
{"version":3,"file":"swaggerCache.d.ts","sourceRoot":"","sources":["../../src/utils/swaggerCache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAA2C;IACxD,OAAO,CAAC,eAAe,CAAoD;IAE3E;;OAEG;IACG,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IA2BjD;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAI7C;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIzB;;OAEG;IACG,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAQtD;;OAEG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI3B;;OAEG;IACH,QAAQ,IAAI,IAAI;IAKhB;;OAEG;IACH,QAAQ;;;;;IAQR;;OAEG;IACG,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAY5C;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAsB/B;;OAEG;YACW,YAAY;CA0B3B"}
|
|
@@ -34,14 +34,6 @@ export class SwaggerCache {
|
|
|
34
34
|
this.loadingPromises.delete(url);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Always fetches the latest OpenAPI document from URL and refreshes cache
|
|
39
|
-
*/
|
|
40
|
-
async loadFresh(url) {
|
|
41
|
-
const swagger = await this.fetchSwagger(url);
|
|
42
|
-
this.cache.set(url, swagger);
|
|
43
|
-
return swagger;
|
|
44
|
-
}
|
|
45
37
|
/**
|
|
46
38
|
* Gets a cached OpenAPI document
|
|
47
39
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swaggerCache.js","sourceRoot":"","sources":["../../src/utils/swaggerCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;GAEG;AACH,MAAM,OAAO,YAAY;IACf,KAAK,GAAiC,IAAI,GAAG,EAAE,CAAC;IAChD,eAAe,GAA0C,IAAI,GAAG,EAAE,CAAC;IAE3E;;OAEG;IACH,KAAK,CAAC,IAAI,CAAC,GAAW;QACpB,sCAAsC;QACtC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACnC,IAAI,MAAM;gBAAE,OAAO,MAAM,CAAC;QAC5B,CAAC;QAED,kDAAkD;QAClD,IAAI,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAClC,MAAM,cAAc,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACrD,IAAI,cAAc;gBAAE,OAAO,cAAc,CAAC;QAC5C,CAAC;QAED,yBAAyB;QACzB,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QAC9C,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAE9C,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC;YACrC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;YAC7B,OAAO,OAAO,CAAC;QACjB,CAAC;gBAAS,CAAC;YACT,2BAA2B;YAC3B,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IAED;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"swaggerCache.js","sourceRoot":"","sources":["../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AQ,IAAI,UAAU,IAAI,KAAK,EAAE,CAAC;gBAC9D,MAAM,UAAU,GAAG,KAA6D,CAAC;gBACjF,MAAM,IAAI,KAAK,CAAC,QAAQ,UAAU,CAAC,QAAQ,CAAC,MAAM,KAAK,UAAU,CAAC,QAAQ,CAAC,UAAU,KAAK,GAAG,GAAG,CAAC,CAAC;YACpG,CAAC;iBAAM,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,IAAI,KAAK,EAAE,CAAC;gBACpE,MAAM,IAAI,KAAK,CAAC,kCAAkC,GAAG,EAAE,CAAC,CAAC;YAC3D,CAAC;iBAAM,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;gBAClG,MAAM,YAAY,GAAG,KAAuC,CAAC;gBAC7D,MAAM,IAAI,KAAK,CAAC,oCAAoC,YAAY,CAAC,OAAO,KAAK,GAAG,GAAG,CAAC,CAAC;YACvF,CAAC;iBAAM,CAAC;gBACN,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC;gBACvF,MAAM,IAAI,KAAK,CAAC,oCAAoC,YAAY,KAAK,GAAG,GAAG,CAAC,CAAC;YAC/E,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "swagger-parser-mcp-server",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "MCP server for parsing Swagger/OpenAPI JSON files",
|
|
5
5
|
"packageManager": "pnpm@9.0.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,15 +17,10 @@
|
|
|
17
17
|
"package.json"
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
|
-
"build": "tsc
|
|
20
|
+
"build": "tsc",
|
|
21
21
|
"dev": "tsx src/index.ts",
|
|
22
|
-
"dev:http": "tsx src/http.ts",
|
|
23
|
-
"migrate": "tsx src/infrastructure/postgres/runMigrations.ts",
|
|
24
22
|
"start": "node dist/index.js",
|
|
25
|
-
"start:http": "node dist/http.js",
|
|
26
23
|
"test": "jest",
|
|
27
|
-
"test:db:mem": "jest --runInBand --cache=false src/tests/postgresMigrationSmoke.test.ts src/tests/snapshotCapturePipeline.test.ts",
|
|
28
|
-
"test:db:real": "node -e \"if(!process.env.TEST_DATABASE_URL){console.error('TEST_DATABASE_URL is required for test:db:real');process.exit(1)}\" && jest --runInBand --cache=false src/tests/snapshotPersistence.real.test.ts",
|
|
29
24
|
"test:watch": "jest --watch",
|
|
30
25
|
"test:coverage": "jest --coverage",
|
|
31
26
|
"lint": "eslint .",
|
|
@@ -55,7 +50,6 @@
|
|
|
55
50
|
"@modelcontextprotocol/sdk": "^1.17.4",
|
|
56
51
|
"axios": "^1.6.0",
|
|
57
52
|
"openapi-types": "^12.1.3",
|
|
58
|
-
"pg": "^8.20.0",
|
|
59
53
|
"swagger-schema-official": "2.0.0-bab6bed",
|
|
60
54
|
"zod": "^3.22.0",
|
|
61
55
|
"zod-to-json-schema": "^3.24.6"
|
|
@@ -64,17 +58,15 @@
|
|
|
64
58
|
"@eslint/js": "^9.32.0",
|
|
65
59
|
"@semantic-release/changelog": "^6.0.3",
|
|
66
60
|
"@semantic-release/git": "^10.0.1",
|
|
67
|
-
"@semantic-release/gitlab": "^13.2
|
|
61
|
+
"@semantic-release/gitlab": "^13.3.2",
|
|
68
62
|
"@types/jest": "^29.5.0",
|
|
69
63
|
"@types/node": "^20.0.0",
|
|
70
|
-
"@types/pg": "^8.18.0",
|
|
71
64
|
"@types/swagger-schema-official": "^2.0.25",
|
|
72
65
|
"eslint": "^9.32.0",
|
|
73
66
|
"eslint-config-prettier": "^10.1.8",
|
|
74
67
|
"eslint-plugin-prettier": "^5.5.3",
|
|
75
68
|
"globals": "^16.3.0",
|
|
76
69
|
"jest": "^29.7.0",
|
|
77
|
-
"pg-mem": "^3.0.14",
|
|
78
70
|
"prettier": "^3.6.2",
|
|
79
71
|
"semantic-release": "^24.2.7",
|
|
80
72
|
"ts-jest": "^29.1.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createSnapshotRuntime.d.ts","sourceRoot":"","sources":["../../../src/application/snapshot/createSnapshotRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,GACtC,MAAM,uDAAuD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createSnapshotRuntime.js","sourceRoot":"","sources":["../../../src/application/snapshot/createSnapshotRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,GAItB,MAAM,uDAAuD,CAAC"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { OpenAPIDocument } from '../../utils/types.js';
|
|
2
|
-
import { CanonicalEndpointSnapshot, CanonicalOperationShape } from '../../domain/canonical/canonicalSnapshot.js';
|
|
3
|
-
import { EndpointChangeDetail } from '../../domain/diff/endpointDiffClassifier.js';
|
|
4
|
-
import { RuntimeEnvironment } from '../../domain/contracts/runtimeEnvironmentContract.js';
|
|
5
|
-
import { SnapshotDiffResult } from '../../domain/contracts/snapshotDiffContract.js';
|
|
6
|
-
import { SnapshotProjectRecord, SnapshotRecord, SnapshotRepository, SnapshotSourceRecord } from './snapshotRepository.js';
|
|
7
|
-
export interface SnapshotDocumentLoader {
|
|
8
|
-
loadFresh(url: string): Promise<OpenAPIDocument>;
|
|
9
|
-
}
|
|
10
|
-
export interface SnapshotCaptureBootstrapResult {
|
|
11
|
-
environment: RuntimeEnvironment;
|
|
12
|
-
project: SnapshotProjectRecord;
|
|
13
|
-
source: SnapshotSourceRecord;
|
|
14
|
-
}
|
|
15
|
-
export interface SnapshotCaptureResult extends SnapshotCaptureBootstrapResult {
|
|
16
|
-
specHash: string;
|
|
17
|
-
snapshot: SnapshotRecord;
|
|
18
|
-
previousSnapshot: SnapshotRecord | null;
|
|
19
|
-
isNoopCapture: boolean;
|
|
20
|
-
diffResult: SnapshotDiffResult;
|
|
21
|
-
}
|
|
22
|
-
export interface SnapshotReplayInput {
|
|
23
|
-
baselineSnapshotId: string;
|
|
24
|
-
targetSnapshotId: string;
|
|
25
|
-
}
|
|
26
|
-
export interface SnapshotListItem {
|
|
27
|
-
id: string;
|
|
28
|
-
sourceId: string;
|
|
29
|
-
specHash: string;
|
|
30
|
-
documentFingerprint: string;
|
|
31
|
-
capturedAt: string;
|
|
32
|
-
}
|
|
33
|
-
export interface EndpointDiffDetailInput extends SnapshotReplayInput {
|
|
34
|
-
path: string;
|
|
35
|
-
method: CanonicalEndpointSnapshot['method'];
|
|
36
|
-
}
|
|
37
|
-
export interface EndpointDiffDetailResult {
|
|
38
|
-
baselineSnapshotId: string;
|
|
39
|
-
targetSnapshotId: string;
|
|
40
|
-
path: string;
|
|
41
|
-
method: CanonicalEndpointSnapshot['method'];
|
|
42
|
-
hasChange: boolean;
|
|
43
|
-
classification: 'breaking' | 'non-breaking' | 'info' | null;
|
|
44
|
-
changeReason: string | null;
|
|
45
|
-
details: EndpointChangeDetail[];
|
|
46
|
-
before: CanonicalOperationShape | null;
|
|
47
|
-
after: CanonicalOperationShape | null;
|
|
48
|
-
}
|
|
49
|
-
export interface EndpointChangeHistoryFilterInput {
|
|
50
|
-
sourceId: string;
|
|
51
|
-
limit?: number;
|
|
52
|
-
path?: string;
|
|
53
|
-
method?: CanonicalEndpointSnapshot['method'];
|
|
54
|
-
}
|
|
55
|
-
export interface EndpointChangeHistoryEvent {
|
|
56
|
-
baselineSnapshotId: string;
|
|
57
|
-
targetSnapshotId: string;
|
|
58
|
-
path: string;
|
|
59
|
-
method: CanonicalEndpointSnapshot['method'];
|
|
60
|
-
classification: 'breaking' | 'non-breaking' | 'info';
|
|
61
|
-
changeReason: string;
|
|
62
|
-
changedAt: string;
|
|
63
|
-
}
|
|
64
|
-
export interface EndpointChangeHistoryTransportResult {
|
|
65
|
-
projectKey: string;
|
|
66
|
-
sourceUrl: string;
|
|
67
|
-
filter: {
|
|
68
|
-
path: string | null;
|
|
69
|
-
method: CanonicalEndpointSnapshot['method'] | null;
|
|
70
|
-
};
|
|
71
|
-
events: EndpointChangeHistoryEvent[];
|
|
72
|
-
}
|
|
73
|
-
export declare function createSpecHash(document: OpenAPIDocument): string;
|
|
74
|
-
export declare class SnapshotCaptureService {
|
|
75
|
-
private readonly repository;
|
|
76
|
-
private readonly loader;
|
|
77
|
-
private readonly now;
|
|
78
|
-
private initializePromise;
|
|
79
|
-
constructor(repository: SnapshotRepository, loader: SnapshotDocumentLoader, now?: () => Date);
|
|
80
|
-
initialize(): Promise<void>;
|
|
81
|
-
private resolveBootstrapContext;
|
|
82
|
-
bootstrap(env: RuntimeEnvironment | NodeJS.ProcessEnv): Promise<SnapshotCaptureBootstrapResult>;
|
|
83
|
-
capture(env: RuntimeEnvironment | NodeJS.ProcessEnv): Promise<SnapshotCaptureResult>;
|
|
84
|
-
listSnapshotsBySource(sourceId: string, limit?: number): Promise<SnapshotListItem[]>;
|
|
85
|
-
listEndpointChangeHistory(input: EndpointChangeHistoryFilterInput): Promise<EndpointChangeHistoryEvent[]>;
|
|
86
|
-
private resolveReplaySnapshots;
|
|
87
|
-
replayDiff(input: SnapshotReplayInput): Promise<SnapshotDiffResult>;
|
|
88
|
-
getEndpointDiffDetail(input: EndpointDiffDetailInput): Promise<EndpointDiffDetailResult>;
|
|
89
|
-
}
|
|
90
|
-
//# sourceMappingURL=snapshotCaptureService.d.ts.map
|