@dboio/cli 0.9.4 → 0.9.5
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/package.json +1 -1
- package/src/commands/mv.js +1 -1
- package/src/commands/push.js +9 -2
package/package.json
CHANGED
package/src/commands/mv.js
CHANGED
|
@@ -591,7 +591,7 @@ async function mvFile(sourceFile, targetBinId, structure, options) {
|
|
|
591
591
|
: null;
|
|
592
592
|
|
|
593
593
|
// 1. Update metadata
|
|
594
|
-
const metaUpdates = { BinID: targetBinId };
|
|
594
|
+
const metaUpdates = { BinID: targetBinId, _pathConfirmed: undefined };
|
|
595
595
|
if (newRelativePath) metaUpdates.Path = newRelativePath;
|
|
596
596
|
|
|
597
597
|
// Update content column references if file was renamed
|
package/src/commands/push.js
CHANGED
|
@@ -765,6 +765,10 @@ async function checkPathMismatch(meta, metaPath, entity, options) {
|
|
|
765
765
|
|
|
766
766
|
if (storedNormalized === currentNormalized) return;
|
|
767
767
|
|
|
768
|
+
// If user previously confirmed the metadata Path, skip the prompt.
|
|
769
|
+
// This flag is cleared by `dbo mv` when the file is moved.
|
|
770
|
+
if (meta._pathConfirmed) return;
|
|
771
|
+
|
|
768
772
|
// Use normalized path for display
|
|
769
773
|
const currentPath = normalizedCurrentPath;
|
|
770
774
|
|
|
@@ -787,9 +791,12 @@ async function checkPathMismatch(meta, metaPath, entity, options) {
|
|
|
787
791
|
|
|
788
792
|
if (updatePath) {
|
|
789
793
|
meta.Path = currentPath;
|
|
790
|
-
|
|
791
|
-
await writeFile(join(dirname(metaPath), basename(metaPath)), JSON.stringify(meta, null, 2) + '\n');
|
|
794
|
+
await writeFile(metaPath, JSON.stringify(meta, null, 2) + '\n');
|
|
792
795
|
log.success(` Path updated to "${currentPath}"`);
|
|
796
|
+
} else {
|
|
797
|
+
// Remember the decision — don't prompt again until `dbo mv` moves the file
|
|
798
|
+
meta._pathConfirmed = true;
|
|
799
|
+
await writeFile(metaPath, JSON.stringify(meta, null, 2) + '\n');
|
|
793
800
|
}
|
|
794
801
|
}
|
|
795
802
|
|