@senso-ai/cli 0.6.0 → 0.6.1
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/cli.js +14 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -847,10 +847,16 @@ function registerIngestCommands(program2) {
|
|
|
847
847
|
for (const item of items) {
|
|
848
848
|
if (item.status === "upload_pending" && item.upload_url) {
|
|
849
849
|
const match = fileData.find((f) => f.meta.filename === item.filename);
|
|
850
|
-
if (match) {
|
|
850
|
+
if (!match) {
|
|
851
|
+
error(`Could not match server filename "${item.filename}" to a local file \u2014 skipping upload.`);
|
|
852
|
+
continue;
|
|
853
|
+
}
|
|
854
|
+
try {
|
|
851
855
|
await uploadToS3(item.upload_url, match.buffer, match.meta.content_type);
|
|
852
856
|
uploaded++;
|
|
853
857
|
success(`Uploaded ${item.filename} (content_id: ${item.content_id})`);
|
|
858
|
+
} catch (uploadErr) {
|
|
859
|
+
error(`S3 upload failed for ${item.filename}: ${uploadErr instanceof Error ? uploadErr.message : String(uploadErr)}`);
|
|
854
860
|
}
|
|
855
861
|
} else {
|
|
856
862
|
warn(`Skipped ${item.filename}: ${item.status}${item.message ? ` \u2014 ${item.message}` : ""}`);
|
|
@@ -1831,10 +1837,16 @@ function registerKBCommands(program2) {
|
|
|
1831
1837
|
for (const item of items) {
|
|
1832
1838
|
if (item.status === "upload_pending" && item.upload_url) {
|
|
1833
1839
|
const match = fileData.find((f) => f.meta.filename === item.filename);
|
|
1834
|
-
if (match) {
|
|
1840
|
+
if (!match) {
|
|
1841
|
+
error(`Could not match server filename "${item.filename}" to a local file \u2014 skipping upload.`);
|
|
1842
|
+
continue;
|
|
1843
|
+
}
|
|
1844
|
+
try {
|
|
1835
1845
|
await uploadToS32(item.upload_url, match.buffer, match.meta.content_type);
|
|
1836
1846
|
uploaded++;
|
|
1837
1847
|
success(`Uploaded ${item.filename} (content_id: ${item.content_id})`);
|
|
1848
|
+
} catch (uploadErr) {
|
|
1849
|
+
error(`S3 upload failed for ${item.filename}: ${uploadErr instanceof Error ? uploadErr.message : String(uploadErr)}`);
|
|
1838
1850
|
}
|
|
1839
1851
|
} else {
|
|
1840
1852
|
warn(`Skipped ${item.filename}: ${item.status}${item.message ? ` \u2014 ${item.message}` : ""}`);
|