type-registry-effect 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # type-registry-effect
2
+
3
+ [![npm version](https://img.shields.io/npm/v/type-registry-effect)](https://www.npmjs.com/package/type-registry-effect)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ Fetch, cache, and resolve TypeScript type definitions from npm packages for use with Twoslash and other documentation tooling that needs type-aware code samples.
7
+
8
+ ## Features
9
+
10
+ - Composable Effect programs with typed errors and explicit service requirements
11
+ - Disk-based caching with XDG Base Directory compliance and TTL support
12
+ - Virtual file system generation compatible with @typescript/vfs and Twoslash
13
+ - Module resolution via package.json exports, typesVersions, and legacy fields
14
+ - Concurrent package loading with graceful degradation on partial failures
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install type-registry-effect effect @effect/platform
20
+ ```
21
+
22
+ See [docs/guides/getting-started.md](./docs/guides/getting-started.md) for peer dependency details.
23
+
24
+ ## Quick Start
25
+
26
+ ```typescript
27
+ import { TypeRegistry, PackageSpec } from "type-registry-effect";
28
+ import { NodeLayer } from "type-registry-effect/node";
29
+ import { Effect } from "effect";
30
+
31
+ const program = TypeRegistry.getVFS([
32
+ new PackageSpec({ name: "zod", version: "3.23.8" }),
33
+ new PackageSpec({ name: "@effect/schema", version: "0.79.0" }),
34
+ ]);
35
+
36
+ const vfs = await Effect.runPromise(Effect.provide(program, NodeLayer));
37
+ ```
38
+
39
+ ## Documentation
40
+
41
+ For detailed guides, architecture, and API reference, see [docs/](./docs/).
42
+
43
+ ## License
44
+
45
+ [MIT](LICENSE)