@vercel/go 3.10.5 → 3.11.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/bin/proxy-linux-amd64 +0 -0
- package/bin/proxy-linux-arm64 +0 -0
- package/dist/index.js +35 -7
- package/package.json +3 -3
package/bin/proxy-linux-amd64
CHANGED
|
Binary file
|
package/bin/proxy-linux-arm64
CHANGED
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -14894,15 +14894,29 @@ async function generateProjectManifest({
|
|
|
14894
14894
|
var diagnostics = (0, import_build_utils3.createDiagnostics)("go");
|
|
14895
14895
|
|
|
14896
14896
|
// src/standalone-server.ts
|
|
14897
|
+
var STANDALONE_LAMBDA_PATH = "go";
|
|
14898
|
+
function ownsRouteTable(service) {
|
|
14899
|
+
return !(service?.name && service.type);
|
|
14900
|
+
}
|
|
14897
14901
|
function getStandaloneServerRoutes(service) {
|
|
14898
|
-
if (!service
|
|
14902
|
+
if (!ownsRouteTable(service)) {
|
|
14899
14903
|
return void 0;
|
|
14900
14904
|
}
|
|
14901
14905
|
return [
|
|
14902
14906
|
{ handle: "filesystem" },
|
|
14907
|
+
// This route matches the resolved destination after rewrites. Copy that
|
|
14908
|
+
// path into the runtime request before dispatching the Go server so its
|
|
14909
|
+
// application routing observes the rewrite.
|
|
14903
14910
|
{
|
|
14904
14911
|
src: "/(.*)",
|
|
14905
|
-
dest:
|
|
14912
|
+
dest: `/${STANDALONE_LAMBDA_PATH}`,
|
|
14913
|
+
transforms: [
|
|
14914
|
+
{
|
|
14915
|
+
type: "request.path",
|
|
14916
|
+
op: "set",
|
|
14917
|
+
args: "/$1"
|
|
14918
|
+
}
|
|
14919
|
+
]
|
|
14906
14920
|
}
|
|
14907
14921
|
];
|
|
14908
14922
|
}
|
|
@@ -14925,7 +14939,21 @@ async function findGoModPath(entrypointDir, workPath) {
|
|
|
14925
14939
|
isGoModInRootDir
|
|
14926
14940
|
};
|
|
14927
14941
|
}
|
|
14928
|
-
async function buildStandaloneServer({
|
|
14942
|
+
async function buildStandaloneServer(options) {
|
|
14943
|
+
const lambda = await createStandaloneServerLambda(options);
|
|
14944
|
+
const { service } = options;
|
|
14945
|
+
if (!ownsRouteTable(service)) {
|
|
14946
|
+
return { resultVersion: 3, result: { output: lambda } };
|
|
14947
|
+
}
|
|
14948
|
+
return {
|
|
14949
|
+
resultVersion: 2,
|
|
14950
|
+
result: {
|
|
14951
|
+
output: { [STANDALONE_LAMBDA_PATH]: lambda },
|
|
14952
|
+
routes: getStandaloneServerRoutes(service)
|
|
14953
|
+
}
|
|
14954
|
+
};
|
|
14955
|
+
}
|
|
14956
|
+
async function createStandaloneServerLambda({
|
|
14929
14957
|
files,
|
|
14930
14958
|
entrypoint,
|
|
14931
14959
|
config,
|
|
@@ -15019,8 +15047,7 @@ async function buildStandaloneServer({
|
|
|
15019
15047
|
framework: config.framework ?? void 0,
|
|
15020
15048
|
serviceType: service ? (0, import_build_utils4.getReportedServiceType)(service) : void 0
|
|
15021
15049
|
});
|
|
15022
|
-
|
|
15023
|
-
return { output: lambda, ...routes ? { routes } : {} };
|
|
15050
|
+
return lambda;
|
|
15024
15051
|
}
|
|
15025
15052
|
var DEV_SERVER_STARTUP_TIMEOUT = 5 * 6e4;
|
|
15026
15053
|
var PERSISTENT_SERVERS = /* @__PURE__ */ new Map();
|
|
@@ -15231,7 +15258,7 @@ function getRenamedEntrypoint(entrypoint) {
|
|
|
15231
15258
|
}
|
|
15232
15259
|
return void 0;
|
|
15233
15260
|
}
|
|
15234
|
-
var version =
|
|
15261
|
+
var version = -1;
|
|
15235
15262
|
async function build(options) {
|
|
15236
15263
|
const {
|
|
15237
15264
|
files,
|
|
@@ -15396,7 +15423,8 @@ Manually assigning 'GO111MODULE' is not recommended.
|
|
|
15396
15423
|
});
|
|
15397
15424
|
}
|
|
15398
15425
|
return {
|
|
15399
|
-
|
|
15426
|
+
resultVersion: 3,
|
|
15427
|
+
result: { output: lambda }
|
|
15400
15428
|
};
|
|
15401
15429
|
} catch (error) {
|
|
15402
15430
|
(0, import_build_utils5.debug)(`Go Builder Error: ${error}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/go",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/go",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"vitest": "4.1.10",
|
|
33
33
|
"xdg-app-paths": "5.1.0",
|
|
34
34
|
"yauzl-promise": "2.1.3",
|
|
35
|
-
"@vercel/
|
|
36
|
-
"@vercel
|
|
35
|
+
"@vercel-internals/ipc-proxy": "1.0.0",
|
|
36
|
+
"@vercel/build-utils": "14.0.5"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "node build.mjs",
|