create-pubinfo 2.1.10-beta.2 → 2.1.10
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/dist/cli.mjs +5 -5
- package/dist/helper.mjs +7 -7
- package/package.json +13 -13
- package/templates/pubinfo-app/src/views/system/login/components/LoginForm.vue +1 -1
- package/templates/pubinfo-app/src/views/system/login/index.vue +2 -2
- package/templates/pubinfo-module/playground/src/views/system/login/components/LoginForm.vue +1 -1
- package/templates/pubinfo-module/playground/src/views/system/login/index.vue +2 -2
- package/templates/pubinfo-monorepo/apps/basic/src/views/system/login/components/LoginForm.vue +1 -1
- package/templates/pubinfo-monorepo/apps/basic/src/views/system/login/index.vue +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -31,11 +31,11 @@ const META_FILENAME = "pubinfo.json";
|
|
|
31
31
|
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/v1/download.ts
|
|
34
|
-
const pubinfo = async (input
|
|
35
|
-
const semver = coerce(input
|
|
34
|
+
const pubinfo = async (input, { auth }) => {
|
|
35
|
+
const semver = coerce(input);
|
|
36
36
|
return {
|
|
37
37
|
name: "pubinfo",
|
|
38
|
-
version: input
|
|
38
|
+
version: input,
|
|
39
39
|
headers: { Authorization: `token ${auth}` },
|
|
40
40
|
tar: `${REMOTE_URL}/${PKG_NAME}-${semver?.version}.tar.gz`
|
|
41
41
|
};
|
|
@@ -219,8 +219,8 @@ async function runV1() {
|
|
|
219
219
|
optionsV1.apps = await checkbox({
|
|
220
220
|
message: "选择应用模块(apps)",
|
|
221
221
|
choices: APPS,
|
|
222
|
-
validate: (input
|
|
223
|
-
if (input
|
|
222
|
+
validate: (input) => {
|
|
223
|
+
if (input.length === 0) return "请至少选择一个应用";
|
|
224
224
|
return true;
|
|
225
225
|
}
|
|
226
226
|
});
|
package/dist/helper.mjs
CHANGED
|
@@ -23,10 +23,10 @@ async function copyTemplate(options) {
|
|
|
23
23
|
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/git.ts
|
|
26
|
-
function runGitCommand(args, cwd
|
|
26
|
+
function runGitCommand(args, cwd) {
|
|
27
27
|
return new Promise((resolvePromise, rejectPromise) => {
|
|
28
28
|
const child = spawn("git", args, {
|
|
29
|
-
cwd
|
|
29
|
+
cwd,
|
|
30
30
|
stdio: "ignore"
|
|
31
31
|
});
|
|
32
32
|
child.on("error", rejectPromise);
|
|
@@ -122,8 +122,8 @@ async function generate(options) {
|
|
|
122
122
|
|
|
123
123
|
//#endregion
|
|
124
124
|
//#region src/utils.ts
|
|
125
|
-
function validateInput(input
|
|
126
|
-
if (/[<>:"/\\|?*\s]/.test(input
|
|
125
|
+
function validateInput(input) {
|
|
126
|
+
if (/[<>:"/\\|?*\s]/.test(input)) return "错误提示: 该值不能包含空格或者非法字符 (例如, <>:\"/\\|?*).";
|
|
127
127
|
return true;
|
|
128
128
|
}
|
|
129
129
|
|
|
@@ -184,10 +184,10 @@ async function interaction() {
|
|
|
184
184
|
|
|
185
185
|
//#endregion
|
|
186
186
|
//#region src/core/index.ts
|
|
187
|
-
async function run(version
|
|
187
|
+
async function run(version) {
|
|
188
188
|
generate({
|
|
189
189
|
...await interaction(),
|
|
190
|
-
version
|
|
190
|
+
version
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
|
|
@@ -196,7 +196,7 @@ async function run(version$1) {
|
|
|
196
196
|
var package_default = {
|
|
197
197
|
name: "create-pubinfo",
|
|
198
198
|
type: "module",
|
|
199
|
-
version: "2.1.10
|
|
199
|
+
version: "2.1.10",
|
|
200
200
|
description: "初始化项目框架",
|
|
201
201
|
author: "Werheng <werheng.zhang@gmail.com>",
|
|
202
202
|
license: "MIT",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pubinfo",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.1.10
|
|
4
|
+
"version": "2.1.10",
|
|
5
5
|
"description": "初始化项目框架",
|
|
6
6
|
"author": "Werheng <werheng.zhang@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -26,22 +26,22 @@
|
|
|
26
26
|
"node": "^20.19.0 || >=22.12.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@inquirer/prompts": "^
|
|
29
|
+
"@inquirer/prompts": "^8.2.0",
|
|
30
30
|
"ansi-colors": "^4.1.3",
|
|
31
|
-
"cfonts": "^3.3.
|
|
32
|
-
"commander": "^14.0.
|
|
33
|
-
"confbox": "^0.2.
|
|
34
|
-
"fs-extra": "^11.3.
|
|
35
|
-
"giget": "^
|
|
31
|
+
"cfonts": "^3.3.1",
|
|
32
|
+
"commander": "^14.0.3",
|
|
33
|
+
"confbox": "^0.2.4",
|
|
34
|
+
"fs-extra": "^11.3.3",
|
|
35
|
+
"giget": "^3.1.2",
|
|
36
36
|
"node-plop": "0.32.2",
|
|
37
|
-
"ofetch": "^1.
|
|
38
|
-
"ora": "^
|
|
39
|
-
"rimraf": "^6.
|
|
40
|
-
"semver": "^7.7.
|
|
41
|
-
"@pubinfo/shared": "2.1.10
|
|
37
|
+
"ofetch": "^1.5.1",
|
|
38
|
+
"ora": "^9.3.0",
|
|
39
|
+
"rimraf": "^6.1.2",
|
|
40
|
+
"semver": "^7.7.4",
|
|
41
|
+
"@pubinfo/shared": "2.1.10"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@types/node": "^
|
|
44
|
+
"@types/node": "^25.2.2"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"dev": "tsdown --watch src",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
2
|
+
import LoginForm from './components/LoginForm.vue';
|
|
3
3
|
|
|
4
4
|
defineOptions({
|
|
5
5
|
name: 'Login',
|
|
@@ -94,7 +94,7 @@ const designDescription = [
|
|
|
94
94
|
justify-center
|
|
95
95
|
pt="20vh"
|
|
96
96
|
>
|
|
97
|
-
<
|
|
97
|
+
<LoginForm />
|
|
98
98
|
</div>
|
|
99
99
|
</div>
|
|
100
100
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
2
|
+
import LoginForm from './components/LoginForm.vue';
|
|
3
3
|
|
|
4
4
|
defineOptions({
|
|
5
5
|
name: 'Login',
|
|
@@ -94,7 +94,7 @@ const designDescription = [
|
|
|
94
94
|
justify-center
|
|
95
95
|
pt="20vh"
|
|
96
96
|
>
|
|
97
|
-
<
|
|
97
|
+
<LoginForm />
|
|
98
98
|
</div>
|
|
99
99
|
</div>
|
|
100
100
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
2
|
+
import LoginForm from './components/LoginForm.vue';
|
|
3
3
|
|
|
4
4
|
defineOptions({
|
|
5
5
|
name: 'Login',
|
|
@@ -94,7 +94,7 @@ const designDescription = [
|
|
|
94
94
|
justify-center
|
|
95
95
|
pt="20vh"
|
|
96
96
|
>
|
|
97
|
-
<
|
|
97
|
+
<LoginForm />
|
|
98
98
|
</div>
|
|
99
99
|
</div>
|
|
100
100
|
</div>
|