@pactflow/openapi-pact-comparator 2.0.1 → 2.2.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/dist/cli.cjs +277 -213
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +276 -212
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +276 -212
- package/dist/index.mjs.map +1 -1
- package/dist/src/compare/utils/body.d.ts +3 -0
- package/dist/src/results/index.d.ts +1 -1
- package/package.json +4 -5
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type BodyValidationStatus = "validate" | "skip" | "warn";
|
|
2
|
+
export declare const VALIDATABLE_CONTENT_TYPES: readonly ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"];
|
|
3
|
+
export declare const bodyValidationStatus: (contentType: string | undefined, body: unknown, validatableTypes?: string[]) => BodyValidationStatus;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ErrorObject } from "ajv";
|
|
2
2
|
type InfoCode = "message.matched";
|
|
3
3
|
type ErrorCode = "message.headers.incompatible" | "message.no.match" | "message.operation.unknown" | "message.payload.incompatible" | "message.references.missing" | "message.reply.missing" | "message.spec.missing" | "request.accept.incompatible" | "request.authorization.missing" | "request.body.incompatible" | "request.content-type.incompatible" | "request.header.incompatible" | "request.path-or-method.unknown" | "request.query.incompatible" | "request.spec.missing" | "response.body.incompatible" | "response.body.unknown" | "response.content-type.incompatible" | "response.header.incompatible" | "response.header.unknown" | "response.status.unknown";
|
|
4
|
-
type WarningCode = "message.payload.unknown" | "message.response.missing" | "pact-broker.no-pacts-found" | "request.accept.unknown" | "request.body.unknown" | "request.content-type.missing" | "request.content-type.unknown" | "request.header.unknown" | "request.query.unknown" | "response.content-type.unknown" | "response.header.undefined" | "response.status.default";
|
|
4
|
+
type WarningCode = "message.payload.unknown" | "message.payload.unvalidatable" | "message.response.missing" | "pact-broker.no-pacts-found" | "request.accept.unknown" | "request.body.unknown" | "request.body.unvalidatable" | "request.content-type.missing" | "request.content-type.unknown" | "request.header.unknown" | "request.query.unknown" | "response.body.unvalidatable" | "response.content-type.unknown" | "response.header.undefined" | "response.status.default";
|
|
5
5
|
export interface Result {
|
|
6
6
|
code: ErrorCode | WarningCode | InfoCode;
|
|
7
7
|
message: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pactflow/openapi-pact-comparator",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "An OpenAPI Specification and Pact Comparison library",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -25,8 +25,7 @@
|
|
|
25
25
|
"changeset:version": "changeset version",
|
|
26
26
|
"lint": "eslint --max-warnings=0",
|
|
27
27
|
"patch-package": "patch-package",
|
|
28
|
-
"
|
|
29
|
-
"prepare": "npm run build",
|
|
28
|
+
"prepare": "patch-package && npm run build",
|
|
30
29
|
"prettier": "prettier --check .",
|
|
31
30
|
"prettier:fix": "prettier --cache --list-different --write .",
|
|
32
31
|
"start": "node dist/cli.mjs",
|
|
@@ -59,7 +58,7 @@
|
|
|
59
58
|
"@tsconfig/node22": "22.0.5",
|
|
60
59
|
"@types/js-yaml": "4.0.9",
|
|
61
60
|
"@types/lodash-es": "4.17.12",
|
|
62
|
-
"@types/node": "24.
|
|
61
|
+
"@types/node": "24.13.1",
|
|
63
62
|
"@types/qs": "6.15.1",
|
|
64
63
|
"@vitest/coverage-v8": "4.1.8",
|
|
65
64
|
"ajv": "8.20.0",
|
|
@@ -75,7 +74,7 @@
|
|
|
75
74
|
"patch-package": "8.0.1",
|
|
76
75
|
"prettier": "3.8.3",
|
|
77
76
|
"qs": "6.15.2",
|
|
78
|
-
"rollup": "4.61.
|
|
77
|
+
"rollup": "4.61.1",
|
|
79
78
|
"tslib": "2.8.1",
|
|
80
79
|
"tsx": "4.22.4",
|
|
81
80
|
"typescript": "6.0.3",
|