@shun-js/webcc-server 0.7.0 → 0.7.1
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/app.js +3 -0
- package/package.json +4 -3
- package/server/controller/IndexController.js +4 -4
- package/server/service/IndexService.js +17 -14
package/app.js
CHANGED
|
@@ -23,6 +23,9 @@ const { parseServerConfig } = require('@shun-js/shun-config');
|
|
|
23
23
|
options.log = require('qiao-log');
|
|
24
24
|
options.logOptions = require('./server/log-options.js')();
|
|
25
25
|
|
|
26
|
+
// options modules
|
|
27
|
+
options.modules = [require('qiao-z-nuser').initGithub];
|
|
28
|
+
|
|
26
29
|
// go
|
|
27
30
|
const app = await require('qiao-z')(options);
|
|
28
31
|
app.listen(config.port);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shun-js/webcc-server",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "webcc.dev server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web claude code"
|
|
@@ -26,11 +26,12 @@
|
|
|
26
26
|
"qiao-ajax": "^5.2.4",
|
|
27
27
|
"qiao-encode": "^5.0.6",
|
|
28
28
|
"qiao-log": "^5.1.9",
|
|
29
|
-
"qiao-z": "^5.8.9"
|
|
29
|
+
"qiao-z": "^5.8.9",
|
|
30
|
+
"qiao-z-nuser": "^5.9.1"
|
|
30
31
|
},
|
|
31
32
|
"publishConfig": {
|
|
32
33
|
"access": "public",
|
|
33
34
|
"registry": "https://registry.npmjs.org/"
|
|
34
35
|
},
|
|
35
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "b797c5d6b2b8a8dd4175fa32eb59c396eeb80333"
|
|
36
37
|
}
|
|
@@ -10,10 +10,10 @@ module.exports = (app) => {
|
|
|
10
10
|
service.index(req, res);
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
// github auth
|
|
14
|
-
app.get('/github/auth', (req, res) => {
|
|
15
|
-
|
|
16
|
-
});
|
|
13
|
+
// // github auth
|
|
14
|
+
// app.get('/github/auth', (req, res) => {
|
|
15
|
+
// service.githubAuth(req, res);
|
|
16
|
+
// });
|
|
17
17
|
|
|
18
18
|
// github callback
|
|
19
19
|
app.get('/github/callback', (req, res) => {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// github
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
// getGitHubAuthUrl,
|
|
4
|
+
getGithubUserinfo,
|
|
5
|
+
} = require('../util/github.js');
|
|
3
6
|
|
|
4
7
|
/**
|
|
5
8
|
* index
|
|
@@ -10,21 +13,21 @@ exports.index = async (req, res) => {
|
|
|
10
13
|
res.send('1');
|
|
11
14
|
};
|
|
12
15
|
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
exports.githubAuth = async (req, res) => {
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
// /**
|
|
17
|
+
// * githubAuth
|
|
18
|
+
// * @param {*} req
|
|
19
|
+
// * @param {*} res
|
|
20
|
+
// */
|
|
21
|
+
// exports.githubAuth = async (req, res) => {
|
|
22
|
+
// // auth
|
|
23
|
+
// const authObj = getGitHubAuthUrl();
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
// // set cookie
|
|
26
|
+
// res.setCookie('state', authObj.state);
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
28
|
+
// // redirect
|
|
29
|
+
// res.redirect(authObj.finalUrl);
|
|
30
|
+
// };
|
|
28
31
|
|
|
29
32
|
/**
|
|
30
33
|
* githubCallback
|