@schorts/shared-kernel 1.2.0 → 1.2.1

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 CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.2.1] - 2025-10-03
9
+
10
+ ### Changed
11
+
12
+ - `FetchHTTPProvider` now supports the `credentials` options.
13
+
8
14
  ## [1.2.0] - 2025-10-02
9
15
 
10
16
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schorts/shared-kernel",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "A modular, type-safe foundation for building expressive, maintainable applications. This package provides core abstractions for domain modeling, HTTP integration, authentication, state management, and more — designed to be framework-agnostic and highly extensible.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -3,6 +3,11 @@ import { HTTPException } from "./exceptions";
3
3
 
4
4
  export class FetchHTTPProvider implements HTTPProvider {
5
5
  private ongoingRequests = new Map<string, Promise<any>>();
6
+ private readonly init: Pick<RequestInit, "credentials">;
7
+
8
+ constructor(init: Pick<RequestInit, "credentials">) {
9
+ this.init = init;
10
+ }
6
11
 
7
12
  get<ResponseType>(url: URL): Promise<ResponseType> {
8
13
  return this.request("GET", url);
@@ -54,7 +59,7 @@ export class FetchHTTPProvider implements HTTPProvider {
54
59
  }
55
60
 
56
61
  const request = (async () => {
57
- const response = await fetch(url.href, init);
62
+ const response = await fetch(url.href, { ...init, ...this.init });
58
63
 
59
64
  if (!response) {
60
65
  throw new HTTPException("Fetch returned undefined", 0);