@vercel/go 3.4.0 → 3.4.1

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.
Files changed (2) hide show
  1. package/dist/index.js +34 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -17262,7 +17262,23 @@ async function startStandaloneDevServer(opts, resolvedEntrypoint) {
17262
17262
  const child = (0, import_child_process.spawn)("go", ["run", runTarget], {
17263
17263
  cwd: workPath,
17264
17264
  env,
17265
- stdio: ["ignore", "inherit", "inherit"]
17265
+ stdio: ["ignore", "pipe", "pipe"]
17266
+ });
17267
+ child.stdout?.on("data", (data) => {
17268
+ const chunk = Buffer.isBuffer(data) ? data : Buffer.from(data);
17269
+ if (opts.onStdout) {
17270
+ opts.onStdout(chunk);
17271
+ } else {
17272
+ process.stdout.write(chunk.toString());
17273
+ }
17274
+ });
17275
+ child.stderr?.on("data", (data) => {
17276
+ const chunk = Buffer.isBuffer(data) ? data : Buffer.from(data);
17277
+ if (opts.onStderr) {
17278
+ opts.onStderr(chunk);
17279
+ } else {
17280
+ process.stderr.write(chunk.toString());
17281
+ }
17266
17282
  });
17267
17283
  await new Promise((resolve) => setTimeout(resolve, 2e3));
17268
17284
  return {
@@ -17870,7 +17886,23 @@ async function startDevServer(opts) {
17870
17886
  const child = (0, import_child_process2.spawn)(executable, [], {
17871
17887
  cwd: tmp,
17872
17888
  env,
17873
- stdio: ["ignore", "inherit", "inherit", "pipe"]
17889
+ stdio: ["ignore", "pipe", "pipe", "pipe"]
17890
+ });
17891
+ child.stdout?.on("data", (data) => {
17892
+ const chunk = Buffer.isBuffer(data) ? data : Buffer.from(data);
17893
+ if (opts.onStdout) {
17894
+ opts.onStdout(chunk);
17895
+ } else {
17896
+ process.stdout.write(chunk.toString());
17897
+ }
17898
+ });
17899
+ child.stderr?.on("data", (data) => {
17900
+ const chunk = Buffer.isBuffer(data) ? data : Buffer.from(data);
17901
+ if (opts.onStderr) {
17902
+ opts.onStderr(chunk);
17903
+ } else {
17904
+ process.stderr.write(chunk.toString());
17905
+ }
17874
17906
  });
17875
17907
  child.on("close", async () => {
17876
17908
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/go",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/go",
@@ -32,7 +32,7 @@
32
32
  "typescript": "4.3.4",
33
33
  "xdg-app-paths": "5.1.0",
34
34
  "yauzl-promise": "2.1.3",
35
- "@vercel/build-utils": "13.3.2"
35
+ "@vercel/build-utils": "13.4.0"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "node ../../utils/build-builder.mjs",