create-blocklet 0.5.15 → 0.5.17

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.
Files changed (53) hide show
  1. package/package.json +6 -6
  2. package/templates/express-api/README.md +11 -11
  3. package/templates/express-api/package.json +4 -4
  4. package/templates/html-static/README.md +11 -11
  5. package/templates/html-static/app/index.html +2 -2
  6. package/templates/monorepo/README.md +7 -7
  7. package/templates/monorepo/package.json +2 -2
  8. package/templates/nextjs-dapp/README.md +11 -11
  9. package/templates/nextjs-dapp/package.json +5 -5
  10. package/templates/react-dapp/README.md +11 -11
  11. package/templates/react-dapp/package.json +10 -9
  12. package/templates/react-dapp/src/pages/home.jsx +1 -1
  13. package/templates/react-dapp/vite.config.js +2 -1
  14. package/templates/react-dapp-ts/README.md +3 -3
  15. package/templates/react-dapp-ts/api/src/index.ts +1 -1
  16. package/templates/react-dapp-ts/package.json +16 -15
  17. package/templates/react-dapp-ts/src/pages/home.tsx +1 -1
  18. package/templates/react-dapp-ts/vite.config.ts +2 -1
  19. package/templates/react-gun-dapp/README.md +11 -11
  20. package/templates/react-gun-dapp/package.json +10 -9
  21. package/templates/react-gun-dapp/src/pages/about.jsx +1 -1
  22. package/templates/react-gun-dapp/src/pages/home.jsx +1 -1
  23. package/templates/react-gun-dapp/vite.config.js +2 -1
  24. package/templates/react-static/README.md +11 -11
  25. package/templates/react-static/package.json +5 -4
  26. package/templates/react-static/src/pages/home.jsx +1 -1
  27. package/templates/react-static/vite.config.js +2 -1
  28. package/templates/solidjs-dapp/README.md +11 -11
  29. package/templates/solidjs-dapp/package.json +10 -9
  30. package/templates/solidjs-dapp/src/App.jsx +1 -1
  31. package/templates/solidjs-dapp/vite.config.js +2 -1
  32. package/templates/solidjs-static/README.md +11 -11
  33. package/templates/solidjs-static/package.json +5 -4
  34. package/templates/solidjs-static/src/App.jsx +1 -1
  35. package/templates/solidjs-static/vite.config.js +2 -1
  36. package/templates/svelte-dapp/README.md +11 -11
  37. package/templates/svelte-dapp/package.json +9 -8
  38. package/templates/svelte-dapp/vite.config.js +2 -1
  39. package/templates/svelte-static/README.md +11 -11
  40. package/templates/svelte-static/package.json +4 -3
  41. package/templates/svelte-static/vite.config.js +2 -1
  42. package/templates/vue-dapp/README.md +11 -11
  43. package/templates/vue-dapp/package.json +10 -9
  44. package/templates/vue-dapp/vite.config.js +5 -1
  45. package/templates/vue-static/README.md +11 -11
  46. package/templates/vue-static/package.json +5 -4
  47. package/templates/vue-static/vite.config.js +5 -1
  48. package/templates/vue2-dapp/README.md +11 -11
  49. package/templates/vue2-dapp/package.json +9 -8
  50. package/templates/vue2-dapp/vite.config.js +5 -1
  51. package/templates/vue2-static/README.md +11 -11
  52. package/templates/vue2-static/package.json +4 -3
  53. package/templates/vue2-static/vite.config.js +5 -1
@@ -1,10 +1,11 @@
1
1
  import { defineConfig } from 'vite';
2
2
  import { svelte } from '@sveltejs/vite-plugin-svelte';
3
3
  import { createBlockletPlugin } from 'vite-plugin-blocklet';
4
+ import { nodePolyfills } from 'vite-plugin-node-polyfills';
4
5
 
5
6
  // https://vitejs.dev/config/
6
7
  export default defineConfig(() => {
7
8
  return {
8
- plugins: [svelte(), createBlockletPlugin()],
9
+ plugins: [svelte(), createBlockletPlugin(), nodePolyfills({ protocolImports: true })],
9
10
  };
10
11
  });
@@ -30,16 +30,16 @@ This blocklet is a static project, which means this is a frontend application. I
30
30
 
31
31
  1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
32
32
 
33
- Blocklet needs blocklet server as a dependency. So you need to install it first.
34
- `npm install -g @blocklet/cli`
35
- 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)
33
+ Blocklet needs blocklet server as a dependency. So you need to install it first.
34
+ `npm install -g @blocklet/cli`
35
+ See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution](https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution)
36
36
 
37
37
  2. Init blocklet server & start blocklet server
38
38
 
39
- Before starting an blocklet server, you need to init blocklet server.
40
- `blocklet server init --mode=debug`
41
- `blocklet server start`
42
- 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)
39
+ Before starting an blocklet server, you need to init blocklet server.
40
+ `blocklet server init --mode=debug`
41
+ `blocklet server start`
42
+ See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server](https://developer.blocklet.io/docs/en/quick-start/blocklet-server)
43
43
 
44
44
  3. Go to the project directory `cd [name]`
45
45
  4. Install dependencies: `npm install` or `yarn`
@@ -85,7 +85,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
85
85
 
86
86
  Get a `accessToken` from blocklet store.
87
87
 
88
- > Why we need a `accessToken`?
88
+ > Why we need a `accessToken`?
89
89
  > A `accessToken` is genrate by blocklet store, which help us upload our blocklet to any store.
90
90
 
91
91
  Set `accessToken` to blocklet config
@@ -104,14 +104,14 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
104
104
 
105
105
  Or you can simply use `npm run upload` command.
106
106
 
107
- - You also can upload a new version to blocklet store by Github CI.
107
+ - You also can upload a new version to blocklet store by Github CI.
108
108
  Bump version at first.
109
109
 
110
110
  ```shell
111
111
  make bump-version
112
112
  ```
113
113
 
114
- Push your code to Github main/master branch, or make a pull request to the main/master branch.
114
+ Push your code to Github main/master branch, or make a pull request to the main/master branch.
115
115
  The CI workflow will automatically upload a new version to a store.
116
116
 
117
117
  ## Q & A
@@ -139,7 +139,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
139
139
  ## Learn More
140
140
 
141
141
  - 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)
142
- - Full document of Blocklet Server & blocklet development: [https://docs.arcblock.io/abtnode/en/introduction](https://docs.arcblock.io/abtnode/en/introduction)
142
+ - Full document of Blocklet Server & blocklet development: [https://developer.blocklet.io/docs/en](https://developer.blocklet.io/docs/en)
143
143
 
144
144
  ## License
145
145
 
@@ -18,12 +18,12 @@
18
18
  "bump-version": "zx scripts/bump-version.mjs"
19
19
  },
20
20
  "dependencies": {
21
- "@arcblock/did-auth": "^1.18.36",
21
+ "@arcblock/did-auth": "^1.18.50",
22
22
  "@arcblock/did-auth-storage-nedb": "^1.7.1",
23
- "@blocklet/sdk": "^1.8.62",
24
- "@ocap/client": "^1.18.36",
25
- "@ocap/mcrypto": "^1.18.36",
26
- "@ocap/wallet": "^1.18.36",
23
+ "@blocklet/sdk": "^1.8.65",
24
+ "@ocap/client": "^1.18.50",
25
+ "@ocap/mcrypto": "^1.18.50",
26
+ "@ocap/wallet": "^1.18.50",
27
27
  "axios": "^0.27.2",
28
28
  "compression": "^1.7.4",
29
29
  "cookie-parser": "^1.4.6",
@@ -32,13 +32,13 @@
32
32
  "express": "^4.18.2",
33
33
  "express-async-errors": "^3.1.1",
34
34
  "express-history-api-fallback": "^2.2.1",
35
- "vue": "^3.2.45"
35
+ "vue": "^3.2.47"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@vitejs/plugin-vue": "^3.2.0",
39
39
  "bumpp": "^8.2.1",
40
40
  "cross-env": "^7.0.3",
41
- "eslint": "^8.33.0",
41
+ "eslint": "^8.34.0",
42
42
  "eslint-config-prettier": "^8.6.0",
43
43
  "eslint-plugin-prettier": "^4.2.1",
44
44
  "eslint-plugin-vue": "^9.9.0",
@@ -46,10 +46,11 @@
46
46
  "lint-staged": "^12.5.0",
47
47
  "nodemon": "^2.0.20",
48
48
  "npm-run-all": "^4.1.5",
49
- "prettier": "^2.8.3",
49
+ "prettier": "^2.8.4",
50
50
  "rimraf": "^3.0.2",
51
51
  "vite": "^3.2.5",
52
- "vite-plugin-blocklet": "^0.5.15",
52
+ "vite-plugin-blocklet": "^0.5.17",
53
+ "vite-plugin-node-polyfills": "^0.7.0",
53
54
  "zx": "^7.1.1"
54
55
  },
55
56
  "lint-staged": {
@@ -1,10 +1,14 @@
1
1
  import { defineConfig } from 'vite';
2
2
  import vue from '@vitejs/plugin-vue';
3
3
  import { createBlockletPlugin } from 'vite-plugin-blocklet';
4
+ import { nodePolyfills } from 'vite-plugin-node-polyfills';
4
5
 
5
6
  // https://vitejs.dev/config/
6
7
  export default defineConfig(() => {
7
8
  return {
8
- plugins: [vue(), createBlockletPlugin()],
9
+ plugins: [vue(), createBlockletPlugin(), nodePolyfills({ protocolImports: true })],
10
+ define: {
11
+ global: 'window',
12
+ },
9
13
  };
10
14
  });
@@ -29,16 +29,16 @@ This blocklet is a static project, which means this is a frontend application. I
29
29
 
30
30
  1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
31
31
 
32
- Blocklet needs blocklet server as a dependency. So you need to install it first.
33
- `npm install -g @blocklet/cli`
34
- 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)
32
+ Blocklet needs blocklet server as a dependency. So you need to install it first.
33
+ `npm install -g @blocklet/cli`
34
+ See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution](https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution)
35
35
 
36
36
  2. Init blocklet server & start blocklet server
37
37
 
38
- Before starting an blocklet server, you need to init blocklet server.
39
- `blocklet server init --mode=debug`
40
- `blocklet server start`
41
- 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
+ Before starting an blocklet server, you need to init blocklet server.
39
+ `blocklet server init --mode=debug`
40
+ `blocklet server start`
41
+ See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server](https://developer.blocklet.io/docs/en/quick-start/blocklet-server)
42
42
 
43
43
  3. Go to the project directory `cd [name]`
44
44
  4. Install dependencies: `npm install` or `yarn`
@@ -84,7 +84,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
84
84
 
85
85
  Get a `accessToken` from blocklet store.
86
86
 
87
- > Why we need a `accessToken`?
87
+ > Why we need a `accessToken`?
88
88
  > A `accessToken` is genrate by blocklet store, which help us upload our blocklet to any store.
89
89
 
90
90
  Set `accessToken` to blocklet config
@@ -103,14 +103,14 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
103
103
 
104
104
  Or you can simply use `npm run upload` command.
105
105
 
106
- - You also can upload a new version to blocklet store by Github CI.
106
+ - You also can upload a new version to blocklet store by Github CI.
107
107
  Bump version at first.
108
108
 
109
109
  ```shell
110
110
  make bump-version
111
111
  ```
112
112
 
113
- Push your code to Github main/master branch, or make a pull request to the main/master branch.
113
+ Push your code to Github main/master branch, or make a pull request to the main/master branch.
114
114
  The CI workflow will automatically upload a new version to a store.
115
115
 
116
116
  ## Q & A
@@ -138,7 +138,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
138
138
  ## Learn More
139
139
 
140
140
  - 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)
