fullcourtdefense-cli 1.1.4 → 1.1.5
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/commands/hook.js +5 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/commands/hook.js
CHANGED
|
@@ -232,11 +232,14 @@ async function hookCommand(args, config) {
|
|
|
232
232
|
catch (e) {
|
|
233
233
|
stdinErr = e instanceof Error ? e.message : String(e);
|
|
234
234
|
}
|
|
235
|
+
// Windows/Cursor prepends a UTF-8 BOM (\uFEFF) to the piped stdin JSON, which
|
|
236
|
+
// makes JSON.parse throw "Unexpected token". Strip BOM + surrounding whitespace.
|
|
237
|
+
const cleaned = raw.replace(/^\uFEFF/, '').replace(/^[\s\uFEFF\xA0]+/, '').trim();
|
|
235
238
|
let payload = {};
|
|
236
239
|
let parseErr = '';
|
|
237
|
-
if (
|
|
240
|
+
if (cleaned) {
|
|
238
241
|
try {
|
|
239
|
-
payload = JSON.parse(
|
|
242
|
+
payload = JSON.parse(cleaned);
|
|
240
243
|
}
|
|
241
244
|
catch (e) {
|
|
242
245
|
parseErr = e instanceof Error ? e.message : String(e);
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ const configure_1 = require("./commands/configure");
|
|
|
10
10
|
const discover_1 = require("./commands/discover");
|
|
11
11
|
const hook_1 = require("./commands/hook");
|
|
12
12
|
const installCursorHook_1 = require("./commands/installCursorHook");
|
|
13
|
-
const VERSION = '1.1.
|
|
13
|
+
const VERSION = '1.1.5';
|
|
14
14
|
function parseArgs(argv) {
|
|
15
15
|
const flags = {};
|
|
16
16
|
let command = '';
|