@dboio/cli 0.11.3 → 0.11.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dboio/cli",
3
- "version": "0.11.3",
3
+ "version": "0.11.4",
4
4
  "description": "CLI for the DBO.io framework",
5
5
  "type": "module",
6
6
  "bin": {
package/src/lib/client.js CHANGED
@@ -124,15 +124,12 @@ export class DboClient {
124
124
  }
125
125
 
126
126
  /**
127
- * Clear the server-side cache so that subsequent GET requests return fresh data.
128
- * Called before comparison fetches (toe-stepping, diff) and after POST submissions.
127
+ * No-op placeholder. Server-side cache voiding (/?voidcache=true) has been
128
+ * disabled as it was causing server issues. Callers remain unchanged so the
129
+ * hook can be re-enabled later if needed.
129
130
  */
130
131
  async voidCache() {
131
- try {
132
- const baseUrl = await this.getBaseUrl();
133
- if (this.verbose) log.verbose(`VoidCache: ${baseUrl}/?voidcache=true`);
134
- await this.request('/?voidcache=true');
135
- } catch { /* best-effort — don't block on failure */ }
132
+ // intentionally empty
136
133
  }
137
134
 
138
135
  /**
@@ -14,6 +14,14 @@ import { log } from './logger.js';
14
14
  */
15
15
  const DIFF_ALLOW = new Set(['_LastUpdated', '_LastUpdatedUserID']);
16
16
 
17
+ /**
18
+ * Metadata-only columns that don't represent real user edits.
19
+ * When the server diff contains ONLY these columns, the conflict is
20
+ * considered a timestamp-only change and is silently resolved by accepting
21
+ * the server values without prompting the user.
22
+ */
23
+ const METADATA_ONLY_COLS = new Set(['_LastUpdated', '_LastUpdatedUserID', '_children']);
24
+
17
25
  /**
18
26
  * Fetch a single record from the server by entity name + row UID.
19
27
  *
@@ -348,12 +356,19 @@ export async function checkToeStepping(records, client, baseline, options, appSh
348
356
  if (isNaN(serverDate) || isNaN(baselineDate)) continue; // unparseable — skip
349
357
  if (serverDate <= baselineDate) continue; // server is same or older — no conflict
350
358
 
351
- hasConflicts = true;
352
-
353
359
  // Conflict detected: server changed since our baseline
354
360
  const metaDir = dirname(metaPath);
355
361
  const label = basename(metaPath, '.metadata.json');
356
362
  const diffColumns = await buildRecordDiff(serverEntry, baselineEntry, meta, metaDir);
363
+
364
+ // If the only server-side changes are metadata columns (_LastUpdated,
365
+ // _LastUpdatedUserID) with no real data edits, silently accept the
366
+ // server timestamps — no conflict to resolve.
367
+ const realChanges = diffColumns.filter(d => !METADATA_ONLY_COLS.has(d.col));
368
+ if (realChanges.length === 0) continue;
369
+
370
+ hasConflicts = true;
371
+
357
372
  const serverUser = serverEntry._LastUpdatedUserID || 'unknown';
358
373
 
359
374
  displayConflict(label, serverUser, serverTs, diffColumns);