@dboio/cli 0.15.3 → 0.17.0
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/README.md +165 -76
- package/bin/dbo.js +2 -2
- package/package.json +1 -1
- package/plugins/claude/dbo/docs/dbo-cli-readme.md +165 -76
- package/src/commands/adopt.js +534 -0
- package/src/commands/clone.js +365 -143
- package/src/commands/init.js +42 -1
- package/src/commands/input.js +2 -32
- package/src/commands/mv.js +3 -3
- package/src/commands/push.js +13 -9
- package/src/commands/rm.js +2 -2
- package/src/lib/columns.js +1 -0
- package/src/lib/config.js +83 -1
- package/src/lib/delta.js +3 -2
- package/src/lib/dependencies.js +217 -2
- package/src/lib/diff.js +9 -11
- package/src/lib/filenames.js +3 -3
- package/src/lib/ignore.js +1 -0
- package/src/{commands/add.js → lib/insert.js} +133 -478
- package/src/lib/logger.js +35 -0
- package/src/lib/metadata-schema.js +492 -0
- package/src/lib/save-to-disk.js +1 -1
- package/src/lib/schema.js +53 -0
- package/src/lib/structure.js +3 -3
- package/src/lib/tagging.js +1 -1
- package/src/lib/toe-stepping.js +2 -2
- package/src/migrations/007-natural-entity-companion-filenames.js +5 -2
- package/src/migrations/011-schema-driven-metadata.js +120 -0
package/src/lib/filenames.js
CHANGED
|
@@ -213,7 +213,7 @@ export async function findMetadataForCompanion(companionPath) {
|
|
|
213
213
|
const metaPath = join(dir, entry);
|
|
214
214
|
try {
|
|
215
215
|
const meta = JSON.parse(await readFile(metaPath, 'utf8'));
|
|
216
|
-
const cols = [...(meta._contentColumns || [])];
|
|
216
|
+
const cols = [...(meta._companionReferenceColumns || meta._contentColumns || [])];
|
|
217
217
|
if (meta._mediaFile) cols.push('_mediaFile');
|
|
218
218
|
for (const col of cols) {
|
|
219
219
|
const ref = meta[col];
|
|
@@ -251,7 +251,7 @@ export async function renameToUidConvention(meta, metaPath, uid, lastUpdated, se
|
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
// Determine naturalBase from the temp/old metadata filename
|
|
254
|
-
// Temp format from
|
|
254
|
+
// Temp format from adopt.js: "colors.metadata.json" → naturalBase = "colors"
|
|
255
255
|
// Old tilde format: "colors~uid.metadata.json" → naturalBase = "colors"
|
|
256
256
|
let naturalBase;
|
|
257
257
|
const legacyParsed = detectLegacyTildeMetadata(metaFilename);
|
|
@@ -280,7 +280,7 @@ export async function renameToUidConvention(meta, metaPath, uid, lastUpdated, se
|
|
|
280
280
|
if (serverTz && lastUpdated) {
|
|
281
281
|
const { setFileTimestamps } = await import('./timestamps.js');
|
|
282
282
|
try { await setFileTimestamps(newMetaPath, lastUpdated, lastUpdated, serverTz); } catch {}
|
|
283
|
-
const contentCols = [...(meta._contentColumns || [])];
|
|
283
|
+
const contentCols = [...(meta._companionReferenceColumns || meta._contentColumns || [])];
|
|
284
284
|
if (meta._mediaFile) contentCols.push('_mediaFile');
|
|
285
285
|
for (const col of contentCols) {
|
|
286
286
|
const ref = updatedMeta[col];
|