Skip to content

Commit

Permalink
Merge 8612bd1 into ca535e1
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys authored Dec 26, 2024
2 parents ca535e1 + 8612bd1 commit b52e9ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scanner/jsFramework.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ func configureJsFramework(sourceDir string, config *ScannerConfig) (*SourceInfo,
srcInfo.DatabaseDesired = DatabaseKindMySQL
} else if checksPass(sourceDir+"/prisma", dirContains("*.prisma", "sqlite")) {
srcInfo.DatabaseDesired = DatabaseKindSqlite
srcInfo.ObjectStorageDesired = true
}
}

Expand Down Expand Up @@ -381,6 +382,11 @@ func JsFrameworkCallback(appName string, srcInfo *SourceInfo, plan *plan.LaunchP
args = append(args, flags...)
}

// add litestream if object storage is present and database is sqlite3
if plan.ObjectStorage.Provider() != nil && srcInfo.DatabaseDesired == DatabaseKindSqlite {
args = append(args, "--litestream")
}

// execute (via npx, bunx, or bun x) the docker module
cmd := exec.Command(xcmdpath, args...)
cmd.Stdin = nil
Expand Down

0 comments on commit b52e9ea

Please sign in to comment.