@hashrytech/quick-components-kit 0.12.6 → 0.12.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @hashrytech/quick-components-kit
2
2
 
3
+ ## 0.12.8
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: api client small issue fix
8
+
9
+ ## 0.12.7
10
+
11
+ ### Patch Changes
12
+
13
+ - fix: Fixing api client and problem details
14
+
3
15
  ## 0.12.6
4
16
 
5
17
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { type ProblemDetail } from "./problem-details";
1
+ import { type ProblemDetail } from "./problem-details.js";
2
2
  /**
3
3
  * @file This module defines a generic REST API client for SvelteKit applications.
4
4
  * It provides methods for standard HTTP operations (GET, POST, PUT, PATCH, DELETE),
@@ -1,5 +1,5 @@
1
1
  // src/lib/api/client.ts
2
- import { getProblemDetail } from "./problem-details";
2
+ import { getProblemDetail } from "./problem-details.js";
3
3
  /**
4
4
  * Custom error class for API responses.
5
5
  * Provides access to the HTTP status code.
@@ -234,7 +234,7 @@ export class ApiClient {
234
234
  const isApiError = error instanceof ApiError;
235
235
  const status = isApiError ? error.status : 503; // // Service Unavailable fallback
236
236
  const message = error instanceof Error ? error.message : 'Unexpected error occurred';
237
- const errorObj = getProblemDetail({ status, title: "Server fetch error", type: "/exceptions/fetch-error/", detail: "Error fetching data from API", error: { server: [message] } });
237
+ const errorObj = getProblemDetail({ status, title: "Server fetch error", type: "/exceptions/fetch-error/", detail: "Error fetching data from API", server: message });
238
238
  return {
239
239
  ok: false,
240
240
  status,
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hashrytech/quick-components-kit.git"
7
7
  },
8
- "version": "0.12.6",
8
+ "version": "0.12.8",
9
9
  "license": "MIT",
10
10
  "author": "Hashry Tech",
11
11
  "files": [