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

Function readExpoScheme

internal/cli/quickstarts.go:1103–1124  ·  view source on GitHub ↗

readExpoScheme reads the "expo.scheme" field from app.json in the working directory. Returns the raw string value, or empty if the framework is not expo or the file is missing.

(framework string)

Source from the content-addressed store, hash-verified

1101// readExpoScheme reads the "expo.scheme" field from app.json in the working directory.
1102// Returns the raw string value, or empty if the framework is not expo or the file is missing.
1103func readExpoScheme(framework string) string {
1104 if framework != "expo" {
1105 return ""
1106 }
1107 cwd, err := os.Getwd()
1108 if err != nil {
1109 return ""
1110 }
1111 data, err := os.ReadFile(filepath.Join(cwd, "app.json"))
1112 if err != nil {
1113 return ""
1114 }
1115 var obj struct {
1116 Expo struct {
1117 Scheme string `json:"scheme"`
1118 } `json:"expo"`
1119 }
1120 if err := json.Unmarshal(data, &obj); err != nil {
1121 return ""
1122 }
1123 return obj.Expo.Scheme
1124}
1125
1126// resolveNativeBundleID determines the bundle/package ID for native frameworks.
1127func resolveNativeBundleID(inputs SetupInputs) string {

Callers 1

createQuickstartAppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected