@pact-foundation/pact-core 13.6.2 → 13.7.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/CHANGELOG.md +7 -0
- package/CONTRIBUTING.md +5 -0
- package/bin/pactflow.d.ts +2 -0
- package/bin/pactflow.js +10 -0
- package/bin/pactflow.js.map +1 -0
- package/build/Makefile +1 -1
- package/package.json +4 -5
- package/standalone/install.d.ts +0 -19
- package/standalone/install.js +1 -38
- package/standalone/install.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [13.7.0](https://github.com/pact-foundation/pact-js-core/compare/v13.6.2...v13.7.0) (2022-08-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* expose pactflow pact-ruby-standalone command ([d9f9fc7](https://github.com/pact-foundation/pact-js-core/commit/d9f9fc7508f5c2dbcb61f6ed0c32e7acb1d4bd9e))
|
|
11
|
+
|
|
5
12
|
### [13.6.2](https://github.com/pact-foundation/pact-js-core/compare/v13.6.1...v13.6.2) (2022-07-06)
|
|
6
13
|
|
|
7
14
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Contributing
|
|
2
2
|
|
|
3
|
+
## Key Branches
|
|
4
|
+
|
|
5
|
+
* `master` - this is the current main version supporting the 10.x.x release line of Pact JS. Most investment will be here, inclruding major new features, enhancements, bug fixes, security patches etc.
|
|
6
|
+
* `pact-node` - this is the previous major version supporting the 9.x.x release line of Pact JS. Critical security patches and bug fixes will be provided as a priority.
|
|
7
|
+
*
|
|
3
8
|
## Raising issues
|
|
4
9
|
|
|
5
10
|
Before raising an issue, make sure you have checked the open and closed issues to see if an answer is provided there.
|
package/bin/pactflow.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
var pact_standalone_1 = require("../src/pact-standalone");
|
|
5
|
+
var childProcess = require("child_process");
|
|
6
|
+
var status = childProcess.spawnSync(pact_standalone_1.default.pactFullPath, process.argv.slice(2), {
|
|
7
|
+
stdio: 'inherit',
|
|
8
|
+
}).status;
|
|
9
|
+
process.exit(status);
|
|
10
|
+
//# sourceMappingURL=pactflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pactflow.js","sourceRoot":"","sources":["pactflow.ts"],"names":[],"mappings":";;;AAEA,0DAAgD;AAChD,4CAA+C;AAE/C,IAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CACnC,yBAAU,CAAC,YAAY,EACvB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACE,KAAK,EAAE,SAAS;CACjB,CACF,CAAC,MAAM,CAAC;AACT,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC"}
|
package/build/Makefile
CHANGED
|
@@ -319,7 +319,7 @@ endif
|
|
|
319
319
|
|
|
320
320
|
quiet_cmd_regen_makefile = ACTION Regenerating $@
|
|
321
321
|
cmd_regen_makefile = cd $(srcdir); /opt/hostedtoolcache/node/12.22.12/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/runner/.cache/node-gyp/12.22.12" "-Dnode_gyp_dir=/opt/hostedtoolcache/node/12.22.12/x64/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=/home/runner/.cache/node-gyp/12.22.12/<(target_arch)/node.lib" "-Dmodule_root_dir=/home/runner/work/pact-js-core/pact-js-core" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/home/runner/work/pact-js-core/pact-js-core/build/config.gypi -I/opt/hostedtoolcache/node/12.22.12/x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/runner/.cache/node-gyp/12.22.12/include/node/common.gypi "--toplevel-dir=." binding.gyp
|
|
322
|
-
Makefile: $(srcdir)
|
|
322
|
+
Makefile: $(srcdir)/../../../../../opt/hostedtoolcache/node/12.22.12/x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/../../../.cache/node-gyp/12.22.12/include/node/common.gypi $(srcdir)/binding.gyp
|
|
323
323
|
$(call do_cmd,regen_makefile)
|
|
324
324
|
|
|
325
325
|
# "all" is a concatenation of the "all" targets from all the included
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pact-foundation/pact-core",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.7.0",
|
|
4
4
|
"description": "Core of @pact-foundation/pact. You almost certainly don't want to depend on this directly.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"homepage": "https://github.com/pact-foundation/pact-js-core#readme",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"pact-mock-service": "bin/pact-mock-service.js",
|
|
12
12
|
"pact-stub-service": "bin/pact-stub-service.js",
|
|
13
13
|
"pact-provider-verifier": "bin/pact-provider-verifier.js",
|
|
14
|
-
"pact-message": "bin/pact-message.js"
|
|
14
|
+
"pact-message": "bin/pact-message.js",
|
|
15
|
+
"pactflow": "bin/pactflow.js"
|
|
15
16
|
},
|
|
16
17
|
"os": [
|
|
17
18
|
"darwin",
|
|
@@ -78,7 +79,6 @@
|
|
|
78
79
|
"@types/cross-spawn": "^6.0.1",
|
|
79
80
|
"@types/decompress": "^4.2.3",
|
|
80
81
|
"@types/express": "4.11.1",
|
|
81
|
-
"@types/jest": "^27.0.2",
|
|
82
82
|
"@types/mkdirp": "^0.5.2",
|
|
83
83
|
"@types/mocha": "9.0.0",
|
|
84
84
|
"@types/node": "9.4.6",
|
|
@@ -103,7 +103,6 @@
|
|
|
103
103
|
"eslint-config-prettier": "^8.3.0",
|
|
104
104
|
"express": "4.16.2",
|
|
105
105
|
"form-data": "^4.0.0",
|
|
106
|
-
"jest": "^27.3.1",
|
|
107
106
|
"mocha": "^9.1.3",
|
|
108
107
|
"nodemon": "^2.0.4",
|
|
109
108
|
"prettier": "^2.3.0",
|
|
@@ -122,7 +121,7 @@
|
|
|
122
121
|
"build": "tsc",
|
|
123
122
|
"prerelease": "npm run snyk-protect",
|
|
124
123
|
"release": "standard-version",
|
|
125
|
-
"test": "cross-env LOGLEVEL=debug PACT_DO_NOT_TRACK=true mocha \"{src,test,bin,standalone}/**/*.spec.ts\"
|
|
124
|
+
"test": "cross-env LOGLEVEL=debug PACT_DO_NOT_TRACK=true mocha \"{src,test,bin,standalone}/**/*.spec.ts\"",
|
|
126
125
|
"snyk-protect": "snyk protect",
|
|
127
126
|
"format:base": "prettier --parser typescript",
|
|
128
127
|
"format:check": "npm run format:base -- --list-different \"{src,standalone,bin,test}/**/*.{ts,tsx}\"",
|
package/standalone/install.d.ts
CHANGED
|
@@ -1,32 +1,13 @@
|
|
|
1
1
|
export declare const PACT_STANDALONE_VERSION = "1.89.02-rc1";
|
|
2
2
|
export declare function createConfig(location?: string): Config;
|
|
3
3
|
export declare function getBinaryEntry(platform?: string, arch?: string): BinaryEntry;
|
|
4
|
-
export interface PackageConfig {
|
|
5
|
-
binaryLocation?: string;
|
|
6
|
-
doNotTrack?: boolean;
|
|
7
|
-
}
|
|
8
4
|
export interface Config {
|
|
9
|
-
doNotTrack: boolean;
|
|
10
5
|
binaries: BinaryEntry[];
|
|
11
6
|
}
|
|
12
|
-
export interface Data {
|
|
13
|
-
binaryDownloadPath: string;
|
|
14
|
-
checksumDownloadPath: string;
|
|
15
|
-
filepath: string;
|
|
16
|
-
checksumFilepath: string;
|
|
17
|
-
platform: string;
|
|
18
|
-
isWindows: boolean;
|
|
19
|
-
arch?: string;
|
|
20
|
-
platformFolderPath?: string;
|
|
21
|
-
binaryInstallSkipped?: boolean;
|
|
22
|
-
binaryAlreadyDownloaded?: boolean;
|
|
23
|
-
binaryAlreadyInstalled?: boolean;
|
|
24
|
-
}
|
|
25
7
|
export interface BinaryEntry {
|
|
26
8
|
platform: string;
|
|
27
9
|
arch?: string;
|
|
28
10
|
binary: string;
|
|
29
11
|
binaryChecksum: string;
|
|
30
|
-
downloadLocation: string;
|
|
31
12
|
folderName: string;
|
|
32
13
|
}
|
package/standalone/install.js
CHANGED
|
@@ -2,61 +2,25 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getBinaryEntry = exports.createConfig = exports.PACT_STANDALONE_VERSION = void 0;
|
|
4
4
|
var chalk = require("chalk");
|
|
5
|
-
var path = require("path");
|
|
6
|
-
var fs = require("fs");
|
|
7
5
|
exports.PACT_STANDALONE_VERSION = '1.89.02-rc1';
|
|
8
|
-
var PACT_DEFAULT_LOCATION = "https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v" + exports.PACT_STANDALONE_VERSION + "/";
|
|
9
|
-
var HTTP_REGEX = /^http(s?):\/\//;
|
|
10
6
|
function throwError(msg) {
|
|
11
|
-
throw new Error(chalk.red("Error while
|
|
12
|
-
}
|
|
13
|
-
function getBinaryLocation(location, basePath) {
|
|
14
|
-
if (!location || location.length === 0) {
|
|
15
|
-
return undefined;
|
|
16
|
-
}
|
|
17
|
-
return HTTP_REGEX.test(location)
|
|
18
|
-
? location
|
|
19
|
-
: path.resolve(basePath, location);
|
|
20
|
-
}
|
|
21
|
-
function findPackageConfig(location, tries) {
|
|
22
|
-
if (tries === void 0) { tries = 10; }
|
|
23
|
-
if (tries === 0) {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
var packagePath = path.resolve(location, 'package.json');
|
|
27
|
-
if (fs.existsSync(packagePath)) {
|
|
28
|
-
var config = require(packagePath).config;
|
|
29
|
-
if (config && (config.pact_binary_location || config.pact_do_not_track)) {
|
|
30
|
-
return {
|
|
31
|
-
binaryLocation: getBinaryLocation(config.pact_binary_location, location),
|
|
32
|
-
doNotTrack: config.pact_do_not_track,
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return findPackageConfig(path.resolve(location, '..'), tries - 1);
|
|
7
|
+
throw new Error(chalk.red("Error while locating pact binary: " + msg));
|
|
37
8
|
}
|
|
38
9
|
function createConfig(location) {
|
|
39
10
|
if (location === void 0) { location = process.cwd(); }
|
|
40
|
-
var packageConfig = findPackageConfig(location);
|
|
41
|
-
var PACT_BINARY_LOCATION = packageConfig.binaryLocation || PACT_DEFAULT_LOCATION;
|
|
42
11
|
var CHECKSUM_SUFFIX = '.checksum';
|
|
43
12
|
return {
|
|
44
|
-
doNotTrack: packageConfig.doNotTrack ||
|
|
45
|
-
process.env.PACT_DO_NOT_TRACK !== undefined ||
|
|
46
|
-
false,
|
|
47
13
|
binaries: [
|
|
48
14
|
{
|
|
49
15
|
platform: 'win32',
|
|
50
16
|
binary: "pact-" + exports.PACT_STANDALONE_VERSION + "-win32.zip",
|
|
51
17
|
binaryChecksum: "pact-" + exports.PACT_STANDALONE_VERSION + "-win32.zip" + CHECKSUM_SUFFIX,
|
|
52
|
-
downloadLocation: PACT_BINARY_LOCATION,
|
|
53
18
|
folderName: "win32-" + exports.PACT_STANDALONE_VERSION,
|
|
54
19
|
},
|
|
55
20
|
{
|
|
56
21
|
platform: 'darwin',
|
|
57
22
|
binary: "pact-" + exports.PACT_STANDALONE_VERSION + "-osx.tar.gz",
|
|
58
23
|
binaryChecksum: "pact-" + exports.PACT_STANDALONE_VERSION + "-osx.tar.gz" + CHECKSUM_SUFFIX,
|
|
59
|
-
downloadLocation: PACT_BINARY_LOCATION,
|
|
60
24
|
folderName: "darwin-" + exports.PACT_STANDALONE_VERSION,
|
|
61
25
|
},
|
|
62
26
|
{
|
|
@@ -64,7 +28,6 @@ function createConfig(location) {
|
|
|
64
28
|
arch: 'x64',
|
|
65
29
|
binary: "pact-" + exports.PACT_STANDALONE_VERSION + "-linux-x86_64.tar.gz",
|
|
66
30
|
binaryChecksum: "pact-" + exports.PACT_STANDALONE_VERSION + "-linux-x86_64.tar.gz" + CHECKSUM_SUFFIX,
|
|
67
|
-
downloadLocation: PACT_BINARY_LOCATION,
|
|
68
31
|
folderName: "linux-x64-" + exports.PACT_STANDALONE_VERSION,
|
|
69
32
|
},
|
|
70
33
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["install.ts"],"names":[],"mappings":";;;AAAA,6BAAgC;
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["install.ts"],"names":[],"mappings":";;;AAAA,6BAAgC;AAGnB,QAAA,uBAAuB,GAAG,aAAa,CAAC;AAErD,SAAS,UAAU,CAAC,GAAW;IAC7B,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,uCAAqC,GAAK,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,SAAgB,YAAY,CAAC,QAAgC;IAAhC,yBAAA,EAAA,WAAmB,OAAO,CAAC,GAAG,EAAE;IAC3D,IAAM,eAAe,GAAG,WAAW,CAAC;IAEpC,OAAO;QACL,QAAQ,EAAE;YACR;gBACE,QAAQ,EAAE,OAAO;gBACjB,MAAM,EAAE,UAAQ,+BAAuB,eAAY;gBACnD,cAAc,EAAE,UAAQ,+BAAuB,kBAAa,eAAiB;gBAC7E,UAAU,EAAE,WAAS,+BAAyB;aAC/C;YACD;gBACE,QAAQ,EAAE,QAAQ;gBAClB,MAAM,EAAE,UAAQ,+BAAuB,gBAAa;gBACpD,cAAc,EAAE,UAAQ,+BAAuB,mBAAc,eAAiB;gBAC9E,UAAU,EAAE,YAAU,+BAAyB;aAChD;YACD;gBACE,QAAQ,EAAE,OAAO;gBACjB,IAAI,EAAE,KAAK;gBACX,MAAM,EAAE,UAAQ,+BAAuB,yBAAsB;gBAC7D,cAAc,EAAE,UAAQ,+BAAuB,4BAAuB,eAAiB;gBACvF,UAAU,EAAE,eAAa,+BAAyB;aACnD;SACF;KACF,CAAC;AACJ,CAAC;AA1BD,oCA0BC;AAED,IAAM,MAAM,GAAG,YAAY,EAAE,CAAC;AAE9B,SAAgB,cAAc,CAAC,QAAiB,EAAE,IAAa;IAC7D,QAAQ,GAAG,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;IACxC,IAAI,GAAG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAC5B,KAAkB,UAAe,EAAf,KAAA,MAAM,CAAC,QAAQ,EAAf,cAAe,EAAf,IAAe,EAAE;QAA9B,IAAI,KAAK,SAAA;QACZ,IACE,KAAK,CAAC,QAAQ,KAAK,QAAQ;YAC3B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EACzC;YACA,OAAO,KAAK,CAAC;SACd;KACF;IACD,MAAM,UAAU,CACd,sCAAoC,QAAQ,6BAAwB,IAAI,OAAI,CAC7E,CAAC;AACJ,CAAC;AAdD,wCAcC"}
|