@nomicfoundation/edr 0.21.0 → 0.22.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.
- package/index.d.ts +62 -53
- package/index.js +81 -82
- package/package.json +10 -10
package/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* Opaque handle to the `Bytecode` struct.
|
|
5
6
|
* Only used on the JS side by the `VmTraceDecoder` class.
|
|
6
7
|
*/
|
|
7
|
-
export declare class BytecodeWrapper {
|
|
8
|
-
|
|
9
|
-
}
|
|
8
|
+
export declare class BytecodeWrapper {}
|
|
10
9
|
|
|
11
10
|
export declare class ContractDecoder {
|
|
12
11
|
/** Creates an empty instance. */
|
|
@@ -82,9 +81,7 @@ export declare class Provider {
|
|
|
82
81
|
setVerboseTracing(verboseTracing: boolean): Promise<void>
|
|
83
82
|
}
|
|
84
83
|
|
|
85
|
-
export declare class ProviderFactory {
|
|
86
|
-
|
|
87
|
-
}
|
|
84
|
+
export declare class ProviderFactory {}
|
|
88
85
|
|
|
89
86
|
export declare class RawTrace {
|
|
90
87
|
get trace(): Array<TracingMessage | TracingStep | TracingMessageResult>
|
|
@@ -115,9 +112,7 @@ export declare class ReturnData {
|
|
|
115
112
|
decodePanic(): bigint
|
|
116
113
|
}
|
|
117
114
|
|
|
118
|
-
export declare class SolidityTestRunnerFactory {
|
|
119
|
-
|
|
120
|
-
}
|
|
115
|
+
export declare class SolidityTestRunnerFactory {}
|
|
121
116
|
|
|
122
117
|
/** See [`edr_solidity_tests::result::TestResult`] */
|
|
123
118
|
export declare class TestResult {
|
|
@@ -278,7 +273,7 @@ export declare enum CachedChains {
|
|
|
278
273
|
/** Cache all chains */
|
|
279
274
|
All = 0,
|
|
280
275
|
/** Don't cache anything */
|
|
281
|
-
None = 1
|
|
276
|
+
None = 1,
|
|
282
277
|
}
|
|
283
278
|
|
|
284
279
|
/** What endpoints to enable caching for */
|
|
@@ -286,7 +281,7 @@ export declare enum CachedEndpoints {
|
|
|
286
281
|
/** Cache all endpoints */
|
|
287
282
|
All = 0,
|
|
288
283
|
/** Only cache non-local host endpoints */
|
|
289
|
-
Remote = 1
|
|
284
|
+
Remote = 1,
|
|
290
285
|
}
|
|
291
286
|
|
|
292
287
|
export interface CallFailedErrorStackTraceEntry {
|
|
@@ -308,7 +303,7 @@ export declare enum CallKind {
|
|
|
308
303
|
/** Regular call that may not change state. */
|
|
309
304
|
StaticCall = 3,
|
|
310
305
|
/** Contract creation. */
|
|
311
|
-
Create = 4
|
|
306
|
+
Create = 4,
|
|
312
307
|
}
|
|
313
308
|
|
|
314
309
|
export interface CallOutput {
|
|
@@ -383,7 +378,7 @@ export declare enum CheatcodeErrorCode {
|
|
|
383
378
|
/** The specified cheatcode is not supported. */
|
|
384
379
|
UnsupportedCheatcode = 'UnsupportedCheatcode',
|
|
385
380
|
/** The specified cheatcode is missing. */
|
|
386
|
-
MissingCheatcode = 'MissingCheatcode'
|
|
381
|
+
MissingCheatcode = 'MissingCheatcode',
|
|
387
382
|
}
|
|
388
383
|
|
|
389
384
|
/** Error returned by a cheatcode in Solidity tests. */
|
|
@@ -426,10 +421,10 @@ export declare enum CollectStackTraces {
|
|
|
426
421
|
* Not all tests can be re-executed since certain cheatcodes contain
|
|
427
422
|
* non-deterministic side-effects.
|
|
428
423
|
*/
|
|
429
|
-
OnFailure = 1
|
|
424
|
+
OnFailure = 1,
|
|
430
425
|
}
|
|
431
426
|
|
|
432
|
-
export const CONSTRUCTOR_FUNCTION_NAME: string
|
|
427
|
+
export declare const CONSTRUCTOR_FUNCTION_NAME: string
|
|
433
428
|
|
|
434
429
|
export interface ContractCallRunOutOfGasError {
|
|
435
430
|
type: StackTraceEntryType.CONTRACT_CALL_RUN_OUT_OF_GAS_ERROR
|
|
@@ -463,7 +458,7 @@ export declare enum ContractFunctionType {
|
|
|
463
458
|
RECEIVE = 3,
|
|
464
459
|
GETTER = 4,
|
|
465
460
|
MODIFIER = 5,
|
|
466
|
-
FREE_FUNCTION = 6
|
|
461
|
+
FREE_FUNCTION = 6,
|
|
467
462
|
}
|
|
468
463
|
|
|
469
464
|
export interface ContractGasReport {
|
|
@@ -488,7 +483,7 @@ export interface CounterExampleSequence {
|
|
|
488
483
|
}
|
|
489
484
|
|
|
490
485
|
/** The instrumentation coverage library file name. */
|
|
491
|
-
export const COVERAGE_LIBRARY_FILE_NAME: string
|
|
486
|
+
export declare const COVERAGE_LIBRARY_FILE_NAME: string
|
|
492
487
|
|
|
493
488
|
export interface CreateOutput {
|
|
494
489
|
/** Return value */
|
|
@@ -578,7 +573,7 @@ export declare enum ExceptionalHalt {
|
|
|
578
573
|
/** Error on created contract that begins with EF */
|
|
579
574
|
CreateContractStartingWithEF = 12,
|
|
580
575
|
/** EIP-3860: Limit and meter initcode. Initcode size limit exceeded. */
|
|
581
|
-
CreateInitCodeSizeLimit = 13
|
|
576
|
+
CreateInitCodeSizeLimit = 13,
|
|
582
577
|
}
|
|
583
578
|
|
|
584
579
|
/** Ethereum execution log. */
|
|
@@ -615,10 +610,10 @@ export declare enum ExitCode {
|
|
|
615
610
|
/** Create collision. */
|
|
616
611
|
CREATE_COLLISION = 7,
|
|
617
612
|
/** Unknown halt reason. */
|
|
618
|
-
UNKNOWN_HALT_REASON = 8
|
|
613
|
+
UNKNOWN_HALT_REASON = 8,
|
|
619
614
|
}
|
|
620
615
|
|
|
621
|
-
export const FALLBACK_FUNCTION_NAME: string
|
|
616
|
+
export declare const FALLBACK_FUNCTION_NAME: string
|
|
622
617
|
|
|
623
618
|
export interface FallbackNotPayableAndNoReceiveErrorStackTraceEntry {
|
|
624
619
|
type: StackTraceEntryType.FALLBACK_NOT_PAYABLE_AND_NO_RECEIVE_ERROR
|
|
@@ -677,7 +672,7 @@ export declare enum FsAccessPermission {
|
|
|
677
672
|
/** Allows reading all files in the directory and its subdirectories */
|
|
678
673
|
ReadDirectory = 4,
|
|
679
674
|
/** Allows writing all files in the directory and its subdirectories */
|
|
680
|
-
DangerouslyWriteDirectory = 5
|
|
675
|
+
DangerouslyWriteDirectory = 5,
|
|
681
676
|
}
|
|
682
677
|
|
|
683
678
|
export interface FunctionGasReport {
|
|
@@ -782,7 +777,7 @@ export declare enum GasEstimationMode {
|
|
|
782
777
|
* Estimates the minimum gas required for the top-level call to succeed
|
|
783
778
|
* without any internal sub-call running out of gas.
|
|
784
779
|
*/
|
|
785
|
-
NoInternalOutOfGas = 1
|
|
780
|
+
NoInternalOutOfGas = 1,
|
|
786
781
|
}
|
|
787
782
|
|
|
788
783
|
export interface GasReport {
|
|
@@ -804,10 +799,10 @@ export interface GasReportConfig {
|
|
|
804
799
|
export declare enum GasReportExecutionStatus {
|
|
805
800
|
Success = 0,
|
|
806
801
|
Revert = 1,
|
|
807
|
-
Halt = 2
|
|
802
|
+
Halt = 2,
|
|
808
803
|
}
|
|
809
804
|
|
|
810
|
-
export const GENERIC_CHAIN_TYPE: string
|
|
805
|
+
export declare const GENERIC_CHAIN_TYPE: string
|
|
811
806
|
|
|
812
807
|
export declare function genericChainProviderFactory(): ProviderFactory
|
|
813
808
|
|
|
@@ -872,7 +867,7 @@ export declare enum IncludeTraces {
|
|
|
872
867
|
*/
|
|
873
868
|
Failing = 1,
|
|
874
869
|
/** Traces will be included for all test results or executed transactions. */
|
|
875
|
-
All = 2
|
|
870
|
+
All = 2,
|
|
876
871
|
}
|
|
877
872
|
|
|
878
873
|
/** A directive-level inline-config problem, located at the offending directive. */
|
|
@@ -924,8 +919,7 @@ export interface InlineConfigDirectiveLocation {
|
|
|
924
919
|
* over its `kind` tag — mirroring the Rust-side `InlineConfigError` enum so
|
|
925
920
|
* consumers can map each problem onto their own error types.
|
|
926
921
|
*/
|
|
927
|
-
export type InlineConfigDirectiveProblem =
|
|
928
|
-
InlineConfigInvalidSyntax | InlineConfigUnsupportedProfile | InlineConfigInvalidKey | InlineConfigInvalidKeyForTestType | InlineConfigInvalidValue | InlineConfigDuplicateKey
|
|
922
|
+
export type InlineConfigDirectiveProblem = InlineConfigInvalidSyntax | InlineConfigUndeclaredProfile | InlineConfigInvalidKey | InlineConfigInvalidKeyForTestType | InlineConfigInvalidValue | InlineConfigDuplicateKey
|
|
929
923
|
|
|
930
924
|
/**
|
|
931
925
|
* The same key was specified more than once for the same function or
|
|
@@ -946,8 +940,7 @@ export interface InlineConfigDuplicateKey {
|
|
|
946
940
|
* rejected `runSolidityTests` promise as the `inlineConfigErrors` array on the
|
|
947
941
|
* thrown error.
|
|
948
942
|
*/
|
|
949
|
-
export type InlineConfigError =
|
|
950
|
-
InlineConfigSourceError | InlineConfigDirectiveError
|
|
943
|
+
export type InlineConfigError = InlineConfigSourceError | InlineConfigDirectiveError
|
|
951
944
|
|
|
952
945
|
/** An unknown configuration key was used. */
|
|
953
946
|
export interface InlineConfigInvalidKey {
|
|
@@ -1029,15 +1022,16 @@ export interface InlineConfigSourceFileNotFound {
|
|
|
1029
1022
|
* A source-level problem, as a discriminated union over its `kind` tag. These
|
|
1030
1023
|
* cannot be pinned to a single directive line, so they carry no line.
|
|
1031
1024
|
*/
|
|
1032
|
-
export type InlineConfigSourceProblem =
|
|
1033
|
-
InlineConfigInvalidSolcVersion | InlineConfigSourceFileNotFound | InlineConfigDirectiveLocation
|
|
1025
|
+
export type InlineConfigSourceProblem = InlineConfigInvalidSolcVersion | InlineConfigSourceFileNotFound | InlineConfigDirectiveLocation
|
|
1034
1026
|
|
|
1035
|
-
/** A profile
|
|
1036
|
-
export interface
|
|
1027
|
+
/** A directive named a profile the project does not declare. */
|
|
1028
|
+
export interface InlineConfigUndeclaredProfile {
|
|
1037
1029
|
/** Enum tag for JS. */
|
|
1038
|
-
kind: "
|
|
1039
|
-
/** The
|
|
1030
|
+
kind: "InlineConfigUndeclaredProfile"
|
|
1031
|
+
/** The undeclared profile name, exactly as written. */
|
|
1040
1032
|
profile: string
|
|
1033
|
+
/** The profiles the project declares, sorted. */
|
|
1034
|
+
declaredProfiles: Array<string>
|
|
1041
1035
|
}
|
|
1042
1036
|
|
|
1043
1037
|
export interface InstrumentationMetadata {
|
|
@@ -1179,7 +1173,7 @@ export interface InvariantTestKind {
|
|
|
1179
1173
|
*/
|
|
1180
1174
|
export declare function keccak256(data: Uint8Array): Uint8Array
|
|
1181
1175
|
|
|
1182
|
-
export const L1_CHAIN_TYPE: string
|
|
1176
|
+
export declare const L1_CHAIN_TYPE: string
|
|
1183
1177
|
|
|
1184
1178
|
export declare function l1GenesisState(hardfork: L1Hardfork): Array<AccountOverride>
|
|
1185
1179
|
|
|
@@ -1214,7 +1208,7 @@ export declare enum L1Hardfork {
|
|
|
1214
1208
|
/** Osaka */
|
|
1215
1209
|
Osaka = 19,
|
|
1216
1210
|
/** Amsterdam */
|
|
1217
|
-
Amsterdam = 20
|
|
1211
|
+
Amsterdam = 20,
|
|
1218
1212
|
}
|
|
1219
1213
|
|
|
1220
1214
|
/**
|
|
@@ -1272,7 +1266,7 @@ export interface LoggerConfig {
|
|
|
1272
1266
|
/** Kind marker for log traces. */
|
|
1273
1267
|
export declare enum LogKind {
|
|
1274
1268
|
/** Single kind of log. */
|
|
1275
|
-
Log = 5
|
|
1269
|
+
Log = 5,
|
|
1276
1270
|
}
|
|
1277
1271
|
|
|
1278
1272
|
/** Object representing an event log in an execution trace. */
|
|
@@ -1299,7 +1293,7 @@ export declare enum MineOrdering {
|
|
|
1299
1293
|
/** Insertion order */
|
|
1300
1294
|
Fifo = 'Fifo',
|
|
1301
1295
|
/** Effective miner fee */
|
|
1302
|
-
Priority = 'Priority'
|
|
1296
|
+
Priority = 'Priority',
|
|
1303
1297
|
}
|
|
1304
1298
|
|
|
1305
1299
|
/** Configuration for the provider's miner. */
|
|
@@ -1341,7 +1335,7 @@ export interface ObservabilityConfig {
|
|
|
1341
1335
|
includeCallTraces?: IncludeTraces
|
|
1342
1336
|
}
|
|
1343
1337
|
|
|
1344
|
-
export const OP_CHAIN_TYPE: string
|
|
1338
|
+
export declare const OP_CHAIN_TYPE: string
|
|
1345
1339
|
|
|
1346
1340
|
export declare function opGenesisState(hardfork: OpHardfork): Array<AccountOverride>
|
|
1347
1341
|
|
|
@@ -1354,7 +1348,7 @@ export declare enum OpHardfork {
|
|
|
1354
1348
|
Fjord = 104,
|
|
1355
1349
|
Granite = 105,
|
|
1356
1350
|
Holocene = 106,
|
|
1357
|
-
Isthmus = 107
|
|
1351
|
+
Isthmus = 107,
|
|
1358
1352
|
}
|
|
1359
1353
|
|
|
1360
1354
|
/**
|
|
@@ -1398,7 +1392,7 @@ export interface PathPermission {
|
|
|
1398
1392
|
path: string
|
|
1399
1393
|
}
|
|
1400
1394
|
|
|
1401
|
-
export const PRECOMPILE_FUNCTION_NAME: string
|
|
1395
|
+
export declare const PRECOMPILE_FUNCTION_NAME: string
|
|
1402
1396
|
|
|
1403
1397
|
export interface PrecompileErrorStackTraceEntry {
|
|
1404
1398
|
type: StackTraceEntryType.PRECOMPILE_ERROR
|
|
@@ -1493,7 +1487,7 @@ export interface ProviderConfig {
|
|
|
1493
1487
|
transactionGasCap?: bigint | false
|
|
1494
1488
|
}
|
|
1495
1489
|
|
|
1496
|
-
export const RECEIVE_FUNCTION_NAME: string
|
|
1490
|
+
export declare const RECEIVE_FUNCTION_NAME: string
|
|
1497
1491
|
|
|
1498
1492
|
export interface ReturndataSizeErrorStackTraceEntry {
|
|
1499
1493
|
type: StackTraceEntryType.RETURNDATA_SIZE_ERROR
|
|
@@ -1526,11 +1520,9 @@ export interface RevertResult {
|
|
|
1526
1520
|
*/
|
|
1527
1521
|
export declare function secp256k1PublicKeyFromSecretKey(secretKey: Uint8Array): Uint8Array
|
|
1528
1522
|
|
|
1529
|
-
export type SolidityStackTrace =
|
|
1530
|
-
Array<SolidityStackTraceEntry>
|
|
1523
|
+
export type SolidityStackTrace = Array<SolidityStackTraceEntry>
|
|
1531
1524
|
|
|
1532
|
-
export type SolidityStackTraceEntry =
|
|
1533
|
-
CallstackEntryStackTraceEntry | UnrecognizedCreateCallstackEntryStackTraceEntry | UnrecognizedContractCallstackEntryStackTraceEntry | PrecompileErrorStackTraceEntry | RevertErrorStackTraceEntry | PanicErrorStackTraceEntry | CustomErrorStackTraceEntry | FunctionNotPayableErrorStackTraceEntry | InvalidParamsErrorStackTraceEntry | FallbackNotPayableErrorStackTraceEntry | FallbackNotPayableAndNoReceiveErrorStackTraceEntry | UnrecognizedFunctionWithoutFallbackErrorStackTraceEntry | MissingFallbackOrReceiveErrorStackTraceEntry | ReturndataSizeErrorStackTraceEntry | NonContractAccountCalledErrorStackTraceEntry | CallFailedErrorStackTraceEntry | DirectLibraryCallErrorStackTraceEntry | UnrecognizedCreateErrorStackTraceEntry | UnrecognizedContractErrorStackTraceEntry | OtherExecutionErrorStackTraceEntry | UnmappedSolc063RevertErrorStackTraceEntry | ContractTooLargeErrorStackTraceEntry | InternalFunctionCallStackEntry | ContractCallRunOutOfGasError | CheatcodeErrorStackTraceEntry
|
|
1525
|
+
export type SolidityStackTraceEntry = CallstackEntryStackTraceEntry | UnrecognizedCreateCallstackEntryStackTraceEntry | UnrecognizedContractCallstackEntryStackTraceEntry | PrecompileErrorStackTraceEntry | RevertErrorStackTraceEntry | PanicErrorStackTraceEntry | CustomErrorStackTraceEntry | FunctionNotPayableErrorStackTraceEntry | InvalidParamsErrorStackTraceEntry | FallbackNotPayableErrorStackTraceEntry | FallbackNotPayableAndNoReceiveErrorStackTraceEntry | UnrecognizedFunctionWithoutFallbackErrorStackTraceEntry | MissingFallbackOrReceiveErrorStackTraceEntry | ReturndataSizeErrorStackTraceEntry | NonContractAccountCalledErrorStackTraceEntry | CallFailedErrorStackTraceEntry | DirectLibraryCallErrorStackTraceEntry | UnrecognizedCreateErrorStackTraceEntry | UnrecognizedContractErrorStackTraceEntry | OtherExecutionErrorStackTraceEntry | UnmappedSolc063RevertErrorStackTraceEntry | ContractTooLargeErrorStackTraceEntry | InternalFunctionCallStackEntry | ContractCallRunOutOfGasError | CheatcodeErrorStackTraceEntry
|
|
1534
1526
|
|
|
1535
1527
|
/** The result of a Solidity test run. */
|
|
1536
1528
|
export interface SolidityTestResult {
|
|
@@ -1781,6 +1773,23 @@ export interface SolidityTestRunnerConfigArgs {
|
|
|
1781
1773
|
* do.
|
|
1782
1774
|
*/
|
|
1783
1775
|
importMappings?: Record<string, string>
|
|
1776
|
+
/**
|
|
1777
|
+
* The Solidity test profile this run was started with.
|
|
1778
|
+
*
|
|
1779
|
+
* An inline-config directive prefixed with a profile name
|
|
1780
|
+
* (`forge-config: ci.fuzz.runs = 8`) applies only under that profile; an
|
|
1781
|
+
* unprefixed one applies under every profile, and the prefixed one wins
|
|
1782
|
+
* where both set the same key. Defaults to `default`.
|
|
1783
|
+
*/
|
|
1784
|
+
testProfile?: string
|
|
1785
|
+
/**
|
|
1786
|
+
* Every Solidity test profile the project declares.
|
|
1787
|
+
*
|
|
1788
|
+
* A prefix naming a profile that is not declared is an error, so a
|
|
1789
|
+
* mistyped one fails whichever profile is selected. `default` is always
|
|
1790
|
+
* declared. Defaults to `["default"]`.
|
|
1791
|
+
*/
|
|
1792
|
+
declaredTestProfiles?: Array<string>
|
|
1784
1793
|
}
|
|
1785
1794
|
|
|
1786
1795
|
export interface SourceReference {
|
|
@@ -1825,7 +1834,7 @@ export declare enum StackTraceEntryType {
|
|
|
1825
1834
|
CONTRACT_TOO_LARGE_ERROR = 21,
|
|
1826
1835
|
INTERNAL_FUNCTION_CALLSTACK_ENTRY = 22,
|
|
1827
1836
|
CONTRACT_CALL_RUN_OUT_OF_GAS_ERROR = 23,
|
|
1828
|
-
CHEATCODE_ERROR = 24
|
|
1837
|
+
CHEATCODE_ERROR = 24,
|
|
1829
1838
|
}
|
|
1830
1839
|
|
|
1831
1840
|
export declare function stackTraceEntryTypeToString(val: StackTraceEntryType): string
|
|
@@ -1873,7 +1882,7 @@ export declare enum SuccessReason {
|
|
|
1873
1882
|
/** The opcode `RETURN` was called */
|
|
1874
1883
|
Return = 1,
|
|
1875
1884
|
/** The opcode `SELFDESTRUCT` was called */
|
|
1876
|
-
SelfDestruct = 2
|
|
1885
|
+
SelfDestruct = 2,
|
|
1877
1886
|
}
|
|
1878
1887
|
|
|
1879
1888
|
/** The result when the EVM terminates successfully. */
|
|
@@ -1927,7 +1936,7 @@ export declare enum TestStatus {
|
|
|
1927
1936
|
/** Test failure */
|
|
1928
1937
|
Failure = 'Failure',
|
|
1929
1938
|
/** Test skipped */
|
|
1930
|
-
Skipped = 'Skipped'
|
|
1939
|
+
Skipped = 'Skipped',
|
|
1931
1940
|
}
|
|
1932
1941
|
|
|
1933
1942
|
/** Tracing config for Solidity stack trace generation. */
|
|
@@ -1996,16 +2005,16 @@ export interface UnexpectedError {
|
|
|
1996
2005
|
errorMessage: string
|
|
1997
2006
|
}
|
|
1998
2007
|
|
|
1999
|
-
export const UNKNOWN_FUNCTION_NAME: string
|
|
2008
|
+
export declare const UNKNOWN_FUNCTION_NAME: string
|
|
2000
2009
|
|
|
2001
2010
|
export interface UnmappedSolc063RevertErrorStackTraceEntry {
|
|
2002
2011
|
type: StackTraceEntryType.UNMAPPED_SOLC_0_6_3_REVERT_ERROR
|
|
2003
2012
|
sourceReference?: SourceReference
|
|
2004
2013
|
}
|
|
2005
2014
|
|
|
2006
|
-
export const UNRECOGNIZED_CONTRACT_NAME: string
|
|
2015
|
+
export declare const UNRECOGNIZED_CONTRACT_NAME: string
|
|
2007
2016
|
|
|
2008
|
-
export const UNRECOGNIZED_FUNCTION_NAME: string
|
|
2017
|
+
export declare const UNRECOGNIZED_FUNCTION_NAME: string
|
|
2009
2018
|
|
|
2010
2019
|
export interface UnrecognizedContractCallstackEntryStackTraceEntry {
|
|
2011
2020
|
type: StackTraceEntryType.UNRECOGNIZED_CONTRACT_CALLSTACK_ENTRY
|
package/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// prettier-ignore
|
|
2
1
|
/* eslint-disable */
|
|
3
2
|
// @ts-nocheck
|
|
4
3
|
/* auto-generated by NAPI-RS */
|
|
@@ -63,7 +62,7 @@ const isMuslFromChildProcess = () => {
|
|
|
63
62
|
function requireNative() {
|
|
64
63
|
if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
|
|
65
64
|
try {
|
|
66
|
-
return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)
|
|
65
|
+
return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)
|
|
67
66
|
} catch (err) {
|
|
68
67
|
loadErrors.push(err)
|
|
69
68
|
}
|
|
@@ -77,8 +76,8 @@ function requireNative() {
|
|
|
77
76
|
try {
|
|
78
77
|
const binding = require('@nomicfoundation/edr-android-arm64')
|
|
79
78
|
const bindingPackageVersion = require('@nomicfoundation/edr-android-arm64/package.json').version
|
|
80
|
-
if (bindingPackageVersion !== '0.
|
|
81
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
79
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
80
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
82
81
|
}
|
|
83
82
|
return binding
|
|
84
83
|
} catch (e) {
|
|
@@ -93,8 +92,8 @@ function requireNative() {
|
|
|
93
92
|
try {
|
|
94
93
|
const binding = require('@nomicfoundation/edr-android-arm-eabi')
|
|
95
94
|
const bindingPackageVersion = require('@nomicfoundation/edr-android-arm-eabi/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '0.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
95
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
96
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
97
|
}
|
|
99
98
|
return binding
|
|
100
99
|
} catch (e) {
|
|
@@ -107,36 +106,36 @@ function requireNative() {
|
|
|
107
106
|
if (process.arch === 'x64') {
|
|
108
107
|
if ((process.config && process.config.variables && process.config.variables.shlib_suffix === 'dll.a') || (process.config && process.config.variables && process.config.variables.node_target_type === 'shared_library')) {
|
|
109
108
|
try {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
109
|
+
return require('./edr.win32-x64-gnu.node')
|
|
110
|
+
} catch (e) {
|
|
111
|
+
loadErrors.push(e)
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
const binding = require('@nomicfoundation/edr-win32-x64-gnu')
|
|
115
|
+
const bindingPackageVersion = require('@nomicfoundation/edr-win32-x64-gnu/package.json').version
|
|
116
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
117
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
118
|
+
}
|
|
119
|
+
return binding
|
|
120
|
+
} catch (e) {
|
|
121
|
+
loadErrors.push(e)
|
|
119
122
|
}
|
|
120
|
-
return binding
|
|
121
|
-
} catch (e) {
|
|
122
|
-
loadErrors.push(e)
|
|
123
|
-
}
|
|
124
123
|
} else {
|
|
125
124
|
try {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
125
|
+
return require('./edr.win32-x64-msvc.node')
|
|
126
|
+
} catch (e) {
|
|
127
|
+
loadErrors.push(e)
|
|
128
|
+
}
|
|
129
|
+
try {
|
|
130
|
+
const binding = require('@nomicfoundation/edr-win32-x64-msvc')
|
|
131
|
+
const bindingPackageVersion = require('@nomicfoundation/edr-win32-x64-msvc/package.json').version
|
|
132
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
133
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
134
|
+
}
|
|
135
|
+
return binding
|
|
136
|
+
} catch (e) {
|
|
137
|
+
loadErrors.push(e)
|
|
135
138
|
}
|
|
136
|
-
return binding
|
|
137
|
-
} catch (e) {
|
|
138
|
-
loadErrors.push(e)
|
|
139
|
-
}
|
|
140
139
|
}
|
|
141
140
|
} else if (process.arch === 'ia32') {
|
|
142
141
|
try {
|
|
@@ -147,8 +146,8 @@ function requireNative() {
|
|
|
147
146
|
try {
|
|
148
147
|
const binding = require('@nomicfoundation/edr-win32-ia32-msvc')
|
|
149
148
|
const bindingPackageVersion = require('@nomicfoundation/edr-win32-ia32-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '0.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
149
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
150
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
151
|
}
|
|
153
152
|
return binding
|
|
154
153
|
} catch (e) {
|
|
@@ -163,8 +162,8 @@ function requireNative() {
|
|
|
163
162
|
try {
|
|
164
163
|
const binding = require('@nomicfoundation/edr-win32-arm64-msvc')
|
|
165
164
|
const bindingPackageVersion = require('@nomicfoundation/edr-win32-arm64-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '0.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
165
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
166
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
167
|
}
|
|
169
168
|
return binding
|
|
170
169
|
} catch (e) {
|
|
@@ -182,8 +181,8 @@ function requireNative() {
|
|
|
182
181
|
try {
|
|
183
182
|
const binding = require('@nomicfoundation/edr-darwin-universal')
|
|
184
183
|
const bindingPackageVersion = require('@nomicfoundation/edr-darwin-universal/package.json').version
|
|
185
|
-
if (bindingPackageVersion !== '0.
|
|
186
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
184
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
185
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
187
186
|
}
|
|
188
187
|
return binding
|
|
189
188
|
} catch (e) {
|
|
@@ -198,8 +197,8 @@ function requireNative() {
|
|
|
198
197
|
try {
|
|
199
198
|
const binding = require('@nomicfoundation/edr-darwin-x64')
|
|
200
199
|
const bindingPackageVersion = require('@nomicfoundation/edr-darwin-x64/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '0.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
200
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
201
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
202
|
}
|
|
204
203
|
return binding
|
|
205
204
|
} catch (e) {
|
|
@@ -214,8 +213,8 @@ function requireNative() {
|
|
|
214
213
|
try {
|
|
215
214
|
const binding = require('@nomicfoundation/edr-darwin-arm64')
|
|
216
215
|
const bindingPackageVersion = require('@nomicfoundation/edr-darwin-arm64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '0.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
216
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
217
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
218
|
}
|
|
220
219
|
return binding
|
|
221
220
|
} catch (e) {
|
|
@@ -234,8 +233,8 @@ function requireNative() {
|
|
|
234
233
|
try {
|
|
235
234
|
const binding = require('@nomicfoundation/edr-freebsd-x64')
|
|
236
235
|
const bindingPackageVersion = require('@nomicfoundation/edr-freebsd-x64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '0.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
236
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
237
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
238
|
}
|
|
240
239
|
return binding
|
|
241
240
|
} catch (e) {
|
|
@@ -250,8 +249,8 @@ function requireNative() {
|
|
|
250
249
|
try {
|
|
251
250
|
const binding = require('@nomicfoundation/edr-freebsd-arm64')
|
|
252
251
|
const bindingPackageVersion = require('@nomicfoundation/edr-freebsd-arm64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '0.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
252
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
253
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
254
|
}
|
|
256
255
|
return binding
|
|
257
256
|
} catch (e) {
|
|
@@ -271,8 +270,8 @@ function requireNative() {
|
|
|
271
270
|
try {
|
|
272
271
|
const binding = require('@nomicfoundation/edr-linux-x64-musl')
|
|
273
272
|
const bindingPackageVersion = require('@nomicfoundation/edr-linux-x64-musl/package.json').version
|
|
274
|
-
if (bindingPackageVersion !== '0.
|
|
275
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
273
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
274
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
276
275
|
}
|
|
277
276
|
return binding
|
|
278
277
|
} catch (e) {
|
|
@@ -287,8 +286,8 @@ function requireNative() {
|
|
|
287
286
|
try {
|
|
288
287
|
const binding = require('@nomicfoundation/edr-linux-x64-gnu')
|
|
289
288
|
const bindingPackageVersion = require('@nomicfoundation/edr-linux-x64-gnu/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '0.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
289
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
290
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
291
|
}
|
|
293
292
|
return binding
|
|
294
293
|
} catch (e) {
|
|
@@ -305,8 +304,8 @@ function requireNative() {
|
|
|
305
304
|
try {
|
|
306
305
|
const binding = require('@nomicfoundation/edr-linux-arm64-musl')
|
|
307
306
|
const bindingPackageVersion = require('@nomicfoundation/edr-linux-arm64-musl/package.json').version
|
|
308
|
-
if (bindingPackageVersion !== '0.
|
|
309
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
307
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
308
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
310
309
|
}
|
|
311
310
|
return binding
|
|
312
311
|
} catch (e) {
|
|
@@ -321,8 +320,8 @@ function requireNative() {
|
|
|
321
320
|
try {
|
|
322
321
|
const binding = require('@nomicfoundation/edr-linux-arm64-gnu')
|
|
323
322
|
const bindingPackageVersion = require('@nomicfoundation/edr-linux-arm64-gnu/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '0.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
323
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
324
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
325
|
}
|
|
327
326
|
return binding
|
|
328
327
|
} catch (e) {
|
|
@@ -339,8 +338,8 @@ function requireNative() {
|
|
|
339
338
|
try {
|
|
340
339
|
const binding = require('@nomicfoundation/edr-linux-arm-musleabihf')
|
|
341
340
|
const bindingPackageVersion = require('@nomicfoundation/edr-linux-arm-musleabihf/package.json').version
|
|
342
|
-
if (bindingPackageVersion !== '0.
|
|
343
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
341
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
342
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
344
343
|
}
|
|
345
344
|
return binding
|
|
346
345
|
} catch (e) {
|
|
@@ -355,8 +354,8 @@ function requireNative() {
|
|
|
355
354
|
try {
|
|
356
355
|
const binding = require('@nomicfoundation/edr-linux-arm-gnueabihf')
|
|
357
356
|
const bindingPackageVersion = require('@nomicfoundation/edr-linux-arm-gnueabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '0.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
357
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
358
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
359
|
}
|
|
361
360
|
return binding
|
|
362
361
|
} catch (e) {
|
|
@@ -373,8 +372,8 @@ function requireNative() {
|
|
|
373
372
|
try {
|
|
374
373
|
const binding = require('@nomicfoundation/edr-linux-loong64-musl')
|
|
375
374
|
const bindingPackageVersion = require('@nomicfoundation/edr-linux-loong64-musl/package.json').version
|
|
376
|
-
if (bindingPackageVersion !== '0.
|
|
377
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
375
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
376
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
378
377
|
}
|
|
379
378
|
return binding
|
|
380
379
|
} catch (e) {
|
|
@@ -389,8 +388,8 @@ function requireNative() {
|
|
|
389
388
|
try {
|
|
390
389
|
const binding = require('@nomicfoundation/edr-linux-loong64-gnu')
|
|
391
390
|
const bindingPackageVersion = require('@nomicfoundation/edr-linux-loong64-gnu/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '0.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
391
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
392
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
393
|
}
|
|
395
394
|
return binding
|
|
396
395
|
} catch (e) {
|
|
@@ -407,8 +406,8 @@ function requireNative() {
|
|
|
407
406
|
try {
|
|
408
407
|
const binding = require('@nomicfoundation/edr-linux-riscv64-musl')
|
|
409
408
|
const bindingPackageVersion = require('@nomicfoundation/edr-linux-riscv64-musl/package.json').version
|
|
410
|
-
if (bindingPackageVersion !== '0.
|
|
411
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
409
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
410
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
412
411
|
}
|
|
413
412
|
return binding
|
|
414
413
|
} catch (e) {
|
|
@@ -423,8 +422,8 @@ function requireNative() {
|
|
|
423
422
|
try {
|
|
424
423
|
const binding = require('@nomicfoundation/edr-linux-riscv64-gnu')
|
|
425
424
|
const bindingPackageVersion = require('@nomicfoundation/edr-linux-riscv64-gnu/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '0.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
425
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
426
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
427
|
}
|
|
429
428
|
return binding
|
|
430
429
|
} catch (e) {
|
|
@@ -440,8 +439,8 @@ function requireNative() {
|
|
|
440
439
|
try {
|
|
441
440
|
const binding = require('@nomicfoundation/edr-linux-ppc64-gnu')
|
|
442
441
|
const bindingPackageVersion = require('@nomicfoundation/edr-linux-ppc64-gnu/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '0.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
442
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
443
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
444
|
}
|
|
446
445
|
return binding
|
|
447
446
|
} catch (e) {
|
|
@@ -456,8 +455,8 @@ function requireNative() {
|
|
|
456
455
|
try {
|
|
457
456
|
const binding = require('@nomicfoundation/edr-linux-s390x-gnu')
|
|
458
457
|
const bindingPackageVersion = require('@nomicfoundation/edr-linux-s390x-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '0.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
458
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
459
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
460
|
}
|
|
462
461
|
return binding
|
|
463
462
|
} catch (e) {
|
|
@@ -476,8 +475,8 @@ function requireNative() {
|
|
|
476
475
|
try {
|
|
477
476
|
const binding = require('@nomicfoundation/edr-openharmony-arm64')
|
|
478
477
|
const bindingPackageVersion = require('@nomicfoundation/edr-openharmony-arm64/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '0.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
478
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
479
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
480
|
}
|
|
482
481
|
return binding
|
|
483
482
|
} catch (e) {
|
|
@@ -492,8 +491,8 @@ function requireNative() {
|
|
|
492
491
|
try {
|
|
493
492
|
const binding = require('@nomicfoundation/edr-openharmony-x64')
|
|
494
493
|
const bindingPackageVersion = require('@nomicfoundation/edr-openharmony-x64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '0.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
494
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
495
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
496
|
}
|
|
498
497
|
return binding
|
|
499
498
|
} catch (e) {
|
|
@@ -508,8 +507,8 @@ function requireNative() {
|
|
|
508
507
|
try {
|
|
509
508
|
const binding = require('@nomicfoundation/edr-openharmony-arm')
|
|
510
509
|
const bindingPackageVersion = require('@nomicfoundation/edr-openharmony-arm/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '0.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
510
|
+
if (bindingPackageVersion !== '0.22.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
511
|
+
throw new Error(`Native binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
512
|
}
|
|
514
513
|
return binding
|
|
515
514
|
} catch (e) {
|
|
@@ -550,7 +549,7 @@ function createLoadErrorChain(errors) {
|
|
|
550
549
|
//
|
|
551
550
|
// NAPI_RS_WASI_FLAVOR selects one exact generated flavor and implies strict
|
|
552
551
|
// WASI loading. It never crosses into another flavor or falls back to native.
|
|
553
|
-
const __napiWasiFlavors = [
|
|
552
|
+
const __napiWasiFlavors = ['wasm32-wasi']
|
|
554
553
|
const __napiWasiFlavor = process.env.NAPI_RS_WASI_FLAVOR
|
|
555
554
|
const __napiWasiFlavorRequested =
|
|
556
555
|
typeof __napiWasiFlavor === 'string' && __napiWasiFlavor.length > 0
|
|
@@ -619,11 +618,11 @@ if (!nativeBinding || forceWasi) {
|
|
|
619
618
|
}
|
|
620
619
|
return null
|
|
621
620
|
}
|
|
622
|
-
if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor ===
|
|
621
|
+
if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === 'wasm32-wasi')) {
|
|
623
622
|
let candidateError = null
|
|
624
623
|
let candidateFailed = false
|
|
625
624
|
try {
|
|
626
|
-
candidateError = __napiWasiResolveCandidate('./edr.wasi.cjs', false, [
|
|
625
|
+
candidateError = __napiWasiResolveCandidate('./edr.wasi.cjs', false, ['./edr.wasm32-wasi.debug.wasm', './edr.wasm32-wasi.wasm'])
|
|
627
626
|
candidateFailed = candidateError !== null
|
|
628
627
|
if (!candidateFailed) {
|
|
629
628
|
wasiBinding = require('./edr.wasi.cjs')
|
|
@@ -639,7 +638,7 @@ if (!nativeBinding || forceWasi) {
|
|
|
639
638
|
loadErrors.push(candidateError)
|
|
640
639
|
}
|
|
641
640
|
}
|
|
642
|
-
if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor ===
|
|
641
|
+
if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === 'wasm32-wasi')) {
|
|
643
642
|
let candidateError = null
|
|
644
643
|
let candidateFailed = false
|
|
645
644
|
try {
|
|
@@ -648,8 +647,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
648
647
|
if (!candidateFailed) {
|
|
649
648
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
650
649
|
const bindingPackageVersion = require('@nomicfoundation/edr-wasm32-wasi/package.json').version
|
|
651
|
-
if (bindingPackageVersion !== '0.
|
|
652
|
-
throw new Error(`WASI binding package version mismatch, expected 0.
|
|
650
|
+
if (bindingPackageVersion !== '0.22.0') {
|
|
651
|
+
throw new Error(`WASI binding package version mismatch, expected 0.22.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
653
652
|
}
|
|
654
653
|
}
|
|
655
654
|
wasiBinding = require('@nomicfoundation/edr-wasm32-wasi')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomicfoundation/edr",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"devDependencies": {
|
|
5
5
|
"@napi-rs/cli": "^3.7.0",
|
|
6
6
|
"@nomicfoundation/ethereumjs-util": "^9.0.4",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"@types/chai-as-promised": "^7.1.8",
|
|
10
10
|
"@types/mocha": ">=9.1.0",
|
|
11
11
|
"@types/node": "^22.0.0",
|
|
12
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
13
|
-
"@typescript-eslint/parser": "8.
|
|
12
|
+
"@typescript-eslint/eslint-plugin": "8.70.0",
|
|
13
|
+
"@typescript-eslint/parser": "8.70.0",
|
|
14
14
|
"chai": "^4.3.6",
|
|
15
15
|
"chai-as-promised": "^7.1.1",
|
|
16
16
|
"chalk": "^2.4.2",
|
|
@@ -59,13 +59,13 @@
|
|
|
59
59
|
},
|
|
60
60
|
"types": "index.d.ts",
|
|
61
61
|
"optionalDependencies": {
|
|
62
|
-
"@nomicfoundation/edr-darwin-arm64": "0.
|
|
63
|
-
"@nomicfoundation/edr-darwin-x64": "0.
|
|
64
|
-
"@nomicfoundation/edr-linux-arm64-gnu": "0.
|
|
65
|
-
"@nomicfoundation/edr-linux-arm64-musl": "0.
|
|
66
|
-
"@nomicfoundation/edr-linux-x64-gnu": "0.
|
|
67
|
-
"@nomicfoundation/edr-linux-x64-musl": "0.
|
|
68
|
-
"@nomicfoundation/edr-win32-x64-msvc": "0.
|
|
62
|
+
"@nomicfoundation/edr-darwin-arm64": "0.22.0",
|
|
63
|
+
"@nomicfoundation/edr-darwin-x64": "0.22.0",
|
|
64
|
+
"@nomicfoundation/edr-linux-arm64-gnu": "0.22.0",
|
|
65
|
+
"@nomicfoundation/edr-linux-arm64-musl": "0.22.0",
|
|
66
|
+
"@nomicfoundation/edr-linux-x64-gnu": "0.22.0",
|
|
67
|
+
"@nomicfoundation/edr-linux-x64-musl": "0.22.0",
|
|
68
|
+
"@nomicfoundation/edr-win32-x64-msvc": "0.22.0"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"artifacts": "napi artifacts",
|