@robot-admin/request-core 0.2.0 → 0.4.0
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 +102 -0
- package/LICENSE +21 -0
- package/README.md +248 -357
- package/SECURITY.md +14 -0
- package/dist/axios.cjs +134 -809
- package/dist/axios.cjs.map +1 -1
- package/dist/axios.d.cts +55 -220
- package/dist/axios.d.ts +55 -220
- package/dist/axios.js +2 -790
- package/dist/axios.js.map +1 -1
- package/dist/chunk-2JXH7SIL.js +711 -0
- package/dist/chunk-2JXH7SIL.js.map +1 -0
- package/dist/chunk-56QOEWUS.js +8 -0
- package/dist/chunk-56QOEWUS.js.map +1 -0
- package/dist/chunk-DUP3Y4DN.js +320 -0
- package/dist/chunk-DUP3Y4DN.js.map +1 -0
- package/dist/chunk-JGFRUAZT.cjs +1007 -0
- package/dist/chunk-JGFRUAZT.cjs.map +1 -0
- package/dist/chunk-KHI6XQRN.cjs +717 -0
- package/dist/chunk-KHI6XQRN.cjs.map +1 -0
- package/dist/chunk-OAZ5BUBU.js +969 -0
- package/dist/chunk-OAZ5BUBU.js.map +1 -0
- package/dist/chunk-QSDNDTOZ.js +28 -0
- package/dist/chunk-QSDNDTOZ.js.map +1 -0
- package/dist/chunk-UHXBAFY6.cjs +323 -0
- package/dist/chunk-UHXBAFY6.cjs.map +1 -0
- package/dist/chunk-WUZ43MLM.cjs +30 -0
- package/dist/chunk-WUZ43MLM.cjs.map +1 -0
- package/dist/chunk-WXHQXPS4.cjs +10 -0
- package/dist/chunk-WXHQXPS4.cjs.map +1 -0
- package/dist/crud.cjs +12 -484
- package/dist/crud.cjs.map +1 -1
- package/dist/crud.d.cts +8 -269
- package/dist/crud.d.ts +8 -269
- package/dist/crud.js +4 -487
- package/dist/crud.js.map +1 -1
- package/dist/index.cjs +136 -1302
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -165
- package/dist/index.d.ts +7 -165
- package/dist/index.js +5 -1283
- package/dist/index.js.map +1 -1
- package/dist/naive.cjs +14 -0
- package/dist/naive.cjs.map +1 -0
- package/dist/naive.d.cts +9 -0
- package/dist/naive.d.ts +9 -0
- package/dist/naive.js +5 -0
- package/dist/naive.js.map +1 -0
- package/dist/types-BRDRqYFs.d.cts +197 -0
- package/dist/types-BVJhlSuh.d.cts +310 -0
- package/dist/types-BVJhlSuh.d.ts +310 -0
- package/dist/types-CUyibJZX.d.ts +197 -0
- package/dist/vue.cjs +93 -0
- package/dist/vue.cjs.map +1 -0
- package/dist/vue.d.cts +38 -0
- package/dist/vue.d.ts +38 -0
- package/dist/vue.js +71 -0
- package/dist/vue.js.map +1 -0
- package/package.json +60 -16
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# @robot-admin/request-core
|
|
2
|
+
|
|
3
|
+
> `0.4.0` is the cumulative release candidate. The `0.2.1` and `0.3.0`
|
|
4
|
+
> sections below record the internal implementation milestones folded into it;
|
|
5
|
+
> they are not separate publication requirements.
|
|
6
|
+
|
|
7
|
+
## 0.4.0
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- Add a UI-independent Vue entry with `useRequest`, Client injection and a headless
|
|
12
|
+
`useTableCrud` supporting typed function handlers, filters, sorting and lifecycle
|
|
13
|
+
cancellation.
|
|
14
|
+
- Add independent initial/loading/refreshing/create/update/remove state and latest-wins
|
|
15
|
+
protection so stale list responses cannot overwrite current data.
|
|
16
|
+
- Prevent canceled/reset `useRequest` executions from committing stale results and
|
|
17
|
+
isolate lifecycle callback failures from real request outcomes.
|
|
18
|
+
- Add bounded batch deletion, configurable refresh-after-mutation, `createDraft`,
|
|
19
|
+
search/reset/sort methods and consistent RequestError state.
|
|
20
|
+
- Keep local rows and totals consistent when delete refresh is disabled, and isolate
|
|
21
|
+
presentation adapter failures from mutation results.
|
|
22
|
+
- Add `/naive` as a thin Message/Dialog compatibility adapter while retaining the root
|
|
23
|
+
and `/crud` APIs for existing applications.
|
|
24
|
+
- Rewrite the package and CRUD documentation so every documented API matches the
|
|
25
|
+
implementation and add a migration guide from 0.2.x.
|
|
26
|
+
|
|
27
|
+
## 0.3.0
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- Add `createRequestClient()` with an isolated Axios runtime, flat typed methods,
|
|
32
|
+
global policy defaults and explicit default-client opt-in.
|
|
33
|
+
- Add `join`, `takeLatest`, `takeFirst` and `allow` concurrency policies, request scopes,
|
|
34
|
+
cache controllers and lifecycle disposal.
|
|
35
|
+
- Add single-flight proactive refresh, concurrent 401 recovery and reauthentication
|
|
36
|
+
hooks with one-replay protection.
|
|
37
|
+
- Add `RequestError`, business response adapters, raw responses and observational
|
|
38
|
+
request hooks.
|
|
39
|
+
- Extend retry with `Retry-After`, maximum delay, elapsed-time budgets, lifecycle hooks
|
|
40
|
+
and unsafe-body protection.
|
|
41
|
+
|
|
42
|
+
## 0.2.1
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Scope cache, dedupe, cancellation and re-login state to each Axios instance, fixing
|
|
47
|
+
cross-backend and cross-tenant contamination.
|
|
48
|
+
- Share the selected default instance across root, ESM/CJS and subpath bundles and fix
|
|
49
|
+
the previously unusable standalone `/crud` path.
|
|
50
|
+
- Include baseURL and response type in request keys, fingerprint identity headers and
|
|
51
|
+
protect cached values from consumer mutation.
|
|
52
|
+
- Register error-only request/response interceptors, make global RegExp cancellation
|
|
53
|
+
whitelists deterministic and restrict implicit dedupe to safe methods.
|
|
54
|
+
- Correct direct-array CRUD extraction, null success checks and zero total parsing.
|
|
55
|
+
- Add package validation, LICENSE, SECURITY policy and regression coverage.
|
|
56
|
+
|
|
57
|
+
## 0.2.0
|
|
58
|
+
|
|
59
|
+
### Minor Changes
|
|
60
|
+
|
|
61
|
+
- Share one AbortController across caller signals, dedupe and route cancellation, and fix stale-request cleanup races.
|
|
62
|
+
- Retry only idempotent HTTP methods by default, add configurable method allowlists and ±25% jitter, and make backoff cancellation leak-free.
|
|
63
|
+
- Include authorization, tenant and user headers in default cache/dedupe keys to prevent cross-identity reuse.
|
|
64
|
+
- Implement shared re-login promises with explicit success/cancel settlement for concurrent 401 responses.
|
|
65
|
+
- Add `@robot-admin/request-core/axios` and `/crud` subpath exports, and make Axios a peer dependency to avoid duplicate-instance cancellation issues.
|
|
66
|
+
- Add regression tests for cancellation, concurrency, retry safety, cache identity and re-login coordination.
|
|
67
|
+
|
|
68
|
+
## 0.1.3
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- 更新 README 文档:
|
|
73
|
+
- 优化文档结构,更清晰直观
|
|
74
|
+
- 添加 30 秒快速上手指南
|
|
75
|
+
- 使用表格展示所有 API 和配置
|
|
76
|
+
- 添加完整示例和最佳实践
|
|
77
|
+
|
|
78
|
+
## 0.1.2
|
|
79
|
+
|
|
80
|
+
### Patch Changes
|
|
81
|
+
|
|
82
|
+
- Initial release of @robot-admin/request-core
|
|
83
|
+
|
|
84
|
+
Features:
|
|
85
|
+
|
|
86
|
+
- Axios wrapper with 7 built-in plugins (cache, retry, dedupe, cancel, request, response, reLogin)
|
|
87
|
+
- useTableCrud composable for table CRUD operations
|
|
88
|
+
- Full TypeScript support
|
|
89
|
+
- Vue 3 and Naive UI integration
|
|
90
|
+
|
|
91
|
+
## 0.1.1
|
|
92
|
+
|
|
93
|
+
### Patch Changes
|
|
94
|
+
|
|
95
|
+
- Initial release of @robot-admin/request-core
|
|
96
|
+
|
|
97
|
+
Features:
|
|
98
|
+
|
|
99
|
+
- Axios wrapper with 7 built-in plugins (cache, retry, dedupe, cancel, request, response, reLogin)
|
|
100
|
+
- useTableCrud composable for table CRUD operations
|
|
101
|
+
- Full TypeScript support
|
|
102
|
+
- Vue 3 and Naive UI integration
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 CHENY
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|