From a3988b7ed6e2c827ef1c5ecb0bdcabb38f27b057 Mon Sep 17 00:00:00 2001 From: zhang han Date: Wed, 7 Aug 2024 17:14:30 +0800 Subject: [PATCH] fix(create-app): ensure blocklet-name after create (#351) --- CHANGELOG.md | 5 +++++ package.json | 2 +- packages/create-app/index.js | 13 +++++++------ packages/create-app/package.json | 2 +- .../create-app/templates/express-api/package.json | 2 +- .../create-app/templates/nestjs-api/package.json | 2 +- .../create-app/templates/nextjs-dapp/package.json | 2 +- .../create-app/templates/react-dapp-ts/package.json | 6 +++--- .../create-app/templates/react-dapp/package.json | 6 +++--- .../templates/react-gun-dapp/package.json | 4 ++-- .../create-app/templates/react-static/package.json | 2 +- .../create-app/templates/solidjs-dapp/package.json | 6 +++--- .../templates/solidjs-static/package.json | 2 +- .../create-app/templates/svelte-dapp/package.json | 6 +++--- .../create-app/templates/svelte-static/package.json | 2 +- .../templates/todo-list-example/package.json | 12 ++++++------ packages/create-app/templates/vue-dapp/package.json | 6 +++--- .../create-app/templates/vue-static/package.json | 2 +- .../create-app/templates/vue2-dapp/package.json | 4 ++-- .../create-app/templates/vue2-static/package.json | 2 +- plugins/vite-plugin-blocklet/package.json | 2 +- plugins/vite-plugin-wss-hmr/package.json | 2 +- version | 2 +- website/docs/blocklet.yml | 2 +- website/pages/blocklet.yml | 2 +- 25 files changed, 52 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cee9edeb..235dc3b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.8.16 (2024-8-7) + +- chore(create-app): hide next-dapp temporary +- fix(create-app): ensure blocklet-name after create + ## 0.8.15 (2024-8-1) - fix(create-app): fix `blocklet create` with no name error diff --git a/package.json b/package.json index 0307d8ca..a6593846 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "create-blocklet", "private": true, - "version": "0.8.15", + "version": "0.8.16", "description": "", "keywords": [], "author": "", diff --git a/packages/create-app/index.js b/packages/create-app/index.js index 5734e67c..baacdf5d 100755 --- a/packages/create-app/index.js +++ b/packages/create-app/index.js @@ -69,11 +69,12 @@ const templates = [ display: '[dapp] svelte + express.js', color: magenta, }, - { - name: 'nextjs-dapp', - display: '[dapp] next.js', - color: blue, - }, + // FIXME: @zhanghan add this template in the future + // { + // name: 'nextjs-dapp', + // display: '[dapp] next.js', + // color: blue, + // }, // { // name: 'react-gun-dapp', // display: '[dapp] react + gun.js + express.js', @@ -300,7 +301,7 @@ async function init() { const scaffoldSpinner = ora('Creating project...\n').start(); // name 是用户输入的项目名称 - let name = packageName || targetDir; + let name = projectName || packageName || targetDir; if (['.', './'].includes(name)) { name = defaultProjectName; } diff --git a/packages/create-app/package.json b/packages/create-app/package.json index 2e4597fb..77f93d4d 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,6 +1,6 @@ { "name": "create-blocklet", - "version": "0.8.15", + "version": "0.8.16", "exports": "./index.js", "type": "module", "repository": "git@github.com:blocklet/create-blocklet.git", diff --git a/packages/create-app/templates/express-api/package.json b/packages/create-app/templates/express-api/package.json index 179dd780..a689536f 100644 --- a/packages/create-app/templates/express-api/package.json +++ b/packages/create-app/templates/express-api/package.json @@ -32,7 +32,7 @@ "license": "ISC", "dependencies": { "@arcblock/did-auth-storage-nedb": "^1.7.1", - "@blocklet/sdk": "^1.16.28", + "@blocklet/sdk": "^1.16.29", "@ocap/client": "^1.18.128", "dotenv-flow": "^4.1.0", "express": "^4.19.2" diff --git a/packages/create-app/templates/nestjs-api/package.json b/packages/create-app/templates/nestjs-api/package.json index 508ee1fe..97ca32fc 100644 --- a/packages/create-app/templates/nestjs-api/package.json +++ b/packages/create-app/templates/nestjs-api/package.json @@ -36,7 +36,7 @@ }, "dependencies": { "@arcblock/did-auth-storage-nedb": "^1.7.1", - "@blocklet/sdk": "^1.16.28", + "@blocklet/sdk": "^1.16.29", "@nestjs/common": "^10.3.9", "@nestjs/core": "^10.3.9", "@nestjs/platform-express": "^10.3.9", diff --git a/packages/create-app/templates/nextjs-dapp/package.json b/packages/create-app/templates/nextjs-dapp/package.json index b5a98f59..cb20df51 100644 --- a/packages/create-app/templates/nextjs-dapp/package.json +++ b/packages/create-app/templates/nextjs-dapp/package.json @@ -30,7 +30,7 @@ "dependencies": { "@arcblock/did-auth": "^1.18.128", "@arcblock/did-auth-storage-nedb": "^1.7.1", - "@blocklet/sdk": "^1.16.28", + "@blocklet/sdk": "^1.16.29", "@ocap/client": "^1.18.128", "@ocap/mcrypto": "^1.18.128", "@ocap/wallet": "^1.18.128", diff --git a/packages/create-app/templates/react-dapp-ts/package.json b/packages/create-app/templates/react-dapp-ts/package.json index b0129814..36138c5e 100644 --- a/packages/create-app/templates/react-dapp-ts/package.json +++ b/packages/create-app/templates/react-dapp-ts/package.json @@ -40,7 +40,7 @@ "dependencies": { "@arcblock/did-auth": "^1.18.128", "@arcblock/did-auth-storage-nedb": "^1.7.1", - "@blocklet/sdk": "^1.16.28", + "@blocklet/sdk": "^1.16.29", "@ocap/client": "^1.18.128", "@ocap/mcrypto": "^1.18.128", "@ocap/wallet": "^1.18.128", @@ -54,7 +54,7 @@ "devDependencies": { "@arcblock/eslint-config": "^0.3.2", "@arcblock/eslint-config-ts": "^0.3.2", - "@blocklet/js-sdk": "^1.16.28", + "@blocklet/js-sdk": "^1.16.29", "@types/cookie-parser": "^1.4.7", "@types/cors": "^2.8.17", "@types/dotenv-flow": "^3.3.3", @@ -80,7 +80,7 @@ "ts-node": "^10.9.2", "typescript": "^5.5.2", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.8.15", + "vite-plugin-blocklet": "^0.8.16", "vite-plugin-svgr": "^4.2.0", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/react-dapp/package.json b/packages/create-app/templates/react-dapp/package.json index c50478b0..0763e025 100644 --- a/packages/create-app/templates/react-dapp/package.json +++ b/packages/create-app/templates/react-dapp/package.json @@ -42,7 +42,7 @@ "dependencies": { "@arcblock/did-auth": "^1.18.128", "@arcblock/did-auth-storage-nedb": "^1.7.1", - "@blocklet/sdk": "^1.16.28", + "@blocklet/sdk": "^1.16.29", "@ocap/client": "^1.18.128", "@ocap/mcrypto": "^1.18.128", "@ocap/wallet": "^1.18.128", @@ -55,7 +55,7 @@ }, "devDependencies": { "@arcblock/eslint-config": "^0.3.2", - "@blocklet/js-sdk": "^1.16.28", + "@blocklet/js-sdk": "^1.16.29", "@vitejs/plugin-react": "^4.3.1", "bumpp": "^9.4.1", "cross-env": "^7.0.3", @@ -70,7 +70,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.8.15", + "vite-plugin-blocklet": "^0.8.16", "vite-plugin-svgr": "^4.2.0", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/react-gun-dapp/package.json b/packages/create-app/templates/react-gun-dapp/package.json index dfd6a9c3..9883e06d 100644 --- a/packages/create-app/templates/react-gun-dapp/package.json +++ b/packages/create-app/templates/react-gun-dapp/package.json @@ -42,7 +42,7 @@ "dependencies": { "@arcblock/did-auth": "^1.18.128", "@arcblock/did-auth-storage-nedb": "^1.7.1", - "@blocklet/sdk": "^1.16.28", + "@blocklet/sdk": "^1.16.29", "@ocap/client": "^1.18.128", "@ocap/mcrypto": "^1.18.128", "@ocap/wallet": "^1.18.128", @@ -70,7 +70,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.8.15", + "vite-plugin-blocklet": "^0.8.16", "vite-plugin-svgr": "^4.2.0", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/react-static/package.json b/packages/create-app/templates/react-static/package.json index e83c2760..8ce51b6a 100644 --- a/packages/create-app/templates/react-static/package.json +++ b/packages/create-app/templates/react-static/package.json @@ -51,7 +51,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.8.15", + "vite-plugin-blocklet": "^0.8.16", "vite-plugin-svgr": "^4.2.0", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/solidjs-dapp/package.json b/packages/create-app/templates/solidjs-dapp/package.json index ba44e6bc..8c2a9882 100644 --- a/packages/create-app/templates/solidjs-dapp/package.json +++ b/packages/create-app/templates/solidjs-dapp/package.json @@ -21,7 +21,7 @@ }, "license": "MIT", "devDependencies": { - "@blocklet/js-sdk": "^1.16.28", + "@blocklet/js-sdk": "^1.16.29", "bumpp": "^9.4.1", "cross-env": "^7.0.3", "eslint": "^8.57.0", @@ -35,14 +35,14 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.8.15", + "vite-plugin-blocklet": "^0.8.16", "vite-plugin-solid": "^2.10.2", "zx": "^8.1.4" }, "dependencies": { "@arcblock/did-auth": "^1.18.128", "@arcblock/did-auth-storage-nedb": "^1.7.1", - "@blocklet/sdk": "^1.16.28", + "@blocklet/sdk": "^1.16.29", "@ocap/client": "^1.18.128", "@ocap/mcrypto": "^1.18.128", "@ocap/wallet": "^1.18.128", diff --git a/packages/create-app/templates/solidjs-static/package.json b/packages/create-app/templates/solidjs-static/package.json index 708db221..63e72e0d 100644 --- a/packages/create-app/templates/solidjs-static/package.json +++ b/packages/create-app/templates/solidjs-static/package.json @@ -31,7 +31,7 @@ "simple-git-hooks": "^2.11.1", "solid-js": "^1.8.18", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.8.15", + "vite-plugin-blocklet": "^0.8.16", "vite-plugin-solid": "^2.10.2", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/svelte-dapp/package.json b/packages/create-app/templates/svelte-dapp/package.json index bdfb275c..cd228e39 100644 --- a/packages/create-app/templates/svelte-dapp/package.json +++ b/packages/create-app/templates/svelte-dapp/package.json @@ -19,7 +19,7 @@ "dependencies": { "@arcblock/did-auth": "^1.18.128", "@arcblock/did-auth-storage-nedb": "^1.7.1", - "@blocklet/sdk": "^1.16.28", + "@blocklet/sdk": "^1.16.29", "@ocap/client": "^1.18.128", "@ocap/mcrypto": "^1.18.128", "@ocap/wallet": "^1.18.128", @@ -31,7 +31,7 @@ "express-async-errors": "^3.1.1" }, "devDependencies": { - "@blocklet/js-sdk": "^1.16.28", + "@blocklet/js-sdk": "^1.16.29", "@sveltejs/vite-plugin-svelte": "3.1.1", "bumpp": "^9.4.1", "cross-env": "^7.0.3", @@ -43,7 +43,7 @@ "simple-git-hooks": "^2.11.1", "svelte": "^4.2.18", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.8.15", + "vite-plugin-blocklet": "^0.8.16", "zx": "^8.1.4" }, "lint-staged": { diff --git a/packages/create-app/templates/svelte-static/package.json b/packages/create-app/templates/svelte-static/package.json index aa34a5da..dec6ff93 100644 --- a/packages/create-app/templates/svelte-static/package.json +++ b/packages/create-app/templates/svelte-static/package.json @@ -24,7 +24,7 @@ "simple-git-hooks": "^2.11.1", "svelte": "^4.2.18", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.8.15", + "vite-plugin-blocklet": "^0.8.16", "zx": "^8.1.4" }, "lint-staged": { diff --git a/packages/create-app/templates/todo-list-example/package.json b/packages/create-app/templates/todo-list-example/package.json index 3ab1a1a4..e5ceeedc 100644 --- a/packages/create-app/templates/todo-list-example/package.json +++ b/packages/create-app/templates/todo-list-example/package.json @@ -40,7 +40,7 @@ "dependencies": { "@arcblock/did-auth": "^1.18.128", "@arcblock/did-auth-storage-nedb": "^1.7.1", - "@blocklet/sdk": "^1.16.28", + "@blocklet/sdk": "^1.16.29", "@did-space/client": "^0.5.11", "@did-space/core": "^0.5.11", "@ocap/client": "^1.18.128", @@ -56,12 +56,12 @@ "nanoid": "^5.0.7" }, "devDependencies": { - "@arcblock/did-connect": "^2.10.12", + "@arcblock/did-connect": "^2.10.13", "@arcblock/eslint-config": "^0.3.2", "@arcblock/eslint-config-ts": "^0.3.2", - "@arcblock/ux": "^2.10.12", - "@blocklet/js-sdk": "^1.16.28", - "@blocklet/ui-react": "^2.10.12", + "@arcblock/ux": "^2.10.13", + "@blocklet/js-sdk": "^1.16.29", + "@blocklet/ui-react": "^2.10.13", "@emotion/react": "^11.13.0", "@emotion/styled": "^11.13.0", "@mui/icons-material": "^5.15.21", @@ -95,7 +95,7 @@ "ts-node": "^10.9.2", "typescript": "^5.5.2", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.8.15", + "vite-plugin-blocklet": "^0.8.16", "vite-plugin-svgr": "^4.2.0", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/vue-dapp/package.json b/packages/create-app/templates/vue-dapp/package.json index f32858ab..2bde0601 100644 --- a/packages/create-app/templates/vue-dapp/package.json +++ b/packages/create-app/templates/vue-dapp/package.json @@ -21,7 +21,7 @@ "dependencies": { "@arcblock/did-auth": "^1.18.128", "@arcblock/did-auth-storage-nedb": "^1.7.1", - "@blocklet/sdk": "^1.16.28", + "@blocklet/sdk": "^1.16.29", "@ocap/client": "^1.18.128", "@ocap/mcrypto": "^1.18.128", "@ocap/wallet": "^1.18.128", @@ -33,7 +33,7 @@ "express-async-errors": "^3.1.1" }, "devDependencies": { - "@blocklet/js-sdk": "^1.16.28", + "@blocklet/js-sdk": "^1.16.29", "@vitejs/plugin-vue": "^5.1.1", "bumpp": "^9.4.1", "cross-env": "^7.0.3", @@ -48,7 +48,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.8.15", + "vite-plugin-blocklet": "^0.8.16", "vue": "^3.4.31", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/vue-static/package.json b/packages/create-app/templates/vue-static/package.json index 48bc3420..e34a4bd0 100644 --- a/packages/create-app/templates/vue-static/package.json +++ b/packages/create-app/templates/vue-static/package.json @@ -29,7 +29,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.8.15", + "vite-plugin-blocklet": "^0.8.16", "vue": "^3.4.31", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/vue2-dapp/package.json b/packages/create-app/templates/vue2-dapp/package.json index 8276b1a6..9be1cae6 100644 --- a/packages/create-app/templates/vue2-dapp/package.json +++ b/packages/create-app/templates/vue2-dapp/package.json @@ -21,7 +21,7 @@ "dependencies": { "@arcblock/did-auth": "^1.18.128", "@arcblock/did-auth-storage-nedb": "^1.7.1", - "@blocklet/sdk": "^1.16.28", + "@blocklet/sdk": "^1.16.29", "@ocap/client": "^1.18.128", "@ocap/mcrypto": "^1.18.128", "@ocap/wallet": "^1.18.128", @@ -47,7 +47,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.8.15", + "vite-plugin-blocklet": "^0.8.16", "vue": "^2.7.16", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/vue2-static/package.json b/packages/create-app/templates/vue2-static/package.json index 38e5e522..553eac0e 100644 --- a/packages/create-app/templates/vue2-static/package.json +++ b/packages/create-app/templates/vue2-static/package.json @@ -29,7 +29,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.8.15", + "vite-plugin-blocklet": "^0.8.16", "vue": "^2.7.16", "zx": "^8.1.4" }, diff --git a/plugins/vite-plugin-blocklet/package.json b/plugins/vite-plugin-blocklet/package.json index 5d9eed6c..e1ae3088 100644 --- a/plugins/vite-plugin-blocklet/package.json +++ b/plugins/vite-plugin-blocklet/package.json @@ -1,7 +1,7 @@ { "name": "vite-plugin-blocklet", "type": "module", - "version": "0.8.15", + "version": "0.8.16", "description": "", "main": "index.js", "files": [ diff --git a/plugins/vite-plugin-wss-hmr/package.json b/plugins/vite-plugin-wss-hmr/package.json index ee758f7d..683a365d 100644 --- a/plugins/vite-plugin-wss-hmr/package.json +++ b/plugins/vite-plugin-wss-hmr/package.json @@ -1,7 +1,7 @@ { "name": "vite-plugin-wss-hmr", "type": "module", - "version": "0.8.15", + "version": "0.8.16", "description": "", "main": "index.js", "exports": { diff --git a/version b/version index 455c976d..86a6ea4f 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.8.15 \ No newline at end of file +0.8.16 \ No newline at end of file diff --git a/website/docs/blocklet.yml b/website/docs/blocklet.yml index a2ca5388..8f69add2 100644 --- a/website/docs/blocklet.yml +++ b/website/docs/blocklet.yml @@ -13,7 +13,7 @@ repository: type: git url: git+https://github.com/blocklet/create-blocklet.git specVersion: 1.2.8 -version: 0.8.15 +version: 0.8.16 logo: logo.png files: - logo.png diff --git a/website/pages/blocklet.yml b/website/pages/blocklet.yml index 871f9acd..5dc6d8a2 100644 --- a/website/pages/blocklet.yml +++ b/website/pages/blocklet.yml @@ -13,7 +13,7 @@ repository: type: git url: git+https://github.com/blocklet/create-blocklet.git specVersion: 1.2.8 -version: 0.8.15 +version: 0.8.16 logo: logo.png files: - logo.png