citeclaw 2.0.10 → 2.0.11

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/scripts/botcite.js +20 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "citeclaw",
3
- "version": "2.0.10",
3
+ "version": "2.0.11",
4
4
  "description": "Citation and bibliography toolkit for DOI, URL, arXiv, PDF, Zotero, and MCP workflows.",
5
5
  "homepage": "https://github.com/trotsky1997/citeclaw",
6
6
  "license": "Apache-2.0",
@@ -35,7 +35,7 @@
35
35
  "coverage": "nyc --reporter=lcov _mocha"
36
36
  },
37
37
  "engines": {
38
- "node": "20 || 22"
38
+ "node": "20 || 22 || 24"
39
39
  },
40
40
  "dependencies": {
41
41
  "bluebird": "3.7.2",
@@ -361,6 +361,23 @@ function normalizeCommandForSpawn( command, platform ) {
361
361
  return windowsCommands[ command ] || command;
362
362
  }
363
363
 
364
+ function resolveSpawnSettings( command, platform ) {
365
+ const resolvedCommand = normalizeCommandForSpawn( command, platform );
366
+ const activePlatform = platform || process.platform;
367
+ return {
368
+ command: resolvedCommand,
369
+ shell: activePlatform === 'win32' && /\.(?:cmd|bat)$/i.test( resolvedCommand )
370
+ };
371
+ }
372
+
373
+ function spawnSyncResolved( command, args, options ) {
374
+ const resolved = resolveSpawnSettings( command );
375
+ return spawnSync( resolved.command, args, {
376
+ ...( options || {} ),
377
+ shell: resolved.shell
378
+ } );
379
+ }
380
+
364
381
  function commandExists( command ) {
365
382
  const args = process.platform === 'win32' ? [ '/c', 'where', command ] : [ '-lc', `command -v ${ command }` ];
366
383
  const found = spawnSync( process.platform === 'win32' ? 'cmd' : 'bash', args, {
@@ -457,7 +474,7 @@ function jsonOut( value ) {
457
474
  }
458
475
 
459
476
  function runCommandText( command, args ) {
460
- const result = spawnSync( normalizeCommandForSpawn( command ), args, {
477
+ const result = spawnSyncResolved( command, args, {
461
478
  stdio: 'pipe',
462
479
  encoding: 'utf8'
463
480
  } );
@@ -472,7 +489,7 @@ function runCommandText( command, args ) {
472
489
  }
473
490
 
474
491
  function runCommandOrThrow( command, args, cwd ) {
475
- const result = spawnSync( normalizeCommandForSpawn( command ), args, {
492
+ const result = spawnSyncResolved( command, args, {
476
493
  cwd: cwd || rootDir,
477
494
  stdio: 'pipe',
478
495
  encoding: 'utf8'
@@ -5212,6 +5229,7 @@ module.exports = {
5212
5229
  normalizeCommandForSpawn,
5213
5230
  normalizeArxivId,
5214
5231
  normalizeDoi,
5232
+ resolveSpawnSettings,
5215
5233
  syncStyles,
5216
5234
  shouldAttemptPdfOcr
5217
5235
  };