@bigcommerce/stencil-cli 7.3.2 → 7.3.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigcommerce/stencil-cli",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.4",
|
|
4
4
|
"description": "CLI tool to run BigCommerce Stores locally for theme development.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"engines": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@bigcommerce/stencil-paper": "4.10.4",
|
|
52
|
-
"@bigcommerce/stencil-styles": "5.3.
|
|
52
|
+
"@bigcommerce/stencil-styles": "5.3.3",
|
|
53
53
|
"@hapi/boom": "^10.0.0",
|
|
54
54
|
"@hapi/glue": "^8.0.0",
|
|
55
55
|
"@hapi/h2o2": "^9.1.0",
|
|
@@ -20,6 +20,18 @@ const internals = {
|
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
function mapUri(req) {
|
|
24
|
+
const host = `https://${internals.options.storeUrl.replace(/http[s]?:\/\//, '')}`;
|
|
25
|
+
const urlParams = req.url.search || '';
|
|
26
|
+
const uri = `${host}${req.path}${urlParams}`;
|
|
27
|
+
const headers = {
|
|
28
|
+
'stencil-cli': internals.options.stencilCliVersion,
|
|
29
|
+
'x-auth-token': internals.options.accessToken,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return { uri, headers };
|
|
33
|
+
}
|
|
34
|
+
|
|
23
35
|
function register(server, options) {
|
|
24
36
|
internals.options = _.defaultsDeep(options, internals.options);
|
|
25
37
|
|
|
@@ -96,10 +108,8 @@ internals.registerRoutes = (server) => {
|
|
|
96
108
|
path: internals.paths.internalApi,
|
|
97
109
|
handler: {
|
|
98
110
|
proxy: {
|
|
99
|
-
|
|
111
|
+
mapUri,
|
|
100
112
|
rejectUnauthorized: false,
|
|
101
|
-
protocol: 'https',
|
|
102
|
-
port: 443,
|
|
103
113
|
passThrough: true,
|
|
104
114
|
},
|
|
105
115
|
},
|
|
@@ -114,20 +124,8 @@ internals.registerRoutes = (server) => {
|
|
|
114
124
|
path: internals.paths.storefrontAPI,
|
|
115
125
|
handler: {
|
|
116
126
|
proxy: {
|
|
127
|
+
mapUri,
|
|
117
128
|
rejectUnauthorized: false,
|
|
118
|
-
mapUri: (req) => {
|
|
119
|
-
const host = `https://${internals.options.storeUrl.replace(
|
|
120
|
-
/http[s]?:\/\//,
|
|
121
|
-
'',
|
|
122
|
-
)}`;
|
|
123
|
-
const urlParams = req.url.search || '';
|
|
124
|
-
const uri = `${host}${req.path}${urlParams}`;
|
|
125
|
-
const headers = {
|
|
126
|
-
'stencil-cli': internals.options.stencilCliVersion,
|
|
127
|
-
'x-auth-token': internals.options.accessToken,
|
|
128
|
-
};
|
|
129
|
-
return { uri, headers };
|
|
130
|
-
},
|
|
131
129
|
passThrough: true,
|
|
132
130
|
},
|
|
133
131
|
},
|