mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-26 02:23:21 +03:00
994a58f0dc
* Improved Wasp AI CLI experience. * fix * Added CLI Usage, polished CLI commands. * Added choice of temperature. * Added styling. * Added more sophisticated, terminal-only styling. * fix * Updated Mage to use new Wasp CLI + added some messaging to CLI. * fix * Created wasp-ai/README, updated waspc/README. * Moved wasp-ai/ to mage/. * Final polishing (docs, readmes, messaging). * fix * Added tests for LogMsg. * Updated versions of test apps to 0.12. * fix * fix * Update mage/README.md * fix * fix |
||
---|---|---|
.. | ||
src | ||
test | ||
.gitignore | ||
eslintrc.cjs | ||
jest.config.js | ||
package-lock.json | ||
package.json | ||
README.md | ||
tsconfig.json |
This package contains useful tools for working with Prisma, especially PSL.
Setup
Run npm install
.
Usage
Run npm run build
to compile TS to JS. Do this after any changes to TS files, or if you have never run it before.
format
Run npm start format
and pass prisma schema source (so PSL) via stdin.
It can even be an incomplete schema -> e.g. just model declarations.
This will run prisma format
on it and return formatted schema (PSL) + any warnings/errors.
Note: prisma format
does not just format stuff, but even fix some simple mistakes like incomplete relations!
Response, on stdout, will be JSON of the following shape:
{
"formattedSchemaPsl": "<psl>",
"errors": "<all errors as one big string>" // undefined if no errors.
}