Obfuscates a prisma schema so it can be shared without leaking information.
This does NOT cover all possible Prisma syntax cases. Please closely verify the output of this package to ensure your schema was entirely obfuscated. (If not, open a ticket.)
npm i prisma-schema-obfuscator
See the API docs: https://electrovir.github.io/prisma-schema-obfuscator
prisma-obf <input-file-path> <output-file-path>
: read the Prisma schema from <input-file-path>
and write its obfuscated text to <output-file-path>
.prisma-obf <input-file-path>
: read the Prisma schema from <input-file-path>
and write its obfuscated text directly to the console.To test obfuscation on a file, add the file to .not-committed/schema.prisma
and then run the cli.ts
file directly:
npx ts-node src/cli.ts ./.not-committed/schema.prisma ./.not-committed/schema-obfuscated.prisma
npm test
: run testsnpm run debug
: run tests with debugger attached (launch in Chrome)Generated using TypeDoc