Coder Social home page Coder Social logo

sikarii / edgedb-zod Goto Github PK

View Code? Open in Web Editor NEW
18.0 2.0 3.0 71 KB

Creates Zod schemas for your EdgeDB types

Home Page: https://npmjs.com/package/edgedb-zod

License: MIT License

TypeScript 94.09% JavaScript 5.91%
edgedb generator schemas typescript zod javascript

edgedb-zod's People

Contributors

sikarii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

edgedb-zod's Issues

Some ideas

Just some miscellaneous ideas!

  • Perhaps call the two schemas something like Read and Write. The "Create" and "Update" aren't quite right since computed properties can't be included in an insert call.
  • I'd include the EdgeDB SDL in the README as well so users can see directly see the correspondence between the EdgeDB and Zod types.
  • Why not make datetime correspond to Date? That's what the client library would expect. I'd also recommend using z.instance(edgedb.LocalDate) , z.instance(edgedb.LocalTime), etc for the various datatypes that correspond to custom classes. (The generated file can just have import * as edgedb from "edgedb" at the top.)

Docs

  • Perhaps explain the rational behind why links are excluded
  • Include installation instructions
  • "To run the CLI: edgedb-zod [options]" β€”Β this should probably be npx edgedb-zod
  • I recommend switching to red and green dots (πŸ”΄πŸŸ’) to make the comparison table a little more uniform. And expand "Most scalars" so there's more green dots :)
  • Maybe choose a simpler regex so the generated code is a bit less scary?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.