Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pact-mock-service

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pact-mock-service - npm Package Compare versions

Comparing version 0.5.3-1 to 0.7.2-1

9

CONTRIBUTING.md

@@ -9,2 +9,3 @@ # Contributing

$ scripts/clean.sh
$ scripts/build.sh

@@ -14,4 +15,6 @@

$ npm publish dist/pact-mock-service-osx.tar.gz
$ npm publish dist/pact-mock-service-linux-x86.tar.gz
$ npm publish dist/pact-mock-service-linux-x86_64.tar.gz
$ npm publish dist/pact-mock-service-win32.tar.gz
$ npm publish dist/pact-mock-service-linux-ia32.tar.gz
$ npm publish dist/pact-mock-service-darwin.tar.gz
$ npm publish dist/pact-mock-service-linux-x64.tar.gz
$ npm publish
{
"name": "pact-mock-service-linux-x64",
"version": "0.5.2-2",
"version": "0.7.2-1",
"description": "Pact mock service",

@@ -5,0 +5,0 @@ "main": "bin/pact-mock-service",

@@ -5,2 +5,4 @@ # Pact Mock Service for NPM

See the [Pact Mock Service homepage][pact-mock-service-gem] for documentation about running the mock service.
## Usage

@@ -7,0 +9,0 @@

{
"name": "pact-mock-service-linux-ia32",
"version": "0.5.2-2",
"version": "0.7.2-1",
"description": "Pact mock service",

@@ -5,0 +5,0 @@ "main": "bin/pact-mock-service",

@@ -5,2 +5,4 @@ # Pact Mock Service for NPM

See the [Pact Mock Service homepage][pact-mock-service-gem] for documentation about running the mock service.
## Usage

@@ -7,0 +9,0 @@

{
"name": "pact-mock-service-darwin",
"version": "0.5.2-2",
"version": "0.7.2-1",
"description": "Pact mock service",

@@ -5,0 +5,0 @@ "main": "bin/pact-mock-service",

@@ -5,2 +5,4 @@ # Pact Mock Service for NPM

See the [Pact Mock Service homepage][pact-mock-service-gem] for documentation about running the mock service.
## Usage

@@ -7,0 +9,0 @@

{
"name": "pact-mock-service",
"version": "0.5.3-1",
"version": "0.7.2-1",
"description": "Pact mock service install package. Installing this will install an executable appropriate for your platform.",
"scripts": {
"postinstall": "node scripts/platform-deps.js",
"preinstall": "node scripts/platform-deps.js",
"test": "echo \"Error: no test specified\" && exit 1"

@@ -25,4 +25,3 @@ },

"dependencies": {
"npm": "^2.9.1"
}
}
# Pact Mock Service for NPM
Installation wrapper for standalone platform-specific executables packaged from the Ruby [pact-mock-service-gem] gem.
Installation wrapper for standalone platform-specific executables packaged from the Ruby [pact-mock-service-gem] gem.
On install, this package selects and installs the correct [pact-mock-service-gem] executable for your environment.
On install, this package selects and installs the correct [pact-mock-service-standalone] executable for your environment.
At the moment, this service simply downloads the appropriate platform-specific and installs it alongside `pact-mock-service` inside the node_modules directory. In the longer term however, this should transparently be installed within `pact-mock-service`.
This node module downloads the appropriate platform-specific and installs it alongside `pact-mock-service` inside the node_modules directory.
In the meantime however, below is a list of platform specific NPMs that may be downloaded on your behalf depending on your environment.
Substitute the following npm names in `[PLATFORM_SPECIFIC_NPM]` placeholder in the usage instructions below:
* OS X - `pact-mock-service-darwin`
* Windows - `pact-mock-service-win32`
* Linux 32-bit - `pact-mock-service-linux-ia32`
* Linux 64-bit - `pact-mock-service-linux-x64`
## Usage
$ npm install pact-mock-service
$ node_modules/[PLATFORM_SPECIFIC_NPM]/bin/pact-mock-service --port 1234
$ npm install pact-mock-service
$ node_modules/.bin/pact-mock-service --port 1234

@@ -48,2 +39,2 @@ # Known issues

[pact-mock-service-gem]: https://github.com/bethesque/pact-mock_service
[pact-mock-service-standalone]: https://github.com/bethesque/pact-mock_service

@@ -1,19 +0,32 @@

//Download and install the correct platform specific package for the mock server
var npm = require("npm");
var exec = require('child_process').exec,
path = require('path'),
fs = require('fs'),
pkgPath = path.resolve(__dirname, '../package.json'),
pkg = require(pkgPath);
var arch = "";
npm.load(function(er, npm) {
if (process.platform === 'linux') {
arch = '-' + process.arch;
}
if (process.platform === 'linux') {
arch = '-' + process.arch;
}
console.log("Installing Pact mock server for " + process.platform + arch);
var packageName = 'pact-mock-service-' + process.platform + arch;
console.log("Installing Pact mock server for " + packageName);
//Install npm into the wrapping pact-mock-service node_modules directory to avoid nested node_modules
npm.commands.install("../../", ['pact-mock-service-' + process.platform + arch], function(er, data) {
if(er) {
console.log(er);
process.exit(1);
}
console.log("Pact mock server for - " + process.platform + arch + " installed successfully.");
});
})
// Install standalone package to node_modules, use exec to prevent --save or --save-dev flags to be sent. DON'T USE `npm.commands.install`
exec('npm install ' + packageName + '@' + pkg.version, {cwd: path.resolve(__dirname, '..')}, function (error, stdout, stderr) {
if (error) {
console.error(error);
process.exit(1);
}
console.log("Pact mock server for " + packageName + " installed successfully.");
// Specify the bin path of the downloaded package in the package.json of pact-mock-service
var p = path.resolve(__dirname, '../node_modules/' + packageName);
var bin = require(path.join(p, 'package.json')).bin;
// Setting path to be relative to project's package.json
bin['pact-mock-service'] = './' + path.relative(path.dirname(pkgPath), path.resolve(p, bin['pact-mock-service']));
pkg.bin = bin;
// Write it to package.json
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2));
});
{
"name": "pact-mock-service-win32",
"version": "0.5.2-2",
"version": "0.7.2-1",
"description": "Pact mock service",

@@ -5,0 +5,0 @@ "main": "bin/pact-mock-service.bat",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc