create-blocklet 0.9.5 → 0.9.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.
Files changed (137) hide show
  1. package/common/.prettierrc +11 -1
  2. package/common/scripts/build-clean.mjs +0 -1
  3. package/common/scripts/bump-version.mjs +33 -29
  4. package/index.js +86 -10
  5. package/package.json +1 -1
  6. package/templates/base-readme.md +103 -0
  7. package/templates/did-connect-dapp/.eslintrc.js +4 -0
  8. package/templates/did-connect-dapp/README.md +143 -0
  9. package/templates/did-connect-dapp/api/dev.js +5 -0
  10. package/templates/did-connect-dapp/api/hooks/pre-start.js +33 -0
  11. package/templates/did-connect-dapp/api/index.js +48 -0
  12. package/templates/did-connect-dapp/api/libs/auth.js +25 -0
  13. package/templates/did-connect-dapp/api/libs/env.js +9 -0
  14. package/templates/did-connect-dapp/api/libs/logger.js +3 -0
  15. package/templates/did-connect-dapp/api/libs/utils.js +70 -0
  16. package/templates/did-connect-dapp/api/routes/auth/index.js +15 -0
  17. package/templates/did-connect-dapp/api/routes/auth/request-digest-signature.js +51 -0
  18. package/templates/did-connect-dapp/api/routes/auth/request-multiple-claims.js +52 -0
  19. package/templates/did-connect-dapp/api/routes/auth/request-multiple-steps.js +57 -0
  20. package/templates/did-connect-dapp/api/routes/auth/request-nft.js +82 -0
  21. package/templates/did-connect-dapp/api/routes/auth/request-payment.js +72 -0
  22. package/templates/did-connect-dapp/api/routes/auth/request-profile.js +25 -0
  23. package/templates/did-connect-dapp/api/routes/auth/request-text-signature.js +44 -0
  24. package/templates/did-connect-dapp/api/routes/auth/request-transaction-signature.js +62 -0
  25. package/templates/did-connect-dapp/blocklet.md +5 -0
  26. package/templates/did-connect-dapp/blocklet.yml +57 -0
  27. package/templates/did-connect-dapp/index.html +17 -0
  28. package/templates/did-connect-dapp/package.json +86 -0
  29. package/templates/did-connect-dapp/src/app.jsx +20 -0
  30. package/templates/did-connect-dapp/src/assets/get_wallet_en.png +0 -0
  31. package/templates/did-connect-dapp/src/assets/get_wallet_zh.png +0 -0
  32. package/templates/did-connect-dapp/src/components/connect-item.jsx +39 -0
  33. package/templates/did-connect-dapp/src/components/connects/request-digest-signature.jsx +45 -0
  34. package/templates/did-connect-dapp/src/components/connects/request-multiple-claims.jsx +55 -0
  35. package/templates/did-connect-dapp/src/components/connects/request-multiple-steps.jsx +54 -0
  36. package/templates/did-connect-dapp/src/components/connects/request-nft.jsx +75 -0
  37. package/templates/did-connect-dapp/src/components/connects/request-payment.jsx +82 -0
  38. package/templates/did-connect-dapp/src/components/connects/request-profile.jsx +72 -0
  39. package/templates/did-connect-dapp/src/components/connects/request-text-signature.jsx +44 -0
  40. package/templates/did-connect-dapp/src/components/connects/request-transaction-signature.jsx +44 -0
  41. package/templates/did-connect-dapp/src/components/info-row.jsx +39 -0
  42. package/templates/did-connect-dapp/src/components/layout.jsx +26 -0
  43. package/templates/did-connect-dapp/src/index.jsx +6 -0
  44. package/templates/did-connect-dapp/src/libs/session.js +11 -0
  45. package/templates/did-connect-dapp/src/libs/utils.js +4 -0
  46. package/templates/did-connect-dapp/src/locales/en.js +115 -0
  47. package/templates/did-connect-dapp/src/locales/index.js +5 -0
  48. package/templates/did-connect-dapp/src/locales/zh.js +115 -0
  49. package/templates/did-connect-dapp/src/pages/main.jsx +95 -0
  50. package/templates/did-connect-dapp/template-info.json +12 -0
  51. package/templates/did-connect-dapp/vite.config.mjs +11 -0
  52. package/templates/did-wallet-dapp/.eslintrc.js +7 -0
  53. package/templates/did-wallet-dapp/README.md +32 -0
  54. package/templates/did-wallet-dapp/api/dev.js +8 -0
  55. package/templates/did-wallet-dapp/api/functions/app.js +65 -0
  56. package/templates/did-wallet-dapp/api/index.js +13 -0
  57. package/templates/did-wallet-dapp/api/libs/constant.js +1 -0
  58. package/templates/did-wallet-dapp/api/routes/user.js +30 -0
  59. package/templates/did-wallet-dapp/blocklet.md +3 -0
  60. package/templates/did-wallet-dapp/blocklet.yml +58 -0
  61. package/templates/did-wallet-dapp/index.html +16 -0
  62. package/templates/did-wallet-dapp/package.json +84 -0
  63. package/templates/did-wallet-dapp/src/app.jsx +38 -0
  64. package/templates/did-wallet-dapp/src/assets/blocklet.svg +16 -0
  65. package/templates/did-wallet-dapp/src/assets/react.svg +1 -0
  66. package/templates/did-wallet-dapp/src/assets/vite.svg +1 -0
  67. package/templates/did-wallet-dapp/src/assets/wallet.png +0 -0
  68. package/templates/did-wallet-dapp/src/components/layout.jsx +28 -0
  69. package/templates/did-wallet-dapp/src/global.css +79 -0
  70. package/templates/did-wallet-dapp/src/index.jsx +6 -0
  71. package/templates/did-wallet-dapp/src/libs/api.js +7 -0
  72. package/templates/did-wallet-dapp/src/libs/session.js +13 -0
  73. package/templates/did-wallet-dapp/src/locales/en.js +13 -0
  74. package/templates/did-wallet-dapp/src/locales/index.js +4 -0
  75. package/templates/did-wallet-dapp/src/locales/zh.js +13 -0
  76. package/templates/did-wallet-dapp/src/pages/home/index.css +39 -0
  77. package/templates/did-wallet-dapp/src/pages/home/index.jsx +57 -0
  78. package/templates/did-wallet-dapp/src/pages/profile.jsx +136 -0
  79. package/templates/did-wallet-dapp/template-info.json +12 -0
  80. package/templates/did-wallet-dapp/vite.config.js +14 -0
  81. package/templates/did-wallet-dapp/vite.config.server.js +9 -0
  82. package/templates/express-api/README.md +2 -124
  83. package/templates/express-api/blocklet.yml +0 -1
  84. package/templates/express-api/package.json +9 -8
  85. package/templates/html-static/README.md +3 -125
  86. package/templates/html-static/blocklet.yml +0 -1
  87. package/templates/html-static/package.json +4 -3
  88. package/templates/monorepo/README.md +8 -8
  89. package/templates/monorepo/package.json +4 -3
  90. package/templates/monorepo/scripts/bump-version.mjs +36 -32
  91. package/templates/nestjs-api/README.md +2 -123
  92. package/templates/nestjs-api/blocklet.yml +0 -1
  93. package/templates/nestjs-api/package.json +16 -15
  94. package/templates/nextjs-dapp/README.md +2 -125
  95. package/templates/nextjs-dapp/blocklet.yml +0 -1
  96. package/templates/nextjs-dapp/package.json +7 -7
  97. package/templates/react-dapp/README.md +2 -124
  98. package/templates/react-dapp/blocklet.yml +0 -1
  99. package/templates/react-dapp/package.json +16 -15
  100. package/templates/react-dapp-ts/README.md +2 -125
  101. package/templates/react-dapp-ts/blocklet.yml +0 -1
  102. package/templates/react-dapp-ts/package.json +19 -18
  103. package/templates/react-gun-dapp/README.md +2 -125
  104. package/templates/react-gun-dapp/blocklet.yml +0 -1
  105. package/templates/react-gun-dapp/package.json +15 -14
  106. package/templates/react-static/README.md +2 -125
  107. package/templates/react-static/blocklet.yml +0 -1
  108. package/templates/react-static/package.json +11 -10
  109. package/templates/solidjs-dapp/README.md +2 -125
  110. package/templates/solidjs-dapp/blocklet.yml +0 -1
  111. package/templates/solidjs-dapp/package.json +14 -13
  112. package/templates/solidjs-static/README.md +2 -123
  113. package/templates/solidjs-static/blocklet.yml +0 -1
  114. package/templates/solidjs-static/package.json +9 -8
  115. package/templates/svelte-dapp/README.md +2 -124
  116. package/templates/svelte-dapp/blocklet.yml +0 -1
  117. package/templates/svelte-dapp/package.json +12 -11
  118. package/templates/svelte-static/README.md +2 -125
  119. package/templates/svelte-static/blocklet.yml +0 -1
  120. package/templates/svelte-static/package.json +8 -7
  121. package/templates/todo-list-example/blocklet.yml +0 -1
  122. package/templates/todo-list-example/package.json +11 -10
  123. package/templates/vue-dapp/README.md +2 -125
  124. package/templates/vue-dapp/blocklet.yml +0 -1
  125. package/templates/vue-dapp/package.json +16 -15
  126. package/templates/vue-static/README.md +2 -125
  127. package/templates/vue-static/blocklet.yml +0 -1
  128. package/templates/vue-static/package.json +11 -10
  129. package/templates/vue-ts-static/README.md +2 -124
  130. package/templates/vue-ts-static/blocklet.yml +1 -2
  131. package/templates/vue-ts-static/package.json +12 -12
  132. package/templates/vue2-dapp/README.md +2 -125
  133. package/templates/vue2-dapp/blocklet.yml +0 -1
  134. package/templates/vue2-dapp/package.json +13 -12
  135. package/templates/vue2-static/README.md +2 -125
  136. package/templates/vue2-static/blocklet.yml +0 -1
  137. package/templates/vue2-static/package.json +9 -8
@@ -1,10 +1,8 @@
1
- # Getting Started with Create Blocklet
2
-
3
- This project was bootstrapped with [Create Blocklet](https://github.com/blocklet/create-blocklet).
1
+ ## PROJECT_DESCRIPTION
4
2
 
5
3
  This blocklet is a static project, which means this is a frontend application. It's contained `client` code.
6
4
 
7
- ## File Structure
5
+ ## FILE_STRUCTURE
8
6
 
9
7
  - public/ - static files
10
8
  - favicon.ico - favicon
@@ -26,122 +24,3 @@ This blocklet is a static project, which means this is a frontend application. I
26
24
  - README.md - A guide for this blocklet
27
25
  - version - Version file
28
26
 
29
- ## Development
30
-
31
- 1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
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://www.arcblock.io/docs/blocklet-developer/install-blocklet-cli](https://www.arcblock.io/docs/blocklet-developer/install-blocklet-cli)
36
-
37
- 2. Init blocklet server & start blocklet server
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://www.arcblock.io/docs/blocklet-developer/getting-started](https://www.arcblock.io/docs/blocklet-developer/getting-started)
43
-
44
- 3. Go to the project directory `cd [name]`
45
- 4. Install dependencies: `npm install` or `yarn`
46
- 5. Start development server: `blocklet dev`
47
-
48
- ## Bundle
49
-
50
- After developing a blocklet, you may need to bundle it. Use `npm run bundle` command.
51
-
52
- ## Deploy
53
-
54
- - 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.)
55
- > Or you can simply use `npm run deploy` command.
56
- - If you want to deploy this blocklet to remote blocklet server, you can use the command below.
57
-
58
- ```shell
59
- blocklet deploy .blocklet/bundle --endpoint {your blocklet server url} --access-key {blocklet server access key} --access-secret {blocklet server access secret}
60
- ```
61
-
62
- > Make sure the blocklet is bundled before deployment.
63
-
64
- ## Upload to blocklet store
65
-
66
- - If you want to upload the blocklet to any store for other users to download and use, you can following the following instructions.
67
-
68
- Bump version at first.
69
-
70
- ```shell
71
- make bump-version
72
- ```
73
-
74
- Then config blocklet store url.
75
- You can use those store url in below.
76
-
77
- 1. [https://store.blocklet.dev/](https://store.blocklet.dev/)
78
- 2. [https://dev.store.blocklet.dev/](https://dev.store.blocklet.dev/)
79
- 3. A blocklet store started by yourself.
80
- > 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)
81
-
82
- ```shell
83
- blocklet config set store {store url}
84
- ```
85
-
86
- Get a `accessToken` from blocklet store.
87
-
88
- > Why we need a `accessToken`?
89
- > A `accessToken` is genrate by blocklet store, which help us upload our blocklet to any store.
90
-
91
- Set `accessToken` to blocklet config
92
-
93
- ```shell
94
- blocklet config set accessToken {accessToken}
95
- ```
96
-
97
- Upload a new version to a store.
98
-
99
- > Make sure the blocklet is bundled before upload.
100
-
101
- ```shell
102
- blocklet upload
103
- ```
104
-
105
- Or you can simply use `npm run upload` command.
106
-
107
- - You also can upload a new version to blocklet store by Github CI.
108
- Bump version at first.
109
-
110
- ```shell
111
- make bump-version
112
- ```
113
-
114
- Push your code to Github main/master branch, or make a pull request to the main/master branch.
115
- The CI workflow will automatically upload a new version to a store.
116
-
117
- ## Q & A
118
-
119
- 1. Q: How to change a blocklet's name?
120
-
121
- A: Change the `name` field in the `package.json` file, change the `name` field in the `blocklet.yml` file.
122
-
123
- You can also change the `title` field and `description` field in the `blocklet.yml` file.
124
-
125
- Run `blocklet meta` command, you will get a `did` config, copy the `did` value.
126
-
127
- Replace this command `"bundle": "vite build --base /.blocklet/proxy/<%= did %>",` in `package.json`
128
-
129
- Replace `did` field in the `blocklet.yml`
130
-
131
- 2. Q: How to change a blocklet's logo?
132
-
133
- Change the `logo.png` file root folder.
134
-
135
- Or you can change the `logo` field in the `blocklet.yml` file.
136
-
137
- > Make sure you have added the logo path to the `blocklet.yml` file `files` field.
138
-
139
- ## Learn More
140
-
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://www.arcblock.io/docs/blocklet-developer](https://www.arcblock.io/docs/blocklet-developer)
143
-
144
- ## License
145
-
146
- The code is licensed under the Apache 2.0 license found in the
147
- [LICENSE](LICENSE) file.
@@ -1,4 +1,3 @@
1
- name: template-solidjs
2
1
  title: Blocklet Template Solidjs
3
2
  description: A Blocklet Server blocklet
4
3
  keywords:
@@ -20,20 +20,21 @@
20
20
  },
