mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-07-09 22:41:55 +08:00
feat: refactor database dialect handling and add stubs for unsupported features
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
//go:build !no_jsparser
|
||||
|
||||
package js
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
//go:build !no_jsparser && !no_playwright
|
||||
|
||||
package js
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build no_playwright
|
||||
//go:build no_playwright && !no_jsparser
|
||||
|
||||
package js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
//go:build !no_jsparser
|
||||
|
||||
package js
|
||||
|
||||
import (
|
||||
|
||||
16
parsers/js/js_stub.go
Normal file
16
parsers/js/js_stub.go
Normal file
@@ -0,0 +1,16 @@
|
||||
//go:build no_jsparser
|
||||
|
||||
package js
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
)
|
||||
|
||||
func LoadPlugins(ctx context.Context, dir string) error {
|
||||
return errors.New("JS parser plugins are not supported in this build")
|
||||
}
|
||||
|
||||
func AddPlugin(ctx context.Context, code string, name string) error {
|
||||
return errors.New("JS parser plugins are not supported in this build")
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
//go:build !no_jsparser
|
||||
|
||||
package js
|
||||
|
||||
import "github.com/blang/semver"
|
||||
|
||||
Reference in New Issue
Block a user