Skip to content

Commit 45c2c6d

Browse files
committed
v2.0.0-beta.0
1 parent b8f5b24 commit 45c2c6d

File tree

12,270 files changed

+9224
-39034
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

12,270 files changed

+9224
-39034
lines changed

.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
{ "root": true }
1+
{
2+
"root": true
3+
}

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
- name: Install dependencies and build 🔧
1818
run: yarn --frozen-lockfile && yarn build
1919
- name: Publish package on NPM 📦
20-
run: npm publish
20+
run: npm publish --tag beta
2121
env:
2222
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

CHANGELOG.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Changelog
2+
3+
## [Unreleased]
4+
5+
6+
## [2.0.0-beta.0] - 2023-10-01
7+
8+
### Migrate to version 2.0.0-beta.0
9+
1. Bundle environments with `1.0.0` version
10+
2. Extract environments with `2.0.0-beta.0` version
11+
12+
### Breaking changes
13+
- The `method` directory template was changed `__:[method]` -> `___method` to make it compatible with windows machine.
14+
- The `responses` directory name was changed `__:[responses]` -> `___responses` to make it compatible with windows machine.
15+
- The route paths now ignore special characters and multiple spaces.
16+
> The output file name and path is still related to the route endpoint, but the escape function has fully changed, so it is not backward compatible with the previous one
17+
- Test scripts and test structure were changed.
18+
19+
### Added
20+
- Argument to enable the markdown docs generation (disabled by default)
21+
- `--verbose` mode with extra details about bundle/extract progress
22+
- POC usage flow on CI see [Use Cases](./README.md#use-cases)
23+
24+
### Changed
25+
- Tests structure changed and improved
26+
- Refactored escapePath method, improved performance, fixed windows special chars issues
27+
28+
### Deprecated
29+
...
30+
31+
### Removed
32+
- Automatic `documentation.md` file generation, use new arg `-d, --doc` for documentation generation see updated [CLI args](./README.md#cli)
33+
34+
### Fixed
35+
- Issues with filenames on windows, `:,{,},...` special chars not removed from the dirname.
36+
37+
### Security
38+
- Changed path of Mockoon routes with `../../` in the URI, fixed ability to override files not related to the project.
39+
40+
41+
## [1.0.0] - 2023-09-25
42+
43+
### Added
44+
...
45+
46+
### Changed
47+
...
48+
49+
### Deprecated
50+
...
51+
52+
### Removed
53+
...
54+
55+
### Fixed
56+
...
57+
58+
### Security
59+
...

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
A CLI tool to bundle/extract [Mockoon](https://mockoon.com/) environment files in a git-friendly files tree with 100% backward compatibility.
88

99

10-
![lifecycle](./public/assets/lifecycle.jpg)
10+
![lifecycle](./public/assets/lifecycle.png)
1111

1212
## Features
1313
- Extracts the original big Mockoon environment file into a user-friendly (git-friendly) file tree.
@@ -68,6 +68,8 @@ Options:
6868
-f, --force Force override directories and files if exists
6969
-i, --input <relative-path or url> Input path or URL
7070
-o, --output <relative-path> Output file or dir path
71+
--verbose Show progress logs
72+
-d, --doc Generate Markdown documentation (extract only, default=false)
7173
-h, --help display help for command
7274
7375
Commands:
@@ -78,6 +80,13 @@ Commands:
7880

7981
## Usage
8082

83+
### Help
84+
```
85+
yarn mockoon-config-transformer --help
86+
yarn mockoon-config-transformer bundle --help
87+
yarn mockoon-config-transformer extract --help
88+
```
89+
8190
### Extract
8291
> Extracts the original Mockoon environment file into user-friendly file tree.
8392
@@ -95,13 +104,21 @@ yarn mockoon-config-transformer extract \
95104
-o ./output-dir
96105
```
97106

107+
```
108+
# Extract environment.json into output-dir + docs generation
109+
110+
yarn mockoon-config-transformer extract -i ./environment.json -o ./output-dir --doc
111+
```
112+
113+
98114
### Bundle
99115
> Bundle extracted directory to the environment file that equals the original file.
100116
101117
```
102118
yarn mockoon-config-transformer bundle -i ./output-dir/index.json -o ./environment.json
103119
```
104120

121+
105122
## Extracted files tree structure details
106123
To make the extracted structure safe for duplicates special chars, future Mockoon releases, etc. the "bundle" functionality is based not on the directories tree, but on the file's content.
107124

@@ -122,3 +139,8 @@ When the `index.json` data is object then `includes` is key:value extend object
122139

123140
When the `index.json` data is an array, then `includes` is a ordered file paths of where the array items stored is.
124141

142+
143+
## Use cases
144+
145+
### Use with CI
146+
![usage](./public/assets/usage.jpg)

0 commit comments

Comments
 (0)