typescript-mock-server 1.0.2 → 1.0.4

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
@@ -59,11 +59,9 @@ export const data: User[] = [{
59
59
  creationDate: newDate()
60
60
  }];
61
61
 
62
- export const config: Config = {
63
- server: {
64
- delay: 2000,
65
- statusCode: 418
66
- }
62
+ export const config: RequestConfig = {
63
+ delay: 2000, // or you can use an interval like {min: 2000, max: 5000}
64
+ statusCode: 418
67
65
  }
68
66
  ```
69
67
 
@@ -92,6 +90,7 @@ Following dependencies are being used:
92
90
 
93
91
 
94
92
  ## Release notes (will be moved to GitHub in the future)
93
+ - v1.0.3 - Updated README to include delay interval example
95
94
  - v1.0.2 - Use correct command to push tags
96
95
  - v1.0.1 - Include correct files in GIT tag
97
96
  - v1.0.0 - Breaking change: renamed Server config to Request and added interval for delay
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "typescript-mock-server",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
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=tms-models --port=5000",
7
+ "example": "ts-node-dev src/index.ts --path=$INIT_CWD/tms-models --port=5000",
8
8
  "start": "ts-node-dev src/index.ts",
9
9
  "update-deps": "npm update",
10
10
  "get-version": "echo $npm_package_version",
@@ -100,6 +100,6 @@ export class TypescriptMockServerImpl implements TypescriptMockServer{
100
100
  this.log.warn(`Path parameter not set, fallback to default tms-models`);
101
101
  return 'tms-models';
102
102
  }
103
- return `${process.cwd()}/${this.commandLine.getCommand(Command.PATH)}`;
103
+ return `${this.commandLine.getCommand(Command.PATH)}`;
104
104
  }
105
105
  }