@imtbl/sdk 0.27.15-alpha.2 → 0.27.15-alpha.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/dist/index.cjs CHANGED
@@ -3630,7 +3630,7 @@ class MultiRollupApiClients {
3630
3630
  }
3631
3631
 
3632
3632
  // eslint-disable-next-line @typescript-eslint/naming-convention
3633
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.27.15-alpha.2' };
3633
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.27.15-alpha.3' };
3634
3634
  const createConfig = ({ basePath, headers, }) => {
3635
3635
  if (!basePath.trim()) {
3636
3636
  throw Error('basePath can not be empty');
@@ -3690,7 +3690,7 @@ class APIError extends Error {
3690
3690
 
3691
3691
  /* eslint-disable implicit-arrow-linebreak */
3692
3692
  const defaultHeaders = {
3693
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.27.15-alpha.2',
3693
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.27.15-alpha.3',
3694
3694
  };
3695
3695
  /**
3696
3696
  * createAPIConfiguration to create a custom Configuration
@@ -4101,7 +4101,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
4101
4101
  chainID,
4102
4102
  coreContractAddress,
4103
4103
  registrationContractAddress,
4104
- sdkVersion: 'ts-immutable-sdk-0.27.15-alpha.2',
4104
+ sdkVersion: 'ts-immutable-sdk-0.27.15-alpha.3',
4105
4105
  });
4106
4106
  /**
4107
4107
  * Sets `sdkVersion` at the time of build
@@ -33403,7 +33403,7 @@ async function getItemRequirementsFromRequirements(provider, requirements) {
33403
33403
  return itemRequirements;
33404
33404
  }
33405
33405
 
33406
- const SDK_VERSION_MARKER = '0.27.15-alpha.2';
33406
+ const SDK_VERSION_MARKER = '0.27.15-alpha.3';
33407
33407
  // This SDK version is replaced by the `yarn build` command ran on the root level
33408
33408
  const globalPackageVersion = () => SDK_VERSION_MARKER;
33409
33409
 
@@ -33476,24 +33476,6 @@ function loadUnresolved(version) {
33476
33476
  document.head.appendChild(tag);
33477
33477
  return { loaded: false, element: tag };
33478
33478
  }
33479
- /**
33480
- * Creates and appends a checkout widget script to the document head.
33481
- * @param version - The desired widgets bundle version.
33482
- */
33483
- const load = (version) => new Promise((resolve, reject) => {
33484
- try {
33485
- const script = loadUnresolved(version);
33486
- if (script.loaded) {
33487
- resolve();
33488
- }
33489
- else {
33490
- script.element.onload = () => resolve();
33491
- }
33492
- }
33493
- catch (err) {
33494
- reject(err);
33495
- }
33496
- });
33497
33479
 
33498
33480
  const SANDBOX_CONFIGURATION = {
33499
33481
  baseConfig: {
@@ -33521,8 +33503,24 @@ class Checkout {
33521
33503
  * @param {WidgetsInit} init - The initialisation parameters for loading the widgets bundle and applying configuration
33522
33504
  */
33523
33505
  async widgets(init) {
33524
- await load(init.version);
33525
- return new ImmutableCheckoutWidgets.WidgetsFactory(this, init.config);
33506
+ const checkout = this;
33507
+ const factory = new Promise((resolve, reject) => {
33508
+ try {
33509
+ const script = loadUnresolved(init.version);
33510
+ if (script.loaded) {
33511
+ resolve(new ImmutableCheckoutWidgets.WidgetsFactory(checkout, init.config));
33512
+ }
33513
+ else {
33514
+ script.element.onload = () => resolve(new ImmutableCheckoutWidgets.WidgetsFactory(checkout, init.config));
33515
+ }
33516
+ }
33517
+ catch (err) {
33518
+ reject(err);
33519
+ }
33520
+ });
33521
+ // eslint-disable-next-line no-console
33522
+ console.log('factory', factory);
33523
+ return factory;
33526
33524
  }
33527
33525
  /**
33528
33526
  * Creates a provider using the given parameters.
package/dist/index.js CHANGED
@@ -3608,7 +3608,7 @@ class MultiRollupApiClients {
3608
3608
  }
3609
3609
 
3610
3610
  // eslint-disable-next-line @typescript-eslint/naming-convention
3611
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.27.15-alpha.2' };
3611
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.27.15-alpha.3' };
3612
3612
  const createConfig = ({ basePath, headers, }) => {
3613
3613
  if (!basePath.trim()) {
3614
3614
  throw Error('basePath can not be empty');
@@ -3668,7 +3668,7 @@ class APIError extends Error {
3668
3668
 
3669
3669
  /* eslint-disable implicit-arrow-linebreak */
3670
3670
  const defaultHeaders = {
3671
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.27.15-alpha.2',
3671
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.27.15-alpha.3',
3672
3672
  };
3673
3673
  /**
3674
3674
  * createAPIConfiguration to create a custom Configuration
@@ -4079,7 +4079,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
4079
4079
  chainID,
4080
4080
  coreContractAddress,
4081
4081
  registrationContractAddress,
4082
- sdkVersion: 'ts-immutable-sdk-0.27.15-alpha.2',
4082
+ sdkVersion: 'ts-immutable-sdk-0.27.15-alpha.3',
4083
4083
  });
4084
4084
  /**
4085
4085
  * Sets `sdkVersion` at the time of build
@@ -33381,7 +33381,7 @@ async function getItemRequirementsFromRequirements(provider, requirements) {
33381
33381
  return itemRequirements;
33382
33382
  }
33383
33383
 
33384
- const SDK_VERSION_MARKER = '0.27.15-alpha.2';
33384
+ const SDK_VERSION_MARKER = '0.27.15-alpha.3';
33385
33385
  // This SDK version is replaced by the `yarn build` command ran on the root level
33386
33386
  const globalPackageVersion = () => SDK_VERSION_MARKER;
33387
33387
 
@@ -33454,24 +33454,6 @@ function loadUnresolved(version) {
33454
33454
  document.head.appendChild(tag);
33455
33455
  return { loaded: false, element: tag };
33456
33456
  }
33457
- /**
33458
- * Creates and appends a checkout widget script to the document head.
33459
- * @param version - The desired widgets bundle version.
33460
- */
33461
- const load = (version) => new Promise((resolve, reject) => {
33462
- try {
33463
- const script = loadUnresolved(version);
33464
- if (script.loaded) {
33465
- resolve();
33466
- }
33467
- else {
33468
- script.element.onload = () => resolve();
33469
- }
33470
- }
33471
- catch (err) {
33472
- reject(err);
33473
- }
33474
- });
33475
33457
 
33476
33458
  const SANDBOX_CONFIGURATION = {
33477
33459
  baseConfig: {
@@ -33499,8 +33481,24 @@ class Checkout {
33499
33481
  * @param {WidgetsInit} init - The initialisation parameters for loading the widgets bundle and applying configuration
33500
33482
  */
33501
33483
  async widgets(init) {
33502
- await load(init.version);
33503
- return new ImmutableCheckoutWidgets.WidgetsFactory(this, init.config);
33484
+ const checkout = this;
33485
+ const factory = new Promise((resolve, reject) => {
33486
+ try {
33487
+ const script = loadUnresolved(init.version);
33488
+ if (script.loaded) {
33489
+ resolve(new ImmutableCheckoutWidgets.WidgetsFactory(checkout, init.config));
33490
+ }
33491
+ else {
33492
+ script.element.onload = () => resolve(new ImmutableCheckoutWidgets.WidgetsFactory(checkout, init.config));
33493
+ }
33494
+ }
33495
+ catch (err) {
33496
+ reject(err);
33497
+ }
33498
+ });
33499
+ // eslint-disable-next-line no-console
33500
+ console.log('factory', factory);
33501
+ return factory;
33504
33502
  }
33505
33503
  /**
33506
33504
  * Creates a provider using the given parameters.
package/dist/passport.js CHANGED
@@ -2072,7 +2072,7 @@ class MultiRollupApiClients {
2072
2072
  }
2073
2073
 
2074
2074
  // eslint-disable-next-line @typescript-eslint/naming-convention
2075
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.27.15-alpha.2' };
2075
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.27.15-alpha.3' };
2076
2076
  const createConfig = ({ basePath, headers, }) => {
2077
2077
  if (!basePath.trim()) {
2078
2078
  throw Error('basePath can not be empty');
@@ -2128,7 +2128,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
2128
2128
  chainID,
2129
2129
  coreContractAddress,
2130
2130
  registrationContractAddress,
2131
- sdkVersion: 'ts-immutable-sdk-0.27.15-alpha.2',
2131
+ sdkVersion: 'ts-immutable-sdk-0.27.15-alpha.3',
2132
2132
  });
2133
2133
  /**
2134
2134
  * Sets `sdkVersion` at the time of build
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imtbl/sdk",
3
3
  "description": "Immutable Unified SDK",
4
- "version": "0.27.15-alpha.2",
4
+ "version": "0.27.15-alpha.3",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",