create-blocklet 0.3.9 → 0.3.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/lib/server.js CHANGED
@@ -4,7 +4,7 @@ import semver from 'semver';
4
4
  $.verbose = false;
5
5
 
6
6
  function trimServerOutputVersion(output = '') {
7
- return output?.replace(/blocklet \S+ v\d+\.\d+\.\d\n+/g, '');
7
+ return output?.replace(/blocklet \S+ v\d+\.\d+\.\d+\n+/g, '');
8
8
  }
9
9
 
10
10
  export async function checkServerInstalled() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-blocklet",
3
- "version": "0.3.9",
3
+ "version": "0.3.12",
4
4
  "exports": "./index.js",
5
5
  "type": "module",
6
6
  "repository": "git@github.com:blocklet/create-blocklet.git",
@@ -24,40 +24,31 @@
24
24
  "homepage": "https://github.com/blocklet/create-blocklet/tree/main#readme",
25
25
  "scripts": {
26
26
  "lint": "eslint .",
27
- "test": "vitest",
27
+ "test": "NODE_ENV=development vitest",
28
28
  "test:ui": "vitest --ui",
29
29
  "test:run": "vitest run"
30
30
  },
31
31
  "dependencies": {
32
- "@arcblock/did": "^1.16.0",
33
- "@ocap/mcrypto": "^1.16.0",
34
- "@ocap/util": "^1.16.0",
32
+ "@arcblock/did": "^1.16.15",
33
+ "@ocap/mcrypto": "^1.16.15",
34
+ "@ocap/util": "^1.16.15",
35
35
  "boxen": "^6.2.1",
36
- "ejs": "^3.1.6",
36
+ "ejs": "^3.1.8",
37
37
  "envfile": "^6.17.0",
38
38
  "figlet": "^1.5.2",
39
39
  "get-port": "^6.1.2",
40
- "gradient-string": "^2.0.0",
40
+ "gradient-string": "^2.0.1",
41
41
  "jdenticon": "^3.1.1",
42
42
  "ora": "^6.1.0",
43
43
  "prompts": "^2.4.2",
44
- "semver": "^7.3.6",
44
+ "semver": "^7.3.7",
45
45
  "terminal-link": "^3.0.0",
46
- "zx": "^6.0.7"
46
+ "zx": "^6.2.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@arcblock/eslint-config": "0.1.8",
50
- "babel-eslint": "^10.1.0",
51
- "eslint": "^7.31.0",
52
- "eslint-config-airbnb": "^18.2.1",
53
- "eslint-config-prettier": "^8.3.0",
54
- "eslint-plugin-import": "^2.23.4",
55
- "eslint-plugin-jsx-a11y": "^6.4.1",
56
- "eslint-plugin-prettier": "^3.4.0",
57
- "eslint-plugin-react": "^7.24.0",
58
- "eslint-plugin-react-hooks": "^4.2.0",
59
- "eslint-plugin-unicorn": "^34.0.1",
60
- "prettier": "^2.3.2",
61
- "vitest": "^0.9.0"
49
+ "@arcblock/eslint-config": "0.2.1",
50
+ "eslint": "^8.16.0",
51
+ "prettier": "^2.6.2",
52
+ "vitest": "^0.13.1"
62
53
  }
63
54
  }
@@ -11,6 +11,6 @@
11
11
  "upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json"
12
12
  },
13
13
  "dependencies": {
14
- "@xmark/cli": "^2.0.37"
14
+ "@xmark/cli": "^2.0.44"
15
15
  }
16
16
  }
@@ -15,10 +15,10 @@
15
15
  "license": "ISC",
16
16
  "dependencies": {
17
17
  "@arcblock/did-auth-storage-nedb": "^1.6.3",
18
- "@blocklet/sdk": "^1.7.9",
19
- "@ocap/client": "^1.16.4",
18
+ "@blocklet/sdk": "^1.7.20",
19
+ "@ocap/client": "^1.16.15",
20
20
  "dotenv-flow": "^3.2.0",
21
- "express": "^4.18.0"
21
+ "express": "^4.18.1"
22
22
  },
