prisma-erd-generator
Advanced tools
Comparing version 0.8.1-1 to 0.9.0-0
@@ -148,2 +148,6 @@ "use strict"; | ||
var _a, _b, _c, _d; | ||
if (process.env.SKIP_ERD === 'true') { | ||
console.log('Skipping ERD generation'); | ||
return; | ||
} | ||
try { | ||
@@ -172,3 +176,3 @@ const output = ((_a = options.generator.output) === null || _a === void 0 ? void 0 : _a.value) || './prisma/ERD.svg'; | ||
const tempConfigFile = path.resolve(path.join(tmpDir, 'config.json')); | ||
fs_1.default.writeFileSync(tempConfigFile, JSON.stringify({ deterministicIds: true, maxTextSize: 90000 })); | ||
fs_1.default.writeFileSync(tempConfigFile, JSON.stringify({ deterministicIds: true })); | ||
let mermaidCliNodePath = path.resolve(path.join('node_modules', '.bin', 'mmdc')); | ||
@@ -175,0 +179,0 @@ if (!fs_1.default.existsSync(mermaidCliNodePath)) { |
{ | ||
"version": "0.8.1-1", | ||
"version": "0.9.0-0", | ||
"license": "MIT", | ||
@@ -9,3 +9,4 @@ "main": "./dist/index.js", | ||
"src", | ||
"tsconfig.json" | ||
"tsconfig.json", | ||
"config.json" | ||
], | ||
@@ -12,0 +13,0 @@ "engines": { |
@@ -79,2 +79,10 @@ # Prisma Entity Relationship Diagram Generator | ||
### Skip Generate | ||
Scenarios arise where you don't want to generate a new ER Diagram and you can bypass this generator for those environments with an environment variable `SKIP_ERD` | ||
```bash | ||
SKIP_ERD=true | ||
``` | ||
## Contributors ✨ | ||
@@ -81,0 +89,0 @@ |
@@ -202,2 +202,6 @@ import { GeneratorOptions } from '@prisma/generator-helper'; | ||
export default async (options: GeneratorOptions) => { | ||
if (process.env.SKIP_ERD === 'true') { | ||
console.log('Skipping ERD generation'); | ||
return; | ||
} | ||
try { | ||
@@ -248,3 +252,3 @@ const output = options.generator.output?.value || './prisma/ERD.svg'; | ||
tempConfigFile, | ||
JSON.stringify({ deterministicIds: true, maxTextSize: 90000 }) | ||
JSON.stringify({ deterministicIds: true }) | ||
); | ||
@@ -251,0 +255,0 @@ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
27976
499
111
2