specmatic 0.67.3 → 0.67.4

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.
@@ -1,17 +1,11 @@
1
- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
- # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3
-
4
- name: publish
1
+ name: NPM Publish
5
2
 
6
3
  on:
7
- workflow_run:
8
- workflows: ["test"]
9
- types:
10
- - completed
4
+ release:
5
+ types: [published]
11
6
 
12
7
  jobs:
13
- build-and-publish:
14
- if: ${{ github.event.workflow_run.conclusion == 'success' }}
8
+ publish:
15
9
  runs-on: ubuntu-latest
16
10
  steps:
17
11
  - uses: actions/checkout@v2
@@ -20,14 +14,9 @@ jobs:
20
14
  node-version: 14
21
15
  - run: npm install
22
16
  - run: npm run build
23
- - run: echo "previous_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo '')" >> $GITHUB_ENV
24
- - name: Create Tag
25
- id: create_tag
26
- uses: jaywcjlove/create-tag-action@main
27
- if: env.previous_tag
17
+ - uses: reedyuk/npm-version@1.1.1
28
18
  with:
29
- package-path: ./package.json
30
- release: true
19
+ version: ${{ github.event.release.tag_name }}
31
20
  - uses: JS-DevTools/npm-publish@v1
32
21
  with:
33
22
  check-version: true
@@ -1,4 +1,4 @@
1
- name: test
1
+ name: Run Tests
2
2
 
3
3
  on:
4
4
  push:
package/dist/bin/core.js CHANGED
@@ -11,11 +11,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
11
11
  var callSpecmaticCli = args => {
12
12
  var specmaticJarPath = _path.default.resolve(_config.specmaticJarPathLocal);
13
13
  var cliArgs = (args || process.argv).slice(2).join(' ');
14
- console.log('starting specmatic server', cliArgs);
14
+ console.log('Running specmatic ', cliArgs);
15
15
  (0, _execSh.default)("java -jar ".concat(specmaticJarPath, " ").concat(cliArgs), {}, err => {
16
16
  if (err) {
17
- console.log('Exit code: ', err.code);
18
- process.exit(err.code);
17
+ console.log('Specmatic finished with non zero exit code: ', err.code);
18
+ process.exitCode = err.code;
19
+ } else {
20
+ console.log('Specmatic finished');
21
+ process.exitCode = 0;
19
22
  }
20
23
  });
21
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specmatic",
3
- "version": "0.67.3",
3
+ "version": "0.67.4",
4
4
  "description": "Node wrapper for Specmatic",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -24,8 +24,7 @@
24
24
  },
25
25
  "homepage": "https://github.com/znsio/specmatic-node#readme",
26
26
  "bin": {
27
- "specmatic": "dist/bin/index.js",
28
- "qontract": "dist/bin/index.js"
27
+ "specmatic": "dist/bin/index.js"
29
28
  },
30
29
  "dependencies": {
31
30
  "@babel/cli": "^7.21.5",
package/src/bin/core.ts CHANGED
@@ -6,11 +6,14 @@ const callSpecmaticCli = (args?: string[]) => {
6
6
  const specmaticJarPath = path.resolve(specmaticJarPathLocal);
7
7
  const cliArgs = (args || process.argv).slice(2).join(' ');
8
8
 
9
- console.log('starting specmatic server', cliArgs);
9
+ console.log('Running specmatic ', cliArgs);
10
10
  execSh(`java -jar ${specmaticJarPath} ${cliArgs}`, {}, (err: any) => {
11
11
  if (err) {
12
- console.log('Exit code: ', err.code);
13
- process.exit(err.code);
12
+ console.log('Specmatic finished with non zero exit code: ', err.code);
13
+ process.exitCode = err.code;
14
+ } else {
15
+ console.log('Specmatic finished');
16
+ process.exitCode = 0;
14
17
  }
15
18
  });
16
19
  };