File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 51
51
},
52
52
"browser" : {
53
53
"stream" : " stream-browserify" ,
54
- "fs" : " ./src/runtimeConfig.browser" ,
55
54
"./runtimeConfig" : " ./src/runtimeConfig.browser"
56
55
},
57
56
"react-native" : {
Original file line number Diff line number Diff line change 1
- import { lstatSync } from "fs " ;
1
+ import { ClientDefaultValues } from "./runtimeConfig " ;
2
2
3
3
export const byteLength = ( input : any ) => {
4
4
if ( input === null || input === undefined ) return 0 ;
@@ -11,7 +11,7 @@ export const byteLength = (input: any) => {
11
11
return input . size ;
12
12
} else if ( typeof input . path === "string" ) {
13
13
try {
14
- return lstatSync ( input . path ) . size ;
14
+ return ClientDefaultValues . lstatSync ( input . path ) . size ;
15
15
} catch ( error ) {
16
16
return undefined ;
17
17
}
Original file line number Diff line number Diff line change 1
1
/**
2
2
* @internal
3
3
*/
4
- export const ClientSharedValues = { } ;
4
+ export const ClientSharedValues = {
5
+ lstatSync : ( ) => { } ,
6
+ } ;
Original file line number Diff line number Diff line change 1
1
import { ClientSharedValues } from "./runtimeConfig.shared" ;
2
+ import { lstatSync } from "fs" ;
2
3
3
4
/**
4
5
* @internal
5
6
*/
6
7
export const ClientDefaultValues = {
7
8
...ClientSharedValues ,
8
9
runtime : "node" ,
10
+ lstatSync,
9
11
} ;
You can’t perform that action at this time.
0 commit comments