@luminix/support 0.4.2 → 0.4.4

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/support.js CHANGED
@@ -4262,18 +4262,16 @@ class Sm extends yr {
4262
4262
  this.emit("flushing"), this.singletons = {}, this.loaders = {}, this._configuration = {}, this.providers = [], this.emit("flushed"), this.flushEvents();
4263
4263
  }
4264
4264
  dump(r = !1) {
4265
- const n = this.make("log");
4266
- if (n) {
4267
- const s = {
4268
- configuration: this.configuration,
4269
- services: this.services,
4270
- providers: this.providers,
4271
- singletons: this.singletons
4272
- };
4273
- if (r === !0)
4274
- return s;
4275
- r === !1 && n.info(s), n.info(r, s);
4276
- }
4265
+ const n = {
4266
+ configuration: this.configuration,
4267
+ services: this.services,
4268
+ providers: this.providers,
4269
+ singletons: this.singletons
4270
+ };
4271
+ if (r === !0)
4272
+ return n;
4273
+ const s = this.make("log");
4274
+ r === !1 && s.info(n), s.info(r, n);
4277
4275
  }
4278
4276
  }
4279
4277
  function Re(e) {
@@ -4517,10 +4515,19 @@ class xm {
4517
4515
  return this.options = t, this;
4518
4516
  }
4519
4517
  withQueryParameters(t) {
4520
- return O.set(this.options, "params", O.merge(this.options.params, t)), this;
4518
+ const r = typeof t == "string" ? O.fromQuery(new URLSearchParams(t)) : t instanceof URLSearchParams ? O.fromQuery(t) : t;
4519
+ return O.set(
4520
+ this.options,
4521
+ "params",
4522
+ O.merge(this.options.params || {}, r)
4523
+ ), this;
4521
4524
  }
4522
4525
  replaceQueryParameters(t) {
4523
- return O.set(this.options, "params", t), this;
4526
+ return O.set(
4527
+ this.options,
4528
+ "params",
4529
+ typeof t == "string" ? O.fromQuery(new URLSearchParams(t)) : t instanceof URLSearchParams ? O.fromQuery(t) : t
4530
+ ), this;
4524
4531
  }
4525
4532
  withData(t) {
4526
4533
  const r = O.get(this.options, "data", {}), n = r instanceof FormData ? O.fromFormData(r) : r;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luminix/support",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "module": "dist/support.js",
5
5
  "types": "types/index.d.ts",
6
6
  "type": "module",
@@ -13,8 +13,8 @@ export default class Client {
13
13
  replaceHeaders(headers: Record<string, string>): this;
14
14
  withOptions(options: RequestOptions): this;
15
15
  replaceOptions(options: RequestOptions): this;
16
- withQueryParameters(params: string | object): this;
17
- replaceQueryParameters(params: string | object): this;
16
+ withQueryParameters(params: URLSearchParams | string | object): this;
17
+ replaceQueryParameters(params: URLSearchParams | string | object): this;
18
18
  withData(data: object): this;
19
19
  replaceData(data: object): this;
20
20
  withBasicAuth(username: string, password: string): this;