@hunt-labs/bytekit-sdk 0.7.2 → 0.7.4

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/CHANGELOG.md CHANGED
@@ -10,6 +10,42 @@ today, see [README.md](./README.md), which remains the authoritative usage guide
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.7.4] - 2026-08-19
14
+
15
+ ### Changed
16
+
17
+ - **`gen:version` no longer runs as part of `build`** (#3144). `scripts/gen-version.ts` writes
18
+ `src/version.ts`, a _tracked_ source file, and it was chained into the `build` script. That made
19
+ a build silently rewrite committed source whenever the file disagreed with the manifest: local
20
+ runs went green on a tree CI could fail, the resulting ` M src/version.ts` was indistinguishable
21
+ from routine build noise, and in CI the outcome depended on whether Turbo's build cache hit
22
+ (restoring `dist/**` without re-running the generator) or missed. `build` now starts at
23
+ `rm -rf dist ...`, so building this package touches nothing tracked. This changes `prepack` /
24
+ `prepublishOnly` behavior too: both call `build`, so the publish path now reads the committed
25
+ `src/version.ts` rather than regenerating it, and the committed value is what ships.
26
+ - **New `gen:version-check` script**, `pnpm gen:version && git diff --exit-code src/version.ts`,
27
+ mirroring the existing `gen:types-check` in the same manifest. It runs in `.woodpecker/ci.yaml`'s
28
+ `types-drift` step, so a manifest bump without the matching `src/version.ts` regeneration now
29
+ fails a named PR check instead of reaching `staging`. `src/__tests__/version-parity.test.ts`
30
+ stays in place as the in-suite assertion; the gate is what makes its failure reachable before
31
+ merge rather than after.
32
+
33
+ No runtime or type changes. `SDK_VERSION` and the `X-ByteKit-Client: sdk_ts/<version>` affix
34
+ behave exactly as before.
35
+
36
+ ## [0.7.3] - 2026-08-18
37
+
38
+ ### Changed
39
+
40
+ - **`XFetchContentLength`'s description no longer calls the header a wire-byte count** (#3133).
41
+ `X-Fetch-Content-Length` is the byte length of the response body actually served: on a
42
+ passthrough `/v1/fetch` (no `format`) that is the relayed upstream payload, so it does equal
43
+ the upstream wire bytes — but with `format=html` or `format=markdown` the gateway overwrites
44
+ it with the transformed document's length, which is typically far smaller than what is billed.
45
+ The old description therefore read as a billing discrepancy on every transform request. Billing
46
+ is unchanged and has always used the upstream compressed wire bytes reported by `X-Raw-Bytes` /
47
+ `X-Billable-Bytes`. Generated-type comments only; no type or runtime behavior changes.
48
+
13
49
  ## [0.7.2] - 2026-08-17
14
50
 
15
51
  ### Changed
@@ -521,6 +557,8 @@ against 0.1.0 — read each one before upgrading.
521
557
  `@rapidcrawl/sdk` name.
522
558
 
523
559
  [Unreleased]: https://github.com/Hunt-Labs-Inc/ByteKit/tree/main/packages/sdk-typescript
560
+ [0.7.4]: https://github.com/Hunt-Labs-Inc/ByteKit/tree/main/packages/sdk-typescript
561
+ [0.7.3]: https://github.com/Hunt-Labs-Inc/ByteKit/tree/main/packages/sdk-typescript
524
562
  [0.7.2]: https://github.com/Hunt-Labs-Inc/ByteKit/tree/main/packages/sdk-typescript
525
563
  [0.7.1]: https://github.com/Hunt-Labs-Inc/ByteKit/tree/main/packages/sdk-typescript
526
564
  [0.7.0]: https://github.com/Hunt-Labs-Inc/ByteKit/tree/main/packages/sdk-typescript
@@ -2626,7 +2626,14 @@ export interface components {
2626
2626
  */
2627
2627
  XFetchStatus: "completed";
2628
2628
  XFetchURL: string;
2629
- /** @description Wire byte count (integer as string). */
2629
+ /**
2630
+ * @description Byte length of the response body served on this request (integer as string) — NOT the
2631
+ * billing basis. On a passthrough request (no `format`) the body is the relayed upstream
2632
+ * payload, so this equals the upstream wire byte count. With `format=html` or
2633
+ * `format=markdown` the body is the transformed document, so this is the transformed byte
2634
+ * count and is typically far smaller than what is billed. Billing always reads the upstream
2635
+ * compressed wire bytes from `X-Raw-Bytes` / `X-Billable-Bytes`, on every path.
2636
+ */
2630
2637
  XFetchContentLength: string;
2631
2638
  XFetchCreditsCharged: string;
2632
2639
  XFetchDurationMs: string;
package/dist/version.d.ts CHANGED
@@ -5,4 +5,4 @@
5
5
  * outbound request carries — see the emit site in `client.ts`. The header name is spelled
6
6
  * only there, so issue #2905's pre-merge gate 1 counts exactly one occurrence in `src/`.
7
7
  */
8
- export declare const SDK_VERSION = "0.7.2";
8
+ export declare const SDK_VERSION = "0.7.4";
package/dist/version.js CHANGED
@@ -9,4 +9,4 @@
9
9
  * outbound request carries — see the emit site in `client.ts`. The header name is spelled
10
10
  * only there, so issue #2905's pre-merge gate 1 counts exactly one occurrence in `src/`.
11
11
  */
12
- export const SDK_VERSION = '0.7.2';
12
+ export const SDK_VERSION = '0.7.4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hunt-labs/bytekit-sdk",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "Official TypeScript SDK for the ByteKit API",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -48,10 +48,11 @@
48
48
  "url": "https://bytekit.com/contact"
49
49
  },
50
50
  "scripts": {
51
- "build": "pnpm gen:version && rm -rf dist tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo && tsc -p tsconfig.build.json && mkdir -p dist/generated && cp src/generated/api.d.ts dist/generated/api.d.ts",
51
+ "build": "rm -rf dist tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo && tsc -p tsconfig.build.json && mkdir -p dist/generated && cp src/generated/api.d.ts dist/generated/api.d.ts",
52
52
  "gen:types": "openapi-typescript ../../docs/api/openapi.yaml -o src/generated/api.d.ts",
53
53
  "gen:version": "tsx scripts/gen-version.ts",
54
54
  "gen:types-check": "pnpm gen:types && git diff --exit-code src/generated/api.d.ts",
55
+ "gen:version-check": "pnpm gen:version && git diff --exit-code src/version.ts",
55
56
  "generate:docs": "tsx scripts/generate-docs.ts",
56
57
  "typecheck": "tsc --noEmit",
57
58
  "test": "vitest run"