@dxtmisha/functional-basic 1.2.4 → 1.2.6
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 +19 -0
- package/ai-description.txt +3 -3
- package/ai-types.txt +819 -1553
- package/dist/library.js +536 -438
- package/dist/src/classes/ApiDataReturn.d.ts +4 -1
- package/dist/src/classes/ApiError.d.ts +39 -0
- package/dist/src/classes/ApiErrorItem.d.ts +70 -0
- package/dist/src/classes/ApiErrorStorage.d.ts +84 -0
- package/dist/src/classes/ApiInstance.d.ts +4 -3
- package/dist/src/library.d.ts +3 -0
- package/dist/src/types/apiTypes.d.ts +32 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.2.5] - 2026-05-17
|
|
6
|
+
|
|
7
|
+
### Changed / Improved
|
|
8
|
+
- **AI Integration**: Updated the library's descriptive context (`ai-description.txt`) to better emphasize its isomorphic SSR architecture, centralized error management capabilities (`ErrorCenter`), and context-isolated storage abstractions.
|
|
9
|
+
- **AI Types**: Regenerated and expanded `ai-types.txt` to correctly map the recently introduced type architectures, including `ApiErrorStorageItem`, `ApiHeadersValue`, `ApiDefaultValue`, and updated Open Graph / Twitter Card meta tag enums. This ensures AI assistants have an accurate and up-to-date understanding of the core functional library.
|
|
10
|
+
|
|
11
|
+
## [1.2.4] - 2026-05-16
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **ApiError**: Introduced a comprehensive system for centralized API error identification and management, including `ApiError` (static utility), `ApiErrorStorage` (manager), and `ApiErrorItem` (data wrapper).
|
|
15
|
+
- **ApiError**: Added a static `add()` helper to simplify the registration of new error patterns directly through the primary utility class.
|
|
16
|
+
|
|
17
|
+
### Changed / Improved
|
|
18
|
+
- **ApiInstance**: Integrated the new error handling system into the core request lifecycle. It now automatically identifies errors during failed requests and passes structured error data to downstream handlers.
|
|
19
|
+
- **ApiDataReturn**: Enhanced response processing to support the new error system. It now automatically extracts error metadata (code, message) from nested error objects and attaches the identified `ApiErrorItem` to the final result.
|
|
20
|
+
- **Api**: Updated the main API overview documentation to include detailed sections on Status tracking and Error identification.
|
|
21
|
+
- **Documentation**: Completed a full multilingual documentation cycle (EN, RU, VI) for the `ApiError` system and updated the core `Api` documentation to reflect new capabilities.
|
|
22
|
+
- **Types**: Standardized `setHeaders` and `setRequestDefault` in `ApiInstance` to use the new named types for better consistency.
|
|
23
|
+
|
|
5
24
|
## [1.2.3] - 2026-05-16
|
|
6
25
|
|
|
7
26
|
### Added
|
package/ai-description.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
This library is a high-level utility
|
|
1
|
+
This library is a high-level isomorphic utility suite for frontend application development, specifically optimized for Server-Side Rendering (SSR) environments. Its core purpose is to provide a standardized, context-isolated architecture for HTTP transport, internationalization (i18n), error management, metadata control, and DOM state synchronization.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Study this library's API when implementing standardized Fetch-based request logic featuring built-in caching, jittered retries, and automated SSR hydration; managing dynamic SEO metadata (Open Graph and Twitter Cards) with DOM-synchronization; or implementing complex locale-aware data formatting including currencies, relative times, and country-specific phone masks. It is indispensable for handling SSR data isolation via specialized storage abstractions (ServerStorage, DataStorage) and for executing high-performance client-side search with regex-based match highlighting. The library also provides advanced lifecycle management for DOM events, including specialized observers for element resizing and scroll-sync optimizations.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Technically, it acts as an abstracted transport and utility layer between native Web APIs (Fetch, Intl, BroadcastChannel, ResizeObserver) and application-level logic. It facilitates data consistency between server and client through script-based hydration and provides a centralized ErrorCenter for standardized fault handling across disparate application modules.
|