@xyo-network/axios
Advanced tools
Comparing version 2.43.7 to 2.43.8
@@ -1,7 +0,7 @@ | ||
import { Axios, AxiosRequestConfig } from 'axios'; | ||
export type AxiosJsonRequestConfig<D = any> = AxiosRequestConfig<D> & { | ||
import { Axios, RawAxiosRequestConfig } from 'axios'; | ||
export type RawAxiosJsonRequestConfig<D = any> = RawAxiosRequestConfig<D> & { | ||
compressLength?: number; | ||
}; | ||
export declare class AxiosJson extends Axios { | ||
constructor(config?: AxiosJsonRequestConfig); | ||
constructor(config?: RawAxiosJsonRequestConfig); | ||
private static axiosConfig; | ||
@@ -8,0 +8,0 @@ private static buildHeaders; |
@@ -27,3 +27,3 @@ { | ||
"character": 2, | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/bf6140cd5/packages/sdk/packages/axios/src/AxiosJson.ts#L8" | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/9ca7aff1a/packages/sdk/packages/axios/src/AxiosJson.ts#L8" | ||
} | ||
@@ -56,3 +56,3 @@ ], | ||
], | ||
"name": "AxiosJsonRequestConfig" | ||
"name": "RawAxiosJsonRequestConfig" | ||
} | ||
@@ -91,3 +91,3 @@ } | ||
"character": 17, | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/bf6140cd5/packages/sdk/packages/axios/src/AxiosJson.ts#L12" | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/9ca7aff1a/packages/sdk/packages/axios/src/AxiosJson.ts#L12" | ||
} | ||
@@ -118,3 +118,3 @@ ], | ||
], | ||
"name": "AxiosJsonRequestConfig" | ||
"name": "RawAxiosJsonRequestConfig" | ||
}, | ||
@@ -126,2 +126,3 @@ "defaultValue": "{}" | ||
"type": "reference", | ||
"id": 1, | ||
"typeArguments": [ | ||
@@ -133,5 +134,3 @@ { | ||
], | ||
"name": "AxiosRequestConfig", | ||
"qualifiedName": "AxiosRequestConfig", | ||
"package": "axios" | ||
"name": "RawAxiosJsonRequestConfig" | ||
} | ||
@@ -155,3 +154,3 @@ } | ||
"character": 17, | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/bf6140cd5/packages/sdk/packages/axios/src/AxiosJson.ts#L36" | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/9ca7aff1a/packages/sdk/packages/axios/src/AxiosJson.ts#L36" | ||
} | ||
@@ -251,3 +250,3 @@ ], | ||
"character": 13, | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/bf6140cd5/packages/sdk/packages/axios/src/AxiosJson.ts#L7" | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/9ca7aff1a/packages/sdk/packages/axios/src/AxiosJson.ts#L7" | ||
} | ||
@@ -266,3 +265,3 @@ ], | ||
"id": 1, | ||
"name": "AxiosJsonRequestConfig", | ||
"name": "RawAxiosJsonRequestConfig", | ||
"kind": 4194304, | ||
@@ -276,3 +275,3 @@ "kindString": "Type alias", | ||
"character": 12, | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/bf6140cd5/packages/sdk/packages/axios/src/AxiosJson.ts#L5" | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/9ca7aff1a/packages/sdk/packages/axios/src/AxiosJson.ts#L5" | ||
} | ||
@@ -305,4 +304,4 @@ ], | ||
], | ||
"name": "AxiosRequestConfig", | ||
"qualifiedName": "AxiosRequestConfig", | ||
"name": "RawAxiosRequestConfig", | ||
"qualifiedName": "RawAxiosRequestConfig", | ||
"package": "axios" | ||
@@ -331,4 +330,4 @@ }, | ||
"line": 5, | ||
"character": 72, | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/bf6140cd5/packages/sdk/packages/axios/src/AxiosJson.ts#L5" | ||
"character": 78, | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/9ca7aff1a/packages/sdk/packages/axios/src/AxiosJson.ts#L5" | ||
} | ||
@@ -354,4 +353,4 @@ ], | ||
"line": 5, | ||
"character": 70, | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/bf6140cd5/packages/sdk/packages/axios/src/AxiosJson.ts#L5" | ||
"character": 76, | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/9ca7aff1a/packages/sdk/packages/axios/src/AxiosJson.ts#L5" | ||
} | ||
@@ -384,5 +383,5 @@ ] | ||
"character": 0, | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/bf6140cd5/packages/sdk/packages/axios/src/index.ts#L1" | ||
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/9ca7aff1a/packages/sdk/packages/axios/src/index.ts#L1" | ||
} | ||
] | ||
} |
@@ -1,7 +0,7 @@ | ||
import { Axios, AxiosRequestConfig } from 'axios'; | ||
export type AxiosJsonRequestConfig<D = any> = AxiosRequestConfig<D> & { | ||
import { Axios, RawAxiosRequestConfig } from 'axios'; | ||
export type RawAxiosJsonRequestConfig<D = any> = RawAxiosRequestConfig<D> & { | ||
compressLength?: number; | ||
}; | ||
export declare class AxiosJson extends Axios { | ||
constructor(config?: AxiosJsonRequestConfig); | ||
constructor(config?: RawAxiosJsonRequestConfig); | ||
private static axiosConfig; | ||
@@ -8,0 +8,0 @@ private static buildHeaders; |
@@ -13,3 +13,3 @@ { | ||
"dependencies": { | ||
"axios": "~1.2.2", | ||
"axios": "~1.2.3", | ||
"pako": "^2.1.0" | ||
@@ -20,3 +20,3 @@ }, | ||
"@types/pako": "^2.0.0", | ||
"@xylabs/ts-scripts-yarn3": "^2.12.0" | ||
"@xylabs/ts-scripts-yarn3": "^2.12.3" | ||
}, | ||
@@ -55,3 +55,3 @@ "browser": "dist/esm/index.js", | ||
"types": "dist/esm/index.d.ts", | ||
"version": "2.43.7" | ||
"version": "2.43.8" | ||
} |
@@ -1,13 +0,13 @@ | ||
import { Axios, AxiosHeaders, AxiosRequestConfig } from 'axios' | ||
import { Axios, AxiosHeaders, RawAxiosRequestConfig } from 'axios' | ||
import { gzip } from 'pako' | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
export type AxiosJsonRequestConfig<D = any> = AxiosRequestConfig<D> & { compressLength?: number } | ||
export type RawAxiosJsonRequestConfig<D = any> = RawAxiosRequestConfig<D> & { compressLength?: number } | ||
export class AxiosJson extends Axios { | ||
constructor(config?: AxiosJsonRequestConfig) { | ||
constructor(config?: RawAxiosJsonRequestConfig) { | ||
super(AxiosJson.axiosConfig(config)) | ||
} | ||
private static axiosConfig({ compressLength, headers, ...config }: AxiosJsonRequestConfig = {}): AxiosRequestConfig { | ||
private static axiosConfig({ compressLength, headers, ...config }: RawAxiosJsonRequestConfig = {}): RawAxiosJsonRequestConfig { | ||
return { | ||
@@ -36,3 +36,3 @@ headers: this.buildHeaders(headers), | ||
private static buildHeaders(headers: AxiosRequestConfig['headers']) { | ||
private static buildHeaders(headers: RawAxiosJsonRequestConfig['headers']) { | ||
const axiosHeaders = new AxiosHeaders() | ||
@@ -39,0 +39,0 @@ Object.entries(headers ?? {}).forEach(([key, value]) => axiosHeaders.set(key, value)) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31239
544
Updatedaxios@~1.2.3