@vercel/build-utils 2.12.3-canary.37 → 2.12.3-canary.38

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.
@@ -91,6 +91,7 @@ function convertRuntimeToPlugin(buildRuntime, packageName, ext) {
91
91
  },
92
92
  meta: {
93
93
  avoidTopLevelInstall: true,
94
+ skipDownload: true,
94
95
  },
95
96
  });
96
97
  // Legacy Runtimes tend to pollute the `workPath` with compiled results,
@@ -284,7 +285,14 @@ function convertRuntimeToPlugin(buildRuntime, packageName, ext) {
284
285
  }
285
286
  exports.convertRuntimeToPlugin = convertRuntimeToPlugin;
286
287
  async function linkOrCopy(existingPath, newPath) {
287
- await fs_extra_1.default.copyFile(existingPath, newPath);
288
+ try {
289
+ await fs_extra_1.default.createLink(existingPath, newPath);
290
+ }
291
+ catch (err) {
292
+ if (err.code !== 'EEXIST') {
293
+ await fs_extra_1.default.copyFile(existingPath, newPath);
294
+ }
295
+ }
288
296
  }
289
297
  async function readJson(filePath) {
290
298
  try {
package/dist/index.js CHANGED
@@ -26693,7 +26693,6 @@ exports.frameworks = [
26693
26693
  },
26694
26694
  dependency: 'gatsby',
26695
26695
  getOutputDirName: async () => 'public',
26696
- getFsOutputDir: async () => 'public',
26697
26696
  defaultRoutes: async (dirPrefix) => {
26698
26697
  // This file could be generated by gatsby-plugin-now or gatsby-plugin-zeit-now
26699
26698
  try {
@@ -26774,7 +26773,6 @@ exports.frameworks = [
26774
26773
  },
26775
26774
  },
26776
26775
  dependency: 'remix',
26777
- getFsOutputDir: async () => 'public',
26778
26776
  getOutputDirName: async () => 'public',
26779
26777
  defaultRoutes: [
26780
26778
  {
@@ -26802,10 +26800,13 @@ exports.frameworks = [
26802
26800
  source: '/build/(.*)',
26803
26801
  regex: '/build/(.*)',
26804
26802
  headers: [
26805
- { key: 'cache-control', value: 'public, max-age=31536000, immutable' },
26803
+ {
26804
+ key: 'cache-control',
26805
+ value: 'public, max-age=31536000, immutable',
26806
+ },
26806
26807
  ],
26807
26808
  },
26808
- ]
26809
+ ],
26809
26810
  },
26810
26811
  {
26811
26812
  name: 'Hexo',
@@ -26840,7 +26841,6 @@ exports.frameworks = [
26840
26841
  },
26841
26842
  },
26842
26843
  dependency: 'hexo',
26843
- getFsOutputDir: async () => 'public',
26844
26844
  getOutputDirName: async () => 'public',
26845
26845
  },
26846
26846
  {
@@ -26876,7 +26876,6 @@ exports.frameworks = [
26876
26876
  },
26877
26877
  },
26878
26878
  dependency: '@11ty/eleventy',
26879
- getFsOutputDir: async () => '_site',
26880
26879
  getOutputDirName: async () => '_site',
26881
26880
  cachePattern: '.cache/**',
26882
26881
  },
@@ -26913,21 +26912,6 @@ exports.frameworks = [
26913
26912
  },
26914
26913
  },
26915
26914
  dependency: '@docusaurus/core',