141
- - Full document of Blocklet Server & blocklet development: [https://docs.arcblock.io/abtnode/en/introduction](https://docs.arcblock.io/abtnode/en/introduction)
141
+ - Full document of Blocklet Server & blocklet development: [https://developer.blocklet.io/docs/en](https://developer.blocklet.io/docs/en)
142
142
 
143
143
  ## License
144
144
 
@@ -17,21 +17,22 @@
17
17
  "bump-version": "zx scripts/bump-version.mjs"
18
18
  },
19
19
  "dependencies": {
20
- "vue": "^3.2.45"
20
+ "vue": "^3.2.47"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@vitejs/plugin-vue": "^3.2.0",
24
24
  "bumpp": "^8.2.1",
25
- "eslint": "^8.33.0",
25
+ "eslint": "^8.34.0",
26
26
  "eslint-config-prettier": "^8.6.0",
27
27
  "eslint-plugin-prettier": "^4.2.1",
28
28
  "eslint-plugin-vue": "^9.9.0",
29
29
  "husky": "^8.0.3",
30
30
  "lint-staged": "^12.5.0",
31
- "prettier": "^2.8.3",
31
+ "prettier": "^2.8.4",
32
32
  "rimraf": "^3.0.2",
33
33
  "vite": "^3.2.5",
34
- "vite-plugin-blocklet": "^0.5.15",
34
+ "vite-plugin-blocklet": "^0.5.17",
35
+ "vite-plugin-node-polyfills": "^0.7.0",
35
36
  "zx": "^7.1.1"
36
37
  },
37
38
  "lint-staged": {
@@ -1,10 +1,14 @@
1
1
  import { defineConfig } from 'vite';
2
2
  import vue from '@vitejs/plugin-vue';
3
3
  import { createBlockletPlugin } from 'vite-plugin-blocklet';
4
+ import { nodePolyfills } from 'vite-plugin-node-polyfills';
4
5
 
5
6
  // https://vitejs.dev/config/
6
7
  export default defineConfig(() => {
7
8
  return {
8
- plugins: [vue(), createBlockletPlugin()],
9
+ plugins: [vue(), createBlockletPlugin(), nodePolyfills({ protocolImports: true })],
10
+ define: {
11
+ global: 'window',
12
+ },
9
13
  };
10
14
  });
@@ -30,16 +30,16 @@ This blocklet is a static project, which means this is a frontend application. I
30
30
 
31
31
  1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
32
32
 
33
- Blocklet needs blocklet server as a dependency. So you need to install it first.
34
- `npm install -g @blocklet/cli`
35
- 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)
33
+ Blocklet needs blocklet server as a dependency. So you need to install it first.
34
+ `npm install -g @blocklet/cli`
35
+ See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution](https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution)
36
36
 
37
37
  2. Init blocklet server & start blocklet server
38
38
 
39
- Before starting an blocklet server, you need to init blocklet server.
40
- `blocklet server init --mode=debug`
41
- `blocklet server start`
42
- 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)
39
+ Before starting an blocklet server, you need to init blocklet server.
40
+ `blocklet server init --mode=debug`
41
+ `blocklet server start`
42
+ See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server](https://developer.blocklet.io/docs/en/quick-start/blocklet-server)
43
43
 
44
44
  3. Go to the project directory `cd [name]`
45
45
  4. Install dependencies: `npm install` or `yarn`
@@ -85,7 +85,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
85
85
 
86
86
  Get a `accessToken` from blocklet store.
87
87
 
88
- > Why we need a `accessToken`?
88
+ > Why we need a `accessToken`?
89
89
  > A `accessToken` is genrate by blocklet store, which help us upload our blocklet to any store.
90
90
 
91
91
  Set `accessToken` to blocklet config
@@ -104,14 +104,14 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
104
104
 
105
105
  Or you can simply use `npm run upload` command.
106
106
 
107
- - You also can upload a new version to blocklet store by Github CI.
107
+ - You also can upload a new version to blocklet store by Github CI.
108
108
  Bump version at first.
109
109
 
110
110
  ```shell
111
111
  make bump-version
112
112
  ```
113
113
 
114
- Push your code to Github main/master branch, or make a pull request to the main/master branch.
114
+ Push your code to Github main/master branch, or make a pull request to the main/master branch.
115
115
  The CI workflow will automatically upload a new version to a store.
116
116
 
117
117
  ## Q & A
@@ -139,7 +139,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
139
139
  ## Learn More
140
140
 
141
141
  - 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)
