@vercel/static-build 1.3.1 → 1.3.3

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 CHANGED
@@ -240726,13 +240726,25 @@ async function getMonorepoDefaultSettings(projectName, projectPath, relativeToRo
240726
240726
  if (!hasBuildPipeline) {
240727
240727
  throw new MissingBuildPipeline();
240728
240728
  }
240729
+ if (projectPath === '/') {
240730
+ return {
240731
+ monorepoManager: 'turbo',
240732
+ buildCommand: 'npx turbo run build',
240733
+ installCommand: packageManager ? `${packageManager} install` : null,
240734
+ commandForIgnoringBuildStep: 'npx turbo-ignore',
240735
+ };
240736
+ }
240729
240737
  return {
240730
240738
  monorepoManager: 'turbo',
240731
- buildCommand: `cd ${relativeToRoot} && npx turbo run build --filter={${projectPath}}...`,
240739
+ buildCommand: projectPath
240740
+ ? `cd ${relativeToRoot} && npx turbo run build --filter={${projectPath}}...`
240741
+ : null,
240732
240742
  installCommand: packageManager === 'npm'
240733
240743
  ? `${packageManager} install --prefix=${relativeToRoot}`
240734
- : `${packageManager} install`,
240735
- commandForIgnoringBuildStep: `npx turbo-ignore`,
240744
+ : packageManager
240745
+ ? `${packageManager} install`
240746
+ : null,
240747
+ commandForIgnoringBuildStep: 'npx turbo-ignore',
240736
240748
  };
240737
240749
  }
240738
240750
  else if (monorepoManager === 'nx') {
@@ -240767,12 +240779,23 @@ async function getMonorepoDefaultSettings(projectName, projectPath, relativeToRo
240767
240779
  throw new MissingBuildTarget();
240768
240780
  }
240769
240781
  }
240782
+ if (projectPath === '/') {
240783
+ return {
240784
+ monorepoManager: 'nx',
240785
+ buildCommand: 'npx nx build',
240786
+ installCommand: packageManager ? `${packageManager} install` : null,
240787
+ };
240788
+ }
240770
240789
  return {
240771
240790
  monorepoManager: 'nx',
240772
- buildCommand: `cd ${relativeToRoot} && npx nx build ${projectName}`,
240791
+ buildCommand: projectName
240792
+ ? `cd ${relativeToRoot} && npx nx build ${projectName}`
240793
+ : null,
240773
240794
  installCommand: packageManager === 'npm'
240774
240795
  ? `${packageManager} install --prefix=${relativeToRoot}`
240775
- : `${packageManager} install`,
240796
+ : packageManager
240797
+ ? `${packageManager} install`
240798
+ : null,
240776
240799
  };
240777
240800
  }
240778
240801
  // TODO (@Ethan-Arrowood) - Revisit rush support when we can test it better
