@wix/sdk 1.6.2 → 1.6.4
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.
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
2
|
+
export function VeloAuthStrategy() {
|
|
3
|
+
return {
|
|
4
|
+
getAuthHeaders: async () => {
|
|
5
|
+
let authHeader;
|
|
6
|
+
if (globalThis.origin) {
|
|
7
|
+
authHeader =
|
|
8
|
+
// @ts-expect-error $ns is available in the closure created by Velo
|
|
9
|
+
$ns['wix-elementorySupport'].getRequestOptions().headers
|
|
10
|
+
.Authorization;
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
authHeader =
|
|
14
|
+
// @ts-expect-error
|
|
15
|
+
process.domain.webMethodInfo.request.headers['x-wix-authorization'];
|
|
16
|
+
}
|
|
17
|
+
return { headers: { Authorization: authHeader } };
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VeloAuthStrategy = void 0;
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
5
|
+
function VeloAuthStrategy() {
|
|
6
|
+
return {
|
|
7
|
+
getAuthHeaders: async () => {
|
|
8
|
+
let authHeader;
|
|
9
|
+
if (globalThis.origin) {
|
|
10
|
+
authHeader =
|
|
11
|
+
// @ts-expect-error $ns is available in the closure created by Velo
|
|
12
|
+
$ns['wix-elementorySupport'].getRequestOptions().headers
|
|
13
|
+
.Authorization;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
authHeader =
|
|
17
|
+
// @ts-expect-error
|
|
18
|
+
process.domain.webMethodInfo.request.headers['x-wix-authorization'];
|
|
19
|
+
}
|
|
20
|
+
return { headers: { Authorization: authHeader } };
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
exports.VeloAuthStrategy = VeloAuthStrategy;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/sdk",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ronny Ringel",
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"./auth/wix-app-oauth": {
|
|
31
31
|
"import": "./build/auth/WixAppOAuthStrategy.js",
|
|
32
32
|
"require": "./cjs/build/auth/WixAppOAuthStrategy.js"
|
|
33
|
+
},
|
|
34
|
+
"./auth/velo": {
|
|
35
|
+
"import": "./build/auth/VeloAuthStrategy.js",
|
|
36
|
+
"require": "./cjs/build/auth/VeloAuthStrategy.js"
|
|
33
37
|
}
|
|
34
38
|
},
|
|
35
39
|
"sideEffects": false,
|
|
@@ -59,7 +63,7 @@
|
|
|
59
63
|
"@wix/redirects": "^1.0.31",
|
|
60
64
|
"@wix/sdk-types": "^1.5.3",
|
|
61
65
|
"crypto-js": "^4.2.0",
|
|
62
|
-
"type-fest": "^4.
|
|
66
|
+
"type-fest": "^4.9.0"
|
|
63
67
|
},
|
|
64
68
|
"optionalDependencies": {
|
|
65
69
|
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
|
|
@@ -67,11 +71,11 @@
|
|
|
67
71
|
"devDependencies": {
|
|
68
72
|
"@types/crypto-js": "^4.2.1",
|
|
69
73
|
"@types/is-ci": "^3.0.4",
|
|
70
|
-
"@types/node": "^20.10.
|
|
71
|
-
"@wix/ecom": "^1.0.
|
|
72
|
-
"@wix/events": "^1.0.
|
|
73
|
-
"@wix/metro": "^1.0.
|
|
74
|
-
"@wix/metro-runtime": "^1.
|
|
74
|
+
"@types/node": "^20.10.6",
|
|
75
|
+
"@wix/ecom": "^1.0.440",
|
|
76
|
+
"@wix/events": "^1.0.134",
|
|
77
|
+
"@wix/metro": "^1.0.73",
|
|
78
|
+
"@wix/metro-runtime": "^1.1587.0",
|
|
75
79
|
"eslint": "^8.56.0",
|
|
76
80
|
"eslint-config-sdk": "0.0.0",
|
|
77
81
|
"graphql": "^16.8.0",
|
|
@@ -105,5 +109,5 @@
|
|
|
105
109
|
"wallaby": {
|
|
106
110
|
"autoDetect": true
|
|
107
111
|
},
|
|
108
|
-
"falconPackageHash": "
|
|
112
|
+
"falconPackageHash": "16fe89900be2a97b0197aa9ae070fa9735a543d8affe31f1c1473037"
|
|
109
113
|
}
|