@@ -15,8 +15,8 @@ const __wasi = new __nodeWASI({
15
15
version : 'preview1' ,
16
16
env : process . env ,
17
17
preopens : {
18
- '/' : '/'
19
- }
18
+ '/' : '/' ,
19
+ } ,
20
20
} )
21
21
22
22
const __emnapiContext = __emnapiGetDefaultContext ( )
@@ -33,13 +33,19 @@ if (!__nodeFs.existsSync(__wasmFilePath)) {
33
33
try {
34
34
__wasmFilePath = __nodePath . resolve ( '@node-rs/argon2-wasm32-wasi' )
35
35
} catch {
36
- throw new Error ( 'Cannot find argon2.wasm32-wasi.wasm file, and @node-rs/argon2-wasm32-wasi package is not installed.' )
36
+ throw new Error (
37
+ 'Cannot find argon2.wasm32-wasi.wasm file, and @node-rs/argon2-wasm32-wasi package is not installed.' ,
38
+ )
37
39
}
38
40
}
39
41
40
- const { instance : __napiInstance , module : __wasiModule , napiModule : __napiModule } = __emnapiInstantiateNapiModuleSync ( __nodeFs . readFileSync ( __wasmFilePath ) , {
42
+ const {
43
+ instance : __napiInstance ,
44
+ module : __wasiModule ,
45
+ napiModule : __napiModule ,
46
+ } = __emnapiInstantiateNapiModuleSync ( __nodeFs . readFileSync ( __wasmFilePath ) , {
41
47
context : __emnapiContext ,
42
- asyncWorkPoolSize : ( function ( ) {
48
+ asyncWorkPoolSize : ( function ( ) {
43
49
const threadsSizeFromEnv = Number ( process . env . NAPI_RS_ASYNC_WORK_POOL_SIZE ?? process . env . UV_THREADPOOL_SIZE )
44
50
// NaN > 0 is false
45
51
if ( threadsSizeFromEnv > 0 ) {
@@ -66,7 +72,7 @@ const { instance: __napiInstance, module: __wasiModule, napiModule: __napiModule
66
72
} ,
67
73
beforeInit ( { instance } ) {
68
74
__napi_rs_initialize_modules ( instance )
69
- }
75
+ } ,
70
76
} )
71
77
72
78
function __napi_rs_initialize_modules ( __napiInstance ) {
@@ -83,11 +89,11 @@ function __napi_rs_initialize_modules(__napiInstance) {
83
89
__napiInstance . exports [ '__napi_register__verify_10' ] ?. ( )
84
90
__napiInstance . exports [ '__napi_register__verify_sync_11' ] ?. ( )
85
91
}
86
- module . exports . Algorithm = __napiModule . exports . Algorithm ,
87
- module . exports . hash = __napiModule . exports . hash ,
88
- module . exports . hashRaw = __napiModule . exports . hashRaw ,
89
- module . exports . hashRawSync = __napiModule . exports . hashRawSync ,
90
- module . exports . hashSync = __napiModule . exports . hashSync ,
91
- module . exports . verify = __napiModule . exports . verify ,
92
- module . exports . verifySync = __napiModule . exports . verifySync ,
92
+ module . exports . Algorithm = __napiModule . exports . Algorithm
93
+ module . exports . hash = __napiModule . exports . hash
94
+ module . exports . hashRaw = __napiModule . exports . hashRaw
95
+ module . exports . hashRawSync = __napiModule . exports . hashRawSync
96
+ module . exports . hashSync = __napiModule . exports . hashSync
97
+ module . exports . verify = __napiModule . exports . verify
98
+ module . exports . verifySync = __napiModule . exports . verifySync
93
99
module . exports . Version = __napiModule . exports . Version
0 commit comments