()
| 3257 | }; |
| 3258 | |
| 3259 | const openRunningLocalWebApp = (): Effect.Effect< |
| 3260 | void, |
| 3261 | never, |
| 3262 | FileSystem.FileSystem | PlatformPath.Path |
| 3263 | > => |
| 3264 | Effect.gen(function* () { |
| 3265 | const manifest = yield* readActiveLocalServerManifest().pipe(Effect.orElseSucceed(() => null)); |
| 3266 | if (!manifest) { |
| 3267 | printNoRunningLocalWebApp(); |
| 3268 | return; |
| 3269 | } |
| 3270 | const { origin, auth } = manifest.connection; |
| 3271 | const token = auth?.kind === "bearer" ? auth.token : undefined; |
| 3272 | const url = token ? `${origin}/?_token=${token}` : origin; |
| 3273 | console.log(`Opening ${url}`); |
| 3274 | yield* openInBrowser(url); |
| 3275 | }); |
| 3276 | |
| 3277 | /** |
| 3278 | * `executor open` — the friendly way back in. Reads the running local server's |
no test coverage detected