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/821.js +628 -0
- package/LICENSE +21 -0
- package/README.md +45 -0
- package/index.d.ts +1754 -0
- package/index.js +173 -0
- package/node.d.ts +890 -0
- package/node.js +26 -0
- package/package.json +67 -0
- package/rslib-runtime.js +37 -0
- package/tsdoc-metadata.json +11 -0
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# type-registry-effect
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/type-registry-effect)
|
|
4
|
+
[](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)
|