@rebilly/instruments 12.30.0 → 12.31.1

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/CHANGELOG.md CHANGED
@@ -1,6 +1 @@
1
- ## [12.30.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v12.29.0...instruments/core-v12.30.0) (2025-02-26)
2
-
3
-
4
- ### Features
5
-
6
- * **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#10284](https://github.com/Rebilly/rebilly/issues/10284)) ([5e86a18](https://github.com/Rebilly/rebilly/commit/5e86a184c98c53646433106747bb75a6a81761db))
1
+ ## [12.31.1](https://github.com/Rebilly/rebilly/compare/instruments/core-v12.31.0...instruments/core-v12.31.1) (2025-03-03)
package/dist/index.js CHANGED
@@ -3715,21 +3715,6 @@ const noop = () => {
3715
3715
  const toFiniteNumber = (value, defaultValue) => {
3716
3716
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
3717
3717
  };
3718
- const ALPHA = "abcdefghijklmnopqrstuvwxyz";
3719
- const DIGIT = "0123456789";
3720
- const ALPHABET = {
3721
- DIGIT,
3722
- ALPHA,
3723
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
3724
- };
3725
- const generateString = (size2 = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
3726
- let str = "";
3727
- const { length } = alphabet;
3728
- while (size2--) {
3729
- str += alphabet[Math.random() * length | 0];
3730
- }
3731
- return str;
3732
- };
3733
3718
  function isSpecCompliantForm(thing) {
3734
3719
  return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
3735
3720
  }
@@ -3828,8 +3813,6 @@ const utils$1 = {
3828
3813
  findKey,
3829
3814
  global: _global,
3830
3815
  isContextDefined,
3831
- ALPHABET,
3832
- generateString,
3833
3816
  isSpecCompliantForm,
3834
3817
  toJSONObject,
3835
3818
  isAsyncFn,
@@ -4785,8 +4768,9 @@ function isAbsoluteURL(url) {
4785
4768
  function combineURLs(baseURL, relativeURL) {
4786
4769
  return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
4787
4770
  }
4788
- function buildFullPath(baseURL, requestedURL) {
4789
- if (baseURL && !isAbsoluteURL(requestedURL)) {
4771
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
4772
+ let isRelativeUrl = !isAbsoluteURL(requestedURL);
4773
+ if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
4790
4774
  return combineURLs(baseURL, requestedURL);
4791
4775
  }
4792
4776
  return requestedURL;
@@ -5390,7 +5374,7 @@ function dispatchRequest(config) {
5390
5374
  return Promise.reject(reason);
5391
5375
  });
5392
5376
  }
5393
- const VERSION$1 = "1.7.9";
5377
+ const VERSION$1 = "1.8.1";
5394
5378
  const validators$1 = {};
5395
5379
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
5396
5380
  validators$1[type] = function validator2(thing) {
@@ -5518,6 +5502,12 @@ let Axios$1 = class Axios {
5518
5502
  }, true);
5519
5503
  }
5520
5504
  }
5505
+ if (config.allowAbsoluteUrls !== void 0) ;
5506
+ else if (this.defaults.allowAbsoluteUrls !== void 0) {
5507
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
5508
+ } else {
5509
+ config.allowAbsoluteUrls = true;
5510
+ }
5521
5511
  validator.assertOptions(config, {
5522
5512
  baseUrl: validators.spelling("baseURL"),
5523
5513
  withXsrfToken: validators.spelling("withXSRFToken")
@@ -5588,7 +5578,7 @@ let Axios$1 = class Axios {
5588
5578
  }
5589
5579
  getUri(config) {
5590
5580
  config = mergeConfig$1(this.defaults, config);
5591
- const fullPath = buildFullPath(config.baseURL, config.url);
5581
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
5592
5582
  return buildURL(fullPath, config.params, config.paramsSerializer);
5593
5583
  }
5594
5584
  };
@@ -6288,7 +6278,7 @@ function C$1({ options: e2 }) {
6288
6278
  }
6289
6279
  function o2() {
6290
6280
  const i = {
6291
- "REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((g) => g).join("/")}@5e86a18`
6281
+ "REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((g) => g).join("/")}@81cc4c8`
6292
6282
  };
6293
6283
  return e2.apiKey && (i["REB-APIKEY"] = e2.apiKey), i;
6294
6284
  }