@tsdoctor/registry 0.5.9 → 0.5.10

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/PackageFetcher.js CHANGED
@@ -5,7 +5,7 @@ import { Cause, Context, Duration, Effect, Layer, Ref, Schedule, Schema } from "
5
5
  import * as HttpClient from "effect/http/HttpClient";
6
6
  import * as HttpClientError from "effect/http/HttpClientError";
7
7
 
8
- //#region src/PackageFetcher.ts
8
+ // src/PackageFetcher.ts
9
9
  /**
10
10
  * Raised when an HTTP request or response fails at the jsDelivr boundary.
11
11
  *
@@ -237,5 +237,4 @@ var PackageFetcher = class PackageFetcher extends Context.Service()("@tsdoctor/r
237
237
  static layer = Layer.effect(PackageFetcher, make);
238
238
  };
239
239
 
240
- //#endregion
241
240
  export { FetchError, PackageFetcher, PackageManifest, PackageNotFoundError, VersionNotFoundError };
package/PackageSpec.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Option, Schema } from "effect";
2
2
 
3
- //#region src/PackageSpec.ts
3
+ // src/PackageSpec.ts
4
4
  /**
5
5
  * Node.js built-in base module names, used by
6
6
  * {@link PackageSpec.normalizeSpecifier} to map built-in specifiers to the
@@ -178,5 +178,4 @@ var PackageSpec = class PackageSpec extends Schema.Class("PackageSpec")({
178
178
  }
179
179
  };
180
180
 
181
- //#endregion
182
181
  export { PackageSpec };
package/RegistryEvent.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Context, Effect, Layer, Option, Schema } from "effect";
2
2
 
3
- //#region src/RegistryEvent.ts
3
+ // src/RegistryEvent.ts
4
4
  /**
5
5
  * Discriminated union of typed progress events emitted during registry
6
6
  * operations.
@@ -142,5 +142,4 @@ const emit = (event) => Effect.serviceOption(RegistryObserver).pipe(Effect.flatM
142
142
  onSome: (observer) => observer.emit(event)
143
143
  })));
144
144
 
145
- //#endregion
146
145
  export { RegistryEvent, RegistryObserver, emit };
package/TypeCache.js CHANGED
@@ -3,7 +3,7 @@ import { PackageSpec } from "./PackageSpec.js";
3
3
  import { Context, Effect, FileSystem, Layer, Option, Path, Schema } from "effect";
4
4
  import { Cache } from "@effected/store";
5
5
 
6
- //#region src/TypeCache.ts
6
+ // src/TypeCache.ts
7
7
  /**
8
8
  * Per-package cache metadata: the pinned version, when it was cached and how
9
9
  * long it lives.
@@ -252,5 +252,4 @@ var TypeCache = class TypeCache extends Context.Service()("@tsdoctor/registry/Ty
252
252
  }
253
253
  };
254
254
 
255
- //#endregion
256
255
  export { TypeCache, TypeCacheError, TypeCacheMetadata };
package/TypeRegistry.js CHANGED
@@ -7,7 +7,7 @@ import { Context, DateTime, Effect, Layer, Option, Schema, Semaphore } from "eff
7
7
  import { mergeVfs } from "@tsdoctor/vfs";
8
8
  import { Range, SemVer } from "@effected/semver";
9
9
 
10
- //#region src/TypeRegistry.ts
10
+ // src/TypeRegistry.ts
11
11
  /**
12
12
  * Raised by {@link TypeRegistryShape.getVfs} when **every** requested package
13
13
  * fails.
@@ -272,5 +272,4 @@ var TypeRegistry = class TypeRegistry extends Context.Service()("@tsdoctor/regis
272
272
  static layer = Layer.effect(TypeRegistry, make);
273
273
  };
274
274
 
275
- //#endregion
276
275
  export { BatchLoadError, TypeRegistry };
package/TypeResolver.js CHANGED
@@ -2,7 +2,7 @@ import { compileWildcard, extractTypesFromExport, findMainTypePath, getExportVal
2
2
  import { PackageSpec } from "./PackageSpec.js";
3
3
  import { Option, Schema } from "effect";
4
4
 
5
- //#region src/TypeResolver.ts
5
+ // src/TypeResolver.ts
6
6
  /**
7
7
  * A resolved module: the declaration file a specifier resolves to within a
8
8
  * package.
@@ -179,5 +179,4 @@ var TypeResolver = class TypeResolver {
179
179
  }
180
180
  };
181
181
 
182
- //#endregion
183
182
  export { ResolvedModule, TypeResolver };
package/index.d.ts CHANGED
@@ -3,7 +3,6 @@ import * as HttpClient from "effect/http/HttpClient";
3
3
  import { Cache } from "@effected/store";
4
4
  import { AppDirs, AppDirsError } from "@effected/xdg";
5
5
  import { Vfs } from "@tsdoctor/vfs";
6
- //#region src/PackageSpec.d.ts
7
6
  declare const PackageSpec_base: Schema.Class<PackageSpec, Schema.Struct<{
8
7
  /** The npm package name (e.g. `"zod"`, `"@effect/schema"`). */
