Skip to content

Conversation

@farnabaz
Copy link
Contributor

@farnabaz farnabaz commented Nov 10, 2025

resolves #54
resolves #57
resolves #60

Following the logic of #91

All document relation treatment have been moved from app to module part.

New host.document api:

  document: {
    db: {
      get: (fsPath: string) => Promise<DatabaseItem | undefined>
      list: () => Promise<DatabaseItem[]>
      upsert: (fsPath: string, document: DatabaseItem) => Promise<void>
      create: (fsPath: string, content: string) => Promise<DatabaseItem>
      delete: (fsPath: string) => Promise<void>
    }
    utils: {
      areEqual: (document1: DatabaseItem, document2: DatabaseItem) => boolean
      isMatchingContent: (content: string, document: DatabaseItem) => Promise<boolean>
      pickReservedKeys: (document: DatabaseItem) => DatabaseItem
      removeReservedKeys: (document: DatabaseItem) => DatabaseItem
      detectActives: () => Array<{ fsPath: string, title: string }>
    }
    generate: {
      documentFromContent: (id: string, content: string) => Promise<DatabaseItem | null>
      contentFromDocument: (document: DatabaseItem) => Promise<string | null>
    }
  }

@vercel
Copy link

vercel bot commented Nov 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
content-studio Ready Ready Preview Comment Nov 13, 2025 0:01am

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 10, 2025

npm i https://pkg.pr.new/nuxt-content/studio/nuxt-studio@88

commit: 92979d6

@farnabaz farnabaz changed the title chore: use mdc nightly fix(content): minor content issues Nov 11, 2025
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
@larbish larbish changed the title fix(content): minor content issues refactor(host): move content related utils in module + fix Nov 13, 2025
@larbish larbish merged commit 08a21c7 into main Nov 13, 2025
4 of 5 checks passed
@larbish larbish deleted the fix/content-parsing-improvement branch November 13, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants