@cloud411716/fancy-webnovel 0.1.21 → 0.1.23
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/package.json
CHANGED
|
@@ -29,9 +29,10 @@ function isValidPath(p) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
function runBootstrapScript(projectRoot) {
|
|
32
|
-
return new Promise((resolve) => {
|
|
32
|
+
return new Promise(async (resolve) => {
|
|
33
33
|
const initScript = join(BOOTSTRAP_SCRIPTS_DIR, 'init.js');
|
|
34
|
-
const
|
|
34
|
+
const { spawn } = await import('child_process');
|
|
35
|
+
const proc = spawn(
|
|
35
36
|
'node', [initScript, projectRoot],
|
|
36
37
|
{ timeout: 30000, stdio: ['ignore', 'pipe', 'pipe'] }
|
|
37
38
|
);
|
|
@@ -157,9 +158,10 @@ function notifyScan(session, text) {
|
|
|
157
158
|
}
|
|
158
159
|
|
|
159
160
|
function runScanScript(projectRoot, platform, length) {
|
|
160
|
-
return new Promise((resolve) => {
|
|
161
|
+
return new Promise(async (resolve) => {
|
|
161
162
|
const scriptPath = join(SCAN_SCRIPTS_DIR, 'run-scan.js');
|
|
162
|
-
const
|
|
163
|
+
const { spawn } = await import('child_process');
|
|
164
|
+
const proc = spawn(
|
|
163
165
|
'node', [scriptPath, '--project-root', projectRoot, '--platform', platform, '--length', length],
|
|
164
166
|
{ timeout: 120000, stdio: ['ignore', 'pipe', 'pipe'] }
|
|
165
167
|
);
|
|
@@ -288,6 +290,8 @@ async function applyScan(ctx) {
|
|
|
288
290
|
// ---------------------------------------------------------------------------
|
|
289
291
|
// 导出合并的 apply
|
|
290
292
|
// ---------------------------------------------------------------------------
|
|
293
|
+
export const inject = ['commands', 'userQuestions'];
|
|
294
|
+
|
|
291
295
|
export async function apply(ctx) {
|
|
292
296
|
await applyBootstrap(ctx);
|
|
293
297
|
await applyScan(ctx);
|