prisma-dl
v0.1.1
Published
prisma binary downloader
Downloads
2
Readme
Prisma Binary Downloader [WIP]
NO more automatic downloads of huge binaries. (examples)
Usage
Make sure wget and gzip are installed.
Overrides/Resolutions
for cheating the postinstall in prisma, we need to override @prisma/engines
package to prisma-dl
via package manager like pnpm or yarn.
{
"pnpm": {
"overrides": {
"@prisma/engines": "npm:prisma-dl@latest"
}
}
}
{
"resolutions": {
"@prisma/engines": "https//registry.npmjs.org/prisma-dl/-/prisma-dl-__LATEST_VERSION__.tgz"
}
}
Installation
[package manager] add -D prisma-dl prisma
[package manager] add @prisma/client
Download binaries
With this package installed, we will need to download the appropriate binary manually:
$ pnpm prisma-dl --engine query
$ pnpm prisma-dl --engine fmt
Usage
$ prisma-dl [options]
Options
-h, --help Display this help message
--engine Engine type
<query|fmt|migration|introspection>
Defaults to query
--platform Engine Platform
<native|darwin|linux-musl|windows|...>
Defaults to native
--project Project Root
Defaults to current directory
--print Print fetch options without downloading binary
--out Output dir
Defaults to [project root]/binaries
Requirements
pnpm
oryarn
- Node >= 14.16.0 :P
TODO
- [ ] libquery-engine
- [ ] Find a way to skip the
node_modules/prisma/engiens/[hash]/query-engine-darwin
copy - [ ] Tests
License
MIT (not sure, correct me)