@cloud411716/fancy-webnovel 1.0.38 → 1.0.39
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/commands/bootstrap/index.js +16 -11
- package/package.json +1 -1
|
@@ -103,17 +103,22 @@ export function apply(ctx) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// ---------- confirm ----------
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
106
|
+
let confirm;
|
|
107
|
+
try {
|
|
108
|
+
confirm = await ctx.userQuestions.ask({
|
|
109
|
+
questions: [{
|
|
110
|
+
id: 'confirm',
|
|
111
|
+
question: bootstrap.notify({ type: 'confirm', projectRoot }),
|
|
112
|
+
detail: projectRoot,
|
|
113
|
+
hideCustomInput: true,
|
|
114
|
+
options: bootstrap.confirmOptions(),
|
|
115
|
+
}],
|
|
116
|
+
agent: invocation.agent,
|
|
117
|
+
signal,
|
|
118
|
+
});
|
|
119
|
+
} catch {
|
|
120
|
+
return notify(session, 'error', bootstrap.notify({ type: 'cancelled' }));
|
|
121
|
+
}
|
|
117
122
|
const ans = confirm.answers[0];
|
|
118
123
|
const chosen = ans?.selected?.[0] ?? ans?.custom;
|
|
119
124
|
if (chosen !== '确认创建') {
|