mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 15:25:59 +00:00
convert dbmodel to json
This commit is contained in:
9
packages/api/src/shell/jsonToDbModel.js
Normal file
9
packages/api/src/shell/jsonToDbModel.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const exportDbModel = require('../utility/exportDbModel');
|
||||
const fs = require('fs');
|
||||
|
||||
async function jsonToDbModel({ modelFile, outputDir }) {
|
||||
const dbInfo = JSON.parse(fs.readFileSync(modelFile, 'utf-8'));
|
||||
await exportDbModel(dbInfo, outputDir);
|
||||
}
|
||||
|
||||
module.exports = jsonToDbModel;
|
||||
Reference in New Issue
Block a user