@vercel/python 4.7.1 → 4.7.2
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/dist/index.js +4 -11
- package/package.json +2 -2
- package/vc_init.py +3 -7
package/dist/index.js
CHANGED
|
@@ -1805,9 +1805,9 @@ var require_once = __commonJS({
|
|
|
1805
1805
|
}
|
|
1806
1806
|
});
|
|
1807
1807
|
|
|
1808
|
-
// ../../node_modules/.pnpm/end-of-stream@1.4.
|
|
1808
|
+
// ../../node_modules/.pnpm/end-of-stream@1.4.1/node_modules/end-of-stream/index.js
|
|
1809
1809
|
var require_end_of_stream = __commonJS({
|
|
1810
|
-
"../../node_modules/.pnpm/end-of-stream@1.4.
|
|
1810
|
+
"../../node_modules/.pnpm/end-of-stream@1.4.1/node_modules/end-of-stream/index.js"(exports, module2) {
|
|
1811
1811
|
var once = require_once();
|
|
1812
1812
|
var noop = function() {
|
|
1813
1813
|
};
|
|
@@ -1827,7 +1827,6 @@ var require_end_of_stream = __commonJS({
|
|
|
1827
1827
|
var rs = stream._readableState;
|
|
1828
1828
|
var readable = opts.readable || opts.readable !== false && stream.readable;
|
|
1829
1829
|
var writable = opts.writable || opts.writable !== false && stream.writable;
|
|
1830
|
-
var cancelled = false;
|
|
1831
1830
|
var onlegacyfinish = function() {
|
|
1832
1831
|
if (!stream.writable)
|
|
1833
1832
|
onfinish();
|
|
@@ -1849,14 +1848,9 @@ var require_end_of_stream = __commonJS({
|
|
|
1849
1848
|
callback.call(stream, err);
|
|
1850
1849
|
};
|
|
1851
1850
|
var onclose = function() {
|
|
1852
|
-
|
|
1853
|
-
};
|
|
1854
|
-
var onclosenexttick = function() {
|
|
1855
|
-
if (cancelled)
|
|
1856
|
-
return;
|
|
1857
|
-
if (readable && !(rs && (rs.ended && !rs.destroyed)))
|
|
1851
|
+
if (readable && !(rs && rs.ended))
|
|
1858
1852
|
return callback.call(stream, new Error("premature close"));
|
|
1859
|
-
if (writable && !(ws &&
|
|
1853
|
+
if (writable && !(ws && ws.ended))
|
|
1860
1854
|
return callback.call(stream, new Error("premature close"));
|
|
1861
1855
|
};
|
|
1862
1856
|
var onrequest = function() {
|
|
@@ -1881,7 +1875,6 @@ var require_end_of_stream = __commonJS({
|
|
|
1881
1875
|
stream.on("error", onerror);
|
|
1882
1876
|
stream.on("close", onclose);
|
|
1883
1877
|
return function() {
|
|
1884
|
-
cancelled = true;
|
|
1885
1878
|
stream.removeListener("complete", onfinish);
|
|
1886
1879
|
stream.removeListener("abort", onclose);
|
|
1887
1880
|
stream.removeListener("request", onrequest);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/python",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.2",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@types/jest": "27.4.1",
|
|
20
20
|
"@types/node": "14.18.33",
|
|
21
21
|
"@types/which": "3.0.0",
|
|
22
|
-
"@vercel/build-utils": "
|
|
22
|
+
"@vercel/build-utils": "10.5.1",
|
|
23
23
|
"cross-env": "7.0.3",
|
|
24
24
|
"execa": "^1.0.0",
|
|
25
25
|
"fs-extra": "11.1.1",
|
package/vc_init.py
CHANGED
|
@@ -274,28 +274,24 @@ if 'VERCEL_IPC_PATH' in os.environ:
|
|
|
274
274
|
env[key] = wsgi_encoding_dance(value)
|
|
275
275
|
for k, v in self.headers.items():
|
|
276
276
|
env['HTTP_' + k.replace('-', '_').upper()] = v
|
|
277
|
-
# Response body
|
|
278
|
-
body = BytesIO()
|
|
279
277
|
|
|
280
278
|
def start_response(status, headers, exc_info=None):
|
|
281
279
|
self.send_response(int(status.split(' ')[0]))
|
|
282
280
|
for name, value in headers:
|
|
283
281
|
self.send_header(name, value)
|
|
284
282
|
self.end_headers()
|
|
285
|
-
return
|
|
283
|
+
return self.wfile.write
|
|
286
284
|
|
|
287
285
|
# Call the application
|
|
288
286
|
response = app(env, start_response)
|
|
289
287
|
try:
|
|
290
288
|
for data in response:
|
|
291
289
|
if data:
|
|
292
|
-
|
|
290
|
+
self.wfile.write(data)
|
|
291
|
+
self.wfile.flush()
|
|
293
292
|
finally:
|
|
294
293
|
if hasattr(response, 'close'):
|
|
295
294
|
response.close()
|
|
296
|
-
body = body.getvalue()
|
|
297
|
-
self.wfile.write(body)
|
|
298
|
-
self.wfile.flush()
|
|
299
295
|
else:
|
|
300
296
|
from urllib.parse import urlparse
|
|
301
297
|
from io import BytesIO
|