@tsdoctor/bundle 0.6.10 → 0.7.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/BundleHash.js CHANGED
@@ -22,10 +22,11 @@ function normalizeText(text) {
22
22
  * Hash text content: {@link normalizeText} then SHA-256 (lowercase hex).
23
23
  *
24
24
  * @remarks
25
- * Digesting runs through core's `Crypto` service (`JsoncFingerprint`), so
25
+ * Digesting runs through core's `Digest` service (`JsoncFingerprint`), so
26
26
  * consumers provide a backend — `@effect/platform-node`'s
27
- * `NodeCrypto.layer` — at the edge, the same posture as this package's
28
- * `FileSystem | Path` requirements.
27
+ * `NodeCrypto.layerDigest` or core's `Digest.layerWebCrypto` — at the
28
+ * edge, the same posture as this package's `FileSystem | Path`
29
+ * requirements.
29
30
  *
30
31
  * @public
31
32
  */
package/README.md CHANGED
@@ -44,7 +44,7 @@ const program = Effect.gen(function* () {
44
44
  });
45
45
 
46
46
  program.pipe(
47
- Effect.provide(Layer.mergeAll(NodeFileSystem.layer, Path.layer, NodeCrypto.layer)),
47
+ Effect.provide(Layer.mergeAll(NodeFileSystem.layer, Path.layer, NodeCrypto.layerDigest)),
48
48
  Effect.runPromise,
49
49
  );
50
50
  ```
@@ -61,7 +61,7 @@ Every resolved field carries `{ value, source }`, so "did the user override this
61
61
  - `resolveBundle` / `resolveBundleFrom` — the pure six-tier resolver producing a `ResolvedBundle` of `Provenanced` fields, with the documented inference rules (Open Graph alt-text chain, MIME from extension).
62
62
  - `hashLayerText`, `hashJsonValue`, `fingerprintResolvedBundle` — RFC 8785 (JCS) canonicalization plus SHA-256 (via `@effected/jsonc`'s `JsoncFingerprint`) for coarse (per-layer) and fine (per-field) change detection. Canonicalization is strict: an `undefined`-valued member or non-plain object fails typed rather than being silently dropped.
63
63
 
64
- All filesystem-touching functions keep `FileSystem` and `Path` in the Effect `R` channel, and the hashing functions keep `Crypto` there too; provide platform layers (for example `@effect/platform-node`'s `NodeFileSystem.layer`, `Path.layer` and `NodeCrypto.layer`) once at the application boundary.
64
+ All filesystem-touching functions keep `FileSystem` and `Path` in the Effect `R` channel, and the hashing functions keep core's `Digest` there too; provide platform layers (for example `@effect/platform-node`'s `NodeFileSystem.layer`, `Path.layer` and `NodeCrypto.layerDigest`) once at the application boundary.
65
65
 
66
66
  ## License
67
67
 
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Crypto, Effect, FileSystem, Option, Path, PlatformError, Schema } from "effect";
1
+ import { Effect, FileSystem, Option, Path, Schema } from "effect";
2
2
  import { PackageManifest } from "@effected/package-json";
3
3
  import { CompilerOptions, ResolvedTsconfig } from "@effected/tsconfig-json";
4
4
  import { GitHubRelease } from "@effected/github";
@@ -6,6 +6,7 @@ import { NpmRegistry, PackageTarball, RegistryTarget } from "@effected/npm";
6
6
  import { Cache } from "@effected/store";
7
7
  import { AppDirs } from "@effected/xdg";
8
8
  import { JsoncCanonicalizeError } from "@effected/jsonc";
9
+ import { Digest } from "effect/crypto";
9
10
  /**
10
11
  * The registry protocol families this reader knows how to do more than link
11
12
  * to. `"npm"` means an npm-compatible registry — install commands and tarball
@@ -954,14 +955,15 @@ export declare function normalizeText(text: string): string;
954
955
  * Hash text content: {@link normalizeText} then SHA-256 (lowercase hex).
955
956
  *
956
957
  * @remarks
957
- * Digesting runs through core's `Crypto` service (`JsoncFingerprint`), so
958
+ * Digesting runs through core's `Digest` service (`JsoncFingerprint`), so
958
959
  * consumers provide a backend — `@effect/platform-node`'s
959
- * `NodeCrypto.layer` — at the edge, the same posture as this package's
960
- * `FileSystem | Path` requirements.
960
+ * `NodeCrypto.layerDigest` or core's `Digest.layerWebCrypto` — at the
961
+ * edge, the same posture as this package's `FileSystem | Path`
962
+ * requirements.
961
963
  *
962
964
  * @public
963
965
  */
964
- export declare function hashText(text: string): Effect.Effect<string, PlatformError.PlatformError, Crypto.Crypto>;
966
+ export declare function hashText(text: string): Effect.Effect<string, never, Digest.Digest>;
965
967
  /**
966
968
  * Hash a JSON-shaped value: RFC 8785 (JCS) canonicalization then SHA-256.
967
969
  *
@@ -974,7 +976,7 @@ export declare function hashText(text: string): Effect.Effect<string, PlatformEr
974
976
  *
975
977
  * @public
976
978
  */
977
- export declare function hashJsonValue(value: unknown): Effect.Effect<string, JsoncCanonicalizeError | PlatformError.PlatformError, Crypto.Crypto>;
979
+ export declare function hashJsonValue(value: unknown): Effect.Effect<string, JsoncCanonicalizeError, Digest.Digest>;
978
980
  /**
979
981
  * Hash one bundle layer file's raw text — the COARSE half of change
980
982
  * detection (all layer hashes match → skip resolution entirely).
@@ -990,7 +992,7 @@ export declare function hashJsonValue(value: unknown): Effect.Effect<string, Jso
990
992
  *
991
993
  * @public
992
994
  */
993
- export declare function hashLayerText(text: string): Effect.Effect<string, PlatformError.PlatformError, Crypto.Crypto>;
995
+ export declare function hashLayerText(text: string): Effect.Effect<string, never, Digest.Digest>;
994
996
  /**
995
997
  * Fingerprint every present field of a {@link ResolvedBundle} — the FINE
996
998
  * half of change detection, hashing each field's `{ value, source }` pair.
@@ -1009,6 +1011,6 @@ export declare function hashLayerText(text: string): Effect.Effect<string, Platf
1009
1011
  *
1010
1012
  * @public
1011
1013
  */
1012
- export declare function fingerprintResolvedBundle(resolved: ResolvedBundle): Effect.Effect<Readonly<Record<string, string>>, PlatformError.PlatformError, Crypto.Crypto>;
1014
+ export declare function fingerprintResolvedBundle(resolved: ResolvedBundle): Effect.Effect<Readonly<Record<string, string>>, never, Digest.Digest>;
1013
1015
  export type { ApiModelInfo, Bundle, BundleDescriptor, BundleOverrides, DiscoverBundleOptions, DiscoverBundlesOptions, FetchGitHubReleaseBundleOptions, FetchNpmBundleOptions, KnownRegistryType, ProvenanceSource, Provenanced, PublishBundleAssetsInput, PublishedOpenGraphImage, ResolveBundleInput, ResolvedBundle, ResolvedOpenGraph, ResolvedOpenGraphImage };
1014
1016
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsdoctor/bundle",
3
- "version": "0.6.10",
3
+ "version": "0.7.0",
4
4
  "private": false,
5
5
  "description": "The tsdoctor bundle spec: layered bundle discovery, the versioned tsdoctor.json sidecar manifest, provenance-carrying resolution and canonical input hashing for API documentation bundles.",
6
6
  "keywords": [
@@ -39,20 +39,20 @@
39
39
  "./package.json": "./package.json"
40
40
  },
41
41
  "dependencies": {
42
- "@effected/glob": "^0.15.0",
43
- "@effected/images": "^0.6.2",
44
- "@effected/walker": "^0.21.0"
42
+ "@effected/glob": "^0.17.0",
43
+ "@effected/images": "^0.8.0",
44
+ "@effected/walker": "^0.24.0"
45
45
  },
46
46
  "peerDependencies": {
47
- "@effected/github": "^0.25.0",
48
- "@effected/jsonc": "^0.20.0",
49
- "@effected/npm": "^0.27.0",
50
- "@effected/package-json": "^0.26.0",
51
- "@effected/store": "^0.20.0",
52
- "@effected/tsconfig-json": "^0.17.0",
53
- "@effected/xdg": "^0.16.0",
54
- "@tsdoctor/manifest": "0.2.10",
55
- "effect": "^4.0.6"
47
+ "@effected/github": "^0.27.0",
48
+ "@effected/jsonc": "^0.22.0",
49
+ "@effected/npm": "^0.29.0",
50
+ "@effected/package-json": "^0.28.0",
51
+ "@effected/store": "^0.22.0",
52
+ "@effected/tsconfig-json": "^0.19.0",
53
+ "@effected/xdg": "^0.18.0",
54
+ "@tsdoctor/manifest": "0.3.0",
55
+ "effect": "~4.1.1"
56
56
  },
57
57
  "engines": {
58
58
  "node": ">=24.11.0"
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.59.4"
8
+ "packageVersion": "7.60.0"
9
9
  }
10
10
  ]
11
11
  }