@vercel/client 17.2.54 → 17.2.58

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/utils/index.js +20 -13
  2. package/package.json +2 -2
@@ -178,24 +178,31 @@ async function buildFileTree(path, {
178
178
  const relativeFromRoot = (0, import_path.relative)(projectRoot, bulkRedirectsFullPath);
179
179
  if (relativeFromRoot.startsWith("..")) {
180
180
  debug(
181
- `Skipping bulk redirects file "${bulkRedirectsPath}" - path traversal detected (resolves outside project root)`
181
+ `Skipping bulk redirects path "${bulkRedirectsPath}" - path traversal detected (resolves outside project root)`
182
182
  );
183
183
  } else {
184
- const bulkRedirectsContent = await maybeRead(
185
- bulkRedirectsFullPath,
186
- null
187
- );
188
- if (bulkRedirectsContent !== null) {
189
- refs.add(bulkRedirectsFullPath);
190
- debug(
191
- `Including bulk redirects file "${bulkRedirectsPath}" in deployment`
192
- );
193
- } else {
194
- debug(`Bulk redirects file "${bulkRedirectsPath}" not found`);
184
+ try {
185
+ const stats = await (0, import_fs_extra.stat)(bulkRedirectsFullPath);
186
+ if (stats.isDirectory()) {
187
+ const dirFiles = await (0, import_readdir_recursive.default)(bulkRedirectsFullPath, []);
188
+ for (const file of dirFiles) {
189
+ refs.add(file);
190
+ }
191
+ debug(
192
+ `Including ${dirFiles.length} files from bulk redirects directory "${bulkRedirectsPath}" in deployment`
193
+ );
194
+ } else if (stats.isFile()) {
195
+ refs.add(bulkRedirectsFullPath);
196
+ debug(
197
+ `Including bulk redirects file "${bulkRedirectsPath}" in deployment`
198
+ );
199
+ }
200
+ } catch (_e) {
201
+ debug(`Bulk redirects path "${bulkRedirectsPath}" not found`);
195
202
  }
196
203
  }
197
204
  } catch (e) {
198
- debug(`Error checking for bulk redirects file: ${e}`);
205
+ debug(`Error checking for bulk redirects path: ${e}`);
199
206
  }
200
207
  }
201
208
  if (refs.size > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/client",
3
- "version": "17.2.54",
3
+ "version": "17.2.58",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "homepage": "https://vercel.com",
@@ -42,8 +42,8 @@
42
42
  "querystring": "^0.2.0",
43
43
  "sleep-promise": "8.0.1",
44
44
  "tar-fs": "1.16.3",
45
+ "@vercel/build-utils": "13.8.0",
45
46
  "@vercel/routing-utils": "6.0.2",
46
- "@vercel/build-utils": "13.7.0",
47
47
  "@vercel/error-utils": "2.0.3"
48
48
  },
49
49
  "scripts": {