@pactflow/openapi-pact-comparator 1.11.0 → 1.12.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 +283 -113
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +214 -85
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +214 -85
- package/dist/index.mjs.map +1 -1
- package/dist/server.cjs +71337 -0
- package/dist/server.cjs.map +1 -0
- package/dist/src/cli/runner.d.ts +22 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/server.d.ts +1 -0
- package/dist/src/transform/requestSchema.d.ts +2 -0
- package/package.json +16 -14
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { OpenAPIV2, OpenAPIV3 } from "openapi-types";
|
|
2
|
+
import { type Result } from "../index";
|
|
3
|
+
type OASDocument = OpenAPIV2.Document | OpenAPIV3.Document;
|
|
4
|
+
export interface ComparatorLike {
|
|
5
|
+
compare(pact: unknown): AsyncGenerator<Result>;
|
|
6
|
+
}
|
|
7
|
+
export interface RunnerDependencies {
|
|
8
|
+
readFile: (path: string) => Promise<string>;
|
|
9
|
+
fetch: (url: string) => Promise<Response>;
|
|
10
|
+
output: (message: string) => void;
|
|
11
|
+
createComparator: (oas: OASDocument) => ComparatorLike;
|
|
12
|
+
}
|
|
13
|
+
export declare class Runner {
|
|
14
|
+
private deps;
|
|
15
|
+
constructor(deps?: Partial<RunnerDependencies>);
|
|
16
|
+
private isUrl;
|
|
17
|
+
private readContent;
|
|
18
|
+
private parseContent;
|
|
19
|
+
private readAndParse;
|
|
20
|
+
run(oasPath: string, pactPaths: string[]): Promise<number>;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pactflow/openapi-pact-comparator",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "An OpenAPI Specification and Pact Comparison library",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
|
-
"bin":
|
|
7
|
+
"bin": {
|
|
8
|
+
"opc": "dist/cli.cjs"
|
|
9
|
+
},
|
|
8
10
|
"files": [
|
|
9
11
|
"dist"
|
|
10
12
|
],
|
|
@@ -43,8 +45,8 @@
|
|
|
43
45
|
"license": "MIT",
|
|
44
46
|
"type": "module",
|
|
45
47
|
"devDependencies": {
|
|
46
|
-
"@changesets/cli": "2.29.
|
|
47
|
-
"@eslint/js": "9.39.
|
|
48
|
+
"@changesets/cli": "2.29.8",
|
|
49
|
+
"@eslint/js": "9.39.2",
|
|
48
50
|
"@rollup/plugin-commonjs": "29.0.0",
|
|
49
51
|
"@rollup/plugin-json": "6.1.0",
|
|
50
52
|
"@rollup/plugin-node-resolve": "16.0.3",
|
|
@@ -52,28 +54,28 @@
|
|
|
52
54
|
"@sinclair/typebox": "0.34.41",
|
|
53
55
|
"@types/js-yaml": "4.0.9",
|
|
54
56
|
"@types/lodash-es": "4.17.12",
|
|
55
|
-
"@types/node": "24.10.
|
|
57
|
+
"@types/node": "24.10.4",
|
|
56
58
|
"@types/qs": "6.14.0",
|
|
57
|
-
"@vitest/coverage-v8": "4.0.
|
|
59
|
+
"@vitest/coverage-v8": "4.0.16",
|
|
58
60
|
"ajv": "8.17.1",
|
|
59
61
|
"ajv-formats": "3.0.1",
|
|
60
62
|
"commander": "14.0.2",
|
|
61
|
-
"eslint": "9.39.
|
|
63
|
+
"eslint": "9.39.2",
|
|
62
64
|
"eslint-config-prettier": "10.1.8",
|
|
63
65
|
"find-my-way": "9.3.0",
|
|
64
66
|
"js-yaml": "4.1.1",
|
|
65
|
-
"lodash-es": "4.17.
|
|
67
|
+
"lodash-es": "4.17.22",
|
|
66
68
|
"openapi-types": "12.1.3",
|
|
67
69
|
"parse-multipart-data": "1.5.0",
|
|
68
70
|
"patch-package": "8.0.1",
|
|
69
|
-
"prettier": "3.
|
|
70
|
-
"qs": "6.14.
|
|
71
|
-
"rollup": "4.53.
|
|
71
|
+
"prettier": "3.7.4",
|
|
72
|
+
"qs": "6.14.1",
|
|
73
|
+
"rollup": "4.53.5",
|
|
72
74
|
"tslib": "2.8.1",
|
|
73
|
-
"tsx": "4.
|
|
75
|
+
"tsx": "4.21.0",
|
|
74
76
|
"typescript": "5.9.3",
|
|
75
|
-
"typescript-eslint": "8.
|
|
76
|
-
"vitest": "4.0.
|
|
77
|
+
"typescript-eslint": "8.50.0",
|
|
78
|
+
"vitest": "4.0.16"
|
|
77
79
|
},
|
|
78
80
|
"imports": {
|
|
79
81
|
"#compare/*": "./src/compare/*.ts",
|