11import os = require( 'os' ) ;
2- import { fetch , FormData , Agent } from 'undici' ;
2+ import { fetch , FormData , Agent , File } from 'undici' ;
33import JSONbig = require( 'json-bigint' ) ;
44import AppwriteException = require( './exception' ) ;
55import { globalConfig } from './config' ;
@@ -9,7 +9,7 @@ import type { Headers, RequestParams, ResponseType, FileUpload } from './types';
99const JSONBigInt = JSONbig ( { storeAsString : false } ) ;
1010
1111class Client {
12- private readonly CHUNK_SIZE = 5 * 1024 * 1024 ; // 5MB
12+ readonly CHUNK_SIZE = 5 * 1024 * 1024 ; // 5MB
1313 private endpoint : string ;
1414 private headers : Headers ;
1515 private selfSigned : boolean ;
@@ -22,8 +22,8 @@ class Client {
2222 'x-sdk-name' : 'Command Line' ,
2323 'x-sdk-platform' : 'console' ,
2424 'x-sdk-language' : 'cli' ,
25- 'x-sdk-version' : '13.0.0-rc.1 ' ,
26- 'user-agent' : `AppwriteCLI/13.0.0-rc.1 (${ os . type ( ) } ${ os . version ( ) } ; ${ os . arch ( ) } )` ,
25+ 'x-sdk-version' : '13.0.0-rc.2 ' ,
26+ 'user-agent' : `AppwriteCLI/13.0.0-rc.2 (${ os . type ( ) } ${ os . version ( ) } ; ${ os . arch ( ) } )` ,
2727 'X-Appwrite-Response-Format' : '1.8.0' ,
2828 } ;
2929 }
@@ -168,7 +168,7 @@ class Client {
168168 for ( const [ key , value ] of Object . entries ( flatParams ) ) {
169169 if ( value && typeof value === 'object' && 'type' in value && value . type === 'file' ) {
170170 const fileUpload = value as FileUpload ;
171- formData . append ( key , fileUpload . file as any , fileUpload . filename ) ;
171+ formData . append ( key , fileUpload . file , fileUpload . filename ) ;
172172 } else {
173173 formData . append ( key , value as string ) ;
174174 }
0 commit comments