@fat-zebra/sdk 1.5.2 → 1.5.3-beta.3

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/README.dev.md CHANGED
@@ -180,3 +180,8 @@ The release of the sdk follows a weekly schedule. In the beginning of a new rele
180
180
  11. Push git tag. `git push origin vX.X.X`.
181
181
 
182
182
  Upon successful CI , a new entry with title 'Merged in release/vX.X,X' will be visible in the master branch page. This provides us with a clear view of what gets released in the past. Moreoever, we can quickly find out the list of features/bug fixes in a release by referring to the PR of the release candidate.
183
+
184
+
185
+ ## Rollback management
186
+
187
+ The CDN is now versioned across staging, sandbox and production environments. The pipeline will upload a version to override the existing deployment, but also a version of the build to a folder in s3. The folder will be a shortened version of the commit hash. This will allow us to advise merchants to rollback to a specific working commit hash, or for us to test different versions in gazelle to facilitate a rollback if necessary.
package/build-styles.js CHANGED
@@ -3,7 +3,14 @@ const path = require('path');
3
3
 
4
4
  // Define the source file and the destination folder
5
5
  const sourceFile = path.join(__dirname, './src/styles.css');
6
- const destinationFolder = path.join(__dirname, 'dist/' + process.env.ENVIRONMENT);
6
+
7
+ let destinationFolder;
8
+ if (process.env.REACT) {
9
+ destinationFolder = path.join(__dirname, 'dist');
10
+ } else {
11
+ destinationFolder = path.join(__dirname, 'dist/' + process.env.ENVIRONMENT);
12
+ }
13
+
7
14
  const destinationFile = path.join(destinationFolder, 'fatzebra.css');
8
15
 
9
16
  // Copy the file
package/dist/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import "ts-polyfill";
2
2
  import "custom-event-polyfill";
3
- import { FatZebra } from "./main";
3
+ const FatZebra = require("./main").FatZebra;
4
4
  import { PublicEvent } from "./shared/types";
5
5
  import { Environment } from "./shared/env";
6
6
  export { PublicEvent, Environment };
7
- if (typeof window !== "undefined") {
7
+ // Assign window.FatZebra conditionally
8
+ if (typeof window !== "undefined" && FatZebra) {
8
9
  window.FatZebra = FatZebra;
9
10
  }
@@ -12538,13 +12538,14 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
12538
12538
  exports.Environment = exports.PublicEvent = void 0;
12539
12539
  __webpack_require__("./node_modules/ts-polyfill/dist/ts-polyfill.js");
12540
12540
  __webpack_require__("./node_modules/custom-event-polyfill/polyfill.js");
12541
- var main_1 = __webpack_require__("./src/main.ts");
12541
+ var FatZebra = (__webpack_require__("./src/main.ts").FatZebra);
12542
12542
  var types_1 = __webpack_require__("./src/shared/types.ts");
12543
12543
  Object.defineProperty(exports, "PublicEvent", ({ enumerable: true, get: function () { return types_1.PublicEvent; } }));
12544
12544
  var env_1 = __webpack_require__("./src/shared/env.ts");
12545
12545
  Object.defineProperty(exports, "Environment", ({ enumerable: true, get: function () { return env_1.Environment; } }));
12546
- if (typeof window !== "undefined") {
12547
- window.FatZebra = main_1.FatZebra;
12546
+ // Assign window.FatZebra conditionally
12547
+ if (typeof window !== "undefined" && FatZebra) {
12548
+ window.FatZebra = FatZebra;
12548
12549
  }
12549
12550
 
12550
12551
 
@@ -14573,7 +14574,7 @@ exports.validateVerifyCardParams = validator;
14573
14574
 
14574
14575
  Object.defineProperty(exports, "__esModule", ({ value: true }));
14575
14576
  exports.version = void 0;
14576
- exports.version = '1.5.1';
14577
+ exports.version = '1.5.2';
14577
14578
 
14578
14579
 
14579
14580
  /***/ }),
@@ -17980,7 +17981,7 @@ module.exports = JSON.parse('{"$id":"https://www.fatzebra.com/schemas/hpp-load-p
17980
17981
  /******/
17981
17982
  /******/ /* webpack/runtime/getFullHash */
17982
17983
  /******/ (() => {
17983
- /******/ __webpack_require__.h = () => ("8747188f1f574f0436f6")
17984
+ /******/ __webpack_require__.h = () => ("f4497d62cfe1169d0cf0")
17984
17985
  /******/ })();
17985
17986
  /******/
17986
17987
  /******/ /* webpack/runtime/global */