9
8
  readonly name: Schema.String;
@@ -83,8 +82,6 @@ export declare class PackageSpec extends PackageSpec_base {
83
82
  */
84
83
  get cacheKey(): string;
85
84
  }
86
- //#endregion
87
- //#region src/PackageFetcher.d.ts
88
85
  declare const FetchError_base: Schema.Class<FetchError, Schema.TaggedStruct<"FetchError", {
89
86
  /** The request URL. */
90
87
  readonly url: Schema.String;
@@ -239,8 +236,6 @@ export declare class PackageFetcher extends PackageFetcher_base {
239
236
  /** The jsDelivr-backed layer; requires an `HttpClient`. */
240
237
  static readonly layer: Layer.Layer<PackageFetcher, never, HttpClient.HttpClient>;
241
238
  }
242
- //#endregion
243
- //#region src/RegistryEvent.d.ts
244
239
  /**
245
240
  * Discriminated union of typed progress events emitted during registry
246
241
  * operations.
@@ -363,8 +358,6 @@ export declare class RegistryObserver extends RegistryObserver_base {
363
358
  */
364
359
  static readonly layerNoop: Layer.Layer<RegistryObserver>;
365
360
  }
366
- //#endregion
367
- //#region src/TypeCache.d.ts
368
361
  declare const TypeCacheMetadata_base: Schema.Class<TypeCacheMetadata, Schema.Struct<{
369
362
  /** The pinned version the files on disk belong to. */
370
363
  readonly version: Schema.String;
@@ -577,8 +570,6 @@ export declare class TypeCache extends TypeCache_base {
577
570
  readonly namespace?: string;
578
571
  }): Layer.Layer<TypeCache, AppDirsError, Cache | AppDirs | FileSystem.FileSystem | Path.Path>;
579
572
  }
