@vercel/client 13.4.20 → 13.5.0

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.
@@ -98,23 +98,38 @@ function buildCreateDeployment() {
98
98
  const workPath = typeof path === "string" ? path : path[0];
99
99
  let files;
100
100
  try {
101
- if (clientOptions.archive === "tgz") {
101
+ if (clientOptions.archive === "tgz" || clientOptions.archive === "split-tgz") {
102
102
  debug("Packing tarball");
103
103
  const tarStream = import_tar_fs.default.pack(workPath, {
104
104
  entries: fileList.map((file) => (0, import_path.relative)(workPath, file))
105
105
  }).pipe((0, import_zlib.createGzip)());
106
- const tarBuffer = await (0, import_build_utils.streamToBuffer)(tarStream);
107
- debug("Packed tarball");
108
- files = /* @__PURE__ */ new Map([
109
- [
110
- (0, import_hashes.hash)(tarBuffer),
111
- {
112
- names: [(0, import_path.join)(workPath, ".vercel/source.tgz")],
113
- data: tarBuffer,
114
- mode: 438
115
- }
116
- ]
117
- ]);
106
+ if (clientOptions.archive === "split-tgz") {
107
+ const chunkedTarBuffers = await (0, import_build_utils.streamToBufferChunks)(tarStream);
108
+ debug(`Packed tarball into ${chunkedTarBuffers.length} chunks`);
109
+ files = new Map(
110
+ chunkedTarBuffers.map((chunk, index) => [
111
+ (0, import_hashes.hash)(chunk),
112
+ {
113
+ names: [(0, import_path.join)(workPath, `.vercel/source.tgz.part${index + 1}`)],
114
+ data: chunk,
115
+ mode: 438
116
+ }
117
+ ])
118
+ );
119
+ } else {
120
+ const tarBuffer = await (0, import_build_utils.streamToBuffer)(tarStream);
121
+ debug("Packed tarball");
122
+ files = /* @__PURE__ */ new Map([
123
+ [
124
+ (0, import_hashes.hash)(tarBuffer),
125
+ {
126
+ names: [(0, import_path.join)(workPath, ".vercel/source.tgz")],
127
+ data: tarBuffer,
128
+ mode: 438
129
+ }
130
+ ]
131
+ ]);
132
+ }
118
133
  } else {
119
134
  files = await (0, import_hashes.hashes)(fileList);
120
135
  }
package/dist/types.d.ts CHANGED
@@ -6,7 +6,7 @@ export { DeploymentEventType } from './utils';
6
6
  export interface Dictionary<T> {
7
7
  [key: string]: T;
8
8
  }
9
- export declare const VALID_ARCHIVE_FORMATS: readonly ["tgz"];
9
+ export declare const VALID_ARCHIVE_FORMATS: readonly ["tgz", "split-tgz"];
10
10
  export type ArchiveFormat = (typeof VALID_ARCHIVE_FORMATS)[number];
11
11
  export interface VercelClientOptions {
12
12
  token: string;
package/dist/types.js CHANGED
@@ -24,7 +24,7 @@ __export(types_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(types_exports);
26
26
  var import_utils = require("./utils");
27
- const VALID_ARCHIVE_FORMATS = ["tgz"];
27
+ const VALID_ARCHIVE_FORMATS = ["tgz", "split-tgz"];
28
28
  const fileNameSymbol = Symbol("fileName");
29
29
  // Annotate the CommonJS export names for ESM import in node:
30
30
  0 && (module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/client",
3
- "version": "13.4.20",
3
+ "version": "13.5.0",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "homepage": "https://vercel.com",
@@ -31,7 +31,7 @@
31
31
  "typescript": "4.9.5"
32
32
  },
33
33
  "dependencies": {
34
- "@vercel/build-utils": "8.6.0",
34
+ "@vercel/build-utils": "8.7.0",
35
35
  "@vercel/error-utils": "2.0.3",
36
36
  "@vercel/routing-utils": "3.1.0",
37
37
  "async-retry": "1.2.3",