Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependency resolution #5

Open
Jean-Baptiste-Lasselle opened this issue Nov 29, 2024 · 0 comments
Open

dependency resolution #5

Jean-Baptiste-Lasselle opened this issue Nov 29, 2024 · 0 comments

Comments

@Jean-Baptiste-Lasselle
Copy link
Contributor

Jean-Baptiste-Lasselle commented Nov 29, 2024

To finalize zod-reify, I will have to try dans resolve the case of a zod schema declared with dependenciesdecalred in multile files:

  • So i will have to get all Source files of the current typescript project, e.g. in an astro project.
  • i will be able to do that with the ts-morph/TypeScript Compiler API, by using the tsconfig.json of the project

Now something else:

  • Ok about zod for all typescript based projects: this zod thing will out of the box solve the issue
  • Now what mechanisms will i use to do the same kind of work, but for a hugo project for example: how do i store the types? as typescript interfaces, that can be turned into golang code ? what are content types in a hugo project ? They are implicit, they are not explicitly defined in source code...
  • the content type therefore, should be infered from a markdown frontmatter, eg with a yaml to json, json to jsonschema...
  • With some CMS frameworks, the content type are explicitly declared in the website source code (like with astro), and with other CMS frameworks, well the content types are infered from markdown files

What'sfro sure around there, is the fact that the common plaec for all of the CMS supported by Pesto, should be that the content is all markdown based, and we need a markdown ORM: now how can the markdown ORM be used / useful, if there is no explicit content type declaration in source code of the project?
The ORM will be used for sure by pesto, no matter the CMS framework, to be ableto CRUD strongly typed content:
and for the CMS frameworks who explcitly declare the content types within the source code of the website, well then Pesto will also have to use the Compiler API of the language, like with Typescript based CMS' like astro.

  • zod-reify allows Pesto to actually CRUD the content and content types of a project, by reading/writing source code of an astro project, both in markdown and typecript
  • zod-reify will also allow Pesto to strongly type and do typechecking with CMS framework which don't explicitly type their (markdown) content, like hugo.
  • what would be the same thing as zod-reify, but for golang ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant