@rebilly/instruments 11.2.1 → 11.3.0

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,6 @@
1
- ## [11.2.1](https://github.com/Rebilly/rebilly/compare/instruments/core-v11.2.0...instruments/core-v11.2.1) (2024-11-25)
1
+ ## [11.3.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v11.2.1...instruments/core-v11.3.0) (2024-11-25)
2
2
 
3
3
 
4
- ### Bug Fixes
4
+ ### Features
5
5
 
6
- * **framepay-npm:** add the main export for the outdated build tools ([#8766](https://github.com/Rebilly/rebilly/issues/8766)) ([abcd6ea](https://github.com/Rebilly/rebilly/commit/abcd6eaec41223b964b0e71dec8a6893916359de))
6
+ * **framepay-npm:** Prepare for publishing, and add error propagation ([#8765](https://github.com/Rebilly/rebilly/issues/8765)) ([b4ab4a5](https://github.com/Rebilly/rebilly/commit/b4ab4a52bba2de2c986b1292896391598194ace8))
package/dist/index.js CHANGED
@@ -1920,7 +1920,7 @@ async function loadFramepay({
1920
1920
  scriptLink,
1921
1921
  styleLink
1922
1922
  } = {}) {
1923
- return new Promise((resolve) => {
1923
+ return new Promise((resolve, reject) => {
1924
1924
  if (window.Framepay) {
1925
1925
  resolve(window.Framepay);
1926
1926
  } else {
@@ -1931,6 +1931,11 @@ async function loadFramepay({
1931
1931
  const framepayScript = document.createElement("script");
1932
1932
  framepayScript.setAttribute("src", scriptLink ?? DEFAULT_SCRIPT_LINK);
1933
1933
  framepayScript.onload = () => resolve(window.Framepay);
1934
+ framepayScript.onerror = () => reject(
1935
+ new Error(
1936
+ "@rebilly/framepay npm package: Failed to load FramePay script"
1937
+ )
1938
+ );
1934
1939
  document.head.append(framepayScript);
1935
1940
  }
1936
1941
  });
@@ -6283,7 +6288,7 @@ function C$1({ options: e2 }) {
6283
6288
  }
6284
6289
  function o2() {
6285
6290
  const i = {
6286
- "REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((g) => g).join("/")}@291232a`
6291
+ "REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((g) => g).join("/")}@b4ab4a5`
6287
6292
  };
6288
6293
  return e2.apiKey && (i["REB-APIKEY"] = e2.apiKey), i;
6289
6294
  }