{"id":16349471,"url":"https://github.com/jednano/prisma2-sdl","last_synced_at":"2026-01-21T01:02:11.432Z","repository":{"id":35206501,"uuid":"215664725","full_name":"jednano/prisma2-sdl","owner":"jednano","description":"Parses a subset of the Prisma 2 schema definition language","archived":false,"fork":false,"pushed_at":"2023-01-04T12:29:29.000Z","size":420,"stargazers_count":3,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-03T11:45:05.032Z","etag":null,"topics":["ast","parser","pretty-print","prisma","prisma2","schema","sdl","typesc"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@jedmao/prisma2-sdl","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jednano.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":"contributing.md","funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-16T23:47:39.000Z","updated_at":"2021-06-07T03:27:34.000Z","dependencies_parsed_at":"2023-01-15T16:15:51.707Z","dependency_job_id":null,"html_url":"https://github.com/jednano/prisma2-sdl","commit_stats":null,"previous_names":["jedmao/prisma2-sdl"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jednano/prisma2-sdl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jednano%2Fprisma2-sdl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jednano%2Fprisma2-sdl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jednano%2Fprisma2-sdl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jednano%2Fprisma2-sdl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jednano","download_url":"https://codeload.github.com/jednano/prisma2-sdl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jednano%2Fprisma2-sdl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28620572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T23:49:58.628Z","status":"ssl_error","status_checked_at":"2026-01-20T23:47:29.996Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","parser","pretty-print","prisma","prisma2","schema","sdl","typesc"],"created_at":"2024-10-11T00:59:52.775Z","updated_at":"2026-01-21T01:02:11.412Z","avatar_url":"https://github.com/jednano.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @jedmao/prisma2-sdl\n\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n[![GitHub Actions](https://github.com/jedmao/prisma2-sdl/workflows/master/badge.svg)](https://github.com/jedmao/prisma2-sdl/actions)\n[![codecov](https://img.shields.io/codecov/c/gh/jedmao/prisma2-sdl?style=flat-square)](https://codecov.io/gh/jedmao/prisma2-sdl)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/xojs/xo)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n[![types: TypeScript](https://img.shields.io/npm/types/typescript?style=flat-square)](https://typescriptlang.org)\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- markdownlint-disable commands-show-output --\u003e\n\nParses a subset of the\n[Prisma2 Schema Language (PSL)](https://github.com/prisma/specs/tree/master/schema).\n\n## Installation\n\n```sh\nnpm install @jedmao/prisma2-sdl\n```\n\n## Usage\n\n```ts\nimport { parse, prettify } from '@jedmao/prisma2-sdl'\nimport { readFileSync } from 'fs'\n\nconst ast = parse(readFileSync('schema.prisma'))\nconsole.log(prettify(ast))\n```\n\n## Limitations\n\nThis library only parses a subset of the\n[Prisma2 Schema Language (PSL)](https://github.com/prisma/specs/tree/master/schema).\n\n```prisma\nmodel User {\n  id     Int     @id\n  name   String\n  email  String\n  age    Int?\n  posts  Post[]\n}\n\nmodel Post {\n  id       Int     @id\n  title    String\n  content  String\n  author   User\n}\n```\n\n## Scripts\n\nThe following [npm scripts](https://docs.npmjs.com/misc/scripts) are made\navailable to you in the project root. You can run each of them with\n`npm run \u003cscript-name\u003e`.\n\n### build\n\nRuns the [TypeScript][] compiler.\n\n### test\n\nRuns [AVA][] in\n[watch mode](https://github.com/avajs/ava/blob/master/docs/recipes/watch-mode.md),\nwhich attempts to run only on changed files.\n\n### cover\n\nRuns [AVA][] with\n[coverage](https://github.com/avajs/ava/blob/master/docs/recipes/code-coverage.md),\ndumping coverage results in `./coverage` and showing a text summary in the\nconsole output.\n\n### commit\n\nRuns [Commitizen](http://commitizen.github.io/cz-cli/) commit wizard, ensuring\nthat your commit messages conform to\n[Conventional Commits](https://www.conventionalcommits.org/).\n\n### Tips\n\nUse the [`git commit`](https://git-scm.com/docs/git-commit) command directly\nwith the\n[`-n`, `--no-verify` option](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--n)\nto bypasses the pre-commit and commit-msg hooks.\n\n[ava]: https://github.com/avajs/ava\n[typescript]: http://www.typescriptlang.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjednano%2Fprisma2-sdl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjednano%2Fprisma2-sdl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjednano%2Fprisma2-sdl/lists"}