v1.8.0
v1.8 is the most important release of mountebank in a very long time. Thanks to the many people who helped make it happen.
New Features
- Added a new
shellTransform
behavior that allows you to change the response through a shell application. This makes mountebank infinitely extensible in any language of your choice - Added a new
copy
behavior that allows you to copy a value from the request to the response, using either regular expressions, xpath, or jsonpath - Added a new security page documenting
security tips when using the
--allowInjection
command line flag, including using a new--localOnly
flag and a new--ipWhitelist
flag
Bug Fixes
- Config files now allow nested
stringify
functions - Now possible to install mountebank behind a repository manager
- Fixed command line defaults when using a command
- Fixed documentation explaining behavior of
mb stop
andmb restart
- Fixed problem running the build due to missing dependencies
Many thanks to the following kind folks for help with this release, either through bug reports, suggestions, or direct code contributions:
- Stephen Tkac and team, for the suggestion and initial implementation of the
copy
behavior - Paul Hammant, for initially pointing out some of the security
concerns with injection and suggesting the
--localOnly
flag - Israel Azcuna, for finding the bug around nested
stringify
functions - markhu, for exposing the missing docs around
mb stop
andmb restart
- francois-montmasson-efg, for both finding the bug around installing mountebank behind a repository manager and for suggesting the solution
- Nikolaus Piccolotto, for finding missing dependencies in package.json
Install
npm install -g mountebank@1.8.0
or:
Option | node.js required? | sudo required? | links | Description |
---|---|---|---|---|
Self-contained archives | No | No | Simply unpack and run mb from inside |
|
OS-specific packages | No | Yes | Puts mb at /usr/local/bin , which is generally in the PATH . |
|
source tarball | Yes | No | source tarball if you roll that way. |
Windows path limitations
*mountebank wishes very much for your Windows experience to be hassle-free, but he is simply not qualified to address a particular constraint of Windows Explorer. For legacy reasons, some Windows applications, including most notably Windows Explorer, have a maximum number of characters allowed in a path of 260 characters. As mountebank writes these words, the longest path he includes in the zip files is around 175 characters. The zip file name, which is likely to represent itself as two nested directories if you use the defaults to unzip it, will be around 25 characters. That gives you very little wiggle room. If you unzip the file in your users directory, you may very likely get an error because of this constraint.
The following solutions will all work:
- Unzip to the root of your C: drive (or a similar small path)
- Use 7zip to unzip the file instead of Windows Explorer
- Use
npm
to install mountebank instead of the zip file