| ... | ... | @@ -26,7 +26,7 @@ export interface CliConfigShape { |
| 26 | 26 | readonly cwd: string; |
| 27 | 27 | readonly fixPath: Effect.Effect<unknown, never>; |
| 28 | 28 | readonly findAvailablePort: (preferred: number) => Effect.Effect<number, StartupError>; |
| 29 | | readonly resolveStaticDir: () => Effect.Effect<string | undefined>; |
| 29 | readonly resolveStaticDir: Effect.Effect<string | undefined>; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | export class CliConfig extends ServiceMap.Service<CliConfig, CliConfigShape>()( |
| ... | ... | @@ -141,7 +141,7 @@ const resolveCliConfig = Effect.fn(function* (input: CliInput) { |
| 141 | 141 | const devUrl = env.devUrl; |
| 142 | 142 | const noBrowser = env.noBrowser ?? mode === "desktop"; |
| 143 | 143 | const authToken = Option.getOrUndefined(input.token) ?? env.authToken; |
| 144 | | const staticDir = devUrl ? undefined : yield* cliConfig.resolveStaticDir(); |
| 144 | const staticDir = devUrl ? undefined : yield* cliConfig.resolveStaticDir; |
| 145 | 145 | |
| 146 | 146 | return { |
| 147 | 147 | mode, |
| ... | ... | @@ -245,11 +245,10 @@ export const CliConfigLive = Layer.effect( |
| 245 | 245 | cwd: process.cwd(), |
| 246 | 246 | fixPath: Effect.sync(fixPath), |
| 247 | 247 | findAvailablePort, |
| 248 | | resolveStaticDir: () => |
| 249 | | resolveStaticDir().pipe( |
| 250 | | Effect.provideService(FileSystem.FileSystem, fileSystem), |
| 251 | | Effect.provideService(Path.Path, path), |
| 252 | | ), |
| 248 | resolveStaticDir: resolveStaticDir().pipe( |
| 249 | Effect.provideService(FileSystem.FileSystem, fileSystem), |
| 250 | Effect.provideService(Path.Path, path), |
| 251 | ), |
| 253 | 252 | } satisfies CliConfigShape; |
| 254 | 253 | }), |
| 255 | 254 | ); |