Welcome to this new major release of Mockoon. It brings a lot of new features and improvements. The main focus of this release was to standardize the log format across all Mockoon applications and packages. We also took the opportunity to refactor the CLI to remove the PM2 dependency and make it more lightweight. Finally, we added a few new features and fixed some bugs.
Mockoon is an open-source project built by volunteer maintainers. If you like our application, please consider sponsoring us and join all the Sponsors and Backers who helped this project over time!
We introduced two breaking changes in this major release:
Logging has been standardized across all Mockoon applications and packages. This means that the logs will now be formatted the same way in the desktop application log file, the CLI's console and log file, and the serverless package's console logging. This will make it easier to read and parse the logs.
As part of this change, we also added a new setting to enable full transaction logging to both the desktop application and the serverless package. It is the equivalent of the CLI's
Some events' logging formats changed. If you are using the logs in your scripts, you need update them to match the new format. The new format is the following:
Server start event:
Finally, the new logging format automatically filters out credentials from the logs. It means that if you are using the
--log-transaction flag or the full transaction logging settings, the authentication keys present in the
Proxy-Authorization headers are anonymized. (Issue #688)
A new setting is available to enable full transaction logging. (Issue #1063)
The id property used to manipulate data in single resource routes (GET
/res/:id, etc.) in a CRUD endpoint can now be set to something else like "uuid", "custom_id", etc. (Issue #1041)
You can now search for routes in collapsed folders. (Issue #960)
example property (Issue #352):
dataRaw helpers are now compatible with values coming from other helpers like
queryParam. (Issues #1069)
oneOf helper to allow the user to stringify the result of the helper. (Issues #1074)
faker helper is now compatible with Faker.js methods containing a number (
internet.ipv6). (Issues #1078)
We refactored the CLI to remove the dependency to PM2, which was subject to some security vulnerabilities. Another reason for this refactoring, was that, having multiple other ways to manage running CLI instances (i.e. containers), embedding a process manager felt a bit outdated and overkill. The CLI is now easier to maintain and more lightweight. As a consequence, the following changes were made:
stop commands were removed together with the
--pname flag which was used to customize PM2's process name.
--daemon-off flag was removed and running the CLI as a foreground process is now the default. To run the CLI in the background, you can use the
& operator in your terminal:
mockoon-cli start -d ./data-file.json &.
dockerize command was simplified and reduced to its core promise: it will now only generate the Dockerfile and copy (or download) the provided data files next to it. Head over to the CLI documentation for more details.
A big thank you to the following people who helped to make Mockoon better: