create-blocklet 0.9.10 → 0.9.12
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/package.json +1 -1
- package/templates/did-connect-dapp/package.json +4 -3
- package/templates/did-wallet-dapp/api/routes/user.js +2 -2
- package/templates/did-wallet-dapp/package.json +3 -3
- package/templates/express-api/package.json +1 -1
- package/templates/html-static/package.json +1 -1
- package/templates/monorepo/package.json +1 -1
- package/templates/nestjs-api/package.json +1 -1
- package/templates/nextjs-dapp/api/routes/index.js +2 -2
- package/templates/nextjs-dapp/package.json +1 -1
- package/templates/react-dapp/api/routes/index.js +2 -2
- package/templates/react-dapp/package.json +3 -3
- package/templates/react-dapp-ts/api/src/routes/index.ts +2 -2
- package/templates/react-dapp-ts/package.json +3 -3
- package/templates/react-gun-dapp/api/routes/index.js +2 -2
- package/templates/react-gun-dapp/package.json +3 -3
- package/templates/react-static/package.json +3 -3
- package/templates/solidjs-dapp/api/routes/index.js +2 -2
- package/templates/solidjs-dapp/package.json +2 -2
- package/templates/solidjs-static/package.json +2 -2
- package/templates/svelte-dapp/api/routes/index.js +2 -2
- package/templates/svelte-dapp/package.json +2 -2
- package/templates/svelte-static/package.json +2 -2
- package/templates/todo-list-example/api/src/routes/index.ts +3 -3
- package/templates/todo-list-example/api/src/routes/todo-list/$get.ts +1 -1
- package/templates/todo-list-example/api/src/routes/todo-list/$put.ts +1 -1
- package/templates/todo-list-example/api/src/routes/todo-list/index.ts +3 -3
- package/templates/todo-list-example/package.json +4 -4
- package/templates/vue-dapp/api/routes/index.js +2 -2
- package/templates/vue-dapp/package.json +2 -2
- package/templates/vue-static/package.json +2 -2
- package/templates/vue-ts-static/package.json +2 -2
- package/templates/vue2-dapp/api/routes/index.js +2 -2
- package/templates/vue2-dapp/package.json +2 -2
- package/templates/vue2-static/package.json +2 -2
package/package.json
CHANGED
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"@iconify/react": "^5.0.2",
|
|
64
64
|
"@mui/material": "^5.16.7",
|
|
65
65
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
66
|
-
"@vitejs/plugin-react": "^4.3.
|
|
67
|
-
"bumpp": "^9.
|
|
66
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
67
|
+
"bumpp": "^9.6.1",
|
|
68
68
|
"cross-env": "^7.0.3",
|
|
69
69
|
"eslint": "^8.57.1",
|
|
70
70
|
"flat": "^6.0.1",
|
|
@@ -75,8 +75,9 @@
|
|
|
75
75
|
"react": "~18.2.0",
|
|
76
76
|
"react-dom": "~18.2.0",
|
|
77
77
|
"rimraf": "^5.0.10",
|
|
78
|
+
"simple-git-hooks": "^2.11.1",
|
|
78
79
|
"vite": "^5.4.8",
|
|
79
|
-
"vite-plugin-blocklet": "^0.9.
|
|
80
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
80
81
|
"vite-plugin-svgr": "^4.2.0",
|
|
81
82
|
"zx": "^8.1.8"
|
|
82
83
|
},
|
|
@@ -5,8 +5,8 @@ const authClient = new AuthService();
|
|
|
5
5
|
|
|
6
6
|
module.exports = {
|
|
7
7
|
init(app) {
|
|
8
|
-
//
|
|
9
|
-
app.get('/api/user', middlewares.
|
|
8
|
+
// middlewares.session() is used to get the user info from the session, see more: https://www.arcblock.io/docs/blocklet-developer/blocklet-sdk#session
|
|
9
|
+
app.get('/api/user', middlewares.session(), async (req, res) => {
|
|
10
10
|
if (!req.user) {
|
|
11
11
|
res.json({ user: null });
|
|
12
12
|
return;
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@emotion/styled": "^11.13.0",
|
|
40
40
|
"@mui/icons-material": "^5.16.7",
|
|
41
41
|
"@mui/material": "^5.16.7",
|
|
42
|
-
"@vitejs/plugin-react": "^4.3.
|
|
43
|
-
"bumpp": "^9.
|
|
42
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
43
|
+
"bumpp": "^9.6.1",
|
|
44
44
|
"dayjs": "^1.11.13",
|
|
45
45
|
"dotenv-flow": "^4.1.0",
|
|
46
46
|
"flat": "^6.0.1",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"simple-git-hooks": "^2.11.1",
|
|
53
53
|
"vite": "^5.4.8",
|
|
54
54
|
"vite-node": "^2.1.1",
|
|
55
|
-
"vite-plugin-blocklet": "^0.9.
|
|
55
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
56
56
|
"vite-plugin-require": "^1.2.14",
|
|
57
57
|
"vite-plugin-svgr": "^4.2.0",
|
|
58
58
|
"zx": "^8.1.8"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const
|
|
1
|
+
const middlewares = require('@blocklet/sdk/lib/middlewares');
|
|
2
2
|
const router = require('express').Router();
|
|
3
3
|
|
|
4
|
-
router.use('/user',
|
|
4
|
+
router.use('/user', middlewares.session(), (req, res) => res.json(req.user || {}));
|
|
5
5
|
|
|
6
6
|
module.exports = router;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const middlewares = require('@blocklet/sdk/lib/middlewaress');
|
|
2
2
|
const router = require('express').Router();
|
|
3
3
|
|
|
4
|
-
router.use('/user',
|
|
4
|
+
router.use('/user', middlewares.session(), (req, res) => res.json(req.user || {}));
|
|
5
5
|
|
|
6
6
|
router.use('/data', (req, res) =>
|
|
7
7
|
res.json({
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"@arcblock/eslint-config": "^0.3.2",
|
|
58
58
|
"@blocklet/js-sdk": "^1.16.32",
|
|
59
59
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
60
|
-
"@vitejs/plugin-react": "^4.3.
|
|
61
|
-
"bumpp": "^9.
|
|
60
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
61
|
+
"bumpp": "^9.6.1",
|
|
62
62
|
"cross-env": "^7.0.3",
|
|
63
63
|
"eslint": "^8.57.1",
|
|
64
64
|
"lint-staged": "^15.2.10",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"rimraf": "^5.0.10",
|
|
72
72
|
"simple-git-hooks": "^2.11.1",
|
|
73
73
|
"vite": "^5.4.8",
|
|
74
|
-
"vite-plugin-blocklet": "^0.9.
|
|
74
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
75
75
|
"vite-plugin-svgr": "^4.2.0",
|
|
76
76
|
"zx": "^8.1.8"
|
|
77
77
|
},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import middlewares from '@blocklet/sdk/lib/middlewares';
|
|
2
2
|
import { Router } from 'express';
|
|
3
3
|
|
|
4
4
|
const router = Router();
|
|
5
5
|
|
|
6
|
-
router.use('/user',
|
|
6
|
+
router.use('/user', middlewares.session(), (req, res) => res.json(req.user || {}));
|
|
7
7
|
|
|
8
8
|
router.use('/data', (_, res) =>
|
|
9
9
|
res.json({
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"@types/node": "^20.16.10",
|
|
64
64
|
"@types/react": "^18.3.10",
|
|
65
65
|
"@types/react-dom": "^18.3.0",
|
|
66
|
-
"@vitejs/plugin-react": "^4.3.
|
|
67
|
-
"bumpp": "^9.
|
|
66
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
67
|
+
"bumpp": "^9.6.1",
|
|
68
68
|
"cross-env": "^7.0.3",
|
|
69
69
|
"eslint": "^8.57.1",
|
|
70
70
|
"import-sort-style-module": "^6.0.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"ts-node": "^10.9.2",
|
|
82
82
|
"typescript": "^5.6.2",
|
|
83
83
|
"vite": "^5.4.8",
|
|
84
|
-
"vite-plugin-blocklet": "^0.9.
|
|
84
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
85
85
|
"vite-plugin-svgr": "^4.2.0",
|
|
86
86
|
"zx": "^8.1.8"
|
|
87
87
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const
|
|
1
|
+
const middlewares = require('@blocklet/sdk/lib/middlewaress');
|
|
2
2
|
const router = require('express').Router();
|
|
3
3
|
|
|
4
|
-
router.use('/user',
|
|
4
|
+
router.use('/user', middlewares.session(), (req, res) => res.json(req.user || {}));
|
|
5
5
|
|
|
6
6
|
module.exports = router;
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@arcblock/eslint-config": "^0.3.2",
|
|
59
59
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
60
|
-
"@vitejs/plugin-react": "^4.3.
|
|
61
|
-
"bumpp": "^9.
|
|
60
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
61
|
+
"bumpp": "^9.6.1",
|
|
62
62
|
"cross-env": "^7.0.3",
|
|
63
63
|
"eslint": "^8.57.1",
|
|
64
64
|
"lint-staged": "^15.2.10",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"rimraf": "^5.0.10",
|
|
72
72
|
"simple-git-hooks": "^2.11.1",
|
|
73
73
|
"vite": "^5.4.8",
|
|
74
|
-
"vite-plugin-blocklet": "^0.9.
|
|
74
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
75
75
|
"vite-plugin-svgr": "^4.2.0",
|
|
76
76
|
"zx": "^8.1.8"
|
|
77
77
|
},
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@arcblock/eslint-config": "^0.3.2",
|
|
43
43
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
44
|
-
"@vitejs/plugin-react": "^4.3.
|
|
45
|
-
"bumpp": "^9.
|
|
44
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
45
|
+
"bumpp": "^9.6.1",
|
|
46
46
|
"eslint": "^8.57.1",
|
|
47
47
|
"lint-staged": "^15.2.10",
|
|
48
48
|
"prettier": "^3.3.3",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"rimraf": "^5.0.10",
|
|
53
53
|
"simple-git-hooks": "^2.11.1",
|
|
54
54
|
"vite": "^5.4.8",
|
|
55
|
-
"vite-plugin-blocklet": "^0.9.
|
|
55
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
56
56
|
"vite-plugin-svgr": "^4.2.0",
|
|
57
57
|
"zx": "^8.1.8"
|
|
58
58
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const middlewares = require('@blocklet/sdk/lib/middlewares');
|
|
2
2
|
const router = require('express').Router();
|
|
3
3
|
|
|
4
|
-
router.use('/user',
|
|
4
|
+
router.use('/user', middlewares.session(), (req, res) => res.json(req.user || {}));
|
|
5
5
|
|
|
6
6
|
router.use('/data', (req, res) =>
|
|
7
7
|
res.json({
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@blocklet/js-sdk": "^1.16.32",
|
|
25
25
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
26
|
-
"bumpp": "^9.
|
|
26
|
+
"bumpp": "^9.6.1",
|
|
27
27
|
"cross-env": "^7.0.3",
|
|
28
28
|
"eslint": "^8.57.1",
|
|
29
29
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"rimraf": "^5.0.10",
|
|
37
37
|
"simple-git-hooks": "^2.11.1",
|
|
38
38
|
"vite": "^5.4.8",
|
|
39
|
-
"vite-plugin-blocklet": "^0.9.
|
|
39
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
40
40
|
"vite-plugin-solid": "^2.10.2",
|
|
41
41
|
"zx": "^8.1.8"
|
|
42
42
|
},
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
24
|
-
"bumpp": "^9.
|
|
24
|
+
"bumpp": "^9.6.1",
|
|
25
25
|
"eslint": "^8.57.1",
|
|
26
26
|
"eslint-config-prettier": "^9.1.0",
|
|
27
27
|
"eslint-plugin-prettier": "^5.2.1",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"simple-git-hooks": "^2.11.1",
|
|
33
33
|
"solid-js": "^1.9.1",
|
|
34
34
|
"vite": "^5.4.8",
|
|
35
|
-
"vite-plugin-blocklet": "^0.9.
|
|
35
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
36
36
|
"vite-plugin-solid": "^2.10.2",
|
|
37
37
|
"zx": "^8.1.8"
|
|
38
38
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const middlewares = require('@blocklet/sdk/lib/middlewares');
|
|
2
2
|
const router = require('express').Router();
|
|
3
3
|
|
|
4
|
-
router.use('/user',
|
|
4
|
+
router.use('/user', middlewares.session(), (req, res) => res.json(req.user || {}));
|
|
5
5
|
|
|
6
6
|
router.use('/data', (req, res) =>
|
|
7
7
|
res.json({
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@blocklet/js-sdk": "^1.16.32",
|
|
35
35
|
"@sveltejs/vite-plugin-svelte": "3.1.1",
|
|
36
36
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
37
|
-
"bumpp": "^9.
|
|
37
|
+
"bumpp": "^9.6.1",
|
|
38
38
|
"cross-env": "^7.0.3",
|
|
39
39
|
"lint-staged": "^15.2.10",
|
|
40
40
|
"npm-run-all": "^4.1.5",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"simple-git-hooks": "^2.11.1",
|
|
45
45
|
"svelte": "^4.2.19",
|
|
46
46
|
"vite": "^5.4.8",
|
|
47
|
-
"vite-plugin-blocklet": "^0.9.
|
|
47
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
48
48
|
"zx": "^8.1.8"
|
|
49
49
|
},
|
|
50
50
|
"lint-staged": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
20
|
-
"bumpp": "^9.
|
|
20
|
+
"bumpp": "^9.6.1",
|
|
21
21
|
"lint-staged": "^15.2.10",
|
|
22
22
|
"prettier": "^3.3.3",
|
|
23
23
|
"prettier-plugin-svelte": "^3.2.7",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"simple-git-hooks": "^2.11.1",
|
|
26
26
|
"svelte": "^4.2.19",
|
|
27
27
|
"vite": "^5.4.8",
|
|
28
|
-
"vite-plugin-blocklet": "^0.9.
|
|
28
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
29
29
|
"zx": "^8.1.8"
|
|
30
30
|
},
|
|
31
31
|
"lint-staged": {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import middlewares from '@blocklet/sdk/lib/middlewares';
|
|
2
2
|
import { Router } from 'express';
|
|
3
3
|
|
|
4
4
|
import todoListRouter from './todo-list';
|
|
5
5
|
|
|
6
6
|
const router = Router();
|
|
7
7
|
|
|
8
|
-
router.use('/user',
|
|
9
|
-
router.use('/todo-list',
|
|
8
|
+
router.use('/user', middlewares.session(), (req, res) => res.json(req.user || {}));
|
|
9
|
+
router.use('/todo-list', middlewares.session(), todoListRouter);
|
|
10
10
|
|
|
11
11
|
export default router;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import middlewares from '@blocklet/sdk/lib/middlewares';
|
|
2
2
|
import { Router } from 'express';
|
|
3
3
|
|
|
4
4
|
import $get from './$get';
|
|
@@ -7,7 +7,7 @@ import $put from './$put';
|
|
|
7
7
|
const todoListRouter = Router();
|
|
8
8
|
|
|
9
9
|
// Step 2: the function of reading and writing DID Space is implemented
|
|
10
|
-
todoListRouter.get('/',
|
|
11
|
-
todoListRouter.put('/',
|
|
10
|
+
todoListRouter.get('/', middlewares.session(), $get);
|
|
11
|
+
todoListRouter.put('/', middlewares.session(), $put);
|
|
12
12
|
|
|
13
13
|
export default todoListRouter;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@arcblock/did-auth": "^1.18.135",
|
|
42
42
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
43
43
|
"@blocklet/sdk": "^1.16.32",
|
|
44
|
-
"@did-space
|
|
44
|
+
"@blocklet/did-space-js": "^0.5.58",
|
|
45
45
|
"@did-space/core": "^0.5.47",
|
|
46
46
|
"@ocap/client": "^1.18.135",
|
|
47
47
|
"@ocap/mcrypto": "^1.18.135",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"@types/react": "^18.3.10",
|
|
77
77
|
"@types/react-dom": "^18.3.0",
|
|
78
78
|
"@types/react-toastify": "^4.1.0",
|
|
79
|
-
"@vitejs/plugin-react": "^4.3.
|
|
80
|
-
"bumpp": "^9.
|
|
79
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
80
|
+
"bumpp": "^9.6.1",
|
|
81
81
|
"cross-env": "^7.0.3",
|
|
82
82
|
"eslint": "^8.57.1",
|
|
83
83
|
"eslint-plugin-prettier": "^5.2.1",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"ts-node": "^10.9.2",
|
|
97
97
|
"typescript": "^5.6.2",
|
|
98
98
|
"vite": "^5.4.8",
|
|
99
|
-
"vite-plugin-blocklet": "^0.9.
|
|
99
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
100
100
|
"vite-plugin-svgr": "^4.2.0",
|
|
101
101
|
"zx": "^8.1.8"
|
|
102
102
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const middlewares = require('@blocklet/sdk/lib/middlewares');
|
|
2
2
|
const router = require('express').Router();
|
|
3
3
|
|
|
4
|
-
router.use('/user',
|
|
4
|
+
router.use('/user', middlewares.session(), (req, res) => res.json(req.user || {}));
|
|
5
5
|
|
|
6
6
|
router.use('/data', (req, res) =>
|
|
7
7
|
res.json({
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@blocklet/js-sdk": "^1.16.32",
|
|
37
37
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
38
38
|
"@vitejs/plugin-vue": "^5.1.4",
|
|
39
|
-
"bumpp": "^9.
|
|
39
|
+
"bumpp": "^9.6.1",
|
|
40
40
|
"cross-env": "^7.0.3",
|
|
41
41
|
"eslint": "^8.57.1",
|
|
42
42
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"rimraf": "^5.0.10",
|
|
50
50
|
"simple-git-hooks": "^2.11.1",
|
|
51
51
|
"vite": "^5.4.8",
|
|
52
|
-
"vite-plugin-blocklet": "^0.9.
|
|
52
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
53
53
|
"vue": "^3.5.10",
|
|
54
54
|
"zx": "^8.1.8"
|
|
55
55
|
},
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
22
22
|
"@vitejs/plugin-vue": "^5.1.4",
|
|
23
|
-
"bumpp": "^9.
|
|
23
|
+
"bumpp": "^9.6.1",
|
|
24
24
|
"eslint": "^8.57.1",
|
|
25
25
|
"eslint-config-prettier": "^9.1.0",
|
|
26
26
|
"eslint-plugin-prettier": "^5.2.1",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"rimraf": "^5.0.10",
|
|
31
31
|
"simple-git-hooks": "^2.11.1",
|
|
32
32
|
"vite": "^5.4.8",
|
|
33
|
-
"vite-plugin-blocklet": "^0.9.
|
|
33
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
34
34
|
"vue": "^3.5.10",
|
|
35
35
|
"zx": "^8.1.8"
|
|
36
36
|
},
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@antfu/eslint-config": "^2.27.3",
|
|
31
31
|
"@blocklet/cli": "^1.16.32",
|
|
32
32
|
"@vitejs/plugin-vue": "^5.1.4",
|
|
33
|
-
"bumpp": "^9.
|
|
33
|
+
"bumpp": "^9.6.1",
|
|
34
34
|
"eslint": "9.5.0",
|
|
35
35
|
"eslint-plugin-format": "^0.1.2",
|
|
36
36
|
"lint-staged": "^15.2.10",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"taze": "^0.16.9",
|
|
40
40
|
"typescript": "^5.6.2",
|
|
41
41
|
"vite": "^5.4.8",
|
|
42
|
-
"vite-plugin-blocklet": "^0.9.
|
|
42
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
43
43
|
"vue-tsc": "^2.1.6",
|
|
44
44
|
"zx": "^8.1.8"
|
|
45
45
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const
|
|
1
|
+
const middlewares = require('@blocklet/sdk/lib/middlewares');
|
|
2
2
|
const router = require('express').Router();
|
|
3
3
|
|
|
4
|
-
router.use('/user',
|
|
4
|
+
router.use('/user', middlewares.session(), (req, res) => res.json(req.user || {}));
|
|
5
5
|
|
|
6
6
|
module.exports = router;
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
37
37
|
"@vitejs/plugin-vue2": "^2.3.1",
|
|
38
|
-
"bumpp": "^9.
|
|
38
|
+
"bumpp": "^9.6.1",
|
|
39
39
|
"cross-env": "^7.0.3",
|
|
40
40
|
"eslint": "^8.57.1",
|
|
41
41
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"rimraf": "^5.0.10",
|
|
49
49
|
"simple-git-hooks": "^2.11.1",
|
|
50
50
|
"vite": "^5.4.8",
|
|
51
|
-
"vite-plugin-blocklet": "^0.9.
|
|
51
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
52
52
|
"vue": "^2.7.16",
|
|
53
53
|
"zx": "^8.1.8"
|
|
54
54
|
},
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
22
22
|
"@vitejs/plugin-vue2": "^2.3.1",
|
|
23
|
-
"bumpp": "^9.
|
|
23
|
+
"bumpp": "^9.6.1",
|
|
24
24
|
"eslint": "^8.57.1",
|
|
25
25
|
"eslint-config-prettier": "^9.1.0",
|
|
26
26
|
"eslint-plugin-prettier": "^5.2.1",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"rimraf": "^5.0.10",
|
|
31
31
|
"simple-git-hooks": "^2.11.1",
|
|
32
32
|
"vite": "^5.4.8",
|
|
33
|
-
"vite-plugin-blocklet": "^0.9.
|
|
33
|
+
"vite-plugin-blocklet": "^0.9.12",
|
|
34
34
|
"vue": "^2.7.16",
|
|
35
35
|
"zx": "^8.1.8"
|
|
36
36
|
},
|