nitro-web 0.0.97 → 0.0.98
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/client/index.ts +3 -3
- package/package.json +1 -1
- package/types/util.d.ts +1 -1
- package/types.ts +3 -3
- package/util.js +1 -1
package/client/index.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// const pi = parseFloat(3.142)
|
|
2
2
|
import '../types/globals.d.ts'
|
|
3
3
|
|
|
4
|
-
// Utility functions (use export path for js declarations to work in host projects)
|
|
4
|
+
// Utility functions (since this file is an export, use export path for js declarations to work in host projects)
|
|
5
5
|
export * from 'nitro-web/util'
|
|
6
6
|
export * as util from 'nitro-web/util'
|
|
7
7
|
|
|
8
|
-
// Main types
|
|
9
|
-
export * from 'types'
|
|
8
|
+
// Main types (since this file is an export, this needs to be a relative path, we cant use tsconfig path aliases)
|
|
9
|
+
export * from '../types'
|
|
10
10
|
|
|
11
11
|
// Main app functions
|
|
12
12
|
export { setupApp, updateJwt } from './app'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-web",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.98",
|
|
4
4
|
"repository": "github:boycce/nitro-web",
|
|
5
5
|
"homepage": "https://boycce.github.io/nitro-web/",
|
|
6
6
|
"description": "Nitro is a battle-tested, modular base project to turbocharge your projects, styled using Tailwind 🚀",
|
package/types/util.d.ts
CHANGED
|
@@ -803,7 +803,7 @@ export type AxiosResponse = import("axios").AxiosResponse;
|
|
|
803
803
|
*/
|
|
804
804
|
export type IAxiosRetryConfigExtended = import("axios-retry").IAxiosRetryConfigExtended;
|
|
805
805
|
/**
|
|
806
|
-
* We only need to fix the `get` method, the rest of the methods inherit the new extended config
|
|
806
|
+
* We only need to fix the `get` method, the rest of the methods inherit the new extended config...
|
|
807
807
|
*/
|
|
808
808
|
export type AxiosRequestConfigWithRetry = AxiosRequestConfig & {
|
|
809
809
|
"axios-retry"?: IAxiosRetryConfigExtended;
|
package/types.ts
CHANGED
|
@@ -60,16 +60,16 @@ export type Store = {
|
|
|
60
60
|
export type Svg = React.FC<React.SVGProps<SVGElement>>
|
|
61
61
|
|
|
62
62
|
/*
|
|
63
|
+
// Create an `axios` instance type that contains the `axios-retry` global declarations.
|
|
63
64
|
import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'
|
|
64
65
|
import type { IAxiosRetryConfigExtended } from 'axios-retry'
|
|
65
66
|
|
|
66
|
-
// Extend the config
|
|
67
|
+
// Extend the config to be used below
|
|
67
68
|
export interface AxiosRequestConfigWithRetry extends AxiosRequestConfig {
|
|
68
69
|
'axios-retry'?: IAxiosRetryConfigExtended
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
//
|
|
72
|
-
// Update, it seems we only need to fix the get method, the rest will inherit the new extended config?
|
|
72
|
+
// We only need to fix the `get` method, the rest of the methods inherit the new extended config...
|
|
73
73
|
export interface AxiosInstanceWithRetry extends Omit<AxiosInstance, 'get'> { // | 'patch' | 'post' | 'put' | 'delete' | 'request'
|
|
74
74
|
get<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfigWithRetry): Promise<R>;
|
|
75
75
|
// patch<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfigWithRetry): Promise<R>;
|
package/util.js
CHANGED
|
@@ -16,7 +16,7 @@ import { twMerge as _twMerge } from 'tailwind-merge'
|
|
|
16
16
|
* Extend the config to be used below
|
|
17
17
|
* @typedef {AxiosRequestConfig & { 'axios-retry'?: IAxiosRetryConfigExtended }} AxiosRequestConfigWithRetry
|
|
18
18
|
*
|
|
19
|
-
* We only need to fix the `get` method, the rest of the methods inherit the new extended config
|
|
19
|
+
* We only need to fix the `get` method, the rest of the methods inherit the new extended config...
|
|
20
20
|
* @typedef {Omit<AxiosInstance, 'get'> & {
|
|
21
21
|
* get<T = any, R = AxiosResponse, D = any>(url: string, config?: AxiosRequestConfigWithRetry): Promise<R>
|
|
22
22
|
* }} AxiosInstanceWithRetry
|