()
| 3237 | }; |
| 3238 | |
| 3239 | const openRunningLocalWebApp = (): Effect.Effect< |
| 3240 | void, |
| 3241 | never, |
| 3242 | FileSystem.FileSystem | PlatformPath.Path |
| 3243 | > => |
| 3244 | Effect.gen(function* () { |
| 3245 | const manifest = yield* readActiveLocalServerManifest().pipe(Effect.orElseSucceed(() => null)); |
| 3246 | if (!manifest) { |
| 3247 | printNoRunningLocalWebApp(); |
| 3248 | return; |
| 3249 | } |
| 3250 | const { origin, auth } = manifest.connection; |
| 3251 | const token = auth?.kind === "bearer" ? auth.token : undefined; |
| 3252 | const url = token ? `${origin}/?_token=${token}` : origin; |
| 3253 | console.log(`Opening ${url}`); |
| 3254 | yield* openInBrowser(url); |
| 3255 | }); |
| 3256 | |
| 3257 | /** |
| 3258 | * `executor open` — the friendly way back in. Reads the running local server's |
no test coverage detected