@bigcommerce/stencil-cli 3.6.0 → 3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigcommerce/stencil-cli",
3
- "version": "3.6.0",
3
+ "version": "3.6.4",
4
4
  "description": "CLI tool to run BigCommerce Stores locally for theme development.",
5
5
  "main": "index.js",
6
6
  "engines": {
@@ -44,7 +44,7 @@
44
44
  "package-lock.json"
45
45
  ],
46
46
  "dependencies": {
47
- "@bigcommerce/stencil-paper": "^3.0.0-rc.48",
47
+ "@bigcommerce/stencil-paper": "^3.0.0-rc.51",
48
48
  "@bigcommerce/stencil-styles": "2.1.0",
49
49
  "@hapi/boom": "^8.0.1",
50
50
  "@hapi/glue": "^6.2.0",
@@ -66,7 +66,7 @@
66
66
  "glob": "^7.1.6",
67
67
  "graceful-fs": "^4.2.4",
68
68
  "image-size": "^0.9.1",
69
- "inquirer": "^7.3.3",
69
+ "inquirer": "^8.1.5",
70
70
  "lodash": "^4.17.20",
71
71
  "memory-cache": "^0.2.0",
72
72
  "npm-which": "^3.0.1",
package/server/index.js CHANGED
@@ -19,6 +19,7 @@ function buildManifest(srcManifest, options) {
19
19
  parsedNormalUrl.protocol + '//' + parsedNormalUrl.host;
20
20
  pluginsByName['./plugins/router/router.module'].apiKey = options.dotStencilFile.apiKey;
21
21
  pluginsByName['./plugins/router/router.module'].port = options.dotStencilFile.port;
22
+ pluginsByName['./plugins/router/router.module'].stencilCliVersion = options.stencilCliVersion;
22
23
  pluginsByName['./plugins/renderer/renderer.module'].useCache = options.useCache;
23
24
  pluginsByName['./plugins/renderer/renderer.module'].username = options.dotStencilFile.username;
24
25
  pluginsByName['./plugins/renderer/renderer.module'].token = options.dotStencilFile.token;
@@ -98,7 +98,6 @@ internals.registerRoutes = (server) => {
98
98
  protocol: 'https',
99
99
  port: 443,
100
100
  passThrough: true,
101
- xforward: false,
102
101
  },
103
102
  },
104
103
  options: {
@@ -112,12 +111,18 @@ internals.registerRoutes = (server) => {
112
111
  path: internals.paths.storefrontAPI,
113
112
  handler: {
114
113
  proxy: {
115
- host: internals.options.storeUrl.replace(/http[s]?:\/\//, ''),
116
114
  rejectUnauthorized: false,
117
- protocol: 'https',
118
- port: 443,
115
+ mapUri: (req) => {
116
+ const host = `https://${internals.options.storeUrl.replace(
117
+ /http[s]?:\/\//,
118
+ '',
119
+ )}`;
120
+ const urlParams = req.url.search || '';
121
+ const uri = `${host}${req.path}${urlParams}`;
122
+ const headers = { 'stencil-cli': internals.options.stencilCliVersion };
123
+ return { uri, headers };
124
+ },
119
125
  passThrough: true,
120
- xforward: false,
121
126
  },
122
127
  },
123
128
  options: {