abbot-http-client 0.0.34 → 0.0.35

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/dist/index.cjs CHANGED
@@ -202,18 +202,18 @@ function axiosConf(cfg) {
202
202
  var AbbotHttp = class {
203
203
  config = defaultConfig;
204
204
  constructor(config) {
205
- this.config = this.deepMerge(this.config, config);
206
- }
207
- deepMerge(target, source) {
208
- for (const key in source) {
209
- const srcVal = source[key];
210
- if (srcVal && typeof srcVal === "object" && !Array.isArray(srcVal)) {
211
- target[key] = deepMerge(target[key], srcVal);
212
- } else if (srcVal !== void 0) {
213
- target[key] = srcVal;
205
+ function deepMerge(target, source) {
206
+ for (const key in source) {
207
+ const srcVal = source[key];
208
+ if (srcVal && typeof srcVal === "object" && !Array.isArray(srcVal)) {
209
+ target[key] = deepMerge(target[key], srcVal);
210
+ } else if (srcVal !== void 0) {
211
+ target[key] = srcVal;
212
+ }
214
213
  }
214
+ return target;
215
215
  }
216
- return target;
216
+ this.config = deepMerge(this.config, config);
217
217
  }
218
218
  createAxiosInstance(option) {
219
219
  const axios2 = axiosConf(this.config);
package/dist/index.d.cts CHANGED
@@ -55,7 +55,6 @@ interface AbbotResponse$1<T> {
55
55
  declare class AbbotHttp {
56
56
  protected config: AbbotConfig;
57
57
  constructor(config: DeepPartial<AbbotConfig>);
58
- protected deepMerge<T>(target: T, source: DeepPartial<T>): T;
59
58
  protected createAxiosInstance(option?: Partial<MethodOption>): AxiosInstance;
60
59
  protected prepareRequestConfig(option?: Partial<MethodOption>): {
61
60
  cryp: Cryp;
package/dist/index.d.ts CHANGED
@@ -55,7 +55,6 @@ interface AbbotResponse$1<T> {
55
55
  declare class AbbotHttp {
56
56
  protected config: AbbotConfig;
57
57
  constructor(config: DeepPartial<AbbotConfig>);
58
- protected deepMerge<T>(target: T, source: DeepPartial<T>): T;
59
58
  protected createAxiosInstance(option?: Partial<MethodOption>): AxiosInstance;
60
59
  protected prepareRequestConfig(option?: Partial<MethodOption>): {
61
60
  cryp: Cryp;
package/dist/index.js CHANGED
@@ -165,18 +165,18 @@ function axiosConf(cfg) {
165
165
  var AbbotHttp = class {
166
166
  config = defaultConfig;
167
167
  constructor(config) {
168
- this.config = this.deepMerge(this.config, config);
169
- }
170
- deepMerge(target, source) {
171
- for (const key in source) {
172
- const srcVal = source[key];
173
- if (srcVal && typeof srcVal === "object" && !Array.isArray(srcVal)) {
174
- target[key] = deepMerge(target[key], srcVal);
175
- } else if (srcVal !== void 0) {
176
- target[key] = srcVal;
168
+ function deepMerge(target, source) {
169
+ for (const key in source) {
170
+ const srcVal = source[key];
171
+ if (srcVal && typeof srcVal === "object" && !Array.isArray(srcVal)) {
172
+ target[key] = deepMerge(target[key], srcVal);
173
+ } else if (srcVal !== void 0) {
174
+ target[key] = srcVal;
175
+ }
177
176
  }
177
+ return target;
178
178
  }
179
- return target;
179
+ this.config = deepMerge(this.config, config);
180
180
  }
181
181
  createAxiosInstance(option) {
182
182
  const axios2 = axiosConf(this.config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abbot-http-client",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "description": "This package helps Abbot team to handle all the axios requests.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",