@magentrix-corp/magentrix-cli 1.3.7 → 1.3.8

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.
@@ -398,28 +398,9 @@ async function buildFromVueProject(options) {
398
398
  console.log(chalk.green('\u2713 Build output validated'));
399
399
  }
400
400
 
401
- // Stage to selected workspace
401
+ // Check if workspace might be out of sync and offer to pull first (BEFORE staging)
402
+ // This ensures pull doesn't overwrite our staged files
402
403
  console.log();
403
- console.log(chalk.blue(`Staging to workspace: ${workspacePath}`));
404
-
405
- const stageResult = stageToWorkspace(distPath, slug, workspacePath);
406
-
407
- if (!stageResult.success) {
408
- console.log(chalk.red(`Failed to stage: ${stageResult.error}`));
409
- return;
410
- }
411
-
412
- console.log(chalk.green(`\u2713 Staged ${stageResult.fileCount} files to ${stageResult.stagedPath}`));
413
-
414
- // Summary
415
- console.log();
416
- console.log(chalk.green('─'.repeat(48)));
417
- console.log(chalk.green.bold('\u2713 Build & Stage Complete!'));
418
- console.log();
419
- console.log(chalk.gray(`Staged to: ${stageResult.stagedPath}`));
420
- console.log();
421
-
422
- // Check if workspace might be out of sync and offer to pull first
423
404
  console.log(chalk.gray('Checking workspace sync status...'));
424
405
  const syncStatus = await checkWorkspaceSyncStatus(workspacePath);
425
406
 
@@ -444,7 +425,7 @@ async function buildFromVueProject(options) {
444
425
  console.log(chalk.yellow('Pull encountered issues. You may want to resolve them manually.'));
445
426
 
446
427
  const continueAnyway = await confirm({
447
- message: 'Do you still want to continue with publishing?',
428
+ message: 'Do you still want to continue with staging and publishing?',
448
429
  default: false
449
430
  });
450
431
 
@@ -453,7 +434,8 @@ async function buildFromVueProject(options) {
453
434
  console.log(chalk.cyan('To continue manually:'));
454
435
  console.log(chalk.white(` 1. Navigate to workspace: ${chalk.yellow(`cd "${workspacePath}"`)}`));
455
436
  console.log(chalk.white(` 2. Run ${chalk.yellow('magentrix pull')} to resolve conflicts`));
456
- console.log(chalk.white(` 3. Run ${chalk.yellow('magentrix publish')} to deploy`));
437
+ console.log(chalk.white(` 3. Run ${chalk.yellow('magentrix vue-build-stage --skip-build')} to stage`));
438
+ console.log(chalk.white(` 4. Run ${chalk.yellow('magentrix publish')} to deploy`));
457
439
  return;
458
440
  }
459
441
  }
@@ -474,6 +456,27 @@ async function buildFromVueProject(options) {
474
456
  console.log(chalk.green('✓ Workspace is in sync'));
475
457
  }
476
458
 
459
+ // Stage to selected workspace (AFTER pull to avoid overwriting)
460
+ console.log();
461
+ console.log(chalk.blue(`Staging to workspace: ${workspacePath}`));
462
+
463
+ const stageResult = stageToWorkspace(distPath, slug, workspacePath);
464
+
465
+ if (!stageResult.success) {
466
+ console.log(chalk.red(`Failed to stage: ${stageResult.error}`));
467
+ return;
468
+ }
469
+
470
+ console.log(chalk.green(`\u2713 Staged ${stageResult.fileCount} files to ${stageResult.stagedPath}`));
471
+
472
+ // Summary
473
+ console.log();
474
+ console.log(chalk.green('─'.repeat(48)));
475
+ console.log(chalk.green.bold('\u2713 Build & Stage Complete!'));
476
+ console.log();
477
+ console.log(chalk.gray(`Staged to: ${stageResult.stagedPath}`));
478
+ console.log();
479
+
477
480
  // Ask if they want to publish now
478
481
  const shouldPublish = await confirm({
479
482
  message: 'Do you want to publish to Magentrix now?',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magentrix-corp/magentrix-cli",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "description": "CLI tool for synchronizing local files with Magentrix cloud platform",
5
5
  "main": "index.js",
6
6
  "type": "module",