restful-dummy-server 1.0.1 → 1.0.2

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.
@@ -1,11 +1,11 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
+ // lib imports
3
4
  const express = require('express');
4
- // const yargs = require('yargs');
5
5
  const path = require('path');
6
6
  const commander = require('commander');
7
7
 
8
- //const app = express();
8
+ // custom imports
9
9
  const server = require('./server');
10
10
 
11
11
  commander
@@ -16,35 +16,6 @@ commander
16
16
  .option('-config, --config [config]', 'Specify config files location.', '')
17
17
  .parse(process.argv);
18
18
 
19
- // const { static, config, port, host, proxy } = yargs
20
- // .usage('mock-server [options]')
21
- // .options({
22
- // host: {
23
- // alias: 'h',
24
- // description: 'Set host'
25
- // },
26
- // port: {
27
- // alias: 'P',
28
- // description: 'Set port'
29
- // },
30
- // proxy: {
31
- // alias: 'p',
32
- // description: 'Set proxy'
33
- // },
34
- // watch: {
35
- // alias: 'w',
36
- // description: 'Watch files'
37
- // },
38
- // static: {
39
- // alias: 's',
40
- // description: 'Static files path'
41
- // },
42
- // config: {
43
- // alias: 'c',
44
- // description: 'Config file path'
45
- // }
46
- // }).argv;
47
-
48
19
  const { static, config, port, host, proxy } = commander?.opts();
49
20
 
50
21
  server.start({
package/package.json CHANGED
@@ -1,41 +1,40 @@
1
- {
2
- "name": "restful-dummy-server",
3
- "version": "1.0.1",
4
- "description": "This can be used to mock restful api responses.",
5
- "main": "dist/bundle.js",
6
- "scripts": {
7
- "build": "rm -rf dist && webpack",
8
- "publish:package": "npm run build && npm publish --access=public"
9
- },
10
- "bin": {
11
- "restful-dummy-server": "dist/bundle.js"
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/SuneetBansal/restful-dummy-server.git"
16
- },
17
- "keywords": [
18
- "dummy",
19
- "mock",
20
- "rest server",
21
- "restful dummy server",
22
- "fake"
23
- ],
24
- "author": "Suneet Bansal",
25
- "license": "MIT",
26
- "bugs": {
27
- "url": "https://github.com/SuneetBansal/restful-dummy-server/issues"
28
- },
29
- "homepage": "https://github.com/SuneetBansal/restful-dummy-server#readme",
30
- "dependencies": {
31
- "commander": "^11.0.0",
32
- "express": "^4.18.2",
33
- "express-http-proxy": "^1.6.3"
34
- },
35
- "devDependencies": {
36
- "rimraf": "^3.0.2",
37
- "terser-webpack-plugin": "^5.3.9",
38
- "webpack": "^5.75.0",
39
- "webpack-cli": "^5.0.1"
40
- }
41
- }
1
+ {
2
+ "name": "restful-dummy-server",
3
+ "version": "1.0.2",
4
+ "description": "This can be used to mock restful api responses.",
5
+ "main": "dist/index.js",
6
+ "scripts": {
7
+ "build": "rm -rf dist && cpx \"src/*\" dist",
8
+ "postbuild": "rm -rf src",
9
+ "publish:package": "npm run build && npm publish --access=public"
10
+ },
11
+ "bin": {
12
+ "restful-dummy-server": "dist/index.js"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/SuneetBansal/restful-dummy-server.git"
17
+ },
18
+ "keywords": [
19
+ "dummy",
20
+ "mock",
21
+ "rest server",
22
+ "restful dummy server",
23
+ "fake"
24
+ ],
25
+ "author": "Suneet Bansal",
26
+ "license": "MIT",
27
+ "bugs": {
28
+ "url": "https://github.com/SuneetBansal/restful-dummy-server/issues"
29
+ },
30
+ "homepage": "https://github.com/SuneetBansal/restful-dummy-server#readme",
31
+ "dependencies": {
32
+ "commander": "^11.0.0",
33
+ "express": "^4.18.2",
34
+ "express-http-proxy": "^1.6.3"
35
+ },
36
+ "devDependencies": {
37
+ "cpx": "^1.5.0",
38
+ "rimraf": "^3.0.2"
39
+ }
40
+ }