@devicecloud.dev/dcd 4.4.2 → 4.4.3

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/methods.js CHANGED
@@ -495,33 +495,27 @@ async function performUpload(config) {
495
495
  finalPath,
496
496
  });
497
497
  let lastError = backblazeResult.error;
498
- // Only upload to Supabase if Backblaze failed
498
+ // Always upload to Supabase (re-enabled as always-on alongside Backblaze)
499
499
  let supabaseResult = { error: null, success: false };
500
- if (!backblazeResult.success) {
501
- if (debug) {
502
- console.log('[DEBUG] Backblaze upload failed, falling back to Supabase...');
503
- }
504
- supabaseResult = await uploadToSupabase(env, tempPath, file, debug);
505
- if (!supabaseResult.success && supabaseResult.error) {
506
- lastError = supabaseResult.error;
507
- }
500
+ if (debug) {
501
+ console.log('[DEBUG] Uploading to Supabase...');
508
502
  }
509
- else if (debug) {
510
- console.log('[DEBUG] Backblaze upload succeeded, skipping Supabase upload');
503
+ supabaseResult = await uploadToSupabase(env, tempPath, file, debug);
504
+ if (!supabaseResult.success && supabaseResult.error) {
505
+ lastError = supabaseResult.error;
511
506
  }
512
507
  // Validate results
513
508
  validateUploadResults(supabaseResult.success, backblazeResult.success, lastError, b2, debug);
514
509
  // Log upload summary
515
510
  if (debug) {
516
- const hasWarning = supabaseResult.success && !backblazeResult.success;
517
- console.log(`[DEBUG] Upload summary - Backblaze: ${backblazeResult.success ? '✓' : '✗'}, Supabase: ${supabaseResult.success ? '✓' : '✗ (fallback ' + (backblazeResult.success ? 'not needed' : 'attempted') + ')'}`);
511
+ console.log(`[DEBUG] Upload summary - Backblaze: ${backblazeResult.success ? '✓' : '✗'}, Supabase: ${supabaseResult.success ? '✓' : '✗'}`);
518
512
  console.log('[DEBUG] Finalizing upload...');
519
513
  console.log(`[DEBUG] Target endpoint: ${apiUrl}/uploads/finaliseUpload`);
520
514
  console.log(`[DEBUG] Uploaded to staging path: ${tempPath}`);
521
515
  console.log(`[DEBUG] API will move to final path: ${finalPath}`);
522
516
  console.log(`[DEBUG] Backblaze upload status: ${backblazeResult.success ? 'SUCCESS' : 'FAILED'}`);
523
- console.log(`[DEBUG] Supabase upload status: ${supabaseResult.success ? 'SUCCESS (fallback)' : backblazeResult.success ? 'SKIPPED' : 'FAILED'}`);
524
- if (hasWarning)
517
+ console.log(`[DEBUG] Supabase upload status: ${supabaseResult.success ? 'SUCCESS' : 'FAILED'}`);
518
+ if (!backblazeResult.success && supabaseResult.success)
525
519
  console.log('[DEBUG] ⚠ Warning: File only exists in Supabase (Backblaze failed)');
526
520
  }
527
521
  // Finalize upload
@@ -880,5 +880,5 @@
880
880
  ]
881
881
  }
882
882
  },
883
- "version": "4.4.2"
883
+ "version": "4.4.3"
884
884
  }
package/package.json CHANGED
@@ -69,7 +69,7 @@
69
69
  "type": "git",
70
70
  "url": "https://devicecloud.dev"
71
71
  },
72
- "version": "4.4.2",
72
+ "version": "4.4.3",
73
73
  "bugs": {
74
74
  "url": "https://discord.gg/gm3mJwcNw8"
75
75
  },