@vercel/python 4.6.0 → 4.7.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/dist/index.js +11 -4
- package/package.json +2 -2
- package/vc_init.py +11 -0
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.4/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.4/node_modules/end-of-stream/index.js"(exports, module2) {
|
|
1811
1811
|
var once = require_once();
|
|
1812
1812
|
var noop = function() {
|
|
1813
1813
|
};
|
|
@@ -1827,6 +1827,7 @@ 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;
|
|
1830
1831
|
var onlegacyfinish = function() {
|
|
1831
1832
|
if (!stream.writable)
|
|
1832
1833
|
onfinish();
|
|
@@ -1848,9 +1849,14 @@ var require_end_of_stream = __commonJS({
|
|
|
1848
1849
|
callback.call(stream, err);
|
|
1849
1850
|
};
|
|
1850
1851
|
var onclose = function() {
|
|
1851
|
-
|
|
1852
|
+
process.nextTick(onclosenexttick);
|
|
1853
|
+
};
|
|
1854
|
+
var onclosenexttick = function() {
|
|
1855
|
+
if (cancelled)
|
|
1856
|
+
return;
|
|
1857
|
+
if (readable && !(rs && (rs.ended && !rs.destroyed)))
|
|
1852
1858
|
return callback.call(stream, new Error("premature close"));
|
|
1853
|
-
if (writable && !(ws && ws.ended))
|
|
1859
|
+
if (writable && !(ws && (ws.ended && !ws.destroyed)))
|
|
1854
1860
|
return callback.call(stream, new Error("premature close"));
|
|
1855
1861
|
};
|
|
1856
1862
|
var onrequest = function() {
|
|
@@ -1875,6 +1881,7 @@ var require_end_of_stream = __commonJS({
|
|
|
1875
1881
|
stream.on("error", onerror);
|
|
1876
1882
|
stream.on("close", onclose);
|
|
1877
1883
|
return function() {
|
|
1884
|
+
cancelled = true;
|
|
1878
1885
|
stream.removeListener("complete", onfinish);
|
|
1879
1886
|
stream.removeListener("abort", onclose);
|
|
1880
1887
|
stream.removeListener("request", onrequest);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/python",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.0",
|
|
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": "9.0.
|
|
22
|
+
"@vercel/build-utils": "9.0.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
|
@@ -183,6 +183,17 @@ if 'VERCEL_IPC_FD' in os.environ or 'VERCEL_IPC_PATH' in os.environ:
|
|
|
183
183
|
del self.headers['x-vercel-internal-span-id']
|
|
184
184
|
del self.headers['x-vercel-internal-trace-id']
|
|
185
185
|
|
|
186
|
+
send_message({
|
|
187
|
+
"type": "handler-started",
|
|
188
|
+
"payload": {
|
|
189
|
+
"handlerStartedAt": int(time.time() * 1000),
|
|
190
|
+
"context": {
|
|
191
|
+
"invocationId": invocationId,
|
|
192
|
+
"requestId": requestId,
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
})
|
|
196
|
+
|
|
186
197
|
token = storage.set({
|
|
187
198
|
"invocationId": invocationId,
|
|
188
199
|
"requestId": requestId,
|