23
23
  "devDependencies": {
24
24
  "nodemon": "^2.0.16"
@@ -0,0 +1,142 @@
1
+ # Getting Started with Create Blocklet
2
+
3
+ This project was bootstrapped with [Create Blocklet](https://github.com/blocklet/create-blocklet).
4
+
5
+ This blocklet is a static project, which means this is a frontend application. It's contained `client` code.
6
+
7
+ ## File Structure
8
+
9
+ - app/ - Client side code (A static html project structure)
10
+ - .env - Environment variables
11
+ - .env.local - Local environment variables
12
+ - .eslintrc.js - ESLint configuration
13
+ - .gitignore - Git ignore file
14
+ - .prettierrc - Prettier configuration
15
+ - blocklet.md - Blocklet README
16
+ - blocklet.yml - Blocklet configuration
17
+ - LICENSE - License file
18
+ - logo.png - Blocklet logo file
19
+ - Makefile - Makefile
20
+ - package.json - Npm package file
21
+ - README.md - A guide for this blocklet
22
+ - version - Version file
23
+
24
+ ## Development
25
+
26
+ 1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
27
+
28
+ Blocklet needs blocklet server as a dependency. So you need to install it first.
29
+ `npm install -g @blocklet/cli`
30
+ See details in [https://docs.arcblock.io/abtnode/en/introduction/abtnode-setup#use-the-binary-distribution](https://docs.arcblock.io/abtnode/en/introduction/abtnode-setup#use-the-binary-distribution)
31
+
32
+ 2. Init blocklet server & start blocklet server
33
+
34
+ Before starting an blocklet server, you need to init blocklet server.
35
+ `blocklet server init --mode=debug`
36
+ `blocklet server start`
37
+ See details in [https://docs.arcblock.io/abtnode/en/introduction/abtnode-setup#configure-abt-node](https://docs.arcblock.io/abtnode/en/introduction/abtnode-setup#configure-abt-node)
38
+
39
+ 3. Go to the project directory `cd [name]`
40
+ 4. Install dependencies: `npm install` or `yarn`
41
+ 5. Start development server: `blocklet dev`
42
+
43
+ ## Bundle
44
+
45
+ After developing a blocklet, you may need to bundle it. Use `npm run bundle` command.
46
+
47
+ ## Deploy
48
+
49
+ - If you want to deploy this blocklet to local blocklet server, you can use `blocklet deploy .blocklet/bundle` command(Make sure the blocklet is bundled before deployment.)
50
+ > Or you can simply use `npm run deploy` command.
51
+ - If you want to deploy this blocklet to remote blocklet server, you can use the command below.
52
+
53
+ ```shell
54
+ blocklet deploy .blocklet/bundle --endpoint {your blocklet server url} --access-key {blocklet server access key} --access-secret {blocklet server access secret}
55
+ ```
56
+
57
+ > Make sure the blocklet is bundled before deployment.
58
+
59
+ ## Upload to blocklet store
60
+
61
+ - If you want to upload the blocklet to any store for other users to download and use, you can following the following instructions.
62
+
63
+ Bump version at first.
64
+
65
+ ```shell
66
+ make bump-version
67
+ ```
68
+
69
+ Then config blocklet store url.
70
+ You can use those store url in below.
71
+
72
+ 1. [https://store.blocklet.dev/](https://store.blocklet.dev/)
73
+ 2. [https://dev.store.blocklet.dev/](https://dev.store.blocklet.dev/)
74
+ 3. A blocklet store started by yourself.
75
+ > Make sure you have installed a `blocklet store` on your own blocklet server. Check it on here: [https://store.blocklet.dev/blocklet/z8ia29UsENBg6tLZUKi2HABj38Cw1LmHZocbQ](https://store.blocklet.dev/blocklet/z8ia29UsENBg6tLZUKi2HABj38Cw1LmHZocbQ)
76
+
77
+ ```shell
78
+ blocklet config set store {store url}
79
+ ```
80
+
81
+ Get a `accessToken` from blocklet store.
82
+
83
+ > Why we need a `accessToken`?
84
+ > A `accessToken` is genrate by blocklet store, which help us upload our blocklet to any store.
85
+
86
+ Set `accessToken` to blocklet config
87
+
88
+ ```shell
89
+ blocklet config set accessToken {accessToken}
90
+ ```
91
+
92
+ Upload a new version to a store.
93
+
94
+ > Make sure the blocklet is bundled before upload.
95
+
96
+ ```shell
97
+ blocklet upload
98
+ ```
99
+
100
+ Or you can simply use `npm run upload` command.
101
+
102
+ - You also can upload a new version to blocklet store by Github CI.
103
+ Bump version at first.
104
+
105
+ ```shell
106
+ make bump-version
107
+ ```
108
+
109
+ Push your code to Github main/master branch, or make a pull request to the main/master branch.
110
+ The CI workflow will automatically upload a new version to a store.
111
+
112
+ ## Q & A
113
+
114
+ 1. Q: How to change a blocklet's name?
115
+
116
+ A: Change the `name` field in the `package.json` file, change the `name` field in the `blocklet.yml` file.
117
+
118
+ You can also change the `title` field and `description` field in the `blocklet.yml` file.
119
+
120
+ Run `blocklet meta` command, you will get a `did` config, copy the `did` value.
121
+
122
+ Replace this command `"bundle": "PUBLIC_URL='/.blocklet/proxy/{did}' npm run build",` in `package.json`
123
+
124
+ Replace `did` field in the `blocklet.yml`
125
+
126
+ 2. Q: How to change a blocklet's logo?
127
+
128
+ Change the `logo.png` file root folder.
129
+
130
+ Or you can change the `logo` field in the `blocklet.yml` file.
131
+
132
+ > Make sure you have added the logo path to the `blocklet.yml` file `files` field.
133
+
134
+ ## Learn More
135
+
136
+ - Full specification of `blocklet.yml`: [https://github.com/blocklet/blocklet-specification/blob/main/docs/meta.md](https://github.com/blocklet/blocklet-specification/blob/main/docs/meta.md)
137
+ - Full document of Blocklet Server & blocklet development: [https://docs.arcblock.io/abtnode/en/introduction](https://docs.arcblock.io/abtnode/en/introduction)
138
+
139
+ ## License
140
+
141
+ The code is licensed under the Apache 2.0 license found in the
142
+ [LICENSE](LICENSE) file.
@@ -3,9 +3,9 @@
3
3
  "version": "0.1.0",
4
4
  "scripts": {
5
5
  "clean": "rm -rf .blocklet",
6
- "release": "npm run clean && blocklet bundle --create-release",
7
- "deploy": "npm run release && blocklet deploy .blocklet/bundle --skip-hooks",
8
- "upload": "npm run release && blocklet upload .blocklet/release/blocklet.json"
6
+ "bundle": "npm run clean && blocklet bundle --create-release",
7
+ "deploy": "npm run bundle && blocklet deploy .blocklet/bundle --skip-hooks",
8
+ "upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json"
9
9
  },
10
10
  "keywords": [],
11
11
  "author": "",
@@ -25,23 +25,23 @@
25
25
  ]
26
26
  },
27
27
  "dependencies": {
28
- "@arcblock/did-auth": "^1.16.4",
28
+ "@arcblock/did-auth": "^1.16.15",
29
29
  "@arcblock/did-auth-storage-nedb": "^1.6.3",
30
- "@blocklet/sdk": "^1.7.9",
31
- "@ocap/client": "^1.16.4",
32
- "@ocap/mcrypto": "^1.16.4",
33
- "@ocap/wallet": "^1.16.4",
30
+ "@blocklet/sdk": "^1.7.20",
31
+ "@ocap/client": "^1.16.15",
32
+ "@ocap/mcrypto": "^1.16.15",
33
+ "@ocap/wallet": "^1.16.15",
34
34
  "dotenv-flow": "^3.2.0",
35
- "express": "^4.18.0",
36
- "next": "12.1.5",
35
+ "express": "^4.18.1",
36
+ "next": "12.1.6",
37
37
  "react": "18.1.0",
38
38
  "react-dom": "18.1.0"
39
39
  },
40
40
  "devDependencies": {
41
- "eslint": "8.14.0",
42
- "eslint-config-next": "12.1.5",
43
- "husky": "^7.0.4",
44
- "lint-staged": "^12.4.1",
41
+ "eslint": "8.16.0",
42
+ "eslint-config-next": "12.1.6",
43
+ "husky": "^8.0.1",
44
+ "lint-staged": "^12.5.0",
45
45
  "nodemon": "^2.0.16",
46
46
  "npm-run-all": "^4.1.5"
47
47
  }
@@ -20,6 +20,7 @@ app.use(express.urlencoded({ extended: true, limit: '1 mb' }));
20
20
  const router = express.Router();
21
21
  router.use('/api', require('./routes'));
22
22
 
23
+ const isDevelopment = process.env.NODE_ENV === 'development';
23
24
  const isProduction = process.env.NODE_ENV === 'production' || process.env.ABT_NODE_SERVICE_ENV === 'production';
24
25
 
25
26
  if (isProduction) {
@@ -42,7 +43,7 @@ if (isProduction) {
42
43
  app.use(router);
43
44
  }
44
45
 
45
- const port = parseInt(process.env.API_PORT, 10) || 3030;
46
+ const port = (isDevelopment ? parseInt(process.env.API_PORT, 10) : parseInt(process.env.BLOCKLET_PORT, 10)) || 3030;
46
47
 
47
48
  app.listen(port, (err) => {
48
49
  if (err) throw err;
@@ -39,42 +39,34 @@
39
39
  ]
40
40
  },
41
41
  "dependencies": {
42
- "@arcblock/did-auth": "^1.16.4",
42
+ "@arcblock/did-auth": "^1.16.15",
43
43
  "@arcblock/did-auth-storage-nedb": "^1.6.3",
44
- "@blocklet/sdk": "^1.7.9",
45
- "@craco/craco": "^6.4.3",
46
- "@ocap/client": "^1.16.4",
47
- "@ocap/mcrypto": "^1.16.4",
48
- "@ocap/wallet": "^1.16.4",
44
+ "@blocklet/sdk": "^1.7.20",
45
+ "@ocap/client": "^1.16.15",
46
+ "@ocap/mcrypto": "^1.16.15",
47
+ "@ocap/wallet": "^1.16.15",
49
48
  "axios": "^0.27.2",
50
49
  "compression": "^1.7.4",
51
50
  "cookie-parser": "^1.4.6",
52
51
  "cors": "^2.8.5",
53
52
  "dotenv-flow": "^3.2.0",
54
- "express": "^4.18.0",
53
+ "express": "^4.18.1",
55
54
  "express-async-errors": "^3.1.1",
56
55
  "express-history-api-fallback": "^2.2.1",
57
- "react": "^17.0.2",
58
- "react-dom": "^17.0.2",
59
- "react-router-dom": "^6.3.0",
60
- "react-scripts": "5.0.1"
56
+ "react": "^18.1.0",
57
+ "react-dom": "^18.1.0",
58
+ "react-router-dom": "^6.3.0"
61
59
  },
62
60
  "devDependencies": {
63
- "@arcblock/eslint-config": "^0.1.8",
61
+ "@arcblock/eslint-config": "^0.2.1",
62
+ "@craco/craco": "^6.4.3",
64
63
  "babel-eslint": "^10.1.0",
65
- "eslint": "^7.32.0",
66
- "eslint-config-airbnb": "^18.2.1",
67
- "eslint-config-prettier": "^8.3.0",
68
- "eslint-plugin-import": "^2.23.4",
69
- "eslint-plugin-jsx-a11y": "^6.4.1",
70
- "eslint-plugin-prettier": "^3.4.1",
71
- "eslint-plugin-react": "^7.24.0",
72
- "eslint-plugin-react-hooks": "^4.2.0",
73
- "eslint-plugin-unicorn": "^34.0.1",
74
- "husky": "^7.0.4",
75
- "lint-staged": "^12.4.1",
64
+ "eslint": "^8.16.0",
65
+ "husky": "^8.0.1",
66
+ "lint-staged": "^12.5.0",
76
67
  "nodemon": "^2.0.16",
77
68
  "npm-run-all": "^4.1.5",
78
- "prettier": "^2.6.0"
69
+ "prettier": "^2.6.2",
70
+ "react-scripts": "5.0.1"
79
71
  }
80
72
  }
@@ -1,5 +1,10 @@
1
1
  import React from 'react';
2
- import ReactDOM from 'react-dom';
2
+ import ReactDOM from 'react-dom/client';
3
3
  import App from './app';
4
4
 
5
- ReactDOM.render(<App />, document.getElementById('root'));
5
+ const root = ReactDOM.createRoot(document.getElementById('root'));
6
+ root.render(
7
+ <React.StrictMode>
8
+ <App />
9
+ </React.StrictMode>
10
+ );
@@ -25,6 +25,7 @@ app.use(Gun.serve);
25
25
  const router = express.Router();
26
26
  router.use('/api', require('./routes'));
27
27
 
28
+ const isDevelopment = process.env.NODE_ENV === 'development';
28
29
  const isProduction = process.env.NODE_ENV === 'production' || process.env.ABT_NODE_SERVICE_ENV === 'production';
29
30
 
30
31
  if (isProduction) {
@@ -47,7 +48,7 @@ if (isProduction) {
47
48
  app.use(router);
48
49
  }
49
50
 
50
- const port = parseInt(process.env.API_PORT, 10) || 3030;
51
+ const port = (isDevelopment ? parseInt(process.env.API_PORT, 10) : parseInt(process.env.BLOCKLET_PORT, 10)) || 3030;
51
52
 
52
53
  const server = app.listen(port, (err) => {
53
54
  if (err) throw err;
@@ -39,43 +39,34 @@
39
39
  ]
40
40
  },
41
41
  "dependencies": {
42
- "@arcblock/did-auth": "^1.16.4",
42
+ "@arcblock/did-auth": "^1.16.15",
43
43
  "@arcblock/did-auth-storage-nedb": "^1.6.3",
44
- "@blocklet/sdk": "^1.7.9",
45
- "@craco/craco": "^6.4.3",
46
- "@ocap/client": "^1.16.4",
47
- "@ocap/mcrypto": "^1.16.4",
48
- "@ocap/wallet": "^1.16.4",
44
+ "@blocklet/sdk": "^1.7.20",
45
+ "@ocap/client": "^1.16.15",
46
+ "@ocap/mcrypto": "^1.16.15",
47
+ "@ocap/wallet": "^1.16.15",
49
48
  "axios": "^0.27.2",
50
49
  "compression": "^1.7.4",
51
50
  "cookie-parser": "^1.4.6",
52
51
  "cors": "^2.8.5",
53
52
  "dotenv-flow": "^3.2.0",
54
- "express": "^4.18.0",
53
+ "express": "^4.18.1",
55
54
  "express-async-errors": "^3.1.1",
56
55
  "express-history-api-fallback": "^2.2.1",
57
56
  "gun": "^0.2020.1237",
58
- "react": "^17.0.2",
59
- "react-dom": "^17.0.2",
60
- "react-router-dom": "^6.3.0",
61
- "react-scripts": "5.0.1"
57
+ "react": "^18.1.0",
58
+ "react-dom": "^18.1.0",
59
+ "react-router-dom": "^6.3.0"
62
60
  },
63
61
  "devDependencies": {
64
- "@arcblock/eslint-config": "^0.1.8",
65
- "babel-eslint": "^10.1.0",
66
- "eslint": "^7.32.0",
67
- "eslint-config-airbnb": "^18.2.1",
68
- "eslint-config-prettier": "^8.3.0",
69
- "eslint-plugin-import": "^2.23.4",
70
- "eslint-plugin-jsx-a11y": "^6.4.1",
71
- "eslint-plugin-prettier": "^3.4.1",
72
- "eslint-plugin-react": "^7.24.0",
73
- "eslint-plugin-react-hooks": "^4.2.0",
74
- "eslint-plugin-unicorn": "^34.0.1",
75
- "husky": "^7.0.4",
76
- "lint-staged": "^12.4.1",
62
+ "@arcblock/eslint-config": "^0.2.1",
63
+ "@craco/craco": "^6.4.3",
64
+ "eslint": "^8.16.0",
65
+ "husky": "^8.0.1",
66
+ "lint-staged": "^12.5.0",
77
67
  "nodemon": "^2.0.16",
78
68
  "npm-run-all": "^4.1.5",
79
- "prettier": "^2.6.2"
69
+ "prettier": "^2.6.2",
70
+ "react-scripts": "5.0.1"
80
71
  }
81
72
  }
@@ -1,5 +1,10 @@
1
1
  import React from 'react';
2
- import ReactDOM from 'react-dom';
2
+ import ReactDOM from 'react-dom/client';
3
3
  import App from './app';
4
4
 
5
- ReactDOM.render(<App />, document.getElementById('root'));
5
+ const root = ReactDOM.createRoot(document.getElementById('root'));
6
+ root.render(
7
+ <React.StrictMode>
8
+ <App />
9
+ </React.StrictMode>
10
+ );
@@ -35,26 +35,17 @@
35
35
  ]
36
36
  },
37
37
  "dependencies": {
38
- "@craco/craco": "^6.4.3",
39
38
  "react": "^18.1.0",
40
39
  "react-dom": "^18.1.0",
41
- "react-router-dom": "^6.3.0",
42
- "react-scripts": "5.0.1"
40
+ "react-router-dom": "^6.3.0"
43
41
  },
44
42
  "devDependencies": {
45
- "@arcblock/eslint-config": "^0.1.8",
46
- "babel-eslint": "^10.1.0",
47
- "eslint": "^7.32.0",
48
- "eslint-config-airbnb": "^18.2.1",
49
- "eslint-config-prettier": "^8.3.0",
50
- "eslint-plugin-import": "^2.23.4",
51
- "eslint-plugin-jsx-a11y": "^6.4.1",
52
- "eslint-plugin-prettier": "^3.4.1",
53
- "eslint-plugin-react": "^7.24.0",
54
- "eslint-plugin-react-hooks": "^4.2.0",
55
- "eslint-plugin-unicorn": "^34.0.1",
56
- "husky": "^7.0.4",
57
- "lint-staged": "^12.4.1",
58
- "prettier": "^2.6.2"
43
+ "@arcblock/eslint-config": "^0.2.1",
44
+ "@craco/craco": "^6.4.3",
45
+ "eslint": "^8.16.0",
46
+ "husky": "^8.0.1",
47
+ "lint-staged": "^12.5.0",
48
+ "prettier": "^2.6.2",
49
+ "react-scripts": "5.0.1"
59
50
  }
60
51
  }
@@ -1,5 +1,10 @@
1
1
  import React from 'react';
2
- import ReactDOM from 'react-dom';
2
+ import ReactDOM from 'react-dom/client';
3
3
  import App from './app';
4
4
 
5
- ReactDOM.render(<App />, document.getElementById('root'));
5
+ const root = ReactDOM.createRoot(document.getElementById('root'));
6
+ root.render(
7
+ <React.StrictMode>
8
+ <App />
9
+ </React.StrictMode>
10
+ );
@@ -20,6 +20,7 @@ app.use(express.urlencoded({ extended: true, limit: '1 mb' }));
20
20
  const router = express.Router();
21
21
  router.use('/api', require('./routes'));
22
22
 
23
+ const isDevelopment = process.env.NODE_ENV === 'development';
23
24
  const isProduction = process.env.NODE_ENV === 'production' || process.env.ABT_NODE_SERVICE_ENV === 'production';
24
25
 
25
26
  if (isProduction) {
@@ -42,7 +43,7 @@ if (isProduction) {
42
43
  app.use(router);
43
44
  }
44
45
 
45
- const port = parseInt(process.env.API_PORT, 10) || 3030;
46
+ const port = (isDevelopment ? parseInt(process.env.API_PORT, 10) : parseInt(process.env.BLOCKLET_PORT, 10)) || 3030;
46
47
 
47
48
  app.listen(port, (err) => {
48
49
  if (err) throw err;
@@ -20,36 +20,36 @@
20
20
  },
21
21
  "license": "MIT",
22
22
  "devDependencies": {
23
- "eslint": "^8.14.0",
23
+ "eslint": "^8.16.0",
24
24
  "eslint-config-prettier": "^8.5.0",
25
25
  "eslint-plugin-prettier": "^4.0.0",
26
- "eslint-plugin-solid": "0.4.7",
27
- "husky": "^7.0.4",
28
- "lint-staged": "^12.4.1",
26
+ "eslint-plugin-solid": "0.6.0",
27
+ "husky": "^8.0.1",
28
+ "lint-staged": "^12.5.0",
29
29
  "nodemon": "^2.0.16",
30
30
  "npm-run-all": "^4.1.5",
31
31
  "prettier": "^2.6.2",
32
- "vite": "^2.9.6",
32
+ "vite": "^2.9.9",
33
33
  "vite-plugin-solid": "^2.2.6",
34
34
  "vite-plugin-blocklet": "^0.1.2",
35
35
  "vite-plugin-html": "^3.2.0"
36
36
  },
37
37
  "dependencies": {
38
- "@arcblock/did-auth": "^1.16.4",
38
+ "@arcblock/did-auth": "^1.16.15",
39
39
  "@arcblock/did-auth-storage-nedb": "^1.6.3",
40
- "@blocklet/sdk": "^1.7.9",
41
- "@ocap/client": "^1.16.4",
42
- "@ocap/mcrypto": "^1.16.4",
43
- "@ocap/wallet": "^1.16.4",
40
+ "@blocklet/sdk": "^1.7.20",
41
+ "@ocap/client": "^1.16.15",
42
+ "@ocap/mcrypto": "^1.16.15",
43
+ "@ocap/wallet": "^1.16.15",
44
44
  "axios": "^0.27.2",
45
45
  "compression": "^1.7.4",
46
46
  "cookie-parser": "^1.4.6",
47
47
  "cors": "^2.8.5",
48
48
  "dotenv-flow": "^3.2.0",
49
- "express": "^4.18.0",
49
+ "express": "^4.18.1",
50
50
  "express-async-errors": "^3.1.1",
51
51
  "express-history-api-fallback": "^2.2.1",
52
- "solid-js": "^1.3.17"
52
+ "solid-js": "^1.4.3"
53
53
  },
54
54
  "lint-staged": {
55
55
  "*.{mjs,js,vue}": [
@@ -16,20 +16,20 @@
16
16
  },
17
17
  "license": "MIT",
18
18
  "devDependencies": {
19
- "eslint": "^8.14.0",
19
+ "eslint": "^8.16.0",
20
20
  "eslint-config-prettier": "^8.5.0",
21
21
  "eslint-plugin-prettier": "^4.0.0",
22
- "eslint-plugin-solid": "0.4.7",
23
- "husky": "^7.0.4",
24
- "lint-staged": "^12.4.1",
22
+ "eslint-plugin-solid": "0.6.0",
23
+ "husky": "^8.0.1",
24
+ "lint-staged": "^12.5.0",
25
25
  "prettier": "^2.6.2",
26
- "vite": "^2.9.6",
26
+ "vite": "^2.9.9",
27
27
  "vite-plugin-solid": "^2.2.6",
28
28
  "vite-plugin-blocklet": "^0.1.2",
29
29
  "vite-plugin-html": "^3.2.0"
30
30
  },
31
31
  "dependencies": {
32
- "solid-js": "^1.3.17"
32
+ "solid-js": "^1.4.3"
33
33
  },
34
34
  "lint-staged": {
35
35
  "*.{mjs,js,vue}": [
@@ -20,6 +20,7 @@ app.use(express.urlencoded({ extended: true, limit: '1 mb' }));
20
20
  const router = express.Router();
21
21
  router.use('/api', require('./routes'));
22
22
 
23
+ const isDevelopment = process.env.NODE_ENV === 'development';
23
24
  const isProduction = process.env.NODE_ENV === 'production' || process.env.ABT_NODE_SERVICE_ENV === 'production';
24
25
 
25
26
  if (isProduction) {
@@ -42,7 +43,7 @@ if (isProduction) {
42
43
  app.use(router);
43
44
  }
44
45
 
45
- const port = parseInt(process.env.API_PORT, 10) || 3030;
46
+ const port = (isDevelopment ? parseInt(process.env.API_PORT, 10) : parseInt(process.env.BLOCKLET_PORT, 10)) || 3030;
46
47
 
47
48
  app.listen(port, (err) => {
48
49
  if (err) throw err;
@@ -18,32 +18,32 @@
18
18
  "prepare": "husky install"
19
19
  },
20
20
  "dependencies": {
21
- "@arcblock/did-auth": "^1.16.4",
21
+ "@arcblock/did-auth": "^1.16.15",
22
22
  "@arcblock/did-auth-storage-nedb": "^1.6.3",
23
- "@blocklet/sdk": "^1.7.9",
24
- "@ocap/client": "^1.16.4",
25
- "@ocap/mcrypto": "^1.16.4",
26
- "@ocap/wallet": "^1.16.4",
23
+ "@blocklet/sdk": "^1.7.20",
24
+ "@ocap/client": "^1.16.15",
25
+ "@ocap/mcrypto": "^1.16.15",
26
+ "@ocap/wallet": "^1.16.15",
27
27
  "axios": "^0.27.2",
28
28
  "compression": "^1.7.4",
29
29
  "cookie-parser": "^1.4.6",
30
30
  "cors": "^2.8.5",
31
31
  "dotenv-flow": "^3.2.0",
32
- "express": "^4.18.0",
32
+ "express": "^4.18.1",
33
33
  "express-async-errors": "^3.1.1",
34
34
  "express-history-api-fallback": "^2.2.1"
35
35
  },
36
36
  "devDependencies": {
37
- "@sveltejs/vite-plugin-svelte": "1.0.0-next.42",
38
- "eslint": "^8.14.0",
37
+ "@sveltejs/vite-plugin-svelte": "1.0.0-next.47",
38
+ "eslint": "^8.16.0",
39
39
  "eslint-config-prettier": "^8.5.0",
40
40
  "eslint-plugin-prettier": "^4.0.0",
41
- "eslint-plugin-svelte3": "^3.4.1",
42
- "husky": "^7.0.4",
43
- "lint-staged": "^12.4.1",
41
+ "eslint-plugin-svelte3": "^4.0.0",
42
+ "husky": "^8.0.1",
43
+ "lint-staged": "^12.5.0",
44
44
  "prettier": "^2.6.2",
45
- "svelte": "^3.47.0",
46
- "vite": "^2.9.6",
45
+ "svelte": "^3.48.0",
46
+ "vite": "^2.9.9",
47
47
  "vite-plugin-blocklet": "^0.1.2",
48
48
  "vite-plugin-html": "^3.2.0"
49
49
  },
@@ -15,16 +15,16 @@
15
15
  "prepare": "husky install"
16
16
  },
17
17
  "devDependencies": {
18
- "@sveltejs/vite-plugin-svelte": "1.0.0-next.42",
19
- "eslint": "^8.14.0",
18
+ "@sveltejs/vite-plugin-svelte": "1.0.0-next.47",
19
+ "eslint": "^8.16.0",
20
20
  "eslint-config-prettier": "^8.5.0",
21
21
  "eslint-plugin-prettier": "^4.0.0",
22
- "eslint-plugin-svelte3": "^3.4.1",
23
- "husky": "^7.0.4",
24
- "lint-staged": "^12.4.1",
22
+ "eslint-plugin-svelte3": "^4.0.0",
23
+ "husky": "^8.0.1",
24
+ "lint-staged": "^12.5.0",
25
25
  "prettier": "^2.6.2",
26
- "svelte": "^3.47.0",
27
- "vite": "^2.9.6",
26
+ "svelte": "^3.48.0",
27
+ "vite": "^2.9.9",
28
28
  "vite-plugin-blocklet": "^0.1.2",
29
29
  "vite-plugin-html": "^3.2.0"
30
30
  },
@@ -20,6 +20,7 @@ app.use(express.urlencoded({ extended: true, limit: '1 mb' }));
20
20
  const router = express.Router();
21
21
  router.use('/api', require('./routes'));
22
22
 
23
+ const isDevelopment = process.env.NODE_ENV === 'development';
23
24
  const isProduction = process.env.NODE_ENV === 'production' || process.env.ABT_NODE_SERVICE_ENV === 'production';
24
25
 
25
26
  if (isProduction) {
@@ -42,7 +43,7 @@ if (isProduction) {
42
43
  app.use(router);
43
44
  }
44
45
 
45
- const port = parseInt(process.env.API_PORT, 10) || 3030;
46
+ const port = (isDevelopment ? parseInt(process.env.API_PORT, 10) : parseInt(process.env.BLOCKLET_PORT, 10)) || 3030;
46
47
 
47
48
  app.listen(port, (err) => {
48
49
  if (err) throw err;
@@ -18,35 +18,35 @@
18
18
  "prepare": "husky install"
19
19
  },
20
20
  "dependencies": {
21
- "@arcblock/did-auth": "^1.16.4",
21
+ "@arcblock/did-auth": "^1.16.15",
22
22
  "@arcblock/did-auth-storage-nedb": "^1.6.3",
23
- "@blocklet/sdk": "^1.7.9",
24
- "@ocap/client": "^1.16.4",
25
- "@ocap/mcrypto": "^1.16.4",
26
- "@ocap/wallet": "^1.16.4",
23
+ "@blocklet/sdk": "^1.7.20",
24
+ "@ocap/client": "^1.16.15",
25
+ "@ocap/mcrypto": "^1.16.15",
26
+ "@ocap/wallet": "^1.16.15",
27
27
  "axios": "^0.27.2",
28
28
  "compression": "^1.7.4",
29
29
  "cookie-parser": "^1.4.6",
30
30
  "cors": "^2.8.5",
31
31
  "dotenv-flow": "^3.2.0",
32
- "express": "^4.18.0",
32
+ "express": "^4.18.1",
33
33
  "express-async-errors": "^3.1.1",
34
34
  "express-history-api-fallback": "^2.2.1",
35
35
  "vite-plugin-html": "^3.2.0",
36
- "vue": "^3.2.33"
36
+ "vue": "^3.2.36"
37
37
  },
38
38
  "devDependencies": {
39
- "@vitejs/plugin-vue": "^2.3.1",
40
- "eslint": "^8.14.0",
39
+ "@vitejs/plugin-vue": "^2.3.3",
40
+ "eslint": "^8.16.0",
41
41
  "eslint-config-prettier": "^8.5.0",
42
42
  "eslint-plugin-prettier": "^4.0.0",
43
- "eslint-plugin-vue": "^8.7.1",
44
- "husky": "^7.0.4",
45
- "lint-staged": "^12.4.1",
43
+ "eslint-plugin-vue": "^9.1.0",
44
+ "husky": "^8.0.1",
45
+ "lint-staged": "^12.5.0",
46
46
  "nodemon": "^2.0.16",
47
47
  "npm-run-all": "^4.1.5",
48
48
  "prettier": "^2.6.2",
49
- "vite": "^2.9.6",
49
+ "vite": "^2.9.9",
50
50
  "vite-plugin-blocklet": "^0.1.2"
51
51
  },
52
52
  "lint-staged": {
@@ -14,18 +14,18 @@
14
14
  "prepare": "husky install"
15
15
  },
16
16
  "dependencies": {
17
- "vue": "^3.2.33"
17
+ "vue": "^3.2.36"
18
18
  },
19
19
  "devDependencies": {
20
- "@vitejs/plugin-vue": "^2.3.1",
21
- "eslint": "^8.14.0",
20
+ "@vitejs/plugin-vue": "^2.3.3",
21
+ "eslint": "^8.16.0",
22
22
  "eslint-config-prettier": "^8.5.0",
23
23
  "eslint-plugin-prettier": "^4.0.0",
24
- "eslint-plugin-vue": "^8.7.1",
25
- "husky": "^7.0.4",
26
- "lint-staged": "^12.4.1",
24
+ "eslint-plugin-vue": "^9.1.0",
25
+ "husky": "^8.0.1",
26
+ "lint-staged": "^12.5.0",
27
27
  "prettier": "^2.6.2",
28
- "vite": "^2.9.6",
28
+ "vite": "^2.9.9",
29
29
  "vite-plugin-blocklet": "^0.1.2",
30
30
  "vite-plugin-html": "^3.2.0"
31
31
  },
@@ -20,6 +20,7 @@ app.use(express.urlencoded({ extended: true, limit: '1 mb' }));
20
20
  const router = express.Router();
21
21
  router.use('/api', require('./routes'));
22
22
 
23
+ const isDevelopment = process.env.NODE_ENV === 'development';
23
24
  const isProduction = process.env.NODE_ENV === 'production' || process.env.ABT_NODE_SERVICE_ENV === 'production';
24
25
 
25
26
  if (isProduction) {
@@ -42,7 +43,7 @@ if (isProduction) {
42
43
  app.use(router);
43
44
  }
44
45
 
45
- const port = parseInt(process.env.API_PORT, 10) || 3030;
46
+ const port = (isDevelopment ? parseInt(process.env.API_PORT, 10) : parseInt(process.env.BLOCKLET_PORT, 10)) || 3030;
46
47
 
47
48
  app.listen(port, (err) => {
48
49
  if (err) throw err;
@@ -18,35 +18,35 @@
18
18
  "prepare": "husky install"
19
19
  },
20
20
  "dependencies": {
21
- "@arcblock/did-auth": "^1.16.4",
21
+ "@arcblock/did-auth": "^1.16.15",
22
22
  "@arcblock/did-auth-storage-nedb": "^1.6.3",
23
- "@blocklet/sdk": "^1.7.9",
24
- "@ocap/client": "^1.16.4",
25
- "@ocap/mcrypto": "^1.16.4",
26
- "@ocap/wallet": "^1.16.4",
23
+ "@blocklet/sdk": "^1.7.20",
24
+ "@ocap/client": "^1.16.15",
25
+ "@ocap/mcrypto": "^1.16.15",
26
+ "@ocap/wallet": "^1.16.15",
27
27
  "axios": "^0.27.2",
28
28
  "compression": "^1.7.4",
29
29
  "cookie-parser": "^1.4.6",
30
- "core-js": "^3.22.3",
31
30
  "cors": "^2.8.5",
32
31
  "dotenv-flow": "^3.2.0",
33
- "express": "^4.18.0",
32
+ "express": "^4.18.1",
34
33
  "express-async-errors": "^3.1.1",
35
34
  "express-history-api-fallback": "^2.2.1",
36
35
  "vue": "^2.6.14"
37
36
  },
38
37
  "devDependencies": {
39
- "@babel/core": "^7.17.9",
40
- "@babel/eslint-parser": "^7.17.0",
38
+ "@babel/core": "^7.18.2",
39
+ "@babel/eslint-parser": "^7.18.2",
41
40
  "@vue/cli-plugin-babel": "~5.0.4",
42
41
  "@vue/cli-plugin-eslint": "~5.0.4",
43
42
  "@vue/cli-service": "~5.0.4",
44
- "eslint": "^8.14.0",
43
+ "core-js": "^3.22.8",
44
+ "eslint": "^8.16.0",
45
45
  "eslint-config-prettier": "^8.5.0",
46
46
  "eslint-plugin-prettier": "^4.0.0",
47
- "eslint-plugin-vue": "^8.7.1",
48
- "husky": "^7.0.4",
49
- "lint-staged": "^12.4.1",
47
+ "eslint-plugin-vue": "^9.1.0",
48
+ "husky": "^8.0.1",
49
+ "lint-staged": "^12.5.0",
50
50
  "nodemon": "^2.0.16",
51
51
  "npm-run-all": "^4.1.5",
52
52
  "vue-template-compiler": "^2.6.14"
@@ -14,21 +14,21 @@
14
14
  "prepare": "husky install"
15
15
  },
16
16
  "dependencies": {
17
- "core-js": "^3.22.3",
18
17
  "vue": "^2.6.14"
19
18
  },
20
19
  "devDependencies": {
21
- "@babel/core": "^7.17.9",
22
- "@babel/eslint-parser": "^7.17.0",
20
+ "@babel/core": "^7.18.2",
21
+ "@babel/eslint-parser": "^7.18.2",
23
22
  "@vue/cli-plugin-babel": "~5.0.4",
24
23
  "@vue/cli-plugin-eslint": "~5.0.4",
25
24
  "@vue/cli-service": "~5.0.4",
26
- "eslint": "^8.14.0",
25
+ "core-js": "^3.22.8",
26
+ "eslint": "^8.16.0",
27
27
  "eslint-config-prettier": "^8.5.0",
28
28
  "eslint-plugin-prettier": "^4.0.0",
29
- "eslint-plugin-vue": "^8.7.1",
30
- "husky": "^7.0.4",
31
- "lint-staged": "^12.4.1",
29
+ "eslint-plugin-vue": "^9.1.0",
30
+ "husky": "^8.0.1",
31
+ "lint-staged": "^12.5.0",
32
32
  "vue-template-compiler": "^2.6.14"
33
33
  },
34
34
  "lint-staged": {