()
| 3140 | }; |
| 3141 | |
| 3142 | const openRunningLocalWebApp = (): Effect.Effect< |
| 3143 | void, |
| 3144 | never, |
| 3145 | FileSystem.FileSystem | PlatformPath.Path |
| 3146 | > => |
| 3147 | Effect.gen(function* () { |
| 3148 | const manifest = yield* readActiveLocalServerManifest().pipe(Effect.orElseSucceed(() => null)); |
| 3149 | if (!manifest) { |
| 3150 | printNoRunningLocalWebApp(); |
| 3151 | return; |
| 3152 | } |
| 3153 | const { origin, auth } = manifest.connection; |
| 3154 | const token = auth?.kind === "bearer" ? auth.token : undefined; |
| 3155 | const url = token ? `${origin}/?_token=${token}` : origin; |
| 3156 | console.log(`Opening ${url}`); |
| 3157 | yield* openInBrowser(url); |
| 3158 | }); |
| 3159 | |
| 3160 | /** |
| 3161 | * `executor open` — the friendly way back in. Reads the running local server's |
no test coverage detected