dashcam 1.3.20-beta → 1.3.22

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/bin/dashcam.js +9 -5
  2. package/package.json +1 -1
package/bin/dashcam.js CHANGED
@@ -10,6 +10,7 @@ import { fileURLToPath } from 'url';
10
10
  import { dirname } from 'path';
11
11
  import path from 'path';
12
12
  import fs from 'fs';
13
+ import os from 'os';
13
14
 
14
15
  const __filename = fileURLToPath(import.meta.url);
15
16
  const __dirname = dirname(__filename);
@@ -403,6 +404,9 @@ program
403
404
  .command('stop')
404
405
  .description('Stop the current recording and wait for upload completion')
405
406
  .action(async () => {
407
+
408
+ console.log('!!!! Updated Stop')
409
+
406
410
  try {
407
411
  // Enable verbose logging for stop command
408
412
  setVerbose(true);
@@ -411,7 +415,7 @@ program
411
415
  platform: process.platform,
412
416
  cwd: process.cwd(),
413
417
  pid: process.pid,
414
- processDir: require('path').join(require('os').homedir(), '.dashcam-cli')
418
+ processDir: path.join(os.homedir(), '.dashcam-cli')
415
419
  });
416
420
 
417
421
  const isActive = processManager.isRecordingActive();
@@ -420,18 +424,18 @@ program
420
424
  if (!isActive) {
421
425
  console.log('No active recording to stop');
422
426
 
423
- const statusPath = require('path').join(require('os').homedir(), '.dashcam-cli', 'status.json');
427
+ const statusPath = path.join(os.homedir(), '.dashcam-cli', 'status.json');
424
428
 
425
429
  logger.warn('Stop command called but no active recording found', {
426
430
  platform: process.platform,
427
431
  statusFile: statusPath,
428
- statusFileExists: require('fs').existsSync(statusPath)
432
+ statusFileExists: fs.existsSync(statusPath)
429
433
  });
430
434
 
431
435
  // Try to read and display status file for debugging
432
436
  try {
433
- if (require('fs').existsSync(statusPath)) {
434
- const statusContent = require('fs').readFileSync(statusPath, 'utf8');
437
+ if (fs.existsSync(statusPath)) {
438
+ const statusContent = fs.readFileSync(statusPath, 'utf8');
435
439
  logger.debug('Status file contents', { content: statusContent });
436
440
  console.log('Status file exists but recording not detected as active');
437
441
  console.log('Status file location:', statusPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dashcam",
3
- "version": "1.3.20-beta",
3
+ "version": "1.3.22",
4
4
  "description": "Minimal CLI version of Dashcam desktop app",
5
5
  "main": "bin/dashcam.js",
6
6
  "bin": {