dashcam 1.3.1-beta → 1.3.2-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/bin/dashcam.js +3 -23
- package/package.json +1 -1
package/bin/dashcam.js
CHANGED
|
@@ -99,16 +99,6 @@ async function recordingAction(options, command) {
|
|
|
99
99
|
process.exit(1);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
// Check for piped input (description from stdin) if description option not set
|
|
103
|
-
let description = options.description;
|
|
104
|
-
if (!description && !process.stdin.isTTY) {
|
|
105
|
-
const chunks = [];
|
|
106
|
-
for await (const chunk of process.stdin) {
|
|
107
|
-
chunks.push(chunk);
|
|
108
|
-
}
|
|
109
|
-
description = Buffer.concat(chunks).toString('utf-8');
|
|
110
|
-
}
|
|
111
|
-
|
|
112
102
|
// Check screen recording permissions (macOS only)
|
|
113
103
|
const { ensurePermissions } = await import('../lib/permissions.js');
|
|
114
104
|
const hasPermissions = await ensurePermissions();
|
|
@@ -126,7 +116,7 @@ async function recordingAction(options, command) {
|
|
|
126
116
|
audio: options.audio,
|
|
127
117
|
output: options.output,
|
|
128
118
|
title: options.title,
|
|
129
|
-
description: description,
|
|
119
|
+
description: options.description,
|
|
130
120
|
project: options.project || options.k // Support both -p and -k for project
|
|
131
121
|
});
|
|
132
122
|
|
|
@@ -153,21 +143,11 @@ program
|
|
|
153
143
|
.command('create')
|
|
154
144
|
.description('Create a clip and output the resulting url or markdown. Will launch desktop app for local editing before publishing.')
|
|
155
145
|
.option('-t, --title <string>', 'Title of the replay. Automatically generated if not supplied.')
|
|
156
|
-
.option('-d, --description [text]', 'Replay markdown body
|
|
146
|
+
.option('-d, --description [text]', 'Replay markdown body')
|
|
157
147
|
.option('--md', 'Returns code for a rich markdown image link.')
|
|
158
148
|
.option('-k, --project <project>', 'Project ID to publish to')
|
|
159
149
|
.action(async (options) => {
|
|
160
150
|
try {
|
|
161
|
-
// Check for piped input (description from stdin)
|
|
162
|
-
let description = options.description;
|
|
163
|
-
if (!description && !process.stdin.isTTY) {
|
|
164
|
-
const chunks = [];
|
|
165
|
-
for await (const chunk of process.stdin) {
|
|
166
|
-
chunks.push(chunk);
|
|
167
|
-
}
|
|
168
|
-
description = Buffer.concat(chunks).toString('utf-8');
|
|
169
|
-
}
|
|
170
|
-
|
|
171
151
|
if (!processManager.isRecordingActive()) {
|
|
172
152
|
console.log('No active recording to create clip from');
|
|
173
153
|
console.log('Start a recording first with "dashcam record" or "dashcam start"');
|
|
@@ -192,7 +172,7 @@ program
|
|
|
192
172
|
try {
|
|
193
173
|
const uploadResult = await upload(result.outputPath, {
|
|
194
174
|
title: options.title || activeStatus?.options?.title || 'Dashcam Recording',
|
|
195
|
-
description: description || activeStatus?.options?.description,
|
|
175
|
+
description: options.description || activeStatus?.options?.description,
|
|
196
176
|
project: options.project || options.k || activeStatus?.options?.project,
|
|
197
177
|
duration: result.duration,
|
|
198
178
|
clientStartDate: result.clientStartDate,
|