@wix/sdk 1.7.6 → 1.7.7

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/build/helpers.js CHANGED
@@ -16,8 +16,8 @@ export function parsePublicKeyIfEncoded(publicKey) {
16
16
  }
17
17
  else {
18
18
  // publicKey is base64 encoded
19
- return typeof btoa !== 'undefined'
20
- ? btoa(publicKey)
19
+ return typeof atob !== 'undefined'
20
+ ? atob(publicKey)
21
21
  : Buffer.from(publicKey, 'base64').toString('utf-8');
22
22
  }
23
23
  }
@@ -32,7 +32,7 @@ export type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor
32
32
  * This type is used in `createClient` to ensure that the given host matches the host of the given descriptors.
33
33
  * If the host does not match, the descriptor is replaced with a host module that will throw an error when used.
34
34
  */
35
- export type AssertHostMatches<T extends Descriptors, H extends Host<any>> = T extends HostModule<any, infer U> ? H extends undefined ? never : H extends U ? T : HostModule<any, H> : T extends RESTFunctionDescriptor<any> ? T : {
35
+ export type AssertHostMatches<T extends Descriptors, H extends Host<any>> = T extends HostModule<any, infer U> ? H extends undefined ? never : H extends U ? T : `The host of this module does not match host provided to createClient.` : T extends RESTFunctionDescriptor<any> ? T : {
36
36
  [Key in keyof T]: T[Key] extends Descriptors ? AssertHostMatches<T[Key], H> : T[Key];
37
37
  };
38
38
  type TypedQueryInput<Result = {
@@ -21,8 +21,8 @@ function parsePublicKeyIfEncoded(publicKey) {
21
21
  }
22
22
  else {
23
23
  // publicKey is base64 encoded
24
- return typeof btoa !== 'undefined'
25
- ? btoa(publicKey)
24
+ return typeof atob !== 'undefined'
25
+ ? atob(publicKey)
26
26
  : Buffer.from(publicKey, 'base64').toString('utf-8');
27
27
  }
28
28
  }
@@ -32,7 +32,7 @@ export type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor
32
32
  * This type is used in `createClient` to ensure that the given host matches the host of the given descriptors.
33
33
  * If the host does not match, the descriptor is replaced with a host module that will throw an error when used.
34
34
  */
35
- export type AssertHostMatches<T extends Descriptors, H extends Host<any>> = T extends HostModule<any, infer U> ? H extends undefined ? never : H extends U ? T : HostModule<any, H> : T extends RESTFunctionDescriptor<any> ? T : {
35
+ export type AssertHostMatches<T extends Descriptors, H extends Host<any>> = T extends HostModule<any, infer U> ? H extends undefined ? never : H extends U ? T : `The host of this module does not match host provided to createClient.` : T extends RESTFunctionDescriptor<any> ? T : {
36
36
  [Key in keyof T]: T[Key] extends Descriptors ? AssertHostMatches<T[Key], H> : T[Key];
37
37
  };
38
38
  type TypedQueryInput<Result = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/sdk",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
4
4
  "license": "UNLICENSED",
5
5
  "author": {
6
6
  "name": "Ronny Ringel",
@@ -59,8 +59,8 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@babel/runtime": "^7.23.2",
62
- "@wix/identity": "^1.0.73",
63
- "@wix/image-kit": "^1.56.0",
62
+ "@wix/identity": "^1.0.74",
63
+ "@wix/image-kit": "^1.58.0",
64
64
  "@wix/redirects": "^1.0.32",
65
65
  "@wix/sdk-types": "^1.5.9",
66
66
  "crypto-js": "^4.2.0",
@@ -77,10 +77,10 @@
77
77
  "@types/is-ci": "^3.0.4",
78
78
  "@types/node": "^20.10.6",
79
79
  "@vitest/ui": "^1.1.3",
80
- "@wix/ecom": "^1.0.477",
81
- "@wix/events": "^1.0.145",
80
+ "@wix/ecom": "^1.0.495",
81
+ "@wix/events": "^1.0.153",
82
82
  "@wix/metro": "^1.0.73",
83
- "@wix/metro-runtime": "^1.1635.0",
83
+ "@wix/metro-runtime": "^1.1638.0",
84
84
  "@wix/sdk-runtime": "0.2.8",
85
85
  "eslint": "^8.56.0",
86
86
  "eslint-config-sdk": "0.0.0",
@@ -115,5 +115,5 @@
115
115
  "wallaby": {
116
116
  "autoDetect": true
117
117
  },
118
- "falconPackageHash": "676b313e3902721adc8337cd1542cd05dbe775e43ddee5030eef4706"
118
+ "falconPackageHash": "14cbbfe86433a368e361f62c89354e3a6667cc7a256553b4c12a8f7f"
119
119
  }