@withmarfa/core 0.0.30 → 0.0.32
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 +148 -3
- package/index.js +55 -54
- package/marfa-core.darwin-arm64.node +0 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -28,6 +28,14 @@ export declare class Folders {
|
|
|
28
28
|
|
|
29
29
|
/** A local copy of a slice of one server. */
|
|
30
30
|
export declare class MarfaCore {
|
|
31
|
+
createView(settings: Record<string, unknown>, idempotencyKey?: string | undefined | null): Promise<ViewRow>
|
|
32
|
+
changeView(id: string, changes: Record<string, unknown>, version: number, idempotencyKey?: string | undefined | null): Promise<ViewRow>
|
|
33
|
+
deleteView(id: string, idempotencyKey?: string | undefined | null): Promise<void>
|
|
34
|
+
listViews(): Views
|
|
35
|
+
view(id: string): ViewRow | null
|
|
36
|
+
listInView(id: string, layout?: string | undefined | null, limit?: number | undefined | null, offset?: number | undefined | null): Listing
|
|
37
|
+
searchInView(query: string, id: string, limit?: number | undefined | null): Found
|
|
38
|
+
viewGroups(id: string, layout: string, timeZone?: string | undefined | null): ViewGroups
|
|
31
39
|
/**
|
|
32
40
|
* Opens a store another process writes, to read it only: never the
|
|
33
41
|
* writer, never a write, and a path with no store is refused.
|
|
@@ -117,6 +125,8 @@ export declare class MarfaCore {
|
|
|
117
125
|
/** Applies every event since the stored cursor. */
|
|
118
126
|
catchUp(stop?: Stop | undefined | null): Promise<CatchUpReport>
|
|
119
127
|
list(filters?: ListFilters | undefined | null, sort?: Sort | undefined | null): Listing
|
|
128
|
+
listInFolder(id: string, sort?: Sort | undefined | null, limit?: number | undefined | null, offset?: number | undefined | null): Listing
|
|
129
|
+
searchInFolder(query: string, id: string, limit?: number | undefined | null): Found
|
|
120
130
|
get(id: string): Item | null
|
|
121
131
|
edgesFrom(id: string): Array<Edge>
|
|
122
132
|
edgesTo(id: string): Array<Edge>
|
|
@@ -242,6 +252,17 @@ export declare class MarfaCore {
|
|
|
242
252
|
* Refused to a reading handle.
|
|
243
253
|
*/
|
|
244
254
|
trimFiles(): number
|
|
255
|
+
/**
|
|
256
|
+
* Fetches the bytes of every file attached to an item the copy holds
|
|
257
|
+
* that the cache does not hold whole, smallest first, and answers what
|
|
258
|
+
* it fetched and the attachments after it, resuming the part of one an
|
|
259
|
+
* earlier fetch left. Waits out a server that asks for a wait of a
|
|
260
|
+
* minute or less, and stops at the first the disk has no room for, once
|
|
261
|
+
* the server cannot be reached, or once it asks for a longer wait; one
|
|
262
|
+
* that fails otherwise is passed over. Run after a hydration and after
|
|
263
|
+
* a catch-up. Refused to a reading handle and for a folder's copy.
|
|
264
|
+
*/
|
|
265
|
+
fetchKept(stop?: Stop | undefined | null): Promise<KeptFetch>
|
|
245
266
|
/** Whether a blob's bytes are held beside the store, with no request. */
|
|
246
267
|
blobHeld(hash: string): boolean
|
|
247
268
|
/**
|
|
@@ -293,7 +314,7 @@ export declare class MarfaCore {
|
|
|
293
314
|
* Raised to end a `hydrate`, `catchUp` or `drain` it was given to, soon
|
|
294
315
|
* after, with an error coded `canceled`. What the call had taken is
|
|
295
316
|
* consistent: a hydration left unfinished answers lists and searches marked
|
|
296
|
-
* partial and
|
|
317
|
+
* partial, and takes writes only to the rows it holds and new ones, and no edge writes, until a hydration completes (the next one of the same slice carries on from the page it reached where it can), a catch-up keeps the cursor it reached, and a drain leaves what it had not sent queued, and
|
|
297
318
|
* an upload or item or edge write it had in flight queued as sent, for the
|
|
298
319
|
* next drain to send again under the same key. A raised `Stop` stays raised, so a call given one
|
|
299
320
|
* afterwards ends at once.
|
|
@@ -344,6 +365,21 @@ export interface Attachment {
|
|
|
344
365
|
tier?: Tier
|
|
345
366
|
}
|
|
346
367
|
|
|
368
|
+
/** The files attached to items the copy holds. */
|
|
369
|
+
export interface Attachments {
|
|
370
|
+
/** The file items whose bytes the cache holds whole. */
|
|
371
|
+
held: number
|
|
372
|
+
/** Their bytes, counted once for files that share them. */
|
|
373
|
+
heldBytes: number
|
|
374
|
+
/** The bytes of partial files of attachments. */
|
|
375
|
+
partialBytes: number
|
|
376
|
+
/** The attachments whose bytes the cache does not hold whole. */
|
|
377
|
+
notHeld: number
|
|
378
|
+
/** The bytes they state, counted once for files that share them. */
|
|
379
|
+
notHeldBytes: number
|
|
380
|
+
notHeldByReason: Array<NotHeld>
|
|
381
|
+
}
|
|
382
|
+
|
|
347
383
|
/** Why a `blocked` write has stopped. */
|
|
348
384
|
export declare const enum BlockedReason {
|
|
349
385
|
CredentialRefused = 'credential_refused',
|
|
@@ -384,12 +420,16 @@ export type Change =
|
|
|
384
420
|
| { kind: 'watchFailed'; code: string; reason: string; cursor: string }
|
|
385
421
|
|
|
386
422
|
/**
|
|
387
|
-
* Whether a local list or search was read from a whole copy
|
|
388
|
-
* hydration is still filling, which holds only the rows that have arrived
|
|
423
|
+
* Whether a local list or search was read from a whole copy; from one a
|
|
424
|
+
* hydration is still filling, which holds only the rows that have arrived;
|
|
425
|
+
* or from one the server's event log no longer reaches, which holds the rows
|
|
426
|
+
* it held then, some since changed or gone on the server, until a hydration
|
|
427
|
+
* has filled it again.
|
|
389
428
|
*/
|
|
390
429
|
export declare const enum Completeness {
|
|
391
430
|
Complete = 'complete',
|
|
392
431
|
Partial = 'partial',
|
|
432
|
+
Stale = 'stale',
|
|
393
433
|
}
|
|
394
434
|
|
|
395
435
|
export interface ConfirmedRemoval {
|
|
@@ -597,6 +637,12 @@ export interface FileCache {
|
|
|
597
637
|
* once a fetched file is marked.
|
|
598
638
|
*/
|
|
599
639
|
backupMarkFailure?: string
|
|
640
|
+
/**
|
|
641
|
+
* The files attached to items the copy holds, which stay on the device
|
|
642
|
+
* outside the budget; absent from the start of a hydration until one
|
|
643
|
+
* completes, for a folder's copy, and where the cache could not be read.
|
|
644
|
+
*/
|
|
645
|
+
attachments?: Attachments
|
|
600
646
|
}
|
|
601
647
|
|
|
602
648
|
export declare const enum FileState {
|
|
@@ -740,7 +786,33 @@ export interface HydrateReport {
|
|
|
740
786
|
edgeTypes: Array<string>
|
|
741
787
|
items: number
|
|
742
788
|
edges: number
|
|
789
|
+
/**
|
|
790
|
+
* The listing pages this call read, those of a walk it then started
|
|
791
|
+
* again from the first page included.
|
|
792
|
+
*/
|
|
743
793
|
pages: number
|
|
794
|
+
/**
|
|
795
|
+
* The listing pages the hydration read in all, those of the interrupted
|
|
796
|
+
* calls it resumed included.
|
|
797
|
+
*/
|
|
798
|
+
pagesTotal: number
|
|
799
|
+
/**
|
|
800
|
+
* Whether this call carried on from the page an interrupted hydration
|
|
801
|
+
* of the same slice had reached.
|
|
802
|
+
*/
|
|
803
|
+
resumed: boolean
|
|
804
|
+
/**
|
|
805
|
+
* Why an interrupted hydration was filled again from the first page
|
|
806
|
+
* rather than resumed, such as `slice_changed` or `head_aged_out`.
|
|
807
|
+
*/
|
|
808
|
+
restarted?: string
|
|
809
|
+
/**
|
|
810
|
+
* Whether the copy was filled again over the rows it held, which it
|
|
811
|
+
* answered marked stale meanwhile, rather than cleared first: so it is
|
|
812
|
+
* filled when the event log let its cursor go and the instance, the reach
|
|
813
|
+
* and the slice are those it was built under.
|
|
814
|
+
*/
|
|
815
|
+
inPlace: boolean
|
|
744
816
|
cursor: string
|
|
745
817
|
/** Types the app declared that the instance did not hold and now does. */
|
|
746
818
|
registeredTypes: Array<string>
|
|
@@ -753,6 +825,7 @@ export declare const enum Hydration {
|
|
|
753
825
|
InProgress = 'in_progress',
|
|
754
826
|
Complete = 'complete',
|
|
755
827
|
Expired = 'expired',
|
|
828
|
+
Stale = 'stale',
|
|
756
829
|
}
|
|
757
830
|
|
|
758
831
|
export interface Item {
|
|
@@ -793,6 +866,18 @@ export interface ItemType {
|
|
|
793
866
|
compatibleWith: Array<string>
|
|
794
867
|
}
|
|
795
868
|
|
|
869
|
+
/** What a fetch of the attachments did. */
|
|
870
|
+
export interface KeptFetch {
|
|
871
|
+
/**
|
|
872
|
+
* The files whose bytes it fetched, counted once for files that share
|
|
873
|
+
* them.
|
|
874
|
+
*/
|
|
875
|
+
fetched: number
|
|
876
|
+
fetchedBytes: number
|
|
877
|
+
/** The attachments after it, as the state report gives them. */
|
|
878
|
+
attachments?: Attachments
|
|
879
|
+
}
|
|
880
|
+
|
|
796
881
|
/**
|
|
797
882
|
* What a write met that was no answer to it: the HTTP status, absent where
|
|
798
883
|
* nothing answered, and the start of the answer's body when it is text.
|
|
@@ -847,6 +932,43 @@ export interface MissingGrant {
|
|
|
847
932
|
level: GrantLevel
|
|
848
933
|
}
|
|
849
934
|
|
|
935
|
+
/** The attachments not held for one reason. */
|
|
936
|
+
export interface NotHeld {
|
|
937
|
+
reason: NotHeldReason
|
|
938
|
+
attachments: number
|
|
939
|
+
/** The bytes they state, counted once for files that share them. */
|
|
940
|
+
bytes: number
|
|
941
|
+
/** How many of them state no size, so add nothing to `bytes`. */
|
|
942
|
+
unstated: number
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
/** Why an attachment's bytes are not held. */
|
|
946
|
+
export declare const enum NotHeldReason {
|
|
947
|
+
/** No fetch of them has been asked for since they became an attachment. */
|
|
948
|
+
NotFetched = 'not_fetched',
|
|
949
|
+
/**
|
|
950
|
+
* The volume had no room for them, or for an attachment before them in
|
|
951
|
+
* the same fetch.
|
|
952
|
+
*/
|
|
953
|
+
NoRoom = 'no_room',
|
|
954
|
+
/**
|
|
955
|
+
* The server, or the link it gave, could not be reached, or the link
|
|
956
|
+
* stopped sending part way.
|
|
957
|
+
*/
|
|
958
|
+
Unreachable = 'unreachable',
|
|
959
|
+
/**
|
|
960
|
+
* The server asked for a wait longer than a fetch of attachments
|
|
961
|
+
* makes, before them or an attachment before them in the same fetch.
|
|
962
|
+
*/
|
|
963
|
+
RateLimited = 'rate_limited',
|
|
964
|
+
/** The server holds no bytes by that hash. */
|
|
965
|
+
Absent = 'absent',
|
|
966
|
+
/** The fetch failed otherwise. */
|
|
967
|
+
Failed = 'failed',
|
|
968
|
+
/** The edge is held but its file item is not. */
|
|
969
|
+
NotInCopy = 'not_in_copy',
|
|
970
|
+
}
|
|
971
|
+
|
|
850
972
|
export interface PausedRemoval {
|
|
851
973
|
disk: number
|
|
852
974
|
pull: number
|
|
@@ -1084,6 +1206,29 @@ export type Verdict =
|
|
|
1084
1206
|
| { verdict: 'blocked'; reason: BlockedReason; refusal?: Refusal }
|
|
1085
1207
|
| { verdict: 'dead' }
|
|
1086
1208
|
|
|
1209
|
+
export interface ViewGroup {
|
|
1210
|
+
key: string | number | boolean | null
|
|
1211
|
+
count: number
|
|
1212
|
+
sum?: number
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
export interface ViewGroups {
|
|
1216
|
+
groups: Array<ViewGroup>
|
|
1217
|
+
completeness: Completeness
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
export interface ViewRow {
|
|
1221
|
+
id: string
|
|
1222
|
+
version: number
|
|
1223
|
+
state: ItemState
|
|
1224
|
+
settings: Record<string, unknown>
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
export interface Views {
|
|
1228
|
+
views: Array<ViewRow>
|
|
1229
|
+
completeness: Completeness
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1087
1232
|
export interface WaitingFirstSync {
|
|
1088
1233
|
plan?: FirstSyncPlan
|
|
1089
1234
|
}
|
package/index.js
CHANGED
|
@@ -89,8 +89,8 @@ function requireNative() {
|
|
|
89
89
|
try {
|
|
90
90
|
const binding = require('@withmarfa/core-android-arm64')
|
|
91
91
|
const bindingPackageVersion = require('@withmarfa/core-android-arm64/package.json').version
|
|
92
|
-
if (bindingPackageVersion !== '0.0.
|
|
93
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
92
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
93
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
94
94
|
}
|
|
95
95
|
return binding
|
|
96
96
|
} catch (e) {
|
|
@@ -105,8 +105,8 @@ function requireNative() {
|
|
|
105
105
|
try {
|
|
106
106
|
const binding = require('@withmarfa/core-android-arm-eabi')
|
|
107
107
|
const bindingPackageVersion = require('@withmarfa/core-android-arm-eabi/package.json').version
|
|
108
|
-
if (bindingPackageVersion !== '0.0.
|
|
109
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
108
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
109
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
110
110
|
}
|
|
111
111
|
return binding
|
|
112
112
|
} catch (e) {
|
|
@@ -126,8 +126,8 @@ function requireNative() {
|
|
|
126
126
|
try {
|
|
127
127
|
const binding = require('@withmarfa/core-win32-x64-gnu')
|
|
128
128
|
const bindingPackageVersion = require('@withmarfa/core-win32-x64-gnu/package.json').version
|
|
129
|
-
if (bindingPackageVersion !== '0.0.
|
|
130
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
129
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
130
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
131
131
|
}
|
|
132
132
|
return binding
|
|
133
133
|
} catch (e) {
|
|
@@ -142,8 +142,8 @@ function requireNative() {
|
|
|
142
142
|
try {
|
|
143
143
|
const binding = require('@withmarfa/core-win32-x64-msvc')
|
|
144
144
|
const bindingPackageVersion = require('@withmarfa/core-win32-x64-msvc/package.json').version
|
|
145
|
-
if (bindingPackageVersion !== '0.0.
|
|
146
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
145
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
146
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
147
147
|
}
|
|
148
148
|
return binding
|
|
149
149
|
} catch (e) {
|
|
@@ -159,8 +159,8 @@ function requireNative() {
|
|
|
159
159
|
try {
|
|
160
160
|
const binding = require('@withmarfa/core-win32-ia32-msvc')
|
|
161
161
|
const bindingPackageVersion = require('@withmarfa/core-win32-ia32-msvc/package.json').version
|
|
162
|
-
if (bindingPackageVersion !== '0.0.
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
162
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
163
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
164
164
|
}
|
|
165
165
|
return binding
|
|
166
166
|
} catch (e) {
|
|
@@ -175,8 +175,8 @@ function requireNative() {
|
|
|
175
175
|
try {
|
|
176
176
|
const binding = require('@withmarfa/core-win32-arm64-msvc')
|
|
177
177
|
const bindingPackageVersion = require('@withmarfa/core-win32-arm64-msvc/package.json').version
|
|
178
|
-
if (bindingPackageVersion !== '0.0.
|
|
179
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
178
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
179
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
180
180
|
}
|
|
181
181
|
return binding
|
|
182
182
|
} catch (e) {
|
|
@@ -194,8 +194,8 @@ function requireNative() {
|
|
|
194
194
|
try {
|
|
195
195
|
const binding = require('@withmarfa/core-darwin-universal')
|
|
196
196
|
const bindingPackageVersion = require('@withmarfa/core-darwin-universal/package.json').version
|
|
197
|
-
if (bindingPackageVersion !== '0.0.
|
|
198
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
197
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
198
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
199
199
|
}
|
|
200
200
|
return binding
|
|
201
201
|
} catch (e) {
|
|
@@ -210,8 +210,8 @@ function requireNative() {
|
|
|
210
210
|
try {
|
|
211
211
|
const binding = require('@withmarfa/core-darwin-x64')
|
|
212
212
|
const bindingPackageVersion = require('@withmarfa/core-darwin-x64/package.json').version
|
|
213
|
-
if (bindingPackageVersion !== '0.0.
|
|
214
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
213
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
214
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
215
215
|
}
|
|
216
216
|
return binding
|
|
217
217
|
} catch (e) {
|
|
@@ -226,8 +226,8 @@ function requireNative() {
|
|
|
226
226
|
try {
|
|
227
227
|
const binding = require('@withmarfa/core-darwin-arm64')
|
|
228
228
|
const bindingPackageVersion = require('@withmarfa/core-darwin-arm64/package.json').version
|
|
229
|
-
if (bindingPackageVersion !== '0.0.
|
|
230
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
229
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
230
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
231
231
|
}
|
|
232
232
|
return binding
|
|
233
233
|
} catch (e) {
|
|
@@ -246,8 +246,8 @@ function requireNative() {
|
|
|
246
246
|
try {
|
|
247
247
|
const binding = require('@withmarfa/core-freebsd-x64')
|
|
248
248
|
const bindingPackageVersion = require('@withmarfa/core-freebsd-x64/package.json').version
|
|
249
|
-
if (bindingPackageVersion !== '0.0.
|
|
250
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
249
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
250
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
251
251
|
}
|
|
252
252
|
return binding
|
|
253
253
|
} catch (e) {
|
|
@@ -262,8 +262,8 @@ function requireNative() {
|
|
|
262
262
|
try {
|
|
263
263
|
const binding = require('@withmarfa/core-freebsd-arm64')
|
|
264
264
|
const bindingPackageVersion = require('@withmarfa/core-freebsd-arm64/package.json').version
|
|
265
|
-
if (bindingPackageVersion !== '0.0.
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
265
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
266
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
267
267
|
}
|
|
268
268
|
return binding
|
|
269
269
|
} catch (e) {
|
|
@@ -283,8 +283,8 @@ function requireNative() {
|
|
|
283
283
|
try {
|
|
284
284
|
const binding = require('@withmarfa/core-linux-x64-musl')
|
|
285
285
|
const bindingPackageVersion = require('@withmarfa/core-linux-x64-musl/package.json').version
|
|
286
|
-
if (bindingPackageVersion !== '0.0.
|
|
287
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
286
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
287
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
288
288
|
}
|
|
289
289
|
return binding
|
|
290
290
|
} catch (e) {
|
|
@@ -299,8 +299,8 @@ function requireNative() {
|
|
|
299
299
|
try {
|
|
300
300
|
const binding = require('@withmarfa/core-linux-x64-gnu')
|
|
301
301
|
const bindingPackageVersion = require('@withmarfa/core-linux-x64-gnu/package.json').version
|
|
302
|
-
if (bindingPackageVersion !== '0.0.
|
|
303
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
302
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
303
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
304
304
|
}
|
|
305
305
|
return binding
|
|
306
306
|
} catch (e) {
|
|
@@ -317,8 +317,8 @@ function requireNative() {
|
|
|
317
317
|
try {
|
|
318
318
|
const binding = require('@withmarfa/core-linux-arm64-musl')
|
|
319
319
|
const bindingPackageVersion = require('@withmarfa/core-linux-arm64-musl/package.json').version
|
|
320
|
-
if (bindingPackageVersion !== '0.0.
|
|
321
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
320
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
321
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
322
322
|
}
|
|
323
323
|
return binding
|
|
324
324
|
} catch (e) {
|
|
@@ -333,8 +333,8 @@ function requireNative() {
|
|
|
333
333
|
try {
|
|
334
334
|
const binding = require('@withmarfa/core-linux-arm64-gnu')
|
|
335
335
|
const bindingPackageVersion = require('@withmarfa/core-linux-arm64-gnu/package.json').version
|
|
336
|
-
if (bindingPackageVersion !== '0.0.
|
|
337
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
336
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
337
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
338
338
|
}
|
|
339
339
|
return binding
|
|
340
340
|
} catch (e) {
|
|
@@ -351,8 +351,8 @@ function requireNative() {
|
|
|
351
351
|
try {
|
|
352
352
|
const binding = require('@withmarfa/core-linux-arm-musleabihf')
|
|
353
353
|
const bindingPackageVersion = require('@withmarfa/core-linux-arm-musleabihf/package.json').version
|
|
354
|
-
if (bindingPackageVersion !== '0.0.
|
|
355
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
354
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
355
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
356
356
|
}
|
|
357
357
|
return binding
|
|
358
358
|
} catch (e) {
|
|
@@ -367,8 +367,8 @@ function requireNative() {
|
|
|
367
367
|
try {
|
|
368
368
|
const binding = require('@withmarfa/core-linux-arm-gnueabihf')
|
|
369
369
|
const bindingPackageVersion = require('@withmarfa/core-linux-arm-gnueabihf/package.json').version
|
|
370
|
-
if (bindingPackageVersion !== '0.0.
|
|
371
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
370
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
371
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
372
372
|
}
|
|
373
373
|
return binding
|
|
374
374
|
} catch (e) {
|
|
@@ -385,8 +385,8 @@ function requireNative() {
|
|
|
385
385
|
try {
|
|
386
386
|
const binding = require('@withmarfa/core-linux-loong64-musl')
|
|
387
387
|
const bindingPackageVersion = require('@withmarfa/core-linux-loong64-musl/package.json').version
|
|
388
|
-
if (bindingPackageVersion !== '0.0.
|
|
389
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
388
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
389
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
390
390
|
}
|
|
391
391
|
return binding
|
|
392
392
|
} catch (e) {
|
|
@@ -401,8 +401,8 @@ function requireNative() {
|
|
|
401
401
|
try {
|
|
402
402
|
const binding = require('@withmarfa/core-linux-loong64-gnu')
|
|
403
403
|
const bindingPackageVersion = require('@withmarfa/core-linux-loong64-gnu/package.json').version
|
|
404
|
-
if (bindingPackageVersion !== '0.0.
|
|
405
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
404
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
405
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
406
406
|
}
|
|
407
407
|
return binding
|
|
408
408
|
} catch (e) {
|
|
@@ -419,8 +419,8 @@ function requireNative() {
|
|
|
419
419
|
try {
|
|
420
420
|
const binding = require('@withmarfa/core-linux-riscv64-musl')
|
|
421
421
|
const bindingPackageVersion = require('@withmarfa/core-linux-riscv64-musl/package.json').version
|
|
422
|
-
if (bindingPackageVersion !== '0.0.
|
|
423
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
422
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
423
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
424
424
|
}
|
|
425
425
|
return binding
|
|
426
426
|
} catch (e) {
|
|
@@ -435,8 +435,8 @@ function requireNative() {
|
|
|
435
435
|
try {
|
|
436
436
|
const binding = require('@withmarfa/core-linux-riscv64-gnu')
|
|
437
437
|
const bindingPackageVersion = require('@withmarfa/core-linux-riscv64-gnu/package.json').version
|
|
438
|
-
if (bindingPackageVersion !== '0.0.
|
|
439
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
438
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
439
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
440
440
|
}
|
|
441
441
|
return binding
|
|
442
442
|
} catch (e) {
|
|
@@ -452,8 +452,8 @@ function requireNative() {
|
|
|
452
452
|
try {
|
|
453
453
|
const binding = require('@withmarfa/core-linux-ppc64-gnu')
|
|
454
454
|
const bindingPackageVersion = require('@withmarfa/core-linux-ppc64-gnu/package.json').version
|
|
455
|
-
if (bindingPackageVersion !== '0.0.
|
|
456
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
455
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
456
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
457
457
|
}
|
|
458
458
|
return binding
|
|
459
459
|
} catch (e) {
|
|
@@ -468,8 +468,8 @@ function requireNative() {
|
|
|
468
468
|
try {
|
|
469
469
|
const binding = require('@withmarfa/core-linux-s390x-gnu')
|
|
470
470
|
const bindingPackageVersion = require('@withmarfa/core-linux-s390x-gnu/package.json').version
|
|
471
|
-
if (bindingPackageVersion !== '0.0.
|
|
472
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
471
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
472
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
473
473
|
}
|
|
474
474
|
return binding
|
|
475
475
|
} catch (e) {
|
|
@@ -488,8 +488,8 @@ function requireNative() {
|
|
|
488
488
|
try {
|
|
489
489
|
const binding = require('@withmarfa/core-openharmony-arm64')
|
|
490
490
|
const bindingPackageVersion = require('@withmarfa/core-openharmony-arm64/package.json').version
|
|
491
|
-
if (bindingPackageVersion !== '0.0.
|
|
492
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
491
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
492
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
493
493
|
}
|
|
494
494
|
return binding
|
|
495
495
|
} catch (e) {
|
|
@@ -504,8 +504,8 @@ function requireNative() {
|
|
|
504
504
|
try {
|
|
505
505
|
const binding = require('@withmarfa/core-openharmony-x64')
|
|
506
506
|
const bindingPackageVersion = require('@withmarfa/core-openharmony-x64/package.json').version
|
|
507
|
-
if (bindingPackageVersion !== '0.0.
|
|
508
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
507
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
508
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
509
509
|
}
|
|
510
510
|
return binding
|
|
511
511
|
} catch (e) {
|
|
@@ -520,8 +520,8 @@ function requireNative() {
|
|
|
520
520
|
try {
|
|
521
521
|
const binding = require('@withmarfa/core-openharmony-arm')
|
|
522
522
|
const bindingPackageVersion = require('@withmarfa/core-openharmony-arm/package.json').version
|
|
523
|
-
if (bindingPackageVersion !== '0.0.
|
|
524
|
-
throw new Error(`Native binding package version mismatch, expected 0.0.
|
|
523
|
+
if (bindingPackageVersion !== '0.0.32' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
524
|
+
throw new Error(`Native binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
525
525
|
}
|
|
526
526
|
return binding
|
|
527
527
|
} catch (e) {
|
|
@@ -661,8 +661,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
661
661
|
if (!candidateFailed) {
|
|
662
662
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
663
663
|
const bindingPackageVersion = require('@withmarfa/core-wasm32-wasi/package.json').version
|
|
664
|
-
if (bindingPackageVersion !== '0.0.
|
|
665
|
-
throw new Error(`WASI binding package version mismatch, expected 0.0.
|
|
664
|
+
if (bindingPackageVersion !== '0.0.32') {
|
|
665
|
+
throw new Error(`WASI binding package version mismatch, expected 0.0.32 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
668
|
wasiBinding = require('@withmarfa/core-wasm32-wasi')
|
|
@@ -793,6 +793,7 @@ module.exports.GrantLevel = nativeBinding.GrantLevel
|
|
|
793
793
|
module.exports.Handle = nativeBinding.Handle
|
|
794
794
|
module.exports.Hydration = nativeBinding.Hydration
|
|
795
795
|
module.exports.ItemState = nativeBinding.ItemState
|
|
796
|
+
module.exports.NotHeldReason = nativeBinding.NotHeldReason
|
|
796
797
|
module.exports.SliceTier = nativeBinding.SliceTier
|
|
797
798
|
module.exports.SortDirection = nativeBinding.SortDirection
|
|
798
799
|
module.exports.SortField = nativeBinding.SortField
|
|
Binary file
|