@xano/cli 1.0.3-beta.5 → 1.0.3-beta.6
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/utils/multidoc-push.js +20 -16
- package/oclif.manifest.json +1209 -1209
- package/package.json +1 -1
|
@@ -476,6 +476,7 @@ export async function executePush(ctx, target, flags) {
|
|
|
476
476
|
}
|
|
477
477
|
// Warn when the sandbox currently holds a different workspace than the one being
|
|
478
478
|
// pushed and the change set is large enough that stale state is a real risk.
|
|
479
|
+
let mismatchConfirmed = false;
|
|
479
480
|
if (target.warnOnWorkspaceMismatch && preview.workspace_name) {
|
|
480
481
|
const localWorkspaceName = findLocalWorkspaceName(documentEntries);
|
|
481
482
|
const totalChanges = countSummaryChanges(preview.summary, shouldDelete);
|
|
@@ -494,29 +495,32 @@ export async function executePush(ctx, target, flags) {
|
|
|
494
495
|
log('Push cancelled. Run `xano sandbox reset` then retry.');
|
|
495
496
|
return;
|
|
496
497
|
}
|
|
498
|
+
mismatchConfirmed = true;
|
|
497
499
|
}
|
|
498
500
|
else {
|
|
499
501
|
command.error('Workspace mismatch detected in non-interactive mode. Run `xano sandbox reset` first to start clean.');
|
|
500
502
|
}
|
|
501
503
|
}
|
|
502
504
|
}
|
|
503
|
-
// Confirm with user
|
|
504
|
-
|
|
505
|
-
op.action === '
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
505
|
+
// Confirm with user (skip if workspace mismatch prompt already obtained confirmation)
|
|
506
|
+
if (!mismatchConfirmed) {
|
|
507
|
+
const hasDestructive = preview.operations.some((op) => (shouldDelete && (op.action === 'delete' || op.action === 'cascade_delete')) ||
|
|
508
|
+
op.action === 'truncate' ||
|
|
509
|
+
op.action === 'drop_field' ||
|
|
510
|
+
op.action === 'alter_field');
|
|
511
|
+
const message = hasDestructive
|
|
512
|
+
? 'Proceed with push? This includes DESTRUCTIVE operations listed above.'
|
|
513
|
+
: 'Proceed with push?';
|
|
514
|
+
if (process.stdin.isTTY) {
|
|
515
|
+
const confirmed = await confirm(message);
|
|
516
|
+
if (!confirmed) {
|
|
517
|
+
log('Push cancelled.');
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
else {
|
|
522
|
+
command.error('Non-interactive environment detected. Use --force to skip confirmation.');
|
|
516
523
|
}
|
|
517
|
-
}
|
|
518
|
-
else {
|
|
519
|
-
command.error('Non-interactive environment detected. Use --force to skip confirmation.');
|
|
520
524
|
}
|
|
521
525
|
}
|
|
522
526
|
else {
|