@@ -241308,6 +241331,7 @@ exports.BaseFunctionConfigSchema = {
241308
241331
  type: 'object',
241309
241332
  properties: {
241310
241333
  runtime: { type: 'string' },
241334
+ cron: { type: 'string' },
241311
241335
  memory: { type: 'number' },
241312
241336
  maxDuration: { type: 'number' },
241313
241337
  regions: {
@@ -242600,9 +242624,8 @@ async function updateGatsbyConfig(dir, plugins) {
242600
242624
  await updateGatsbyConfigJs(gatsbyConfigPathJs, plugins);
242601
242625
  }
242602
242626
  else {
242603
- await fs_extra_1.default.writeFile(gatsbyConfigPathJs, `module.exports = ${JSON.stringify({
242604
- plugins,
242605
- })}`);
242627
+ await fs_extra_1.default.writeFile(gatsbyConfigPathJs, `${GENERATED_FILE_COMMENT}
242628
+ module.exports = ${JSON.stringify({ plugins })}`);
242606
242629
  }
242607
242630
  }
242608
242631
  const GENERATED_FILE_COMMENT = `// This file was generated by @vercel/static-build`;
@@ -242720,7 +242743,8 @@ async function updateGatsbyNode(dir) {
242720
242743
  await updateGatsbyNodeJs(gatsbyNodePathJs);
242721
242744
  }
242722
242745
  else {
242723
- await fs_extra_1.default.writeFile(gatsbyNodePathJs, `module.exports = require('@vercel/gatsby-plugin-vercel-builder/gatsby-node.js');`);
242746
+ await fs_extra_1.default.writeFile(gatsbyNodePathJs, `${GENERATED_FILE_COMMENT}
242747
+ module.exports = require('@vercel/gatsby-plugin-vercel-builder/gatsby-node.js');`);
242724
242748
  }
242725
242749
  }
242726
242750
  async function updateGatsbyNodeTs(configPath) {
@@ -84,9 +84,8 @@ async function updateGatsbyConfig(dir, plugins) {
84
84
  await updateGatsbyConfigJs(gatsbyConfigPathJs, plugins);
85
85
  }
86
86
  else {
87
- await fs_extra_1.default.writeFile(gatsbyConfigPathJs, `module.exports = ${JSON.stringify({
88
- plugins,
89
- })}`);
87
+ await fs_extra_1.default.writeFile(gatsbyConfigPathJs, `${GENERATED_FILE_COMMENT}
88
+ module.exports = ${JSON.stringify({ plugins })}`);
90
89
  }
91
90
  }
92
91
  const GENERATED_FILE_COMMENT = `// This file was generated by @vercel/static-build`;
@@ -204,7 +203,8 @@ async function updateGatsbyNode(dir) {
204
203
  await updateGatsbyNodeJs(gatsbyNodePathJs);
205
204
  }
206
205
  else {
207
- await fs_extra_1.default.writeFile(gatsbyNodePathJs, `module.exports = require('@vercel/gatsby-plugin-vercel-builder/gatsby-node.js');`);
206
+ await fs_extra_1.default.writeFile(gatsbyNodePathJs, `${GENERATED_FILE_COMMENT}
207
+ module.exports = require('@vercel/gatsby-plugin-vercel-builder/gatsby-node.js');`);
208
208
  }
209
209
  }
210
210
  async function updateGatsbyNodeTs(configPath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/static-build",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/build-step",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@vercel/gatsby-plugin-vercel-analytics": "1.0.7",
33
- "@vercel/gatsby-plugin-vercel-builder": "1.0.3"
33
+ "@vercel/gatsby-plugin-vercel-builder": "1.1.1"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/aws-lambda": "8.10.64",
@@ -42,12 +42,12 @@
42
42
  "@types/node-fetch": "2.5.4",
43
43
  "@types/promise-timeout": "1.3.0",
44
44
  "@types/semver": "7.3.13",
45
- "@vercel/build-utils": "6.0.1",
45
+ "@vercel/build-utils": "6.2.0",
46
46
  "@vercel/frameworks": "1.3.0",
47
- "@vercel/fs-detectors": "3.7.7",
47
+ "@vercel/fs-detectors": "3.7.9",
48
48
  "@vercel/ncc": "0.24.0",
49
49
  "@vercel/routing-utils": "2.1.8",
50
- "@vercel/static-config": "2.0.11",
50
+ "@vercel/static-config": "2.0.12",
51
51
  "execa": "3.2.0",
52
52
  "fs-extra": "10.0.0",
53
53
  "get-port": "5.0.0",
@@ -60,5 +60,5 @@
60
60
  "ts-morph": "12.0.0",
61
61
  "typescript": "4.3.4"
62
62
  },
63
- "gitHead": "ada9a48d57be8f4375494a369aaa98cee1f5eae2"
63
+ "gitHead": "a585969dd3b77a4ed36d6a2ca11b34f9050489f1"
64
64
  }