@@ -17,7 +17,6 @@ class UploadProgressManager {
17
17
private fileBars : Map < string , SingleBar > = new Map ( ) ;
18
18
private readonly isQuiet : boolean ;
19
19
private cliProgressAvailable : boolean = false ;
20
- private events : Array < CommitProgressEvent > = [ ] ;
21
20
22
21
constructor ( isQuiet : boolean = false ) {
23
22
this . isQuiet = isQuiet ;
@@ -53,7 +52,6 @@ class UploadProgressManager {
53
52
} else if ( event . event === "fileProgress" ) {
54
53
this . updateFileProgress ( event . path , event . progress , event . state ) ;
55
54
}
56
- this . events . push ( event ) ;
57
55
}
58
56
59
57
private logPhase ( phase : string ) : void {
@@ -211,6 +209,12 @@ const commands = {
211
209
"The access token to use for authentication. If not provided, the HF_TOKEN environment variable will be used.",
212
210
default: process.env.HF_TOKEN,
213
211
},
212
+ {
213
+ name: "xet" as const,
214
+ short: "x",
215
+ description: "Use Xet to upload files",
216
+ boolean: true,
217
+ },
214
218
] as const,
215
219
} satisfies SingleCommand,
216
220
branch: {
@@ -420,6 +424,7 @@ async function run() {
420
424
commitMessage,
421
425
pathInRepo,
422
426
private : isPrivate ,
427
+ xet,
423
428
} = parsedArgs ;
424
429
425
430
const repoId = repoType ? { type : repoType as "model" | "dataset" | "space" , name : repoName } : repoName ;
@@ -460,6 +465,7 @@ async function run() {
460
465
commitTitle : commitMessage ?. trim ( ) . split ( "\n" ) [ 0 ] ,
461
466
commitDescription : commitMessage ?. trim ( ) . split ( "\n" ) . slice ( 1 ) . join ( "\n" ) . trim ( ) ,
462
467
hubUrl : process . env . HF_ENDPOINT ?? HUB_URL ,
468
+ useXet : xet ?? false ,
463
469
} ) ) {
464
470
progressManager . handleEvent ( event ) ;
465
471
}
0 commit comments