@theholocron/http-client 1.58.0-alpha.4 → 1.58.0-alpha.8

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 CHANGED
@@ -1,3 +1,5 @@
1
+ <!-- alex disable fires -->
2
+
1
3
  # @theholocron/http-client
2
4
 
3
5
  Shared HTTP primitives for theholocron tooling — REST client factory, token resolver, and base error types. Used internally by `@theholocron/cli` and all plugin packages; publish your own clients on top of it.
@@ -1,9 +1,18 @@
1
+ /** One request a stubbed `fetch` received. */
1
2
  export interface FetchCall {
3
+ /** The address that was requested. */
2
4
  url: string;
5
+ /** The HTTP method, upper-cased; `GET` when none was given. */
3
6
  method: string;
7
+ /** The request headers, as given. */
4
8
  headers: Record<string, string>;
9
+ /** The body: parsed when it was a JSON string, as given otherwise, and `null` when there was none. */
5
10
  body: unknown;
6
11
  }
12
+ /**
13
+ * A `fetch` that answers each call with the next of `responses` (a 200 with an empty body once they run out) and
14
+ * records every call it receives.
15
+ */
7
16
  export declare function stubFetch(responses: Array<{
8
17
  status?: number;
9
18
  body?: unknown;
package/dist/testing.mjs CHANGED
@@ -3,6 +3,10 @@ import { vi } from "vitest";
3
3
  /* v8 ignore file -- exercised by other packages' test suites, not this package's own; a source-level
4
4
  * directive survives regardless of which vitest config resolves (local vs. shared), unlike a
5
5
  * config-file `coverage.exclude` entry. */
6
+ /**
7
+ * A `fetch` that answers each call with the next of `responses` (a 200 with an empty body once they run out) and
8
+ * records every call it receives.
9
+ */
6
10
  function stubFetch(responses) {
7
11
  const calls = [];
8
12
  let i = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/http-client",
3
- "version": "1.58.0-alpha.4",
3
+ "version": "1.58.0-alpha.8",
4
4
  "description": "Shared HTTP primitives for theholocron — REST client factory, auth resolver, and error types",
5
5
  "keywords": [
6
6
  "typescript",
@@ -36,23 +36,23 @@
36
36
  "dist"
37
37
  ],
38
38
  "dependencies": {
39
- "@theholocron/env-utils": "^1.16.1-alpha.3",
40
- "@theholocron/observability": "^0.6.1-alpha.1"
39
+ "@theholocron/env-utils": "^1.17.0-alpha.1",
40
+ "@theholocron/observability": "^0.7.0-alpha.1"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^26",
44
44
  "@vitest/coverage-v8": "^5.0.5",
45
- "@vitest/eslint-plugin": "^1.6.27",
46
- "eslint": "^10.8.1",
47
- "eslint-plugin-n": "^18.3.0",
48
- "globals": "^17.11.0",
49
- "tsdown": "^0.23.3",
45
+ "@vitest/eslint-plugin": "^1.6.28",
46
+ "eslint": "^10.14.0",
47
+ "eslint-plugin-n": "^18.5.0",
48
+ "globals": "^17.14.0",
49
+ "tsdown": "^0.23.4",
50
50
  "typescript": "^5.9.3",
51
51
  "vitest": "^5.0.5",
52
- "@theholocron/tsconfig": "^8.9.0-alpha.5",
53
- "@theholocron/tsdown-config": "^8.9.0-alpha.5",
54
- "@theholocron/eslint-config": "^8.9.0-alpha.5",
55
- "@theholocron/vitest-config": "^8.9.0-alpha.5"
52
+ "@theholocron/eslint-config": "^8.9.0-alpha.8",
53
+ "@theholocron/tsconfig": "^8.9.0-alpha.8",
54
+ "@theholocron/tsdown-config": "^8.9.0-alpha.8",
55
+ "@theholocron/vitest-config": "^8.9.0-alpha.8"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "vitest": ">=4.0.0"
@@ -69,10 +69,10 @@
69
69
  "access": "public"
70
70
  },
71
71
  "scripts": {
72
- "delivery.build": "tsdown && node ../scripts/check-bundle-size.mjs",
73
- "sourceQuality.staticAnalysis": "eslint .",
72
+ "build": "tsdown && node ../scripts/check-bundle-size.mjs",
73
+ "lint:code": "eslint .",
74
+ "test:unit": "vitest run --coverage",
74
75
  "test:watch": "vitest",
75
- "verification.typeSafety": "tsc --noEmit",
76
- "verification.unitTests": "vitest run"
76
+ "typecheck": "tsc --noEmit"
77
77
  }
78
78
  }