@dxtmisha/functional-basic 1.1.7 → 1.1.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 +13 -0
- package/dist/library.js +1 -1
- package/dist/types/apiTypes.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.1.8] - 2026-05-12
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Api**: Added `isLocalhost()` static method to check if the environment is localhost.
|
|
9
|
+
- **Api**: Added static wrappers for `getOrigin()`, `setOrigin()`, and `getHydrationScript()`.
|
|
10
|
+
- **Api**: Added automatic URL replacement for localization markers: `{locale}`, `{country}`, and `{language}`.
|
|
11
|
+
|
|
12
|
+
### Changed / Improved
|
|
13
|
+
- **Api**: Updated `setConfig()` to include `origin` and `devMode` support.
|
|
14
|
+
- **Api**: Modernized request timeout logic to use `AbortSignal.timeout` when available.
|
|
15
|
+
- **Documentation**: Comprehensive update of the `Api` documentation across all supported languages (RU/EN/VI).
|
|
16
|
+
- **Tests**: Expanded unit tests for the `Api` class to ensure full coverage of static methods.
|
|
17
|
+
|
|
5
18
|
## [1.1.6] - 2026-05-08
|
|
6
19
|
|
|
7
20
|
### Added
|
package/dist/library.js
CHANGED
|
@@ -1553,7 +1553,7 @@ var Le = "d-response-loading", Re = class {
|
|
|
1553
1553
|
this.getItem().setOrigin(e);
|
|
1554
1554
|
}
|
|
1555
1555
|
static setConfig(e) {
|
|
1556
|
-
e && n(e) && (e.urlRoot && this.setUrl(e.urlRoot), e.headers && this.setHeaders(e.headers), e.requestDefault && this.setRequestDefault(e.requestDefault), e.preparation && this.setPreparation(e.preparation), e.end && this.setEnd(e.end), e.timeout && this.setTimeout(e.timeout), e.origin && this.setOrigin(e.origin));
|
|
1556
|
+
e && n(e) && (e.urlRoot && this.setUrl(e.urlRoot), e.headers && this.setHeaders(e.headers), e.requestDefault && this.setRequestDefault(e.requestDefault), e.preparation && this.setPreparation(e.preparation), e.end && this.setEnd(e.end), e.timeout && this.setTimeout(e.timeout), e.devMode && this.getResponse().setDevMode(e.devMode), e.origin && this.setOrigin(e.origin));
|
|
1557
1557
|
}
|
|
1558
1558
|
static async request(e) {
|
|
1559
1559
|
return this.getItem().request(e);
|
package/dist/types/apiTypes.d.ts
CHANGED
|
@@ -62,6 +62,8 @@ export type ApiConfig = {
|
|
|
62
62
|
end?: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>;
|
|
63
63
|
/** Timeout for the request in milliseconds/ Таймаут запроса в миллисекундах */
|
|
64
64
|
timeout?: number;
|
|
65
|
+
/** Enable development logging/ Включить логирование разработки */
|
|
66
|
+
devMode?: boolean;
|
|
65
67
|
};
|
|
66
68
|
/**
|
|
67
69
|
* Shape of API response data wrapper/ Структура обёртки данных ответа API
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxtmisha/functional-basic",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.8",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Foundational utility library for modern web development — HTTP client, geolocation, i18n, SEO meta tags, caching, storage, DOM utilities, and more. Framework-agnostic, zero dependencies, TypeScript-first.",
|
|
7
7
|
"keywords": [
|