142
- - Full document of Blocklet Server & blocklet development: [https://docs.arcblock.io/abtnode/en/introduction](https://docs.arcblock.io/abtnode/en/introduction)
142
+ - Full document of Blocklet Server & blocklet development: [https://developer.blocklet.io/docs/en](https://developer.blocklet.io/docs/en)
143
143
 
144
144
  ## License
145
145
 
@@ -18,12 +18,12 @@
18
18
  "bump-version": "zx scripts/bump-version.mjs"
19
19
  },
20
20
  "dependencies": {
21
- "@arcblock/did-auth": "^1.18.36",
21
+ "@arcblock/did-auth": "^1.18.50",
22
22
  "@arcblock/did-auth-storage-nedb": "^1.7.1",
23
- "@blocklet/sdk": "^1.8.62",
24
- "@ocap/client": "^1.18.36",
25
- "@ocap/mcrypto": "^1.18.36",
26
- "@ocap/wallet": "^1.18.36",
23
+ "@blocklet/sdk": "^1.8.65",
24
+ "@ocap/client": "^1.18.50",
25
+ "@ocap/mcrypto": "^1.18.50",
26
+ "@ocap/wallet": "^1.18.50",
27
27
  "axios": "^0.27.2",
28
28
  "compression": "^1.7.4",
29
29
  "cookie-parser": "^1.4.6",
@@ -38,7 +38,7 @@
38
38
  "@vitejs/plugin-vue2": "^2.2.0",
39
39
  "bumpp": "^8.2.1",
40
40
  "cross-env": "^7.0.3",
41
- "eslint": "^8.33.0",
41
+ "eslint": "^8.34.0",
42
42
  "eslint-config-prettier": "^8.6.0",
43
43
  "eslint-plugin-prettier": "^4.2.1",
44
44
  "eslint-plugin-vue": "^9.9.0",
@@ -46,10 +46,11 @@
46
46
  "lint-staged": "^12.5.0",
47
47
  "nodemon": "^2.0.20",
48
48
  "npm-run-all": "^4.1.5",
49
- "prettier": "^2.8.3",
49
+ "prettier": "^2.8.4",
50
50
  "rimraf": "^3.0.2",
51
51
  "vite": "^3.2.5",
52
- "vite-plugin-blocklet": "^0.5.15",
52
+ "vite-plugin-blocklet": "^0.5.17",
53
+ "vite-plugin-node-polyfills": "^0.7.0",
53
54
  "zx": "^7.1.1"
54
55
  },
55
56
  "lint-staged": {
@@ -1,10 +1,14 @@
1
1
  import { defineConfig } from 'vite';
2
2
  import vue from '@vitejs/plugin-vue2';
3
3
  import { createBlockletPlugin } from 'vite-plugin-blocklet';
4
+ import { nodePolyfills } from 'vite-plugin-node-polyfills';
4
5
 
5
6
  // https://vitejs.dev/config/
6
7
  export default defineConfig(() => {
7
8
  return {
8
- plugins: [vue(), createBlockletPlugin()],
9
+ plugins: [vue(), createBlockletPlugin(), nodePolyfills({ protocolImports: true })],
10
+ define: {
11
+ global: 'window',
12
+ },
9
13
  };
10
14
  });
@@ -30,16 +30,16 @@ This blocklet is a static project, which means this is a frontend application. I
30
30
 
31
31
  1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
32
32
 
33
- Blocklet needs blocklet server as a dependency. So you need to install it first.
34
- `npm install -g @blocklet/cli`
35
- 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)
33
+ Blocklet needs blocklet server as a dependency. So you need to install it first.
34
+ `npm install -g @blocklet/cli`
35
+ See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution](https://developer.blocklet.io/docs/en/quick-start/blocklet-server#use-the-binary-distribution)
36
36
 
37
37
  2. Init blocklet server & start blocklet server
38
38
 
39
- Before starting an blocklet server, you need to init blocklet server.
40
- `blocklet server init --mode=debug`
41
- `blocklet server start`
42
- 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)
39
+ Before starting an blocklet server, you need to init blocklet server.
40
+ `blocklet server init --mode=debug`
41
+ `blocklet server start`
42
+ See details in [https://developer.blocklet.io/docs/en/quick-start/blocklet-server](https://developer.blocklet.io/docs/en/quick-start/blocklet-server)
43
43
 
44
44
  3. Go to the project directory `cd [name]`
45
45
  4. Install dependencies: `npm install` or `yarn`
@@ -85,7 +85,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
85
85
 
86
86
  Get a `accessToken` from blocklet store.
87
87
 
88
- > Why we need a `accessToken`?
88
+ > Why we need a `accessToken`?
89
89
  > A `accessToken` is genrate by blocklet store, which help us upload our blocklet to any store.
90
90
 
91
91
  Set `accessToken` to blocklet config
@@ -104,14 +104,14 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
104
104
 
105
105
  Or you can simply use `npm run upload` command.
106
106
 
107
- - You also can upload a new version to blocklet store by Github CI.
107
+ - You also can upload a new version to blocklet store by Github CI.
108
108
  Bump version at first.
109
109
 
110
110
  ```shell
111
111
  make bump-version
112
112
  ```
113
113
 
114
- Push your code to Github main/master branch, or make a pull request to the main/master branch.
114
+ Push your code to Github main/master branch, or make a pull request to the main/master branch.
115
115
  The CI workflow will automatically upload a new version to a store.
116
116
 
117
117
  ## Q & A
@@ -139,7 +139,7 @@ After developing a blocklet, you may need to bundle it. Use `npm run bundle` com
139
139
  ## Learn More
140
140
 
141
141
  - 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)
