refactor: split backend into standalone server project

Remove embedded frontend and workflow editor assets, add standalone API deployment configuration, and retain the current backend service updates.
This commit is contained in:
t
2026-08-20 21:46:55 +08:00
parent 954a3fe8d9
commit 3d47227fbd
612 changed files with 515 additions and 97334 deletions
+9 -5
View File
@@ -2,6 +2,7 @@ package main
import (
"bytes"
"flag"
"fmt"
"go/ast"
"go/token"
@@ -15,9 +16,9 @@ import (
)
const (
enumsPkgName = "enums"
enumsDir = "internal/pkg/enums"
outputPath = "web/lib/generated/enums.ts"
enumsPkgName = "enums"
enumsDir = "internal/pkg/enums"
defaultOutputPath = "dist/enums.ts"
)
type enumValueType string
@@ -47,15 +48,18 @@ type enumDef struct {
}
func main() {
outputPath := flag.String("output", defaultOutputPath, "TypeScript enum output path")
flag.Parse()
defs, err := parseEnums(enumsDir)
if err != nil {
panic(err)
}
content := buildTSFile(defs)
if err := os.MkdirAll(filepath.Dir(outputPath), 0o755); err != nil {
if err := os.MkdirAll(filepath.Dir(*outputPath), 0o755); err != nil {
panic(err)
}
if err := os.WriteFile(outputPath, []byte(content), 0o644); err != nil {
if err := os.WriteFile(*outputPath, []byte(content), 0o644); err != nil {
panic(err)
}
}