dashcam 1.4.2-beta → 1.4.5-beta

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/test_workflow.sh CHANGED
@@ -21,11 +21,13 @@ echo "✅ Web tracking configured"
21
21
  echo ""
22
22
  echo "3. Setting up file tracking..."
23
23
  TEMP_FILE="/tmp/test-cli-log.txt"
24
- echo "Using existing test file: $TEMP_FILE"
25
24
 
26
- # File is already tracked from previous tests, check if it exists
27
- if [ ! -f "$TEMP_FILE" ]; then
28
- touch "$TEMP_FILE"
25
+ # Clear the file to start fresh (remove old events from previous test runs)
26
+ > "$TEMP_FILE"
27
+ echo "Created fresh test file: $TEMP_FILE"
28
+
29
+ # File is already tracked from previous tests, check if it exists in config
30
+ if ! ./bin/dashcam.js logs --list 2>/dev/null | grep -q "$TEMP_FILE"; then
29
31
  ./bin/dashcam.js logs --add --name=temp-file-tracking --type=file --file="$TEMP_FILE"
30
32
  fi
31
33
  echo "✅ File tracking configured"
@@ -113,8 +115,15 @@ sleep 2
113
115
  echo ""
114
116
  echo "6. Stopping recording and uploading..."
115
117
  # Check if recording is still active
118
+ SHARE_LINK=""
116
119
  if ./bin/dashcam.js status | grep -q "Recording in progress"; then
117
- ./bin/dashcam.js stop
120
+ # Capture the output to extract the share link
121
+ STOP_OUTPUT=$(./bin/dashcam.js stop 2>&1)
122
+ echo "$STOP_OUTPUT"
123
+
124
+ # Extract the share link from the output
125
+ SHARE_LINK=$(echo "$STOP_OUTPUT" | grep -oE "https?://[^\s]+" | head -1)
126
+
118
127
  echo "✅ Recording stopped and uploaded"
119
128
  else
120
129
  echo "⚠️ Recording already completed (this is expected with background mode)"
@@ -132,6 +141,14 @@ echo ""
132
141
  echo "📊 Final Status:"
133
142
  ./bin/dashcam.js status
134
143
 
144
+ # Open the recording in browser if we got a share link
145
+ if [ -n "$SHARE_LINK" ]; then
146
+ echo ""
147
+ echo "🌐 Opening recording in browser..."
148
+ echo "Link: $SHARE_LINK"
149
+ open "$SHARE_LINK"
150
+ fi
151
+
135
152
  echo ""
136
153
  echo "╔════════════════════════════════════════════════════════════════╗"
137
154
  echo "║ SYNC VERIFICATION GUIDE ║"