@vercel/build-utils 2.12.3-canary.35 → 2.12.3-canary.36

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.
@@ -79,6 +79,8 @@ function convertRuntimeToPlugin(buildRuntime, packageName, ext) {
79
79
  await fs_extra_1.default.ensureDir(traceDir);
80
80
  let newPathsRuntime = new Set();
81
81
  let linkersRuntime = [];
82
+ const entryDir = path_1.join('.output', 'server', 'pages');
83
+ const entryRoot = path_1.join(workPath, entryDir);
82
84
  for (const entrypoint of Object.keys(entrypoints)) {
83
85
  const { output } = await buildRuntime({
84
86
  files: sourceFilesPreBuild,
@@ -127,7 +129,6 @@ function convertRuntimeToPlugin(buildRuntime, packageName, ext) {
127
129
  throw new Error(`Could not find a handler file. Please ensure that \`files\` for the returned \`Lambda\` contains an \`FileFsRef\` named "${handlerFileBase}" with a valid \`fsPath\`.`);
128
130
  }
129
131
  const handlerExtName = path_1.extname(handlerFile.fsPath);
130
- const entryRoot = path_1.join(workPath, '.output', 'server', 'pages');
131
132
  const entryBase = path_1.basename(entrypoint).replace(ext, handlerExtName);
132
133
  const entryPath = path_1.join(path_1.dirname(entrypoint), entryBase);
133
134
  const entry = path_1.join(entryRoot, entryPath);
@@ -229,7 +230,9 @@ function convertRuntimeToPlugin(buildRuntime, packageName, ext) {
229
230
  version: 1,
230
231
  files: tracedFiles.map(file => ({
231
232
  input: normalize_path_1.normalizePath(path_1.relative(path_1.dirname(nft), file.absolutePath)),
232
- output: normalize_path_1.normalizePath(file.relativePath),
233
+ // We'd like to place all the dependency files right next
234
+ // to the final launcher file inside of the Lambda.
235
+ output: normalize_path_1.normalizePath(path_1.join(entryDir, 'api', file.relativePath)),
233
236
  })),
234
237
  });
235
238
  await fs_extra_1.default.ensureDir(path_1.dirname(nft));
package/dist/index.js CHANGED
@@ -32826,6 +32826,8 @@ function convertRuntimeToPlugin(buildRuntime, packageName, ext) {
32826
32826
  await fs_extra_1.default.ensureDir(traceDir);
32827
32827
  let newPathsRuntime = new Set();
32828
32828
  let linkersRuntime = [];
32829
+ const entryDir = path_1.join('.output', 'server', 'pages');
32830
+ const entryRoot = path_1.join(workPath, entryDir);
32829
32831
  for (const entrypoint of Object.keys(entrypoints)) {
32830
32832
  const { output } = await buildRuntime({
32831
32833
  files: sourceFilesPreBuild,
@@ -32874,7 +32876,6 @@ function convertRuntimeToPlugin(buildRuntime, packageName, ext) {
32874
32876
  throw new Error(`Could not find a handler file. Please ensure that \`files\` for the returned \`Lambda\` contains an \`FileFsRef\` named "${handlerFileBase}" with a valid \`fsPath\`.`);
32875
32877
  }
32876
32878
  const handlerExtName = path_1.extname(handlerFile.fsPath);
32877
- const entryRoot = path_1.join(workPath, '.output', 'server', 'pages');
32878
32879
  const entryBase = path_1.basename(entrypoint).replace(ext, handlerExtName);
32879
32880
  const entryPath = path_1.join(path_1.dirname(entrypoint), entryBase);
32880
32881
  const entry = path_1.join(entryRoot, entryPath);
@@ -32976,7 +32977,9 @@ function convertRuntimeToPlugin(buildRuntime, packageName, ext) {
32976
32977
  version: 1,
32977
32978
  files: tracedFiles.map(file => ({
32978
32979
  input: normalize_path_1.normalizePath(path_1.relative(path_1.dirname(nft), file.absolutePath)),
32979
- output: normalize_path_1.normalizePath(file.relativePath),
32980
+ // We'd like to place all the dependency files right next
32981
+ // to the final launcher file inside of the Lambda.
32982
+ output: normalize_path_1.normalizePath(path_1.join(entryDir, 'api', file.relativePath)),
32980
32983
  })),
32981
32984
  });
32982
32985
  await fs_extra_1.default.ensureDir(path_1.dirname(nft));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "2.12.3-canary.35",
3
+ "version": "2.12.3-canary.36",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -49,5 +49,5 @@
49
49
  "typescript": "4.3.4",
50
50
  "yazl": "2.4.3"
51
51
  },
52
- "gitHead": "2c3ddffaacb370eb4c0893815b3bc7417f92d432"
52
+ "gitHead": "1c3701628d88e82f6e0535ecdba2c5e91ce61976"
53
53
  }