580
- //#endregion
581
- //#region src/TypeResolver.d.ts
582
573
  declare const ResolvedModule_base: Schema.Class<ResolvedModule, Schema.Struct<{
583
574
  /** The file path relative to the package root (no `./` prefix). */
584
575
  readonly filePath: Schema.String;
@@ -662,8 +653,6 @@ export declare class TypeResolver {
662
653
  */
663
654
  static findTypeDefinition(jsFilePath: string, pkg: PackageSpec): Option.Option<ResolvedModule>;
664
655
  }
665
- //#endregion
666
- //#region src/TypeRegistry.d.ts
667
656
  declare const BatchLoadError_base: Schema.Class<BatchLoadError, Schema.TaggedStruct<"BatchLoadError", {
668
657
  /** One entry per failed package, with its typed error preserved. */
669
658
  readonly failures: Schema.$Array<Schema.Struct<{
@@ -784,6 +773,5 @@ export declare class TypeRegistry extends TypeRegistry_base {
784
773
  /** The live facade over {@link TypeCache} and {@link PackageFetcher}. */
785
774
  static readonly layer: Layer.Layer<TypeRegistry, never, TypeCache | PackageFetcher>;
786
775
  }
787
- //#endregion
788
776
  export type { CachePruneResult, PackageFetcherShape, PackageVersions, PackageVfsOptions, RegistryObserverShape, TypeCacheShape, TypeRegistryShape };
789
777
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { isSafeRelativePath } from "./resolution.js";
2
2
  import { Schema } from "effect";
3
3
 
4
- //#region src/internal/jsdelivr.ts
4
+ // src/internal/jsdelivr.ts
5
5
  /** Base URL for the jsDelivr data/metadata API. */
6
6
  const DATA_API = "https://data.jsdelivr.com/v1";
7
7
  /** Base URL for the jsDelivr file-serving CDN. */
@@ -58,5 +58,4 @@ const FileTreeResponse = Schema.Struct({
58
58
  }))
59
59
  });
60
60
 
61
- //#endregion
62
61
  export { CDN, DATA_API, FileTreeResponse, TYPE_FILE_PATTERN, VersionsResponse, fileTreeUrl, fileUrl, packageJsonUrl, versionsUrl };
@@ -1,4 +1,4 @@
1
- //#region src/internal/limits.ts
1
+ // src/internal/limits.ts
2
2
  /**
3
3
  * Cap on declaration files materialized per package by `getTypeFiles`. A
4
4
  * pathological or hostile file tree naming more declaration files than this
@@ -12,5 +12,4 @@ const MAX_TYPE_FILES_PER_PACKAGE = 5e3;
12
12
  */
13
13
  const MAX_TYPE_BYTES_PER_PACKAGE = 67108864;
14
14
 
15
- //#endregion
16
15
  export { MAX_TYPE_BYTES_PER_PACKAGE, MAX_TYPE_FILES_PER_PACKAGE };
@@ -1,6 +1,6 @@
1
1
  import { isTypeDefinition } from "@tsdoctor/vfs";
2
2
 
3
- //#region src/internal/resolution.ts
3
+ // src/internal/resolution.ts
4
4
  /**
5
5
  * Exports-map resolution machinery. Every input here — `exports` values,
6
6
  * `typesVersions` maps, wildcard patterns — is untrusted JSON fetched from a
@@ -177,5 +177,4 @@ const findMainTypePath = (manifest) => {
177
177
  return "index.d.ts";
178
178
  };
179
179
 
180
- //#endregion
181
180
  export { compileWildcard, extractTypesFromExport, findMainTypePath, getExportValue, isSafeRelativePath, isTypeDefinition, normalizePath, substituteWildcard, tryExtensions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsdoctor/registry",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "private": false,
5
5
  "description": "External TypeScript type loading for Effect: fetch, cache and resolve type definitions from npm via the jsDelivr CDN into a virtual file system.",
6
6
  "keywords": [
@@ -38,15 +38,15 @@
38
38
  "./package.json": "./package.json"
39
39
  },
40
40
  "dependencies": {
41
- "@effected/semver": "^0.14.0",
42
- "@tsdoctor/vfs": "0.4.7"
41
+ "@effected/semver": "^0.15.0",
42
+ "@tsdoctor/vfs": "0.4.8"
43
43
  },
44
44
  "peerDependencies": {
45
- "@effect/platform-node": "^4.0.5",
46
- "@effected/store": "^0.16.0",
47
- "@effected/tsconfig-json": "^0.16.0",
48
- "@effected/xdg": "^0.12.0",
49
- "effect": "^4.0.5"
45
+ "@effect/platform-node": "^4.0.6",
46
+ "@effected/store": "^0.17.0",
47
+ "@effected/tsconfig-json": "^0.17.0",
48
+ "@effected/xdg": "^0.13.0",
49
+ "effect": "^4.0.6"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "@effected/xdg": {