mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-06 23:56:37 +08:00
refactor(core): align with cordis spatiotemporal composability architecture
- Purify core micro-kernel by removing context hardcoded helpers and reverse dependencies - Eliminate init() side effects in infra plugins with reversible lifecycle disposal - Completely isolate plugins by removing cross-plugin imports and using core/contracts - Introduce TaskService and RiskControlService contracts for unified cross-plugin APIs - Regenerate Swagger documentation and update developer guide matrix - Achieve 0 violations in check_cordis_architecture.sh and 100% test pass
This commit is contained in:
@@ -16,9 +16,10 @@ import (
|
||||
userdomain "Wavelet/plugins/domain/user"
|
||||
"Wavelet/plugins/infra/database"
|
||||
|
||||
"Wavelet/plugins/domain/auth"
|
||||
"github.com/spf13/cobra"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"Wavelet/plugins/domain/auth"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -49,7 +50,10 @@ var resetPasswdCmd = &cobra.Command{
|
||||
ctx := context.Background()
|
||||
|
||||
// Ensure database is initialized
|
||||
database.DB(ctx)
|
||||
dbConn := database.DB(ctx)
|
||||
if dbConn != nil {
|
||||
userdomain.SetDBService(database.NewService(dbConn))
|
||||
}
|
||||
|
||||
var username string
|
||||
if usernameFlag != "" {
|
||||
|
||||
Reference in New Issue
Block a user