@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 49 lines 1.61 KB
Raw
1 /**
2 * Aggregate Deno platform services layer.
3 *
4 * This module defines the `DenoServices` union and a single `layer` that
5 * provides Deno-backed child process spawning, filesystem, path, stdio,
6 * and terminal services. Use the layer when a Deno program wants the standard
7 * platform services from one place.
8 *
9 * @stability unstable
10 * @since 4.0.0
11 */
12 import type { FileSystem } from "effect/FileSystem"
13 import * as Layer from "effect/Layer"
14 import type { Path } from "effect/Path"
15 import type { ChildProcessSpawner } from "effect/process/ChildProcessSpawner"
16 import type { Stdio } from "effect/Stdio"
17 import type { Terminal } from "effect/Terminal"
18 import * as DenoChildProcessSpawner from "./DenoChildProcessSpawner.ts"
19 import * as DenoFileSystem from "./DenoFileSystem.ts"
20 import * as DenoPath from "./DenoPath.ts"
21 import * as DenoStdio from "./DenoStdio.ts"
22 import * as DenoTerminal from "./DenoTerminal.ts"
23
24 /**
25 * The union of core services provided by the Deno platform layer, including
26 * child process spawning, filesystem, path, stdio, and terminal services.
27 *
28 * @stability unstable
29 * @category models
30 * @since 4.0.0
31 */
32 export type DenoServices = ChildProcessSpawner | FileSystem | Path | Terminal | Stdio
33
34 /**
35 * Provides the default Deno implementations for child process spawning,
36 * crypto, filesystem, path, stdio, and terminal services.
37 *
38 * @stability unstable
39 * @category layers
40 * @since 4.0.0
41 */
42 export const layer: Layer.Layer<DenoServices> = DenoChildProcessSpawner.layer.pipe(
43 Layer.provideMerge(Layer.mergeAll(
44 DenoFileSystem.layer,
45 DenoPath.layer,
46 DenoStdio.layer,
47 DenoTerminal.layer
48 ))
49 )