@vercel/go 2.2.15 → 2.2.17
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 +16 -6
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -18743,6 +18743,7 @@ async function build({ files, entrypoint, config, workPath, meta = {}, }) {
|
|
|
18743
18743
|
if (packageName !== 'main') {
|
|
18744
18744
|
const go = await go_helpers_1.createGo(workPath, goPath, process.platform, process.arch, {
|
|
18745
18745
|
cwd: entrypointDirname,
|
|
18746
|
+
stdio: 'inherit',
|
|
18746
18747
|
}, true);
|
|
18747
18748
|
if (!isGoModExist) {
|
|
18748
18749
|
try {
|
|
@@ -19040,16 +19041,25 @@ Learn more: https://vercel.com/docs/runtimes#official-runtimes/go`);
|
|
|
19040
19041
|
const env = build_utils_1.cloneEnv(process.env, meta.env, {
|
|
19041
19042
|
VERCEL_DEV_PORT_FILE: portFile,
|
|
19042
19043
|
});
|
|
19043
|
-
const
|
|
19044
|
-
|
|
19044
|
+
const executable = `./vercel-dev-server-go${process.platform === 'win32' ? '.exe' : ''}`;
|
|
19045
|
+
build_utils_1.debug(`SPAWNING go build -o ${executable} ./... CWD=${tmp}`);
|
|
19046
|
+
child_process_1.spawnSync('go', ['build', '-o', executable, './...'], {
|
|
19047
|
+
cwd: tmp,
|
|
19048
|
+
env,
|
|
19049
|
+
});
|
|
19050
|
+
build_utils_1.debug(`SPAWNING ${executable} CWD=${tmp}`);
|
|
19051
|
+
const child = child_process_1.spawn(executable, [], {
|
|
19045
19052
|
cwd: tmp,
|
|
19046
19053
|
env,
|
|
19047
19054
|
stdio: ['ignore', 'inherit', 'inherit', 'pipe'],
|
|
19048
19055
|
});
|
|
19049
|
-
child.
|
|
19050
|
-
|
|
19051
|
-
|
|
19052
|
-
}
|
|
19056
|
+
child.on('close', async () => {
|
|
19057
|
+
try {
|
|
19058
|
+
await async_retry_1.default(() => fs_extra_1.remove(tmp));
|
|
19059
|
+
}
|
|
19060
|
+
catch (err) {
|
|
19061
|
+
console.error(`Could not delete tmp directory: ${tmp}: ${err}`);
|
|
19062
|
+
}
|
|
19053
19063
|
});
|
|
19054
19064
|
const portPipe = child.stdio[3];
|
|
19055
19065
|
if (!isReadable(portPipe)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/go",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.17",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/go",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/jest": "28.1.6",
|
|
36
36
|
"@types/node-fetch": "^2.3.0",
|
|
37
37
|
"@types/tar": "^4.0.0",
|
|
38
|
-
"@vercel/build-utils": "5.5.
|
|
38
|
+
"@vercel/build-utils": "5.5.9",
|
|
39
39
|
"@vercel/ncc": "0.24.0",
|
|
40
40
|
"async-retry": "1.3.1",
|
|
41
41
|
"execa": "^1.0.0",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"tar": "4.4.6",
|
|
46
46
|
"typescript": "4.3.4"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "7003531d5db7895fc3b2fa940c2d83b6e75bbd9e"
|
|
49
49
|
}
|