@cloud411716/fancy-webnovel 0.1.7 → 0.1.9
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
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { spawn } from 'child_process';
|
|
5
5
|
import { fileURLToPath } from 'url';
|
|
6
6
|
import { dirname, join } from 'path';
|
|
7
|
+
import { appendFileSync } from 'fs';
|
|
7
8
|
|
|
8
9
|
const __filename = fileURLToPath(import.meta.url);
|
|
9
10
|
const __dirname = dirname(__filename);
|
|
@@ -16,9 +17,11 @@ export async function apply(ctx) {
|
|
|
16
17
|
name: 'fancy-bootstrap',
|
|
17
18
|
description: '初始化项目根 (Usage)',
|
|
18
19
|
handler: async (invocation) => {
|
|
20
|
+
const debug = `[/tmp/fancy-bootstrap-debug.txt] rawInput=${JSON.stringify(invocation.rawInput)} keys=${JSON.stringify(Object.keys(invocation))}\n`;
|
|
21
|
+
appendFileSync('/tmp/fancy-bootstrap-debug.txt', debug);
|
|
19
22
|
const projectRoot = invocation.rawInput?.trim();
|
|
20
23
|
if (!projectRoot) {
|
|
21
|
-
return { kind: 'error', text:
|
|
24
|
+
return { kind: 'error', text: `Usage: /fancy-bootstrap <project-root> (rawInput=${JSON.stringify(invocation.rawInput)})` };
|
|
22
25
|
}
|
|
23
26
|
const result = await runInit(projectRoot);
|
|
24
27
|
if (result.ok) {
|