@akinon/pz-masterpass 1.19.0 → 1.19.2

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,5 +1,17 @@
1
1
  # @akinon/pz-masterpass
2
2
 
3
+ ## 1.19.2
4
+
5
+ ### Patch Changes
6
+
7
+ - ZERO-2287: Add optional masterpassJsUrl to Settings
8
+
9
+ ## 1.19.1
10
+
11
+ ### Patch Changes
12
+
13
+ - ZERO-2287: Fix build error
14
+
3
15
  ## 1.19.0
4
16
 
5
17
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/pz-masterpass",
3
- "version": "1.19.0",
3
+ "version": "1.19.2",
4
4
  "license": "MIT",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.d.ts",
package/src/utils/init.ts CHANGED
@@ -1,10 +1,14 @@
1
1
  import { buildClientRequestUrl } from '@akinon/next/utils';
2
2
  import { MasterpassCredentials } from '../types';
3
+ import settings from 'settings';
3
4
 
4
5
  export const init = () =>
5
6
  new Promise<MasterpassCredentials>(async (resolve) => {
6
7
  try {
7
- const response = await fetch(buildClientRequestUrl('/masterpass-js'));
8
+ const response = await fetch(
9
+ settings.checkout?.masterpassJsUrl ??
10
+ buildClientRequestUrl('/masterpass-js')
11
+ );
8
12
  const data: MasterpassCredentials = await response.json();
9
13
 
10
14
  window.MFS.setClientId(data.client_id);