@vercel/backends 0.8.27 → 0.8.29

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.mjs +12 -2
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -1581,12 +1581,22 @@ async function findEntrypointInOutputDir(dir) {
1581
1581
  return;
1582
1582
  }
1583
1583
  }
1584
+ /**
1585
+ * `outputDirectory` reaches the builder as `config.outputDirectory` for
1586
+ * zero-config builds (copied from project settings by `fs-detectors`), but
1587
+ * wrapper builders (e.g. `@vercel/express`) read
1588
+ * `config.projectSettings.outputDirectory` — accept both.
1589
+ */
1590
+ const getOutputDirectorySetting = (config) => {
1591
+ const setting = config.outputDirectory ?? config.projectSettings?.outputDirectory;
1592
+ return typeof setting === "string" && setting !== "" ? setting : void 0;
1593
+ };
1584
1594
  const maybeDoBuildCommand = async (args, downloadResult) => {
1585
1595
  const buildCommandResult = await maybeExecBuildCommand(args, downloadResult);
1586
- const outputSetting = args.config.outputDirectory;
1596
+ const outputSetting = getOutputDirectorySetting(args.config);
1587
1597
  let outputDir;
1588
1598
  let entrypoint;
1589
- if (buildCommandResult && outputSetting) if (outputSetting) {
1599
+ if (buildCommandResult) if (outputSetting) {
1590
1600
  const _outputDir = join(args.workPath, outputSetting);
1591
1601
  if (resolve(_outputDir) !== resolve(args.workPath)) {
1592
1602
  const _entrypoint = await findEntrypointInOutputDir(_outputDir);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/backends",
3
- "version": "0.8.27",
3
+ "version": "0.8.29",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.mjs",
6
6
  "homepage": "https://vercel.com/docs",
@@ -37,7 +37,7 @@
37
37
  "ts-morph": "12.0.0",
38
38
  "tsx": "4.21.0",
39
39
  "zod": "3.22.4",
40
- "@vercel/build-utils": "13.36.0",
40
+ "@vercel/build-utils": "13.36.2",
41
41
  "@vercel/static-config": "3.4.0"
42
42
  },
43
43
  "devDependencies": {