@vercel/redwood 2.4.1 → 2.4.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.
Files changed (2) hide show
  1. package/dist/index.js +24 -10
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1672,6 +1672,16 @@ var require_schemas = __commonJS({
1672
1672
  }
1673
1673
  }
1674
1674
  ]
1675
+ },
1676
+ env: {
1677
+ description: "An array of environment variable names that should be replaced at runtime in the args value",
1678
+ type: "array",
1679
+ minItems: 1,
1680
+ maxItems: 64,
1681
+ items: {
1682
+ type: "string",
1683
+ maxLength: 256
1684
+ }
1675
1685
  }
1676
1686
  },
1677
1687
  allOf: [
@@ -1769,7 +1779,7 @@ var require_schemas = __commonJS({
1769
1779
  patternProperties: {
1770
1780
  "^.{1,256}$": {
1771
1781
  type: "string",
1772
- maxLength: 4096
1782
+ maxLength: 32768
1773
1783
  }
1774
1784
  }
1775
1785
  },
@@ -1966,7 +1976,7 @@ var require_schemas = __commonJS({
1966
1976
  },
1967
1977
  value: {
1968
1978
  type: "string",
1969
- maxLength: 4096
1979
+ maxLength: 32768
1970
1980
  }
1971
1981
  }
1972
1982
  }
@@ -2458,17 +2468,21 @@ var build = async ({
2458
2468
  config,
2459
2469
  meta
2460
2470
  );
2471
+ const spawnOpts = (0, import_build_utils.getSpawnOptions)(meta, nodeVersion);
2472
+ if (!spawnOpts.env) {
2473
+ spawnOpts.env = {};
2474
+ }
2461
2475
  const {
2462
2476
  cliType,
2463
2477
  lockfileVersion,
2464
2478
  packageJsonPackageManager,
2465
2479
  turboSupportsCorepackHome
2466
2480
  } = await (0, import_build_utils.scanParentDirs)(entrypointFsDirname, true);
2467
- const spawnEnv = (0, import_build_utils.getEnvForPackageManager)({
2481
+ spawnOpts.env = (0, import_build_utils.getEnvForPackageManager)({
2468
2482
  cliType,
2469
2483
  lockfileVersion,
2470
2484
  packageJsonPackageManager,
2471
- env: process.env,
2485
+ env: spawnOpts.env || {},
2472
2486
  turboSupportsCorepackHome,
2473
2487
  projectCreatedAt: config.projectSettings?.createdAt
2474
2488
  });
@@ -2476,7 +2490,7 @@ var build = async ({
2476
2490
  if (installCommand.trim()) {
2477
2491
  console.log(`Running "install" command: \`${installCommand}\`...`);
2478
2492
  await (0, import_build_utils.execCommand)(installCommand, {
2479
- env: spawnEnv,
2493
+ ...spawnOpts,
2480
2494
  cwd: entrypointFsDirname
2481
2495
  });
2482
2496
  } else {
@@ -2486,7 +2500,7 @@ var build = async ({
2486
2500
  await (0, import_build_utils.runNpmInstall)(
2487
2501
  entrypointFsDirname,
2488
2502
  [],
2489
- { env: spawnEnv },
2503
+ spawnOpts,
2490
2504
  meta,
2491
2505
  config.projectSettings?.createdAt
2492
2506
  );
@@ -2501,7 +2515,7 @@ var build = async ({
2501
2515
  if (buildCommand) {
2502
2516
  (0, import_build_utils.debug)(`Executing build command "${buildCommand}"`);
2503
2517
  await (0, import_build_utils.execCommand)(buildCommand, {
2504
- env: spawnEnv,
2518
+ ...spawnOpts,
2505
2519
  cwd: workPath
2506
2520
  });
2507
2521
  } else if (hasScript("vercel-build", pkg)) {
@@ -2509,7 +2523,7 @@ var build = async ({
2509
2523
  await (0, import_build_utils.runPackageJsonScript)(
2510
2524
  workPath,
2511
2525
  "vercel-build",
2512
- { env: spawnEnv },
2526
+ spawnOpts,
2513
2527
  config.projectSettings?.createdAt
2514
2528
  );
2515
2529
  } else if (hasScript("build", pkg)) {
@@ -2517,7 +2531,7 @@ var build = async ({
2517
2531
  await (0, import_build_utils.runPackageJsonScript)(
2518
2532
  workPath,
2519
2533
  "build",
2520
- { env: spawnEnv },
2534
+ spawnOpts,
2521
2535
  config.projectSettings?.createdAt
2522
2536
  );
2523
2537
  } else {
@@ -2535,7 +2549,7 @@ var build = async ({
2535
2549
  cmd = "yarn rw deploy vercel";
2536
2550
  }
2537
2551
  await (0, import_build_utils.execCommand)(cmd, {
2538
- env: spawnEnv,
2552
+ ...spawnOpts,
2539
2553
  cwd: workPath
2540
2554
  });
2541
2555
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/redwood",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "main": "./dist/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://vercel.com/docs",
@@ -13,7 +13,7 @@
13
13
  "directory": "packages/redwood"
14
14
  },
15
15
  "dependencies": {
16
- "@vercel/nft": "0.30.1",
16
+ "@vercel/nft": "1.1.0",
17
17
  "@vercel/static-config": "3.1.2",
18
18
  "semver": "6.3.1",
19
19
  "ts-morph": "12.0.0"
@@ -22,8 +22,8 @@
22
22
  "@types/aws-lambda": "8.10.19",
23
23
  "@types/node": "14.18.33",
24
24
  "@types/semver": "6.0.0",
25
- "@vercel/build-utils": "13.0.0",
26
- "@vercel/routing-utils": "5.2.1",
25
+ "@vercel/build-utils": "13.2.0",
26
+ "@vercel/routing-utils": "5.3.0",
27
27
  "execa": "3.2.0",
28
28
  "fs-extra": "11.1.0",
29
29
  "jest-junit": "16.0.0"