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
|
-
//
|
|
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.
|
|
4
|
-
"description": "This can be used to mock restful api responses.",
|
|
5
|
-
"main": "dist/
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "rm -rf dist &&
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"express
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
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
|
+
}
|