@huangqi_an/request 0.0.0-stage → 0.2.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.
Files changed (55) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +580 -2
  3. package/dist/adapters/axios.d.ts +11 -0
  4. package/dist/adapters/axios.js +56 -0
  5. package/dist/adapters/axios.js.map +1 -0
  6. package/dist/adapters/fetch.d.ts +12 -0
  7. package/dist/adapters/fetch.js +109 -0
  8. package/dist/adapters/fetch.js.map +1 -0
  9. package/dist/adapters/uniapp.d.ts +13 -0
  10. package/dist/adapters/uniapp.js +92 -0
  11. package/dist/adapters/uniapp.js.map +1 -0
  12. package/dist/chunk-FY6YU3PV.js +23 -0
  13. package/dist/chunk-FY6YU3PV.js.map +1 -0
  14. package/dist/chunk-GMJTG6KM.js +156 -0
  15. package/dist/chunk-GMJTG6KM.js.map +1 -0
  16. package/dist/chunk-KLAI63DX.js +26 -0
  17. package/dist/chunk-KLAI63DX.js.map +1 -0
  18. package/dist/chunk-OV6LXQTN.js +37 -0
  19. package/dist/chunk-OV6LXQTN.js.map +1 -0
  20. package/dist/chunk-UCTOFBDY.js +27 -0
  21. package/dist/chunk-UCTOFBDY.js.map +1 -0
  22. package/dist/chunk-Z4N22SLG.js +28 -0
  23. package/dist/chunk-Z4N22SLG.js.map +1 -0
  24. package/dist/core.d.ts +61 -0
  25. package/dist/core.js +12 -0
  26. package/dist/core.js.map +1 -0
  27. package/dist/enhancers/dedupe.d.ts +29 -0
  28. package/dist/enhancers/dedupe.js +37 -0
  29. package/dist/enhancers/dedupe.js.map +1 -0
  30. package/dist/enhancers/retry.d.ts +38 -0
  31. package/dist/enhancers/retry.js +47 -0
  32. package/dist/enhancers/retry.js.map +1 -0
  33. package/dist/errors.d.ts +1 -0
  34. package/dist/errors.js +11 -0
  35. package/dist/errors.js.map +1 -0
  36. package/dist/index.d.ts +2 -0
  37. package/dist/index.js +19 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/interceptors/auth.d.ts +17 -0
  40. package/dist/interceptors/auth.js +7 -0
  41. package/dist/interceptors/auth.js.map +1 -0
  42. package/dist/interceptors/index.d.ts +5 -0
  43. package/dist/interceptors/index.js +20 -0
  44. package/dist/interceptors/index.js.map +1 -0
  45. package/dist/interceptors/logger.d.ts +25 -0
  46. package/dist/interceptors/logger.js +7 -0
  47. package/dist/interceptors/logger.js.map +1 -0
  48. package/dist/interceptors/request-id.d.ts +23 -0
  49. package/dist/interceptors/request-id.js +7 -0
  50. package/dist/interceptors/request-id.js.map +1 -0
  51. package/dist/interceptors/unwrap.d.ts +22 -0
  52. package/dist/interceptors/unwrap.js +8 -0
  53. package/dist/interceptors/unwrap.js.map +1 -0
  54. package/dist/types-DSmcNU2O.d.ts +146 -0
  55. package/package.json +109 -4
package/package.json CHANGED
@@ -1,6 +1,111 @@
1
1
  {
2
2
  "name": "@huangqi_an/request",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "统一请求层:零依赖 core + 按需导入的 adapter 插件(fetch / axios / uni-app)",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "huangqi-an <94596499+huangqi-an@users.noreply.github.com>",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ },
13
+ "./core": {
14
+ "types": "./dist/core.d.ts",
15
+ "import": "./dist/core.js"
16
+ },
17
+ "./errors": {
18
+ "types": "./dist/errors.d.ts",
19
+ "import": "./dist/errors.js"
20
+ },
21
+ "./adapters/fetch": {
22
+ "types": "./dist/adapters/fetch.d.ts",
23
+ "import": "./dist/adapters/fetch.js"
24
+ },
25
+ "./adapters/axios": {
26
+ "types": "./dist/adapters/axios.d.ts",
27
+ "import": "./dist/adapters/axios.js"
28
+ },
29
+ "./adapters/uniapp": {
30
+ "types": "./dist/adapters/uniapp.d.ts",
31
+ "import": "./dist/adapters/uniapp.js"
32
+ },
33
+ "./interceptors": {
34
+ "types": "./dist/interceptors/index.d.ts",
35
+ "import": "./dist/interceptors/index.js"
36
+ },
37
+ "./interceptors/auth": {
38
+ "types": "./dist/interceptors/auth.d.ts",
39
+ "import": "./dist/interceptors/auth.js"
40
+ },
41
+ "./interceptors/request-id": {
42
+ "types": "./dist/interceptors/request-id.d.ts",
43
+ "import": "./dist/interceptors/request-id.js"
44
+ },
45
+ "./interceptors/unwrap": {
46
+ "types": "./dist/interceptors/unwrap.d.ts",
47
+ "import": "./dist/interceptors/unwrap.js"
48
+ },
49
+ "./interceptors/logger": {
50
+ "types": "./dist/interceptors/logger.d.ts",
51
+ "import": "./dist/interceptors/logger.js"
52
+ },
53
+ "./enhancers/retry": {
54
+ "types": "./dist/enhancers/retry.d.ts",
55
+ "import": "./dist/enhancers/retry.js"
56
+ },
57
+ "./enhancers/dedupe": {
58
+ "types": "./dist/enhancers/dedupe.d.ts",
59
+ "import": "./dist/enhancers/dedupe.js"
60
+ },
61
+ "./package.json": "./package.json"
62
+ },
63
+ "main": "./dist/index.js",
64
+ "types": "./dist/index.d.ts",
65
+ "files": [
66
+ "dist"
67
+ ],
68
+ "engines": {
69
+ "node": ">=18"
70
+ },
71
+ "scripts": {
72
+ "build": "tsup",
73
+ "test": "vitest run",
74
+ "typecheck": "tsc --noEmit",
75
+ "prepublishOnly": "npm run typecheck && npm run test && npm run build"
76
+ },
77
+ "peerDependencies": {
78
+ "axios": "^1.7.0"
79
+ },
80
+ "peerDependenciesMeta": {
81
+ "axios": {
82
+ "optional": true
83
+ }
84
+ },
85
+ "devDependencies": {
86
+ "@types/node": "^26.6.6",
87
+ "axios": "^1.7.0",
88
+ "tsup": "^9.0.0",
89
+ "typescript": "^5.6.0",
90
+ "vitest": "^3.0.0"
91
+ },
92
+ "publishConfig": {
93
+ "access": "public",
94
+ "registry": "https://registry.npmjs.org/"
95
+ },
96
+ "repository": {
97
+ "type": "git",
98
+ "url": "git+https://github.com/huangqi-an/request.git"
99
+ },
100
+ "keywords": [
101
+ "request",
102
+ "http",
103
+ "axios",
104
+ "fetch",
105
+ "uni-app",
106
+ "uniapp",
107
+ "miniprogram",
108
+ "adapter",
109
+ "interceptor"
110
+ ]
111
+ }