@hyper-fetch/core 6.0.0 โ 7.0.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/.eslintrc.json +8 -3
- package/README.md +5 -5
- package/dist/browser/index.js +3711 -0
- package/dist/browser/index.js.map +7 -0
- package/dist/index.d.ts +1669 -1091
- package/dist/index.js +3949 -0
- package/dist/index.js.map +7 -0
- package/package.json +16 -18
- package/src/adapter/adapter.bindings.ts +261 -165
- package/src/adapter/adapter.ts +480 -8
- package/src/adapter/adapter.types.ts +111 -139
- package/src/adapter/adapter.utils.ts +71 -25
- package/src/adapter/index.ts +1 -2
- package/src/cache/cache.events.ts +58 -14
- package/src/cache/cache.ts +158 -91
- package/src/cache/cache.types.ts +15 -25
- package/src/cache/cache.utils.ts +17 -10
- package/src/client/client.create.ts +17 -0
- package/src/client/client.ts +247 -266
- package/src/client/client.types.ts +43 -21
- package/src/client/client.utils.ts +7 -168
- package/src/client/index.ts +1 -0
- package/src/constants/http.constants.ts +6 -6
- package/src/constants/time.constants.ts +10 -10
- package/src/dispatcher/dispatcher.constants.ts +5 -5
- package/src/dispatcher/dispatcher.events.ts +85 -20
- package/src/dispatcher/dispatcher.ts +265 -199
- package/src/dispatcher/dispatcher.types.ts +6 -7
- package/src/dispatcher/dispatcher.utils.ts +26 -10
- package/src/http-adapter/http-adapter.browser.ts +101 -0
- package/src/http-adapter/http-adapter.constants.ts +8 -0
- package/src/http-adapter/http-adapter.server.ts +134 -0
- package/src/http-adapter/http-adapter.ts +11 -0
- package/src/http-adapter/http-adapter.types.ts +86 -0
- package/src/http-adapter/http-adapter.utils.ts +177 -0
- package/src/http-adapter/index.ts +4 -0
- package/src/index.ts +2 -1
- package/src/managers/app/app.manager.constants.ts +4 -4
- package/src/managers/app/app.manager.events.ts +12 -12
- package/src/managers/app/app.manager.ts +10 -7
- package/src/managers/app/app.manager.utils.ts +12 -2
- package/src/managers/logger/logger.manager.constants.ts +13 -18
- package/src/managers/logger/logger.manager.ts +37 -49
- package/src/managers/logger/logger.manager.types.ts +32 -21
- package/src/managers/logger/logger.manager.utils.ts +23 -17
- package/src/managers/request/request.manager.events.ts +222 -109
- package/src/managers/request/request.manager.ts +5 -2
- package/src/managers/request/request.manager.types.ts +35 -7
- package/src/managers/request/request.manager.utils.ts +29 -17
- package/src/mocker/mocker.ts +115 -81
- package/src/mocker/mocker.types.ts +29 -25
- package/src/plugin/index.ts +2 -0
- package/src/plugin/plugin.ts +159 -0
- package/src/plugin/plugin.types.ts +181 -0
- package/src/request/request.ts +371 -323
- package/src/request/request.types.ts +136 -145
- package/src/request/request.utils.ts +31 -30
- package/src/types/adapter.types.ts +63 -0
- package/src/types/client.types.ts +3 -3
- package/src/types/helpers.types.ts +16 -3
- package/src/types/hydration.types.ts +16 -0
- package/src/types/index.ts +3 -1
- package/src/types/request.types.ts +73 -0
- package/src/utils/emitter.utils.ts +52 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/uuid.utils.ts +4 -2
- package/tsconfig.base.json +4 -5
- package/tsconfig.json +5 -4
- package/dist/browser/index.cjs.js +0 -2420
- package/dist/browser/index.cjs.js.map +0 -7
- package/dist/browser/index.esm.js +0 -2395
- package/dist/browser/index.esm.js.map +0 -7
- package/dist/index.cjs.js +0 -2579
- package/dist/index.cjs.js.map +0 -7
- package/dist/index.esm.js +0 -2474
- package/dist/index.esm.js.map +0 -7
- package/src/adapter/adapter.browser.ts +0 -100
- package/src/adapter/adapter.constants.ts +0 -8
- package/src/adapter/adapter.server.ts +0 -93
- package/src/effect/index.ts +0 -2
- package/src/effect/request.effect.ts +0 -31
- package/src/effect/request.effect.types.ts +0 -44
- package/src/types/fetch.types.ts +0 -50
package/.eslintrc.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": ["../../.eslintrc.
|
|
2
|
+
"extends": ["plugin:@nx/react", "../../.eslintrc.js"],
|
|
3
3
|
"parserOptions": {
|
|
4
|
-
"project": ["./tsconfig.json"
|
|
5
|
-
}
|
|
4
|
+
"project": ["./tsconfig.json"]
|
|
5
|
+
},
|
|
6
|
+
"rules": {
|
|
7
|
+
"react/jsx-props-no-spreading": 0,
|
|
8
|
+
"react/require-default-props": 0
|
|
9
|
+
},
|
|
10
|
+
"ignorePatterns": ["dist/", "coverage/", "jest.config.ts", "/*.js"]
|
|
6
11
|
}
|
package/README.md
CHANGED
|
@@ -42,17 +42,17 @@ particular `caching`, `queuing`, `persistence`, `offline first support`, `reques
|
|
|
42
42
|
|
|
43
43
|
๐ **Queueing** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/advanced/queueing)
|
|
44
44
|
|
|
45
|
-
๐ **Automatic caching** - [Read more](https://hyperfetch.bettertyped.com/docs/
|
|
45
|
+
๐ **Automatic caching** - [Read more](https://hyperfetch.bettertyped.com/docs/core/cache)
|
|
46
46
|
|
|
47
47
|
๐ช **Persistence** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/advanced/persistence)
|
|
48
48
|
|
|
49
|
-
๐ **SSR Support** - [Read more](https://hyperfetch.bettertyped.com/docs/
|
|
49
|
+
๐ **SSR Support** - [Read more](https://hyperfetch.bettertyped.com/docs/getting-started/environment)
|
|
50
50
|
|
|
51
51
|
๐ **Offline First** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/advanced/offline)
|
|
52
52
|
|
|
53
|
-
๐ก **Built-in adapter** - [Read more](https://hyperfetch.bettertyped.com/docs/
|
|
53
|
+
๐ก **Built-in adapter** - [Read more](https://hyperfetch.bettertyped.com/docs/core/adapter)
|
|
54
54
|
|
|
55
|
-
๐งช **Easy to test** - [Read more](https://hyperfetch.bettertyped.com/docs/
|
|
55
|
+
๐งช **Easy to test** - [Read more](https://hyperfetch.bettertyped.com/docs/getting-started/testing)
|
|
56
56
|
|
|
57
57
|
๐ **Authentication** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/basic/authentication)
|
|
58
58
|
|
|
@@ -64,7 +64,7 @@ particular `caching`, `queuing`, `persistence`, `offline first support`, `reques
|
|
|
64
64
|
|
|
65
65
|
## Sources
|
|
66
66
|
|
|
67
|
-
- #### [Installation](https://hyperfetch.bettertyped.com/docs/
|
|
67
|
+
- #### [Installation](https://hyperfetch.bettertyped.com/docs/getting-started/installation)
|
|
68
68
|
- #### [Docs](https://hyperfetch.bettertyped.com/)
|
|
69
69
|
- #### [API](https://hyperfetch.bettertyped.com/api/)
|
|
70
70
|
- #### [NPM](https://www.npmjs.com/package/@hyper-fetch/core)
|