21
21
  "license": "MIT",
22
22
  "devDependencies": {
23
- "bumpp": "^9.4.1",
24
- "eslint": "^8.57.0",
23
+ "@trivago/prettier-plugin-sort-imports": "^4.3.0",
24
+ "bumpp": "^9.5.2",
25
+ "eslint": "^8.57.1",
25
26
  "eslint-config-prettier": "^9.1.0",
26
27
  "eslint-plugin-prettier": "^5.2.1",
27
28
  "eslint-plugin-solid": "0.14.1",
28
- "lint-staged": "^15.2.7",
29
+ "lint-staged": "^15.2.10",
29
30
  "prettier": "^3.3.3",
30
- "rimraf": "^5.0.7",
31
+ "rimraf": "^5.0.10",
31
32
  "simple-git-hooks": "^2.11.1",
32
- "solid-js": "^1.8.18",
33
- "vite": "^5.3.5",
34
- "vite-plugin-blocklet": "^0.9.5",
33
+ "solid-js": "^1.9.1",
34
+ "vite": "^5.4.8",
35
+ "vite-plugin-blocklet": "^0.9.7",
35
36
  "vite-plugin-solid": "^2.10.2",
36
- "zx": "^8.1.4"
37
+ "zx": "^8.1.8"
37
38
  },
