mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 21:05:28 +00:00
* introduce typescript files generation using ast + tmpl * feat valid ts with scraping * feat remove old logic + tsdocs for all modules * fix ikev and related bugs * typescript docs for js modules * lint,build + ldap realm fix * go mod tidy * fix named imports ast parsing * fix ast code generation errors * complete support for ts files generation * support go global/const in ts docs * updated template * feat: typescript using go code generation * nuke jsdoc generator * update generated ts dir structure * fix multifile ts gen issue * fix panic in ts code gen * fix test * update docs of js libs * feat: add doc+example for every js class,function,method * fix missing quotes in ikev example --------- Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
33 lines
736 B
Go
33 lines
736 B
Go
package mysql
|
|
|
|
import (
|
|
lib_mysql "github.com/projectdiscovery/nuclei/v3/pkg/js/libs/mysql"
|
|
|
|
"github.com/dop251/goja"
|
|
"github.com/projectdiscovery/nuclei/v3/pkg/js/gojs"
|
|
)
|
|
|
|
var (
|
|
module = gojs.NewGojaModule("nuclei/mysql")
|
|
)
|
|
|
|
func init() {
|
|
module.Set(
|
|
gojs.Objects{
|
|
// Functions
|
|
"BuildDSN": lib_mysql.BuildDSN,
|
|
|
|
// Var and consts
|
|
|
|
// Objects / Classes
|
|
"MySQLClient": gojs.GetClassConstructor[lib_mysql.MySQLClient](&lib_mysql.MySQLClient{}),
|
|
"MySQLInfo": gojs.GetClassConstructor[lib_mysql.MySQLInfo](&lib_mysql.MySQLInfo{}),
|
|
"MySQLOptions": gojs.GetClassConstructor[lib_mysql.MySQLOptions](&lib_mysql.MySQLOptions{}),
|
|
},
|
|
).Register()
|
|
}
|
|
|
|
func Enable(runtime *goja.Runtime) {
|
|
module.Enable(runtime)
|
|
}
|