142
- - Full document of Blocklet Server & blocklet development: [https://docs.arcblock.io/abtnode/en/introduction](https://docs.arcblock.io/abtnode/en/introduction)
142
+ - Full document of Blocklet Server & blocklet development: [https://developer.blocklet.io/docs/en](https://developer.blocklet.io/docs/en)
143
143
 
144
144
  ## License
145
145
 
@@ -22,16 +22,17 @@
22
22
  "devDependencies": {
23
23
  "@vitejs/plugin-vue2": "^2.2.0",
24
24
  "bumpp": "^8.2.1",
25
- "eslint": "^8.33.0",
25
+ "eslint": "^8.34.0",
26
26
  "eslint-config-prettier": "^8.6.0",
27
27
  "eslint-plugin-prettier": "^4.2.1",
28
28
  "eslint-plugin-vue": "^9.9.0",
29
29
  "husky": "^8.0.3",
30
30
  "lint-staged": "^12.5.0",
31
- "prettier": "^2.8.3",
31
+ "prettier": "^2.8.4",
32
32
  "rimraf": "^3.0.2",
33
33
  "vite": "^3.2.5",
34
- "vite-plugin-blocklet": "^0.5.15",
34
+ "vite-plugin-blocklet": "^0.5.17",
35
+ "vite-plugin-node-polyfills": "^0.7.0",
35
36
  "zx": "^7.1.1"
36
37
  },
37
38
  "lint-staged": {
@@ -1,10 +1,14 @@
1
1
  import { defineConfig } from 'vite';
2
2
  import vue from '@vitejs/plugin-vue2';
3
3
  import { createBlockletPlugin } from 'vite-plugin-blocklet';
4
+ import { nodePolyfills } from 'vite-plugin-node-polyfills';
4
5
 
5
6
  // https://vitejs.dev/config/
6
7
  export default defineConfig(() => {
7
8
  return {
8
- plugins: [vue(), createBlockletPlugin()],
9
+ plugins: [vue(), createBlockletPlugin(), nodePolyfills({ protocolImports: true })],
10
+ define: {
11
+ global: 'window',
12
+ },
9
13
  };
10
14
  });