MCPcopy Create free account
hub / github.com/auth0/auth0-cli / collectPackageJSONCandidates

Function collectPackageJSONCandidates

internal/cli/quickstart_detect.go:292–308  ·  view source on GitHub ↗

collectPackageJSONCandidates returns framework candidates from package.json deps. Ionic deps are handled earlier in DetectProject (step 2) and excluded here.

(deps map[string]bool)

Source from the content-addressed store, hash-verified

290// collectPackageJSONCandidates returns framework candidates from package.json deps.
291// Ionic deps are handled earlier in DetectProject (step 2) and excluded here.
292func collectPackageJSONCandidates(deps map[string]bool) []detectionCandidate {
293 var candidates []detectionCandidate
294 // React-native without expo (expo check would have matched earlier in DetectProject).
295 if hasDep(deps, "react-native") {
296 candidates = append(candidates, detectionCandidate{framework: "react-native", qsType: "native"})
297 }
298 if hasDep(deps, "express") {
299 candidates = append(candidates, detectionCandidate{framework: "express", qsType: "regular"})
300 }
301 if hasDep(deps, "hono") {
302 candidates = append(candidates, detectionCandidate{framework: "hono", qsType: "regular"})
303 }
304 if hasDep(deps, "fastify") {
305 candidates = append(candidates, detectionCandidate{framework: "fastify", qsType: "regular"})
306 }
307 return candidates
308}
309
310// detectFromCsproj returns framework and type from .csproj file content.
311func detectFromCsproj(content string) (framework, qsType string, found bool) {

Callers 2

DetectProjectFunction · 0.85

Calls 1

hasDepFunction · 0.85

Tested by 1