typescript-mock-server 1.0.7 → 1.0.8
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
CHANGED
|
@@ -91,6 +91,8 @@ Following dependencies are being used:
|
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
## Release notes (will be moved to GitHub in the future)
|
|
94
|
+
- v1.0.8 - Minor bugfixes
|
|
95
|
+
- v1.0.7 - Minor bugfixes
|
|
94
96
|
- v1.0.6 - Bugfix: accidentally included "npm" and "install" dependency, removed again
|
|
95
97
|
- v1.0.5 - Set $INIT_CWD to support all platforms and add CORS option
|
|
96
98
|
- v1.0.3 - Updated README to include delay interval example
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typescript-mock-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
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",
|
|
@@ -94,12 +94,9 @@ export class TypescriptMockServerImpl implements TypescriptMockServer{
|
|
|
94
94
|
private convertFileNameToEndpoint(path: string, dirent: Dirent, httpVerb: HttpVerb): string {
|
|
95
95
|
const endpoint = `${path.replace(this.basePath, '')}/${dirent.name}`
|
|
96
96
|
.replace('.ts', '')
|
|
97
|
+
.replace(`${httpVerb}-`, '')
|
|
97
98
|
.replace(httpVerb, '');
|
|
98
99
|
|
|
99
|
-
if (!endpoint.endsWith('/')) {
|
|
100
|
-
return endpoint.replace('-', '');
|
|
101
|
-
}
|
|
102
|
-
|
|
103
100
|
if (endpoint.endsWith('/')) {
|
|
104
101
|
return endpoint.substring(0, endpoint.length - 1);
|
|
105
102
|
}
|