@dboio/cli 0.9.5 → 0.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dboio/cli",
3
- "version": "0.9.5",
3
+ "version": "0.9.6",
4
4
  "description": "CLI for the DBO.io framework",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2534,10 +2534,11 @@ async function processRecord(entityName, record, structure, options, usedNames,
2534
2534
  }
2535
2535
 
2536
2536
  // If the extension picker chose an extension (record.Extension was null),
2537
- // set it in metadata only — not in the record so the baseline preserves
2538
- // the server's null and push detects the change.
2537
+ // set it in both metadata and the record (baseline). This prevents delta
2538
+ // detection from flagging these as changed immediately after clone.
2539
2539
  if (ext && !record.Extension) {
2540
2540
  meta.Extension = ext;
2541
+ record.Extension = ext;
2541
2542
  }
2542
2543
 
2543
2544
  await writeFile(metaPath, JSON.stringify(meta, null, 2) + '\n');
package/src/lib/delta.js CHANGED
@@ -183,13 +183,17 @@ function isReference(value) {
183
183
 
184
184
  /**
185
185
  * Resolve a @reference path to absolute file path.
186
+ * @/ prefix means relative to project root (cwd), plain @ is relative to baseDir.
186
187
  *
187
- * @param {string} reference - Reference string starting with @ (e.g., "@file.html")
188
+ * @param {string} reference - Reference string starting with @ (e.g., "@file.html" or "@/docs/file.md")
188
189
  * @param {string} baseDir - Base directory containing metadata
189
190
  * @returns {string} - Absolute file path
190
191
  */
191
192
  function resolveReferencePath(reference, baseDir) {
192
193
  const refPath = reference.substring(1); // Strip leading @
194
+ if (refPath.startsWith('/')) {
195
+ return join(process.cwd(), refPath);
196
+ }
193
197
  return join(baseDir, refPath);
194
198
  }
195
199