typescript-mock-server 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -3
- package/package.json +2 -2
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@ have to update your mock, otherwise you will receive compile errors.
|
|
|
5
5
|
|
|
6
6
|
# Quickstart
|
|
7
7
|
The easiest way to check out this stub/mock server is by installing it as a (dev)dependency and then
|
|
8
|
-
add a script to you scripts section: `npm run --prefix node_modules/typescript-mock-server start -- --path
|
|
8
|
+
add a script to you scripts section: `npm run --prefix node_modules/typescript-mock-server start -- --path=/tms-models`.
|
|
9
9
|
Your models should export a data const and your file should be named as `^(get|post){1}(-\d)?.ts$`.
|
|
10
|
-
Changes are being picked up automatically, so no need for a restart.
|
|
10
|
+
Changes are being picked up automatically, so no need for a restart. When you add files, you have to restart.
|
|
11
11
|
|
|
12
12
|
Check out the [working example project](https://github.com/GuyT07/typescript-mock-server-examle) and [the source](https://github.com/GuyT07/typescript-mock-server/tree/main/tms-models/users).
|
|
13
13
|
|
|
@@ -73,10 +73,21 @@ Following dependencies are being used:
|
|
|
73
73
|
- [x] Support other server port
|
|
74
74
|
- [x] Improve paths/way to start
|
|
75
75
|
- [ ] Support different headers/configurations (delays, status codes, ...)
|
|
76
|
-
- [x] Support
|
|
76
|
+
- [x] Support most used HTTP methods
|
|
77
77
|
- [ ] Add tests
|
|
78
78
|
- [ ] Refactor, split up in separate classes (first check if people actually want to use the tool)
|
|
79
79
|
- [ ] Setup CI/CD (+code quality + coverage tooling)
|
|
80
80
|
- [ ] Setup website
|
|
81
81
|
- [ ] Create a JVM compatible version
|
|
82
|
+
- [ ] Create interface to force implementation of required properties and make it more stable
|
|
83
|
+
- [ ] Improve error handling (missing properties etc.)
|
|
84
|
+
- [ ] Create an optional persistent state
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## Release notes (will be moved to GitHub in the future)
|
|
88
|
+
- v0.0.11 - Add items to roadmap, bug fixes
|
|
89
|
+
- v0.0.10 - Support multiple http verbs
|
|
90
|
+
|
|
91
|
+
## Bug fix contributors
|
|
92
|
+
- Path fix, from now on current working directory is used. Credits to [Spoodyman](https://github.com/spoodyman)
|
|
82
93
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typescript-mock-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "Simple mock server that can be used in front end development. Instead of creating json files you can just publish TypeScript objects as json",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
7
|
-
"example": "ts-node-dev src/index.ts --path
|
|
7
|
+
"example": "ts-node-dev src/index.ts --path=tms-models --port=5000",
|
|
8
8
|
"start": "ts-node-dev src/index.ts"
|
|
9
9
|
},
|
|
10
10
|
"repository": {
|