26916
- getFsOutputDir: async (dirPrefix) => {
26917
- const base = 'build';
26918
- try {
26919
- const location = path_1.join(dirPrefix, base);
26920
- const content = await readdir(location, { withFileTypes: true });
26921
- // If there is only one file in it that is a dir we'll use it as dist dir
26922
- if (content.length === 1 && content[0].isDirectory()) {
26923
- return path_1.join(base, content[0].name);
26924
- }
26925
- }
26926
- catch (error) {
26927
- console.error(`Error detecting output directory: `, error);
26928
- }
26929
- return base;
26930
- },
26931
26915
  getOutputDirName: async (dirPrefix) => {
26932
26916
  const base = 'build';
26933
26917
  try {
@@ -27057,21 +27041,6 @@ exports.frameworks = [
27057
27041
  },
27058
27042
  },
27059
27043
  dependency: 'docusaurus',
27060
- getFsOutputDir: async (dirPrefix) => {
27061
- const base = 'build';
27062
- try {
27063
- const location = path_1.join(dirPrefix, base);
27064
- const content = await readdir(location, { withFileTypes: true });
27065
- // If there is only one file in it that is a dir we'll use it as dist dir
27066
- if (content.length === 1 && content[0].isDirectory()) {
27067
- return path_1.join(base, content[0].name);
27068
- }
27069
- }
27070
- catch (error) {
27071
- console.error(`Error detecting output directory: `, error);
27072
- }
27073
- return base;
27074
- },
27075
27044
  getOutputDirName: async (dirPrefix) => {
27076
27045
  const base = 'build';
27077
27046
  try {
@@ -27121,7 +27090,6 @@ exports.frameworks = [
27121
27090
  },
27122
27091
  },
27123
27092
  dependency: 'preact-cli',
27124
- getFsOutputDir: async () => 'build',
27125
27093
  getOutputDirName: async () => 'build',
27126
27094
  defaultRoutes: [
27127
27095
  {
@@ -27176,7 +27144,6 @@ exports.frameworks = [
27176
27144
  },
27177
27145
  },
27178
27146
  dependency: '@dojo/cli',
27179
- getFsOutputDir: async () => 'output/dist',
27180
27147
  getOutputDirName: async () => path_1.join('output', 'dist'),
27181
27148
  defaultRoutes: [
27182
27149
  {
@@ -27241,7 +27208,6 @@ exports.frameworks = [
27241
27208
  },
27242
27209
  },
27243
27210
  dependency: 'ember-cli',
27244
- getFsOutputDir: async () => 'dist',
27245
27211
  getOutputDirName: async () => 'dist',
27246
27212
  defaultRoutes: [
27247
27213
  {
@@ -27294,7 +27260,6 @@ exports.frameworks = [
27294
27260
  },
27295
27261
  },
27296
27262
  dependency: '@vue/cli-service',
27297
- getFsOutputDir: async () => 'dist',
27298
27263
  getOutputDirName: async () => 'dist',
27299
27264
  defaultRoutes: [
27300
27265
  {
@@ -27370,7 +27335,6 @@ exports.frameworks = [
27370
27335
  },
27371
27336
  },
27372
27337
  dependency: '@scullyio/init',
27373
- getFsOutputDir: async () => 'dist',
27374
27338
  getOutputDirName: async () => 'dist/static',
27375
27339
  },
27376
27340
  {
@@ -27405,7 +27369,6 @@ exports.frameworks = [
27405
27369
  },
27406
27370
  },
27407
27371
  dependency: '@ionic/angular',
27408
- getFsOutputDir: async () => 'www',
27409
27372
  getOutputDirName: async () => 'www',
27410
27373
  defaultRoutes: [
27411
27374
  {
@@ -27457,7 +27420,6 @@ exports.frameworks = [
27457
27420
  },
27458
27421
  },
27459
27422
  dependency: '@angular/cli',
27460
- getFsOutputDir: async () => 'dist',
27461
27423
  getOutputDirName: async (dirPrefix) => {
27462
27424
  const base = 'dist';
27463
27425
  try {
@@ -27523,7 +27485,6 @@ exports.frameworks = [
27523
27485
  },
27524
27486
  },
27525
27487
  dependency: 'polymer-cli',
27526
- getFsOutputDir: async () => 'build',
27527
27488
  getOutputDirName: async (dirPrefix) => {
27528
27489
  const base = 'build';
27529
27490
  try {
@@ -27591,7 +27552,6 @@ exports.frameworks = [
27591
27552
  },
27592
27553
  },
27593
27554
  dependency: 'sirv-cli',
27594
- getFsOutputDir: async () => 'public',
27595
27555
  getOutputDirName: async () => 'public',
27596
27556
  defaultRoutes: [
27597
27557
  {
@@ -27639,10 +27599,9 @@ exports.frameworks = [
27639
27599
  placeholder: 'svelte-kit dev',
27640
27600
  },
27641
27601
  outputDirectory: {
27642
- placeholder: 'public',
27602
+ value: 'public',
27643
27603
  },
27644
27604
  },
27645
- getFsOutputDir: async () => '.output',
27646
27605
  getOutputDirName: async () => 'public',
27647
27606
  },
27648
27607
  {
@@ -27677,7 +27636,6 @@ exports.frameworks = [
27677
27636
  },
27678
27637
  },
27679
27638
  dependency: '@ionic/react',
27680
- getFsOutputDir: async () => 'build',
27681
27639
  getOutputDirName: async () => 'build',
27682
27640
  defaultRoutes: [
27683
27641
  {
@@ -27782,7 +27740,6 @@ exports.frameworks = [
27782
27740
  },
27783
27741
  },
27784
27742
  dependency: 'react-scripts',
27785
- getFsOutputDir: async () => 'build',
27786
27743
  getOutputDirName: async () => 'build',
27787
27744
  defaultRoutes: [
27788
27745
  {
@@ -27882,7 +27839,6 @@ exports.frameworks = [
27882
27839
  },
27883
27840
  },
27884
27841
  dependency: 'gridsome',
27885
- getFsOutputDir: async () => 'dist',
27886
27842
  getOutputDirName: async () => 'dist',
27887
27843
  },
27888
27844
  {
@@ -27918,7 +27874,6 @@ exports.frameworks = [
27918
27874
  },
27919
27875
  },
27920
27876
  dependency: 'umi',
27921
- getFsOutputDir: async () => 'dist',
27922
27877
  getOutputDirName: async () => 'dist',
27923
27878
  defaultRoutes: [
27924
27879
  {
@@ -27970,7 +27925,6 @@ exports.frameworks = [
27970
27925
  },
27971
27926
  },
27972
27927
  dependency: 'sapper',
27973
- getFsOutputDir: async () => '__sapper__/export',
27974
27928
  getOutputDirName: async () => '__sapper__/export',
27975
27929
  },
27976
27930
  {
@@ -28006,7 +27960,6 @@ exports.frameworks = [
28006
27960
  },
28007
27961
  },
28008
27962
  dependency: 'saber',
28009
- getFsOutputDir: async () => 'public',
28010
27963
  getOutputDirName: async () => 'public',
28011
27964
  defaultRoutes: [
28012
27965
  {
@@ -28073,7 +28026,6 @@ exports.frameworks = [
28073
28026
  },
28074
28027
  },
28075
28028
  dependency: '@stencil/core',
28076
- getFsOutputDir: async () => 'www',
28077
28029
  getOutputDirName: async () => 'www',
28078
28030
  defaultRoutes: [
28079
28031
  {
@@ -28160,7 +28112,6 @@ exports.frameworks = [
28160
28112
  },
28161
28113
  },
28162
28114
  dependency: 'nuxt',
28163
- getFsOutputDir: async () => '.output',
28164
28115
  getOutputDirName: async () => 'dist',
28165
28116
  cachePattern: '.nuxt/**',
28166
28117
  defaultRoutes: [
@@ -28217,7 +28168,6 @@ exports.frameworks = [
28217
28168
  placeholder: 'RedwoodJS default',
28218
28169
  },
28219
28170
  },
28220
- getFsOutputDir: async () => 'public',
28221
28171
  getOutputDirName: async () => 'public',
28222
28172
  },
28223
28173
  {
@@ -28260,12 +28210,6 @@ exports.frameworks = [
28260
28210
  placeholder: '`public` or `publishDir` from the `config` file',
28261
28211
  },
28262
28212
  },
28263
- getFsOutputDir: async (dirPrefix) => {
28264
- const config = await read_config_file_1.readConfigFile(['config.json', 'config.yaml', 'config.toml'].map(fileName => {
28265
- return path_1.join(dirPrefix, fileName);
28266
- }));
28267
- return (config && config.publishDir) || 'public';
28268
- },
28269
28213
  getOutputDirName: async (dirPrefix) => {
28270
28214
  const config = await read_config_file_1.readConfigFile(['config.json', 'config.yaml', 'config.toml'].map(fileName => {
28271
28215
  return path_1.join(dirPrefix, fileName);
@@ -28305,10 +28249,6 @@ exports.frameworks = [
28305
28249
  placeholder: '`_site` or `destination` from `_config.yml`',
28306
28250
  },
28307
28251
  },
28308
- getFsOutputDir: async (dirPrefix) => {
28309
- const config = await read_config_file_1.readConfigFile(path_1.join(dirPrefix, '_config.yml'));
28310
- return (config && config.destination) || '_site';
28311
- },
28312
28252
  getOutputDirName: async (dirPrefix) => {
28313
28253
  const config = await read_config_file_1.readConfigFile(path_1.join(dirPrefix, '_config.yml'));
28314
28254
  return (config && config.destination) || '_site';
@@ -28346,7 +28286,6 @@ exports.frameworks = [
28346
28286
  value: 'public',
28347
28287
  },
28348
28288
  },
28349
- getFsOutputDir: async () => 'public',
28350
28289
  getOutputDirName: async () => 'public',
28351
28290
  },
28352
28291
  {
@@ -28380,7 +28319,6 @@ exports.frameworks = [
28380
28319
  value: 'build',
28381
28320
  },
28382
28321
  },
28383
- getFsOutputDir: async () => 'build',
28384
28322
  getOutputDirName: async () => 'build',
28385
28323
  cachePattern: '{vendor/bin,vendor/cache,vendor/bundle}/**',
28386
28324
  },
@@ -28415,7 +28353,6 @@ exports.frameworks = [
28415
28353
  value: 'public',
28416
28354
  },
28417
28355
  },
28418
- getFsOutputDir: async () => 'public',
28419
28356
  getOutputDirName: async () => 'public',
28420
28357
  defaultVersion: '0.13.0',
28421
28358
  },
@@ -28453,7 +28390,6 @@ exports.frameworks = [
28453
28390
  },
28454
28391
  },
28455
28392
  dependency: 'vite',
28456
- getFsOutputDir: async () => 'dist',
28457
28393
  getOutputDirName: async () => 'dist',
28458
28394
  },
28459
28395
  {
@@ -28489,7 +28425,6 @@ exports.frameworks = [
28489
28425
  },
28490
28426
  },
28491
28427
  dependency: 'parcel',
28492
- getFsOutputDir: async () => 'dist',
28493
28428
  getOutputDirName: async () => 'dist',
28494
28429
  defaultRoutes: [
28495
28430
  {
@@ -32838,6 +32773,7 @@ function convertRuntimeToPlugin(buildRuntime, packageName, ext) {
32838
32773
  },
32839
32774
  meta: {
32840
32775
  avoidTopLevelInstall: true,
32776
+ skipDownload: true,
32841
32777
  },
32842
32778
  });
32843
32779
  // Legacy Runtimes tend to pollute the `workPath` with compiled results,
@@ -33031,7 +32967,14 @@ function convertRuntimeToPlugin(buildRuntime, packageName, ext) {
33031
32967
  }
33032
32968
  exports.convertRuntimeToPlugin = convertRuntimeToPlugin;
33033
32969
  async function linkOrCopy(existingPath, newPath) {
33034
- await fs_extra_1.default.copyFile(existingPath, newPath);
32970
+ try {
32971
+ await fs_extra_1.default.createLink(existingPath, newPath);
32972
+ }
32973
+ catch (err) {
32974
+ if (err.code !== 'EEXIST') {
32975
+ await fs_extra_1.default.copyFile(existingPath, newPath);
32976
+ }
32977
+ }
33035
32978
  }
33036
32979
  async function readJson(filePath) {
33037
32980
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "2.12.3-canary.37",
3
+ "version": "2.12.3-canary.38",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -30,7 +30,7 @@
30
30
  "@types/node-fetch": "^2.1.6",
31
31
  "@types/semver": "6.0.0",
32
32
  "@types/yazl": "^2.4.1",
33
- "@vercel/frameworks": "0.5.1-canary.16",
33
+ "@vercel/frameworks": "0.5.1-canary.17",
34
34
  "@vercel/ncc": "0.24.0",
35
35
  "aggregate-error": "3.0.1",
36
36
  "async-retry": "1.2.3",
@@ -49,5 +49,5 @@
49
49
  "typescript": "4.3.4",
50
50
  "yazl": "2.4.3"
51
51
  },
52
- "gitHead": "fe43c9c4b2e8fdefbc4b35778e4593a55feddac0"
52
+ "gitHead": "6792edf32a1a81f240cc1b5c9f9cc756a9a2b83b"
53
53
  }