Skip to content

Releases: jaywcjlove/mocker-api

v2.7.5

21 Jan 03:29
Compare
Choose a tag to compare

v2.7.4

19 Nov 14:48
Compare
Choose a tag to compare

v2.7.3...v2.7.4

  • 4ed63fc - fix(type): The fix type declaration file is not a release package. #154 #146
  • 20ed1ca - chore(deps): update dependency tsbb to v1.7.8
  • 3576db9 - chore(example): Update webpack example.

v2.7.3

17 Nov 16:40
Compare
Choose a tag to compare

v2.7.1...v2.7.3

  • 4d944b5 - feat: Add access-control-request-headers. @aizigao
  • 597e223 - fix(deps): update dependency @types/node to v13.13.30
  • e8032ee - fix(deps): update dependency chokidar to v3.4.3
  • 0506537 - fix(deps): update dependency @babel/runtime to v7.12.5
  • a088dbe - fix(deps): update dependency nodemon to v2.0.6
  • e0ad0cb - chore(deps): update dependency @types/jest to v26.0.15
  • 38f5187 - chore(deps): update dependency webpack-cli to v4.2.0

v2.7.1

06 Nov 01:44
Compare
Choose a tag to compare

v2.7.0...v2.7.1

  • d1217a2 - fix: add current working directory to avoid the module cannnot be found @vanpipy
  • f903aac - chore(deps): update dependency webpack-cli to v4
  • ef48545 - doc: Update README.md #149
  • 651b3ec - doc: add the usage of --host and --port in the cmd @vanpipy
  • a497043 - doc: Update README.md
  • 723d045 - doc: Update README-zh.md
  • 44e542b - doc: Add README-zh.md file.
  • 354cff8 - Update FUNDING.yml

v2.7.0

29 Oct 16:25
Compare
Choose a tag to compare

v2.6.0...v2.7.0

v2.6.0

27 Oct 06:43
Compare
Choose a tag to compare

v2.3.2...v2.6.0

  • bafd90c - feat: Command line supports more parameter configuration. #144
  • 0f3b426 - feat: The mocker command add port/host parameters. #144
  • a4895b6 - feat: The mocker command add help parameters. #144
  • 2c4dd5c - fix: Fix type errors, support command line multi-file listeners #144 #145
  • b233b66 - feat: support mocker config in the command line @vanpipy
  • 1116e25 - chore: Update code comments.
  • b496b3c - docs(README): typo @kud
  • 677c857 - chore: Update mocker-api to example.
  • ac598b0 - fix(deps): update dependency @types/node to v13.13.23
  • d59ee0e - chore(deps): update dependency html-webpack-plugin to v4.5.0
  • 8b8eae2 - chore(deps): update dependency typedoc to v0.19.2
  • 717b80d - chore(deps): update dependency tsbb to v1.7.7
  • f3e2ebf - fix(deps): update dependency path-to-regexp to v6.2.0
  • 2a29fee - chore(deps): update dependency typedoc to v0.19.1
  • 877477d - chore(deps): update dependency html-webpack-plugin to v4.4.1
  • 66bd136 - chore(deps): update dependency @types/jest to v26.0.14
  • 0f7b033 - fix(deps): update dependency @types/express to v4.17.8
  • f8e9dea - fix(deps): update dependency @types/node to v13.13.21

Command line supports more parameter configuration:

{
  ...
  "mocker": {
    "host": "127.0.0.1",
    "port": 7788,
    "pathRewrite": {
      "^/api/repos/": "/repos/"
    },
    "changeHost": true,
    ...
  }
}

Support setting parameters:

mocker mock/index.js --port 7788
mocker mock/index.js --host 0.0.0.0

help:

Usage: mocker <path> [--config] [--help|h]

Displays help information.

Options:
  --config <path> Simple configuration

Example:
  mocker mock/index.js
  mocker mock/index.js --port 7788
  mocker mock/index.js --host 0.0.0.0
  mocker mock/m1.js test/m2.js
  mocker mock/m1.js --config mocker.config.json

v2.3.5

28 Aug 06:10
Compare
Choose a tag to compare
v2.3.5

v2.3.2

17 Aug 07:08
Compare
Choose a tag to compare
  • a630439 - type: Fix the issue the MockerProxyRoute type does not work for strictNullChecks. #124
  • 3327809 - chore: using yarn workspaces.
  • d62b44b - chore(example): Update scripts to package.json #125
  • c3c1bac - chore: Add typescript example. #124
  • 112422e - chore(deps): update dependency @types/jest to v26
  • dc91a68 - chore(deps): pin dependencies
  • e0ebec8 - chore(deps): update dependency webpack to v4.44.1
  • 77eec3a - chore(deps): update dependency typedoc to v0.18.0
  • 1c644d8 - chore(deps): update dependency @types/node to v13.13.15
  • e741209 - chore(deps): update dependency @types/express to v4.17.7
  • 30f533f - chore(deps): update dependency @babel/runtime to v7.11.2
  • 727c796 - chore(deps): update dependency chokidar to v3.4.2

v2.3.0

25 Jul 16:50
Compare
Choose a tag to compare
  • 23d45af - chore(deps): pin dependency typedoc to 0.17.8
  • 18dbdf9 - chore: Modify github workflows config.
  • 9f87000 - doc: Add type document.
  • ab27a26 - type: Optimize type definition.

v2.2.0

23 Jul 04:39
Compare
Choose a tag to compare
const express = require('express');
+ const apiMocker = require('mocker-api');

const app = express();

+ apiMocker(app, {
+   'GET /api/user': {
+     id: 1,
+     sex: 0
+   }
+ });

app.listen(8080);