quilltap 4.15.0-dev.2 → 4.16.0-dev.7

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.
@@ -34,6 +34,7 @@ const {
34
34
  loadDbKey,
35
35
  openMountIndexDb,
36
36
  UUID_RE,
37
+ findMountByFormerName,
37
38
  } = require('./db-helpers');
38
39
  const { isQtapUri, parseQtapUri } = require('./qtap-uri');
39
40
  const { formatActionLines, formatSummary, exitCodeFor } = require('./sync-report');
@@ -178,6 +179,12 @@ function requireMount(db, spec) {
178
179
  `SELECT * FROM doc_mount_points WHERE LOWER(name) = LOWER(?) ORDER BY name COLLATE NOCASE`
179
180
  ).all(spec);
180
181
  if (rows.length === 0) {
182
+ // No store holds the name now; one may have carried it before a rename.
183
+ const renamed = findMountByFormerName(db, spec);
184
+ if (renamed) {
185
+ console.error(`Note: "${spec}" is a former name of "${renamed.name}".`);
186
+ return renamed;
187
+ }
181
188
  console.error(`No document store found with name "${spec}"`);
182
189
  process.exit(1);
183
190
  }