Skip to content

Commit

Permalink
chore: prepare v2.0.0-beta.37
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJacky committed Oct 26, 2024
1 parent 6dc6092 commit fd6ab68
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 12 deletions.
2 changes: 0 additions & 2 deletions app/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ declare module 'vue' {
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
APopover: typeof import('ant-design-vue/es')['Popover']
AProgress: typeof import('ant-design-vue/es')['Progress']
ARadioButton: typeof import('ant-design-vue/es')['RadioButton']
ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup']
AResult: typeof import('ant-design-vue/es')['Result']
ARow: typeof import('ant-design-vue/es')['Row']
ASelect: typeof import('ant-design-vue/es')['Select']
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nginx-ui-app-next",
"type": "module",
"version": "2.0.0-beta.36",
"version": "2.0.0-beta.37",
"packageManager": "[email protected]",
"scripts": {
"dev": "vite --host",
Expand Down
2 changes: 1 addition & 1 deletion app/src/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"2.0.0-beta.36","build_id":1,"total_build":365}
{"version":"2.0.0-beta.37","build_id":1,"total_build":366}
Binary file removed img.png
Binary file not shown.
1 change: 0 additions & 1 deletion internal/kernal/boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ func Boot() {
defer recovery()

async := []func(){
settings.Init,
InitJsExtensionType,
InitDatabase,
InitNodeSecret,
Expand Down
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ func main() {
flag.StringVar(&confPath, "config", "app.ini", "Specify the configuration file")
flag.Parse()

settings.Migrate(confPath)
cSettings.Init(confPath)
settings.Init(confPath)

overseer.Run(overseer.Config{
Program: Program(confPath),
Expand Down
6 changes: 3 additions & 3 deletions settings/server_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func mergeStructs(src, dst interface{}) {
return
}

func Migrate(confPath string) {
func migrate(confPath string) {
logger.Init("debug")
Conf, err := ini.LoadSources(ini.LoadOptions{
Loose: true,
Expand Down Expand Up @@ -160,7 +160,7 @@ func Migrate(confPath string) {
for name, ptr := range migrated.Iterator() {
err = Conf.Section(name).MapTo(ptr)
if err != nil {
logger.Error("Migrate.MapTo %s err: %v", name, err)
logger.Error("migrate.MapTo %s err: %v", name, err)
}
}

Expand All @@ -187,7 +187,7 @@ func Migrate(confPath string) {
for section, ptr := range migrated.Iterator() {
err = Conf.Section(section).ReflectFrom(ptr)
if err != nil {
logger.Fatalf("Migrate.ReflectFrom %s err: %v", section, err)
logger.Fatalf("migrate.ReflectFrom %s err: %v", section, err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion settings/server_v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,5 @@ RPOrigins = http://localhost:3002,http://127.0.0.1:3002`
t.Fatalf("Failed to write config to file: %v", err)
}

Migrate(confName)
migrate(confName)
}
8 changes: 7 additions & 1 deletion settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ func init() {
settings.WithoutSonyflake()
}

func Init() {
func Init(confPath string) {
migrate(confPath)

settings.ServerSettings.Port = 9000

settings.Init(confPath)

for prefix, ptr := range envPrefixMap {
parseEnv(ptr, prefix+"_")
}
Expand Down

0 comments on commit fd6ab68

Please sign in to comment.