
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@godigit/auto-generate
Advanced tools
- auto create table by config JSON file. - encrypt your database connection. - auto import SQL file.
*** This package can be only use with @godigit/master-data package.
Those are 3 key you need to write config JSON file:
{
"module_name": "customer",
"table": {
"tb_name": "customer",
"tb_fields": {
"customer_id": {
"type": "number",
"length": 11,
"auto_increment": true,
"require": true,
"is_primary": true,
"not_param": true
},
"customer_firstname": {
"type": "text",
"length": 360,
"require": true
},
"customer_lastname": {
"type": "text",
"length": 320,
"require": true
},
"created_date": {
"type": "datetime",
"length": 11,
"require": false,
"default": "current_timestamp",
"not_param": true
},
"created_by": {
"type": "text",
"length": 100,
"require": false
},
"updated_date": {
"type": "datetime",
"length": 11,
"require": false,
"default": "current_timestamp on update current_timestamp",
"not_param": true
},
"updated_by": {
"type": "text",
"length": 100,
"require": false
}
}
},
"route": "/customer"
}
const path = require("path");
const AutoGenerate = require('./src/auto-generate');
// db config
const db = {
host: "localhost",
user: "root",
password: "",
port: 3306,
database: "temp"
};
// Module Path
const moduleGeneratePath = path.join(__dirname, "module"); // folder path are consist config JSON files to generate.
const moduleGenerateConfigPath = path.join(__dirname, "config"); // folder path to export config sql statement to use with master-data package
// SQL path
const sqlFolderPath = path.join(__dirname, "sql"); // folder path are consist SQL file
// Postman path
const postmanPath = path.join(__dirname, "collection"); // folder path to export postman collection file
const pathConfig = {
moduleGeneratePath: moduleGeneratePath,
moduleGenerateConfigPath: moduleGenerateConfigPath,
sqlFolderPath: sqlFolderPath,
postmanPath: postmanPath
};
// encrypt db by cryptr: if isDatabaseEncrypt is True you need to put secretKey for encrypt db
const exportConnectionPath = path.join(__dirname, "config"); // path to export db connection
const option = {
isDatabaseEncrypt: true,
secretKey: "XXXXXX",
tokenSecretKey: "XXXXXX",
pathToExport: exportConnectionPath
};
// call auto generate function
const autoGenerate = new AutoGenerate(db, pathConfig, option);
autoGenerate.generate((err, res) => {
console.log(res);
process.exit();
});
FAQs
- auto create table by config JSON file. - encrypt your database connection. - auto import SQL file.
We found that @godigit/auto-generate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.