tmui-cli 1.2.6 → 1.2.7
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/bin/net.js +8 -17
- package/bin/tmui.js +3 -3
- package/package.json +1 -1
package/bin/net.js
CHANGED
|
@@ -4,12 +4,11 @@ const Fetch = import("node-fetch")
|
|
|
4
4
|
const express = require("express")
|
|
5
5
|
|
|
6
6
|
const app = express();
|
|
7
|
+
|
|
7
8
|
var jsonParser = bodyParser.json()
|
|
8
9
|
var urlencodedParser = bodyParser.urlencoded({ extended: false })
|
|
9
10
|
app.use(urlencodedParser)
|
|
10
11
|
app.use(jsonParser)
|
|
11
|
-
app.use(express.static('website'))
|
|
12
|
-
app.use('/store', express.static('websitemod'))
|
|
13
12
|
|
|
14
13
|
function setResHeader(res){
|
|
15
14
|
res.setHeader("Access-Control-Allow-Headers","*")
|
|
@@ -18,7 +17,8 @@ function setResHeader(res){
|
|
|
18
17
|
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
app.use(express.static('website'))
|
|
21
|
+
app.use('/store', express.static('websitemod'))
|
|
22
22
|
|
|
23
23
|
app.all("/api/dirlist",function (req,res){
|
|
24
24
|
setResHeader(res)
|
|
@@ -73,23 +73,14 @@ app.post("/api/checkUniappVer",async function (req,res){
|
|
|
73
73
|
})
|
|
74
74
|
|
|
75
75
|
|
|
76
|
+
app.listen(6170,async function (){
|
|
77
|
+
const open = (await Open).default;
|
|
78
|
+
open('http://localhost:6170')
|
|
79
|
+
|
|
80
|
+
})
|
|
76
81
|
|
|
77
82
|
|
|
78
83
|
|
|
79
|
-
async function createNet (){
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
app.listen(6170,async function (){
|
|
83
|
-
const open = (await Open).default;
|
|
84
|
-
open('http://localhost:6170')
|
|
85
|
-
|
|
86
|
-
})
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
module.exports = {
|
|
90
|
-
createNet
|
|
91
|
-
}
|
|
92
|
-
|
|
93
84
|
|
|
94
85
|
// open('http://localhost:6170')
|
|
95
86
|
|
package/bin/tmui.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
process.title = 'tmui-cli';
|
|
4
4
|
|
|
5
5
|
var figletS = import("figlet");
|
|
6
6
|
const chalks = import("chalk")
|
|
7
|
-
|
|
7
|
+
require("./net.js")
|
|
8
8
|
require("./hooks.js")
|
|
9
9
|
|
|
10
10
|
const main = async ()=>{
|
|
@@ -20,7 +20,7 @@ const main = async ()=>{
|
|
|
20
20
|
console.log(chalk.green(d))
|
|
21
21
|
console.log(chalk.yellow('请注意浏览器打开状态,如果打开失败'))
|
|
22
22
|
console.log(chalk.yellow('请访问:http://localhost:6170'))
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
})
|
|
25
25
|
}
|
|
26
26
|
|