Skip to content

Commit

Permalink
Update 6.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
255kb committed Dec 1, 2023
1 parent d2ee7bd commit a7fd3a9
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const Footer: FunctionComponent<{
</li>
<li className='mb-2'>
{/* Do not use <Link>, as routes with a dot inside get rewritten without trailing slash */}
<a href='/releases/6.0.0/' className='text-reset'>
<a href='/releases/6.0.1/' className='text-reset'>
Releases
</a>
</li>
Expand Down
122 changes: 122 additions & 0 deletions content/releases/6.0.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
---
meta:
title: Mockoon release v6.0.1
description: Discover Mockoon applications new v6.0.1 release with the new callbacks feature, CLI import/export commands, bug fixes and more.
date: '2023-12-01'
---

## Patch 6.0.1 fixes the following issues

- Fixed a silent crash occuring when focusing a route in a folder of a new environment. (Issue [#1210](https://github.com/mockoon/mockoon/issues/1210))
- Fixed a null pointer exception when opening the command palette when no environment is open.
- Some minor UI fixes.

---

## v6.0.0 release notes

Welcome to this new release of Mockoon. It brings new exciting features: **callbacks**, allowing you to make HTTP calls after receiving a request, new CLI import and export commands, and lots of fixes. Read on to learn more about this release.

---

## Our sponsors

| NOSTYLE | |
| ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| [![GitHub](https://mockoon.com/images/sponsors/github.png)](https://github.blog/2023-04-12-github-accelerator-our-first-cohort-and-whats-next/) | [![Localazy](https://mockoon.com/images/sponsors/localazy.png)](https://localazy.com/register?ref=a9CiDC61gOac-azO) |
| [![Peakcrypto](https://mockoon.com/images/sponsors/peakcrypto.png)](https://www.peakcrypto.com/) | [![Fern](https://mockoon.com/images/sponsors/fern.png)](https://www.devmark.ai/fern/?utm_source=mockoon&utm_loc=releasenote&utm_type=logo) |

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](https://github.com/mockoon/mockoon/blob/main/backers.md) who helped this project over time!

[![sponsor button](https://mockoon.com/images/sponsor-btn-250.png?)](https://github.com/sponsors/mockoon)

---

## ⚠️ Breaking changes

We introduced some breaking changes in this major release:

- Routes toggling and folders collapsing are now saved at the application level. [More details below](#routes-toggling-and-folders-collapsing-migration).

- The compatibility of the desktop application with the legacy migration system (pre v1.7.0) was removed. If you are still using a (very!) old version of the desktop application, please upgrade to v5.1.0 before upgrading to v6.0.0. (Issue [#1193](https://github.com/mockoon/mockoon/issues/1193))

---

## Routes toggling and folders collapsing migration

Before this update, routes toggling and folders collapsing were saved at the environment level. When working on our team collaboration feature, we realized that this was not the best way to handle this and that these were rather personal preferences as team members may not be working with the same endpoints at the same time. We therefore decided to migrate these settings to the application level.

A data migration will run when you open the application for the first time after the update. This migration will copy your current routes toggling and folders collapsing settings to the application level.

One consequence is that disabled routes in the UI won't be honored by the CLI automatically. If you want to disable some routes when running the CLI, you can use the `--disable-routes` flag: `mockoon-cli start --data ~/data.json --disable-routes route1 route2` (disable all routes containing "route1" or "route2"). This flag supports multiple keywords or UUIDs.

When using the serverless package, you can achieve the same result by passing an array of UUIDs or keywords to the `disabledRoutes` option:

```javascript
const mockoonServerless = new mockoon.MockoonServerless(mockEnv, {
// disable all routes containing 'users' in their path, and the route with UUID '0999df54-7d57-407e-9325-c18d97fea729'
disabledRoutes: ['users', '0999df54-7d57-407e-9325-c18d97fea729']
});
```

(Issue [#1189](https://github.com/mockoon/mockoon/issues/1189))

## New callbacks feature

This release introduces a new feature called "callbacks". Callbacks are a way to make one or more HTTP calls after an entering request reaches your route. This is useful to call other APIs or micro-services or to trigger a webhook. Callbacks are fully configurable and can be activated after a certain delay:

![the callback configuration interface{1310x476}](/images/releases/6.0.0/callbacks-configuration-interface.png)

You can also associate different callbacks to different route responses:

![the callback invocation interface{1310x476}](/images/releases/6.0.0/callbacks-invocation-interface.png)

Head over to the [documentation](https://mockoon.com/docs/latest/callbacks/overview) to learn more about this feature.

(Issue [#709](https://github.com/mockoon/mockoon/issues/709))

## New CLI import/export commands

Two new commands have been added to the CLI to [import](https://github.com/mockoon/mockoon/blob/main/packages/cli/README.md#import-command) and [export](https://github.com/mockoon/mockoon/blob/main/packages/cli/README.md#export-command) your mocks from and to an OpenAPI specification file. These commands are the equivalent of the import/export menu options in the desktop application.

Here is an example of how to use the commands:

```bash
mockoon-cli import --input ~/openapi-spec.json --output ./mock.json
mockoon-cli export --input ~/mock.json --output ./openapi-spec.json
```

You will find more information about these commands in the [CLI documentation](https://github.com/mockoon/mockoon/blob/main/packages/cli/README.md#import-command).

(Issue [#678](https://github.com/mockoon/mockoon/issues/678))

## Desktop application

- The desktop application now displays the **environment name** in the title bar.

- We **migrated the interface to Bootstrap 5**. This was long overdue and will allow us to use the latest Angular features in the future. It was also a good opportunity to clean up the code and polish the interface. (Issue [#1185](https://github.com/mockoon/mockoon/issues/1185))

- When recording requests or mocking from the logs, **paths containing parentheses are now correctly handled and escaped** in the created route path. (Issue [#1190](https://github.com/mockoon/mockoon/issues/1190))

- Copying a route URL to the clipboard (right click -> Copy full path to clipboard) now correctly uses the hostname defined in the environment settings. (Issue [#1201](https://github.com/mockoon/mockoon/issues/1201))

- We fixed a bug introduced in v5.1.0, causing the app to start in a blank state in rare conditions. (Issue [#1203](https://github.com/mockoon/mockoon/pull/1203))

## Misc

- Following Faker.js update to v8 in the previous release, it was brought to our attention that the `number.int` helper was producing numbers from 0 to `Number.MAX_SAFE_INTEGER` instead of a previous maximum of 99999, which could cause out of bounds exceptions on some systems. We took extra care to migrate all your helpers in the previous version and went through all the changes in Faker.js v8, but this one slipped through. We apologize for the inconvenience and fixed the migration script and usages of the helpers throughout all our resources (documentation, etc.). (Issue [#1174](https://github.com/mockoon/mockoon/issues/1174))

## Chores

- We partially rewrote the desktop application reducer to prepare for the cloud synchronization feature. It was the occasion to fix some small performance issues here and there. (Issue [#1203](https://github.com/mockoon/mockoon/pull/1203))

---

### Thank you

A big thank you to the following people that helped to make Mockoon better:

- [@fabhoarau](https://github.com/fabhoarau): Bootstrap 5 migration. (Issue [#1185](https://github.com/mockoon/mockoon/issues/1185))
- [@isuru89](https://github.com/isuru89): Callbacks feature. (Issue [#709](https://github.com/mockoon/mockoon/issues/709))
- [@Mavbraz](https://github.com/Mavbraz): New CLI commands. (Issue [#678](https://github.com/mockoon/mockoon/issues/678))
- [@neotrow](https://github.com/neotrow): Recording paths with parentheses. (Issue [#1190](https://github.com/mockoon/mockoon/issues/1190))
2 changes: 1 addition & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
{
"source": "/releases{,/}",
"destination": "/releases/6.0.0/",
"destination": "/releases/6.0.1/",
"type": 302
},
{
Expand Down

0 comments on commit a7fd3a9

Please sign in to comment.