specmatic 2.13.2 → 2.15.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/CONTRIBUTING.MD +4 -4
- package/README.md +6 -6
- package/dist/downloadSpecmaticJar.js +2 -2
- package/package.json +7 -8
- package/specmatic.jar +0 -0
- package/src/downloadSpecmaticJar.js +2 -2
package/CONTRIBUTING.MD
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Thanks for your willingness to contribute!
|
|
4
4
|
|
|
5
|
-
Please check [open issues](https://github.com/
|
|
5
|
+
Please check [open issues](https://github.com/specmatic/specmatic-node/issues?q=is%3Aopen+is%3Aissue). Please respond to questions/bug reports/feature requests!
|
|
6
6
|
|
|
7
7
|
## Project setup
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ Please check [open issues](https://github.com/znsio/specmatic-node/issues?q=is%3
|
|
|
14
14
|
> pull requests from branches on your fork. To do this, run:
|
|
15
15
|
>
|
|
16
16
|
> ```
|
|
17
|
-
> git remote add upstream https://github.com/
|
|
17
|
+
> git remote add upstream https://github.com/specmatic/specmatic-node.git
|
|
18
18
|
> git fetch upstream
|
|
19
19
|
> git branch --set-upstream-to=upstream/master master
|
|
20
20
|
> ```
|
|
@@ -47,14 +47,14 @@ Finally commit
|
|
|
47
47
|
If the specmatic jar version is to be updated, modify the __specmaticVersion__ property in __package.json__ accordingly and check it in.
|
|
48
48
|
|
|
49
49
|
### Step 2: Make a release via github releases
|
|
50
|
-
* Goto [github releases](https://github.com/
|
|
50
|
+
* Goto [github releases](https://github.com/specmatic/specmatic-node/releases) and draft a new release
|
|
51
51
|
* Click `choose a tag` and enter the required version. If the tag exists then you might be releasing a wrong version. Reverify the tag and version number. Ideally the tag should not exist as this is a new version and thus you should be presented with option to `+ Create new tag: <version> on publish` option. Click it.
|
|
52
52
|
* Give a release title of format `v<version>`.
|
|
53
53
|
* Describe the changes in this release briefly
|
|
54
54
|
* You can either save this draft and come back later to publish it or publish it now.
|
|
55
55
|
* On publish, a github action is triggered that updates the release on npm repository.
|
|
56
56
|
|
|
57
|
-
You can check the publish status in [github actions](https://github.com/
|
|
57
|
+
You can check the publish status in [github actions](https://github.com/specmatic/specmatic-node/actions). Though, it might take some time to reflect in the [specmatic npm page](https://www.npmjs.com/package/specmatic) because of the npm caching.
|
|
58
58
|
|
|
59
59
|
### Developer notes
|
|
60
60
|
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Specmatic Framework Node Module
|
|
2
2
|
|
|
3
|
-
](https://github.com/
|
|
3
|
+

|
|
4
|
+
[](https://www.npmjs.com/package/specmatic)
|
|
5
|
+
[](https://github.com/specmatic/specmatic-node/releases/latest)
|
|
6
6
|
|
|
7
|
-
This node module is a thin wrapper over the [specmatic executable jar](https://specmatic.io/getting_started.html#setup). All core capabilities are in the main [Specmatic project](https://github.com/
|
|
7
|
+
This node module is a thin wrapper over the [specmatic executable jar](https://specmatic.io/getting_started.html#setup). All core capabilities are in the main [Specmatic project](https://github.com/specmatic/specmatic). The purpose of this wrapper module is to act as a helper with below aspects.
|
|
8
8
|
|
|
9
9
|
- Easy installation and upgrade of the jar file in node projects through npm
|
|
10
10
|
- Global install using npm and easy run specmatic jar executable without having to download the jar file and having to run `java -jar`
|
|
@@ -45,7 +45,7 @@ Tests for Free – Specmatic parses your API Specification files and based on th
|
|
|
45
45
|
|
|
46
46
|
## Sample Repo
|
|
47
47
|
|
|
48
|
-
https://github.com/
|
|
48
|
+
https://github.com/specmatic/specmatic-order-bff-nodejs
|
|
49
49
|
|
|
50
50
|
## Programmatic Access
|
|
51
51
|
|
|
@@ -96,7 +96,7 @@ enable api coverage for express apps to know which apis and http verbs are cover
|
|
|
96
96
|
Specmatic tests can be displayed in IDE specific test result view by using `showTestResults` method coupled with `test` method. Test framework specific steps are below.
|
|
97
97
|
|
|
98
98
|
### Jest Framework
|
|
99
|
-
Example: https://github.com/
|
|
99
|
+
Example: https://github.com/specmatic/specmatic-order-bff-nodejs/blob/main/test/contract
|
|
100
100
|
|
|
101
101
|
1. Call `test` method in a [`globalSetup`](https://jestjs.io/docs/configuration#globalsetup-string) script. `globalSetup` script path can be set either in the jest command line argument or in jest configuration file.
|
|
102
102
|
2. Call `showTestResults` in the root of your test file anywhere. You can pass `test` method of Jest as its argument and it works out of the box.
|
|
@@ -6,7 +6,7 @@ var path = require('path');
|
|
|
6
6
|
var packageJson = require('../package.json'); // Import the package.json file
|
|
7
7
|
|
|
8
8
|
var specmaticVersion = packageJson.specmaticVersion;
|
|
9
|
-
var jarUrl = "https://
|
|
9
|
+
var jarUrl = "https://github.com/specmatic/specmatic/releases/download/".concat(specmaticVersion, "/specmatic.jar");
|
|
10
10
|
var jarFilename = 'specmatic.jar'; // Specify the desired filename for the JAR
|
|
11
11
|
|
|
12
12
|
var downloadPath = path.resolve(__dirname, '..', jarFilename);
|
|
@@ -26,4 +26,4 @@ axios({
|
|
|
26
26
|
console.error('Error downloading Specmatic Core JAR file version: ' + specmaticVersion, error);
|
|
27
27
|
process.exit(1);
|
|
28
28
|
});
|
|
29
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
29
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJheGlvcyIsInJlcXVpcmUiLCJmcyIsInBhdGgiLCJwYWNrYWdlSnNvbiIsInNwZWNtYXRpY1ZlcnNpb24iLCJqYXJVcmwiLCJjb25jYXQiLCJqYXJGaWxlbmFtZSIsImRvd25sb2FkUGF0aCIsInJlc29sdmUiLCJfX2Rpcm5hbWUiLCJleGlzdHNTeW5jIiwiY29uc29sZSIsImxvZyIsInVubGlua1N5bmMiLCJtZXRob2QiLCJ1cmwiLCJyZXNwb25zZVR5cGUiLCJ0aGVuIiwicmVzcG9uc2UiLCJkYXRhIiwicGlwZSIsImNyZWF0ZVdyaXRlU3RyZWFtIiwiZXJyb3IiLCJwcm9jZXNz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E9BQU8sQ0FBQ0MsR0FBRyw0QkFBNEIsQ0FBQztFQUN4Q1osRUFBRSxDQUFDYSxVQUFVLENBQUNOLFlBQVksQ0FBQztBQUM3QjtBQUVBSSxPQUFPLENBQUNDLEdBQUcsQ0FBQyxxQ0FBcUMsR0FBR1QsZ0JBQWdCLEdBQUcsTUFBTSxDQUFDO0FBQzlFTCxLQUFLLENBQUM7RUFDSmdCLE1BQU0sRUFBRSxLQUFLO0VBQ2JDLEdBQUcsRUFBRVgsTUFBTTtFQUNYWSxZQUFZLEVBQUU7QUFDaEIsQ0FBQyxDQUFDLENBQ0NDLElBQUksQ0FBQyxVQUFDQyxRQUFRLEVBQUs7RUFDbEJBLFFBQVEsQ0FBQ0MsSUFBSSxDQUFDQyxJQUFJLENBQUNwQixFQUFFLENBQUNxQixpQkFBaUIsQ0FBQ2QsWUFBWSxDQUFDLENBQUM7RUFDdERJLE9BQU8sQ0FBQ0MsR0FBRyxDQUFDLG9DQUFvQyxDQUFDO0FBQ25ELENBQUMsQ0FBQyxTQUNJLENBQUMsVUFBQ1UsS0FBSyxFQUFLO0VBQ2hCWCxPQUFPLENBQUNXLEtBQUssQ0FBQyxxREFBcUQsR0FBR25CLGdCQUFnQixFQUFFbUIsS0FBSyxDQUFDO0VBQzlGQyxPQUFPLENBQUNDLElBQUksQ0FBQyxDQUFDLENBQUM7QUFDakIsQ0FBQyxDQUFDIiwiaWdub3JlTGlzdCI6W119
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specmatic",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"specmaticVersion": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
|
+
"specmaticVersion": "2.15.0",
|
|
5
5
|
"description": "Node wrapper for Specmatic",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"scripts": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/
|
|
19
|
+
"url": "git+https://github.com/specmatic/specmatic-node.git"
|
|
20
20
|
},
|
|
21
21
|
"keywords": [
|
|
22
22
|
"contract",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"author": "Sahil Sharma (sahilaug@gmail.com)",
|
|
35
35
|
"license": "ISC",
|
|
36
36
|
"bugs": {
|
|
37
|
-
"url": "https://github.com/
|
|
37
|
+
"url": "https://github.com/specmatic/specmatic-node/issues"
|
|
38
38
|
},
|
|
39
|
-
"homepage": "https://github.com/
|
|
39
|
+
"homepage": "https://github.com/specmatic/specmatic-node#readme",
|
|
40
40
|
"bin": {
|
|
41
41
|
"specmatic": "dist/bin/index.js"
|
|
42
42
|
},
|
|
@@ -48,8 +48,7 @@
|
|
|
48
48
|
"fast-xml-parser": "^4.5.0",
|
|
49
49
|
"terminate": "^2.8.0",
|
|
50
50
|
"tree-kill": "^1.2.2",
|
|
51
|
-
"winston": "^3.14.2"
|
|
52
|
-
"yargs": "^17.7.2"
|
|
51
|
+
"winston": "^3.14.2"
|
|
53
52
|
},
|
|
54
53
|
"devDependencies": {
|
|
55
54
|
"@babel/cli": "^7.25.6",
|
|
@@ -64,7 +63,7 @@
|
|
|
64
63
|
"@types/supertest": "^6.0.2",
|
|
65
64
|
"express": "^4.21.0",
|
|
66
65
|
"jest": "^29.7.0",
|
|
67
|
-
"jest-extended": "^
|
|
66
|
+
"jest-extended": "^6.0.0",
|
|
68
67
|
"jest-mock-extended": "^3.0.7",
|
|
69
68
|
"jest-when": "^3.6.0",
|
|
70
69
|
"rimraf": "^6.0.1",
|
package/specmatic.jar
CHANGED
|
Binary file
|
|
@@ -4,7 +4,7 @@ const path = require('path');
|
|
|
4
4
|
const packageJson = require('../package.json'); // Import the package.json file
|
|
5
5
|
|
|
6
6
|
const specmaticVersion = packageJson.specmaticVersion;
|
|
7
|
-
const jarUrl = `https://
|
|
7
|
+
const jarUrl = `https://github.com/specmatic/specmatic/releases/download/${specmaticVersion}/specmatic.jar`
|
|
8
8
|
const jarFilename = 'specmatic.jar'; // Specify the desired filename for the JAR
|
|
9
9
|
|
|
10
10
|
const downloadPath = path.resolve(__dirname, '..', jarFilename);
|
|
@@ -27,4 +27,4 @@ axios({
|
|
|
27
27
|
.catch((error) => {
|
|
28
28
|
console.error('Error downloading Specmatic Core JAR file version: ' + specmaticVersion, error);
|
|
29
29
|
process.exit(1);
|
|
30
|
-
});
|
|
30
|
+
});
|