@bigcommerce/stencil-cli 8.10.4 → 9.0.0
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,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigcommerce/stencil-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI tool to run BigCommerce Stores locally for theme development.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": ">=
|
|
8
|
+
"node": ">=20",
|
|
9
9
|
"npm": ">=8.0.0"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@bigcommerce/stencil-paper": "5.3.0",
|
|
54
|
-
"@bigcommerce/stencil-styles": "6.
|
|
54
|
+
"@bigcommerce/stencil-styles": "6.2.6",
|
|
55
55
|
"@hapi/boom": "^10.0.1",
|
|
56
56
|
"@hapi/glue": "^9.0.1",
|
|
57
57
|
"@hapi/h2o2": "^10.0.4",
|
|
@@ -103,9 +103,9 @@
|
|
|
103
103
|
"@commitlint/config-conventional": "^19.8.1",
|
|
104
104
|
"@semantic-release/changelog": "^6.0.3",
|
|
105
105
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
106
|
-
"@semantic-release/github": "^
|
|
107
|
-
"@semantic-release/npm": "^
|
|
108
|
-
"@semantic-release/release-notes-generator": "^14.0
|
|
106
|
+
"@semantic-release/github": "^12.0.2",
|
|
107
|
+
"@semantic-release/npm": "^13.1.2",
|
|
108
|
+
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
109
109
|
"conventional-changelog-cli": "^2.2.2",
|
|
110
110
|
"eslint": "^8.57.0",
|
|
111
111
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"eslint-plugin-prettier": "^4.2.1",
|
|
117
117
|
"jest": "^29.7.0",
|
|
118
118
|
"prettier": "2.1.2",
|
|
119
|
-
"semantic-release": "^
|
|
119
|
+
"semantic-release": "^25.0.2",
|
|
120
120
|
"semantic-release-github-pullrequest-fixed": "1.0.1"
|
|
121
121
|
}
|
|
122
122
|
}
|
|
@@ -115,15 +115,24 @@ internals.getResponse = async (request) => {
|
|
|
115
115
|
const contentType = response.headers['content-type'] || '';
|
|
116
116
|
const isResponseJson = contentType.toLowerCase().includes('application/json');
|
|
117
117
|
const isWebDavRequest = request.path.startsWith('/content');
|
|
118
|
+
const isBinaryContent = contentType
|
|
119
|
+
.toLowerCase()
|
|
120
|
+
.match(/^(image|video|audio|application\/octet-stream|application\/pdf)/);
|
|
118
121
|
let bcAppData = response.data;
|
|
119
122
|
|
|
120
123
|
if (isResponseJson) {
|
|
121
124
|
bcAppData = JSON.parse(await readFromStream(response.data));
|
|
122
125
|
} else if (isWebDavRequest) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
if (isBinaryContent) {
|
|
127
|
+
// For binary content, don't read the stream - pass it through as-is
|
|
128
|
+
bcAppData = response.data;
|
|
129
|
+
} else {
|
|
130
|
+
// For text content, read as string
|
|
131
|
+
const tappedStream = tapStream(response.data, (body) => {
|
|
132
|
+
return body;
|
|
133
|
+
});
|
|
134
|
+
bcAppData = await readStream(tappedStream, false);
|
|
135
|
+
}
|
|
127
136
|
}
|
|
128
137
|
// cache response
|
|
129
138
|
cache.put(
|