38
39
  "lint-staged": {
39
40
  "*.{mjs,js,jsx,tsx}": [
@@ -1,10 +1,7 @@
1
- # Getting Started with Create Blocklet
2
-
3
- This project was bootstrapped with [Create Blocklet](https://github.com/blocklet/create-blocklet).
4
-
1
+ ## PROJECT_DESCRIPTION
5
2
  This blocklet is a static project, which means this is a frontend application. It's contained `client` code.
6
3
 
7
- ## File Structure
4
+ ## FILE_STRUCTURE
8
5
 
9
6
  - public/ - static files
10
7
  - favicon.ico - favicon
@@ -24,122 +21,3 @@ This blocklet is a static project, which means this is a frontend application. I
24
21
  - README.md - A guide for this blocklet
25
22
  - version - Version file
26
23
 
27
- ## Development
28
-
29
- 1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
30
-
31
- Blocklet needs blocklet server as a dependency. So you need to install it first.
32
- `npm install -g @blocklet/cli`
33
- See details in [https://www.arcblock.io/docs/blocklet-developer/install-blocklet-cli](https://www.arcblock.io/docs/blocklet-developer/install-blocklet-cli)
34
-
35
- 2. Init blocklet server & start blocklet server
36
-
37
- Before starting an blocklet server, you need to init blocklet server.
38
- `blocklet server init --mode=debug`
39
- `blocklet server start`
40
- See details in [https://www.arcblock.io/docs/blocklet-developer/getting-started](https://www.arcblock.io/docs/blocklet-developer/getting-started)
41
-
42
- 3. Go to the project directory `cd [name]`
43
- 4. Install dependencies: `npm install` or `yarn`
44
- 5. Start development server: `blocklet dev`
45
-
46
- ## Bundle
47
-
48
- After developing a blocklet, you may need to bundle it. Use `npm run bundle` command.
49
-
50
- ## Deploy
51
-
52
- - 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.)
53
- > Or you can simply use `npm run deploy` command.
54
- - If you want to deploy this blocklet to remote blocklet server, you can use the command below.
55
-
56
- ```shell
57
- blocklet deploy .blocklet/bundle --endpoint {your blocklet server url} --access-key {blocklet server access key} --access-secret {blocklet server access secret}
58
- ```
59
-
60
- > Make sure the blocklet is bundled before deployment.
61
-
62
- ## Upload to blocklet store
63
-
64
- - If you want to upload the blocklet to any store for other users to download and use, you can following the following instructions.
65
-
66
- Bump version at first.
67
-
68
- ```shell
69
- make bump-version
70
- ```
71
-
72
- Then config blocklet store url.
73
- You can use those store url in below.
74
-
75
- 1. [https://store.blocklet.dev/](https://store.blocklet.dev/)
76
- 2. [https://dev.store.blocklet.dev/](https://dev.store.blocklet.dev/)
77
- 3. A blocklet store started by yourself.
78
- > 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)
79
-
80
- ```shell
81
- blocklet config set store {store url}
82
- ```
83
-
84
- Get a `accessToken` from blocklet store.
85
-
86
- > Why we need a `accessToken`?
87
- > A `accessToken` is genrate by blocklet store, which help us upload our blocklet to any store.
88
-
89
- Set `accessToken` to blocklet config
90
-
91
- ```shell
92
- blocklet config set accessToken {accessToken}
93
- ```
94
-
95
- Upload a new version to a store.
96
-
97
- > Make sure the blocklet is bundled before upload.
98
-
99
- ```shell
100
- blocklet upload
101
- ```
102
-
103
- Or you can simply use `npm run upload` command.
104
-
105
- - You also can upload a new version to blocklet store by Github CI.
106
- Bump version at first.
107
-
108
- ```shell
109
- make bump-version
110
- ```
111
-
112
- Push your code to Github main/master branch, or make a pull request to the main/master branch.
113
- The CI workflow will automatically upload a new version to a store.
114
-
115
- ## Q & A
116
-
117
- 1. Q: How to change a blocklet's name?
118
-
119
- A: Change the `name` field in the `package.json` file, change the `name` field in the `blocklet.yml` file.
120
-
121
- You can also change the `title` field and `description` field in the `blocklet.yml` file.
122
-
123
- Run `blocklet meta` command, you will get a `did` config, copy the `did` value.
124
-
125
- Replace this command `"bundle": "vite build --base /.blocklet/proxy/<%= did %>",` in `package.json`
126
-
127
- Replace `did` field in the `blocklet.yml`
128
-
129
- 2. Q: How to change a blocklet's logo?
130
-
131
- Change the `logo.png` file root folder.
132
-
133
- Or you can change the `logo` field in the `blocklet.yml` file.
134
-
135
- > Make sure you have added the logo path to the `blocklet.yml` file `files` field.
136
-
137
- ## Learn More
138
-
139
- - 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)
140
- - Full document of Blocklet Server & blocklet development: [https://www.arcblock.io/docs/blocklet-developer](https://www.arcblock.io/docs/blocklet-developer)
141
-
142
- ## License
143
-
144
- The code is licensed under the Apache 2.0 license found in the
145
- [LICENSE](LICENSE) file.
@@ -1,4 +1,3 @@
1
- name: template-svelte
2
1
  title: Blocklet Template Svelte
3
2
  description: A Blocklet Server blocklet
4
3
  keywords:
@@ -19,32 +19,33 @@
19
19
  "dependencies": {
20
20
  "@arcblock/did-auth": "^1.18.135",
21
21
  "@arcblock/did-auth-storage-nedb": "^1.7.1",
22
- "@blocklet/sdk": "^1.16.30",
22
+ "@blocklet/sdk": "^1.16.31",
23
23
  "@ocap/client": "^1.18.135",
24
24
  "@ocap/mcrypto": "^1.18.135",
25
25
  "@ocap/wallet": "^1.18.135",
26
- "axios": "^1.7.2",
26
+ "axios": "^1.7.7",
27
27
  "cookie-parser": "^1.4.6",
28
28
  "cors": "^2.8.5",
29
29
  "dotenv-flow": "^4.1.0",
30
- "express": "^4.19.2",
30
+ "express": "^4.21.0",
31
31
  "express-async-errors": "^3.1.1"
32
32
  },
33
33
  "devDependencies": {
34
- "@blocklet/js-sdk": "^1.16.30",
34
+ "@blocklet/js-sdk": "^1.16.31",
35
35
  "@sveltejs/vite-plugin-svelte": "3.1.1",
36
- "bumpp": "^9.4.1",
36
+ "@trivago/prettier-plugin-sort-imports": "^4.3.0",
37
+ "bumpp": "^9.5.2",
37
38
  "cross-env": "^7.0.3",
38
- "lint-staged": "^15.2.7",
39
+ "lint-staged": "^15.2.10",
39
40
  "npm-run-all": "^4.1.5",
40
41
  "prettier": "^3.3.3",
41
42
  "prettier-plugin-svelte": "^3.2.6",
42
- "rimraf": "^5.0.7",
43
+ "rimraf": "^5.0.10",
43
44
  "simple-git-hooks": "^2.11.1",
44
- "svelte": "^4.2.18",
45
- "vite": "^5.3.5",
46
- "vite-plugin-blocklet": "^0.9.5",
47
- "zx": "^8.1.4"
45
+ "svelte": "^4.2.19",
46
+ "vite": "^5.4.8",
47
+ "vite-plugin-blocklet": "^0.9.7",
48
+ "zx": "^8.1.8"
48
49
  },
49
50
  "lint-staged": {
50
51
  "*.{mjs,js,svelte}": [
@@ -1,10 +1,7 @@
1
- # Getting Started with Create Blocklet
2
-
3
- This project was bootstrapped with [Create Blocklet](https://github.com/blocklet/create-blocklet).
4
-
1
+ ## PROJECT_DESCRIPTION
5
2
  This blocklet is a static project, which means this is a frontend application. It's contained `client` code.
6
3
 
7
- ## File Structure
4
+ ## FILE_STRUCTURE
8
5
 
9
6
  - public/ - static files
10
7
  - favicon.ico - favicon
@@ -23,123 +20,3 @@ This blocklet is a static project, which means this is a frontend application. I
23
20
  - package.json - Npm package file
24
21
  - README.md - A guide for this blocklet
25
22
  - version - Version file
26
-
27
- ## Development
28
-
29
- 1. Make sure you have [@blocklet/cli](https://www.npmjs.com/package/@blocklet/cli) installed
30
-
31
- Blocklet needs blocklet server as a dependency. So you need to install it first.
32
- `npm install -g @blocklet/cli`
33
- See details in [https://www.arcblock.io/docs/blocklet-developer/install-blocklet-cli](https://www.arcblock.io/docs/blocklet-developer/install-blocklet-cli)
34
-
35
- 2. Init blocklet server & start blocklet server
36
-
37
- Before starting an blocklet server, you need to init blocklet server.
38
- `blocklet server init --mode=debug`
39
- `blocklet server start`
40
- See details in [https://www.arcblock.io/docs/blocklet-developer/getting-started](https://www.arcblock.io/docs/blocklet-developer/getting-started)
41
-
42
- 3. Go to the project directory `cd [name]`
43
- 4. Install dependencies: `npm install` or `yarn`
44
- 5. Start development server: `blocklet dev`
45
-
46
- ## Bundle
47
-
48
- After developing a blocklet, you may need to bundle it. Use `npm run bundle` command.
49
-
50
- ## Deploy
51
-
52
- - 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.)
53
- > Or you can simply use `npm run deploy` command.
54
- - If you want to deploy this blocklet to remote blocklet server, you can use the command below.
55
-
56
- ```shell
57
- blocklet deploy .blocklet/bundle --endpoint {your blocklet server url} --access-key {blocklet server access key} --access-secret {blocklet server access secret}
58
- ```
59
-
60
- > Make sure the blocklet is bundled before deployment.
61
-
62
- ## Upload to blocklet store
63
-
64
- - If you want to upload the blocklet to any store for other users to download and use, you can following the following instructions.
65
-
66
- Bump version at first.
67
-
68
- ```shell
69
- make bump-version
70
- ```
71
-
72
- Then config blocklet store url.
73
- You can use those store url in below.
74
-
75
- 1. [https://store.blocklet.dev/](https://store.blocklet.dev/)
76
- 2. [https://dev.store.blocklet.dev/](https://dev.store.blocklet.dev/)
77
- 3. A blocklet store started by yourself.
78
- > 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)
79
-
80
- ```shell
81
- blocklet config set store {store url}
82
- ```
83
-
84
- Get a `accessToken` from blocklet store.
85
-
86
- > Why we need a `accessToken`?
87
- > A `accessToken` is genrate by blocklet store, which help us upload our blocklet to any store.
88
-
89
- Set `accessToken` to blocklet config
90
-
91
- ```shell
92
- blocklet config set accessToken {accessToken}
93
- ```
94
-
95
- Upload a new version to a store.
96
-
97
- > Make sure the blocklet is bundled before upload.
98
-
99
- ```shell
100
- blocklet upload
101
- ```
102
-
103
- Or you can simply use `npm run upload` command.
104
-
105
- - You also can upload a new version to blocklet store by Github CI.
106
- Bump version at first.
107
-
108
- ```shell
109
- make bump-version
110
- ```
111
-
112
- Push your code to Github main/master branch, or make a pull request to the main/master branch.
113
- The CI workflow will automatically upload a new version to a store.
114
-
115
- ## Q & A
116
-
117
- 1. Q: How to change a blocklet's name?
118
-
119
- A: Change the `name` field in the `package.json` file, change the `name` field in the `blocklet.yml` file.
120
-
121
- You can also change the `title` field and `description` field in the `blocklet.yml` file.
122
-
123
- Run `blocklet meta` command, you will get a `did` config, copy the `did` value.
124
-
125
- Replace this command `"bundle": "vite build --base /.blocklet/proxy/<%= did %>",` in `package.json`
126
-
127
- Replace `did` field in the `blocklet.yml`
128
-
129
- 2. Q: How to change a blocklet's logo?
130
-
131
- Change the `logo.png` file root folder.
132
-
133
- Or you can change the `logo` field in the `blocklet.yml` file.
134
-
135
- > Make sure you have added the logo path to the `blocklet.yml` file `files` field.
136
-
137
- ## Learn More
138
-
139
- - 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)
140
- - Full document of Blocklet Server & blocklet development: [https://www.arcblock.io/docs/blocklet-developer](https://www.arcblock.io/docs/blocklet-developer)
141
-
142
- ## License
143
-
144
- The code is licensed under the Apache 2.0 license found in the
145
- [LICENSE](LICENSE) file.
@@ -1,4 +1,3 @@
1
- name: template-svelte
2
1
  title: Blocklet Template Svelte
3
2
  description: A Blocklet Server blocklet
4
3
  keywords:
@@ -16,16 +16,17 @@
16
16
  "bump-version": "zx --quiet scripts/bump-version.mjs"
17
17
  },
18
18
  "devDependencies": {
19
- "bumpp": "^9.4.1",
20
- "lint-staged": "^15.2.7",
19
+ "@trivago/prettier-plugin-sort-imports": "^4.3.0",
20
+ "bumpp": "^9.5.2",
21
+ "lint-staged": "^15.2.10",
21
22
  "prettier": "^3.3.3",
22
23
  "prettier-plugin-svelte": "^3.2.6",
23
- "rimraf": "^5.0.7",
24
+ "rimraf": "^5.0.10",
24
25
  "simple-git-hooks": "^2.11.1",
25
- "svelte": "^4.2.18",
26
- "vite": "^5.3.5",
27
- "vite-plugin-blocklet": "^0.9.5",
28
- "zx": "^8.1.4"
26
+ "svelte": "^4.2.19",
27
+ "vite": "^5.4.8",
28
+ "vite-plugin-blocklet": "^0.9.7",
29
+ "zx": "^8.1.8"
29
30
  },
30
31
  "lint-staged": {
31
32
  "*.{mjs,js,svelte}": [
@@ -1,4 +1,3 @@
1
- name: template-todo-list
2
1
  title: Blocklet Template todo-list
3
2
  description: A Blocklet Server blocklet
4
3
  keywords:
@@ -56,23 +56,24 @@
56
56
  "nanoid": "^5.0.7"
57
57
  },
58
58
  "devDependencies": {
59
- "@arcblock/did-connect": "^2.10.33",
59
+ "@arcblock/did-connect": "^2.10.37",
60
60
  "@arcblock/eslint-config": "^0.3.2",
61
61
  "@arcblock/eslint-config-ts": "^0.3.2",
62
- "@arcblock/ux": "^2.10.33",
62
+ "@arcblock/ux": "^2.10.37",
63
63
  "@blocklet/js-sdk": "^1.16.31",
64
- "@blocklet/ui-react": "^2.10.33",
64
+ "@blocklet/ui-react": "^2.10.37",
65
65
  "@emotion/react": "^11.13.3",
66
66
  "@emotion/styled": "^11.13.0",
67
67
  "@mui/icons-material": "^5.16.7",
68
68
  "@mui/material": "^5.16.7",
69
+ "@trivago/prettier-plugin-sort-imports": "^4.3.0",
69
70
  "@types/cookie-parser": "^1.4.7",
70
71
  "@types/cors": "^2.8.17",
71
72
  "@types/dotenv-flow": "^3.3.3",
72
73
  "@types/express": "^4.17.21",
73
- "@types/lodash": "^4.17.7",
74
- "@types/node": "^20.16.5",
75
- "@types/react": "^18.3.8",
74
+ "@types/lodash": "^4.17.9",
75
+ "@types/node": "^20.16.9",
76
+ "@types/react": "^18.3.9",
76
77
  "@types/react-dom": "^18.3.0",
77
78
  "@types/react-toastify": "^4.1.0",
78
79
  "@vitejs/plugin-react": "^4.3.1",
@@ -85,8 +86,8 @@
85
86
  "nodemon": "^3.1.7",
86
87
  "prettier": "^3.3.3",
87
88
  "prettier-plugin-import-sort": "^0.0.7",
88
- "react": "^18.3.1",
89
- "react-dom": "^18.3.1",
89
+ "react": "~18.2.0",
90
+ "react-dom": "~18.2.0",
90
91
  "react-icons": "^5.3.0",
91
92
  "react-router-dom": "^6.26.2",
92
93
  "react-toastify": "^10.0.5",
@@ -94,8 +95,8 @@
94
95
  "simple-git-hooks": "^2.11.1",
95
96
  "ts-node": "^10.9.2",
96
97
  "typescript": "^5.6.2",
97
- "vite": "^5.4.7",
98
- "vite-plugin-blocklet": "^0.9.5",
98
+ "vite": "^5.4.8",
99
+ "vite-plugin-blocklet": "^0.9.7",
99
100
  "vite-plugin-svgr": "^4.2.0",
100
101
  "zx": "^8.1.8"
101
102
  },