mirror of
https://github.com/wavetermdev/wails.git
synced 2026-04-22 15:26:15 -07:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 43727fbec7 |
@@ -1,24 +0,0 @@
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
pull_request: {}
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
paths:
|
||||
- .github/workflows/semgrep.yml
|
||||
schedule:
|
||||
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
|
||||
- cron: 14 16 * * *
|
||||
name: Semgrep
|
||||
jobs:
|
||||
semgrep:
|
||||
name: semgrep/ci
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
|
||||
container:
|
||||
image: returntocorp/semgrep
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: semgrep ci
|
||||
Generated
+121
-194
File diff suppressed because it is too large
Load Diff
+2
-10
@@ -18,6 +18,7 @@ import (
|
||||
)
|
||||
|
||||
func buildApplication(f *flags.Build) error {
|
||||
|
||||
if f.NoColour {
|
||||
pterm.DisableColor()
|
||||
colour.ColourEnabled = false
|
||||
@@ -49,16 +50,6 @@ func buildApplication(f *flags.Build) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Set obfuscation from project file
|
||||
if projectOptions.Obfuscated {
|
||||
f.Obfuscated = projectOptions.Obfuscated
|
||||
}
|
||||
|
||||
// Set garble args from project file
|
||||
if projectOptions.GarbleArgs != "" {
|
||||
f.GarbleArgs = projectOptions.GarbleArgs
|
||||
}
|
||||
|
||||
// Create BuildOptions
|
||||
buildOptions := &build.Options{
|
||||
Logger: logger,
|
||||
@@ -264,4 +255,5 @@ func buildApplication(f *flags.Build) error {
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,16 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/wailsapp/wails/v2/cmd/wails/flags"
|
||||
"github.com/wailsapp/wails/v2/cmd/wails/internal/dev"
|
||||
"github.com/wailsapp/wails/v2/internal/colour"
|
||||
"github.com/wailsapp/wails/v2/pkg/clilogger"
|
||||
"os"
|
||||
)
|
||||
|
||||
func devApplication(f *flags.Dev) error {
|
||||
|
||||
if f.NoColour {
|
||||
pterm.DisableColor()
|
||||
colour.ColourEnabled = false
|
||||
@@ -34,4 +34,5 @@ func devApplication(f *flags.Dev) error {
|
||||
}
|
||||
|
||||
return dev.Application(f, logger)
|
||||
|
||||
}
|
||||
|
||||
@@ -128,8 +128,8 @@ func diagnoseEnvironment(f *flags.Doctor) error {
|
||||
// Output Dependencies Status
|
||||
var dependenciesMissing []string
|
||||
var externalPackages []*packagemanager.Dependency
|
||||
dependenciesAvailableRequired := 0
|
||||
dependenciesAvailableOptional := 0
|
||||
var dependenciesAvailableRequired = 0
|
||||
var dependenciesAvailableOptional = 0
|
||||
|
||||
dependenciesTableData := pterm.TableData{
|
||||
{"Dependency", "Package Name", "Status", "Version"},
|
||||
|
||||
@@ -47,6 +47,7 @@ func (*Dev) Default() *Dev {
|
||||
}
|
||||
|
||||
func (d *Dev) Process() error {
|
||||
|
||||
var err error
|
||||
err = d.loadAndMergeProjectConfig()
|
||||
if err != nil {
|
||||
@@ -112,6 +113,7 @@ func (d *Dev) loadAndMergeProjectConfig() error {
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
// GenerateBuildOptions creates a build.Options using the flags
|
||||
|
||||
@@ -14,6 +14,7 @@ type Init struct {
|
||||
}
|
||||
|
||||
func (i *Init) Default() *Init {
|
||||
|
||||
result := &Init{
|
||||
TemplateName: "vanilla",
|
||||
}
|
||||
|
||||
+10
-14
@@ -2,9 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/leaanthony/debme"
|
||||
"github.com/leaanthony/gosod"
|
||||
"github.com/pterm/pterm"
|
||||
@@ -17,9 +14,12 @@ import (
|
||||
"github.com/wailsapp/wails/v2/pkg/clilogger"
|
||||
"github.com/wailsapp/wails/v2/pkg/commands/bindings"
|
||||
"github.com/wailsapp/wails/v2/pkg/commands/buildtags"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func generateModule(f *flags.GenerateModule) error {
|
||||
|
||||
if f.NoColour {
|
||||
pterm.DisableColor()
|
||||
colour.ColourEnabled = false
|
||||
@@ -43,15 +43,10 @@ func generateModule(f *flags.GenerateModule) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if projectConfig.Bindings.TsGeneration.OutputType == "" {
|
||||
projectConfig.Bindings.TsGeneration.OutputType = "classes"
|
||||
}
|
||||
|
||||
_, err = bindings.GenerateBindings(bindings.Options{
|
||||
Tags: buildTags,
|
||||
TsPrefix: projectConfig.Bindings.TsGeneration.Prefix,
|
||||
TsSuffix: projectConfig.Bindings.TsGeneration.Suffix,
|
||||
TsOutputType: projectConfig.Bindings.TsGeneration.OutputType,
|
||||
Tags: buildTags,
|
||||
TsPrefix: projectConfig.Bindings.TsGeneration.Prefix,
|
||||
TsSuffix: projectConfig.Bindings.TsGeneration.Suffix,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -60,6 +55,7 @@ func generateModule(f *flags.GenerateModule) error {
|
||||
}
|
||||
|
||||
func generateTemplate(f *flags.GenerateTemplate) error {
|
||||
|
||||
if f.NoColour {
|
||||
pterm.DisableColor()
|
||||
colour.ColourEnabled = false
|
||||
@@ -81,7 +77,7 @@ func generateTemplate(f *flags.GenerateTemplate) error {
|
||||
}
|
||||
templateDir := filepath.Join(cwd, f.Name)
|
||||
if !fs.DirExists(templateDir) {
|
||||
err := os.MkdirAll(templateDir, 0o755)
|
||||
err := os.MkdirAll(templateDir, 0755)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -204,7 +200,7 @@ func processPackageJSON(frontendDir string) error {
|
||||
json, _ = sjson.SetBytes(json, "name", "{{.ProjectName}}")
|
||||
json, _ = sjson.SetBytes(json, "author", "{{.AuthorName}}")
|
||||
|
||||
err = os.WriteFile(packageJSON, json, 0o644)
|
||||
err = os.WriteFile(packageJSON, json, 0644)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -235,7 +231,7 @@ func processPackageLockJSON(frontendDir string) error {
|
||||
printBulletPoint("Updating package-lock.json data...")
|
||||
json, _ = sjson.Set(json, "name", "{{.ProjectName}}")
|
||||
|
||||
err = os.WriteFile(filename, []byte(json), 0o644)
|
||||
err = os.WriteFile(filename, []byte(json), 0644)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -3,12 +3,6 @@ package main
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/flytam/filenamify"
|
||||
"github.com/leaanthony/slicer"
|
||||
"github.com/pkg/errors"
|
||||
@@ -19,9 +13,15 @@ import (
|
||||
"github.com/wailsapp/wails/v2/pkg/clilogger"
|
||||
"github.com/wailsapp/wails/v2/pkg/git"
|
||||
"github.com/wailsapp/wails/v2/pkg/templates"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func initProject(f *flags.Init) error {
|
||||
|
||||
if f.NoColour {
|
||||
pterm.DisableColor()
|
||||
colour.ColourEnabled = false
|
||||
@@ -215,7 +215,7 @@ func initGit(options *templates.Options) error {
|
||||
"frontend/dist",
|
||||
"frontend/node_modules",
|
||||
}
|
||||
err = os.WriteFile(filepath.Join(options.TargetDir, ".gitignore"), []byte(strings.Join(ignore, "\n")), 0o644)
|
||||
err = os.WriteFile(filepath.Join(options.TargetDir, ".gitignore"), []byte(strings.Join(ignore, "\n")), 0644)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Unable to create gitignore")
|
||||
}
|
||||
@@ -271,7 +271,7 @@ func updateReplaceLine(targetPath string) {
|
||||
}
|
||||
}
|
||||
|
||||
err = os.WriteFile("go.mod", []byte(strings.Join(lines, "\n")), 0o644)
|
||||
err = os.WriteFile("go.mod", []byte(strings.Join(lines, "\n")), 0644)
|
||||
if err != nil {
|
||||
fatal(err.Error())
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ func sliceToMap(input []string) map[string]struct{} {
|
||||
|
||||
// Application runs the application in dev mode
|
||||
func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
|
||||
|
||||
cwd := lo.Must(os.Getwd())
|
||||
|
||||
// Update go.mod to use current wails version
|
||||
@@ -270,6 +271,7 @@ func runFrontendDevWatcherCommand(frontendDirectory string, devCommand string, d
|
||||
|
||||
// restartApp does the actual rebuilding of the application when files change
|
||||
func restartApp(buildOptions *build.Options, debugBinaryProcess *process.Process, f *flags.Dev, exitCodeChannel chan int, legacyUseDevServerInsteadofCustomScheme bool) (*process.Process, string, error) {
|
||||
|
||||
appBinary, err := build.Build(buildOptions)
|
||||
println()
|
||||
if err != nil {
|
||||
@@ -296,6 +298,7 @@ func restartApp(buildOptions *build.Options, debugBinaryProcess *process.Process
|
||||
|
||||
// parse appargs if any
|
||||
args, err := shlex.Split(f.AppArgs)
|
||||
|
||||
if err != nil {
|
||||
buildOptions.Logger.Fatal("Unable to parse appargs: %s", err.Error())
|
||||
}
|
||||
@@ -342,7 +345,7 @@ func doWatcherLoop(cwd string, buildOptions *build.Options, debugBinaryProcess *
|
||||
logutils.LogGreen("Watching (sub)/directory: %s", cwd)
|
||||
|
||||
// Main Loop
|
||||
extensionsThatTriggerARebuild := sliceToMap(strings.Split(f.Extensions, ","))
|
||||
var extensionsThatTriggerARebuild = sliceToMap(strings.Split(f.Extensions, ","))
|
||||
var dirsThatTriggerAReload []string
|
||||
for _, dir := range strings.Split(f.ReloadDirs, ",") {
|
||||
if dir == "" {
|
||||
|
||||
@@ -18,6 +18,7 @@ type Watcher interface {
|
||||
|
||||
// initialiseWatcher creates the project directory watcher that will trigger recompile
|
||||
func initialiseWatcher(cwd string) (*fsnotify.Watcher, error) {
|
||||
|
||||
// Ignore dot files, node_modules and build directories by default
|
||||
ignoreDirs := getIgnoreDirs(cwd)
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ func SyncGoMod(logger *clilogger.CLILogger, updateWailsVersion bool) error {
|
||||
}
|
||||
|
||||
if updated {
|
||||
return os.WriteFile(gomodFilename, gomodData, 0o755)
|
||||
return os.WriteFile(gomodFilename, gomodData, 0755)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.7.0
|
||||
v2.6.0
|
||||
@@ -66,6 +66,7 @@ func bool2Str(b bool) string {
|
||||
var app *clir.Cli
|
||||
|
||||
func main() {
|
||||
|
||||
var err error
|
||||
|
||||
app = clir.NewCli("Wails", "Go/HTML Appkit", internal.Version)
|
||||
|
||||
@@ -15,6 +15,7 @@ import (
|
||||
|
||||
// AddSubcommand adds the `init` command for the Wails application
|
||||
func update(f *flags.Update) error {
|
||||
|
||||
if f.NoColour {
|
||||
colour.ColourEnabled = false
|
||||
pterm.DisableColor()
|
||||
@@ -72,7 +73,8 @@ func update(f *flags.Update) error {
|
||||
}
|
||||
|
||||
func updateToVersion(targetVersion *github.SemanticVersion, force bool, currentVersion string) error {
|
||||
targetVersionString := "v" + targetVersion.String()
|
||||
|
||||
var targetVersionString = "v" + targetVersion.String()
|
||||
|
||||
if targetVersionString == currentVersion {
|
||||
pterm.Println("\nLooks like you're up to date!")
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
module changeme
|
||||
|
||||
go 1.21
|
||||
|
||||
toolchain go1.21.0
|
||||
go 1.18
|
||||
|
||||
require github.com/wailsapp/wails/v2 v2.1.0
|
||||
|
||||
@@ -26,7 +24,7 @@ require (
|
||||
github.com/tkrajina/go-reflector v0.5.6 // indirect
|
||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
github.com/valyala/fasttemplate v1.2.2 // indirect
|
||||
github.com/wailsapp/go-webview2 v1.0.10 // indirect
|
||||
github.com/wailsapp/go-webview2 v1.0.7 // indirect
|
||||
github.com/wailsapp/mimetype v1.4.1 // indirect
|
||||
golang.org/x/crypto v0.14.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
|
||||
|
||||
@@ -56,7 +56,6 @@ github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQ
|
||||
github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
|
||||
github.com/wailsapp/go-webview2 v1.0.7 h1:s95+7irJsAsTy1RsjJ6N0cYX7tZ4gP7Uzawds0L2urs=
|
||||
github.com/wailsapp/go-webview2 v1.0.7/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo=
|
||||
github.com/wailsapp/go-webview2 v1.0.10/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo=
|
||||
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
|
||||
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
|
||||
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
|
||||
|
||||
@@ -94,7 +94,7 @@ require (
|
||||
github.com/yuin/goldmark-emoji v1.0.1 // indirect
|
||||
golang.org/x/crypto v0.14.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
|
||||
golang.org/x/image v0.10.0 // indirect
|
||||
golang.org/x/image v0.5.0 // indirect
|
||||
golang.org/x/term v0.13.0 // indirect
|
||||
golang.org/x/text v0.13.0 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
|
||||
@@ -12,6 +12,7 @@ github.com/MarvinJWendt/testza v0.2.12/go.mod h1:JOIegYyV7rX+7VZ9r77L/eH6CfJHHzX
|
||||
github.com/MarvinJWendt/testza v0.3.0/go.mod h1:eFcL4I0idjtIx8P9C6KkAuLgATNKpX4/2oUqKc6bF2c=
|
||||
github.com/MarvinJWendt/testza v0.4.2/go.mod h1:mSdhXiKH8sg/gQehJ63bINcCKp7RtYewEjXsvsVUPbE=
|
||||
github.com/MarvinJWendt/testza v0.4.3 h1:u2XaM4IqGp9dsdUmML8/Z791fu4yjQYzOiufOtJwTII=
|
||||
github.com/MarvinJWendt/testza v0.4.3/go.mod h1:CpXaOfceNEYnLDtNIyTrPPcCpDJYqzZnu2aiA2Wp33U=
|
||||
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
|
||||
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
||||
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
|
||||
@@ -76,6 +77,7 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
|
||||
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
@@ -106,6 +108,7 @@ github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02
|
||||
github.com/klauspost/cpuid/v2 v2.0.10/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
|
||||
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
|
||||
github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0=
|
||||
github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
@@ -256,10 +259,9 @@ golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERs
|
||||
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
|
||||
golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.10.0 h1:gXjUUtwtx5yOE0VKWq1CH4IJAClq4UGgUA3i+rpON9M=
|
||||
golang.org/x/image v0.10.0/go.mod h1:jtrku+n79PfroUbvDdeUWMAI+heR786BofxrbiSF+J0=
|
||||
golang.org/x/image v0.5.0 h1:5JMiNunQeQw++mMOz48/ISeNu3Iweh/JaZU8ZLqHRrI=
|
||||
golang.org/x/image v0.5.0/go.mod h1:FVC7BI/5Ym8R25iw5OLsgshdUBbT1h5jZTpA+mvAdZ4=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
@@ -268,7 +270,6 @@ golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5o
|
||||
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
|
||||
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -300,7 +301,6 @@ golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
|
||||
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
@@ -308,7 +308,6 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn
|
||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
|
||||
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@@ -316,7 +315,6 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
|
||||
@@ -31,7 +31,6 @@ func (a *App) Run() error {
|
||||
|
||||
var tsPrefixFlag *string
|
||||
var tsPostfixFlag *string
|
||||
var tsOutputTypeFlag *string
|
||||
|
||||
tsPrefix := os.Getenv("tsprefix")
|
||||
if tsPrefix == "" {
|
||||
@@ -43,11 +42,6 @@ func (a *App) Run() error {
|
||||
tsPostfixFlag = bindingFlags.String("tssuffix", "", "Suffix for generated typescript entities")
|
||||
}
|
||||
|
||||
tsOutputType := os.Getenv("tsoutputtype")
|
||||
if tsOutputType == "" {
|
||||
tsOutputTypeFlag = bindingFlags.String("tsoutputtype", "", "Output type for generated typescript entities (classes|interfaces)")
|
||||
}
|
||||
|
||||
_ = bindingFlags.Parse(os.Args[1:])
|
||||
if tsPrefixFlag != nil {
|
||||
tsPrefix = *tsPrefixFlag
|
||||
@@ -55,15 +49,11 @@ func (a *App) Run() error {
|
||||
if tsPostfixFlag != nil {
|
||||
tsSuffix = *tsPostfixFlag
|
||||
}
|
||||
if tsOutputTypeFlag != nil {
|
||||
tsOutputType = *tsOutputTypeFlag
|
||||
}
|
||||
|
||||
appBindings := binding.NewBindings(a.logger, a.options.Bind, bindingExemptions, IsObfuscated(), a.options.EnumBind)
|
||||
appBindings := binding.NewBindings(a.logger, a.options.Bind, bindingExemptions, IsObfuscated())
|
||||
|
||||
appBindings.SetTsPrefix(tsPrefix)
|
||||
appBindings.SetTsSuffix(tsSuffix)
|
||||
appBindings.SetOutputType(tsOutputType)
|
||||
|
||||
err := generateBindings(appBindings)
|
||||
if err != nil {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user